Curl_altsvc_init:
  325|  11.7k|{
  326|  11.7k|  struct altsvcinfo *asi = curlx_calloc(1, sizeof(struct altsvcinfo));
  ------------------
  |  | 1475|  11.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  327|  11.7k|  if(!asi)
  ------------------
  |  Branch (327:6): [True: 0, False: 11.7k]
  ------------------
  328|      0|    return NULL;
  329|  11.7k|  Curl_llist_init(&asi->list, NULL);
  330|       |
  331|       |  /* set default behavior */
  332|  11.7k|  asi->flags = CURLALTSVC_H1
  ------------------
  |  | 1043|  11.7k|#define CURLALTSVC_H1           (1L << 3)
  ------------------
  333|  11.7k|#ifdef USE_HTTP2
  334|  11.7k|    | CURLALTSVC_H2
  ------------------
  |  | 1044|  11.7k|#define CURLALTSVC_H2           (1L << 4)
  ------------------
  335|  11.7k|#endif
  336|       |#ifdef USE_HTTP3
  337|       |    | CURLALTSVC_H3
  338|       |#endif
  339|  11.7k|    ;
  340|  11.7k|  return asi;
  341|  11.7k|}
Curl_altsvc_load:
  347|  11.7k|{
  348|  11.7k|  DEBUGASSERT(asi);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (348:3): [True: 0, False: 11.7k]
  |  Branch (348:3): [True: 11.7k, False: 0]
  ------------------
  349|  11.7k|  return altsvc_load(asi, file);
  350|  11.7k|}
Curl_altsvc_ctrl:
  356|     33|{
  357|     33|  DEBUGASSERT(data);
  ------------------
  |  | 1079|     33|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (357:3): [True: 0, False: 33]
  |  Branch (357:3): [True: 33, False: 0]
  ------------------
  358|     33|  if(!ctrl)
  ------------------
  |  Branch (358:6): [True: 1, False: 32]
  ------------------
  359|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  360|       |
  361|     32|  if(!data->asi) {
  ------------------
  |  Branch (361:6): [True: 32, False: 0]
  ------------------
  362|     32|    data->asi = Curl_altsvc_init();
  363|     32|    if(!data->asi)
  ------------------
  |  Branch (363:8): [True: 0, False: 32]
  ------------------
  364|      0|      return CURLE_OUT_OF_MEMORY;
  365|     32|  }
  366|     32|  data->asi->flags = ctrl;
  367|     32|  return CURLE_OK;
  368|     32|}
Curl_altsvc_cleanup:
  375|  26.2k|{
  376|  26.2k|  if(*asi) {
  ------------------
  |  Branch (376:6): [True: 11.7k, False: 14.4k]
  ------------------
  377|  11.7k|    struct Curl_llist_node *e;
  378|  11.7k|    struct Curl_llist_node *n;
  379|  11.7k|    struct altsvcinfo *altsvc = *asi;
  380|  11.7k|    for(e = Curl_llist_head(&altsvc->list); e; e = n) {
  ------------------
  |  Branch (380:45): [True: 0, False: 11.7k]
  ------------------
  381|      0|      struct altsvc *as = Curl_node_elem(e);
  382|      0|      n = Curl_node_next(e);
  383|      0|      altsvc_free(as);
  ------------------
  |  |   87|      0|#define altsvc_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  384|      0|    }
  385|  11.7k|    curlx_free(altsvc->filename);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  386|  11.7k|    curlx_free(altsvc);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  387|       |    *asi = NULL; /* clear the pointer */
  388|  11.7k|  }
  389|  26.2k|}
Curl_altsvc_save:
  396|  26.2k|{
  397|  26.2k|  CURLcode result = CURLE_OK;
  398|  26.2k|  FILE *out;
  399|  26.2k|  char *tempstore = NULL;
  400|       |
  401|  26.2k|  if(!asi)
  ------------------
  |  Branch (401:6): [True: 14.4k, False: 11.7k]
  ------------------
  402|       |    /* no cache activated */
  403|  14.4k|    return CURLE_OK;
  404|       |
  405|       |  /* if not new name is given, use the one we stored from the load */
  406|  11.7k|  if(!file && asi->filename)
  ------------------
  |  Branch (406:6): [True: 5, False: 11.7k]
  |  Branch (406:15): [True: 0, False: 5]
  ------------------
  407|      0|    file = asi->filename;
  408|       |
  409|  11.7k|  if((asi->flags & CURLALTSVC_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1042|  11.7k|#define CURLALTSVC_READONLYFILE (1L << 2)
  ------------------
  |  Branch (409:6): [True: 19, False: 11.7k]
  |  Branch (409:48): [True: 3, False: 11.7k]
  |  Branch (409:57): [True: 0, False: 11.7k]
  ------------------
  410|       |    /* marked as read-only, no file or zero length filename */
  411|     22|    return CURLE_OK;
  412|       |
  413|  11.7k|  result = Curl_fopen(data, file, &out, &tempstore);
  414|  11.7k|  if(!result) {
  ------------------
  |  Branch (414:6): [True: 11.7k, False: 0]
  ------------------
  415|  11.7k|    struct Curl_llist_node *e;
  416|  11.7k|    struct Curl_llist_node *n;
  417|  11.7k|    fputs("# Your alt-svc cache. https://curl.se/docs/alt-svc.html\n"
  418|  11.7k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  419|  11.7k|          out);
  420|  11.7k|    for(e = Curl_llist_head(&asi->list); e; e = n) {
  ------------------
  |  Branch (420:42): [True: 0, False: 11.7k]
  ------------------
  421|      0|      struct altsvc *as = Curl_node_elem(e);
  422|      0|      n = Curl_node_next(e);
  423|      0|      result = altsvc_out(as, out);
  424|      0|      if(result)
  ------------------
  |  Branch (424:10): [True: 0, False: 0]
  ------------------
  425|      0|        break;
  426|      0|    }
  427|  11.7k|    curlx_fclose(out);
  ------------------
  |  |   79|  11.7k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  428|  11.7k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (428:8): [True: 11.7k, False: 0]
  |  Branch (428:19): [True: 0, False: 11.7k]
  |  Branch (428:32): [True: 0, False: 0]
  ------------------
  429|      0|      result = CURLE_WRITE_ERROR;
  430|       |
  431|  11.7k|    if(result && tempstore)
  ------------------
  |  Branch (431:8): [True: 0, False: 11.7k]
  |  Branch (431:18): [True: 0, False: 0]
  ------------------
  432|      0|      unlink(tempstore);
  433|  11.7k|  }
  434|  11.7k|  curlx_free(tempstore);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  435|  11.7k|  return result;
  436|  11.7k|}
altsvc.c:altsvc_load:
  238|  11.7k|{
  239|  11.7k|  CURLcode result = CURLE_OK;
  240|  11.7k|  FILE *fp;
  241|       |
  242|       |  /* we need a private copy of the filename so that the altsvc cache file
  243|       |     name survives an easy handle reset */
  244|  11.7k|  curlx_free(asi->filename);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  245|  11.7k|  asi->filename = curlx_strdup(file);
  ------------------
  |  | 1472|  11.7k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  246|  11.7k|  if(!asi->filename)
  ------------------
  |  Branch (246:6): [True: 0, False: 11.7k]
  ------------------
  247|      0|    return CURLE_OUT_OF_MEMORY;
  248|       |
  249|  11.7k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   74|  11.7k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  250|  11.7k|  if(fp) {
  ------------------
  |  Branch (250:6): [True: 11.7k, False: 0]
  ------------------
  251|  11.7k|    curlx_struct_stat stat;
  ------------------
  |  |   63|  11.7k|#define curlx_struct_stat       struct stat
  ------------------
  252|  11.7k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  11.7k|#define curlx_fstat             fstat
  ------------------
  |  Branch (252:8): [True: 0, False: 11.7k]
  |  Branch (252:50): [True: 11.7k, False: 0]
  ------------------
  253|  11.7k|      bool eof = FALSE;
  ------------------
  |  | 1056|  11.7k|#define FALSE false
  ------------------
  254|  11.7k|      struct dynbuf buf;
  255|  11.7k|      curlx_dyn_init(&buf, MAX_ALTSVC_LINE);
  ------------------
  |  |   41|  11.7k|#define MAX_ALTSVC_LINE    4095
  ------------------
  256|  11.7k|      do {
  257|  11.7k|        result = Curl_get_line(&buf, fp, &eof);
  258|  11.7k|        if(!result) {
  ------------------
  |  Branch (258:12): [True: 11.7k, False: 0]
  ------------------
  259|  11.7k|          const char *lineptr = curlx_dyn_ptr(&buf);
  260|  11.7k|          curlx_str_passblanks(&lineptr);
  261|  11.7k|          if(curlx_str_single(&lineptr, '#'))
  ------------------
  |  Branch (261:14): [True: 11.7k, False: 0]
  ------------------
  262|  11.7k|            altsvc_add(asi, lineptr);
  263|  11.7k|        }
  264|  11.7k|      } while(!result && !eof);
  ------------------
  |  Branch (264:15): [True: 11.7k, False: 0]
  |  Branch (264:26): [True: 0, False: 11.7k]
  ------------------
  265|  11.7k|      curlx_dyn_free(&buf); /* free the line buffer */
  266|  11.7k|    }
  267|  11.7k|    curlx_fclose(fp);
  ------------------
  |  |   79|  11.7k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  268|  11.7k|  }
  269|  11.7k|  return result;
  270|  11.7k|}
altsvc.c:altsvc_add:
  169|  11.7k|{
  170|       |  /* Example line:
  171|       |     h2 example.com 443 h3 shiny.example.com 8443 "20191231 10:00:00" 1
  172|       |   */
  173|  11.7k|  struct Curl_str srchost;
  174|  11.7k|  struct Curl_str dsthost;
  175|  11.7k|  struct Curl_str srcalpn;
  176|  11.7k|  struct Curl_str dstalpn;
  177|  11.7k|  struct Curl_str date;
  178|  11.7k|  curl_off_t srcport;
  179|  11.7k|  curl_off_t dstport;
  180|  11.7k|  curl_off_t persist;
  181|  11.7k|  curl_off_t prio;
  182|       |
  183|  11.7k|  if(curlx_str_word(&line, &srcalpn, MAX_ALTSVC_ALPNLEN) ||
  ------------------
  |  |   44|  11.7k|#define MAX_ALTSVC_ALPNLEN 10
  ------------------
  |  Branch (183:6): [True: 0, False: 11.7k]
  ------------------
  184|  11.7k|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (184:6): [True: 11.7k, False: 0]
  ------------------
  185|      0|     curlx_str_word(&line, &srchost, MAX_ALTSVC_HOSTLEN) ||
  ------------------
  |  |   43|      0|#define MAX_ALTSVC_HOSTLEN 2048
  ------------------
  |  Branch (185:6): [True: 0, False: 0]
  ------------------
  186|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (186:6): [True: 0, False: 0]
  ------------------
  187|      0|     curlx_str_number(&line, &srcport, 65535) ||
  ------------------
  |  Branch (187:6): [True: 0, False: 0]
  ------------------
  188|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (188:6): [True: 0, False: 0]
  ------------------
  189|      0|     curlx_str_word(&line, &dstalpn, MAX_ALTSVC_ALPNLEN) ||
  ------------------
  |  |   44|      0|#define MAX_ALTSVC_ALPNLEN 10
  ------------------
  |  Branch (189:6): [True: 0, False: 0]
  ------------------
  190|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (190:6): [True: 0, False: 0]
  ------------------
  191|      0|     curlx_str_word(&line, &dsthost, MAX_ALTSVC_HOSTLEN) ||
  ------------------
  |  |   43|      0|#define MAX_ALTSVC_HOSTLEN 2048
  ------------------
  |  Branch (191:6): [True: 0, False: 0]
  ------------------
  192|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (192:6): [True: 0, False: 0]
  ------------------
  193|      0|     curlx_str_number(&line, &dstport, 65535) ||
  ------------------
  |  Branch (193:6): [True: 0, False: 0]
  ------------------
  194|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (194:6): [True: 0, False: 0]
  ------------------
  195|      0|     curlx_str_quotedword(&line, &date, MAX_ALTSVC_DATELEN) ||
  ------------------
  |  |   42|      0|#define MAX_ALTSVC_DATELEN 17
  ------------------
  |  Branch (195:6): [True: 0, False: 0]
  ------------------
  196|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (196:6): [True: 0, False: 0]
  ------------------
  197|      0|     curlx_str_number(&line, &persist, 1) ||
  ------------------
  |  Branch (197:6): [True: 0, False: 0]
  ------------------
  198|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (198:6): [True: 0, False: 0]
  ------------------
  199|      0|     curlx_str_number(&line, &prio, 0) ||
  ------------------
  |  Branch (199:6): [True: 0, False: 0]
  ------------------
  200|      0|     curlx_str_newline(&line))
  ------------------
  |  Branch (200:6): [True: 0, False: 0]
  ------------------
  201|  11.7k|    ;
  202|      0|  else {
  203|      0|    char dbuf[MAX_ALTSVC_DATELEN + 1];
  204|      0|    time_t expires = 0;
  205|      0|    time_t now = time(NULL);
  ------------------
  |  |   63|      0|#define time(x) altsvc_debugtime(x)
  ------------------
  206|       |
  207|       |    /* The date parser works on a null-terminated string. The maximum length
  208|       |       is upheld by curlx_str_quotedword(). */
  209|      0|    memcpy(dbuf, curlx_str(&date), curlx_strlen(&date));
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
                  memcpy(dbuf, curlx_str(&date), curlx_strlen(&date));
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  210|      0|    dbuf[curlx_strlen(&date)] = 0;
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  211|      0|    Curl_getdate_capped(dbuf, &expires);
  212|       |
  213|      0|    if(now < expires) {
  ------------------
  |  Branch (213:8): [True: 0, False: 0]
  ------------------
  214|      0|      struct altsvc *as = altsvc_create(&srchost, &dsthost, &srcalpn, &dstalpn,
  215|      0|                                        (size_t)srcport, (size_t)dstport);
  216|      0|      if(as) {
  ------------------
  |  Branch (216:10): [True: 0, False: 0]
  ------------------
  217|      0|        as->expires = expires;
  218|      0|        as->persist = persist ? 1 : 0;
  ------------------
  |  Branch (218:23): [True: 0, False: 0]
  ------------------
  219|      0|        altsvc_append(asi, as);
  220|      0|      }
  221|      0|      else
  222|      0|        return CURLE_OUT_OF_MEMORY;
  223|      0|    }
  224|      0|  }
  225|       |
  226|  11.7k|  return CURLE_OK;
  227|  11.7k|}

Curl_eapi_enter:
  182|   252k|{
  183|   252k|  struct Curl_easy *data = curl;
  184|   252k|  const struct Curl_eapi_fn_props *fn_props;
  185|   252k|  CURLcode result = CURLE_OK;
  186|       |
  187|   252k|  guard->depth = 0;
  188|       |
  189|       |  /* Verify that we got an easy handle we can work with. */
  190|   252k|  if(!GOOD_EASY_HANDLE(data)) {
  ------------------
  |  |   34|   252k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|   252k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|   252k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 252k, False: 0]
  |  |  |  Branch (34:12): [True: 252k, False: 0]
  |  |  ------------------
  |  |   35|   252k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (190:6): [True: 0, False: 252k]
  |  Branch (190:7): [True: 0, False: 0]
  |  Branch (190:7): [True: 0, False: 0]
  ------------------
  191|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  192|      0|    goto out;
  193|      0|  }
  194|       |  /* verify that is either not added to a multi handle OR has a
  195|       |   * GOOD multi handle that knows `data` for `data->mid`. */
  196|   252k|  if(data->mid != UINT32_MAX) {
  ------------------
  |  Branch (196:6): [True: 0, False: 252k]
  ------------------
  197|      0|    if(GOOD_MULTI_HANDLE(data->multi)) {
  ------------------
  |  |   48|      0|  (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  |   41|      0|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (48:3): [True: 0, False: 0]
  |  |  |  Branch (48:5): [True: 0, False: 0]
  |  |  |  Branch (48:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (197:8): [True: 0, False: 0]
  |  Branch (197:8): [True: 0, False: 0]
  ------------------
  198|      0|      if(!Curl_multi_knows_easy(data->multi, data)) {
  ------------------
  |  Branch (198:10): [True: 0, False: 0]
  ------------------
  199|       |        /* But multi does not know it, something is fishy, better deny call */
  200|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (200:9): [Folded, False: 0]
  |  Branch (200:9): [Folded, False: 0]
  ------------------
  201|      0|        result = CURLE_BAD_FUNCTION_ARGUMENT;
  202|      0|        goto out;
  203|      0|      }
  204|      0|    }
  205|      0|    else {
  206|      0|      DEBUGASSERT(0); /* data needs to have a GOOD multi handle */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (206:7): [Folded, False: 0]
  |  Branch (206:7): [Folded, False: 0]
  ------------------
  207|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  208|      0|      goto out;
  209|      0|    }
  210|      0|  }
  211|   252k|  else if(data->multi) {
  ------------------
  |  Branch (211:11): [True: 0, False: 252k]
  ------------------
  212|      0|    DEBUGASSERT(0); /* data should not have a multi handle */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (212:5): [Folded, False: 0]
  |  Branch (212:5): [Folded, False: 0]
  ------------------
  213|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  214|      0|    goto out;
  215|      0|  }
  216|       |  /* verify that the call `fn` we're about to enter is known
  217|       |   * and check call properties to be admitting. */
  218|   252k|  if(fn >= CURL_EAPI_FN_LAST) {
  ------------------
  |  Branch (218:6): [True: 0, False: 252k]
  ------------------
  219|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  220|      0|    goto out;
  221|      0|  }
  222|   252k|  fn_props = &eapi_fn_props[fn];
  223|   252k|  DEBUGASSERT(fn_props->fn == fn);
  ------------------
  |  | 1079|   252k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (223:3): [True: 0, False: 252k]
  |  Branch (223:3): [True: 252k, False: 0]
  ------------------
  224|   252k|  if(!fn_props->recurse) {
  ------------------
  |  Branch (224:6): [True: 13.6k, False: 239k]
  ------------------
  225|  13.6k|    if(data->callstack.count) {
  ------------------
  |  Branch (225:8): [True: 0, False: 13.6k]
  ------------------
  226|      0|#ifdef CURLVERBOSE
  227|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  228|      0|        "EAPI guard: calling %u with call to %u ongoing\n", (uint16_t)fn,
  229|      0|        data->callstack.calls[data->callstack.count-1]));
  230|      0|#endif
  231|      0|      result = CURLE_RECURSIVE_API_CALL;
  232|      0|      goto out;
  233|      0|    }
  234|  13.6k|    if(data->multi && data->multi->callstack.count) {
  ------------------
  |  Branch (234:8): [True: 0, False: 13.6k]
  |  Branch (234:23): [True: 0, False: 0]
  ------------------
  235|      0|#ifdef CURLVERBOSE
  236|       |
  237|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  238|      0|        "EAPI guard: calling %u with multi call to %u ongoing\n", (uint16_t)fn,
  239|      0|        data->multi->callstack.calls[data->multi->callstack.count-1]));
  240|      0|#endif
  241|      0|      result = CURLE_RECURSIVE_API_CALL;
  242|      0|      goto out;
  243|      0|    }
  244|  13.6k|  }
  245|       |
  246|   252k|  if(fn_props->no_event_cb && eapi_in_event_cb(data)) {
  ------------------
  |  Branch (246:6): [True: 0, False: 252k]
  |  Branch (246:31): [True: 0, False: 0]
  ------------------
  247|       |    /* Not allowed to be invoked while an event cb is ongoing */
  248|      0|#ifdef CURLVERBOSE
  249|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  250|      0|        "EAPI guard: calling %u while event callback ongoing\n",
  251|      0|        (uint16_t)fn));
  252|      0|#endif
  253|      0|    result = CURLE_RECURSIVE_API_CALL;
  254|      0|    goto out;
  255|      0|  }
  256|       |
  257|   252k|#if defined(USE_SSL) && defined(USE_MUTEX)
  258|   252k|  if(fn_props->no_scache_lock &&
  ------------------
  |  Branch (258:6): [True: 0, False: 252k]
  ------------------
  259|      0|     Curl_ssl_scache_is_locked_by_current_thread(data)) {
  ------------------
  |  Branch (259:6): [True: 0, False: 0]
  ------------------
  260|      0|#ifdef CURLVERBOSE
  261|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  262|      0|        "EAPI guard: calling %u while vtls_scache is locked by "
  263|      0|        "current thread\n", (uint16_t)fn));
  264|      0|#endif
  265|      0|    result = CURLE_RECURSIVE_API_CALL;
  266|      0|    goto out;
  267|      0|  }
  268|   252k|#endif
  269|       |
  270|       |  /* all fine, add to data's callstack */
  271|   252k|  if(data->callstack.count >= CURL_EAPI_MAX_RECURSION) {
  ------------------
  |  |  136|   252k|#define CURL_EAPI_MAX_RECURSION       7
  ------------------
  |  Branch (271:6): [True: 0, False: 252k]
  ------------------
  272|      0|    result = CURLE_RECURSIVE_API_CALL;
  273|      0|    goto out;
  274|      0|  }
  275|   252k|  data->callstack.calls[data->callstack.count] = (uint16_t)fn;
  276|   252k|  ++data->callstack.count;
  277|   252k|  guard->depth = data->callstack.count;
  278|   252k|  guard->data = fn_props->data_is_killed ? NULL : data;
  ------------------
  |  Branch (278:17): [True: 13.6k, False: 239k]
  ------------------
  279|       |
  280|   252k|out:
  281|   252k|  if(presult)
  ------------------
  |  Branch (281:6): [True: 239k, False: 13.6k]
  ------------------
  282|   239k|    *presult = result;
  283|   252k|  return guard->depth > 0;
  284|   252k|}
Curl_eapi_leave:
  287|   252k|{
  288|   252k|  if(guard->depth) {
  ------------------
  |  Branch (288:6): [True: 252k, False: 0]
  ------------------
  289|       |    /* guard->data is set when handle is supposed to stay alive during call */
  290|   252k|    if(guard->data && GOOD_EASY_HANDLE(guard->data)) {
  ------------------
  |  |   34|   239k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|   239k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|   239k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:3): [True: 239k, False: 0]
  |  |  |  Branch (34:5): [True: 239k, False: 0]
  |  |  |  Branch (34:12): [True: 239k, False: 0]
  |  |  ------------------
  |  |   35|   239k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (290:8): [True: 239k, False: 13.6k]
  |  Branch (290:23): [True: 0, False: 0]
  |  Branch (290:23): [True: 0, False: 0]
  ------------------
  291|   239k|      if(guard->depth > guard->data->callstack.count) {
  ------------------
  |  Branch (291:10): [True: 0, False: 239k]
  ------------------
  292|      0|        DEBUGASSERT(0); /* something very wrong */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (292:9): [Folded, False: 0]
  |  Branch (292:9): [Folded, False: 0]
  ------------------
  293|      0|      }
  294|   239k|      else {
  295|   239k|        if(guard->depth < guard->data->callstack.count) {
  ------------------
  |  Branch (295:12): [True: 0, False: 239k]
  ------------------
  296|      0|          DEBUGASSERT(0); /* someone forgot to clean up */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (296:11): [Folded, False: 0]
  |  Branch (296:11): [Folded, False: 0]
  ------------------
  297|      0|        }
  298|       |        /* reset to depth the guard was entered in */
  299|   239k|        guard->data->callstack.count = (uint16_t)(guard->depth - 1);
  300|   239k|      }
  301|   239k|    }
  302|   252k|  }
  303|   252k|}
Curl_mapi_enter:
  309|  50.2k|{
  310|  50.2k|  struct Curl_multi *multi = m;
  311|  50.2k|  const struct Curl_mapi_fn_props *fn_props;
  312|  50.2k|  CURLMcode mresult = CURLM_OK;
  313|       |
  314|  50.2k|  guard->depth = 0;
  315|       |
  316|       |  /* Verify that we got an easy handle we can work with. */
  317|  50.2k|  if(!GOOD_MULTI_HANDLE(multi)) {
  ------------------
  |  |   48|  50.2k|  (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  |   41|  50.2k|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|  50.2k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (48:5): [True: 50.2k, False: 0]
  |  |  |  Branch (48:12): [True: 50.2k, False: 0]
  |  |  ------------------
  |  |   49|  50.2k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (317:6): [True: 0, False: 50.2k]
  |  Branch (317:7): [True: 0, False: 0]
  |  Branch (317:7): [True: 0, False: 0]
  ------------------
  318|      0|    mresult = CURLM_BAD_HANDLE;
  319|      0|    goto out;
  320|      0|  }
  321|  50.2k|  if(fn >= CURL_MAPI_FN_LAST) {
  ------------------
  |  Branch (321:6): [True: 0, False: 50.2k]
  ------------------
  322|      0|    mresult = CURLM_BAD_FUNCTION_ARGUMENT;
  323|      0|    goto out;
  324|      0|  }
  325|  50.2k|  fn_props = &mapi_fn_props[fn];
  326|  50.2k|  DEBUGASSERT(fn_props->fn == fn);
  ------------------
  |  | 1079|  50.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (326:3): [True: 0, False: 50.2k]
  |  Branch (326:3): [True: 50.2k, False: 0]
  ------------------
  327|  50.2k|  if(fn_props->allow_ntfy_cb && mapi_in_ntfy_cb(multi)) {
  ------------------
  |  Branch (327:6): [True: 25.3k, False: 24.9k]
  |  Branch (327:33): [True: 0, False: 25.3k]
  ------------------
  328|       |    /* explicitly allowed, even though normal recursion may not */
  329|      0|  }
  330|  50.2k|  else if(!fn_props->recurse && multi->callstack.count) {
  ------------------
  |  Branch (330:11): [True: 50.2k, False: 0]
  |  Branch (330:33): [True: 0, False: 50.2k]
  ------------------
  331|      0|#ifdef CURLVERBOSE
  332|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  333|      0|        "MAPI guard: calling %u with call to %u ongoing\n", (uint16_t)fn,
  334|      0|        multi->callstack.calls[multi->callstack.count-1]));
  335|      0|#endif
  336|      0|    mresult = CURLM_RECURSIVE_API_CALL;
  337|      0|    goto out;
  338|      0|  }
  339|       |
  340|  50.2k|#if defined(USE_SSL) && defined(USE_MUTEX)
  341|  50.2k|  if(fn_props->no_scache_lock && multi->ssl_scache &&
  ------------------
  |  Branch (341:6): [True: 24.9k, False: 25.3k]
  |  Branch (341:34): [True: 24.9k, False: 0]
  ------------------
  342|  24.9k|     Curl_ssl_scache_is_locked_by_current_thread(multi->admin)) {
  ------------------
  |  Branch (342:6): [True: 0, False: 24.9k]
  ------------------
  343|      0|#ifdef CURLVERBOSE
  344|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  345|      0|        "MAPI guard: calling %u while its vtls_scache is locked by "
  346|      0|        "current thread\n", (uint16_t)fn));
  347|      0|#endif
  348|      0|    mresult = CURLM_RECURSIVE_API_CALL;
  349|      0|    goto out;
  350|      0|  }
  351|  50.2k|#endif
  352|       |
  353|       |  /* all fine, add to data's callstack */
  354|  50.2k|  if(multi->callstack.count >= CURL_MAPI_MAX_RECURSION) {
  ------------------
  |  |  162|  50.2k|#define CURL_MAPI_MAX_RECURSION       15
  ------------------
  |  Branch (354:6): [True: 0, False: 50.2k]
  ------------------
  355|      0|    mresult = CURLM_RECURSIVE_API_CALL;
  356|      0|    goto out;
  357|      0|  }
  358|  50.2k|  multi->callstack.calls[multi->callstack.count] = (uint16_t)fn;
  359|  50.2k|  ++multi->callstack.count;
  360|  50.2k|  guard->depth = multi->callstack.count;
  361|  50.2k|  guard->multi = fn_props->multi_is_killed ? NULL : multi;
  ------------------
  |  Branch (361:18): [True: 11.7k, False: 38.5k]
  ------------------
  362|       |
  363|  50.2k|out:
  364|  50.2k|  if(pmresult)
  ------------------
  |  Branch (364:6): [True: 50.2k, False: 0]
  ------------------
  365|  50.2k|    *pmresult = mresult;
  366|  50.2k|  return guard->depth > 0;
  367|  50.2k|}
Curl_mapi_leave:
  370|  61.6k|{
  371|  61.6k|  if(guard->depth) {
  ------------------
  |  Branch (371:6): [True: 61.6k, False: 0]
  ------------------
  372|       |    /* guard->data is set when handle is supposed to stay alive during call */
  373|  61.6k|    if(guard->multi && GOOD_MULTI_HANDLE(guard->multi)) {
  ------------------
  |  |   48|  49.8k|  (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  |   41|  49.8k|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|  49.8k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (48:3): [True: 49.8k, False: 0]
  |  |  |  Branch (48:5): [True: 49.8k, False: 0]
  |  |  |  Branch (48:12): [True: 49.8k, False: 0]
  |  |  ------------------
  |  |   49|  49.8k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (373:8): [True: 49.8k, False: 11.7k]
  |  Branch (373:24): [True: 0, False: 0]
  |  Branch (373:24): [True: 0, False: 0]
  ------------------
  374|  49.8k|      if(guard->depth > guard->multi->callstack.count) {
  ------------------
  |  Branch (374:10): [True: 0, False: 49.8k]
  ------------------
  375|      0|        DEBUGASSERT(0); /* something very wrong */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (375:9): [Folded, False: 0]
  |  Branch (375:9): [Folded, False: 0]
  ------------------
  376|      0|      }
  377|  49.8k|      else {
  378|  49.8k|        if(guard->depth < guard->multi->callstack.count) {
  ------------------
  |  Branch (378:12): [True: 0, False: 49.8k]
  ------------------
  379|      0|          DEBUGASSERT(0); /* someone forgot to clean up */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (379:11): [Folded, False: 0]
  |  Branch (379:11): [Folded, False: 0]
  ------------------
  380|      0|        }
  381|       |        /* reset to depth the guard was entered in */
  382|  49.8k|        guard->multi->callstack.count = (uint16_t)(guard->depth - 1);
  383|  49.8k|      }
  384|  49.8k|    }
  385|  61.6k|  }
  386|  61.6k|}
Curl_cbapi_enter:
  392|  11.3k|{
  393|  11.3k|  guard->depth = 0;
  394|       |
  395|  11.3k|  if(!multi)
  ------------------
  |  Branch (395:6): [True: 11.3k, False: 0]
  ------------------
  396|  11.3k|    multi = data ? data->multi : NULL;
  ------------------
  |  Branch (396:13): [True: 11.3k, False: 0]
  ------------------
  397|       |  /* if not multi is involved here, just leave */
  398|  11.3k|  if(!multi)
  ------------------
  |  Branch (398:6): [True: 0, False: 11.3k]
  ------------------
  399|      0|    return;
  400|       |  /* invalid callback specifier? */
  401|  11.3k|  if((fn >= CURL_CBAPI_FN_LAST) || (fn < CURL_CBAPI_FN_START)) {
  ------------------
  |  |  100|  11.3k|#define CURL_CBAPI_FN_START        (16 * 1024)
  ------------------
  |  Branch (401:6): [True: 0, False: 11.3k]
  |  Branch (401:36): [True: 0, False: 11.3k]
  ------------------
  402|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (402:5): [Folded, False: 0]
  |  Branch (402:5): [Folded, False: 0]
  ------------------
  403|      0|    return;
  404|      0|  }
  405|  11.3k|  DEBUGASSERT(cbapi_fn_props[fn - CURL_CBAPI_FN_START].fn == fn);
  ------------------
  |  | 1079|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (405:3): [True: 0, False: 11.3k]
  |  Branch (405:3): [True: 11.3k, False: 0]
  ------------------
  406|  11.3k|  if(multi->callstack.count) {
  ------------------
  |  Branch (406:6): [True: 11.3k, False: 0]
  ------------------
  407|  11.3k|    size_t i;
  408|  22.7k|    for(i = multi->callstack.count; i; --i) {
  ------------------
  |  Branch (408:37): [True: 11.3k, False: 11.3k]
  ------------------
  409|  11.3k|      if(multi->callstack.calls[i - 1] == fn) {
  ------------------
  |  Branch (409:10): [True: 0, False: 11.3k]
  ------------------
  410|       |        /* recursive invocation of the same callback */
  411|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (411:9): [Folded, False: 0]
  |  Branch (411:9): [Folded, False: 0]
  ------------------
  412|      0|        return;
  413|      0|      }
  414|  11.3k|    }
  415|  11.3k|  }
  416|       |
  417|       |  /* all fine, add to data's callstack */
  418|       |  /* if multi callstack already at max depth, leave */
  419|  11.3k|  if(multi->callstack.count >= CURL_MAPI_MAX_RECURSION)
  ------------------
  |  |  162|  11.3k|#define CURL_MAPI_MAX_RECURSION       15
  ------------------
  |  Branch (419:6): [True: 0, False: 11.3k]
  ------------------
  420|      0|    return;
  421|  11.3k|  multi->callstack.calls[multi->callstack.count] = (uint16_t)fn;
  422|  11.3k|  ++multi->callstack.count;
  423|  11.3k|  guard->depth = multi->callstack.count;
  424|  11.3k|  guard->multi = multi;
  425|  11.3k|}
Curl_cbapi_leave:
  428|  11.3k|{
  429|  11.3k|  Curl_mapi_leave(guard);
  430|  11.3k|}
api.c:mapi_in_ntfy_cb:
  147|  25.3k|{
  148|  25.3k|  if(multi && multi->callstack.count) {
  ------------------
  |  Branch (148:6): [True: 25.3k, False: 0]
  |  Branch (148:15): [True: 0, False: 25.3k]
  ------------------
  149|      0|    size_t i;
  150|      0|    for(i = 0; i < multi->callstack.count; ++i) {
  ------------------
  |  Branch (150:16): [True: 0, False: 0]
  ------------------
  151|      0|      if(multi->callstack.calls[i] == CURL_CBAPI_FN_multi_ntfy_cb)
  ------------------
  |  Branch (151:10): [True: 0, False: 0]
  ------------------
  152|      0|        return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  153|      0|    }
  154|      0|  }
  155|  25.3k|  return FALSE;
  ------------------
  |  | 1056|  25.3k|#define FALSE false
  ------------------
  156|  25.3k|}

Curl_async_timeleft_ms:
   60|    614|{
   61|    614|  if(async->timeout_ms) {
  ------------------
  |  Branch (61:6): [True: 614, False: 0]
  ------------------
   62|    614|    timediff_t elapsed_ms =
   63|    614|      curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
   64|    614|    return async->timeout_ms - elapsed_ms;
   65|    614|  }
   66|      0|  return Curl_timeleft_ms(data);
   67|    614|}
Curl_async_shutdown:
  210|    724|{
  211|    724|  if(async) {
  ------------------
  |  Branch (211:6): [True: 724, False: 0]
  ------------------
  212|    724|    CURL_TRC_DNS(data, "[%u] shutdown async", async->id);
  ------------------
  |  |  168|    724|  do {                                 \
  |  |  169|    724|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    724|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|    724|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  1.44k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 724, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 724]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  1.44k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|    724|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    724|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    724|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 724]
  |  |  ------------------
  ------------------
  213|    724|    async->shutdown = TRUE;
  ------------------
  |  | 1053|    724|#define TRUE true
  ------------------
  214|       |#ifdef USE_RESOLV_ARES
  215|       |    Curl_async_ares_shutdown(data, async);
  216|       |#endif
  217|    724|#ifdef USE_RESOLV_THREADED
  218|    724|    Curl_async_thrdd_shutdown(data, async);
  219|    724|#endif
  220|    724|#ifndef CURL_DISABLE_DOH
  221|    724|    Curl_doh_cleanup(data, async);
  222|    724|#endif
  223|    724|  }
  224|    724|}
Curl_async_destroy:
  228|    913|{
  229|    913|  if(async) {
  ------------------
  |  Branch (229:6): [True: 913, False: 0]
  ------------------
  230|    913|    CURL_TRC_DNS(data, "[%u] destroy async", async->id);
  ------------------
  |  |  168|    913|  do {                                 \
  |  |  169|    913|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    913|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|    913|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  1.82k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 913, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 913]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  1.82k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|    913|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    913|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    913|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 913]
  |  |  ------------------
  ------------------
  231|    913|    async->shutdown = TRUE;
  ------------------
  |  | 1053|    913|#define TRUE true
  ------------------
  232|       |#ifdef USE_RESOLV_ARES
  233|       |    Curl_async_ares_destroy(data, async);
  234|       |#endif
  235|    913|#ifdef USE_RESOLV_THREADED
  236|    913|    Curl_async_thrdd_destroy(data, async);
  237|    913|#endif
  238|    913|#ifndef CURL_DISABLE_DOH
  239|    913|    Curl_doh_cleanup(data, async);
  240|    913|#endif
  241|       |    curlx_safefree(async);
  ------------------
  |  | 1336|    913|  do {                      \
  |  | 1337|    913|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|    913|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|    913|    (ptr) = NULL;           \
  |  | 1339|    913|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 913]
  |  |  ------------------
  ------------------
  242|    913|  }
  243|    913|}
Curl_async_failed:
  248|    360|{
  249|    360|  const char *host_or_proxy = "host";
  250|    360|  CURLcode result = CURLE_COULDNT_RESOLVE_HOST;
  251|       |
  252|    360|#ifndef CURL_DISABLE_PROXY
  253|    360|  if(async->for_proxy) {
  ------------------
  |  Branch (253:6): [True: 154, False: 206]
  ------------------
  254|    154|    host_or_proxy = "proxy";
  255|    154|    result = CURLE_COULDNT_RESOLVE_PROXY;
  256|    154|  }
  257|    360|#endif
  258|       |
  259|    360|  if(async->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))
  ------------------
  |  |   51|    360|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                if(async->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))
  ------------------
  |  |   52|    360|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (259:6): [True: 360, False: 0]
  ------------------
  260|    360|    failf(data, "Could not resolve %s: %s%s%s%s",
  ------------------
  |  |   62|    360|#define failf Curl_failf
  ------------------
  261|    360|          host_or_proxy, async->hostname,
  262|    360|          detail ? " (" : "", detail ? detail : "", detail ? ")" : "");
  ------------------
  |  Branch (262:11): [True: 0, False: 360]
  |  Branch (262:31): [True: 0, False: 360]
  |  Branch (262:53): [True: 0, False: 360]
  ------------------
  263|    360|  return result;
  264|    360|}

Curl_async_global_init:
   81|      1|{
   82|       |#if defined(USE_ARES) && defined(CARES_HAVE_ARES_LIBRARY_INIT)
   83|       |  if(ares_library_init(ARES_LIB_INIT_ALL)) {
   84|       |    return CURLE_FAILED_INIT;
   85|       |  }
   86|       |#endif
   87|      1|  return CURLE_OK;
   88|      1|}
Curl_async_thrdd_shutdown:
  259|    934|{
  260|    934|  Curl_async_thrdd_destroy(data, async);
  261|    934|}
Curl_async_thrdd_destroy:
  277|  1.84k|{
  278|  1.84k|  (void)data;
  279|  1.84k|  if(async->queries_ongoing && !async->done &&
  ------------------
  |  Branch (279:6): [True: 588, False: 1.25k]
  |  Branch (279:32): [True: 588, False: 0]
  ------------------
  280|    588|     data->multi && data->multi->resolv_thrdq) {
  ------------------
  |  Branch (280:6): [True: 294, False: 294]
  |  Branch (280:21): [True: 294, False: 0]
  ------------------
  281|       |    /* Remove any resolve items still queued */
  282|    294|    struct async_thrdd_match_ctx mctx;
  283|    294|    mctx.mid = data->mid;
  284|    294|    mctx.resolv_id = async->id;
  285|    294|    Curl_thrdq_clear(data->multi->resolv_thrdq,
  286|    294|                     async_thrdd_match_item, &mctx);
  287|    294|  }
  288|       |#ifdef USE_HTTPSRR_ARES
  289|       |  if(async->thrdd.rr.channel) {
  290|       |    ares_destroy(async->thrdd.rr.channel);
  291|       |    async->thrdd.rr.channel = NULL;
  292|       |  }
  293|       |  curlx_safefree(async->thrdd.rr.https_name);
  294|       |  Curl_httpsrr_destroy(async->thrdd.rr.hinfo);
  295|       |#endif
  296|  1.84k|  async_thrdd_item_destroy(async->thrdd.inc_A);
  297|  1.84k|  async->thrdd.inc_A = NULL;
  298|  1.84k|  async_thrdd_item_destroy(async->thrdd.res_A);
  299|  1.84k|  async->thrdd.res_A = NULL;
  300|  1.84k|  async_thrdd_item_destroy(async->thrdd.inc_AAAA);
  301|  1.84k|  async->thrdd.inc_AAAA = NULL;
  302|  1.84k|  async_thrdd_item_destroy(async->thrdd.res_AAAA);
  303|       |  async->thrdd.res_AAAA = NULL;
  304|  1.84k|}
Curl_async_await:
  312|    179|{
  313|    179|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  314|    179|  struct async_thrdd_ctx *thrdd = async ? &async->thrdd : NULL;
  ------------------
  |  Branch (314:35): [True: 179, False: 0]
  ------------------
  315|    179|  timediff_t milli, ms;
  316|    179|  CURLcode result = CURLE_AGAIN;
  317|       |
  318|    179|  if(!thrdd)
  ------------------
  |  Branch (318:6): [True: 0, False: 179]
  ------------------
  319|      0|    return CURLE_FAILED_INIT;
  320|       |
  321|    358|  while(result == CURLE_AGAIN) {
  ------------------
  |  Branch (321:9): [True: 179, False: 179]
  ------------------
  322|  1.12M|    while(async->queries_ongoing && !async->done) {
  ------------------
  |  Branch (322:11): [True: 1.12M, False: 179]
  |  Branch (322:37): [True: 1.12M, False: 0]
  ------------------
  323|  1.12M|      Curl_async_thrdd_multi_process(data->multi);
  324|  1.12M|      if(async->done)
  ------------------
  |  Branch (324:10): [True: 0, False: 1.12M]
  ------------------
  325|      0|        break;
  326|       |
  327|  1.12M|      ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  328|  1.12M|      if(ms < 3)
  ------------------
  |  Branch (328:10): [True: 1.12M, False: 153]
  ------------------
  329|  1.12M|        milli = 0;
  330|    153|      else if(ms <= 50)
  ------------------
  |  Branch (330:15): [True: 132, False: 21]
  ------------------
  331|    132|        milli = ms / 3;
  332|     21|      else if(ms <= 250)
  ------------------
  |  Branch (332:15): [True: 15, False: 6]
  ------------------
  333|     15|        milli = 50;
  334|      6|      else
  335|      6|        milli = 200;
  336|  1.12M|      CURL_TRC_DNS(data, "await, waiting %" FMT_TIMEDIFF_T "ms", milli);
  ------------------
  |  |  168|  1.12M|  do {                                 \
  |  |  169|  1.12M|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  1.12M|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  1.12M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  2.25M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 1.12M, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.12M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  2.25M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  1.12M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  1.12M|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  1.12M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 1.12M]
  |  |  ------------------
  ------------------
  337|  1.12M|      curlx_wait_ms(milli);
  338|  1.12M|    }
  339|    179|    result = Curl_async_take_result(data, async, pdns);
  340|    179|  }
  341|    179|  return result;
  342|    179|}
Curl_async_thrdd_multi_init:
  477|  11.7k|{
  478|  11.7k|  CURLcode result;
  479|  11.7k|  DEBUGASSERT(!multi->resolv_thrdq);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (479:3): [True: 0, False: 11.7k]
  |  Branch (479:3): [True: 11.7k, False: 0]
  ------------------
  480|  11.7k|  result = Curl_thrdq_create(&multi->resolv_thrdq, "DNS",
  481|  11.7k|                             min_threads, max_threads, idle_time_ms,
  482|  11.7k|                             async_thrdd_item_free,
  483|  11.7k|                             async_thrdd_item_process,
  484|  11.7k|                             async_thrdd_event,
  485|  11.7k|                             multi);
  486|  11.7k|#ifdef DEBUGBUILD
  487|  11.7k|  if(!result) {
  ------------------
  |  Branch (487:6): [True: 11.7k, False: 0]
  ------------------
  488|  11.7k|    const char *p = getenv("CURL_DBG_RESOLV_MAX_THREADS");
  489|  11.7k|    if(p) {
  ------------------
  |  Branch (489:8): [True: 0, False: 11.7k]
  ------------------
  490|      0|      curl_off_t l;
  491|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (491:10): [True: 0, False: 0]
  ------------------
  492|      0|        result = Curl_async_thrdd_multi_set_props(
  493|      0|          multi, min_threads, (uint32_t)l, idle_time_ms);
  494|      0|      }
  495|      0|    }
  496|  11.7k|  }
  497|  11.7k|#endif
  498|  11.7k|  return result;
  499|  11.7k|}
Curl_async_thrdd_multi_destroy:
  503|  11.7k|{
  504|  11.7k|  if(multi->resolv_thrdq) {
  ------------------
  |  Branch (504:6): [True: 11.7k, False: 0]
  ------------------
  505|  11.7k|#ifdef CURLVERBOSE
  506|  11.7k|    CURL_TRC_DNS(multi->admin, "destroy thread queue+pool, join=%d", join);
  ------------------
  |  |  168|  11.7k|  do {                                 \
  |  |  169|  11.7k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  11.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  11.7k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  23.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 11.7k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 11.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  23.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  11.7k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  11.7k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  507|  11.7k|    Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  508|  11.7k|#endif
  509|  11.7k|    Curl_thrdq_destroy(multi->resolv_thrdq, join);
  510|       |    multi->resolv_thrdq = NULL;
  511|  11.7k|  }
  512|  11.7k|}
Curl_async_thrdd_multi_process:
  559|  1.13M|{
  560|  1.13M|  struct Curl_easy *data;
  561|  1.13M|  void *qitem;
  562|       |
  563|  1.13M|  while(!Curl_thrdq_recv(multi->resolv_thrdq, &qitem)) {
  ------------------
  |  Branch (563:9): [True: 333, False: 1.13M]
  ------------------
  564|       |    /* dispatch resolve result */
  565|    333|    struct async_thrdd_item *item = qitem;
  566|    333|    struct Curl_resolv_async *async = NULL;
  567|       |
  568|    333|    data = Curl_multi_get_easy(multi, item->mid);
  569|    333|    if(data)
  ------------------
  |  Branch (569:8): [True: 333, False: 0]
  ------------------
  570|    333|      async = Curl_async_get(data, item->resolv_id);
  571|    333|    if(async) {
  ------------------
  |  Branch (571:8): [True: 333, False: 0]
  ------------------
  572|    333|      struct async_thrdd_item **pdest = &async->thrdd.inc_A;
  573|       |
  574|    333|#ifdef CURLRES_IPV6
  575|    333|      if(item->dns_queries & CURL_DNSQ_AAAA)
  ------------------
  |  |   52|    333|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (575:10): [True: 115, False: 218]
  ------------------
  576|    115|        pdest = &async->thrdd.inc_AAAA;
  577|    333|#endif
  578|    333|      if(!*pdest) {
  ------------------
  |  Branch (578:10): [True: 333, False: 0]
  ------------------
  579|    333|        *pdest = item;
  580|    333|        item = NULL;
  581|    333|      }
  582|      0|      else
  583|    333|        DEBUGASSERT(0); /* should not receive duplicates here */
  ------------------
  |  | 1079|    333|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (583:9): [Folded, False: 0]
  |  Branch (583:9): [Folded, False: 0]
  ------------------
  584|       |
  585|    333|      --async->queries_ongoing;
  586|    333|      Curl_multi_mark_dirty(data);
  587|    333|    }
  588|    333|    async_thrdd_item_free(item);
  589|    333|  }
  590|  1.13M|  VERBOSE(Curl_thrdq_trace(multi->resolv_thrdq, multi->admin));
  ------------------
  |  | 1613|  1.13M|#define VERBOSE(x) x
  ------------------
  591|  1.13M|}
Curl_async_getaddrinfo:
  632|    504|{
  633|    504|  CURLcode result = CURLE_FAILED_INIT;
  634|    504|  void *resolver = NULL;
  635|       |
  636|    504|  if(async->queries_ongoing || async->done)
  ------------------
  |  Branch (636:6): [True: 0, False: 504]
  |  Branch (636:32): [True: 0, False: 504]
  ------------------
  637|      0|    return CURLE_FAILED_INIT;
  638|       |
  639|       |#ifdef USE_HTTPSRR_ARES
  640|       |  DEBUGASSERT(!async->thrdd.rr.channel);
  641|       |  if((async->dns_queries & CURL_DNSQ_HTTPS) && !async->is_ipaddr) {
  642|       |    result = async_rr_start(data, async);
  643|       |    if(result)
  644|       |      goto out;
  645|       |    resolver = async->thrdd.rr.channel;
  646|       |  }
  647|       |#endif
  648|       |
  649|    504|  result = Curl_resolv_announce_start(data, resolver);
  650|    504|  if(result)
  ------------------
  |  Branch (650:6): [True: 0, False: 504]
  ------------------
  651|      0|    return result;
  652|       |
  653|    504|#ifdef CURLRES_IPV6
  654|       |  /* Do not start an AAAA query for an IPv4 address when
  655|       |   * we will start an A query for it. */
  656|    504|  if((async->dns_queries & CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|    504|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (656:6): [True: 364, False: 140]
  ------------------
  657|    364|     !(async->is_ipv4addr && (async->dns_queries & CURL_DNSQ_A))) {
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (657:8): [True: 0, False: 364]
  |  Branch (657:30): [True: 0, False: 0]
  ------------------
  658|    364|    result = async_thrdd_query(data, async, CURL_DNSQ_AAAA);
  ------------------
  |  |   52|    364|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  659|    364|    if(result)
  ------------------
  |  Branch (659:8): [True: 0, False: 364]
  ------------------
  660|      0|      goto out;
  661|    364|  }
  662|    504|#endif
  663|    504|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    504|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (663:6): [True: 456, False: 48]
  ------------------
  664|    456|    result = async_thrdd_query(data, async, CURL_DNSQ_A);
  ------------------
  |  |   51|    456|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  665|    456|    if(result)
  ------------------
  |  Branch (665:8): [True: 0, False: 456]
  ------------------
  666|      0|      goto out;
  667|    456|  }
  668|       |
  669|    504|#ifdef CURLVERBOSE
  670|    504|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  671|    504|#endif
  672|       |
  673|    504|out:
  674|    504|  if(!async->queries_ongoing)
  ------------------
  |  Branch (674:6): [True: 0, False: 504]
  ------------------
  675|      0|    async->done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  676|       |
  677|    504|  if(result)
  ------------------
  |  Branch (677:6): [True: 0, False: 504]
  ------------------
  678|      0|    CURL_TRC_DNS(data, "error queueing query %s:%d -> %d",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  679|    504|                 async->hostname, async->port, (int)result);
  680|    504|  return result;
  681|    504|}
Curl_async_pollset:
  686|    614|{
  687|    614|  timediff_t timeout_ms;
  688|       |
  689|    614|  timeout_ms = Curl_async_timeleft_ms(data, async);
  690|       |#ifdef USE_HTTPSRR_ARES
  691|       |  if(async->thrdd.rr.channel) {
  692|       |    CURLcode result = Curl_ares_pollset(data, async->thrdd.rr.channel, ps);
  693|       |    if(result)
  694|       |      return result;
  695|       |    timeout_ms = Curl_ares_timeout_ms(data, async, async->thrdd.rr.channel);
  696|       |  }
  697|       |#else
  698|    614|  (void)ps;
  699|    614|#endif
  700|       |
  701|    614|  if(!async->done) {
  ------------------
  |  Branch (701:6): [True: 614, False: 0]
  ------------------
  702|       |#ifndef ENABLE_INTERNAL_WAKEUP
  703|       |    timediff_t stutter_ms, elapsed_ms;
  704|       |    elapsed_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  705|       |    if(elapsed_ms < 3)
  706|       |      stutter_ms = 1;
  707|       |    else if(elapsed_ms <= 50)
  708|       |      stutter_ms = elapsed_ms / 3;
  709|       |    else if(elapsed_ms <= 250)
  710|       |      stutter_ms = 50;
  711|       |    else
  712|       |      stutter_ms = 200;
  713|       |    timeout_ms = CURLMIN(stutter_ms, timeout_ms);
  714|       |#else
  715|    614|    if(async->queries_ongoing &&
  ------------------
  |  Branch (715:8): [True: 614, False: 0]
  ------------------
  716|    614|       !Curl_thrdq_check_started(data->multi->resolv_thrdq)) {
  ------------------
  |  Branch (716:8): [True: 0, False: 614]
  ------------------
  717|       |      /* The queue has items but starting a worker thread to process
  718|       |         them just failed again; expire soon to check once more,
  719|       |         instead of sleeping on the full resolve timeout. */
  720|      0|      CURL_TRC_DNS(data, "resolver thread start failed again, retrying");
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  721|      0|      timeout_ms = CURLMIN(100, timeout_ms);
  ------------------
  |  | 1292|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  722|      0|    }
  723|    614|#endif
  724|    614|    Curl_expire(data, timeout_ms, EXPIRE_ASYNC_NAME);
  725|    614|  }
  726|    614|  return CURLE_OK;
  727|    614|}
Curl_async_take_result:
  844|    811|{
  845|    811|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  846|    811|  struct Curl_dns_entry *dns = NULL;
  847|    811|  CURLcode result = CURLE_OK;
  848|       |
  849|    811|  DEBUGASSERT(pdns);
  ------------------
  |  | 1079|    811|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (849:3): [True: 0, False: 811]
  |  Branch (849:3): [True: 811, False: 0]
  ------------------
  850|    811|  *pdns = NULL;
  851|       |
  852|       |#ifdef USE_HTTPSRR_ARES
  853|       |  /* best effort, ignore errors */
  854|       |  if(thrdd->rr.channel)
  855|       |    (void)Curl_ares_perform(thrdd->rr.channel, 0);
  856|       |#endif
  857|       |#ifndef ENABLE_INTERNAL_WAKEUP
  858|       |  Curl_async_thrdd_multi_process(data->multi);
  859|       |#endif
  860|       |
  861|    811|  result = async_thrdd_check_done(data, async);
  862|    811|  if(result)
  ------------------
  |  Branch (862:6): [True: 601, False: 210]
  ------------------
  863|    601|    return result;
  864|       |
  865|    210|  Curl_expire_done(data, EXPIRE_ASYNC_NAME);
  866|       |
  867|       |  /* A failure is an authoritative negative answer, eligible for
  868|       |     negative caching, only when every A/AAAA query performed came
  869|       |     back answering that the name does not exist. A query that
  870|       |     failed transiently or never returned is not an answer. */
  871|    210|  {
  872|    210|    const uint8_t ip_queries =
  873|    210|      async->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|    210|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    async->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|    210|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  874|    210|    bool negative = (async->dns_responses & ip_queries) == ip_queries;
  875|    210|    if(thrdd->res_A && (thrdd->res_A->res || !thrdd->res_A->negative))
  ------------------
  |  Branch (875:8): [True: 162, False: 48]
  |  Branch (875:25): [True: 13, False: 149]
  |  Branch (875:46): [True: 1, False: 148]
  ------------------
  876|     14|      negative = FALSE;
  ------------------
  |  | 1056|     14|#define FALSE false
  ------------------
  877|    210|    if(thrdd->res_AAAA && (thrdd->res_AAAA->res || !thrdd->res_AAAA->negative))
  ------------------
  |  Branch (877:8): [True: 77, False: 133]
  |  Branch (877:28): [True: 4, False: 73]
  |  Branch (877:52): [True: 3, False: 70]
  ------------------
  878|      7|      negative = FALSE;
  ------------------
  |  | 1056|      7|#define FALSE false
  ------------------
  879|    210|    if(!thrdd->res_A && !thrdd->res_AAAA)
  ------------------
  |  Branch (879:8): [True: 48, False: 162]
  |  Branch (879:25): [True: 0, False: 48]
  ------------------
  880|      0|      negative = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  881|    210|    async->negative_answer = negative;
  882|    210|  }
  883|       |
  884|    210|  if(async->result) {
  ------------------
  |  Branch (884:6): [True: 0, False: 210]
  ------------------
  885|      0|    result = async->result;
  886|      0|    goto out;
  887|      0|  }
  888|       |
  889|    210|  if((thrdd->res_A && thrdd->res_A->res) ||
  ------------------
  |  Branch (889:7): [True: 162, False: 48]
  |  Branch (889:23): [True: 13, False: 149]
  ------------------
  890|    197|     (thrdd->res_AAAA && thrdd->res_AAAA->res)) {
  ------------------
  |  Branch (890:7): [True: 77, False: 120]
  |  Branch (890:26): [True: 4, False: 73]
  ------------------
  891|     17|    dns = Curl_dnsc_mk_addr2(
  892|     17|      data, async->dns_queries,
  893|     17|      thrdd->res_A ? &thrdd->res_A->res : NULL,
  ------------------
  |  Branch (893:7): [True: 13, False: 4]
  ------------------
  894|     17|      thrdd->res_AAAA ? &thrdd->res_AAAA->res : NULL,
  ------------------
  |  Branch (894:7): [True: 4, False: 13]
  ------------------
  895|     17|      async->hostname, async->port);
  896|     17|    if(!dns) {
  ------------------
  |  Branch (896:8): [True: 0, False: 17]
  ------------------
  897|      0|      result = CURLE_OUT_OF_MEMORY;
  898|      0|      goto out;
  899|      0|    }
  900|     17|  }
  901|       |
  902|       |#ifdef USE_HTTPSRR_ARES
  903|       |  if(!dns && thrdd->rr.channel) {
  904|       |    Curl_httpsrr_trace(data, thrdd->rr.hinfo);
  905|       |    dns = Curl_dnsc_mk_https(data, &thrdd->rr.hinfo,
  906|       |                             async->hostname, async->port);
  907|       |    if(!dns) {
  908|       |      result = CURLE_OUT_OF_MEMORY;
  909|       |      goto out;
  910|       |    }
  911|       |  }
  912|       |#endif
  913|       |
  914|    210|  if(dns) {
  ------------------
  |  Branch (914:6): [True: 17, False: 193]
  ------------------
  915|     17|    *pdns = dns;
  916|     17|    dns = NULL;
  917|     17|  }
  918|    210|#ifdef CURLVERBOSE
  919|    210|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  920|    210|#endif
  921|       |
  922|    210|out:
  923|    210|  Curl_dns_entry_unlink(data, &dns);
  924|    210|  Curl_async_thrdd_shutdown(data, async);
  925|    210|  if(!result && !*pdns)
  ------------------
  |  Branch (925:6): [True: 210, False: 0]
  |  Branch (925:17): [True: 193, False: 17]
  ------------------
  926|    193|    result = Curl_async_failed(data, async, NULL);
  927|    210|  if(result &&
  ------------------
  |  Branch (927:6): [True: 193, False: 17]
  ------------------
  928|    193|     (result != CURLE_COULDNT_RESOLVE_HOST) &&
  ------------------
  |  Branch (928:6): [True: 9, False: 184]
  ------------------
  929|      9|     (result != CURLE_COULDNT_RESOLVE_PROXY)) {
  ------------------
  |  Branch (929:6): [True: 0, False: 9]
  ------------------
  930|      0|    CURL_TRC_DNS(data, "Error %d resolving %s:%d",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  931|      0|                 (int)result, async->hostname, async->port);
  932|      0|  }
  933|    210|  return result;
  934|    210|}
Curl_async_get_ai:
  955|    170|{
  956|    170|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  957|       |
  958|    170|  (void)data;
  959|    170|  switch(ai_family) {
  960|     96|  case AF_INET:
  ------------------
  |  Branch (960:3): [True: 96, False: 74]
  ------------------
  961|     96|    if(thrdd->res_A)
  ------------------
  |  Branch (961:8): [True: 0, False: 96]
  ------------------
  962|      0|      return async_thrdd_get_ai(thrdd->res_A->res, ai_family, index);
  963|     96|    break;
  964|     96|#ifdef USE_IPV6
  965|     96|  case AF_INET6:
  ------------------
  |  Branch (965:3): [True: 74, False: 96]
  ------------------
  966|     74|    if(thrdd->res_AAAA)
  ------------------
  |  Branch (966:8): [True: 74, False: 0]
  ------------------
  967|     74|      return async_thrdd_get_ai(thrdd->res_AAAA->res, ai_family, index);
  968|      0|    break;
  969|      0|#endif
  970|      0|  default:
  ------------------
  |  Branch (970:3): [True: 0, False: 170]
  ------------------
  971|      0|    break;
  972|    170|  }
  973|     96|  return NULL;
  974|    170|}
asyn-thrdd.c:async_thrdd_match_item:
  269|    180|{
  270|    180|  const struct async_thrdd_match_ctx *ctx = match_data;
  271|    180|  struct async_thrdd_item *item = qitem;
  272|    180|  return (item->mid == ctx->mid) && (item->resolv_id == ctx->resolv_id);
  ------------------
  |  Branch (272:10): [True: 180, False: 0]
  |  Branch (272:37): [True: 180, False: 0]
  ------------------
  273|    180|}
asyn-thrdd.c:async_thrdd_item_destroy:
  131|  8.20k|{
  132|  8.20k|  if(item) {
  ------------------
  |  Branch (132:6): [True: 820, False: 7.38k]
  ------------------
  133|    820|    if(item->res)
  ------------------
  |  Branch (133:8): [True: 0, False: 820]
  ------------------
  134|      0|      Curl_freeaddrinfo(item->res);
  135|    820|    curlx_free(item);
  ------------------
  |  | 1478|    820|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  136|    820|  }
  137|  8.20k|}
asyn-thrdd.c:async_thrdd_item_free:
  468|    820|{
  469|    820|  async_thrdd_item_destroy(item);
  470|    820|}
asyn-thrdd.c:async_thrdd_item_process:
  368|    811|{
  369|    811|  struct async_thrdd_item *item = arg;
  370|    811|  struct addrinfo hints;
  371|    811|  char service[12];
  372|    811|  int pf = PF_INET;
  373|    811|  int rc;
  374|       |
  375|    811|#ifdef DEBUGBUILD
  376|    811|  if(item->delay_ms) {
  ------------------
  |  Branch (376:6): [True: 0, False: 811]
  ------------------
  377|      0|    curlx_wait_ms(item->delay_ms);
  378|      0|  }
  379|    811|  if(item->delay_fail_ms) {
  ------------------
  |  Branch (379:6): [True: 0, False: 811]
  ------------------
  380|      0|    curlx_wait_ms(item->delay_fail_ms);
  381|      0|    item->negative = item->dbg_negative;
  382|      0|    return;
  383|      0|  }
  384|    811|#endif
  385|       |
  386|    811|  memset(&hints, 0, sizeof(hints));
  387|    811|#ifdef CURLRES_IPV6
  388|    811|  if(item->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    811|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (388:6): [True: 362, False: 449]
  ------------------
  389|    362|    pf = (item->dns_queries & CURL_DNSQ_A) ? PF_UNSPEC : PF_INET6;
  ------------------
  |  |   51|    362|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (389:10): [True: 0, False: 362]
  ------------------
  390|    362|  }
  391|    811|#endif
  392|    811|  hints.ai_family = pf;
  393|    811|  hints.ai_socktype = Curl_socktype_for_transport(item->transport);
  394|    811|  hints.ai_protocol = Curl_protocol_for_transport(item->transport);
  395|       |#ifdef __APPLE__
  396|       |  /* If we leave `ai_flags == 0` then macOS is looking for IPV4MAPPED
  397|       |   * when doing AAAA queries. We do not want this "help". */
  398|       |  hints.ai_flags = AI_ADDRCONFIG;
  399|       |#endif
  400|       |
  401|    811|  curl_msnprintf(service, sizeof(service), "%u", item->port);
  402|    811|#ifdef AI_NUMERICSERV
  403|    811|  hints.ai_flags |= AI_NUMERICSERV;
  404|    811|#endif
  405|       |
  406|    811|  rc = Curl_getaddrinfo_ex(item->hostname, service, &hints, &item->res);
  407|    811|  if(rc) {
  ------------------
  |  Branch (407:6): [True: 794, False: 17]
  ------------------
  408|    794|    item->sockerr = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1093|    794|#define SOCKERRNO         errno
  ------------------
                  item->sockerr = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1093|    794|#define SOCKERRNO         errno
  ------------------
  |  Branch (408:21): [True: 10, False: 784]
  ------------------
  409|    794|    if(item->sockerr == 0)
  ------------------
  |  Branch (409:8): [True: 0, False: 794]
  ------------------
  410|      0|      item->sockerr = RESOLVER_ENOMEM;
  ------------------
  |  |   46|      0|#define RESOLVER_ENOMEM  EAI_MEMORY  /* = WSA_NOT_ENOUGH_MEMORY on Windows */
  ------------------
  411|    794|    item->negative = gai_negative(rc);
  412|    794|  }
  413|     17|  else {
  414|     17|    Curl_addrinfo_set_port(item->res, item->port);
  415|     17|  }
  416|    811|}
asyn-thrdd.c:gai_negative:
  351|    794|{
  352|    794|  switch(rc) {
  353|      0|#ifdef EAI_NONAME
  354|    767|  case EAI_NONAME:
  ------------------
  |  Branch (354:3): [True: 767, False: 27]
  ------------------
  355|    767|#endif
  356|    767|#if defined(EAI_NODATA) && \
  357|    767|  (!defined(EAI_NONAME) || (EAI_NODATA != EAI_NONAME))
  358|    790|  case EAI_NODATA:
  ------------------
  |  Branch (358:3): [True: 23, False: 771]
  ------------------
  359|    790|#endif
  360|    790|    return TRUE;
  ------------------
  |  | 1053|    790|#define TRUE true
  ------------------
  361|      4|  default:
  ------------------
  |  Branch (361:3): [True: 4, False: 790]
  ------------------
  362|       |    return FALSE;
  ------------------
  |  | 1056|      4|#define FALSE false
  ------------------
  363|    794|  }
  364|    794|}
asyn-thrdd.c:async_thrdd_event:
  452|    511|{
  453|    511|  struct Curl_multi *multi = user_data;
  454|    511|  (void)tqueue;
  455|    511|  switch(ev) {
  456|    511|  case CURL_THRDQ_EV_ITEM_DONE:
  ------------------
  |  Branch (456:3): [True: 511, False: 0]
  ------------------
  457|    511|    Curl_multi_wakeup_internal(multi);
  458|    511|    break;
  459|      0|  default:
  ------------------
  |  Branch (459:3): [True: 0, False: 511]
  ------------------
  460|      0|    break;
  461|    511|  }
  462|    511|}
asyn-thrdd.c:async_thrdd_query:
  605|    820|{
  606|    820|  struct async_thrdd_item *item;
  607|    820|  CURLcode result;
  608|       |
  609|    820|  item = async_thrdd_item_create(data, async->id, dns_queries,
  610|    820|                                 async->hostname, async->port,
  611|    820|                                 async->transport);
  612|    820|  if(!item) {
  ------------------
  |  Branch (612:6): [True: 0, False: 820]
  ------------------
  613|      0|    result = CURLE_OUT_OF_MEMORY;
  614|      0|    goto out;
  615|      0|  }
  616|    820|  CURL_TRC_DNS(data, "queueing query %s", item->description);
  ------------------
  |  |  168|    820|  do {                                 \
  |  |  169|    820|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    820|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|    820|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  1.64k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 820, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 820]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  1.64k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|    820|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    820|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    820|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 820]
  |  |  ------------------
  ------------------
  617|    820|  result = Curl_thrdq_send(data->multi->resolv_thrdq, item,
  618|    820|                           async_item_description(item), async->timeout_ms);
  ------------------
  |  |  104|    820|#define async_item_description(x)   (x)->description
  ------------------
  619|    820|  if(result)
  ------------------
  |  Branch (619:6): [True: 0, False: 820]
  ------------------
  620|      0|    goto out;
  621|    820|  item = NULL;
  622|    820|  async->queries_ongoing++;
  623|       |
  624|    820|out:
  625|    820|  if(item)
  ------------------
  |  Branch (625:6): [True: 0, False: 820]
  ------------------
  626|      0|    async_thrdd_item_free(item);
  627|    820|  return result;
  628|    820|}
asyn-thrdd.c:async_thrdd_item_create:
  145|    820|{
  146|    820|  size_t hostlen = strlen(hostname);
  147|    820|  struct async_thrdd_item *item;
  148|       |
  149|    820|  item = curlx_calloc(1, sizeof(*item) + hostlen);
  ------------------
  |  | 1475|    820|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  150|    820|  if(!item)
  ------------------
  |  Branch (150:6): [True: 0, False: 820]
  ------------------
  151|      0|    return NULL;
  152|       |
  153|    820|  if(hostlen) /* NUL byte of name already in struct size */
  ------------------
  |  Branch (153:6): [True: 820, False: 0]
  ------------------
  154|    820|    memcpy(item->hostname, hostname, hostlen);
  155|    820|  item->mid = data->mid;
  156|    820|  item->resolv_id = resolv_id;
  157|    820|  item->dns_queries = dns_queries;
  158|    820|  item->port = port;
  159|    820|  item->transport = transport;
  160|       |
  161|    820|#ifdef CURLVERBOSE
  162|    820|  curl_msnprintf(item->description, sizeof(item->description),
  163|    820|                 "[%" FMT_OFF_T "/%u] %s %s:%u",
  164|    820|                 data->id, item->resolv_id,
  165|    820|                 Curl_resolv_query_str(dns_queries),
  166|    820|                 item->hostname, item->port);
  167|    820|#endif
  168|       |
  169|    820|#ifdef DEBUGBUILD
  170|    820|  {
  171|    820|    const char *p = getenv("CURL_DBG_RESOLV_DELAY");
  172|    820|    if(p) {
  ------------------
  |  Branch (172:8): [True: 0, False: 820]
  ------------------
  173|      0|      curl_off_t l;
  174|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (174:10): [True: 0, False: 0]
  ------------------
  175|      0|        item->delay_ms = (uint32_t)l;
  176|      0|      }
  177|      0|    }
  178|    820|    p = getenv("CURL_DBG_RESOLV_FAIL_DELAY");
  179|    820|    if(p) {
  ------------------
  |  Branch (179:8): [True: 0, False: 820]
  ------------------
  180|      0|      curl_off_t l;
  181|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (181:10): [True: 0, False: 0]
  ------------------
  182|      0|        unsigned char c = 0;
  183|      0|        Curl_rand_bytes(data, FALSE, &c, 1);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  184|      0|        item->delay_fail_ms = (uint32_t)l + c;
  185|      0|      }
  186|      0|    }
  187|    820|    if(getenv("CURL_DBG_RESOLV_FAIL_NEGATIVE"))
  ------------------
  |  Branch (187:8): [True: 0, False: 820]
  ------------------
  188|      0|      item->dbg_negative = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  189|    820|  }
  190|    820|#endif
  191|       |
  192|    820|  return item;
  193|    820|}
asyn-thrdd.c:async_thrdd_check_done:
  771|    811|{
  772|    811|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  773|       |
  774|    811|  (void)data;
  775|    811|  if(thrdd->inc_A) {
  ------------------
  |  Branch (775:6): [True: 217, False: 594]
  ------------------
  776|    217|    thrdd->res_A = thrdd->inc_A;
  777|    217|    thrdd->inc_A = NULL;
  778|    217|    VERBOSE(async_thrdd_report_item(data, thrdd->res_A));
  ------------------
  |  | 1613|    217|#define VERBOSE(x) x
  ------------------
  779|    217|    async->dns_responses |= thrdd->res_A->dns_queries;
  780|    217|  }
  781|       |
  782|    811|  if(thrdd->inc_AAAA) {
  ------------------
  |  Branch (782:6): [True: 114, False: 697]
  ------------------
  783|    114|    if(thrdd->res_AAAA) {
  ------------------
  |  Branch (783:8): [True: 0, False: 114]
  ------------------
  784|      0|      DEBUGASSERT(0); /* should not happen */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (784:7): [Folded, False: 0]
  |  Branch (784:7): [Folded, False: 0]
  ------------------
  785|      0|      return CURLE_FAILED_INIT;
  786|      0|    }
  787|    114|#if defined(USE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
  788|       |    /* do we accept the incoming AAAA response? */
  789|    114|    if(!(thrdd->inc_AAAA->dns_queries & CURL_DNSQ_A) &&
  ------------------
  |  |   51|    114|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (789:8): [True: 114, False: 0]
  ------------------
  790|    114|       async_thrdd_item_missing_scope(data, thrdd->inc_AAAA)) {
  ------------------
  |  Branch (790:8): [True: 0, False: 114]
  ------------------
  791|       |      /* We queried "only" AF_INET6. This may be problematic when the
  792|       |       * result has ipv6 link-local addresses and did not give
  793|       |       * any scope id for it. glibc has a long outstanding bug
  794|       |       * <https://sourceware.org/bugzilla/show_bug.cgi?id=14413>
  795|       |       * that gives scope ids only on AF_UNSPEC queries. */
  796|      0|      struct async_thrdd_item *item = thrdd->inc_AAAA;
  797|      0|      CURLcode result;
  798|       |
  799|       |      /* Reuse the item and queue it again, this time with added
  800|       |       * CURL_DNSQ_A which resolves using AF_UNSPEC. */
  801|      0|      thrdd->inc_AAAA = NULL;
  802|      0|      item->dns_queries |= CURL_DNSQ_A;
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  803|      0|      if(item->res) {
  ------------------
  |  Branch (803:10): [True: 0, False: 0]
  ------------------
  804|      0|        Curl_freeaddrinfo(item->res);
  805|      0|        item->res = NULL;
  806|      0|      }
  807|       |
  808|      0|      CURL_TRC_DNS(data, "re-queueing query %s for AF_UNSPEC resolve",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  809|      0|                   item->description);
  810|      0|      result = Curl_thrdq_send(data->multi->resolv_thrdq, item,
  811|      0|                               async_item_description(item),
  ------------------
  |  |  104|      0|#define async_item_description(x)   (x)->description
  ------------------
  812|      0|                               async->timeout_ms);
  813|      0|      if(result) {
  ------------------
  |  Branch (813:10): [True: 0, False: 0]
  ------------------
  814|      0|        async_thrdd_item_free(item);
  815|      0|        return result;
  816|      0|      }
  817|      0|      async->queries_ongoing++;
  818|      0|      return CURLE_AGAIN;
  819|      0|    }
  820|       |    /* accepting the AAAA result, strip it of any AF_INET entries,
  821|       |     * as we might have resolved it with AF_UNSPEC. */
  822|    114|    async_thrdd_item_strip_results(thrdd->inc_AAAA, AF_INET);
  823|    114|#endif /* USE_IPV6 && HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID */
  824|    114|    thrdd->res_AAAA = thrdd->inc_AAAA;
  825|    114|    thrdd->inc_AAAA = NULL;
  826|    114|    VERBOSE(async_thrdd_report_item(data, thrdd->res_AAAA));
  ------------------
  |  | 1613|    114|#define VERBOSE(x) x
  ------------------
  827|    114|    async->dns_responses |= thrdd->res_AAAA->dns_queries;
  828|    114|  }
  829|       |
  830|    811|  if(async->queries_ongoing)
  ------------------
  |  Branch (830:6): [True: 601, False: 210]
  ------------------
  831|    601|    return CURLE_AGAIN;
  832|    210|  async->done = TRUE;
  ------------------
  |  | 1053|    210|#define TRUE true
  ------------------
  833|    210|  return CURLE_OK;
  834|    811|}
asyn-thrdd.c:async_thrdd_report_item:
  517|    331|{
  518|    331|  char buf[MAX_IPADR_LEN];
  519|    331|  struct dynbuf tmp;
  520|    331|  const char *sep = "";
  521|    331|  const struct Curl_addrinfo *ai = item->res;
  522|    331|  CURLcode result;
  523|    331|  int ai_family;
  524|    331|#ifdef USE_IPV6
  525|    331|  ai_family = (item->dns_queries & CURL_DNSQ_AAAA) ? AF_INET6 : AF_INET;
  ------------------
  |  |   52|    331|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (525:15): [True: 114, False: 217]
  ------------------
  526|       |#else
  527|       |  ai_family = AF_INET;
  528|       |#endif
  529|       |
  530|    331|  if(!CURL_TRC_DNS_is_verbose(data))
  ------------------
  |  |  137|    331|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  ------------------
  |  |  |  |  329|    331|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    662|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 331, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 331]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    662|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|    331|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  531|    331|    return;
  532|       |
  533|      0|  curlx_dyn_init(&tmp, 1024);
  534|      0|  for(; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (534:9): [True: 0, False: 0]
  ------------------
  535|      0|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (535:8): [True: 0, False: 0]
  ------------------
  536|      0|      Curl_printable_address(ai, buf, sizeof(buf));
  537|      0|      result = curlx_dyn_addf(&tmp, "%s%s", sep, buf);
  538|      0|      if(result) {
  ------------------
  |  Branch (538:10): [True: 0, False: 0]
  ------------------
  539|      0|        CURL_TRC_DNS(data, "too many IP, cannot show");
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  540|      0|        goto out;
  541|      0|      }
  542|      0|      sep = ", ";
  543|      0|    }
  544|      0|  }
  545|       |
  546|      0|  CURL_TRC_DNS(data, "Host %s:%u resolved IPv%c: %s",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (170:26): [True: 0, False: 0]
  |  |  |  Branch (170:26): [True: 0, False: 0]
  |  |  ------------------
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  547|      0|               item->hostname, item->port,
  548|      0|               (item->dns_queries & CURL_DNSQ_AAAA) ? '6' : '4',
  549|      0|               (curlx_dyn_len(&tmp) ? curlx_dyn_ptr(&tmp) : "(none)"));
  550|      0|out:
  551|      0|  curlx_dyn_free(&tmp);
  552|      0|}
asyn-thrdd.c:async_thrdd_item_missing_scope:
  732|    114|{
  733|    114|  const struct Curl_addrinfo *ai;
  734|       |
  735|       |  /* scope id already globally set */
  736|    114|  if(data->conn && data->conn->scope_id)
  ------------------
  |  Branch (736:6): [True: 114, False: 0]
  |  Branch (736:20): [True: 34, False: 80]
  ------------------
  737|     34|    return FALSE;
  ------------------
  |  | 1056|     34|#define FALSE false
  ------------------
  738|       |
  739|     84|  for(ai = item->res; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (739:23): [True: 4, False: 80]
  ------------------
  740|      4|    if(ai->ai_family == AF_INET6) {
  ------------------
  |  Branch (740:8): [True: 4, False: 0]
  ------------------
  741|      4|      struct sockaddr_in6 *sa6 = (void *)ai->ai_addr;
  742|      4|      if(IN6_IS_ADDR_LINKLOCAL(&sa6->sin6_addr) && !sa6->sin6_scope_id)
  ------------------
  |  Branch (742:10): [True: 0, False: 4]
  |  Branch (742:52): [True: 0, False: 0]
  ------------------
  743|      0|        return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  744|      4|    }
  745|      4|  }
  746|     80|  return FALSE;
  ------------------
  |  | 1056|     80|#define FALSE false
  ------------------
  747|     80|}
asyn-thrdd.c:async_thrdd_item_strip_results:
  751|    114|{
  752|    114|  struct Curl_addrinfo *ai = item->res, **panchor = &item->res;
  753|    118|  while(ai) {
  ------------------
  |  Branch (753:9): [True: 4, False: 114]
  ------------------
  754|      4|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (754:8): [True: 0, False: 4]
  ------------------
  755|      0|      *panchor = ai->ai_next;
  756|      0|      ai->ai_next = NULL;
  757|      0|      Curl_freeaddrinfo(ai);
  758|      0|      ai = *panchor;
  759|      0|    }
  760|      4|    else {
  761|      4|      panchor = &ai->ai_next;
  762|      4|      ai = ai->ai_next;
  763|      4|    }
  764|      4|  }
  765|    114|}
asyn-thrdd.c:async_thrdd_get_ai:
  939|     74|{
  940|     74|  unsigned int i = 0;
  941|     74|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (941:14): [True: 0, False: 74]
  ------------------
  942|      0|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (942:8): [True: 0, False: 0]
  ------------------
  943|      0|      if(i == index)
  ------------------
  |  Branch (943:10): [True: 0, False: 0]
  ------------------
  944|      0|        return ai;
  945|      0|      ++i;
  946|      0|    }
  947|      0|  }
  948|     74|  return NULL;
  949|     74|}

Curl_bufq_init2:
  220|  9.90k|{
  221|       |  bufq_init(q, NULL, chunk_size, max_chunks, opts);
  222|  9.90k|}
Curl_bufq_free:
  236|  9.90k|{
  237|  9.90k|  chunk_list_free(&q->head);
  238|  9.90k|  chunk_list_free(&q->spare);
  239|       |  q->tail = NULL;
  240|  9.90k|  q->chunk_count = 0;
  241|  9.90k|}
Curl_bufq_reset:
  244|    140|{
  245|    140|  struct buf_chunk *chunk;
  246|    140|  while(q->head) {
  ------------------
  |  Branch (246:9): [True: 0, False: 140]
  ------------------
  247|      0|    chunk = q->head;
  248|      0|    q->head = chunk->next;
  249|      0|    chunk->next = q->spare;
  250|      0|    q->spare = chunk;
  251|      0|  }
  252|       |  q->tail = NULL;
  253|    140|}
Curl_bufq_len:
  256|    797|{
  257|    797|  const struct buf_chunk *chunk = q->head;
  258|    797|  size_t len = 0;
  259|  1.19k|  while(chunk) {
  ------------------
  |  Branch (259:9): [True: 397, False: 797]
  ------------------
  260|    397|    len += chunk_len(chunk);
  261|    397|    chunk = chunk->next;
  262|    397|  }
  263|    797|  return len;
  264|    797|}
Curl_bufq_is_empty:
  267|    400|{
  268|    400|  return !q->head || chunk_is_empty(q->head);
  ------------------
  |  Branch (268:10): [True: 200, False: 200]
  |  Branch (268:22): [True: 0, False: 200]
  ------------------
  269|    400|}
Curl_bufq_write:
  370|    562|{
  371|    562|  struct buf_chunk *tail;
  372|    562|  size_t n;
  373|       |
  374|    562|  DEBUGASSERT(q->max_chunks > 0);
  ------------------
  |  | 1079|    562|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (374:3): [True: 0, False: 562]
  |  Branch (374:3): [True: 562, False: 0]
  ------------------
  375|    562|  *pnwritten = 0;
  376|  1.12k|  while(len) {
  ------------------
  |  Branch (376:9): [True: 562, False: 562]
  ------------------
  377|    562|    tail = get_non_full_tail(q);
  378|    562|    if(!tail) {
  ------------------
  |  Branch (378:8): [True: 0, False: 562]
  ------------------
  379|      0|      if((q->chunk_count < q->max_chunks) || (q->opts & BUFQ_OPT_SOFT_LIMIT))
  ------------------
  |  |  111|      0|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
  |  Branch (379:10): [True: 0, False: 0]
  |  Branch (379:46): [True: 0, False: 0]
  ------------------
  380|       |        /* should have gotten a tail, but did not */
  381|      0|        return CURLE_OUT_OF_MEMORY;
  382|      0|      break;
  383|      0|    }
  384|    562|    n = chunk_append(tail, buf, len);
  385|    562|    if(!n)
  ------------------
  |  Branch (385:8): [True: 0, False: 562]
  ------------------
  386|      0|      break;
  387|    562|    *pnwritten += n;
  388|    562|    buf += n;
  389|    562|    len -= n;
  390|    562|  }
  391|    562|  return (!*pnwritten && len) ? CURLE_AGAIN : CURLE_OK;
  ------------------
  |  Branch (391:11): [True: 0, False: 562]
  |  Branch (391:26): [True: 0, False: 0]
  ------------------
  392|    562|}
Curl_bufq_cwrite:
  397|     30|{
  398|     30|  return Curl_bufq_write(q, (const uint8_t *)buf, len, pnwritten);
  399|     30|}
Curl_bufq_peek:
  425|    494|{
  426|    494|  if(q->head && chunk_is_empty(q->head)) {
  ------------------
  |  Branch (426:6): [True: 294, False: 200]
  |  Branch (426:17): [True: 0, False: 294]
  ------------------
  427|      0|    prune_head(q);
  428|      0|  }
  429|    494|  if(q->head && !chunk_is_empty(q->head)) {
  ------------------
  |  Branch (429:6): [True: 294, False: 200]
  |  Branch (429:17): [True: 294, False: 0]
  ------------------
  430|    294|    chunk_peek(q->head, pbuf, plen);
  431|    294|    return TRUE;
  ------------------
  |  | 1053|    294|#define TRUE true
  ------------------
  432|    294|  }
  433|    200|  *pbuf = NULL;
  434|    200|  *plen = 0;
  435|       |  return FALSE;
  ------------------
  |  | 1056|    200|#define FALSE false
  ------------------
  436|    494|}
Curl_bufq_skip:
  462|    255|{
  463|    255|  size_t n;
  464|       |
  465|    510|  while(amount && q->head) {
  ------------------
  |  Branch (465:9): [True: 255, False: 255]
  |  Branch (465:19): [True: 255, False: 0]
  ------------------
  466|    255|    n = chunk_skip(q->head, amount);
  467|    255|    amount -= n;
  468|    255|    prune_head(q);
  469|    255|  }
  470|    255|}
Curl_bufq_pass:
  474|    200|{
  475|    200|  const uint8_t *buf;
  476|    200|  size_t blen;
  477|    200|  CURLcode result = CURLE_OK;
  478|       |
  479|    200|  *pwritten = 0;
  480|    400|  while(Curl_bufq_peek(q, &buf, &blen)) {
  ------------------
  |  Branch (480:9): [True: 200, False: 200]
  ------------------
  481|    200|    size_t chunk_written;
  482|       |
  483|    200|    result = writer(writer_ctx, buf, blen, &chunk_written);
  484|    200|    if(result) {
  ------------------
  |  Branch (484:8): [True: 0, False: 200]
  ------------------
  485|      0|      if((result == CURLE_AGAIN) && *pwritten) {
  ------------------
  |  Branch (485:10): [True: 0, False: 0]
  |  Branch (485:37): [True: 0, False: 0]
  ------------------
  486|       |        /* blocked on subsequent write, report success */
  487|      0|        result = CURLE_OK;
  488|      0|      }
  489|      0|      break;
  490|      0|    }
  491|    200|    if(!chunk_written) {
  ------------------
  |  Branch (491:8): [True: 0, False: 200]
  ------------------
  492|      0|      if(!*pwritten) {
  ------------------
  |  Branch (492:10): [True: 0, False: 0]
  ------------------
  493|       |        /* treat as blocked */
  494|      0|        result = CURLE_AGAIN;
  495|      0|      }
  496|      0|      break;
  497|      0|    }
  498|    200|    *pwritten += chunk_written;
  499|    200|    Curl_bufq_skip(q, chunk_written);
  500|    200|  }
  501|    200|  return result;
  502|    200|}
Curl_bufq_sipn:
  556|    296|{
  557|    296|  struct buf_chunk *tail = NULL;
  558|       |
  559|    296|  *pnread = 0;
  560|    296|  tail = get_non_full_tail(q);
  561|    296|  if(!tail) {
  ------------------
  |  Branch (561:6): [True: 0, False: 296]
  ------------------
  562|      0|    if(q->chunk_count < q->max_chunks)
  ------------------
  |  Branch (562:8): [True: 0, False: 0]
  ------------------
  563|      0|      return CURLE_OUT_OF_MEMORY;
  564|       |    /* full, blocked */
  565|      0|    return CURLE_AGAIN;
  566|      0|  }
  567|       |
  568|    296|  return chunk_slurpn(tail, max_len, reader, reader_ctx, pnread);
  569|    296|}
bufq.c:chunk_list_free:
  137|  19.8k|{
  138|  19.8k|  struct buf_chunk *chunk;
  139|  19.9k|  while(*anchor) {
  ------------------
  |  Branch (139:9): [True: 177, False: 19.8k]
  ------------------
  140|    177|    chunk = *anchor;
  141|    177|    *anchor = chunk->next;
  142|    177|    curlx_free(chunk);
  ------------------
  |  | 1478|    177|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  143|    177|  }
  144|  19.8k|}
bufq.c:bufq_init:
  208|  9.90k|{
  209|  9.90k|  DEBUGASSERT(chunk_size > 0);
  ------------------
  |  | 1079|  9.90k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (209:3): [True: 0, False: 9.90k]
  |  Branch (209:3): [True: 9.90k, False: 0]
  ------------------
  210|  9.90k|  DEBUGASSERT(max_chunks > 0);
  ------------------
  |  | 1079|  9.90k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (210:3): [True: 0, False: 9.90k]
  |  Branch (210:3): [True: 9.90k, False: 0]
  ------------------
  211|  9.90k|  memset(q, 0, sizeof(*q));
  212|  9.90k|  q->chunk_size = chunk_size;
  213|  9.90k|  q->max_chunks = max_chunks;
  214|  9.90k|  q->pool = pool;
  215|  9.90k|  q->opts = opts;
  216|  9.90k|}
bufq.c:chunk_len:
   39|    397|{
   40|    397|  return chunk->w_offset - chunk->r_offset;
   41|    397|}
bufq.c:chunk_is_empty:
   29|  1.04k|{
   30|  1.04k|  return chunk->r_offset >= chunk->w_offset;
   31|  1.04k|}
bufq.c:chunk_is_full:
   34|    435|{
   35|    435|  return chunk->w_offset >= chunk->dlen;
   36|    435|}
bufq.c:get_non_full_tail:
  347|    858|{
  348|    858|  struct buf_chunk *chunk;
  349|       |
  350|    858|  if(q->tail && !chunk_is_full(q->tail))
  ------------------
  |  Branch (350:6): [True: 435, False: 423]
  |  Branch (350:17): [True: 435, False: 0]
  ------------------
  351|    435|    return q->tail;
  352|    423|  chunk = get_spare(q);
  353|    423|  if(chunk) {
  ------------------
  |  Branch (353:6): [True: 423, False: 0]
  ------------------
  354|       |    /* new tail, and possibly new head */
  355|    423|    if(q->tail) {
  ------------------
  |  Branch (355:8): [True: 0, False: 423]
  ------------------
  356|      0|      q->tail->next = chunk;
  357|      0|      q->tail = chunk;
  358|      0|    }
  359|    423|    else {
  360|    423|      DEBUGASSERT(!q->head);
  ------------------
  |  | 1079|    423|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (360:7): [True: 0, False: 423]
  |  Branch (360:7): [True: 423, False: 0]
  ------------------
  361|    423|      q->head = q->tail = chunk;
  362|    423|    }
  363|    423|  }
  364|    423|  return chunk;
  365|    423|}
bufq.c:get_spare:
  284|    423|{
  285|    423|  struct buf_chunk *chunk = NULL;
  286|       |
  287|    423|  if(q->spare) {
  ------------------
  |  Branch (287:6): [True: 246, False: 177]
  ------------------
  288|    246|    chunk = q->spare;
  289|    246|    q->spare = chunk->next;
  290|    246|    chunk_reset(chunk);
  291|    246|    return chunk;
  292|    246|  }
  293|       |
  294|    177|  if(q->chunk_count >= q->max_chunks && (!(q->opts & BUFQ_OPT_SOFT_LIMIT)))
  ------------------
  |  |  111|      0|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
  |  Branch (294:6): [True: 0, False: 177]
  |  Branch (294:41): [True: 0, False: 0]
  ------------------
  295|      0|    return NULL;
  296|       |
  297|    177|  if(q->pool) {
  ------------------
  |  Branch (297:6): [True: 0, False: 177]
  ------------------
  298|      0|    if(bufcp_take(q->pool, &chunk))
  ------------------
  |  Branch (298:8): [True: 0, False: 0]
  ------------------
  299|      0|      return NULL;
  300|      0|    ++q->chunk_count;
  301|      0|    return chunk;
  302|      0|  }
  303|    177|  else {
  304|       |    /* Check for integer overflow before allocation */
  305|    177|    if(q->chunk_size > SIZE_MAX - sizeof(*chunk)) {
  ------------------
  |  Branch (305:8): [True: 0, False: 177]
  ------------------
  306|      0|      return NULL;
  307|      0|    }
  308|       |
  309|    177|    chunk = curlx_calloc(1, sizeof(*chunk) + q->chunk_size);
  ------------------
  |  | 1475|    177|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  310|    177|    if(!chunk)
  ------------------
  |  Branch (310:8): [True: 0, False: 177]
  ------------------
  311|      0|      return NULL;
  312|    177|    chunk->dlen = q->chunk_size;
  313|    177|    ++q->chunk_count;
  314|    177|    return chunk;
  315|    177|  }
  316|    177|}
bufq.c:chunk_reset:
   44|    246|{
   45|       |  chunk->next = NULL;
   46|    246|  chunk->r_offset = chunk->w_offset = 0;
   47|    246|}
bufq.c:chunk_append:
   51|    562|{
   52|    562|  uint8_t *p = &chunk->x.data[chunk->w_offset];
   53|    562|  size_t n = chunk->dlen - chunk->w_offset;
   54|    562|  DEBUGASSERT(chunk->dlen >= chunk->w_offset);
  ------------------
  |  | 1079|    562|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 562]
  |  Branch (54:3): [True: 562, False: 0]
  ------------------
   55|    562|  if(n) {
  ------------------
  |  Branch (55:6): [True: 562, False: 0]
  ------------------
   56|    562|    n = CURLMIN(n, len);
  ------------------
  |  | 1292|    562|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 0, False: 562]
  |  |  ------------------
  ------------------
   57|    562|    memcpy(p, buf, n);
   58|    562|    chunk->w_offset += n;
   59|    562|  }
   60|    562|  return n;
   61|    562|}
bufq.c:prune_head:
  319|    255|{
  320|    255|  struct buf_chunk *chunk;
  321|       |
  322|    510|  while(q->head && chunk_is_empty(q->head)) {
  ------------------
  |  Branch (322:9): [True: 255, False: 255]
  |  Branch (322:20): [True: 255, False: 0]
  ------------------
  323|    255|    chunk = q->head;
  324|    255|    q->head = chunk->next;
  325|    255|    if(q->tail == chunk)
  ------------------
  |  Branch (325:8): [True: 255, False: 0]
  ------------------
  326|    255|      q->tail = q->head;
  327|    255|    if(q->pool) {
  ------------------
  |  Branch (327:8): [True: 0, False: 255]
  ------------------
  328|      0|      bufcp_put(q->pool, chunk);
  329|      0|      --q->chunk_count;
  330|      0|    }
  331|    255|    else if((q->chunk_count > q->max_chunks) ||
  ------------------
  |  Branch (331:13): [True: 0, False: 255]
  ------------------
  332|    255|            (q->opts & BUFQ_OPT_NO_SPARES)) {
  ------------------
  |  |  115|    255|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  |  Branch (332:13): [True: 0, False: 255]
  ------------------
  333|       |      /* SOFT_LIMIT allowed us more than max. free spares until
  334|       |       * we are at max again. Or free them if we are configured
  335|       |       * to not use spares. */
  336|      0|      curlx_free(chunk);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  337|      0|      --q->chunk_count;
  338|      0|    }
  339|    255|    else {
  340|    255|      chunk->next = q->spare;
  341|    255|      q->spare = chunk;
  342|    255|    }
  343|    255|  }
  344|    255|}
bufq.c:chunk_peek:
  108|    294|{
  109|    294|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1079|    294|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (109:3): [True: 0, False: 294]
  |  Branch (109:3): [True: 294, False: 0]
  ------------------
  110|    294|  *pbuf = &chunk->x.data[chunk->r_offset];
  111|    294|  *plen = chunk->w_offset - chunk->r_offset;
  112|    294|}
bufq.c:chunk_skip:
  124|    255|{
  125|    255|  size_t n = chunk->w_offset - chunk->r_offset;
  126|    255|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1079|    255|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (126:3): [True: 0, False: 255]
  |  Branch (126:3): [True: 255, False: 0]
  ------------------
  127|    255|  if(n) {
  ------------------
  |  Branch (127:6): [True: 255, False: 0]
  ------------------
  128|    255|    n = CURLMIN(n, amount);
  ------------------
  |  | 1292|    255|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 0, False: 255]
  |  |  ------------------
  ------------------
  129|    255|    chunk->r_offset += n;
  130|    255|    if(chunk->r_offset == chunk->w_offset)
  ------------------
  |  Branch (130:8): [True: 255, False: 0]
  ------------------
  131|    255|      chunk->r_offset = chunk->w_offset = 0;
  132|    255|  }
  133|    255|  return n;
  134|    255|}
bufq.c:chunk_slurpn:
   87|    296|{
   88|    296|  uint8_t *p = &chunk->x.data[chunk->w_offset];
   89|    296|  size_t n = chunk->dlen - chunk->w_offset; /* free amount */
   90|    296|  CURLcode result;
   91|       |
   92|    296|  *pnread = 0;
   93|    296|  DEBUGASSERT(chunk->dlen >= chunk->w_offset);
  ------------------
  |  | 1079|    296|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 296]
  |  Branch (93:3): [True: 296, False: 0]
  ------------------
   94|    296|  if(!n)
  ------------------
  |  Branch (94:6): [True: 0, False: 296]
  ------------------
   95|      0|    return CURLE_AGAIN;
   96|    296|  if(max_len && n > max_len)
  ------------------
  |  Branch (96:6): [True: 296, False: 0]
  |  Branch (96:17): [True: 296, False: 0]
  ------------------
   97|    296|    n = max_len;
   98|    296|  result = reader(reader_ctx, p, n, pnread);
   99|    296|  if(!result) {
  ------------------
  |  Branch (99:6): [True: 206, False: 90]
  ------------------
  100|    206|    DEBUGASSERT(*pnread <= n);
  ------------------
  |  | 1079|    206|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (100:5): [True: 0, False: 206]
  |  Branch (100:5): [True: 206, False: 0]
  ------------------
  101|    206|    chunk->w_offset += *pnread;
  102|    206|  }
  103|    296|  return result;
  104|    296|}

Curl_bufref_init:
   38|  52.6k|{
   39|  52.6k|  DEBUGASSERT(br);
  ------------------
  |  | 1079|  52.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 52.6k]
  |  Branch (39:3): [True: 52.6k, False: 0]
  ------------------
   40|  52.6k|  br->dtor = NULL;
   41|  52.6k|  br->ptr = NULL;
   42|  52.6k|  br->len = 0;
   43|       |
   44|  52.6k|#ifdef DEBUGBUILD
   45|  52.6k|  br->signature = SIGNATURE;
  ------------------
  |  |   31|  52.6k|#define SIGNATURE 0x5c48e9b2    /* Random pattern. */
  ------------------
   46|  52.6k|#endif
   47|  52.6k|}
Curl_bufref_free:
   55|   112k|{
   56|   112k|  DEBUGASSERT(br);
  ------------------
  |  | 1079|   112k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 112k]
  |  Branch (56:3): [True: 112k, False: 0]
  ------------------
   57|   112k|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1079|   112k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 112k]
  |  Branch (57:3): [True: 112k, False: 0]
  ------------------
   58|   112k|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1079|   112k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 112k, False: 0]
  |  Branch (58:3): [True: 0, False: 0]
  |  Branch (58:3): [True: 25.1k, False: 87.2k]
  |  Branch (58:3): [True: 87.2k, False: 0]
  ------------------
   59|       |
   60|   112k|  if(br->ptr && br->dtor)
  ------------------
  |  Branch (60:6): [True: 25.1k, False: 87.2k]
  |  Branch (60:17): [True: 8.32k, False: 16.8k]
  ------------------
   61|  8.32k|    br->dtor(CURL_UNCONST(br->ptr));
  ------------------
  |  |  864|  8.32k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   62|       |
   63|   112k|  br->dtor = NULL;
   64|       |  br->ptr = NULL;
   65|   112k|  br->len = 0;
   66|   112k|}
Curl_bufref_set:
   74|  25.2k|{
   75|  25.2k|  DEBUGASSERT(ptr || !len);
  ------------------
  |  | 1079|  25.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (75:3): [True: 25.2k, False: 0]
  |  Branch (75:3): [True: 0, False: 0]
  |  Branch (75:3): [True: 25.2k, False: 0]
  |  Branch (75:3): [True: 0, False: 0]
  ------------------
   76|  25.2k|  DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
  ------------------
  |  | 1079|  25.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 25.2k]
  |  Branch (76:3): [True: 25.2k, False: 0]
  ------------------
   77|       |
   78|  25.2k|  Curl_bufref_free(br);
   79|  25.2k|  br->ptr = (const unsigned char *)ptr;
   80|  25.2k|  br->len = len;
   81|  25.2k|  br->dtor = dtor;
   82|  25.2k|}
Curl_bufref_ptr:
  100|  18.9k|{
  101|  18.9k|  DEBUGASSERT(br);
  ------------------
  |  | 1079|  18.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (101:3): [True: 0, False: 18.9k]
  |  Branch (101:3): [True: 18.9k, False: 0]
  ------------------
  102|  18.9k|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1079|  18.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (102:3): [True: 0, False: 18.9k]
  |  Branch (102:3): [True: 18.9k, False: 0]
  ------------------
  103|  18.9k|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1079|  18.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 18.9k, False: 0]
  |  Branch (103:3): [True: 0, False: 0]
  |  Branch (103:3): [True: 18.7k, False: 200]
  |  Branch (103:3): [True: 200, False: 0]
  ------------------
  104|       |
  105|  18.9k|  return (const char *)br->ptr;
  106|  18.9k|}
Curl_bufref_memdup0:
  121|     40|{
  122|     40|  unsigned char *cpy = NULL;
  123|       |
  124|     40|  DEBUGASSERT(br);
  ------------------
  |  | 1079|     40|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (124:3): [True: 0, False: 40]
  |  Branch (124:3): [True: 40, False: 0]
  ------------------
  125|     40|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1079|     40|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (125:3): [True: 0, False: 40]
  |  Branch (125:3): [True: 40, False: 0]
  ------------------
  126|     40|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1079|     40|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (126:3): [True: 40, False: 0]
  |  Branch (126:3): [True: 0, False: 0]
  |  Branch (126:3): [True: 40, False: 0]
  |  Branch (126:3): [True: 0, False: 0]
  ------------------
  127|     40|  DEBUGASSERT(ptr || !len);
  ------------------
  |  | 1079|     40|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (127:3): [True: 40, False: 0]
  |  Branch (127:3): [True: 0, False: 0]
  |  Branch (127:3): [True: 40, False: 0]
  |  Branch (127:3): [True: 0, False: 0]
  ------------------
  128|     40|  DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
  ------------------
  |  | 1079|     40|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (128:3): [True: 0, False: 40]
  |  Branch (128:3): [True: 40, False: 0]
  ------------------
  129|       |
  130|     40|  if(ptr) {
  ------------------
  |  Branch (130:6): [True: 40, False: 0]
  ------------------
  131|     40|    cpy = curlx_memdup0(ptr, len);
  132|     40|    if(!cpy)
  ------------------
  |  Branch (132:8): [True: 0, False: 40]
  ------------------
  133|      0|      return CURLE_OUT_OF_MEMORY;
  134|     40|  }
  135|       |
  136|     40|  Curl_bufref_set(br, cpy, len, curl_free);
  137|     40|  return CURLE_OK;
  138|     40|}

Curl_conn_dns_add_addr_resolve:
  537|  6.42k|{
  538|       |  /* should only have address query bits */
  539|  6.42k|  DEBUGASSERT(!(dns_queries & ~CURL_DNSQ_ADDR));
  ------------------
  |  | 1079|  6.42k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (539:3): [True: 0, False: 6.42k]
  |  Branch (539:3): [True: 6.42k, False: 0]
  ------------------
  540|  6.42k|  return cf_dns_add_resolve(data, conn, sockindex, peer,
  541|  6.42k|                            (dns_queries & CURL_DNSQ_ADDR), transport);
  ------------------
  |  |   55|  6.42k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   51|  6.42k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   52|  6.42k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
  542|  6.42k|}
Curl_conn_dns_addr_result:
  554|  5.83k|{
  555|  5.83k|  struct Curl_cfilter *cf = conn->cfilter[sockindex];
  556|  6.11k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (556:9): [True: 6.11k, False: 1]
  ------------------
  557|  6.11k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (557:8): [True: 6.11k, False: 5]
  ------------------
  558|  6.11k|      struct cf_dns_ctx *ctx = cf->ctx;
  559|  6.11k|      if(Curl_peer_same_destination(ctx->peer, peer) &&
  ------------------
  |  Branch (559:10): [True: 5.83k, False: 278]
  ------------------
  560|  5.83k|         (ctx->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))) {
  ------------------
  |  |   51|  5.83k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                       (ctx->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))) {
  ------------------
  |  |   52|  5.83k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (560:10): [True: 5.83k, False: 0]
  ------------------
  561|  5.83k|        if(ctx->dns || ctx->resolv_result)
  ------------------
  |  Branch (561:12): [True: 5.64k, False: 191]
  |  Branch (561:24): [True: 0, False: 191]
  ------------------
  562|  5.64k|          return ctx->resolv_result;
  563|    191|        return CURLE_AGAIN;
  564|  5.83k|      }
  565|  6.11k|    }
  566|  6.11k|  }
  567|      1|  return CURLE_FAILED_INIT; /* no one is resolving */
  568|  5.83k|}
Curl_conn_dns_get_ai:
  603|  12.0k|{
  604|  12.0k|  struct connectdata *conn = data->conn;
  605|  12.0k|  struct Curl_cfilter *cf = conn->cfilter[sockindex];
  606|       |
  607|  12.2k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (607:9): [True: 12.2k, False: 0]
  ------------------
  608|  12.2k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (608:8): [True: 12.2k, False: 0]
  ------------------
  609|  12.2k|      struct cf_dns_ctx *ctx = cf->ctx;
  610|  12.2k|      if(Curl_peer_same_destination(ctx->peer, peer) &&
  ------------------
  |  Branch (610:10): [True: 12.0k, False: 156]
  ------------------
  611|  12.0k|         (ctx->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))) {
  ------------------
  |  |   51|  12.0k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                       (ctx->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))) {
  ------------------
  |  |   52|  12.0k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (611:10): [True: 12.0k, False: 0]
  ------------------
  612|  12.0k|        CURL_TRC_CF(data, cf, "get %uth result for %s:%u, family=%d, dns=%d",
  ------------------
  |  |  153|  12.0k|  do {                                          \
  |  |  154|  12.0k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  12.0k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  24.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 12.0k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 12.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  24.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  12.0k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  12.0k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  12.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 12.0k]
  |  |  ------------------
  ------------------
  613|  12.0k|                    index, peer->hostname, peer->port, ai_family, !!ctx->dns);
  614|  12.0k|        if(ctx->resolv_result)
  ------------------
  |  Branch (614:12): [True: 0, False: 12.0k]
  ------------------
  615|      0|          return NULL;
  616|  12.0k|        else if(ctx->dns)
  ------------------
  |  Branch (616:17): [True: 11.8k, False: 192]
  ------------------
  617|  11.8k|          return cf_dns_get_nth_ai(cf, ctx->dns->addr, ai_family, index);
  618|    192|        else
  619|    192|          return Curl_resolv_get_ai(data, ctx->resolv_id, ai_family, index);
  620|  12.0k|      }
  621|  12.2k|    }
  622|  12.2k|  }
  623|      0|  return NULL;
  624|  12.0k|}
cf-dns.c:cf_dns_destroy:
  323|  6.42k|{
  324|  6.42k|  struct cf_dns_ctx *ctx = cf->ctx;
  325|       |
  326|  6.42k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  6.42k|  do {                                          \
  |  |  154|  6.42k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  6.42k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  12.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 6.42k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.42k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  12.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  6.42k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  6.42k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  6.42k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6.42k]
  |  |  ------------------
  ------------------
  327|  6.42k|  cf_dns_ctx_destroy(data, ctx);
  328|  6.42k|}
cf-dns.c:cf_dns_ctx_destroy:
   76|  6.42k|{
   77|  6.42k|  if(ctx) {
  ------------------
  |  Branch (77:6): [True: 6.42k, False: 0]
  ------------------
   78|  6.42k|    Curl_peer_unlink(&ctx->peer);
   79|  6.42k|    Curl_dns_entry_unlink(data, &ctx->dns);
   80|  6.42k|    curlx_free(ctx);
  ------------------
  |  | 1478|  6.42k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   81|  6.42k|  }
   82|  6.42k|}
cf-dns.c:cf_dns_connect:
  266|  8.09k|{
  267|  8.09k|  struct cf_dns_ctx *ctx = cf->ctx;
  268|  8.09k|  bool ip_query = (ctx->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA));
  ------------------
  |  |   51|  8.09k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                bool ip_query = (ctx->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA));
  ------------------
  |  |   52|  8.09k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  269|       |
  270|  8.09k|  if(cf->connected) {
  ------------------
  |  Branch (270:6): [True: 0, False: 8.09k]
  ------------------
  271|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  272|      0|    return CURLE_OK;
  273|      0|  }
  274|       |
  275|  8.09k|  *done = FALSE;
  ------------------
  |  | 1056|  8.09k|#define FALSE false
  ------------------
  276|  8.09k|  if(!ctx->started) {
  ------------------
  |  Branch (276:6): [True: 6.25k, False: 1.84k]
  ------------------
  277|  6.25k|    ctx->started = TRUE;
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
  278|  6.25k|    ctx->resolv_result = cf_dns_start(cf, data, &ctx->dns);
  279|  6.25k|  }
  280|       |
  281|  8.09k|  if(!ctx->dns && !ctx->resolv_result) {
  ------------------
  |  Branch (281:6): [True: 1.45k, False: 6.64k]
  |  Branch (281:19): [True: 1.41k, False: 38]
  ------------------
  282|  1.41k|    ctx->resolv_result =
  283|  1.41k|      Curl_resolv_take_result(data, ctx->resolv_id, &ctx->dns);
  284|  1.41k|  }
  285|       |
  286|  8.09k|  if(ctx->resolv_result && ip_query) {
  ------------------
  |  Branch (286:6): [True: 205, False: 7.88k]
  |  Branch (286:28): [True: 205, False: 0]
  ------------------
  287|       |    /* failing A|AAAA resolves is a hard failure. */
  288|    205|    CURL_TRC_CF(data, cf, "error resolving: %d", (int)ctx->resolv_result);
  ------------------
  |  |  153|    205|  do {                                          \
  |  |  154|    205|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    205|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    410|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 205, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 205]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    410|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    205|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    205|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    205|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 205]
  |  |  ------------------
  ------------------
  289|    205|    return ctx->resolv_result;
  290|    205|  }
  291|       |
  292|  7.88k|  if(ctx->dns && !ctx->announced) {
  ------------------
  |  Branch (292:6): [True: 6.64k, False: 1.24k]
  |  Branch (292:18): [True: 5.65k, False: 991]
  ------------------
  293|  5.65k|    ctx->announced = TRUE;
  ------------------
  |  | 1053|  5.65k|#define TRUE true
  ------------------
  294|  5.65k|    if((cf->sockindex == FIRSTSOCKET) && ip_query) {
  ------------------
  |  |  233|  5.65k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (294:8): [True: 5.65k, False: 0]
  |  Branch (294:42): [True: 5.65k, False: 0]
  ------------------
  295|  5.65k|      cf->conn->bits.dns_resolved = TRUE;
  ------------------
  |  | 1053|  5.65k|#define TRUE true
  ------------------
  296|  5.65k|      Curl_pgrsTime(data, TIMER_NAMELOOKUP);
  297|  5.65k|    }
  298|  5.65k|    cf_dns_report(cf, data, ctx->dns);
  299|  5.65k|  }
  300|       |
  301|  7.88k|  if(!cf_dns_ready_to_connect(cf, data)) {
  ------------------
  |  Branch (301:6): [True: 1.18k, False: 6.70k]
  ------------------
  302|  1.18k|    return CURLE_OK;
  303|  1.18k|  }
  304|       |
  305|  6.70k|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (305:6): [True: 6.70k, False: 0]
  |  Branch (305:18): [True: 6.70k, False: 0]
  ------------------
  306|  6.70k|    bool sub_done;
  307|  6.70k|    CURLcode result = Curl_conn_cf_connect(cf->next, data, &sub_done);
  308|  6.70k|    if(result || !sub_done)
  ------------------
  |  Branch (308:8): [True: 5.57k, False: 1.12k]
  |  Branch (308:18): [True: 1.12k, False: 0]
  ------------------
  309|  6.70k|      return result;
  310|      0|    DEBUGASSERT(sub_done);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (310:5): [True: 0, False: 0]
  |  Branch (310:5): [True: 0, False: 0]
  ------------------
  311|      0|  }
  312|       |
  313|       |  /* sub filter chain is connected, this means the filter has done
  314|       |   * its work and is connected as well, if it has results or not. */
  315|      0|  CURL_TRC_CF(data, cf, "connected filter chain below");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  316|      0|  *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  317|       |  cf->connected = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  318|      0|  Curl_resolv_destroy(data, ctx->resolv_id);
  319|      0|  return CURLE_OK;
  320|  6.70k|}
cf-dns.c:cf_dns_start:
  170|  6.41k|{
  171|  6.41k|  struct cf_dns_ctx *ctx = cf->ctx;
  172|  6.41k|  timediff_t timeout_ms = Curl_timeleft_ms(data);
  173|  6.41k|  CURLcode result = CURLE_OK;
  174|       |
  175|  6.41k|  *pdns = NULL;
  176|       |
  177|  6.41k|  CURL_TRC_CF(data, cf, "[%s] cf_dns_start %s %s:%u",
  ------------------
  |  |  153|  6.41k|  do {                                          \
  |  |  154|  6.41k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  6.41k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  12.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 6.41k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  12.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  6.41k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  6.41k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  6.41k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6.41k]
  |  |  ------------------
  ------------------
  178|  6.41k|              Curl_resolv_query_str(ctx->dns_queries),
  179|  6.41k|              ctx->peer->unix_socket ? "unix-domain-socket" : "host",
  180|  6.41k|              ctx->peer->hostname, ctx->peer->port);
  181|  6.41k|  if(ctx->peer->unix_socket)
  ------------------
  |  Branch (181:6): [True: 35, False: 6.38k]
  ------------------
  182|     35|    ctx->dns_queries = CURL_DNSQ_A; /* treat it like an A resolve */
  ------------------
  |  |   51|     35|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  183|       |
  184|  6.41k|  if(CURL_DNSQ_IS_ADDR(ctx->dns_queries)) {
  ------------------
  |  |   56|  6.41k|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|  6.41k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  6.41k|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  6.41k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 6.41k, False: 0]
  |  |  ------------------
  ------------------
  185|  6.41k|    if(Curl_is_ipv4addr(ctx->peer->hostname))
  ------------------
  |  Branch (185:8): [True: 5.44k, False: 972]
  ------------------
  186|  5.44k|      ctx->dns_queries |= CURL_DNSQ_A;
  ------------------
  |  |   51|  5.44k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  187|    972|#ifdef USE_IPV6
  188|    972|    else if(ctx->peer->ipv6)
  ------------------
  |  Branch (188:13): [True: 59, False: 913]
  ------------------
  189|     59|      ctx->dns_queries |= CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     59|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  190|  6.41k|#endif
  191|       |
  192|  6.41k|    result = Curl_resolv(data, ctx->peer, ctx->dns_queries, ctx->transport,
  193|  6.41k|                         (bool)ctx->for_proxy, timeout_ms,
  194|  6.41k|                         &ctx->resolv_id, pdns);
  195|  6.41k|  }
  196|       |#ifdef USE_HTTPSRR
  197|       |  else if(ctx->dns_queries == CURL_DNSQ_HTTPS) {
  198|       |    result = Curl_resolv_https(data, ctx->peer, (bool)ctx->for_proxy,
  199|       |                               timeout_ms, &ctx->resolv_id, pdns);
  200|       |  }
  201|       |#endif
  202|      0|  else {
  203|      0|    failf(data, "unsupported DNS queries %x", ctx->dns_queries);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  204|      0|    return CURLE_FAILED_INIT;
  205|      0|  }
  206|       |
  207|  6.41k|  DEBUGASSERT(!result || !*pdns);
  ------------------
  |  | 1079|  6.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (207:3): [True: 6.41k, False: 0]
  |  Branch (207:3): [True: 0, False: 0]
  |  Branch (207:3): [True: 5.65k, False: 762]
  |  Branch (207:3): [True: 762, False: 0]
  ------------------
  208|  6.41k|  if(!result) { /* resolved right away, either sync or from dnscache */
  ------------------
  |  Branch (208:6): [True: 5.65k, False: 762]
  ------------------
  209|  5.65k|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1079|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (209:5): [True: 0, False: 5.65k]
  |  Branch (209:5): [True: 5.65k, False: 0]
  ------------------
  210|  5.65k|    return CURLE_OK;
  211|  5.65k|  }
  212|    762|  else if(result == CURLE_AGAIN) { /* async resolv in progress */
  ------------------
  |  Branch (212:11): [True: 724, False: 38]
  ------------------
  213|    724|    return CURLE_OK;
  214|    724|  }
  215|     38|  else if(result == CURLE_OPERATION_TIMEDOUT) { /* took too long */
  ------------------
  |  Branch (215:11): [True: 0, False: 38]
  ------------------
  216|      0|    failf(data, "Failed to resolve '%s' with timeout after %"
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  217|      0|          FMT_TIMEDIFF_T " ms", ctx->peer->hostname,
  218|      0|          curlx_ptimediff_ms(Curl_pgrs_now(data),
  219|      0|                             &data->progress.t_startsingle));
  220|      0|    return CURLE_OPERATION_TIMEDOUT;
  221|      0|  }
  222|     38|  else {
  223|     38|    DEBUGASSERT(result);
  ------------------
  |  | 1079|     38|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (223:5): [True: 0, False: 38]
  |  Branch (223:5): [True: 38, False: 0]
  ------------------
  224|     38|    if(ctx->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))
  ------------------
  |  |   51|     38|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                  if(ctx->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))
  ------------------
  |  |   52|     38|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (224:8): [True: 38, False: 0]
  ------------------
  225|     38|      failf(data, "Could not resolve: %s", ctx->peer->hostname);
  ------------------
  |  |   62|     38|#define failf Curl_failf
  ------------------
  226|     38|    return result;
  227|     38|  }
  228|  6.41k|}
cf-dns.c:cf_dns_report:
  115|  5.65k|{
  116|  5.65k|  struct cf_dns_ctx *ctx = cf->ctx;
  117|  5.65k|  struct dynbuf tmp;
  118|       |
  119|  5.65k|  if(!Curl_trc_is_verbose(data) ||
  ------------------
  |  |  322|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (322:4): [True: 5.65k, False: 0]
  |  |  |  Branch (322:14): [True: 0, False: 5.65k]
  |  |  ------------------
  |  |  323|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  120|       |     /* ignore no name or numerical IP addresses */
  121|      0|     !dns->hostname[0] || Curl_host_is_ipnum(dns->hostname))
  ------------------
  |  Branch (121:6): [True: 0, False: 0]
  |  Branch (121:27): [True: 0, False: 0]
  ------------------
  122|  5.65k|    return;
  123|       |
  124|      0|  if(ctx->peer->unix_socket) {
  ------------------
  |  Branch (124:6): [True: 0, False: 0]
  ------------------
  125|      0|#ifdef USE_UNIX_SOCKETS
  126|      0|    CURL_TRC_CF(data, cf, "resolved unix://%s", ctx->peer->hostname);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  127|       |#else
  128|       |    DEBUGASSERT(0);
  129|       |#endif
  130|      0|  }
  131|      0|  else {
  132|      0|    curlx_dyn_init(&tmp, 1024);
  133|      0|    if(CURL_DNSQ_IS_ADDR(ctx->dns_queries)) {
  ------------------
  |  |   56|      0|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|      0|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  134|      0|      infof(data, "Host %s:%u was resolved.", dns->hostname, dns->port);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  135|      0|#ifdef CURLRES_IPV6
  136|      0|      cf_dns_report_addr(data, &tmp, "IPv6: ", AF_INET6, dns->addr);
  137|      0|#endif
  138|      0|      cf_dns_report_addr(data, &tmp, "IPv4: ", AF_INET, dns->addr);
  139|      0|    }
  140|       |#ifdef USE_HTTPSRR
  141|       |    else if(ctx->dns_queries & CURL_DNSQ_HTTPS) {
  142|       |      if(!dns->hinfo)
  143|       |        infof(data, "HTTPS-RR %s:%u: -", dns->hostname, dns->port);
  144|       |      else if(!Curl_httpsrr_applicable(data, dns->hinfo))
  145|       |        infof(data, "HTTPS-RR %s:%u: not applicable",
  146|       |              dns->hostname, dns->port);
  147|       |      else {
  148|       |        CURLcode result = Curl_httpsrr_print(&tmp, dns->hinfo);
  149|       |        if(!result)
  150|       |          infof(data, "HTTPS-RR %s:%u: %s",
  151|       |                dns->hostname, dns->port, curlx_dyn_ptr(&tmp));
  152|       |        else
  153|       |          infof(data, "Error printing HTTPS-RR information");
  154|       |      }
  155|       |    }
  156|       |#endif
  157|      0|    curlx_dyn_free(&tmp);
  158|      0|  }
  159|      0|}
cf-dns.c:cf_dns_ready_to_connect:
  234|  7.88k|{
  235|  7.88k|  struct cf_dns_ctx *ctx = cf->ctx;
  236|       |
  237|  7.88k|  if(ctx->resolv_result)
  ------------------
  |  Branch (237:6): [True: 0, False: 7.88k]
  ------------------
  238|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  239|  7.88k|  else if(ctx->dns)
  ------------------
  |  Branch (239:11): [True: 6.64k, False: 1.24k]
  ------------------
  240|  6.64k|    return TRUE;
  ------------------
  |  | 1053|  6.64k|#define TRUE true
  ------------------
  241|  1.24k|#ifdef USE_CURL_ASYNC
  242|  1.24k|  else {
  243|       |    /* We want AAAA answer as we prefer IPv6. If a sub-filter desires
  244|       |    * HTTPS-RR, we check for that query as well. */
  245|  1.24k|    uint8_t wanted_answers = CURL_DNSQ_AAAA;
  ------------------
  |  |   52|  1.24k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  246|       |
  247|       |    /* Note: if a query was never started, it is considered to have
  248|       |     * an answer (e.g. a negative one). */
  249|  1.24k|    if(Curl_resolv_has_answers(data, ctx->resolv_id, wanted_answers))
  ------------------
  |  Branch (249:8): [True: 61, False: 1.18k]
  ------------------
  250|     61|      return TRUE;
  ------------------
  |  | 1053|     61|#define TRUE true
  ------------------
  251|       |    /* If the wanted answers are not available after a delay,
  252|       |     * we let the connect attempts start anyway. */
  253|  1.18k|    return Curl_resolv_elapsed_ms(data, ctx->resolv_id) >=
  254|  1.18k|           CURL_HEV3_RESOLVE_DELAY_MS;
  ------------------
  |  |  230|  1.18k|#define CURL_HEV3_RESOLVE_DELAY_MS    50
  ------------------
  255|  1.24k|  }
  256|       |#else
  257|       |  (void)data;
  258|       |  DEBUGASSERT(0); /* We should not come here */
  259|       |  return FALSE;
  260|       |#endif /* USE_CURL_ASYNC */
  261|  7.88k|}
cf-dns.c:cf_dns_adjust_pollset:
  333|  2.47k|{
  334|  2.47k|#ifdef USE_CURL_ASYNC
  335|  2.47k|  if(!cf->connected) {
  ------------------
  |  Branch (335:6): [True: 2.47k, False: 0]
  ------------------
  336|       |    /* The pollset only works when we have started the resolving.
  337|       |     * Otherwise we might wait on the WAKEUP socketpair forever.
  338|       |     * Since DNS filters can be added in the middle of a connect
  339|       |     * attempt, they are not always started that way. */
  340|  2.47k|    struct cf_dns_ctx *ctx = cf->ctx;
  341|  2.47k|    if(!ctx->started) {
  ------------------
  |  Branch (341:8): [True: 161, False: 2.31k]
  ------------------
  342|    161|      CURL_TRC_CF(data, cf, "adjust_pollset, starting %s:%u queries=%s",
  ------------------
  |  |  153|    161|  do {                                          \
  |  |  154|    161|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    161|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    322|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 161, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 161]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    322|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    161|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    161|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    161|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 161]
  |  |  ------------------
  ------------------
  343|    161|                  ctx->peer->hostname, ctx->peer->port,
  344|    161|                  Curl_resolv_query_str(ctx->dns_queries));
  345|    161|      ctx->started = TRUE;
  ------------------
  |  | 1053|    161|#define TRUE true
  ------------------
  346|    161|      ctx->resolv_result = cf_dns_start(cf, data, &ctx->dns);
  347|    161|      if(ctx->resolv_result || ctx->dns) {
  ------------------
  |  Branch (347:10): [True: 1, False: 160]
  |  Branch (347:32): [True: 146, False: 14]
  ------------------
  348|    147|        Curl_multi_mark_dirty(data);
  349|    147|      }
  350|    161|    }
  351|  2.47k|    return Curl_resolv_pollset(data, ps);
  352|  2.47k|  }
  353|       |#else
  354|       |  (void)cf;
  355|       |  (void)data;
  356|       |  (void)ps;
  357|       |#endif
  358|      0|  return CURLE_OK;
  359|  2.47k|}
cf-dns.c:cf_dns_cntrl:
  364|  6.42k|{
  365|  6.42k|  struct cf_dns_ctx *ctx = cf->ctx;
  366|  6.42k|  CURLcode result = CURLE_OK;
  367|       |
  368|  6.42k|  (void)arg1;
  369|  6.42k|  (void)arg2;
  370|  6.42k|  switch(event) {
  371|  6.42k|  case CF_CTRL_DATA_DONE:
  ------------------
  |  |  118|  6.42k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  |  Branch (371:3): [True: 6.42k, False: 0]
  ------------------
  372|  6.42k|    if(ctx->dns) {
  ------------------
  |  Branch (372:8): [True: 5.65k, False: 767]
  ------------------
  373|       |      /* Should only come here when the connect attempt failed and
  374|       |       * `data` is giving up on it. On a successful connect, we already
  375|       |       * unlinked the DNS entry. */
  376|  5.65k|      Curl_dns_entry_unlink(data, &ctx->dns);
  377|  5.65k|    }
  378|  6.42k|    break;
  379|      0|  default:
  ------------------
  |  Branch (379:3): [True: 0, False: 6.42k]
  ------------------
  380|      0|    break;
  381|  6.42k|  }
  382|  6.42k|  return result;
  383|  6.42k|}
cf-dns.c:cf_dns_add_resolve:
  487|  6.42k|{
  488|  6.42k|  struct Curl_cfilter *cf = data->conn->cfilter[sockindex];
  489|  6.42k|  struct Curl_cfilter *cf_dns = NULL;
  490|  6.42k|  bool is_addr = CURL_DNSQ_IS_ADDR(dns_queries);
  ------------------
  |  |   56|  6.42k|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|  6.42k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  6.42k|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  6.42k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  491|       |
  492|  6.42k|  if((dns_queries & CURL_DNSQ_HTTPS) &&
  ------------------
  |  |   53|  6.42k|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (492:6): [True: 0, False: 6.42k]
  ------------------
  493|      0|     Curl_is_ipaddr(peer->hostname)) {
  ------------------
  |  Branch (493:6): [True: 0, False: 0]
  ------------------
  494|      0|    dns_queries = (uint8_t)(dns_queries & ~CURL_DNSQ_HTTPS);
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  495|      0|  }
  496|       |
  497|  13.6k|  for(; cf && dns_queries; cf = cf->next) {
  ------------------
  |  Branch (497:9): [True: 7.21k, False: 6.42k]
  |  Branch (497:15): [True: 7.21k, False: 1]
  ------------------
  498|  7.21k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (498:8): [True: 167, False: 7.04k]
  ------------------
  499|    167|      struct cf_dns_ctx *ctx = cf->ctx;
  500|    167|      cf_dns = cf;
  501|    167|      if(Curl_peer_same_destination(ctx->peer, peer)) {
  ------------------
  |  Branch (501:10): [True: 1, False: 166]
  ------------------
  502|       |        /* subtract queries already being scheduled/ongoing */
  503|      1|        dns_queries = (uint8_t)(~ctx->dns_queries & dns_queries);
  504|      1|        if(!dns_queries) { /* already there */
  ------------------
  |  Branch (504:12): [True: 1, False: 0]
  ------------------
  505|      1|          return CURLE_OK;
  506|      1|        }
  507|      0|        else if(is_addr && !ctx->started &&
  ------------------
  |  Branch (507:17): [True: 0, False: 0]
  |  Branch (507:28): [True: 0, False: 0]
  ------------------
  508|      0|                CURL_DNSQ_IS_ADDR(ctx->dns_queries)) {
  ------------------
  |  |   56|      0|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|      0|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  509|      0|          ctx->dns_queries |= dns_queries;
  510|      0|          CURL_TRC_DNS(data, "[%s] added queries=%s for %s:%u",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  511|      0|                       Curl_resolv_query_str(ctx->dns_queries),
  512|      0|                       Curl_resolv_query_str(dns_queries),
  513|      0|                       peer->hostname, peer->port);
  514|      0|          return CURLE_OK;
  515|      0|        }
  516|      1|      }
  517|    167|    }
  518|  7.21k|  }
  519|       |
  520|  6.42k|  if(dns_queries) {
  ------------------
  |  Branch (520:6): [True: 6.42k, False: 1]
  ------------------
  521|       |    /* No existing filter is handling these, add a new DNS filter
  522|       |     * (after the last one if there was one already. FCFS. */
  523|  6.42k|    if(cf_dns)
  ------------------
  |  Branch (523:8): [True: 166, False: 6.25k]
  ------------------
  524|    166|      return cf_dns_insert_after(cf_dns, data, peer, dns_queries, transport);
  525|  6.25k|    else
  526|  6.25k|      return cf_dns_add(data, conn, sockindex, peer, dns_queries, transport);
  527|  6.42k|  }
  528|      1|  return CURLE_OK;
  529|  6.42k|}
cf-dns.c:cf_dns_insert_after:
  469|    166|{
  470|    166|  struct Curl_cfilter *cf;
  471|    166|  CURLcode result;
  472|       |
  473|    166|  result = cf_dns_create(&cf, data, peer, dns_queries, transport, FALSE);
  ------------------
  |  | 1056|    166|#define FALSE false
  ------------------
  474|    166|  if(result)
  ------------------
  |  Branch (474:6): [True: 0, False: 166]
  ------------------
  475|      0|    return result;
  476|       |
  477|    166|  Curl_conn_cf_insert_after(cf_at, cf);
  478|    166|  return CURLE_OK;
  479|    166|}
cf-dns.c:cf_dns_create:
  408|  6.42k|{
  409|  6.42k|  struct Curl_cfilter *cf = NULL;
  410|  6.42k|  struct cf_dns_ctx *ctx;
  411|  6.42k|  CURLcode result = CURLE_OK;
  412|       |
  413|  6.42k|  (void)data;
  414|  6.42k|  ctx = cf_dns_ctx_create(data, peer, dns_queries, transport,
  415|  6.42k|                          for_proxy);
  416|  6.42k|  if(!ctx) {
  ------------------
  |  Branch (416:6): [True: 0, False: 6.42k]
  ------------------
  417|      0|    result = CURLE_OUT_OF_MEMORY;
  418|      0|    goto out;
  419|      0|  }
  420|       |
  421|  6.42k|  result = Curl_cf_create(&cf, &Curl_cft_dns, ctx);
  422|       |
  423|  6.42k|out:
  424|  6.42k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (424:10): [True: 0, False: 6.42k]
  ------------------
  425|  6.42k|  if(result)
  ------------------
  |  Branch (425:6): [True: 0, False: 6.42k]
  ------------------
  426|      0|    cf_dns_ctx_destroy(data, ctx);
  427|  6.42k|  return result;
  428|  6.42k|}
cf-dns.c:cf_dns_ctx_create:
   56|  6.42k|{
   57|  6.42k|  struct cf_dns_ctx *ctx;
   58|       |
   59|  6.42k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|  6.42k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   60|  6.42k|  if(!ctx)
  ------------------
  |  Branch (60:6): [True: 0, False: 6.42k]
  ------------------
   61|      0|    return NULL;
   62|       |
   63|  6.42k|  Curl_peer_link(&ctx->peer, peer);
   64|  6.42k|  ctx->dns_queries = dns_queries;
   65|  6.42k|  ctx->transport = transport;
   66|  6.42k|  ctx->for_proxy = for_proxy;
   67|       |
   68|  6.42k|  CURL_TRC_DNS(data, "[%s] created DNS filter for %s:%u, transport=%x",
  ------------------
  |  |  168|  6.42k|  do {                                 \
  |  |  169|  6.42k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  6.42k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.42k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  12.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.42k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.42k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  12.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.42k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  6.42k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  6.42k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 6.42k]
  |  |  ------------------
  ------------------
   69|  6.42k|               Curl_resolv_query_str(ctx->dns_queries),
   70|  6.42k|               peer->hostname, peer->port, ctx->transport);
   71|  6.42k|  return ctx;
   72|  6.42k|}
cf-dns.c:cf_dns_add:
  438|  6.25k|{
  439|  6.25k|  struct Curl_cfilter *cf = NULL;
  440|  6.25k|  bool for_proxy = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
  441|  6.25k|  CURLcode result;
  442|       |
  443|  6.25k|  if(!peer)
  ------------------
  |  Branch (443:6): [True: 0, False: 6.25k]
  ------------------
  444|      0|    return CURLE_FAILED_INIT;
  445|  6.25k|#ifndef CURL_DISABLE_PROXY
  446|  6.25k|  for_proxy = (peer == conn->socks_proxy.peer) ||
  ------------------
  |  Branch (446:15): [True: 537, False: 5.71k]
  ------------------
  447|  5.71k|              (peer == conn->http_proxy.peer);
  ------------------
  |  Branch (447:15): [True: 2.26k, False: 3.45k]
  ------------------
  448|  6.25k|#endif
  449|       |
  450|  6.25k|  result = cf_dns_create(&cf, data, peer, dns_queries, transport, for_proxy);
  451|  6.25k|  if(result)
  ------------------
  |  Branch (451:6): [True: 0, False: 6.25k]
  ------------------
  452|      0|    goto out;
  453|  6.25k|  Curl_conn_cf_add(data, conn, sockindex, cf);
  454|  6.25k|out:
  455|  6.25k|  return result;
  456|  6.25k|}
cf-dns.c:cf_dns_get_nth_ai:
  574|  11.8k|{
  575|  11.8k|  struct cf_dns_ctx *ctx = cf->ctx;
  576|  11.8k|  unsigned int i = 0;
  577|       |
  578|  11.8k|  if((ai_family == AF_INET) && !(ctx->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|  5.99k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (578:6): [True: 5.99k, False: 5.88k]
  |  Branch (578:32): [True: 2, False: 5.99k]
  ------------------
  579|      2|    return NULL;
  580|  11.8k|#ifdef USE_IPV6
  581|  11.8k|  if((ai_family == AF_INET6) && !(ctx->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|  5.85k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (581:6): [True: 5.85k, False: 6.02k]
  |  Branch (581:33): [True: 7, False: 5.84k]
  ------------------
  582|      7|    return NULL;
  583|  11.8k|#endif
  584|  18.2k|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (584:14): [True: 12.2k, False: 6.05k]
  ------------------
  585|  12.2k|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (585:8): [True: 6.25k, False: 5.96k]
  ------------------
  586|  6.25k|      if(i == index)
  ------------------
  |  Branch (586:10): [True: 5.81k, False: 443]
  ------------------
  587|  5.81k|        return ai;
  588|    443|      ++i;
  589|    443|    }
  590|  12.2k|  }
  591|  6.05k|  return NULL;
  592|  11.8k|}

Curl_cf_h1_proxy_insert_after:
  962|  1.60k|{
  963|  1.60k|  struct Curl_cfilter *cf;
  964|  1.60k|  struct cf_h1_proxy_ctx *pctx;
  965|  1.60k|  struct h1_tunnel_state *ts;
  966|  1.60k|  CURLcode result;
  967|       |
  968|  1.60k|  (void)data;
  969|  1.60k|  if(!dest)
  ------------------
  |  Branch (969:6): [True: 0, False: 1.60k]
  ------------------
  970|      0|    return CURLE_FAILED_INIT;
  971|  1.60k|  if((httpversion < 10) || (httpversion >= 20))
  ------------------
  |  Branch (971:6): [True: 0, False: 1.60k]
  |  Branch (971:28): [True: 0, False: 1.60k]
  ------------------
  972|      0|    return CURLE_FAILED_INIT;
  973|       |
  974|  1.60k|  ts = curlx_calloc(1, sizeof(*ts));
  ------------------
  |  | 1475|  1.60k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  975|  1.60k|  if(!ts) {
  ------------------
  |  Branch (975:6): [True: 0, False: 1.60k]
  ------------------
  976|      0|    result = CURLE_OUT_OF_MEMORY;
  977|      0|    goto out;
  978|      0|  }
  979|  1.60k|  Curl_peer_link(&ts->dest, dest);
  980|  1.60k|  ts->httpversion = httpversion;
  981|  1.60k|  curlx_dyn_init(&ts->rcvbuf, DYN_PROXY_CONNECT_HEADERS);
  ------------------
  |  |   73|  1.60k|#define DYN_PROXY_CONNECT_HEADERS 16384
  ------------------
  982|  1.60k|  curlx_dyn_init(&ts->request_data, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  1.60k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
  983|  1.60k|  Curl_httpchunk_init(data, &ts->ch, TRUE);
  ------------------
  |  | 1053|  1.60k|#define TRUE true
  ------------------
  984|       |
  985|  1.60k|  pctx = curlx_calloc(1, sizeof(*pctx));
  ------------------
  |  | 1475|  1.60k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  986|  1.60k|  if(!pctx) {
  ------------------
  |  Branch (986:6): [True: 0, False: 1.60k]
  ------------------
  987|      0|    result = CURLE_OUT_OF_MEMORY;
  988|      0|    goto out;
  989|      0|  }
  990|  1.60k|  pctx->udp_tunnel = udp_tunnel;
  991|  1.60k|  pctx->ts = ts;
  992|  1.60k|  result = Curl_cf_create(&cf, &Curl_cft_h1_proxy, pctx);
  993|  1.60k|  if(result) {
  ------------------
  |  Branch (993:6): [True: 0, False: 1.60k]
  ------------------
  994|      0|    curlx_free(pctx);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  995|      0|    goto out;
  996|      0|  }
  997|  1.60k|  ts = NULL;
  998|  1.60k|  Curl_conn_cf_insert_after(cf_at, cf);
  999|       |
 1000|  1.60k|out:
 1001|  1.60k|  tunnel_free(ts, data);
 1002|  1.60k|  return result;
 1003|  1.60k|}
cf-h1-proxy.c:cf_h1_proxy_destroy:
  907|  1.60k|{
  908|  1.60k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  1.60k|  do {                                          \
  |  |  154|  1.60k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.60k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.20k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.60k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.20k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.60k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.60k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.60k]
  |  |  ------------------
  ------------------
  909|  1.60k|  cf_tunnel_free(cf, data);
  910|       |  curlx_safefree(cf->ctx);
  ------------------
  |  | 1336|  1.60k|  do {                      \
  |  | 1337|  1.60k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  1.60k|    (ptr) = NULL;           \
  |  | 1339|  1.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 1.60k]
  |  |  ------------------
  ------------------
  911|  1.60k|}
cf-h1-proxy.c:cf_tunnel_free:
  214|  1.60k|{
  215|  1.60k|  if(cf) {
  ------------------
  |  Branch (215:6): [True: 1.60k, False: 0]
  ------------------
  216|  1.60k|    struct cf_h1_proxy_ctx *pctx = cf->ctx;
  217|  1.60k|    struct h1_tunnel_state *ts = pctx ? pctx->ts : NULL;
  ------------------
  |  Branch (217:34): [True: 1.60k, False: 0]
  ------------------
  218|  1.60k|    if(ts) {
  ------------------
  |  Branch (218:8): [True: 1.60k, False: 5]
  ------------------
  219|  1.60k|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  220|  1.60k|      tunnel_free(ts, data);
  221|       |      pctx->ts = NULL;
  222|  1.60k|    }
  223|  1.60k|  }
  224|  1.60k|}
cf-h1-proxy.c:h1_tunnel_go_state:
  148|  6.43k|{
  149|  6.43k|  if(ts->tunnel_state == new_state)
  ------------------
  |  Branch (149:6): [True: 1.59k, False: 4.84k]
  ------------------
  150|  1.59k|    return;
  151|       |  /* entering this one */
  152|  4.84k|  switch(new_state) {
  ------------------
  |  Branch (152:10): [True: 4.84k, False: 0]
  ------------------
  153|      0|  case H1_TUNNEL_INIT:
  ------------------
  |  Branch (153:3): [True: 0, False: 4.84k]
  ------------------
  154|      0|    CURL_TRC_CF(data, cf, "new tunnel state 'init'");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  155|      0|    tunnel_reinit(cf, data, ts);
  156|      0|    break;
  157|       |
  158|  1.58k|  case H1_TUNNEL_CONNECT:
  ------------------
  |  Branch (158:3): [True: 1.58k, False: 3.25k]
  ------------------
  159|  1.58k|    CURL_TRC_CF(data, cf, "new tunnel state 'connect'");
  ------------------
  |  |  153|  1.58k|  do {                                          \
  |  |  154|  1.58k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.58k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.17k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.58k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.17k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.58k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.58k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.58k]
  |  |  ------------------
  ------------------
  160|  1.58k|    ts->tunnel_state = H1_TUNNEL_CONNECT;
  161|  1.58k|    ts->keepon = KEEPON_CONNECT;
  162|  1.58k|    curlx_dyn_reset(&ts->rcvbuf);
  163|  1.58k|    break;
  164|       |
  165|  1.58k|  case H1_TUNNEL_RECEIVE:
  ------------------
  |  Branch (165:3): [True: 1.58k, False: 3.25k]
  ------------------
  166|  1.58k|    CURL_TRC_CF(data, cf, "new tunnel state 'receive'");
  ------------------
  |  |  153|  1.58k|  do {                                          \
  |  |  154|  1.58k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.58k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.17k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.58k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.17k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.58k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.58k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.58k]
  |  |  ------------------
  ------------------
  167|  1.58k|    ts->tunnel_state = H1_TUNNEL_RECEIVE;
  168|  1.58k|    break;
  169|       |
  170|     62|  case H1_TUNNEL_RESPONSE:
  ------------------
  |  Branch (170:3): [True: 62, False: 4.77k]
  ------------------
  171|     62|    CURL_TRC_CF(data, cf, "new tunnel state 'response'");
  ------------------
  |  |  153|     62|  do {                                          \
  |  |  154|     62|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     62|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    124|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 62, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 62]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    124|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     62|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     62|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     62|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 62]
  |  |  ------------------
  ------------------
  172|     62|    ts->tunnel_state = H1_TUNNEL_RESPONSE;
  173|     62|    break;
  174|       |
  175|      5|  case H1_TUNNEL_ESTABLISHED:
  ------------------
  |  Branch (175:3): [True: 5, False: 4.83k]
  ------------------
  176|      5|    CURL_TRC_CF(data, cf, "new tunnel state 'established'");
  ------------------
  |  |  153|      5|  do {                                          \
  |  |  154|      5|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      5|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     10|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     10|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      5|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      5|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  177|      5|    infof(data, "CONNECT%s phase completed for HTTP proxy",
  ------------------
  |  |  143|      5|  do {                               \
  |  |  144|      5|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      5|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 5, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  323|      5|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      5|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  178|      5|          h1_proxy_is_udp(cf) ? "-UDP" : "");
  179|       |
  180|      5|    data->state.authproxy.done = TRUE;
  ------------------
  |  | 1053|      5|#define TRUE true
  ------------------
  181|      5|    data->state.authproxy.multipass = FALSE;
  ------------------
  |  | 1056|      5|#define FALSE false
  ------------------
  182|      5|    FALLTHROUGH();
  ------------------
  |  |  823|      5|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  183|  1.60k|  case H1_TUNNEL_FAILED:
  ------------------
  |  Branch (183:3): [True: 1.60k, False: 3.24k]
  ------------------
  184|  1.60k|    if(new_state == H1_TUNNEL_FAILED)
  ------------------
  |  Branch (184:8): [True: 1.60k, False: 5]
  ------------------
  185|  1.60k|      CURL_TRC_CF(data, cf, "new tunnel state 'failed'");
  ------------------
  |  |  153|  1.60k|  do {                                          \
  |  |  154|  1.60k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.60k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.20k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.60k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.20k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.60k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.60k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.60k]
  |  |  ------------------
  ------------------
  186|  1.60k|    ts->tunnel_state = new_state;
  187|  1.60k|    curlx_dyn_reset(&ts->rcvbuf);
  188|  1.60k|    curlx_dyn_reset(&ts->request_data);
  189|       |    /* restore the protocol pointer */
  190|  1.60k|    data->info.httpcode = 0; /* clear it as it might have been used for the
  191|       |                                proxy */
  192|       |    /* If a proxy-authorization header was used for the proxy, then we should
  193|       |       make sure that it is not accidentally used for the document request
  194|       |       after we have connected. Let's thus free and clear it here. */
  195|       |    curlx_safefree(data->req.hd_proxy_auth);
  ------------------
  |  | 1336|  1.60k|  do {                      \
  |  | 1337|  1.60k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  1.60k|    (ptr) = NULL;           \
  |  | 1339|  1.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 1.60k]
  |  |  ------------------
  ------------------
  196|  1.60k|    break;
  197|  4.84k|  }
  198|  4.84k|}
cf-h1-proxy.c:h1_proxy_is_udp:
   94|  2.93k|{
   95|  2.93k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
   96|  2.93k|  return (pctx->udp_tunnel ? TRUE : FALSE);
  ------------------
  |  | 1053|  2.93k|#define TRUE true
  ------------------
                return (pctx->udp_tunnel ? TRUE : FALSE);
  ------------------
  |  | 1056|  2.93k|#define FALSE false
  ------------------
  |  Branch (96:11): [True: 0, False: 2.93k]
  ------------------
   97|  2.93k|}
cf-h1-proxy.c:cf_h1_proxy_connect:
  824|  1.83k|{
  825|  1.83k|  CURLcode result;
  826|  1.83k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  827|  1.83k|  struct h1_tunnel_state *ts = pctx->ts;
  828|       |
  829|  1.83k|  if(cf->connected) {
  ------------------
  |  Branch (829:6): [True: 0, False: 1.83k]
  ------------------
  830|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  831|      0|    return CURLE_OK;
  832|      0|  }
  833|       |
  834|  1.83k|  CURL_TRC_CF(data, cf, "connect");
  ------------------
  |  |  153|  1.83k|  do {                                          \
  |  |  154|  1.83k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.83k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.66k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.83k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.66k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.83k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.83k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.83k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
  835|  1.83k|  result = cf->next->cft->do_connect(cf->next, data, done);
  836|  1.83k|  if(result || !*done)
  ------------------
  |  Branch (836:6): [True: 0, False: 1.83k]
  |  Branch (836:16): [True: 0, False: 1.83k]
  ------------------
  837|      0|    return result;
  838|       |
  839|  1.83k|  *done = FALSE;
  ------------------
  |  | 1056|  1.83k|#define FALSE false
  ------------------
  840|  1.83k|  if(!ts) {
  ------------------
  |  Branch (840:6): [True: 0, False: 1.83k]
  ------------------
  841|      0|    result = tunnel_init(cf, data, &ts);
  842|      0|    if(result)
  ------------------
  |  Branch (842:8): [True: 0, False: 0]
  ------------------
  843|      0|      return result;
  844|      0|    pctx->ts = ts;
  845|      0|  }
  846|       |
  847|       |  /* We want "seamless" operations through HTTP proxy tunnel */
  848|       |
  849|  1.83k|  result = H1_CONNECT(cf, data, ts);
  850|  1.83k|  if(result)
  ------------------
  |  Branch (850:6): [True: 1.59k, False: 240]
  ------------------
  851|  1.59k|    goto out;
  852|    240|  curlx_safefree(data->req.hd_proxy_auth);
  ------------------
  |  | 1336|    240|  do {                      \
  |  | 1337|    240|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|    240|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|    240|    (ptr) = NULL;           \
  |  | 1339|    240|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 240]
  |  |  ------------------
  ------------------
  853|       |
  854|  1.83k|out:
  855|  1.83k|  *done = (result == CURLE_OK) && tunnel_is_established(pctx->ts);
  ------------------
  |  Branch (855:11): [True: 240, False: 1.59k]
  |  Branch (855:35): [True: 5, False: 235]
  ------------------
  856|  1.83k|  if(*done) {
  ------------------
  |  Branch (856:6): [True: 5, False: 1.82k]
  ------------------
  857|      5|    cf->connected = TRUE;
  ------------------
  |  | 1053|      5|#define TRUE true
  ------------------
  858|       |    /* The real request will follow the CONNECT, reset request partially */
  859|      5|    Curl_req_soft_reset(&data->req, data);
  860|      5|    Curl_client_reset(data);
  861|      5|    Curl_pgrsReset(data);
  862|      5|    cf_tunnel_free(cf, data);
  863|      5|  }
  864|  1.83k|  return result;
  865|    240|}
cf-h1-proxy.c:H1_CONNECT:
  698|  1.83k|{
  699|  1.83k|  struct connectdata *conn = cf->conn;
  700|  1.83k|  CURLcode result;
  701|  1.83k|  bool done;
  702|       |
  703|  1.83k|  if(tunnel_is_established(ts))
  ------------------
  |  Branch (703:6): [True: 0, False: 1.83k]
  ------------------
  704|      0|    return CURLE_OK;
  705|  1.83k|  if(tunnel_is_failed(ts))
  ------------------
  |  Branch (705:6): [True: 0, False: 1.83k]
  ------------------
  706|      0|    return CURLE_RECV_ERROR; /* Need a cfilter close and new bootstrap */
  707|       |
  708|  1.83k|  do {
  709|       |
  710|  1.83k|    if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (710:8): [True: 0, False: 1.83k]
  ------------------
  711|      0|      failf(data, "Proxy CONNECT aborted due to timeout");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  712|      0|      result = CURLE_OPERATION_TIMEDOUT;
  713|      0|      goto out;
  714|      0|    }
  715|       |
  716|  1.83k|    switch(ts->tunnel_state) {
  717|  1.60k|    case H1_TUNNEL_INIT:
  ------------------
  |  Branch (717:5): [True: 1.60k, False: 230]
  ------------------
  718|       |      /* Prepare the CONNECT request and make a first attempt to send. */
  719|  1.60k|      CURL_TRC_CF(data, cf, "CONNECT start");
  ------------------
  |  |  153|  1.60k|  do {                                          \
  |  |  154|  1.60k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.60k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.20k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.60k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.20k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.60k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.60k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.60k]
  |  |  ------------------
  ------------------
  720|  1.60k|      result = start_CONNECT(cf, data, ts);
  721|  1.60k|      if(result)
  ------------------
  |  Branch (721:10): [True: 13, False: 1.58k]
  ------------------
  722|     13|        goto out;
  723|  1.58k|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_CONNECT, data);
  724|  1.58k|      FALLTHROUGH();
  ------------------
  |  |  823|  1.58k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  725|       |
  726|  1.58k|    case H1_TUNNEL_CONNECT:
  ------------------
  |  Branch (726:5): [True: 0, False: 1.83k]
  ------------------
  727|       |      /* see that the request is completely sent */
  728|  1.58k|      CURL_TRC_CF(data, cf, "CONNECT send");
  ------------------
  |  |  153|  1.58k|  do {                                          \
  |  |  154|  1.58k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.58k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.17k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.58k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.17k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.58k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.58k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.58k]
  |  |  ------------------
  ------------------
  729|  1.58k|      result = send_CONNECT(cf, data, ts, &done);
  730|  1.58k|      if(result || !done)
  ------------------
  |  Branch (730:10): [True: 0, False: 1.58k]
  |  Branch (730:20): [True: 0, False: 1.58k]
  ------------------
  731|      0|        goto out;
  732|  1.58k|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_RECEIVE, data);
  733|  1.58k|      FALLTHROUGH();
  ------------------
  |  |  823|  1.58k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  734|       |
  735|  1.81k|    case H1_TUNNEL_RECEIVE:
  ------------------
  |  Branch (735:5): [True: 230, False: 1.60k]
  ------------------
  736|       |      /* read what is there */
  737|  1.81k|      CURL_TRC_CF(data, cf, "CONNECT receive");
  ------------------
  |  |  153|  1.81k|  do {                                          \
  |  |  154|  1.81k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.81k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.63k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.81k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.81k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.63k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.81k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.81k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.81k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.81k]
  |  |  ------------------
  ------------------
  738|  1.81k|      result = recv_CONNECT_resp(cf, data, ts, &done);
  739|  1.81k|      if(result)
  ------------------
  |  Branch (739:10): [True: 1.52k, False: 297]
  ------------------
  740|  1.52k|        CURL_TRC_CF(data, cf, "error receiving CONNECT response: %d",
  ------------------
  |  |  153|  1.52k|  do {                                          \
  |  |  154|  1.52k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.52k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.04k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.52k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.04k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.52k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.52k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.52k]
  |  |  ------------------
  ------------------
  741|  1.81k|                    (int)result);
  742|  1.81k|      if(!result)
  ------------------
  |  Branch (742:10): [True: 297, False: 1.52k]
  ------------------
  743|    297|        result = Curl_pgrsUpdate(data);
  744|       |      /* error or not complete yet. return for more multi-multi */
  745|  1.81k|      if(result || !done)
  ------------------
  |  Branch (745:10): [True: 1.52k, False: 297]
  |  Branch (745:20): [True: 235, False: 62]
  ------------------
  746|  1.75k|        goto out;
  747|       |      /* got it */
  748|     62|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_RESPONSE, data);
  749|     62|      FALLTHROUGH();
  ------------------
  |  |  823|     62|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  750|       |
  751|     62|    case H1_TUNNEL_RESPONSE:
  ------------------
  |  Branch (751:5): [True: 0, False: 1.83k]
  ------------------
  752|     62|      CURL_TRC_CF(data, cf, "CONNECT response");
  ------------------
  |  |  153|     62|  do {                                          \
  |  |  154|     62|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     62|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    124|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 62, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 62]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    124|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     62|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     62|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     62|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 62]
  |  |  ------------------
  ------------------
  753|     62|      if(data->req.newurl) {
  ------------------
  |  Branch (753:10): [True: 0, False: 62]
  ------------------
  754|       |        /* not the "final" response, we need to do a follow up request.
  755|       |         * If the other side indicated a connection close, or if someone
  756|       |         * else told us to close this connection, do so now.
  757|       |         */
  758|      0|        Curl_req_soft_reset(&data->req, data);
  759|      0|        if(ts->close_connection || conn->bits.close) {
  ------------------
  |  Branch (759:12): [True: 0, False: 0]
  |  Branch (759:36): [True: 0, False: 0]
  ------------------
  760|       |          /* Close this filter and the sub-chain, re-connect the
  761|       |           * sub-chain and continue. Closing this filter will
  762|       |           * reset our tunnel state. To avoid recursion, we return
  763|       |           * and expect to be called again.
  764|       |           */
  765|      0|          CURL_TRC_CF(data, cf, "CONNECT need to close+open");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  766|      0|          infof(data, "Connect me again please");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  767|      0|          return CURLE_AGAIN;
  768|      0|        }
  769|      0|        else {
  770|       |          /* staying on this connection, reset state */
  771|      0|          h1_tunnel_go_state(cf, ts, H1_TUNNEL_INIT, data);
  772|      0|        }
  773|      0|      }
  774|     62|      break;
  775|       |
  776|     62|    default:
  ------------------
  |  Branch (776:5): [True: 0, False: 1.83k]
  ------------------
  777|      0|      break;
  778|  1.83k|    }
  779|       |
  780|  1.83k|  } while(data->req.newurl);
  ------------------
  |  Branch (780:11): [True: 0, False: 62]
  ------------------
  781|       |
  782|     62|  DEBUGASSERT(ts->tunnel_state == H1_TUNNEL_RESPONSE);
  ------------------
  |  | 1079|     62|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (782:3): [True: 0, False: 62]
  |  Branch (782:3): [True: 62, False: 0]
  ------------------
  783|     62|  if(h1_proxy_is_udp(cf)) {
  ------------------
  |  Branch (783:6): [True: 0, False: 62]
  ------------------
  784|       |    /* RFC 9298: Accept 101 Upgrade for HTTP/1.1 and
  785|       |     * 2xx responses for HTTP/2 and HTTP/3 proxies. */
  786|      0|    if(data->info.httpproxycode / 100 != 2 &&
  ------------------
  |  Branch (786:8): [True: 0, False: 0]
  ------------------
  787|      0|       data->info.httpproxycode != 101) {
  ------------------
  |  Branch (787:8): [True: 0, False: 0]
  ------------------
  788|      0|      curlx_safefree(data->req.newurl);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  789|      0|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  790|      0|      failf(data, "CONNECT-UDP tunnel failed, response %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  791|      0|            data->req.httpcode);
  792|      0|      return CURLE_COULDNT_CONNECT;
  793|      0|    }
  794|      0|  }
  795|     62|  else {
  796|     62|    if(data->info.httpproxycode / 100 != 2) {
  ------------------
  |  Branch (796:8): [True: 57, False: 5]
  ------------------
  797|       |      /* a non-2xx response and we have no next URL to try. */
  798|     57|      curlx_safefree(data->req.newurl);
  ------------------
  |  | 1336|     57|  do {                      \
  |  | 1337|     57|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|     57|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|     57|    (ptr) = NULL;           \
  |  | 1339|     57|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 57]
  |  |  ------------------
  ------------------
  799|     57|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  800|     57|      failf(data, "CONNECT tunnel failed, response %d", data->req.httpcode);
  ------------------
  |  |   62|     57|#define failf Curl_failf
  ------------------
  801|     57|      return CURLE_COULDNT_CONNECT;
  802|     57|    }
  803|     62|  }
  804|       |  /* 2xx response, SUCCESS! */
  805|       |  /* 101 Switching Protocol for CONNECT-UDP */
  806|      5|  h1_tunnel_go_state(cf, ts, H1_TUNNEL_ESTABLISHED, data);
  807|      5|  if(h1_proxy_is_udp(cf))
  ------------------
  |  Branch (807:6): [True: 0, False: 5]
  ------------------
  808|      0|    infof(data, "CONNECT-UDP tunnel established, response %d",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  809|      5|                                    data->info.httpproxycode);
  810|      5|  else
  811|      5|    infof(data, "CONNECT tunnel established, response %d",
  ------------------
  |  |  143|      5|  do {                               \
  |  |  144|      5|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      5|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 5, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  323|      5|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      5|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  812|      5|                                    data->info.httpproxycode);
  813|      5|  result = CURLE_OK;
  814|       |
  815|  1.77k|out:
  816|  1.77k|  if(result)
  ------------------
  |  Branch (816:6): [True: 1.53k, False: 240]
  ------------------
  817|  1.53k|    h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  818|  1.77k|  return result;
  819|      5|}
cf-h1-proxy.c:tunnel_is_failed:
   89|  1.83k|{
   90|  1.83k|  return ts && (ts->tunnel_state == H1_TUNNEL_FAILED);
  ------------------
  |  Branch (90:10): [True: 1.83k, False: 0]
  |  Branch (90:16): [True: 0, False: 1.83k]
  ------------------
   91|  1.83k|}
cf-h1-proxy.c:start_CONNECT:
  234|  1.60k|{
  235|  1.60k|  struct httpreq *req = NULL;
  236|  1.60k|  int http_minor;
  237|  1.60k|  CURLcode result;
  238|       |
  239|  1.60k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  1.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [True: 0, False: 1.60k]
  |  Branch (239:3): [True: 1.60k, False: 0]
  ------------------
  240|       |  /* This only happens if we have looped here due to authentication reasons,
  241|       |     and we do not really use the newly cloned URL here then. Free it. */
  242|  1.60k|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1336|  1.60k|  do {                      \
  |  | 1337|  1.60k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  1.60k|    (ptr) = NULL;           \
  |  | 1339|  1.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 1.60k]
  |  |  ------------------
  ------------------
  243|       |
  244|  1.60k|  result = Curl_http_proxy_create_tunnel_request(&req, cf, data, ts->dest,
  245|  1.60k|                                                  PROXY_HTTP_V1,
  246|  1.60k|                                                  h1_proxy_is_udp(cf));
  247|  1.60k|  if(result)
  ------------------
  |  Branch (247:6): [True: 13, False: 1.58k]
  ------------------
  248|     13|    goto out;
  249|       |
  250|  1.58k|  curlx_dyn_reset(&ts->request_data);
  251|  1.58k|  ts->nsent = 0;
  252|  1.58k|  ts->headerlines = 0;
  253|  1.58k|  http_minor = ts->httpversion % 10;
  254|       |
  255|  1.58k|  result = Curl_h1_req_write_head(req, http_minor, &ts->request_data);
  256|  1.58k|  if(!result)
  ------------------
  |  Branch (256:6): [True: 1.58k, False: 0]
  ------------------
  257|  1.58k|    result = Curl_creader_set_null(data);
  258|       |
  259|  1.60k|out:
  260|  1.60k|  if(result)
  ------------------
  |  Branch (260:6): [True: 13, False: 1.58k]
  ------------------
  261|     13|    failf(data, "Failed sending CONNECT to proxy");
  ------------------
  |  |   62|     13|#define failf Curl_failf
  ------------------
  262|  1.60k|  if(req)
  ------------------
  |  Branch (262:6): [True: 1.58k, False: 13]
  ------------------
  263|  1.58k|    Curl_http_req_free(req);
  264|  1.60k|  return result;
  265|  1.58k|}
cf-h1-proxy.c:send_CONNECT:
  271|  1.58k|{
  272|  1.58k|  const uint8_t *buf = curlx_dyn_uptr(&ts->request_data);
  273|  1.58k|  size_t request_len = curlx_dyn_len(&ts->request_data);
  274|  1.58k|  size_t blen = request_len;
  275|  1.58k|  CURLcode result = CURLE_OK;
  276|  1.58k|  size_t nwritten;
  277|       |
  278|  1.58k|  if(blen <= ts->nsent)
  ------------------
  |  Branch (278:6): [True: 0, False: 1.58k]
  ------------------
  279|      0|    goto out;  /* we are done */
  280|       |
  281|  1.58k|  blen -= ts->nsent;
  282|  1.58k|  buf += ts->nsent;
  283|       |
  284|  1.58k|  result = cf->next->cft->do_send(cf->next, data, buf, blen, FALSE, &nwritten);
  ------------------
  |  | 1056|  1.58k|#define FALSE false
  ------------------
  285|  1.58k|  if(result) {
  ------------------
  |  Branch (285:6): [True: 0, False: 1.58k]
  ------------------
  286|      0|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (286:8): [True: 0, False: 0]
  ------------------
  287|      0|      result = CURLE_OK;
  288|      0|    goto out;
  289|      0|  }
  290|       |
  291|  1.58k|  DEBUGASSERT(blen >= nwritten);
  ------------------
  |  | 1079|  1.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (291:3): [True: 0, False: 1.58k]
  |  Branch (291:3): [True: 1.58k, False: 0]
  ------------------
  292|  1.58k|  ts->nsent += nwritten;
  293|  1.58k|  Curl_debug(data, CURLINFO_HEADER_OUT, (const char *)buf, nwritten);
  294|       |
  295|  1.58k|out:
  296|  1.58k|  if(result)
  ------------------
  |  Branch (296:6): [True: 0, False: 1.58k]
  ------------------
  297|      0|    failf(data, "Failed sending CONNECT to proxy");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  298|  1.58k|  *done = (!result && (ts->nsent >= request_len));
  ------------------
  |  Branch (298:12): [True: 1.58k, False: 0]
  |  Branch (298:23): [True: 1.58k, False: 0]
  ------------------
  299|  1.58k|  return result;
  300|  1.58k|}
cf-h1-proxy.c:recv_CONNECT_resp:
  550|  1.81k|{
  551|  1.81k|  CURLcode result = CURLE_OK;
  552|  1.81k|  int error;
  553|       |
  554|  1.81k|#define SELECT_OK      0
  555|  1.81k|#define SELECT_ERROR   1
  556|       |
  557|  1.81k|  error = SELECT_OK;
  ------------------
  |  |  554|  1.81k|#define SELECT_OK      0
  ------------------
  558|  1.81k|  *done = FALSE;
  ------------------
  |  | 1056|  1.81k|#define FALSE false
  ------------------
  559|       |
  560|   157k|  while(ts->keepon) {
  ------------------
  |  Branch (560:9): [True: 157k, False: 62]
  ------------------
  561|   157k|    size_t nread;
  562|   157k|    char byte;
  563|       |
  564|       |    /* Read one byte at a time to avoid a race condition. Wait at most one
  565|       |       second before looping to ensure continuous pgrsUpdates. */
  566|   157k|    result = Curl_conn_recv(data, cf->sockindex, &byte, 1, &nread);
  567|   157k|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (567:8): [True: 235, False: 157k]
  ------------------
  568|       |      /* socket buffer drained, return */
  569|    235|      return CURLE_OK;
  570|       |
  571|   157k|    if(!result)
  ------------------
  |  Branch (571:8): [True: 157k, False: 0]
  ------------------
  572|   157k|      result = Curl_pgrsUpdate(data);
  573|       |
  574|   157k|    if(result) {
  ------------------
  |  Branch (574:8): [True: 0, False: 157k]
  ------------------
  575|      0|      ts->keepon = KEEPON_DONE;
  576|      0|      break;
  577|      0|    }
  578|       |
  579|   157k|    if(!nread) {
  ------------------
  |  Branch (579:8): [True: 1.46k, False: 155k]
  ------------------
  580|  1.46k|      if(ts->maybe_folded) {
  ------------------
  |  Branch (580:10): [True: 33, False: 1.43k]
  ------------------
  581|       |        /* EOF right after LF: finalize the pending header line. */
  582|     33|        result = single_header(cf, data, ts);
  583|     33|        if(result)
  ------------------
  |  Branch (583:12): [True: 12, False: 21]
  ------------------
  584|     12|          return result;
  585|     21|        ts->maybe_folded = FALSE;
  ------------------
  |  | 1056|     21|#define FALSE false
  ------------------
  586|     21|      }
  587|  1.45k|      if(data->set.proxyauth && data->state.authproxy.avail &&
  ------------------
  |  Branch (587:10): [True: 1.45k, False: 1]
  |  Branch (587:33): [True: 0, False: 1.45k]
  ------------------
  588|      0|         data->req.hd_proxy_auth) {
  ------------------
  |  Branch (588:10): [True: 0, False: 0]
  ------------------
  589|       |        /* proxy auth was requested and there was proxy auth available,
  590|       |           then deem this as "mere" proxy disconnect */
  591|      0|        ts->close_connection = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  592|      0|        infof(data, "Proxy CONNECT connection closed");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  593|      0|      }
  594|  1.45k|      else {
  595|  1.45k|        error = SELECT_ERROR;
  ------------------
  |  |  555|  1.45k|#define SELECT_ERROR   1
  ------------------
  596|  1.45k|        failf(data, "Proxy CONNECT aborted");
  ------------------
  |  |   62|  1.45k|#define failf Curl_failf
  ------------------
  597|  1.45k|      }
  598|  1.45k|      ts->keepon = KEEPON_DONE;
  599|  1.45k|      break;
  600|  1.46k|    }
  601|       |
  602|   155k|    if(ts->keepon == KEEPON_IGNORE) {
  ------------------
  |  Branch (602:8): [True: 0, False: 155k]
  ------------------
  603|       |      /* This means we are currently ignoring a response-body */
  604|      0|      if(ts->chunked_encoding) {
  ------------------
  |  Branch (604:10): [True: 0, False: 0]
  ------------------
  605|       |        /* chunked-encoded body, so we need to do the chunked dance
  606|       |           properly to know when the end of the body is reached */
  607|      0|        size_t consumed = 0;
  608|       |
  609|       |        /* now parse the chunked piece of data so that we can
  610|       |           properly tell when the stream ends */
  611|      0|        result = Curl_httpchunk_read(data, &ts->ch, &byte, 1, &consumed);
  612|      0|        if(result)
  ------------------
  |  Branch (612:12): [True: 0, False: 0]
  ------------------
  613|      0|          return result;
  614|      0|        if(Curl_httpchunk_is_done(data, &ts->ch)) {
  ------------------
  |  Branch (614:12): [True: 0, False: 0]
  ------------------
  615|       |          /* we are done reading chunks! */
  616|      0|          infof(data, "chunk reading DONE");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  617|      0|          ts->keepon = KEEPON_DONE;
  618|      0|        }
  619|      0|      }
  620|      0|      else if(ts->cl) {
  ------------------
  |  Branch (620:15): [True: 0, False: 0]
  ------------------
  621|       |        /* A Content-Length based body: count down the counter
  622|       |           and make sure to break out of the loop when we are done! */
  623|      0|        ts->cl--;
  624|      0|        if(ts->cl <= 0) {
  ------------------
  |  Branch (624:12): [True: 0, False: 0]
  ------------------
  625|      0|          ts->keepon = KEEPON_DONE;
  626|      0|          break;
  627|      0|        }
  628|      0|      }
  629|      0|      continue;
  630|      0|    }
  631|       |
  632|   155k|    if(ts->maybe_folded) {
  ------------------
  |  Branch (632:8): [True: 2.14k, False: 153k]
  ------------------
  633|  2.14k|      if(ISBLANK(byte)) {
  ------------------
  |  |   43|  2.14k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 134, False: 2.00k]
  |  |  |  Branch (43:38): [True: 777, False: 1.22k]
  |  |  ------------------
  ------------------
  634|    911|        Curl_http_to_fold(&ts->rcvbuf);
  635|    911|        ts->leading_unfold = TRUE;
  ------------------
  |  | 1053|    911|#define TRUE true
  ------------------
  636|    911|      }
  637|  1.22k|      else {
  638|  1.22k|        result = single_header(cf, data, ts);
  639|  1.22k|        if(result)
  ------------------
  |  Branch (639:12): [True: 42, False: 1.18k]
  ------------------
  640|     42|          return result;
  641|       |        /* now handle the new byte */
  642|  1.22k|      }
  643|  2.09k|      ts->maybe_folded = FALSE;
  ------------------
  |  | 1056|  2.09k|#define FALSE false
  ------------------
  644|  2.09k|    }
  645|       |
  646|   155k|    if(ts->leading_unfold) {
  ------------------
  |  Branch (646:8): [True: 2.87k, False: 152k]
  ------------------
  647|  2.87k|      if(ISBLANK(byte))
  ------------------
  |  |   43|  2.87k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 354, False: 2.51k]
  |  |  |  Branch (43:38): [True: 1.61k, False: 904]
  |  |  ------------------
  ------------------
  648|       |        /* skip a bit brother */
  649|  1.96k|        continue;
  650|       |      /* non-blank, insert a space then continue the unfolding */
  651|    904|      if(curlx_dyn_addn(&ts->rcvbuf, " ", 1)) {
  ------------------
  |  Branch (651:10): [True: 0, False: 904]
  ------------------
  652|      0|        failf(data, "CONNECT response too large");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  653|      0|        return CURLE_RECV_ERROR;
  654|      0|      }
  655|    904|      ts->leading_unfold = FALSE;
  ------------------
  |  | 1056|    904|#define FALSE false
  ------------------
  656|    904|    }
  657|   153k|    if(curlx_dyn_addn(&ts->rcvbuf, &byte, 1)) {
  ------------------
  |  Branch (657:8): [True: 8, False: 153k]
  ------------------
  658|      8|      failf(data, "CONNECT response too large");
  ------------------
  |  |   62|      8|#define failf Curl_failf
  ------------------
  659|      8|      return CURLE_RECV_ERROR;
  660|      8|    }
  661|       |
  662|       |    /* if this is not the end of a header line then continue */
  663|   153k|    if(byte != 0x0a)
  ------------------
  |  Branch (663:8): [True: 151k, False: 2.23k]
  ------------------
  664|   151k|      continue;
  665|  2.23k|    else {
  666|  2.23k|      const char *linep = curlx_dyn_ptr(&ts->rcvbuf);
  667|  2.23k|      size_t hlen = curlx_dyn_len(&ts->rcvbuf);
  668|  2.23k|      if(hlen && ISNEWLINE(linep[0])) {
  ------------------
  |  |   48|  2.23k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (48:26): [True: 57, False: 2.17k]
  |  |  |  Branch (48:43): [True: 6, False: 2.17k]
  |  |  ------------------
  ------------------
  |  Branch (668:10): [True: 2.23k, False: 0]
  ------------------
  669|       |        /* end of headers */
  670|     63|        result = single_header(cf, data, ts);
  671|     63|        if(result)
  ------------------
  |  Branch (671:12): [True: 1, False: 62]
  ------------------
  672|      1|          return result;
  673|     63|      }
  674|  2.17k|      else
  675|  2.17k|        ts->maybe_folded = TRUE;
  ------------------
  |  | 1053|  2.17k|#define TRUE true
  ------------------
  676|  2.23k|    }
  677|       |
  678|  2.23k|    if(result)
  ------------------
  |  Branch (678:8): [True: 0, False: 2.23k]
  ------------------
  679|      0|      return result;
  680|  2.23k|  } /* while there is buffer left and loop is requested */
  681|       |
  682|  1.51k|  if(error)
  ------------------
  |  Branch (682:6): [True: 1.45k, False: 62]
  ------------------
  683|  1.45k|    result = CURLE_RECV_ERROR;
  684|  1.51k|  *done = (ts->keepon == KEEPON_DONE);
  685|  1.51k|  if(!result && *done &&
  ------------------
  |  Branch (685:6): [True: 62, False: 1.45k]
  |  Branch (685:17): [True: 62, False: 0]
  ------------------
  686|     62|     data->info.httpproxycode / 100 != 2 &&
  ------------------
  |  Branch (686:6): [True: 57, False: 5]
  ------------------
  687|     57|     !(h1_proxy_is_udp(cf) && data->info.httpproxycode == 101)) {
  ------------------
  |  Branch (687:8): [True: 0, False: 57]
  |  Branch (687:31): [True: 0, False: 0]
  ------------------
  688|       |    /* Deal with the possibly already received authenticate
  689|       |       headers. 'newurl' is set to a new URL if we must loop. */
  690|     57|    result = Curl_http_auth_act(data);
  691|     57|  }
  692|  1.51k|  return result;
  693|  1.81k|}
cf-h1-proxy.c:single_header:
  468|  1.32k|{
  469|  1.32k|  CURLcode result = CURLE_OK;
  470|  1.32k|  const char *linep = curlx_dyn_ptr(&ts->rcvbuf);
  471|  1.32k|  size_t line_len = curlx_dyn_len(&ts->rcvbuf); /* bytes in this line */
  472|  1.32k|  const struct SingleRequest *k = &data->req;
  473|  1.32k|  int writetype;
  474|  1.32k|  ts->headerlines++;
  475|       |
  476|       |  /* output debug if that is requested */
  477|  1.32k|  Curl_debug(data, CURLINFO_HEADER_IN, linep, line_len);
  478|       |
  479|       |  /* a CONNECT response line is handed to the client as a header, so it must
  480|       |     pass the same checks as a regular response header before delivery */
  481|  1.32k|  result = Curl_verify_header(data, linep, line_len);
  482|  1.32k|  if(result)
  ------------------
  |  Branch (482:6): [True: 23, False: 1.30k]
  ------------------
  483|     23|    return result;
  484|       |
  485|       |  /* send the header to the callback */
  486|  1.30k|  writetype = CLIENTWRITE_HEADER | CLIENTWRITE_CONNECT |
  ------------------
  |  |   45|  1.30k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                writetype = CLIENTWRITE_HEADER | CLIENTWRITE_CONNECT |
  ------------------
  |  |   47|  1.30k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  487|  1.30k|    (ts->headerlines == 1 ? CLIENTWRITE_STATUS : 0);
  ------------------
  |  |   46|    248|#define CLIENTWRITE_STATUS  (1 << 3) /* a special status HEADER */
  ------------------
  |  Branch (487:6): [True: 248, False: 1.05k]
  ------------------
  488|  1.30k|  result = Curl_client_write(data, writetype, linep, line_len);
  489|  1.30k|  if(result)
  ------------------
  |  Branch (489:6): [True: 32, False: 1.27k]
  ------------------
  490|     32|    return result;
  491|       |
  492|  1.27k|  result = Curl_bump_headersize(data, line_len, TRUE);
  ------------------
  |  | 1053|  1.27k|#define TRUE true
  ------------------
  493|  1.27k|  if(result)
  ------------------
  |  Branch (493:6): [True: 0, False: 1.27k]
  ------------------
  494|      0|    return result;
  495|       |
  496|       |  /* Newlines are CRLF, so the CR is ignored as the line is not
  497|       |     really terminated until the LF comes. Treat a following CR
  498|       |     as end-of-headers as well.*/
  499|       |
  500|  1.27k|  if(ISNEWLINE(linep[0])) {
  ------------------
  |  |   48|  1.27k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (48:26): [True: 57, False: 1.21k]
  |  |  |  Branch (48:43): [True: 5, False: 1.20k]
  |  |  ------------------
  ------------------
  501|       |    /* end of response-headers from the proxy */
  502|       |
  503|     62|    if((407 == k->httpcode) && !data->state.authproblem) {
  ------------------
  |  Branch (503:8): [True: 2, False: 60]
  |  Branch (503:32): [True: 2, False: 0]
  ------------------
  504|       |      /* If we get a 407 response code with content length
  505|       |         when we have no auth problem, we must ignore the
  506|       |         whole response-body */
  507|      2|      ts->keepon = KEEPON_IGNORE;
  508|       |
  509|      2|      if(ts->cl) {
  ------------------
  |  Branch (509:10): [True: 0, False: 2]
  ------------------
  510|      0|        infof(data, "Ignore %" FMT_OFF_T " bytes of response-body", ts->cl);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  511|      0|      }
  512|      2|      else if(ts->chunked_encoding) {
  ------------------
  |  Branch (512:15): [True: 0, False: 2]
  ------------------
  513|      0|        infof(data, "Ignore chunked response-body");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  514|      0|      }
  515|      2|      else {
  516|       |        /* without content-length or chunked encoding, we
  517|       |           cannot keep the connection alive since the close is
  518|       |           the end signal so we bail out at once instead */
  519|      2|        CURL_TRC_CF(data, cf, "CONNECT: no content-length or chunked");
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      2|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  520|      2|        ts->keepon = KEEPON_DONE;
  521|      2|      }
  522|      2|    }
  523|     60|    else {
  524|     60|      ts->keepon = KEEPON_DONE;
  525|     60|    }
  526|       |
  527|     62|    DEBUGASSERT(ts->keepon == KEEPON_IGNORE ||
  ------------------
  |  | 1079|     62|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (527:5): [True: 62, False: 0]
  |  Branch (527:5): [True: 0, False: 0]
  |  Branch (527:5): [True: 0, False: 62]
  |  Branch (527:5): [True: 62, False: 0]
  ------------------
  528|     62|                ts->keepon == KEEPON_DONE);
  529|     62|    return result;
  530|     62|  }
  531|       |
  532|  1.20k|  if(h1_proxy_is_udp(cf)) {
  ------------------
  |  Branch (532:6): [True: 0, False: 1.20k]
  ------------------
  533|      0|    result = on_resp_header_udp(cf, data, ts, linep);
  534|      0|  }
  535|  1.20k|  else {
  536|  1.20k|    result = on_resp_header(cf, data, ts, linep);
  537|  1.20k|  }
  538|       |
  539|  1.20k|  if(result)
  ------------------
  |  Branch (539:6): [True: 0, False: 1.20k]
  ------------------
  540|      0|    return result;
  541|       |
  542|  1.20k|  curlx_dyn_reset(&ts->rcvbuf);
  543|  1.20k|  return result;
  544|  1.20k|}
cf-h1-proxy.c:on_resp_header:
  392|  1.20k|{
  393|  1.20k|  CURLcode result = CURLE_OK;
  394|  1.20k|  struct SingleRequest *k = &data->req;
  395|  1.20k|  (void)cf;
  396|       |
  397|  1.20k|  if((checkprefix("WWW-Authenticate:", header) && (401 == k->httpcode)) ||
  ------------------
  |  |   33|  2.41k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  1.20k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  1.20k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 1.20k]
  |  |  ------------------
  ------------------
  |  Branch (397:51): [True: 0, False: 0]
  ------------------
  398|  1.20k|     (checkprefix("Proxy-authenticate:", header) && (407 == k->httpcode))) {
  ------------------
  |  |   33|  2.41k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  1.20k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  1.20k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 1.20k]
  |  |  ------------------
  ------------------
  |  Branch (398:53): [True: 0, False: 0]
  ------------------
  399|       |
  400|      0|    bool proxy = (k->httpcode == 407);
  401|      0|    char *auth = Curl_copy_header_value(header);
  402|      0|    if(!auth)
  ------------------
  |  Branch (402:8): [True: 0, False: 0]
  ------------------
  403|      0|      return CURLE_OUT_OF_MEMORY;
  404|       |
  405|      0|    CURL_TRC_CF(data, cf, "CONNECT: fwd auth header '%s'", header);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  406|      0|    result = Curl_http_input_auth(data, proxy, auth);
  407|       |
  408|      0|    curlx_free(auth);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  409|       |
  410|      0|    if(result)
  ------------------
  |  Branch (410:8): [True: 0, False: 0]
  ------------------
  411|      0|      return result;
  412|      0|  }
  413|  1.20k|  else if(checkprefix("Content-Length:", header)) {
  ------------------
  |  |   33|  1.20k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  1.20k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  1.20k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 1.20k]
  |  |  ------------------
  ------------------
  414|      0|    if(k->httpcode / 100 == 2) {
  ------------------
  |  Branch (414:8): [True: 0, False: 0]
  ------------------
  415|       |      /* A client MUST ignore any Content-Length or Transfer-Encoding
  416|       |         header fields received in a successful response to CONNECT.
  417|       |         "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */
  418|      0|      infof(data, "Ignoring Content-Length in CONNECT %03d response",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  419|      0|            k->httpcode);
  420|      0|    }
  421|      0|    else {
  422|      0|      const char *p = header + CURL_CSTRLEN("Content-Length:");
  ------------------
  |  | 1296|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  423|      0|      if(curlx_str_numblanks(&p, &ts->cl)) {
  ------------------
  |  Branch (423:10): [True: 0, False: 0]
  ------------------
  424|      0|        failf(data, "Unsupported Content-Length value");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  425|      0|        return CURLE_WEIRD_SERVER_REPLY;
  426|      0|      }
  427|      0|    }
  428|      0|  }
  429|  1.20k|  else if(Curl_compareheader(header,
  ------------------
  |  Branch (429:11): [True: 0, False: 1.20k]
  ------------------
  430|  1.20k|                             STRCONST("Connection:"), STRCONST("close")))
  ------------------
  |  | 1301|  1.20k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.20k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
                                           STRCONST("Connection:"), STRCONST("close")))
  ------------------
  |  | 1301|  1.20k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.20k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  431|      0|    ts->close_connection = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  432|  1.20k|  else if(checkprefix("Transfer-Encoding:", header)) {
  ------------------
  |  |   33|  1.20k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  1.20k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  1.20k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 1.20k]
  |  |  ------------------
  ------------------
  433|      0|    if(k->httpcode / 100 == 2) {
  ------------------
  |  Branch (433:8): [True: 0, False: 0]
  ------------------
  434|       |      /* A client MUST ignore any Content-Length or Transfer-Encoding
  435|       |         header fields received in a successful response to CONNECT.
  436|       |         "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */
  437|      0|      infof(data, "Ignoring Transfer-Encoding in "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  438|      0|            "CONNECT %03d response", k->httpcode);
  439|      0|    }
  440|      0|    else if(Curl_compareheader(header,
  ------------------
  |  Branch (440:13): [True: 0, False: 0]
  ------------------
  441|      0|                               STRCONST("Transfer-Encoding:"),
  ------------------
  |  | 1301|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  442|      0|                               STRCONST("chunked"))) {
  ------------------
  |  | 1301|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  443|      0|      infof(data, "CONNECT responded chunked");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  444|      0|      ts->chunked_encoding = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  445|       |      /* reset our chunky engine */
  446|      0|      Curl_httpchunk_reset(data, &ts->ch, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  447|      0|    }
  448|      0|  }
  449|  1.20k|  else if(Curl_compareheader(header,
  ------------------
  |  Branch (449:11): [True: 0, False: 1.20k]
  ------------------
  450|  1.20k|                             STRCONST("Proxy-Connection:"),
  ------------------
  |  | 1301|  1.20k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.20k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  451|  1.20k|                             STRCONST("close")))
  ------------------
  |  | 1301|  1.20k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.20k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  452|      0|    ts->close_connection = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  453|  1.20k|  else if(!strncmp(header, "HTTP/1.", 7) &&
  ------------------
  |  Branch (453:11): [True: 41, False: 1.16k]
  ------------------
  454|     41|          ((header[7] == '0') || (header[7] == '1')) &&
  ------------------
  |  Branch (454:12): [True: 25, False: 16]
  |  Branch (454:34): [True: 5, False: 11]
  ------------------
  455|     30|          (header[8] == ' ') &&
  ------------------
  |  Branch (455:11): [True: 27, False: 3]
  ------------------
  456|     27|          ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   42|  1.23k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 26, False: 1]
  |  |  |  Branch (42:38): [True: 25, False: 1]
  |  |  ------------------
  ------------------
                        ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   42|  1.23k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 24, False: 1]
  |  |  |  Branch (42:38): [True: 23, False: 1]
  |  |  ------------------
  ------------------
                        ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   42|  1.23k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 22, False: 1]
  |  |  |  Branch (42:38): [True: 21, False: 1]
  |  |  ------------------
  ------------------
  457|     21|          !ISDIGIT(header[12])) {
  ------------------
  |  |   42|     21|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 4, False: 17]
  |  |  |  Branch (42:38): [True: 1, False: 3]
  |  |  ------------------
  ------------------
  458|       |    /* store the HTTP code from the proxy */
  459|     20|    data->info.httpproxycode = k->httpcode = ((header[9] - '0') * 100) +
  460|     20|      ((header[10] - '0') * 10) + (header[11] - '0');
  461|     20|  }
  462|  1.20k|  return result;
  463|  1.20k|}
cf-h1-proxy.c:tunnel_is_established:
   84|  2.07k|{
   85|  2.07k|  return ts && (ts->tunnel_state == H1_TUNNEL_ESTABLISHED);
  ------------------
  |  Branch (85:10): [True: 2.07k, False: 0]
  |  Branch (85:16): [True: 5, False: 2.06k]
  ------------------
   86|  2.07k|}
cf-h1-proxy.c:cf_h1_proxy_adjust_pollset:
  870|    235|{
  871|    235|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  872|    235|  struct h1_tunnel_state *ts = pctx->ts;
  873|    235|  CURLcode result = CURLE_OK;
  874|       |
  875|    235|  if(!cf->connected) {
  ------------------
  |  Branch (875:6): [True: 235, False: 0]
  ------------------
  876|       |    /* If we are not connected, but the filter "below" is
  877|       |     * and not waiting on something, we are tunneling. */
  878|    235|    curl_socket_t sock = Curl_conn_cf_get_socket(cf, data);
  879|    235|    if(ts) {
  ------------------
  |  Branch (879:8): [True: 235, False: 0]
  ------------------
  880|       |      /* when we have sent a CONNECT to a proxy, we should rather either
  881|       |         wait for the socket to become readable to be able to get the
  882|       |         response headers or if we are still sending the request, wait
  883|       |         for write. */
  884|    235|      if(tunnel_want_send(ts))
  ------------------
  |  Branch (884:10): [True: 0, False: 235]
  ------------------
  885|      0|        result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  172|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  886|    235|      else
  887|    235|        result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  170|    235|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|    235|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|    235|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
  888|    235|    }
  889|      0|    else
  890|      0|      result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  172|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  891|    235|  }
  892|      0|  else {
  893|      0|    if(cf->next)
  ------------------
  |  Branch (893:8): [True: 0, False: 0]
  ------------------
  894|      0|      result = cf->next->cft->adjust_pollset(cf->next, data, ps);
  895|      0|  }
  896|    235|  return result;
  897|    235|}
cf-h1-proxy.c:tunnel_want_send:
  227|    235|{
  228|    235|  return ts->tunnel_state == H1_TUNNEL_CONNECT;
  229|    235|}
cf-h1-proxy.c:cf_h1_proxy_query:
  916|  3.65k|{
  917|  3.65k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  918|  3.65k|  struct h1_tunnel_state *ts = pctx ? pctx->ts : NULL;
  ------------------
  |  Branch (918:32): [True: 3.65k, False: 0]
  ------------------
  919|  3.65k|  switch(query) {
  920|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  173|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (920:3): [True: 0, False: 3.65k]
  ------------------
  921|      0|    if(!ts || !ts->dest)
  ------------------
  |  Branch (921:8): [True: 0, False: 0]
  |  Branch (921:15): [True: 0, False: 0]
  ------------------
  922|      0|      break;
  923|      0|    *pres1 = (int)ts->dest->port;
  924|      0|    *((const char **)pres2) = ts->dest->hostname;
  925|      0|    return CURLE_OK;
  926|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  177|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (926:3): [True: 0, False: 3.65k]
  ------------------
  927|      0|    const char **palpn = pres2;
  928|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (928:5): [True: 0, False: 0]
  |  Branch (928:5): [True: 0, False: 0]
  ------------------
  929|      0|    *palpn = NULL;
  930|      0|    return CURLE_OK;
  931|      0|  }
  932|  3.65k|  default:
  ------------------
  |  Branch (932:3): [True: 3.65k, False: 0]
  ------------------
  933|  3.65k|    break;
  934|  3.65k|  }
  935|  3.65k|  return cf->next ?
  ------------------
  |  Branch (935:10): [True: 3.65k, False: 0]
  ------------------
  936|  3.65k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  937|  3.65k|    CURLE_UNKNOWN_OPTION;
  938|  3.65k|}
cf-h1-proxy.c:tunnel_free:
  202|  3.20k|{
  203|  3.20k|  if(ts) {
  ------------------
  |  Branch (203:6): [True: 1.60k, False: 1.60k]
  ------------------
  204|  1.60k|    Curl_peer_unlink(&ts->dest);
  205|  1.60k|    curlx_dyn_free(&ts->rcvbuf);
  206|  1.60k|    curlx_dyn_free(&ts->request_data);
  207|  1.60k|    Curl_httpchunk_free(data, &ts->ch);
  208|  1.60k|    curlx_free(ts);
  ------------------
  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  209|  1.60k|  }
  210|  3.20k|}

Curl_cf_haproxy_insert_after:
  228|     10|{
  229|     10|  struct Curl_cfilter *cf;
  230|     10|  CURLcode result;
  231|       |
  232|     10|  result = cf_haproxy_create(&cf, data);
  233|     10|  if(result)
  ------------------
  |  Branch (233:6): [True: 0, False: 10]
  ------------------
  234|      0|    goto out;
  235|     10|  Curl_conn_cf_insert_after(cf_at, cf);
  236|       |
  237|     10|out:
  238|     10|  return result;
  239|     10|}
cf-haproxy.c:cf_haproxy_destroy:
  164|     10|{
  165|     10|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|     10|  do {                                          \
  |  |  154|     10|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     10|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     20|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 10, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     20|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     10|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     10|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     10|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10]
  |  |  ------------------
  ------------------
  166|     10|  cf_haproxy_ctx_free(cf->ctx);
  167|     10|}
cf-haproxy.c:cf_haproxy_ctx_free:
   49|     20|{
   50|     20|  if(ctx) {
  ------------------
  |  Branch (50:6): [True: 10, False: 10]
  ------------------
   51|     10|    curlx_dyn_free(&ctx->data_out);
   52|     10|    curlx_free(ctx);
  ------------------
  |  | 1478|     10|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   53|     10|  }
   54|     20|}
cf-haproxy.c:cf_haproxy_connect:
  108|     10|{
  109|     10|  struct cf_haproxy_ctx *ctx = cf->ctx;
  110|     10|  CURLcode result;
  111|     10|  size_t len;
  112|       |
  113|     10|  DEBUGASSERT(ctx);
  ------------------
  |  | 1079|     10|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 10]
  |  Branch (113:3): [True: 10, False: 0]
  ------------------
  114|     10|  if(cf->connected) {
  ------------------
  |  Branch (114:6): [True: 0, False: 10]
  ------------------
  115|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  116|      0|    return CURLE_OK;
  117|      0|  }
  118|       |
  119|     10|  result = cf->next->cft->do_connect(cf->next, data, done);
  120|     10|  if(result || !*done)
  ------------------
  |  Branch (120:6): [True: 0, False: 10]
  |  Branch (120:16): [True: 0, False: 10]
  ------------------
  121|      0|    return result;
  122|       |
  123|     10|  switch(ctx->state) {
  124|     10|  case HAPROXY_INIT:
  ------------------
  |  Branch (124:3): [True: 10, False: 0]
  ------------------
  125|     10|    result = cf_haproxy_date_out_set(cf, data);
  126|     10|    if(result)
  ------------------
  |  Branch (126:8): [True: 1, False: 9]
  ------------------
  127|      1|      goto out;
  128|      9|    ctx->state = HAPROXY_SEND;
  129|      9|    FALLTHROUGH();
  ------------------
  |  |  823|      9|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  130|      9|  case HAPROXY_SEND:
  ------------------
  |  Branch (130:3): [True: 0, False: 10]
  ------------------
  131|      9|    len = curlx_dyn_len(&ctx->data_out);
  132|      9|    if(len > 0) {
  ------------------
  |  Branch (132:8): [True: 9, False: 0]
  ------------------
  133|      9|      size_t nwritten;
  134|      9|      result = Curl_conn_cf_send(cf->next, data,
  135|      9|                                 curlx_dyn_uptr(&ctx->data_out), len, FALSE,
  ------------------
  |  | 1056|      9|#define FALSE false
  ------------------
  136|      9|                                 &nwritten);
  137|      9|      if(result) {
  ------------------
  |  Branch (137:10): [True: 0, False: 9]
  ------------------
  138|      0|        if(result != CURLE_AGAIN)
  ------------------
  |  Branch (138:12): [True: 0, False: 0]
  ------------------
  139|      0|          goto out;
  140|      0|        result = CURLE_OK;
  141|      0|        nwritten = 0;
  142|      0|      }
  143|      9|      curlx_dyn_tail(&ctx->data_out, len - nwritten);
  144|      9|      if(curlx_dyn_len(&ctx->data_out) > 0) {
  ------------------
  |  Branch (144:10): [True: 0, False: 9]
  ------------------
  145|      0|        result = CURLE_OK;
  146|      0|        goto out;
  147|      0|      }
  148|      9|    }
  149|      9|    ctx->state = HAPROXY_DONE;
  150|      9|    FALLTHROUGH();
  ------------------
  |  |  823|      9|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  151|      9|  default:
  ------------------
  |  Branch (151:3): [True: 0, False: 10]
  ------------------
  152|      9|    curlx_dyn_free(&ctx->data_out);
  153|      9|    break;
  154|     10|  }
  155|       |
  156|     10|out:
  157|     10|  *done = (!result) && (ctx->state == HAPROXY_DONE);
  ------------------
  |  Branch (157:11): [True: 9, False: 1]
  |  Branch (157:24): [True: 9, False: 0]
  ------------------
  158|     10|  cf->connected = *done;
  159|     10|  return result;
  160|     10|}
cf-haproxy.c:cf_haproxy_date_out_set:
   58|     10|{
   59|       |  /* We fake a client connection report to the upstream server
   60|       |   * with the HAProxy protocol, reporting the client's source
   61|       |   * and destination IP addresses and ports.
   62|       |   * addresses: either the ones used to talk to the upstream
   63|       |   *            OR the value supplied by the user
   64|       |   * ports: the ports used in the upstream connection */
   65|     10|  const char *client_source_ip;
   66|     10|  const char *client_dest_ip;
   67|     10|  struct cf_haproxy_ctx *ctx = cf->ctx;
   68|     10|  CURLcode result;
   69|     10|  struct ip_quadruple ipquad;
   70|     10|  bool is_ipv6;
   71|       |
   72|     10|  DEBUGASSERT(ctx);
  ------------------
  |  | 1079|     10|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (72:3): [True: 0, False: 10]
  |  Branch (72:3): [True: 10, False: 0]
  ------------------
   73|     10|  DEBUGASSERT(ctx->state == HAPROXY_INIT);
  ------------------
  |  | 1079|     10|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (73:3): [True: 0, False: 10]
  |  Branch (73:3): [True: 10, False: 0]
  ------------------
   74|     10|#ifdef USE_UNIX_SOCKETS
   75|     10|  if(Curl_conn_get_first_peer(cf->conn, cf->sockindex)->unix_socket)
  ------------------
  |  Branch (75:6): [True: 1, False: 9]
  ------------------
   76|       |    /* the buffer is large enough to hold this! */
   77|      1|    result = curlx_dyn_addn(&ctx->data_out, STRCONST("PROXY UNKNOWN\r\n"));
  ------------------
  |  | 1301|      1|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|      1|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
   78|      9|  else {
   79|      9|#endif /* USE_UNIX_SOCKETS */
   80|      9|  result = Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad);
   81|      9|  if(result)
  ------------------
  |  Branch (81:6): [True: 0, False: 9]
  ------------------
   82|      0|    return result;
   83|       |
   84|      9|  if(data->set.str[STRING_HAPROXY_CLIENT_IP]) {
  ------------------
  |  Branch (84:6): [True: 8, False: 1]
  ------------------
   85|      8|    client_source_ip = data->set.str[STRING_HAPROXY_CLIENT_IP];
   86|      8|    client_dest_ip = client_source_ip;
   87|      8|    is_ipv6 = !Curl_is_ipv4addr(client_source_ip);
   88|      8|  }
   89|      1|  else {
   90|      1|    client_source_ip = ipquad.local_ip;
   91|      1|    client_dest_ip = ipquad.remote_ip;
   92|      1|  }
   93|       |
   94|      9|  result = curlx_dyn_addf(&ctx->data_out, "PROXY %s %s %s %d %d\r\n",
   95|      9|                          is_ipv6 ? "TCP6" : "TCP4",
  ------------------
  |  Branch (95:27): [True: 8, False: 1]
  ------------------
   96|      9|                          client_source_ip, client_dest_ip,
   97|      9|                          ipquad.local_port, ipquad.remote_port);
   98|       |
   99|      9|#ifdef USE_UNIX_SOCKETS
  100|      9|  }
  101|     10|#endif /* USE_UNIX_SOCKETS */
  102|     10|  return result;
  103|     10|}
cf-haproxy.c:cf_haproxy_adjust_pollset:
  172|      1|{
  173|      1|  if(cf->next->connected && !cf->connected) {
  ------------------
  |  Branch (173:6): [True: 1, False: 0]
  |  Branch (173:29): [True: 0, False: 1]
  ------------------
  174|       |    /* If we are not connected, but the filter "below" is
  175|       |     * and not waiting on something, we are sending. */
  176|      0|    return Curl_pollset_set_out_only(
  ------------------
  |  |  172|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  177|      0|      data, ps, Curl_conn_cf_get_socket(cf, data));
  178|      0|  }
  179|      1|  return CURLE_OK;
  180|      1|}
cf-haproxy.c:cf_haproxy_create:
  201|     10|{
  202|     10|  struct Curl_cfilter *cf = NULL;
  203|     10|  struct cf_haproxy_ctx *ctx;
  204|     10|  CURLcode result;
  205|       |
  206|     10|  (void)data;
  207|     10|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|     10|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  208|     10|  if(!ctx) {
  ------------------
  |  Branch (208:6): [True: 0, False: 10]
  ------------------
  209|      0|    result = CURLE_OUT_OF_MEMORY;
  210|      0|    goto out;
  211|      0|  }
  212|     10|  ctx->state = HAPROXY_INIT;
  213|     10|  curlx_dyn_init(&ctx->data_out, DYN_HAXPROXY);
  ------------------
  |  |   68|     10|#define DYN_HAXPROXY        2048
  ------------------
  214|       |
  215|     10|  result = Curl_cf_create(&cf, &Curl_cft_haproxy, ctx);
  216|     10|  if(result)
  ------------------
  |  Branch (216:6): [True: 0, False: 10]
  ------------------
  217|      0|    goto out;
  218|     10|  ctx = NULL;
  219|       |
  220|     10|out:
  221|     10|  cf_haproxy_ctx_free(ctx);
  222|     10|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (222:10): [True: 0, False: 10]
  ------------------
  223|     10|  return result;
  224|     10|}

Curl_cf_https_setup:
  813|  6.24k|{
  814|  6.24k|  CURLcode result = CURLE_OK;
  815|       |
  816|  6.24k|  DEBUGASSERT(conn->scheme->protocol == CURLPROTO_HTTPS);
  ------------------
  |  | 1079|  6.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (816:3): [True: 0, False: 6.24k]
  |  Branch (816:3): [True: 6.24k, False: 0]
  ------------------
  817|       |
  818|       |  /* This filter is intended for HTTPS using ALPN and does
  819|       |   * not support HTTPS Eyeballing to a proxy. */
  820|  6.24k|  if((conn->scheme->protocol != CURLPROTO_HTTPS) ||
  ------------------
  |  | 1087|  6.24k|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (820:6): [True: 0, False: 6.24k]
  ------------------
  821|  6.24k|#ifndef CURL_DISABLE_PROXY
  822|  6.24k|     conn->bits.origin_is_proxy ||
  ------------------
  |  Branch (822:6): [True: 0, False: 6.24k]
  ------------------
  823|  6.24k|#endif
  824|  6.24k|     !conn->bits.tls_enable_alpn)
  ------------------
  |  Branch (824:6): [True: 51, False: 6.19k]
  ------------------
  825|     51|    goto out;
  826|       |
  827|  6.19k|  result = cf_hc_add(data, destination, conn, sockindex,
  828|  6.19k|                     conn->transport_wanted);
  829|       |
  830|  6.24k|out:
  831|  6.24k|  return result;
  832|  6.19k|}
cf-https-connect.c:cf_hc_destroy:
  732|  6.19k|{
  733|  6.19k|  struct cf_hc_ctx *ctx = cf->ctx;
  734|       |
  735|  6.19k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  6.19k|  do {                                          \
  |  |  154|  6.19k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  6.19k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  12.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 6.19k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  12.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  6.19k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  6.19k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  6.19k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6.19k]
  |  |  ------------------
  ------------------
  736|  6.19k|  cf_hc_ctx_destroy(data, ctx);
  737|  6.19k|}
cf-https-connect.c:cf_hc_ctx_destroy:
  129|  12.3k|{
  130|  12.3k|  if(ctx) {
  ------------------
  |  Branch (130:6): [True: 6.19k, False: 6.19k]
  ------------------
  131|  6.19k|    size_t i;
  132|  11.6k|    for(i = 0; i < ctx->baller_count; ++i)
  ------------------
  |  Branch (132:16): [True: 5.49k, False: 6.19k]
  ------------------
  133|  5.49k|      cf_hc_baller_discard(&ctx->ballers[i], data);
  134|  6.19k|    Curl_peer_unlink(&ctx->destination);
  135|  6.19k|    curlx_free(ctx);
  ------------------
  |  | 1478|  6.19k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  136|  6.19k|  }
  137|  12.3k|}
cf-https-connect.c:cf_hc_baller_discard:
   64|  5.49k|{
   65|  5.49k|  if(b->cf) {
  ------------------
  |  Branch (65:6): [True: 5.49k, False: 0]
  ------------------
   66|  5.49k|    Curl_conn_cf_discard_chain(&b->cf, data);
   67|       |    b->cf = NULL;
   68|  5.49k|  }
   69|  5.49k|}
cf-https-connect.c:cf_hc_connect:
  479|  6.37k|{
  480|  6.37k|  struct cf_hc_ctx *ctx = cf->ctx;
  481|  6.37k|  CURLcode result = CURLE_OK;
  482|       |
  483|  6.37k|  if(cf->connected) {
  ------------------
  |  Branch (483:6): [True: 0, False: 6.37k]
  ------------------
  484|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  485|      0|    return CURLE_OK;
  486|      0|  }
  487|       |
  488|  6.37k|  *done = FALSE;
  ------------------
  |  | 1056|  6.37k|#define FALSE false
  ------------------
  489|       |
  490|  6.37k|  if(!ctx->httpsrr_resolved) {
  ------------------
  |  Branch (490:6): [True: 5.49k, False: 879]
  ------------------
  491|  5.49k|    ctx->httpsrr_resolved = Curl_conn_dns_resolved_https(
  ------------------
  |  |   66|  5.49k|#define Curl_conn_dns_resolved_https(a, b, c)   TRUE
  |  |  ------------------
  |  |  |  | 1053|  5.49k|#define TRUE true
  |  |  ------------------
  ------------------
  492|  5.49k|      data, cf->sockindex, ctx->destination);
  493|  5.49k|#ifdef DEBUGBUILD
  494|  5.49k|    if(!ctx->httpsrr_resolved && getenv("CURL_DBG_AWAIT_HTTPSRR")) {
  ------------------
  |  Branch (494:8): [True: 0, False: 5.49k]
  |  Branch (494:34): [True: 0, False: 0]
  ------------------
  495|      0|      CURL_TRC_CF(data, cf, "awaiting HTTPS-RR");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  496|      0|      return CURLE_OK;
  497|      0|    }
  498|  5.49k|#endif
  499|  5.49k|  }
  500|       |
  501|  6.37k|  switch(ctx->state) {
  ------------------
  |  Branch (501:10): [True: 6.37k, False: 0]
  ------------------
  502|  5.49k|  case CF_HC_RESOLV:
  ------------------
  |  Branch (502:3): [True: 5.49k, False: 879]
  ------------------
  503|  5.49k|    ctx->state = CF_HC_INIT;
  504|  5.49k|    FALLTHROUGH();
  ------------------
  |  |  823|  5.49k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  505|       |
  506|  5.49k|  case CF_HC_INIT:
  ------------------
  |  Branch (506:3): [True: 0, False: 6.37k]
  ------------------
  507|  5.49k|    DEBUGASSERT(!cf->next);
  ------------------
  |  | 1079|  5.49k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (507:5): [True: 0, False: 5.49k]
  |  Branch (507:5): [True: 5.49k, False: 0]
  ------------------
  508|  5.49k|    CURL_TRC_CF(data, cf, "connect, init");
  ------------------
  |  |  153|  5.49k|  do {                                          \
  |  |  154|  5.49k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.49k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  10.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.49k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  10.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.49k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.49k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.49k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.49k]
  |  |  ------------------
  ------------------
  509|  5.49k|    result = cf_hc_set_baller1(cf, data);
  510|  5.49k|    if(result) {
  ------------------
  |  Branch (510:8): [True: 0, False: 5.49k]
  ------------------
  511|      0|      ctx->result = result;
  512|      0|      ctx->state = CF_HC_FAILURE;
  513|      0|      goto out;
  514|      0|    }
  515|  5.49k|    cf_hc_set_baller2(cf, data);
  516|  5.49k|    ctx->started = *Curl_pgrs_now(data);
  517|  5.49k|    cf_hc_baller_init(&ctx->ballers[0], cf, data);
  518|  5.49k|    if((ctx->baller_count > 1) || !ctx->ballers_complete) {
  ------------------
  |  Branch (518:8): [True: 0, False: 5.49k]
  |  Branch (518:35): [True: 0, False: 5.49k]
  ------------------
  519|      0|      Curl_expire(data, ctx->soft_eyeballs_timeout_ms, EXPIRE_ALPN_EYEBALLS);
  520|      0|    }
  521|  5.49k|    ctx->state = CF_HC_CONNECT;
  522|  5.49k|    FALLTHROUGH();
  ------------------
  |  |  823|  5.49k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  523|       |
  524|  6.37k|  case CF_HC_CONNECT:
  ------------------
  |  Branch (524:3): [True: 879, False: 5.49k]
  ------------------
  525|  6.37k|    if(!ctx->ballers_complete)
  ------------------
  |  Branch (525:8): [True: 0, False: 6.37k]
  ------------------
  526|      0|      cf_hc_set_baller2(cf, data);
  527|       |
  528|  6.37k|    if(cf_hc_baller_is_connecting(&ctx->ballers[0])) {
  ------------------
  |  Branch (528:8): [True: 6.37k, False: 0]
  ------------------
  529|  6.37k|      result = cf_hc_baller_connect(&ctx->ballers[0], cf, data, done);
  530|  6.37k|      if(!result && *done) {
  ------------------
  |  Branch (530:10): [True: 983, False: 5.39k]
  |  Branch (530:21): [True: 0, False: 983]
  ------------------
  531|      0|        result = baller_connected(cf, data, &ctx->ballers[0]);
  532|      0|        goto out;
  533|      0|      }
  534|  6.37k|    }
  535|       |
  536|  6.37k|    if(time_to_start_baller2(cf, data)) {
  ------------------
  |  Branch (536:8): [True: 0, False: 6.37k]
  ------------------
  537|      0|      cf_hc_baller_init(&ctx->ballers[1], cf, data);
  538|      0|    }
  539|       |
  540|  6.37k|    if(cf_hc_baller_is_connecting(&ctx->ballers[1])) {
  ------------------
  |  Branch (540:8): [True: 0, False: 6.37k]
  ------------------
  541|      0|      result = cf_hc_baller_connect(&ctx->ballers[1], cf, data, done);
  542|      0|      if(!result && *done) {
  ------------------
  |  Branch (542:10): [True: 0, False: 0]
  |  Branch (542:21): [True: 0, False: 0]
  ------------------
  543|      0|        result = baller_connected(cf, data, &ctx->ballers[1]);
  544|      0|        goto out;
  545|      0|      }
  546|      0|    }
  547|       |
  548|  6.37k|    if(ctx->ballers[0].result &&
  ------------------
  |  Branch (548:8): [True: 5.39k, False: 983]
  ------------------
  549|  5.39k|       (ctx->ballers[1].result ||
  ------------------
  |  Branch (549:9): [True: 0, False: 5.39k]
  ------------------
  550|  5.39k|        (ctx->ballers_complete && (ctx->baller_count < 2)))) {
  ------------------
  |  Branch (550:10): [True: 5.39k, False: 0]
  |  Branch (550:35): [True: 5.39k, False: 0]
  ------------------
  551|       |      /* all have failed. we give up */
  552|  5.39k|      CURL_TRC_CF(data, cf, "connect, all attempts failed");
  ------------------
  |  |  153|  5.39k|  do {                                          \
  |  |  154|  5.39k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.39k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  10.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.39k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  10.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.39k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.39k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.39k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.39k]
  |  |  ------------------
  ------------------
  553|  5.39k|      ctx->result = result = ctx->ballers[0].result;
  554|  5.39k|      ctx->state = CF_HC_FAILURE;
  555|  5.39k|      goto out;
  556|  5.39k|    }
  557|    983|    result = CURLE_OK;
  558|    983|    *done = FALSE;
  ------------------
  |  | 1056|    983|#define FALSE false
  ------------------
  559|    983|    break;
  560|       |
  561|      0|  case CF_HC_FAILURE:
  ------------------
  |  Branch (561:3): [True: 0, False: 6.37k]
  ------------------
  562|      0|    result = ctx->result;
  563|      0|    cf->connected = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  564|      0|    *done = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  565|      0|    break;
  566|       |
  567|      0|  case CF_HC_SUCCESS:
  ------------------
  |  Branch (567:3): [True: 0, False: 6.37k]
  ------------------
  568|      0|    result = CURLE_OK;
  569|      0|    cf->connected = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  570|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  571|      0|    break;
  572|  6.37k|  }
  573|       |
  574|  6.37k|out:
  575|  6.37k|  CURL_TRC_CF(data, cf, "connect -> %d, done=%d", (int)result, *done);
  ------------------
  |  |  153|  6.37k|  do {                                          \
  |  |  154|  6.37k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  6.37k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  12.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 6.37k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.37k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  12.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  6.37k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  6.37k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  6.37k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6.37k]
  |  |  ------------------
  ------------------
  576|  6.37k|  return result;
  577|  6.37k|}
cf-https-connect.c:cf_hc_set_baller1:
  389|  5.49k|{
  390|  5.49k|  struct cf_hc_ctx *ctx = cf->ctx;
  391|  5.49k|  enum alpnid alpn1 = ALPN_none;
  392|  5.49k|  VERBOSE(const char *source = "HTTPS-RR");
  ------------------
  |  | 1613|  5.49k|#define VERBOSE(x) x
  ------------------
  393|       |
  394|  5.49k|  DEBUGASSERT(cf->conn->bits.tls_enable_alpn);
  ------------------
  |  | 1079|  5.49k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (394:3): [True: 0, False: 5.49k]
  |  Branch (394:3): [True: 5.49k, False: 0]
  ------------------
  395|       |
  396|  5.49k|  alpn1 = cf_hc_get_httpsrr_alpn(cf, data, ALPN_none);
  397|  5.49k|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (397:6): [True: 5.49k, False: 0]
  ------------------
  398|       |    /* preference is configured and allowed, can we use it? */
  399|  5.49k|    VERBOSE(source = "preferred version");
  ------------------
  |  | 1613|  5.49k|#define VERBOSE(x) x
  ------------------
  400|  5.49k|    alpn1 = cf_hc_get_pref_alpn(cf, data, ALPN_none);
  401|  5.49k|  }
  402|  5.49k|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (402:6): [True: 5.49k, False: 0]
  ------------------
  403|  5.49k|    VERBOSE(source = "wanted versions");
  ------------------
  |  | 1613|  5.49k|#define VERBOSE(x) x
  ------------------
  404|  5.49k|    alpn1 = cf_hc_get_first_alpn(cf, data,
  405|  5.49k|                                 data->state.http_neg.wanted,
  406|  5.49k|                                 ALPN_none);
  407|  5.49k|  }
  408|  5.49k|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (408:6): [True: 0, False: 5.49k]
  ------------------
  409|      0|    VERBOSE(source = "allowed versions");
  ------------------
  |  | 1613|      0|#define VERBOSE(x) x
  ------------------
  410|      0|    alpn1 = cf_hc_get_first_alpn(cf, data,
  411|      0|                                 data->state.http_neg.allowed,
  412|      0|                                 ALPN_none);
  413|      0|  }
  414|       |
  415|  5.49k|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (415:6): [True: 0, False: 5.49k]
  ------------------
  416|       |    /* None of the wanted/allowed HTTP versions could be chosen */
  417|      0|    if(ctx->check_h3_result) {
  ------------------
  |  Branch (417:8): [True: 0, False: 0]
  ------------------
  418|      0|      CURL_TRC_CF(data, cf, "unable to use HTTP/3");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  419|      0|      return ctx->check_h3_result;
  420|      0|    }
  421|      0|    CURL_TRC_CF(data, cf, "unable to select HTTP version");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  422|      0|    return CURLE_FAILED_INIT;
  423|      0|  }
  424|       |
  425|  5.49k|  cf_hc_baller_assign(&ctx->ballers[0], alpn1, ctx->def_transport);
  426|  5.49k|  ctx->baller_count = 1;
  427|  5.49k|  CURL_TRC_CF(data, cf, "1st attempt uses %s from %s",
  ------------------
  |  |  153|  5.49k|  do {                                          \
  |  |  154|  5.49k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.49k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  10.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.49k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  10.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.49k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.49k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.49k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.49k]
  |  |  ------------------
  ------------------
  428|  5.49k|              ctx->ballers[0].name, source);
  429|       |
  430|  5.49k|  switch(alpn1) {
  431|      4|  case ALPN_h1:
  ------------------
  |  Branch (431:3): [True: 4, False: 5.49k]
  ------------------
  432|       |    /* We really want h1, switch off h2 to make it disappear in ALPN */
  433|      4|    data->state.http_neg.wanted &= (uint8_t)~CURL_HTTP_V2x;
  ------------------
  |  |   41|      4|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  434|      4|    break;
  435|  5.49k|  default:
  ------------------
  |  Branch (435:3): [True: 5.49k, False: 4]
  ------------------
  436|  5.49k|    break;
  437|  5.49k|  }
  438|       |
  439|  5.49k|  return CURLE_OK;
  440|  5.49k|}
cf-https-connect.c:cf_hc_get_httpsrr_alpn:
  290|  10.9k|{
  291|       |#ifdef USE_HTTPSRR
  292|       |  struct cf_hc_ctx *ctx = cf->ctx;
  293|       |  /* Is there an HTTPSRR use its ALPNs here.
  294|       |   * We are here after having selected a connection to a host+port and
  295|       |   * can no longer change that. Any HTTPSRR advice for other hosts and ports
  296|       |   * we need to ignore. */
  297|       |  const struct Curl_https_rrinfo *rr;
  298|       |  size_t i;
  299|       |
  300|       |  /* Do we have HTTPS-RR information? */
  301|       |  rr = Curl_conn_dns_get_https(data, cf->sockindex, ctx->destination);
  302|       |
  303|       |  CURL_TRC_CF(data, cf, "HTTPS-RR %savailable", rr ? "" : "not ");
  304|       |  /* We do not support `rr->no_def_alpn`. */
  305|       |  if(Curl_httpsrr_applicable(data, rr) && !rr->no_def_alpn) {
  306|       |    for(i = 0; i < CURL_ARRAYSIZE(rr->alpns); ++i) {
  307|       |      enum alpnid alpn_rr = (enum alpnid)rr->alpns[i];
  308|       |      if(alpn_rr == not_this_one) /* do not want this one */
  309|       |        continue;
  310|       |      switch(alpn_rr) {
  311|       |      case ALPN_h3:
  312|       |        if((data->state.http_neg.allowed & CURL_HTTP_V3x) &&
  313|       |           cf_hc_may_h3(cf, data)) {
  314|       |          return alpn_rr;
  315|       |        }
  316|       |        break;
  317|       |      case ALPN_h2:
  318|       |        if(data->state.http_neg.allowed & CURL_HTTP_V2x) {
  319|       |          return alpn_rr;
  320|       |        }
  321|       |        break;
  322|       |      case ALPN_h1:
  323|       |        if(data->state.http_neg.allowed & CURL_HTTP_V1x) {
  324|       |          return alpn_rr;
  325|       |        }
  326|       |        break;
  327|       |      default: /* ignore */
  328|       |        break;
  329|       |      }
  330|       |    }
  331|       |  }
  332|       |#else
  333|  10.9k|  (void)cf;
  334|  10.9k|  (void)data;
  335|  10.9k|  (void)not_this_one;
  336|  10.9k|#endif
  337|  10.9k|  return ALPN_none;
  338|  10.9k|}
cf-https-connect.c:cf_hc_get_pref_alpn:
  343|  10.9k|{
  344|  10.9k|  if((data->state.http_neg.preferred & data->state.http_neg.allowed)) {
  ------------------
  |  Branch (344:6): [True: 0, False: 10.9k]
  ------------------
  345|      0|    switch(data->state.http_neg.preferred) {
  346|      0|    case CURL_HTTP_V3x:
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (346:5): [True: 0, False: 0]
  ------------------
  347|      0|      if(cf_hc_may_h3(cf, data) && (ALPN_h3 != not_this_one))
  ------------------
  |  Branch (347:10): [True: 0, False: 0]
  |  Branch (347:36): [True: 0, False: 0]
  ------------------
  348|      0|        return ALPN_h3;
  349|      0|      break;
  350|      0|    case CURL_HTTP_V2x:
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (350:5): [True: 0, False: 0]
  ------------------
  351|      0|      if(ALPN_h2 != not_this_one)
  ------------------
  |  Branch (351:10): [True: 0, False: 0]
  ------------------
  352|      0|        return ALPN_h2;
  353|      0|      break;
  354|      0|    case CURL_HTTP_V1x:
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (354:5): [True: 0, False: 0]
  ------------------
  355|       |      /* If we are trying h2 already, h1 is already used as fallback */
  356|      0|      if((ALPN_h1 != not_this_one) && (ALPN_h2 != not_this_one))
  ------------------
  |  Branch (356:10): [True: 0, False: 0]
  |  Branch (356:39): [True: 0, False: 0]
  ------------------
  357|      0|        return ALPN_h1;
  358|      0|      break;
  359|      0|    default:
  ------------------
  |  Branch (359:5): [True: 0, False: 0]
  ------------------
  360|      0|      break;
  361|      0|    }
  362|      0|  }
  363|  10.9k|  return ALPN_none;
  364|  10.9k|}
cf-https-connect.c:cf_hc_get_first_alpn:
  370|  10.9k|{
  371|       |  /* When told to not try h2, we also do not try h1 and vice versa */
  372|  10.9k|  bool allow_h1_or_h2 = (not_this_one != ALPN_h1) &&
  ------------------
  |  Branch (372:25): [True: 10.9k, False: 4]
  ------------------
  373|  10.9k|                        (not_this_one != ALPN_h2);
  ------------------
  |  Branch (373:25): [True: 5.49k, False: 5.49k]
  ------------------
  374|  10.9k|  if((ALPN_h3 != not_this_one) && (choices & CURL_HTTP_V3x) &&
  ------------------
  |  |   42|  10.9k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (374:6): [True: 10.9k, False: 0]
  |  Branch (374:35): [True: 0, False: 10.9k]
  ------------------
  375|      0|     cf_hc_may_h3(cf, data)) {
  ------------------
  |  Branch (375:6): [True: 0, False: 0]
  ------------------
  376|      0|    return ALPN_h3;
  377|      0|  }
  378|  10.9k|  if(allow_h1_or_h2 && (choices & CURL_HTTP_V2x)) {
  ------------------
  |  |   41|  5.49k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (378:6): [True: 5.49k, False: 5.49k]
  |  Branch (378:24): [True: 5.49k, False: 4]
  ------------------
  379|  5.49k|    return ALPN_h2;
  380|  5.49k|  }
  381|  5.50k|  if(allow_h1_or_h2 && (choices & CURL_HTTP_V1x)) {
  ------------------
  |  |   40|      4|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (381:6): [True: 4, False: 5.49k]
  |  Branch (381:24): [True: 4, False: 0]
  ------------------
  382|      4|    return ALPN_h1;
  383|      4|  }
  384|  5.49k|  return ALPN_none;
  385|  5.50k|}
cf-https-connect.c:cf_hc_baller_assign:
  142|  5.49k|{
  143|  5.49k|  b->alpn_id = alpn_id;
  144|  5.49k|  b->transport = def_transport;
  145|  5.49k|  b->cf = NULL;
  146|  5.49k|  b->result = CURLE_OK;
  147|  5.49k|  b->reply_ms = -1;
  148|  5.49k|  b->shutdown = FALSE;
  ------------------
  |  | 1056|  5.49k|#define FALSE false
  ------------------
  149|  5.49k|  switch(b->alpn_id) {
  150|      0|  case ALPN_h3:
  ------------------
  |  Branch (150:3): [True: 0, False: 5.49k]
  ------------------
  151|      0|    b->name = "h3";
  152|      0|    b->transport = TRNSPRT_QUIC;
  ------------------
  |  |  239|      0|#define TRNSPRT_QUIC 5
  ------------------
  153|      0|    break;
  154|  5.49k|  case ALPN_h2:
  ------------------
  |  Branch (154:3): [True: 5.49k, False: 4]
  ------------------
  155|  5.49k|    b->name = "h2";
  156|  5.49k|    break;
  157|      4|  case ALPN_h1:
  ------------------
  |  Branch (157:3): [True: 4, False: 5.49k]
  ------------------
  158|      4|    b->name = "h1";
  159|      4|    break;
  160|      0|  case ALPN_none:
  ------------------
  |  Branch (160:3): [True: 0, False: 5.49k]
  ------------------
  161|      0|    b->name = "no-alpn";
  162|      0|    break;
  163|      0|  default:
  ------------------
  |  Branch (163:3): [True: 0, False: 5.49k]
  ------------------
  164|      0|    b->result = CURLE_FAILED_INIT;
  165|      0|    break;
  166|  5.49k|  }
  167|  5.49k|}
cf-https-connect.c:cf_hc_set_baller2:
  444|  5.49k|{
  445|  5.49k|  struct cf_hc_ctx *ctx = cf->ctx;
  446|  5.49k|  enum alpnid alpn2 = ALPN_none, alpn1 = ctx->ballers[0].alpn_id;
  447|  5.49k|  VERBOSE(const char *source = "HTTPS-RR");
  ------------------
  |  | 1613|  5.49k|#define VERBOSE(x) x
  ------------------
  448|       |
  449|  5.49k|  if(ctx->ballers_complete)
  ------------------
  |  Branch (449:6): [True: 0, False: 5.49k]
  ------------------
  450|      0|    return; /* already done */
  451|  5.49k|  if(!ctx->httpsrr_resolved)
  ------------------
  |  Branch (451:6): [True: 0, False: 5.49k]
  ------------------
  452|      0|    return; /* HTTPS-RR pending */
  453|       |
  454|  5.49k|  alpn2 = cf_hc_get_httpsrr_alpn(cf, data, alpn1);
  455|  5.49k|  if(alpn2 == ALPN_none) {
  ------------------
  |  Branch (455:6): [True: 5.49k, False: 0]
  ------------------
  456|       |    /* preference is configured and allowed, can we use it? */
  457|  5.49k|    VERBOSE(source = "preferred version");
  ------------------
  |  | 1613|  5.49k|#define VERBOSE(x) x
  ------------------
  458|  5.49k|    alpn2 = cf_hc_get_pref_alpn(cf, data, alpn1);
  459|  5.49k|  }
  460|  5.49k|  if(alpn2 == ALPN_none) {
  ------------------
  |  Branch (460:6): [True: 5.49k, False: 0]
  ------------------
  461|  5.49k|    VERBOSE(source = "wanted versions");
  ------------------
  |  | 1613|  5.49k|#define VERBOSE(x) x
  ------------------
  462|  5.49k|    alpn2 = cf_hc_get_first_alpn(cf, data,
  463|  5.49k|                                 data->state.http_neg.wanted,
  464|  5.49k|                                 alpn1);
  465|  5.49k|  }
  466|       |
  467|  5.49k|  if(alpn2 != ALPN_none) {
  ------------------
  |  Branch (467:6): [True: 0, False: 5.49k]
  ------------------
  468|      0|    cf_hc_baller_assign(&ctx->ballers[1], alpn2, ctx->def_transport);
  469|      0|    ctx->baller_count = 2;
  470|      0|    CURL_TRC_CF(data, cf, "2nd attempt uses %s from %s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  471|      0|                ctx->ballers[1].name, source);
  472|      0|  }
  473|       |  ctx->ballers_complete = TRUE;
  ------------------
  |  | 1053|  5.49k|#define TRUE true
  ------------------
  474|  5.49k|}
cf-https-connect.c:cf_hc_baller_init:
  172|  5.49k|{
  173|  5.49k|  struct Curl_cfilter *save = cf->next;
  174|       |
  175|  5.49k|  cf->next = NULL;
  176|  5.49k|  b->started = *Curl_pgrs_now(data);
  177|  5.49k|  b->result = Curl_cf_setup_insert_after(cf, data, b->transport,
  178|  5.49k|                                         CURL_CF_SSL_ENABLE);
  ------------------
  |  |  357|  5.49k|#define CURL_CF_SSL_ENABLE   1
  ------------------
  179|  5.49k|  b->cf = cf->next;
  180|  5.49k|  cf->next = save;
  181|  5.49k|}
cf-https-connect.c:cf_hc_baller_is_connecting:
   72|  13.7k|{
   73|  13.7k|  return b->cf && !b->result;
  ------------------
  |  Branch (73:10): [True: 7.36k, False: 6.37k]
  |  Branch (73:19): [True: 7.36k, False: 0]
  ------------------
   74|  13.7k|}
cf-https-connect.c:cf_hc_baller_connect:
  187|  6.37k|{
  188|  6.37k|  struct Curl_cfilter *save = cf->next;
  189|       |
  190|  6.37k|  cf->next = b->cf;
  191|  6.37k|  b->result = Curl_conn_cf_connect(cf->next, data, done);
  192|  6.37k|  b->cf = cf->next; /* it might mutate */
  193|  6.37k|  cf->next = save;
  194|  6.37k|  return b->result;
  195|  6.37k|}
cf-https-connect.c:time_to_start_baller2:
  242|  6.37k|{
  243|  6.37k|  struct cf_hc_ctx *ctx = cf->ctx;
  244|  6.37k|  timediff_t elapsed_ms;
  245|       |
  246|  6.37k|  if(ctx->baller_count < 2)
  ------------------
  |  Branch (246:6): [True: 6.37k, False: 0]
  ------------------
  247|  6.37k|    return FALSE;
  ------------------
  |  | 1056|  6.37k|#define FALSE false
  ------------------
  248|      0|  else if(cf_hc_baller_has_started(&ctx->ballers[1]))
  ------------------
  |  Branch (248:11): [True: 0, False: 0]
  ------------------
  249|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  250|      0|  else if(ctx->ballers[0].result) {
  ------------------
  |  Branch (250:11): [True: 0, False: 0]
  ------------------
  251|      0|    CURL_TRC_CF(data, cf, "%s baller failed, starting %s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  252|      0|                ctx->ballers[0].name, ctx->ballers[1].name);
  253|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  254|      0|  }
  255|       |
  256|      0|  elapsed_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &ctx->started);
  257|      0|  if(elapsed_ms >= ctx->hard_eyeballs_timeout_ms) {
  ------------------
  |  Branch (257:6): [True: 0, False: 0]
  ------------------
  258|      0|    CURL_TRC_CF(data, cf, "%s inconclusive after %" FMT_TIMEDIFF_T ", "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  259|      0|                "starting %s", ctx->ballers[0].name,
  260|      0|                ctx->hard_eyeballs_timeout_ms, ctx->ballers[1].name);
  261|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  262|      0|  }
  263|      0|  else if(elapsed_ms >= ctx->soft_eyeballs_timeout_ms) {
  ------------------
  |  Branch (263:11): [True: 0, False: 0]
  ------------------
  264|      0|    if(cf_hc_baller_reply_ms(&ctx->ballers[0], data) < 0) {
  ------------------
  |  Branch (264:8): [True: 0, False: 0]
  ------------------
  265|      0|      CURL_TRC_CF(data, cf, "%s has not seen any data after %"
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  266|      0|                  FMT_TIMEDIFF_T "ms, starting %s",
  267|      0|                  ctx->ballers[0].name, ctx->soft_eyeballs_timeout_ms,
  268|      0|                  ctx->ballers[1].name);
  269|      0|      return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  270|      0|    }
  271|      0|  }
  272|      0|  return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  273|      0|}
cf-https-connect.c:cf_hc_adjust_pollset:
  622|  2.15k|{
  623|  2.15k|  CURLcode result = CURLE_OK;
  624|  2.15k|  if(!cf->connected) {
  ------------------
  |  Branch (624:6): [True: 2.15k, False: 0]
  ------------------
  625|  2.15k|    struct cf_hc_ctx *ctx = cf->ctx;
  626|  2.15k|    size_t i;
  627|       |
  628|  3.14k|    for(i = 0; (i < ctx->baller_count) && !result; i++) {
  ------------------
  |  Branch (628:16): [True: 983, False: 2.15k]
  |  Branch (628:43): [True: 983, False: 0]
  ------------------
  629|    983|      struct cf_hc_baller *b = &ctx->ballers[i];
  630|    983|      if(!cf_hc_baller_is_connecting(b))
  ------------------
  |  Branch (630:10): [True: 0, False: 983]
  ------------------
  631|      0|        continue;
  632|    983|      result = Curl_conn_cf_adjust_pollset(b->cf, data, ps);
  633|    983|    }
  634|  2.15k|    CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", (int)result,
  ------------------
  |  |  153|  2.15k|  do {                                          \
  |  |  154|  2.15k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  2.15k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  4.31k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2.15k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.15k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  4.31k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.15k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.15k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.15k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.15k]
  |  |  ------------------
  ------------------
  635|  2.15k|                ps->n);
  636|  2.15k|  }
  637|  2.15k|  return result;
  638|  2.15k|}
cf-https-connect.c:cf_hc_cntrl:
  714|  6.19k|{
  715|  6.19k|  struct cf_hc_ctx *ctx = cf->ctx;
  716|  6.19k|  CURLcode result = CURLE_OK;
  717|  6.19k|  size_t i;
  718|       |
  719|  6.19k|  if(!cf->connected) {
  ------------------
  |  Branch (719:6): [True: 6.19k, False: 0]
  ------------------
  720|  11.6k|    for(i = 0; i < ctx->baller_count; i++) {
  ------------------
  |  Branch (720:16): [True: 5.49k, False: 6.19k]
  ------------------
  721|  5.49k|      result = cf_hc_baller_cntrl(&ctx->ballers[i], data, event, arg1, arg2);
  722|  5.49k|      if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (722:10): [True: 0, False: 5.49k]
  |  Branch (722:20): [True: 0, False: 0]
  ------------------
  723|      0|        goto out;
  724|  5.49k|    }
  725|  6.19k|    result = CURLE_OK;
  726|  6.19k|  }
  727|  6.19k|out:
  728|  6.19k|  return result;
  729|  6.19k|}
cf-https-connect.c:cf_hc_baller_cntrl:
  105|  5.49k|{
  106|  5.49k|  if(b->cf && !b->result)
  ------------------
  |  Branch (106:6): [True: 5.49k, False: 0]
  |  Branch (106:15): [True: 104, False: 5.39k]
  ------------------
  107|    104|    return Curl_conn_cf_cntrl(b->cf, data, FALSE, event, arg1, arg2);
  ------------------
  |  | 1056|    104|#define FALSE false
  ------------------
  108|  5.39k|  return CURLE_OK;
  109|  5.49k|}
cf-https-connect.c:cf_hc_query:
  678|  21.1k|{
  679|  21.1k|  struct cf_hc_ctx *ctx = cf->ctx;
  680|  21.1k|  size_t i;
  681|       |
  682|  21.1k|  if(!cf->connected) {
  ------------------
  |  Branch (682:6): [True: 21.1k, False: 0]
  ------------------
  683|  21.1k|    switch(query) {
  684|  5.59k|    case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  164|  5.59k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (684:5): [True: 5.59k, False: 15.5k]
  ------------------
  685|  5.59k|      struct curltime *when = pres2;
  686|  5.59k|      *when = cf_get_max_baller_time(cf, data, CF_QUERY_TIMER_CONNECT);
  ------------------
  |  |  164|  5.59k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  687|  5.59k|      return CURLE_OK;
  688|      0|    }
  689|  5.59k|    case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  165|  5.59k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (689:5): [True: 5.59k, False: 15.5k]
  ------------------
  690|  5.59k|      struct curltime *when = pres2;
  691|  5.59k|      *when = cf_get_max_baller_time(cf, data, CF_QUERY_TIMER_APPCONNECT);
  ------------------
  |  |  165|  5.59k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  692|  5.59k|      return CURLE_OK;
  693|      0|    }
  694|  7.75k|    case CF_QUERY_NEED_FLUSH: {
  ------------------
  |  |  167|  7.75k|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (694:5): [True: 7.75k, False: 13.3k]
  ------------------
  695|  8.63k|      for(i = 0; i < ctx->baller_count; i++)
  ------------------
  |  Branch (695:18): [True: 882, False: 7.75k]
  ------------------
  696|    882|        if(cf_hc_baller_needs_flush(&ctx->ballers[i], data)) {
  ------------------
  |  Branch (696:12): [True: 0, False: 882]
  ------------------
  697|      0|          *pres1 = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  698|      0|          return CURLE_OK;
  699|      0|        }
  700|  7.75k|      break;
  701|  7.75k|    }
  702|  7.75k|    default:
  ------------------
  |  Branch (702:5): [True: 2.15k, False: 18.9k]
  ------------------
  703|  2.15k|      break;
  704|  21.1k|    }
  705|  21.1k|  }
  706|  9.91k|  return cf->next ?
  ------------------
  |  Branch (706:10): [True: 0, False: 9.91k]
  ------------------
  707|      0|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  708|  9.91k|    CURLE_UNKNOWN_OPTION;
  709|  21.1k|}
cf-https-connect.c:cf_get_max_baller_time:
  658|  11.1k|{
  659|  11.1k|  struct cf_hc_ctx *ctx = cf->ctx;
  660|  11.1k|  struct curltime t, tmax;
  661|  11.1k|  size_t i;
  662|       |
  663|  11.1k|  memset(&tmax, 0, sizeof(tmax));
  664|  21.9k|  for(i = 0; i < ctx->baller_count; i++) {
  ------------------
  |  Branch (664:14): [True: 10.7k, False: 11.1k]
  ------------------
  665|  10.7k|    struct Curl_cfilter *cfb = ctx->ballers[i].cf;
  666|  10.7k|    memset(&t, 0, sizeof(t));
  667|  10.7k|    if(cfb && !cfb->cft->query(cfb, data, query, NULL, &t)) {
  ------------------
  |  Branch (667:8): [True: 10.7k, False: 0]
  |  Branch (667:15): [True: 9.08k, False: 1.70k]
  ------------------
  668|  9.08k|      if((t.tv_sec || t.tv_usec) && curlx_ptimediff_us(&t, &tmax) > 0)
  ------------------
  |  Branch (668:11): [True: 5.16k, False: 3.91k]
  |  Branch (668:23): [True: 0, False: 3.91k]
  |  Branch (668:37): [True: 5.16k, False: 0]
  ------------------
  669|  5.16k|        tmax = t;
  670|  9.08k|    }
  671|  10.7k|  }
  672|  11.1k|  return tmax;
  673|  11.1k|}
cf-https-connect.c:cf_hc_baller_needs_flush:
   98|    882|{
   99|    882|  return b->cf && !b->result && Curl_conn_cf_needs_flush(b->cf, data);
  ------------------
  |  Branch (99:10): [True: 882, False: 0]
  |  Branch (99:19): [True: 882, False: 0]
  |  Branch (99:33): [True: 0, False: 882]
  ------------------
  100|    882|}
cf-https-connect.c:cf_hc_add:
  791|  6.19k|{
  792|  6.19k|  struct Curl_cfilter *cf;
  793|  6.19k|  CURLcode result = CURLE_OK;
  794|       |
  795|  6.19k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  6.19k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (795:3): [True: 0, False: 6.19k]
  |  Branch (795:3): [True: 6.19k, False: 0]
  ------------------
  796|  6.19k|  result = cf_hc_create(&cf, data, destination, def_transport);
  797|  6.19k|  if(result)
  ------------------
  |  Branch (797:6): [True: 0, False: 6.19k]
  ------------------
  798|      0|    goto out;
  799|  6.19k|  Curl_conn_cf_add(data, conn, sockindex, cf);
  800|       |
  801|       |#ifdef USE_HTTPSRR
  802|       |  result = Curl_conn_dns_add_https_resolve(data, cf->conn, cf->sockindex,
  803|       |                                           destination);
  804|       |#endif
  805|  6.19k|out:
  806|  6.19k|  return result;
  807|  6.19k|}
cf-https-connect.c:cf_hc_create:
  760|  6.19k|{
  761|  6.19k|  struct Curl_cfilter *cf = NULL;
  762|  6.19k|  struct cf_hc_ctx *ctx;
  763|  6.19k|  CURLcode result = CURLE_OK;
  764|       |
  765|  6.19k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|  6.19k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  766|  6.19k|  if(!ctx) {
  ------------------
  |  Branch (766:6): [True: 0, False: 6.19k]
  ------------------
  767|      0|    result = CURLE_OUT_OF_MEMORY;
  768|      0|    goto out;
  769|      0|  }
  770|  6.19k|  Curl_peer_link(&ctx->destination, destination);
  771|  6.19k|  ctx->def_transport = def_transport;
  772|  6.19k|  ctx->hard_eyeballs_timeout_ms = data->set.happy_eyeballs_timeout;
  773|  6.19k|  ctx->soft_eyeballs_timeout_ms = data->set.happy_eyeballs_timeout / 2;
  774|       |
  775|  6.19k|  result = Curl_cf_create(&cf, &Curl_cft_http_connect, ctx);
  776|  6.19k|  if(result)
  ------------------
  |  Branch (776:6): [True: 0, False: 6.19k]
  ------------------
  777|      0|    goto out;
  778|  6.19k|  ctx = NULL;
  779|       |
  780|  6.19k|out:
  781|  6.19k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (781:10): [True: 0, False: 6.19k]
  ------------------
  782|  6.19k|  cf_hc_ctx_destroy(data, ctx);
  783|  6.19k|  return result;
  784|  6.19k|}

Curl_cf_ip_happy_insert_after:
 1041|  5.55k|{
 1042|  5.55k|  struct Curl_cfilter *cf;
 1043|  5.55k|  CURLcode result;
 1044|       |
 1045|       |  /* Need to be first */
 1046|  5.55k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1079|  5.55k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1046:3): [True: 0, False: 5.55k]
  |  Branch (1046:3): [True: 5.55k, False: 0]
  ------------------
 1047|  5.55k|  result = cf_ip_happy_create(&cf, data, origin, peer, transport_peer,
 1048|  5.55k|                              cf_at->conn, tunnel_peer, tunnel_transport);
 1049|  5.55k|  if(result)
  ------------------
  |  Branch (1049:6): [True: 0, False: 5.55k]
  ------------------
 1050|      0|    return result;
 1051|       |
 1052|  5.55k|  Curl_conn_cf_insert_after(cf_at, cf);
 1053|  5.55k|  return CURLE_OK;
 1054|  5.55k|}
cf-ip-happy.c:cf_ip_happy_destroy:
  969|  5.55k|{
  970|  5.55k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  971|       |
  972|  5.55k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  5.55k|  do {                                          \
  |  |  154|  5.55k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.55k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.55k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.55k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.55k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.55k]
  |  |  ------------------
  ------------------
  973|  5.55k|  if(ctx) {
  ------------------
  |  Branch (973:6): [True: 5.55k, False: 0]
  ------------------
  974|  5.55k|    cf_ip_happy_ctx_clear(ctx, data);
  975|  5.55k|    cf_ip_happy_ctx_destroy(ctx, data);
  976|  5.55k|  }
  977|  5.55k|}
cf-ip-happy.c:cf_ip_happy_ctx_clear:
  792|  16.3k|{
  793|  16.3k|  DEBUGASSERT(ctx);
  ------------------
  |  | 1079|  16.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (793:3): [True: 0, False: 16.3k]
  |  Branch (793:3): [True: 16.3k, False: 0]
  ------------------
  794|  16.3k|  if(ctx)
  ------------------
  |  Branch (794:6): [True: 16.3k, False: 0]
  ------------------
  795|  16.3k|    cf_ip_ballers_clear(data, &ctx->ballers);
  796|  16.3k|}
cf-ip-happy.c:cf_ip_ballers_clear:
  321|  16.3k|{
  322|  16.6k|  while(bs->running) {
  ------------------
  |  Branch (322:9): [True: 348, False: 16.3k]
  ------------------
  323|    348|    struct cf_ip_attempt *a = bs->running;
  324|    348|    bs->running = a->next;
  325|    348|    cf_ip_attempt_free(a, data);
  326|    348|  }
  327|  16.3k|  cf_ip_attempt_free(bs->winner, data);
  328|       |  bs->winner = NULL;
  329|  16.3k|  Curl_peer_unlink(&bs->origin);
  330|  16.3k|  Curl_peer_unlink(&bs->peer);
  331|  16.3k|  Curl_peer_unlink(&bs->tunnel_peer);
  332|  16.3k|}
cf-ip-happy.c:cf_ip_attempt_free:
  182|  16.6k|{
  183|  16.6k|  if(a) {
  ------------------
  |  Branch (183:6): [True: 5.59k, False: 11.1k]
  ------------------
  184|  5.59k|    if(a->cf)
  ------------------
  |  Branch (184:8): [True: 32, False: 5.56k]
  ------------------
  185|     32|      Curl_conn_cf_discard_chain(&a->cf, data);
  186|  5.59k|    Curl_peer_unlink(&a->origin);
  187|  5.59k|    Curl_peer_unlink(&a->peer);
  188|  5.59k|    Curl_peer_unlink(&a->tunnel_peer);
  189|  5.59k|    curlx_free(a);
  ------------------
  |  | 1478|  5.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  190|  5.59k|  }
  191|  16.6k|}
cf-ip-happy.c:cf_ip_happy_ctx_destroy:
  800|  5.55k|{
  801|  5.55k|  if(ctx) {
  ------------------
  |  Branch (801:6): [True: 5.55k, False: 0]
  ------------------
  802|  5.55k|    cf_ip_happy_ctx_clear(ctx, data);
  803|  5.55k|    curlx_free(ctx);
  ------------------
  |  | 1478|  5.55k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  804|  5.55k|  }
  805|  5.55k|}
cf-ip-happy.c:cf_ip_happy_connect:
  843|  9.40k|{
  844|  9.40k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  845|  9.40k|  CURLcode result = CURLE_OK;
  846|       |
  847|       |  /* -Werror=null-dereference finds false positives suddenly. */
  848|  9.40k|  if(!data)
  ------------------
  |  Branch (848:6): [True: 0, False: 9.40k]
  ------------------
  849|      0|    return CURLE_FAILED_INIT;
  850|       |
  851|  9.40k|  if(cf->connected) {
  ------------------
  |  Branch (851:6): [True: 3.82k, False: 5.58k]
  ------------------
  852|  3.82k|    *done = TRUE;
  ------------------
  |  | 1053|  3.82k|#define TRUE true
  ------------------
  853|  3.82k|    return CURLE_OK;
  854|  3.82k|  }
  855|       |
  856|  5.58k|  DEBUGASSERT(ctx);
  ------------------
  |  | 1079|  5.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (856:3): [True: 0, False: 5.58k]
  |  Branch (856:3): [True: 5.58k, False: 0]
  ------------------
  857|  5.58k|  *done = FALSE;
  ------------------
  |  | 1056|  5.58k|#define FALSE false
  ------------------
  858|       |
  859|  5.58k|  if(!ctx->dns_resolved) {
  ------------------
  |  Branch (859:6): [True: 5.55k, False: 30]
  ------------------
  860|  5.55k|    result = Curl_conn_dns_addr_result(cf->conn, cf->sockindex,
  861|  5.55k|                                       ctx->ballers.peer);
  862|  5.55k|    if(!result)
  ------------------
  |  Branch (862:8): [True: 5.50k, False: 48]
  ------------------
  863|  5.50k|      ctx->dns_resolved = TRUE;
  ------------------
  |  | 1053|  5.50k|#define TRUE true
  ------------------
  864|     48|    else if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (864:13): [True: 48, False: 0]
  ------------------
  865|     48|      result = CURLE_OK;
  866|     48|    }
  867|      0|    else /* real error */
  868|      0|      goto out;
  869|  5.55k|  }
  870|       |
  871|  5.58k|  switch(ctx->state) {
  ------------------
  |  Branch (871:10): [True: 5.58k, False: 0]
  ------------------
  872|  5.55k|  case SCFST_INIT:
  ------------------
  |  Branch (872:3): [True: 5.55k, False: 35]
  ------------------
  873|  5.55k|    DEBUGASSERT(CURL_SOCKET_BAD == Curl_conn_cf_get_socket(cf, data));
  ------------------
  |  | 1079|  5.55k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (873:5): [True: 0, False: 5.55k]
  |  Branch (873:5): [True: 5.55k, False: 0]
  ------------------
  874|  5.55k|    DEBUGASSERT(!cf->connected);
  ------------------
  |  | 1079|  5.55k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (874:5): [True: 0, False: 5.55k]
  |  Branch (874:5): [True: 5.55k, False: 0]
  ------------------
  875|  5.55k|    result = cf_ip_happy_init(cf, data);
  876|  5.55k|    if(result)
  ------------------
  |  Branch (876:8): [True: 0, False: 5.55k]
  ------------------
  877|      0|      goto out;
  878|  5.55k|    ctx->state = SCFST_WAITING;
  879|  5.55k|    FALLTHROUGH();
  ------------------
  |  |  823|  5.55k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  880|  5.58k|  case SCFST_WAITING:
  ------------------
  |  Branch (880:3): [True: 35, False: 5.55k]
  ------------------
  881|  5.58k|    result = is_connected(cf, data, done);
  882|  5.58k|    if(!result && *done) {
  ------------------
  |  Branch (882:8): [True: 5.35k, False: 229]
  |  Branch (882:19): [True: 5.24k, False: 110]
  ------------------
  883|  5.24k|      DEBUGASSERT(ctx->ballers.winner);
  ------------------
  |  | 1079|  5.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (883:7): [True: 0, False: 5.24k]
  |  Branch (883:7): [True: 5.24k, False: 0]
  ------------------
  884|  5.24k|      DEBUGASSERT(ctx->ballers.winner->cf);
  ------------------
  |  | 1079|  5.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (884:7): [True: 0, False: 5.24k]
  |  Branch (884:7): [True: 5.24k, False: 0]
  ------------------
  885|  5.24k|      DEBUGASSERT(ctx->ballers.winner->cf->connected);
  ------------------
  |  | 1079|  5.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (885:7): [True: 0, False: 5.24k]
  |  Branch (885:7): [True: 5.24k, False: 0]
  ------------------
  886|       |      /* we have a winner. Install and activate it.
  887|       |       * close/free all others. */
  888|  5.24k|      ctx->state = SCFST_DONE;
  889|  5.24k|      cf->connected = TRUE;
  ------------------
  |  | 1053|  5.24k|#define TRUE true
  ------------------
  890|  5.24k|      cf->next = ctx->ballers.winner->cf;
  891|  5.24k|      ctx->ballers.winner->cf = NULL;
  892|       |
  893|  5.24k|      if(cf->conn->scheme->protocol & PROTO_FAMILY_SSH)
  ------------------
  |  |   90|  5.24k|#define PROTO_FAMILY_SSH  (CURLPROTO_SCP | CURLPROTO_SFTP)
  |  |  ------------------
  |  |  |  | 1090|  5.24k|#define CURLPROTO_SCP     (1L << 4)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_SSH  (CURLPROTO_SCP | CURLPROTO_SFTP)
  |  |  ------------------
  |  |  |  | 1091|  5.24k|#define CURLPROTO_SFTP    (1L << 5)
  |  |  ------------------
  ------------------
  |  Branch (893:10): [True: 0, False: 5.24k]
  ------------------
  894|      0|        Curl_pgrsTime(data, TIMER_APPCONNECT); /* we are connected already */
  895|  5.24k|#ifdef CURLVERBOSE
  896|  5.24k|      if(Curl_trc_cf_is_verbose(cf, data)) {
  ------------------
  |  |  326|  5.24k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  ------------------
  |  |  |  |  322|  10.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 5.24k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.24k]
  |  |  |  |  ------------------
  |  |  |  |  323|  10.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|  5.24k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  897|      0|        struct ip_quadruple ipquad;
  898|      0|        bool is_ipv6;
  899|      0|        if(!Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad)) {
  ------------------
  |  Branch (899:12): [True: 0, False: 0]
  ------------------
  900|      0|          CURL_TRC_CF(data, cf, "Connected to %s (%s) port %u",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  901|      0|                      ctx->ballers.peer->hostname,
  902|      0|                      ipquad.remote_ip, ipquad.remote_port);
  903|      0|        }
  904|      0|      }
  905|  5.24k|#endif
  906|  5.24k|      cf_ip_happy_ctx_clear(ctx, data);
  907|  5.24k|      Curl_expire_done(data, EXPIRE_HAPPY_EYEBALLS);
  908|       |      /* whatever errors were reported by ballers, clear our errorbuf */
  909|  5.24k|      Curl_reset_fail(data);
  910|  5.24k|      data->info.numconnects++; /* to track the # of connections made */
  911|  5.24k|    }
  912|  5.58k|    break;
  913|  5.58k|  case SCFST_DONE:
  ------------------
  |  Branch (913:3): [True: 0, False: 5.58k]
  ------------------
  914|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  915|      0|    break;
  916|  5.58k|  }
  917|  5.58k|out:
  918|  5.58k|  return result;
  919|  5.58k|}
cf-ip-happy.c:cf_ip_happy_init:
  761|  5.55k|{
  762|  5.55k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  763|       |
  764|  5.55k|  if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (764:6): [True: 0, False: 5.55k]
  ------------------
  765|       |    /* a precaution, no need to continue if time already is up */
  766|      0|    failf(data, "Connection time-out");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  767|      0|    return CURLE_OPERATION_TIMEDOUT;
  768|      0|  }
  769|       |
  770|  5.55k|  if(ctx->ballers.transport_peer == TRNSPRT_UNIX) {
  ------------------
  |  |  240|  5.55k|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (770:6): [True: 27, False: 5.52k]
  ------------------
  771|     27|#ifdef USE_UNIX_SOCKETS
  772|     27|    cf_ai_iter_init(&ctx->ballers.addr_iter, cf, ctx->ballers.peer, AF_UNIX);
  773|       |#else
  774|       |    return CURLE_UNSUPPORTED_PROTOCOL;
  775|       |#endif
  776|     27|  }
  777|  5.52k|  else { /* TCP/UDP/QUIC */
  778|  5.52k|#ifdef USE_IPV6
  779|  5.52k|    cf_ai_iter_init(&ctx->ballers.ipv6_iter, cf, ctx->ballers.peer, AF_INET6);
  780|  5.52k|#endif
  781|  5.52k|    cf_ai_iter_init(&ctx->ballers.addr_iter, cf, ctx->ballers.peer, AF_INET);
  782|  5.52k|  }
  783|       |
  784|  5.55k|  CURL_TRC_CF(data, cf, "init ip ballers for transport %u",
  ------------------
  |  |  153|  5.55k|  do {                                          \
  |  |  154|  5.55k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.55k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.55k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.55k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.55k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.55k]
  |  |  ------------------
  ------------------
  785|  5.55k|              ctx->ballers.transport_peer);
  786|  5.55k|  ctx->started = *Curl_pgrs_now(data);
  787|  5.55k|  return CURLE_OK;
  788|  5.55k|}
cf-ip-happy.c:cf_ai_iter_init:
  130|  11.0k|{
  131|  11.0k|  iter->cf = cf;
  132|  11.0k|  iter->peer = peer; /* not linked, ctx->ballers owns and has same lifetime */
  133|  11.0k|  iter->ai_family = ai_family;
  134|  11.0k|  iter->n = 0;
  135|  11.0k|}
cf-ip-happy.c:is_connected:
  700|  5.58k|{
  701|  5.58k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  702|  5.58k|  struct connectdata *conn = cf->conn;
  703|  5.58k|  CURLcode result;
  704|       |
  705|  5.58k|  result = cf_ip_ballers_run(&ctx->ballers, cf, data,
  706|  5.58k|                             (bool)ctx->dns_resolved, connected);
  707|       |
  708|  5.58k|  if(!result)
  ------------------
  |  Branch (708:6): [True: 5.35k, False: 229]
  ------------------
  709|  5.35k|    return CURLE_OK;
  710|    229|  else {
  711|    229|    struct Curl_peer *peer = NULL, *proxy_peer = NULL;
  712|    229|    char viamsg[160];
  713|       |
  714|    229|    peer = Curl_conn_get_first_peer(conn, cf->sockindex);
  715|    229|    if(!conn->origin || !peer)
  ------------------
  |  Branch (715:8): [True: 0, False: 229]
  |  Branch (715:25): [True: 0, False: 229]
  ------------------
  716|      0|      return CURLE_FAILED_INIT;
  717|       |
  718|    229|#ifndef CURL_DISABLE_PROXY
  719|    229|    if(conn->socks_proxy.peer)
  ------------------
  |  Branch (719:8): [True: 89, False: 140]
  ------------------
  720|     89|      proxy_peer = conn->socks_proxy.peer;
  721|    140|    else if(conn->http_proxy.peer)
  ------------------
  |  Branch (721:13): [True: 4, False: 136]
  ------------------
  722|      4|      proxy_peer = conn->http_proxy.peer;
  723|    229|#endif
  724|       |
  725|    229|    viamsg[0] = 0;
  726|    229|    if(!Curl_peer_equal(peer, conn->origin) &&
  ------------------
  |  Branch (726:8): [True: 191, False: 38]
  ------------------
  727|    191|       !Curl_peer_equal(peer, proxy_peer)) {
  ------------------
  |  Branch (727:8): [True: 98, False: 93]
  ------------------
  728|     98|#ifdef USE_UNIX_SOCKETS
  729|     98|      if(peer->unix_socket)
  ------------------
  |  Branch (729:10): [True: 0, False: 98]
  ------------------
  730|      0|        curl_msnprintf(viamsg, sizeof(viamsg), " over unix://%s",
  731|      0|                       peer->hostname);
  732|     98|      else
  733|     98|#endif
  734|     98|      curl_msnprintf(viamsg, sizeof(viamsg), " via %s:%u",
  735|     98|                     peer->hostname, peer->port);
  736|     98|    }
  737|       |
  738|    229|    failf(data, "Failed to connect to %s:%u%s %s%s%safter "
  ------------------
  |  |   62|    229|#define failf Curl_failf
  ------------------
  739|    229|          "%" FMT_TIMEDIFF_T " ms: %s",
  740|    229|          conn->origin->hostname, conn->origin->port, viamsg,
  741|    229|          proxy_peer ? "over proxy " : "",
  ------------------
  |  Branch (741:11): [True: 93, False: 136]
  ------------------
  742|    229|          proxy_peer ? proxy_peer->hostname : "",
  ------------------
  |  Branch (742:11): [True: 93, False: 136]
  ------------------
  743|    229|          proxy_peer ? " " : "",
  ------------------
  |  Branch (743:11): [True: 93, False: 136]
  ------------------
  744|    229|          curlx_ptimediff_ms(Curl_pgrs_now(data),
  745|    229|                             &data->progress.t_startsingle),
  746|    229|          curl_easy_strerror(result));
  747|       |
  748|    229|#ifdef SOCKETIMEDOUT
  749|    229|    if(SOCKETIMEDOUT == data->state.os_errno)
  ------------------
  |  | 1133|    229|#define SOCKETIMEDOUT     ETIMEDOUT
  ------------------
  |  Branch (749:8): [True: 0, False: 229]
  ------------------
  750|      0|      result = CURLE_OPERATION_TIMEDOUT;
  751|    229|#endif
  752|       |
  753|    229|    return result;
  754|    229|  }
  755|  5.58k|}
cf-ip-happy.c:cf_ip_ballers_run:
  396|  5.58k|{
  397|  5.58k|  CURLcode result = CURLE_OK;
  398|  5.58k|  struct cf_ip_attempt *a = NULL, **panchor;
  399|  5.58k|  bool do_more;
  400|  5.58k|  timediff_t next_expire_ms;
  401|  5.58k|  uint32_t inconclusive, ongoing;
  402|  5.58k|  VERBOSE(int i);
  ------------------
  |  | 1613|  5.58k|#define VERBOSE(x) x
  ------------------
  403|       |
  404|  5.58k|  if(bs->winner)
  ------------------
  |  Branch (404:6): [True: 0, False: 5.58k]
  ------------------
  405|      0|    return CURLE_OK;
  406|       |
  407|  11.1k|evaluate:
  408|  11.1k|  ongoing = inconclusive = 0;
  409|       |
  410|       |  /* check if a running baller connects now */
  411|  11.1k|  VERBOSE(i = -1);
  ------------------
  |  | 1613|  11.1k|#define VERBOSE(x) x
  ------------------
  412|  11.6k|  for(panchor = &bs->running; *panchor; panchor = &((*panchor)->next)) {
  ------------------
  |  Branch (412:31): [True: 5.71k, False: 5.93k]
  ------------------
  413|  5.71k|    VERBOSE(++i);
  ------------------
  |  | 1613|  5.71k|#define VERBOSE(x) x
  ------------------
  414|  5.71k|    a = *panchor;
  415|  5.71k|    a->result = cf_ip_attempt_connect(a, data, connected);
  416|  5.71k|    if(!a->result) {
  ------------------
  |  Branch (416:8): [True: 5.30k, False: 405]
  ------------------
  417|  5.30k|      if(*connected) {
  ------------------
  |  Branch (417:10): [True: 5.24k, False: 62]
  ------------------
  418|       |        /* connected, declare the winner, remove from running,
  419|       |         * clear remaining running list. */
  420|  5.24k|        CURL_TRC_CF(data, cf, "connect attempt #%d successful", i);
  ------------------
  |  |  153|  5.24k|  do {                                          \
  |  |  154|  5.24k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.24k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  10.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.24k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  10.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.24k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.24k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.24k]
  |  |  ------------------
  ------------------
  421|  5.24k|        bs->winner = a;
  422|  5.24k|        *panchor = a->next;
  423|  5.24k|        a->next = NULL;
  424|  5.24k|        while(bs->running) {
  ------------------
  |  Branch (424:15): [True: 0, False: 5.24k]
  ------------------
  425|      0|          a = bs->running;
  426|      0|          bs->running = a->next;
  427|      0|          cf_ip_attempt_free(a, data);
  428|      0|        }
  429|  5.24k|        return CURLE_OK;
  430|  5.24k|      }
  431|       |      /* still running */
  432|     62|      ++ongoing;
  433|     62|    }
  434|    405|    else if(a->inconclusive) /* failed, but inconclusive */
  ------------------
  |  Branch (434:13): [True: 0, False: 405]
  ------------------
  435|      0|      ++inconclusive;
  436|  5.71k|  }
  437|  5.93k|  if(bs->running)
  ------------------
  |  Branch (437:6): [True: 378, False: 5.55k]
  ------------------
  438|    378|    CURL_TRC_CF(data, cf, "checked connect attempts: "
  ------------------
  |  |  153|    378|  do {                                          \
  |  |  154|    378|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    378|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    756|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 378, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 378]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    756|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    378|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    378|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    378|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 378]
  |  |  ------------------
  ------------------
  439|  5.93k|                "%u ongoing, %u inconclusive", ongoing, inconclusive);
  440|       |
  441|       |  /* no attempt connected yet, start another one? */
  442|  5.93k|  if(!ongoing) {
  ------------------
  |  Branch (442:6): [True: 5.87k, False: 62]
  ------------------
  443|  5.87k|    if(!bs->started.tv_sec && !bs->started.tv_usec)
  ------------------
  |  Branch (443:8): [True: 5.55k, False: 321]
  |  Branch (443:31): [True: 5.55k, False: 0]
  ------------------
  444|  5.55k|      bs->started = *Curl_pgrs_now(data);
  445|  5.87k|    do_more = TRUE;
  ------------------
  |  | 1053|  5.87k|#define TRUE true
  ------------------
  446|  5.87k|  }
  447|     62|  else {
  448|     62|    bool more_possible = cf_ai_iter_has_more(&bs->addr_iter, data);
  449|     62|#ifdef USE_IPV6
  450|     62|    if(!more_possible)
  ------------------
  |  Branch (450:8): [True: 62, False: 0]
  ------------------
  451|     62|      more_possible = cf_ai_iter_has_more(&bs->ipv6_iter, data);
  452|     62|#endif
  453|     62|    do_more = more_possible &&
  ------------------
  |  Branch (453:15): [True: 0, False: 62]
  ------------------
  454|      0|      (curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started) >=
  ------------------
  |  Branch (454:7): [True: 0, False: 0]
  ------------------
  455|      0|       bs->attempt_delay_ms);
  456|     62|    if(do_more)
  ------------------
  |  Branch (456:8): [True: 0, False: 62]
  ------------------
  457|      0|      CURL_TRC_CF(data, cf, "happy eyeballs timeout expired, "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  458|     62|                  "start next attempt");
  459|     62|  }
  460|       |
  461|  5.93k|  if(do_more) {
  ------------------
  |  Branch (461:6): [True: 5.87k, False: 62]
  ------------------
  462|       |    /* start the next attempt if there is another ip address to try.
  463|       |     * Alternate between address families when possible. */
  464|  5.87k|    const struct Curl_addrinfo *ai = NULL;
  465|  5.87k|    int ai_family = 0;
  466|  5.87k|    CURL_TRC_CF(data, cf, "want to do more");
  ------------------
  |  |  153|  5.87k|  do {                                          \
  |  |  154|  5.87k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.87k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.87k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.87k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.87k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.87k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.87k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.87k]
  |  |  ------------------
  ------------------
  467|  5.87k|#ifdef USE_IPV6
  468|  5.87k|    if((bs->last_attempt_ai_family == AF_INET) ||
  ------------------
  |  Branch (468:8): [True: 5.74k, False: 122]
  ------------------
  469|  5.78k|       !cf_ai_iter_has_more(&bs->addr_iter, data)) {
  ------------------
  |  Branch (469:8): [True: 34, False: 88]
  ------------------
  470|  5.78k|      ai = cf_ai_iter_next(&bs->ipv6_iter, data);
  471|  5.78k|      ai_family = bs->ipv6_iter.ai_family;
  472|  5.78k|      CURL_TRC_CF(data, cf, "check for next AAAA address: %s",
  ------------------
  |  |  153|  5.78k|  do {                                          \
  |  |  154|  5.78k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.78k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.78k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.78k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.78k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  5.78k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.78k]
  |  |  ------------------
  ------------------
  473|  5.78k|                  ai ? "found" : "none");
  474|  5.78k|    }
  475|  5.87k|#endif
  476|  5.87k|    if(!ai) {
  ------------------
  |  Branch (476:8): [True: 5.69k, False: 178]
  ------------------
  477|  5.69k|      ai = cf_ai_iter_next(&bs->addr_iter, data);
  478|  5.69k|      ai_family = bs->addr_iter.ai_family;
  479|  5.69k|      CURL_TRC_CF(data, cf, "check for next A address: %s",
  ------------------
  |  |  153|  5.69k|  do {                                          \
  |  |  154|  5.69k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.69k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.69k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.69k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.69k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  5.69k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.69k]
  |  |  ------------------
  ------------------
  480|  5.69k|                  ai ? "found" : "none");
  481|  5.69k|    }
  482|       |    /* We are (re-)starting attempts. We are not interested in
  483|       |     * keeping old failure information. The new attempt will either
  484|       |     * succeed or persist new failure. */
  485|  5.87k|    Curl_reset_fail(data);
  486|       |
  487|  5.87k|    if(ai) {  /* try another address */
  ------------------
  |  Branch (487:8): [True: 5.59k, False: 277]
  ------------------
  488|  5.59k|      struct Curl_sockaddr_ex addr;
  489|       |
  490|       |      /* Discard oldest to make room for new attempt */
  491|  5.59k|      if(bs->max_concurrent)
  ------------------
  |  Branch (491:10): [True: 5.59k, False: 0]
  ------------------
  492|  5.59k|        cf_ip_ballers_prune(bs, cf, data, bs->max_concurrent - 1);
  493|       |
  494|  5.59k|      result = Curl_socket_addr_from_ai(&addr, ai, bs->transport_peer);
  495|  5.59k|      if(result)
  ------------------
  |  Branch (495:10): [True: 0, False: 5.59k]
  ------------------
  496|      0|        goto out;
  497|       |
  498|  5.59k|      result = cf_ip_attempt_new(&a, data, cf, bs->origin, bs->peer,
  499|  5.59k|                                 bs->transport_peer, &addr, ai_family,
  500|  5.59k|                                 bs->tunnel_peer, bs->tunnel_transport,
  501|  5.59k|                                 bs->cf_create);
  502|  5.59k|      CURL_TRC_CF(data, cf, "starting %s attempt for ipv%s -> %d",
  ------------------
  |  |  153|  5.59k|  do {                                          \
  |  |  154|  5.59k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.59k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.59k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.59k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.59k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  5.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.59k]
  |  |  ------------------
  ------------------
  503|  5.59k|                  bs->running ? "next" : "first",
  504|  5.59k|                  (ai_family == AF_INET) ? "4" : "6", (int)result);
  505|  5.59k|      if(result)
  ------------------
  |  Branch (505:10): [True: 0, False: 5.59k]
  ------------------
  506|      0|        goto out;
  507|  5.59k|      DEBUGASSERT(a);
  ------------------
  |  | 1079|  5.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (507:7): [True: 0, False: 5.59k]
  |  Branch (507:7): [True: 5.59k, False: 0]
  ------------------
  508|       |
  509|       |      /* append to running list */
  510|  5.59k|      panchor = &bs->running;
  511|  5.68k|      while(*panchor)
  ------------------
  |  Branch (511:13): [True: 88, False: 5.59k]
  ------------------
  512|     88|        panchor = &((*panchor)->next);
  513|  5.59k|      *panchor = a;
  514|  5.59k|      bs->last_attempt_started = *Curl_pgrs_now(data);
  515|  5.59k|      bs->last_attempt_ai_family = ai_family;
  516|       |      /* and run everything again */
  517|  5.59k|      goto evaluate;
  518|  5.59k|    }
  519|    277|    else if(inconclusive) {
  ------------------
  |  Branch (519:13): [True: 0, False: 277]
  ------------------
  520|       |      /* tried all addresses, no success but some where inconclusive.
  521|       |       * Let's restart the inconclusive ones. */
  522|      0|      timediff_t since_ms =
  523|      0|        curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started);
  524|      0|      timediff_t delay_ms = bs->attempt_delay_ms - since_ms;
  525|      0|      if(delay_ms <= 0) {
  ------------------
  |  Branch (525:10): [True: 0, False: 0]
  ------------------
  526|      0|        CURL_TRC_CF(data, cf, "all attempts inconclusive, restarting one");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  527|      0|        VERBOSE(i = -1);
  ------------------
  |  | 1613|      0|#define VERBOSE(x) x
  ------------------
  528|      0|        for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (528:30): [True: 0, False: 0]
  ------------------
  529|      0|          VERBOSE(++i);
  ------------------
  |  | 1613|      0|#define VERBOSE(x) x
  ------------------
  530|      0|          if(!a->inconclusive)
  ------------------
  |  Branch (530:14): [True: 0, False: 0]
  ------------------
  531|      0|            continue;
  532|      0|          result = cf_ip_attempt_restart(a, cf, data);
  533|      0|          CURL_TRC_CF(data, cf, "restarted baller %d -> %d", i, (int)result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  534|      0|          if(result) /* serious failure */
  ------------------
  |  Branch (534:14): [True: 0, False: 0]
  ------------------
  535|      0|            goto out;
  536|      0|          bs->last_attempt_started = *Curl_pgrs_now(data);
  537|      0|          goto evaluate;
  538|      0|        }
  539|      0|        DEBUGASSERT(0); /* should not come here */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (539:9): [Folded, False: 0]
  |  Branch (539:9): [Folded, False: 0]
  ------------------
  540|      0|      }
  541|      0|      else {
  542|       |        /* let's wait some more before restarting */
  543|      0|        infof(data, "connect attempts inconclusive, retrying "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  544|      0|                    "in %" FMT_TIMEDIFF_T "ms", delay_ms);
  545|      0|        Curl_expire(data, delay_ms, EXPIRE_HAPPY_EYEBALLS);
  546|      0|      }
  547|       |      /* attempt timeout for restart has not expired yet */
  548|      0|      goto out;
  549|      0|    }
  550|    277|    else if(!ongoing && dns_resolved) {
  ------------------
  |  Branch (550:13): [True: 277, False: 0]
  |  Branch (550:25): [True: 229, False: 48]
  ------------------
  551|       |      /* no more addresses, no inconclusive attempts */
  552|    229|      CURL_TRC_CF(data, cf, "no more attempts to try");
  ------------------
  |  |  153|    229|  do {                                          \
  |  |  154|    229|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    229|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    458|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 229, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 229]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    458|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    229|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    229|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    229|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 229]
  |  |  ------------------
  ------------------
  553|    229|      result = CURLE_COULDNT_CONNECT;
  554|    229|      VERBOSE(i = 0);
  ------------------
  |  | 1613|    229|#define VERBOSE(x) x
  ------------------
  555|    544|      for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (555:28): [True: 315, False: 229]
  ------------------
  556|    315|        CURL_TRC_CF(data, cf, "baller %d: result=%d", i, (int)a->result);
  ------------------
  |  |  153|    315|  do {                                          \
  |  |  154|    315|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    315|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    630|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 315, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 315]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    630|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    315|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    315|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    315|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 315]
  |  |  ------------------
  ------------------
  557|    315|        if(a->result)
  ------------------
  |  Branch (557:12): [True: 315, False: 0]
  ------------------
  558|    315|          result = a->result;
  559|    315|      }
  560|    229|    }
  561|  5.87k|  }
  562|       |
  563|    339|out:
  564|    339|  if(!result) {
  ------------------
  |  Branch (564:6): [True: 110, False: 229]
  ------------------
  565|    110|    bool more_possible;
  566|       |
  567|       |    /* when do we need to be called again? */
  568|    110|    next_expire_ms = Curl_timeleft_ms(data);
  569|    110|    if(next_expire_ms < 0) {
  ------------------
  |  Branch (569:8): [True: 0, False: 110]
  ------------------
  570|      0|      failf(data, "Connection timeout after %" FMT_OFF_T " ms",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  571|      0|            curlx_ptimediff_ms(Curl_pgrs_now(data),
  572|      0|                               &data->progress.t_startsingle));
  573|      0|      return CURLE_OPERATION_TIMEDOUT;
  574|      0|    }
  575|       |
  576|    110|    more_possible = cf_ai_iter_has_more(&bs->addr_iter, data);
  577|    110|#ifdef USE_IPV6
  578|    110|    if(!more_possible)
  ------------------
  |  Branch (578:8): [True: 110, False: 0]
  ------------------
  579|    110|      more_possible = cf_ai_iter_has_more(&bs->ipv6_iter, data);
  580|    110|#endif
  581|    110|    if(more_possible) {
  ------------------
  |  Branch (581:8): [True: 0, False: 110]
  ------------------
  582|      0|      timediff_t expire_ms, elapsed_ms;
  583|      0|      elapsed_ms =
  584|      0|        curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started);
  585|      0|      expire_ms = CURLMAX(bs->attempt_delay_ms - elapsed_ms, 0);
  ------------------
  |  | 1291|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  586|      0|      next_expire_ms = CURLMIN(next_expire_ms, expire_ms);
  ------------------
  |  | 1292|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  587|      0|      if(next_expire_ms <= 0) {
  ------------------
  |  Branch (587:10): [True: 0, False: 0]
  ------------------
  588|      0|        CURL_TRC_CF(data, cf, "HAPPY_EYEBALLS timeout due, re-evaluate");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  589|      0|        goto evaluate;
  590|      0|      }
  591|      0|      CURL_TRC_CF(data, cf, "next HAPPY_EYEBALLS timeout in %" FMT_TIMEDIFF_T
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  592|      0|                  "ms", next_expire_ms);
  593|      0|      Curl_expire(data, next_expire_ms, EXPIRE_HAPPY_EYEBALLS);
  594|      0|    }
  595|    110|  }
  596|    339|  return result;
  597|    339|}
cf-ip-happy.c:cf_ip_attempt_connect:
  248|  5.71k|{
  249|  5.71k|  *connected = (bool)a->connected;
  250|  5.71k|  if(!a->result && !*connected) {
  ------------------
  |  Branch (250:6): [True: 5.62k, False: 89]
  |  Branch (250:20): [True: 5.62k, False: 0]
  ------------------
  251|       |    /* evaluate again */
  252|  5.62k|    a->result = Curl_conn_cf_connect(a->cf, data, connected);
  253|       |
  254|  5.62k|    if(!a->result) {
  ------------------
  |  Branch (254:8): [True: 5.30k, False: 316]
  ------------------
  255|  5.30k|      if(*connected) {
  ------------------
  |  Branch (255:10): [True: 5.24k, False: 62]
  ------------------
  256|  5.24k|        a->connected = TRUE;
  ------------------
  |  | 1053|  5.24k|#define TRUE true
  ------------------
  257|  5.24k|      }
  258|  5.30k|    }
  259|    316|    else {
  260|    316|      if(a->result == CURLE_WEIRD_SERVER_REPLY)
  ------------------
  |  Branch (260:10): [True: 0, False: 316]
  ------------------
  261|      0|        a->inconclusive = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  262|    316|      if(a->cf)
  ------------------
  |  Branch (262:10): [True: 316, False: 0]
  ------------------
  263|    316|        Curl_conn_cf_discard_chain(&a->cf, data);
  264|    316|    }
  265|  5.62k|  }
  266|  5.71k|  return a->result;
  267|  5.71k|}
cf-ip-happy.c:cf_ai_iter_has_more:
  154|    466|{
  155|    466|  return (iter->cf &&
  ------------------
  |  Branch (155:11): [True: 466, False: 0]
  ------------------
  156|    466|          !!Curl_conn_dns_get_ai(data, iter->peer, iter->cf->sockindex,
  ------------------
  |  Branch (156:11): [True: 88, False: 378]
  ------------------
  157|    466|                                 iter->ai_family, iter->n));
  158|    466|}
cf-ip-happy.c:cf_ai_iter_next:
  139|  11.4k|{
  140|  11.4k|  const struct Curl_addrinfo *addr;
  141|       |
  142|  11.4k|  if(!iter->cf)
  ------------------
  |  Branch (142:6): [True: 27, False: 11.4k]
  ------------------
  143|     27|    return NULL;
  144|       |
  145|  11.4k|  addr = Curl_conn_dns_get_ai(data, iter->peer, iter->cf->sockindex,
  146|  11.4k|                              iter->ai_family, iter->n);
  147|  11.4k|  if(addr)
  ------------------
  |  Branch (147:6): [True: 5.59k, False: 5.85k]
  ------------------
  148|  5.59k|    iter->n++;
  149|  11.4k|  return addr;
  150|  11.4k|}
cf-ip-happy.c:cf_ip_ballers_prune:
  366|  5.59k|{
  367|  5.59k|  struct cf_ip_attempt *a = NULL, **panchor;
  368|  5.59k|  uint32_t ongoing = 0;
  369|       |
  370|  5.68k|  for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (370:24): [True: 88, False: 5.59k]
  ------------------
  371|     88|    if(!a->result && !a->connected)
  ------------------
  |  Branch (371:8): [True: 0, False: 88]
  |  Branch (371:22): [True: 0, False: 0]
  ------------------
  372|      0|      ++ongoing;
  373|     88|  }
  374|       |
  375|  5.59k|  panchor = &bs->running;
  376|  5.59k|  while(*panchor && (ongoing > max_concurrent)) {
  ------------------
  |  Branch (376:9): [True: 88, False: 5.50k]
  |  Branch (376:21): [True: 0, False: 88]
  ------------------
  377|      0|    a = *panchor;
  378|      0|    if(!a->result && !a->connected) {
  ------------------
  |  Branch (378:8): [True: 0, False: 0]
  |  Branch (378:22): [True: 0, False: 0]
  ------------------
  379|      0|      *panchor = a->next;
  380|      0|      a->next = NULL;
  381|      0|      cf_ip_attempt_free(a, data);
  382|      0|      --ongoing;
  383|      0|      CURL_TRC_CF(data, cf, "discarding oldest attempt to keep limit");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  384|      0|    }
  385|      0|    else {
  386|      0|      panchor = &a->next;
  387|      0|    }
  388|      0|  }
  389|  5.59k|}
cf-ip-happy.c:cf_ip_attempt_new:
  204|  5.59k|{
  205|  5.59k|  struct Curl_cfilter *wcf;
  206|  5.59k|  struct cf_ip_attempt *a;
  207|  5.59k|  CURLcode result = CURLE_OK;
  208|       |
  209|  5.59k|  *pa = NULL;
  210|  5.59k|  a = curlx_calloc(1, sizeof(*a));
  ------------------
  |  | 1475|  5.59k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  211|  5.59k|  if(!a)
  ------------------
  |  Branch (211:6): [True: 0, False: 5.59k]
  ------------------
  212|      0|    return CURLE_OUT_OF_MEMORY;
  213|       |
  214|  5.59k|  Curl_peer_link(&a->origin, origin);
  215|  5.59k|  Curl_peer_link(&a->peer, peer);
  216|  5.59k|  a->transport_peer = transport_peer;
  217|  5.59k|  Curl_peer_link(&a->tunnel_peer, tunnel_peer);
  218|  5.59k|  a->tunnel_transport = tunnel_transport;
  219|  5.59k|  a->addr = *addr;
  220|  5.59k|  a->ai_family = ai_family;
  221|  5.59k|  a->result = CURLE_OK;
  222|  5.59k|  a->cf_create = cf_create;
  223|  5.59k|  *pa = a;
  224|       |
  225|  5.59k|  result = a->cf_create(&a->cf, data, a->origin, a->peer, a->transport_peer,
  226|  5.59k|                        cf->conn, &a->addr, a->tunnel_peer,
  227|  5.59k|                        a->tunnel_transport);
  228|  5.59k|  if(result)
  ------------------
  |  Branch (228:6): [True: 0, False: 5.59k]
  ------------------
  229|      0|    goto out;
  230|       |
  231|       |  /* the new filter might have sub-filters */
  232|  11.1k|  for(wcf = a->cf; wcf; wcf = wcf->next) {
  ------------------
  |  Branch (232:20): [True: 5.59k, False: 5.59k]
  ------------------
  233|  5.59k|    wcf->conn = cf->conn;
  234|  5.59k|    wcf->sockindex = cf->sockindex;
  235|  5.59k|  }
  236|       |
  237|  5.59k|out:
  238|  5.59k|  if(result) {
  ------------------
  |  Branch (238:6): [True: 0, False: 5.59k]
  ------------------
  239|      0|    cf_ip_attempt_free(a, data);
  240|       |    *pa = NULL;
  241|      0|  }
  242|  5.59k|  return result;
  243|  5.59k|}
cf-ip-happy.c:cf_ip_happy_adjust_pollset:
  828|  1.06k|{
  829|  1.06k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  830|  1.06k|  CURLcode result = CURLE_OK;
  831|       |
  832|  1.06k|  if(!cf->connected) {
  ------------------
  |  Branch (832:6): [True: 110, False: 952]
  ------------------
  833|    110|    result = cf_ip_ballers_pollset(&ctx->ballers, data, ps);
  834|    110|    CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", (int)result,
  ------------------
  |  |  153|    110|  do {                                          \
  |  |  154|    110|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    110|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    220|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 110, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 110]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    220|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    110|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    110|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    110|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 110]
  |  |  ------------------
  ------------------
  835|    110|                ps->n);
  836|    110|  }
  837|  1.06k|  return result;
  838|  1.06k|}
cf-ip-happy.c:cf_ip_ballers_pollset:
  624|    110|{
  625|    110|  struct cf_ip_attempt *a;
  626|    110|  CURLcode result = CURLE_OK;
  627|    174|  for(a = bs->running; a && !result; a = a->next) {
  ------------------
  |  Branch (627:24): [True: 64, False: 110]
  |  Branch (627:29): [True: 64, False: 0]
  ------------------
  628|     64|    if(a->result)
  ------------------
  |  Branch (628:8): [True: 2, False: 62]
  ------------------
  629|      2|      continue;
  630|     62|    result = Curl_conn_cf_adjust_pollset(a->cf, data, ps);
  631|     62|  }
  632|    110|  return result;
  633|    110|}
cf-ip-happy.c:cf_ip_happy_query:
  935|  16.5k|{
  936|  16.5k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  937|       |
  938|  16.5k|  if(!cf->connected) {
  ------------------
  |  Branch (938:6): [True: 6.05k, False: 10.5k]
  ------------------
  939|  6.05k|    switch(query) {
  940|      0|    case CF_QUERY_CONNECT_REPLY_MS: {
  ------------------
  |  |  162|      0|#define CF_QUERY_CONNECT_REPLY_MS   2  /* number     -        */
  ------------------
  |  Branch (940:5): [True: 0, False: 6.05k]
  ------------------
  941|      0|      *pres1 = cf_ip_ballers_min_reply_ms(&ctx->ballers, data);
  942|      0|      CURL_TRC_CF(data, cf, "query connect reply: %dms", *pres1);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  943|      0|      return CURLE_OK;
  944|      0|    }
  945|    230|    case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  164|    230|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (945:5): [True: 230, False: 5.82k]
  ------------------
  946|    230|      struct curltime *when = pres2;
  947|    230|      *when = cf_ip_ballers_max_time(&ctx->ballers, data,
  948|    230|                                     CF_QUERY_TIMER_CONNECT);
  ------------------
  |  |  164|    230|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  949|    230|      return CURLE_OK;
  950|      0|    }
  951|    230|    case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  165|    230|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (951:5): [True: 230, False: 5.82k]
  ------------------
  952|    230|      struct curltime *when = pres2;
  953|    230|      *when = cf_ip_ballers_max_time(&ctx->ballers, data,
  954|    230|                                     CF_QUERY_TIMER_APPCONNECT);
  ------------------
  |  |  165|    230|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  955|    230|      return CURLE_OK;
  956|      0|    }
  957|  5.59k|    default:
  ------------------
  |  Branch (957:5): [True: 5.59k, False: 460]
  ------------------
  958|  5.59k|      break;
  959|  6.05k|    }
  960|  6.05k|  }
  961|       |
  962|  16.0k|  return cf->next ?
  ------------------
  |  Branch (962:10): [True: 10.5k, False: 5.59k]
  ------------------
  963|  10.5k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  964|  16.0k|    CURLE_UNKNOWN_OPTION;
  965|  16.5k|}
cf-ip-happy.c:cf_ip_ballers_max_time:
  652|    460|{
  653|    460|  struct curltime t, tmax;
  654|    460|  struct cf_ip_attempt *a;
  655|       |
  656|    460|  memset(&tmax, 0, sizeof(tmax));
  657|  1.09k|  for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (657:24): [True: 630, False: 460]
  ------------------
  658|    630|    memset(&t, 0, sizeof(t));
  659|    630|    if(a->cf && !a->cf->cft->query(a->cf, data, query, NULL, &t)) {
  ------------------
  |  Branch (659:8): [True: 0, False: 630]
  |  Branch (659:17): [True: 0, False: 0]
  ------------------
  660|      0|      if((t.tv_sec || t.tv_usec) && curlx_ptimediff_us(&t, &tmax) > 0)
  ------------------
  |  Branch (660:11): [True: 0, False: 0]
  |  Branch (660:23): [True: 0, False: 0]
  |  Branch (660:37): [True: 0, False: 0]
  ------------------
  661|      0|        tmax = t;
  662|      0|    }
  663|    630|  }
  664|    460|  return tmax;
  665|    460|}
cf-ip-happy.c:cf_ip_happy_create:
 1004|  5.55k|{
 1005|  5.55k|  struct cf_ip_happy_ctx *ctx = NULL;
 1006|  5.55k|  CURLcode result;
 1007|       |
 1008|  5.55k|  (void)data;
 1009|  5.55k|  (void)conn;
 1010|  5.55k|  *pcf = NULL;
 1011|  5.55k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|  5.55k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1012|  5.55k|  if(!ctx) {
  ------------------
  |  Branch (1012:6): [True: 0, False: 5.55k]
  ------------------
 1013|      0|    result = CURLE_OUT_OF_MEMORY;
 1014|      0|    goto out;
 1015|      0|  }
 1016|  5.55k|  result = cf_ip_ballers_init(&ctx->ballers, data,
 1017|  5.55k|                              origin, peer, transport_peer,
 1018|  5.55k|                              tunnel_peer, tunnel_transport,
 1019|  5.55k|                              data->set.happy_eyeballs_timeout,
 1020|  5.55k|                              IP_HE_MAX_CONCURRENT_ATTEMPTS);
  ------------------
  |  |  757|  5.55k|#define IP_HE_MAX_CONCURRENT_ATTEMPTS     6
  ------------------
 1021|  5.55k|  if(result)
  ------------------
  |  Branch (1021:6): [True: 0, False: 5.55k]
  ------------------
 1022|      0|    goto out;
 1023|       |
 1024|  5.55k|  result = Curl_cf_create(pcf, &Curl_cft_ip_happy, ctx);
 1025|       |
 1026|  5.55k|out:
 1027|  5.55k|  if(result) {
  ------------------
  |  Branch (1027:6): [True: 0, False: 5.55k]
  ------------------
 1028|       |    curlx_safefree(*pcf);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1029|      0|    cf_ip_happy_ctx_destroy(ctx, data);
 1030|      0|  }
 1031|  5.55k|  return result;
 1032|  5.55k|}
cf-ip-happy.c:cf_ip_ballers_init:
  343|  5.55k|{
  344|  5.55k|  memset(bs, 0, sizeof(*bs));
  345|  5.55k|  bs->cf_create = get_cf_create(transport_peer, !!tunnel_peer);
  346|  5.55k|  if(!bs->cf_create) {
  ------------------
  |  Branch (346:6): [True: 0, False: 5.55k]
  ------------------
  347|      0|    failf(data, "unsupported transport type %u%s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  348|      0|          transport_peer, tunnel_peer ? " to proxy" : "");
  ------------------
  |  Branch (348:27): [True: 0, False: 0]
  ------------------
  349|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
  350|      0|  }
  351|  5.55k|  Curl_peer_link(&bs->origin, origin);
  352|  5.55k|  Curl_peer_link(&bs->peer, peer);
  353|  5.55k|  bs->transport_peer = transport_peer;
  354|  5.55k|  Curl_peer_link(&bs->tunnel_peer, tunnel_peer);
  355|  5.55k|  bs->tunnel_transport = tunnel_transport;
  356|  5.55k|  bs->attempt_delay_ms = attempt_delay_ms;
  357|  5.55k|  bs->max_concurrent = max_concurrent;
  358|       |  bs->last_attempt_ai_family = AF_INET; /* so AF_INET6 is next */
  359|  5.55k|  return CURLE_OK;
  360|  5.55k|}
cf-ip-happy.c:get_cf_create:
   93|  5.55k|{
   94|  5.55k|  size_t i;
   95|  7.69k|  for(i = 0; i < CURL_ARRAYSIZE(transport_providers); ++i) {
  ------------------
  |  | 1303|  7.69k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (95:14): [True: 7.69k, False: 0]
  ------------------
   96|  7.69k|    if((transport == transport_providers[i].transport) &&
  ------------------
  |  Branch (96:8): [True: 7.61k, False: 81]
  ------------------
   97|  7.61k|       (tunnel == transport_providers[i].tunnel))
  ------------------
  |  Branch (97:8): [True: 5.55k, False: 2.06k]
  ------------------
   98|  5.55k|      return transport_providers[i].cf_create;
   99|  7.69k|  }
  100|      0|  return NULL;
  101|  5.55k|}

Curl_cf_setup_add:
  451|     58|{
  452|     58|  struct Curl_cfilter *cf;
  453|     58|  CURLcode result = CURLE_OK;
  454|       |
  455|     58|  DEBUGASSERT(data);
  ------------------
  |  | 1079|     58|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (455:3): [True: 0, False: 58]
  |  Branch (455:3): [True: 58, False: 0]
  ------------------
  456|     58|  result = cf_setup_create(&cf, data, transport, ssl_mode);
  457|     58|  if(result)
  ------------------
  |  Branch (457:6): [True: 0, False: 58]
  ------------------
  458|      0|    goto out;
  459|     58|  Curl_conn_cf_add(data, conn, sockindex, cf);
  460|     58|out:
  461|     58|  return result;
  462|     58|}
Curl_cf_setup_insert_after:
  468|  5.49k|{
  469|  5.49k|  struct Curl_cfilter *cf;
  470|  5.49k|  CURLcode result;
  471|       |
  472|  5.49k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  5.49k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (472:3): [True: 0, False: 5.49k]
  |  Branch (472:3): [True: 5.49k, False: 0]
  ------------------
  473|  5.49k|  result = cf_setup_create(&cf, data, transport, ssl_mode);
  474|  5.49k|  if(result)
  ------------------
  |  Branch (474:6): [True: 0, False: 5.49k]
  ------------------
  475|      0|    goto out;
  476|  5.49k|  Curl_conn_cf_insert_after(cf_at, cf);
  477|  5.49k|out:
  478|  5.49k|  return result;
  479|  5.49k|}
cf-setup.c:cf_setup_destroy:
  390|  5.55k|{
  391|  5.55k|  struct cf_setup_ctx *ctx = cf->ctx;
  392|       |
  393|  5.55k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  5.55k|  do {                                          \
  |  |  154|  5.55k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.55k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.55k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.55k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.55k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.55k]
  |  |  ------------------
  ------------------
  394|       |  curlx_safefree(ctx);
  ------------------
  |  | 1336|  5.55k|  do {                      \
  |  | 1337|  5.55k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  5.55k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  5.55k|    (ptr) = NULL;           \
  |  | 1339|  5.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 5.55k]
  |  |  ------------------
  ------------------
  395|  5.55k|}
cf-setup.c:cf_setup_connect:
  364|  6.49k|{
  365|  6.49k|  struct cf_setup_ctx *ctx = cf->ctx;
  366|  6.49k|  CURLcode result;
  367|       |
  368|       |  /* In some situations, a server/proxy may close the connection and
  369|       |   * we need to connect again (HTTP/1.x proxy auth, for example).
  370|       |   * We used to close the filters and reuse them for another attempt,
  371|       |   * however that complicates filter code and it is simpler to tear them
  372|       |   * all down and start over. */
  373|  6.49k|retry:
  374|  6.49k|  result = cf_setup_connect_steps(cf, data, done);
  375|       |
  376|  6.49k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (376:6): [True: 0, False: 6.49k]
  ------------------
  377|      0|    ++ctx->retry_count;
  378|      0|    if(ctx->retry_count > 5) /* arbitrary limit, better just timeout? */
  ------------------
  |  Branch (378:8): [True: 0, False: 0]
  ------------------
  379|      0|      return CURLE_COULDNT_CONNECT;
  380|       |
  381|      0|    CURL_TRC_CF(data, cf, "retrying connect, %d. time", ctx->retry_count);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  382|      0|    Curl_conn_cf_discard_chain(&cf->next, data);
  383|      0|    ctx->state = CF_SETUP_INIT;
  384|      0|    goto retry;
  385|      0|  }
  386|  6.49k|  return result;
  387|  6.49k|}
cf-setup.c:cf_setup_connect_steps:
  302|  6.49k|{
  303|  6.49k|  struct cf_setup_ctx *ctx = cf->ctx;
  304|  6.49k|  CURLcode result = CURLE_OK;
  305|       |
  306|  6.49k|  if(cf->connected) {
  ------------------
  |  Branch (306:6): [True: 0, False: 6.49k]
  ------------------
  307|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  308|      0|    return CURLE_OK;
  309|      0|  }
  310|       |
  311|       |  /* connect current sub-chain */
  312|  17.3k|connect_sub_chain:
  313|  17.3k|  VERBOSE(Curl_conn_trc_filters(data, cf->sockindex, "cf_setup_connect"));
  ------------------
  |  | 1613|  17.3k|#define VERBOSE(x) x
  ------------------
  314|       |
  315|  17.3k|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (315:6): [True: 11.7k, False: 5.55k]
  |  Branch (315:18): [True: 11.7k, False: 0]
  ------------------
  316|  11.7k|    result = Curl_conn_cf_connect(cf->next, data, done);
  317|  11.7k|    if(result || !*done)
  ------------------
  |  Branch (317:8): [True: 5.43k, False: 6.32k]
  |  Branch (317:18): [True: 1.06k, False: 5.26k]
  ------------------
  318|  6.49k|      return result;
  319|  11.7k|  }
  320|       |
  321|  10.8k|  result = cf_setup_add_ip_happy(cf, data);
  322|  10.8k|  if(result)
  ------------------
  |  Branch (322:6): [True: 0, False: 10.8k]
  ------------------
  323|      0|    return result;
  324|  10.8k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (324:6): [True: 0, False: 10.8k]
  |  Branch (324:19): [True: 5.55k, False: 5.26k]
  ------------------
  325|  5.55k|    goto connect_sub_chain;
  326|       |
  327|  5.26k|#ifndef CURL_DISABLE_PROXY
  328|  5.26k|  result = cf_setup_add_socks(cf, data);
  329|  5.26k|  if(result)
  ------------------
  |  Branch (329:6): [True: 0, False: 5.26k]
  ------------------
  330|      0|    return result;
  331|  5.26k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (331:6): [True: 0, False: 5.26k]
  |  Branch (331:19): [True: 177, False: 5.08k]
  ------------------
  332|    177|    goto connect_sub_chain;
  333|       |
  334|  5.08k|#ifndef CURL_DISABLE_HTTP
  335|  5.08k|  result = cf_setup_add_http_proxy(cf, data);
  336|  5.08k|  if(result)
  ------------------
  |  Branch (336:6): [True: 0, False: 5.08k]
  ------------------
  337|      0|    return result;
  338|  5.08k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (338:6): [True: 0, False: 5.08k]
  |  Branch (338:19): [True: 2.03k, False: 3.05k]
  ------------------
  339|  2.03k|    goto connect_sub_chain;
  340|  3.05k|#endif /* !CURL_DISABLE_HTTP */
  341|       |
  342|  3.05k|  result = cf_setup_add_haproxy(cf, data);
  343|  3.05k|  if(result)
  ------------------
  |  Branch (343:6): [True: 0, False: 3.05k]
  ------------------
  344|      0|    return result;
  345|  3.05k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (345:6): [True: 0, False: 3.05k]
  |  Branch (345:19): [True: 10, False: 3.04k]
  ------------------
  346|     10|    goto connect_sub_chain;
  347|  3.04k|#endif /* !CURL_DISABLE_PROXY */
  348|       |
  349|  3.04k|  result = cf_setup_add_origin_filters(cf, data);
  350|  3.04k|  if(result)
  ------------------
  |  Branch (350:6): [True: 5, False: 3.03k]
  ------------------
  351|      5|    return result;
  352|  3.03k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (352:6): [True: 0, False: 3.03k]
  |  Branch (352:19): [True: 3.03k, False: 0]
  ------------------
  353|  3.03k|    goto connect_sub_chain;
  354|       |
  355|      0|  ctx->state = CF_SETUP_DONE;
  356|      0|  cf->connected = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  357|       |  *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  358|      0|  return CURLE_OK;
  359|  3.03k|}
cf-setup.c:cf_setup_add_ip_happy:
  175|  10.8k|{
  176|  10.8k|  struct cf_setup_ctx *ctx = cf->ctx;
  177|  10.8k|  CURLcode result = CURLE_OK;
  178|       |
  179|  10.8k|  if(ctx->state < CF_SETUP_CNNCT_EYEBALLS) {
  ------------------
  |  Branch (179:6): [True: 5.55k, False: 5.26k]
  ------------------
  180|       |    /* What is the first hop we directly connect to and what transport
  181|       |     * do we use for it? Only on the first hop we can do Happy Eyeballs.
  182|       |     * first_origin and first_peer differ on --connect-to. */
  183|  5.55k|    struct Curl_peer *first_origin =
  184|  5.55k|      conn_get_first_origin(cf->conn, cf->sockindex);
  185|  5.55k|    struct Curl_peer *first_peer =
  186|  5.55k|      Curl_conn_get_first_peer(cf->conn, cf->sockindex);
  187|  5.55k|    struct Curl_peer *tunnel_peer = NULL;
  188|  5.55k|    uint8_t first_transport = ctx->transport;
  189|       |
  190|  5.55k|    if(!first_peer)
  ------------------
  |  Branch (190:8): [True: 0, False: 5.55k]
  ------------------
  191|      0|      return CURLE_FAILED_INIT;
  192|       |
  193|  5.55k|#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
  194|  5.55k|    if(cf->conn->http_proxy.peer && !cf->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (194:8): [True: 2.06k, False: 3.48k]
  |  Branch (194:37): [True: 2.06k, False: 0]
  ------------------
  195|  2.06k|      first_transport =
  196|  2.06k|        Curl_http_proxy_transport(cf->conn->http_proxy.proxytype);
  197|  2.06k|      tunnel_peer = Curl_conn_get_destination(cf->conn, cf->sockindex);
  198|  2.06k|      if((first_transport == TRNSPRT_QUIC) && cf->conn->socks_proxy.peer) {
  ------------------
  |  |  239|  2.06k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (198:10): [True: 0, False: 2.06k]
  |  Branch (198:47): [True: 0, False: 0]
  ------------------
  199|      0|        failf(data, "HTTP/3 proxy not possible via SOCKS");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  200|      0|        return CURLE_UNSUPPORTED_PROTOCOL;
  201|      0|      }
  202|  2.06k|    }
  203|  5.55k|#endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */
  204|       |
  205|  5.55k|    result = Curl_cf_ip_happy_insert_after(cf, data, first_origin, first_peer,
  206|  5.55k|                                           first_transport,
  207|  5.55k|                                           tunnel_peer, ctx->transport);
  208|  5.55k|    if(result) {
  ------------------
  |  Branch (208:8): [True: 0, False: 5.55k]
  ------------------
  209|      0|      CURL_TRC_CF(data, cf, "adding happy eyeballs failed -> %d", (int)result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  210|      0|      return result;
  211|      0|    }
  212|       |
  213|  5.55k|    if(tunnel_peer && (first_transport == TRNSPRT_QUIC)) {
  ------------------
  |  |  239|  2.06k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (213:8): [True: 2.06k, False: 3.48k]
  |  Branch (213:23): [True: 0, False: 2.06k]
  ------------------
  214|      0|      CURL_TRC_CF(data, cf, "happy eyeballing to HTTP/3 proxy %s:%u",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  215|      0|                  first_peer->hostname, first_peer->port);
  216|      0|      ctx->state = CF_SETUP_CNNCT_HTTP_PROXY;
  217|      0|    }
  218|  5.55k|    else {
  219|  5.55k|      CURL_TRC_CF(data, cf, "happy eyeballing to %s %s:%u",
  ------------------
  |  |  153|  5.55k|  do {                                          \
  |  |  154|  5.55k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.55k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.55k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.55k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.55k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  5.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.55k]
  |  |  ------------------
  ------------------
  220|  5.55k|                  tunnel_peer ? "proxy" : "origin",
  221|  5.55k|                  first_peer->hostname, first_peer->port);
  222|  5.55k|      ctx->state = CF_SETUP_CNNCT_EYEBALLS;
  223|  5.55k|    }
  224|  5.55k|  }
  225|  10.8k|  return result;
  226|  10.8k|}
cf-setup.c:conn_get_first_origin:
  163|  5.55k|{
  164|  5.55k|#ifndef CURL_DISABLE_PROXY
  165|  5.55k|  if(conn->socks_proxy.peer)
  ------------------
  |  Branch (165:6): [True: 279, False: 5.27k]
  ------------------
  166|    279|    return conn->socks_proxy.peer;
  167|  5.27k|  if(conn->http_proxy.peer)
  ------------------
  |  Branch (167:6): [True: 2.04k, False: 3.22k]
  ------------------
  168|  2.04k|    return conn->http_proxy.peer;
  169|  3.22k|#endif
  170|  3.22k|  return (sockindex == SECONDARYSOCKET) ? conn->origin2 : conn->origin;
  ------------------
  |  |  234|  3.22k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (170:10): [True: 0, False: 3.22k]
  ------------------
  171|  5.27k|}
cf-setup.c:cf_setup_add_socks:
   86|  5.26k|{
   87|  5.26k|  struct cf_setup_ctx *ctx = cf->ctx;
   88|  5.26k|  CURLcode result = CURLE_OK;
   89|  5.26k|  if(ctx->state < CF_SETUP_CNNCT_SOCKS && cf->conn->socks_proxy.peer) {
  ------------------
  |  Branch (89:6): [True: 5.24k, False: 18]
  |  Branch (89:43): [True: 177, False: 5.06k]
  ------------------
   90|       |    /* Add a SOCKS proxy to go through `first_peer` to `second_peer`*/
   91|    177|    struct Curl_peer *second_peer;
   92|       |
   93|    177|    if(cf->conn->http_proxy.peer)
  ------------------
  |  Branch (93:8): [True: 23, False: 154]
  ------------------
   94|     23|      second_peer = cf->conn->http_proxy.peer;
   95|    154|    else
   96|    154|      second_peer = Curl_conn_get_destination(cf->conn, cf->sockindex);
   97|    177|    if(!second_peer)
  ------------------
  |  Branch (97:8): [True: 0, False: 177]
  ------------------
   98|      0|      return CURLE_FAILED_INIT;
   99|       |
  100|    177|    result = Curl_cf_socks_proxy_insert_after(
  101|    177|      cf, data, second_peer, cf->conn->ip_version,
  102|    177|      cf->conn->socks_proxy.proxytype,
  103|    177|      cf->conn->socks_proxy.creds);
  104|    177|    if(result) {
  ------------------
  |  Branch (104:8): [True: 0, False: 177]
  ------------------
  105|      0|      CURL_TRC_CF(data, cf, "adding SOCKS filter failed -> %d", (int)result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  106|      0|      return result;
  107|      0|    }
  108|       |
  109|    177|    CURL_TRC_CF(data, cf, "added SOCKS filter to %s:%u",
  ------------------
  |  |  153|    177|  do {                                          \
  |  |  154|    177|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    177|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    354|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 177, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 177]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    354|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    177|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    177|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    177|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 177]
  |  |  ------------------
  ------------------
  110|    177|                second_peer->hostname, second_peer->port);
  111|    177|    ctx->state = CF_SETUP_CNNCT_SOCKS;
  112|    177|  }
  113|  5.26k|  return result;
  114|  5.26k|}
cf-setup.c:cf_setup_add_http_proxy:
  119|  5.08k|{
  120|  5.08k|  struct cf_setup_ctx *ctx = cf->ctx;
  121|  5.08k|  CURLcode result = CURLE_OK;
  122|       |
  123|  5.08k|  if(ctx->state < CF_SETUP_CNNCT_HTTP_PROXY &&
  ------------------
  |  Branch (123:6): [True: 5.07k, False: 14]
  ------------------
  124|  5.07k|     cf->conn->http_proxy.peer && !cf->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (124:6): [True: 2.03k, False: 3.03k]
  |  Branch (124:35): [True: 2.03k, False: 0]
  ------------------
  125|  2.03k|    struct Curl_peer *peer = cf->conn->http_proxy.peer;
  126|  2.03k|    struct Curl_peer *tunnel_peer =
  127|  2.03k|      Curl_conn_get_destination(cf->conn, cf->sockindex);
  128|       |
  129|  2.03k|#ifdef USE_SSL
  130|  2.03k|    if(CURL_PROXY_IS_HTTPS(cf->conn->http_proxy.proxytype) &&
  ------------------
  |  |   42|  4.06k|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  794|  2.03k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 433, False: 1.60k]
  |  |  ------------------
  |  |   43|  2.03k|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  796|  1.60k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (43:4): [True: 1, False: 1.60k]
  |  |  ------------------
  |  |   44|  4.06k|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  805|  1.60k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (44:4): [True: 0, False: 1.60k]
  |  |  ------------------
  ------------------
  131|    434|       !Curl_conn_is_ssl(cf->conn, cf->sockindex)) {
  ------------------
  |  Branch (131:8): [True: 434, False: 0]
  ------------------
  132|    434|      result = Curl_cf_ssl_proxy_insert_after(
  133|    434|        cf, data, cf->conn->http_proxy.peer);
  134|    434|      if(result) {
  ------------------
  |  Branch (134:10): [True: 0, False: 434]
  ------------------
  135|      0|        CURL_TRC_CF(data, cf, "adding SSL filter for HTTP proxy failed -> %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  136|      0|                    (int)result);
  137|      0|        return result;
  138|      0|      }
  139|    434|      CURL_TRC_CF(data, cf, "added SSL filter for HTTP proxy");
  ------------------
  |  |  153|    434|  do {                                          \
  |  |  154|    434|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    434|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    868|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 434, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    868|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    434|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    434|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    434|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 434]
  |  |  ------------------
  ------------------
  140|    434|    }
  141|  2.03k|#endif /* USE_SSL */
  142|       |
  143|  2.03k|    result = Curl_cf_http_proxy_insert_after(
  144|  2.03k|      cf, data, peer, tunnel_peer,
  145|  2.03k|      ctx->transport, cf->conn->http_proxy.proxytype);
  146|  2.03k|    if(result) {
  ------------------
  |  Branch (146:8): [True: 0, False: 2.03k]
  ------------------
  147|      0|      CURL_TRC_CF(data, cf, "adding HTTP proxy tunnel filter failed -> %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  148|      0|                  (int)result);
  149|      0|      return result;
  150|      0|    }
  151|  2.03k|    CURL_TRC_CF(data, cf, "added HTTP proxy tunnel filter");
  ------------------
  |  |  153|  2.03k|  do {                                          \
  |  |  154|  2.03k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  2.03k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  4.06k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2.03k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  4.06k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.03k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.03k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.03k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.03k]
  |  |  ------------------
  ------------------
  152|  2.03k|    ctx->state = CF_SETUP_CNNCT_HTTP_PROXY;
  153|  2.03k|  }
  154|  5.08k|  return result;
  155|  5.08k|}
cf-setup.c:cf_setup_add_haproxy:
   61|  3.05k|{
   62|  3.05k|  struct cf_setup_ctx *ctx = cf->ctx;
   63|  3.05k|  CURLcode result = CURLE_OK;
   64|       |
   65|  3.05k|  if(ctx->state < CF_SETUP_CNNCT_HAPROXY) {
  ------------------
  |  Branch (65:6): [True: 3.04k, False: 9]
  ------------------
   66|  3.04k|    if(data->set.haproxyprotocol) {
  ------------------
  |  Branch (66:8): [True: 10, False: 3.03k]
  ------------------
   67|     10|      if(ctx->transport == TRNSPRT_QUIC) {
  ------------------
  |  |  239|     10|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (67:10): [True: 0, False: 10]
  ------------------
   68|      0|        failf(data, "haproxy protocol does not support QUIC");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
   69|      0|        return CURLE_UNSUPPORTED_PROTOCOL;
   70|      0|      }
   71|     10|      result = Curl_cf_haproxy_insert_after(cf, data);
   72|     10|      if(result) {
  ------------------
  |  Branch (72:10): [True: 0, False: 10]
  ------------------
   73|      0|        CURL_TRC_CF(data, cf, "adding HAPROXY filter failed -> %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
   74|      0|                    (int)result);
   75|      0|        return result;
   76|      0|      }
   77|     10|      CURL_TRC_CF(data, cf, "added HAPROXY filter");
  ------------------
  |  |  153|     10|  do {                                          \
  |  |  154|     10|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     10|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     20|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 10, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     20|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     10|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     10|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     10|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10]
  |  |  ------------------
  ------------------
   78|     10|    }
   79|  3.04k|    ctx->state = CF_SETUP_CNNCT_HAPROXY;
   80|  3.04k|  }
   81|  3.05k|  return result;
   82|  3.05k|}
cf-setup.c:cf_setup_add_origin_filters:
  230|  3.04k|{
  231|  3.04k|  struct cf_setup_ctx *ctx = cf->ctx;
  232|  3.04k|  CURLcode result = CURLE_OK;
  233|       |
  234|  3.04k|  (void)data; /* not used in all builds */
  235|  3.04k|  if(ctx->state < CF_SETUP_CNNCT_SSL) {
  ------------------
  |  Branch (235:6): [True: 3.04k, False: 0]
  ------------------
  236|       |#if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3) && \
  237|       |    !defined(CURL_DISABLE_PROXY)
  238|       |
  239|       |    /* Wanting QUIC with an HTTP tunneling filter, we now need to add
  240|       |     * the QUIC filter on top. Without tunneling, this has already
  241|       |     * happened in the Happy Eyeball filter. */
  242|       |    if(ctx->transport == TRNSPRT_QUIC &&
  243|       |       cf->conn->http_proxy.peer && !cf->conn->bits.origin_is_proxy) {
  244|       |      struct Curl_peer *origin = Curl_conn_get_origin(cf->conn, cf->sockindex);
  245|       |      struct Curl_peer *peer =
  246|       |        Curl_conn_get_destination(cf->conn, cf->sockindex);
  247|       |
  248|       |      result = Curl_cf_capsule_insert_after(cf, data);
  249|       |      if(result) {
  250|       |        CURL_TRC_CF(data, cf, "adding capsule filter failed -> %d",
  251|       |                    (int)result);
  252|       |        return result;
  253|       |      }
  254|       |      result = Curl_cf_quic_insert_after(cf, data, origin, peer);
  255|       |      if(result) {
  256|       |        CURL_TRC_CF(data, cf, "adding QUIC filter failed -> %d", (int)result);
  257|       |        return result;
  258|       |      }
  259|       |      CURL_TRC_CF(data, cf, "added QUIC filter for origin");
  260|       |    }
  261|       |    else
  262|       |#endif /* !CURL_DISABLE_HTTP && USE_HTTP3 && CURL_DISABLE_PROXY */
  263|  3.04k|#ifdef USE_SSL
  264|  3.04k|    if((ctx->ssl_mode == CURL_CF_SSL_ENABLE ||
  ------------------
  |  |  357|  6.08k|#define CURL_CF_SSL_ENABLE   1
  ------------------
  |  Branch (264:9): [True: 3.04k, False: 3]
  ------------------
  265|      3|        (ctx->ssl_mode != CURL_CF_SSL_DISABLE &&
  ------------------
  |  |  356|      6|#define CURL_CF_SSL_DISABLE  0
  ------------------
  |  Branch (265:10): [True: 3, False: 0]
  ------------------
  266|      3|         cf->conn->scheme->flags & PROTOPT_SSL)) && /* we want SSL */
  ------------------
  |  |  207|      3|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (266:10): [True: 3, False: 0]
  ------------------
  267|  3.04k|       !Curl_conn_is_ssl(cf->conn, cf->sockindex)) { /* it is missing */
  ------------------
  |  Branch (267:8): [True: 3.04k, False: 0]
  ------------------
  268|       |
  269|  3.04k|#ifndef CURL_DISABLE_PROXY
  270|  3.04k|      if(cf->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (270:10): [True: 0, False: 3.04k]
  ------------------
  271|      0|        result = Curl_cf_ssl_proxy_insert_after(cf, data, cf->conn->origin);
  272|      0|      }
  273|  3.04k|      else
  274|  3.04k|#endif
  275|  3.04k|      {
  276|       |        /* FTP is a bitch. Wherever we really connect to on the DATA
  277|       |         * (secondary) connection, many servers require TLS sessions reuse
  278|       |         * to prove they are talking to the same client.
  279|       |         * For the TLS session lookup to work, we need to instantiate
  280|       |         * the SSL filter with the same peers as FIRSTSOCKET. See #22225
  281|       |         * Meaning: cf->sockindex does not matter here. */
  282|  3.04k|        result = Curl_cf_ssl_insert_after(cf, data,
  283|  3.04k|          Curl_conn_get_origin(cf->conn, FIRSTSOCKET),
  ------------------
  |  |  233|  3.04k|#define FIRSTSOCKET     0
  ------------------
  284|  3.04k|          Curl_conn_get_destination(cf->conn, FIRSTSOCKET));
  ------------------
  |  |  233|  3.04k|#define FIRSTSOCKET     0
  ------------------
  285|  3.04k|      }
  286|  3.04k|      if(result) {
  ------------------
  |  Branch (286:10): [True: 5, False: 3.03k]
  ------------------
  287|      5|        CURL_TRC_CF(data, cf, "adding SSL filter for origin failed -> %d",
  ------------------
  |  |  153|      5|  do {                                          \
  |  |  154|      5|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      5|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     10|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     10|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      5|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      5|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  288|      5|                    (int)result);
  289|      5|        return result;
  290|      5|      }
  291|  3.03k|      CURL_TRC_CF(data, cf, "added SSL filter for origin");
  ------------------
  |  |  153|  3.03k|  do {                                          \
  |  |  154|  3.03k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.03k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.07k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.03k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.07k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.03k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.03k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.03k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.03k]
  |  |  ------------------
  ------------------
  292|  3.03k|    }
  293|  3.03k|#endif /* USE_SSL */
  294|  3.03k|    ctx->state = CF_SETUP_CNNCT_SSL;
  295|  3.03k|  }
  296|  3.03k|  return result;
  297|  3.04k|}
cf-setup.c:cf_setup_create:
  418|  5.55k|{
  419|  5.55k|  struct Curl_cfilter *cf = NULL;
  420|  5.55k|  struct cf_setup_ctx *ctx;
  421|  5.55k|  CURLcode result = CURLE_OK;
  422|       |
  423|  5.55k|  (void)data;
  424|  5.55k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|  5.55k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  425|  5.55k|  if(!ctx) {
  ------------------
  |  Branch (425:6): [True: 0, False: 5.55k]
  ------------------
  426|      0|    result = CURLE_OUT_OF_MEMORY;
  427|      0|    goto out;
  428|      0|  }
  429|  5.55k|  ctx->state = CF_SETUP_INIT;
  430|  5.55k|  ctx->ssl_mode = ssl_mode;
  431|  5.55k|  ctx->transport = transport;
  432|       |
  433|  5.55k|  result = Curl_cf_create(&cf, &Curl_cft_setup, ctx);
  434|  5.55k|  if(result)
  ------------------
  |  Branch (434:6): [True: 0, False: 5.55k]
  ------------------
  435|      0|    goto out;
  436|  5.55k|  ctx = NULL;
  437|       |
  438|  5.55k|out:
  439|  5.55k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (439:10): [True: 0, False: 5.55k]
  ------------------
  440|  5.55k|  if(ctx) {
  ------------------
  |  Branch (440:6): [True: 0, False: 5.55k]
  ------------------
  441|      0|    curlx_free(ctx);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  442|      0|  }
  443|  5.55k|  return result;
  444|  5.55k|}

sockaddr2string:
   94|  10.9k|{
   95|  10.9k|  struct sockaddr_in *si = NULL;
   96|  10.9k|#ifdef USE_IPV6
   97|  10.9k|  struct sockaddr_in6 *si6 = NULL;
   98|  10.9k|#endif
   99|  10.9k|#ifdef USE_UNIX_SOCKETS
  100|  10.9k|  struct sockaddr_un *su = NULL;
  101|       |#else
  102|       |  (void)salen;
  103|       |#endif
  104|       |
  105|  10.9k|  switch(sa->sa_family) {
  106|  5.43k|  case AF_INET:
  ------------------
  |  Branch (106:3): [True: 5.43k, False: 5.51k]
  ------------------
  107|  5.43k|    si = (struct sockaddr_in *)(void *)sa;
  108|  5.43k|    if(curlx_inet_ntop(sa->sa_family, &si->sin_addr, addr, MAX_IPADR_LEN)) {
  ------------------
  |  |   41|  5.43k|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  |  Branch (108:8): [True: 5.43k, False: 0]
  ------------------
  109|  5.43k|      *port = ntohs(si->sin_port);
  110|  5.43k|      return TRUE;
  ------------------
  |  | 1053|  5.43k|#define TRUE true
  ------------------
  111|  5.43k|    }
  112|      0|    break;
  113|      0|#ifdef USE_IPV6
  114|    246|  case AF_INET6:
  ------------------
  |  Branch (114:3): [True: 246, False: 10.7k]
  ------------------
  115|    246|    si6 = (struct sockaddr_in6 *)(void *)sa;
  116|    246|    if(curlx_inet_ntop(sa->sa_family, &si6->sin6_addr, addr, MAX_IPADR_LEN)) {
  ------------------
  |  |   41|    246|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  |  Branch (116:8): [True: 246, False: 0]
  ------------------
  117|    246|      *port = ntohs(si6->sin6_port);
  118|    246|      return TRUE;
  ------------------
  |  | 1053|    246|#define TRUE true
  ------------------
  119|    246|    }
  120|      0|    break;
  121|      0|#endif
  122|      0|#ifdef USE_UNIX_SOCKETS
  123|  5.27k|  case AF_UNIX:
  ------------------
  |  Branch (123:3): [True: 5.27k, False: 5.67k]
  ------------------
  124|  5.27k|    if(salen > (curl_socklen_t)sizeof(CURL_SA_FAMILY_T)) {
  ------------------
  |  Branch (124:8): [True: 27, False: 5.24k]
  ------------------
  125|     27|      su = (struct sockaddr_un *)sa;
  126|     27|      curl_msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
  ------------------
  |  |   41|     27|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  127|     27|    }
  128|  5.24k|    else
  129|  5.24k|      addr[0] = 0; /* socket with no name */
  130|  5.27k|    *port = 0;
  131|  5.27k|    return TRUE;
  ------------------
  |  | 1053|  5.27k|#define TRUE true
  ------------------
  132|      0|#endif
  133|      0|  default:
  ------------------
  |  Branch (133:3): [True: 0, False: 10.9k]
  ------------------
  134|      0|    break;
  135|  10.9k|  }
  136|       |
  137|      0|  addr[0] = '\0';
  138|      0|  *port = 0;
  139|      0|  errno = SOCKEAFNOSUPPORT;
  ------------------
  |  | 1122|      0|#define SOCKEAFNOSUPPORT  EAFNOSUPPORT
  ------------------
  140|       |  return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  141|  10.9k|}
Curl_socket_addr_from_ai:
  338|  5.59k|{
  339|       |  /*
  340|       |   * The Curl_sockaddr_ex structure is libcurl's external API
  341|       |   * curl_sockaddr structure with enough space available to directly hold
  342|       |   * any protocol-specific address structures. The variable declared here
  343|       |   * will be used to pass / receive data to/from the fopensocket callback
  344|       |   * if this has been set, before that, it is initialized from parameters.
  345|       |   */
  346|  5.59k|  addr->family = ai->ai_family;
  347|  5.59k|  addr->socktype = Curl_socktype_for_transport(transport);
  348|  5.59k|  addr->protocol = Curl_protocol_for_transport(transport);
  349|  5.59k|  addr->addrlen = (unsigned int)ai->ai_addrlen;
  350|       |
  351|  5.59k|  DEBUGASSERT(addr->addrlen <= sizeof(addr->curl_sa_addrbuf));
  ------------------
  |  | 1079|  5.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (351:3): [True: 0, False: 5.59k]
  |  Branch (351:3): [True: 5.59k, False: 0]
  ------------------
  352|  5.59k|  if(addr->addrlen > sizeof(addr->curl_sa_addrbuf))
  ------------------
  |  |   36|  5.59k|#define curl_sa_addrbuf addr.buf
  ------------------
  |  Branch (352:6): [True: 0, False: 5.59k]
  ------------------
  353|      0|    return CURLE_TOO_LARGE;
  354|       |
  355|  5.59k|  memcpy(&addr->curl_sa_addrbuf, ai->ai_addr, addr->addrlen);
  ------------------
  |  |   36|  5.59k|#define curl_sa_addrbuf addr.buf
  ------------------
  356|  5.59k|  return CURLE_OK;
  357|  5.59k|}
Curl_parse_interface:
  581|    304|{
  582|    304|  static const char if_prefix[] = "if!";
  583|    304|  static const char host_prefix[] = "host!";
  584|    304|  static const char if_host_prefix[] = "ifhost!";
  585|    304|  size_t len;
  586|       |
  587|    304|  DEBUGASSERT(dev);
  ------------------
  |  | 1079|    304|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (587:3): [True: 0, False: 304]
  |  Branch (587:3): [True: 304, False: 0]
  ------------------
  588|    304|  DEBUGASSERT(iface);
  ------------------
  |  | 1079|    304|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (588:3): [True: 0, False: 304]
  |  Branch (588:3): [True: 304, False: 0]
  ------------------
  589|    304|  DEBUGASSERT(host);
  ------------------
  |  | 1079|    304|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (589:3): [True: 0, False: 304]
  |  Branch (589:3): [True: 304, False: 0]
  ------------------
  590|       |
  591|    304|  len = strlen(input);
  592|    304|  if(len > 512)
  ------------------
  |  Branch (592:6): [True: 2, False: 302]
  ------------------
  593|      2|    return CURLE_BAD_FUNCTION_ARGUMENT;
  594|       |
  595|    302|  if(!strncmp(if_prefix, input, strlen(if_prefix))) {
  ------------------
  |  Branch (595:6): [True: 9, False: 293]
  ------------------
  596|      9|    input += strlen(if_prefix);
  597|      9|    if(!*input)
  ------------------
  |  Branch (597:8): [True: 1, False: 8]
  ------------------
  598|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
  599|      8|    *iface = curlx_memdup0(input, len - strlen(if_prefix));
  600|      8|    return *iface ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (600:12): [True: 8, False: 0]
  ------------------
  601|      9|  }
  602|    293|  else if(!strncmp(host_prefix, input, strlen(host_prefix))) {
  ------------------
  |  Branch (602:11): [True: 9, False: 284]
  ------------------
  603|      9|    input += strlen(host_prefix);
  604|      9|    if(!*input)
  ------------------
  |  Branch (604:8): [True: 1, False: 8]
  ------------------
  605|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
  606|      8|    *host = curlx_memdup0(input, len - strlen(host_prefix));
  607|      8|    return *host ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (607:12): [True: 8, False: 0]
  ------------------
  608|      9|  }
  609|    284|  else if(!strncmp(if_host_prefix, input, strlen(if_host_prefix))) {
  ------------------
  |  Branch (609:11): [True: 8, False: 276]
  ------------------
  610|      8|    const char *host_part;
  611|      8|    input += strlen(if_host_prefix);
  612|      8|    len -= strlen(if_host_prefix);
  613|      8|    host_part = memchr(input, '!', len);
  614|      8|    if(!host_part || !*(host_part + 1))
  ------------------
  |  Branch (614:8): [True: 1, False: 7]
  |  Branch (614:22): [True: 1, False: 6]
  ------------------
  615|      2|      return CURLE_BAD_FUNCTION_ARGUMENT;
  616|      6|    *iface = curlx_memdup0(input, host_part - input);
  617|      6|    if(!*iface)
  ------------------
  |  Branch (617:8): [True: 0, False: 6]
  ------------------
  618|      0|      return CURLE_OUT_OF_MEMORY;
  619|      6|    ++host_part;
  620|      6|    *host = curlx_memdup0(host_part, len - (host_part - input));
  621|      6|    if(!*host) {
  ------------------
  |  Branch (621:8): [True: 0, False: 6]
  ------------------
  622|      0|      curlx_safefree(*iface);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  623|      0|      return CURLE_OUT_OF_MEMORY;
  624|      0|    }
  625|      6|    return CURLE_OK;
  626|      6|  }
  627|       |
  628|    276|  if(!*input)
  ------------------
  |  Branch (628:6): [True: 1, False: 275]
  ------------------
  629|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  630|    275|  *dev = curlx_memdup0(input, len);
  631|    275|  return *dev ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (631:10): [True: 275, False: 0]
  ------------------
  632|    276|}
Curl_cf_tcp_create:
 1809|  5.56k|{
 1810|  5.56k|  struct cf_socket_ctx *ctx = NULL;
 1811|  5.56k|  struct Curl_cfilter *cf = NULL;
 1812|  5.56k|  CURLcode result;
 1813|       |
 1814|  5.56k|  (void)data;
 1815|  5.56k|  (void)origin;
 1816|  5.56k|  (void)conn;
 1817|  5.56k|  (void)tunnel_peer;
 1818|  5.56k|  (void)tunnel_transport;
 1819|  5.56k|  DEBUGASSERT(transport_peer == TRNSPRT_TCP);
  ------------------
  |  | 1079|  5.56k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1819:3): [True: 0, False: 5.56k]
  |  Branch (1819:3): [True: 5.56k, False: 0]
  ------------------
 1820|  5.56k|  if(!addr) {
  ------------------
  |  Branch (1820:6): [True: 0, False: 5.56k]
  ------------------
 1821|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
 1822|      0|    goto out;
 1823|      0|  }
 1824|       |
 1825|  5.56k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|  5.56k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1826|  5.56k|  if(!ctx) {
  ------------------
  |  Branch (1826:6): [True: 0, False: 5.56k]
  ------------------
 1827|      0|    result = CURLE_OUT_OF_MEMORY;
 1828|      0|    goto out;
 1829|      0|  }
 1830|       |
 1831|  5.56k|  result = cf_socket_ctx_init(ctx, peer, addr, transport_peer);
 1832|  5.56k|  if(result)
  ------------------
  |  Branch (1832:6): [True: 0, False: 5.56k]
  ------------------
 1833|      0|    goto out;
 1834|       |
 1835|  5.56k|  result = Curl_cf_create(&cf, &Curl_cft_tcp, ctx);
 1836|       |
 1837|  5.56k|out:
 1838|  5.56k|  *pcf = (!result) ? cf : NULL;
  ------------------
  |  Branch (1838:10): [True: 5.56k, False: 0]
  ------------------
 1839|  5.56k|  if(result) {
  ------------------
  |  Branch (1839:6): [True: 0, False: 5.56k]
  ------------------
 1840|      0|    curlx_safefree(cf);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1841|      0|    cf_socket_ctx_free(ctx);
 1842|      0|  }
 1843|       |
 1844|  5.56k|  return result;
 1845|  5.56k|}
Curl_cf_unix_create:
 2042|     27|{
 2043|     27|  struct cf_socket_ctx *ctx = NULL;
 2044|     27|  struct Curl_cfilter *cf = NULL;
 2045|     27|  CURLcode result;
 2046|       |
 2047|     27|  (void)data;
 2048|     27|  (void)origin;
 2049|     27|  (void)conn;
 2050|     27|  (void)tunnel_peer;
 2051|     27|  (void)tunnel_transport;
 2052|     27|  DEBUGASSERT(transport_peer == TRNSPRT_UNIX);
  ------------------
  |  | 1079|     27|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2052:3): [True: 0, False: 27]
  |  Branch (2052:3): [True: 27, False: 0]
  ------------------
 2053|     27|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|     27|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 2054|     27|  if(!ctx) {
  ------------------
  |  Branch (2054:6): [True: 0, False: 27]
  ------------------
 2055|      0|    result = CURLE_OUT_OF_MEMORY;
 2056|      0|    goto out;
 2057|      0|  }
 2058|       |
 2059|     27|  result = cf_socket_ctx_init(ctx, peer, addr, transport_peer);
 2060|     27|  if(result)
  ------------------
  |  Branch (2060:6): [True: 0, False: 27]
  ------------------
 2061|      0|    goto out;
 2062|       |
 2063|     27|  result = Curl_cf_create(&cf, &Curl_cft_unix, ctx);
 2064|       |
 2065|     27|out:
 2066|     27|  *pcf = (!result) ? cf : NULL;
  ------------------
  |  Branch (2066:10): [True: 27, False: 0]
  ------------------
 2067|     27|  if(result) {
  ------------------
  |  Branch (2067:6): [True: 0, False: 27]
  ------------------
 2068|      0|    curlx_safefree(cf);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2069|      0|    cf_socket_ctx_free(ctx);
 2070|      0|  }
 2071|       |
 2072|     27|  return result;
 2073|     27|}
cf-socket.c:socket_open:
  414|  5.59k|{
  415|  5.59k|  char errbuf[STRERROR_LEN];
  416|       |
  417|  5.59k|#ifdef SOCK_CLOEXEC
  418|  5.59k|  addr->socktype |= SOCK_CLOEXEC;
  419|  5.59k|#endif
  420|       |
  421|  5.59k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  5.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (421:3): [True: 0, False: 5.59k]
  |  Branch (421:3): [True: 5.59k, False: 0]
  ------------------
  422|  5.59k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1079|  5.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (422:3): [True: 0, False: 5.59k]
  |  Branch (422:3): [True: 5.59k, False: 0]
  ------------------
  423|  5.59k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (423:6): [True: 5.52k, False: 72]
  ------------------
  424|       |    /*
  425|       |     * If the opensocket callback is set, all the destination address
  426|       |     * information is passed to the callback. Depending on this information the
  427|       |     * callback may opt to abort the connection, this is indicated returning
  428|       |     * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When
  429|       |     * the callback returns a valid socket the destination address information
  430|       |     * might have been changed and this 'new' address will actually be used
  431|       |     * here to connect.
  432|       |     */
  433|  5.52k|    struct Curl_mapi_guard guard;
  434|  5.52k|    CURL_CBAPI_START(&guard, data, easy_fopensocket);
  ------------------
  |  |  195|  5.52k|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  435|  5.52k|    *sockfd = data->set.fopensocket(data->set.opensocket_client,
  436|  5.52k|                                    CURLSOCKTYPE_IPCXN,
  437|  5.52k|                                    (struct curl_sockaddr *)addr);
  438|  5.52k|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|  5.52k|  Curl_cbapi_leave(g)
  ------------------
  439|  5.52k|  }
  440|     72|  else {
  441|       |    /* opensocket callback not set, so create the socket now */
  442|     72|#ifdef DEBUGBUILD
  443|     72|    if((addr->family == AF_INET6) && getenv("CURL_DBG_SOCK_FAIL_IPV6")) {
  ------------------
  |  Branch (443:8): [True: 34, False: 38]
  |  Branch (443:38): [True: 0, False: 34]
  ------------------
  444|      0|      failf(data, "CURL_DBG_SOCK_FAIL_IPV6: failed to open socket");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  445|      0|      return CURLE_COULDNT_CONNECT;
  446|      0|    }
  447|     72|#endif
  448|     72|    *sockfd = CURL_SOCKET(addr->family, addr->socktype, addr->protocol);
  ------------------
  |  | 1431|     72|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  449|     72|    if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  |  145|     72|#define CURL_SOCKET_BAD (-1)
  ------------------
                  if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  | 1093|      0|#define SOCKERRNO         errno
  ------------------
                  if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  | 1131|      0|#define SOCKENOMEM        ENOMEM
  ------------------
  |  Branch (449:8): [True: 0, False: 72]
  |  Branch (449:40): [True: 0, False: 0]
  ------------------
  450|      0|      return CURLE_OUT_OF_MEMORY;
  451|     72|  }
  452|       |
  453|  5.59k|  if(*sockfd == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.59k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (453:6): [True: 0, False: 5.59k]
  ------------------
  454|       |    /* no socket, no connection */
  455|      0|    failf(data, "failed to open socket: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  456|      0|          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  ------------------
  |  | 1093|      0|#define SOCKERRNO         errno
  ------------------
  457|      0|    return CURLE_COULDNT_CONNECT;
  458|      0|  }
  459|       |
  460|       |#ifdef USE_SO_NOSIGPIPE
  461|       |  if(Curl_sock_nosigpipe(*sockfd) < 0) {
  462|       |    failf(data, "setsockopt enable SO_NOSIGPIPE: %s",
  463|       |          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  464|       |    sclose(*sockfd);
  465|       |    *sockfd = CURL_SOCKET_BAD;
  466|       |    return CURLE_COULDNT_CONNECT;
  467|       |  }
  468|       |#endif /* USE_SO_NOSIGPIPE */
  469|       |
  470|       |#if defined(HAVE_FCNTL) && !defined(SOCK_CLOEXEC)
  471|       |  if(fcntl(*sockfd, F_SETFD, FD_CLOEXEC) < 0) {
  472|       |    failf(data, "fcntl set CLOEXEC: %s",
  473|       |          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  474|       |    sclose(*sockfd);
  475|       |    *sockfd = CURL_SOCKET_BAD;
  476|       |    return CURLE_COULDNT_CONNECT;
  477|       |  }
  478|       |#endif
  479|       |
  480|  5.59k|#if defined(USE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
  481|  5.59k|  if(addr->family == AF_INET6) {
  ------------------
  |  Branch (481:6): [True: 178, False: 5.41k]
  ------------------
  482|    178|    struct sockaddr_in6 * const sa6 = (void *)&addr->curl_sa_addr;
  ------------------
  |  |   35|    178|#define curl_sa_addr    addr.sa
  ------------------
  483|    178|    sa6->sin6_scope_id = get_scope_id(data, sa6);
  484|    178|  }
  485|  5.59k|#endif
  486|  5.59k|  return CURLE_OK;
  487|  5.59k|}
cf-socket.c:get_scope_id:
  371|    178|{
  372|    178|  uint32_t scope_id = 0;
  373|    178|  if(data->conn->scope_id)
  ------------------
  |  Branch (373:6): [True: 64, False: 114]
  ------------------
  374|     64|    return data->conn->scope_id;
  375|       |  /* NOLINTNEXTLINE(clang-analyzer-core.uninitialized.Assign) */
  376|    114|  scope_id = sa6->sin6_scope_id;
  377|    114|  if(!scope_id && IN6_IS_ADDR_LINKLOCAL(&sa6->sin6_addr)) {
  ------------------
  |  Branch (377:6): [True: 114, False: 0]
  |  Branch (377:19): [True: 3, False: 111]
  ------------------
  378|       |    /* The resolver did not set scope_id for this link-local address.
  379|       |     * Try to determine it from the system's network interfaces.
  380|       |     * Without a scope_id, connect() to a link-local address fails
  381|       |     * with EINVAL on Linux.
  382|       |     * NOTE: On multi-homed hosts with several interfaces having
  383|       |     * link-local addresses, this picks the first one found, which
  384|       |     * may not be the correct outgoing interface. */
  385|      3|#if defined(HAVE_GETIFADDRS) && defined(HAVE_NET_IF_H)
  386|      3|    struct ifaddrs *ifa, *ifa_list;
  387|      3|    if(getifaddrs(&ifa_list) == 0) {
  ------------------
  |  Branch (387:8): [True: 3, False: 0]
  ------------------
  388|     15|      for(ifa = ifa_list; ifa; ifa = ifa->ifa_next) {
  ------------------
  |  Branch (388:27): [True: 12, False: 3]
  ------------------
  389|     12|        if(ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET6 &&
  ------------------
  |  Branch (389:12): [True: 12, False: 0]
  |  Branch (389:29): [True: 0, False: 12]
  ------------------
  390|      0|           (ifa->ifa_flags & IFF_UP) &&
  ------------------
  |  Branch (390:12): [True: 0, False: 0]
  ------------------
  391|      0|           !(ifa->ifa_flags & IFF_LOOPBACK)) {
  ------------------
  |  Branch (391:12): [True: 0, False: 0]
  ------------------
  392|      0|          struct sockaddr_in6 *s6 = (void *)ifa->ifa_addr;
  393|      0|          if(IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr) && s6->sin6_scope_id) {
  ------------------
  |  Branch (393:14): [True: 0, False: 0]
  |  Branch (393:55): [True: 0, False: 0]
  ------------------
  394|      0|            scope_id = s6->sin6_scope_id;
  395|      0|            infof(data,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  396|      0|                  "determined scope_id=%lu for link-local address "
  397|      0|                  "from local interface",
  398|      0|                  (unsigned long)scope_id);
  399|      0|            break;
  400|      0|          }
  401|      0|        }
  402|     12|      }
  403|      3|      freeifaddrs(ifa_list);
  404|      3|    }
  405|      3|#endif /* HAVE_GETIFADDRS && HAVE_NET_IF_H */
  406|      3|  }
  407|    114|  return scope_id;
  408|    178|}
cf-socket.c:socket_close:
  520|  5.59k|{
  521|  5.59k|  if(sock == CURL_SOCKET_BAD)
  ------------------
  |  |  145|  5.59k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (521:6): [True: 0, False: 5.59k]
  ------------------
  522|      0|    return 0;
  523|       |
  524|  5.59k|  if(use_callback && conn && conn->fclosesocket) {
  ------------------
  |  Branch (524:6): [True: 5.59k, False: 0]
  |  Branch (524:22): [True: 5.59k, False: 0]
  |  Branch (524:30): [True: 0, False: 5.59k]
  ------------------
  525|      0|    struct Curl_mapi_guard guard;
  526|      0|    int rc;
  527|      0|    Curl_multi_will_close(data, sock);
  528|      0|    CURL_CBAPI_START(&guard, data, easy_closesocket);
  ------------------
  |  |  195|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  529|      0|    rc = conn->fclosesocket(conn->closesocket_client, sock);
  530|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|      0|  Curl_cbapi_leave(g)
  ------------------
  531|      0|    return rc;
  532|      0|  }
  533|       |
  534|  5.59k|  if(conn)
  ------------------
  |  Branch (534:6): [True: 5.59k, False: 0]
  ------------------
  535|       |    /* tell the multi-socket code about this */
  536|  5.59k|    Curl_multi_will_close(data, sock);
  537|       |
  538|  5.59k|  sclose(sock);
  ------------------
  |  | 1423|  5.59k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  539|       |
  540|  5.59k|  return 0;
  541|  5.59k|}
cf-socket.c:cf_socket_destroy:
 1060|  5.59k|{
 1061|  5.59k|  struct cf_socket_ctx *ctx = cf->ctx;
 1062|       |
 1063|  5.59k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  5.59k|  do {                                          \
  |  |  154|  5.59k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.59k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.59k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.59k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.59k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.59k]
  |  |  ------------------
  ------------------
 1064|  5.59k|  if(ctx) {
  ------------------
  |  Branch (1064:6): [True: 5.59k, False: 0]
  ------------------
 1065|  5.59k|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.59k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1065:8): [True: 5.27k, False: 316]
  ------------------
 1066|  5.27k|      CURL_TRC_CF(data, cf, "cf_socket_close, fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|  5.27k|  do {                                          \
  |  |  154|  5.27k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.27k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  10.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.27k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  10.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.27k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.27k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.27k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.27k]
  |  |  ------------------
  ------------------
 1067|  5.27k|      if(ctx->sock == cf->conn->sock[cf->sockindex])
  ------------------
  |  Branch (1067:10): [True: 0, False: 5.27k]
  ------------------
 1068|      0|        cf->conn->sock[cf->sockindex] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1069|  5.27k|      socket_close(data, cf->conn, !ctx->accepted, ctx->sock);
 1070|  5.27k|    }
 1071|  5.59k|    cf_socket_ctx_free(ctx);
 1072|  5.59k|  }
 1073|  5.59k|}
cf-socket.c:cf_tcp_connect:
 1358|  5.62k|{
 1359|  5.62k|  struct cf_socket_ctx *ctx = cf->ctx;
 1360|  5.62k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1361|  5.62k|  int rc = 0;
 1362|       |
 1363|  5.62k|  if(cf->connected) {
  ------------------
  |  Branch (1363:6): [True: 0, False: 5.62k]
  ------------------
 1364|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1365|      0|    return CURLE_OK;
 1366|      0|  }
 1367|       |
 1368|  5.62k|  *done = FALSE; /* a negative world view is best */
  ------------------
  |  | 1056|  5.62k|#define FALSE false
  ------------------
 1369|  5.62k|  if(ctx->sock == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1369:6): [True: 5.59k, False: 30]
  ------------------
 1370|  5.59k|    int sockerr;
 1371|       |
 1372|  5.59k|    result = cf_socket_open(cf, data);
 1373|  5.59k|    if(result)
  ------------------
  |  Branch (1373:8): [True: 276, False: 5.31k]
  ------------------
 1374|    276|      goto out;
 1375|       |
 1376|  5.31k|    if(cf->connected) {
  ------------------
  |  Branch (1376:8): [True: 5.24k, False: 72]
  ------------------
 1377|  5.24k|      *done = TRUE;
  ------------------
  |  | 1053|  5.24k|#define TRUE true
  ------------------
 1378|  5.24k|      return CURLE_OK;
 1379|  5.24k|    }
 1380|       |
 1381|       |    /* Connect TCP socket */
 1382|     72|    rc = do_connect(cf, data, (bool)cf->conn->bits.tcp_fastopen);
 1383|     72|    sockerr = SOCKERRNO;
  ------------------
  |  | 1093|     72|#define SOCKERRNO         errno
  ------------------
 1384|     72|    set_local_ip(cf, data);
 1385|     72|    CURL_TRC_CF(data, cf, "local address %s port %d...",
  ------------------
  |  |  153|     72|  do {                                          \
  |  |  154|     72|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     72|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    144|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 72, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 72]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    144|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     72|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     72|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     72|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 72]
  |  |  ------------------
  ------------------
 1386|     72|                ctx->ip.local_ip, ctx->ip.local_port);
 1387|     72|    if(rc == -1) {
  ------------------
  |  Branch (1387:8): [True: 72, False: 0]
  ------------------
 1388|     72|      ctx->sockerr = sockerr;
 1389|     72|      result = socket_connect_result(data, ctx->ip.remote_ip, sockerr);
 1390|     72|      goto out;
 1391|     72|    }
 1392|     72|  }
 1393|       |
 1394|       |#ifdef mpeix
 1395|       |  /* Call this function once now, and ignore the results. We do this to
 1396|       |     "clear" the error state on the socket so that we can later read it
 1397|       |     reliably. This is reported necessary on the MPE/iX operating
 1398|       |     system. */
 1399|       |  (void)verifyconnect(ctx->sock, NULL);
 1400|       |#endif
 1401|       |  /* check socket for connect */
 1402|     30|  rc = SOCKET_WRITABLE(ctx->sock, 0);
  ------------------
  |  |   79|     30|  Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  |  |                 Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  ------------------
 1403|       |
 1404|     30|  if(rc == 0) { /* no connection yet */
  ------------------
  |  Branch (1404:6): [True: 24, False: 6]
  ------------------
 1405|     24|    CURL_TRC_CF(data, cf, "not connected yet on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|     24|  do {                                          \
  |  |  154|     24|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     24|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     48|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 24, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 24]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     48|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     24|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     24|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     24|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 24]
  |  |  ------------------
  ------------------
 1406|     24|    return CURLE_OK;
 1407|     24|  }
 1408|      6|  else if(rc == CURL_CSELECT_OUT || cf->conn->bits.tcp_fastopen) {
  ------------------
  |  |  291|     12|#define CURL_CSELECT_OUT  0x02
  ------------------
  |  Branch (1408:11): [True: 0, False: 6]
  |  Branch (1408:37): [True: 0, False: 6]
  ------------------
 1409|      0|    if(verifyconnect(ctx->sock, &ctx->sockerr)) {
  ------------------
  |  Branch (1409:8): [True: 0, False: 0]
  ------------------
 1410|       |      /* we are connected with TCP, awesome! */
 1411|      0|      ctx->connected_at = *Curl_pgrs_now(data);
 1412|      0|      set_local_ip(cf, data);
 1413|      0|      *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1414|      0|      cf->connected = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1415|      0|      CURL_TRC_CF(data, cf, "connected on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1416|      0|      return CURLE_OK;
 1417|      0|    }
 1418|      0|  }
 1419|      6|  else if(rc & CURL_CSELECT_ERR) {
  ------------------
  |  |  292|      6|#define CURL_CSELECT_ERR  0x04
  ------------------
  |  Branch (1419:11): [True: 6, False: 0]
  ------------------
 1420|      6|    CURL_TRC_CF(data, cf, "poll/select error on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|      6|  do {                                          \
  |  |  154|      6|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      6|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     12|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 6, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     12|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      6|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      6|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      6|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6]
  |  |  ------------------
  ------------------
 1421|      6|    (void)verifyconnect(ctx->sock, &ctx->sockerr);
 1422|      6|    result = CURLE_COULDNT_CONNECT;
 1423|      6|  }
 1424|       |
 1425|    354|out:
 1426|    354|  if(result) {
  ------------------
  |  Branch (1426:6): [True: 316, False: 38]
  ------------------
 1427|    316|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1613|    316|#define VERBOSE(x) x
  ------------------
 1428|    316|    set_local_ip(cf, data);
 1429|    316|    if(ctx->sockerr) {
  ------------------
  |  Branch (1429:8): [True: 40, False: 276]
  ------------------
 1430|     40|      data->state.os_errno = ctx->sockerr;
 1431|     40|      SET_SOCKERRNO(ctx->sockerr);
  ------------------
  |  | 1094|     40|#define SET_SOCKERRNO(x)  (errno = (x))
  ------------------
 1432|     40|      VERBOSE(curlx_strerror(ctx->sockerr, buffer, sizeof(buffer)));
  ------------------
  |  | 1613|     40|#define VERBOSE(x) x
  ------------------
 1433|     40|    }
 1434|    276|    else {
 1435|    276|      VERBOSE(curlx_strcopy(buffer, sizeof(buffer), STRCONST("peer closed")));
  ------------------
  |  | 1613|    276|#define VERBOSE(x) x
  ------------------
 1436|    276|    }
 1437|    316|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    316|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1437:8): [True: 40, False: 276]
  ------------------
 1438|     40|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1053|     40|#define TRUE true
  ------------------
 1439|     40|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|     40|#define CURL_SOCKET_BAD (-1)
  ------------------
 1440|     40|    }
 1441|    316|    infof(data, "connect to %s port %u from %s port %d failed: %s",
  ------------------
  |  |  143|    316|  do {                               \
  |  |  144|    316|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    316|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 316, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 316]
  |  |  |  |  ------------------
  |  |  |  |  323|    316|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    316|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    316|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 316]
  |  |  ------------------
  ------------------
 1442|    316|          ctx->ip.remote_ip, ctx->ip.remote_port,
 1443|    316|          ctx->ip.local_ip, ctx->ip.local_port,
 1444|    316|          curlx_strerror(ctx->sockerr, buffer, sizeof(buffer)));
 1445|       |    *done = FALSE;
  ------------------
  |  | 1056|    316|#define FALSE false
  ------------------
 1446|    316|  }
 1447|    354|  return result;
 1448|     30|}
cf-socket.c:cf_socket_open:
 1146|  5.59k|{
 1147|  5.59k|  struct cf_socket_ctx *ctx = cf->ctx;
 1148|  5.59k|  int error = 0;
 1149|  5.59k|  bool isconnected = FALSE;
  ------------------
  |  | 1056|  5.59k|#define FALSE false
  ------------------
 1150|  5.59k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1151|  5.59k|  bool is_tcp;
 1152|       |
 1153|  5.59k|  DEBUGASSERT(ctx->sock == CURL_SOCKET_BAD);
  ------------------
  |  | 1079|  5.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1153:3): [True: 0, False: 5.59k]
  |  Branch (1153:3): [True: 5.59k, False: 0]
  ------------------
 1154|  5.59k|  ctx->started_at = *Curl_pgrs_now(data);
 1155|  5.59k|#ifdef SOCK_NONBLOCK
 1156|       |  /* Do not tuck SOCK_NONBLOCK into socktype when opensocket callback is set
 1157|       |   * because we would not know how socketype is about to be used in the
 1158|       |   * callback, SOCK_NONBLOCK might get factored out before calling socket().
 1159|       |   */
 1160|  5.59k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1160:6): [True: 72, False: 5.52k]
  ------------------
 1161|     72|    ctx->addr.socktype |= SOCK_NONBLOCK;
 1162|  5.59k|#endif
 1163|  5.59k|  result = socket_open(data, &ctx->addr, &ctx->sock);
 1164|  5.59k|#ifdef SOCK_NONBLOCK
 1165|       |  /* Restore the socktype after the socket is created. */
 1166|  5.59k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1166:6): [True: 72, False: 5.52k]
  ------------------
 1167|     72|    ctx->addr.socktype &= ~SOCK_NONBLOCK;
 1168|  5.59k|#endif
 1169|  5.59k|  if(result)
  ------------------
  |  Branch (1169:6): [True: 0, False: 5.59k]
  ------------------
 1170|      0|    goto out;
 1171|       |
 1172|  5.59k|  result = set_remote_ip(cf, data);
 1173|  5.59k|  if(result)
  ------------------
  |  Branch (1173:6): [True: 0, False: 5.59k]
  ------------------
 1174|      0|    goto out;
 1175|       |
 1176|  5.59k|#ifdef USE_IPV6
 1177|  5.59k|  if(ctx->addr.family == AF_INET6) {
  ------------------
  |  Branch (1177:6): [True: 178, False: 5.41k]
  ------------------
 1178|       |#ifdef USE_WINSOCK
 1179|       |    /* Turn on support for IPv4-mapped IPv6 addresses.
 1180|       |     * Linux kernel, NetBSD, FreeBSD, Darwin, lwIP: default is off;
 1181|       |     * Windows Vista and later: default is on;
 1182|       |     * DragonFly BSD: acts like off, and dummy setting;
 1183|       |     * OpenBSD and earlier Windows: unsupported.
 1184|       |     * Linux: controlled by /proc/sys/net/ipv6/bindv6only.
 1185|       |     */
 1186|       |    int on = 0;
 1187|       |    (void)setsockopt(ctx->sock, IPPROTO_IPV6, IPV6_V6ONLY,
 1188|       |                     (void *)&on, sizeof(on));
 1189|       |#endif
 1190|    178|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1191|    178|    {
 1192|    178|      struct sockaddr_in6 *sa6 = (void *)&ctx->addr.curl_sa_addr;
  ------------------
  |  |   35|    178|#define curl_sa_addr    addr.sa
  ------------------
 1193|    178|      if(sa6->sin6_scope_id)
  ------------------
  |  Branch (1193:10): [True: 64, False: 114]
  ------------------
 1194|     64|        infof(data, "  Trying [%s]:%d scope_id=%lu...",
  ------------------
  |  |  143|     64|  do {                               \
  |  |  144|     64|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     64|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 64, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 64]
  |  |  |  |  ------------------
  |  |  |  |  323|     64|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     64|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     64|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 64]
  |  |  ------------------
  ------------------
 1195|    178|              ctx->ip.remote_ip, ctx->ip.remote_port,
 1196|    178|              (unsigned long)sa6->sin6_scope_id);
 1197|    114|      else
 1198|    114|#endif
 1199|    114|        infof(data, "  Trying [%s]:%d...",
  ------------------
  |  |  143|    114|  do {                               \
  |  |  144|    114|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    114|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 114, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 114]
  |  |  |  |  ------------------
  |  |  |  |  323|    114|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    114|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    114|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 114]
  |  |  ------------------
  ------------------
 1200|    178|              ctx->ip.remote_ip, ctx->ip.remote_port);
 1201|    178|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1202|    178|    }
 1203|    178|#endif
 1204|    178|  }
 1205|  5.41k|  else
 1206|  5.41k|#endif
 1207|  5.41k|    infof(data, "  Trying %s:%d...", ctx->ip.remote_ip, ctx->ip.remote_port);
  ------------------
  |  |  143|  5.41k|  do {                               \
  |  |  144|  5.41k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  5.41k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 5.41k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.41k]
  |  |  |  |  ------------------
  |  |  |  |  323|  5.41k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  5.41k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  5.41k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 5.41k]
  |  |  ------------------
  ------------------
 1208|       |
 1209|  5.59k|#ifdef USE_IPV6
 1210|  5.59k|  is_tcp = (ctx->addr.family == AF_INET ||
  ------------------
  |  Branch (1210:13): [True: 5.38k, False: 205]
  ------------------
 1211|    205|            ctx->addr.family == AF_INET6) &&
  ------------------
  |  Branch (1211:13): [True: 178, False: 27]
  ------------------
 1212|  5.56k|    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
  ------------------
  |  Branch (1212:5): [True: 5.56k, False: 0]
  ------------------
 1213|       |#else
 1214|       |  is_tcp = (ctx->addr.family == AF_INET) &&
 1215|       |    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
 1216|       |#endif
 1217|  5.59k|  if(is_tcp && data->set.tcp_nodelay)
  ------------------
  |  Branch (1217:6): [True: 5.56k, False: 27]
  |  Branch (1217:16): [True: 5.56k, False: 3]
  ------------------
 1218|  5.56k|    tcpnodelay(cf, data, ctx->sock);
 1219|       |
 1220|  5.59k|  if(is_tcp && data->set.tcp_keepalive)
  ------------------
  |  Branch (1220:6): [True: 5.56k, False: 27]
  |  Branch (1220:16): [True: 22, False: 5.54k]
  ------------------
 1221|     22|    tcpkeepalive(cf, data, ctx->sock);
 1222|       |
 1223|  5.59k|  if(data->set.fsockopt) {
  ------------------
  |  Branch (1223:6): [True: 5.52k, False: 72]
  ------------------
 1224|       |    /* activate callback for setting socket options */
 1225|  5.52k|    struct Curl_mapi_guard guard;
 1226|  5.52k|    CURL_CBAPI_START(&guard, data, easy_fsockopt);
  ------------------
  |  |  195|  5.52k|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
 1227|  5.52k|    error = data->set.fsockopt(data->set.sockopt_client,
 1228|  5.52k|                               ctx->sock,
 1229|  5.52k|                               CURLSOCKTYPE_IPCXN);
 1230|  5.52k|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|  5.52k|  Curl_cbapi_leave(g)
  ------------------
 1231|       |
 1232|  5.52k|    if(error == CURL_SOCKOPT_ALREADY_CONNECTED)
  ------------------
  |  |  421|  5.52k|#define CURL_SOCKOPT_ALREADY_CONNECTED 2
  ------------------
  |  Branch (1232:8): [True: 5.52k, False: 0]
  ------------------
 1233|  5.52k|      isconnected = TRUE;
  ------------------
  |  | 1053|  5.52k|#define TRUE true
  ------------------
 1234|      0|    else if(error) {
  ------------------
  |  Branch (1234:13): [True: 0, False: 0]
  ------------------
 1235|      0|      result = CURLE_ABORTED_BY_CALLBACK;
 1236|      0|      goto out;
 1237|      0|    }
 1238|  5.52k|  }
 1239|       |
 1240|  5.59k|#ifndef CURL_DISABLE_BINDLOCAL
 1241|       |  /* possibly bind the local end to an IP, interface or port */
 1242|  5.59k|  if(ctx->addr.family == AF_INET
  ------------------
  |  Branch (1242:6): [True: 5.38k, False: 205]
  ------------------
 1243|    205|#ifdef USE_IPV6
 1244|    205|     || ctx->addr.family == AF_INET6
  ------------------
  |  Branch (1244:9): [True: 178, False: 27]
  ------------------
 1245|  5.59k|#endif
 1246|  5.59k|    ) {
 1247|  5.56k|    result = bindlocal(data, cf->conn, ctx->sock, ctx->addr.family,
 1248|  5.56k|                       Curl_ipv6_scope(&ctx->addr.curl_sa_addr),
  ------------------
  |  |   35|  5.56k|#define curl_sa_addr    addr.sa
  ------------------
 1249|  5.56k|                       ctx->transport);
 1250|  5.56k|    if(result) {
  ------------------
  |  Branch (1250:8): [True: 276, False: 5.29k]
  ------------------
 1251|    276|      if(result == CURLE_UNSUPPORTED_PROTOCOL) {
  ------------------
  |  Branch (1251:10): [True: 42, False: 234]
  ------------------
 1252|       |        /* The address family is not supported on this interface.
 1253|       |           We can continue trying addresses */
 1254|     42|        result = CURLE_COULDNT_CONNECT;
 1255|     42|      }
 1256|    276|      goto out;
 1257|    276|    }
 1258|  5.56k|  }
 1259|  5.31k|#endif
 1260|       |
 1261|       |#ifndef SOCK_NONBLOCK
 1262|       |  /* Set socket non-blocking, must be a non-blocking socket for
 1263|       |   * a non-blocking connect. */
 1264|       |  error = curlx_nonblock(ctx->sock, TRUE);
 1265|       |  if(error < 0) {
 1266|       |    result = CURLE_UNSUPPORTED_PROTOCOL;
 1267|       |    ctx->sockerr = SOCKERRNO;
 1268|       |    goto out;
 1269|       |  }
 1270|       |#else
 1271|  5.31k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (1271:6): [True: 5.24k, False: 72]
  ------------------
 1272|       |    /* Set socket non-blocking, must be a non-blocking socket for
 1273|       |     * a non-blocking connect. */
 1274|  5.24k|    error = curlx_nonblock(ctx->sock, TRUE);
  ------------------
  |  | 1053|  5.24k|#define TRUE true
  ------------------
 1275|  5.24k|    if(error < 0) {
  ------------------
  |  Branch (1275:8): [True: 0, False: 5.24k]
  ------------------
 1276|      0|      result = CURLE_UNSUPPORTED_PROTOCOL;
 1277|      0|      ctx->sockerr = SOCKERRNO;
  ------------------
  |  | 1093|      0|#define SOCKERRNO         errno
  ------------------
 1278|      0|      goto out;
 1279|      0|    }
 1280|  5.24k|  }
 1281|  5.31k|#endif
 1282|  5.31k|  ctx->sock_connected = (cf_socktype(ctx->addr.socktype) != SOCK_DGRAM);
 1283|  5.59k|out:
 1284|  5.59k|  if(result) {
  ------------------
  |  Branch (1284:6): [True: 276, False: 5.31k]
  ------------------
 1285|    276|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    276|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1285:8): [True: 276, False: 0]
  ------------------
 1286|    276|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1053|    276|#define TRUE true
  ------------------
 1287|    276|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|    276|#define CURL_SOCKET_BAD (-1)
  ------------------
 1288|    276|    }
 1289|    276|  }
 1290|  5.31k|  else if(isconnected) {
  ------------------
  |  Branch (1290:11): [True: 5.24k, False: 72]
  ------------------
 1291|  5.24k|    set_local_ip(cf, data);
 1292|  5.24k|    ctx->connected_at = *Curl_pgrs_now(data);
 1293|  5.24k|    cf->connected = TRUE;
  ------------------
  |  | 1053|  5.24k|#define TRUE true
  ------------------
 1294|  5.24k|  }
 1295|  5.59k|  CURL_TRC_CF(data, cf, "cf_socket_open() -> %d, fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|  5.59k|  do {                                          \
  |  |  154|  5.59k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.59k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.59k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.59k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.59k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.59k]
  |  |  ------------------
  ------------------
 1296|  5.59k|              (int)result, ctx->sock);
 1297|  5.59k|  return result;
 1298|  5.31k|}
cf-socket.c:set_remote_ip:
 1109|  5.59k|{
 1110|  5.59k|  struct cf_socket_ctx *ctx = cf->ctx;
 1111|       |
 1112|       |  /* store remote address and port used in this connection attempt */
 1113|  5.59k|  ctx->ip.transport = ctx->transport;
 1114|  5.59k|  if(!sockaddr2string(&ctx->addr.curl_sa_addr,
  ------------------
  |  |   35|  5.59k|#define curl_sa_addr    addr.sa
  ------------------
  |  Branch (1114:6): [True: 0, False: 5.59k]
  ------------------
 1115|  5.59k|                      (curl_socklen_t)ctx->addr.addrlen,
 1116|  5.59k|                      ctx->ip.remote_ip, &ctx->ip.remote_port)) {
 1117|      0|    char buffer[STRERROR_LEN];
 1118|       |
 1119|       |    /* using bare errno instead of SOCKERRNO is safe here, because
 1120|       |       sockaddr2string() calls curlx_inet_ntop(), and they both report failures
 1121|       |       via errno (even on Windows builds). */
 1122|      0|    ctx->sockerr = errno;
 1123|       |    /* malformed address or bug in inet_ntop, try next address */
 1124|      0|    failf(data, "curl_sa_addr inet_ntop() failed with errno %d: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1125|      0|          errno, curlx_strerror(errno, buffer, sizeof(buffer)));
 1126|      0|    return CURLE_FAILED_INIT;
 1127|      0|  }
 1128|  5.59k|  return CURLE_OK;
 1129|  5.59k|}
cf-socket.c:cf_socktype:
 1134|  10.8k|{
 1135|  10.8k|#ifdef SOCK_CLOEXEC
 1136|  10.8k|  x &= ~SOCK_CLOEXEC;
 1137|  10.8k|#endif
 1138|  10.8k|#ifdef SOCK_NONBLOCK
 1139|       |  x &= ~SOCK_NONBLOCK;
 1140|  10.8k|#endif
 1141|  10.8k|  return x;
 1142|  10.8k|}
cf-socket.c:tcpnodelay:
  146|  5.56k|{
  147|  5.56k|#if defined(TCP_NODELAY) && defined(CURL_TCP_NODELAY_SUPPORTED)
  148|  5.56k|  curl_socklen_t onoff = (curl_socklen_t)1;
  149|  5.56k|  int level = IPPROTO_TCP;
  150|  5.56k|  VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1613|  5.56k|#define VERBOSE(x) x
  ------------------
  151|       |
  152|  5.56k|  if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff, sizeof(onoff)) < 0)
  ------------------
  |  Branch (152:6): [True: 5.49k, False: 72]
  ------------------
  153|  5.49k|    CURL_TRC_CF(data, cf, "Could not set TCP_NODELAY: %s",
  ------------------
  |  |  153|  5.49k|  do {                                          \
  |  |  154|  5.49k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.49k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  10.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.49k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  10.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.49k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.49k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.49k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.49k]
  |  |  ------------------
  ------------------
  154|  5.56k|                curlx_strerror(SOCKERRNO, buffer, sizeof(buffer)));
  155|       |#else
  156|       |  (void)cf;
  157|       |  (void)data;
  158|       |  (void)sockfd;
  159|       |#endif
  160|  5.56k|}
cf-socket.c:tcpkeepalive:
  180|     22|{
  181|     22|  int optval = data->set.tcp_keepalive ? 1 : 0;
  ------------------
  |  Branch (181:16): [True: 22, False: 0]
  ------------------
  182|       |
  183|       |  /* only set IDLE and INTVL if setting KEEPALIVE is successful */
  184|     22|  if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE,
  ------------------
  |  Branch (184:6): [True: 0, False: 22]
  ------------------
  185|     22|                (void *)&optval, sizeof(optval)) < 0) {
  186|      0|    CURL_TRC_CF(data, cf, "Failed to set SO_KEEPALIVE on fd "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  187|      0|                "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  188|      0|  }
  189|     22|  else {
  190|       |#ifdef USE_WINSOCK
  191|       |    /* Windows 10, version 1709 (10.0.16299) and later versions can use
  192|       |       setsockopt() TCP_KEEP*. Older versions return with failure. */
  193|       |    if(curlx_verify_windows_version(10, 0, 16299, PLATFORM_WINNT,
  194|       |                                    VERSION_GREATER_THAN_EQUAL)) {
  195|       |      CURL_TRC_CF(data, cf, "Set TCP_KEEP* on fd=%" FMT_SOCKET_T, sockfd);
  196|       |      optval = curlx_sltosi(data->set.tcp_keepidle);
  197|       |/* Offered by mingw-w64 v12+, MS SDK 6.0A/VS2008+ */
  198|       |#ifndef TCP_KEEPALIVE
  199|       |#define TCP_KEEPALIVE 3
  200|       |#endif
  201|       |/* Offered by mingw-w64 v12+, MS SDK 10.0.15063.0/VS2017 15.1+ */
  202|       |#ifndef TCP_KEEPCNT
  203|       |#define TCP_KEEPCNT 16
  204|       |#endif
  205|       |/* Offered by mingw-w64 v12+, MS SDK 10.0.16299.0/VS2017 15.4+ */
  206|       |#ifndef TCP_KEEPIDLE
  207|       |#define TCP_KEEPIDLE TCP_KEEPALIVE
  208|       |#endif
  209|       |#ifndef TCP_KEEPINTVL
  210|       |#define TCP_KEEPINTVL 17
  211|       |#endif
  212|       |      if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
  213|       |                    (const char *)&optval, sizeof(optval)) < 0) {
  214|       |        CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPIDLE on fd "
  215|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  216|       |      }
  217|       |      optval = curlx_sltosi(data->set.tcp_keepintvl);
  218|       |      if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
  219|       |                    (const char *)&optval, sizeof(optval)) < 0) {
  220|       |        CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPINTVL on fd "
  221|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  222|       |      }
  223|       |      optval = curlx_sltosi(data->set.tcp_keepcnt);
  224|       |      if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT,
  225|       |                    (const char *)&optval, sizeof(optval)) < 0) {
  226|       |        CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPCNT on fd "
  227|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  228|       |      }
  229|       |    }
  230|       |    else {
  231|       |/* Offered by mingw-w64 and MS SDK. Latter only when targeting Win7+. */
  232|       |#ifndef SIO_KEEPALIVE_VALS
  233|       |#define SIO_KEEPALIVE_VALS  _WSAIOW(IOC_VENDOR, 4)
  234|       |      struct tcp_keepalive {
  235|       |        u_long onoff;
  236|       |        u_long keepalivetime;
  237|       |        u_long keepaliveinterval;
  238|       |      };
  239|       |#endif
  240|       |      struct tcp_keepalive vals;
  241|       |      DWORD dummy;
  242|       |      vals.onoff = 1;
  243|       |      optval = curlx_sltosi(data->set.tcp_keepidle);
  244|       |      KEEPALIVE_FACTOR(optval);
  245|       |      vals.keepalivetime = (u_long)optval;
  246|       |      optval = curlx_sltosi(data->set.tcp_keepintvl);
  247|       |      KEEPALIVE_FACTOR(optval);
  248|       |      vals.keepaliveinterval = (u_long)optval;
  249|       |      if(WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, (LPVOID)&vals, sizeof(vals),
  250|       |                  NULL, 0, &dummy, NULL, NULL) != 0) {
  251|       |        CURL_TRC_CF(data, cf, "Failed to set SIO_KEEPALIVE_VALS on fd "
  252|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  253|       |      }
  254|       |    }
  255|       |#else /* !USE_WINSOCK */
  256|     22|#ifdef TCP_KEEPIDLE
  257|     22|    optval = curlx_sltosi(data->set.tcp_keepidle);
  258|     22|    KEEPALIVE_FACTOR(optval);
  259|     22|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
  ------------------
  |  Branch (259:8): [True: 22, False: 0]
  ------------------
  260|     22|                  (void *)&optval, sizeof(optval)) < 0) {
  261|     22|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPIDLE on fd "
  ------------------
  |  |  153|     22|  do {                                          \
  |  |  154|     22|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     22|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     44|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 22, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     44|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     22|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     22|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     22|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 22]
  |  |  ------------------
  ------------------
  262|     22|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  263|     22|    }
  264|       |#elif defined(TCP_KEEPALIVE)
  265|       |    /* macOS style */
  266|       |    optval = curlx_sltosi(data->set.tcp_keepidle);
  267|       |    KEEPALIVE_FACTOR(optval);
  268|       |    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE,
  269|       |                  (void *)&optval, sizeof(optval)) < 0) {
  270|       |      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE on fd "
  271|       |                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  272|       |    }
  273|       |#elif defined(TCP_KEEPALIVE_THRESHOLD)
  274|       |    /* Solaris <11.4 style */
  275|       |    optval = curlx_sltosi(data->set.tcp_keepidle);
  276|       |    KEEPALIVE_FACTOR(optval);
  277|       |    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE_THRESHOLD,
  278|       |                  (void *)&optval, sizeof(optval)) < 0) {
  279|       |      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE_THRESHOLD on fd "
  280|       |                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  281|       |    }
  282|       |#endif
  283|     22|#ifdef TCP_KEEPINTVL
  284|     22|    optval = curlx_sltosi(data->set.tcp_keepintvl);
  285|     22|    KEEPALIVE_FACTOR(optval);
  286|     22|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
  ------------------
  |  Branch (286:8): [True: 22, False: 0]
  ------------------
  287|     22|                  (void *)&optval, sizeof(optval)) < 0) {
  288|     22|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPINTVL on fd "
  ------------------
  |  |  153|     22|  do {                                          \
  |  |  154|     22|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     22|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     44|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 22, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     44|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     22|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     22|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     22|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 22]
  |  |  ------------------
  ------------------
  289|     22|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  290|     22|    }
  291|       |#elif defined(TCP_KEEPALIVE_ABORT_THRESHOLD)
  292|       |    /* Solaris <11.4 style */
  293|       |    /* TCP_KEEPALIVE_ABORT_THRESHOLD should equal to
  294|       |     * TCP_KEEPCNT * TCP_KEEPINTVL on other platforms.
  295|       |     * The default value of TCP_KEEPCNT is 9 on Linux,
  296|       |     * 8 on *BSD/macOS, 5 or 10 on Windows. We use the
  297|       |     * default config for Solaris <11.4 because there is
  298|       |     * no default value for TCP_KEEPCNT on Solaris 11.4.
  299|       |     *
  300|       |     * Note that the consequent probes will not be sent
  301|       |     * at equal intervals on Solaris, but will be sent
  302|       |     * using the exponential backoff algorithm. */
  303|       |    {
  304|       |      int keepcnt = curlx_sltosi(data->set.tcp_keepcnt);
  305|       |      int keepintvl = curlx_sltosi(data->set.tcp_keepintvl);
  306|       |
  307|       |      if(keepcnt > 0 && keepintvl > (INT_MAX / keepcnt))
  308|       |        optval = INT_MAX;
  309|       |      else
  310|       |        optval = keepcnt * keepintvl;
  311|       |    }
  312|       |    KEEPALIVE_FACTOR(optval);
  313|       |    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE_ABORT_THRESHOLD,
  314|       |                  (void *)&optval, sizeof(optval)) < 0) {
  315|       |      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE_ABORT_THRESHOLD"
  316|       |                  " on fd %" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  317|       |    }
  318|       |#endif
  319|     22|#ifdef TCP_KEEPCNT
  320|     22|    optval = curlx_sltosi(data->set.tcp_keepcnt);
  321|     22|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT,
  ------------------
  |  Branch (321:8): [True: 22, False: 0]
  ------------------
  322|     22|                  (void *)&optval, sizeof(optval)) < 0) {
  323|     22|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPCNT on fd "
  ------------------
  |  |  153|     22|  do {                                          \
  |  |  154|     22|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     22|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     44|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 22, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     44|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     22|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     22|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     22|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 22]
  |  |  ------------------
  ------------------
  324|     22|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  325|     22|    }
  326|     22|#endif
  327|     22|#endif /* USE_WINSOCK */
  328|     22|  }
  329|     22|}
cf-socket.c:bindlocal:
  638|  5.56k|{
  639|  5.56k|  struct Curl_sockaddr_storage sa;
  640|  5.56k|  struct sockaddr *sock = (struct sockaddr *)&sa;  /* bind to this address */
  641|  5.56k|  curl_socklen_t sizeof_sa = 0; /* size of the data sock points to */
  642|  5.56k|  struct sockaddr_in *si4 = (struct sockaddr_in *)&sa;
  643|  5.56k|#ifdef USE_IPV6
  644|  5.56k|  struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&sa;
  645|  5.56k|#endif
  646|       |
  647|  5.56k|  struct Curl_dns_entry *h = NULL;
  648|  5.56k|  unsigned short port = data->set.localport; /* use this port number, 0 for
  649|       |                                                "random" */
  650|       |  /* how many port numbers to try to bind to, increasing one at a time */
  651|  5.56k|  int portnum = data->set.localportrange;
  652|  5.56k|  const char *dev = data->set.str[STRING_DEVICE];
  653|  5.56k|  const char *iface_input = data->set.str[STRING_INTERFACE];
  654|  5.56k|  const char *host_input = data->set.str[STRING_BINDHOST];
  655|  5.56k|  const char *iface = iface_input ? iface_input : dev;
  ------------------
  |  Branch (655:23): [True: 10, False: 5.55k]
  ------------------
  656|  5.56k|  const char *host = host_input ? host_input : dev;
  ------------------
  |  Branch (656:22): [True: 13, False: 5.55k]
  ------------------
  657|  5.56k|  int sockerr;
  658|  5.56k|#ifdef IP_BIND_ADDRESS_NO_PORT
  659|  5.56k|  int on = 1;
  660|  5.56k|#endif
  661|       |#ifndef USE_IPV6
  662|       |  (void)scope;
  663|       |#endif
  664|       |
  665|       |  /*************************************************************
  666|       |   * Select device to bind socket to
  667|       |   *************************************************************/
  668|  5.56k|  if(!iface && !host && !port)
  ------------------
  |  Branch (668:6): [True: 5.30k, False: 260]
  |  Branch (668:16): [True: 5.30k, False: 6]
  |  Branch (668:25): [True: 5.29k, False: 11]
  ------------------
  669|       |    /* no local kind of binding was requested */
  670|  5.29k|    return CURLE_OK;
  671|    277|  else if(iface && (strlen(iface) >= 255))
  ------------------
  |  Branch (671:11): [True: 260, False: 17]
  |  Branch (671:20): [True: 3, False: 257]
  ------------------
  672|      3|    return CURLE_BAD_FUNCTION_ARGUMENT;
  673|       |
  674|    274|  memset(&sa, 0, sizeof(struct Curl_sockaddr_storage));
  675|       |
  676|    274|  if(iface || host) {
  ------------------
  |  Branch (676:6): [True: 257, False: 17]
  |  Branch (676:15): [True: 6, False: 11]
  ------------------
  677|    263|    char myhost[256] = "";
  678|    263|    int done = 0; /* -1 for error, 1 for address found */
  679|    263|    if2ip_result_t if2ip_result = IF2IP_NOT_FOUND;
  680|       |
  681|    263|#ifdef SO_BINDTODEVICE
  682|    263|    if(iface) {
  ------------------
  |  Branch (682:8): [True: 257, False: 6]
  ------------------
  683|       |      /*
  684|       |       * This binds the local socket to a particular interface. This will
  685|       |       * force even requests to other local interfaces to go out the external
  686|       |       * interface. Only bind to the interface when specified as interface,
  687|       |       * not as a hostname or ip address.
  688|       |       *
  689|       |       * The interface might be a VRF, eg: vrf-blue, which means it cannot be
  690|       |       * converted to an IP address and would fail Curl_if2ip. Try to
  691|       |       * use it straight away.
  692|       |       */
  693|    257|      if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
  ------------------
  |  Branch (693:10): [True: 4, False: 253]
  ------------------
  694|    257|                    iface, (curl_socklen_t)strlen(iface) + 1) == 0) {
  695|       |        /* This is often "errno 1, error: Operation not permitted" if you are
  696|       |         * not running as root or another suitable privileged user. If it
  697|       |         * succeeds it means the parameter was a valid interface and not an IP
  698|       |         * address. Return immediately.
  699|       |         */
  700|      4|        if(!host_input) {
  ------------------
  |  Branch (700:12): [True: 1, False: 3]
  ------------------
  701|      1|          infof(data, "socket successfully bound to interface '%s'", iface);
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  323|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  702|      1|          return CURLE_OK;
  703|      1|        }
  704|      4|      }
  705|    257|    }
  706|    262|#endif
  707|    262|    if(!host_input) {
  ------------------
  |  Branch (707:8): [True: 249, False: 13]
  ------------------
  708|       |      /* Discover IP from input device, then bind to it */
  709|    249|      if2ip_result = Curl_if2ip(af,
  710|    249|#ifdef USE_IPV6
  711|    249|                                scope, conn->scope_id,
  712|    249|#endif
  713|    249|                                iface, myhost, sizeof(myhost));
  714|    249|    }
  715|    262|    switch(if2ip_result) {
  ------------------
  |  Branch (715:12): [True: 262, False: 0]
  ------------------
  716|    259|    case IF2IP_NOT_FOUND:
  ------------------
  |  Branch (716:5): [True: 259, False: 3]
  ------------------
  717|    259|      if(iface_input && !host_input) {
  ------------------
  |  Branch (717:10): [True: 10, False: 249]
  |  Branch (717:25): [True: 3, False: 7]
  ------------------
  718|       |        /* Do not fall back to treating it as a hostname */
  719|      3|        char buffer[STRERROR_LEN];
  720|      3|        data->state.os_errno = sockerr = SOCKERRNO;
  ------------------
  |  | 1093|      3|#define SOCKERRNO         errno
  ------------------
  721|      3|        failf(data, "Could not bind to interface '%s' with errno %d: %s",
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  722|      3|              iface, sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
  723|      3|        return CURLE_INTERFACE_FAILED;
  724|      3|      }
  725|    256|      break;
  726|    256|    case IF2IP_AF_NOT_SUPPORTED:
  ------------------
  |  Branch (726:5): [True: 1, False: 261]
  ------------------
  727|       |      /* Signal the caller to try another address family if available */
  728|      1|      return CURLE_UNSUPPORTED_PROTOCOL;
  729|      2|    case IF2IP_FOUND:
  ------------------
  |  Branch (729:5): [True: 2, False: 260]
  ------------------
  730|       |      /*
  731|       |       * We now have the numerical IP address in the 'myhost' buffer
  732|       |       */
  733|      2|      host = myhost;
  734|      2|      infof(data, "Local Interface %s is ip %s using address family %d",
  ------------------
  |  |  143|      2|  do {                               \
  |  |  144|      2|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      2|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  735|      2|            iface, host, af);
  736|      2|      done = 1;
  737|      2|      break;
  738|    262|    }
  739|    258|    if(!iface_input || host_input) {
  ------------------
  |  Branch (739:8): [True: 251, False: 7]
  |  Branch (739:24): [True: 7, False: 0]
  ------------------
  740|       |      /*
  741|       |       * This was not an interface, resolve the name as a hostname
  742|       |       * or IP number
  743|       |       *
  744|       |       * Temporarily force name resolution to use only the address type
  745|       |       * of the connection. The resolve functions should really be changed
  746|       |       * to take a type parameter instead.
  747|       |       */
  748|    258|      uint8_t dns_queries = (af == AF_INET) ?
  ------------------
  |  Branch (748:29): [True: 174, False: 84]
  ------------------
  749|    174|                            CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|    174|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|     84|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|     84|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  750|    258|#ifdef USE_IPV6
  751|    258|      if(af == AF_INET6)
  ------------------
  |  Branch (751:10): [True: 84, False: 174]
  ------------------
  752|     84|        dns_queries = CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     84|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  753|    258|#endif
  754|       |
  755|    258|      (void)Curl_resolv_blocking(data, dns_queries, host, 80, transport, &h);
  756|    258|      if(h) {
  ------------------
  |  Branch (756:10): [True: 96, False: 162]
  ------------------
  757|     96|        int h_af = h->addr->ai_family;
  758|       |        /* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */
  759|     96|        Curl_printable_address(h->addr, myhost, sizeof(myhost));
  760|     96|        infof(data, "Name '%s' family %d resolved to '%s' family %d",
  ------------------
  |  |  143|     96|  do {                               \
  |  |  144|     96|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     96|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 96, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 96]
  |  |  |  |  ------------------
  |  |  |  |  323|     96|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     96|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     96|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 96]
  |  |  ------------------
  ------------------
  761|     96|              host, af, myhost, h_af);
  762|     96|        Curl_dns_entry_unlink(data, &h); /* this will NULL, potential free h */
  763|     96|        if(af != h_af) {
  ------------------
  |  Branch (763:12): [True: 41, False: 55]
  ------------------
  764|       |          /* bad IP version combo, signal the caller to try another address
  765|       |             family if available */
  766|     41|          return CURLE_UNSUPPORTED_PROTOCOL;
  767|     41|        }
  768|     55|        done = 1;
  769|     55|      }
  770|    162|      else {
  771|       |        /*
  772|       |         * provided dev was no interface (or interfaces are not supported
  773|       |         * e.g. Solaris) no ip address and no domain we fail here
  774|       |         */
  775|    162|        done = -1;
  776|    162|      }
  777|    258|    }
  778|       |
  779|    217|    if(done > 0) {
  ------------------
  |  Branch (779:8): [True: 55, False: 162]
  ------------------
  780|     55|#ifdef USE_IPV6
  781|       |      /* IPv6 address */
  782|     55|      if(af == AF_INET6) {
  ------------------
  |  Branch (782:10): [True: 36, False: 19]
  ------------------
  783|     36|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  784|     36|        char *scope_ptr = strchr(myhost, '%');
  785|     36|        if(scope_ptr)
  ------------------
  |  Branch (785:12): [True: 0, False: 36]
  ------------------
  786|      0|          *(scope_ptr++) = '\0';
  787|     36|#endif
  788|     36|        if(curlx_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) {
  ------------------
  |  Branch (788:12): [True: 36, False: 0]
  ------------------
  789|     36|          si6->sin6_family = AF_INET6;
  790|     36|          si6->sin6_port = htons(port);
  791|     36|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  792|     36|          if(scope_ptr) {
  ------------------
  |  Branch (792:14): [True: 0, False: 36]
  ------------------
  793|       |            /* The "myhost" string either comes from Curl_if2ip or from
  794|       |               Curl_printable_address. The latter returns only numeric scope
  795|       |               IDs and the former returns none at all. Making the scope ID,
  796|       |               if present, known to be numeric */
  797|      0|            curl_off_t scope_id;
  798|      0|            if(curlx_str_number((const char **)CURL_UNCONST(&scope_ptr),
  ------------------
  |  |  864|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (798:16): [True: 0, False: 0]
  ------------------
  799|      0|                                &scope_id, UINT_MAX))
  800|      0|              return CURLE_UNSUPPORTED_PROTOCOL;
  801|      0|            si6->sin6_scope_id = (unsigned int)scope_id;
  802|      0|          }
  803|     36|#endif
  804|     36|        }
  805|     36|        sizeof_sa = sizeof(struct sockaddr_in6);
  806|     36|      }
  807|     19|      else
  808|     19|#endif
  809|       |      /* IPv4 address */
  810|     19|      if((af == AF_INET) &&
  ------------------
  |  Branch (810:10): [True: 19, False: 0]
  ------------------
  811|     19|         (curlx_inet_pton(AF_INET, myhost, &si4->sin_addr) > 0)) {
  ------------------
  |  Branch (811:10): [True: 19, False: 0]
  ------------------
  812|     19|        si4->sin_family = AF_INET;
  813|     19|        si4->sin_port = htons(port);
  814|     19|        sizeof_sa = sizeof(struct sockaddr_in);
  815|     19|      }
  816|     55|    }
  817|       |
  818|    217|    if(done < 1) {
  ------------------
  |  Branch (818:8): [True: 162, False: 55]
  ------------------
  819|       |      /* errorbuf is set false so failf will overwrite any message already in
  820|       |         the error buffer, so the user receives this error message instead of a
  821|       |         generic resolve error. */
  822|    162|      char buffer[STRERROR_LEN];
  823|    162|      data->state.errorbuf = FALSE;
  ------------------
  |  | 1056|    162|#define FALSE false
  ------------------
  824|    162|      data->state.os_errno = sockerr = SOCKERRNO;
  ------------------
  |  | 1093|    162|#define SOCKERRNO         errno
  ------------------
  825|    162|      failf(data, "Could not bind to '%s' with errno %d: %s", host,
  ------------------
  |  |   62|    162|#define failf Curl_failf
  ------------------
  826|    162|            sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
  827|    162|      return CURLE_INTERFACE_FAILED;
  828|    162|    }
  829|    217|  }
  830|     11|  else {
  831|       |    /* no device was given, prepare sa to match af's needs */
  832|     11|#ifdef USE_IPV6
  833|     11|    if(af == AF_INET6) {
  ------------------
  |  Branch (833:8): [True: 1, False: 10]
  ------------------
  834|      1|      si6->sin6_family = AF_INET6;
  835|      1|      si6->sin6_port = htons(port);
  836|      1|      sizeof_sa = sizeof(struct sockaddr_in6);
  837|      1|    }
  838|     10|    else
  839|     10|#endif
  840|     10|    if(af == AF_INET) {
  ------------------
  |  Branch (840:8): [True: 10, False: 0]
  ------------------
  841|     10|      si4->sin_family = AF_INET;
  842|     10|      si4->sin_port = htons(port);
  843|     10|      sizeof_sa = sizeof(struct sockaddr_in);
  844|     10|    }
  845|     11|  }
  846|     66|#ifdef IP_BIND_ADDRESS_NO_PORT
  847|     66|  (void)setsockopt(sockfd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &on, sizeof(on));
  848|     66|#endif
  849|  78.4k|  for(;;) {
  850|  78.4k|    if(bind(sockfd, sock, sizeof_sa) >= 0) {
  ------------------
  |  Branch (850:8): [True: 0, False: 78.4k]
  ------------------
  851|       |      /* we succeeded to bind */
  852|      0|      infof(data, "Local port: %hu", port);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  853|      0|      conn->bits.bound = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  854|      0|      return CURLE_OK;
  855|      0|    }
  856|       |
  857|  78.4k|    if(--portnum > 0) {
  ------------------
  |  Branch (857:8): [True: 78.3k, False: 62]
  ------------------
  858|  78.3k|      port++; /* try next port */
  859|  78.3k|      if(port == 0)
  ------------------
  |  Branch (859:10): [True: 4, False: 78.3k]
  ------------------
  860|      4|        break;
  861|  78.3k|      infof(data, "Bind to local port %d failed, trying next", port - 1);
  ------------------
  |  |  143|  78.3k|  do {                               \
  |  |  144|  78.3k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  78.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 78.3k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 78.3k]
  |  |  |  |  ------------------
  |  |  |  |  323|  78.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  78.3k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  78.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 78.3k]
  |  |  ------------------
  ------------------
  862|       |      /* We reuse/clobber the port variable here below */
  863|  78.3k|      if(sock->sa_family == AF_INET)
  ------------------
  |  Branch (863:10): [True: 78.3k, False: 0]
  ------------------
  864|  78.3k|        si4->sin_port = htons(port);
  865|      0|#ifdef USE_IPV6
  866|      0|      else
  867|      0|        si6->sin6_port = htons(port);
  868|  78.3k|#endif
  869|  78.3k|    }
  870|     62|    else
  871|     62|      break;
  872|  78.4k|  }
  873|     66|  {
  874|     66|    char buffer[STRERROR_LEN];
  875|     66|    data->state.os_errno = sockerr = SOCKERRNO;
  ------------------
  |  | 1093|     66|#define SOCKERRNO         errno
  ------------------
  876|     66|    failf(data, "bind failed with errno %d: %s",
  ------------------
  |  |   62|     66|#define failf Curl_failf
  ------------------
  877|     66|          sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
  878|     66|  }
  879|       |
  880|     66|  return CURLE_INTERFACE_FAILED;
  881|     66|}
cf-socket.c:do_connect:
 1302|     72|{
 1303|     72|  struct cf_socket_ctx *ctx = cf->ctx;
 1304|     72|#ifdef TCP_FASTOPEN_CONNECT
 1305|     72|  int optval = 1;
 1306|     72|#endif
 1307|     72|  int rc = -1;
 1308|       |
 1309|     72|  (void)data;
 1310|     72|  if(is_tcp_fastopen) {
  ------------------
  |  Branch (1310:6): [True: 0, False: 72]
  ------------------
 1311|       |#ifdef CONNECT_DATA_IDEMPOTENT /* Darwin */
 1312|       |#  ifdef HAVE_BUILTIN_AVAILABLE
 1313|       |    /* while connectx function is available since macOS 10.11 / iOS 9,
 1314|       |       it did not have the interface declared correctly until
 1315|       |       Xcode 9 / macOS SDK 10.13 */
 1316|       |    if(__builtin_available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *)) {
 1317|       |      sa_endpoints_t endpoints;
 1318|       |      endpoints.sae_srcif = 0;
 1319|       |      endpoints.sae_srcaddr = NULL;
 1320|       |      endpoints.sae_srcaddrlen = 0;
 1321|       |      endpoints.sae_dstaddr = &ctx->addr.curl_sa_addr;
 1322|       |      endpoints.sae_dstaddrlen = ctx->addr.addrlen;
 1323|       |
 1324|       |      rc = connectx(ctx->sock, &endpoints, SAE_ASSOCID_ANY,
 1325|       |                    CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT,
 1326|       |                    NULL, 0, NULL, NULL);
 1327|       |    }
 1328|       |    else {
 1329|       |      rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1330|       |    }
 1331|       |#  else
 1332|       |    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1333|       |#  endif /* HAVE_BUILTIN_AVAILABLE */
 1334|       |#elif defined(TCP_FASTOPEN_CONNECT) /* Linux >= 4.11 */
 1335|      0|    if(setsockopt(ctx->sock, IPPROTO_TCP, TCP_FASTOPEN_CONNECT,
  ------------------
  |  Branch (1335:8): [True: 0, False: 0]
  ------------------
 1336|      0|                  (void *)&optval, sizeof(optval)) < 0)
 1337|      0|      CURL_TRC_CF(data, cf, "Failed to enable TCP Fast Open on fd %"
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1338|      0|                  FMT_SOCKET_T, ctx->sock);
 1339|       |
 1340|      0|    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
  ------------------
  |  |   35|      0|#define curl_sa_addr    addr.sa
  ------------------
 1341|       |#elif defined(MSG_FASTOPEN) /* old Linux */
 1342|       |    if(Curl_conn_is_ssl(cf->conn, cf->sockindex))
 1343|       |      rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1344|       |    else
 1345|       |      rc = 0; /* Do nothing */
 1346|       |#endif
 1347|      0|  }
 1348|     72|  else {
 1349|     72|    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr,
  ------------------
  |  |   35|     72|#define curl_sa_addr    addr.sa
  ------------------
 1350|     72|                 (curl_socklen_t)ctx->addr.addrlen);
 1351|     72|  }
 1352|     72|  return rc;
 1353|     72|}
cf-socket.c:socket_connect_result:
  943|     72|{
  944|     72|  if(sockerr == SOCKEINPROGRESS || SOCK_EAGAIN(sockerr))
  ------------------
  |  | 1126|    144|#define SOCKEINPROGRESS   EINPROGRESS
  ------------------
                if(sockerr == SOCKEINPROGRESS || SOCK_EAGAIN(sockerr))
  ------------------
  |  | 1144|     34|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1135|     34|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1144:24): [True: 0, False: 34]
  |  |  ------------------
  ------------------
  |  Branch (944:6): [True: 38, False: 34]
  ------------------
  945|     38|    return CURLE_OK;
  946|       |
  947|       |  /* unknown error, fallthrough and try another address! */
  948|     34|  {
  949|     34|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1613|     34|#define VERBOSE(x) x
  ------------------
  950|     34|    infof(data, "Immediate connect fail for %s: %s", ipaddress,
  ------------------
  |  |  143|     34|  do {                               \
  |  |  144|     34|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     34|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 34, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 34]
  |  |  |  |  ------------------
  |  |  |  |  323|     34|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     34|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     34|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 34]
  |  |  ------------------
  ------------------
  951|     34|          curlx_strerror(sockerr, buffer, sizeof(buffer)));
  952|     34|    NOVERBOSE((void)ipaddress);
  ------------------
  |  | 1614|     34|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1187|     34|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1187:35): [Folded, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  953|     34|  }
  954|     34|  data->state.os_errno = sockerr;
  955|       |  /* connect failed */
  956|     34|  return CURLE_COULDNT_CONNECT;
  957|     72|}
cf-socket.c:verifyconnect:
  888|      6|{
  889|      6|  bool rc = TRUE;
  ------------------
  |  | 1053|      6|#define TRUE true
  ------------------
  890|      6|#ifdef SO_ERROR
  891|      6|  int sockerr = 0;
  892|      6|  curl_socklen_t errSize = sizeof(sockerr);
  893|       |
  894|       |#ifdef _WIN32
  895|       |  /*
  896|       |   * In October 2003 we effectively nullified this function on Windows due to
  897|       |   * problems with it using all CPU in multi-threaded cases.
  898|       |   *
  899|       |   * In May 2004, we brought it back to offer more info back on connect
  900|       |   * failures. We could reproduce the former problems with this function, but
  901|       |   * could avoid them by adding this SleepEx() call below:
  902|       |   *
  903|       |   *    "I do not have Rational Quantify, but the hint from his post was
  904|       |   *    ntdll::NtRemoveIoCompletion(). I would assume the SleepEx (or maybe
  905|       |   *    Sleep(0) would be enough?) would release whatever
  906|       |   *    mutex/critical-section the ntdll call is waiting on.
  907|       |   *
  908|       |   *    Someone got to verify this on Win-NT 4.0, 2000."
  909|       |   */
  910|       |  SleepEx(0, FALSE);
  911|       |#endif
  912|       |
  913|      6|  if(getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &errSize))
  ------------------
  |  Branch (913:6): [True: 0, False: 6]
  ------------------
  914|      0|    sockerr = SOCKERRNO;
  ------------------
  |  | 1093|      0|#define SOCKERRNO         errno
  ------------------
  915|       |#if defined(EBADIOCTL) && defined(__minix)
  916|       |  /* Minix 3.1.x does not support getsockopt on UDP sockets */
  917|       |  if(EBADIOCTL == sockerr) {
  918|       |    SET_SOCKERRNO(0);
  919|       |    sockerr = 0;
  920|       |  }
  921|       |#endif
  922|      6|  if((sockerr == 0) || (SOCKEISCONN == sockerr))
  ------------------
  |  | 1129|      6|#define SOCKEISCONN       EISCONN
  ------------------
  |  Branch (922:6): [True: 0, False: 6]
  |  Branch (922:24): [True: 0, False: 6]
  ------------------
  923|       |    /* we are connected, awesome! */
  924|      0|    rc = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  925|      6|  else
  926|       |    /* This was not a successful connect */
  927|      6|    rc = FALSE;
  ------------------
  |  | 1056|      6|#define FALSE false
  ------------------
  928|      6|  if(psockerr)
  ------------------
  |  Branch (928:6): [True: 6, False: 0]
  ------------------
  929|      6|    *psockerr = sockerr;
  930|       |#else
  931|       |  (void)sockfd;
  932|       |  if(psockerr)
  933|       |    *psockerr = SOCKERRNO;
  934|       |#endif
  935|      6|  return rc;
  936|      6|}
cf-socket.c:cf_socket_adjust_pollset:
 1453|  1.01k|{
 1454|  1.01k|  struct cf_socket_ctx *ctx = cf->ctx;
 1455|  1.01k|  CURLcode result = CURLE_OK;
 1456|       |
 1457|  1.01k|  if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  1.01k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1457:6): [True: 1.01k, False: 0]
  ------------------
 1458|       |    /* A listening socket filter needs to be connected before the accept
 1459|       |     * for some weird FTP interaction. This should be rewritten, so that
 1460|       |     * FTP no longer does the socket checks and accept calls and delegates
 1461|       |     * all that to the filter. */
 1462|  1.01k|    if(ctx->listening) {
  ------------------
  |  Branch (1462:8): [True: 0, False: 1.01k]
  ------------------
 1463|      0|      result = Curl_pollset_set_in_only(data, ps, ctx->sock);
  ------------------
  |  |  170|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1464|      0|      CURL_TRC_CF(data, cf, "adjust_pollset, listening, POLLIN fd=%"
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1465|      0|                  FMT_SOCKET_T, ctx->sock);
 1466|      0|    }
 1467|  1.01k|    else if(!cf->connected) {
  ------------------
  |  Branch (1467:13): [True: 62, False: 952]
  ------------------
 1468|     62|      result = Curl_pollset_set_out_only(data, ps, ctx->sock);
  ------------------
  |  |  172|     62|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|     62|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|     62|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1469|     62|      CURL_TRC_CF(data, cf, "adjust_pollset, !connected, POLLOUT fd=%"
  ------------------
  |  |  153|     62|  do {                                          \
  |  |  154|     62|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     62|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    124|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 62, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 62]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    124|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     62|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     62|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     62|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 62]
  |  |  ------------------
  ------------------
 1470|     62|                  FMT_SOCKET_T, ctx->sock);
 1471|     62|    }
 1472|    952|    else if(!ctx->active) {
  ------------------
  |  Branch (1472:13): [True: 952, False: 0]
  ------------------
 1473|    952|      result = Curl_pollset_add_in(data, ps, ctx->sock);
  ------------------
  |  |  160|    952|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|    952|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1474|    952|      CURL_TRC_CF(data, cf, "adjust_pollset, !active, POLLIN fd=%"
  ------------------
  |  |  153|    952|  do {                                          \
  |  |  154|    952|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    952|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  1.90k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 952, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 952]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  1.90k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    952|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    952|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    952|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 952]
  |  |  ------------------
  ------------------
 1475|    952|                  FMT_SOCKET_T, ctx->sock);
 1476|    952|    }
 1477|  1.01k|  }
 1478|  1.01k|  return result;
 1479|  1.01k|}
cf-socket.c:cf_socket_send:
 1512|  6.59k|{
 1513|  6.59k|  struct cf_socket_ctx *ctx = cf->ctx;
 1514|  6.59k|  curl_socket_t fdsave;
 1515|  6.59k|  ssize_t rv;
 1516|  6.59k|  CURLcode result = CURLE_OK;
 1517|  6.59k|  VERBOSE(size_t orig_len = len);
  ------------------
  |  | 1613|  6.59k|#define VERBOSE(x) x
  ------------------
 1518|       |
 1519|  6.59k|  (void)eos;
 1520|  6.59k|  *pnwritten = 0;
 1521|  6.59k|  fdsave = cf->conn->sock[cf->sockindex];
 1522|  6.59k|  cf->conn->sock[cf->sockindex] = ctx->sock;
 1523|       |
 1524|  6.59k|#ifdef DEBUGBUILD
 1525|       |  /* simulate network blocking/partial writes */
 1526|  6.59k|  if(ctx->wblock_percent > 0) {
  ------------------
  |  Branch (1526:6): [True: 0, False: 6.59k]
  ------------------
 1527|      0|    unsigned char c = 0;
 1528|      0|    Curl_rand_bytes(data, FALSE, &c, 1);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1529|      0|    if(c >= ((100 - ctx->wblock_percent) * 256 / 100)) {
  ------------------
  |  Branch (1529:8): [True: 0, False: 0]
  ------------------
 1530|      0|      CURL_TRC_CF(data, cf, "send(len=%zu) SIMULATE EWOULDBLOCK", orig_len);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1531|      0|      cf->conn->sock[cf->sockindex] = fdsave;
 1532|      0|      return CURLE_AGAIN;
 1533|      0|    }
 1534|      0|  }
 1535|  6.59k|  if(cf->cft != &Curl_cft_udp && ctx->wpartial_percent > 0 && len > 8) {
  ------------------
  |  Branch (1535:6): [True: 6.59k, False: 0]
  |  Branch (1535:34): [True: 0, False: 6.59k]
  |  Branch (1535:63): [True: 0, False: 0]
  ------------------
 1536|      0|    len = len * ctx->wpartial_percent / 100;
 1537|      0|    if(!len)
  ------------------
  |  Branch (1537:8): [True: 0, False: 0]
  ------------------
 1538|      0|      len = 1;
 1539|      0|    CURL_TRC_CF(data, cf, "send(len=%zu) SIMULATE partial write of %zu bytes",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1540|      0|                orig_len, len);
 1541|      0|  }
 1542|  6.59k|#endif
 1543|       |
 1544|       |#if defined(MSG_FASTOPEN) && !defined(TCP_FASTOPEN_CONNECT) /* Linux */
 1545|       |  if(cf->conn->bits.tcp_fastopen) {
 1546|       |    rv = sendto(ctx->sock, buf, len, MSG_FASTOPEN,
 1547|       |                &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1548|       |    cf->conn->bits.tcp_fastopen = FALSE;
 1549|       |  }
 1550|       |  else
 1551|       |#endif
 1552|  6.59k|    rv = swrite(ctx->sock, buf, len);
  ------------------
  |  |  974|  6.59k|#define swrite(x, y, z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
  |  |  975|  6.59k|                                      (const SEND_TYPE_ARG2)(y), \
  |  |  976|  6.59k|                                      (SEND_TYPE_ARG3)(z), \
  |  |  977|  6.59k|                                      (SEND_TYPE_ARG4)(SEND_4TH_ARG))
  |  |  ------------------
  |  |  |  |  917|  6.59k|#define SEND_4TH_ARG MSG_NOSIGNAL
  |  |  ------------------
  ------------------
 1553|       |
 1554|  6.59k|  if(!curlx_sztouz(rv, pnwritten)) {
  ------------------
  |  Branch (1554:6): [True: 0, False: 6.59k]
  ------------------
 1555|      0|    int sockerr = SOCKERRNO;
  ------------------
  |  | 1093|      0|#define SOCKERRNO         errno
  ------------------
 1556|      0|    if(SOCK_EAGAIN(sockerr)
  ------------------
  |  | 1144|      0|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1135|      0|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1144:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1557|      0|#ifndef USE_WINSOCK
 1558|      0|       || (sockerr == SOCKEINTR) || (sockerr == SOCKEINPROGRESS)
  ------------------
  |  | 1127|      0|#define SOCKEINTR         EINTR
  ------------------
                     || (sockerr == SOCKEINTR) || (sockerr == SOCKEINPROGRESS)
  ------------------
  |  | 1126|      0|#define SOCKEINPROGRESS   EINPROGRESS
  ------------------
  |  Branch (1558:11): [True: 0, False: 0]
  |  Branch (1558:37): [True: 0, False: 0]
  ------------------
 1559|      0|#endif
 1560|      0|      ) {
 1561|      0|      result = CURLE_AGAIN;  /* EWOULDBLOCK */
 1562|      0|    }
 1563|      0|    else {
 1564|      0|      char buffer[STRERROR_LEN];
 1565|      0|      failf(data, "Send failure: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1566|      0|            curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1567|      0|      data->state.os_errno = sockerr;
 1568|      0|      result = CURLE_SEND_ERROR;
 1569|      0|    }
 1570|      0|  }
 1571|       |
 1572|       |#ifdef USE_WINSOCK
 1573|       |  if(!result)
 1574|       |    win_update_sndbuf_size(data, ctx);
 1575|       |#endif
 1576|       |
 1577|  6.59k|  CURL_TRC_CF(data, cf, "send(len=%zu) -> %d, %zu",
  ------------------
  |  |  153|  6.59k|  do {                                          \
  |  |  154|  6.59k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  6.59k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  13.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 6.59k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  13.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  6.59k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  6.59k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  6.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6.59k]
  |  |  ------------------
  ------------------
 1578|  6.59k|              orig_len, (int)result, *pnwritten);
 1579|  6.59k|  cf->conn->sock[cf->sockindex] = fdsave;
 1580|  6.59k|  return result;
 1581|  6.59k|}
cf-socket.c:cf_socket_recv:
 1585|   161k|{
 1586|   161k|  struct cf_socket_ctx *ctx = cf->ctx;
 1587|   161k|  CURLcode result = CURLE_OK;
 1588|   161k|  ssize_t rv;
 1589|       |
 1590|   161k|  *pnread = 0;
 1591|   161k|#ifdef DEBUGBUILD
 1592|       |  /* simulate network blocking/partial reads */
 1593|   161k|  if(cf->cft != &Curl_cft_udp && ctx->rblock_percent > 0) {
  ------------------
  |  Branch (1593:6): [True: 161k, False: 0]
  |  Branch (1593:34): [True: 0, False: 161k]
  ------------------
 1594|      0|    unsigned char c = 0;
 1595|      0|    Curl_rand(data, &c, 1);
  ------------------
  |  |   33|      0|#define Curl_rand(a, b, c) Curl_rand_bytes(a, TRUE, b, c)
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  ------------------
 1596|      0|    if(c >= ((100 - ctx->rblock_percent) * 256 / 100)) {
  ------------------
  |  Branch (1596:8): [True: 0, False: 0]
  ------------------
 1597|      0|      CURL_TRC_CF(data, cf, "recv(len=%zu) SIMULATE EWOULDBLOCK", len);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1598|      0|      return CURLE_AGAIN;
 1599|      0|    }
 1600|      0|  }
 1601|   161k|  if(cf->cft != &Curl_cft_udp && ctx->recv_max && ctx->recv_max < len) {
  ------------------
  |  Branch (1601:6): [True: 161k, False: 0]
  |  Branch (1601:34): [True: 0, False: 161k]
  |  Branch (1601:51): [True: 0, False: 0]
  ------------------
 1602|      0|    CURL_TRC_CF(data, cf, "recv(len=%zu) SIMULATE max read of %zu bytes",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1603|      0|                len, ctx->recv_max);
 1604|      0|    len = ctx->recv_max;
 1605|      0|  }
 1606|   161k|#endif
 1607|       |
 1608|   161k|  rv = sread(ctx->sock, buf, len);
  ------------------
  |  |  952|   161k|#define sread(x, y, z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
  |  |  953|   161k|                                     (RECV_TYPE_ARG2)(y), \
  |  |  954|   161k|                                     (RECV_TYPE_ARG3)(z), \
  |  |  955|   161k|                                     (RECV_TYPE_ARG4)(0))
  ------------------
 1609|       |
 1610|   161k|  if(!curlx_sztouz(rv, pnread)) {
  ------------------
  |  Branch (1610:6): [True: 821, False: 160k]
  ------------------
 1611|    821|    int sockerr = SOCKERRNO;
  ------------------
  |  | 1093|    821|#define SOCKERRNO         errno
  ------------------
 1612|    821|    if(SOCK_EAGAIN(sockerr)
  ------------------
  |  | 1144|  1.64k|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1135|    821|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1144:24): [True: 821, False: 0]
  |  |  ------------------
  ------------------
 1613|      0|#ifndef USE_WINSOCK
 1614|      0|       || (sockerr == SOCKEINTR)
  ------------------
  |  | 1127|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (1614:11): [True: 0, False: 0]
  ------------------
 1615|    821|#endif
 1616|    821|      ) {
 1617|    821|      result = CURLE_AGAIN;  /* EWOULDBLOCK */
 1618|    821|    }
 1619|      0|    else {
 1620|      0|      char buffer[STRERROR_LEN];
 1621|      0|      failf(data, "Recv failure: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1622|      0|            curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1623|      0|      data->state.os_errno = sockerr;
 1624|      0|      result = CURLE_RECV_ERROR;
 1625|      0|    }
 1626|    821|  }
 1627|       |
 1628|   161k|  CURL_TRC_CF(data, cf, "recv(len=%zu) -> %d, %zu", len, (int)result, *pnread);
  ------------------
  |  |  153|   161k|  do {                                          \
  |  |  154|   161k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|   161k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|   322k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 161k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 161k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|   322k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|   161k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   161k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   161k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 161k]
  |  |  ------------------
  ------------------
 1629|   161k|  if(!result && !ctx->got_first_byte) {
  ------------------
  |  Branch (1629:6): [True: 160k, False: 821]
  |  Branch (1629:17): [True: 4.18k, False: 156k]
  ------------------
 1630|  4.18k|    ctx->first_byte_at = *Curl_pgrs_now(data);
 1631|       |    ctx->got_first_byte = TRUE;
  ------------------
  |  | 1053|  4.18k|#define TRUE true
  ------------------
 1632|  4.18k|  }
 1633|   161k|  return result;
 1634|   161k|}
cf-socket.c:cf_socket_cntrl:
 1663|     81|{
 1664|     81|  struct cf_socket_ctx *ctx = cf->ctx;
 1665|       |
 1666|     81|  (void)arg1;
 1667|     81|  (void)arg2;
 1668|     81|  switch(event) {
  ------------------
  |  Branch (1668:10): [True: 0, False: 81]
  ------------------
 1669|      0|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  121|      0|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (1669:3): [True: 0, False: 81]
  ------------------
 1670|      0|    cf_socket_active(cf, data);
 1671|      0|    cf_socket_update_data(cf, data);
 1672|      0|    break;
 1673|      0|  case CF_CTRL_DATA_SETUP:
  ------------------
  |  |  115|      0|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
  |  Branch (1673:3): [True: 0, False: 81]
  ------------------
 1674|      0|    cf_socket_update_data(cf, data);
 1675|      0|    break;
 1676|      0|  case CF_CTRL_FORGET_SOCKET:
  ------------------
  |  |  122|      0|#define CF_CTRL_FORGET_SOCKET    (256 + 1) /* 0          NULL     ignored */
  ------------------
  |  Branch (1676:3): [True: 0, False: 81]
  ------------------
 1677|      0|    ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1678|      0|    break;
 1679|     81|  }
 1680|     81|  return CURLE_OK;
 1681|     81|}
cf-socket.c:cf_socket_query:
 1723|  10.5k|{
 1724|  10.5k|  struct cf_socket_ctx *ctx = cf->ctx;
 1725|       |
 1726|  10.5k|  switch(query) {
 1727|  1.02k|  case CF_QUERY_SOCKET:
  ------------------
  |  |  163|  1.02k|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (1727:3): [True: 1.02k, False: 9.48k]
  ------------------
 1728|  1.02k|    DEBUGASSERT(pres2);
  ------------------
  |  | 1079|  1.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1728:5): [True: 0, False: 1.02k]
  |  Branch (1728:5): [True: 1.02k, False: 0]
  ------------------
 1729|  1.02k|    *((curl_socket_t *)pres2) = ctx->sock;
 1730|  1.02k|    return CURLE_OK;
 1731|      0|  case CF_QUERY_TRANSPORT:
  ------------------
  |  |  176|      0|#define CF_QUERY_TRANSPORT         14  /* TRNSPRT_*  - * */
  ------------------
  |  Branch (1731:3): [True: 0, False: 10.5k]
  ------------------
 1732|      0|    DEBUGASSERT(pres1);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1732:5): [True: 0, False: 0]
  |  Branch (1732:5): [True: 0, False: 0]
  ------------------
 1733|      0|    *pres1 = ctx->transport;
 1734|      0|    return CURLE_OK;
 1735|      0|  case CF_QUERY_REMOTE_ADDR:
  ------------------
  |  |  172|      0|#define CF_QUERY_REMOTE_ADDR       10  /* -          `Curl_sockaddr_ex *` */
  ------------------
  |  Branch (1735:3): [True: 0, False: 10.5k]
  ------------------
 1736|      0|    DEBUGASSERT(pres2);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1736:5): [True: 0, False: 0]
  |  Branch (1736:5): [True: 0, False: 0]
  ------------------
 1737|      0|    *((const struct Curl_sockaddr_ex **)pres2) = cf->connected ?
  ------------------
  |  Branch (1737:50): [True: 0, False: 0]
  ------------------
 1738|      0|                                                 &ctx->addr : NULL;
 1739|      0|    return CURLE_OK;
 1740|      0|  case CF_QUERY_CONNECT_REPLY_MS:
  ------------------
  |  |  162|      0|#define CF_QUERY_CONNECT_REPLY_MS   2  /* number     -        */
  ------------------
  |  Branch (1740:3): [True: 0, False: 10.5k]
  ------------------
 1741|      0|    if(ctx->got_first_byte) {
  ------------------
  |  Branch (1741:8): [True: 0, False: 0]
  ------------------
 1742|      0|      timediff_t ms = curlx_ptimediff_ms(&ctx->first_byte_at,
 1743|      0|                                         &ctx->started_at);
 1744|      0|      *pres1 = (ms < INT_MAX) ? (int)ms : INT_MAX;
  ------------------
  |  Branch (1744:16): [True: 0, False: 0]
  ------------------
 1745|      0|    }
 1746|      0|    else
 1747|      0|      *pres1 = -1;
 1748|      0|    return CURLE_OK;
 1749|  5.21k|  case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  164|  5.21k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (1749:3): [True: 5.21k, False: 5.29k]
  ------------------
 1750|  5.21k|    struct curltime *when = pres2;
 1751|  5.21k|    switch(ctx->transport) {
 1752|      0|    case TRNSPRT_UDP:
  ------------------
  |  |  238|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (1752:5): [True: 0, False: 5.21k]
  ------------------
 1753|      0|    case TRNSPRT_QUIC:
  ------------------
  |  |  239|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (1753:5): [True: 0, False: 5.21k]
  ------------------
 1754|       |      /* Since UDP connected sockets work different from TCP, we use the
 1755|       |       * time of the first byte from the peer as the "connect" time. */
 1756|      0|      if(ctx->got_first_byte) {
  ------------------
  |  Branch (1756:10): [True: 0, False: 0]
  ------------------
 1757|      0|        *when = ctx->first_byte_at;
 1758|      0|        break;
 1759|      0|      }
 1760|      0|      FALLTHROUGH();
  ------------------
  |  |  823|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1761|  5.21k|    default:
  ------------------
  |  Branch (1761:5): [True: 5.21k, False: 0]
  ------------------
 1762|  5.21k|      *when = ctx->connected_at;
 1763|  5.21k|      break;
 1764|  5.21k|    }
 1765|  5.21k|    return CURLE_OK;
 1766|  5.21k|  }
 1767|      9|  case CF_QUERY_IP_INFO:
  ------------------
  |  |  168|      9|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
  |  Branch (1767:3): [True: 9, False: 10.4k]
  ------------------
 1768|      9|#ifdef USE_IPV6
 1769|      9|    *pres1 = (ctx->addr.family == AF_INET6);
 1770|       |#else
 1771|       |    *pres1 = FALSE;
 1772|       |#endif
 1773|      9|    *(struct ip_quadruple *)pres2 = ctx->ip;
 1774|      9|    return CURLE_OK;
 1775|  4.26k|  default:
  ------------------
  |  Branch (1775:3): [True: 4.26k, False: 6.24k]
  ------------------
 1776|  4.26k|    break;
 1777|  10.5k|  }
 1778|  4.26k|  return cf->next ?
  ------------------
  |  Branch (1778:10): [True: 0, False: 4.26k]
  ------------------
 1779|      0|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1780|  4.26k|    CURLE_UNKNOWN_OPTION;
 1781|  10.5k|}
cf-socket.c:cf_socket_ctx_init:
  990|  5.59k|{
  991|  5.59k|  memset(ctx, 0, sizeof(*ctx));
  992|  5.59k|  Curl_peer_link(&ctx->peer, peer);
  993|  5.59k|  ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  5.59k|#define CURL_SOCKET_BAD (-1)
  ------------------
  994|  5.59k|  ctx->transport = transport;
  995|  5.59k|  ctx->addr = *addr;
  996|       |
  997|  5.59k|#ifdef DEBUGBUILD
  998|  5.59k|  {
  999|  5.59k|    const char *p = getenv("CURL_DBG_SOCK_WBLOCK");
 1000|  5.59k|    if(p) {
  ------------------
  |  Branch (1000:8): [True: 0, False: 5.59k]
  ------------------
 1001|      0|      curl_off_t l;
 1002|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (1002:10): [True: 0, False: 0]
  ------------------
 1003|      0|        ctx->wblock_percent = (int)l;
 1004|      0|    }
 1005|  5.59k|    p = getenv("CURL_DBG_SOCK_WPARTIAL");
 1006|  5.59k|    if(p) {
  ------------------
  |  Branch (1006:8): [True: 0, False: 5.59k]
  ------------------
 1007|      0|      curl_off_t l;
 1008|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (1008:10): [True: 0, False: 0]
  ------------------
 1009|      0|        ctx->wpartial_percent = (int)l;
 1010|      0|    }
 1011|  5.59k|    p = getenv("CURL_DBG_SOCK_RBLOCK");
 1012|  5.59k|    if(p) {
  ------------------
  |  Branch (1012:8): [True: 0, False: 5.59k]
  ------------------
 1013|      0|      curl_off_t l;
 1014|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (1014:10): [True: 0, False: 0]
  ------------------
 1015|      0|        ctx->rblock_percent = (int)l;
 1016|      0|    }
 1017|  5.59k|    p = getenv("CURL_DBG_SOCK_RMAX");
 1018|  5.59k|    if(p) {
  ------------------
  |  Branch (1018:8): [True: 0, False: 5.59k]
  ------------------
 1019|      0|      curl_off_t l;
 1020|      0|      if(!curlx_str_number(&p, &l, CURL_OFF_T_MAX))
  ------------------
  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (1020:10): [True: 0, False: 0]
  ------------------
 1021|      0|        ctx->recv_max = (size_t)l;
 1022|      0|    }
 1023|  5.59k|  }
 1024|  5.59k|#endif
 1025|       |
 1026|  5.59k|  return CURLE_OK;
 1027|  5.59k|}
cf-socket.c:cf_socket_ctx_free:
 1030|  5.59k|{
 1031|  5.59k|  if(ctx) {
  ------------------
  |  Branch (1031:6): [True: 5.59k, False: 0]
  ------------------
 1032|  5.59k|    Curl_peer_unlink(&ctx->peer);
 1033|  5.59k|    curlx_free(ctx);
  ------------------
  |  | 1478|  5.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1034|  5.59k|  }
 1035|  5.59k|}
cf-socket.c:set_local_ip:
 1077|  5.63k|{
 1078|  5.63k|  struct cf_socket_ctx *ctx = cf->ctx;
 1079|  5.63k|  ctx->ip.local_ip[0] = 0;
 1080|  5.63k|  ctx->ip.local_port = 0;
 1081|       |
 1082|  5.63k|#ifdef HAVE_GETSOCKNAME
 1083|  5.63k|  if((ctx->sock != CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|  5.63k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1083:6): [True: 5.35k, False: 276]
  ------------------
 1084|  5.35k|     !(data->conn->scheme->protocol & CURLPROTO_TFTP)) {
  ------------------
  |  | 1097|  5.35k|#define CURLPROTO_TFTP    (1L << 11)
  ------------------
  |  Branch (1084:6): [True: 5.35k, False: 0]
  ------------------
 1085|       |    /* TFTP does not connect, so it cannot get the IP like this */
 1086|  5.35k|    struct Curl_sockaddr_storage ssloc;
 1087|  5.35k|    curl_socklen_t slen = sizeof(struct Curl_sockaddr_storage);
 1088|  5.35k|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1613|  5.35k|#define VERBOSE(x) x
  ------------------
 1089|       |
 1090|  5.35k|    memset(&ssloc, 0, sizeof(ssloc));
 1091|  5.35k|    if(getsockname(ctx->sock, (struct sockaddr *)&ssloc, &slen)) {
  ------------------
  |  Branch (1091:8): [True: 0, False: 5.35k]
  ------------------
 1092|      0|      VERBOSE(int sockerr = SOCKERRNO);
  ------------------
  |  | 1613|      0|#define VERBOSE(x) x
  ------------------
 1093|      0|      infof(data, "getsockname() failed with errno %d: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1094|      0|            sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1095|      0|    }
 1096|  5.35k|    else if(!sockaddr2string((struct sockaddr *)&ssloc, slen,
  ------------------
  |  Branch (1096:13): [True: 0, False: 5.35k]
  ------------------
 1097|  5.35k|                             ctx->ip.local_ip, &ctx->ip.local_port)) {
 1098|      0|      infof(data, "ssloc inet_ntop() failed with errno %d: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1099|      0|            errno, curlx_strerror(errno, buffer, sizeof(buffer)));
 1100|      0|    }
 1101|  5.35k|  }
 1102|       |#else
 1103|       |  (void)data;
 1104|       |#endif
 1105|  5.63k|}

Curl_cf_def_adjust_pollset:
   69|     10|{
   70|       |  /* NOP */
   71|     10|  (void)cf;
   72|     10|  (void)data;
   73|     10|  (void)ps;
   74|     10|  return CURLE_OK;
   75|     10|}
Curl_cf_def_send:
   87|  6.62k|{
   88|  6.62k|  if(cf->next)
  ------------------
  |  Branch (88:6): [True: 6.62k, False: 0]
  ------------------
   89|  6.62k|    return cf->next->cft->do_send(cf->next, data, buf, len, eos, pnwritten);
   90|      0|  *pnwritten = 0;
   91|      0|  return CURLE_RECV_ERROR;
   92|  6.62k|}
Curl_cf_def_recv:
   96|   161k|{
   97|   161k|  if(cf->next)
  ------------------
  |  Branch (97:6): [True: 161k, False: 0]
  ------------------
   98|   161k|    return cf->next->cft->do_recv(cf->next, data, buf, len, pnread);
   99|      0|  *pnread = 0;
  100|      0|  return CURLE_SEND_ERROR;
  101|   161k|}
Curl_cf_def_query:
  123|  34.1k|{
  124|  34.1k|  return cf->next ?
  ------------------
  |  Branch (124:10): [True: 34.0k, False: 78]
  ------------------
  125|  34.0k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  126|  34.1k|    CURLE_UNKNOWN_OPTION;
  127|  34.1k|}
Curl_conn_trc_filters:
  132|  22.9k|{
  133|  22.9k|  if(CURL_TRC_M_is_verbose(data) && data->conn) {
  ------------------
  |  |  135|  22.9k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  329|  45.9k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  45.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 22.9k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 22.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  45.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  45.9k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (133:37): [True: 0, False: 0]
  ------------------
  134|      0|    struct Curl_cfilter *cf = data->conn->cfilter[sockindex];
  135|       |
  136|      0|    if(cf) {
  ------------------
  |  Branch (136:8): [True: 0, False: 0]
  ------------------
  137|      0|      char msg[256], *buf;
  138|      0|      int blen, n;
  139|       |
  140|      0|      buf = msg;
  141|      0|      blen = sizeof(msg) - 1;
  142|      0|      n = curl_msnprintf(buf, blen, "%s [%d]", info, sockindex);
  143|      0|      buf += n;
  144|      0|      blen -= n;
  145|      0|      for(; cf && blen; cf = cf->next) {
  ------------------
  |  Branch (145:13): [True: 0, False: 0]
  |  Branch (145:19): [True: 0, False: 0]
  ------------------
  146|      0|        n = curl_msnprintf(buf, blen, "[%s%s]",
  147|      0|                           cf->connected ? "" : "!", cf->cft->name);
  ------------------
  |  Branch (147:28): [True: 0, False: 0]
  ------------------
  148|      0|        buf += n;
  149|      0|        blen -= n;
  150|      0|      }
  151|      0|      CURL_TRC_M(data, "%s%s", msg, blen ? "" : "...");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  152|      0|    }
  153|      0|    else
  154|      0|      CURL_TRC_M(data, "%s [%d][-]", info, sockindex);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  155|      0|  }
  156|  22.9k|}
Curl_conn_cf_discard_chain:
  161|  33.1k|{
  162|  33.1k|  struct Curl_cfilter *cfn, *cf = *pcf;
  163|       |
  164|  33.1k|  if(cf) {
  ------------------
  |  Branch (164:6): [True: 12.1k, False: 21.0k]
  ------------------
  165|  12.1k|    *pcf = NULL;
  166|  48.7k|    while(cf) {
  ------------------
  |  Branch (166:11): [True: 36.6k, False: 12.1k]
  ------------------
  167|  36.6k|      cfn = cf->next;
  168|       |      /* prevent destroying filter to mess with its sub-chain, since
  169|       |       * we have the reference now and will call destroy on it.
  170|       |       */
  171|  36.6k|      cf->next = NULL;
  172|  36.6k|      cf->cft->destroy(cf, data);
  173|  36.6k|      curlx_free(cf);
  ------------------
  |  | 1478|  36.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  174|  36.6k|      cf = cfn;
  175|  36.6k|    }
  176|  12.1k|  }
  177|  33.1k|}
Curl_conn_cf_discard_all:
  181|  27.2k|{
  182|  27.2k|  struct curltime *pt = &conn->shutdown.start[sockindex];
  183|  27.2k|  memset(pt, 0, sizeof(*pt));
  184|  27.2k|  Curl_conn_cf_discard_chain(&conn->cfilter[sockindex], data);
  185|  27.2k|}
Curl_cf_recv:
  244|   157k|{
  245|   157k|  struct Curl_cfilter *cf;
  246|       |
  247|   157k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|   157k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 157k]
  |  Branch (247:3): [True: 157k, False: 0]
  ------------------
  248|   157k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1079|   157k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 157k]
  |  Branch (248:3): [True: 157k, False: 0]
  ------------------
  249|   157k|  cf = data->conn->cfilter[sockindex];
  250|   944k|  while(cf && !cf->connected)
  ------------------
  |  Branch (250:9): [True: 944k, False: 0]
  |  Branch (250:15): [True: 787k, False: 157k]
  ------------------
  251|   787k|    cf = cf->next;
  252|   157k|  if(cf)
  ------------------
  |  Branch (252:6): [True: 157k, False: 0]
  ------------------
  253|   157k|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  254|      0|  failf(data, "recv: no filter connected");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  255|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (255:3): [Folded, False: 0]
  |  Branch (255:3): [Folded, False: 0]
  ------------------
  256|      0|  *pnread = 0;
  257|      0|  return CURLE_FAILED_INIT;
  258|      0|}
Curl_cf_recv_bufq:
  298|    296|{
  299|    296|  struct cf_io_ctx io;
  300|       |
  301|    296|  if(!cf || !data) {
  ------------------
  |  Branch (301:6): [True: 0, False: 296]
  |  Branch (301:13): [True: 0, False: 296]
  ------------------
  302|      0|    *pnread = 0;
  303|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  304|      0|  }
  305|    296|  io.data = data;
  306|    296|  io.cf = cf;
  307|    296|  return Curl_bufq_sipn(bufq, maxlen, cf_bufq_reader, &io, pnread);
  308|    296|}
Curl_cf_send_bufq:
  323|    200|{
  324|    200|  struct cf_io_ctx io;
  325|       |
  326|    200|  if(!cf || !data) {
  ------------------
  |  Branch (326:6): [True: 0, False: 200]
  |  Branch (326:13): [True: 0, False: 200]
  ------------------
  327|      0|    *pnwritten = 0;
  328|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  329|      0|  }
  330|    200|  io.data = data;
  331|    200|  io.cf = cf;
  332|    200|  if(buf && blen)
  ------------------
  |  Branch (332:6): [True: 0, False: 200]
  |  Branch (332:13): [True: 0, False: 0]
  ------------------
  333|      0|    return Curl_bufq_write_pass(bufq, buf, blen, cf_bufq_writer, &io,
  334|      0|                                pnwritten);
  335|    200|  else
  336|    200|    return Curl_bufq_pass(bufq, cf_bufq_writer, &io, pnwritten);
  337|    200|}
Curl_cf_create:
  342|  36.6k|{
  343|  36.6k|  struct Curl_cfilter *cf;
  344|  36.6k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  345|       |
  346|  36.6k|  DEBUGASSERT(cft);
  ------------------
  |  | 1079|  36.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (346:3): [True: 0, False: 36.6k]
  |  Branch (346:3): [True: 36.6k, False: 0]
  ------------------
  347|  36.6k|  cf = curlx_calloc(1, sizeof(*cf));
  ------------------
  |  | 1475|  36.6k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  348|  36.6k|  if(!cf)
  ------------------
  |  Branch (348:6): [True: 0, False: 36.6k]
  ------------------
  349|      0|    goto out;
  350|       |
  351|  36.6k|  cf->cft = cft;
  352|  36.6k|  cf->ctx = ctx;
  353|  36.6k|  result = CURLE_OK;
  354|  36.6k|out:
  355|  36.6k|  *pcf = cf;
  356|  36.6k|  return result;
  357|  36.6k|}
Curl_conn_cf_add:
  363|  12.5k|{
  364|  12.5k|  DEBUGASSERT(conn);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (364:3): [True: 0, False: 12.5k]
  |  Branch (364:3): [True: 12.5k, False: 0]
  ------------------
  365|  12.5k|  DEBUGASSERT(!cf->conn);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (365:3): [True: 0, False: 12.5k]
  |  Branch (365:3): [True: 12.5k, False: 0]
  ------------------
  366|  12.5k|  DEBUGASSERT(!cf->next);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (366:3): [True: 0, False: 12.5k]
  |  Branch (366:3): [True: 12.5k, False: 0]
  ------------------
  367|       |
  368|  12.5k|  cf->next = conn->cfilter[sockindex];
  369|  12.5k|  cf->conn = conn;
  370|  12.5k|  cf->sockindex = sockindex;
  371|  12.5k|  conn->cfilter[sockindex] = cf;
  372|  12.5k|  CURL_TRC_CF(data, cf, "added");
  ------------------
  |  |  153|  12.5k|  do {                                          \
  |  |  154|  12.5k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  12.5k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  25.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 12.5k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 12.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  25.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  12.5k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  12.5k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  373|  12.5k|}
Curl_conn_cf_insert_after:
  377|  18.5k|{
  378|  18.5k|  struct Curl_cfilter *tail, **pnext;
  379|       |
  380|  18.5k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1079|  18.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (380:3): [True: 0, False: 18.5k]
  |  Branch (380:3): [True: 18.5k, False: 0]
  ------------------
  381|  18.5k|  DEBUGASSERT(cf_new);
  ------------------
  |  | 1079|  18.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 0, False: 18.5k]
  |  Branch (381:3): [True: 18.5k, False: 0]
  ------------------
  382|  18.5k|  DEBUGASSERT(!cf_new->conn);
  ------------------
  |  | 1079|  18.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (382:3): [True: 0, False: 18.5k]
  |  Branch (382:3): [True: 18.5k, False: 0]
  ------------------
  383|       |
  384|  18.5k|  tail = cf_at->next;
  385|  18.5k|  cf_at->next = cf_new;
  386|  18.5k|  do {
  387|  18.5k|    cf_new->conn = cf_at->conn;
  388|  18.5k|    cf_new->sockindex = cf_at->sockindex;
  389|  18.5k|    pnext = &cf_new->next;
  390|  18.5k|    cf_new = cf_new->next;
  391|  18.5k|  } while(cf_new);
  ------------------
  |  Branch (391:11): [True: 0, False: 18.5k]
  ------------------
  392|  18.5k|  *pnext = tail;
  393|  18.5k|}
Curl_conn_cf_connect:
  422|  30.4k|{
  423|  30.4k|  if(cf)
  ------------------
  |  Branch (423:6): [True: 30.4k, False: 0]
  ------------------
  424|  30.4k|    return cf->cft->do_connect(cf, data, done);
  425|      0|  return CURLE_FAILED_INIT;
  426|  30.4k|}
Curl_conn_cf_send:
  431|  5.00k|{
  432|  5.00k|  if(cf)
  ------------------
  |  Branch (432:6): [True: 5.00k, False: 0]
  ------------------
  433|  5.00k|    return cf->cft->do_send(cf, data, buf, len, eos, pnwritten);
  434|      0|  *pnwritten = 0;
  435|      0|  return CURLE_SEND_ERROR;
  436|  5.00k|}
Curl_conn_cf_recv:
  440|  3.60k|{
  441|  3.60k|  if(cf)
  ------------------
  |  Branch (441:6): [True: 3.60k, False: 0]
  ------------------
  442|  3.60k|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  443|      0|  *pnread = 0;
  444|      0|  return CURLE_RECV_ERROR;
  445|  3.60k|}
Curl_conn_is_connected:
  496|  10.9k|{
  497|  10.9k|  struct Curl_cfilter *cf;
  498|       |
  499|  10.9k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  310|  10.9k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (310:36): [True: 10.9k, False: 0]
  |  |  |  Branch (310:50): [True: 10.9k, False: 0]
  |  |  ------------------
  ------------------
  500|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  501|  10.9k|  cf = conn->cfilter[sockindex];
  502|  10.9k|  if(cf)
  ------------------
  |  Branch (502:6): [True: 10.9k, False: 0]
  ------------------
  503|  10.9k|    return (bool)cf->connected;
  504|      0|  else if(conn->scheme->flags & PROTOPT_NONETWORK)
  ------------------
  |  |  214|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (504:11): [True: 0, False: 0]
  ------------------
  505|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  506|      0|  return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  507|  10.9k|}
Curl_conn_is_ssl:
  565|  3.47k|{
  566|  3.47k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  310|  3.47k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (310:36): [True: 3.47k, False: 0]
  |  |  |  Branch (310:50): [True: 3.47k, False: 0]
  |  |  ------------------
  ------------------
  567|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  568|  3.47k|  return conn ? cf_is_ssl(conn->cfilter[sockindex]) : FALSE;
  ------------------
  |  | 1056|  3.47k|#define FALSE false
  ------------------
  |  Branch (568:10): [True: 3.47k, False: 0]
  ------------------
  569|  3.47k|}
Curl_conn_is_multiplex:
  600|  6.25k|{
  601|  6.25k|  struct Curl_cfilter *cf;
  602|       |
  603|  6.25k|  if(!conn || !CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  310|  6.25k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (310:36): [True: 6.25k, False: 0]
  |  |  |  Branch (310:50): [True: 6.25k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (603:6): [True: 0, False: 6.25k]
  ------------------
  604|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  605|  18.9k|  for(cf = conn->cfilter[sockindex]; cf; cf = cf->next) {
  ------------------
  |  Branch (605:38): [True: 12.7k, False: 6.20k]
  ------------------
  606|  12.7k|    if(cf->cft->flags & CF_TYPE_MULTIPLEX)
  ------------------
  |  |  204|  12.7k|#define CF_TYPE_MULTIPLEX   (1 << 2)
  ------------------
  |  Branch (606:8): [True: 0, False: 12.7k]
  ------------------
  607|      0|      return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  608|  12.7k|    if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  202|  12.7k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
                  if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  203|  12.7k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
  |  Branch (608:8): [True: 48, False: 12.6k]
  ------------------
  609|     48|      return FALSE;
  ------------------
  |  | 1056|     48|#define FALSE false
  ------------------
  610|  12.7k|  }
  611|  6.20k|  return FALSE;
  ------------------
  |  | 1056|  6.20k|#define FALSE false
  ------------------
  612|  6.25k|}
Curl_socktype_for_transport:
  622|  6.40k|{
  623|  6.40k|  switch(transport) {
  624|  6.37k|  case TRNSPRT_TCP:
  ------------------
  |  |  237|  6.37k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (624:3): [True: 6.37k, False: 27]
  ------------------
  625|  6.37k|    return SOCK_STREAM;
  626|     27|  case TRNSPRT_UNIX:
  ------------------
  |  |  240|     27|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (626:3): [True: 27, False: 6.37k]
  ------------------
  627|     27|    return SOCK_STREAM;
  628|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (628:3): [True: 0, False: 6.40k]
  ------------------
  629|       |    return SOCK_DGRAM;
  630|  6.40k|  }
  631|  6.40k|}
Curl_protocol_for_transport:
  634|  6.40k|{
  635|  6.40k|  switch(transport) {
  636|  6.37k|  case TRNSPRT_TCP:
  ------------------
  |  |  237|  6.37k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (636:3): [True: 6.37k, False: 27]
  ------------------
  637|  6.37k|    return IPPROTO_TCP;
  638|     27|  case TRNSPRT_UNIX:
  ------------------
  |  |  240|     27|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (638:3): [True: 27, False: 6.37k]
  ------------------
  639|     27|    return IPPROTO_IP;
  640|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (640:3): [True: 0, False: 6.40k]
  ------------------
  641|       |    return IPPROTO_UDP;
  642|  6.40k|  }
  643|  6.40k|}
Curl_conn_cf_needs_flush:
  698|  8.77k|{
  699|  8.77k|  CURLcode result;
  700|  8.77k|  int pending = 0;
  701|  8.77k|  result = cf ? cf->cft->query(cf, data, CF_QUERY_NEED_FLUSH,
  ------------------
  |  |  167|  8.77k|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (701:12): [True: 8.77k, False: 0]
  ------------------
  702|  8.77k|                               &pending, NULL) : CURLE_UNKNOWN_OPTION;
  703|  8.77k|  return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1056|  8.77k|#define FALSE false
  ------------------
                return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1053|  8.77k|#define TRUE true
  ------------------
  |  Branch (703:11): [True: 8.77k, False: 0]
  |  Branch (703:21): [True: 0, False: 0]
  ------------------
  704|  8.77k|}
Curl_conn_needs_flush:
  707|  7.88k|{
  708|  7.88k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  310|  7.88k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (310:36): [True: 7.88k, False: 0]
  |  |  |  Branch (310:50): [True: 7.88k, False: 0]
  |  |  ------------------
  ------------------
  709|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  710|  7.88k|  return Curl_conn_cf_needs_flush(data->conn->cfilter[sockindex], data);
  711|  7.88k|}
Curl_conn_cf_adjust_pollset:
  716|  3.29k|{
  717|  3.29k|  CURLcode result = CURLE_OK;
  718|       |  /* Go through all filters, top to bottom, and let them manage the pollset
  719|       |   * - connected filters can do so
  720|       |   * - CF_TYPE_DNS filters can
  721|       |   * - unconnected filters without next or connect next can
  722|       |   */
  723|  12.6k|  for(; cf && !result; cf = cf->next) {
  ------------------
  |  Branch (723:9): [True: 9.39k, False: 3.29k]
  |  Branch (723:15): [True: 9.39k, False: 0]
  ------------------
  724|  9.39k|    if(cf->shutdown)
  ------------------
  |  Branch (724:8): [True: 0, False: 9.39k]
  ------------------
  725|      0|      continue;
  726|  9.39k|    if(cf->connected || (cf->cft->flags & CF_TYPE_DNS) ||
  ------------------
  |  |  208|  7.49k|#define CF_TYPE_DNS         (1 << 6)
  ------------------
  |  Branch (726:8): [True: 1.90k, False: 7.49k]
  |  Branch (726:25): [True: 2.47k, False: 5.01k]
  ------------------
  727|  5.01k|       !cf->next || cf->next->connected)
  ------------------
  |  Branch (727:8): [True: 2.34k, False: 2.67k]
  |  Branch (727:21): [True: 952, False: 1.72k]
  ------------------
  728|  7.67k|      result = cf->cft->adjust_pollset(cf, data, ps);
  729|  9.39k|  }
  730|  3.29k|  return result;
  731|  3.29k|}
Curl_conn_adjust_pollset:
  736|  2.24k|{
  737|  2.24k|  CURLcode result = CURLE_OK;
  738|  2.24k|  bool want_io = !!ps->n;
  739|  2.24k|  int i;
  740|       |
  741|  2.24k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  2.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (741:3): [True: 0, False: 2.24k]
  |  Branch (741:3): [True: 2.24k, False: 0]
  ------------------
  742|  2.24k|  DEBUGASSERT(conn);
  ------------------
  |  | 1079|  2.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (742:3): [True: 0, False: 2.24k]
  |  Branch (742:3): [True: 2.24k, False: 0]
  ------------------
  743|       |  /* During connect time, connection filters may add sockets to the pollset
  744|       |   * even when the transfer neither wants to send nor receive. And those
  745|       |   * sockets, when having events, are served. The same applies to a
  746|       |   * filter chain whose shutdown has started.
  747|       |   * Once a filter chain is connected however and before its shutdown
  748|       |   * starts, a transfer that neither wants to send nor receive
  749|       |   * will never call the connection filters. Any sockets added by the filters
  750|       |   * will not change state and POLLIN/POLLOUT events will trigger forever,
  751|       |   * making us busy loop. See #21671.
  752|       |   * Gate each filter chain on its own state, so that one chain being in
  753|       |   * connect or shutdown does not add poll events for the other. Check
  754|       |   * against the transfer's own interest, before any chain added sockets
  755|       |   * of its own. */
  756|  6.74k|  for(i = 0; (i < (int)CURL_ARRAYSIZE(conn->cfilter)) && !result; ++i) {
  ------------------
  |  | 1303|  6.74k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (756:14): [True: 4.49k, False: 2.24k]
  |  Branch (756:58): [True: 4.49k, False: 0]
  ------------------
  757|  4.49k|    if(conn->cfilter[i] &&
  ------------------
  |  Branch (757:8): [True: 2.24k, False: 2.24k]
  ------------------
  758|  2.24k|       (want_io || !Curl_conn_is_connected(conn, i) ||
  ------------------
  |  Branch (758:9): [True: 74, False: 2.17k]
  |  Branch (758:20): [True: 2.17k, False: 0]
  ------------------
  759|      0|        Curl_shutdown_started(conn, i)))
  ------------------
  |  Branch (759:9): [True: 0, False: 0]
  ------------------
  760|  2.24k|      result = Curl_conn_cf_adjust_pollset(conn->cfilter[i], data, ps);
  761|  4.49k|  }
  762|  2.24k|  return result;
  763|  2.24k|}
Curl_conn_cf_cntrl:
  845|  25.1k|{
  846|  25.1k|  CURLcode result = CURLE_OK;
  847|       |
  848|  38.2k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (848:9): [True: 13.1k, False: 25.1k]
  ------------------
  849|  13.1k|    if(cf->cft->cntrl == Curl_cf_def_cntrl)
  ------------------
  |  Branch (849:8): [True: 411, False: 12.7k]
  ------------------
  850|    411|      continue;
  851|  12.7k|    result = cf->cft->cntrl(cf, data, event, arg1, arg2);
  852|  12.7k|    if(!ignore_result && result)
  ------------------
  |  Branch (852:8): [True: 35, False: 12.6k]
  |  Branch (852:26): [True: 0, False: 35]
  ------------------
  853|      0|      break;
  854|  12.7k|  }
  855|  25.1k|  return result;
  856|  25.1k|}
Curl_conn_cf_get_socket:
  860|  8.74k|{
  861|  8.74k|  curl_socket_t sock;
  862|  8.74k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_SOCKET, NULL, &sock))
  ------------------
  |  |  163|  8.74k|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (862:6): [True: 8.74k, False: 0]
  |  Branch (862:12): [True: 1.02k, False: 7.72k]
  ------------------
  863|  1.02k|    return sock;
  864|  7.72k|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|  7.72k|#define CURL_SOCKET_BAD (-1)
  ------------------
  865|  8.74k|}
Curl_conn_cf_get_alpn_negotiated:
  878|  1.60k|{
  879|  1.60k|  const char *alpn = NULL;
  880|  1.60k|  CURL_TRC_CF(data, cf, "query ALPN");
  ------------------
  |  |  153|  1.60k|  do {                                          \
  |  |  154|  1.60k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.60k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.20k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.60k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.20k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.60k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.60k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.60k]
  |  |  ------------------
  ------------------
  881|  1.60k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_ALPN_NEGOTIATED, NULL,
  ------------------
  |  |  177|  1.60k|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (881:6): [True: 1.60k, False: 0]
  |  Branch (881:12): [True: 2, False: 1.59k]
  ------------------
  882|  1.60k|                           CURL_UNCONST(&alpn)))
  ------------------
  |  |  864|  1.60k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  883|      2|    return alpn;
  884|  1.59k|  return NULL;
  885|  1.60k|}
Curl_conn_cf_get_ip_info:
  901|      9|{
  902|      9|  CURLcode result = CURLE_UNKNOWN_OPTION;
  903|      9|  if(cf) {
  ------------------
  |  Branch (903:6): [True: 9, False: 0]
  ------------------
  904|      9|    int ipv6 = 0;
  905|      9|    result = cf->cft->query(cf, data, CF_QUERY_IP_INFO, &ipv6, ipquad);
  ------------------
  |  |  168|      9|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
  906|      9|    *is_ipv6 = !!ipv6;
  907|      9|  }
  908|      9|  return result;
  909|      9|}
Curl_conn_get_first_socket:
  912|  2.24k|{
  913|  2.24k|  struct Curl_cfilter *cf;
  914|       |
  915|  2.24k|  if(!data->conn)
  ------------------
  |  Branch (915:6): [True: 0, False: 2.24k]
  ------------------
  916|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  917|       |
  918|  2.24k|  cf = data->conn->cfilter[FIRSTSOCKET];
  ------------------
  |  |  233|  2.24k|#define FIRSTSOCKET     0
  ------------------
  919|       |  /* if the top filter has not connected, ask it (and its sub-filters)
  920|       |   * for the socket. Otherwise conn->sock[sockindex] should have it. */
  921|  2.24k|  if(cf && !cf->connected)
  ------------------
  |  Branch (921:6): [True: 2.24k, False: 0]
  |  Branch (921:12): [True: 2.24k, False: 0]
  ------------------
  922|  2.24k|    return Curl_conn_cf_get_socket(cf, data);
  923|      0|  return data->conn->sock[FIRSTSOCKET];
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
  924|  2.24k|}
Curl_conn_ev_data_setup:
  936|  6.25k|{
  937|  6.25k|  return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
                return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  |  115|  6.25k|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
  938|  6.25k|}
Curl_conn_ev_data_done:
  962|  6.25k|{
  963|  6.25k|  cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
                cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  |  118|  6.25k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  964|  6.25k|}
Curl_conn_recv:
 1041|   157k|{
 1042|   157k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|   157k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1042:3): [True: 0, False: 157k]
  |  Branch (1042:3): [True: 157k, False: 0]
  ------------------
 1043|   157k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1079|   157k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1043:3): [True: 0, False: 157k]
  |  Branch (1043:3): [True: 157k, False: 0]
  ------------------
 1044|   157k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  310|   157k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (310:36): [True: 157k, False: 0]
  |  |  |  Branch (310:50): [True: 157k, False: 0]
  |  |  ------------------
  ------------------
 1045|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1046|   157k|  if(data && data->conn && data->conn->recv[sockindex])
  ------------------
  |  Branch (1046:6): [True: 157k, False: 0]
  |  Branch (1046:14): [True: 157k, False: 0]
  |  Branch (1046:28): [True: 157k, False: 0]
  ------------------
 1047|   157k|    return data->conn->recv[sockindex](data, sockindex, buf, len, pnread);
 1048|      0|  *pnread = 0;
 1049|      0|  return CURLE_FAILED_INIT;
 1050|   157k|}
cfilters.c:cf_bufq_reader:
  288|    296|{
  289|    296|  struct cf_io_ctx *io = writer_ctx;
  290|    296|  return Curl_conn_cf_recv(io->cf, io->data, (char *)buf, blen, pnread);
  291|    296|}
cfilters.c:cf_bufq_writer:
  313|    200|{
  314|    200|  struct cf_io_ctx *io = writer_ctx;
  315|       |  return Curl_conn_cf_send(io->cf, io->data, buf, buflen, FALSE, pnwritten);
  ------------------
  |  | 1056|    200|#define FALSE false
  ------------------
  316|    200|}
cfilters.c:cf_cntrl_all:
  451|  12.5k|{
  452|  12.5k|  CURLcode result = CURLE_OK;
  453|  12.5k|  int i;
  454|       |
  455|  37.5k|  for(i = 0; i < (int)CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1303|  37.5k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (455:14): [True: 25.0k, False: 12.5k]
  ------------------
  456|  25.0k|    result = Curl_conn_cf_cntrl(conn->cfilter[i], data, ignore_result,
  457|  25.0k|                                event, arg1, arg2);
  458|  25.0k|    if(!ignore_result && result)
  ------------------
  |  Branch (458:8): [True: 12.5k, False: 12.5k]
  |  Branch (458:26): [True: 0, False: 12.5k]
  ------------------
  459|      0|      break;
  460|  25.0k|  }
  461|  12.5k|  return result;
  462|  12.5k|}
cfilters.c:cf_is_ssl:
  552|  3.47k|{
  553|  17.3k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (553:9): [True: 17.3k, False: 0]
  ------------------
  554|       |    /* A tunneling proxy does not offer end2end encryption, even if
  555|       |     * it does SSL itself (e.g. QUIC H3 proxy) */
  556|  17.3k|    if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  203|  17.3k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                  if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  205|      0|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (556:8): [True: 0, False: 17.3k]
  |  Branch (556:42): [True: 0, False: 0]
  ------------------
  557|      0|      return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  558|  17.3k|    if(cf->cft->flags & CF_TYPE_IP_CONNECT)
  ------------------
  |  |  202|  17.3k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
  |  Branch (558:8): [True: 3.47k, False: 13.9k]
  ------------------
  559|  3.47k|      return FALSE;
  ------------------
  |  | 1056|  3.47k|#define FALSE false
  ------------------
  560|  17.3k|  }
  561|      0|  return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  562|  3.47k|}

Curl_cpool_init:
  117|  11.7k|{
  118|  11.7k|  Curl_hash_init(&cpool->dest2bundle, size, Curl_hash_str,
  119|  11.7k|                 curlx_str_key_compare, cpool_bundle_free_entry);
  120|       |
  121|  11.7k|  DEBUGASSERT(idata);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (121:3): [True: 0, False: 11.7k]
  |  Branch (121:3): [True: 11.7k, False: 0]
  ------------------
  122|       |
  123|  11.7k|  cpool->idata = idata;
  124|  11.7k|  cpool->share = share;
  125|       |  cpool->initialized = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  126|  11.7k|}
Curl_cpool_destroy:
  232|  11.7k|{
  233|  11.7k|  if(cpool && cpool->initialized && cpool->idata) {
  ------------------
  |  Branch (233:6): [True: 11.7k, False: 0]
  |  Branch (233:15): [True: 11.7k, False: 0]
  |  Branch (233:37): [True: 11.7k, False: 0]
  ------------------
  234|  11.7k|    struct connectdata *conn;
  235|  11.7k|    struct Curl_sigpipe_ctx pipe_ctx;
  236|       |
  237|  11.7k|    CURL_TRC_M(cpool->idata, "%s[CPOOL] destroy, %zu connections",
  ------------------
  |  |  148|  11.7k|  do {                                   \
  |  |  149|  11.7k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  11.7k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  23.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 11.7k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 11.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  23.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  11.7k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.7k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  238|  11.7k|               cpool->share ? "[SHARE] " : "", cpool->num_conn);
  239|       |    /* Move all connections to the shutdown list */
  240|  11.7k|    sigpipe_init(&pipe_ctx);
  241|  11.7k|    CPOOL_LOCK(cpool, cpool->idata);
  ------------------
  |  |   42|  11.7k|  do {                                                                  \
  |  |   43|  11.7k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 11.7k, False: 0]
  |  |  ------------------
  |  |   44|  11.7k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  11.7k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 11.7k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  11.7k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  11.7k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  11.7k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1053|  11.7k|#define TRUE true
  |  |  ------------------
  |  |   49|  11.7k|    }                                                                   \
  |  |   50|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  |  Branch (241:5): [True: 0, False: 11.7k]
  |  Branch (241:5): [True: 11.7k, False: 0]
  ------------------
  242|  11.7k|    conn = cpool_get_first(cpool);
  243|  11.7k|    if(conn)
  ------------------
  |  Branch (243:8): [True: 0, False: 11.7k]
  ------------------
  244|      0|      sigpipe_apply(cpool->idata, &pipe_ctx);
  245|  11.7k|    while(conn) {
  ------------------
  |  Branch (245:11): [True: 0, False: 11.7k]
  ------------------
  246|      0|      cpool_remove_conn(cpool, conn);
  247|      0|      cpool_discard_conn(cpool, cpool->idata, conn, FALSE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  248|      0|      conn = cpool_get_first(cpool);
  249|      0|    }
  250|  11.7k|    CPOOL_UNLOCK(cpool, cpool->idata);
  ------------------
  |  |   53|  11.7k|  do {                                                                  \
  |  |   54|  11.7k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 11.7k, False: 0]
  |  |  ------------------
  |  |   55|  11.7k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  11.7k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1056|  11.7k|#define FALSE false
  |  |  ------------------
  |  |   57|  11.7k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  11.7k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 11.7k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  11.7k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  11.7k|    }                                                                   \
  |  |   60|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  |  Branch (250:5): [True: 0, False: 11.7k]
  |  Branch (250:5): [True: 11.7k, False: 0]
  ------------------
  251|  11.7k|    sigpipe_restore(&pipe_ctx);
  252|  11.7k|    Curl_hash_destroy(&cpool->dest2bundle);
  253|  11.7k|  }
  254|  11.7k|}
Curl_cpool_xfer_init:
  270|  12.5k|{
  271|  12.5k|  struct cpool *cpool = cpool_get_instance(data);
  272|       |
  273|  12.5k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 12.5k]
  |  Branch (273:3): [True: 12.5k, False: 0]
  ------------------
  274|  12.5k|  if(cpool) {
  ------------------
  |  Branch (274:6): [True: 12.5k, False: 0]
  ------------------
  275|  12.5k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  12.5k|  do {                                                                  \
  |  |   43|  12.5k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 12.5k, False: 0]
  |  |  ------------------
  |  |   44|  12.5k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  12.5k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 12.5k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  12.5k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  12.5k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  12.5k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1053|  12.5k|#define TRUE true
  |  |  ------------------
  |  |   49|  12.5k|    }                                                                   \
  |  |   50|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  |  Branch (275:5): [True: 0, False: 12.5k]
  |  Branch (275:5): [True: 12.5k, False: 0]
  ------------------
  276|       |    /* the identifier inside the connection cache */
  277|  12.5k|    data->id = cpool->next_easy_id++;
  278|  12.5k|    if(cpool->next_easy_id <= 0)
  ------------------
  |  Branch (278:8): [True: 0, False: 12.5k]
  ------------------
  279|      0|      cpool->next_easy_id = 0;
  280|  12.5k|    data->state.lastconnect_id = -1;
  281|       |
  282|  12.5k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  12.5k|  do {                                                                  \
  |  |   54|  12.5k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 12.5k, False: 0]
  |  |  ------------------
  |  |   55|  12.5k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  12.5k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1056|  12.5k|#define FALSE false
  |  |  ------------------
  |  |   57|  12.5k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  12.5k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 12.5k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  12.5k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  12.5k|    }                                                                   \
  |  |   60|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  |  Branch (282:5): [True: 0, False: 12.5k]
  |  Branch (282:5): [True: 12.5k, False: 0]
  ------------------
  283|  12.5k|  }
  284|      0|  else {
  285|       |    /* We should not get here, but in a non-debug build, do something */
  286|      0|    data->id = 0;
  287|      0|    data->state.lastconnect_id = -1;
  288|      0|  }
  289|  12.5k|}
Curl_cpool_check_limits:
  388|  6.25k|{
  389|  6.25k|  struct cpool *cpool = cpool_get_instance(data);
  390|  6.25k|  struct cpool_bundle *bundle;
  391|  6.25k|  size_t dest_limit = 0;
  392|  6.25k|  size_t total_limit = 0;
  393|  6.25k|  size_t shutdowns;
  394|  6.25k|  int res = CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  6.25k|#define CPOOL_LIMIT_OK     0
  ------------------
  395|       |
  396|  6.25k|  if(!cpool)
  ------------------
  |  Branch (396:6): [True: 0, False: 6.25k]
  ------------------
  397|      0|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   90|      0|#define CPOOL_LIMIT_OK     0
  ------------------
  398|       |
  399|       |  /* multi determines the limits, no matter who owns the pool */
  400|  6.25k|  if(data->multi) {
  ------------------
  |  Branch (400:6): [True: 6.25k, False: 0]
  ------------------
  401|  6.25k|    dest_limit = data->multi->max_host_connections;
  402|  6.25k|    total_limit = data->multi->max_total_connections;
  403|  6.25k|  }
  404|       |
  405|  6.25k|  if(!dest_limit && !total_limit)
  ------------------
  |  Branch (405:6): [True: 6.25k, False: 0]
  |  Branch (405:21): [True: 6.25k, False: 0]
  ------------------
  406|  6.25k|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  6.25k|#define CPOOL_LIMIT_OK     0
  ------------------
  407|       |
  408|      0|  CPOOL_LOCK(cpool, cpool->idata);
  ------------------
  |  |   42|      0|  do {                                                                  \
  |  |   43|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   44|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      0|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      0|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (408:3): [True: 0, False: 0]
  |  Branch (408:3): [True: 0, False: 0]
  ------------------
  409|      0|  if(dest_limit) {
  ------------------
  |  Branch (409:6): [True: 0, False: 0]
  ------------------
  410|      0|    size_t live;
  411|       |
  412|      0|    bundle = cpool_find_bundle(cpool, conn);
  413|      0|    live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (413:12): [True: 0, False: 0]
  ------------------
  414|      0|    shutdowns = Curl_cshutdn_dest_count(data, conn->destination);
  415|      0|    while((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (415:11): [True: 0, False: 0]
  ------------------
  416|      0|      if(shutdowns) {
  ------------------
  |  Branch (416:10): [True: 0, False: 0]
  ------------------
  417|       |        /* close one connection in shutdown right away, if we can */
  418|      0|        if(!Curl_cshutdn_close_oldest(data, conn->destination))
  ------------------
  |  Branch (418:12): [True: 0, False: 0]
  ------------------
  419|      0|          break;
  420|      0|      }
  421|      0|      else if(!bundle)
  ------------------
  |  Branch (421:15): [True: 0, False: 0]
  ------------------
  422|      0|        break;
  423|      0|      else {
  424|      0|        struct connectdata *oldest_idle = NULL;
  425|       |        /* The bundle is full. Extract the oldest connection that may
  426|       |         * be removed now, if there is one. */
  427|      0|        oldest_idle = cpool_bundle_get_oldest_idle(bundle,
  428|      0|                                                   Curl_pgrs_now(data));
  429|      0|        if(!oldest_idle)
  ------------------
  |  Branch (429:12): [True: 0, False: 0]
  ------------------
  430|      0|          break;
  431|       |        /* disconnect the old conn and continue */
  432|      0|        CURL_TRC_M(data, "Discarding connection #%" FMT_OFF_T
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  433|      0|                   " from %zu to reach destination limit of %zu",
  434|      0|                   oldest_idle->connection_id,
  435|      0|                   Curl_llist_count(&bundle->conns), dest_limit);
  436|      0|        cpool_evict_conn(cpool, data, oldest_idle);
  437|       |
  438|       |        /* in case the bundle was destroyed in disconnect, look it up again */
  439|      0|        bundle = cpool_find_bundle(cpool, conn);
  440|      0|        live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (440:16): [True: 0, False: 0]
  ------------------
  441|      0|      }
  442|      0|      shutdowns = Curl_cshutdn_dest_count(data, conn->destination);
  443|      0|    }
  444|      0|    if((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (444:8): [True: 0, False: 0]
  ------------------
  445|      0|      res = CPOOL_LIMIT_DEST;
  ------------------
  |  |   91|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  446|      0|      goto out;
  447|      0|    }
  448|      0|  }
  449|       |
  450|      0|  if(total_limit) {
  ------------------
  |  Branch (450:6): [True: 0, False: 0]
  ------------------
  451|      0|    shutdowns = Curl_cshutdn_count(data);
  452|      0|    while((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (452:11): [True: 0, False: 0]
  ------------------
  453|      0|      if(shutdowns) {
  ------------------
  |  Branch (453:10): [True: 0, False: 0]
  ------------------
  454|       |        /* close one connection in shutdown right away, if we can */
  455|      0|        if(!Curl_cshutdn_close_oldest(data, NULL))
  ------------------
  |  Branch (455:12): [True: 0, False: 0]
  ------------------
  456|      0|          break;
  457|      0|      }
  458|      0|      else {
  459|      0|        struct connectdata *oldest_idle =
  460|      0|          cpool_get_oldest_idle(cpool, Curl_pgrs_now(data));
  461|      0|        if(!oldest_idle)
  ------------------
  |  Branch (461:12): [True: 0, False: 0]
  ------------------
  462|      0|          break;
  463|       |        /* disconnect the old conn and continue */
  464|      0|        CURL_TRC_M(data, "Discarding connection #%"
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  465|      0|                   FMT_OFF_T " from %zu to reach total "
  466|      0|                   "limit of %zu",
  467|      0|                   oldest_idle->connection_id, cpool->num_conn, total_limit);
  468|      0|        cpool_evict_conn(cpool, data, oldest_idle);
  469|      0|      }
  470|      0|      shutdowns = Curl_cshutdn_count(data);
  471|      0|    }
  472|      0|    if((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (472:8): [True: 0, False: 0]
  ------------------
  473|      0|      res = CPOOL_LIMIT_TOTAL;
  ------------------
  |  |   92|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  474|      0|      goto out;
  475|      0|    }
  476|      0|  }
  477|       |
  478|      0|out:
  479|      0|  CPOOL_UNLOCK(cpool, cpool->idata);
  ------------------
  |  |   53|      0|  do {                                                                  \
  |  |   54|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   57|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      0|    }                                                                   \
  |  |   60|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (479:3): [True: 0, False: 0]
  |  Branch (479:3): [True: 0, False: 0]
  ------------------
  480|      0|  return res;
  481|      0|}
Curl_cpool_add:
  485|  6.25k|{
  486|  6.25k|  CURLcode result = CURLE_OK;
  487|  6.25k|  struct cpool_bundle *bundle = NULL;
  488|  6.25k|  struct cpool *cpool = cpool_get_instance(data);
  489|  6.25k|  DEBUGASSERT(conn);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (489:3): [True: 0, False: 6.25k]
  |  Branch (489:3): [True: 6.25k, False: 0]
  ------------------
  490|       |
  491|  6.25k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (491:3): [True: 0, False: 6.25k]
  |  Branch (491:3): [True: 6.25k, False: 0]
  ------------------
  492|  6.25k|  if(!cpool)
  ------------------
  |  Branch (492:6): [True: 0, False: 6.25k]
  ------------------
  493|      0|    return CURLE_FAILED_INIT;
  494|       |
  495|  6.25k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  6.25k|  do {                                                                  \
  |  |   43|  6.25k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 6.25k, False: 0]
  |  |  ------------------
  |  |   44|  6.25k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.25k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.25k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  6.25k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  6.25k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  6.25k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1053|  6.25k|#define TRUE true
  |  |  ------------------
  |  |   49|  6.25k|    }                                                                   \
  |  |   50|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  |  Branch (495:3): [True: 0, False: 6.25k]
  |  Branch (495:3): [True: 6.25k, False: 0]
  ------------------
  496|  6.25k|  bundle = cpool_find_bundle(cpool, conn);
  497|  6.25k|  if(!bundle) {
  ------------------
  |  Branch (497:6): [True: 6.25k, False: 0]
  ------------------
  498|  6.25k|    bundle = cpool_add_bundle(cpool, conn);
  499|  6.25k|    if(!bundle) {
  ------------------
  |  Branch (499:8): [True: 0, False: 6.25k]
  ------------------
  500|      0|      result = CURLE_OUT_OF_MEMORY;
  501|      0|      goto out;
  502|      0|    }
  503|  6.25k|  }
  504|       |
  505|  6.25k|  cpool_bundle_add(bundle, conn);
  506|  6.25k|  conn->connection_id = cpool->next_connection_id++;
  507|  6.25k|  cpool->num_conn++;
  508|  6.25k|  CURL_TRC_M(data, "[CPOOL] added connection %" FMT_OFF_T ". "
  ------------------
  |  |  148|  6.25k|  do {                                   \
  |  |  149|  6.25k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.25k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.25k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  12.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.25k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  12.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.25k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.25k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  509|  6.25k|             "The cache now contains %zu members",
  510|  6.25k|             conn->connection_id, cpool->num_conn);
  511|  6.25k|out:
  512|  6.25k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  6.25k|  do {                                                                  \
  |  |   54|  6.25k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 6.25k, False: 0]
  |  |  ------------------
  |  |   55|  6.25k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  6.25k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1056|  6.25k|#define FALSE false
  |  |  ------------------
  |  |   57|  6.25k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.25k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.25k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  6.25k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  6.25k|    }                                                                   \
  |  |   60|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  |  Branch (512:3): [True: 0, False: 6.25k]
  |  Branch (512:3): [True: 6.25k, False: 0]
  ------------------
  513|       |
  514|  6.25k|  return result;
  515|  6.25k|}
Curl_cpool_find:
  617|  6.50k|{
  618|  6.50k|  struct cpool *cpool = cpool_get_instance(data);
  619|  6.50k|  struct cpool_bundle *bundle;
  620|  6.50k|  bool found = FALSE;
  ------------------
  |  | 1056|  6.50k|#define FALSE false
  ------------------
  621|       |
  622|  6.50k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (622:3): [True: 0, False: 6.50k]
  |  Branch (622:3): [True: 6.50k, False: 0]
  ------------------
  623|  6.50k|  DEBUGASSERT(conn_cb);
  ------------------
  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (623:3): [True: 0, False: 6.50k]
  |  Branch (623:3): [True: 6.50k, False: 0]
  ------------------
  624|  6.50k|  if(!cpool)
  ------------------
  |  Branch (624:6): [True: 0, False: 6.50k]
  ------------------
  625|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  626|       |
  627|  6.50k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  6.50k|  do {                                                                  \
  |  |   43|  6.50k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 6.50k, False: 0]
  |  |  ------------------
  |  |   44|  6.50k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.50k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.50k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  6.50k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  6.50k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  6.50k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1053|  6.50k|#define TRUE true
  |  |  ------------------
  |  |   49|  6.50k|    }                                                                   \
  |  |   50|  6.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 6.50k]
  |  |  ------------------
  ------------------
  |  Branch (627:3): [True: 0, False: 6.50k]
  |  Branch (627:3): [True: 6.50k, False: 0]
  ------------------
  628|  6.50k|  bundle = Curl_hash_pick(&cpool->dest2bundle,
  629|  6.50k|                          CURL_UNCONST(destination),
  ------------------
  |  |  864|  6.50k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  630|  6.50k|                          strlen(destination) + 1);
  631|  6.50k|  if(bundle) {
  ------------------
  |  Branch (631:6): [True: 248, False: 6.25k]
  ------------------
  632|    248|    struct Curl_llist_node *curr = Curl_llist_head(&bundle->conns);
  633|    496|    while(curr) {
  ------------------
  |  Branch (633:11): [True: 248, False: 248]
  ------------------
  634|    248|      struct connectdata *conn = Curl_node_elem(curr);
  635|       |      /* Get next node now. callback might discard current */
  636|    248|      curr = Curl_node_next(curr);
  637|       |
  638|    248|      if(conn_cb(conn, userdata)) {
  ------------------
  |  Branch (638:10): [True: 0, False: 248]
  ------------------
  639|      0|        found = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  640|      0|        break;
  641|      0|      }
  642|    248|    }
  643|    248|  }
  644|       |
  645|  6.50k|  if(done_cb) {
  ------------------
  |  Branch (645:6): [True: 6.50k, False: 0]
  ------------------
  646|  6.50k|    found = done_cb(userdata);
  647|  6.50k|  }
  648|  6.50k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  6.50k|  do {                                                                  \
  |  |   54|  6.50k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 6.50k, False: 0]
  |  |  ------------------
  |  |   55|  6.50k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  6.50k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1056|  6.50k|#define FALSE false
  |  |  ------------------
  |  |   57|  6.50k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.50k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.50k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  6.50k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  6.50k|    }                                                                   \
  |  |   60|  6.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 6.50k]
  |  |  ------------------
  ------------------
  |  Branch (648:3): [True: 0, False: 6.50k]
  |  Branch (648:3): [True: 6.50k, False: 0]
  ------------------
  649|  6.50k|  return found;
  650|  6.50k|}
Curl_conn_terminate:
  655|  6.25k|{
  656|  6.25k|  struct cpool *cpool = cpool_get_instance(data);
  657|  6.25k|  bool do_lock;
  658|       |
  659|  6.25k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (659:3): [True: 0, False: 6.25k]
  |  Branch (659:3): [True: 6.25k, False: 0]
  ------------------
  660|  6.25k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (660:3): [True: 0, False: 6.25k]
  |  Branch (660:3): [True: 0, False: 0]
  |  Branch (660:3): [True: 6.25k, False: 0]
  |  Branch (660:3): [True: 6.25k, False: 0]
  ------------------
  661|  6.25k|  if(!cpool)
  ------------------
  |  Branch (661:6): [True: 0, False: 6.25k]
  ------------------
  662|      0|    return;
  663|       |
  664|       |  /* If this connection is not marked to force-close, leave it open if there
  665|       |   * are other users of it */
  666|  6.25k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  272|  12.5k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (272:23): [True: 0, False: 6.25k]
  |  |  ------------------
  ------------------
  |  Branch (666:26): [True: 0, False: 0]
  ------------------
  667|      0|    DEBUGASSERT(0); /* does this ever happen? */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (667:5): [Folded, False: 0]
  |  Branch (667:5): [Folded, False: 0]
  ------------------
  668|      0|    DEBUGF(infof(data, "conn terminate when inuse: %u", conn->attached_xfers));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  669|      0|    return;
  670|      0|  }
  671|       |
  672|       |  /* This method may be called while we are under lock, e.g. from a
  673|       |   * user callback in find. */
  674|  6.25k|  do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|  6.25k|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 6.25k, False: 0]
  |  |  |  Branch (39:39): [True: 6.25k, False: 0]
  |  |  ------------------
  ------------------
  675|  6.25k|  if(do_lock)
  ------------------
  |  Branch (675:6): [True: 0, False: 6.25k]
  ------------------
  676|      0|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|      0|  do {                                                                  \
  |  |   43|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   44|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      0|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      0|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (676:5): [True: 0, False: 0]
  |  Branch (676:5): [True: 0, False: 0]
  ------------------
  677|       |
  678|  6.25k|  if(conn->bits.in_cpool) {
  ------------------
  |  Branch (678:6): [True: 6.25k, False: 0]
  ------------------
  679|  6.25k|    cpool_remove_conn(cpool, conn);
  680|  6.25k|    DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (680:5): [True: 0, False: 6.25k]
  |  Branch (680:5): [True: 6.25k, False: 0]
  ------------------
  681|  6.25k|  }
  682|       |
  683|       |  /* treat the connection as aborted in CONNECT_ONLY situations,
  684|       |   * so no graceful shutdown is attempted. */
  685|  6.25k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (685:6): [True: 1, False: 6.25k]
  ------------------
  686|      1|    aborted = TRUE;
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
  687|       |
  688|  6.25k|  if(data->multi) {
  ------------------
  |  Branch (688:6): [True: 6.25k, False: 0]
  ------------------
  689|       |    /* Add it to the multi's cpool for shutdown handling */
  690|  6.25k|    infof(data, "%s connection #%" FMT_OFF_T,
  ------------------
  |  |  143|  6.25k|  do {                               \
  |  |  144|  6.25k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  6.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 6.25k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.25k]
  |  |  |  |  ------------------
  |  |  |  |  323|  6.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  6.25k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  691|  6.25k|          aborted ? "closing" : "shutting down", conn->connection_id);
  692|  6.25k|    cpool_discard_conn(&data->multi->cpool, data, conn, aborted);
  693|  6.25k|  }
  694|      0|  else {
  695|       |    /* No multi available, terminate */
  696|      0|    infof(data, "closing connection #%" FMT_OFF_T, conn->connection_id);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  697|      0|    Curl_cshutdn_terminate(cpool->idata, conn, !aborted);
  698|      0|  }
  699|       |
  700|  6.25k|  if(do_lock)
  ------------------
  |  Branch (700:6): [True: 0, False: 6.25k]
  ------------------
  701|       |    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|      0|  do {                                                                  \
  |  |   54|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   57|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      0|    }                                                                   \
  |  |   60|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (701:5): [True: 0, False: 0]
  |  Branch (701:5): [True: 0, False: 0]
  ------------------
  702|  6.25k|}
Curl_cpool_prune_dead:
  734|  6.50k|{
  735|  6.50k|  struct cpool *cpool = cpool_get_instance(data);
  736|  6.50k|  timediff_t elapsed;
  737|       |
  738|  6.50k|  if(!cpool)
  ------------------
  |  Branch (738:6): [True: 0, False: 6.50k]
  ------------------
  739|      0|    return;
  740|       |
  741|  6.50k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  6.50k|  do {                                                                  \
  |  |   43|  6.50k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 6.50k, False: 0]
  |  |  ------------------
  |  |   44|  6.50k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.50k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.50k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  6.50k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  6.50k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  6.50k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1053|  6.50k|#define TRUE true
  |  |  ------------------
  |  |   49|  6.50k|    }                                                                   \
  |  |   50|  6.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 6.50k]
  |  |  ------------------
  ------------------
  |  Branch (741:3): [True: 0, False: 6.50k]
  |  Branch (741:3): [True: 6.50k, False: 0]
  ------------------
  742|  6.50k|  elapsed = curlx_ptimediff_ms(Curl_pgrs_now(data), &cpool->last_cleanup);
  743|       |
  744|  6.50k|  if(elapsed >= 1000L) {
  ------------------
  |  Branch (744:6): [True: 5.93k, False: 563]
  ------------------
  745|  5.93k|    struct cpool_reaper_ctx reaper;
  746|       |
  747|  5.93k|    memset(&reaper, 0, sizeof(reaper));
  748|  5.93k|    reaper.now = *Curl_pgrs_now(data);
  749|  5.93k|    while(cpool_foreach(data, cpool, &reaper, cpool_reap_dead_cb))
  ------------------
  |  Branch (749:11): [True: 0, False: 5.93k]
  ------------------
  750|      0|      ;
  751|  5.93k|    cpool->last_cleanup = *Curl_pgrs_now(data);
  752|  5.93k|  }
  753|       |  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  6.50k|  do {                                                                  \
  |  |   54|  6.50k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 6.50k, False: 0]
  |  |  ------------------
  |  |   55|  6.50k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  6.50k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1056|  6.50k|#define FALSE false
  |  |  ------------------
  |  |   57|  6.50k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.50k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.50k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  6.50k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  6.50k|    }                                                                   \
  |  |   60|  6.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 6.50k]
  |  |  ------------------
  ------------------
  |  Branch (753:3): [True: 0, False: 6.50k]
  |  Branch (753:3): [True: 6.50k, False: 0]
  ------------------
  754|  6.50k|}
Curl_cpool_do_locked:
  829|  6.25k|{
  830|  6.25k|  struct cpool *cpool = cpool_get_instance(data);
  831|  6.25k|  if(cpool) {
  ------------------
  |  Branch (831:6): [True: 6.25k, False: 0]
  ------------------
  832|  6.25k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  6.25k|  do {                                                                  \
  |  |   43|  6.25k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 6.25k, False: 0]
  |  |  ------------------
  |  |   44|  6.25k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.25k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.25k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  6.25k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  6.25k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  6.25k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1053|  6.25k|#define TRUE true
  |  |  ------------------
  |  |   49|  6.25k|    }                                                                   \
  |  |   50|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  |  Branch (832:5): [True: 0, False: 6.25k]
  |  Branch (832:5): [True: 6.25k, False: 0]
  ------------------
  833|  6.25k|    cb(conn, data, cbdata);
  834|  6.25k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  6.25k|  do {                                                                  \
  |  |   54|  6.25k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 6.25k, False: 0]
  |  |  ------------------
  |  |   55|  6.25k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  6.25k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1056|  6.25k|#define FALSE false
  |  |  ------------------
  |  |   57|  6.25k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  6.25k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 6.25k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  6.25k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  6.25k|    }                                                                   \
  |  |   60|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  |  Branch (834:5): [True: 0, False: 6.25k]
  |  Branch (834:5): [True: 6.25k, False: 0]
  ------------------
  835|  6.25k|  }
  836|      0|  else
  837|      0|    cb(conn, data, cbdata);
  838|  6.25k|}
conncache.c:cpool_bundle_free_entry:
  109|  6.25k|{
  110|  6.25k|  cpool_bundle_destroy((struct cpool_bundle *)freethis);
  111|  6.25k|}
conncache.c:cpool_bundle_destroy:
   84|  6.25k|{
   85|  6.25k|  DEBUGASSERT(!Curl_llist_count(&bundle->conns));
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (85:3): [True: 0, False: 6.25k]
  |  Branch (85:3): [True: 6.25k, False: 0]
  ------------------
   86|  6.25k|  curlx_free(bundle);
  ------------------
  |  | 1478|  6.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   87|  6.25k|}
conncache.c:cpool_get_first:
  130|  11.7k|{
  131|  11.7k|  struct Curl_hash_iterator iter;
  132|  11.7k|  struct Curl_hash_element *he;
  133|  11.7k|  struct cpool_bundle *bundle;
  134|  11.7k|  struct Curl_llist_node *conn_node;
  135|       |
  136|  11.7k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  137|  11.7k|  for(he = Curl_hash_next_element(&iter); he;
  ------------------
  |  Branch (137:43): [True: 0, False: 11.7k]
  ------------------
  138|  11.7k|      he = Curl_hash_next_element(&iter)) {
  139|      0|    bundle = he->ptr;
  140|      0|    conn_node = Curl_llist_head(&bundle->conns);
  141|      0|    if(conn_node)
  ------------------
  |  Branch (141:8): [True: 0, False: 0]
  ------------------
  142|      0|      return Curl_node_elem(conn_node);
  143|      0|  }
  144|  11.7k|  return NULL;
  145|  11.7k|}
conncache.c:cpool_remove_conn:
  164|  6.25k|{
  165|  6.25k|  struct Curl_llist *list = Curl_node_llist(&conn->cpool_node);
  166|  6.25k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 6.25k]
  |  Branch (166:3): [True: 6.25k, False: 0]
  ------------------
  167|  6.25k|  if(list) {
  ------------------
  |  Branch (167:6): [True: 6.25k, False: 0]
  ------------------
  168|       |    /* The connection is certainly in the pool, but where? */
  169|  6.25k|    struct cpool_bundle *bundle = cpool_find_bundle(cpool, conn);
  170|  6.25k|    if(bundle && (list == &bundle->conns)) {
  ------------------
  |  Branch (170:8): [True: 6.25k, False: 0]
  |  Branch (170:18): [True: 6.25k, False: 0]
  ------------------
  171|  6.25k|      cpool_bundle_remove(bundle, conn);
  172|  6.25k|      if(!Curl_llist_count(&bundle->conns))
  ------------------
  |  Branch (172:10): [True: 6.25k, False: 0]
  ------------------
  173|  6.25k|        cpool_remove_bundle(cpool, bundle);
  174|  6.25k|      conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
  175|  6.25k|      cpool->num_conn--;
  176|  6.25k|    }
  177|      0|    else {
  178|       |      /* Should have been in the bundle list */
  179|       |      DEBUGASSERT(NULL);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:7): [True: 0, False: 0]
  |  Branch (179:7): [True: 0, False: 0]
  ------------------
  180|      0|    }
  181|  6.25k|  }
  182|  6.25k|}
conncache.c:cpool_bundle_remove:
  101|  6.25k|{
  102|  6.25k|  (void)bundle;
  103|  6.25k|  DEBUGASSERT(Curl_node_llist(&conn->cpool_node) == &bundle->conns);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 0, False: 6.25k]
  |  Branch (103:3): [True: 6.25k, False: 0]
  ------------------
  104|  6.25k|  Curl_node_remove(&conn->cpool_node);
  105|       |  conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
  106|  6.25k|}
conncache.c:cpool_remove_bundle:
  156|  6.25k|{
  157|  6.25k|  if(!cpool)
  ------------------
  |  Branch (157:6): [True: 0, False: 6.25k]
  ------------------
  158|      0|    return;
  159|  6.25k|  Curl_hash_delete(&cpool->dest2bundle, bundle->dest, bundle->dest_len);
  160|  6.25k|}
conncache.c:cpool_discard_conn:
  188|  6.25k|{
  189|  6.25k|  bool done = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
  190|       |
  191|  6.25k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 6.25k]
  |  Branch (191:3): [True: 6.25k, False: 0]
  ------------------
  192|  6.25k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 6.25k]
  |  Branch (192:3): [True: 6.25k, False: 0]
  ------------------
  193|  6.25k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 0, False: 6.25k]
  |  Branch (193:3): [True: 6.25k, False: 0]
  ------------------
  194|  6.25k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 6.25k]
  |  Branch (194:3): [True: 6.25k, False: 0]
  ------------------
  195|       |
  196|       |  /*
  197|       |   * If this connection is not marked to force-close, leave it open if there
  198|       |   * are other users of it
  199|       |   */
  200|  6.25k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  272|  12.5k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (272:23): [True: 0, False: 6.25k]
  |  |  ------------------
  ------------------
  |  Branch (200:26): [True: 0, False: 0]
  ------------------
  201|      0|    CURL_TRC_M(data, "[CPOOL] not discarding #%" FMT_OFF_T
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  202|      0|               " still in use by %u transfers", conn->connection_id,
  203|      0|               conn->attached_xfers);
  204|      0|    return;
  205|      0|  }
  206|       |
  207|       |  /* treat the connection as aborted in CONNECT_ONLY situations, we do
  208|       |   * not know what the APP did with it. */
  209|  6.25k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (209:6): [True: 1, False: 6.25k]
  ------------------
  210|      1|    aborted = TRUE;
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
  211|  6.25k|  conn->bits.aborted = aborted;
  212|       |
  213|       |  /* We do not shutdown dead connections. The term 'dead' can be misleading
  214|       |   * here, as we also mark errored connections/transfers as 'dead'.
  215|       |   * If we do a shutdown for an aborted transfer, the server might think
  216|       |   * it was successful otherwise (for example an ftps: upload). This is
  217|       |   * not what we want. */
  218|  6.25k|  if(aborted)
  ------------------
  |  Branch (218:6): [True: 6.25k, False: 0]
  ------------------
  219|  6.25k|    done = TRUE;
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
  220|  6.25k|  if(!done) {
  ------------------
  |  Branch (220:6): [True: 0, False: 6.25k]
  ------------------
  221|       |    /* Attempt to shutdown the connection right away. */
  222|      0|    Curl_cshutdn_run_once(cpool->idata, conn, &done);
  223|      0|  }
  224|       |
  225|  6.25k|  if(done || !data->multi)
  ------------------
  |  Branch (225:6): [True: 6.25k, False: 0]
  |  Branch (225:14): [True: 0, False: 0]
  ------------------
  226|  6.25k|    Curl_cshutdn_terminate(cpool->idata, conn, FALSE);
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
  227|      0|  else
  228|      0|    Curl_cshutdn_add(&data->multi->cshutdn, conn, cpool->num_conn);
  229|  6.25k|}
conncache.c:cpool_get_instance:
  257|  50.5k|{
  258|  50.5k|  if(data) {
  ------------------
  |  Branch (258:6): [True: 50.5k, False: 0]
  ------------------
  259|  50.5k|    if(CURL_SHARE_KEEP_CONNECT(data->share))
  ------------------
  |  |   41|  50.5k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  ------------------
  |  |  |  Branch (41:4): [True: 0, False: 50.5k]
  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  260|      0|      return &data->share->cpool;
  261|  50.5k|    else if(data->multi_easy)
  ------------------
  |  Branch (261:13): [True: 0, False: 50.5k]
  ------------------
  262|      0|      return &data->multi_easy->cpool;
  263|  50.5k|    else if(data->multi)
  ------------------
  |  Branch (263:13): [True: 50.5k, False: 0]
  ------------------
  264|  50.5k|      return &data->multi->cpool;
  265|  50.5k|  }
  266|      0|  return NULL;
  267|  50.5k|}
conncache.c:cpool_find_bundle:
  149|  12.5k|{
  150|  12.5k|  return Curl_hash_pick(&cpool->dest2bundle,
  151|  12.5k|                        conn->destination, strlen(conn->destination) + 1);
  152|  12.5k|}
conncache.c:cpool_add_bundle:
  293|  6.25k|{
  294|  6.25k|  struct cpool_bundle *bundle;
  295|       |
  296|  6.25k|  bundle = cpool_bundle_create(conn->destination);
  297|  6.25k|  if(!bundle)
  ------------------
  |  Branch (297:6): [True: 0, False: 6.25k]
  ------------------
  298|      0|    return NULL;
  299|       |
  300|  6.25k|  if(!Curl_hash_add(&cpool->dest2bundle,
  ------------------
  |  Branch (300:6): [True: 0, False: 6.25k]
  ------------------
  301|  6.25k|                    bundle->dest, bundle->dest_len, bundle)) {
  302|      0|    cpool_bundle_destroy(bundle);
  303|      0|    return NULL;
  304|      0|  }
  305|  6.25k|  return bundle;
  306|  6.25k|}
conncache.c:cpool_bundle_create:
   70|  6.25k|{
   71|  6.25k|  struct cpool_bundle *bundle;
   72|  6.25k|  size_t dest_len = strlen(dest) + 1;
   73|       |
   74|  6.25k|  bundle = curlx_calloc(1, sizeof(*bundle) + dest_len - 1);
  ------------------
  |  | 1475|  6.25k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   75|  6.25k|  if(!bundle)
  ------------------
  |  Branch (75:6): [True: 0, False: 6.25k]
  ------------------
   76|      0|    return NULL;
   77|  6.25k|  Curl_llist_init(&bundle->conns, NULL);
   78|  6.25k|  bundle->dest_len = dest_len;
   79|  6.25k|  memcpy(bundle->dest, dest, bundle->dest_len);
   80|  6.25k|  return bundle;
   81|  6.25k|}
conncache.c:cpool_bundle_add:
   92|  6.25k|{
   93|  6.25k|  DEBUGASSERT(!Curl_node_llist(&conn->cpool_node));
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 6.25k]
  |  Branch (93:3): [True: 6.25k, False: 0]
  ------------------
   94|  6.25k|  Curl_llist_append(&bundle->conns, conn, &conn->cpool_node);
   95|       |  conn->bits.in_cpool = TRUE;
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
   96|  6.25k|}
conncache.c:cpool_foreach:
  534|  5.93k|{
  535|  5.93k|  struct Curl_hash_iterator iter;
  536|  5.93k|  struct Curl_hash_element *he;
  537|       |
  538|  5.93k|  if(!cpool)
  ------------------
  |  Branch (538:6): [True: 0, False: 5.93k]
  ------------------
  539|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  540|       |
  541|  5.93k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  542|       |
  543|  5.93k|  he = Curl_hash_next_element(&iter);
  544|  5.93k|  while(he) {
  ------------------
  |  Branch (544:9): [True: 0, False: 5.93k]
  ------------------
  545|      0|    struct Curl_llist_node *curr;
  546|      0|    struct cpool_bundle *bundle = he->ptr;
  547|      0|    he = Curl_hash_next_element(&iter);
  548|       |
  549|      0|    curr = Curl_llist_head(&bundle->conns);
  550|      0|    while(curr) {
  ------------------
  |  Branch (550:11): [True: 0, False: 0]
  ------------------
  551|       |      /* Yes, we need to update curr before calling func(), because func()
  552|       |         might decide to remove the connection */
  553|      0|      struct connectdata *conn = Curl_node_elem(curr);
  554|      0|      curr = Curl_node_next(curr);
  555|       |
  556|      0|      if(func(data, conn, param) == 1) {
  ------------------
  |  Branch (556:10): [True: 0, False: 0]
  ------------------
  557|      0|        return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  558|      0|      }
  559|      0|    }
  560|      0|  }
  561|  5.93k|  return FALSE;
  ------------------
  |  | 1056|  5.93k|#define FALSE false
  ------------------
  562|  5.93k|}

timeleft_now_ms:
   74|  35.1k|{
   75|  35.1k|  timediff_t timeleft_ms = 0;
   76|  35.1k|  timediff_t ctimeleft_ms = 0;
   77|       |
   78|  35.1k|  if(data->conn && Curl_shutdown_started(data->conn, FIRSTSOCKET))
  ------------------
  |  |  233|  24.8k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (78:6): [True: 24.8k, False: 10.2k]
  |  Branch (78:20): [True: 0, False: 24.8k]
  ------------------
   79|      0|    return Curl_shutdown_timeleft(data, data->conn, FIRSTSOCKET);
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
   80|  35.1k|  else if(Curl_is_connecting(data)) {
  ------------------
  |  Branch (80:11): [True: 35.1k, False: 0]
  ------------------
   81|  35.1k|    timediff_t ctimeout_ms = (data->set.connecttimeout > 0) ?
  ------------------
  |  Branch (81:30): [True: 704, False: 34.4k]
  ------------------
   82|  34.4k|      data->set.connecttimeout : DEFAULT_CONNECT_TIMEOUT;
  ------------------
  |  |   40|  34.4k|#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */
  ------------------
   83|  35.1k|    ctimeleft_ms = ctimeout_ms -
   84|  35.1k|      curlx_ptimediff_ms(pnow, &data->progress.t_startsingle);
   85|  35.1k|    if(!ctimeleft_ms)
  ------------------
  |  Branch (85:8): [True: 3, False: 35.1k]
  ------------------
   86|      3|      ctimeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
   87|  35.1k|  }
   88|      0|  else if(!data->set.timeout || data->set.connect_only) {
  ------------------
  |  Branch (88:11): [True: 0, False: 0]
  |  Branch (88:33): [True: 0, False: 0]
  ------------------
   89|      0|    return 0; /* no timeout in place or checked, return "no limit" */
   90|      0|  }
   91|       |
   92|  35.1k|  if(data->set.timeout) {
  ------------------
  |  Branch (92:6): [True: 35.1k, False: 0]
  ------------------
   93|  35.1k|    timeleft_ms = data->set.timeout -
   94|  35.1k|      curlx_ptimediff_ms(pnow, &data->progress.t_startop);
   95|  35.1k|    if(!timeleft_ms)
  ------------------
  |  Branch (95:8): [True: 0, False: 35.1k]
  ------------------
   96|      0|      timeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
   97|  35.1k|  }
   98|       |
   99|  35.1k|  if(!ctimeleft_ms)
  ------------------
  |  Branch (99:6): [True: 0, False: 35.1k]
  ------------------
  100|      0|    return timeleft_ms;
  101|  35.1k|  else if(!timeleft_ms)
  ------------------
  |  Branch (101:11): [True: 0, False: 35.1k]
  ------------------
  102|      0|    return ctimeleft_ms;
  103|  35.1k|  return CURLMIN(ctimeleft_ms, timeleft_ms);
  ------------------
  |  | 1292|  35.1k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 290, False: 34.8k]
  |  |  ------------------
  ------------------
  104|  35.1k|}
Curl_timeleft_ms:
  107|  35.1k|{
  108|  35.1k|  return timeleft_now_ms(data, Curl_pgrs_now(data));
  109|  35.1k|}
Curl_shutdown_started:
  168|  24.8k|{
  169|  24.8k|  const struct curltime *pt = &conn->shutdown.start[sockindex];
  170|  24.8k|  return (pt->tv_sec > 0) || (pt->tv_usec > 0);
  ------------------
  |  Branch (170:10): [True: 0, False: 24.8k]
  |  Branch (170:30): [True: 0, False: 24.8k]
  ------------------
  171|  24.8k|}
Curl_getconnectinfo:
  181|      3|{
  182|      3|  DEBUGASSERT(data);
  ------------------
  |  | 1079|      3|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (182:3): [True: 0, False: 3]
  |  Branch (182:3): [True: 3, False: 0]
  ------------------
  183|       |
  184|       |  /* this works for an easy handle:
  185|       |   * - that has been used for curl_easy_perform()
  186|       |   * - that is associated with a multi handle, and whose connection
  187|       |   *   was detached with CURLOPT_CONNECT_ONLY
  188|       |   */
  189|      3|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (189:6): [True: 0, False: 3]
  ------------------
  190|      0|    struct connectdata *conn;
  191|       |
  192|      0|    conn = Curl_cpool_get_conn(data, data->state.lastconnect_id);
  193|      0|    if(!conn) {
  ------------------
  |  Branch (193:8): [True: 0, False: 0]
  ------------------
  194|      0|      data->state.lastconnect_id = -1;
  195|      0|      if(connp)
  ------------------
  |  Branch (195:10): [True: 0, False: 0]
  ------------------
  196|      0|        *connp = NULL;
  197|      0|      return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  198|      0|    }
  199|       |
  200|      0|    if(connp)
  ------------------
  |  Branch (200:8): [True: 0, False: 0]
  ------------------
  201|      0|      *connp = conn;
  202|      0|    return conn->sock[FIRSTSOCKET];
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
  203|      0|  }
  204|      3|  if(connp)
  ------------------
  |  Branch (204:6): [True: 3, False: 0]
  ------------------
  205|      3|    *connp = NULL;
  206|      3|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      3|#define CURL_SOCKET_BAD (-1)
  ------------------
  207|      3|}
Curl_conncontrol:
  210|  6.25k|{
  211|  6.25k|  if(!conn) {
  ------------------
  |  Branch (211:6): [True: 0, False: 6.25k]
  ------------------
  212|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (212:5): [Folded, False: 0]
  |  Branch (212:5): [Folded, False: 0]
  ------------------
  213|      0|    return;
  214|      0|  }
  215|  6.25k|  switch(ctrl) {
  216|      0|    case CONNCTRL_CONN_KEEP:
  ------------------
  |  |   81|      0|#define CONNCTRL_CONN_KEEP       0
  ------------------
  |  Branch (216:5): [True: 0, False: 6.25k]
  ------------------
  217|      0|      conn->bits.close = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  218|      0|      break;
  219|  6.25k|    case CONNCTRL_CONN_CLOSE:
  ------------------
  |  |   82|  6.25k|#define CONNCTRL_CONN_CLOSE      1
  ------------------
  |  Branch (219:5): [True: 6.25k, False: 0]
  ------------------
  220|  6.25k|      conn->bits.close = TRUE;
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
  221|  6.25k|      break;
  222|      0|    case CONNCTRL_STREAM_CLOSE:
  ------------------
  |  |   83|      0|#define CONNCTRL_STREAM_CLOSE    2
  ------------------
  |  Branch (222:5): [True: 0, False: 6.25k]
  ------------------
  223|       |      /* stream close when multiplexing does not affect connection */
  224|      0|      if(!Curl_conn_is_multiplex(conn, FIRSTSOCKET))
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (224:10): [True: 0, False: 0]
  ------------------
  225|      0|        conn->bits.close = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  226|      0|      break;
  227|      0|    default:
  ------------------
  |  Branch (227:5): [True: 0, False: 6.25k]
  ------------------
  228|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (228:7): [Folded, False: 0]
  |  Branch (228:7): [Folded, False: 0]
  ------------------
  229|      0|      break;
  230|  6.25k|  }
  231|  6.25k|}
Curl_conn_setup:
  237|  6.25k|{
  238|  6.25k|  struct Curl_peer *first_peer = Curl_conn_get_first_peer(conn, sockindex);
  239|  6.25k|  CURLcode result = CURLE_OK;
  240|  6.25k|  uint8_t dns_queries;
  241|       |
  242|  6.25k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (242:3): [True: 0, False: 6.25k]
  |  Branch (242:3): [True: 6.25k, False: 0]
  ------------------
  243|  6.25k|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (243:3): [True: 0, False: 6.25k]
  |  Branch (243:3): [True: 6.25k, False: 0]
  ------------------
  244|  6.25k|  DEBUGASSERT(!conn->cfilter[sockindex]);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:3): [True: 0, False: 6.25k]
  |  Branch (244:3): [True: 6.25k, False: 0]
  ------------------
  245|       |
  246|  6.25k|  if(!first_peer)
  ------------------
  |  Branch (246:6): [True: 0, False: 6.25k]
  ------------------
  247|      0|    return CURLE_FAILED_INIT;
  248|       |
  249|  6.25k|#ifndef CURL_DISABLE_HTTP
  250|  6.25k|  if(!conn->cfilter[sockindex] &&
  ------------------
  |  Branch (250:6): [True: 6.25k, False: 0]
  ------------------
  251|  6.25k|     conn->scheme->protocol == CURLPROTO_HTTPS) {
  ------------------
  |  | 1087|  6.25k|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (251:6): [True: 6.24k, False: 7]
  ------------------
  252|  6.24k|    DEBUGASSERT(ssl_mode != CURL_CF_SSL_DISABLE);
  ------------------
  |  | 1079|  6.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (252:5): [True: 0, False: 6.24k]
  |  Branch (252:5): [True: 6.24k, False: 0]
  ------------------
  253|  6.24k|    result = Curl_cf_https_setup(
  254|  6.24k|      data, Curl_conn_get_destination(conn, sockindex), conn, sockindex);
  255|  6.24k|    if(result)
  ------------------
  |  Branch (255:8): [True: 0, False: 6.24k]
  ------------------
  256|      0|      goto out;
  257|  6.24k|  }
  258|  6.25k|#endif /* !CURL_DISABLE_HTTP */
  259|       |
  260|       |  /* Still no cfilter set, apply default. */
  261|  6.25k|  if(!conn->cfilter[sockindex]) {
  ------------------
  |  Branch (261:6): [True: 58, False: 6.19k]
  ------------------
  262|     58|    result = Curl_cf_setup_add(data, conn, sockindex,
  263|     58|                               conn->transport_wanted, ssl_mode);
  264|     58|    if(result)
  ------------------
  |  Branch (264:8): [True: 0, False: 58]
  ------------------
  265|      0|      goto out;
  266|     58|  }
  267|       |
  268|       |  /* Whatever the filter chain will be in the end, it will need the
  269|       |   * resolving of `first_peer`. Add that now so the resolve is started
  270|       |   * right away. */
  271|  6.25k|  dns_queries = Curl_resolv_dns_queries(data, conn->ip_version);
  272|  6.25k|  result = Curl_conn_dns_add_addr_resolve(data, conn, sockindex,
  273|  6.25k|                                          first_peer, dns_queries,
  274|  6.25k|                                          conn->transport_wanted);
  275|  6.25k|  if(result)
  ------------------
  |  Branch (275:6): [True: 0, False: 6.25k]
  ------------------
  276|      0|    goto out;
  277|       |
  278|  6.25k|  DEBUGASSERT(conn->cfilter[sockindex]);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (278:3): [True: 0, False: 6.25k]
  |  Branch (278:3): [True: 6.25k, False: 0]
  ------------------
  279|  6.25k|out:
  280|  6.25k|  return result;
  281|  6.25k|}
Curl_conn_connect:
  332|  7.88k|{
  333|  7.88k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  334|  7.88k|  struct pollfd a_few_on_stack[CF_CONN_NUM_POLLS_ON_STACK];
  335|  7.88k|  struct easy_pollset ps;
  336|  7.88k|  struct curl_pollfds cpfds;
  337|  7.88k|  struct Curl_cfilter *cf;
  338|  7.88k|  CURLcode result = CURLE_OK;
  339|       |
  340|  7.88k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  7.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (340:3): [True: 0, False: 7.88k]
  |  Branch (340:3): [True: 7.88k, False: 0]
  ------------------
  341|  7.88k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1079|  7.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (341:3): [True: 0, False: 7.88k]
  |  Branch (341:3): [True: 7.88k, False: 0]
  ------------------
  342|  7.88k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  310|  7.88k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (310:36): [True: 7.88k, False: 0]
  |  |  |  Branch (310:50): [True: 7.88k, False: 0]
  |  |  ------------------
  ------------------
  343|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  344|       |
  345|  7.88k|  if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  214|  7.88k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (345:6): [True: 0, False: 7.88k]
  ------------------
  346|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  347|      0|    return CURLE_OK;
  348|      0|  }
  349|       |
  350|  7.88k|  cf = data->conn->cfilter[sockindex];
  351|  7.88k|  if(!cf) {
  ------------------
  |  Branch (351:6): [True: 0, False: 7.88k]
  ------------------
  352|      0|    *done = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  353|      0|    return CURLE_FAILED_INIT;
  354|      0|  }
  355|       |
  356|  7.88k|  *done = (bool)cf->connected;
  357|  7.88k|  if(*done)
  ------------------
  |  Branch (357:6): [True: 0, False: 7.88k]
  ------------------
  358|      0|    return CURLE_OK;
  359|       |
  360|  7.88k|  Curl_pollset_init(&ps);
  361|  7.88k|  Curl_pollfds_init(&cpfds, a_few_on_stack, CF_CONN_NUM_POLLS_ON_STACK);
  ------------------
  |  |  333|  7.88k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  ------------------
  362|  7.88k|  while(!*done) {
  ------------------
  |  Branch (362:9): [True: 7.88k, False: 0]
  ------------------
  363|  7.88k|    if(Curl_conn_needs_flush(data, sockindex)) {
  ------------------
  |  Branch (363:8): [True: 0, False: 7.88k]
  ------------------
  364|      0|      DEBUGF(infof(data, "Curl_conn_connect(index=%d), flush", sockindex));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  365|      0|      result = Curl_conn_flush(data, sockindex);
  366|      0|      if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (366:10): [True: 0, False: 0]
  |  Branch (366:20): [True: 0, False: 0]
  ------------------
  367|      0|        goto out;
  368|      0|    }
  369|       |
  370|  7.88k|    result = cf->cft->do_connect(cf, data, done);
  371|  7.88k|    CURL_TRC_CF(data, cf, "Curl_conn_connect(block=%d) -> %d, done=%d",
  ------------------
  |  |  153|  7.88k|  do {                                          \
  |  |  154|  7.88k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.88k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  15.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.88k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.88k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  15.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.88k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.88k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.88k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.88k]
  |  |  ------------------
  ------------------
  372|  7.88k|                blocking, (int)result, *done);
  373|  7.88k|    if(!result && *done) {
  ------------------
  |  Branch (373:8): [True: 2.24k, False: 5.64k]
  |  Branch (373:19): [True: 0, False: 2.24k]
  ------------------
  374|       |      /* A final sanity check on connection security */
  375|      0|      if((data->state.origin->scheme->flags & PROTOPT_SSL) &&
  ------------------
  |  |  207|      0|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (375:10): [True: 0, False: 0]
  ------------------
  376|      0|         (sockindex == FIRSTSOCKET) &&
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (376:10): [True: 0, False: 0]
  ------------------
  377|      0|         !Curl_conn_is_ssl(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (377:10): [True: 0, False: 0]
  ------------------
  378|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (378:9): [Folded, False: 0]
  |  Branch (378:9): [Folded, False: 0]
  ------------------
  379|      0|        failf(data, "transfer requires SSL, but not connected via SSL");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  380|      0|        result = CURLE_FAILED_INIT;
  381|      0|        goto out;
  382|      0|      }
  383|       |      /* Now that the complete filter chain is connected, let all filters
  384|       |       * persist information at the connection. E.g. cf-socket sets the
  385|       |       * socket and ip related information. */
  386|      0|      Curl_conn_cntrl_update_info(data, data->conn);
  387|      0|      conn_report_connect_stats(cf, data);
  388|      0|      data->conn->keepalive = *Curl_pgrs_now(data);
  389|      0|      VERBOSE(result = conn_connect_trace(data, cf));
  ------------------
  |  | 1613|      0|#define VERBOSE(x) x
  ------------------
  390|      0|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "connected"));
  ------------------
  |  | 1613|      0|#define VERBOSE(x) x
  ------------------
  391|      0|      Curl_conn_remove_setup_filters(data, sockindex);
  392|      0|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "reduced to"));
  ------------------
  |  | 1613|      0|#define VERBOSE(x) x
  ------------------
  393|      0|      goto out;
  394|      0|    }
  395|  7.88k|    else if(result) {
  ------------------
  |  Branch (395:13): [True: 5.64k, False: 2.24k]
  ------------------
  396|  5.64k|      CURL_TRC_CF(data, cf, "Curl_conn_connect(), filter returned %d",
  ------------------
  |  |  153|  5.64k|  do {                                          \
  |  |  154|  5.64k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  5.64k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  11.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 5.64k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  11.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.64k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.64k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.64k]
  |  |  ------------------
  ------------------
  397|  5.64k|                  (int)result);
  398|  5.64k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "failed to connect"));
  ------------------
  |  | 1613|  5.64k|#define VERBOSE(x) x
  ------------------
  399|  5.64k|      conn_report_connect_stats(cf, data);
  400|  5.64k|      goto out;
  401|  5.64k|    }
  402|       |
  403|  2.24k|    if(!blocking)
  ------------------
  |  Branch (403:8): [True: 2.24k, False: 0]
  ------------------
  404|  2.24k|      goto out;
  405|      0|    else {
  406|       |      /* check allowed time left */
  407|      0|      const timediff_t timeout_ms = Curl_timeleft_ms(data);
  408|      0|      curl_socket_t sockfd = Curl_conn_cf_get_socket(cf, data);
  409|      0|      int rc;
  410|       |
  411|      0|      if(timeout_ms < 0) {
  ------------------
  |  Branch (411:10): [True: 0, False: 0]
  ------------------
  412|       |        /* no need to continue if time already is up */
  413|      0|        failf(data, "connect timeout");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  414|      0|        result = CURLE_OPERATION_TIMEDOUT;
  415|      0|        goto out;
  416|      0|      }
  417|       |
  418|      0|      CURL_TRC_CF(data, cf, "Curl_conn_connect(block=1), do poll");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  419|      0|      Curl_pollset_reset(&ps);
  420|      0|      Curl_pollfds_reset(&cpfds);
  421|       |      /* In general, we want to send after connect, wait on that. */
  422|      0|      if(sockfd != CURL_SOCKET_BAD)
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (422:10): [True: 0, False: 0]
  ------------------
  423|      0|        result = Curl_pollset_set_out_only(data, &ps, sockfd);
  ------------------
  |  |  172|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  424|      0|      if(!result)
  ------------------
  |  Branch (424:10): [True: 0, False: 0]
  ------------------
  425|      0|        result = Curl_conn_adjust_pollset(data, data->conn, &ps);
  426|      0|      if(result)
  ------------------
  |  Branch (426:10): [True: 0, False: 0]
  ------------------
  427|      0|        goto out;
  428|      0|      result = Curl_pollfds_add_ps(&cpfds, &ps);
  429|      0|      if(result)
  ------------------
  |  Branch (429:10): [True: 0, False: 0]
  ------------------
  430|      0|        goto out;
  431|       |
  432|      0|      rc = Curl_poll(cpfds.pfds, cpfds.n,
  433|      0|                     CURLMIN(timeout_ms, (cpfds.n ? 1000 : 10)));
  ------------------
  |  | 1292|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 0, False: 0]
  |  |  |  Branch (1292:31): [True: 0, False: 0]
  |  |  |  Branch (1292:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  434|      0|      CURL_TRC_CF(data, cf, "Curl_conn_connect(block=1), Curl_poll() -> %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  435|      0|                  rc);
  436|      0|      if(rc < 0) {
  ------------------
  |  Branch (436:10): [True: 0, False: 0]
  ------------------
  437|      0|        result = CURLE_COULDNT_CONNECT;
  438|      0|        goto out;
  439|      0|      }
  440|       |      /* continue iterating */
  441|      0|    }
  442|  2.24k|  }
  443|       |
  444|  7.88k|out:
  445|  7.88k|  Curl_pollset_cleanup(&ps);
  446|  7.88k|  Curl_pollfds_cleanup(&cpfds);
  447|  7.88k|  return result;
  448|  7.88k|}
Curl_conn_get_origin:
  462|  3.04k|{
  463|  3.04k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  234|  3.04k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (463:10): [True: 0, False: 3.04k]
  ------------------
  464|  3.04k|    conn->origin2 : conn->origin;
  465|  3.04k|}
Curl_conn_get_destination:
  469|  20.0k|{
  470|  20.0k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  234|  20.0k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (470:10): [True: 0, False: 20.0k]
  ------------------
  471|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (471:6): [True: 0, False: 0]
  ------------------
  472|  20.0k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (472:6): [True: 19.1k, False: 871]
  ------------------
  473|  20.0k|}
Curl_conn_get_first_peer:
  477|  18.5k|{
  478|  18.5k|#ifndef CURL_DISABLE_PROXY
  479|  18.5k|  if(conn->socks_proxy.peer)
  ------------------
  |  Branch (479:6): [True: 1.44k, False: 17.1k]
  ------------------
  480|  1.44k|    return conn->socks_proxy.peer;
  481|  17.1k|  if(conn->http_proxy.peer)
  ------------------
  |  Branch (481:6): [True: 6.56k, False: 10.5k]
  ------------------
  482|  6.56k|    return conn->http_proxy.peer;
  483|  10.5k|#endif
  484|  10.5k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  234|  10.5k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (484:10): [True: 0, False: 10.5k]
  ------------------
  485|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (485:6): [True: 0, False: 0]
  ------------------
  486|  10.5k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (486:6): [True: 9.52k, False: 1.00k]
  ------------------
  487|  17.1k|}
connect.c:conn_report_connect_stats:
  311|  5.64k|{
  312|  5.64k|  if(cf) {
  ------------------
  |  Branch (312:6): [True: 5.64k, False: 0]
  ------------------
  313|  5.64k|    struct curltime connected;
  314|  5.64k|    struct curltime appconnected;
  315|       |
  316|  5.64k|    memset(&connected, 0, sizeof(connected));
  317|  5.64k|    cf->cft->query(cf, data, CF_QUERY_TIMER_CONNECT, NULL, &connected);
  ------------------
  |  |  164|  5.64k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  318|  5.64k|    if(connected.tv_sec || connected.tv_usec)
  ------------------
  |  Branch (318:8): [True: 5.21k, False: 432]
  |  Branch (318:28): [True: 0, False: 432]
  ------------------
  319|  5.21k|      Curl_pgrsTimeWas(data, TIMER_CONNECT, connected);
  320|       |
  321|  5.64k|    memset(&appconnected, 0, sizeof(appconnected));
  322|  5.64k|    cf->cft->query(cf, data, CF_QUERY_TIMER_APPCONNECT, NULL, &appconnected);
  ------------------
  |  |  165|  5.64k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  323|  5.64k|    if(appconnected.tv_sec || appconnected.tv_usec)
  ------------------
  |  Branch (323:8): [True: 0, False: 5.64k]
  |  Branch (323:31): [True: 0, False: 5.64k]
  ------------------
  324|      0|      Curl_pgrsTimeWas(data, TIMER_APPCONNECT, appconnected);
  325|  5.64k|  }
  326|  5.64k|}

Curl_get_content_encodings:
  659|     11|{
  660|     11|  struct dynbuf enc;
  661|     11|  const struct Curl_cwtype * const *cep;
  662|     11|  CURLcode result = CURLE_OK;
  663|     11|  curlx_dyn_init(&enc, 255);
  664|       |
  665|     55|  for(cep = general_unencoders; *cep && !result; cep++) {
  ------------------
  |  Branch (665:33): [True: 44, False: 11]
  |  Branch (665:41): [True: 44, False: 0]
  ------------------
  666|     44|    const struct Curl_cwtype *ce = *cep;
  667|     44|    if(!curl_strequal(ce->name, CONTENT_ENCODING_DEFAULT)) {
  ------------------
  |  |   54|     44|#define CONTENT_ENCODING_DEFAULT  "identity"
  ------------------
  |  Branch (667:8): [True: 33, False: 11]
  ------------------
  668|     33|      if(curlx_dyn_len(&enc))
  ------------------
  |  Branch (668:10): [True: 22, False: 11]
  ------------------
  669|     22|        result = curlx_dyn_addn(&enc, ", ", 2);
  670|     33|      if(!result)
  ------------------
  |  Branch (670:10): [True: 33, False: 0]
  ------------------
  671|     33|        result = curlx_dyn_add(&enc, ce->name);
  672|     33|    }
  673|     44|  }
  674|     11|  if(!result && !curlx_dyn_len(&enc))
  ------------------
  |  Branch (674:6): [True: 11, False: 0]
  |  Branch (674:17): [True: 0, False: 11]
  ------------------
  675|      0|    result = curlx_dyn_add(&enc, CONTENT_ENCODING_DEFAULT);
  ------------------
  |  |   54|      0|#define CONTENT_ENCODING_DEFAULT  "identity"
  ------------------
  676|       |
  677|     11|  if(!result)
  ------------------
  |  Branch (677:6): [True: 11, False: 0]
  ------------------
  678|     11|    return curlx_dyn_ptr(&enc);
  679|      0|  return NULL;
  680|     11|}

Curl_cookie_add:
  981|  9.46k|{
  982|  9.46k|  struct Cookie comem;
  983|  9.46k|  struct Cookie *co;
  984|  9.46k|  size_t myhash;
  985|  9.46k|  CURLcode result;
  986|  9.46k|  bool replaces = FALSE;
  ------------------
  |  | 1056|  9.46k|#define FALSE false
  ------------------
  987|  9.46k|  bool okay;
  988|       |
  989|  9.46k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  9.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (989:3): [True: 0, False: 9.46k]
  |  Branch (989:3): [True: 9.46k, False: 0]
  ------------------
  990|  9.46k|  DEBUGASSERT(MAX_SET_COOKIE_AMOUNT <= 255); /* counter is an unsigned char */
  ------------------
  |  | 1079|  9.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (990:3): [True: 0, Folded]
  |  Branch (990:3): [True: 9.46k, Folded]
  ------------------
  991|  9.46k|  if(data->req.setcookies >= MAX_SET_COOKIE_AMOUNT)
  ------------------
  |  |   90|  9.46k|#define MAX_SET_COOKIE_AMOUNT 50
  ------------------
  |  Branch (991:6): [True: 0, False: 9.46k]
  ------------------
  992|      0|    return CURLE_OK; /* silently ignore */
  993|       |
  994|  9.46k|  co = &comem;
  995|  9.46k|  memset(co, 0, sizeof(comem));
  996|       |
  997|  9.46k|  if(httpheader)
  ------------------
  |  Branch (997:6): [True: 1.18k, False: 8.28k]
  ------------------
  998|  1.18k|    result = parse_cookie_header(data, co, ci, &okay,
  999|  1.18k|                                 lineptr, domain, path, secure);
 1000|  8.28k|  else
 1001|  8.28k|    result = parse_netscape(co, ci, &okay, lineptr, secure);
 1002|       |
 1003|  9.46k|  if(result || !okay)
  ------------------
  |  Branch (1003:6): [True: 0, False: 9.46k]
  |  Branch (1003:16): [True: 7.97k, False: 1.48k]
  ------------------
 1004|  7.97k|    goto fail;
 1005|       |
 1006|  1.48k|  if(co->prefix_secure && !co->secure)
  ------------------
  |  Branch (1006:6): [True: 6, False: 1.48k]
  |  Branch (1006:27): [True: 5, False: 1]
  ------------------
 1007|       |    /* The __Secure- prefix only requires that the cookie be set secure */
 1008|      5|    goto fail;
 1009|       |
 1010|  1.48k|  if(co->prefix_host) {
  ------------------
  |  Branch (1010:6): [True: 9, False: 1.47k]
  ------------------
 1011|       |    /*
 1012|       |     * The __Host- prefix requires the cookie to be secure, have a "/" path
 1013|       |     * and not have a domain set.
 1014|       |     */
 1015|      9|    if(co->secure && co->path && !strcmp(co->path, "/") && !co->tailmatch)
  ------------------
  |  Branch (1015:8): [True: 4, False: 5]
  |  Branch (1015:22): [True: 3, False: 1]
  |  Branch (1015:34): [True: 2, False: 1]
  |  Branch (1015:60): [True: 1, False: 1]
  ------------------
 1016|      1|      ;
 1017|      8|    else
 1018|      8|      goto fail;
 1019|      9|  }
 1020|       |
 1021|  1.47k|  if(!ci->running &&    /* read from a file */
  ------------------
  |  Branch (1021:6): [True: 1.47k, False: 0]
  ------------------
 1022|  1.47k|     ci->newsession &&  /* clean session cookies */
  ------------------
  |  Branch (1022:6): [True: 0, False: 1.47k]
  ------------------
 1023|      0|     !co->expires)      /* this is a session cookie */
  ------------------
  |  Branch (1023:6): [True: 0, False: 0]
  ------------------
 1024|      0|    goto fail;
 1025|       |
 1026|  1.47k|  co->livecookie = ci->running;
 1027|  1.47k|  co->creationtime = ++ci->lastct;
 1028|       |
 1029|       |  /*
 1030|       |   * Now we have parsed the incoming line, we must now check if this supersedes
 1031|       |   * an already existing cookie, which it may if the previous have the same
 1032|       |   * domain and path as this.
 1033|       |   */
 1034|       |
 1035|       |  /* remove expired cookies */
 1036|  1.47k|  if(!noexpire)
  ------------------
  |  Branch (1036:6): [True: 1.47k, False: 0]
  ------------------
 1037|  1.47k|    remove_expired(ci);
 1038|       |
 1039|  1.47k|  if(is_public_suffix(data, co, domain))
  ------------------
  |  Branch (1039:6): [True: 0, False: 1.47k]
  ------------------
 1040|      0|    goto fail;
 1041|       |
 1042|  1.47k|  if(!replace_existing(data, co, ci, secure, &replaces))
  ------------------
  |  Branch (1042:6): [True: 0, False: 1.47k]
  ------------------
 1043|      0|    goto fail;
 1044|       |
 1045|       |  /* clone the stack struct into heap */
 1046|  1.47k|  co = curlx_memdup(&comem, sizeof(comem));
 1047|  1.47k|  if(!co) {
  ------------------
  |  Branch (1047:6): [True: 0, False: 1.47k]
  ------------------
 1048|      0|    co = &comem;
 1049|      0|    result = CURLE_OUT_OF_MEMORY;
 1050|      0|    goto fail; /* bail out if we are this low on memory */
 1051|      0|  }
 1052|       |
 1053|       |  /* add this cookie to the list */
 1054|  1.47k|  myhash = cookiehash(co->domain);
 1055|  1.47k|  Curl_llist_append(&ci->cookielist[myhash], co, &co->node);
 1056|       |
 1057|  1.47k|  if(ci->running)
  ------------------
  |  Branch (1057:6): [True: 0, False: 1.47k]
  ------------------
 1058|       |    /* Only show this when NOT reading the cookies from a file */
 1059|      0|    infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1060|  1.47k|          "expire %" FMT_OFF_T,
 1061|  1.47k|          replaces ? "Replaced" : "Added", co->name, co->value,
 1062|  1.47k|          co->domain, co->path, co->expires);
 1063|       |
 1064|  1.47k|  if(!replaces)
  ------------------
  |  Branch (1064:6): [True: 1.47k, False: 0]
  ------------------
 1065|  1.47k|    ci->numcookies++; /* one more cookie in the jar */
 1066|       |
 1067|       |  /*
 1068|       |   * Now that we have added a new cookie to the jar, update the expiration
 1069|       |   * tracker in case it is the next one to expire.
 1070|       |   */
 1071|  1.47k|  if(co->expires && (co->expires < ci->next_expiration))
  ------------------
  |  Branch (1071:6): [True: 631, False: 845]
  |  Branch (1071:21): [True: 629, False: 2]
  ------------------
 1072|    629|    ci->next_expiration = co->expires;
 1073|       |
 1074|  1.47k|  if(httpheader)
  ------------------
  |  Branch (1074:6): [True: 1.08k, False: 396]
  ------------------
 1075|  1.08k|    data->req.setcookies++;
 1076|       |
 1077|  1.47k|  return result;
 1078|  7.99k|fail:
 1079|       |  freecookie(co, FALSE);
  ------------------
  |  | 1056|  7.99k|#define FALSE false
  ------------------
 1080|  7.99k|  return result;
 1081|  1.47k|}
Curl_cookie_init:
 1098|  11.8k|{
 1099|  11.8k|  int i;
 1100|  11.8k|  struct CookieInfo *ci = curlx_calloc(1, sizeof(struct CookieInfo));
  ------------------
  |  | 1475|  11.8k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1101|  11.8k|  if(!ci)
  ------------------
  |  Branch (1101:6): [True: 0, False: 11.8k]
  ------------------
 1102|      0|    return NULL;
 1103|       |
 1104|       |  /* This does not use the destructor callback since we want to add
 1105|       |     and remove to lists while keeping the cookie struct intact */
 1106|   757k|  for(i = 0; i < COOKIE_HASH_SIZE; i++)
  ------------------
  |  |   54|   757k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1106:14): [True: 745k, False: 11.8k]
  ------------------
 1107|   745k|    Curl_llist_init(&ci->cookielist[i], NULL);
 1108|       |  /*
 1109|       |   * Initialize the next_expiration time to signal that we do not have enough
 1110|       |   * information yet.
 1111|       |   */
 1112|  11.8k|  ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  596|  11.8k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
 1113|       |
 1114|  11.8k|  return ci;
 1115|  11.8k|}
Curl_cookie_loadfiles:
 1203|  8.36k|{
 1204|  8.36k|  CURLcode result = CURLE_OK;
 1205|  8.36k|  struct curl_slist *list = data->state.cookielist;
 1206|  8.36k|  if(list) {
  ------------------
  |  Branch (1206:6): [True: 7.57k, False: 788]
  ------------------
 1207|  7.57k|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1208|  7.57k|    if(!data->cookies)
  ------------------
  |  Branch (1208:8): [True: 0, False: 7.57k]
  ------------------
 1209|      0|      data->cookies = Curl_cookie_init();
 1210|  7.57k|    if(!data->cookies)
  ------------------
  |  Branch (1210:8): [True: 0, False: 7.57k]
  ------------------
 1211|      0|      result = CURLE_OUT_OF_MEMORY;
 1212|  7.57k|    else {
 1213|  7.57k|      data->state.cookie_engine = TRUE;
  ------------------
  |  | 1053|  7.57k|#define TRUE true
  ------------------
 1214|  15.1k|      while(list) {
  ------------------
  |  Branch (1214:13): [True: 7.57k, False: 7.57k]
  ------------------
 1215|  7.57k|        result = cookie_load(data, list->data, data->cookies,
 1216|  7.57k|                             (bool)data->set.cookiesession);
 1217|  7.57k|        if(result)
  ------------------
  |  Branch (1217:12): [True: 0, False: 7.57k]
  ------------------
 1218|      0|          break;
 1219|  7.57k|        list = list->next;
 1220|  7.57k|      }
 1221|  7.57k|    }
 1222|  7.57k|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1223|  7.57k|  }
 1224|  8.36k|  return result;
 1225|  8.36k|}
Curl_cookie_clearall:
 1405|  11.8k|{
 1406|  11.8k|  if(ci) {
  ------------------
  |  Branch (1406:6): [True: 11.8k, False: 1]
  ------------------
 1407|  11.8k|    unsigned int i;
 1408|   757k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|   757k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1408:16): [True: 745k, False: 11.8k]
  ------------------
 1409|   745k|      struct Curl_llist_node *n;
 1410|   746k|      for(n = Curl_llist_head(&ci->cookielist[i]); n;) {
  ------------------
  |  Branch (1410:52): [True: 1.40k, False: 745k]
  ------------------
 1411|  1.40k|        struct Cookie *c = Curl_node_elem(n);
 1412|  1.40k|        struct Curl_llist_node *e = Curl_node_next(n);
 1413|  1.40k|        Curl_node_remove(n);
 1414|       |        freecookie(c, TRUE);
  ------------------
  |  | 1053|  1.40k|#define TRUE true
  ------------------
 1415|  1.40k|        n = e;
 1416|  1.40k|      }
 1417|   745k|    }
 1418|  11.8k|    ci->numcookies = 0;
 1419|  11.8k|  }
 1420|  11.8k|}
Curl_cookie_clearsess:
 1428|      1|{
 1429|      1|  unsigned int i;
 1430|       |
 1431|      1|  if(!ci)
  ------------------
  |  Branch (1431:6): [True: 1, False: 0]
  ------------------
 1432|      1|    return;
 1433|       |
 1434|      0|  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|      0|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1434:14): [True: 0, False: 0]
  ------------------
 1435|      0|    struct Curl_llist_node *n = Curl_llist_head(&ci->cookielist[i]);
 1436|      0|    struct Curl_llist_node *e = NULL;
 1437|       |
 1438|      0|    for(; n; n = e) {
  ------------------
  |  Branch (1438:11): [True: 0, False: 0]
  ------------------
 1439|      0|      struct Cookie *curr = Curl_node_elem(n);
 1440|      0|      e = Curl_node_next(n); /* in case the node is removed, get it early */
 1441|      0|      if(!curr->expires) {
  ------------------
  |  Branch (1441:10): [True: 0, False: 0]
  ------------------
 1442|      0|        Curl_node_remove(n);
 1443|       |        freecookie(curr, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1444|      0|        ci->numcookies--;
 1445|      0|      }
 1446|      0|    }
 1447|      0|  }
 1448|      0|}
Curl_cookie_cleanup:
 1456|  11.8k|{
 1457|  11.8k|  if(ci) {
  ------------------
  |  Branch (1457:6): [True: 11.8k, False: 0]
  ------------------
 1458|  11.8k|    Curl_cookie_clearall(ci);
 1459|  11.8k|    curlx_free(ci); /* free the base struct as well */
  ------------------
  |  | 1478|  11.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1460|  11.8k|  }
 1461|  11.8k|}
Curl_flush_cookies:
 1649|  26.2k|{
 1650|  26.2k|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1651|       |  /* only save the cookie file if a transfer was started (cookies->running is
 1652|       |     set), as otherwise the cookies were not completely initialized and there
 1653|       |     might be cookie files that were not loaded so saving the file is the
 1654|       |     wrong thing. */
 1655|  26.2k|  if(data->cookies) {
  ------------------
  |  Branch (1655:6): [True: 11.8k, False: 14.4k]
  ------------------
 1656|  11.8k|    if(data->set.str[STRING_COOKIEJAR] && data->cookies->running) {
  ------------------
  |  Branch (1656:8): [True: 11.7k, False: 51]
  |  Branch (1656:43): [True: 7.57k, False: 4.20k]
  ------------------
 1657|       |      /* if we have a destination file for all the cookies to get dumped to */
 1658|  7.57k|      CURLcode result = cookie_output(data, data->cookies,
 1659|  7.57k|                                      data->set.str[STRING_COOKIEJAR]);
 1660|  7.57k|      if(result)
  ------------------
  |  Branch (1660:10): [True: 0, False: 7.57k]
  ------------------
 1661|      0|        infof(data, "WARNING: failed to save cookies in %s: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1662|  7.57k|              data->set.str[STRING_COOKIEJAR], curl_easy_strerror(result));
 1663|  7.57k|    }
 1664|       |
 1665|  11.8k|    if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
  ------------------
  |  Branch (1665:8): [True: 11.8k, False: 0]
  |  Branch (1665:20): [True: 11.8k, False: 0]
  |  Branch (1665:36): [True: 0, False: 0]
  ------------------
 1666|  11.8k|      Curl_cookie_cleanup(data->cookies);
 1667|       |      data->cookies = NULL;
 1668|  11.8k|    }
 1669|  11.8k|  }
 1670|  26.2k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1671|  26.2k|}
Curl_cookie_run:
 1674|  8.36k|{
 1675|  8.36k|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1676|  8.36k|  if(data->cookies)
  ------------------
  |  Branch (1676:6): [True: 7.57k, False: 785]
  ------------------
 1677|  7.57k|    data->cookies->running = TRUE;
  ------------------
  |  | 1053|  7.57k|#define TRUE true
  ------------------
 1678|  8.36k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1679|  8.36k|}
cookie.c:parse_cookie_header:
  597|  1.18k|{
  598|       |  /* This line was read off an HTTP-header */
  599|  1.18k|  time_t now = 0;
  600|  1.18k|  size_t linelength = strlen(ptr);
  601|  1.18k|  CURLcode result = CURLE_OK;
  602|  1.18k|  struct Curl_str cookie[COOKIE_PIECES];
  603|  1.18k|  *okay = FALSE;
  ------------------
  |  | 1056|  1.18k|#define FALSE false
  ------------------
  604|  1.18k|  if(linelength > MAX_COOKIE_LINE)
  ------------------
  |  |   81|  1.18k|#define MAX_COOKIE_LINE 5000
  ------------------
  |  Branch (604:6): [True: 6, False: 1.17k]
  ------------------
  605|       |    /* discard overly long lines at once */
  606|      6|    return CURLE_OK;
  607|       |
  608|       |  /* memset instead of initializer because gcc 4.8.1 is silly */
  609|  1.17k|  memset(cookie, 0, sizeof(cookie));
  610|  23.1k|  do {
  611|  23.1k|    struct Curl_str name;
  612|       |
  613|       |    /* we have a <name>=<value> pair or a stand-alone word here */
  614|  23.1k|    if(!curlx_str_cspn(&ptr, &name, ";\t\r\n=")) {
  ------------------
  |  Branch (614:8): [True: 21.3k, False: 1.75k]
  ------------------
  615|  21.3k|      struct Curl_str val;
  616|  21.3k|      bool sep = FALSE;
  ------------------
  |  | 1056|  21.3k|#define FALSE false
  ------------------
  617|  21.3k|      curlx_str_trimblanks(&name);
  618|       |
  619|  21.3k|      if(invalid_octets(curlx_str(&name), curlx_strlen(&name))) {
  ------------------
  |  |   49|  21.3k|#define curlx_str(x)    ((x)->str)
  ------------------
                    if(invalid_octets(curlx_str(&name), curlx_strlen(&name))) {
  ------------------
  |  |   50|  21.3k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (619:10): [True: 30, False: 21.3k]
  ------------------
  620|     30|        infof(data, "invalid octets in name, cookie dropped");
  ------------------
  |  |  143|     30|  do {                               \
  |  |  144|     30|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     30|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 30, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 30]
  |  |  |  |  ------------------
  |  |  |  |  323|     30|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     30|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     30|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 30]
  |  |  ------------------
  ------------------
  621|     30|        return CURLE_OK;
  622|     30|      }
  623|       |
  624|  21.3k|      if(!curlx_str_single(&ptr, '=')) {
  ------------------
  |  Branch (624:10): [True: 16.7k, False: 4.60k]
  ------------------
  625|  16.7k|        sep = TRUE; /* a '=' was used */
  ------------------
  |  | 1053|  16.7k|#define TRUE true
  ------------------
  626|  16.7k|        if(!curlx_str_cspn(&ptr, &val, ";\r\n"))
  ------------------
  |  Branch (626:12): [True: 14.6k, False: 2.09k]
  ------------------
  627|  14.6k|          curlx_str_trimblanks(&val);
  628|       |
  629|  16.7k|        if(invalid_octets(curlx_str(&val), curlx_strlen(&val))) {
  ------------------
  |  |   49|  16.7k|#define curlx_str(x)    ((x)->str)
  ------------------
                      if(invalid_octets(curlx_str(&val), curlx_strlen(&val))) {
  ------------------
  |  |   50|  16.7k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (629:12): [True: 23, False: 16.7k]
  ------------------
  630|     23|          infof(data, "invalid octets in value, cookie dropped");
  ------------------
  |  |  143|     23|  do {                               \
  |  |  144|     23|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     23|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 23, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 23]
  |  |  |  |  ------------------
  |  |  |  |  323|     23|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     23|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     23|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 23]
  |  |  ------------------
  ------------------
  631|     23|          return CURLE_OK;
  632|     23|        }
  633|  16.7k|      }
  634|  4.60k|      else
  635|  4.60k|        curlx_str_init(&val);
  636|       |
  637|  21.3k|      if(!curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|  21.3k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (637:10): [True: 1.15k, False: 20.1k]
  ------------------
  638|  1.15k|        if(!parse_first_pair(data, co, cookie, &name, &val, sep))
  ------------------
  |  Branch (638:12): [True: 25, False: 1.12k]
  ------------------
  639|     25|          return CURLE_OK;
  640|  1.15k|      }
  641|  20.1k|      else if(!sep) {
  ------------------
  |  Branch (641:15): [True: 4.58k, False: 15.6k]
  ------------------
  642|  4.58k|        if(!parse_flag(data, co, ci, &name, secure_origin))
  ------------------
  |  Branch (642:12): [True: 0, False: 4.58k]
  ------------------
  643|      0|          return CURLE_OK;
  644|  4.58k|      }
  645|  15.6k|      else if(curlx_str_casecompare(&name, "path"))
  ------------------
  |  Branch (645:15): [True: 247, False: 15.3k]
  ------------------
  646|    247|        cookie[COOKIE_PATH] = val;
  ------------------
  |  |  366|    247|#define COOKIE_PATH   3
  ------------------
  647|  15.3k|      else if(curlx_str_casecompare(&name, "domain") && curlx_strlen(&val)) {
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (647:15): [True: 0, False: 15.3k]
  ------------------
  648|      0|        if(!parse_domain(data, co, &cookie[COOKIE_DOMAIN], &val, &domain))
  ------------------
  |  |  365|      0|#define COOKIE_DOMAIN 2
  ------------------
  |  Branch (648:12): [True: 0, False: 0]
  ------------------
  649|      0|          return CURLE_OK;
  650|      0|      }
  651|  15.3k|      else if(curlx_str_casecompare(&name, "max-age") && curlx_strlen(&val))
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (651:15): [True: 0, False: 15.3k]
  ------------------
  652|      0|        parse_maxage(co, &val, &now);
  653|  15.3k|      else if(curlx_str_casecompare(&name, "expires") && curlx_strlen(&val))
  ------------------
  |  |   50|  12.1k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 11.8k, False: 253]
  |  |  ------------------
  ------------------
  |  Branch (653:15): [True: 12.1k, False: 3.20k]
  ------------------
  654|  11.8k|        parse_expires(co, &val, &now);
  655|  21.3k|    }
  656|  23.1k|  } while(!curlx_str_single(&ptr, ';'));
  ------------------
  |  Branch (656:11): [True: 21.9k, False: 1.10k]
  ------------------
  657|       |
  658|  1.10k|  if(curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|  1.10k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 1.08k, False: 11]
  |  |  ------------------
  ------------------
  659|       |    /* the header was fine, now store the data */
  660|  1.08k|    result = storecookie(co, &cookie[0], path, domain);
  661|  1.08k|    if(!result)
  ------------------
  |  Branch (661:8): [True: 1.08k, False: 0]
  ------------------
  662|  1.08k|      *okay = TRUE;
  ------------------
  |  | 1053|  1.08k|#define TRUE true
  ------------------
  663|  1.08k|  }
  664|  1.10k|  return result;
  665|  1.17k|}
cookie.c:invalid_octets:
  346|  38.9k|{
  347|  38.9k|  const unsigned char *p = (const unsigned char *)ptr;
  348|       |  /* Reject all bytes \x01 - \x1f + \x7f */
  349|   390k|  while(len && *p) {
  ------------------
  |  Branch (349:9): [True: 351k, False: 38.9k]
  |  Branch (349:16): [True: 351k, False: 0]
  ------------------
  350|   351k|    if((*p < 0x20) || (*p == 0x7f))
  ------------------
  |  Branch (350:8): [True: 66, False: 351k]
  |  Branch (350:23): [True: 5, False: 351k]
  ------------------
  351|     71|      return TRUE;
  ------------------
  |  | 1053|     71|#define TRUE true
  ------------------
  352|   351k|    p++;
  353|   351k|    len--;
  354|   351k|  }
  355|  38.9k|  return FALSE;
  ------------------
  |  | 1056|  38.9k|#define FALSE false
  ------------------
  356|  38.9k|}
cookie.c:parse_first_pair:
  423|  1.15k|{
  424|       |  /* The first name/value pair is the actual cookie name */
  425|  1.15k|  if(!sep || !curlx_strlen(name)) {
  ------------------
  |  |   50|  1.13k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (425:6): [True: 20, False: 1.13k]
  |  Branch (425:14): [True: 4, False: 1.13k]
  ------------------
  426|     24|    infof(data, "invalid cookie, dropped");
  ------------------
  |  |  143|     24|  do {                               \
  |  |  144|     24|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     24|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 24, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 24]
  |  |  |  |  ------------------
  |  |  |  |  323|     24|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     24|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     24|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 24]
  |  |  ------------------
  ------------------
  427|     24|    return FALSE;
  ------------------
  |  | 1056|     24|#define FALSE false
  ------------------
  428|     24|  }
  429|       |
  430|       |  /*
  431|       |   * Check for too long individual name or contents. Chrome and Firefox
  432|       |   * support 4095 or 4096 bytes combo
  433|       |   */
  434|  1.13k|  if((curlx_strlen(name) + curlx_strlen(val)) > MAX_NAME) {
  ------------------
  |  |   50|  1.13k|#define curlx_strlen(x) ((x)->len)
  ------------------
                if((curlx_strlen(name) + curlx_strlen(val)) > MAX_NAME) {
  ------------------
  |  |   50|  1.13k|#define curlx_strlen(x) ((x)->len)
  ------------------
                if((curlx_strlen(name) + curlx_strlen(val)) > MAX_NAME) {
  ------------------
  |  |   85|  1.13k|#define MAX_NAME 4096
  ------------------
  |  Branch (434:6): [True: 1, False: 1.12k]
  ------------------
  435|      1|    infof(data, "oversized cookie dropped, name/val %zu + %zu bytes",
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  323|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  436|      1|          curlx_strlen(name), curlx_strlen(val));
  437|      1|    return FALSE;
  ------------------
  |  | 1056|      1|#define FALSE false
  ------------------
  438|      1|  }
  439|       |
  440|       |  /* Check if we have a reserved prefix set. */
  441|  1.12k|  if(!strncmp("__Secure-", curlx_str(name), 9))
  ------------------
  |  |   49|  1.12k|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (441:6): [True: 4, False: 1.12k]
  ------------------
  442|      4|    co->prefix_secure = TRUE;
  ------------------
  |  | 1053|      4|#define TRUE true
  ------------------
  443|  1.12k|  else if(!strncmp("__Host-", curlx_str(name), 7))
  ------------------
  |  |   49|  1.12k|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (443:11): [True: 5, False: 1.12k]
  ------------------
  444|      5|    co->prefix_host = TRUE;
  ------------------
  |  | 1053|      5|#define TRUE true
  ------------------
  445|       |
  446|  1.12k|  cookie[COOKIE_NAME] = *name;
  ------------------
  |  |  363|  1.12k|#define COOKIE_NAME   0
  ------------------
  447|  1.12k|  cookie[COOKIE_VALUE] = *val;
  ------------------
  |  |  364|  1.12k|#define COOKIE_VALUE  1
  ------------------
  448|       |  return TRUE;
  ------------------
  |  | 1053|  1.12k|#define TRUE true
  ------------------
  449|  1.13k|}
cookie.c:parse_flag:
  454|  4.58k|{
  455|       |  /*
  456|       |   * secure cookies are only allowed to be set when the connection is
  457|       |   * using a secure protocol, or when the cookie is being set by
  458|       |   * reading from file
  459|       |   */
  460|  4.58k|  if(curlx_str_casecompare(name, "secure")) {
  ------------------
  |  Branch (460:6): [True: 201, False: 4.38k]
  ------------------
  461|    201|    if(secure || !ci->running)
  ------------------
  |  Branch (461:8): [True: 201, False: 0]
  |  Branch (461:18): [True: 0, False: 0]
  ------------------
  462|    201|      co->secure = TRUE;
  ------------------
  |  | 1053|    201|#define TRUE true
  ------------------
  463|      0|    else {
  464|      0|      infof(data, "skipped cookie because not 'secure'");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  465|      0|      return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  466|      0|    }
  467|    201|  }
  468|  4.38k|  else if(curlx_str_casecompare(name, "httponly"))
  ------------------
  |  Branch (468:11): [True: 202, False: 4.18k]
  ------------------
  469|    202|    co->httponly = TRUE;
  ------------------
  |  | 1053|    202|#define TRUE true
  ------------------
  470|       |
  471|  4.58k|  return TRUE;
  ------------------
  |  | 1053|  4.58k|#define TRUE true
  ------------------
  472|  4.58k|}
cookie.c:cap_expires:
   53|  11.5k|{
   54|  11.5k|  if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |  616|    310|#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
                if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |   45|    310|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
  |  Branch (54:6): [True: 310, False: 11.2k]
  |  Branch (54:21): [True: 310, False: 0]
  ------------------
   55|    310|    timediff_t cap = now + COOKIES_MAXAGE;
  ------------------
  |  |   45|    310|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
   56|    310|    if(co->expires > cap) {
  ------------------
  |  Branch (56:8): [True: 90, False: 220]
  ------------------
   57|     90|      cap += 30;
   58|     90|      co->expires = (cap / 60) * 60;
   59|     90|    }
   60|    310|  }
   61|  11.5k|}
cookie.c:parse_expires:
  561|  11.8k|{
  562|       |  /*
  563|       |   * Let max-age have priority.
  564|       |   *
  565|       |   * If the date cannot get parsed for whatever reason, the cookie
  566|       |   * will be treated as a session cookie
  567|       |   */
  568|  11.8k|  if(!co->expires && (curlx_strlen(val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |   50|  11.6k|#define curlx_strlen(x) ((x)->len)
  ------------------
                if(!co->expires && (curlx_strlen(val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |  361|  11.6k|#define MAX_DATE_LENGTH 80
  ------------------
  |  Branch (568:6): [True: 11.6k, False: 274]
  |  Branch (568:22): [True: 11.5k, False: 51]
  ------------------
  569|  11.5k|    char dbuf[MAX_DATE_LENGTH + 1];
  570|  11.5k|    time_t date = 0;
  571|  11.5k|    memcpy(dbuf, curlx_str(val), curlx_strlen(val));
  ------------------
  |  |   49|  11.5k|#define curlx_str(x)    ((x)->str)
  ------------------
                  memcpy(dbuf, curlx_str(val), curlx_strlen(val));
  ------------------
  |  |   50|  11.5k|#define curlx_strlen(x) ((x)->len)
  ------------------
  572|  11.5k|    dbuf[curlx_strlen(val)] = 0;
  ------------------
  |  |   50|  11.5k|#define curlx_strlen(x) ((x)->len)
  ------------------
  573|  11.5k|    if(!Curl_getdate_capped(dbuf, &date)) {
  ------------------
  |  Branch (573:8): [True: 310, False: 11.2k]
  ------------------
  574|    310|      if(!date)
  ------------------
  |  Branch (574:10): [True: 1, False: 309]
  ------------------
  575|      1|        date++;
  576|    310|      co->expires = (curl_off_t)date;
  577|    310|    }
  578|  11.2k|    else
  579|  11.2k|      co->expires = 0;
  580|  11.5k|    if(!*nowp)
  ------------------
  |  Branch (580:8): [True: 946, False: 10.6k]
  ------------------
  581|    946|      *nowp = time(NULL);
  582|  11.5k|    cap_expires(*nowp, co);
  583|  11.5k|  }
  584|  11.8k|}
cookie.c:storecookie:
  372|  1.08k|{
  373|  1.08k|  CURLcode result;
  374|  1.08k|  result = strstore(&co->name, curlx_str(&cp[COOKIE_NAME]),
  ------------------
  |  |   49|  1.08k|#define curlx_str(x)    ((x)->str)
  ------------------
  375|  1.08k|                    curlx_strlen(&cp[COOKIE_NAME]));
  ------------------
  |  |   50|  1.08k|#define curlx_strlen(x) ((x)->len)
  ------------------
  376|  1.08k|  if(!result)
  ------------------
  |  Branch (376:6): [True: 1.08k, False: 0]
  ------------------
  377|  1.08k|    result = strstore(&co->value, curlx_str(&cp[COOKIE_VALUE]),
  ------------------
  |  |   49|  1.08k|#define curlx_str(x)    ((x)->str)
  ------------------
  378|  1.08k|                      curlx_strlen(&cp[COOKIE_VALUE]));
  ------------------
  |  |   50|  1.08k|#define curlx_strlen(x) ((x)->len)
  ------------------
  379|  1.08k|  if(!result) {
  ------------------
  |  Branch (379:6): [True: 1.08k, False: 0]
  ------------------
  380|  1.08k|    size_t plen = 0;
  381|  1.08k|    if(curlx_strlen(&cp[COOKIE_PATH])) {
  ------------------
  |  |   50|  1.08k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 20, False: 1.06k]
  |  |  ------------------
  ------------------
  382|     20|      path = curlx_str(&cp[COOKIE_PATH]);
  ------------------
  |  |   49|     20|#define curlx_str(x)    ((x)->str)
  ------------------
  383|     20|      plen = curlx_strlen(&cp[COOKIE_PATH]);
  ------------------
  |  |   50|     20|#define curlx_strlen(x) ((x)->len)
  ------------------
  384|     20|    }
  385|  1.06k|    else if(path) {
  ------------------
  |  Branch (385:13): [True: 0, False: 1.06k]
  ------------------
  386|       |      /* No path was given in the header line, set the default */
  387|      0|      const char *endslash = strrchr(path, '/');
  388|      0|      if(endslash)
  ------------------
  |  Branch (388:10): [True: 0, False: 0]
  ------------------
  389|      0|        plen = endslash - path + 1; /* include end slash */
  390|      0|      else
  391|      0|        plen = strlen(path);
  392|      0|    }
  393|       |
  394|  1.08k|    if(path) {
  ------------------
  |  Branch (394:8): [True: 20, False: 1.06k]
  ------------------
  395|     20|      co->path = sanitize_cookie_path(path, plen);
  396|     20|      if(!co->path)
  ------------------
  |  Branch (396:10): [True: 0, False: 20]
  ------------------
  397|      0|        result = CURLE_OUT_OF_MEMORY;
  398|     20|    }
  399|  1.08k|  }
  400|  1.08k|  if(!result) {
  ------------------
  |  Branch (400:6): [True: 1.08k, False: 0]
  ------------------
  401|  1.08k|    if(curlx_strlen(&cp[COOKIE_DOMAIN]))
  ------------------
  |  |   50|  1.08k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 0, False: 1.08k]
  |  |  ------------------
  ------------------
  402|      0|      result = strstore(&co->domain, curlx_str(&cp[COOKIE_DOMAIN]),
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  403|      0|                        curlx_strlen(&cp[COOKIE_DOMAIN]));
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  404|  1.08k|    else if(domain) {
  ------------------
  |  Branch (404:13): [True: 0, False: 1.08k]
  ------------------
  405|       |      /* no domain was given in the header line, set the default */
  406|      0|      co->domain = curlx_strdup(domain);
  ------------------
  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  407|      0|      if(!co->domain)
  ------------------
  |  Branch (407:10): [True: 0, False: 0]
  ------------------
  408|      0|        result = CURLE_OUT_OF_MEMORY;
  409|      0|    }
  410|  1.08k|  }
  411|  1.08k|  return result;
  412|  1.08k|}
cookie.c:strstore:
  256|  2.17k|{
  257|  2.17k|  DEBUGASSERT(str);
  ------------------
  |  | 1079|  2.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (257:3): [True: 0, False: 2.17k]
  |  Branch (257:3): [True: 2.17k, False: 0]
  ------------------
  258|  2.17k|  *str = curlx_memdup0(newstr, len);
  259|  2.17k|  if(!*str)
  ------------------
  |  Branch (259:6): [True: 0, False: 2.17k]
  ------------------
  260|      0|    return CURLE_OUT_OF_MEMORY;
  261|  2.17k|  return CURLE_OK;
  262|  2.17k|}
cookie.c:sanitize_cookie_path:
  227|    118|{
  228|       |  /* some sites send path attribute within '"'. */
  229|    118|  if(len && (cookie_path[0] == '\"')) {
  ------------------
  |  Branch (229:6): [True: 118, False: 0]
  |  Branch (229:13): [True: 21, False: 97]
  ------------------
  230|     21|    cookie_path++;
  231|     21|    len--;
  232|       |
  233|     21|    if(len && (cookie_path[len - 1] == '\"'))
  ------------------
  |  Branch (233:8): [True: 18, False: 3]
  |  Branch (233:15): [True: 2, False: 16]
  ------------------
  234|      2|      len--;
  235|     21|  }
  236|       |
  237|       |  /* RFC6265 5.2.4 The Path Attribute */
  238|    118|  if(!len || (cookie_path[0] != '/'))
  ------------------
  |  Branch (238:6): [True: 5, False: 113]
  |  Branch (238:14): [True: 77, False: 36]
  ------------------
  239|       |    /* Let cookie-path be the default-path. */
  240|     82|    return curlx_strdup("/");
  ------------------
  |  | 1472|     82|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  241|       |
  242|       |  /* remove trailing slash when path is non-empty */
  243|       |  /* convert /hoge/ to /hoge */
  244|     36|  if(len > 1 && cookie_path[len - 1] == '/')
  ------------------
  |  Branch (244:6): [True: 34, False: 2]
  |  Branch (244:17): [True: 4, False: 30]
  ------------------
  245|      4|    len--;
  246|       |
  247|     36|  return curlx_memdup0(cookie_path, len);
  248|    118|}
cookie.c:parse_netscape:
  672|  8.28k|{
  673|       |  /*
  674|       |   * This line is NOT an HTTP header style line, we do offer support for
  675|       |   * reading the odd netscape cookies-file format here
  676|       |   */
  677|  8.28k|  const char *ptr, *next;
  678|  8.28k|  int fields;
  679|  8.28k|  size_t len;
  680|  8.28k|  *okay = FALSE;
  ------------------
  |  | 1056|  8.28k|#define FALSE false
  ------------------
  681|       |
  682|       |  /*
  683|       |   * In 2008, Internet Explorer introduced HTTP-only cookies to prevent XSS
  684|       |   * attacks. Cookies marked httpOnly are not accessible to JavaScript. In
  685|       |   * Firefox's cookie files, they are prefixed #HttpOnly_ and the rest
  686|       |   * remains as usual, so we skip 10 characters of the line.
  687|       |   */
  688|  8.28k|  if(!strncmp(lineptr, "#HttpOnly_", 10)) {
  ------------------
  |  Branch (688:6): [True: 1, False: 8.28k]
  ------------------
  689|      1|    lineptr += 10;
  690|      1|    co->httponly = TRUE;
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
  691|      1|  }
  692|       |
  693|  8.28k|  if(lineptr[0] == '#')
  ------------------
  |  Branch (693:6): [True: 76, False: 8.20k]
  ------------------
  694|       |    /* do not even try the comments */
  695|     76|    return CURLE_OK;
  696|       |
  697|       |  /*
  698|       |   * Now loop through the fields and init the struct we already have
  699|       |   * allocated
  700|       |   */
  701|  8.20k|  fields = 0;
  702|  19.2k|  for(next = lineptr; next; fields++) {
  ------------------
  |  Branch (702:23): [True: 11.0k, False: 8.16k]
  ------------------
  703|  11.0k|    ptr = next;
  704|  11.0k|    len = strcspn(ptr, "\t\r\n");
  705|  11.0k|    next = (ptr[len] == '\t' ? &ptr[len + 1] : NULL);
  ------------------
  |  Branch (705:13): [True: 2.86k, False: 8.20k]
  ------------------
  706|  11.0k|    switch(fields) {
  ------------------
  |  Branch (706:12): [True: 10.3k, False: 731]
  ------------------
  707|  8.20k|    case 0:
  ------------------
  |  Branch (707:5): [True: 8.20k, False: 2.86k]
  ------------------
  708|  8.20k|      if(ptr[0] == '.') { /* skip preceding dots */
  ------------------
  |  Branch (708:10): [True: 6, False: 8.20k]
  ------------------
  709|      6|        ptr++;
  710|      6|        len--;
  711|      6|      }
  712|  8.20k|      co->domain = curlx_memdup0(ptr, len);
  713|  8.20k|      if(!co->domain)
  ------------------
  |  Branch (713:10): [True: 0, False: 8.20k]
  ------------------
  714|      0|        return CURLE_OUT_OF_MEMORY;
  715|  8.20k|      break;
  716|  8.20k|    case 1:
  ------------------
  |  Branch (716:5): [True: 585, False: 10.4k]
  ------------------
  717|       |      /*
  718|       |       * flag: A TRUE/FALSE value indicating if all machines within a given
  719|       |       * domain can access the variable. Set TRUE when the cookie says
  720|       |       * .example.com and to false when the domain is complete www.example.com
  721|       |       */
  722|    585|      co->tailmatch = !!curl_strnequal(ptr, "TRUE", len);
  723|    585|      break;
  724|    578|    case 2:
  ------------------
  |  Branch (724:5): [True: 578, False: 10.4k]
  ------------------
  725|       |      /* The file format allows the path field to remain not filled in */
  726|    578|      if(strncmp("TRUE", ptr, len) && strncmp("FALSE", ptr, len)) {
  ------------------
  |  Branch (726:10): [True: 99, False: 479]
  |  Branch (726:39): [True: 98, False: 1]
  ------------------
  727|       |        /* only if the path does not look like a boolean option! */
  728|     98|        co->path = sanitize_cookie_path(ptr, len);
  729|     98|        if(!co->path)
  ------------------
  |  Branch (729:12): [True: 0, False: 98]
  ------------------
  730|      0|          return CURLE_OUT_OF_MEMORY;
  731|     98|        break;
  732|     98|      }
  733|    480|      else {
  734|       |        /* this does not look like a path, make one up! */
  735|    480|        co->path = curlx_strdup("/");
  ------------------
  |  | 1472|    480|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  736|    480|        if(!co->path)
  ------------------
  |  Branch (736:12): [True: 0, False: 480]
  ------------------
  737|      0|          return CURLE_OUT_OF_MEMORY;
  738|    480|      }
  739|    480|      fields++; /* add a field and fall down to secure */
  740|    480|      FALLTHROUGH();
  ------------------
  |  |  823|    480|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  741|    503|    case 3:
  ------------------
  |  Branch (741:5): [True: 23, False: 11.0k]
  ------------------
  742|    503|      co->secure = FALSE;
  ------------------
  |  | 1056|    503|#define FALSE false
  ------------------
  743|    503|      if(curl_strnequal(ptr, "TRUE", len)) {
  ------------------
  |  Branch (743:10): [True: 485, False: 18]
  ------------------
  744|    485|        if(secure_origin || ci->running)
  ------------------
  |  Branch (744:12): [True: 485, False: 0]
  |  Branch (744:29): [True: 0, False: 0]
  ------------------
  745|    485|          co->secure = TRUE;
  ------------------
  |  | 1053|    485|#define TRUE true
  ------------------
  746|      0|        else
  747|      0|          return CURLE_OK;
  748|    485|      }
  749|    503|      break;
  750|    503|    case 4:
  ------------------
  |  Branch (750:5): [True: 489, False: 10.5k]
  ------------------
  751|    489|      if(curlx_str_number(&ptr, &co->expires, CURL_OFF_T_MAX))
  ------------------
  |  |  596|    489|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (751:10): [True: 48, False: 441]
  ------------------
  752|     48|        return CURLE_OK;
  753|    441|      break;
  754|    441|    case 5:
  ------------------
  |  Branch (754:5): [True: 429, False: 10.6k]
  ------------------
  755|    429|      co->name = curlx_memdup0(ptr, len);
  756|    429|      if(!co->name)
  ------------------
  |  Branch (756:10): [True: 0, False: 429]
  ------------------
  757|      0|        return CURLE_OUT_OF_MEMORY;
  758|    429|      else {
  759|       |        /* For Netscape file format cookies we check prefix on the name.
  760|       |           These prefixes are matched case sensitively, same as on the
  761|       |           header path and as the 6265bis document specifies. */
  762|    429|        if(!strncmp("__Secure-", co->name, 9))
  ------------------
  |  Branch (762:12): [True: 2, False: 427]
  ------------------
  763|      2|          co->prefix_secure = TRUE;
  ------------------
  |  | 1053|      2|#define TRUE true
  ------------------
  764|    427|        else if(!strncmp("__Host-", co->name, 7))
  ------------------
  |  Branch (764:17): [True: 4, False: 423]
  ------------------
  765|      4|          co->prefix_host = TRUE;
  ------------------
  |  | 1053|      4|#define TRUE true
  ------------------
  766|    429|      }
  767|    429|      break;
  768|    429|    case 6:
  ------------------
  |  Branch (768:5): [True: 28, False: 11.0k]
  ------------------
  769|     28|      co->value = curlx_memdup0(ptr, len);
  770|     28|      if(!co->value)
  ------------------
  |  Branch (770:10): [True: 0, False: 28]
  ------------------
  771|      0|        return CURLE_OUT_OF_MEMORY;
  772|     28|      break;
  773|  11.0k|    }
  774|  11.0k|  }
  775|  8.16k|  if(fields == 6) {
  ------------------
  |  Branch (775:6): [True: 401, False: 7.75k]
  ------------------
  776|       |    /* we got a cookie with blank contents, fix it */
  777|    401|    co->value = curlx_strdup("");
  ------------------
  |  | 1472|    401|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  778|    401|    if(!co->value)
  ------------------
  |  Branch (778:8): [True: 0, False: 401]
  ------------------
  779|      0|      return CURLE_OUT_OF_MEMORY;
  780|    401|    else
  781|    401|      fields++;
  782|    401|  }
  783|       |
  784|  8.16k|  if(fields != 7)
  ------------------
  |  Branch (784:6): [True: 7.74k, False: 418]
  ------------------
  785|       |    /* we did not find the sufficient number of fields */
  786|  7.74k|    return CURLE_OK;
  787|       |
  788|       |  /* Reject control octets in the name or value, matching the filtering done
  789|       |     for cookies set over HTTP. A cookie loaded from a file is later sent in
  790|       |     request headers, so the same bytes that make a server reject a request
  791|       |     must not slip in through the file. */
  792|    418|  if(invalid_octets(co->name, strlen(co->name)) ||
  ------------------
  |  Branch (792:6): [True: 15, False: 403]
  ------------------
  793|    403|     invalid_octets(co->value, strlen(co->value)))
  ------------------
  |  Branch (793:6): [True: 3, False: 400]
  ------------------
  794|     18|    return CURLE_OK;
  795|       |
  796|    400|  *okay = TRUE;
  ------------------
  |  | 1053|    400|#define TRUE true
  ------------------
  797|    400|  return CURLE_OK;
  798|    418|}
cookie.c:remove_expired:
  274|  16.6k|{
  275|  16.6k|  struct Cookie *co;
  276|  16.6k|  curl_off_t now = (curl_off_t)time(NULL);
  277|  16.6k|  unsigned int i;
  278|       |
  279|       |  /*
  280|       |   * If the earliest expiration timestamp in the jar is in the future we can
  281|       |   * skip scanning the whole jar and instead exit early as there will not be
  282|       |   * any cookies to evict. If we need to evict, reset the next_expiration
  283|       |   * counter in order to track the next one. In case the recorded first
  284|       |   * expiration is the max offset, then perform the safe fallback of checking
  285|       |   * all cookies.
  286|       |   */
  287|  16.6k|  if(now < ci->next_expiration &&
  ------------------
  |  Branch (287:6): [True: 16.5k, False: 76]
  ------------------
  288|  16.5k|     ci->next_expiration != CURL_OFF_T_MAX)
  ------------------
  |  |  596|  16.5k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (288:6): [True: 260, False: 16.2k]
  ------------------
  289|    260|    return;
  290|  16.3k|  else
  291|  16.3k|    ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  596|  16.3k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  292|       |
  293|  1.04M|  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|  1.04M|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (293:14): [True: 1.03M, False: 16.3k]
  ------------------
  294|  1.03M|    struct Curl_llist_node *n;
  295|  1.03M|    struct Curl_llist_node *e = NULL;
  296|       |
  297|  1.03M|    for(n = Curl_llist_head(&ci->cookielist[i]); n; n = e) {
  ------------------
  |  Branch (297:50): [True: 108, False: 1.03M]
  ------------------
  298|    108|      co = Curl_node_elem(n);
  299|    108|      e = Curl_node_next(n);
  300|    108|      if(co->expires) {
  ------------------
  |  Branch (300:10): [True: 78, False: 30]
  ------------------
  301|     78|        if(co->expires < now) {
  ------------------
  |  Branch (301:12): [True: 76, False: 2]
  ------------------
  302|     76|          Curl_node_remove(n);
  303|     76|          freecookie(co, TRUE);
  ------------------
  |  | 1053|     76|#define TRUE true
  ------------------
  304|     76|          ci->numcookies--;
  305|     76|        }
  306|      2|        else if(co->expires < ci->next_expiration)
  ------------------
  |  Branch (306:17): [True: 0, False: 2]
  ------------------
  307|       |          /*
  308|       |           * If this cookie has an expiration timestamp earlier than what we
  309|       |           * have seen so far then record it for the next round of expirations.
  310|       |           */
  311|      0|          ci->next_expiration = co->expires;
  312|     78|      }
  313|    108|    }
  314|  1.03M|  }
  315|  16.3k|}
cookie.c:is_public_suffix:
  803|  1.47k|{
  804|       |#ifdef USE_LIBPSL
  805|       |  /*
  806|       |   * Check if the domain is a Public Suffix and if yes, ignore the cookie. We
  807|       |   * must also check that the data handle is not NULL since the psl code will
  808|       |   * dereference it.
  809|       |   */
  810|       |  DEBUGF(infof(data, "PSL check set-cookie '%s' for domain=%s in %s",
  811|       |               co->name, co->domain, domain));
  812|       |  if(data && (domain && co->domain && !Curl_host_is_ipnum(co->domain))) {
  813|       |    bool acceptable = FALSE;
  814|       |    char lcase[256];
  815|       |    char lcookie[256];
  816|       |    size_t dlen = strlen(domain);
  817|       |    size_t clen = strlen(co->domain);
  818|       |
  819|       |    /* trim trailing dots */
  820|       |    if(dlen && (domain[dlen - 1] == '.'))
  821|       |      dlen--;
  822|       |    if(clen && (co->domain[clen - 1] == '.'))
  823|       |      clen--;
  824|       |
  825|       |    if((dlen < sizeof(lcase)) && (clen < sizeof(lcookie))) {
  826|       |      const psl_ctx_t *psl = Curl_psl_use(data);
  827|       |      if(psl) {
  828|       |        /* the PSL check requires lowercase domain name and pattern */
  829|       |        Curl_strntolower(lcase, domain, dlen);
  830|       |        lcase[dlen] = 0;
  831|       |        Curl_strntolower(lcookie, co->domain, clen);
  832|       |        lcookie[clen] = 0;
  833|       |        acceptable = psl_is_cookie_domain_acceptable(psl, lcase, lcookie);
  834|       |        Curl_psl_release(data);
  835|       |      }
  836|       |      else
  837|       |        infof(data, "libpsl problem, rejecting cookie for safety");
  838|       |    }
  839|       |
  840|       |    if(!acceptable) {
  841|       |      infof(data, "cookie '%s' dropped, domain '%s' must not "
  842|       |            "set cookies for '%s'", co->name, domain, co->domain);
  843|       |      return TRUE;
  844|       |    }
  845|       |  }
  846|       |#else
  847|  1.47k|  (void)data;
  848|  1.47k|  (void)co;
  849|  1.47k|  (void)domain;
  850|  1.47k|  DEBUGF(infof(data, "NO PSL to check set-cookie '%s' for domain=%s in %s",
  ------------------
  |  | 1065|  10.3k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1065:19): [True: 1.47k, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 1.47k]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
  851|  1.47k|               co->name, co->domain, domain));
  852|  1.47k|#endif
  853|       |  return FALSE;
  ------------------
  |  | 1056|  1.47k|#define FALSE false
  ------------------
  854|  1.47k|}
cookie.c:replace_existing:
  862|  1.47k|{
  863|  1.47k|  bool replace_old = FALSE;
  ------------------
  |  | 1056|  1.47k|#define FALSE false
  ------------------
  864|  1.47k|  struct Curl_llist_node *replace_n = NULL;
  865|  1.47k|  struct Curl_llist_node *n;
  866|  1.47k|  size_t myhash = cookiehash(co->domain);
  867|  1.47k|  for(n = Curl_llist_head(&ci->cookielist[myhash]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (867:53): [True: 0, False: 1.47k]
  ------------------
  868|      0|    struct Cookie *clist = Curl_node_elem(n);
  869|      0|    if(!strcmp(clist->name, co->name)) {
  ------------------
  |  Branch (869:8): [True: 0, False: 0]
  ------------------
  870|       |      /* the names are identical */
  871|      0|      bool matching_domains = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  872|       |
  873|      0|      if(clist->domain && co->domain) {
  ------------------
  |  Branch (873:10): [True: 0, False: 0]
  |  Branch (873:27): [True: 0, False: 0]
  ------------------
  874|      0|        if(cookie_tailmatch(clist->domain, strlen(clist->domain),
  ------------------
  |  Branch (874:12): [True: 0, False: 0]
  ------------------
  875|      0|                            co->domain) ||
  876|      0|           cookie_tailmatch(co->domain, strlen(co->domain), clist->domain))
  ------------------
  |  Branch (876:12): [True: 0, False: 0]
  ------------------
  877|       |          /* The existing one is a tail of the new or vice versa */
  878|      0|          matching_domains = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  879|      0|      }
  880|      0|      else if(!clist->domain && !co->domain)
  ------------------
  |  Branch (880:15): [True: 0, False: 0]
  |  Branch (880:33): [True: 0, False: 0]
  ------------------
  881|      0|        matching_domains = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  882|       |
  883|      0|      if(matching_domains && /* the domains were identical */
  ------------------
  |  Branch (883:10): [True: 0, False: 0]
  ------------------
  884|      0|         clist->path && co->path && /* both have paths */
  ------------------
  |  Branch (884:10): [True: 0, False: 0]
  |  Branch (884:25): [True: 0, False: 0]
  ------------------
  885|      0|         clist->secure && !co->secure && !secure) {
  ------------------
  |  Branch (885:10): [True: 0, False: 0]
  |  Branch (885:27): [True: 0, False: 0]
  |  Branch (885:42): [True: 0, False: 0]
  ------------------
  886|      0|        size_t cllen;
  887|      0|        const char *sep = NULL;
  888|       |
  889|       |        /*
  890|       |         * A non-secure cookie may not overlay an existing secure cookie.
  891|       |         * For an existing cookie "a" with path "/login", refuse a new
  892|       |         * cookie "a" with for example path "/login/en", while the path
  893|       |         * "/loginhelper" is ok.
  894|       |         */
  895|       |
  896|      0|        DEBUGASSERT(clist->path[0]);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (896:9): [True: 0, False: 0]
  |  Branch (896:9): [True: 0, False: 0]
  ------------------
  897|      0|        if(clist->path[0])
  ------------------
  |  Branch (897:12): [True: 0, False: 0]
  ------------------
  898|      0|          sep = strchr(clist->path + 1, '/');
  899|      0|        if(sep)
  ------------------
  |  Branch (899:12): [True: 0, False: 0]
  ------------------
  900|      0|          cllen = sep - clist->path;
  901|      0|        else
  902|      0|          cllen = strlen(clist->path);
  903|       |
  904|      0|        if(!strncmp(clist->path, co->path, cllen)) {
  ------------------
  |  Branch (904:12): [True: 0, False: 0]
  ------------------
  905|      0|          infof(data, "cookie '%s' for domain '%s' dropped, would "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  906|      0|                "overlay an existing cookie", co->name, co->domain);
  907|      0|          return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  908|      0|        }
  909|      0|      }
  910|      0|    }
  911|       |
  912|      0|    if(!replace_n && !strcmp(clist->name, co->name)) {
  ------------------
  |  Branch (912:8): [True: 0, False: 0]
  |  Branch (912:22): [True: 0, False: 0]
  ------------------
  913|       |      /* the names are identical */
  914|       |
  915|      0|      if(clist->domain && co->domain) {
  ------------------
  |  Branch (915:10): [True: 0, False: 0]
  |  Branch (915:27): [True: 0, False: 0]
  ------------------
  916|      0|        if(curl_strequal(clist->domain, co->domain) &&
  ------------------
  |  Branch (916:12): [True: 0, False: 0]
  ------------------
  917|      0|           (clist->tailmatch == co->tailmatch))
  ------------------
  |  Branch (917:12): [True: 0, False: 0]
  ------------------
  918|       |          /* The domains are identical */
  919|      0|          replace_old = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  920|      0|      }
  921|      0|      else if(!clist->domain && !co->domain)
  ------------------
  |  Branch (921:15): [True: 0, False: 0]
  |  Branch (921:33): [True: 0, False: 0]
  ------------------
  922|      0|        replace_old = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  923|       |
  924|      0|      if(replace_old) {
  ------------------
  |  Branch (924:10): [True: 0, False: 0]
  ------------------
  925|       |        /* the domains were identical */
  926|       |
  927|      0|        if(clist->path && co->path &&
  ------------------
  |  Branch (927:12): [True: 0, False: 0]
  |  Branch (927:27): [True: 0, False: 0]
  ------------------
  928|      0|           strcmp(clist->path, co->path))
  ------------------
  |  Branch (928:12): [True: 0, False: 0]
  ------------------
  929|      0|          replace_old = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  930|      0|        else if(!clist->path != !co->path)
  ------------------
  |  Branch (930:17): [True: 0, False: 0]
  ------------------
  931|      0|          replace_old = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  932|      0|      }
  933|       |
  934|      0|      if(replace_old && !co->livecookie && clist->livecookie) {
  ------------------
  |  Branch (934:10): [True: 0, False: 0]
  |  Branch (934:25): [True: 0, False: 0]
  |  Branch (934:44): [True: 0, False: 0]
  ------------------
  935|       |        /*
  936|       |         * Both cookies matched fine, except that the already present cookie
  937|       |         * is "live", which means it was set from a header, while the new one
  938|       |         * was read from a file and thus is not "live". "live" cookies are
  939|       |         * preferred so the new cookie is freed.
  940|       |         */
  941|      0|        return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  942|      0|      }
  943|      0|      if(replace_old)
  ------------------
  |  Branch (943:10): [True: 0, False: 0]
  ------------------
  944|      0|        replace_n = n;
  945|      0|    }
  946|      0|  }
  947|  1.47k|  if(replace_n) {
  ------------------
  |  Branch (947:6): [True: 0, False: 1.47k]
  ------------------
  948|      0|    struct Cookie *repl = Curl_node_elem(replace_n);
  949|       |
  950|       |    /* when replacing, creationtime is kept from old */
  951|      0|    co->creationtime = repl->creationtime;
  952|       |
  953|       |    /* unlink the old */
  954|      0|    Curl_node_remove(replace_n);
  955|       |
  956|       |    /* free the old cookie */
  957|      0|    freecookie(repl, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  958|      0|  }
  959|  1.47k|  *replacep = replace_old;
  960|       |  return TRUE;
  ------------------
  |  | 1053|  1.47k|#define TRUE true
  ------------------
  961|  1.47k|}
cookie.c:cookiehash:
  212|  2.95k|{
  213|  2.95k|  const char *top;
  214|  2.95k|  size_t len;
  215|       |
  216|  2.95k|  if(!domain || Curl_host_is_ipnum(domain))
  ------------------
  |  Branch (216:6): [True: 2.16k, False: 792]
  |  Branch (216:17): [True: 20, False: 772]
  ------------------
  217|  2.18k|    return 0;
  218|       |
  219|    772|  top = get_top_domain(domain, &len);
  220|    772|  return cookie_hash_domain(top, len);
  221|  2.95k|}
cookie.c:get_top_domain:
  162|    772|{
  163|    772|  size_t len = 0;
  164|    772|  const char *first = NULL, *last;
  165|       |
  166|    772|  if(domain) {
  ------------------
  |  Branch (166:6): [True: 772, False: 0]
  ------------------
  167|    772|    len = strlen(domain);
  168|    772|    last = memrchr(domain, '.', len);
  169|    772|    if(last) {
  ------------------
  |  Branch (169:8): [True: 66, False: 706]
  ------------------
  170|     66|      first = memrchr(domain, '.', (last - domain));
  171|     66|      if(first)
  ------------------
  |  Branch (171:10): [True: 18, False: 48]
  ------------------
  172|     18|        len -= (++first - domain);
  173|     66|    }
  174|    772|  }
  175|       |
  176|    772|  if(outlen)
  ------------------
  |  Branch (176:6): [True: 772, False: 0]
  ------------------
  177|    772|    *outlen = len;
  178|       |
  179|    772|  return first ? first : domain;
  ------------------
  |  Branch (179:10): [True: 18, False: 754]
  ------------------
  180|    772|}
cookie.c:cookie_hash_domain:
  191|    772|{
  192|    772|  const char *end = domain + len;
  193|    772|  size_t h = 5381;
  194|       |
  195|  1.98k|  while(domain < end) {
  ------------------
  |  Branch (195:9): [True: 1.21k, False: 772]
  ------------------
  196|  1.21k|    size_t j = (size_t)Curl_raw_toupper(*domain++);
  197|  1.21k|    h += h << 5;
  198|  1.21k|    h ^= j;
  199|  1.21k|  }
  200|       |
  201|    772|  return (h % COOKIE_HASH_SIZE);
  ------------------
  |  |   54|    772|#define COOKIE_HASH_SIZE 63
  ------------------
  202|    772|}
cookie.c:freecookie:
   64|  9.46k|{
   65|  9.46k|  curlx_free(co->domain);
  ------------------
  |  | 1478|  9.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   66|  9.46k|  curlx_free(co->path);
  ------------------
  |  | 1478|  9.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|  9.46k|  curlx_free(co->name);
  ------------------
  |  | 1478|  9.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   68|  9.46k|  curlx_free(co->value);
  ------------------
  |  | 1478|  9.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   69|  9.46k|  if(maintoo)
  ------------------
  |  Branch (69:6): [True: 1.47k, False: 7.99k]
  ------------------
   70|  1.47k|    curlx_free(co);
  ------------------
  |  | 1478|  1.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   71|  9.46k|}
cookie.c:cookie_load:
 1128|  7.57k|{
 1129|  7.57k|  FILE *handle = NULL;
 1130|  7.57k|  CURLcode result = CURLE_OK;
 1131|  7.57k|  FILE *fp = NULL;
 1132|  7.57k|  DEBUGASSERT(ci);
  ------------------
  |  | 1079|  7.57k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1132:3): [True: 0, False: 7.57k]
  |  Branch (1132:3): [True: 7.57k, False: 0]
  ------------------
 1133|  7.57k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  7.57k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1133:3): [True: 0, False: 7.57k]
  |  Branch (1133:3): [True: 7.57k, False: 0]
  ------------------
 1134|  7.57k|  DEBUGASSERT(file);
  ------------------
  |  | 1079|  7.57k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1134:3): [True: 0, False: 7.57k]
  |  Branch (1134:3): [True: 7.57k, False: 0]
  ------------------
 1135|       |
 1136|  7.57k|  ci->newsession = newsession; /* new session? */
 1137|  7.57k|  ci->running = FALSE; /* this is not running, this is init */
  ------------------
  |  | 1056|  7.57k|#define FALSE false
  ------------------
 1138|       |
 1139|  7.57k|  if(file && *file) {
  ------------------
  |  Branch (1139:6): [True: 7.57k, False: 0]
  |  Branch (1139:14): [True: 7.57k, False: 0]
  ------------------
 1140|  7.57k|    if(!strcmp(file, "-"))
  ------------------
  |  Branch (1140:8): [True: 0, False: 7.57k]
  ------------------
 1141|      0|      fp = stdin;
 1142|  7.57k|    else {
 1143|  7.57k|      fp = curlx_fopen(file, "rb");
  ------------------
  |  |   74|  7.57k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
 1144|  7.57k|      if(!fp)
  ------------------
  |  Branch (1144:10): [True: 0, False: 7.57k]
  ------------------
 1145|      0|        infof(data, "WARNING: failed to open cookie file \"%s\"", file);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1146|  7.57k|      else {
 1147|  7.57k|        curlx_struct_stat stat;
  ------------------
  |  |   63|  7.57k|#define curlx_struct_stat       struct stat
  ------------------
 1148|  7.57k|        if((curlx_fstat(fileno(fp), &stat) != -1) && S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  7.57k|#define curlx_fstat             fstat
  ------------------
  |  Branch (1148:12): [True: 7.57k, False: 0]
  |  Branch (1148:54): [True: 0, False: 7.57k]
  ------------------
 1149|      0|          curlx_fclose(fp);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1150|      0|          fp = NULL;
 1151|      0|          infof(data, "WARNING: cookie filename points to a directory: \"%s\"",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1152|      0|                file);
 1153|      0|        }
 1154|  7.57k|        else
 1155|  7.57k|          handle = fp;
 1156|  7.57k|      }
 1157|  7.57k|    }
 1158|  7.57k|  }
 1159|       |
 1160|  7.57k|  if(fp) {
  ------------------
  |  Branch (1160:6): [True: 7.57k, False: 0]
  ------------------
 1161|  7.57k|    struct dynbuf buf;
 1162|  7.57k|    bool eof = FALSE;
  ------------------
  |  | 1056|  7.57k|#define FALSE false
  ------------------
 1163|  7.57k|    curlx_dyn_init(&buf, MAX_COOKIE_LINE);
  ------------------
  |  |   81|  7.57k|#define MAX_COOKIE_LINE 5000
  ------------------
 1164|  7.57k|    do {
 1165|  7.57k|      result = Curl_get_line(&buf, fp, &eof);
 1166|  7.57k|      if(!result) {
  ------------------
  |  Branch (1166:10): [True: 7.57k, False: 0]
  ------------------
 1167|  7.57k|        const char *lineptr = curlx_dyn_ptr(&buf);
 1168|  7.57k|        bool headerline = FALSE;
  ------------------
  |  | 1056|  7.57k|#define FALSE false
  ------------------
 1169|  7.57k|        if(checkprefix("Set-Cookie:", lineptr)) {
  ------------------
  |  |   33|  7.57k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  7.57k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  7.57k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 7.57k]
  |  |  ------------------
  ------------------
 1170|       |          /* This is a cookie line, get it! */
 1171|      0|          lineptr += 11;
 1172|      0|          headerline = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1173|      0|          curlx_str_passblanks(&lineptr);
 1174|      0|        }
 1175|       |
 1176|  7.57k|        result = Curl_cookie_add(data, ci, headerline, TRUE, lineptr, NULL,
  ------------------
  |  | 1053|  7.57k|#define TRUE true
  ------------------
 1177|  7.57k|                                 NULL, TRUE);
  ------------------
  |  | 1053|  7.57k|#define TRUE true
  ------------------
 1178|       |        /* File reading cookie failures are not propagated back to the
 1179|       |           caller because there is no way to do that */
 1180|  7.57k|      }
 1181|  7.57k|    } while(!result && !eof);
  ------------------
  |  Branch (1181:13): [True: 7.57k, False: 0]
  |  Branch (1181:24): [True: 0, False: 7.57k]
  ------------------
 1182|  7.57k|    curlx_dyn_free(&buf); /* free the line buffer */
 1183|       |
 1184|       |    /*
 1185|       |     * Remove expired cookies from the hash. We must make sure to run this
 1186|       |     * after reading the file, and not on every cookie.
 1187|       |     */
 1188|  7.57k|    remove_expired(ci);
 1189|       |
 1190|  7.57k|    if(handle)
  ------------------
  |  Branch (1190:8): [True: 7.57k, False: 0]
  ------------------
 1191|  7.57k|      curlx_fclose(handle);
  ------------------
  |  |   79|  7.57k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1192|  7.57k|  }
 1193|  7.57k|  data->state.cookie_engine = TRUE;
  ------------------
  |  | 1053|  7.57k|#define TRUE true
  ------------------
 1194|  7.57k|  ci->running = TRUE; /* now, we are running */
  ------------------
  |  | 1053|  7.57k|#define TRUE true
  ------------------
 1195|       |
 1196|  7.57k|  return result;
 1197|  7.57k|}
cookie.c:get_netscape_format:
 1471|    122|{
 1472|    122|  return curl_maprintf(
 1473|    122|    "%s"               /* httponly preamble */
 1474|    122|    "%s%s\t"           /* domain */
 1475|    122|    "%s\t"             /* tailmatch */
 1476|    122|    "%s\t"             /* path */
 1477|    122|    "%s\t"             /* secure */
 1478|    122|    "%" FMT_OFF_T "\t" /* expires */
 1479|    122|    "%s\t"             /* name */
 1480|    122|    "%s",              /* value */
 1481|    122|    co->httponly ? "#HttpOnly_" : "",
  ------------------
  |  Branch (1481:5): [True: 0, False: 122]
  ------------------
 1482|       |    /*
 1483|       |     * Make sure all domains are prefixed with a dot if they allow
 1484|       |     * tailmatching. This is Mozilla-style.
 1485|       |     */
 1486|    122|    (co->tailmatch && co->domain && co->domain[0] != '.') ? "." : "",
  ------------------
  |  Branch (1486:6): [True: 118, False: 4]
  |  Branch (1486:23): [True: 118, False: 0]
  |  Branch (1486:37): [True: 118, False: 0]
  ------------------
 1487|    122|    co->domain ? co->domain : "unknown",
  ------------------
  |  Branch (1487:5): [True: 122, False: 0]
  ------------------
 1488|    122|    co->tailmatch ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1488:5): [True: 118, False: 4]
  ------------------
 1489|    122|    co->path ? co->path : "/",
  ------------------
  |  Branch (1489:5): [True: 122, False: 0]
  ------------------
 1490|    122|    co->secure ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1490:5): [True: 118, False: 4]
  ------------------
 1491|    122|    co->expires,
 1492|    122|    co->name,
 1493|    122|    co->value ? co->value : "");
  ------------------
  |  Branch (1493:5): [True: 122, False: 0]
  ------------------
 1494|    122|}
cookie.c:cookie_output:
 1507|  7.57k|{
 1508|  7.57k|  FILE *out = NULL;
 1509|  7.57k|  bool use_stdout = FALSE;
  ------------------
  |  | 1056|  7.57k|#define FALSE false
  ------------------
 1510|  7.57k|  char *tempstore = NULL;
 1511|  7.57k|  CURLcode result = CURLE_OK;
 1512|       |
 1513|  7.57k|  if(!ci)
  ------------------
  |  Branch (1513:6): [True: 0, False: 7.57k]
  ------------------
 1514|       |    /* no cookie engine alive */
 1515|      0|    return CURLE_OK;
 1516|       |
 1517|       |  /* at first, remove expired cookies */
 1518|  7.57k|  remove_expired(ci);
 1519|       |
 1520|  7.57k|  if(!strcmp("-", filename)) {
  ------------------
  |  Branch (1520:6): [True: 0, False: 7.57k]
  ------------------
 1521|       |    /* use stdout */
 1522|      0|    out = stdout;
 1523|      0|    use_stdout = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1524|      0|  }
 1525|  7.57k|  else {
 1526|  7.57k|    result = Curl_fopen(data, filename, &out, &tempstore);
 1527|  7.57k|    if(result)
  ------------------
  |  Branch (1527:8): [True: 0, False: 7.57k]
  ------------------
 1528|      0|      goto error;
 1529|  7.57k|  }
 1530|       |
 1531|  7.57k|  fputs("# Netscape HTTP Cookie File\n"
 1532|  7.57k|        "# https://curl.se/docs/http-cookies.html\n"
 1533|  7.57k|        "# This file was generated by libcurl! Edit at your own risk.\n\n",
 1534|  7.57k|        out);
 1535|       |
 1536|  7.57k|  if(ci->numcookies) {
  ------------------
  |  Branch (1536:6): [True: 146, False: 7.43k]
  ------------------
 1537|    146|    unsigned int i;
 1538|    146|    size_t nvalid = 0;
 1539|    146|    struct Cookie **array;
 1540|    146|    struct Curl_llist_node *n;
 1541|       |
 1542|    146|    array = curlx_calloc(1, sizeof(struct Cookie *) * ci->numcookies);
  ------------------
  |  | 1475|    146|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1543|    146|    if(!array) {
  ------------------
  |  Branch (1543:8): [True: 0, False: 146]
  ------------------
 1544|      0|      result = CURLE_OUT_OF_MEMORY;
 1545|      0|      goto error;
 1546|      0|    }
 1547|       |
 1548|       |    /* only sort the cookies with a domain property */
 1549|  9.34k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|  9.34k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1549:16): [True: 9.19k, False: 146]
  ------------------
 1550|  9.34k|      for(n = Curl_llist_head(&ci->cookielist[i]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (1550:52): [True: 146, False: 9.19k]
  ------------------
 1551|    146|        struct Cookie *co = Curl_node_elem(n);
 1552|    146|        if(!co->domain)
  ------------------
  |  Branch (1552:12): [True: 24, False: 122]
  ------------------
 1553|     24|          continue;
 1554|    122|        array[nvalid++] = co;
 1555|    122|      }
 1556|  9.19k|    }
 1557|       |
 1558|    146|    qsort(array, nvalid, sizeof(struct Cookie *), cookie_sort_ct);
 1559|       |
 1560|    268|    for(i = 0; i < nvalid; i++) {
  ------------------
  |  Branch (1560:16): [True: 122, False: 146]
  ------------------
 1561|    122|      char *format_ptr = get_netscape_format(array[i]);
 1562|    122|      if(!format_ptr) {
  ------------------
  |  Branch (1562:10): [True: 0, False: 122]
  ------------------
 1563|      0|        curlx_free(array);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1564|      0|        result = CURLE_OUT_OF_MEMORY;
 1565|      0|        goto error;
 1566|      0|      }
 1567|    122|      curl_mfprintf(out, "%s\n", format_ptr);
 1568|    122|      curlx_free(format_ptr);
  ------------------
  |  | 1478|    122|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1569|    122|    }
 1570|       |
 1571|    146|    curlx_free(array);
  ------------------
  |  | 1478|    146|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1572|    146|  }
 1573|       |
 1574|  7.57k|  if(!use_stdout) {
  ------------------
  |  Branch (1574:6): [True: 7.57k, False: 0]
  ------------------
 1575|  7.57k|    curlx_fclose(out);
  ------------------
  |  |   79|  7.57k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1576|  7.57k|    out = NULL;
 1577|  7.57k|    if(tempstore && curlx_rename(tempstore, filename)) {
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (1577:8): [True: 0, False: 7.57k]
  |  Branch (1577:21): [True: 0, False: 0]
  ------------------
 1578|      0|      result = CURLE_WRITE_ERROR;
 1579|      0|      goto error;
 1580|      0|    }
 1581|  7.57k|  }
 1582|       |
 1583|       |  /*
 1584|       |   * If we reach here we have successfully written a cookie file so there is
 1585|       |   * no need to inspect the error, any error case should have jumped into the
 1586|       |   * error block below.
 1587|       |   */
 1588|  7.57k|  curlx_free(tempstore);
  ------------------
  |  | 1478|  7.57k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1589|  7.57k|  return CURLE_OK;
 1590|       |
 1591|      0|error:
 1592|      0|  if(out && !use_stdout)
  ------------------
  |  Branch (1592:6): [True: 0, False: 0]
  |  Branch (1592:13): [True: 0, False: 0]
  ------------------
 1593|      0|    curlx_fclose(out);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1594|      0|  if(tempstore) {
  ------------------
  |  Branch (1594:6): [True: 0, False: 0]
  ------------------
 1595|      0|    unlink(tempstore);
 1596|      0|    curlx_free(tempstore);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1597|      0|  }
 1598|      0|  return result;
 1599|  7.57k|}

Curl_creds_create:
   41|  8.98k|{
   42|  8.98k|  struct Curl_creds *creds = NULL;
   43|  8.98k|  size_t ulen = user ? strlen(user) : 0;
  ------------------
  |  Branch (43:17): [True: 1.92k, False: 7.05k]
  ------------------
   44|  8.98k|  size_t plen = passwd ? strlen(passwd) : 0;
  ------------------
  |  Branch (44:17): [True: 674, False: 8.30k]
  ------------------
   45|  8.98k|  size_t olen = oauth_bearer ? strlen(oauth_bearer) : 0;
  ------------------
  |  Branch (45:17): [True: 116, False: 8.86k]
  ------------------
   46|  8.98k|  size_t salen = sasl_authzid ? strlen(sasl_authzid) : 0;
  ------------------
  |  Branch (46:18): [True: 112, False: 8.86k]
  ------------------
   47|  8.98k|  size_t sslen = sasl_service ? strlen(sasl_service) : 0;
  ------------------
  |  Branch (47:18): [True: 114, False: 8.86k]
  ------------------
   48|  8.98k|  char *s, *buf;
   49|  8.98k|  size_t bufsize;
   50|  8.98k|  CURLcode result = CURLE_OK;
   51|       |
   52|  8.98k|  Curl_creds_unlink(pcreds);
   53|       |
   54|       |  /* Everything empty/NULL, this is the NULL credential */
   55|  8.98k|  if(!user && !passwd && !olen && !salen && !sslen)
  ------------------
  |  Branch (55:6): [True: 7.05k, False: 1.92k]
  |  Branch (55:15): [True: 6.98k, False: 72]
  |  Branch (55:26): [True: 6.97k, False: 12]
  |  Branch (55:35): [True: 6.96k, False: 9]
  |  Branch (55:45): [True: 6.95k, False: 7]
  ------------------
   56|  6.95k|    goto out;
   57|       |
   58|  2.02k|  if((ulen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  2.02k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (58:6): [True: 0, False: 2.02k]
  ------------------
   59|  2.02k|     (plen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  2.02k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (59:6): [True: 0, False: 2.02k]
  ------------------
   60|  2.02k|     (olen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  2.02k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (60:6): [True: 0, False: 2.02k]
  ------------------
   61|  2.02k|     (salen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  2.02k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (61:6): [True: 0, False: 2.02k]
  ------------------
   62|  2.02k|     (sslen > CURL_MAX_INPUT_LENGTH)) {
  ------------------
  |  |   45|  2.02k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (62:6): [True: 0, False: 2.02k]
  ------------------
   63|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
   64|      0|    goto out;
   65|      0|  }
   66|       |
   67|       |  /* null-terminator for user already part of struct */
   68|  2.02k|  bufsize = ulen + plen + 1 + olen + 1 + salen + 1 + sslen + 1;
   69|  2.02k|  creds = curlx_calloc(1, sizeof(*creds) + bufsize);
  ------------------
  |  | 1475|  2.02k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   70|  2.02k|  if(!creds) {
  ------------------
  |  Branch (70:6): [True: 0, False: 2.02k]
  ------------------
   71|      0|    result = CURLE_OUT_OF_MEMORY;
   72|      0|    goto out;
   73|      0|  }
   74|       |
   75|  2.02k|  creds->bufsize = bufsize;
   76|  2.02k|  creds->refcount = 1;
   77|  2.02k|  creds->source = source;
   78|       |  /* Some compilers try to be too smart about our dynamic struct size */
   79|  2.02k|  buf = ((char *)creds) + offsetof(struct Curl_creds, buf);
   80|  2.02k|  creds->user = s = buf;
   81|  2.02k|  if(ulen)
  ------------------
  |  Branch (81:6): [True: 1.67k, False: 349]
  ------------------
   82|  1.67k|    memcpy(s, user, ulen + 1);
   83|  2.02k|  creds->passwd = s = buf + ulen + 1;
   84|  2.02k|  if(plen)
  ------------------
  |  Branch (84:6): [True: 540, False: 1.48k]
  ------------------
   85|    540|    memcpy(s, passwd, plen + 1);
   86|  2.02k|  creds->oauth_bearer = s = buf + ulen + 1 + plen + 1;
   87|  2.02k|  if(olen)
  ------------------
  |  Branch (87:6): [True: 25, False: 1.99k]
  ------------------
   88|     25|    memcpy(s, oauth_bearer, olen + 1);
   89|  2.02k|  creds->sasl_authzid = s = buf + ulen + 1 + plen + 1 + olen + 1;
   90|  2.02k|  if(salen)
  ------------------
  |  Branch (90:6): [True: 19, False: 2.00k]
  ------------------
   91|     19|    memcpy(s, sasl_authzid, salen + 1);
   92|  2.02k|  creds->sasl_service = s = buf + ulen + 1 + plen + 1 + olen + 1 + salen + 1;
   93|  2.02k|  if(sslen)
  ------------------
  |  Branch (93:6): [True: 17, False: 2.00k]
  ------------------
   94|     17|    memcpy(s, sasl_service, sslen + 1);
   95|       |
   96|  8.98k|out:
   97|  8.98k|  if(!result)
  ------------------
  |  Branch (97:6): [True: 8.98k, False: 0]
  ------------------
   98|  8.98k|    *pcreds = creds;
   99|      0|  else
  100|      0|    Curl_creds_unlink(&creds);
  101|  8.98k|  return result;
  102|  2.02k|}
Curl_creds_merge:
  109|  7.31k|{
  110|  7.31k|  struct Curl_creds *creds_out = NULL;
  111|  7.31k|  CURLcode result;
  112|       |
  113|  7.31k|  if(!creds_in) {
  ------------------
  |  Branch (113:6): [True: 7.21k, False: 100]
  ------------------
  114|  7.21k|    result = Curl_creds_create(user, passwd, NULL, NULL, NULL,
  115|  7.21k|                               source, &creds_out);
  116|  7.21k|  }
  117|    100|  else {
  118|    100|    result = Curl_creds_create(user ? user : Curl_creds_user(creds_in),
  ------------------
  |  |   81|     95|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 95, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (118:32): [True: 5, False: 95]
  ------------------
  119|    100|                               passwd ? passwd : Curl_creds_passwd(creds_in),
  ------------------
  |  |   82|     96|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 96, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (119:32): [True: 4, False: 96]
  ------------------
  120|    100|                               Curl_creds_oauth_bearer(creds_in),
  ------------------
  |  |   83|    100|#define Curl_creds_oauth_bearer(c)       ((c) ? (c)->oauth_bearer : "")
  |  |  ------------------
  |  |  |  Branch (83:43): [True: 100, False: 0]
  |  |  ------------------
  ------------------
  121|    100|                               Curl_creds_sasl_authzid(creds_in),
  ------------------
  |  |   84|    100|#define Curl_creds_sasl_authzid(c)       ((c) ? (c)->sasl_authzid : "")
  |  |  ------------------
  |  |  |  Branch (84:43): [True: 100, False: 0]
  |  |  ------------------
  ------------------
  122|    100|                               Curl_creds_sasl_service(creds_in),
  ------------------
  |  |   85|    100|#define Curl_creds_sasl_service(c)       ((c) ? (c)->sasl_service : "")
  |  |  ------------------
  |  |  |  Branch (85:43): [True: 100, False: 0]
  |  |  ------------------
  ------------------
  123|    100|                               source, &creds_out);
  124|    100|  }
  125|  7.31k|  Curl_creds_link(pcreds_out, creds_out);
  126|  7.31k|  Curl_creds_unlink(&creds_out);
  127|  7.31k|  return result;
  128|  7.31k|}
Curl_creds_link:
  131|  7.91k|{
  132|  7.91k|  if(*pdest != src) {
  ------------------
  |  Branch (132:6): [True: 827, False: 7.08k]
  ------------------
  133|    827|    Curl_creds_unlink(pdest);
  134|    827|    *pdest = src;
  135|    827|    if(src) {
  ------------------
  |  Branch (135:8): [True: 827, False: 0]
  ------------------
  136|    827|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1079|    827|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (136:7): [True: 0, False: 827]
  |  Branch (136:7): [True: 827, False: 0]
  ------------------
  137|    827|      src->refcount++;
  138|    827|    }
  139|    827|  }
  140|  7.91k|}
Curl_creds_unlink:
  143|   139k|{
  144|   139k|  if(*pcreds) {
  ------------------
  |  Branch (144:6): [True: 2.84k, False: 136k]
  ------------------
  145|  2.84k|    struct Curl_creds *creds = *pcreds;
  146|       |
  147|  2.84k|    DEBUGASSERT(creds->refcount);
  ------------------
  |  | 1079|  2.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (147:5): [True: 0, False: 2.84k]
  |  Branch (147:5): [True: 2.84k, False: 0]
  ------------------
  148|  2.84k|    *pcreds = NULL;
  149|  2.84k|    if(creds->refcount)
  ------------------
  |  Branch (149:8): [True: 2.84k, False: 0]
  ------------------
  150|  2.84k|      creds->refcount--;
  151|  2.84k|    if(!creds->refcount) {
  ------------------
  |  Branch (151:8): [True: 2.02k, False: 827]
  ------------------
  152|  2.02k|      curlx_memzero(creds, sizeof(*creds) + creds->bufsize);
  153|  2.02k|      curlx_free(creds);
  ------------------
  |  | 1478|  2.02k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  154|  2.02k|    }
  155|  2.84k|  }
  156|   139k|}
Curl_creds_same:
  159|  7.37k|{
  160|  7.37k|  return (c1 == c2) ||
  ------------------
  |  Branch (160:10): [True: 6.95k, False: 423]
  ------------------
  161|    423|         (c1 && c2 &&
  ------------------
  |  Branch (161:11): [True: 6, False: 417]
  |  Branch (161:17): [True: 6, False: 0]
  ------------------
  162|      6|          !Curl_timestrcmp(c1->user, c2->user) &&
  ------------------
  |  Branch (162:11): [True: 6, False: 0]
  ------------------
  163|      6|          !Curl_timestrcmp(c1->passwd, c2->passwd) &&
  ------------------
  |  Branch (163:11): [True: 6, False: 0]
  ------------------
  164|      6|          !Curl_timestrcmp(c1->oauth_bearer, c2->oauth_bearer) &&
  ------------------
  |  Branch (164:11): [True: 6, False: 0]
  ------------------
  165|      6|          !Curl_timestrcmp(c1->sasl_authzid, c2->sasl_authzid) &&
  ------------------
  |  Branch (165:11): [True: 6, False: 0]
  ------------------
  166|      6|          !Curl_timestrcmp(c1->sasl_service, c2->sasl_service));
  ------------------
  |  Branch (166:11): [True: 6, False: 0]
  ------------------
  167|  7.37k|}
Curl_creds_equal:
  170|  7.37k|{
  171|  7.37k|  return Curl_creds_same(c1, c2) &&
  ------------------
  |  Branch (171:10): [True: 6.95k, False: 417]
  ------------------
  172|  6.95k|         ((c1 == c2) || (c1 && c2 && (c1->source == c2->source)));
  ------------------
  |  Branch (172:11): [True: 6.95k, False: 6]
  |  Branch (172:26): [True: 6, False: 0]
  |  Branch (172:32): [True: 6, False: 0]
  |  Branch (172:38): [True: 6, False: 0]
  ------------------
  173|  7.37k|}
Curl_creds_trace:
  178|  7.37k|{
  179|  7.37k|  if(creds) {
  ------------------
  |  Branch (179:6): [True: 6, False: 7.36k]
  ------------------
  180|      6|    CURL_TRC_M(data, "%s: user=%s, passwd=%s, "
  ------------------
  |  |  148|      6|  do {                                   \
  |  |  149|      6|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      6|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      6|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     12|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     12|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      6|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      6|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      6|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6]
  |  |  ------------------
  ------------------
  181|      6|               "sasl_authzid=%s, oauth_bearer=%s, source=%d",
  182|      6|               msg,
  183|      6|               Curl_creds_user(creds),
  184|      6|               Curl_creds_has_passwd(creds) ? "***" : "",
  185|      6|               Curl_creds_sasl_authzid(creds),
  186|      6|               Curl_creds_has_oauth_bearer(creds) ? "***" : "",
  187|      6|               creds->source);
  188|      6|  }
  189|  7.36k|  else
  190|  7.36k|    CURL_TRC_M(data, "%s: -", msg);
  ------------------
  |  |  148|  7.36k|  do {                                   \
  |  |  149|  7.36k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  7.36k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  7.36k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  14.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 7.36k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.36k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  14.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  7.36k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  7.36k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  7.36k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7.36k]
  |  |  ------------------
  ------------------
  191|  7.37k|}

Curl_cshutdn_terminate:
  124|  6.25k|{
  125|  6.25k|  struct Curl_easy *admin = data;
  126|  6.25k|  bool done;
  127|       |
  128|       |  /* there must be a connection to close */
  129|  6.25k|  DEBUGASSERT(conn);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (129:3): [True: 0, False: 6.25k]
  |  Branch (129:3): [True: 6.25k, False: 0]
  ------------------
  130|       |  /* it must be removed from the connection pool */
  131|  6.25k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (131:3): [True: 0, False: 6.25k]
  |  Branch (131:3): [True: 6.25k, False: 0]
  ------------------
  132|       |  /* the transfer must be detached from the connection */
  133|  6.25k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (133:3): [True: 0, False: 6.25k]
  |  Branch (133:3): [True: 0, False: 0]
  |  Branch (133:3): [True: 6.25k, False: 0]
  |  Branch (133:3): [True: 6.25k, False: 0]
  ------------------
  134|       |
  135|       |  /* If we can obtain an internal admin handle, use that to attach
  136|       |   * and terminate the connection. Some protocol will try to mess with
  137|       |   * `data` during shutdown and we do not want that with a `data` from
  138|       |   * the application. */
  139|  6.25k|  if(data->multi && data->multi->admin)
  ------------------
  |  Branch (139:6): [True: 6.25k, False: 0]
  |  Branch (139:21): [True: 6.25k, False: 0]
  ------------------
  140|  6.25k|    admin = data->multi->admin;
  141|       |
  142|  6.25k|  Curl_attach_connection(admin, conn);
  143|       |
  144|  6.25k|  cshutdn_run_conn_handler(admin, conn);
  145|  6.25k|  if(do_shutdown) {
  ------------------
  |  Branch (145:6): [True: 0, False: 6.25k]
  ------------------
  146|       |    /* Make a last attempt to shutdown handlers and filters, if
  147|       |     * not done so already. */
  148|      0|    cshutdn_run_once(admin, conn, &done);
  149|      0|  }
  150|  6.25k|  CURL_TRC_M(admin, "[SHUTDOWN] %sclosing connection #%" FMT_OFF_T,
  ------------------
  |  |  148|  6.25k|  do {                                   \
  |  |  149|  6.25k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.25k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.25k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  12.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.25k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  12.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.25k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.25k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  151|  6.25k|             conn->bits.shutdown_filters ? "" : "force ",
  152|  6.25k|             conn->connection_id);
  153|  6.25k|  Curl_conn_cf_discard_all(admin, conn, SECONDARYSOCKET);
  ------------------
  |  |  234|  6.25k|#define SECONDARYSOCKET 1
  ------------------
  154|  6.25k|  Curl_conn_cf_discard_all(admin, conn, FIRSTSOCKET);
  ------------------
  |  |  233|  6.25k|#define FIRSTSOCKET     0
  ------------------
  155|  6.25k|  Curl_detach_connection(admin);
  156|       |
  157|  6.25k|  if(data->multi)
  ------------------
  |  Branch (157:6): [True: 6.25k, False: 0]
  ------------------
  158|  6.25k|    Curl_multi_ev_conn_done(data->multi, data, conn);
  159|  6.25k|  Curl_conn_free(admin, conn);
  160|       |
  161|  6.25k|  if(data->multi) {
  ------------------
  |  Branch (161:6): [True: 6.25k, False: 0]
  ------------------
  162|  6.25k|    CURL_TRC_M(data, "[SHUTDOWN] trigger multi connchanged");
  ------------------
  |  |  148|  6.25k|  do {                                   \
  |  |  149|  6.25k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.25k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.25k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  12.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.25k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  12.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.25k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.25k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  163|  6.25k|    Curl_multi_connchanged(data->multi);
  164|  6.25k|  }
  165|  6.25k|}
Curl_cshutdn_init:
  321|  11.7k|{
  322|  11.7k|  DEBUGASSERT(multi);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (322:3): [True: 0, False: 11.7k]
  |  Branch (322:3): [True: 11.7k, False: 0]
  ------------------
  323|  11.7k|  cshutdn->multi = multi;
  324|  11.7k|  Curl_llist_init(&cshutdn->list, NULL);
  325|       |  cshutdn->initialized = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  326|  11.7k|  return 0; /* good */
  327|  11.7k|}
Curl_cshutdn_destroy:
  331|  11.7k|{
  332|  11.7k|  if(cshutdn->initialized && data) {
  ------------------
  |  Branch (332:6): [True: 11.7k, False: 0]
  |  Branch (332:30): [True: 11.7k, False: 0]
  ------------------
  333|  11.7k|    int timeout_ms = 0;
  334|       |    /* for testing, run graceful shutdown */
  335|  11.7k|#ifdef DEBUGBUILD
  336|  11.7k|    {
  337|  11.7k|      const char *p = getenv("CURL_GRACEFUL_SHUTDOWN");
  338|  11.7k|      if(p) {
  ------------------
  |  Branch (338:10): [True: 0, False: 11.7k]
  ------------------
  339|      0|        curl_off_t l;
  340|      0|        if(!curlx_str_number(&p, &l, INT_MAX))
  ------------------
  |  Branch (340:12): [True: 0, False: 0]
  ------------------
  341|      0|          timeout_ms = (int)l;
  342|      0|      }
  343|  11.7k|    }
  344|  11.7k|#endif
  345|       |
  346|  11.7k|    CURL_TRC_M(data, "[SHUTDOWN] destroy, %zu connections, timeout=%dms",
  ------------------
  |  |  148|  11.7k|  do {                                   \
  |  |  149|  11.7k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  11.7k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  23.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 11.7k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 11.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  23.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  11.7k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.7k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  347|  11.7k|               Curl_llist_count(&cshutdn->list), timeout_ms);
  348|  11.7k|    cshutdn_terminate_all(cshutdn, data, timeout_ms);
  349|  11.7k|  }
  350|       |  cshutdn->multi = NULL;
  351|  11.7k|}
Curl_cshutdn_perform:
  429|  13.1k|{
  430|  13.1k|  cshutdn_perform(cshutdn, data, sigpipe_ctx);
  431|  13.1k|}
Curl_cshutdn_setfds:
  438|  1.76k|{
  439|  1.76k|  if(Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (439:6): [True: 0, False: 1.76k]
  ------------------
  440|      0|    struct Curl_llist_node *e;
  441|      0|    struct easy_pollset ps;
  442|       |
  443|      0|    Curl_pollset_init(&ps);
  444|      0|    for(e = Curl_llist_head(&cshutdn->list); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (444:46): [True: 0, False: 0]
  ------------------
  445|      0|      unsigned int i;
  446|      0|      struct connectdata *conn = Curl_node_elem(e);
  447|      0|      CURLcode result;
  448|       |
  449|      0|      Curl_pollset_reset(&ps);
  450|      0|      Curl_attach_connection(data, conn);
  451|      0|      result = Curl_conn_adjust_pollset(data, conn, &ps);
  452|      0|      Curl_detach_connection(data);
  453|       |
  454|      0|      if(result)
  ------------------
  |  Branch (454:10): [True: 0, False: 0]
  ------------------
  455|      0|        continue;
  456|       |
  457|      0|      for(i = 0; i < ps.n; i++) {
  ------------------
  |  Branch (457:18): [True: 0, False: 0]
  ------------------
  458|      0|        curl_socket_t sock = ps.sockets[i];
  459|      0|        if(!FDSET_SOCK(sock))
  ------------------
  |  |   99|      0|#define FDSET_SOCK(s) ((s) < FD_SETSIZE)
  ------------------
  |  Branch (459:12): [True: 0, False: 0]
  ------------------
  460|      0|          continue;
  461|      0|        if(ps.actions[i] & CURL_POLL_IN)
  ------------------
  |  |  283|      0|#define CURL_POLL_IN     1
  ------------------
  |  Branch (461:12): [True: 0, False: 0]
  ------------------
  462|      0|          FD_SET(sock, read_fd_set);
  463|      0|        if(ps.actions[i] & CURL_POLL_OUT)
  ------------------
  |  |  284|      0|#define CURL_POLL_OUT    2
  ------------------
  |  Branch (463:12): [True: 0, False: 0]
  ------------------
  464|      0|          FD_SET(sock, write_fd_set);
  465|      0|        if((ps.actions[i] & (CURL_POLL_OUT | CURL_POLL_IN)) &&
  ------------------
  |  |  284|      0|#define CURL_POLL_OUT    2
  ------------------
                      if((ps.actions[i] & (CURL_POLL_OUT | CURL_POLL_IN)) &&
  ------------------
  |  |  283|      0|#define CURL_POLL_IN     1
  ------------------
  |  Branch (465:12): [True: 0, False: 0]
  ------------------
  466|      0|           ((int)sock > *maxfd))
  ------------------
  |  Branch (466:12): [True: 0, False: 0]
  ------------------
  467|      0|          *maxfd = (int)sock;
  468|      0|      }
  469|      0|    }
  470|      0|    Curl_pollset_cleanup(&ps);
  471|      0|  }
  472|  1.76k|}
cshutdn.c:cshutdn_run_conn_handler:
   43|  6.25k|{
   44|  6.25k|  if(!conn->bits.shutdown_handler) {
  ------------------
  |  Branch (44:6): [True: 6.25k, False: 0]
  ------------------
   45|       |
   46|  6.25k|    if(conn->scheme && conn->scheme->run->disconnect) {
  ------------------
  |  Branch (46:8): [True: 6.25k, False: 0]
  |  Branch (46:24): [True: 0, False: 6.25k]
  ------------------
   47|       |      /* Some disconnect handlers do a blocking wait on server responses.
   48|       |       * FTP/IMAP/SMTP and SFTP are among them. When using the internal
   49|       |       * handle, set an overall short timeout so we do not hang for the
   50|       |       * default 120 seconds. */
   51|      0|      if(data->state.internal) {
  ------------------
  |  Branch (51:10): [True: 0, False: 0]
  ------------------
   52|      0|        data->set.timeout = DEFAULT_SHUTDOWN_TIMEOUT_MS;
  ------------------
  |  |   42|      0|#define DEFAULT_SHUTDOWN_TIMEOUT_MS   (2 * 1000)
  ------------------
   53|      0|        Curl_pgrsTime(data, TIMER_STARTOP);
   54|      0|      }
   55|       |
   56|       |      /* This is set if protocol-specific cleanups should be made */
   57|      0|      DEBUGF(infof(data, "connection #%" FMT_OFF_T
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
   58|      0|                   ", shutdown protocol handler (aborted=%d)",
   59|      0|                   conn->connection_id, conn->bits.aborted));
   60|       |      /* There are protocol handlers that block on retrieving
   61|       |       * server responses here (FTP). Set a short timeout. */
   62|      0|      conn->scheme->run->disconnect(data, conn, (bool)conn->bits.aborted);
   63|      0|    }
   64|       |
   65|       |    conn->bits.shutdown_handler = TRUE;
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
   66|  6.25k|  }
   67|  6.25k|}
cshutdn.c:cshutdn_terminate_all:
  269|  11.7k|{
  270|  11.7k|  struct curltime started = *Curl_pgrs_now(data);
  271|  11.7k|  struct Curl_llist_node *e;
  272|  11.7k|  struct Curl_sigpipe_ctx sigpipe_ctx;
  273|       |
  274|  11.7k|  DEBUGASSERT(cshutdn);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (274:3): [True: 0, False: 11.7k]
  |  Branch (274:3): [True: 11.7k, False: 0]
  ------------------
  275|  11.7k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:3): [True: 0, False: 11.7k]
  |  Branch (275:3): [True: 11.7k, False: 0]
  ------------------
  276|       |
  277|  11.7k|  CURL_TRC_M(data, "[SHUTDOWN] shutdown all");
  ------------------
  |  |  148|  11.7k|  do {                                   \
  |  |  149|  11.7k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  11.7k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  23.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 11.7k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 11.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  23.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  11.7k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.7k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  278|  11.7k|  sigpipe_init(&sigpipe_ctx);
  279|       |
  280|  11.7k|  while(Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (280:9): [True: 0, False: 11.7k]
  ------------------
  281|      0|    timediff_t spent_ms;
  282|      0|    int remain_ms;
  283|       |
  284|      0|    cshutdn_perform(cshutdn, data, &sigpipe_ctx);
  285|       |
  286|      0|    if(!Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (286:8): [True: 0, False: 0]
  ------------------
  287|      0|      CURL_TRC_M(data, "[SHUTDOWN] shutdown finished cleanly");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  288|      0|      break;
  289|      0|    }
  290|       |
  291|       |    /* wait for activity, timeout or "nothing" */
  292|      0|    spent_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &started);
  293|      0|    if(spent_ms >= (timediff_t)timeout_ms) {
  ------------------
  |  Branch (293:8): [True: 0, False: 0]
  ------------------
  294|      0|      CURL_TRC_M(data, "[SHUTDOWN] shutdown finished, %s",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  295|      0|                 (timeout_ms > 0) ? "timeout" : "best effort done");
  296|      0|      break;
  297|      0|    }
  298|       |
  299|      0|    remain_ms = timeout_ms - (int)spent_ms;
  300|      0|    if(cshutdn_wait(cshutdn, data, remain_ms)) {
  ------------------
  |  Branch (300:8): [True: 0, False: 0]
  ------------------
  301|      0|      CURL_TRC_M(data, "[SHUTDOWN] shutdown finished, aborted");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  302|      0|      break;
  303|      0|    }
  304|      0|  }
  305|       |
  306|       |  /* Terminate any remaining. */
  307|  11.7k|  e = Curl_llist_head(&cshutdn->list);
  308|  11.7k|  while(e) {
  ------------------
  |  Branch (308:9): [True: 0, False: 11.7k]
  ------------------
  309|      0|    struct connectdata *conn = Curl_node_elem(e);
  310|      0|    Curl_node_remove(e);
  311|      0|    Curl_cshutdn_terminate(data, conn, FALSE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  312|      0|    e = Curl_llist_head(&cshutdn->list);
  313|      0|  }
  314|  11.7k|  DEBUGASSERT(!Curl_llist_count(&cshutdn->list));
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (314:3): [True: 0, False: 11.7k]
  |  Branch (314:3): [True: 11.7k, False: 0]
  ------------------
  315|       |
  316|  11.7k|  sigpipe_restore(&sigpipe_ctx);
  317|  11.7k|}
cshutdn.c:cshutdn_perform:
  231|  13.1k|{
  232|  13.1k|  struct Curl_llist_node *e = Curl_llist_head(&cshutdn->list);
  233|  13.1k|  struct Curl_llist_node *enext;
  234|  13.1k|  struct connectdata *conn;
  235|  13.1k|  timediff_t next_expire_ms = 0, ms;
  236|  13.1k|  bool done;
  237|       |
  238|  13.1k|  if(!e)
  ------------------
  |  Branch (238:6): [True: 13.1k, False: 0]
  ------------------
  239|  13.1k|    return;
  240|       |
  241|      0|  CURL_TRC_M(data, "[SHUTDOWN] perform on %zu connections",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  242|      0|             Curl_llist_count(&cshutdn->list));
  243|      0|  sigpipe_apply(data, sigpipe_ctx);
  244|      0|  while(e) {
  ------------------
  |  Branch (244:9): [True: 0, False: 0]
  ------------------
  245|      0|    enext = Curl_node_next(e);
  246|      0|    conn = Curl_node_elem(e);
  247|      0|    Curl_cshutdn_run_once(data, conn, &done);
  248|      0|    if(done) {
  ------------------
  |  Branch (248:8): [True: 0, False: 0]
  ------------------
  249|      0|      Curl_node_remove(e);
  250|      0|      Curl_cshutdn_terminate(data, conn, FALSE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  251|      0|    }
  252|      0|    else {
  253|       |      /* idata has one timer list, but maybe more than one connection.
  254|       |       * Set EXPIRE_SHUTDOWN to the smallest time left for all. */
  255|      0|      ms = Curl_conn_shutdown_timeleft(data, conn);
  256|      0|      if(ms && (!next_expire_ms || (ms < next_expire_ms)))
  ------------------
  |  Branch (256:10): [True: 0, False: 0]
  |  Branch (256:17): [True: 0, False: 0]
  |  Branch (256:36): [True: 0, False: 0]
  ------------------
  257|      0|        next_expire_ms = ms;
  258|      0|    }
  259|      0|    e = enext;
  260|      0|  }
  261|       |
  262|      0|  if(next_expire_ms)
  ------------------
  |  Branch (262:6): [True: 0, False: 0]
  ------------------
  263|      0|    Curl_expire_ex(data, next_expire_ms, EXPIRE_SHUTDOWN);
  264|      0|}

Curl_freeaddrinfo:
   72|  5.89k|{
   73|  5.89k|  struct Curl_addrinfo *vqualifier canext;
   74|  5.89k|  struct Curl_addrinfo *ca;
   75|       |
   76|  11.8k|  for(ca = cahead; ca; ca = canext) {
  ------------------
  |  Branch (76:20): [True: 5.91k, False: 5.89k]
  ------------------
   77|  5.91k|    canext = ca->ai_next;
   78|  5.91k|    curlx_free(ca);
  ------------------
  |  | 1478|  5.91k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  5.91k|  }
   80|  5.89k|}
Curl_getaddrinfo_ex:
  100|    811|{
  101|    811|  const struct addrinfo *ai;
  102|    811|  struct addrinfo *aihead;
  103|    811|  struct Curl_addrinfo *cafirst = NULL;
  104|    811|  struct Curl_addrinfo *calast = NULL;
  105|    811|  struct Curl_addrinfo *ca;
  106|    811|  size_t ss_size;
  107|    811|  int error;
  108|       |
  109|    811|  *result = NULL; /* assume failure */
  110|       |
  111|    811|  error = CURL_GETADDRINFO(nodename, servname, hints, &aihead);
  ------------------
  |  | 1427|    811|  curl_dbg_getaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
  ------------------
  112|    811|  if(error)
  ------------------
  |  Branch (112:6): [True: 794, False: 17]
  ------------------
  113|    794|    return error;
  114|       |
  115|       |  /* traverse the addrinfo list */
  116|       |
  117|     34|  for(ai = aihead; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (117:20): [True: 17, False: 17]
  ------------------
  118|     17|    size_t namelen = ai->ai_canonname ? strlen(ai->ai_canonname) + 1 : 0;
  ------------------
  |  Branch (118:22): [True: 0, False: 17]
  ------------------
  119|       |    /* ignore elements with unsupported address family,
  120|       |       settle family-specific sockaddr structure size. */
  121|     17|    if(ai->ai_family == AF_INET)
  ------------------
  |  Branch (121:8): [True: 13, False: 4]
  ------------------
  122|     13|      ss_size = sizeof(struct sockaddr_in);
  123|      4|#ifdef USE_IPV6
  124|      4|    else if(ai->ai_family == AF_INET6)
  ------------------
  |  Branch (124:13): [True: 4, False: 0]
  ------------------
  125|      4|      ss_size = sizeof(struct sockaddr_in6);
  126|      0|#endif
  127|      0|    else
  128|      0|      continue;
  129|       |
  130|       |    /* ignore elements without required address info */
  131|     17|    if(!ai->ai_addr || !(ai->ai_addrlen > 0))
  ------------------
  |  Branch (131:8): [True: 0, False: 17]
  |  Branch (131:24): [True: 0, False: 17]
  ------------------
  132|      0|      continue;
  133|       |
  134|       |    /* ignore elements with bogus address size */
  135|     17|    if((size_t)ai->ai_addrlen < ss_size)
  ------------------
  |  Branch (135:8): [True: 0, False: 17]
  ------------------
  136|      0|      continue;
  137|       |
  138|     17|    ca = curlx_malloc(sizeof(struct Curl_addrinfo) + ss_size + namelen);
  ------------------
  |  | 1473|     17|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  139|     17|    if(!ca) {
  ------------------
  |  Branch (139:8): [True: 0, False: 17]
  ------------------
  140|      0|      error = EAI_MEMORY;
  141|      0|      break;
  142|      0|    }
  143|       |
  144|       |    /* copy each structure member individually, member ordering,
  145|       |       size, or padding might be different for each platform. */
  146|       |
  147|     17|    ca->ai_flags     = ai->ai_flags;
  148|     17|    ca->ai_family    = ai->ai_family;
  149|     17|    ca->ai_socktype  = ai->ai_socktype;
  150|     17|    ca->ai_protocol  = ai->ai_protocol;
  151|     17|    ca->ai_addrlen   = (curl_socklen_t)ss_size;
  152|     17|    ca->ai_addr      = NULL;
  153|     17|    ca->ai_canonname = NULL;
  154|     17|    ca->ai_next      = NULL;
  155|       |
  156|     17|    ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  157|     17|    memcpy(ca->ai_addr, ai->ai_addr, ss_size);
  158|       |
  159|     17|    if(namelen) {
  ------------------
  |  Branch (159:8): [True: 0, False: 17]
  ------------------
  160|      0|      ca->ai_canonname = (void *)((char *)ca->ai_addr + ss_size);
  161|      0|      memcpy(ca->ai_canonname, ai->ai_canonname, namelen);
  162|      0|    }
  163|       |
  164|       |    /* if the return list is empty, this becomes the first element */
  165|     17|    if(!cafirst)
  ------------------
  |  Branch (165:8): [True: 17, False: 0]
  ------------------
  166|     17|      cafirst = ca;
  167|       |
  168|       |    /* add this element last in the return list */
  169|     17|    if(calast)
  ------------------
  |  Branch (169:8): [True: 0, False: 17]
  ------------------
  170|      0|      calast->ai_next = ca;
  171|     17|    calast = ca;
  172|     17|  }
  173|       |
  174|       |  /* destroy the addrinfo list */
  175|     17|  if(aihead)
  ------------------
  |  Branch (175:6): [True: 17, False: 0]
  ------------------
  176|     17|    CURL_FREEADDRINFO(aihead);
  ------------------
  |  | 1429|     17|  curl_dbg_freeaddrinfo(data, __LINE__, __FILE__)
  ------------------
  177|       |
  178|       |  /* if we failed, also destroy the Curl_addrinfo list */
  179|     17|  if(error) {
  ------------------
  |  Branch (179:6): [True: 0, False: 17]
  ------------------
  180|      0|    Curl_freeaddrinfo(cafirst);
  181|      0|    cafirst = NULL;
  182|      0|  }
  183|     17|  else if(!cafirst) {
  ------------------
  |  Branch (183:11): [True: 0, False: 17]
  ------------------
  184|      0|#ifdef EAI_NONAME
  185|       |    /* rfc3493 conformant */
  186|      0|    error = EAI_NONAME;
  187|       |#else
  188|       |    /* rfc3493 obsoleted */
  189|       |    error = EAI_NODATA;
  190|       |#endif
  191|       |#ifdef USE_WINSOCK
  192|       |    SET_SOCKERRNO(error);
  193|       |#endif
  194|      0|  }
  195|       |
  196|     17|  *result = cafirst;
  197|       |
  198|       |  /* This is not a CURLcode */
  199|     17|  return error;
  200|    811|}
Curl_str2addr:
  410|  5.48k|{
  411|  5.48k|  struct in_addr in;
  412|  5.48k|  if(curlx_inet_pton(AF_INET, dotted, &in) > 0)
  ------------------
  |  Branch (412:6): [True: 5.44k, False: 46]
  ------------------
  413|       |    /* This is a dotted IP address 123.123.123.123-style */
  414|  5.44k|    return ip2addr(addrp, AF_INET, &in, dotted, port);
  415|     46|#ifdef USE_IPV6
  416|     46|  {
  417|     46|    struct in6_addr in6;
  418|     46|    if(curlx_inet_pton(AF_INET6, dotted, &in6) > 0)
  ------------------
  |  Branch (418:8): [True: 46, False: 0]
  ------------------
  419|       |      /* This is a dotted IPv6 address ::1-style */
  420|     46|      return ip2addr(addrp, AF_INET6, &in6, dotted, port);
  421|     46|  }
  422|      0|#endif
  423|      0|  return CURLE_BAD_FUNCTION_ARGUMENT; /* bad input format */
  424|     46|}
Curl_is_ipv4addr:
  427|  14.8k|{
  428|  14.8k|  struct in_addr in;
  429|       |  return (curlx_inet_pton(AF_INET, address, &in) > 0);
  430|  14.8k|}
Curl_is_ipaddr:
  433|  8.41k|{
  434|  8.41k|  if(Curl_is_ipv4addr(address))
  ------------------
  |  Branch (434:6): [True: 5.44k, False: 2.97k]
  ------------------
  435|  5.44k|    return TRUE;
  ------------------
  |  | 1053|  5.44k|#define TRUE true
  ------------------
  436|  2.97k|#ifdef USE_IPV6
  437|  2.97k|  {
  438|  2.97k|    struct in6_addr in6;
  439|  2.97k|    if(curlx_inet_pton(AF_INET6, address, &in6) > 0)
  ------------------
  |  Branch (439:8): [True: 46, False: 2.93k]
  ------------------
  440|       |      /* This is a dotted IPv6 address ::1-style */
  441|     46|      return TRUE;
  ------------------
  |  | 1053|     46|#define TRUE true
  ------------------
  442|  2.97k|  }
  443|  2.93k|#endif
  444|  2.93k|  return FALSE;
  ------------------
  |  | 1056|  2.93k|#define FALSE false
  ------------------
  445|  2.97k|}
Curl_looks_like_ipv6:
  449|    214|{
  450|    214|  const char *zonep = NULL;
  451|    214|  size_t i = 0, hlen = 0, zlen = 0;
  452|       |
  453|    214|  if(host)
  ------------------
  |  Branch (453:6): [True: 214, False: 0]
  ------------------
  454|    214|    memset(host, 0, sizeof(*host));
  455|    214|  if(zone)
  ------------------
  |  Branch (455:6): [True: 214, False: 0]
  ------------------
  456|    214|    memset(zone, 0, sizeof(*zone));
  457|       |
  458|  1.44k|  for(i = 0; i < len; ++i, ++hlen) {
  ------------------
  |  Branch (458:14): [True: 1.23k, False: 214]
  ------------------
  459|  1.23k|    if(!s[i] || !(ISXDIGIT(s[i]) || (s[i] == ':') || (s[i] == '.')))
  ------------------
  |  |   37|  2.47k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  2.47k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 1.23k, False: 3]
  |  |  |  |  |  Branch (42:38): [True: 301, False: 931]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  2.16k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 316, False: 618]
  |  |  |  |  |  Branch (27:43): [True: 316, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|    618|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 58, False: 560]
  |  |  |  |  |  Branch (28:43): [True: 58, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (459:8): [True: 0, False: 1.23k]
  |  Branch (459:37): [True: 557, False: 3]
  |  Branch (459:54): [True: 3, False: 0]
  ------------------
  460|      0|      break;
  461|  1.23k|  }
  462|       |
  463|    214|  if((i < len) && (s[i] == '%')) { /* address followed by a zone? */
  ------------------
  |  Branch (463:6): [True: 0, False: 214]
  |  Branch (463:19): [True: 0, False: 0]
  ------------------
  464|      0|    i += 1;
  465|      0|    if(maybe_url_encoded && !strncmp("25", s + i, 2))
  ------------------
  |  Branch (465:8): [True: 0, False: 0]
  |  Branch (465:29): [True: 0, False: 0]
  ------------------
  466|      0|      i += 2;
  467|      0|    zonep = s + i;
  468|      0|    for(; i < len; ++i, ++zlen) {
  ------------------
  |  Branch (468:11): [True: 0, False: 0]
  ------------------
  469|       |      /* Allow unreserved characters as defined in RFC 3986 */
  470|      0|      if(!s[i] || !(ISALPHA(s[i]) || ISXDIGIT(s[i]) || (s[i] == '-') ||
  ------------------
  |  |   36|      0|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|      0|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (40:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if(!s[i] || !(ISALPHA(s[i]) || ISXDIGIT(s[i]) || (s[i] == '-') ||
  ------------------
  |  |   37|      0|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (42:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|      0|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 0, False: 0]
  |  |  |  |  |  Branch (27:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|      0|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 0, False: 0]
  |  |  |  |  |  Branch (28:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (470:10): [True: 0, False: 0]
  |  Branch (470:56): [True: 0, False: 0]
  ------------------
  471|      0|                    (s[i] == '.') || (s[i] == '_') || (s[i] == '~')))
  ------------------
  |  Branch (471:21): [True: 0, False: 0]
  |  Branch (471:38): [True: 0, False: 0]
  |  Branch (471:55): [True: 0, False: 0]
  ------------------
  472|      0|        break;
  473|      0|    }
  474|      0|  }
  475|       |
  476|    214|  if(i != len)
  ------------------
  |  Branch (476:6): [True: 0, False: 214]
  ------------------
  477|      0|    return FALSE; /* invalid chars in zone */
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  478|    214|  if(host && hlen) {
  ------------------
  |  Branch (478:6): [True: 214, False: 0]
  |  Branch (478:14): [True: 214, False: 0]
  ------------------
  479|    214|    host->str = s;
  480|    214|    host->len = hlen;
  481|    214|  }
  482|    214|  if(zone && zlen) {
  ------------------
  |  Branch (482:6): [True: 214, False: 0]
  |  Branch (482:14): [True: 0, False: 214]
  ------------------
  483|      0|    zone->str = zonep;
  484|      0|    zone->len = zlen;
  485|      0|  }
  486|       |  return TRUE;
  ------------------
  |  | 1053|    214|#define TRUE true
  ------------------
  487|    214|}
Curl_unix2addr:
  497|     35|{
  498|     35|  struct Curl_addrinfo *ai;
  499|     35|  struct sockaddr_un *sa_un;
  500|     35|  size_t path_len;
  501|       |
  502|     35|  *paddr = NULL;
  503|       |
  504|       |  /* sun_path must be able to store the null-terminated path */
  505|     35|  path_len = strlen(path) + 1;
  506|     35|  if(path_len > sizeof(sa_un->sun_path))
  ------------------
  |  Branch (506:6): [True: 7, False: 28]
  ------------------
  507|      7|    return CURLE_TOO_LARGE;
  508|       |
  509|     28|  ai = curlx_calloc(1,
  ------------------
  |  | 1475|     28|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  510|     28|                    sizeof(struct Curl_addrinfo) + sizeof(struct sockaddr_un));
  511|     28|  if(!ai)
  ------------------
  |  Branch (511:6): [True: 0, False: 28]
  ------------------
  512|      0|    return CURLE_OUT_OF_MEMORY;
  513|       |
  514|     28|  ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  515|     28|  sa_un = (void *)ai->ai_addr;
  516|     28|  sa_un->sun_family = AF_UNIX;
  517|       |
  518|     28|  ai->ai_family = AF_UNIX;
  519|     28|  ai->ai_socktype = SOCK_STREAM; /* assume reliable transport for HTTP */
  520|     28|  ai->ai_addrlen = (curl_socklen_t)
  521|     28|    ((offsetof(struct sockaddr_un, sun_path) + path_len) & 0x7FFFFFFF);
  522|       |
  523|       |  /* Abstract Unix domain socket have NULL prefix instead of suffix */
  524|     28|  if(abstract)
  ------------------
  |  Branch (524:6): [True: 7, False: 21]
  ------------------
  525|      7|    memcpy(sa_un->sun_path + 1, path, path_len - 1);
  526|     21|  else
  527|     21|    memcpy(sa_un->sun_path, path, path_len); /* copy NUL byte */
  528|       |
  529|     28|  *paddr = ai;
  530|     28|  return CURLE_OK;
  531|     28|}
curl_dbg_freeaddrinfo:
  545|     17|{
  546|     17|  curl_dbg_log("ADDR %s:%d freeaddrinfo(%p)\n",
  547|     17|               source, line, (void *)freethis);
  548|       |#ifdef USE_LWIPSOCK
  549|       |  lwip_freeaddrinfo(freethis);
  550|       |#elif defined(USE_FAKE_GETADDRINFO)
  551|       |  {
  552|       |    const char *env = getenv("CURL_DNS_SERVER");
  553|       |    if(env)
  554|       |      r_freeaddrinfo(freethis);
  555|       |    else
  556|       |      /* !checksrc! disable BANNEDFUNC 1 */
  557|       |      freeaddrinfo(freethis);
  558|       |  }
  559|       |#else
  560|       |  /* !checksrc! disable BANNEDFUNC 1 */
  561|     17|  freeaddrinfo(freethis);
  562|     17|#endif
  563|     17|}
curl_dbg_getaddrinfo:
  579|    811|{
  580|       |#ifdef USE_LWIPSOCK
  581|       |  int res = lwip_getaddrinfo(hostname, service, hints, result);
  582|       |#elif defined(USE_FAKE_GETADDRINFO)
  583|       |  int res;
  584|       |  const char *env = getenv("CURL_DNS_SERVER");
  585|       |  if(env)
  586|       |    res = r_getaddrinfo(hostname, service, hints, result);
  587|       |  else
  588|       |    /* !checksrc! disable BANNEDFUNC 1 */
  589|       |    res = getaddrinfo(hostname, service, hints, result);
  590|       |#else
  591|       |  /* !checksrc! disable BANNEDFUNC 1 */
  592|    811|  int res = getaddrinfo(hostname, service, hints, result);
  593|    811|#endif
  594|    811|  if(res == 0)
  ------------------
  |  Branch (594:6): [True: 17, False: 794]
  ------------------
  595|       |    /* success */
  596|     17|    curl_dbg_log("ADDR %s:%d getaddrinfo() = %p\n", source, line,
  597|     17|                 (void *)*result);
  598|    794|  else
  599|    794|    curl_dbg_log("ADDR %s:%d getaddrinfo() failed\n", source, line);
  600|    811|  return res;
  601|    811|}
curl_addrinfo.c:ip2addr:
  344|  5.48k|{
  345|  5.48k|  struct Curl_addrinfo *ai;
  346|  5.48k|  size_t addrsize;
  347|  5.48k|  size_t namelen;
  348|  5.48k|  struct sockaddr_in *addr;
  349|  5.48k|#ifdef USE_IPV6
  350|  5.48k|  struct sockaddr_in6 *addr6;
  351|  5.48k|#endif
  352|       |
  353|  5.48k|  DEBUGASSERT(inaddr && hostname);
  ------------------
  |  | 1079|  5.48k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (353:3): [True: 0, False: 5.48k]
  |  Branch (353:3): [True: 0, False: 0]
  |  Branch (353:3): [True: 5.48k, False: 0]
  |  Branch (353:3): [True: 5.48k, False: 0]
  ------------------
  354|       |
  355|  5.48k|  namelen = strlen(hostname) + 1;
  356|  5.48k|  *addrp = NULL;
  357|       |
  358|  5.48k|  if(af == AF_INET)
  ------------------
  |  Branch (358:6): [True: 5.44k, False: 46]
  ------------------
  359|  5.44k|    addrsize = sizeof(struct sockaddr_in);
  360|     46|#ifdef USE_IPV6
  361|     46|  else if(af == AF_INET6)
  ------------------
  |  Branch (361:11): [True: 46, False: 0]
  ------------------
  362|     46|    addrsize = sizeof(struct sockaddr_in6);
  363|      0|#endif
  364|      0|  else
  365|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  366|       |
  367|       |  /* allocate memory to hold the struct, the address and the name */
  368|  5.48k|  ai = curlx_calloc(1, sizeof(struct Curl_addrinfo) + addrsize + namelen);
  ------------------
  |  | 1475|  5.48k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  369|  5.48k|  if(!ai)
  ------------------
  |  Branch (369:6): [True: 0, False: 5.48k]
  ------------------
  370|      0|    return CURLE_OUT_OF_MEMORY;
  371|       |  /* put the address after the struct */
  372|  5.48k|  ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  373|       |  /* then put the name after the address */
  374|  5.48k|  ai->ai_canonname = (char *)ai->ai_addr + addrsize;
  375|  5.48k|  memcpy(ai->ai_canonname, hostname, namelen);
  376|  5.48k|  ai->ai_family = af;
  377|  5.48k|  ai->ai_socktype = SOCK_STREAM;
  378|  5.48k|  ai->ai_addrlen = (curl_socklen_t)addrsize;
  379|       |  /* leave the rest of the struct filled with zero */
  380|       |
  381|  5.48k|  switch(af) {
  ------------------
  |  Branch (381:10): [True: 5.48k, False: 0]
  ------------------
  382|  5.44k|  case AF_INET:
  ------------------
  |  Branch (382:3): [True: 5.44k, False: 46]
  ------------------
  383|  5.44k|    addr = (void *)ai->ai_addr; /* storage area for this info */
  384|       |
  385|  5.44k|    memcpy(&addr->sin_addr, inaddr, sizeof(struct in_addr));
  386|  5.44k|    addr->sin_family = (CURL_SA_FAMILY_T)af;
  387|  5.44k|    addr->sin_port = htons((unsigned short)port);
  388|  5.44k|    break;
  389|       |
  390|      0|#ifdef USE_IPV6
  391|     46|  case AF_INET6:
  ------------------
  |  Branch (391:3): [True: 46, False: 5.44k]
  ------------------
  392|     46|    addr6 = (void *)ai->ai_addr; /* storage area for this info */
  393|       |
  394|     46|    memcpy(&addr6->sin6_addr, inaddr, sizeof(struct in6_addr));
  395|     46|    addr6->sin6_family = (CURL_SA_FAMILY_T)af;
  396|     46|    addr6->sin6_port = htons((unsigned short)port);
  397|     46|    break;
  398|  5.48k|#endif
  399|  5.48k|  }
  400|  5.48k|  *addrp = ai;
  401|  5.48k|  return CURLE_OK;
  402|  5.48k|}

Curl_fopen:
   86|  31.1k|{
   87|  31.1k|  CURLcode result = CURLE_WRITE_ERROR;
   88|  31.1k|  unsigned char randbuf[41];
   89|  31.1k|  char *tempstore = NULL;
   90|  31.1k|#ifndef _WIN32
   91|  31.1k|  curlx_struct_stat sb;
  ------------------
  |  |   63|  31.1k|#define curlx_struct_stat       struct stat
  ------------------
   92|  31.1k|#endif
   93|  31.1k|  int fd = -1;
   94|  31.1k|  char *dir = NULL;
   95|  31.1k|  *tempname = NULL;
   96|       |
   97|  31.1k|#ifndef _WIN32
   98|  31.1k|  *fh = curlx_fopen(filename, FOPEN_WRITETEXT);
  ------------------
  |  |   74|  31.1k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
   99|  31.1k|  if(!*fh)
  ------------------
  |  Branch (99:6): [True: 0, False: 31.1k]
  ------------------
  100|      0|    goto fail;
  101|  31.1k|  if(curlx_fstat(fileno(*fh), &sb) == -1 || !S_ISREG(sb.st_mode)) {
  ------------------
  |  |   62|  31.1k|#define curlx_fstat             fstat
  ------------------
  |  Branch (101:6): [True: 0, False: 31.1k]
  |  Branch (101:45): [True: 31.1k, False: 0]
  ------------------
  102|  31.1k|    return CURLE_OK;
  103|  31.1k|  }
  104|      0|  curlx_fclose(*fh);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  105|      0|#ifdef HAVE_GETEUID
  106|       |  /* If the existing file is not owned by the user, do not inherit
  107|       |   * its permissions at the temp file created below. The permissions
  108|       |   * might be unsuitable for holding user private data. */
  109|      0|  if(sb.st_uid != geteuid())
  ------------------
  |  Branch (109:6): [True: 0, False: 0]
  ------------------
  110|      0|    sb.st_mode = 0;
  111|      0|#endif
  112|      0|#endif /* !_WIN32 */
  113|      0|  *fh = NULL;
  114|       |
  115|      0|  result = Curl_rand_alnum(data, randbuf, sizeof(randbuf));
  116|      0|  if(result)
  ------------------
  |  Branch (116:6): [True: 0, False: 0]
  ------------------
  117|      0|    goto fail;
  118|       |
  119|      0|  dir = dirslash(filename);
  120|      0|  if(dir) {
  ------------------
  |  Branch (120:6): [True: 0, False: 0]
  ------------------
  121|       |    /* The temp filename should not end up too long for the target file
  122|       |       system */
  123|      0|    tempstore = curl_maprintf("%s%s.tmp", dir, randbuf);
  124|      0|    curlx_free(dir);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  125|      0|  }
  126|       |
  127|      0|  if(!tempstore) {
  ------------------
  |  Branch (127:6): [True: 0, False: 0]
  ------------------
  128|      0|    result = CURLE_OUT_OF_MEMORY;
  129|      0|    goto fail;
  130|      0|  }
  131|       |
  132|      0|  result = CURLE_WRITE_ERROR;
  133|       |#ifdef _WIN32
  134|       |  fd = curlx_open(tempstore, _O_WRONLY | _O_CREAT | _O_EXCL,
  135|       |                  _S_IREAD | _S_IWRITE);
  136|       |#elif (defined(ANDROID) || defined(__ANDROID__)) && \
  137|       |  (defined(__i386__) || defined(__arm__))
  138|       |  fd = curlx_open(tempstore, O_WRONLY | O_CREAT | O_EXCL,
  139|       |                  (mode_t)(S_IRUSR | S_IWUSR | sb.st_mode));
  140|       |#else
  141|      0|  fd = curlx_open(tempstore, O_WRONLY | O_CREAT | O_EXCL,
  ------------------
  |  |   68|      0|#define curlx_open              open
  ------------------
  142|      0|                  S_IRUSR | S_IWUSR | sb.st_mode);
  143|      0|#endif
  144|      0|  if(fd == -1)
  ------------------
  |  Branch (144:6): [True: 0, False: 0]
  ------------------
  145|      0|    goto fail;
  146|       |
  147|      0|  *fh = curlx_fdopen(fd, FOPEN_WRITETEXT);
  ------------------
  |  |   78|      0|  curl_dbg_fdopen(file, mode, __LINE__, __FILE__)
  ------------------
  148|      0|  if(!*fh)
  ------------------
  |  Branch (148:6): [True: 0, False: 0]
  ------------------
  149|      0|    goto fail;
  150|       |
  151|      0|  *tempname = tempstore;
  152|      0|  return CURLE_OK;
  153|       |
  154|      0|fail:
  155|      0|  if(fd != -1) {
  ------------------
  |  Branch (155:6): [True: 0, False: 0]
  ------------------
  156|      0|    curlx_close(fd);
  ------------------
  |  |   69|      0|#define curlx_close             close
  ------------------
  157|      0|    unlink(tempstore);
  158|      0|  }
  159|       |
  160|      0|  curlx_free(tempstore);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  161|      0|  return result;
  162|      0|}

Curl_get_line:
   36|  26.9k|{
   37|  26.9k|  CURLcode result;
   38|  26.9k|  char buffer[128];
   39|  26.9k|  curlx_dyn_reset(buf);
   40|  26.9k|  while(1) {
  ------------------
  |  Branch (40:9): [True: 26.9k, Folded]
  ------------------
   41|  26.9k|    size_t rlen;
   42|  26.9k|    const char *b = fgets(buffer, sizeof(buffer), input);
   43|  26.9k|    if(!b && ferror(input))
  ------------------
  |  Branch (43:8): [True: 26.9k, False: 0]
  |  Branch (43:14): [True: 0, False: 26.9k]
  ------------------
   44|      0|      return CURLE_READ_ERROR;
   45|       |
   46|  26.9k|    *eof = feof(input);
   47|       |
   48|  26.9k|    rlen = b ? strlen(b) : 0;
  ------------------
  |  Branch (48:12): [True: 0, False: 26.9k]
  ------------------
   49|  26.9k|    if(rlen) {
  ------------------
  |  Branch (49:8): [True: 0, False: 26.9k]
  ------------------
   50|      0|      result = curlx_dyn_addn(buf, b, rlen);
   51|      0|      if(result)
  ------------------
  |  Branch (51:10): [True: 0, False: 0]
  ------------------
   52|       |        /* too long line or out of memory */
   53|      0|        return result;
   54|      0|    }
   55|       |    /* now check the full line */
   56|  26.9k|    rlen = curlx_dyn_len(buf);
   57|  26.9k|    b = curlx_dyn_ptr(buf);
   58|  26.9k|    if(rlen && (b[rlen - 1] == '\n'))
  ------------------
  |  Branch (58:8): [True: 0, False: 26.9k]
  |  Branch (58:16): [True: 0, False: 0]
  ------------------
   59|       |      /* LF at end of the line */
   60|      0|      return CURLE_OK; /* all good */
   61|  26.9k|    if(*eof)
  ------------------
  |  Branch (61:8): [True: 26.9k, False: 0]
  ------------------
   62|       |      /* append a newline */
   63|  26.9k|      return curlx_dyn_addn(buf, "\n", 1);
   64|       |    /* otherwise get next line to append */
   65|  26.9k|  }
   66|       |  /* UNREACHABLE */
   67|  26.9k|}

Curl_share_lock:
  376|  51.6k|{
  377|  51.6k|  struct Curl_share *share = data->share;
  378|       |
  379|  51.6k|  if(!share)
  ------------------
  |  Branch (379:6): [True: 51.6k, False: 0]
  ------------------
  380|  51.6k|    return CURLSHE_INVALID;
  381|       |
  382|      0|  if(share->specifier & (unsigned int)(1 << type)) {
  ------------------
  |  Branch (382:6): [True: 0, False: 0]
  ------------------
  383|      0|    if(share->lockfunc) /* only call this if set! */
  ------------------
  |  Branch (383:8): [True: 0, False: 0]
  ------------------
  384|      0|      share->lockfunc(data, type, accesstype, share->clientdata);
  385|      0|  }
  386|       |  /* else if we do not share this, pretend successful lock */
  387|       |
  388|      0|  return CURLSHE_OK;
  389|  51.6k|}
Curl_share_unlock:
  392|  51.6k|{
  393|  51.6k|  struct Curl_share *share = data->share;
  394|       |
  395|  51.6k|  if(!share)
  ------------------
  |  Branch (395:6): [True: 51.6k, False: 0]
  ------------------
  396|  51.6k|    return CURLSHE_INVALID;
  397|       |
  398|      0|  if(share->specifier & (unsigned int)(1 << type)) {
  ------------------
  |  Branch (398:6): [True: 0, False: 0]
  ------------------
  399|      0|    if(share->unlockfunc) /* only call this if set! */
  ------------------
  |  Branch (399:8): [True: 0, False: 0]
  ------------------
  400|      0|      share->unlockfunc(data, type, share->clientdata);
  401|      0|  }
  402|       |
  403|      0|  return CURLSHE_OK;
  404|  51.6k|}
Curl_share_easy_unlink:
  407|  27.0k|{
  408|  27.0k|  struct Curl_share *share = data->share;
  409|       |
  410|  27.0k|  if(share) {
  ------------------
  |  Branch (410:6): [True: 0, False: 27.0k]
  ------------------
  411|      0|    bool locked = share_lock_acquire(share, data);
  412|       |
  413|       |    /* If data has a connection from this share, detach it. */
  414|      0|    if(data->conn && (share->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  ------------------
  |  Branch (414:8): [True: 0, False: 0]
  |  Branch (414:22): [True: 0, False: 0]
  ------------------
  415|      0|      Curl_detach_connection(data);
  416|       |
  417|      0|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
  418|      0|    if(share->cookies == data->cookies)
  ------------------
  |  Branch (418:8): [True: 0, False: 0]
  ------------------
  419|      0|      data->cookies = NULL;
  420|      0|#endif
  421|       |
  422|      0|#ifndef CURL_DISABLE_HSTS
  423|      0|    if(share->hsts == data->hsts)
  ------------------
  |  Branch (423:8): [True: 0, False: 0]
  ------------------
  424|      0|      data->hsts = NULL;
  425|      0|#endif
  426|       |#ifdef USE_LIBPSL
  427|       |    if(&share->psl == data->psl)
  428|       |      data->psl = data->multi ? &data->multi->psl : NULL;
  429|       |#endif
  430|       |
  431|      0|    share_unlink(&data->share, data, locked);
  432|      0|  }
  433|  27.0k|  return CURLE_OK;
  434|  27.0k|}

Curl_thread_create:
   52|    889|{
   53|    889|  curl_thread_t t = curlx_malloc(sizeof(pthread_t));
  ------------------
  |  |   33|    889|#  define curl_thread_t          pthread_t *
  ------------------
                curl_thread_t t = curlx_malloc(sizeof(pthread_t));
  ------------------
  |  | 1473|    889|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   54|    889|  struct Curl_actual_call *ac = NULL;
   55|    889|  int rc;
   56|       |
   57|    889|  if(t)
  ------------------
  |  Branch (57:6): [True: 889, False: 0]
  ------------------
   58|    889|    ac = curlx_malloc(sizeof(struct Curl_actual_call));
  ------------------
  |  | 1473|    889|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   59|    889|  if(!(ac && t))
  ------------------
  |  Branch (59:8): [True: 889, False: 0]
  |  Branch (59:14): [True: 889, False: 0]
  ------------------
   60|      0|    goto err;
   61|       |
   62|    889|  ac->func = func;
   63|    889|  ac->arg = arg;
   64|       |
   65|    889|  rc = pthread_create(t, NULL, curl_thread_create_thunk, ac);
   66|    889|  if(rc) {
  ------------------
  |  Branch (66:6): [True: 0, False: 889]
  ------------------
   67|      0|    errno = rc;
   68|      0|    goto err;
   69|      0|  }
   70|       |
   71|    889|  return t;
   72|       |
   73|      0|err:
   74|      0|  curlx_free(t);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|      0|  curlx_free(ac);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   76|      0|  return curl_thread_t_null;
  ------------------
  |  |   35|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
   77|    889|}
Curl_thread_join:
   89|    889|{
   90|    889|  int ret = (pthread_join(**hnd, NULL) == 0);
   91|       |
   92|    889|  curlx_free(*hnd);
  ------------------
  |  | 1478|    889|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   93|    889|  *hnd = curl_thread_t_null;
  ------------------
  |  |   35|    889|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
   94|       |
   95|    889|  return ret;
   96|    889|}
Curl_cond_signal:
  142|  20.5k|{
  143|       |  /* return code defined as always 0 */
  144|  20.5k|  (void)pthread_cond_signal(c);
  145|  20.5k|}
Curl_cond_wait:
  148|    761|{
  149|       |  /* return code defined as always 0 */
  150|    761|  (void)pthread_cond_wait(c, m);
  151|    761|}
Curl_cond_timedwait:
  155|    612|{
  156|    612|  struct curltime now;
  157|    612|  struct timespec ts;
  158|    612|  timediff_t usec;
  159|    612|  int rc;
  160|       |
  161|       |  /* POSIX expects an "absolute" time until the condition wait ends.
  162|       |   * We cannot use `curlx_now()` here that may run on some monotonic clock
  163|       |   * that will be most likely in the past, as far as POSIX abstime is
  164|       |   * concerned. */
  165|    612|#ifdef HAVE_GETTIMEOFDAY
  166|    612|  struct timeval tv;
  167|    612|  (void)gettimeofday(&tv, NULL);
  168|    612|  now.tv_sec = tv.tv_sec;
  169|    612|  now.tv_usec = (int)tv.tv_usec;
  170|       |#else
  171|       |  now.tv_sec = time(NULL);
  172|       |  now.tv_usec = 0;
  173|       |#endif
  174|       |
  175|    612|  ts.tv_sec = now.tv_sec + (timeout_ms / 1000);
  176|    612|  usec = now.tv_usec + ((timeout_ms % 1000) * 1000);
  177|    612|  if(usec >= 1000000) {
  ------------------
  |  Branch (177:6): [True: 0, False: 612]
  ------------------
  178|      0|    ++ts.tv_sec;
  179|      0|    usec %= 1000000;
  180|      0|  }
  181|    612|  ts.tv_nsec = (long)usec * 1000;
  182|       |
  183|    612|  rc = pthread_cond_timedwait(c, m, &ts);
  184|    612|  if(rc == SOCKETIMEDOUT)
  ------------------
  |  | 1133|    612|#define SOCKETIMEDOUT     ETIMEDOUT
  ------------------
  |  Branch (184:6): [True: 0, False: 612]
  ------------------
  185|      0|    return CURLE_OPERATION_TIMEDOUT;
  186|    612|  return rc ? CURLE_UNRECOVERABLE_POLL : CURLE_OK;
  ------------------
  |  Branch (186:10): [True: 0, False: 612]
  ------------------
  187|    612|}
Curl_thread_get_current_id:
  190|  2.58k|{
  191|  2.58k|  return pthread_self();
  192|  2.58k|}
curl_threads.c:curl_thread_create_thunk:
   38|    889|{
   39|    889|  struct Curl_actual_call *ac = arg;
   40|    889|  unsigned int (*func)(void *) = ac->func;
   41|    889|  void *real_arg = ac->arg;
   42|       |
   43|    889|  curlx_free(ac);
  ------------------
  |  | 1478|    889|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   44|       |
   45|    889|  (*func)(real_arg);
   46|       |
   47|    889|  return 0;
   48|    889|}

Curl_debug:
  129|  2.91k|{
  130|  2.91k|  if(data->set.verbose) {
  ------------------
  |  Branch (130:6): [True: 0, False: 2.91k]
  ------------------
  131|      0|    static const char s_infotype[CURLINFO_END][3] = {
  132|      0|      "* ", "< ", "> ", "{ ", "} ", "{ ", "} " };
  133|      0|    char buf[TRC_LINE_MAX];
  134|      0|    size_t len;
  135|      0|    if(data->set.fdebug) {
  ------------------
  |  Branch (135:8): [True: 0, False: 0]
  ------------------
  136|      0|      struct Curl_mapi_guard guard;
  137|      0|      if(CURL_TRC_IDS(data) && (size < TRC_LINE_MAX)) {
  ------------------
  |  |   90|      0|  (Curl_trc_is_verbose(data) && \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|      0|  Curl_trc_feat_ids.log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if(CURL_TRC_IDS(data) && (size < TRC_LINE_MAX)) {
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  |  Branch (137:32): [True: 0, False: 0]
  ------------------
  138|      0|        len = trc_print_ids(data, buf, TRC_LINE_MAX);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  139|      0|        len += curl_msnprintf(buf + len, TRC_LINE_MAX - len, "%.*s",
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  140|      0|                              (int)size, ptr);
  141|      0|        len = trc_end_buf(buf, len, TRC_LINE_MAX, FALSE);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
                      len = trc_end_buf(buf, len, TRC_LINE_MAX, FALSE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  142|      0|        CURL_CBAPI_START(&guard, data, easy_fdebug);
  ------------------
  |  |  195|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  143|      0|        (void)(*data->set.fdebug)(data, type, buf, len, data->set.debugdata);
  144|      0|        CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|      0|  Curl_cbapi_leave(g)
  ------------------
  145|      0|      }
  146|      0|      else {
  147|      0|        CURL_CBAPI_START(&guard, data, easy_fdebug);
  ------------------
  |  |  195|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  148|      0|        (void)(*data->set.fdebug)(data, type, CURL_UNCONST(ptr),
  ------------------
  |  |  864|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  149|      0|                                  size, data->set.debugdata);
  150|      0|        CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|      0|  Curl_cbapi_leave(g)
  ------------------
  151|      0|      }
  152|      0|    }
  153|      0|    else {
  154|      0|      switch(type) {
  155|      0|      case CURLINFO_TEXT:
  ------------------
  |  Branch (155:7): [True: 0, False: 0]
  ------------------
  156|      0|      case CURLINFO_HEADER_OUT:
  ------------------
  |  Branch (156:7): [True: 0, False: 0]
  ------------------
  157|      0|      case CURLINFO_HEADER_IN:
  ------------------
  |  Branch (157:7): [True: 0, False: 0]
  ------------------
  158|      0|#ifndef CURL_DISABLE_VERBOSE_STRINGS
  159|      0|        if(CURL_TRC_IDS(data)) {
  ------------------
  |  |   90|      0|  (Curl_trc_is_verbose(data) && \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|      0|  Curl_trc_feat_ids.log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  160|      0|          len = trc_print_ids(data, buf, TRC_LINE_MAX);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  161|      0|          fwrite(buf, len, 1, data->set.err);
  162|      0|        }
  163|      0|#endif
  164|      0|        fwrite(s_infotype[type], 2, 1, data->set.err);
  165|      0|        fwrite(ptr, size, 1, data->set.err);
  166|      0|        break;
  167|      0|      default: /* nada */
  ------------------
  |  Branch (167:7): [True: 0, False: 0]
  ------------------
  168|      0|        break;
  169|      0|      }
  170|      0|    }
  171|      0|  }
  172|  2.91k|}
Curl_failf:
  178|  14.9k|{
  179|  14.9k|  DEBUGASSERT(!strchr(fmt, '\n'));
  ------------------
  |  | 1079|  14.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 14.9k]
  |  Branch (179:3): [True: 14.9k, False: 0]
  ------------------
  180|  14.9k|  if(data->set.verbose || data->set.errorbuffer) {
  ------------------
  |  Branch (180:6): [True: 0, False: 14.9k]
  |  Branch (180:27): [True: 0, False: 14.9k]
  ------------------
  181|      0|    va_list ap;
  182|      0|    size_t len;
  183|      0|    char error[CURL_ERROR_SIZE + 2];
  184|      0|    va_start(ap, fmt);
  185|      0|    len = curl_mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
  ------------------
  |  |  875|      0|#define CURL_ERROR_SIZE 256
  ------------------
  186|       |
  187|      0|    if(data->set.errorbuffer && !data->state.errorbuf) {
  ------------------
  |  Branch (187:8): [True: 0, False: 0]
  |  Branch (187:33): [True: 0, False: 0]
  ------------------
  188|      0|      curlx_strcopy(data->set.errorbuffer, CURL_ERROR_SIZE, error, len);
  ------------------
  |  |  875|      0|#define CURL_ERROR_SIZE 256
  ------------------
  189|      0|      data->state.errorbuf = TRUE; /* wrote error string */
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  190|      0|    }
  191|      0|    error[len++] = '\n';
  192|      0|    error[len] = '\0';
  193|      0|    trc_write(data, CURLINFO_TEXT, error, len);
  194|       |    va_end(ap);
  195|      0|  }
  196|  14.9k|}
Curl_reset_fail:
  199|  11.1k|{
  200|  11.1k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (200:6): [True: 0, False: 11.1k]
  ------------------
  201|      0|    data->set.errorbuffer[0] = 0;
  202|       |  data->state.errorbuf = FALSE;
  ------------------
  |  | 1056|  11.1k|#define FALSE false
  ------------------
  203|  11.1k|}
Curl_trc_opt:
  674|      1|{
  675|      1|  CURLcode result = config ? trc_opt(config) : CURLE_OK;
  ------------------
  |  Branch (675:21): [True: 0, False: 1]
  ------------------
  676|      1|#ifdef DEBUGBUILD
  677|       |  /* CURL_DEBUG can override anything */
  678|      1|  if(!result) {
  ------------------
  |  Branch (678:6): [True: 1, False: 0]
  ------------------
  679|      1|    const char *dbg_config = getenv("CURL_DEBUG");
  680|      1|    if(dbg_config)
  ------------------
  |  Branch (680:8): [True: 0, False: 1]
  ------------------
  681|      0|      result = trc_opt(dbg_config);
  682|      1|  }
  683|      1|#endif /* DEBUGBUILD */
  684|      1|  return result;
  685|      1|}
Curl_trc_init:
  688|      1|{
  689|      1|#ifdef DEBUGBUILD
  690|      1|  return Curl_trc_opt(NULL);
  691|       |#else
  692|       |  return CURLE_OK;
  693|       |#endif
  694|      1|}

curlx_base64_encode:
  243|  1.32k|{
  244|  1.32k|  return base64_encode(curlx_base64encdec, '=',
  245|  1.32k|                       inputbuff, insize, outptr, outlen);
  246|  1.32k|}
base64.c:base64_encode:
  169|  1.32k|{
  170|  1.32k|  char *output;
  171|  1.32k|  char *base64data;
  172|  1.32k|  const unsigned char *in = (const unsigned char *)inputbuff;
  173|       |
  174|  1.32k|  *outptr = NULL;
  175|  1.32k|  *outlen = 0;
  176|       |
  177|  1.32k|  if(!insize)
  ------------------
  |  Branch (177:6): [True: 0, False: 1.32k]
  ------------------
  178|      0|    return CURLE_OK;
  179|       |
  180|       |  /* safety precaution */
  181|  1.32k|  DEBUGASSERT(insize <= CURL_MAX_BASE64_INPUT);
  ------------------
  |  | 1079|  1.32k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (181:3): [True: 0, False: 1.32k]
  |  Branch (181:3): [True: 1.32k, False: 0]
  ------------------
  182|  1.32k|  if(insize > CURL_MAX_BASE64_INPUT)
  ------------------
  |  |   38|  1.32k|#define CURL_MAX_BASE64_INPUT 16000000
  ------------------
  |  Branch (182:6): [True: 0, False: 1.32k]
  ------------------
  183|      0|    return CURLE_TOO_LARGE;
  184|       |
  185|  1.32k|  base64data = output = curlx_malloc(((insize + 2) / 3 * 4) + 1);
  ------------------
  |  | 1473|  1.32k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  186|  1.32k|  if(!output)
  ------------------
  |  Branch (186:6): [True: 0, False: 1.32k]
  ------------------
  187|      0|    return CURLE_OUT_OF_MEMORY;
  188|       |
  189|  52.1k|  while(insize >= 3) {
  ------------------
  |  Branch (189:9): [True: 50.8k, False: 1.32k]
  ------------------
  190|  50.8k|    *output++ = table64[in[0] >> 2];
  191|  50.8k|    *output++ = table64[((in[0] & 0x03) << 4) | (in[1] >> 4)];
  192|  50.8k|    *output++ = table64[((in[1] & 0x0F) << 2) | ((in[2] & 0xC0) >> 6)];
  193|  50.8k|    *output++ = table64[in[2] & 0x3F];
  194|  50.8k|    insize -= 3;
  195|  50.8k|    in += 3;
  196|  50.8k|  }
  197|  1.32k|  if(insize) {
  ------------------
  |  Branch (197:6): [True: 953, False: 376]
  ------------------
  198|       |    /* this is only one or two bytes now */
  199|    953|    *output++ = table64[in[0] >> 2];
  200|    953|    if(insize == 1) {
  ------------------
  |  Branch (200:8): [True: 307, False: 646]
  ------------------
  201|    307|      *output++ = table64[((in[0] & 0x03) << 4)];
  202|    307|      if(padbyte) {
  ------------------
  |  Branch (202:10): [True: 307, False: 0]
  ------------------
  203|    307|        *output++ = padbyte;
  204|    307|        *output++ = padbyte;
  205|    307|      }
  206|    307|    }
  207|    646|    else {
  208|       |      /* insize == 2 */
  209|    646|      *output++ = table64[((in[0] & 0x03) << 4) | ((in[1] & 0xF0) >> 4)];
  210|    646|      *output++ = table64[((in[1] & 0x0F) << 2)];
  211|    646|      if(padbyte)
  ------------------
  |  Branch (211:10): [True: 646, False: 0]
  ------------------
  212|    646|        *output++ = padbyte;
  213|    646|    }
  214|    953|  }
  215|       |
  216|       |  /* Null-terminate */
  217|  1.32k|  *output = '\0';
  218|       |
  219|       |  /* Return the pointer to the new data (allocated memory) */
  220|  1.32k|  *outptr = base64data;
  221|       |
  222|       |  /* Return the length of the new data */
  223|  1.32k|  *outlen = (size_t)(output - base64data);
  224|       |
  225|  1.32k|  return CURLE_OK;
  226|  1.32k|}

curlx_dyn_init:
   39|   179k|{
   40|   179k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|   179k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (40:3): [True: 0, False: 179k]
  |  Branch (40:3): [True: 179k, False: 0]
  ------------------
   41|   179k|  DEBUGASSERT(toobig);
  ------------------
  |  | 1079|   179k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (41:3): [True: 0, False: 179k]
  |  Branch (41:3): [True: 179k, False: 0]
  ------------------
   42|   179k|  DEBUGASSERT(toobig <= MAX_DYNBUF_SIZE); /* catch crazy mistakes */
  ------------------
  |  | 1079|   179k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (42:3): [True: 0, False: 179k]
  |  Branch (42:3): [True: 179k, False: 0]
  ------------------
   43|   179k|  s->bufr = NULL;
   44|   179k|  s->leng = 0;
   45|   179k|  s->allc = 0;
   46|   179k|  s->toobig = toobig;
   47|   179k|#ifdef DEBUGBUILD
   48|   179k|  s->init = DYNINIT;
  ------------------
  |  |   32|   179k|#define DYNINIT 0xbee51da /* random pattern */
  ------------------
   49|   179k|#endif
   50|   179k|}
curlx_dyn_free:
   57|   106k|{
   58|   106k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|   106k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 0, False: 106k]
  |  Branch (58:3): [True: 106k, False: 0]
  ------------------
   59|   106k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|   106k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (59:3): [True: 0, False: 106k]
  |  Branch (59:3): [True: 106k, False: 0]
  ------------------
   60|   106k|  curlx_safefree(s->bufr);
  ------------------
  |  | 1336|   106k|  do {                      \
  |  | 1337|   106k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|   106k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|   106k|    (ptr) = NULL;           \
  |  | 1339|   106k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 106k]
  |  |  ------------------
  ------------------
   61|   106k|  s->leng = s->allc = 0;
   62|   106k|}
curlx_dyn_reset:
  126|  40.9k|{
  127|  40.9k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|  40.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (127:3): [True: 0, False: 40.9k]
  |  Branch (127:3): [True: 40.9k, False: 0]
  ------------------
  128|  40.9k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|  40.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (128:3): [True: 0, False: 40.9k]
  |  Branch (128:3): [True: 40.9k, False: 0]
  ------------------
  129|  40.9k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|  40.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (129:3): [True: 40.9k, False: 0]
  |  Branch (129:3): [True: 0, False: 0]
  |  Branch (129:3): [True: 31.4k, False: 9.55k]
  |  Branch (129:3): [True: 9.55k, False: 0]
  ------------------
  130|  40.9k|  if(s->leng)
  ------------------
  |  Branch (130:6): [True: 9.55k, False: 31.4k]
  ------------------
  131|  9.55k|    s->bufr[0] = 0;
  132|  40.9k|  s->leng = 0;
  133|  40.9k|}
curlx_dyn_tail:
  140|      9|{
  141|      9|  DEBUGASSERT(s);
  ------------------
  |  | 1079|      9|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (141:3): [True: 0, False: 9]
  |  Branch (141:3): [True: 9, False: 0]
  ------------------
  142|      9|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|      9|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (142:3): [True: 0, False: 9]
  |  Branch (142:3): [True: 9, False: 0]
  ------------------
  143|      9|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|      9|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (143:3): [True: 9, False: 0]
  |  Branch (143:3): [True: 0, False: 0]
  |  Branch (143:3): [True: 0, False: 9]
  |  Branch (143:3): [True: 9, False: 0]
  ------------------
  144|      9|  if(trail > s->leng)
  ------------------
  |  Branch (144:6): [True: 0, False: 9]
  ------------------
  145|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  146|      9|  else if(trail == s->leng)
  ------------------
  |  Branch (146:11): [True: 0, False: 9]
  ------------------
  147|      0|    return CURLE_OK;
  148|      9|  else if(!trail) {
  ------------------
  |  Branch (148:11): [True: 9, False: 0]
  ------------------
  149|      9|    curlx_dyn_reset(s);
  150|      9|  }
  151|      0|  else {
  152|      0|    memmove(&s->bufr[0], &s->bufr[s->leng - trail], trail);
  153|      0|    s->leng = trail;
  154|      0|    s->bufr[s->leng] = 0;
  155|      0|  }
  156|      9|  return CURLE_OK;
  157|      9|}
curlx_dyn_addn:
  163|  37.8M|{
  164|  37.8M|  DEBUGASSERT(s);
  ------------------
  |  | 1079|  37.8M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (164:3): [True: 0, False: 37.8M]
  |  Branch (164:3): [True: 37.8M, False: 0]
  ------------------
  165|  37.8M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|  37.8M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (165:3): [True: 0, False: 37.8M]
  |  Branch (165:3): [True: 37.8M, False: 0]
  ------------------
  166|  37.8M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|  37.8M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 37.8M, False: 0]
  |  Branch (166:3): [True: 0, False: 0]
  |  Branch (166:3): [True: 96.2k, False: 37.7M]
  |  Branch (166:3): [True: 37.7M, False: 0]
  ------------------
  167|  37.8M|  return dyn_nappend(s, mem, len);
  168|  37.8M|}
curlx_dyn_add:
  174|  72.9k|{
  175|  72.9k|  size_t n;
  176|  72.9k|  DEBUGASSERT(str);
  ------------------
  |  | 1079|  72.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (176:3): [True: 0, False: 72.9k]
  |  Branch (176:3): [True: 72.9k, False: 0]
  ------------------
  177|  72.9k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|  72.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 72.9k]
  |  Branch (177:3): [True: 72.9k, False: 0]
  ------------------
  178|  72.9k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|  72.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 72.9k]
  |  Branch (178:3): [True: 72.9k, False: 0]
  ------------------
  179|  72.9k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|  72.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 72.9k, False: 0]
  |  Branch (179:3): [True: 0, False: 0]
  |  Branch (179:3): [True: 32.6k, False: 40.3k]
  |  Branch (179:3): [True: 40.3k, False: 0]
  ------------------
  180|  72.9k|  n = strlen(str);
  181|  72.9k|  return dyn_nappend(s, (const unsigned char *)str, n);
  182|  72.9k|}
curlx_dyn_vaddf:
  188|  79.3k|{
  189|  79.3k|#ifdef BUILDING_LIBCURL
  190|  79.3k|  int rc;
  191|  79.3k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|  79.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 79.3k]
  |  Branch (191:3): [True: 79.3k, False: 0]
  ------------------
  192|  79.3k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|  79.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 79.3k]
  |  Branch (192:3): [True: 79.3k, False: 0]
  ------------------
  193|  79.3k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|  79.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 79.3k, False: 0]
  |  Branch (193:3): [True: 0, False: 0]
  |  Branch (193:3): [True: 13.0k, False: 66.2k]
  |  Branch (193:3): [True: 66.2k, False: 0]
  ------------------
  194|  79.3k|  DEBUGASSERT(fmt);
  ------------------
  |  | 1079|  79.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 79.3k]
  |  Branch (194:3): [True: 79.3k, False: 0]
  ------------------
  195|  79.3k|  rc = curlx_dyn_vprintf(s, fmt, ap);
  196|       |
  197|  79.3k|  if(!rc)
  ------------------
  |  Branch (197:6): [True: 79.3k, False: 5]
  ------------------
  198|  79.3k|    return CURLE_OK;
  199|      5|  else if(rc == MERR_TOO_LARGE)
  ------------------
  |  |   29|      5|#define MERR_TOO_LARGE 2
  ------------------
  |  Branch (199:11): [True: 5, False: 0]
  ------------------
  200|      5|    return CURLE_TOO_LARGE;
  201|      0|  return CURLE_OUT_OF_MEMORY;
  202|       |#else
  203|       |  char *str;
  204|       |  str = curl_mvaprintf(fmt, ap); /* this allocs a new string to append */
  205|       |
  206|       |  if(str) {
  207|       |    CURLcode result = dyn_nappend(s, (const unsigned char *)str, strlen(str));
  208|       |    curl_free(str);
  209|       |    return result;
  210|       |  }
  211|       |  /* If we failed, we cleanup the whole buffer and return error */
  212|       |  curlx_dyn_free(s);
  213|       |  return CURLE_OUT_OF_MEMORY;
  214|       |#endif
  215|  79.3k|}
curlx_dyn_addf:
  221|  79.3k|{
  222|  79.3k|  CURLcode result;
  223|  79.3k|  va_list ap;
  224|  79.3k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|  79.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (224:3): [True: 0, False: 79.3k]
  |  Branch (224:3): [True: 79.3k, False: 0]
  ------------------
  225|  79.3k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|  79.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (225:3): [True: 0, False: 79.3k]
  |  Branch (225:3): [True: 79.3k, False: 0]
  ------------------
  226|  79.3k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|  79.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (226:3): [True: 79.3k, False: 0]
  |  Branch (226:3): [True: 0, False: 0]
  |  Branch (226:3): [True: 13.0k, False: 66.2k]
  |  Branch (226:3): [True: 66.2k, False: 0]
  ------------------
  227|  79.3k|  DEBUGASSERT(strcmp(fmt, "%s")); /* use curlx_dyn_add instead */
  ------------------
  |  | 1079|  79.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (227:3): [True: 0, False: 79.3k]
  |  Branch (227:3): [True: 79.3k, False: 0]
  ------------------
  228|  79.3k|  va_start(ap, fmt);
  229|  79.3k|  result = curlx_dyn_vaddf(s, fmt, ap);
  230|       |  va_end(ap);
  231|  79.3k|  return result;
  232|  79.3k|}
curlx_dyn_ptr:
  238|   200k|{
  239|   200k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|   200k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [True: 0, False: 200k]
  |  Branch (239:3): [True: 200k, False: 0]
  ------------------
  240|   200k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|   200k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (240:3): [True: 0, False: 200k]
  |  Branch (240:3): [True: 200k, False: 0]
  ------------------
  241|   200k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|   200k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 200k, False: 0]
  |  Branch (241:3): [True: 0, False: 0]
  |  Branch (241:3): [True: 27.9k, False: 172k]
  |  Branch (241:3): [True: 172k, False: 0]
  ------------------
  242|   200k|  return s->bufr;
  243|   200k|}
curlx_dyn_take:
  246|  3.47k|{
  247|  3.47k|  char *ptr = s->bufr;
  248|  3.47k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 3.47k]
  |  Branch (248:3): [True: 3.47k, False: 0]
  ------------------
  249|  3.47k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 3.47k]
  |  Branch (249:3): [True: 3.47k, False: 0]
  ------------------
  250|  3.47k|  *plen = s->leng;
  251|       |  s->bufr = NULL;
  252|  3.47k|  s->leng = 0;
  253|  3.47k|  s->allc = 0;
  254|  3.47k|  return ptr;
  255|  3.47k|}
curlx_dyn_uptr:
  261|  1.59k|{
  262|  1.59k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|  1.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (262:3): [True: 0, False: 1.59k]
  |  Branch (262:3): [True: 1.59k, False: 0]
  ------------------
  263|  1.59k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|  1.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (263:3): [True: 0, False: 1.59k]
  |  Branch (263:3): [True: 1.59k, False: 0]
  ------------------
  264|  1.59k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|  1.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (264:3): [True: 1.59k, False: 0]
  |  Branch (264:3): [True: 0, False: 0]
  |  Branch (264:3): [True: 0, False: 1.59k]
  |  Branch (264:3): [True: 1.59k, False: 0]
  ------------------
  265|  1.59k|  return (unsigned char *)s->bufr;
  266|  1.59k|}
curlx_dyn_len:
  272|   113k|{
  273|   113k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|   113k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 113k]
  |  Branch (273:3): [True: 113k, False: 0]
  ------------------
  274|   113k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|   113k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (274:3): [True: 0, False: 113k]
  |  Branch (274:3): [True: 113k, False: 0]
  ------------------
  275|   113k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|   113k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:3): [True: 113k, False: 0]
  |  Branch (275:3): [True: 0, False: 0]
  |  Branch (275:3): [True: 36.3k, False: 77.4k]
  |  Branch (275:3): [True: 77.4k, False: 0]
  ------------------
  276|   113k|  return s->leng;
  277|   113k|}
curlx_dyn_setlen:
  283|  7.67k|{
  284|  7.67k|  DEBUGASSERT(s);
  ------------------
  |  | 1079|  7.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (284:3): [True: 0, False: 7.67k]
  |  Branch (284:3): [True: 7.67k, False: 0]
  ------------------
  285|  7.67k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|  7.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (285:3): [True: 0, False: 7.67k]
  |  Branch (285:3): [True: 7.67k, False: 0]
  ------------------
  286|  7.67k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|  7.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (286:3): [True: 7.67k, False: 0]
  |  Branch (286:3): [True: 0, False: 0]
  |  Branch (286:3): [True: 0, False: 7.67k]
  |  Branch (286:3): [True: 7.67k, False: 0]
  ------------------
  287|  7.67k|  if(set > s->leng)
  ------------------
  |  Branch (287:6): [True: 0, False: 7.67k]
  ------------------
  288|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  289|  7.67k|  s->leng = set;
  290|  7.67k|  s->bufr[s->leng] = 0;
  291|  7.67k|  return CURLE_OK;
  292|  7.67k|}
dynbuf.c:dyn_nappend:
   69|  37.9M|{
   70|  37.9M|  size_t idx = s->leng;
   71|  37.9M|  size_t a = s->allc;
   72|  37.9M|  size_t fit = len + idx + 1; /* new string + old string + zero byte */
   73|       |
   74|       |  /* try to detect if there is rubbish in the struct */
   75|  37.9M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1079|  37.9M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (75:3): [True: 0, False: 37.9M]
  |  Branch (75:3): [True: 37.9M, False: 0]
  ------------------
   76|  37.9M|  DEBUGASSERT(s->toobig);
  ------------------
  |  | 1079|  37.9M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 37.9M]
  |  Branch (76:3): [True: 37.9M, False: 0]
  ------------------
   77|  37.9M|  DEBUGASSERT(idx < s->toobig);
  ------------------
  |  | 1079|  37.9M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 37.9M]
  |  Branch (77:3): [True: 37.9M, False: 0]
  ------------------
   78|  37.9M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1079|  37.9M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (78:3): [True: 37.9M, False: 0]
  |  Branch (78:3): [True: 0, False: 0]
  |  Branch (78:3): [True: 128k, False: 37.7M]
  |  Branch (78:3): [True: 37.7M, False: 0]
  ------------------
   79|  37.9M|  DEBUGASSERT(a <= s->toobig);
  ------------------
  |  | 1079|  37.9M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 37.9M]
  |  Branch (79:3): [True: 37.9M, False: 0]
  ------------------
   80|  37.9M|  DEBUGASSERT(!len || mem);
  ------------------
  |  | 1079|  37.9M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (80:3): [True: 37.9M, False: 0]
  |  Branch (80:3): [True: 0, False: 0]
  |  Branch (80:3): [True: 1.05k, False: 37.9M]
  |  Branch (80:3): [True: 37.9M, False: 0]
  ------------------
   81|       |
   82|  37.9M|  if(fit > s->toobig) {
  ------------------
  |  Branch (82:6): [True: 14, False: 37.9M]
  ------------------
   83|     14|    curlx_dyn_free(s);
   84|     14|    return CURLE_TOO_LARGE;
   85|     14|  }
   86|  37.9M|  else if(!a) {
  ------------------
  |  Branch (86:11): [True: 118k, False: 37.7M]
  ------------------
   87|   118k|    DEBUGASSERT(!idx);
  ------------------
  |  | 1079|   118k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (87:5): [True: 0, False: 118k]
  |  Branch (87:5): [True: 118k, False: 0]
  ------------------
   88|       |    /* first invoke */
   89|   118k|    if(MIN_FIRST_ALLOC > s->toobig)
  ------------------
  |  |   29|   118k|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (89:8): [True: 5.63k, False: 113k]
  ------------------
   90|  5.63k|      a = s->toobig;
   91|   113k|    else if(fit < MIN_FIRST_ALLOC)
  ------------------
  |  |   29|   113k|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (91:13): [True: 85.0k, False: 28.2k]
  ------------------
   92|  85.0k|      a = MIN_FIRST_ALLOC;
  ------------------
  |  |   29|  85.0k|#define MIN_FIRST_ALLOC 32
  ------------------
   93|  28.2k|    else
   94|  28.2k|      a = fit;
   95|   118k|  }
   96|  37.7M|  else {
   97|  37.8M|    while(a < fit)
  ------------------
  |  Branch (97:11): [True: 60.7k, False: 37.7M]
  ------------------
   98|  60.7k|      a *= 2;
   99|  37.7M|    if(a > s->toobig)
  ------------------
  |  Branch (99:8): [True: 323, False: 37.7M]
  ------------------
  100|       |      /* no point in allocating a larger buffer than this is allowed to use */
  101|    323|      a = s->toobig;
  102|  37.7M|  }
  103|       |
  104|  37.9M|  if(a != s->allc) {
  ------------------
  |  Branch (104:6): [True: 178k, False: 37.7M]
  ------------------
  105|   178k|    void *p = curlx_realloc(s->bufr, a);
  ------------------
  |  | 1477|   178k|  curl_dbg_realloc(ptr, size, __LINE__, __FILE__)
  ------------------
  106|   178k|    if(!p) {
  ------------------
  |  Branch (106:8): [True: 0, False: 178k]
  ------------------
  107|      0|      curlx_dyn_free(s);
  108|      0|      return CURLE_OUT_OF_MEMORY;
  109|      0|    }
  110|   178k|    s->bufr = p;
  111|   178k|    s->allc = a;
  112|   178k|  }
  113|       |
  114|  37.9M|  if(len)
  ------------------
  |  Branch (114:6): [True: 37.9M, False: 1.05k]
  ------------------
  115|  37.9M|    memcpy(&s->bufr[idx], mem, len);
  116|  37.9M|  s->leng = idx + len;
  117|  37.9M|  s->bufr[s->leng] = 0;
  118|  37.9M|  return CURLE_OK;
  119|  37.9M|}

curlx_inet_ntop:
  209|  6.13k|{
  210|  6.13k|  switch(af) {
  211|  5.59k|  case AF_INET:
  ------------------
  |  Branch (211:3): [True: 5.59k, False: 541]
  ------------------
  212|  5.59k|    return inet_ntop4((const unsigned char *)src, buf, size);
  213|    541|  case AF_INET6:
  ------------------
  |  Branch (213:3): [True: 541, False: 5.59k]
  ------------------
  214|    541|    return inet_ntop6((const unsigned char *)src, buf, size);
  215|      0|  default:
  ------------------
  |  Branch (215:3): [True: 0, False: 6.13k]
  ------------------
  216|      0|    errno = SOCKEAFNOSUPPORT;
  ------------------
  |  | 1122|      0|#define SOCKEAFNOSUPPORT  EAFNOSUPPORT
  ------------------
  217|       |    return NULL;
  218|  6.13k|  }
  219|  6.13k|}
inet_ntop.c:inet_ntop4:
   57|  5.60k|{
   58|  5.60k|  char tmp[sizeof("255.255.255.255")];
   59|  5.60k|  size_t len;
   60|       |
   61|  5.60k|  DEBUGASSERT(size >= 16);
  ------------------
  |  | 1079|  5.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (61:3): [True: 0, False: 5.60k]
  |  Branch (61:3): [True: 5.60k, False: 0]
  ------------------
   62|       |
   63|       |  /* this snprintf() does not overflow the buffer. */
   64|  5.60k|  SNPRINTF(tmp, sizeof(tmp), "%d.%d.%d.%d",
  ------------------
  |  |   43|  5.60k|#define SNPRINTF curl_msnprintf
  ------------------
   65|  5.60k|           ((int)((unsigned char)src[0])) & 0xff,
   66|  5.60k|           ((int)((unsigned char)src[1])) & 0xff,
   67|  5.60k|           ((int)((unsigned char)src[2])) & 0xff,
   68|  5.60k|           ((int)((unsigned char)src[3])) & 0xff);
   69|       |
   70|  5.60k|  len = strlen(tmp);
   71|  5.60k|  if(len == 0 || len >= size) {
  ------------------
  |  Branch (71:6): [True: 0, False: 5.60k]
  |  Branch (71:18): [True: 0, False: 5.60k]
  ------------------
   72|       |#ifdef USE_WINSOCK
   73|       |    errno = WSAEINVAL;
   74|       |#else
   75|      0|    errno = ENOSPC;
   76|      0|#endif
   77|      0|    return NULL;
   78|      0|  }
   79|  5.60k|  curlx_strcopy(dst, size, tmp, len);
   80|  5.60k|  return dst;
   81|  5.60k|}
inet_ntop.c:inet_ntop6:
   87|    541|{
   88|       |  /*
   89|       |   * Note that int32_t and int16_t need only be "at least" large enough
   90|       |   * to contain a value of the specified size. On some systems, like
   91|       |   * Crays, there is no such thing as an integer variable with 16 bits.
   92|       |   * Keep this in mind if you think this function should have been coded
   93|       |   * to use pointer overlays. All the world's not a VAX.
   94|       |   */
   95|    541|  char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
   96|    541|  char *tp;
   97|    541|  struct {
   98|    541|    int base;
   99|    541|    int len;
  100|    541|  } best, cur;
  101|    541|  unsigned int words[IN6ADDRSZ / INT16SZ];
  102|    541|  int i;
  103|       |
  104|       |  /* Preprocess:
  105|       |   *  Copy the input (bytewise) array into a wordwise array.
  106|       |   *  Find the longest run of 0x00's in src[] for :: shorthanding.
  107|       |   */
  108|    541|  memset(words, '\0', sizeof(words));
  109|  9.19k|  for(i = 0; i < IN6ADDRSZ; i++)
  ------------------
  |  |   35|  9.19k|#define IN6ADDRSZ       16
  ------------------
  |  Branch (109:14): [True: 8.65k, False: 541]
  ------------------
  110|  8.65k|    words[i / 2] |= ((unsigned int)src[i] << ((1 - (i % 2)) << 3));
  111|       |
  112|    541|  best.base = -1;
  113|    541|  cur.base = -1;
  114|    541|  best.len = 0;
  115|    541|  cur.len = 0;
  116|       |
  117|  4.86k|  for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
  ------------------
  |  |   35|  4.86k|#define IN6ADDRSZ       16
  ------------------
                for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
  ------------------
  |  |   37|  4.86k|#define INT16SZ          2
  ------------------
  |  Branch (117:14): [True: 4.32k, False: 541]
  ------------------
  118|  4.32k|    if(words[i] == 0) {
  ------------------
  |  Branch (118:8): [True: 3.65k, False: 673]
  ------------------
  119|  3.65k|      if(cur.base == -1) {
  ------------------
  |  Branch (119:10): [True: 589, False: 3.06k]
  ------------------
  120|    589|        cur.base = i;
  121|    589|        cur.len = 1;
  122|    589|      }
  123|  3.06k|      else
  124|  3.06k|        cur.len++;
  125|  3.65k|    }
  126|    673|    else if(cur.base != -1) {
  ------------------
  |  Branch (126:13): [True: 425, False: 248]
  ------------------
  127|    425|      if(best.base == -1 || cur.len > best.len)
  ------------------
  |  Branch (127:10): [True: 390, False: 35]
  |  Branch (127:29): [True: 9, False: 26]
  ------------------
  128|    399|        best = cur;
  129|    425|      cur.base = -1;
  130|    425|    }
  131|  4.32k|  }
  132|    541|  if((cur.base != -1) && (best.base == -1 || cur.len > best.len))
  ------------------
  |  Branch (132:6): [True: 164, False: 377]
  |  Branch (132:27): [True: 148, False: 16]
  |  Branch (132:46): [True: 7, False: 9]
  ------------------
  133|    155|    best = cur;
  134|    541|  if(best.base != -1 && best.len < 2)
  ------------------
  |  Branch (134:6): [True: 538, False: 3]
  |  Branch (134:25): [True: 7, False: 531]
  ------------------
  135|      7|    best.base = -1;
  136|       |  /* Format the result. */
  137|    541|  tp = tmp;
  138|  4.83k|  for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
  ------------------
  |  |   35|  4.83k|#define IN6ADDRSZ       16
  ------------------
                for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
  ------------------
  |  |   37|  4.83k|#define INT16SZ          2
  ------------------
  |  Branch (138:14): [True: 4.31k, False: 523]
  ------------------
  139|       |    /* Are we inside the best run of 0x00's? */
  140|  4.31k|    if(best.base != -1 && i >= best.base && i < (best.base + best.len)) {
  ------------------
  |  Branch (140:8): [True: 4.23k, False: 80]
  |  Branch (140:27): [True: 4.05k, False: 172]
  |  Branch (140:45): [True: 3.59k, False: 463]
  ------------------
  141|  3.59k|      if(i == best.base)
  ------------------
  |  Branch (141:10): [True: 531, False: 3.06k]
  ------------------
  142|    531|        *tp++ = ':';
  143|  3.59k|      continue;
  144|  3.59k|    }
  145|       |
  146|       |    /* Are we following an initial run of 0x00s or any real hex?
  147|       |     */
  148|    715|    if(i)
  ------------------
  |  Branch (148:8): [True: 592, False: 123]
  ------------------
  149|    592|      *tp++ = ':';
  150|       |
  151|       |    /* Is this address an encapsulated IPv4?
  152|       |     */
  153|    715|    if(i == 6 && best.base == 0 &&
  ------------------
  |  Branch (153:8): [True: 66, False: 649]
  |  Branch (153:18): [True: 37, False: 29]
  ------------------
  154|     37|       (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
  ------------------
  |  Branch (154:9): [True: 17, False: 20]
  |  Branch (154:27): [True: 12, False: 8]
  |  Branch (154:44): [True: 1, False: 11]
  ------------------
  155|     18|      if(!inet_ntop4(src + 12, tp, sizeof(tmp) - (tp - tmp))) {
  ------------------
  |  Branch (155:10): [True: 0, False: 18]
  ------------------
  156|      0|        return NULL;
  157|      0|      }
  158|     18|      tp += strlen(tp);
  159|     18|      break;
  160|     18|    }
  161|    697|    else {
  162|       |      /* Lower-case digits. Cannot use the set from mprintf.c since this
  163|       |         needs to work as a curlx function */
  164|    697|      static const unsigned char ldigits[] = "0123456789abcdef";
  165|       |
  166|    697|      unsigned int w = words[i];
  167|       |      /* output lowercase 16-bit hex number but ignore leading zeroes */
  168|    697|      if(w & 0xf000)
  ------------------
  |  Branch (168:10): [True: 92, False: 605]
  ------------------
  169|     92|        *tp++ = ldigits[(w & 0xf000) >> 12];
  170|    697|      if(w & 0xff00)
  ------------------
  |  Branch (170:10): [True: 144, False: 553]
  ------------------
  171|    144|        *tp++ = ldigits[(w & 0x0f00) >> 8];
  172|    697|      if(w & 0xfff0)
  ------------------
  |  Branch (172:10): [True: 224, False: 473]
  ------------------
  173|    224|        *tp++ = ldigits[(w & 0x00f0) >> 4];
  174|    697|      *tp++ = ldigits[(w & 0x000f)];
  175|    697|    }
  176|    715|  }
  177|       |
  178|       |  /* Was it a trailing run of 0x00's?
  179|       |   */
  180|    541|  if(best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
  ------------------
  |  |   35|    531|#define IN6ADDRSZ       16
  ------------------
                if(best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
  ------------------
  |  |   37|    531|#define INT16SZ          2
  ------------------
  |  Branch (180:6): [True: 531, False: 10]
  |  Branch (180:25): [True: 155, False: 376]
  ------------------
  181|    155|    *tp++ = ':';
  182|       |
  183|       |  /* Check for overflow, copy, and we are done. */
  184|    541|  if((size_t)(tp - tmp) >= size) {
  ------------------
  |  Branch (184:6): [True: 18, False: 523]
  ------------------
  185|       |#ifdef USE_WINSOCK
  186|       |    errno = WSAEINVAL;
  187|       |#else
  188|     18|    errno = ENOSPC;
  189|     18|#endif
  190|     18|    return NULL;
  191|     18|  }
  192|       |
  193|    523|  curlx_strcopy(dst, size, tmp, tp - tmp);
  194|    523|  return dst;
  195|    541|}

curlx_inet_pton:
  207|  34.1k|{
  208|  34.1k|  switch(af) {
  209|  26.9k|  case AF_INET:
  ------------------
  |  Branch (209:3): [True: 26.9k, False: 7.13k]
  ------------------
  210|  26.9k|    return inet_pton4(src, (unsigned char *)dst);
  211|  7.13k|  case AF_INET6:
  ------------------
  |  Branch (211:3): [True: 7.13k, False: 26.9k]
  ------------------
  212|  7.13k|    return inet_pton6(src, (unsigned char *)dst);
  213|      0|  default:
  ------------------
  |  Branch (213:3): [True: 0, False: 34.1k]
  ------------------
  214|      0|    errno = SOCKEAFNOSUPPORT;
  ------------------
  |  | 1122|      0|#define SOCKEAFNOSUPPORT  EAFNOSUPPORT
  ------------------
  215|      0|    return -1;
  216|  34.1k|  }
  217|       |  /* NOTREACHED */
  218|  34.1k|}
inet_pton.c:inet_pton4:
   63|  27.5k|{
   64|  27.5k|  int saw_digit, octets, ch;
   65|  27.5k|  unsigned char tmp[INADDRSZ], *tp;
   66|       |
   67|  27.5k|  saw_digit = 0;
   68|  27.5k|  octets = 0;
   69|  27.5k|  tp = tmp;
   70|  27.5k|  *tp = 0;
   71|   206k|  while((ch = (unsigned char)*src++) != '\0') {
  ------------------
  |  Branch (71:9): [True: 186k, False: 20.1k]
  ------------------
   72|   186k|    if(ISDIGIT(ch)) {
  ------------------
  |  |   42|   186k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 126k, False: 60.3k]
  |  |  |  Branch (42:38): [True: 120k, False: 5.48k]
  |  |  ------------------
  ------------------
   73|   120k|      unsigned int val = (*tp * 10) + (ch - '0');
   74|       |
   75|   120k|      if(saw_digit && *tp == 0)
  ------------------
  |  Branch (75:10): [True: 41.4k, False: 79.5k]
  |  Branch (75:23): [True: 70, False: 41.3k]
  ------------------
   76|     70|        return 0;
   77|   120k|      if(val > 255)
  ------------------
  |  Branch (77:10): [True: 519, False: 120k]
  ------------------
   78|    519|        return 0;
   79|   120k|      *tp = (unsigned char)val;
   80|   120k|      if(!saw_digit) {
  ------------------
  |  Branch (80:10): [True: 79.5k, False: 40.8k]
  ------------------
   81|  79.5k|        if(++octets > 4)
  ------------------
  |  Branch (81:12): [True: 0, False: 79.5k]
  ------------------
   82|      0|          return 0;
   83|  79.5k|        saw_digit = 1;
   84|  79.5k|      }
   85|   120k|    }
   86|  65.8k|    else if(ch == '.' && saw_digit) {
  ------------------
  |  Branch (86:13): [True: 59.7k, False: 6.04k]
  |  Branch (86:26): [True: 59.0k, False: 760]
  ------------------
   87|  59.0k|      if(octets == 4)
  ------------------
  |  Branch (87:10): [True: 30, False: 58.9k]
  ------------------
   88|     30|        return 0;
   89|  58.9k|      *++tp = 0;
   90|  58.9k|      saw_digit = 0;
   91|  58.9k|    }
   92|  6.80k|    else
   93|  6.80k|      return 0;
   94|   186k|  }
   95|  20.1k|  if(octets < 4)
  ------------------
  |  Branch (95:6): [True: 761, False: 19.4k]
  ------------------
   96|    761|    return 0;
   97|  19.4k|  memcpy(dst, tmp, INADDRSZ);
  ------------------
  |  |   36|  19.4k|#define INADDRSZ         4
  ------------------
   98|  19.4k|  return 1;
   99|  20.1k|}
inet_pton.c:inet_pton6:
  114|  7.13k|{
  115|  7.13k|  unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
  116|  7.13k|  const char *curtok;
  117|  7.13k|  int ch, saw_xdigit;
  118|  7.13k|  size_t val;
  119|       |
  120|  7.13k|  memset((tp = tmp), 0, IN6ADDRSZ);
  ------------------
  |  |   35|  7.13k|#define IN6ADDRSZ       16
  ------------------
  121|  7.13k|  endp = tp + IN6ADDRSZ;
  ------------------
  |  |   35|  7.13k|#define IN6ADDRSZ       16
  ------------------
  122|  7.13k|  colonp = NULL;
  123|       |  /* Leading :: requires some special handling. */
  124|  7.13k|  if(*src == ':')
  ------------------
  |  Branch (124:6): [True: 1.10k, False: 6.03k]
  ------------------
  125|  1.10k|    if(*++src != ':')
  ------------------
  |  Branch (125:8): [True: 64, False: 1.03k]
  ------------------
  126|     64|      return 0;
  127|  7.06k|  curtok = src;
  128|  7.06k|  saw_xdigit = 0;
  129|  7.06k|  val = 0;
  130|  15.1k|  while((ch = (unsigned char)*src++) != '\0') {
  ------------------
  |  Branch (130:9): [True: 12.4k, False: 2.70k]
  ------------------
  131|  12.4k|    if(ISXDIGIT(ch)) {
  ------------------
  |  |   37|  12.4k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  24.8k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 11.3k, False: 1.07k]
  |  |  |  |  |  Branch (42:38): [True: 2.68k, False: 8.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  22.1k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 3.28k, False: 6.46k]
  |  |  |  |  |  Branch (27:43): [True: 1.48k, False: 1.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  8.26k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 4.89k, False: 3.36k]
  |  |  |  |  |  Branch (28:43): [True: 1.70k, False: 3.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|  5.87k|      val <<= 4;
  133|  5.87k|      val |= curlx_hexval(ch);
  ------------------
  |  |  111|  5.87k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  134|  5.87k|      if(++saw_xdigit > 4)
  ------------------
  |  Branch (134:10): [True: 58, False: 5.81k]
  ------------------
  135|     58|        return 0;
  136|  5.81k|      continue;
  137|  5.87k|    }
  138|  6.56k|    if(ch == ':') {
  ------------------
  |  Branch (138:8): [True: 2.27k, False: 4.29k]
  ------------------
  139|  2.27k|      curtok = src;
  140|  2.27k|      if(!saw_xdigit) {
  ------------------
  |  Branch (140:10): [True: 1.32k, False: 945]
  ------------------
  141|  1.32k|        if(colonp)
  ------------------
  |  Branch (141:12): [True: 15, False: 1.31k]
  ------------------
  142|     15|          return 0;
  143|  1.31k|        colonp = tp;
  144|  1.31k|        continue;
  145|  1.32k|      }
  146|    945|      if(tp + INT16SZ > endp)
  ------------------
  |  |   37|    945|#define INT16SZ          2
  ------------------
  |  Branch (146:10): [True: 3, False: 942]
  ------------------
  147|      3|        return 0;
  148|    942|      *tp++ = (unsigned char)((val >> 8) & 0xff);
  149|    942|      *tp++ = (unsigned char)(val & 0xff);
  150|    942|      saw_xdigit = 0;
  151|    942|      val = 0;
  152|    942|      continue;
  153|    945|    }
  154|  4.29k|    if(ch == '.' && ((tp + INADDRSZ) <= endp) &&
  ------------------
  |  |   36|    632|#define INADDRSZ         4
  ------------------
  |  Branch (154:8): [True: 632, False: 3.65k]
  |  Branch (154:21): [True: 629, False: 3]
  ------------------
  155|    629|       inet_pton4(curtok, tp) > 0) {
  ------------------
  |  Branch (155:8): [True: 3, False: 626]
  ------------------
  156|      3|      tp += INADDRSZ;
  ------------------
  |  |   36|      3|#define INADDRSZ         4
  ------------------
  157|      3|      saw_xdigit = 0;
  158|      3|      break;    /* '\0' was seen by inet_pton4(). */
  159|      3|    }
  160|  4.28k|    return 0;
  161|  4.29k|  }
  162|  2.70k|  if(saw_xdigit) {
  ------------------
  |  Branch (162:6): [True: 1.75k, False: 951]
  ------------------
  163|  1.75k|    if(tp + INT16SZ > endp)
  ------------------
  |  |   37|  1.75k|#define INT16SZ          2
  ------------------
  |  Branch (163:8): [True: 3, False: 1.75k]
  ------------------
  164|      3|      return 0;
  165|  1.75k|    *tp++ = (unsigned char)((val >> 8) & 0xff);
  166|  1.75k|    *tp++ = (unsigned char)(val & 0xff);
  167|  1.75k|  }
  168|  2.70k|  if(colonp) {
  ------------------
  |  Branch (168:6): [True: 1.27k, False: 1.43k]
  ------------------
  169|       |    /*
  170|       |     * Since some memmove()'s erroneously fail to handle
  171|       |     * overlapping regions, we do the shift by hand.
  172|       |     */
  173|  1.27k|    const ssize_t n = tp - colonp;
  174|  1.27k|    ssize_t i;
  175|       |
  176|  1.27k|    if(tp == endp)
  ------------------
  |  Branch (176:8): [True: 3, False: 1.26k]
  ------------------
  177|      3|      return 0;
  178|  3.71k|    for(i = 1; i <= n; i++) {
  ------------------
  |  Branch (178:16): [True: 2.44k, False: 1.26k]
  ------------------
  179|  2.44k|      *(endp - i) = *(colonp + n - i);
  180|  2.44k|      *(colonp + n - i) = 0;
  181|  2.44k|    }
  182|  1.26k|    tp = endp;
  183|  1.26k|  }
  184|  2.70k|  if(tp != endp)
  ------------------
  |  Branch (184:6): [True: 1.42k, False: 1.27k]
  ------------------
  185|  1.42k|    return 0;
  186|  1.27k|  memcpy(dst, tmp, IN6ADDRSZ);
  ------------------
  |  |   35|  1.27k|#define IN6ADDRSZ       16
  ------------------
  187|  1.27k|  return 1;
  188|  2.70k|}

curlx_nonblock:
   47|  5.24k|{
   48|  5.24k|#ifdef HAVE_FCNTL_O_NONBLOCK
   49|       |  /* most recent Unix versions */
   50|  5.24k|  int flags;
   51|  5.24k|  flags = sfcntl(sockfd, F_GETFL, 0);
  ------------------
  |  | 1006|  5.24k|#  define sfcntl  fcntl
  ------------------
   52|  5.24k|  if(flags < 0)
  ------------------
  |  Branch (52:6): [True: 0, False: 5.24k]
  ------------------
   53|      0|    return -1;
   54|       |  /* Check if the current file status flags have already satisfied
   55|       |   * the request, if so, it is no need to call fcntl() to replicate it.
   56|       |   */
   57|  5.24k|  if(!!(flags & O_NONBLOCK) == !!nonblock)
  ------------------
  |  Branch (57:6): [True: 5.24k, False: 0]
  ------------------
   58|  5.24k|    return 0;
   59|      0|  if(nonblock)
  ------------------
  |  Branch (59:6): [True: 0, False: 0]
  ------------------
   60|      0|    flags |= O_NONBLOCK;
   61|      0|  else
   62|      0|    flags &= ~O_NONBLOCK;
   63|      0|  return sfcntl(sockfd, F_SETFL, flags);
  ------------------
  |  | 1006|      0|#  define sfcntl  fcntl
  ------------------
   64|       |
   65|       |#elif defined(HAVE_IOCTLSOCKET_CAMEL_FIONBIO)
   66|       |
   67|       |  /* Amiga */
   68|       |  long flags = nonblock ? 1L : 0L;
   69|       |  return IoctlSocket(sockfd, FIONBIO, (char *)&flags);
   70|       |
   71|       |#elif defined(HAVE_IOCTL_FIONBIO)
   72|       |
   73|       |  /* older Unix versions */
   74|       |  int flags = nonblock ? 1 : 0;
   75|       |  return ioctl(sockfd, FIONBIO, &flags);
   76|       |
   77|       |#elif defined(HAVE_IOCTLSOCKET_FIONBIO)
   78|       |
   79|       |  /* Windows */
   80|       |  unsigned long flags = nonblock ? 1UL : 0UL;
   81|       |  return ioctlsocket(sockfd, (long)FIONBIO, &flags);
   82|       |
   83|       |#elif defined(HAVE_SETSOCKOPT_SO_NONBLOCK)
   84|       |
   85|       |  /* Orbis OS */
   86|       |  long b = nonblock ? 1L : 0L;
   87|       |  return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b));
   88|       |
   89|       |#else
   90|       |#error "no non-blocking method was found/used/set"
   91|       |#endif
   92|  5.24k|}

curlx_strcopy:
   42|  12.2k|{
   43|  12.2k|  DEBUGASSERT(slen < dsize);
  ------------------
  |  | 1079|  12.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (43:3): [True: 0, False: 12.2k]
  |  Branch (43:3): [True: 12.2k, False: 0]
  ------------------
   44|  12.2k|  if(slen < dsize) {
  ------------------
  |  Branch (44:6): [True: 12.2k, False: 0]
  ------------------
   45|  12.2k|    memcpy(dest, src, slen);
   46|  12.2k|    dest[slen] = 0;
   47|  12.2k|  }
   48|      0|  else if(dsize)
  ------------------
  |  Branch (48:11): [True: 0, False: 0]
  ------------------
   49|      0|    dest[0] = 0;
   50|  12.2k|}

curlx_memdup:
   65|  1.47k|{
   66|  1.47k|  void *buffer = curlx_malloc(length);
  ------------------
  |  | 1473|  1.47k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   67|  1.47k|  if(!buffer)
  ------------------
  |  Branch (67:6): [True: 0, False: 1.47k]
  ------------------
   68|      0|    return NULL; /* fail */
   69|       |
   70|  1.47k|  memcpy(buffer, src, length);
   71|       |
   72|  1.47k|  return buffer;
   73|  1.47k|}
curlx_memdup0:
   86|  47.1k|{
   87|  47.1k|  char *buf = (length < SIZE_MAX) ? curlx_malloc(length + 1) : NULL;
  ------------------
  |  | 1473|  47.1k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  |  Branch (87:15): [True: 47.1k, False: 0]
  ------------------
   88|  47.1k|  if(!buf)
  ------------------
  |  Branch (88:6): [True: 0, False: 47.1k]
  ------------------
   89|      0|    return NULL;
   90|  47.1k|  if(length) {
  ------------------
  |  Branch (90:6): [True: 36.8k, False: 10.3k]
  ------------------
   91|  36.8k|    DEBUGASSERT(src); /* must never be NULL */
  ------------------
  |  | 1079|  36.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:5): [True: 0, False: 36.8k]
  |  Branch (91:5): [True: 36.8k, False: 0]
  ------------------
   92|  36.8k|    memcpy(buf, src, length);
   93|  36.8k|  }
   94|  47.1k|  buf[length] = 0;
   95|  47.1k|  return buf;
   96|  47.1k|}
curlx_memzero:
  113|  40.0k|{
  114|  40.0k|  if(buf)
  ------------------
  |  Branch (114:6): [True: 40.0k, False: 0]
  ------------------
  115|  40.0k|    curlx_memzero_low(buf, size);
  ------------------
  |  | 1646|  40.0k|#define curlx_memzero_low(buf, size)  explicit_bzero(buf, size)
  ------------------
  116|  40.0k|}
curlx_strzero:
  120|   172k|{
  121|   172k|  if(buf)
  ------------------
  |  Branch (121:6): [True: 748, False: 171k]
  ------------------
  122|    748|    curlx_memzero_low(buf, strlen(buf));
  ------------------
  |  | 1646|    748|#define curlx_memzero_low(buf, size)  explicit_bzero(buf, size)
  ------------------
  123|   172k|}

curlx_strerror:
  249|    271|{
  250|       |#ifdef _WIN32
  251|       |  DWORD old_win_err = GetLastError();
  252|       |#endif
  253|    271|  int old_errno = errno;
  254|    271|  char *p;
  255|       |
  256|    271|  if(!buflen)
  ------------------
  |  Branch (256:6): [True: 0, False: 271]
  ------------------
  257|      0|    return NULL;
  258|       |
  259|    271|#ifndef _WIN32
  260|    271|  DEBUGASSERT(err >= 0);
  ------------------
  |  | 1079|    271|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (260:3): [True: 0, False: 271]
  |  Branch (260:3): [True: 271, False: 0]
  ------------------
  261|    271|#endif
  262|       |
  263|    271|  *buf = '\0';
  264|       |
  265|       |#ifdef _WIN32
  266|       |  if((strerror_s(buf, buflen, err) || !strcmp(buf, "Unknown error")) &&
  267|       |#ifdef USE_WINSOCK
  268|       |     !get_winsock_error(err, buf, buflen) &&
  269|       |#endif
  270|       |     !curlx_get_winapi_error((DWORD)err, buf, buflen))
  271|       |    SNPRINTF(buf, buflen, "Unknown error %d (%#x)", err, (unsigned int)err);
  272|       |#else /* !_WIN32 */
  273|       |
  274|       |#if defined(HAVE_STRERROR_R) && defined(HAVE_POSIX_STRERROR_R)
  275|       |  /*
  276|       |   * The POSIX-style strerror_r() may set errno to ERANGE if insufficient
  277|       |   * storage is supplied via 'strerrbuf' and 'buflen' to hold the generated
  278|       |   * message string, or EINVAL if 'errnum' is not a valid error number.
  279|       |   */
  280|       |  if(strerror_r(err, buf, buflen) &&
  281|       |     buflen > sizeof("Unknown error ") + 20) {
  282|       |    if(buf[0] == '\0')
  283|       |      SNPRINTF(buf, buflen, "Unknown error %d", err);
  284|       |  }
  285|       |#elif defined(HAVE_STRERROR_R) && defined(HAVE_GLIBC_STRERROR_R)
  286|       |  /*
  287|       |   * The glibc-style strerror_r() only *might* use the buffer we pass to
  288|       |   * the function, but it always returns the error message as a pointer,
  289|       |   * so we must copy that string unconditionally (if non-NULL).
  290|       |   */
  291|    271|  {
  292|    271|    char buffer[256];
  293|    271|    const char *msg = strerror_r(err, buffer, sizeof(buffer));
  294|    271|    if(msg && buflen > 1)
  ------------------
  |  Branch (294:8): [True: 271, False: 0]
  |  Branch (294:15): [True: 271, False: 0]
  ------------------
  295|    271|      SNPRINTF(buf, buflen, "%s", msg);
  ------------------
  |  |   43|    271|#define SNPRINTF curl_msnprintf
  ------------------
  296|      0|    else if(buflen > sizeof("Unknown error ") + 20)
  ------------------
  |  Branch (296:13): [True: 0, False: 0]
  ------------------
  297|      0|      SNPRINTF(buf, buflen, "Unknown error %d", err);
  ------------------
  |  |   43|      0|#define SNPRINTF curl_msnprintf
  ------------------
  298|    271|  }
  299|       |#else
  300|       |  {
  301|       |    /* !checksrc! disable BANNEDFUNC 1 */
  302|       |    const char *msg = strerror(err);
  303|       |    if(msg && buflen > 1)
  304|       |      SNPRINTF(buf, buflen, "%s", msg);
  305|       |    else if(buflen > sizeof("Unknown error ") + 20)
  306|       |      SNPRINTF(buf, buflen, "Unknown error %d", err);
  307|       |  }
  308|       |#endif
  309|       |
  310|    271|#endif /* _WIN32 */
  311|       |
  312|       |  /* strip trailing '\r\n' or '\n'. */
  313|    271|  p = strrchr(buf, '\n');
  314|    271|  if(p && (p - buf) >= 2)
  ------------------
  |  Branch (314:6): [True: 0, False: 271]
  |  Branch (314:11): [True: 0, False: 0]
  ------------------
  315|      0|    *p = '\0';
  316|    271|  p = strrchr(buf, '\r');
  317|    271|  if(p && (p - buf) >= 1)
  ------------------
  |  Branch (317:6): [True: 0, False: 271]
  |  Branch (317:11): [True: 0, False: 0]
  ------------------
  318|      0|    *p = '\0';
  319|       |
  320|    271|  if(errno != old_errno)
  ------------------
  |  Branch (320:6): [True: 0, False: 271]
  ------------------
  321|    271|    errno = old_errno;
  322|       |
  323|       |#ifdef _WIN32
  324|       |  if(old_win_err != GetLastError())
  325|       |    SetLastError(old_win_err);
  326|       |#endif
  327|       |
  328|    271|  return buf;
  329|    271|}

curlx_str_init:
   27|  26.5k|{
   28|       |  out->str = NULL;
   29|  26.5k|  out->len = 0;
   30|  26.5k|}
curlx_str_assign:
   33|  1.07k|{
   34|  1.07k|  out->str = str;
   35|  1.07k|  out->len = len;
   36|  1.07k|}
curlx_str_until:
   51|  17.2k|{
   52|  17.2k|  const char *s;
   53|  17.2k|  size_t len = 0;
   54|  17.2k|  DEBUGASSERT(linep);
  ------------------
  |  | 1079|  17.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 17.2k]
  |  Branch (54:3): [True: 17.2k, False: 0]
  ------------------
   55|  17.2k|  DEBUGASSERT(*linep);
  ------------------
  |  | 1079|  17.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (55:3): [True: 0, False: 17.2k]
  |  Branch (55:3): [True: 17.2k, False: 0]
  ------------------
   56|  17.2k|  DEBUGASSERT(out);
  ------------------
  |  | 1079|  17.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 17.2k]
  |  Branch (56:3): [True: 17.2k, False: 0]
  ------------------
   57|  17.2k|  DEBUGASSERT(delim);
  ------------------
  |  | 1079|  17.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 17.2k]
  |  Branch (57:3): [True: 17.2k, False: 0]
  ------------------
   58|  17.2k|  s = *linep;
   59|       |
   60|  17.2k|  curlx_str_init(out);
   61|  44.7k|  while(*s && (*s != delim)) {
  ------------------
  |  Branch (61:9): [True: 31.7k, False: 12.9k]
  |  Branch (61:15): [True: 27.5k, False: 4.21k]
  ------------------
   62|  27.5k|    s++;
   63|  27.5k|    if(++len > max) {
  ------------------
  |  Branch (63:8): [True: 36, False: 27.4k]
  ------------------
   64|     36|      return STRE_BIG;
  ------------------
  |  |   29|     36|#define STRE_BIG      1
  ------------------
   65|     36|    }
   66|  27.5k|  }
   67|  17.2k|  if(!len)
  ------------------
  |  Branch (67:6): [True: 17, False: 17.1k]
  ------------------
   68|     17|    return STRE_SHORT;
  ------------------
  |  |   30|     17|#define STRE_SHORT    2
  ------------------
   69|  17.1k|  out->str = *linep;
   70|  17.1k|  out->len = len;
   71|  17.1k|  *linep = s; /* point to the first byte after the word */
   72|  17.1k|  return STRE_OK;
  ------------------
  |  |   28|  17.1k|#define STRE_OK       0
  ------------------
   73|  17.2k|}
curlx_str_word:
   78|  11.7k|{
   79|  11.7k|  return curlx_str_until(linep, out, max, ' ');
   80|  11.7k|}
curlx_str_single:
  139|   119k|{
  140|   119k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1079|   119k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (140:3): [True: 0, False: 119k]
  |  Branch (140:3): [True: 0, False: 0]
  |  Branch (140:3): [True: 119k, False: 0]
  |  Branch (140:3): [True: 119k, False: 0]
  ------------------
  141|   119k|  if(**linep != byte)
  ------------------
  |  Branch (141:6): [True: 45.4k, False: 73.9k]
  ------------------
  142|  45.4k|    return STRE_BYTE;
  ------------------
  |  |   33|  45.4k|#define STRE_BYTE     5
  ------------------
  143|  73.9k|  (*linep)++; /* move over it */
  144|  73.9k|  return STRE_OK;
  ------------------
  |  |   28|  73.9k|#define STRE_OK       0
  ------------------
  145|   119k|}
curlx_str_singlespace:
  150|  11.7k|{
  151|  11.7k|  return curlx_str_single(linep, ' ');
  152|  11.7k|}
curlx_str_number:
  209|   175k|{
  210|   175k|  return str_num_base(linep, nump, max, 10);
  211|   175k|}
curlx_str_hex:
  216|     53|{
  217|     53|  return str_num_base(linep, nump, max, 16);
  218|     53|}
curlx_str_octal:
  223|  2.60k|{
  224|  2.60k|  return str_num_base(linep, nump, max, 8);
  225|  2.60k|}
curlx_str_casecompare:
  253|   153k|{
  254|   153k|  size_t clen = check ? strlen(check) : 0;
  ------------------
  |  Branch (254:17): [True: 153k, False: 0]
  ------------------
  255|   153k|  return ((str->len == clen) && curl_strnequal(str->str, check, clen));
  ------------------
  |  Branch (255:11): [True: 27.7k, False: 126k]
  |  Branch (255:33): [True: 13.8k, False: 13.9k]
  ------------------
  256|   153k|}
curlx_str_cmp:
  261|  3.20k|{
  262|  3.20k|  if(check) {
  ------------------
  |  Branch (262:6): [True: 3.20k, False: 0]
  ------------------
  263|  3.20k|    size_t clen = strlen(check);
  264|  3.20k|    return ((str->len == clen) && !strncmp(str->str, check, clen));
  ------------------
  |  Branch (264:13): [True: 11, False: 3.19k]
  |  Branch (264:35): [True: 3, False: 8]
  ------------------
  265|  3.20k|  }
  266|      0|  return !!(str->len);
  267|  3.20k|}
curlx_str_nudge:
  272|  3.31k|{
  273|  3.31k|  if(num <= str->len) {
  ------------------
  |  Branch (273:6): [True: 3.31k, False: 0]
  ------------------
  274|  3.31k|    str->str += num;
  275|  3.31k|    str->len -= num;
  276|  3.31k|    return STRE_OK;
  ------------------
  |  |   28|  3.31k|#define STRE_OK       0
  ------------------
  277|  3.31k|  }
  278|      0|  return STRE_OVERFLOW;
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  279|  3.31k|}
curlx_str_cspn:
  285|  72.6k|{
  286|  72.6k|  const char *s = *linep;
  287|  72.6k|  size_t len;
  288|  72.6k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1079|  72.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (288:3): [True: 0, False: 72.6k]
  |  Branch (288:3): [True: 0, False: 0]
  |  Branch (288:3): [True: 72.6k, False: 0]
  |  Branch (288:3): [True: 72.6k, False: 0]
  ------------------
  289|       |
  290|  72.6k|  len = strcspn(s, reject);
  291|  72.6k|  if(len) {
  ------------------
  |  Branch (291:6): [True: 67.8k, False: 4.72k]
  ------------------
  292|  67.8k|    out->str = s;
  293|  67.8k|    out->len = len;
  294|  67.8k|    *linep = &s[len];
  295|  67.8k|    return STRE_OK;
  ------------------
  |  |   28|  67.8k|#define STRE_OK       0
  ------------------
  296|  67.8k|  }
  297|  4.72k|  curlx_str_init(out);
  298|  4.72k|  return STRE_SHORT;
  ------------------
  |  |   30|  4.72k|#define STRE_SHORT    2
  ------------------
  299|  72.6k|}
curlx_str_trimblanks:
  303|  65.4k|{
  304|  68.7k|  while(out->len && ISBLANK(*out->str))
  ------------------
  |  |   43|  68.0k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 3.11k, False: 64.9k]
  |  |  |  Branch (43:38): [True: 202, False: 64.7k]
  |  |  ------------------
  ------------------
  |  Branch (304:9): [True: 68.0k, False: 709]
  ------------------
  305|  3.31k|    curlx_str_nudge(out, 1);
  306|       |
  307|       |  /* trim trailing spaces and tabs */
  308|  66.4k|  while(out->len && ISBLANK(out->str[out->len - 1]))
  ------------------
  |  |   43|  65.7k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 721, False: 64.9k]
  |  |  |  Branch (43:38): [True: 227, False: 64.7k]
  |  |  ------------------
  ------------------
  |  Branch (308:9): [True: 65.7k, False: 709]
  ------------------
  309|    948|    out->len--;
  310|  65.4k|}
curlx_str_passblanks:
  314|  91.2k|{
  315|  92.3k|  while(ISBLANK(**linep))
  ------------------
  |  |   43|  92.3k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 797, False: 91.5k]
  |  |  |  Branch (43:38): [True: 293, False: 91.2k]
  |  |  ------------------
  ------------------
  316|  1.09k|    (*linep)++; /* move over it */
  317|  91.2k|}
strparse.c:str_num_base:
  172|   178k|{
  173|   178k|  curl_off_t num = 0;
  174|   178k|  const char *p;
  175|   178k|  int m = (base == 10) ? '9' :   /* the largest digit possible */
  ------------------
  |  Branch (175:11): [True: 175k, False: 2.66k]
  ------------------
  176|   178k|    (base == 16) ? 'f' : '7';
  ------------------
  |  Branch (176:5): [True: 53, False: 2.60k]
  ------------------
  177|   178k|  DEBUGASSERT(linep && *linep && nump);
  ------------------
  |  | 1079|   178k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 178k]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 178k, False: 18.4E]
  |  Branch (177:3): [True: 178k, False: 0]
  |  Branch (177:3): [True: 178k, False: 0]
  ------------------
  178|   178k|  DEBUGASSERT((base == 8) || (base == 10) || (base == 16));
  ------------------
  |  | 1079|   178k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 178k, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 2.60k, False: 175k]
  |  Branch (178:3): [True: 175k, False: 53]
  |  Branch (178:3): [True: 53, False: 0]
  ------------------
  179|   178k|  DEBUGASSERT(max >= 0); /* mostly to catch SIZE_MAX, which is too large */
  ------------------
  |  | 1079|   178k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 178k]
  |  Branch (179:3): [True: 178k, False: 0]
  ------------------
  180|   178k|  *nump = 0;
  181|   178k|  p = *linep;
  182|   178k|  if(!valid_digit(*p, m))
  ------------------
  |  |  156|   178k|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 136k, False: 42.1k]
  |  |  |  Branch (156:20): [True: 44.6k, False: 91.5k]
  |  |  |  Branch (156:36): [True: 44.6k, False: 6]
  |  |  ------------------
  ------------------
  183|   133k|    return STRE_NO_NUM;
  ------------------
  |  |   36|   133k|#define STRE_NO_NUM   8
  ------------------
  184|  44.6k|  if(max < base) {
  ------------------
  |  Branch (184:6): [True: 0, False: 44.6k]
  ------------------
  185|       |    /* special-case low max scenario because check needs to be different */
  186|      0|    do {
  187|      0|      int n = curlx_hexval(*p++);
  ------------------
  |  |  111|      0|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  188|      0|      num = (num * base) + n;
  189|      0|      if(num > max)
  ------------------
  |  Branch (189:10): [True: 0, False: 0]
  ------------------
  190|      0|        return STRE_OVERFLOW;
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  191|      0|    } while(valid_digit(*p, m));
  ------------------
  |  |  156|      0|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 0, False: 0]
  |  |  |  Branch (156:20): [True: 0, False: 0]
  |  |  |  Branch (156:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  192|      0|  }
  193|  44.6k|  else {
  194|  92.1k|    do {
  195|  92.1k|      int n = curlx_hexval(*p++);
  ------------------
  |  |  111|  92.1k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  196|  92.1k|      if(num > ((max - n) / base))
  ------------------
  |  Branch (196:10): [True: 229, False: 91.8k]
  ------------------
  197|    229|        return STRE_OVERFLOW;
  ------------------
  |  |   35|    229|#define STRE_OVERFLOW 7
  ------------------
  198|  91.8k|      num = (num * base) + n;
  199|  91.8k|    } while(valid_digit(*p, m));
  ------------------
  |  |  156|  91.8k|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 77.4k, False: 14.4k]
  |  |  |  Branch (156:20): [True: 47.5k, False: 29.9k]
  |  |  |  Branch (156:36): [True: 47.5k, False: 1]
  |  |  ------------------
  ------------------
  200|  44.6k|  }
  201|  44.3k|  *nump = num;
  202|  44.3k|  *linep = p;
  203|  44.3k|  return STRE_OK;
  ------------------
  |  |   28|  44.3k|#define STRE_OK       0
  ------------------
  204|  44.6k|}

curlx_mstotv:
   35|    153|{
   36|    153|  if(!tv)
  ------------------
  |  Branch (36:6): [True: 0, False: 153]
  ------------------
   37|      0|    return NULL;
   38|       |
   39|    153|  if(ms < 0)
  ------------------
  |  Branch (39:6): [True: 0, False: 153]
  ------------------
   40|      0|    return NULL;
   41|       |
   42|    153|  if(ms > 0) {
  ------------------
  |  Branch (42:6): [True: 153, False: 0]
  ------------------
   43|    153|    timediff_t tv_sec = ms / 1000;
   44|    153|    timediff_t tv_usec = (ms % 1000) * 1000; /* max=999000 */
   45|    153|#ifdef HAVE_SUSECONDS_T
   46|       |#if TIMEDIFF_T_MAX > TIME_T_MAX
   47|       |    /* tv_sec overflow check in case time_t is signed */
   48|       |    if(tv_sec > TIME_T_MAX)
   49|       |      tv_sec = TIME_T_MAX;
   50|       |#endif
   51|    153|    tv->tv_sec = (time_t)tv_sec;
   52|    153|    tv->tv_usec = (suseconds_t)tv_usec;
   53|       |#elif defined(_WIN32) /* maybe also others in the future */
   54|       |#if TIMEDIFF_T_MAX > LONG_MAX
   55|       |    /* tv_sec overflow check on Windows there we know it is long */
   56|       |    if(tv_sec > LONG_MAX)
   57|       |      tv_sec = LONG_MAX;
   58|       |#endif
   59|       |    tv->tv_sec = (long)tv_sec;
   60|       |    tv->tv_usec = (long)tv_usec;
   61|       |#else
   62|       |#if TIMEDIFF_T_MAX > INT_MAX
   63|       |    /* tv_sec overflow check in case time_t is signed */
   64|       |    if(tv_sec > INT_MAX)
   65|       |      tv_sec = INT_MAX;
   66|       |#endif
   67|       |    tv->tv_sec = (int)tv_sec;
   68|       |    tv->tv_usec = (int)tv_usec;
   69|       |#endif
   70|    153|  }
   71|      0|  else {
   72|      0|    tv->tv_sec = 0;
   73|      0|    tv->tv_usec = 0;
   74|      0|  }
   75|       |
   76|    153|  return tv;
   77|    153|}

curlx_pnow:
   54|  1.53M|{
   55|       |  /*
   56|       |   * clock_gettime() is granted to be increased monotonically when the
   57|       |   * monotonic clock is queried. Time starting point is unspecified, it
   58|       |   * could be the system start-up time, the Epoch, or something else,
   59|       |   * in any case the time starting point does not change once that the
   60|       |   * system has started up.
   61|       |   */
   62|  1.53M|  struct timespec tsnow;
   63|       |
   64|       |  /*
   65|       |   * clock_gettime() may be defined by Apple's SDK as weak symbol thus
   66|       |   * code compiles but fails during runtime if clock_gettime() is
   67|       |   * called on unsupported OS version.
   68|       |   */
   69|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   70|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   71|       |  bool have_clock_gettime = FALSE;
   72|       |  if(__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *))
   73|       |    have_clock_gettime = TRUE;
   74|       |#endif
   75|       |
   76|  1.53M|#ifdef HAVE_CLOCK_GETTIME_MONOTONIC_RAW
   77|  1.53M|  if(
   78|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   79|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   80|       |    have_clock_gettime &&
   81|       |#endif
   82|  1.53M|    (clock_gettime(CLOCK_MONOTONIC_RAW, &tsnow) == 0)) {
  ------------------
  |  Branch (82:5): [True: 1.53M, False: 4]
  ------------------
   83|  1.53M|    pnow->tv_sec = tsnow.tv_sec;
   84|  1.53M|    pnow->tv_usec = (int)(tsnow.tv_nsec / 1000);
   85|  1.53M|  }
   86|      4|  else
   87|      4|#endif
   88|       |
   89|      4|  if(
   90|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   91|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   92|       |    have_clock_gettime &&
   93|       |#endif
   94|      4|    (clock_gettime(CLOCK_MONOTONIC, &tsnow) == 0)) {
  ------------------
  |  Branch (94:5): [True: 0, False: 4]
  ------------------
   95|      0|    pnow->tv_sec = tsnow.tv_sec;
   96|      0|    pnow->tv_usec = (int)(tsnow.tv_nsec / 1000);
   97|      0|  }
   98|       |  /*
   99|       |   * Even when the configure process has truly detected monotonic clock
  100|       |   * availability, it might happen that it is not actually available at
  101|       |   * runtime. When this occurs, fallback to other time source.
  102|       |   */
  103|      4|#ifdef HAVE_GETTIMEOFDAY
  104|      4|  else {
  105|      4|    struct timeval now;
  106|      4|    (void)gettimeofday(&now, NULL);
  107|      4|    pnow->tv_sec = now.tv_sec;
  108|      4|    pnow->tv_usec = (int)now.tv_usec;
  109|      4|  }
  110|       |#else
  111|       |  else {
  112|       |    pnow->tv_sec = time(NULL);
  113|       |    pnow->tv_usec = 0;
  114|       |  }
  115|       |#endif
  116|  1.53M|}
curlx_now:
  176|  2.87k|{
  177|  2.87k|  struct curltime now;
  178|  2.87k|  curlx_pnow(&now);
  179|  2.87k|  return now;
  180|  2.87k|}
curlx_ptimediff_ms:
  190|  1.36M|{
  191|  1.36M|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  192|  1.36M|  if(diff >= (TIMEDIFF_T_MAX / 1000))
  ------------------
  |  |   33|  1.36M|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  596|  1.36M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (192:6): [True: 0, False: 1.36M]
  ------------------
  193|      0|    return TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  194|  1.36M|  else if(diff <= (TIMEDIFF_T_MIN / 1000))
  ------------------
  |  |   34|  1.36M|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  598|  1.36M|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  596|  1.36M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (194:11): [True: 0, False: 1.36M]
  ------------------
  195|      0|    return TIMEDIFF_T_MIN;
  ------------------
  |  |   34|      0|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  598|      0|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|  1.36M|  return (diff * 1000) + ((newer->tv_usec - older->tv_usec) / 1000);
  197|  1.36M|}
curlx_ptimediff_us:
  225|   257k|{
  226|   257k|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  227|   257k|  if(diff >= (TIMEDIFF_T_MAX / 1000000))
  ------------------
  |  |   33|   257k|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  596|   257k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (227:6): [True: 0, False: 257k]
  ------------------
  228|      0|    return TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  229|   257k|  else if(diff <= (TIMEDIFF_T_MIN / 1000000))
  ------------------
  |  |   34|   257k|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  598|   257k|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  596|   257k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (229:11): [True: 0, False: 257k]
  ------------------
  230|      0|    return TIMEDIFF_T_MIN;
  ------------------
  |  |   34|      0|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  598|      0|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  231|   257k|  return (diff * 1000000) + newer->tv_usec - older->tv_usec;
  232|   257k|}
curlx_gmtime:
  253|  1.07k|{
  254|       |#ifdef _WIN32
  255|       |  if(gmtime_s(store, &intime)) /* thread-safe */
  256|       |    return CURLE_BAD_FUNCTION_ARGUMENT;
  257|       |#elif defined(HAVE_GMTIME_R)
  258|       |  const struct tm *tm;
  259|  1.07k|  tm = gmtime_r(&intime, store); /* thread-safe */
  260|  1.07k|  if(!tm)
  ------------------
  |  Branch (260:6): [True: 0, False: 1.07k]
  ------------------
  261|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  262|       |#else
  263|       |  const struct tm *tm;
  264|       |  /* !checksrc! disable BANNEDFUNC 1 */
  265|       |  tm = gmtime(&intime); /* not thread-safe */
  266|       |  if(tm)
  267|       |    *store = *tm; /* copy the pointed struct to the local copy */
  268|       |  else
  269|       |    return CURLE_BAD_FUNCTION_ARGUMENT;
  270|       |#endif
  271|       |
  272|  1.07k|  return CURLE_OK;
  273|  1.07k|}

curlx_wait_ms:
   59|  1.12M|{
   60|  1.12M|  int r = 0;
   61|       |
   62|  1.12M|  if(!timeout_ms)
  ------------------
  |  Branch (62:6): [True: 1.12M, False: 153]
  ------------------
   63|  1.12M|    return 0;
   64|    153|  if(timeout_ms < 0) {
  ------------------
  |  Branch (64:6): [True: 0, False: 153]
  ------------------
   65|      0|    SET_SOCKERRNO(SOCKEINVAL);
  ------------------
  |  | 1094|      0|#define SET_SOCKERRNO(x)  (errno = (x))
  ------------------
   66|      0|    return -1;
   67|      0|  }
   68|       |#ifdef MSDOS
   69|       |  delay((unsigned int)timeout_ms);
   70|       |#elif defined(_WIN32)
   71|       |  /* prevent overflow, timeout_ms is typecast to ULONG/DWORD. */
   72|       |#if TIMEDIFF_T_MAX >= ULONG_MAX
   73|       |  if(timeout_ms >= ULONG_MAX)
   74|       |    timeout_ms = ULONG_MAX - 1;
   75|       |    /* do not use ULONG_MAX, because that is equal to INFINITE */
   76|       |#endif
   77|       |  Sleep((DWORD)timeout_ms);
   78|       |#else
   79|       |  /* avoid using poll() for this since it behaves incorrectly with no sockets
   80|       |     on Apple operating systems */
   81|    153|  {
   82|    153|    struct timeval pending_tv;
   83|    153|    r = select(0, NULL, NULL, NULL, curlx_mstotv(&pending_tv, timeout_ms));
   84|    153|  }
   85|    153|#endif /* _WIN32 */
   86|    153|  if(r) {
  ------------------
  |  Branch (86:6): [True: 0, False: 153]
  ------------------
   87|      0|    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1093|      0|#define SOCKERRNO         errno
  ------------------
                  if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1127|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (87:8): [True: 0, False: 0]
  |  Branch (87:21): [True: 0, False: 0]
  ------------------
   88|       |      /* make EINTR from select or poll not a "lethal" error */
   89|      0|      r = 0;
   90|      0|    else
   91|      0|      r = -1;
   92|      0|  }
   93|    153|  return r;
   94|    153|}

curlx_uztosi:
   73|  4.11k|{
   74|       |#ifdef __INTEL_COMPILER
   75|       |#pragma warning(push)
   76|       |#pragma warning(disable:810) /* conversion may lose significant bits */
   77|       |#endif
   78|       |
   79|  4.11k|  DEBUGASSERT(uznum <= (size_t)CURL_MASK_SINT);
  ------------------
  |  | 1079|  4.11k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 4.11k]
  |  Branch (79:3): [True: 4.11k, False: 0]
  ------------------
   80|  4.11k|  return (int)(uznum & (size_t)CURL_MASK_SINT);
  ------------------
  |  |   44|  4.11k|#define CURL_MASK_SINT    (CURL_MASK_UINT >> 1)
  |  |  ------------------
  |  |  |  |   43|  4.11k|#define CURL_MASK_UINT    ((unsigned int)~0)
  |  |  ------------------
  ------------------
   81|       |
   82|       |#ifdef __INTEL_COMPILER
   83|       |#pragma warning(pop)
   84|       |#endif
   85|  4.11k|}
curlx_uztoui:
  111|  5.35k|{
  112|       |#ifdef __INTEL_COMPILER
  113|       |#pragma warning(push)
  114|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  115|       |#endif
  116|       |
  117|  5.35k|#if UINT_MAX < SIZE_MAX
  118|  5.35k|  DEBUGASSERT(uznum <= (size_t)CURL_MASK_UINT);
  ------------------
  |  | 1079|  5.35k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (118:3): [True: 0, False: 5.35k]
  |  Branch (118:3): [True: 5.35k, False: 0]
  ------------------
  119|  5.35k|#endif
  120|  5.35k|  return (unsigned int)(uznum & (size_t)CURL_MASK_UINT);
  ------------------
  |  |   43|  5.35k|#define CURL_MASK_UINT    ((unsigned int)~0)
  ------------------
  121|       |
  122|       |#ifdef __INTEL_COMPILER
  123|       |#pragma warning(pop)
  124|       |#endif
  125|  5.35k|}
curlx_sltosi:
  131|     66|{
  132|       |#ifdef __INTEL_COMPILER
  133|       |#pragma warning(push)
  134|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  135|       |#endif
  136|       |
  137|     66|  DEBUGASSERT(slnum >= 0);
  ------------------
  |  | 1079|     66|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 0, False: 66]
  |  Branch (137:3): [True: 66, False: 0]
  ------------------
  138|     66|#if INT_MAX < LONG_MAX
  139|     66|  DEBUGASSERT((unsigned long)slnum <= (unsigned long)CURL_MASK_SINT);
  ------------------
  |  | 1079|     66|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (139:3): [True: 0, False: 66]
  |  Branch (139:3): [True: 66, False: 0]
  ------------------
  140|     66|#endif
  141|     66|  return (int)(slnum & (long)CURL_MASK_SINT);
  ------------------
  |  |   44|     66|#define CURL_MASK_SINT    (CURL_MASK_UINT >> 1)
  |  |  ------------------
  |  |  |  |   43|     66|#define CURL_MASK_UINT    ((unsigned int)~0)
  |  |  ------------------
  ------------------
  142|       |
  143|       |#ifdef __INTEL_COMPILER
  144|       |#pragma warning(pop)
  145|       |#endif
  146|     66|}
curlx_sltous:
  173|     63|{
  174|       |#ifdef __INTEL_COMPILER
  175|       |#pragma warning(push)
  176|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  177|       |#endif
  178|       |
  179|     63|  DEBUGASSERT(slnum >= 0);
  ------------------
  |  | 1079|     63|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 63]
  |  Branch (179:3): [True: 63, False: 0]
  ------------------
  180|     63|  DEBUGASSERT((unsigned long)slnum <= (unsigned long)CURL_MASK_USHORT);
  ------------------
  |  | 1079|     63|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (180:3): [True: 0, False: 63]
  |  Branch (180:3): [True: 63, False: 0]
  ------------------
  181|     63|  return (unsigned short)(slnum & (long)CURL_MASK_USHORT);
  ------------------
  |  |   41|     63|#define CURL_MASK_USHORT  ((unsigned short)~0)
  ------------------
  182|       |
  183|       |#ifdef __INTEL_COMPILER
  184|       |#pragma warning(pop)
  185|       |#endif
  186|     63|}
curlx_sztouz:
  298|   167k|{
  299|   167k|  if(sznum < 0) {
  ------------------
  |  Branch (299:6): [True: 821, False: 166k]
  ------------------
  300|    821|    *puznum = 0;
  301|    821|    return FALSE;
  ------------------
  |  | 1056|    821|#define FALSE false
  ------------------
  302|    821|  }
  303|   166k|  *puznum = (size_t)sznum;
  304|       |  return TRUE;
  ------------------
  |  | 1053|   166k|#define TRUE true
  ------------------
  305|   167k|}

Curl_cw_out_done:
  491|  6.25k|{
  492|  6.25k|  struct Curl_cwriter *cw_out;
  493|  6.25k|  CURLcode result = CURLE_OK;
  494|       |
  495|  6.25k|  cw_out = Curl_cwriter_get_by_type(data, &Curl_cwt_out);
  496|  6.25k|  if(cw_out) {
  ------------------
  |  Branch (496:6): [True: 6.24k, False: 5]
  ------------------
  497|  6.24k|    CURL_TRC_WRITE(data, "[OUT] done");
  ------------------
  |  |  158|  6.24k|  do {                                                     \
  |  |  159|  6.24k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|  6.24k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  12.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 6.24k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  12.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  6.24k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  6.24k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  6.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 6.24k]
  |  |  ------------------
  ------------------
  498|  6.24k|    result = Curl_client_flush(data);
  499|  6.24k|    if(!result)
  ------------------
  |  Branch (499:8): [True: 6.24k, False: 0]
  ------------------
  500|  6.24k|      result = cw_out_do_flush(data, cw_out, TRUE);
  ------------------
  |  | 1053|  6.24k|#define TRUE true
  ------------------
  501|  6.24k|  }
  502|  6.25k|  return result;
  503|  6.25k|}
cw-out.c:cw_out_init:
  105|  6.25k|{
  106|  6.25k|  struct cw_out_ctx *ctx = writer->ctx;
  107|  6.25k|  (void)data;
  108|       |  ctx->buf = NULL;
  109|  6.25k|  return CURLE_OK;
  110|  6.25k|}
cw-out.c:cw_out_write:
  427|  1.17k|{
  428|  1.17k|  struct cw_out_ctx *ctx = writer->ctx;
  429|  1.17k|  CURLcode result;
  430|  1.17k|  bool flush_all = !!(type & CLIENTWRITE_EOS);
  ------------------
  |  |   50|  1.17k|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  431|       |
  432|  1.17k|  if((type & CLIENTWRITE_BODY) ||
  ------------------
  |  |   43|  1.17k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (432:6): [True: 0, False: 1.17k]
  ------------------
  433|  1.17k|     ((type & CLIENTWRITE_HEADER) && data->set.include_header)) {
  ------------------
  |  |   45|  1.17k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
  |  Branch (433:7): [True: 1.17k, False: 0]
  |  Branch (433:38): [True: 329, False: 842]
  ------------------
  434|    329|    cw_out_type otype = (!blen && (type & CLIENTWRITE_0LEN)) ?
  ------------------
  |  |   51|      0|#define CLIENTWRITE_0LEN    (1 << 8) /* write even 0-length buffers */
  ------------------
  |  Branch (434:26): [True: 0, False: 329]
  |  Branch (434:35): [True: 0, False: 0]
  ------------------
  435|    329|                        CW_OUT_BODY_0LEN : CW_OUT_BODY;
  436|    329|    result = cw_out_do_write(ctx, data, otype, flush_all, buf, blen);
  437|    329|    if(result)
  ------------------
  |  Branch (437:8): [True: 2, False: 327]
  ------------------
  438|      2|      return result;
  439|    329|  }
  440|       |
  441|  1.16k|  if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   45|  1.16k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   44|  1.16k|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  |  Branch (441:6): [True: 1.16k, False: 0]
  ------------------
  442|  1.16k|    result = cw_out_do_write(ctx, data, CW_OUT_HDS, flush_all, buf, blen);
  443|  1.16k|    if(result)
  ------------------
  |  Branch (443:8): [True: 0, False: 1.16k]
  ------------------
  444|      0|      return result;
  445|  1.16k|  }
  446|       |
  447|  1.16k|  return CURLE_OK;
  448|  1.16k|}
cw-out.c:cw_out_do_write:
  377|  1.49k|{
  378|  1.49k|  CURLcode result = CURLE_OK;
  379|       |
  380|       |  /* if we have buffered data and it is a different type than what
  381|       |   * we are writing now, try to flush all */
  382|  1.49k|  if(ctx->buf && ctx->buf->type != otype) {
  ------------------
  |  Branch (382:6): [True: 0, False: 1.49k]
  |  Branch (382:18): [True: 0, False: 0]
  ------------------
  383|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  384|      0|    if(result)
  ------------------
  |  Branch (384:8): [True: 0, False: 0]
  ------------------
  385|      0|      goto out;
  386|      0|  }
  387|       |
  388|  1.49k|  if(ctx->buf) {
  ------------------
  |  Branch (388:6): [True: 0, False: 1.49k]
  ------------------
  389|       |    /* still have buffered data, append and flush */
  390|      0|    result = cw_out_append(ctx, data, otype, buf, blen);
  391|      0|    if(result)
  ------------------
  |  Branch (391:8): [True: 0, False: 0]
  ------------------
  392|      0|      goto out;
  393|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
  394|      0|    if(result)
  ------------------
  |  Branch (394:8): [True: 0, False: 0]
  ------------------
  395|      0|      goto out;
  396|      0|  }
  397|  1.49k|  else {
  398|       |    /* nothing buffered, try direct write */
  399|  1.49k|    size_t consumed;
  400|  1.49k|    result = cw_out_ptr_flush(ctx, data, otype, flush_all,
  401|  1.49k|                              buf, blen, &consumed);
  402|  1.49k|    if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (402:8): [True: 2, False: 1.49k]
  |  Branch (402:18): [True: 2, False: 0]
  ------------------
  403|      2|      return result;
  404|  1.49k|    result = CURLE_OK;
  405|  1.49k|    if(consumed < blen) {
  ------------------
  |  Branch (405:8): [True: 0, False: 1.49k]
  ------------------
  406|       |      /* did not write all, append the rest */
  407|      0|      result = cw_out_append(ctx, data, otype,
  408|      0|                             buf + consumed, blen - consumed);
  409|      0|      if(result)
  ------------------
  |  Branch (409:10): [True: 0, False: 0]
  ------------------
  410|      0|        goto out;
  411|      0|    }
  412|  1.49k|  }
  413|       |
  414|  1.49k|out:
  415|  1.49k|  if(result) {
  ------------------
  |  Branch (415:6): [True: 0, False: 1.49k]
  ------------------
  416|       |    /* We do not want to invoked client callbacks a second time after
  417|       |     * encountering an error. See issue #13337 */
  418|       |    ctx->errored = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  419|      0|    cw_out_bufs_free(ctx);
  420|      0|  }
  421|  1.49k|  return result;
  422|  1.49k|}
cw-out.c:cw_out_ptr_flush:
  228|  1.49k|{
  229|  1.49k|  curl_write_callback wcb = NULL;
  230|  1.49k|  void *wcb_data;
  231|  1.49k|  size_t max_write, min_write;
  232|  1.49k|  size_t wlen, nwritten = 0;
  233|  1.49k|  CURLcode result = CURLE_OK;
  234|       |
  235|       |  /* If we errored once, we do not invoke the client callback again */
  236|  1.49k|  if(ctx->errored)
  ------------------
  |  Branch (236:6): [True: 0, False: 1.49k]
  ------------------
  237|      0|    return CURLE_WRITE_ERROR;
  238|       |
  239|       |  /* write callbacks may get NULLed by the client between calls. */
  240|  1.49k|  cw_get_writefunc(data, otype, &wcb, &wcb_data, &max_write, &min_write);
  241|  1.49k|  if(!wcb) {
  ------------------
  |  Branch (241:6): [True: 1.16k, False: 329]
  ------------------
  242|  1.16k|    *pconsumed = blen;
  243|  1.16k|    return CURLE_OK;
  244|  1.16k|  }
  245|       |
  246|    329|  *pconsumed = 0;
  247|    329|  if(otype == CW_OUT_BODY_0LEN) {
  ------------------
  |  Branch (247:6): [True: 0, False: 329]
  ------------------
  248|      0|    DEBUGASSERT(!blen);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:5): [True: 0, False: 0]
  |  Branch (248:5): [True: 0, False: 0]
  ------------------
  249|      0|    return cw_out_cb_write(data, wcb, wcb_data, otype,
  250|      0|                           buf, blen, &nwritten);
  251|      0|  }
  252|    329|  else {
  253|    656|    while(blen && !data->req.writer.paused) {
  ------------------
  |  Branch (253:11): [True: 329, False: 327]
  |  Branch (253:19): [True: 329, False: 0]
  ------------------
  254|    329|      if(!flush_all && blen < min_write)
  ------------------
  |  Branch (254:10): [True: 329, False: 0]
  |  Branch (254:24): [True: 0, False: 329]
  ------------------
  255|      0|        break;
  256|    329|      wlen = max_write ? CURLMIN(blen, max_write) : blen;
  ------------------
  |  | 1292|    329|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 329, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (256:14): [True: 329, False: 0]
  ------------------
  257|    329|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (257:10): [True: 329, False: 0]
  ------------------
  258|    329|        result = Curl_pgrs_deliver_check(data, wlen);
  259|    329|      if(!result)
  ------------------
  |  Branch (259:10): [True: 327, False: 2]
  ------------------
  260|    327|        result = cw_out_cb_write(data, wcb, wcb_data, otype,
  261|    327|                                 buf, wlen, &nwritten);
  262|    329|      if(result)
  ------------------
  |  Branch (262:10): [True: 2, False: 327]
  ------------------
  263|      2|        return result;
  264|    327|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (264:10): [True: 327, False: 0]
  ------------------
  265|    327|        Curl_pgrs_deliver_inc(data, nwritten);
  266|    327|      *pconsumed += nwritten;
  267|    327|      blen -= nwritten;
  268|    327|      buf += nwritten;
  269|    327|    }
  270|    329|  }
  271|    327|  return CURLE_OK;
  272|    329|}
cw-out.c:cw_get_writefunc:
  146|  1.49k|{
  147|  1.49k|  switch(otype) {
  148|    329|  case CW_OUT_BODY:
  ------------------
  |  Branch (148:3): [True: 329, False: 1.16k]
  ------------------
  149|    329|  case CW_OUT_BODY_0LEN:
  ------------------
  |  Branch (149:3): [True: 0, False: 1.49k]
  ------------------
  150|    329|    *pwcb = data->set.fwrite_func;
  151|    329|    *pwcb_data = data->set.out;
  152|    329|    *pmax_write = CURL_MAX_WRITE_SIZE;
  ------------------
  |  |  265|    329|#define CURL_MAX_WRITE_SIZE 16384
  ------------------
  153|       |    /* if we ever want buffering of BODY output, we can set `min_write`
  154|       |     * the preferred size. The default should always be to pass data
  155|       |     * to the client as it comes without delay */
  156|    329|    *pmin_write = 0;
  157|    329|    break;
  158|  1.16k|  case CW_OUT_HDS:
  ------------------
  |  Branch (158:3): [True: 1.16k, False: 329]
  ------------------
  159|  1.16k|    *pwcb = data->set.fwrite_header ? data->set.fwrite_header :
  ------------------
  |  Branch (159:13): [True: 0, False: 1.16k]
  ------------------
  160|  1.16k|             (data->set.writeheader ? data->set.fwrite_func : NULL);
  ------------------
  |  Branch (160:15): [True: 0, False: 1.16k]
  ------------------
  161|  1.16k|    *pwcb_data = data->set.writeheader;
  162|  1.16k|    *pmax_write = 0; /* do not chunk-write headers, write them as they are */
  163|  1.16k|    *pmin_write = 0;
  164|  1.16k|    break;
  165|      0|  default:
  ------------------
  |  Branch (165:3): [True: 0, False: 1.49k]
  ------------------
  166|      0|    *pwcb = NULL;
  167|      0|    *pwcb_data = NULL;
  168|      0|    *pmax_write = CURL_MAX_WRITE_SIZE;
  ------------------
  |  |  265|      0|#define CURL_MAX_WRITE_SIZE 16384
  ------------------
  169|      0|    *pmin_write = 0;
  170|  1.49k|  }
  171|  1.49k|}
cw-out.c:cw_out_cb_write:
  179|    327|{
  180|    327|  size_t nwritten;
  181|    327|  CURLcode result;
  182|       |
  183|    327|  NOVERBOSE((void)otype);
  ------------------
  |  | 1614|    327|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1187|    327|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1187:35): [Folded, False: 327]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  184|       |
  185|    327|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1079|    327|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (185:3): [True: 0, False: 327]
  |  Branch (185:3): [True: 327, False: 0]
  ------------------
  186|    327|  *pnwritten = 0;
  187|    327|  {
  188|    327|    struct Curl_mapi_guard guard;
  189|    327|    CURL_CBAPI_START(&guard, data, easy_cw_out_cb);
  ------------------
  |  |  195|    327|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  190|    327|    nwritten = wcb((char *)CURL_UNCONST(buf), 1, blen, wcb_data);
  ------------------
  |  |  864|    327|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  191|    327|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|    327|  Curl_cbapi_leave(g)
  ------------------
  192|    327|  }
  193|    327|  CURL_TRC_WRITE(data, "[OUT] wrote %zu %s bytes, type=%x -> %zu",
  ------------------
  |  |  158|    327|  do {                                                     \
  |  |  159|    327|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|    327|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    654|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 327, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 327]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    654|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|    327|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    327|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (160:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  161|    327|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 327]
  |  |  ------------------
  ------------------
  194|    327|                 blen, (otype == CW_OUT_HDS) ? "header" : "body",
  195|    327|                 (unsigned int)otype, nwritten);
  196|    327|  if(nwritten == CURL_WRITEFUNC_PAUSE) {
  ------------------
  |  |  277|    327|#define CURL_WRITEFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (196:6): [True: 0, False: 327]
  ------------------
  197|      0|    if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  214|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (197:8): [True: 0, False: 0]
  ------------------
  198|       |      /* Protocols that work without network cannot be paused. This is
  199|       |         actually only file:// now, and it cannot pause since the transfer is
  200|       |         not done using the "normal" procedure. */
  201|      0|      failf(data, "Write callback asked for PAUSE when not supported");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  202|      0|      return CURLE_WRITE_ERROR;
  203|      0|    }
  204|      0|    data->req.writer.paused = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  205|      0|    CURL_TRC_WRITE(data, "[OUT] PAUSE requested by client");
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  206|      0|    result = Curl_xfer_pause_recv(data, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  207|      0|    return result ? result : CURLE_AGAIN;
  ------------------
  |  Branch (207:12): [True: 0, False: 0]
  ------------------
  208|      0|  }
  209|    327|  else if(nwritten == CURL_WRITEFUNC_ERROR) {
  ------------------
  |  |  281|    327|#define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
  ------------------
  |  Branch (209:11): [True: 0, False: 327]
  ------------------
  210|      0|    failf(data, "client returned ERROR on write of %zu bytes", blen);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  211|      0|    return CURLE_WRITE_ERROR;
  212|      0|  }
  213|    327|  else if(nwritten != blen) {
  ------------------
  |  Branch (213:11): [True: 0, False: 327]
  ------------------
  214|      0|    failf(data, "Failure writing output to destination, "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  215|      0|          "passed %zu returned %zu", blen, nwritten);
  216|      0|    return CURLE_WRITE_ERROR;
  217|      0|  }
  218|    327|  *pnwritten = nwritten;
  219|    327|  return CURLE_OK;
  220|    327|}
cw-out.c:cw_out_bufs_free:
  113|  6.25k|{
  114|  6.25k|  while(ctx->buf) {
  ------------------
  |  Branch (114:9): [True: 0, False: 6.25k]
  ------------------
  115|      0|    struct cw_out_buf *next = ctx->buf->next;
  116|      0|    cw_out_buf_free(ctx->buf);
  117|      0|    ctx->buf = next;
  118|      0|  }
  119|  6.25k|}
cw-out.c:cw_out_flush:
  475|  6.24k|{
  476|       |  return cw_out_do_flush(data, writer, FALSE);
  ------------------
  |  | 1056|  6.24k|#define FALSE false
  ------------------
  477|  6.24k|}
cw-out.c:cw_out_close:
  133|  6.25k|{
  134|  6.25k|  struct cw_out_ctx *ctx = writer->ctx;
  135|       |
  136|  6.25k|  (void)data;
  137|  6.25k|  cw_out_bufs_free(ctx);
  138|  6.25k|}
cw-out.c:cw_out_do_flush:
  453|  12.4k|{
  454|  12.4k|  struct cw_out_ctx *ctx = (struct cw_out_ctx *)cw_out;
  455|       |
  456|  12.4k|  if(ctx->errored)
  ------------------
  |  Branch (456:6): [True: 0, False: 12.4k]
  ------------------
  457|      0|    return CURLE_WRITE_ERROR;
  458|       |
  459|  12.4k|  if(!data->req.writer.paused && ctx->buf) {
  ------------------
  |  Branch (459:6): [True: 12.4k, False: 0]
  |  Branch (459:34): [True: 0, False: 12.4k]
  ------------------
  460|      0|    CURLcode result;
  461|       |
  462|      0|    CURL_TRC_WRITE(data, "[OUT] flush");
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  463|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
  464|      0|    if(result) {
  ------------------
  |  Branch (464:8): [True: 0, False: 0]
  ------------------
  465|      0|      ctx->errored = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  466|      0|      cw_out_bufs_free(ctx);
  467|      0|      return result;
  468|      0|    }
  469|      0|  }
  470|  12.4k|  return CURLE_OK;
  471|  12.4k|}

Curl_dnscache_prune:
  171|  6.25k|{
  172|  6.25k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  173|       |  /* the timeout may be set -1 (forever) */
  174|  6.25k|  timediff_t timeout_ms = data->set.dns_cache_timeout_ms;
  175|       |
  176|  6.25k|  if(!dnscache || (timeout_ms == -1))
  ------------------
  |  Branch (176:6): [True: 0, False: 6.25k]
  |  Branch (176:19): [True: 0, False: 6.25k]
  ------------------
  177|       |    /* NULL hostcache means we cannot do it */
  178|      0|    return;
  179|       |
  180|  6.25k|  dnscache_lock(data, dnscache);
  181|       |
  182|  6.25k|  do {
  183|       |    /* Remove outdated and unused entries from the hostcache */
  184|  6.25k|    timediff_t oldest_ms =
  185|  6.25k|      dnscache_prune(&dnscache->entries, timeout_ms, *Curl_pgrs_now(data));
  186|       |
  187|  6.25k|    if(Curl_hash_count(&dnscache->entries) > MAX_DNS_CACHE_SIZE)
  ------------------
  |  |   61|  6.25k|#define MAX_DNS_CACHE_SIZE 29999
  ------------------
  |  Branch (187:8): [True: 0, False: 6.25k]
  ------------------
  188|       |      /* prune the ones over half this age */
  189|      0|      timeout_ms = oldest_ms / 2;
  190|  6.25k|    else
  191|  6.25k|      break;
  192|       |
  193|       |    /* if the cache size is still too big, use the oldest age as new prune
  194|       |       limit */
  195|  6.25k|  } while(timeout_ms);
  ------------------
  |  Branch (195:11): [True: 0, False: 0]
  ------------------
  196|       |
  197|  6.25k|  dnscache_unlock(data, dnscache);
  198|  6.25k|}
Curl_dnscache_get:
  303|  8.05k|{
  304|  8.05k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  305|  8.05k|  struct Curl_dns_entry *dns = NULL;
  306|  8.05k|  CURLcode result = CURLE_OK;
  307|       |
  308|  8.05k|  dnscache_lock(data, dnscache);
  309|  8.05k|  result = fetch_addr(data, dnscache, dns_queries, hostname, port, &dns);
  310|  8.05k|  if(!result && dns)
  ------------------
  |  Branch (310:6): [True: 8.03k, False: 21]
  |  Branch (310:17): [True: 24, False: 8.00k]
  ------------------
  311|     24|    dns->refcount++; /* we pass out a reference */
  312|  8.02k|  else if(result) {
  ------------------
  |  Branch (312:11): [True: 21, False: 8.00k]
  ------------------
  313|     21|    DEBUGASSERT(!dns);
  ------------------
  |  | 1079|     21|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (313:5): [True: 0, False: 21]
  |  Branch (313:5): [True: 21, False: 0]
  ------------------
  314|     21|    dns = NULL;
  315|     21|  }
  316|  8.05k|  dnscache_unlock(data, dnscache);
  317|       |
  318|  8.05k|  CURL_TRC_DNS(data, "cache lookup %s:%u queries=%s -> %d %sfound",
  ------------------
  |  |  168|  8.05k|  do {                                 \
  |  |  169|  8.05k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  8.05k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  8.05k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  16.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 8.05k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 8.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  16.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  8.05k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  8.05k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (170:26): [True: 0, False: 0]
  |  |  ------------------
  |  |  171|  8.05k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 8.05k]
  |  |  ------------------
  ------------------
  319|  8.05k|               hostname, port, Curl_resolv_query_str(dns_queries),
  320|  8.05k|               (int)result, dns ? "" : "not ");
  321|  8.05k|  *pentry = dns;
  322|  8.05k|  return result;
  323|  8.05k|}
dns_shuffle_addr:
  355|     33|{
  356|     33|  CURLcode result = CURLE_OK;
  357|     33|  const int num_addrs = num_addresses(*addr);
  358|       |
  359|     33|  if(num_addrs > 1) {
  ------------------
  |  Branch (359:6): [True: 23, False: 10]
  ------------------
  360|     23|    struct Curl_addrinfo **nodes;
  361|     23|    CURL_TRC_DNS(data, "Shuffling %d addresses", num_addrs);
  ------------------
  |  |  168|     23|  do {                                 \
  |  |  169|     23|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|     23|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|     23|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     46|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 23, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 23]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     46|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|     23|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|     23|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|     23|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 23]
  |  |  ------------------
  ------------------
  362|       |
  363|     23|    nodes = curlx_malloc(num_addrs * sizeof(*nodes));
  ------------------
  |  | 1473|     23|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  364|     23|    if(nodes) {
  ------------------
  |  Branch (364:8): [True: 23, False: 0]
  ------------------
  365|     23|      int i;
  366|     23|      unsigned int *rnd;
  367|     23|      const size_t rnd_size = num_addrs * sizeof(*rnd);
  368|       |
  369|       |      /* build a plain array of Curl_addrinfo pointers */
  370|     23|      nodes[0] = *addr;
  371|     46|      for(i = 1; i < num_addrs; i++) {
  ------------------
  |  Branch (371:18): [True: 23, False: 23]
  ------------------
  372|     23|        nodes[i] = nodes[i - 1]->ai_next;
  373|     23|      }
  374|       |
  375|     23|      rnd = curlx_malloc(rnd_size);
  ------------------
  |  | 1473|     23|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  376|     23|      if(rnd) {
  ------------------
  |  Branch (376:10): [True: 23, False: 0]
  ------------------
  377|       |        /* Fisher-Yates shuffle */
  378|     23|        if(Curl_rand(data, (unsigned char *)rnd, rnd_size) == CURLE_OK) {
  ------------------
  |  |   33|     23|#define Curl_rand(a, b, c) Curl_rand_bytes(a, TRUE, b, c)
  |  |  ------------------
  |  |  |  | 1053|     23|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (378:12): [True: 23, False: 0]
  ------------------
  379|     23|          struct Curl_addrinfo *swap_tmp;
  380|     46|          for(i = num_addrs - 1; i > 0; i--) {
  ------------------
  |  Branch (380:34): [True: 23, False: 23]
  ------------------
  381|     23|            swap_tmp = nodes[rnd[i] % (unsigned int)(i + 1)];
  382|     23|            nodes[rnd[i] % (unsigned int)(i + 1)] = nodes[i];
  383|     23|            nodes[i] = swap_tmp;
  384|     23|          }
  385|       |
  386|       |          /* relink list in the new order */
  387|     46|          for(i = 1; i < num_addrs; i++) {
  ------------------
  |  Branch (387:22): [True: 23, False: 23]
  ------------------
  388|     23|            nodes[i - 1]->ai_next = nodes[i];
  389|     23|          }
  390|       |
  391|     23|          nodes[num_addrs - 1]->ai_next = NULL;
  392|     23|          *addr = nodes[0];
  393|     23|        }
  394|     23|        curlx_free(rnd);
  ------------------
  |  | 1478|     23|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  395|     23|      }
  396|      0|      else
  397|      0|        result = CURLE_OUT_OF_MEMORY;
  398|     23|      curlx_free(nodes);
  ------------------
  |  | 1478|     23|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  399|     23|    }
  400|      0|    else
  401|      0|      result = CURLE_OUT_OF_MEMORY;
  402|     23|  }
  403|     33|  return result;
  404|     33|}
Curl_dnsc_mk_addr:
  522|  5.70k|{
  523|  5.70k|  struct Curl_dns_entry *dns = dnsc_entry_create(
  524|  5.70k|    data, hostname, hostname ? strlen(hostname) : 0, port, FALSE);
  ------------------
  |  | 1056|  5.70k|#define FALSE false
  ------------------
  |  Branch (524:21): [True: 5.68k, False: 28]
  ------------------
  525|       |  dns = dnsc_entry_assign_addr(data, dns, dns_queries, paddr, NULL);
  526|  5.70k|  return dns;
  527|  5.70k|}
Curl_dnsc_mk_addr2:
  535|     17|{
  536|     17|  struct Curl_dns_entry *dns = dnsc_entry_create(
  537|     17|    data, hostname, hostname ? strlen(hostname) : 0, port, FALSE);
  ------------------
  |  | 1056|     17|#define FALSE false
  ------------------
  |  Branch (537:21): [True: 17, False: 0]
  ------------------
  538|     17|  dns = dnsc_entry_assign_addr(data, dns, dns_queries, paddr1, paddr2);
  539|     17|  return dns;
  540|     17|}
Curl_dnscache_add:
  657|  5.68k|{
  658|  5.68k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  659|  5.68k|  char id[MAX_HOSTCACHE_LEN];
  660|  5.68k|  size_t idlen;
  661|       |
  662|  5.68k|  if(!dnscache)
  ------------------
  |  Branch (662:6): [True: 0, False: 5.68k]
  ------------------
  663|      0|    return CURLE_FAILED_INIT;
  664|  5.68k|  if(!entry || (entry->type == CURL_DNST_INIT))
  ------------------
  |  |   39|  5.68k|#define CURL_DNST_INIT      '\0'
  ------------------
  |  Branch (664:6): [True: 0, False: 5.68k]
  |  Branch (664:16): [True: 0, False: 5.68k]
  ------------------
  665|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  666|       |
  667|       |  /* Create an entry id, based upon the hostname and port */
  668|  5.68k|  idlen = create_dnscache_id(entry->type, entry->hostname, 0, entry->port,
  669|  5.68k|                             id, sizeof(id));
  670|       |
  671|       |  /* Store the resolved data in our DNS cache and up ref count */
  672|  5.68k|  dnscache_lock(data, dnscache);
  673|  5.68k|  if(!Curl_hash_add(&dnscache->entries, id, idlen + 1, (void *)entry)) {
  ------------------
  |  Branch (673:6): [True: 0, False: 5.68k]
  ------------------
  674|      0|    dnscache_unlock(data, dnscache);
  675|      0|    return CURLE_OUT_OF_MEMORY;
  676|      0|  }
  677|  5.68k|  entry->refcount++;
  678|  5.68k|  dnscache_unlock(data, dnscache);
  679|  5.68k|  CURL_TRC_DNS(data, "cached entry for %s:%u queries=%s",
  ------------------
  |  |  168|  5.68k|  do {                                 \
  |  |  169|  5.68k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  5.68k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  5.68k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 5.68k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.68k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  5.68k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  5.68k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  5.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 5.68k]
  |  |  ------------------
  ------------------
  680|  5.68k|               entry->hostname, entry->port,
  681|  5.68k|               Curl_resolv_query_str(entry->dns_queries));
  682|  5.68k|  return CURLE_OK;
  683|  5.68k|}
Curl_dnscache_add_negative:
  689|    167|{
  690|    167|  struct Curl_dnscache *dnscache = dnscache_get(data);
  691|    167|  struct Curl_dns_entry *dns = NULL;
  692|    167|  CURLcode result = CURLE_OK;
  693|       |
  694|    167|  DEBUGASSERT(dnscache);
  ------------------
  |  | 1079|    167|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (694:3): [True: 0, False: 167]
  |  Branch (694:3): [True: 167, False: 0]
  ------------------
  695|    167|  if(!dnscache)
  ------------------
  |  Branch (695:6): [True: 0, False: 167]
  ------------------
  696|      0|    return CURLE_FAILED_INIT;
  697|       |
  698|    167|  dnscache_lock(data, dnscache);
  699|       |
  700|    167|  if(dns_queries & CURL_DNSQ_ADDR) {
  ------------------
  |  |   55|    167|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   51|    167|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   52|    167|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
  |  Branch (700:6): [True: 167, False: 0]
  ------------------
  701|       |    /* put this new host in the cache */
  702|    167|    dns = dnsc_add_addr(data, dnscache, dns_queries, NULL,
  703|    167|                            host, strlen(host), port, FALSE);
  ------------------
  |  | 1056|    167|#define FALSE false
  ------------------
  704|    167|    if(!dns)
  ------------------
  |  Branch (704:8): [True: 0, False: 167]
  ------------------
  705|      0|      result = CURLE_OUT_OF_MEMORY;
  706|    167|  }
  707|       |#ifdef USE_HTTPSRR
  708|       |  else if(dns_queries == CURL_DNSQ_HTTPS) {
  709|       |    dns = dnsc_add_https(data, dnscache, NULL,
  710|       |                            host, strlen(host), port, FALSE);
  711|       |    if(!dns)
  712|       |      result = CURLE_OUT_OF_MEMORY;
  713|       |  }
  714|       |#endif
  715|      0|  else {
  716|       |    /* a query we do not know, just cache nothing */
  717|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (717:5): [Folded, False: 0]
  |  Branch (717:5): [Folded, False: 0]
  ------------------
  718|      0|  }
  719|       |
  720|    167|  if(dns) {
  ------------------
  |  Branch (720:6): [True: 167, False: 0]
  ------------------
  721|       |    /* release the returned reference; the cache itself will keep the
  722|       |     * entry alive: */
  723|    167|    dns->refcount--;
  724|    167|    CURL_TRC_DNS(data, "cache negative name resolve for %s:%d type=%s",
  ------------------
  |  |  168|    167|  do {                                 \
  |  |  169|    167|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    167|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|    167|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|    334|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 167, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 167]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|    334|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|    167|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    167|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    167|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 167]
  |  |  ------------------
  ------------------
  725|    167|                 host, port, Curl_resolv_query_str(dns_queries));
  726|    167|  }
  727|    167|  dnscache_unlock(data, dnscache);
  728|    167|  return result;
  729|    167|}
Curl_dns_entry_unlink:
  740|  12.4k|{
  741|  12.4k|  if(*pdns) {
  ------------------
  |  Branch (741:6): [True: 5.74k, False: 6.66k]
  ------------------
  742|  5.74k|    struct Curl_dnscache *dnscache = dnscache_get(data);
  743|  5.74k|    struct Curl_dns_entry *dns = *pdns;
  744|  5.74k|    *pdns = NULL;
  745|  5.74k|    dnscache_lock(data, dnscache);
  746|  5.74k|    dns->refcount--;
  747|  5.74k|    if(dns->refcount == 0)
  ------------------
  |  Branch (747:8): [True: 45, False: 5.70k]
  ------------------
  748|     45|      dnscache_entry_free(dns);
  749|  5.74k|    dnscache_unlock(data, dnscache);
  750|  5.74k|  }
  751|  12.4k|}
Curl_dnscache_init:
  766|  11.7k|{
  767|  11.7k|  Curl_hash_init(&dns->entries, size, Curl_hash_str, curlx_str_key_compare,
  768|  11.7k|                 dnscache_entry_dtor);
  769|  11.7k|}
Curl_dnscache_destroy:
  772|  11.7k|{
  773|  11.7k|  Curl_hash_destroy(&dns->entries);
  774|  11.7k|}
dnscache.c:dnscache_get:
  144|  25.9k|{
  145|  25.9k|  if(data->share && data->share->specifier & (1 << CURL_LOCK_DATA_DNS))
  ------------------
  |  Branch (145:6): [True: 0, False: 25.9k]
  |  Branch (145:21): [True: 0, False: 0]
  ------------------
  146|      0|    return &data->share->dnscache;
  147|  25.9k|  if(data->multi)
  ------------------
  |  Branch (147:6): [True: 25.9k, False: 0]
  ------------------
  148|  25.9k|    return &data->multi->dnscache;
  149|      0|  return NULL;
  150|  25.9k|}
dnscache.c:dnscache_lock:
  154|  25.9k|{
  155|  25.9k|  if(data->share && dnscache == &data->share->dnscache)
  ------------------
  |  Branch (155:6): [True: 0, False: 25.9k]
  |  Branch (155:21): [True: 0, False: 0]
  ------------------
  156|      0|    Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
  157|  25.9k|}
dnscache.c:dnscache_prune:
  129|  6.25k|{
  130|  6.25k|  struct dnscache_prune_data user;
  131|       |
  132|  6.25k|  user.max_age_ms = cache_timeout_ms;
  133|  6.25k|  user.now = now;
  134|  6.25k|  user.oldest_ms = 0;
  135|       |
  136|  6.25k|  Curl_hash_clean_with_criterium(hostcache,
  137|  6.25k|                                 (void *)&user,
  138|  6.25k|                                 dnscache_entry_is_stale);
  139|       |
  140|  6.25k|  return user.oldest_ms;
  141|  6.25k|}
dnscache.c:dnscache_entry_is_stale:
  105|  6.00k|{
  106|  6.00k|  struct dnscache_prune_data *prune = (struct dnscache_prune_data *)datap;
  107|  6.00k|  struct Curl_dns_entry *dns = (struct Curl_dns_entry *)hc;
  108|       |
  109|  6.00k|  if(dns->timestamp.tv_sec || dns->timestamp.tv_usec) {
  ------------------
  |  Branch (109:6): [True: 6.00k, False: 0]
  |  Branch (109:31): [True: 0, False: 0]
  ------------------
  110|       |    /* get age in milliseconds */
  111|  6.00k|    timediff_t age = curlx_ptimediff_ms(&prune->now, &dns->timestamp);
  112|  6.00k|    if(!dns->addr)
  ------------------
  |  Branch (112:8): [True: 230, False: 5.77k]
  ------------------
  113|    230|      age *= 2; /* negative entries age twice as fast */
  114|  6.00k|    if(age >= prune->max_age_ms)
  ------------------
  |  Branch (114:8): [True: 7, False: 6.00k]
  ------------------
  115|      7|      return TRUE;
  ------------------
  |  | 1053|      7|#define TRUE true
  ------------------
  116|  6.00k|    if(age > prune->oldest_ms)
  ------------------
  |  Branch (116:8): [True: 2.75k, False: 3.25k]
  ------------------
  117|  2.75k|      prune->oldest_ms = age;
  118|  6.00k|  }
  119|  6.00k|  return FALSE;
  ------------------
  |  | 1056|  6.00k|#define FALSE false
  ------------------
  120|  6.00k|}
dnscache.c:dnscache_unlock:
  161|  25.9k|{
  162|  25.9k|  if(data->share && dnscache == &data->share->dnscache)
  ------------------
  |  Branch (162:6): [True: 0, False: 25.9k]
  |  Branch (162:21): [True: 0, False: 0]
  ------------------
  163|      0|    Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
  164|  25.9k|}
dnscache.c:fetch_addr:
  217|  8.05k|{
  218|  8.05k|  struct Curl_dns_entry *dns = NULL;
  219|  8.05k|  char entry_id[MAX_HOSTCACHE_LEN];
  220|  8.05k|  size_t entry_len;
  221|  8.05k|  char entry_type = CURL_DNSQ_IS_ADDR(dns_queries) ?
  ------------------
  |  |   56|  8.05k|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|  8.05k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  8.05k|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  8.05k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 8.05k, False: 0]
  |  |  ------------------
  ------------------
  222|  8.05k|                    CURL_DNST_ADDR : CURL_DNST_HTTPS;
  ------------------
  |  |   40|  8.05k|#define CURL_DNST_ADDR      'A'
  ------------------
                                  CURL_DNST_ADDR : CURL_DNST_HTTPS;
  ------------------
  |  |   41|  8.05k|#define CURL_DNST_HTTPS     'H'
  ------------------
  223|  8.05k|  CURLcode result = CURLE_OK;
  224|       |
  225|  8.05k|  *pdns = NULL;
  226|  8.05k|  if(!dnscache)
  ------------------
  |  Branch (226:6): [True: 0, False: 8.05k]
  ------------------
  227|      0|    return CURLE_OK;
  228|       |
  229|       |  /* Create an entry id, based upon the hostname and port */
  230|  8.05k|  entry_len = create_dnscache_id(entry_type, hostname, 0, port,
  231|  8.05k|                                 entry_id, sizeof(entry_id));
  232|       |
  233|       |  /* See if it is already in our dns cache */
  234|  8.05k|  dns = Curl_hash_pick(&dnscache->entries, entry_id, entry_len + 1);
  235|       |
  236|       |  /* No entry found in cache, check if we might have a wildcard entry */
  237|  8.05k|  if(!dns && data->state.wildcard_resolve && CURL_DNSQ_IS_ADDR(dns_queries)) {
  ------------------
  |  |   56|      0|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|      0|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (237:6): [True: 7.97k, False: 81]
  |  Branch (237:14): [True: 0, False: 7.97k]
  ------------------
  238|      0|    entry_len = create_dnscache_id(CURL_DNST_ADDR, "*", 1, port,
  ------------------
  |  |   40|      0|#define CURL_DNST_ADDR      'A'
  ------------------
  239|      0|                                   entry_id, sizeof(entry_id));
  240|       |
  241|       |    /* See if it is already in our dns cache */
  242|      0|    dns = Curl_hash_pick(&dnscache->entries, entry_id, entry_len + 1);
  243|      0|  }
  244|       |
  245|  8.05k|  if(dns && (data->set.dns_cache_timeout_ms != -1)) {
  ------------------
  |  Branch (245:6): [True: 81, False: 7.97k]
  |  Branch (245:13): [True: 81, False: 0]
  ------------------
  246|       |    /* See whether the returned entry is stale. Done before we release lock */
  247|     81|    struct dnscache_prune_data user;
  248|       |
  249|     81|    user.now = *Curl_pgrs_now(data);
  250|     81|    user.max_age_ms = data->set.dns_cache_timeout_ms;
  251|     81|    user.oldest_ms = 0;
  252|       |
  253|     81|    if(dnscache_entry_is_stale(&user, dns)) {
  ------------------
  |  Branch (253:8): [True: 1, False: 80]
  ------------------
  254|      1|      infof(data, "Hostname in DNS cache was stale, zapped");
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  323|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  255|      1|      dns = NULL; /* the memory deallocation is being handled by the hash */
  256|      1|      Curl_hash_delete(&dnscache->entries, entry_id, entry_len + 1);
  257|      1|    }
  258|     81|  }
  259|       |
  260|       |  /* We need to cache address information and HTTPS-RR separately. */
  261|  8.05k|  if(dns && CURL_DNSQ_IS_ADDR(dns_queries)) {
  ------------------
  |  |   56|     80|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|     80|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|     80|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|     80|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 80, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (261:6): [True: 80, False: 7.97k]
  ------------------
  262|     80|    if((uint8_t)(dns->dns_queries & dns_queries) !=
  ------------------
  |  Branch (262:8): [True: 35, False: 45]
  ------------------
  263|     80|       (uint8_t)(dns_queries & CURL_DNSQ_ADDR)) {
  ------------------
  |  |   55|     80|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   51|     80|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   52|     80|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
  264|       |      /* The entry does not cover all wanted address queries, a miss. */
  265|     35|      dns = NULL;
  266|     35|    }
  267|     45|    else if(!(dns->dns_responses & dns_queries)) {
  ------------------
  |  Branch (267:13): [True: 21, False: 24]
  ------------------
  268|       |      /* The entry has no responses for the wanted DNS queries. */
  269|     21|      CURL_TRC_DNS(data, "cache entry does not have type=%s addresses",
  ------------------
  |  |  168|     21|  do {                                 \
  |  |  169|     21|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|     21|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|     21|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     42|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 21, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 21]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     42|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|     21|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|     21|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|     21|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 21]
  |  |  ------------------
  ------------------
  270|     21|                   Curl_resolv_query_str(dns_queries));
  271|     21|      dns = NULL;
  272|     21|      result = CURLE_COULDNT_RESOLVE_HOST;
  273|     21|    }
  274|     24|    else if(dns && !dns->addr) { /* negative entry */
  ------------------
  |  Branch (274:13): [True: 24, False: 0]
  |  Branch (274:20): [True: 0, False: 24]
  ------------------
  275|      0|      dns = NULL;
  276|      0|      result = CURLE_COULDNT_RESOLVE_HOST;
  277|      0|    }
  278|     80|  }
  279|       |
  280|  8.05k|  *pdns = dns;
  281|  8.05k|  return result;
  282|  8.05k|}
dnscache.c:num_addresses:
  330|     33|{
  331|     33|  int i = 0;
  332|     89|  while(addr) {
  ------------------
  |  Branch (332:9): [True: 56, False: 33]
  ------------------
  333|     56|    addr = addr->ai_next;
  334|     56|    i++;
  335|     56|  }
  336|     33|  return i;
  337|     33|}
dnscache.c:dnsc_entry_create:
  423|  5.89k|{
  424|  5.89k|  struct Curl_dns_entry *dns = NULL;
  425|       |
  426|       |  /* Create a new cache entry, struct already has the hostname NUL */
  427|  5.89k|  dns = curlx_calloc(1, sizeof(struct Curl_dns_entry) + hostlen);
  ------------------
  |  | 1475|  5.89k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  428|  5.89k|  if(!dns)
  ------------------
  |  Branch (428:6): [True: 0, False: 5.89k]
  ------------------
  429|      0|    goto out;
  430|       |
  431|  5.89k|  dns->refcount = 1; /* the cache has the first reference */
  432|  5.89k|  dns->port = port;
  433|  5.89k|  if(hostlen)
  ------------------
  |  Branch (433:6): [True: 5.86k, False: 28]
  ------------------
  434|  5.86k|    memcpy(dns->hostname, hostname, hostlen);
  435|       |
  436|  5.89k|  if(permanent) {
  ------------------
  |  Branch (436:6): [True: 0, False: 5.89k]
  ------------------
  437|      0|    dns->timestamp.tv_sec = 0; /* an entry that never goes stale */
  438|      0|    dns->timestamp.tv_usec = 0; /* an entry that never goes stale */
  439|      0|  }
  440|  5.89k|  else {
  441|  5.89k|    dns->timestamp = *Curl_pgrs_now(data);
  442|  5.89k|  }
  443|       |
  444|  5.89k|out:
  445|  5.89k|  return dns;
  446|  5.89k|}
dnscache.c:dnsc_entry_assign_addr:
  455|  5.89k|{
  456|  5.89k|  if(!dns)
  ------------------
  |  Branch (456:6): [True: 0, False: 5.89k]
  ------------------
  457|      0|    goto out;
  458|       |  /* only do this when this is the only reference */
  459|  5.89k|  DEBUGASSERT(dns->refcount == 1);
  ------------------
  |  | 1079|  5.89k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (459:3): [True: 0, False: 5.89k]
  |  Branch (459:3): [True: 5.89k, False: 0]
  ------------------
  460|  5.89k|  DEBUGASSERT(dns->type == CURL_DNST_INIT);
  ------------------
  |  | 1079|  5.89k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (460:3): [True: 0, False: 5.89k]
  |  Branch (460:3): [True: 5.89k, False: 0]
  ------------------
  461|       |
  462|  5.89k|  dns->type = CURL_DNST_ADDR;
  ------------------
  |  |   40|  5.89k|#define CURL_DNST_ADDR      'A'
  ------------------
  463|       |  /* queries should only be about addresses */
  464|  5.89k|  DEBUGASSERT(!(dns_queries & ~CURL_DNSQ_ADDR));
  ------------------
  |  | 1079|  5.89k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (464:3): [True: 0, False: 5.89k]
  |  Branch (464:3): [True: 5.89k, False: 0]
  ------------------
  465|  5.89k|  dns->dns_queries = (dns_queries & CURL_DNSQ_ADDR);
  ------------------
  |  |   55|  5.89k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   51|  5.89k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   52|  5.89k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
  466|       |
  467|       |  /* Take the given address lists into the entry */
  468|  5.89k|  if(paddr1 && *paddr1) {
  ------------------
  |  Branch (468:6): [True: 5.72k, False: 171]
  |  Branch (468:16): [True: 5.72k, False: 0]
  ------------------
  469|  5.72k|    dns->addr = *paddr1;
  470|  5.72k|    *paddr1 = NULL;
  471|  5.72k|  }
  472|  5.89k|  if(paddr2 && *paddr2) {
  ------------------
  |  Branch (472:6): [True: 4, False: 5.88k]
  |  Branch (472:16): [True: 4, False: 0]
  ------------------
  473|      4|    struct Curl_addrinfo **phead = &dns->addr;
  474|      4|    while(*phead)
  ------------------
  |  Branch (474:11): [True: 0, False: 4]
  ------------------
  475|      0|      phead = &(*phead)->ai_next;
  476|      4|    *phead = *paddr2;
  477|      4|    *paddr2 = NULL;
  478|      4|  }
  479|       |
  480|  5.89k|  if((dns_queries & CURL_DNSQ_A) &&
  ------------------
  |  |   51|  5.89k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (480:6): [True: 5.82k, False: 71]
  ------------------
  481|  5.82k|     dnscache_ai_has_family(dns->addr, PF_INET))
  ------------------
  |  Branch (481:6): [True: 5.61k, False: 210]
  ------------------
  482|  5.61k|    dns->dns_responses |= CURL_DNSQ_A;
  ------------------
  |  |   51|  5.61k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  483|       |
  484|  5.89k|#ifdef USE_IPV6
  485|  5.89k|  if((dns_queries & CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  5.89k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (485:6): [True: 5.69k, False: 198]
  ------------------
  486|  5.69k|     dnscache_ai_has_family(dns->addr, PF_INET6))
  ------------------
  |  Branch (486:6): [True: 204, False: 5.49k]
  ------------------
  487|    204|    dns->dns_responses |= CURL_DNSQ_AAAA;
  ------------------
  |  |   52|    204|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  488|  5.89k|#endif /* USE_IPV6 */
  489|       |
  490|  5.89k|#ifndef CURL_DISABLE_SHUFFLE_DNS
  491|       |  /* shuffle addresses if requested */
  492|  5.89k|  if(data->set.dns_shuffle_addresses && dns->addr) {
  ------------------
  |  Branch (492:6): [True: 34, False: 5.85k]
  |  Branch (492:41): [True: 33, False: 1]
  ------------------
  493|     33|    CURLcode result = dns_shuffle_addr(data, &dns->addr);
  494|     33|    if(result) {
  ------------------
  |  Branch (494:8): [True: 0, False: 33]
  ------------------
  495|       |      /* free without lock, we are the sole owner */
  496|      0|      dnscache_entry_free(dns);
  497|      0|      dns = NULL;
  498|      0|      goto out;
  499|      0|    }
  500|     33|  }
  501|       |#else
  502|       |  (void)data;
  503|       |#endif
  504|       |
  505|  5.89k|out:
  506|  5.89k|  if(paddr1 && *paddr1) {
  ------------------
  |  Branch (506:6): [True: 5.72k, False: 171]
  |  Branch (506:16): [True: 0, False: 5.72k]
  ------------------
  507|      0|    Curl_freeaddrinfo(*paddr1);
  508|      0|    *paddr1 = NULL;
  509|      0|  }
  510|  5.89k|  if(paddr2 && *paddr2) {
  ------------------
  |  Branch (510:6): [True: 4, False: 5.88k]
  |  Branch (510:16): [True: 0, False: 4]
  ------------------
  511|      0|    Curl_freeaddrinfo(*paddr2);
  512|       |    *paddr2 = NULL;
  513|      0|  }
  514|  5.89k|  return dns;
  515|  5.89k|}
dnscache.c:dnscache_ai_has_family:
  409|  11.5k|{
  410|  17.0k|  for(; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (410:9): [True: 11.3k, False: 5.70k]
  ------------------
  411|  11.3k|    if(ai->ai_family == ai_family)
  ------------------
  |  Branch (411:8): [True: 5.81k, False: 5.52k]
  ------------------
  412|  5.81k|      return TRUE;
  ------------------
  |  | 1053|  5.81k|#define TRUE true
  ------------------
  413|  11.3k|  }
  414|  5.70k|  return FALSE;
  ------------------
  |  | 1056|  5.70k|#define FALSE false
  ------------------
  415|  11.5k|}
dnscache.c:create_dnscache_id:
   80|  13.8k|{
   81|  13.8k|  size_t len = nlen ? nlen : strlen(name);
  ------------------
  |  Branch (81:16): [True: 167, False: 13.7k]
  ------------------
   82|  13.8k|  DEBUGASSERT(buflen >= MAX_HOSTCACHE_LEN);
  ------------------
  |  | 1079|  13.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (82:3): [True: 0, False: 13.8k]
  |  Branch (82:3): [True: 13.8k, False: 0]
  ------------------
   83|  13.8k|  if(len > (buflen - 8))
  ------------------
  |  Branch (83:6): [True: 8, False: 13.8k]
  ------------------
   84|      8|    len = buflen - 8;
   85|       |  /* store and lower case the name */
   86|  13.8k|  buf[0] = type;
   87|  13.8k|  Curl_strntolower(buf + 1, name, len);
   88|  13.8k|  return curl_msnprintf(&buf[len + 1], 7, ":%u", port) + len + 1;
   89|  13.8k|}
dnscache.c:dnsc_add_addr:
  627|    167|{
  628|    167|  char entry_id[MAX_HOSTCACHE_LEN];
  629|    167|  size_t entry_len;
  630|    167|  struct Curl_dns_entry *dns;
  631|    167|  struct Curl_dns_entry *dns2;
  632|       |
  633|    167|  dns = dnsc_entry_create(data, hostname, hlen, port, permanent);
  634|    167|  dns = dnsc_entry_assign_addr(data, dns, dns_queries, paddr, NULL);
  635|    167|  if(!dns)
  ------------------
  |  Branch (635:6): [True: 0, False: 167]
  ------------------
  636|      0|    return NULL;
  637|       |
  638|       |  /* Create an entry id, based upon the hostname and port */
  639|    167|  entry_len = create_dnscache_id(CURL_DNST_ADDR, hostname, hlen, port,
  ------------------
  |  |   40|    167|#define CURL_DNST_ADDR      'A'
  ------------------
  640|    167|                                 entry_id, sizeof(entry_id));
  641|       |
  642|       |  /* Store the resolved data in our DNS cache. */
  643|    167|  dns2 = Curl_hash_add(&dnscache->entries, entry_id, entry_len + 1,
  644|    167|                       (void *)dns);
  645|    167|  if(!dns2) {
  ------------------
  |  Branch (645:6): [True: 0, False: 167]
  ------------------
  646|      0|    dnscache_entry_free(dns);
  647|      0|    return NULL;
  648|      0|  }
  649|       |
  650|    167|  dns = dns2;
  651|    167|  dns->refcount++;         /* mark entry as in-use */
  652|    167|  return dns;
  653|    167|}
dnscache.c:dnscache_entry_free:
   64|  5.89k|{
   65|  5.89k|  Curl_freeaddrinfo(dns->addr);
   66|       |#ifdef USE_HTTPSRR
   67|       |  Curl_httpsrr_destroy(dns->hinfo);
   68|       |#endif
   69|  5.89k|  curlx_free(dns);
  ------------------
  |  | 1478|  5.89k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   70|  5.89k|}
dnscache.c:dnscache_entry_dtor:
  754|  5.84k|{
  755|  5.84k|  struct Curl_dns_entry *dns = (struct Curl_dns_entry *)entry;
  756|  5.84k|  DEBUGASSERT(dns && (dns->refcount > 0));
  ------------------
  |  | 1079|  5.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (756:3): [True: 0, False: 5.84k]
  |  Branch (756:3): [True: 0, False: 0]
  |  Branch (756:3): [True: 5.84k, False: 0]
  |  Branch (756:3): [True: 5.84k, False: 0]
  ------------------
  757|  5.84k|  dns->refcount--;
  758|  5.84k|  if(dns->refcount == 0)
  ------------------
  |  Branch (758:6): [True: 5.84k, False: 0]
  ------------------
  759|  5.84k|    dnscache_entry_free(dns);
  760|  5.84k|}

doh_req_encode:
   86|    795|{
   87|    795|  const size_t hostlen = strlen(host);
   88|    795|  unsigned char *orig = dnsp;
   89|    795|  const char *hostp = host;
   90|       |
   91|       |  /* The expected output length is 16 bytes more than the length of
   92|       |   * the QNAME-encoding of the hostname.
   93|       |   *
   94|       |   * A valid DNS name may not contain a zero-length label, except at
   95|       |   * the end. For this reason, a name beginning with a dot, or
   96|       |   * containing a sequence of two or more consecutive dots, is invalid
   97|       |   * and cannot be encoded as a QNAME.
   98|       |   *
   99|       |   * If the hostname ends with a trailing dot, the corresponding
  100|       |   * QNAME-encoding is one byte longer than the hostname. If (as is
  101|       |   * also valid) the hostname is shortened by the omission of the
  102|       |   * trailing dot, then its QNAME-encoding will be two bytes longer
  103|       |   * than the hostname.
  104|       |   *
  105|       |   * Each [ label, dot ] pair is encoded as [ length, label ],
  106|       |   * preserving overall length. A final [ label ] without a dot is
  107|       |   * also encoded as [ length, label ], increasing overall length
  108|       |   * by one. The encoding is completed by appending a zero byte,
  109|       |   * representing the zero-length root label, again increasing
  110|       |   * the overall length by one.
  111|       |   */
  112|       |
  113|    795|  size_t expected_len;
  114|    795|  DEBUGASSERT(hostlen);
  ------------------
  |  | 1079|    795|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (114:3): [True: 0, False: 795]
  |  Branch (114:3): [True: 795, False: 0]
  ------------------
  115|    795|  expected_len = 12 + 1 + hostlen + 4;
  116|    795|  if(host[hostlen - 1] != '.')
  ------------------
  |  Branch (116:6): [True: 752, False: 43]
  ------------------
  117|    752|    expected_len++;
  118|       |
  119|    795|  if(expected_len > DOH_MAX_DNSREQ_SIZE)
  ------------------
  |  |   88|    795|#define DOH_MAX_DNSREQ_SIZE (256 + 16)
  ------------------
  |  Branch (119:6): [True: 0, False: 795]
  ------------------
  120|      0|    return DOH_DNS_NAME_TOO_LONG;
  121|       |
  122|    795|  if(len < expected_len)
  ------------------
  |  Branch (122:6): [True: 0, False: 795]
  ------------------
  123|      0|    return DOH_TOO_SMALL_BUFFER;
  124|       |
  125|    795|  *dnsp++ = 0; /* 16-bit id */
  126|    795|  *dnsp++ = 0;
  127|    795|  *dnsp++ = 0x01; /* |QR|   Opcode  |AA|TC|RD| Set the RD bit */
  128|    795|  *dnsp++ = '\0'; /* |RA|   Z    |   RCODE   |                */
  129|    795|  *dnsp++ = '\0';
  130|    795|  *dnsp++ = 1;    /* QDCOUNT (number of entries in the question section) */
  131|    795|  *dnsp++ = '\0';
  132|    795|  *dnsp++ = '\0'; /* ANCOUNT */
  133|    795|  *dnsp++ = '\0';
  134|    795|  *dnsp++ = '\0'; /* NSCOUNT */
  135|    795|  *dnsp++ = '\0';
  136|    795|  *dnsp++ = '\0'; /* ARCOUNT */
  137|       |
  138|       |  /* encode each label and store it in the QNAME */
  139|  1.74k|  while(*hostp) {
  ------------------
  |  Branch (139:9): [True: 955, False: 785]
  ------------------
  140|    955|    size_t labellen;
  141|    955|    const char *dot = strchr(hostp, '.');
  142|    955|    if(dot)
  ------------------
  |  Branch (142:8): [True: 210, False: 745]
  ------------------
  143|    210|      labellen = dot - hostp;
  144|    745|    else
  145|    745|      labellen = strlen(hostp);
  146|    955|    if((labellen > 63) || (!labellen)) {
  ------------------
  |  Branch (146:8): [True: 1, False: 954]
  |  Branch (146:27): [True: 9, False: 945]
  ------------------
  147|       |      /* label is too long or too short, error out */
  148|     10|      *olen = 0;
  149|     10|      return DOH_DNS_BAD_LABEL;
  150|     10|    }
  151|       |    /* label is non-empty, process it */
  152|    945|    *dnsp++ = (unsigned char)labellen;
  153|    945|    memcpy(dnsp, hostp, labellen);
  154|    945|    dnsp += labellen;
  155|    945|    hostp += labellen;
  156|       |    /* advance past dot, but only if there is one */
  157|    945|    if(dot)
  ------------------
  |  Branch (157:8): [True: 201, False: 744]
  ------------------
  158|    201|      hostp++;
  159|    945|  } /* next label */
  160|       |
  161|    785|  *dnsp++ = 0; /* append zero-length label for root */
  162|       |
  163|       |  /* There are assigned TYPE codes beyond 255: use range [1..65535] */
  164|    785|  *dnsp++ = (unsigned char)(255 & (dnstype >> 8)); /* upper 8-bit TYPE */
  165|    785|  *dnsp++ = (unsigned char)(255 & dnstype);        /* lower 8-bit TYPE */
  166|       |
  167|    785|  *dnsp++ = '\0'; /* upper 8-bit CLASS */
  168|    785|  *dnsp++ = DNS_CLASS_IN; /* IN - "the Internet" */
  ------------------
  |  |   41|    785|#define DNS_CLASS_IN 0x01
  ------------------
  169|       |
  170|    785|  *olen = dnsp - orig;
  171|       |
  172|       |  /* verify that our estimation of length is valid, since
  173|       |   * this has led to buffer overflows in this function */
  174|    785|  DEBUGASSERT(*olen == expected_len);
  ------------------
  |  | 1079|    785|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (174:3): [True: 0, False: 785]
  |  Branch (174:3): [True: 785, False: 0]
  ------------------
  175|    785|  return DOH_OK;
  176|    785|}
Curl_doh:
  460|    409|{
  461|    409|  CURLcode result = CURLE_OK;
  462|    409|  struct doh_probes *dohp = NULL;
  463|    409|  size_t i;
  464|       |
  465|    409|  DEBUGASSERT(!async->doh);
  ------------------
  |  | 1079|    409|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (465:3): [True: 0, False: 409]
  |  Branch (465:3): [True: 409, False: 0]
  ------------------
  466|    409|  DEBUGASSERT(async->hostname[0]);
  ------------------
  |  | 1079|    409|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (466:3): [True: 0, False: 409]
  |  Branch (466:3): [True: 409, False: 0]
  ------------------
  467|    409|  if(async->doh) {
  ------------------
  |  Branch (467:6): [True: 0, False: 409]
  ------------------
  468|      0|    DEBUGASSERT(0); /* should not happen */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (468:5): [Folded, False: 0]
  |  Branch (468:5): [Folded, False: 0]
  ------------------
  469|      0|    Curl_doh_cleanup(data, async);
  470|      0|  }
  471|       |
  472|       |  /* start clean, consider allocating this struct on demand */
  473|    409|  async->doh = dohp = curlx_calloc(1, sizeof(struct doh_probes));
  ------------------
  |  | 1475|    409|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  474|    409|  if(!dohp)
  ------------------
  |  Branch (474:6): [True: 0, False: 409]
  ------------------
  475|      0|    return CURLE_OUT_OF_MEMORY;
  476|       |
  477|  1.22k|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (477:14): [True: 818, False: 409]
  ------------------
  478|    818|    dohp->probe_resp[i].probe_mid = UINT32_MAX;
  479|    818|    curlx_dyn_init(&dohp->probe_resp[i].body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    818|#define DYN_DOH_RESPONSE    3000
  ------------------
  480|    818|  }
  481|       |
  482|    409|  dohp->host = async->hostname;
  483|    409|  dohp->port = async->port;
  484|       |
  485|       |  /* create IPv4 DoH request */
  486|    409|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    409|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (486:6): [True: 407, False: 2]
  ------------------
  487|    407|    result = doh_probe_run(data, CURL_DNS_TYPE_A,
  488|    407|                           async->hostname, data->set.str[STRING_DOH],
  489|    407|                           data->multi, async->id,
  490|    407|                           &dohp->probe_resp[DOH_SLOT_IPV4].probe_mid);
  491|    407|    if(result)
  ------------------
  |  Branch (491:8): [True: 9, False: 398]
  ------------------
  492|      9|      goto error;
  493|    398|    dohp->pending++;
  494|    398|  }
  495|       |
  496|    400|#ifdef USE_IPV6
  497|    400|  if(async->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    400|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (497:6): [True: 388, False: 12]
  ------------------
  498|       |    /* create IPv6 DoH request */
  499|    388|    result = doh_probe_run(data, CURL_DNS_TYPE_AAAA,
  500|    388|                           async->hostname, data->set.str[STRING_DOH],
  501|    388|                           data->multi, async->id,
  502|    388|                           &dohp->probe_resp[DOH_SLOT_IPV6].probe_mid);
  503|    388|    if(result)
  ------------------
  |  Branch (503:8): [True: 1, False: 387]
  ------------------
  504|      1|      goto error;
  505|    387|    dohp->pending++;
  506|    387|  }
  507|    399|#endif
  508|       |
  509|       |#ifdef USE_HTTPSRR
  510|       |  if(async->dns_queries & CURL_DNSQ_HTTPS) {
  511|       |    char *qname = NULL;
  512|       |    if(async->port != PORT_HTTPS) {
  513|       |      qname = curl_maprintf("_%d._https.%s", async->port, async->hostname);
  514|       |      if(!qname)
  515|       |        goto error;
  516|       |    }
  517|       |    result = doh_probe_run(data, CURL_DNS_TYPE_HTTPS,
  518|       |                           qname ? qname : async->hostname,
  519|       |                           data->set.str[STRING_DOH], data->multi,
  520|       |                           async->id,
  521|       |                           &dohp->probe_resp[DOH_SLOT_HTTPS_RR].probe_mid);
  522|       |    curlx_free(qname);
  523|       |    if(result)
  524|       |      goto error;
  525|       |    dohp->pending++;
  526|       |  }
  527|       |#endif
  528|    399|  return CURLE_OK;
  529|       |
  530|     10|error:
  531|     10|  Curl_doh_cleanup(data, async);
  532|     10|  return result;
  533|    400|}
de_init:
  719|    136|{
  720|    136|  int i;
  721|    136|  memset(de, 0, sizeof(*de));
  722|    136|  de->ttl = INT_MAX;
  723|    680|  for(i = 0; i < DOH_MAX_CNAME; i++)
  ------------------
  |  |  129|    680|#define DOH_MAX_CNAME 4
  ------------------
  |  Branch (723:14): [True: 544, False: 136]
  ------------------
  724|    544|    curlx_dyn_init(&de->cname[i], DYN_DOH_CNAME);
  ------------------
  |  |   66|    544|#define DYN_DOH_CNAME       256
  ------------------
  725|    136|}
de_cleanup:
 1058|    136|{
 1059|    136|  int i = 0;
 1060|    136|  for(i = 0; i < d->numcname; i++) {
  ------------------
  |  Branch (1060:14): [True: 0, False: 136]
  ------------------
 1061|      0|    curlx_dyn_free(&d->cname[i]);
 1062|      0|  }
 1063|       |#ifdef USE_HTTPSRR
 1064|       |  for(i = 0; i < d->numhttps_rrs; i++)
 1065|       |    curlx_safefree(d->https_rrs[i].val);
 1066|       |#endif
 1067|    136|}
Curl_doh_take_result:
 1200|    781|{
 1201|    781|  struct doh_probes *dohp = async->doh;
 1202|    781|  CURLcode result = CURLE_OK;
 1203|    781|  struct dohentry de;
 1204|       |
 1205|    781|  *pdns = NULL; /* defaults to no response */
 1206|    781|  if(!dohp)
  ------------------
  |  Branch (1206:6): [True: 0, False: 781]
  ------------------
 1207|      0|    return CURLE_OUT_OF_MEMORY;
 1208|       |
 1209|    781|  if(CURL_DNSQ_IS_ADDR(async->dns_queries) &&
  ------------------
  |  |   56|  1.56k|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|    781|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|    781|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|    781|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 781, False: 0]
  |  |  ------------------
  ------------------
 1210|    781|     dohp->probe_resp[DOH_SLOT_IPV4].probe_mid == UINT32_MAX &&
  ------------------
  |  Branch (1210:6): [True: 2, False: 779]
  ------------------
 1211|      2|     dohp->probe_resp[DOH_SLOT_IPV6].probe_mid == UINT32_MAX) {
  ------------------
  |  Branch (1211:6): [True: 0, False: 2]
  ------------------
 1212|      0|    failf(data, "Could not DoH-resolve: %s", dohp->host);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1213|      0|    return async->for_proxy ?
  ------------------
  |  Branch (1213:12): [True: 0, False: 0]
  ------------------
 1214|      0|      CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST;
 1215|      0|  }
 1216|    781|  else if(!dohp->pending) {
  ------------------
  |  Branch (1216:11): [True: 136, False: 645]
  ------------------
 1217|    136|    struct Curl_dns_entry *dns = NULL;
 1218|    136|    DOHcode rc[DOH_SLOT_COUNT];
 1219|    136|    bool negative = TRUE;
  ------------------
  |  | 1053|    136|#define TRUE true
  ------------------
 1220|    136|    int slot;
 1221|       |
 1222|    136|    memset(rc, 0, sizeof(rc));
 1223|       |    /* remove DoH handles from multi handle and close them */
 1224|    136|    doh_close(data, async);
 1225|       |    /* parse the responses, create the struct and return it! */
 1226|    136|    de_init(&de);
 1227|    408|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1227:19): [True: 272, False: 136]
  ------------------
 1228|    272|      struct doh_response *p = &dohp->probe_resp[slot];
 1229|    272|      if(!p->dnstype)
  ------------------
  |  Branch (1229:10): [True: 272, False: 0]
  ------------------
 1230|    272|        continue;
 1231|      0|      rc[slot] = doh_resp_decode(curlx_dyn_uptr(&p->body),
 1232|      0|                                 curlx_dyn_len(&p->body),
 1233|      0|                                 p->dnstype, &de);
 1234|       |      /* Failing without an NXDOMAIN answer - a SERVFAIL-class rcode or
 1235|       |         an undecodable response - says nothing about the name. Such a
 1236|       |         failure must not be cached as a negative entry. */
 1237|      0|      if(rc[slot] && (rc[slot] != DOH_DNS_NXDOMAIN))
  ------------------
  |  Branch (1237:10): [True: 0, False: 0]
  |  Branch (1237:22): [True: 0, False: 0]
  ------------------
 1238|      0|        negative = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1239|      0|      if(rc[slot]) {
  ------------------
  |  Branch (1239:10): [True: 0, False: 0]
  ------------------
 1240|      0|        CURL_TRC_DNS(data, "[%s] [DoH] error: %s type %s for %s",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1241|      0|                     Curl_resolv_query_str(async->dns_queries),
 1242|      0|                     doh_strerror(rc[slot]),
 1243|      0|                     doh_type2name(p->dnstype), dohp->host);
 1244|      0|      }
 1245|      0|    } /* next slot */
 1246|       |
 1247|    136|    if(CURL_DNSQ_IS_ADDR(async->dns_queries)) {
  ------------------
  |  |   56|    136|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|    136|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|    136|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|    136|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 136, False: 0]
  |  |  ------------------
  ------------------
 1248|    136|      if(!rc[DOH_SLOT_IPV4] || !rc[DOH_SLOT_IPV6]) {
  ------------------
  |  Branch (1248:10): [True: 136, False: 0]
  |  Branch (1248:32): [True: 0, False: 0]
  ------------------
 1249|       |        /* we have an address, of one kind or other */
 1250|    136|        struct Curl_addrinfo *ai;
 1251|       |
 1252|    136|        if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_doh)) {
  ------------------
  |  |  329|    136|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  322|    272|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 136, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 136]
  |  |  |  |  ------------------
  |  |  |  |  323|    272|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  330|    136|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1253|      0|          CURL_TRC_DNS(data, "hostname: %s", dohp->host);
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1254|      0|          doh_show(data, &de);
 1255|      0|        }
 1256|       |
 1257|    136|        result = doh2ai(&de, dohp->host, dohp->port, &ai);
 1258|    136|        if(result) {
  ------------------
  |  Branch (1258:12): [True: 136, False: 0]
  ------------------
 1259|       |          /* a decoded response without any usable address, e.g. only
 1260|       |             CNAME records, is an authoritative "no data" answer */
 1261|    136|          if((result == CURLE_COULDNT_RESOLVE_HOST) && negative)
  ------------------
  |  Branch (1261:14): [True: 136, False: 0]
  |  Branch (1261:56): [True: 136, False: 0]
  ------------------
 1262|    136|            async->negative_answer = TRUE;
  ------------------
  |  | 1053|    136|#define TRUE true
  ------------------
 1263|    136|          goto error;
 1264|    136|        }
 1265|       |
 1266|       |        /* we got a response, create a dns entry. */
 1267|      0|        dns = Curl_dnsc_mk_addr(data, async->dns_queries,
 1268|      0|                                     &ai, dohp->host, dohp->port);
 1269|      0|        if(!dns) {
  ------------------
  |  Branch (1269:12): [True: 0, False: 0]
  ------------------
 1270|      0|          result = CURLE_OUT_OF_MEMORY;
 1271|      0|          goto error;
 1272|      0|        }
 1273|      0|      } /* address processing done */
 1274|      0|      else {
 1275|       |        /* every query failed. Only NXDOMAIN answers for all of them
 1276|       |           make this a negative answer, eligible for caching. */
 1277|      0|        async->negative_answer = negative;
 1278|      0|        result = async->for_proxy ?
  ------------------
  |  Branch (1278:18): [True: 0, False: 0]
  ------------------
 1279|      0|          CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST;
 1280|      0|      }
 1281|    136|    }
 1282|       |
 1283|       |#ifdef USE_HTTPSRR
 1284|       |    if(!dns && (async->dns_queries & CURL_DNSQ_HTTPS)) {
 1285|       |      /* Now add and HTTPSRR information if we have */
 1286|       |      struct Curl_https_rrinfo *hrr = NULL;
 1287|       |
 1288|       |      CURL_TRC_DNS(data, "[HTTPS] got %d records", de.numhttps_rrs);
 1289|       |      if(de.numhttps_rrs > 0 && result == CURLE_OK) {
 1290|       |        result = doh_resp_decode_httpsrr(data, de.https_rrs->val,
 1291|       |                                         de.https_rrs->len, &hrr);
 1292|       |        if(result) {
 1293|       |          infof(data, "Failed to decode HTTPS RR");
 1294|       |          Curl_dns_entry_unlink(data, &dns);
 1295|       |          goto error;
 1296|       |        }
 1297|       |        infof(data, "Some HTTPS RR to process");
 1298|       |      }
 1299|       |      Curl_httpsrr_trace(data, hrr);
 1300|       |      dns = Curl_dnsc_mk_https(data, &hrr, async->hostname, async->port);
 1301|       |      if(!dns) {
 1302|       |        result = CURLE_OUT_OF_MEMORY;
 1303|       |        goto error;
 1304|       |      }
 1305|       |    }
 1306|       |#endif /* USE_HTTPSRR */
 1307|       |
 1308|       |    /* and add the entry to the cache */
 1309|      0|    if(dns)
  ------------------
  |  Branch (1309:8): [True: 0, False: 0]
  ------------------
 1310|      0|      result = Curl_dnscache_add(data, dns);
 1311|      0|    *pdns = dns;
 1312|      0|  } /* !dohp->pending */
 1313|    645|  else
 1314|       |    /* wait for pending DoH transactions to complete */
 1315|    645|    return CURLE_AGAIN;
 1316|       |
 1317|    136|error:
 1318|    136|  de_cleanup(&de);
 1319|    136|  Curl_doh_cleanup(data, async);
 1320|    136|  return result;
 1321|    781|}
Curl_doh_cleanup:
 1355|  1.78k|{
 1356|  1.78k|  struct doh_probes *dohp = async->doh;
 1357|  1.78k|  if(dohp) {
  ------------------
  |  Branch (1357:6): [True: 409, False: 1.37k]
  ------------------
 1358|    409|    int i;
 1359|    409|    doh_close(data, async);
 1360|  1.22k|    for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (1360:16): [True: 818, False: 409]
  ------------------
 1361|    818|      curlx_dyn_free(&dohp->probe_resp[i].body);
 1362|    818|    }
 1363|       |    curlx_safefree(async->doh);
  ------------------
  |  | 1336|    409|  do {                      \
  |  | 1337|    409|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|    409|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|    409|    (ptr) = NULL;           \
  |  | 1339|    409|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 409]
  |  |  ------------------
  ------------------
 1364|    409|  }
 1365|  1.78k|}
doh.c:doh_probe_run:
  303|    795|{
  304|    795|  struct Curl_easy *doh = NULL;
  305|    795|  CURLcode result = CURLE_OK;
  306|    795|  timediff_t timeout_ms;
  307|    795|  struct doh_request *doh_req;
  308|    795|  DOHcode d;
  309|       |
  310|    795|  *pmid = UINT32_MAX;
  311|       |
  312|    795|  doh_req = curlx_calloc(1, sizeof(*doh_req));
  ------------------
  |  | 1475|    795|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  313|    795|  if(!doh_req)
  ------------------
  |  Branch (313:6): [True: 0, False: 795]
  ------------------
  314|      0|    return CURLE_OUT_OF_MEMORY;
  315|    795|  doh_req->resolv_id = resolv_id;
  316|    795|  doh_req->dnstype = dnstype;
  317|    795|  curlx_dyn_init(&doh_req->resp_body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    795|#define DYN_DOH_RESPONSE    3000
  ------------------
  318|       |
  319|    795|  d = doh_req_encode(host, dnstype, doh_req->req_body,
  320|    795|                     sizeof(doh_req->req_body),
  321|    795|                     &doh_req->req_body_len);
  322|    795|  if(d) {
  ------------------
  |  Branch (322:6): [True: 10, False: 785]
  ------------------
  323|     10|    failf(data, "Failed to encode DoH packet [%d]", (int)d);
  ------------------
  |  |   62|     10|#define failf Curl_failf
  ------------------
  324|     10|    result = CURLE_OUT_OF_MEMORY;
  325|     10|    goto error;
  326|     10|  }
  327|       |
  328|    785|  timeout_ms = Curl_timeleft_ms(data);
  329|    785|  if(timeout_ms < 0) {
  ------------------
  |  Branch (329:6): [True: 0, False: 785]
  ------------------
  330|      0|    result = CURLE_OPERATION_TIMEDOUT;
  331|      0|    goto error;
  332|      0|  }
  333|       |
  334|    785|  doh_req->req_hds =
  335|    785|    curl_slist_append(NULL, "Content-Type: application/dns-message");
  336|    785|  if(!doh_req->req_hds) {
  ------------------
  |  Branch (336:6): [True: 0, False: 785]
  ------------------
  337|      0|    result = CURLE_OUT_OF_MEMORY;
  338|      0|    goto error;
  339|      0|  }
  340|       |
  341|       |  /* Curl_open() is the internal version of curl_easy_init() */
  342|    785|  result = Curl_open(&doh);
  343|    785|  if(result)
  ------------------
  |  Branch (343:6): [True: 0, False: 785]
  ------------------
  344|      0|    goto error;
  345|       |
  346|       |  /* pass in the struct pointer via a local variable to please coverity and
  347|       |     the gcc typecheck helpers */
  348|    785|  VERBOSE(doh->state.feat = &Curl_trc_feat_doh);
  ------------------
  |  | 1613|    785|#define VERBOSE(x) x
  ------------------
  349|    785|  ERROR_CHECK_SETOPT(CURLOPT_URL, url);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   141k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  350|    785|  ERROR_CHECK_SETOPT(CURLOPT_DEFAULT_PROTOCOL, "https");
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   141k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  351|    785|  ERROR_CHECK_SETOPT(CURLOPT_WRITEFUNCTION, doh_probe_write_cb);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   149k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  352|    785|  ERROR_CHECK_SETOPT(CURLOPT_WRITEDATA, doh);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 785, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  353|    785|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDS, doh_req->req_body);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   140k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 785, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  354|    785|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDSIZE, (long)doh_req->req_body_len);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  355|    785|  ERROR_CHECK_SETOPT(CURLOPT_HTTPHEADER, doh_req->req_hds);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   139k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  356|    785|#ifdef USE_HTTP2
  357|    785|  ERROR_CHECK_SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  358|    785|  ERROR_CHECK_SETOPT(CURLOPT_PIPEWAIT, 1L);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  359|    785|#endif
  360|       |#ifndef DEBUGBUILD
  361|       |  /* enforce HTTPS if not debug */
  362|       |  ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
  363|       |#else
  364|       |  /* in debug mode, also allow http */
  365|    785|  ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  366|    785|#endif
  367|    785|  ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  368|    785|  ERROR_CHECK_SETOPT(CURLOPT_SHARE, (CURLSH *)data->share);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 785, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 785, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  369|    785|  if(data->set.err && data->set.err != stderr)
  ------------------
  |  Branch (369:6): [True: 785, False: 0]
  |  Branch (369:23): [True: 0, False: 785]
  ------------------
  370|      0|    ERROR_CHECK_SETOPT(CURLOPT_STDERR, data->set.err);
  ------------------
  |  |  289|      0|  do {                                                  \
  |  |  290|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  291|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      0|      goto error;                                       \
  |  |  295|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  371|    785|  if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_doh))
  ------------------
  |  |  329|    785|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  322|  1.57k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 785, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 785]
  |  |  |  |  ------------------
  |  |  |  |  323|  1.57k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  330|    785|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  372|      0|    ERROR_CHECK_SETOPT(CURLOPT_VERBOSE, 1L);
  ------------------
  |  |  289|      0|  do {                                                  \
  |  |  290|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  291|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      0|      goto error;                                       \
  |  |  295|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  373|    785|  if(data->set.no_signal)
  ------------------
  |  Branch (373:6): [True: 5, False: 780]
  ------------------
  374|      5|    ERROR_CHECK_SETOPT(CURLOPT_NOSIGNAL, 1L);
  ------------------
  |  |  289|      5|  do {                                                  \
  |  |  290|      5|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      5|  __extension__({                                                       \
  |  |  |  |   46|      5|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 5, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      5|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|    885|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      5|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      5|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      5|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      5|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      5|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      5|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      5|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      5|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      5|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      5|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      5|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      5|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      5|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      5|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      5|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      5|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      5|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      5|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      5|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      5|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      5|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      5|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      5|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      5|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      5|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      5|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      5|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      5|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      5|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      5|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      5|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      5|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      5|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      5|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      5|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      5|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      5|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      5|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      5|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      5|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      5|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      5|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      5|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      5|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      5|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      5|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      5|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      5|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      5|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      5|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      5|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      5|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      5|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      5|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      5|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      5|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      5|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      5|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      5|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      5|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      5|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      5|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      5|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      5|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      5|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      5|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      5|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      5|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      5|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      5|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      5|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      5|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      5|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      5|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      5|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      5|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      5|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      5|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      5|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      5|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      5|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      5|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      5|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      5|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      5|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      5|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      5|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      5|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      5|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      5|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      5|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      5|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      5|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      5|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      5|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      5|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      5|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      5|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      5|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      5|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      5|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      5|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      5|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      5|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      5|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      5|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      5|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      5|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      5|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      5|      )                                                                 \
  |  |  |  |  158|      5|    }                                                                   \
  |  |  |  |  159|      5|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      5|  })
  |  |  ------------------
  |  |  291|      5|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 5]
  |  |  ------------------
  |  |  292|      5|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      5|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      5|      goto error;                                       \
  |  |  295|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  375|       |
  376|    785|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYHOST,
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|  1.57k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 785, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  377|    785|                     data->set.doh_verifyhost ? 2L : 0L);
  378|    785|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYPEER,
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|  1.57k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 785, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  379|    785|                     data->set.doh_verifypeer ? 1L : 0L);
  380|    785|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYSTATUS,
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|  1.57k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 4, False: 781]
  |  |  |  |  ------------------
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  381|    785|                     data->set.doh_verifystatus ? 1L : 0L);
  382|       |
  383|       |  /* Inherit *some* SSL options from the user's transfer. This is a
  384|       |     best-guess as to which options are needed for compatibility. #3661
  385|       |
  386|       |     Note DoH does not inherit the user's proxy server so proxy SSL settings
  387|       |     have no effect and are not inherited. If that changes then two new
  388|       |     options should be added to check doh proxy insecure separately,
  389|       |     CURLOPT_DOH_PROXY_SSL_VERIFYHOST and CURLOPT_DOH_PROXY_SSL_VERIFYPEER.
  390|       |     */
  391|    785|  doh->set.ssl.custom_cafile = data->set.ssl.custom_cafile;
  392|    785|  doh->set.ssl.custom_capath = data->set.ssl.custom_capath;
  393|    785|  doh->set.ssl.custom_cablob = data->set.ssl.custom_cablob;
  394|    785|  if(data->set.str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (394:6): [True: 785, False: 0]
  ------------------
  395|    785|    ERROR_CHECK_SETOPT(CURLOPT_CAINFO, data->set.str[STRING_SSL_CAFILE]);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   141k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  396|    785|  }
  397|    785|  if(data->set.blobs[BLOB_CAINFO]) {
  ------------------
  |  Branch (397:6): [True: 0, False: 785]
  ------------------
  398|      0|    ERROR_CHECK_SETOPT(CURLOPT_CAINFO_BLOB, data->set.blobs[BLOB_CAINFO]);
  ------------------
  |  |  289|      0|  do {                                                  \
  |  |  290|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  291|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      0|      goto error;                                       \
  |  |  295|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  399|      0|  }
  400|    785|  if(data->set.str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (400:6): [True: 785, False: 0]
  ------------------
  401|    785|    ERROR_CHECK_SETOPT(CURLOPT_CAPATH, data->set.str[STRING_SSL_CAPATH]);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   141k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  402|    785|  }
  403|    785|  if(data->set.str[STRING_SSL_CRLFILE]) {
  ------------------
  |  Branch (403:6): [True: 785, False: 0]
  ------------------
  404|    785|    ERROR_CHECK_SETOPT(CURLOPT_CRLFILE, data->set.str[STRING_SSL_CRLFILE]);
  ------------------
  |  |  289|    785|  do {                                                  \
  |  |  290|    785|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    785|  __extension__({                                                       \
  |  |  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   141k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    785|      )                                                                 \
  |  |  |  |  158|    785|    }                                                                   \
  |  |  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    785|  })
  |  |  ------------------
  |  |  291|    785|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 785]
  |  |  ------------------
  |  |  292|    785|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    785|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|    785|      goto error;                                       \
  |  |  295|    785|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 785]
  |  |  ------------------
  ------------------
  405|    785|  }
  406|    785|  if(data->set.ssl.certinfo)
  ------------------
  |  Branch (406:6): [True: 3, False: 782]
  ------------------
  407|      3|    ERROR_CHECK_SETOPT(CURLOPT_CERTINFO, 1L);
  ------------------
  |  |  289|      3|  do {                                                  \
  |  |  290|      3|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      3|  __extension__({                                                       \
  |  |  |  |   46|      3|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 3, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      3|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|    531|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      3|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      3|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      3|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      3|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      3|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      3|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      3|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      3|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      3|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      3|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      3|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      3|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      3|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      3|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      3|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      3|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      3|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      3|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      3|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      3|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      3|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      3|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      3|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      3|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      3|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      3|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      3|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      3|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      3|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      3|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      3|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      3|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      3|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      3|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      3|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      3|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      3|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      3|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      3|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      3|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      3|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      3|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      3|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      3|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      3|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      3|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      3|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      3|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      3|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      3|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      3|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      3|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      3|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      3|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      3|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      3|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      3|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      3|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      3|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      3|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      3|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      3|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      3|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      3|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      3|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      3|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      3|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      3|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      3|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      3|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      3|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      3|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      3|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      3|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      3|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      3|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      3|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      3|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      3|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      3|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      3|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      3|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      3|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      3|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      3|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      3|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      3|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      3|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      3|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      3|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      3|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      3|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      3|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      3|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      3|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      3|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      3|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      3|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      3|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      3|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      3|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      3|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      3|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      3|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      3|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      3|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      3|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      3|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      3|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      3|      )                                                                 \
  |  |  |  |  158|      3|    }                                                                   \
  |  |  |  |  159|      3|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      3|  })
  |  |  ------------------
  |  |  291|      3|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 3]
  |  |  ------------------
  |  |  292|      3|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      3|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      3|      goto error;                                       \
  |  |  295|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  408|    785|  if(data->set.ssl.fsslctx)
  ------------------
  |  Branch (408:6): [True: 0, False: 785]
  ------------------
  409|      0|    ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_FUNCTION, data->set.ssl.fsslctx);
  ------------------
  |  |  289|      0|  do {                                                  \
  |  |  290|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  291|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      0|      goto error;                                       \
  |  |  295|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  410|    785|  if(data->set.ssl.fsslctxp)
  ------------------
  |  Branch (410:6): [True: 0, False: 785]
  ------------------
  411|      0|    ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_DATA, data->set.ssl.fsslctxp);
  ------------------
  |  |  289|      0|  do {                                                  \
  |  |  290|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  291|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      0|      goto error;                                       \
  |  |  295|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  412|    785|  if(data->set.fdebug)
  ------------------
  |  Branch (412:6): [True: 0, False: 785]
  ------------------
  413|      0|    ERROR_CHECK_SETOPT(CURLOPT_DEBUGFUNCTION, data->set.fdebug);
  ------------------
  |  |  289|      0|  do {                                                  \
  |  |  290|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  291|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      0|      goto error;                                       \
  |  |  295|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  414|    785|  if(data->set.debugdata)
  ------------------
  |  Branch (414:6): [True: 0, False: 785]
  ------------------
  415|      0|    ERROR_CHECK_SETOPT(CURLOPT_DEBUGDATA, data->set.debugdata);
  ------------------
  |  |  289|      0|  do {                                                  \
  |  |  290|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  291|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      0|      goto error;                                       \
  |  |  295|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  416|    785|  if(data->set.str[STRING_SSL_EC_CURVES]) {
  ------------------
  |  Branch (416:6): [True: 7, False: 778]
  ------------------
  417|      7|    ERROR_CHECK_SETOPT(CURLOPT_SSL_EC_CURVES,
  ------------------
  |  |  289|      7|  do {                                                  \
  |  |  290|      7|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      7|  __extension__({                                                       \
  |  |  |  |   46|      7|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 7, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      7|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  1.26k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      7|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      7|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      7|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      7|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      7|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      7|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      7|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      7|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      7|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      7|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      7|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      7|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      7|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      7|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      7|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      7|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      7|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      7|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      7|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      7|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      7|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      7|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      7|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      7|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      7|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      7|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      7|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      7|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      7|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      7|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      7|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      7|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      7|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      7|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      7|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      7|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      7|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      7|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      7|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      7|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      7|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      7|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      7|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      7|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      7|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      7|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      7|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      7|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      7|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      7|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      7|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      7|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      7|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      7|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      7|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      7|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      7|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      7|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      7|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      7|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      7|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      7|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      7|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      7|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      7|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      7|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      7|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      7|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      7|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      7|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      7|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      7|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      7|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      7|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      7|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      7|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      7|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      7|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      7|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      7|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      7|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      7|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      7|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      7|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      7|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      7|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      7|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      7|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      7|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      7|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      7|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      7|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      7|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      7|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      7|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      7|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      7|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      7|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      7|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      7|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      7|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      7|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      7|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      7|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      7|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      7|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      7|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      7|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      7|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      7|      )                                                                 \
  |  |  |  |  158|      7|    }                                                                   \
  |  |  |  |  159|      7|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      7|  })
  |  |  ------------------
  |  |  291|      7|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 7]
  |  |  ------------------
  |  |  292|      7|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      7|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (293:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  294|      7|      goto error;                                       \
  |  |  295|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (295:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
  418|      7|                       data->set.str[STRING_SSL_EC_CURVES]);
  419|      7|  }
  420|       |
  421|    785|  (void)curl_easy_setopt(doh, CURLOPT_SSL_OPTIONS,
  ------------------
  |  |   45|    785|  __extension__({                                                       \
  |  |   46|    785|    if(__builtin_constant_p(option)) {                                  \
  |  |  ------------------
  |  |  |  Branch (46:8): [True: 785, Folded]
  |  |  ------------------
  |  |   47|    785|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  ------------------
  |  |  |  |   59|   138k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 785]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   48|    785|        if(curlcheck_long_option(option))                               \
  |  |   49|    785|          if(!curlcheck_long(value))                                    \
  |  |   50|    785|            Wcurl_easy_setopt_err_long();                               \
  |  |   51|    785|        if(curlcheck_off_t_option(option))                              \
  |  |   52|    785|          if(!curlcheck_off_t(value))                                   \
  |  |   53|    785|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |   54|    785|        if(curlcheck_string_option(option))                             \
  |  |   55|    785|          if(!curlcheck_string(value))                                  \
  |  |   56|    785|            Wcurl_easy_setopt_err_string();                             \
  |  |   57|    785|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |   58|    785|        if(curlcheck_write_cb_option(option))                           \
  |  |   59|    785|          if(!curlcheck_write_cb(value))                                \
  |  |   60|    785|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |   61|    785|        if(curlcheck_curl_option(option))                               \
  |  |   62|    785|          if(!curlcheck_curl(value))                                    \
  |  |   63|    785|            Wcurl_easy_setopt_err_curl();                               \
  |  |   64|    785|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |   65|    785|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |   66|    785|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |   67|    785|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |   68|    785|          if(!curlcheck_read_cb(value))                                 \
  |  |   69|    785|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |   70|    785|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |   71|    785|          if(!curlcheck_ioctl_cb(value))                                \
  |  |   72|    785|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |   73|    785|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |   74|    785|          if(!curlcheck_sockopt_cb(value))                              \
  |  |   75|    785|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |   76|    785|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |   77|    785|          if(!curlcheck_opensocket_cb(value))                           \
  |  |   78|    785|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |   79|    785|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |   80|    785|          if(!curlcheck_progress_cb(value))                             \
  |  |   81|    785|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |   82|    785|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |   83|    785|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |   84|    785|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |   85|    785|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |   86|    785|          if(!curlcheck_debug_cb(value))                                \
  |  |   87|    785|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |   88|    785|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |   89|    785|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |   90|    785|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |   91|    785|        if(curlcheck_conv_cb_option(option))                            \
  |  |   92|    785|          if(!curlcheck_conv_cb(value))                                 \
  |  |   93|    785|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |   94|    785|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |   95|    785|          if(!curlcheck_seek_cb(value))                                 \
  |  |   96|    785|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |   97|    785|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |   98|    785|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |   99|    785|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  100|    785|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  101|    785|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  102|    785|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  103|    785|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  104|    785|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  105|    785|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  106|    785|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  107|    785|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  108|    785|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  109|    785|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  110|    785|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  111|    785|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  112|    785|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  113|    785|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  114|    785|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  115|    785|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  116|    785|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  117|    785|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  118|    785|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  119|    785|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  120|    785|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  121|    785|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  122|    785|          if(!curlcheck_interleave_cb(value))                           \
  |  |  123|    785|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  124|    785|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  125|    785|          if(!curlcheck_prereq_cb(value))                               \
  |  |  126|    785|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  127|    785|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  128|    785|          if(!curlcheck_trailer_cb(value))                              \
  |  |  129|    785|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  130|    785|        if(curlcheck_cb_data_option(option))                            \
  |  |  131|    785|          if(!curlcheck_cb_data(value))                                 \
  |  |  132|    785|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  133|    785|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  134|    785|          if(!curlcheck_error_buffer(value))                            \
  |  |  135|    785|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  136|    785|        if((option) == CURLOPT_CURLU)                                   \
  |  |  137|    785|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  138|    785|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  139|    785|        if((option) == CURLOPT_STDERR)                                  \
  |  |  140|    785|          if(!curlcheck_FILE(value))                                    \
  |  |  141|    785|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  142|    785|        if(curlcheck_postfields_option(option))                         \
  |  |  143|    785|          if(!curlcheck_postfields(value))                              \
  |  |  144|    785|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  145|    785|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  146|    785|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  147|    785|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  148|    785|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  149|    785|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  150|    785|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  151|    785|        if(curlcheck_slist_option(option))                              \
  |  |  152|    785|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  153|    785|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  154|    785|        if((option) == CURLOPT_SHARE)                                   \
  |  |  155|    785|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  156|    785|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  157|    785|      )                                                                 \
  |  |  158|    785|    }                                                                   \
  |  |  159|    785|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  160|    785|  })
  ------------------
  422|    785|                         ((long)data->set.ssl.primary.ssl_options &
  423|    785|                          ~CURLSSLOPT_AUTO_CLIENT_CERT));
  424|       |
  425|    785|  doh->state.internal = TRUE;
  ------------------
  |  | 1053|    785|#define TRUE true
  ------------------
  426|    785|  doh->master_mid = data->mid; /* master transfer of this one */
  427|    785|  doh->sub_xfer_done = doh_probe_done;
  428|       |
  429|    785|  result = Curl_meta_set(doh, CURL_EZM_DOH_PROBE, doh_req, doh_probe_dtor);
  ------------------
  |  |   85|    785|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  430|    785|  doh_req = NULL; /* call took ownership */
  431|    785|  if(result)
  ------------------
  |  Branch (431:6): [True: 0, False: 785]
  ------------------
  432|      0|    goto error;
  433|       |
  434|       |  /* DoH handles must not inherit private_data. The handles may be passed to
  435|       |     the user via callbacks and the user will be able to identify them as
  436|       |     internal handles because private data is not set. The user can then set
  437|       |     private_data via CURLOPT_PRIVATE if they so choose. */
  438|    785|  DEBUGASSERT(!doh->set.private_data);
  ------------------
  |  | 1079|    785|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (438:3): [True: 0, False: 785]
  |  Branch (438:3): [True: 785, False: 0]
  ------------------
  439|       |
  440|    785|  if(Curl_multi_add_handle(multi, doh))
  ------------------
  |  Branch (440:6): [True: 0, False: 785]
  ------------------
  441|      0|    goto error;
  442|       |
  443|    785|  *pmid = doh->mid;
  444|    785|  return CURLE_OK;
  445|       |
  446|     10|error:
  447|     10|  Curl_close(&doh);
  448|     10|  if(doh_req)
  ------------------
  |  Branch (448:6): [True: 10, False: 0]
  ------------------
  449|     10|    doh_probe_dtor(NULL, 0, doh_req);
  450|     10|  return result;
  451|    785|}
doh.c:doh_probe_done:
  222|    329|{
  223|    329|  struct Curl_resolv_async *async = NULL;
  224|    329|  struct doh_probes *dohp = NULL;
  225|    329|  struct doh_request *doh_req = NULL;
  226|    329|  int i;
  227|       |
  228|    329|  doh_req = Curl_meta_get(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   85|    329|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  229|    329|  if(!doh_req) {
  ------------------
  |  Branch (229:6): [True: 0, False: 329]
  ------------------
  230|       |    /* transfer `doh` is not a DoH probe. */
  231|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (231:5): [Folded, False: 0]
  |  Branch (231:5): [Folded, False: 0]
  ------------------
  232|      0|    return;
  233|      0|  }
  234|       |
  235|    329|  async = Curl_async_get(master, doh_req->resolv_id);
  236|    329|  if(!async) {
  ------------------
  |  Branch (236:6): [True: 0, False: 329]
  ------------------
  237|      0|    CURL_TRC_DNS(master, "[%u] ignoring outdated DoH response",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  238|      0|                 doh_req->resolv_id);
  239|      0|    return;
  240|      0|  }
  241|    329|  dohp = async->doh;
  242|       |
  243|    489|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (243:14): [True: 489, False: 0]
  ------------------
  244|    489|    if(dohp->probe_resp[i].probe_mid == doh->mid)
  ------------------
  |  Branch (244:8): [True: 329, False: 160]
  ------------------
  245|    329|      break;
  246|    489|  }
  247|       |  /* We really should have found the slot where to store the response */
  248|    329|  if(i >= DOH_SLOT_COUNT) {
  ------------------
  |  Branch (248:6): [True: 0, False: 329]
  ------------------
  249|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:5): [Folded, False: 0]
  |  Branch (249:5): [Folded, False: 0]
  ------------------
  250|      0|    failf(master, "DoH: unknown sub request done");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  251|      0|    return;
  252|      0|  }
  253|       |
  254|    329|  dohp->pending--;
  255|    329|  infof(doh, "a DoH request is completed, %u to go", dohp->pending);
  ------------------
  |  |  143|    329|  do {                               \
  |  |  144|    329|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    329|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 329, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 329]
  |  |  |  |  ------------------
  |  |  |  |  323|    329|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    329|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    329|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 329]
  |  |  ------------------
  ------------------
  256|    329|  dohp->probe_resp[i].result = result;
  257|       |  /* We expect either the meta data still to exist or the sub request
  258|       |   * to have already failed. */
  259|    329|  if(!result) {
  ------------------
  |  Branch (259:6): [True: 0, False: 329]
  ------------------
  260|      0|    dohp->probe_resp[i].dnstype = doh_req->dnstype;
  261|      0|    result = curlx_dyn_addn(&dohp->probe_resp[i].body,
  262|      0|                            curlx_dyn_ptr(&doh_req->resp_body),
  263|      0|                            curlx_dyn_len(&doh_req->resp_body));
  264|      0|  }
  265|    329|  Curl_meta_remove(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   85|    329|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  266|       |
  267|    329|  if(result)
  ------------------
  |  Branch (267:6): [True: 329, False: 0]
  ------------------
  268|    329|    infof(doh, "DoH request %s", curl_easy_strerror(result));
  ------------------
  |  |  143|    329|  do {                               \
  |  |  144|    329|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    329|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 329, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 329]
  |  |  |  |  ------------------
  |  |  |  |  323|    329|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    329|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    329|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 329]
  |  |  ------------------
  ------------------
  269|       |
  270|    329|  if(!dohp->pending) {
  ------------------
  |  Branch (270:6): [True: 164, False: 165]
  ------------------
  271|       |    /* DoH completed, run master to act on results */
  272|    164|    Curl_multi_mark_dirty(master);
  273|    164|  }
  274|    329|}
doh.c:doh_probe_dtor:
  277|    795|{
  278|    795|  (void)key;
  279|    795|  (void)klen;
  280|    795|  if(e) {
  ------------------
  |  Branch (280:6): [True: 795, False: 0]
  ------------------
  281|    795|    struct doh_request *doh_req = e;
  282|    795|    curl_slist_free_all(doh_req->req_hds);
  283|    795|    curlx_dyn_free(&doh_req->resp_body);
  284|    795|    curlx_free(e);
  ------------------
  |  | 1478|    795|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  285|    795|  }
  286|    795|}
doh.c:doh2ai:
  944|    136|{
  945|    136|  struct Curl_addrinfo *ai;
  946|    136|  struct Curl_addrinfo *prevai = NULL;
  947|    136|  struct Curl_addrinfo *firstai = NULL;
  948|    136|  struct sockaddr_in *addr;
  949|    136|#ifdef USE_IPV6
  950|    136|  struct sockaddr_in6 *addr6;
  951|    136|#endif
  952|    136|  CURLcode result = CURLE_OK;
  953|    136|  int i;
  954|    136|  size_t hostlen = strlen(hostname) + 1; /* include null-terminator */
  955|       |
  956|    136|  DEBUGASSERT(de);
  ------------------
  |  | 1079|    136|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (956:3): [True: 0, False: 136]
  |  Branch (956:3): [True: 136, False: 0]
  ------------------
  957|       |
  958|    136|  if(!de->numaddr)
  ------------------
  |  Branch (958:6): [True: 136, False: 0]
  ------------------
  959|    136|    return CURLE_COULDNT_RESOLVE_HOST;
  960|       |
  961|      0|  for(i = 0; i < de->numaddr; i++) {
  ------------------
  |  Branch (961:14): [True: 0, False: 0]
  ------------------
  962|      0|    size_t ss_size;
  963|      0|    CURL_SA_FAMILY_T addrtype;
  ------------------
  |  | 1280|      0|#    define CURL_SA_FAMILY_T sa_family_t
  ------------------
  964|      0|    if(de->addr[i].type == CURL_DNS_TYPE_AAAA) {
  ------------------
  |  Branch (964:8): [True: 0, False: 0]
  ------------------
  965|       |#ifndef USE_IPV6
  966|       |      /* we cannot handle IPv6 addresses */
  967|       |      continue;
  968|       |#else
  969|      0|      ss_size = sizeof(struct sockaddr_in6);
  970|      0|      addrtype = AF_INET6;
  971|      0|#endif
  972|      0|    }
  973|      0|    else {
  974|      0|      ss_size = sizeof(struct sockaddr_in);
  975|      0|      addrtype = AF_INET;
  976|      0|    }
  977|       |
  978|      0|    ai = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen);
  ------------------
  |  | 1475|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  979|      0|    if(!ai) {
  ------------------
  |  Branch (979:8): [True: 0, False: 0]
  ------------------
  980|      0|      result = CURLE_OUT_OF_MEMORY;
  981|      0|      break;
  982|      0|    }
  983|      0|    ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  984|      0|    ai->ai_canonname = (void *)((char *)ai->ai_addr + ss_size);
  985|      0|    memcpy(ai->ai_canonname, hostname, hostlen);
  986|       |
  987|      0|    if(!firstai)
  ------------------
  |  Branch (987:8): [True: 0, False: 0]
  ------------------
  988|       |      /* store the pointer we want to return from this function */
  989|      0|      firstai = ai;
  990|       |
  991|      0|    if(prevai)
  ------------------
  |  Branch (991:8): [True: 0, False: 0]
  ------------------
  992|       |      /* make the previous entry point to this */
  993|      0|      prevai->ai_next = ai;
  994|       |
  995|      0|    ai->ai_family = addrtype;
  996|       |
  997|       |    /* we return all names as STREAM, so when using this address for TFTP
  998|       |       the type must be ignored and conn->socktype be used instead! */
  999|      0|    ai->ai_socktype = SOCK_STREAM;
 1000|       |
 1001|      0|    ai->ai_addrlen = (curl_socklen_t)ss_size;
 1002|       |
 1003|       |    /* leave the rest of the struct filled with zero */
 1004|       |
 1005|      0|    switch(ai->ai_family) {
  ------------------
  |  Branch (1005:12): [True: 0, False: 0]
  ------------------
 1006|      0|    case AF_INET:
  ------------------
  |  Branch (1006:5): [True: 0, False: 0]
  ------------------
 1007|      0|      addr = (void *)ai->ai_addr; /* storage area for this info */
 1008|      0|      DEBUGASSERT(sizeof(struct in_addr) == sizeof(de->addr[i].ip.v4));
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1008:7): [True: 0, Folded]
  |  Branch (1008:7): [True: 0, Folded]
  ------------------
 1009|      0|      memcpy(&addr->sin_addr, &de->addr[i].ip.v4, sizeof(struct in_addr));
 1010|      0|      addr->sin_family = addrtype;
 1011|      0|      addr->sin_port = htons((unsigned short)port);
 1012|      0|      break;
 1013|       |
 1014|      0|#ifdef USE_IPV6
 1015|      0|    case AF_INET6:
  ------------------
  |  Branch (1015:5): [True: 0, False: 0]
  ------------------
 1016|      0|      addr6 = (void *)ai->ai_addr; /* storage area for this info */
 1017|      0|      DEBUGASSERT(sizeof(struct in6_addr) == sizeof(de->addr[i].ip.v6));
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1017:7): [True: 0, Folded]
  |  Branch (1017:7): [True: 0, Folded]
  ------------------
 1018|      0|      memcpy(&addr6->sin6_addr, &de->addr[i].ip.v6, sizeof(struct in6_addr));
 1019|      0|      addr6->sin6_family = addrtype;
 1020|      0|      addr6->sin6_port = htons((unsigned short)port);
 1021|      0|      break;
 1022|      0|#endif
 1023|      0|    }
 1024|       |
 1025|      0|    prevai = ai;
 1026|      0|  }
 1027|       |
 1028|      0|  if(result) {
  ------------------
  |  Branch (1028:6): [True: 0, False: 0]
  ------------------
 1029|      0|    Curl_freeaddrinfo(firstai);
 1030|      0|    firstai = NULL;
 1031|      0|  }
 1032|      0|  *aip = firstai;
 1033|       |
 1034|      0|  return result;
 1035|      0|}
doh.c:doh_close:
 1325|    545|{
 1326|    545|  struct doh_probes *doh = async ? async->doh : NULL;
  ------------------
  |  Branch (1326:28): [True: 545, False: 0]
  ------------------
 1327|    545|  if(doh && data->multi) {
  ------------------
  |  Branch (1327:6): [True: 545, False: 0]
  |  Branch (1327:13): [True: 545, False: 0]
  ------------------
 1328|    545|    struct Curl_easy *probe_data;
 1329|    545|    uint32_t mid;
 1330|    545|    size_t slot;
 1331|  1.63k|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1331:19): [True: 1.09k, False: 545]
  ------------------
 1332|  1.09k|      mid = doh->probe_resp[slot].probe_mid;
 1333|  1.09k|      if(mid == UINT32_MAX)
  ------------------
  |  Branch (1333:10): [True: 305, False: 785]
  ------------------
 1334|    305|        continue;
 1335|    785|      doh->probe_resp[slot].probe_mid = UINT32_MAX;
 1336|       |      /* should have been called before data is removed from multi handle */
 1337|    785|      DEBUGASSERT(data->multi);
  ------------------
  |  | 1079|    785|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1337:7): [True: 0, False: 785]
  |  Branch (1337:7): [True: 785, False: 0]
  ------------------
 1338|    785|      probe_data = data->multi ? Curl_multi_get_easy(data->multi, mid) : NULL;
  ------------------
  |  Branch (1338:20): [True: 785, False: 0]
  ------------------
 1339|    785|      if(!probe_data) {
  ------------------
  |  Branch (1339:10): [True: 0, False: 785]
  ------------------
 1340|      0|        DEBUGF(infof(data, "Curl_doh_close: xfer for mid=%u not found!",
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1341|      0|                     doh->probe_resp[slot].probe_mid));
 1342|      0|        continue;
 1343|      0|      }
 1344|    785|      probe_data->sub_xfer_done = NULL; /* No longer interested in result */
 1345|       |      /* data->multi might already be reset at this time */
 1346|    785|      Curl_multi_remove_handle(data->multi, probe_data);
 1347|    785|      Curl_close(&probe_data);
 1348|    785|    }
 1349|    545|    CURL_TRC_DNS(data, "[DoH] probe done");
  ------------------
  |  |  168|    545|  do {                                 \
  |  |  169|    545|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    545|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|    545|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  1.09k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 545, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 545]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  1.09k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|    545|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    545|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    545|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 545]
  |  |  ------------------
  ------------------
 1350|    545|  }
 1351|    545|}

Curl_dynhds_init:
   59|  3.20k|{
   60|  3.20k|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1079|  3.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (60:3): [True: 0, False: 3.20k]
  |  Branch (60:3): [True: 3.20k, False: 0]
  ------------------
   61|  3.20k|  DEBUGASSERT(max_strs_size);
  ------------------
  |  | 1079|  3.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (61:3): [True: 0, False: 3.20k]
  |  Branch (61:3): [True: 3.20k, False: 0]
  ------------------
   62|  3.20k|  dynhds->hds = NULL;
   63|  3.20k|  dynhds->hds_len = dynhds->hds_allc = dynhds->strs_len = 0;
   64|  3.20k|  dynhds->max_entries = max_entries;
   65|  3.20k|  dynhds->max_strs_size = max_strs_size;
   66|  3.20k|  dynhds->opts = 0;
   67|  3.20k|}
Curl_dynhds_free:
   70|  3.20k|{
   71|  3.20k|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1079|  3.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (71:3): [True: 0, False: 3.20k]
  |  Branch (71:3): [True: 3.20k, False: 0]
  ------------------
   72|  3.20k|  if(dynhds->hds && dynhds->hds_len) {
  ------------------
  |  Branch (72:6): [True: 1.58k, False: 1.61k]
  |  Branch (72:21): [True: 1.58k, False: 0]
  ------------------
   73|  1.58k|    size_t i;
   74|  1.58k|    DEBUGASSERT(dynhds->hds);
  ------------------
  |  | 1079|  1.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (74:5): [True: 0, False: 1.58k]
  |  Branch (74:5): [True: 1.58k, False: 0]
  ------------------
   75|  35.3k|    for(i = 0; i < dynhds->hds_len; ++i) {
  ------------------
  |  Branch (75:16): [True: 33.7k, False: 1.58k]
  ------------------
   76|  33.7k|      entry_free(dynhds->hds[i]);
   77|  33.7k|    }
   78|  1.58k|  }
   79|  3.20k|  curlx_safefree(dynhds->hds);
  ------------------
  |  | 1336|  3.20k|  do {                      \
  |  | 1337|  3.20k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  3.20k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  3.20k|    (ptr) = NULL;           \
  |  | 1339|  3.20k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 3.20k]
  |  |  ------------------
  ------------------
   80|  3.20k|  dynhds->hds_len = dynhds->hds_allc = dynhds->strs_len = 0;
   81|  3.20k|}
Curl_dynhds_add:
  134|  33.7k|{
  135|  33.7k|  struct dynhds_entry *entry = NULL;
  136|  33.7k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  137|       |
  138|  33.7k|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1079|  33.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 0, False: 33.7k]
  |  Branch (138:3): [True: 33.7k, False: 0]
  ------------------
  139|  33.7k|  if(dynhds->max_entries && dynhds->hds_len >= dynhds->max_entries)
  ------------------
  |  Branch (139:6): [True: 0, False: 33.7k]
  |  Branch (139:29): [True: 0, False: 0]
  ------------------
  140|      0|    return CURLE_OUT_OF_MEMORY;
  141|  33.7k|  if(dynhds->strs_len + namelen + valuelen > dynhds->max_strs_size)
  ------------------
  |  Branch (141:6): [True: 0, False: 33.7k]
  ------------------
  142|      0|    return CURLE_OUT_OF_MEMORY;
  143|       |
  144|  33.7k|  entry = entry_new(name, namelen, value, valuelen, dynhds->opts);
  145|  33.7k|  if(!entry)
  ------------------
  |  Branch (145:6): [True: 0, False: 33.7k]
  ------------------
  146|      0|    goto out;
  147|       |
  148|  33.7k|  if(dynhds->hds_len + 1 >= dynhds->hds_allc) {
  ------------------
  |  Branch (148:6): [True: 3.50k, False: 30.2k]
  ------------------
  149|  3.50k|    size_t nallc = dynhds->hds_len + 16;
  150|  3.50k|    struct dynhds_entry **nhds;
  151|       |
  152|  3.50k|    if(dynhds->max_entries && nallc > dynhds->max_entries)
  ------------------
  |  Branch (152:8): [True: 0, False: 3.50k]
  |  Branch (152:31): [True: 0, False: 0]
  ------------------
  153|      0|      nallc = dynhds->max_entries;
  154|       |
  155|  3.50k|    nhds = curlx_calloc(nallc, sizeof(struct dynhds_entry *));
  ------------------
  |  | 1475|  3.50k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  156|  3.50k|    if(!nhds)
  ------------------
  |  Branch (156:8): [True: 0, False: 3.50k]
  ------------------
  157|      0|      goto out;
  158|  3.50k|    if(dynhds->hds) {
  ------------------
  |  Branch (158:8): [True: 1.91k, False: 1.58k]
  ------------------
  159|  1.91k|      memcpy(nhds, dynhds->hds,
  160|  1.91k|             dynhds->hds_len * sizeof(struct dynhds_entry *));
  161|  1.91k|      curlx_safefree(dynhds->hds);
  ------------------
  |  | 1336|  1.91k|  do {                      \
  |  | 1337|  1.91k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  1.91k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  1.91k|    (ptr) = NULL;           \
  |  | 1339|  1.91k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 1.91k]
  |  |  ------------------
  ------------------
  162|  1.91k|    }
  163|  3.50k|    dynhds->hds = nhds;
  164|  3.50k|    dynhds->hds_allc = nallc;
  165|  3.50k|  }
  166|  33.7k|  dynhds->hds[dynhds->hds_len++] = entry;
  167|  33.7k|  entry = NULL;
  168|  33.7k|  dynhds->strs_len += namelen + valuelen;
  169|  33.7k|  result = CURLE_OK;
  170|       |
  171|  33.7k|out:
  172|  33.7k|  if(entry)
  ------------------
  |  Branch (172:6): [True: 0, False: 33.7k]
  ------------------
  173|      0|    entry_free(entry);
  174|  33.7k|  return result;
  175|  33.7k|}
Curl_dynhds_cadd:
  179|  3.17k|{
  180|  3.17k|  return Curl_dynhds_add(dynhds, name, strlen(name), value, strlen(value));
  181|  3.17k|}
Curl_dynhds_h1_add_line:
  185|  1.29k|{
  186|  1.29k|  const char *p;
  187|  1.29k|  const char *name;
  188|  1.29k|  size_t namelen;
  189|  1.29k|  const char *value;
  190|  1.29k|  size_t valuelen, i;
  191|       |
  192|  1.29k|  if(!line || !line_len)
  ------------------
  |  Branch (192:6): [True: 0, False: 1.29k]
  |  Branch (192:15): [True: 0, False: 1.29k]
  ------------------
  193|      0|    return CURLE_OK;
  194|       |
  195|  1.29k|  p = memchr(line, ':', line_len);
  196|  1.29k|  if(!p)
  ------------------
  |  Branch (196:6): [True: 0, False: 1.29k]
  ------------------
  197|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  198|  1.29k|  name = line;
  199|  1.29k|  namelen = p - line;
  200|  1.29k|  p++; /* move past the colon */
  201|  2.59k|  for(i = namelen + 1; i < line_len; ++i, ++p) {
  ------------------
  |  Branch (201:24): [True: 2.59k, False: 0]
  ------------------
  202|  2.59k|    if(!ISBLANK(*p))
  ------------------
  |  |   43|  2.59k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 1.29k, False: 1.29k]
  |  |  |  Branch (43:38): [True: 0, False: 1.29k]
  |  |  ------------------
  ------------------
  203|  1.29k|      break;
  204|  2.59k|  }
  205|  1.29k|  value = p;
  206|  1.29k|  valuelen = line_len - i;
  207|       |
  208|  1.29k|  p = memchr(value, '\r', valuelen);
  209|  1.29k|  if(!p)
  ------------------
  |  Branch (209:6): [True: 0, False: 1.29k]
  ------------------
  210|      0|    p = memchr(value, '\n', valuelen);
  211|  1.29k|  if(p)
  ------------------
  |  Branch (211:6): [True: 1.29k, False: 0]
  ------------------
  212|  1.29k|    valuelen = (size_t)(p - value);
  213|       |
  214|  1.29k|  return Curl_dynhds_add(dynhds, name, namelen, value, valuelen);
  215|  1.29k|}
Curl_dynhds_h1_cadd_line:
  218|  1.29k|{
  219|  1.29k|  return Curl_dynhds_h1_add_line(dynhds, line, line ? strlen(line) : 0);
  ------------------
  |  Branch (219:48): [True: 1.29k, False: 0]
  ------------------
  220|  1.29k|}
Curl_dynhds_h1_dprint:
  342|  1.58k|{
  343|  1.58k|  CURLcode result = CURLE_OK;
  344|  1.58k|  size_t i;
  345|       |
  346|  1.58k|  if(!dynhds->hds_len)
  ------------------
  |  Branch (346:6): [True: 0, False: 1.58k]
  ------------------
  347|      0|    return result;
  348|       |
  349|  35.3k|  for(i = 0; i < dynhds->hds_len; ++i) {
  ------------------
  |  Branch (349:14): [True: 33.7k, False: 1.58k]
  ------------------
  350|  33.7k|    result = curlx_dyn_addf(dbuf, "%.*s: %.*s\r\n",
  351|  33.7k|                            (int)dynhds->hds[i]->namelen, dynhds->hds[i]->name,
  352|  33.7k|                            (int)dynhds->hds[i]->valuelen,
  353|  33.7k|                            dynhds->hds[i]->value);
  354|  33.7k|    if(result)
  ------------------
  |  Branch (354:8): [True: 0, False: 33.7k]
  ------------------
  355|      0|      break;
  356|  33.7k|  }
  357|       |
  358|  1.58k|  return result;
  359|  1.58k|}
dynhds.c:entry_free:
   53|  33.7k|{
   54|  33.7k|  curlx_free(e);
  ------------------
  |  | 1478|  33.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   55|  33.7k|}
dynhds.c:entry_new:
   32|  33.7k|{
   33|  33.7k|  struct dynhds_entry *e;
   34|  33.7k|  char *p;
   35|       |
   36|  33.7k|  DEBUGASSERT(name);
  ------------------
  |  | 1079|  33.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (36:3): [True: 0, False: 33.7k]
  |  Branch (36:3): [True: 33.7k, False: 0]
  ------------------
   37|  33.7k|  DEBUGASSERT(value);
  ------------------
  |  | 1079|  33.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (37:3): [True: 0, False: 33.7k]
  |  Branch (37:3): [True: 33.7k, False: 0]
  ------------------
   38|  33.7k|  e = curlx_calloc(1, sizeof(*e) + namelen + valuelen + 2);
  ------------------
  |  | 1475|  33.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   39|  33.7k|  if(!e)
  ------------------
  |  Branch (39:6): [True: 0, False: 33.7k]
  ------------------
   40|      0|    return NULL;
   41|  33.7k|  e->name = p = (char *)e + sizeof(*e);
   42|  33.7k|  memcpy(p, name, namelen);
   43|  33.7k|  e->namelen = namelen;
   44|  33.7k|  e->value = p += namelen + 1; /* leave a \0 at the end of name */
   45|  33.7k|  memcpy(p, value, valuelen);
   46|  33.7k|  e->valuelen = valuelen;
   47|  33.7k|  if(opts & DYNHDS_OPT_LOWERCASE)
  ------------------
  |  |   54|  33.7k|#define DYNHDS_OPT_LOWERCASE     (1 << 0)
  ------------------
  |  Branch (47:6): [True: 0, False: 33.7k]
  ------------------
   48|      0|    Curl_strntolower(e->name, e->name, e->namelen);
   49|  33.7k|  return e;
   50|  33.7k|}

curl_easy_init:
  333|  25.4k|{
  334|  25.4k|  CURLcode result;
  335|  25.4k|  struct Curl_easy *data;
  336|       |
  337|       |  /* Make sure we inited the global SSL stuff */
  338|  25.4k|  global_init_lock();
  ------------------
  |  |   88|  25.4k|#define global_init_lock()   curl_simple_lock_lock(&s_lock)
  ------------------
  339|       |
  340|  25.4k|  if(!initialized) {
  ------------------
  |  Branch (340:6): [True: 1, False: 25.4k]
  ------------------
  341|      1|    result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 3046|      1|#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
  |  |  ------------------
  |  |  |  | 3044|      1|#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3042|      1|#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3043|      1|#define CURL_GLOBAL_WIN32 (1 << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
  342|      1|    if(result) {
  ------------------
  |  Branch (342:8): [True: 0, False: 1]
  ------------------
  343|       |      /* something in the global init failed, return nothing */
  344|      0|      DEBUGF(curl_mfprintf(stderr, "Error: curl_global_init failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  345|      0|      global_init_unlock();
  ------------------
  |  |   89|      0|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  346|      0|      return NULL;
  347|      0|    }
  348|      1|  }
  349|  25.4k|  global_init_unlock();
  ------------------
  |  |   89|  25.4k|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  350|       |
  351|       |  /* We use Curl_open() with undefined URL so far */
  352|  25.4k|  result = Curl_open(&data);
  353|  25.4k|  if(result) {
  ------------------
  |  Branch (353:6): [True: 0, False: 25.4k]
  ------------------
  354|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_open failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  355|      0|    return NULL;
  356|      0|  }
  357|       |
  358|  25.4k|  return data;
  359|  25.4k|}
curl_easy_cleanup:
  851|  13.6k|{
  852|  13.6k|  struct Curl_eapi_guard guard;
  853|       |
  854|  13.6k|  if(CURL_EAPI_ENTER(&guard, curl, easy_cleanup, NULL)) {
  ------------------
  |  |  157|  13.6k|  Curl_eapi_enter((g), (curl), CURL_EAPI_FN_##fn, (r)) && (curl)
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 13.6k, False: 0]
  |  |  |  Branch (157:59): [True: 13.6k, False: 0]
  |  |  ------------------
  ------------------
  855|  13.6k|    struct Curl_easy *data = curl;
  856|  13.6k|    struct Curl_sigpipe_ctx sigpipe_ctx;
  857|  13.6k|    sigpipe_ignore(data, &sigpipe_ctx);
  858|  13.6k|    Curl_close(&data);
  859|  13.6k|    sigpipe_restore(&sigpipe_ctx);
  860|  13.6k|  }
  861|  13.6k|  CURL_EAPI_LEAVE(&guard);
  ------------------
  |  |  159|  13.6k|  Curl_eapi_leave(g)
  ------------------
  862|  13.6k|}
Curl_meta_set:
 1415|    785|{
 1416|    785|  DEBUGASSERT(meta_data); /* never set to NULL */
  ------------------
  |  | 1079|    785|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1416:3): [True: 0, False: 785]
  |  Branch (1416:3): [True: 785, False: 0]
  ------------------
 1417|    785|  if(!Curl_hash_add2(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1,
  ------------------
  |  |  864|    785|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (1417:6): [True: 0, False: 785]
  ------------------
 1418|    785|                     meta_data, meta_dtor)) {
 1419|      0|    meta_dtor(CURL_UNCONST(key), strlen(key) + 1, meta_data);
  ------------------
  |  |  864|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1420|      0|    return CURLE_OUT_OF_MEMORY;
 1421|      0|  }
 1422|    785|  return CURLE_OK;
 1423|    785|}
Curl_meta_remove:
 1426|  12.8k|{
 1427|  12.8k|  Curl_hash_delete(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  864|  12.8k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1428|  12.8k|}
Curl_meta_get:
 1431|    329|{
 1432|    329|  return Curl_hash_pick(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  864|    329|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1433|    329|}
easy.c:global_init:
  126|      1|{
  127|      1|  if(initialized++)
  ------------------
  |  Branch (127:6): [True: 0, False: 1]
  ------------------
  128|      0|    return CURLE_OK;
  129|       |
  130|      1|  if(memoryfuncs) {
  ------------------
  |  Branch (130:6): [True: 1, False: 0]
  ------------------
  131|       |    /* Setup the default memory functions here (again) */
  132|      1|    Curl_cmalloc = (curl_malloc_callback)malloc;
  133|      1|    Curl_cfree = (curl_free_callback)free;
  134|      1|    Curl_crealloc = (curl_realloc_callback)realloc;
  135|      1|    Curl_cstrdup = (curl_strdup_callback)CURLX_STRDUP_LOW;
  ------------------
  |  | 1467|      1|#define CURLX_STRDUP_LOW strdup
  ------------------
  136|      1|    Curl_ccalloc = (curl_calloc_callback)calloc;
  137|      1|  }
  138|       |
  139|      1|  if(Curl_trc_init()) {
  ------------------
  |  Branch (139:6): [True: 0, False: 1]
  ------------------
  140|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_trc_init failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  141|      0|    goto fail;
  142|      0|  }
  143|       |
  144|      1|  if(!Curl_ssl_init()) {
  ------------------
  |  Branch (144:6): [True: 0, False: 1]
  ------------------
  145|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssl_init failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  146|      0|    goto fail;
  147|      0|  }
  148|       |
  149|      1|  if(!Curl_vquic_init()) {
  ------------------
  |  |   84|      1|#define Curl_vquic_init() 1
  ------------------
  |  Branch (149:6): [Folded, False: 1]
  ------------------
  150|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_vquic_init failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  151|      0|    goto fail;
  152|      0|  }
  153|       |
  154|      1|  if(Curl_win32_init(flags)) {
  ------------------
  |  |   32|      1|#define Curl_win32_init(x) CURLE_OK
  |  |  ------------------
  |  |  |  Branch (32:28): [Folded, False: 1]
  |  |  ------------------
  ------------------
  155|      0|    DEBUGF(curl_mfprintf(stderr, "Error: win32_init failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  156|      0|    goto fail;
  157|      0|  }
  158|       |
  159|      1|  if(Curl_amiga_init()) {
  ------------------
  |  |   36|      1|#define Curl_amiga_init()    CURLE_OK
  |  |  ------------------
  |  |  |  Branch (36:30): [Folded, False: 1]
  |  |  ------------------
  ------------------
  160|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_amiga_init failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  161|      0|    goto fail;
  162|      0|  }
  163|       |
  164|      1|  if(Curl_macos_init()) {
  ------------------
  |  |   31|      1|#define Curl_macos_init() CURLE_OK
  |  |  ------------------
  |  |  |  Branch (31:27): [Folded, False: 1]
  |  |  ------------------
  ------------------
  165|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_macos_init failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  166|      0|    goto fail;
  167|      0|  }
  168|       |
  169|      1|  if(Curl_async_global_init()) {
  ------------------
  |  Branch (169:6): [True: 0, False: 1]
  ------------------
  170|      0|    DEBUGF(curl_mfprintf(stderr, "Error: resolver_global_init failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  171|      0|    goto fail;
  172|      0|  }
  173|       |
  174|      1|  if(Curl_ssh_init()) {
  ------------------
  |  |  259|      1|#define Curl_ssh_init() 0
  |  |  ------------------
  |  |  |  Branch (259:25): [Folded, False: 1]
  |  |  ------------------
  ------------------
  175|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssh_init failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  176|      0|    goto fail;
  177|      0|  }
  178|       |
  179|      1|  easy_init_flags = flags;
  180|       |
  181|      1|#ifdef DEBUGBUILD
  182|      1|  if(getenv("CURL_GLOBAL_INIT"))
  ------------------
  |  Branch (182:6): [True: 0, False: 1]
  ------------------
  183|       |    /* alloc data that will leak if *cleanup() is not called! */
  184|      0|    leakpointer = curlx_malloc(1);
  ------------------
  |  | 1473|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  185|      1|#endif
  186|       |
  187|      1|  return CURLE_OK;
  188|       |
  189|      0|fail:
  190|      0|  initialized--; /* undo the increase */
  191|      0|  return CURLE_FAILED_INIT;
  192|      1|}

easy.c:curl_simple_lock_lock:
   64|  25.4k|{
   65|  25.4k|  for(;;) {
   66|  25.4k|    if(!atomic_exchange_explicit(lock, true, memory_order_acquire))
  ------------------
  |  Branch (66:8): [True: 25.4k, False: 0]
  ------------------
   67|  25.4k|      break;
   68|       |    /* Reduce cache coherency traffic */
   69|      0|    while(atomic_load_explicit(lock, memory_order_relaxed)) {
  ------------------
  |  Branch (69:11): [True: 0, False: 0]
  ------------------
   70|       |      /* Reduce load (not mandatory) */
   71|      0|#ifdef HAVE_BUILTIN_IA32_PAUSE
   72|      0|      __builtin_ia32_pause();
   73|       |#elif defined(__aarch64__)
   74|       |      __asm__ volatile("yield" ::: "memory");
   75|       |#elif defined(HAVE_SCHED_YIELD)
   76|       |      sched_yield();
   77|       |#endif
   78|      0|    }
   79|      0|  }
   80|  25.4k|}
easy.c:curl_simple_lock_unlock:
   83|  25.4k|{
   84|  25.4k|  atomic_store_explicit(lock, false, memory_order_release);
   85|  25.4k|}

curl_escape:
   37|  1.07k|{
   38|       |  return curl_easy_escape(NULL, string, length);
   39|  1.07k|}
curl_easy_escape:
   51|  1.07k|{
   52|  1.07k|  size_t len;
   53|  1.07k|  struct dynbuf d;
   54|  1.07k|  (void)curl;
   55|       |
   56|  1.07k|  if(!string || (length < 0))
  ------------------
  |  Branch (56:6): [True: 0, False: 1.07k]
  |  Branch (56:17): [True: 0, False: 1.07k]
  ------------------
   57|      0|    return NULL;
   58|       |
   59|  1.07k|  len = (length ? (size_t)length : strlen(string));
  ------------------
  |  Branch (59:10): [True: 0, False: 1.07k]
  ------------------
   60|  1.07k|  if(!len)
  ------------------
  |  Branch (60:6): [True: 959, False: 111]
  ------------------
   61|    959|    return curlx_strdup("");
  ------------------
  |  | 1472|    959|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   62|       |
   63|    111|  if(len > SIZE_MAX / 16)
  ------------------
  |  Branch (63:6): [True: 0, False: 111]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|    111|  curlx_dyn_init(&d, (len * 3) + 1);
   67|       |
   68|   228k|  while(len--) {
  ------------------
  |  Branch (68:9): [True: 228k, False: 111]
  ------------------
   69|       |    /* treat the characters unsigned */
   70|   228k|    unsigned char in = (unsigned char)*string++;
   71|       |
   72|   228k|    if(ISUNRESERVED(in)) {
  ------------------
  |  |   47|   228k|#define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   39|   456k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|   456k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (42:22): [True: 152k, False: 76.3k]
  |  |  |  |  |  |  |  Branch (42:38): [True: 2.59k, False: 149k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   41|   454k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (41:22): [True: 100k, False: 125k]
  |  |  |  |  |  |  |  Branch (41:38): [True: 10.3k, False: 90.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|   215k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (40:22): [True: 139k, False: 76.5k]
  |  |  |  |  |  |  |  Branch (40:38): [True: 46.6k, False: 92.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   46|   168k|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:4): [True: 383, False: 168k]
  |  |  |  |  |  Branch (46:20): [True: 321, False: 168k]
  |  |  |  |  |  Branch (46:36): [True: 291, False: 167k]
  |  |  |  |  |  Branch (46:52): [True: 237, False: 167k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   73|       |      /* append this */
   74|  60.7k|      if(curlx_dyn_addn(&d, &in, 1))
  ------------------
  |  Branch (74:10): [True: 0, False: 60.7k]
  ------------------
   75|      0|        return NULL;
   76|  60.7k|    }
   77|   167k|    else {
   78|       |      /* encode it */
   79|   167k|      unsigned char out[3] = { '%' };
   80|   167k|      Curl_hexbyte(&out[1], in);
   81|   167k|      if(curlx_dyn_addn(&d, out, 3))
  ------------------
  |  Branch (81:10): [True: 0, False: 167k]
  ------------------
   82|      0|        return NULL;
   83|   167k|    }
   84|   228k|  }
   85|       |
   86|    111|  return curlx_dyn_ptr(&d);
   87|    111|}
Curl_urldecode:
  108|  5.51k|{
  109|  5.51k|  size_t alloc;
  110|  5.51k|  char *ns;
  111|       |
  112|  5.51k|  DEBUGASSERT(string);
  ------------------
  |  | 1079|  5.51k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 0, False: 5.51k]
  |  Branch (112:3): [True: 5.51k, False: 0]
  ------------------
  113|  5.51k|  DEBUGASSERT(ctrl >= REJECT_NADA); /* crash on TRUE/FALSE */
  ------------------
  |  | 1079|  5.51k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 5.51k]
  |  Branch (113:3): [True: 5.51k, False: 0]
  ------------------
  114|       |
  115|  5.51k|  alloc = (length ? length : strlen(string));
  ------------------
  |  Branch (115:12): [True: 4.64k, False: 864]
  ------------------
  116|  5.51k|  ns = curlx_malloc(alloc + 1);
  ------------------
  |  | 1473|  5.51k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  117|       |
  118|  5.51k|  if(!ns)
  ------------------
  |  Branch (118:6): [True: 0, False: 5.51k]
  ------------------
  119|      0|    return CURLE_OUT_OF_MEMORY;
  120|       |
  121|       |  /* store output string */
  122|  5.51k|  *ostring = ns;
  123|       |
  124|  6.82M|  while(alloc) {
  ------------------
  |  Branch (124:9): [True: 6.82M, False: 5.50k]
  ------------------
  125|  6.82M|    unsigned char in = (unsigned char)*string;
  126|  6.82M|    if(('%' == in) && (alloc > 2) &&
  ------------------
  |  Branch (126:8): [True: 3.33M, False: 3.48M]
  |  Branch (126:23): [True: 3.33M, False: 183]
  ------------------
  127|  3.33M|       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   37|  10.1M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  6.67M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 49.5k, False: 3.29M]
  |  |  |  |  |  Branch (42:38): [True: 8.90k, False: 40.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  6.67M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 19.3k, False: 3.31M]
  |  |  |  |  |  Branch (27:43): [True: 13.4k, False: 5.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  3.31M|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 25.7k, False: 3.29M]
  |  |  |  |  |  Branch (28:43): [True: 15.3k, False: 10.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                     ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   37|  37.7k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  75.4k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 18.9k, False: 18.7k]
  |  |  |  |  |  Branch (42:38): [True: 2.65k, False: 16.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  72.7k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 9.84k, False: 25.2k]
  |  |  |  |  |  Branch (27:43): [True: 5.89k, False: 3.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  29.1k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 10.2k, False: 18.9k]
  |  |  |  |  |  Branch (28:43): [True: 4.35k, False: 5.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|       |      /* this is two hexadecimal digits following a '%' */
  129|  12.8k|      in = (unsigned char)((curlx_hexval(string[1]) << 4) |
  ------------------
  |  |  111|  12.8k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  130|  12.8k|                           curlx_hexval(string[2]));
  ------------------
  |  |  111|  12.8k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  131|  12.8k|      string += 3;
  132|  12.8k|      alloc -= 3;
  133|  12.8k|    }
  134|  6.80M|    else {
  135|  6.80M|      string++;
  136|  6.80M|      alloc--;
  137|  6.80M|    }
  138|       |
  139|  6.82M|    if(((ctrl == REJECT_CTRL) && (in < 0x20)) ||
  ------------------
  |  Branch (139:9): [True: 5.61M, False: 1.20M]
  |  Branch (139:34): [True: 7, False: 5.61M]
  ------------------
  140|  6.82M|       ((ctrl == REJECT_ZERO) && (in == 0))) {
  ------------------
  |  Branch (140:9): [True: 1.20M, False: 5.61M]
  |  Branch (140:34): [True: 5, False: 1.20M]
  ------------------
  141|     12|      curlx_safefree(*ostring);
  ------------------
  |  | 1336|     12|  do {                      \
  |  | 1337|     12|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|     12|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|     12|    (ptr) = NULL;           \
  |  | 1339|     12|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12]
  |  |  ------------------
  ------------------
  142|     12|      return CURLE_URL_MALFORMAT;
  143|     12|    }
  144|       |
  145|  6.82M|    *ns++ = (char)in;
  146|  6.82M|  }
  147|  5.50k|  *ns = 0; /* terminate it */
  148|       |
  149|  5.50k|  if(olen)
  ------------------
  |  Branch (149:6): [True: 4.96k, False: 531]
  ------------------
  150|       |    /* store output size */
  151|  4.96k|    *olen = ns - *ostring;
  152|       |
  153|  5.50k|  return CURLE_OK;
  154|  5.51k|}
curl_free:
  191|  8.32k|{
  192|  8.32k|  curlx_free(p);
  ------------------
  |  | 1478|  8.32k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  193|  8.32k|}
Curl_hexencode:
  203|  3.21k|{
  204|  3.21k|  DEBUGASSERT(src && len && (olen >= 3));
  ------------------
  |  | 1079|  3.21k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (204:3): [True: 0, False: 3.21k]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 3.21k, False: 0]
  |  Branch (204:3): [True: 3.21k, False: 0]
  |  Branch (204:3): [True: 3.21k, False: 0]
  ------------------
  205|  3.21k|  if(src && len && (olen >= 3)) {
  ------------------
  |  Branch (205:6): [True: 3.21k, False: 0]
  |  Branch (205:13): [True: 3.21k, False: 0]
  |  Branch (205:20): [True: 3.21k, False: 0]
  ------------------
  206|   105k|    while(len-- && (olen >= 3)) {
  ------------------
  |  Branch (206:11): [True: 102k, False: 3.21k]
  |  Branch (206:20): [True: 102k, False: 0]
  ------------------
  207|   102k|      out[0] = Curl_ldigits[*src >> 4];
  208|   102k|      out[1] = Curl_ldigits[*src & 0x0F];
  209|   102k|      ++src;
  210|   102k|      out += 2;
  211|   102k|      olen -= 2;
  212|   102k|    }
  213|  3.21k|    *out = 0;
  214|  3.21k|  }
  215|      0|  else if(olen)
  ------------------
  |  Branch (215:11): [True: 0, False: 0]
  ------------------
  216|      0|    *out = 0;
  217|  3.21k|}
Curl_hexbyte:
  225|  2.01M|{
  226|  2.01M|  dest[0] = Curl_udigits[val >> 4];
  227|  2.01M|  dest[1] = Curl_udigits[val & 0x0F];
  228|  2.01M|}

curl_formadd:
  610|     40|{
  611|     40|  va_list arg;
  612|     40|  CURLFORMcode form;
  613|     40|  va_start(arg, last_post);
  614|     40|  form = formadd(httppost, last_post, arg);
  615|       |  va_end(arg);
  616|     40|  return form;
  617|     40|}
curl_formfree:
  665|     80|{
  666|     80|  struct curl_httppost *next;
  667|       |
  668|     80|  if(!form)
  ------------------
  |  Branch (668:6): [True: 40, False: 40]
  ------------------
  669|       |    /* no form to free, get out of this */
  670|     40|    return;
  671|       |
  672|     40|  do {
  673|     40|    next = form->next;  /* the following form line */
  674|       |
  675|       |    /* recurse to sub-contents */
  676|     40|    curl_formfree(form->more);
  677|       |
  678|     40|    if(!(form->flags & HTTPPOST_PTRNAME))
  ------------------
  |  |   39|     40|#define HTTPPOST_PTRNAME     CURL_HTTPPOST_PTRNAME
  |  |  ------------------
  |  |  |  |  209|     40|#define CURL_HTTPPOST_PTRNAME (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (678:8): [True: 40, False: 0]
  ------------------
  679|     40|      curlx_free(form->name); /* free the name */
  ------------------
  |  | 1478|     40|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  680|     40|    if(!(form->flags &
  ------------------
  |  Branch (680:8): [True: 0, False: 40]
  ------------------
  681|     40|         (HTTPPOST_PTRCONTENTS | HTTPPOST_BUFFER | HTTPPOST_CALLBACK)))
  ------------------
  |  |   41|     40|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|     40|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
                       (HTTPPOST_PTRCONTENTS | HTTPPOST_BUFFER | HTTPPOST_CALLBACK)))
  ------------------
  |  |   45|     40|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|     40|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
                       (HTTPPOST_PTRCONTENTS | HTTPPOST_BUFFER | HTTPPOST_CALLBACK)))
  ------------------
  |  |   44|     40|#define HTTPPOST_CALLBACK    CURL_HTTPPOST_CALLBACK
  |  |  ------------------
  |  |  |  |  218|     40|#define CURL_HTTPPOST_CALLBACK (1 << 6)
  |  |  ------------------
  ------------------
  682|      0|      curlx_free(form->contents); /* free the contents */
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  683|     40|    curlx_free(form->contenttype); /* free the content type */
  ------------------
  |  | 1478|     40|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  684|     40|    curlx_free(form->showfilename); /* free the faked filename */
  ------------------
  |  | 1478|     40|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  685|     40|    curlx_free(form);       /* free the struct */
  ------------------
  |  | 1478|     40|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  686|     40|    form = next;
  687|     40|  } while(form); /* continue */
  ------------------
  |  Branch (687:11): [True: 0, False: 40]
  ------------------
  688|     40|}
formdata.c:formadd:
  302|     40|{
  303|     40|  struct FormInfo *first_form, *curr, *form = NULL;
  304|     40|  CURLFORMcode retval = CURL_FORMADD_OK;
  305|     40|  CURLformoption option;
  306|     40|  const struct curl_forms *forms = NULL;
  307|     40|  char *avalue = NULL;
  308|     40|  struct curl_httppost *newchain = NULL;
  309|     40|  struct curl_httppost *lastnode = NULL;
  310|       |
  311|     40|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  312|     40|#ifdef HAVE_UINTPTR_T
  313|     40|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  314|       |#else
  315|       |#define form_int_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  316|       |#endif
  317|       |
  318|       |  /*
  319|       |   * We need to allocate the first struct to fill in.
  320|       |   */
  321|     40|  first_form = forminfo_new();
  322|     40|  if(!first_form)
  ------------------
  |  Branch (322:6): [True: 0, False: 40]
  ------------------
  323|      0|    return CURL_FORMADD_MEMORY;
  324|       |
  325|     40|  curr = first_form;
  326|       |
  327|       |  /*
  328|       |   * Loop through all the options set. Break if we have an error to report.
  329|       |   */
  330|    160|  while(retval == CURL_FORMADD_OK) {
  ------------------
  |  Branch (330:9): [True: 160, False: 0]
  ------------------
  331|       |
  332|       |    /* first see if we have more parts of the array param */
  333|    160|    if(forms) {
  ------------------
  |  Branch (333:8): [True: 0, False: 160]
  ------------------
  334|       |      /* get the upcoming option from the given array */
  335|      0|      option = forms->option;
  336|      0|      avalue = (char *)CURL_UNCONST(forms->value);
  ------------------
  |  |  864|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  337|       |
  338|      0|      forms++; /* advance this to next entry */
  339|      0|      if(CURLFORM_END == option) {
  ------------------
  |  Branch (339:10): [True: 0, False: 0]
  ------------------
  340|       |        /* end of array state */
  341|      0|        forms = NULL;
  342|      0|        continue;
  343|      0|      }
  344|      0|    }
  345|    160|    else {
  346|       |      /* This is not array-state, get next option. This gets an 'int' with
  347|       |         va_arg() because CURLformoption might be a smaller type than int and
  348|       |         might cause compiler warnings and wrong behavior. */
  349|    160|      option = (CURLformoption)va_arg(params, int);
  350|    160|      if(CURLFORM_END == option)
  ------------------
  |  Branch (350:10): [True: 40, False: 120]
  ------------------
  351|     40|        break;
  352|    160|    }
  353|       |
  354|    120|    switch(option) {
  355|      0|    case CURLFORM_ARRAY:
  ------------------
  |  Branch (355:5): [True: 0, False: 120]
  ------------------
  356|      0|      if(forms)
  ------------------
  |  Branch (356:10): [True: 0, False: 0]
  ------------------
  357|       |        /* we do not support an array from within an array */
  358|      0|        retval = CURL_FORMADD_ILLEGAL_ARRAY;
  359|      0|      else {
  360|      0|        forms = va_arg(params, struct curl_forms *);
  361|      0|        if(!forms)
  ------------------
  |  Branch (361:12): [True: 0, False: 0]
  ------------------
  362|      0|          retval = CURL_FORMADD_NULL;
  363|      0|      }
  364|      0|      break;
  365|       |
  366|       |      /*
  367|       |       * Set the Name property.
  368|       |       */
  369|      0|    case CURLFORM_PTRNAME:
  ------------------
  |  Branch (369:5): [True: 0, False: 120]
  ------------------
  370|      0|      curr->flags |= HTTPPOST_PTRNAME;
  ------------------
  |  |   39|      0|#define HTTPPOST_PTRNAME     CURL_HTTPPOST_PTRNAME
  |  |  ------------------
  |  |  |  |  209|      0|#define CURL_HTTPPOST_PTRNAME (1 << 2)
  |  |  ------------------
  ------------------
  371|      0|      FALLTHROUGH();
  ------------------
  |  |  823|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  372|     40|    case CURLFORM_COPYNAME:
  ------------------
  |  Branch (372:5): [True: 40, False: 80]
  ------------------
  373|     40|      if(Curl_bufref_ptr(&curr->name))
  ------------------
  |  Branch (373:10): [True: 0, False: 40]
  ------------------
  374|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  375|     40|      else {
  376|     40|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|     40|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 40]
  |  |  ------------------
  ------------------
  377|     40|        if(avalue)
  ------------------
  |  Branch (377:12): [True: 40, False: 0]
  ------------------
  378|     40|          Curl_bufref_set(&curr->name, avalue, 0, NULL); /* No copy yet. */
  379|      0|        else
  380|      0|          retval = CURL_FORMADD_NULL;
  381|     40|      }
  382|     40|      break;
  383|      0|    case CURLFORM_NAMELENGTH:
  ------------------
  |  Branch (383:5): [True: 0, False: 120]
  ------------------
  384|      0|      if(curr->namelength)
  ------------------
  |  Branch (384:10): [True: 0, False: 0]
  ------------------
  385|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  386|      0|      else
  387|      0|        curr->namelength = (size_t)form_int_arg(long);
  ------------------
  |  |  313|      0|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (313:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  388|      0|      break;
  389|       |
  390|       |      /*
  391|       |       * Set the contents property.
  392|       |       */
  393|     40|    case CURLFORM_PTRCONTENTS:
  ------------------
  |  Branch (393:5): [True: 40, False: 80]
  ------------------
  394|     40|      curr->flags |= HTTPPOST_PTRCONTENTS;
  ------------------
  |  |   41|     40|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|     40|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
  395|     40|      FALLTHROUGH();
  ------------------
  |  |  823|     40|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  396|     40|    case CURLFORM_COPYCONTENTS:
  ------------------
  |  Branch (396:5): [True: 0, False: 120]
  ------------------
  397|     40|      if(Curl_bufref_ptr(&curr->value))
  ------------------
  |  Branch (397:10): [True: 0, False: 40]
  ------------------
  398|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  399|     40|      else {
  400|     40|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|     40|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 40]
  |  |  ------------------
  ------------------
  401|     40|        if(avalue)
  ------------------
  |  Branch (401:12): [True: 40, False: 0]
  ------------------
  402|     40|          Curl_bufref_set(&curr->value, avalue, 0, NULL); /* No copy yet. */
  403|      0|        else
  404|      0|          retval = CURL_FORMADD_NULL;
  405|     40|      }
  406|     40|      break;
  407|      0|    case CURLFORM_CONTENTSLENGTH:
  ------------------
  |  Branch (407:5): [True: 0, False: 120]
  ------------------
  408|      0|      curr->contentslength = (curl_off_t)(size_t)form_int_arg(long);
  ------------------
  |  |  313|      0|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (313:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  409|      0|      break;
  410|       |
  411|     40|    case CURLFORM_CONTENTLEN:
  ------------------
  |  Branch (411:5): [True: 40, False: 80]
  ------------------
  412|     40|      curr->flags |= CURL_HTTPPOST_LARGE;
  ------------------
  |  |  220|     40|#define CURL_HTTPPOST_LARGE (1 << 7)
  ------------------
  413|     40|      curr->contentslength = form_int_arg(curl_off_t);
  ------------------
  |  |  313|     40|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (313:26): [True: 0, False: 40]
  |  |  ------------------
  ------------------
  414|     40|      break;
  415|       |
  416|       |      /* Get contents from a given filename */
  417|      0|    case CURLFORM_FILECONTENT:
  ------------------
  |  Branch (417:5): [True: 0, False: 120]
  ------------------
  418|      0|      if(curr->flags & (HTTPPOST_PTRCONTENTS | HTTPPOST_READFILE))
  ------------------
  |  |   41|      0|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|      0|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
                    if(curr->flags & (HTTPPOST_PTRCONTENTS | HTTPPOST_READFILE))
  ------------------
  |  |   42|      0|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|      0|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (418:10): [True: 0, False: 0]
  ------------------
  419|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  420|      0|      else {
  421|      0|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  422|      0|        if(avalue) {
  ------------------
  |  Branch (422:12): [True: 0, False: 0]
  ------------------
  423|      0|          if(Curl_bufref_memdup0(&curr->value, avalue, strlen(avalue)))
  ------------------
  |  Branch (423:14): [True: 0, False: 0]
  ------------------
  424|      0|            retval = CURL_FORMADD_MEMORY;
  425|      0|          else
  426|      0|            curr->flags |= HTTPPOST_READFILE;
  ------------------
  |  |   42|      0|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|      0|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  427|      0|        }
  428|      0|        else
  429|      0|          retval = CURL_FORMADD_NULL;
  430|      0|      }
  431|      0|      break;
  432|       |
  433|       |      /* We upload a file */
  434|      0|    case CURLFORM_FILE:
  ------------------
  |  Branch (434:5): [True: 0, False: 120]
  ------------------
  435|      0|      avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  436|      0|      if(Curl_bufref_ptr(&curr->value)) {
  ------------------
  |  Branch (436:10): [True: 0, False: 0]
  ------------------
  437|      0|        if(curr->flags & HTTPPOST_FILENAME) {
  ------------------
  |  |   40|      0|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|      0|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (437:12): [True: 0, False: 0]
  ------------------
  438|      0|          if(avalue) {
  ------------------
  |  Branch (438:14): [True: 0, False: 0]
  ------------------
  439|      0|            form = forminfo_new();
  440|      0|            if(!form ||
  ------------------
  |  Branch (440:16): [True: 0, False: 0]
  ------------------
  441|      0|               Curl_bufref_memdup0(&form->value, avalue, strlen(avalue))) {
  ------------------
  |  Branch (441:16): [True: 0, False: 0]
  ------------------
  442|      0|              curlx_free(form);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  443|      0|              retval = CURL_FORMADD_MEMORY;
  444|      0|            }
  445|      0|            else {
  446|      0|              forminfo_add(form, curr);
  447|      0|              curr = form;
  448|      0|              form = NULL;
  449|      0|            }
  450|      0|          }
  451|      0|          else
  452|      0|            retval = CURL_FORMADD_NULL;
  453|      0|        }
  454|      0|        else
  455|      0|          retval = CURL_FORMADD_OPTION_TWICE;
  456|      0|      }
  457|      0|      else {
  458|      0|        if(avalue) {
  ------------------
  |  Branch (458:12): [True: 0, False: 0]
  ------------------
  459|      0|          if(Curl_bufref_memdup0(&curr->value, avalue, strlen(avalue)))
  ------------------
  |  Branch (459:14): [True: 0, False: 0]
  ------------------
  460|      0|            retval = CURL_FORMADD_MEMORY;
  461|      0|          else
  462|      0|            curr->flags |= HTTPPOST_FILENAME;
  ------------------
  |  |   40|      0|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|      0|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  463|      0|        }
  464|      0|        else
  465|      0|          retval = CURL_FORMADD_NULL;
  466|      0|      }
  467|      0|      break;
  468|       |
  469|      0|    case CURLFORM_BUFFERPTR:
  ------------------
  |  Branch (469:5): [True: 0, False: 120]
  ------------------
  470|      0|      curr->flags |= HTTPPOST_PTRBUFFER | HTTPPOST_BUFFER;
  ------------------
  |  |   43|      0|#define HTTPPOST_PTRBUFFER   CURL_HTTPPOST_PTRBUFFER
  |  |  ------------------
  |  |  |  |  215|      0|#define CURL_HTTPPOST_PTRBUFFER (1 << 5)
  |  |  ------------------
  ------------------
                    curr->flags |= HTTPPOST_PTRBUFFER | HTTPPOST_BUFFER;
  ------------------
  |  |   45|      0|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|      0|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  471|      0|      if(curr->buffer)
  ------------------
  |  Branch (471:10): [True: 0, False: 0]
  ------------------
  472|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  473|      0|      else {
  474|      0|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  475|      0|        if(avalue) {
  ------------------
  |  Branch (475:12): [True: 0, False: 0]
  ------------------
  476|      0|          curr->buffer = avalue; /* store for the moment */
  477|       |          /* Make value non-NULL to be accepted as fine */
  478|      0|          Curl_bufref_set(&curr->value, avalue, 0, NULL);
  479|      0|        }
  480|      0|        else
  481|      0|          retval = CURL_FORMADD_NULL;
  482|      0|      }
  483|      0|      break;
  484|       |
  485|      0|    case CURLFORM_BUFFERLENGTH:
  ------------------
  |  Branch (485:5): [True: 0, False: 120]
  ------------------
  486|      0|      if(curr->bufferlength)
  ------------------
  |  Branch (486:10): [True: 0, False: 0]
  ------------------
  487|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  488|      0|      else
  489|      0|        curr->bufferlength = (size_t)form_int_arg(long);
  ------------------
  |  |  313|      0|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (313:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  490|      0|      break;
  491|       |
  492|      0|    case CURLFORM_STREAM:
  ------------------
  |  Branch (492:5): [True: 0, False: 120]
  ------------------
  493|      0|      curr->flags |= HTTPPOST_CALLBACK;
  ------------------
  |  |   44|      0|#define HTTPPOST_CALLBACK    CURL_HTTPPOST_CALLBACK
  |  |  ------------------
  |  |  |  |  218|      0|#define CURL_HTTPPOST_CALLBACK (1 << 6)
  |  |  ------------------
  ------------------
  494|      0|      if(curr->userp)
  ------------------
  |  Branch (494:10): [True: 0, False: 0]
  ------------------
  495|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  496|      0|      else {
  497|      0|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  498|      0|        if(avalue) {
  ------------------
  |  Branch (498:12): [True: 0, False: 0]
  ------------------
  499|      0|          curr->userp = avalue;
  500|       |          /* The following line is not strictly true but we derive a value
  501|       |             from this later on and we need this non-NULL to be accepted as
  502|       |             a fine form part */
  503|      0|          Curl_bufref_set(&curr->value, avalue, 0, NULL);
  504|      0|        }
  505|      0|        else
  506|      0|          retval = CURL_FORMADD_NULL;
  507|      0|      }
  508|      0|      break;
  509|       |
  510|      0|    case CURLFORM_CONTENTTYPE:
  ------------------
  |  Branch (510:5): [True: 0, False: 120]
  ------------------
  511|      0|      avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  512|      0|      if(Curl_bufref_ptr(&curr->contenttype)) {
  ------------------
  |  Branch (512:10): [True: 0, False: 0]
  ------------------
  513|      0|        if(curr->flags & HTTPPOST_FILENAME) {
  ------------------
  |  |   40|      0|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|      0|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (513:12): [True: 0, False: 0]
  ------------------
  514|      0|          if(avalue) {
  ------------------
  |  Branch (514:14): [True: 0, False: 0]
  ------------------
  515|      0|            form = forminfo_new();
  516|      0|            if(!form || Curl_bufref_memdup0(&form->contenttype, avalue,
  ------------------
  |  Branch (516:16): [True: 0, False: 0]
  |  Branch (516:25): [True: 0, False: 0]
  ------------------
  517|      0|                                            strlen(avalue))) {
  518|      0|              curlx_free(form);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  519|      0|              retval = CURL_FORMADD_MEMORY;
  520|      0|            }
  521|      0|            else {
  522|      0|              forminfo_add(form, curr);
  523|      0|              curr = form;
  524|      0|              form = NULL;
  525|      0|            }
  526|      0|          }
  527|      0|          else
  528|      0|            retval = CURL_FORMADD_NULL;
  529|      0|        }
  530|      0|        else
  531|      0|          retval = CURL_FORMADD_OPTION_TWICE;
  532|      0|      }
  533|      0|      else if(avalue) {
  ------------------
  |  Branch (533:15): [True: 0, False: 0]
  ------------------
  534|      0|        if(Curl_bufref_memdup0(&curr->contenttype, avalue, strlen(avalue)))
  ------------------
  |  Branch (534:12): [True: 0, False: 0]
  ------------------
  535|      0|          retval = CURL_FORMADD_MEMORY;
  536|      0|      }
  537|      0|      else
  538|      0|        retval = CURL_FORMADD_NULL;
  539|      0|      break;
  540|       |
  541|      0|    case CURLFORM_CONTENTHEADER: {
  ------------------
  |  Branch (541:5): [True: 0, False: 120]
  ------------------
  542|       |      /* this "cast increases required alignment of target type" but
  543|       |         we consider it OK anyway */
  544|      0|      struct curl_slist *list = form_ptr_arg(struct curl_slist *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  545|       |
  546|      0|      if(curr->contentheader)
  ------------------
  |  Branch (546:10): [True: 0, False: 0]
  ------------------
  547|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  548|      0|      else
  549|      0|        curr->contentheader = list;
  550|       |
  551|      0|      break;
  552|     40|    }
  553|      0|    case CURLFORM_FILENAME:
  ------------------
  |  Branch (553:5): [True: 0, False: 120]
  ------------------
  554|      0|    case CURLFORM_BUFFER:
  ------------------
  |  Branch (554:5): [True: 0, False: 120]
  ------------------
  555|      0|      avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  556|      0|      if(Curl_bufref_ptr(&curr->showfilename))
  ------------------
  |  Branch (556:10): [True: 0, False: 0]
  ------------------
  557|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  558|      0|      else if(Curl_bufref_memdup0(&curr->showfilename, avalue, strlen(avalue)))
  ------------------
  |  Branch (558:15): [True: 0, False: 0]
  ------------------
  559|      0|        retval = CURL_FORMADD_MEMORY;
  560|      0|      break;
  561|       |
  562|      0|    default:
  ------------------
  |  Branch (562:5): [True: 0, False: 120]
  ------------------
  563|      0|      retval = CURL_FORMADD_UNKNOWN_OPTION;
  564|      0|      break;
  565|    120|    }
  566|    120|  }
  567|       |
  568|     40|  if(!retval)
  ------------------
  |  Branch (568:6): [True: 40, False: 0]
  ------------------
  569|     40|    retval = formadd_check(first_form, &newchain, &lastnode);
  570|       |
  571|     40|  if(retval)
  ------------------
  |  Branch (571:6): [True: 0, False: 40]
  ------------------
  572|       |    /* On error, free allocated fields for all nodes of the FormInfo linked
  573|       |       list without deallocating nodes. List nodes are deallocated later on */
  574|      0|    free_formlist(first_form);
  575|       |
  576|       |  /* Always deallocate FormInfo linked list nodes without touching node
  577|       |     fields given that these have either been deallocated or are owned
  578|       |     now by the httppost linked list */
  579|     80|  while(first_form) {
  ------------------
  |  Branch (579:9): [True: 40, False: 40]
  ------------------
  580|     40|    struct FormInfo *ptr = first_form->more;
  581|     40|    curlx_free(first_form);
  ------------------
  |  | 1478|     40|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  582|     40|    first_form = ptr;
  583|     40|  }
  584|       |
  585|     40|  if(!retval) {
  ------------------
  |  Branch (585:6): [True: 40, False: 0]
  ------------------
  586|       |    /* Only if all is fine, link the new chain into the provided list */
  587|     40|    if(*last_post)
  ------------------
  |  Branch (587:8): [True: 0, False: 40]
  ------------------
  588|      0|      (*last_post)->next = newchain;
  589|     40|    else
  590|     40|      (*httppost) = newchain;
  591|       |
  592|     40|    (*last_post) = lastnode;
  593|     40|  }
  594|      0|  else
  595|      0|    free_chain(newchain);
  596|       |
  597|     40|  return retval;
  598|     40|#undef form_ptr_arg
  599|     40|#undef form_int_arg
  600|     40|}
formdata.c:forminfo_new:
  107|     40|{
  108|     40|  struct FormInfo *form_info = curlx_calloc(1, sizeof(struct FormInfo));
  ------------------
  |  | 1475|     40|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  109|       |
  110|     40|  if(form_info) {
  ------------------
  |  Branch (110:6): [True: 40, False: 0]
  ------------------
  111|     40|    Curl_bufref_init(&form_info->name);
  112|     40|    Curl_bufref_init(&form_info->value);
  113|     40|    Curl_bufref_init(&form_info->contenttype);
  114|     40|    Curl_bufref_init(&form_info->showfilename);
  115|     40|  }
  116|       |
  117|     40|  return form_info;
  118|     40|}
formdata.c:formadd_check:
  218|     40|{
  219|     40|  const char *prevtype = NULL;
  220|     40|  struct FormInfo *form = NULL;
  221|     40|  struct curl_httppost *post = NULL;
  222|       |
  223|       |  /* go through the list, check for completeness and if everything is
  224|       |   * alright add the HttpPost item otherwise set retval accordingly */
  225|       |
  226|     80|  for(form = first_form; form; form = form->more) {
  ------------------
  |  Branch (226:26): [True: 40, False: 40]
  ------------------
  227|     40|    const char *name = Curl_bufref_ptr(&form->name);
  228|       |
  229|     40|    if(((!name || !Curl_bufref_ptr(&form->value)) && !post) ||
  ------------------
  |  Branch (229:10): [True: 0, False: 40]
  |  Branch (229:19): [True: 0, False: 40]
  |  Branch (229:54): [True: 0, False: 0]
  ------------------
  230|     40|       (form->contentslength &&
  ------------------
  |  Branch (230:9): [True: 16, False: 24]
  ------------------
  231|     16|        (form->flags & HTTPPOST_FILENAME)) ||
  ------------------
  |  |   40|     16|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|     16|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (231:9): [True: 0, False: 16]
  ------------------
  232|     40|       ((form->flags & HTTPPOST_FILENAME) &&
  ------------------
  |  |   40|     40|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|     40|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (232:9): [True: 0, False: 40]
  ------------------
  233|      0|        (form->flags & HTTPPOST_PTRCONTENTS)) ||
  ------------------
  |  |   41|      0|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|      0|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
  |  Branch (233:9): [True: 0, False: 0]
  ------------------
  234|       |
  235|     40|       (!form->buffer &&
  ------------------
  |  Branch (235:9): [True: 40, False: 0]
  ------------------
  236|     40|        (form->flags & HTTPPOST_BUFFER) &&
  ------------------
  |  |   45|     40|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|     40|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  |  Branch (236:9): [True: 0, False: 40]
  ------------------
  237|      0|        (form->flags & HTTPPOST_PTRBUFFER)) ||
  ------------------
  |  |   43|      0|#define HTTPPOST_PTRBUFFER   CURL_HTTPPOST_PTRBUFFER
  |  |  ------------------
  |  |  |  |  215|      0|#define CURL_HTTPPOST_PTRBUFFER (1 << 5)
  |  |  ------------------
  ------------------
  |  Branch (237:9): [True: 0, False: 0]
  ------------------
  238|       |
  239|     40|       ((form->flags & HTTPPOST_READFILE) &&
  ------------------
  |  |   42|     40|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|     40|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (239:9): [True: 0, False: 40]
  ------------------
  240|      0|        (form->flags & HTTPPOST_PTRCONTENTS))
  ------------------
  |  |   41|      0|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|      0|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
  |  Branch (240:9): [True: 0, False: 0]
  ------------------
  241|     40|      ) {
  242|      0|      return CURL_FORMADD_INCOMPLETE;
  243|      0|    }
  244|     40|    if(((form->flags & HTTPPOST_FILENAME) ||
  ------------------
  |  |   40|     40|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|     40|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (244:9): [True: 0, False: 40]
  ------------------
  245|     40|        (form->flags & HTTPPOST_BUFFER)) &&
  ------------------
  |  |   45|     40|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|     40|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  |  Branch (245:9): [True: 0, False: 40]
  ------------------
  246|      0|       !Curl_bufref_ptr(&form->contenttype)) {
  ------------------
  |  Branch (246:8): [True: 0, False: 0]
  ------------------
  247|      0|      const char *f = Curl_bufref_ptr((form->flags & HTTPPOST_BUFFER) ?
  ------------------
  |  |   45|      0|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|      0|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  |  Branch (247:39): [True: 0, False: 0]
  ------------------
  248|      0|                                      &form->showfilename : &form->value);
  249|      0|      const char *type = Curl_mime_contenttype(f);
  250|      0|      if(!type)
  ------------------
  |  Branch (250:10): [True: 0, False: 0]
  ------------------
  251|      0|        type = prevtype;
  252|      0|      if(!type)
  ------------------
  |  Branch (252:10): [True: 0, False: 0]
  ------------------
  253|      0|        type = FILE_CONTENTTYPE_DEFAULT;
  ------------------
  |  |   38|      0|#define FILE_CONTENTTYPE_DEFAULT        "application/octet-stream"
  ------------------
  254|       |
  255|       |      /* our contenttype is missing */
  256|      0|      if(Curl_bufref_memdup0(&form->contenttype, type, strlen(type)))
  ------------------
  |  Branch (256:10): [True: 0, False: 0]
  ------------------
  257|      0|        return CURL_FORMADD_MEMORY;
  258|      0|    }
  259|     40|    if(name && form->namelength) {
  ------------------
  |  Branch (259:8): [True: 40, False: 0]
  |  Branch (259:16): [True: 0, False: 40]
  ------------------
  260|      0|      if(memchr(name, 0, form->namelength))
  ------------------
  |  Branch (260:10): [True: 0, False: 0]
  ------------------
  261|      0|        return CURL_FORMADD_NULL;
  262|      0|    }
  263|     40|    if(!(form->flags & HTTPPOST_PTRNAME)) {
  ------------------
  |  |   39|     40|#define HTTPPOST_PTRNAME     CURL_HTTPPOST_PTRNAME
  |  |  ------------------
  |  |  |  |  209|     40|#define CURL_HTTPPOST_PTRNAME (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (263:8): [True: 40, False: 0]
  ------------------
  264|       |      /* Note that there is small risk that form->name is NULL here if the app
  265|       |         passed in a bad combo, so we check for that. */
  266|     40|      if(forminfo_copyfield(&form->name, form->namelength))
  ------------------
  |  Branch (266:10): [True: 0, False: 40]
  ------------------
  267|      0|        return CURL_FORMADD_MEMORY;
  268|     40|    }
  269|     40|    if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
  ------------------
  |  |   40|     40|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|     40|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
                  if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
  ------------------
  |  |   42|     40|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|     40|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (269:8): [True: 0, False: 40]
  ------------------
  270|     40|                        HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
  ------------------
  |  |   41|     40|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|     40|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
                                      HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
  ------------------
  |  |   43|     40|#define HTTPPOST_PTRBUFFER   CURL_HTTPPOST_PTRBUFFER
  |  |  ------------------
  |  |  |  |  215|     40|#define CURL_HTTPPOST_PTRBUFFER (1 << 5)
  |  |  ------------------
  ------------------
  271|     40|                        HTTPPOST_CALLBACK))) {
  ------------------
  |  |   44|     40|#define HTTPPOST_CALLBACK    CURL_HTTPPOST_CALLBACK
  |  |  ------------------
  |  |  |  |  218|     40|#define CURL_HTTPPOST_CALLBACK (1 << 6)
  |  |  ------------------
  ------------------
  272|      0|      if(forminfo_copyfield(&form->value, (size_t)form->contentslength))
  ------------------
  |  Branch (272:10): [True: 0, False: 0]
  ------------------
  273|      0|        return CURL_FORMADD_MEMORY;
  274|      0|    }
  275|     40|    post = httppost_add(form, post, httppost, last_post);
  276|       |
  277|     40|    if(!post)
  ------------------
  |  Branch (277:8): [True: 0, False: 40]
  ------------------
  278|      0|      return CURL_FORMADD_MEMORY;
  279|       |
  280|     40|    if(Curl_bufref_ptr(&form->contenttype))
  ------------------
  |  Branch (280:8): [True: 0, False: 40]
  ------------------
  281|      0|      prevtype = Curl_bufref_ptr(&form->contenttype);
  282|     40|  }
  283|       |
  284|     40|  return CURL_FORMADD_OK;
  285|     40|}
formdata.c:forminfo_copyfield:
  122|     40|{
  123|     40|  const char *value = Curl_bufref_ptr(field);
  124|     40|  CURLcode result = CURLE_OK;
  125|       |
  126|     40|  if(value) {
  ------------------
  |  Branch (126:6): [True: 40, False: 0]
  ------------------
  127|     40|    if(!len)
  ------------------
  |  Branch (127:8): [True: 40, False: 0]
  ------------------
  128|     40|      len = strlen(value);
  129|     40|    result = Curl_bufref_memdup0(field, value, len);
  130|     40|  }
  131|       |
  132|     40|  return result;
  133|     40|}
formdata.c:httppost_add:
   61|     40|{
   62|     40|  struct curl_httppost *post;
   63|     40|  size_t namelength = src->namelength;
   64|     40|  if(!namelength && Curl_bufref_ptr(&src->name))
  ------------------
  |  Branch (64:6): [True: 40, False: 0]
  |  Branch (64:21): [True: 40, False: 0]
  ------------------
   65|     40|    namelength = strlen(Curl_bufref_ptr(&src->name));
   66|     40|  if((src->bufferlength > LONG_MAX) || (namelength > LONG_MAX))
  ------------------
  |  Branch (66:6): [True: 0, False: 40]
  |  Branch (66:40): [True: 0, False: 40]
  ------------------
   67|       |    /* avoid overflow in typecasts below */
   68|      0|    return NULL;
   69|     40|  post = curlx_calloc(1, sizeof(struct curl_httppost));
  ------------------
  |  | 1475|     40|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   70|     40|  if(post) {
  ------------------
  |  Branch (70:6): [True: 40, False: 0]
  ------------------
   71|     40|    post->name = CURL_UNCONST(Curl_bufref_ptr(&src->name));
  ------------------
  |  |  864|     40|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   72|     40|    post->namelength = (long)namelength;
   73|     40|    post->contents = CURL_UNCONST(Curl_bufref_ptr(&src->value));
  ------------------
  |  |  864|     40|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   74|     40|    post->contentlen = src->contentslength;
   75|     40|    post->buffer = src->buffer;
   76|     40|    post->bufferlength = (long)src->bufferlength;
   77|     40|    post->contenttype = CURL_UNCONST(Curl_bufref_ptr(&src->contenttype));
  ------------------
  |  |  864|     40|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   78|     40|    post->flags = src->flags | CURL_HTTPPOST_LARGE;
  ------------------
  |  |  220|     40|#define CURL_HTTPPOST_LARGE (1 << 7)
  ------------------
   79|     40|    post->contentheader = src->contentheader;
   80|     40|    post->showfilename = CURL_UNCONST(Curl_bufref_ptr(&src->showfilename));
  ------------------
  |  |  864|     40|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   81|     40|    post->userp = src->userp;
   82|     40|  }
   83|      0|  else
   84|      0|    return NULL;
   85|       |
   86|     40|  if(parent_post) {
  ------------------
  |  Branch (86:6): [True: 0, False: 40]
  ------------------
   87|       |    /* now, point our 'more' to the original 'more' */
   88|      0|    post->more = parent_post->more;
   89|       |
   90|       |    /* then move the original 'more' to point to ourselves */
   91|      0|    parent_post->more = post;
   92|      0|  }
   93|     40|  else {
   94|       |    /* make the previous point to this */
   95|     40|    if(*last_post)
  ------------------
  |  Branch (95:8): [True: 0, False: 40]
  ------------------
   96|      0|      (*last_post)->next = post;
   97|     40|    else
   98|     40|      (*httppost) = post;
   99|       |
  100|     40|    (*last_post) = post;
  101|     40|  }
  102|     40|  return post;
  103|     40|}

Curl_wildcard_init:
  183|      5|{
  184|      5|  Curl_llist_init(&wc->filelist, fileinfo_dtor);
  185|      5|  wc->state = CURLWC_INIT;
  186|      5|}
Curl_wildcard_dtor:
  189|  38.8k|{
  190|  38.8k|  struct WildcardData *wc = *wcp;
  191|  38.8k|  if(!wc)
  ------------------
  |  Branch (191:6): [True: 38.8k, False: 5]
  ------------------
  192|  38.8k|    return;
  193|       |
  194|      5|  if(wc->dtor) {
  ------------------
  |  Branch (194:6): [True: 0, False: 5]
  ------------------
  195|      0|    wc->dtor(wc->ftpwc);
  196|      0|    wc->dtor = ZERO_NULL;
  ------------------
  |  | 1162|      0|#define ZERO_NULL 0
  ------------------
  197|      0|    wc->ftpwc = NULL;
  198|      0|  }
  199|      5|  DEBUGASSERT(!wc->ftpwc);
  ------------------
  |  | 1079|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (199:3): [True: 0, False: 5]
  |  Branch (199:3): [True: 5, False: 0]
  ------------------
  200|       |
  201|      5|  Curl_llist_destroy(&wc->filelist, NULL);
  202|      5|  curlx_safefree(wc->path);
  ------------------
  |  | 1336|      5|  do {                      \
  |  | 1337|      5|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      5|    (ptr) = NULL;           \
  |  | 1339|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  203|      5|  curlx_safefree(wc->pattern);
  ------------------
  |  | 1336|      5|  do {                      \
  |  | 1337|      5|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      5|    (ptr) = NULL;           \
  |  | 1339|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  204|      5|  wc->state = CURLWC_INIT;
  205|      5|  curlx_free(wc);
  ------------------
  |  | 1478|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  206|       |  *wcp = NULL;
  207|      5|}

curl_getenv:
   27|  27.0k|{
   28|       |#if defined(CURL_WINDOWS_UWP) || \
   29|       |  defined(__ORBIS__) || defined(__PROSPERO__) /* PlayStation 4 and 5 */
   30|       |  (void)variable;
   31|       |  return NULL;
   32|       |#elif defined(_WIN32)
   33|       |  /* This uses Windows API instead of C runtime getenv() to get the environment
   34|       |     variable since some changes are not always visible to the latter. #4774 */
   35|       |  char *buf = NULL;
   36|       |  char *tmp;
   37|       |  DWORD bufsize;
   38|       |  DWORD rc = 1;
   39|       |  const DWORD max = 32768; /* max env var size from MSCRT source */
   40|       |
   41|       |  for(;;) {
   42|       |    tmp = curlx_realloc(buf, rc);
   43|       |    if(!tmp) {
   44|       |      curlx_free(buf);
   45|       |      return NULL;
   46|       |    }
   47|       |
   48|       |    buf = tmp;
   49|       |    bufsize = rc;
   50|       |
   51|       |    /* it is possible for rc to be 0 if the variable was found but empty.
   52|       |       Since getenv does not make that distinction we ignore it as well. */
   53|       |    rc = GetEnvironmentVariableA(variable, buf, bufsize);
   54|       |    if(!rc || rc == bufsize || rc > max) {
   55|       |      curlx_free(buf);
   56|       |      return NULL;
   57|       |    }
   58|       |
   59|       |    /* if rc < bufsize then rc is bytes written not including null */
   60|       |    if(rc < bufsize)
   61|       |      return buf;
   62|       |
   63|       |    /* else rc is bytes needed, try again */
   64|       |  }
   65|       |#else
   66|  27.0k|  char *env = getenv(variable);
   67|  27.0k|  return (env && env[0]) ? curlx_strdup(env) : NULL;
  ------------------
  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  |  Branch (67:11): [True: 0, False: 27.0k]
  |  Branch (67:18): [True: 0, False: 0]
  ------------------
   68|  27.0k|#endif
   69|  27.0k|}

Curl_initinfo:
   42|  34.6k|{
   43|  34.6k|  struct Progress *pro = &data->progress;
   44|  34.6k|  struct PureInfo *info = &data->info;
   45|       |
   46|  34.6k|  pro->t_nslookup = 0;
   47|  34.6k|  pro->t_connect = 0;
   48|  34.6k|  pro->t_appconnect = 0;
   49|  34.6k|  pro->t_pretransfer = 0;
   50|  34.6k|  pro->t_posttransfer = 0;
   51|  34.6k|  pro->t_starttransfer = 0;
   52|  34.6k|  pro->timespent = 0;
   53|  34.6k|  pro->t_redirect = 0;
   54|  34.6k|  pro->is_t_startransfer_set = FALSE;
  ------------------
  |  | 1056|  34.6k|#define FALSE false
  ------------------
   55|       |
   56|  34.6k|  info->httpcode = 0;
   57|  34.6k|  info->httpproxycode = 0;
   58|  34.6k|  info->httpversion = 0;
   59|  34.6k|  info->filetime = -1; /* -1 is an illegal time and thus means unknown */
   60|  34.6k|  info->timecond = FALSE;
  ------------------
  |  | 1056|  34.6k|#define FALSE false
  ------------------
   61|       |
   62|  34.6k|  info->header_size = 0;
   63|  34.6k|  info->request_size = 0;
   64|  34.6k|  info->proxyauthavail = 0;
   65|  34.6k|  info->httpauthavail = 0;
   66|  34.6k|  info->proxyauthpicked = 0;
   67|  34.6k|  info->httpauthpicked = 0;
   68|  34.6k|  info->numconnects = 0;
   69|       |
   70|  34.6k|  curlx_safefree(info->contenttype);
  ------------------
  |  | 1336|  34.6k|  do {                      \
  |  | 1337|  34.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  34.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  34.6k|    (ptr) = NULL;           \
  |  | 1339|  34.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 34.6k]
  |  |  ------------------
  ------------------
   71|  34.6k|  curlx_safefree(info->wouldredirect);
  ------------------
  |  | 1336|  34.6k|  do {                      \
  |  | 1337|  34.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  34.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  34.6k|    (ptr) = NULL;           \
  |  | 1339|  34.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 34.6k]
  |  |  ------------------
  ------------------
   72|       |
   73|  34.6k|  memset(&info->primary, 0, sizeof(info->primary));
   74|  34.6k|  info->retry_after = 0;
   75|       |
   76|  34.6k|  info->conn_scheme = 0;
   77|  34.6k|  info->conn_protocol = 0;
   78|  34.6k|  info->used_proxy = 0;
   79|       |
   80|  34.6k|#ifdef USE_SSL
   81|  34.6k|  Curl_ssl_free_certinfo(data);
   82|  34.6k|#endif
   83|  34.6k|}

Curl_hash_init:
   82|  80.7k|{
   83|  80.7k|  DEBUGASSERT(h);
  ------------------
  |  | 1079|  80.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (83:3): [True: 0, False: 80.7k]
  |  Branch (83:3): [True: 80.7k, False: 0]
  ------------------
   84|  80.7k|  DEBUGASSERT(slots);
  ------------------
  |  | 1079|  80.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (84:3): [True: 0, False: 80.7k]
  |  Branch (84:3): [True: 80.7k, False: 0]
  ------------------
   85|  80.7k|  DEBUGASSERT(hfunc);
  ------------------
  |  | 1079|  80.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (85:3): [True: 0, False: 80.7k]
  |  Branch (85:3): [True: 80.7k, False: 0]
  ------------------
   86|  80.7k|  DEBUGASSERT(comparator);
  ------------------
  |  | 1079|  80.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (86:3): [True: 0, False: 80.7k]
  |  Branch (86:3): [True: 80.7k, False: 0]
  ------------------
   87|  80.7k|  DEBUGASSERT(dtor);
  ------------------
  |  | 1079|  80.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (87:3): [True: 0, False: 80.7k]
  |  Branch (87:3): [True: 80.7k, False: 0]
  ------------------
   88|       |
   89|  80.7k|  h->table = NULL;
   90|  80.7k|  h->hash_func = hfunc;
   91|  80.7k|  h->comp_func = comparator;
   92|  80.7k|  h->dtor = dtor;
   93|  80.7k|  h->size = 0;
   94|  80.7k|  h->slots = slots;
   95|  80.7k|#ifdef DEBUGBUILD
   96|  80.7k|  h->init = HASHINIT;
  ------------------
  |  |   30|  80.7k|#define HASHINIT 0x7017e781
  ------------------
   97|  80.7k|#endif
   98|  80.7k|}
Curl_hash_add2:
  163|  12.8k|{
  164|  12.8k|  struct Curl_hash_element *he, **slot;
  165|       |
  166|  12.8k|  DEBUGASSERT(h);
  ------------------
  |  | 1079|  12.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 12.8k]
  |  Branch (166:3): [True: 12.8k, False: 0]
  ------------------
  167|  12.8k|  DEBUGASSERT(h->slots);
  ------------------
  |  | 1079|  12.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (167:3): [True: 0, False: 12.8k]
  |  Branch (167:3): [True: 12.8k, False: 0]
  ------------------
  168|  12.8k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1079|  12.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (168:3): [True: 0, False: 12.8k]
  |  Branch (168:3): [True: 12.8k, False: 0]
  ------------------
  169|  12.8k|  if(!h->table) {
  ------------------
  |  Branch (169:6): [True: 12.3k, False: 556]
  ------------------
  170|  12.3k|    h->table = curlx_calloc(h->slots, sizeof(struct Curl_hash_element *));
  ------------------
  |  | 1475|  12.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  171|  12.3k|    if(!h->table)
  ------------------
  |  Branch (171:8): [True: 0, False: 12.3k]
  ------------------
  172|      0|      return NULL; /* OOM */
  173|  12.3k|  }
  174|       |
  175|  12.8k|  slot = CURL_HASH_SLOT_ADDR(h, key, key_len);
  ------------------
  |  |  159|  12.8k|#define CURL_HASH_SLOT_ADDR(x, y, z) &CURL_HASH_SLOT(x, y, z)
  |  |  ------------------
  |  |  |  |  158|  12.8k|#define CURL_HASH_SLOT(x, y, z)      x->table[(x)->hash_func(y, z, (x)->slots)]
  |  |  ------------------
  ------------------
  176|  12.9k|  for(he = *slot; he; he = he->next) {
  ------------------
  |  Branch (176:19): [True: 49, False: 12.8k]
  ------------------
  177|     49|    if(h->comp_func(he->key, he->key_len, key, key_len)) {
  ------------------
  |  Branch (177:8): [True: 35, False: 14]
  ------------------
  178|       |      /* existing key entry, overwrite by clearing old pointer */
  179|     35|      hash_elem_clear_ptr(h, he);
  180|     35|      he->ptr = p;
  181|     35|      he->dtor = dtor;
  182|     35|      return p;
  183|     35|    }
  184|     49|  }
  185|       |
  186|  12.8k|  he = hash_elem_create(key, key_len, p, dtor);
  187|  12.8k|  if(!he)
  ------------------
  |  Branch (187:6): [True: 0, False: 12.8k]
  ------------------
  188|      0|    return NULL; /* OOM */
  189|       |
  190|  12.8k|  hash_elem_link(h, slot, he);
  191|  12.8k|  return p; /* return the new entry */
  192|  12.8k|}
Curl_hash_add:
  203|  12.1k|{
  204|       |  return Curl_hash_add2(h, key, key_len, p, NULL);
  205|  12.1k|}
Curl_hash_delete:
  213|  25.4k|{
  214|  25.4k|  DEBUGASSERT(h);
  ------------------
  |  | 1079|  25.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (214:3): [True: 0, False: 25.4k]
  |  Branch (214:3): [True: 25.4k, False: 0]
  ------------------
  215|  25.4k|  DEBUGASSERT(h->slots);
  ------------------
  |  | 1079|  25.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 0, False: 25.4k]
  |  Branch (215:3): [True: 25.4k, False: 0]
  ------------------
  216|  25.4k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1079|  25.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 0, False: 25.4k]
  |  Branch (216:3): [True: 25.4k, False: 0]
  ------------------
  217|  25.4k|  if(h->table) {
  ------------------
  |  Branch (217:6): [True: 7.36k, False: 18.0k]
  ------------------
  218|  7.36k|    struct Curl_hash_element *he, **he_anchor;
  219|       |
  220|  7.36k|    he_anchor = CURL_HASH_SLOT_ADDR(h, key, key_len);
  ------------------
  |  |  159|  7.36k|#define CURL_HASH_SLOT_ADDR(x, y, z) &CURL_HASH_SLOT(x, y, z)
  |  |  ------------------
  |  |  |  |  158|  7.36k|#define CURL_HASH_SLOT(x, y, z)      x->table[(x)->hash_func(y, z, (x)->slots)]
  |  |  ------------------
  ------------------
  221|  7.36k|    while(*he_anchor) {
  ------------------
  |  Branch (221:11): [True: 6.58k, False: 785]
  ------------------
  222|  6.58k|      he = *he_anchor;
  223|  6.58k|      if(h->comp_func(he->key, he->key_len, key, key_len)) {
  ------------------
  |  Branch (223:10): [True: 6.58k, False: 0]
  ------------------
  224|  6.58k|        hash_elem_unlink(h, he_anchor, he);
  225|  6.58k|        hash_elem_destroy(h, he);
  226|  6.58k|        return 0;
  227|  6.58k|      }
  228|      0|      he_anchor = &he->next;
  229|      0|    }
  230|  7.36k|  }
  231|  18.8k|  return 1;
  232|  25.4k|}
Curl_hash_pick:
  239|  37.5k|{
  240|  37.5k|  DEBUGASSERT(h);
  ------------------
  |  | 1079|  37.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (240:3): [True: 0, False: 37.5k]
  |  Branch (240:3): [True: 37.5k, False: 0]
  ------------------
  241|  37.5k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1079|  37.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 0, False: 37.5k]
  |  Branch (241:3): [True: 37.5k, False: 0]
  ------------------
  242|  37.5k|  if(h->table) {
  ------------------
  |  Branch (242:6): [True: 7.98k, False: 29.5k]
  ------------------
  243|  7.98k|    struct Curl_hash_element *he;
  244|  7.98k|    DEBUGASSERT(h->slots);
  ------------------
  |  | 1079|  7.98k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:5): [True: 0, False: 7.98k]
  |  Branch (244:5): [True: 7.98k, False: 0]
  ------------------
  245|  7.98k|    he = CURL_HASH_SLOT(h, key, key_len);
  ------------------
  |  |  158|  7.98k|#define CURL_HASH_SLOT(x, y, z)      x->table[(x)->hash_func(y, z, (x)->slots)]
  ------------------
  246|  8.03k|    while(he) {
  ------------------
  |  Branch (246:11): [True: 6.95k, False: 1.07k]
  ------------------
  247|  6.95k|      if(h->comp_func(he->key, he->key_len, key, key_len)) {
  ------------------
  |  Branch (247:10): [True: 6.91k, False: 45]
  ------------------
  248|  6.91k|        return he->ptr;
  249|  6.91k|      }
  250|     45|      he = he->next;
  251|     45|    }
  252|  7.98k|  }
  253|  30.6k|  return NULL;
  254|  37.5k|}
Curl_hash_destroy:
  264|  80.7k|{
  265|  80.7k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1079|  80.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (265:3): [True: 0, False: 80.7k]
  |  Branch (265:3): [True: 80.7k, False: 0]
  ------------------
  266|  80.7k|  if(h->table) {
  ------------------
  |  Branch (266:6): [True: 12.3k, False: 68.4k]
  ------------------
  267|  12.3k|    Curl_hash_clean(h);
  268|  12.3k|    curlx_safefree(h->table);
  ------------------
  |  | 1336|  12.3k|  do {                      \
  |  | 1337|  12.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.3k|    (ptr) = NULL;           \
  |  | 1339|  12.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.3k]
  |  |  ------------------
  ------------------
  269|  12.3k|  }
  270|  80.7k|  DEBUGASSERT(h->size == 0);
  ------------------
  |  | 1079|  80.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (270:3): [True: 0, False: 80.7k]
  |  Branch (270:3): [True: 80.7k, False: 0]
  ------------------
  271|  80.7k|  h->slots = 0;
  272|  80.7k|}
Curl_hash_clean:
  279|  12.3k|{
  280|  12.3k|  if(h && h->table) {
  ------------------
  |  Branch (280:6): [True: 12.3k, False: 0]
  |  Branch (280:11): [True: 12.3k, False: 0]
  ------------------
  281|  12.3k|    struct Curl_hash_element *he, **he_anchor;
  282|  12.3k|    size_t i;
  283|  12.3k|    DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1079|  12.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (283:5): [True: 0, False: 12.3k]
  |  Branch (283:5): [True: 12.3k, False: 0]
  ------------------
  284|  1.00M|    for(i = 0; i < h->slots; ++i) {
  ------------------
  |  Branch (284:16): [True: 992k, False: 12.3k]
  ------------------
  285|   992k|      he_anchor = &h->table[i];
  286|   998k|      while(*he_anchor) {
  ------------------
  |  Branch (286:13): [True: 6.26k, False: 992k]
  ------------------
  287|  6.26k|        he = *he_anchor;
  288|  6.26k|        hash_elem_unlink(h, he_anchor, he);
  289|  6.26k|        hash_elem_destroy(h, he);
  290|  6.26k|      }
  291|   992k|    }
  292|  12.3k|  }
  293|  12.3k|}
Curl_hash_count:
  296|  6.25k|{
  297|  6.25k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (297:3): [True: 0, False: 6.25k]
  |  Branch (297:3): [True: 6.25k, False: 0]
  ------------------
  298|  6.25k|  return h->size;
  299|  6.25k|}
Curl_hash_clean_with_criterium:
  304|  6.25k|{
  305|  6.25k|  size_t i;
  306|       |
  307|  6.25k|  if(!h || !h->table)
  ------------------
  |  Branch (307:6): [True: 0, False: 6.25k]
  |  Branch (307:12): [True: 534, False: 5.72k]
  ------------------
  308|    534|    return;
  309|       |
  310|  5.72k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1079|  5.72k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (310:3): [True: 0, False: 5.72k]
  |  Branch (310:3): [True: 5.72k, False: 0]
  ------------------
  311|   411k|  for(i = 0; i < h->slots; ++i) {
  ------------------
  |  Branch (311:14): [True: 406k, False: 5.72k]
  ------------------
  312|   406k|    struct Curl_hash_element *he, **he_anchor = &h->table[i];
  313|   412k|    while(*he_anchor) {
  ------------------
  |  Branch (313:11): [True: 5.92k, False: 406k]
  ------------------
  314|       |      /* ask the callback function if we shall remove this entry or not */
  315|  5.92k|      if(!comp || comp(user, (*he_anchor)->ptr)) {
  ------------------
  |  Branch (315:10): [True: 0, False: 5.92k]
  |  Branch (315:19): [True: 6, False: 5.92k]
  ------------------
  316|      6|        he = *he_anchor;
  317|      6|        hash_elem_unlink(h, he_anchor, he);
  318|      6|        hash_elem_destroy(h, he);
  319|      6|      }
  320|  5.92k|      else
  321|  5.92k|        he_anchor = &(*he_anchor)->next;
  322|  5.92k|    }
  323|   406k|  }
  324|  5.72k|}
Curl_hash_str:
  327|  28.2k|{
  328|  28.2k|  const char *key_str = (const char *)key;
  329|  28.2k|  const char *end = key_str + key_length;
  330|  28.2k|  size_t h = 5381;
  331|       |
  332|   513k|  while(key_str < end) {
  ------------------
  |  Branch (332:9): [True: 485k, False: 28.2k]
  ------------------
  333|   485k|    size_t j = (size_t)*key_str++;
  334|   485k|    h += h << 5;
  335|   485k|    h ^= j;
  336|   485k|  }
  337|       |
  338|  28.2k|  return (h % slots_num);
  339|  28.2k|}
curlx_str_key_compare:
  343|  13.5k|{
  344|  13.5k|  if((key1_len == key2_len) && !memcmp(k1, k2, key1_len))
  ------------------
  |  Branch (344:6): [True: 13.5k, False: 35]
  |  Branch (344:32): [True: 13.5k, False: 24]
  ------------------
  345|  13.5k|    return 1;
  346|       |
  347|     59|  return 0;
  348|  13.5k|}
Curl_hash_start_iterate:
  352|  17.7k|{
  353|  17.7k|  DEBUGASSERT(hash->init == HASHINIT);
  ------------------
  |  | 1079|  17.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (353:3): [True: 0, False: 17.7k]
  |  Branch (353:3): [True: 17.7k, False: 0]
  ------------------
  354|  17.7k|  iter->hash = hash;
  355|  17.7k|  iter->slot_index = 0;
  356|  17.7k|  iter->current = NULL;
  357|  17.7k|#ifdef DEBUGBUILD
  358|  17.7k|  iter->init = ITERINIT;
  ------------------
  |  |   31|  17.7k|#define ITERINIT 0x5FEDCBA9
  ------------------
  359|  17.7k|#endif
  360|  17.7k|}
Curl_hash_next_element:
  364|  17.7k|{
  365|  17.7k|  struct Curl_hash *h;
  366|  17.7k|  DEBUGASSERT(iter->init == ITERINIT);
  ------------------
  |  | 1079|  17.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (366:3): [True: 0, False: 17.7k]
  |  Branch (366:3): [True: 17.7k, False: 0]
  ------------------
  367|  17.7k|  h = iter->hash;
  368|  17.7k|  if(!h->table)
  ------------------
  |  Branch (368:6): [True: 11.7k, False: 5.93k]
  ------------------
  369|  11.7k|    return NULL; /* empty hash, nothing to return */
  370|       |
  371|       |  /* Get the next element in the current list, if any */
  372|  5.93k|  if(iter->current)
  ------------------
  |  Branch (372:6): [True: 0, False: 5.93k]
  ------------------
  373|      0|    iter->current = iter->current->next;
  374|       |
  375|       |  /* If we have reached the end of the list, find the next one */
  376|  5.93k|  if(!iter->current) {
  ------------------
  |  Branch (376:6): [True: 5.93k, False: 0]
  ------------------
  377|  5.93k|    size_t i;
  378|   582k|    for(i = iter->slot_index; i < h->slots; i++) {
  ------------------
  |  Branch (378:31): [True: 576k, False: 5.93k]
  ------------------
  379|   576k|      if(h->table[i]) {
  ------------------
  |  Branch (379:10): [True: 0, False: 576k]
  ------------------
  380|      0|        iter->current = h->table[i];
  381|      0|        iter->slot_index = i + 1;
  382|      0|        break;
  383|      0|      }
  384|   576k|    }
  385|  5.93k|  }
  386|       |
  387|  5.93k|  return iter->current;
  388|  17.7k|}
hash.c:hash_elem_clear_ptr:
  122|  12.8k|{
  123|  12.8k|  DEBUGASSERT(h);
  ------------------
  |  | 1079|  12.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (123:3): [True: 0, False: 12.8k]
  |  Branch (123:3): [True: 12.8k, False: 0]
  ------------------
  124|  12.8k|  DEBUGASSERT(he);
  ------------------
  |  | 1079|  12.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (124:3): [True: 0, False: 12.8k]
  |  Branch (124:3): [True: 12.8k, False: 0]
  ------------------
  125|  12.8k|  if(he->ptr) {
  ------------------
  |  Branch (125:6): [True: 12.8k, False: 0]
  ------------------
  126|  12.8k|    if(he->dtor)
  ------------------
  |  Branch (126:8): [True: 785, False: 12.1k]
  ------------------
  127|    785|      he->dtor(he->key, he->key_len, he->ptr);
  128|  12.1k|    else
  129|  12.1k|      h->dtor(he->ptr);
  130|       |    he->ptr = NULL;
  131|  12.8k|  }
  132|  12.8k|}
hash.c:hash_elem_create:
  104|  12.8k|{
  105|  12.8k|  struct Curl_hash_element *he;
  106|       |
  107|       |  /* allocate the struct plus memory after it to store the key */
  108|  12.8k|  he = curlx_malloc(sizeof(struct Curl_hash_element) + key_len);
  ------------------
  |  | 1473|  12.8k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  109|  12.8k|  if(he) {
  ------------------
  |  Branch (109:6): [True: 12.8k, False: 0]
  ------------------
  110|  12.8k|    he->next = NULL;
  111|       |    /* copy the key */
  112|  12.8k|    memcpy(he->key, key, key_len);
  113|  12.8k|    he->key_len = key_len;
  114|  12.8k|    he->ptr = CURL_UNCONST(p);
  ------------------
  |  |  864|  12.8k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  115|  12.8k|    he->dtor = dtor;
  116|  12.8k|  }
  117|  12.8k|  return he;
  118|  12.8k|}
hash.c:hash_elem_link:
  152|  12.8k|{
  153|  12.8k|  he->next = *he_anchor;
  154|  12.8k|  *he_anchor = he;
  155|  12.8k|  ++h->size;
  156|  12.8k|}
hash.c:hash_elem_unlink:
  144|  12.8k|{
  145|  12.8k|  *he_anchor = he->next;
  146|  12.8k|  --h->size;
  147|  12.8k|}
hash.c:hash_elem_destroy:
  136|  12.8k|{
  137|  12.8k|  hash_elem_clear_ptr(h, he);
  138|  12.8k|  curlx_free(he);
  ------------------
  |  | 1478|  12.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  139|  12.8k|}

Curl_headers_push:
  224|  1.05k|{
  225|  1.05k|  char *value = NULL;
  226|  1.05k|  char *name = NULL;
  227|  1.05k|  struct Curl_header_store *hs;
  228|  1.05k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  229|  1.05k|  const size_t ilen = hlen;
  230|       |
  231|  1.05k|  if((header[0] == '\r') || (header[0] == '\n'))
  ------------------
  |  Branch (231:6): [True: 5, False: 1.04k]
  |  Branch (231:29): [True: 34, False: 1.01k]
  ------------------
  232|       |    /* ignore the body separator */
  233|     39|    return CURLE_OK;
  234|       |
  235|       |  /* trim off newline characters */
  236|  1.01k|  if(hlen && (header[hlen - 1] == '\n'))
  ------------------
  |  Branch (236:6): [True: 1.01k, False: 0]
  |  Branch (236:14): [True: 1.01k, False: 0]
  ------------------
  237|  1.01k|    hlen--;
  238|  1.01k|  if(hlen && (header[hlen - 1] == '\r'))
  ------------------
  |  Branch (238:6): [True: 1.01k, False: 0]
  |  Branch (238:14): [True: 162, False: 853]
  ------------------
  239|    162|    hlen--;
  240|  1.01k|  if(hlen == ilen)
  ------------------
  |  Branch (240:6): [True: 0, False: 1.01k]
  ------------------
  241|       |    /* neither CR nor LF as terminator is not a valid header */
  242|      0|    return CURLE_WEIRD_SERVER_REPLY;
  243|       |
  244|  1.01k|  if(ISBLANK(header[0])) {
  ------------------
  |  |   43|  1.01k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 1.01k]
  |  |  |  Branch (43:38): [True: 0, False: 1.01k]
  |  |  ------------------
  ------------------
  245|       |    /* pass leading blanks */
  246|      0|    while(hlen && ISBLANK(*header)) {
  ------------------
  |  |   43|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (246:11): [True: 0, False: 0]
  ------------------
  247|      0|      header++;
  248|      0|      hlen--;
  249|      0|    }
  250|      0|    if(!hlen)
  ------------------
  |  Branch (250:8): [True: 0, False: 0]
  ------------------
  251|      0|      return CURLE_WEIRD_SERVER_REPLY;
  252|      0|  }
  253|  1.01k|  if(Curl_llist_count(&data->state.httphdrs) >= MAX_HTTP_RESP_HEADER_COUNT) {
  ------------------
  |  |  162|  1.01k|#define MAX_HTTP_RESP_HEADER_COUNT 5000
  ------------------
  |  Branch (253:6): [True: 0, False: 1.01k]
  ------------------
  254|      0|    failf(data, "Too many response headers, %d is max",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  255|      0|          MAX_HTTP_RESP_HEADER_COUNT);
  ------------------
  |  |  162|      0|#define MAX_HTTP_RESP_HEADER_COUNT 5000
  ------------------
  256|      0|    return CURLE_TOO_LARGE;
  257|      0|  }
  258|       |
  259|  1.01k|  hs = curlx_calloc(1, sizeof(*hs) + hlen);
  ------------------
  |  | 1475|  1.01k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  260|  1.01k|  if(!hs)
  ------------------
  |  Branch (260:6): [True: 0, False: 1.01k]
  ------------------
  261|      0|    return CURLE_OUT_OF_MEMORY;
  262|  1.01k|  memcpy(hs->buffer, header, hlen);
  263|  1.01k|  hs->buffer[hlen] = 0; /* null-terminate */
  264|       |
  265|  1.01k|  result = namevalue(hs->buffer, hlen, type, &name, &value);
  266|  1.01k|  if(!result) {
  ------------------
  |  Branch (266:6): [True: 985, False: 30]
  ------------------
  267|    985|    hs->name = name;
  268|    985|    hs->value = value;
  269|    985|    hs->type = type;
  270|    985|    hs->request = data->state.requests;
  271|       |
  272|       |    /* insert this node into the list of headers */
  273|    985|    Curl_llist_append(&data->state.httphdrs, hs, &hs->node);
  274|    985|    data->state.prevhead = hs;
  275|    985|  }
  276|     30|  else {
  277|     30|    failf(data, "Invalid response header");
  ------------------
  |  |   62|     30|#define failf Curl_failf
  ------------------
  278|     30|    curlx_free(hs);
  ------------------
  |  | 1478|     30|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  279|     30|  }
  280|  1.01k|  return result;
  281|  1.01k|}
Curl_headers_init:
  327|  6.25k|{
  328|  6.25k|  struct Curl_cwriter *writer;
  329|  6.25k|  CURLcode result;
  330|       |
  331|  6.25k|  if(data->conn && (data->conn->scheme->protocol & PROTO_FAMILY_HTTP)) {
  ------------------
  |  |   84|  6.25k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1086|  6.25k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1087|  6.25k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  6.25k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  6.25k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  6.25k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (331:6): [True: 6.25k, False: 0]
  |  Branch (331:20): [True: 6.25k, False: 0]
  ------------------
  332|       |    /* avoid installing it twice */
  333|  6.25k|    if(Curl_cwriter_get_by_name(data, hds_cw_collect.name))
  ------------------
  |  Branch (333:8): [True: 0, False: 6.25k]
  ------------------
  334|      0|      return CURLE_OK;
  335|       |
  336|  6.25k|    result = Curl_cwriter_create(&writer, data, &hds_cw_collect,
  337|  6.25k|                                 CURL_CW_PROTOCOL);
  338|  6.25k|    if(result)
  ------------------
  |  Branch (338:8): [True: 0, False: 6.25k]
  ------------------
  339|      0|      return result;
  340|       |
  341|  6.25k|    result = Curl_cwriter_add(data, writer);
  342|  6.25k|    if(result) {
  ------------------
  |  Branch (342:8): [True: 0, False: 6.25k]
  ------------------
  343|      0|      Curl_cwriter_free(data, writer);
  344|      0|      return result;
  345|      0|    }
  346|  6.25k|  }
  347|  6.25k|  return CURLE_OK;
  348|  6.25k|}
Curl_headers_cleanup:
  354|  34.6k|{
  355|  34.6k|  struct Curl_llist_node *e;
  356|  34.6k|  struct Curl_llist_node *n;
  357|       |
  358|  35.6k|  for(e = Curl_llist_head(&data->state.httphdrs); e; e = n) {
  ------------------
  |  Branch (358:51): [True: 985, False: 34.6k]
  ------------------
  359|    985|    struct Curl_header_store *hs = Curl_node_elem(e);
  360|    985|    n = Curl_node_next(e);
  361|    985|    curlx_free(hs);
  ------------------
  |  | 1478|    985|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  362|    985|  }
  363|  34.6k|  headers_reset(data);
  364|  34.6k|  return CURLE_OK;
  365|  34.6k|}
headers.c:namevalue:
  183|  1.01k|{
  184|  1.01k|  char *end = header + hlen - 1; /* point to the last byte */
  185|  1.01k|  DEBUGASSERT(hlen);
  ------------------
  |  | 1079|  1.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (185:3): [True: 0, False: 1.01k]
  |  Branch (185:3): [True: 1.01k, False: 0]
  ------------------
  186|  1.01k|  *name = header;
  187|       |
  188|  1.01k|  if(type == CURLH_PSEUDO) {
  ------------------
  |  |   45|  1.01k|#define CURLH_PSEUDO    (1 << 4) /* pseudo headers */
  ------------------
  |  Branch (188:6): [True: 0, False: 1.01k]
  ------------------
  189|      0|    if(*header != ':')
  ------------------
  |  Branch (189:8): [True: 0, False: 0]
  ------------------
  190|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
  191|      0|    header++;
  192|      0|  }
  193|       |
  194|       |  /* Find the end of the header name */
  195|  3.55k|  while(*header && (*header != ':'))
  ------------------
  |  Branch (195:9): [True: 3.52k, False: 30]
  |  Branch (195:20): [True: 2.53k, False: 985]
  ------------------
  196|  2.53k|    ++header;
  197|       |
  198|  1.01k|  if(*header)
  ------------------
  |  Branch (198:6): [True: 985, False: 30]
  ------------------
  199|       |    /* Skip over colon, null it */
  200|    985|    *header++ = 0;
  201|     30|  else
  202|     30|    return CURLE_BAD_FUNCTION_ARGUMENT;
  203|       |
  204|       |  /* skip all leading blank letters */
  205|  1.73k|  while(ISBLANK(*header))
  ------------------
  |  |   43|  1.73k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 441, False: 1.29k]
  |  |  |  Branch (43:38): [True: 307, False: 985]
  |  |  ------------------
  ------------------
  206|    748|    header++;
  207|       |
  208|    985|  *value = header;
  209|       |
  210|       |  /* skip all trailing space letters */
  211|  1.57k|  while((end > header) && ISBLANK(*end))
  ------------------
  |  |   43|    958|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 341, False: 617]
  |  |  |  Branch (43:38): [True: 244, False: 373]
  |  |  ------------------
  ------------------
  |  Branch (211:9): [True: 958, False: 612]
  ------------------
  212|    585|    *end-- = 0; /* null-terminate */
  213|    985|  return CURLE_OK;
  214|  1.01k|}
headers.c:hds_cw_collect_write:
  299|  1.30k|{
  300|  1.30k|  if((type & CLIENTWRITE_HEADER) && !(type & CLIENTWRITE_STATUS)) {
  ------------------
  |  |   45|  1.30k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                if((type & CLIENTWRITE_HEADER) && !(type & CLIENTWRITE_STATUS)) {
  ------------------
  |  |   46|  1.30k|#define CLIENTWRITE_STATUS  (1 << 3) /* a special status HEADER */
  ------------------
  |  Branch (300:6): [True: 1.30k, False: 0]
  |  Branch (300:37): [True: 1.05k, False: 248]
  ------------------
  301|  1.05k|    unsigned char htype = (unsigned char)
  302|  1.05k|      (type & CLIENTWRITE_CONNECT ? CURLH_CONNECT :
  ------------------
  |  |   47|  1.05k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
                    (type & CLIENTWRITE_CONNECT ? CURLH_CONNECT :
  ------------------
  |  |   43|  1.05k|#define CURLH_CONNECT   (1 << 2) /* CONNECT headers */
  ------------------
  |  Branch (302:8): [True: 1.05k, False: 0]
  ------------------
  303|  1.05k|       (type & CLIENTWRITE_1XX ? CURLH_1XX :
  ------------------
  |  |   48|      0|#define CLIENTWRITE_1XX     (1 << 5) /* a 1xx response related HEADER */
  ------------------
                     (type & CLIENTWRITE_1XX ? CURLH_1XX :
  ------------------
  |  |   44|      0|#define CURLH_1XX       (1 << 3) /* 1xx headers */
  ------------------
  |  Branch (303:9): [True: 0, False: 0]
  ------------------
  304|      0|        (type & CLIENTWRITE_TRAILER ? CURLH_TRAILER :
  ------------------
  |  |   49|      0|#define CLIENTWRITE_TRAILER (1 << 6) /* a trailer HEADER */
  ------------------
                      (type & CLIENTWRITE_TRAILER ? CURLH_TRAILER :
  ------------------
  |  |   42|      0|#define CURLH_TRAILER   (1 << 1) /* trailers */
  ------------------
  |  Branch (304:10): [True: 0, False: 0]
  ------------------
  305|      0|         CURLH_HEADER)));
  ------------------
  |  |   41|      0|#define CURLH_HEADER    (1 << 0) /* plain server header */
  ------------------
  306|  1.05k|    CURLcode result = Curl_headers_push(data, buf, blen, htype);
  307|  1.05k|    CURL_TRC_WRITE(data, "header_collect pushed(type=%x, len=%zu) -> %d",
  ------------------
  |  |  158|  1.05k|  do {                                                     \
  |  |  159|  1.05k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|  1.05k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  2.10k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.05k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  2.10k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  1.05k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.05k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.05k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.05k]
  |  |  ------------------
  ------------------
  308|  1.05k|                   htype, blen, (int)result);
  309|  1.05k|    if(result)
  ------------------
  |  Branch (309:8): [True: 30, False: 1.02k]
  ------------------
  310|     30|      return result;
  311|  1.05k|  }
  312|  1.27k|  return Curl_cwriter_write(data, writer->next, type, buf, blen);
  ------------------
  |  |  188|  1.27k|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 1.27k, False: 0]
  |  |  ------------------
  ------------------
  313|  1.30k|}
headers.c:headers_reset:
  287|  34.6k|{
  288|  34.6k|  Curl_llist_init(&data->state.httphdrs, NULL);
  289|       |  data->state.prevhead = NULL;
  290|  34.6k|}

Curl_HMAC_init:
   48|  5.35k|{
   49|  5.35k|  size_t i;
   50|  5.35k|  struct HMAC_context *ctxt;
   51|  5.35k|  unsigned char *hkey;
   52|  5.35k|  unsigned char b;
   53|       |
   54|       |  /* Create HMAC context. */
   55|  5.35k|  i = sizeof(*ctxt) + (2 * hashparams->ctxtsize) + hashparams->resultlen;
   56|  5.35k|  ctxt = curlx_malloc(i);
  ------------------
  |  | 1473|  5.35k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   57|       |
   58|  5.35k|  if(!ctxt)
  ------------------
  |  Branch (58:6): [True: 0, False: 5.35k]
  ------------------
   59|      0|    return ctxt;
   60|       |
   61|  5.35k|  ctxt->hash = hashparams;
   62|  5.35k|  ctxt->hashctxt1 = (void *)(ctxt + 1);
   63|  5.35k|  ctxt->hashctxt2 = (void *)((char *)ctxt->hashctxt1 + hashparams->ctxtsize);
   64|       |
   65|       |  /* If the key is too long, replace it by its hash digest. */
   66|  5.35k|  if(keylen > hashparams->maxkeylen) {
  ------------------
  |  Branch (66:6): [True: 16, False: 5.33k]
  ------------------
   67|     16|    if(hashparams->hinit(ctxt->hashctxt1))
  ------------------
  |  Branch (67:8): [True: 0, False: 16]
  ------------------
   68|      0|      goto fail;
   69|     16|    hashparams->hupdate(ctxt->hashctxt1, key, keylen);
   70|     16|    hkey = (unsigned char *)ctxt->hashctxt2 + hashparams->ctxtsize;
   71|     16|    hashparams->hfinal(hkey, ctxt->hashctxt1);
   72|     16|    key = hkey;
   73|     16|    keylen = hashparams->resultlen;
   74|     16|  }
   75|       |
   76|       |  /* Prime the two hash contexts with the modified key. */
   77|  5.35k|  if(hashparams->hinit(ctxt->hashctxt1) ||
  ------------------
  |  Branch (77:6): [True: 0, False: 5.35k]
  ------------------
   78|  5.35k|     hashparams->hinit(ctxt->hashctxt2))
  ------------------
  |  Branch (78:6): [True: 0, False: 5.35k]
  ------------------
   79|      0|    goto fail;
   80|       |
   81|   147k|  for(i = 0; i < keylen; i++) {
  ------------------
  |  Branch (81:14): [True: 142k, False: 5.35k]
  ------------------
   82|   142k|    b = (unsigned char)(*key ^ hmac_ipad);
   83|   142k|    hashparams->hupdate(ctxt->hashctxt1, &b, 1);
   84|   142k|    b = (unsigned char)(*key++ ^ hmac_opad);
   85|   142k|    hashparams->hupdate(ctxt->hashctxt2, &b, 1);
   86|   142k|  }
   87|       |
   88|   205k|  for(; i < hashparams->maxkeylen; i++) {
  ------------------
  |  Branch (88:9): [True: 200k, False: 5.35k]
  ------------------
   89|   200k|    hashparams->hupdate(ctxt->hashctxt1, &hmac_ipad, 1);
   90|   200k|    hashparams->hupdate(ctxt->hashctxt2, &hmac_opad, 1);
   91|   200k|  }
   92|       |
   93|       |  /* Done, return pointer to HMAC context. */
   94|  5.35k|  return ctxt;
   95|       |
   96|      0|fail:
   97|      0|  curlx_free(ctxt);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   98|       |  return NULL;
   99|  5.35k|}
Curl_HMAC_update:
  104|  5.35k|{
  105|       |  /* Update first hash calculation. */
  106|  5.35k|  ctxt->hash->hupdate(ctxt->hashctxt1, data, len);
  107|  5.35k|}
Curl_HMAC_final:
  110|  5.35k|{
  111|  5.35k|  const struct HMAC_params *hashparams = ctxt->hash;
  112|       |
  113|       |  /* Do not get output if called with a null parameter: only release
  114|       |     storage. */
  115|       |
  116|  5.35k|  if(!output)
  ------------------
  |  Branch (116:6): [True: 0, False: 5.35k]
  ------------------
  117|      0|    output = (unsigned char *)ctxt->hashctxt2 + ctxt->hash->ctxtsize;
  118|       |
  119|  5.35k|  hashparams->hfinal(output, ctxt->hashctxt1);
  120|  5.35k|  hashparams->hupdate(ctxt->hashctxt2, output, hashparams->resultlen);
  121|  5.35k|  hashparams->hfinal(output, ctxt->hashctxt2);
  122|  5.35k|  curlx_free(ctxt);
  ------------------
  |  | 1478|  5.35k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  123|  5.35k|  return 0;
  124|  5.35k|}
Curl_hmacit:
  147|  5.35k|{
  148|  5.35k|  struct HMAC_context *ctxt;
  149|  5.35k|  if(keylen > UINT_MAX) /* unlikely to ever happen */
  ------------------
  |  Branch (149:6): [True: 0, False: 5.35k]
  ------------------
  150|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  151|  5.35k|  ctxt = Curl_HMAC_init(hashparams, key, curlx_uztoui(keylen));
  152|       |
  153|  5.35k|  if(!ctxt)
  ------------------
  |  Branch (153:6): [True: 0, False: 5.35k]
  ------------------
  154|      0|    return CURLE_OUT_OF_MEMORY;
  155|       |
  156|       |  /* Update the digest with the given challenge */
  157|  5.35k|  do {
  158|  5.35k|    unsigned int ilen = (unsigned int)CURLMIN(datalen, UINT_MAX);
  ------------------
  |  | 1292|  5.35k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 5.35k, False: 0]
  |  |  ------------------
  ------------------
  159|  5.35k|    Curl_HMAC_update(ctxt, data, ilen);
  160|  5.35k|    datalen -= ilen;
  161|  5.35k|    data += ilen;
  162|  5.35k|  } while(datalen);
  ------------------
  |  Branch (162:11): [True: 0, False: 5.35k]
  ------------------
  163|       |
  164|       |  /* Finalise the digest */
  165|  5.35k|  Curl_HMAC_final(ctxt, output);
  166|       |
  167|  5.35k|  return CURLE_OK;
  168|  5.35k|}

Curl_resolv_dns_queries:
  126|  6.43k|{
  127|  6.43k|  (void)data;
  128|  6.43k|  switch(ip_version) {
  129|      6|  case CURL_IPRESOLVE_V6:
  ------------------
  |  | 2330|      6|#define CURL_IPRESOLVE_V6       2L /* uses only IPv6 addresses/connections */
  ------------------
  |  Branch (129:3): [True: 6, False: 6.42k]
  ------------------
  130|      6|    return CURL_DNSQ_AAAA;
  ------------------
  |  |   52|      6|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  131|     11|  case CURL_IPRESOLVE_V4:
  ------------------
  |  | 2329|     11|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  |  Branch (131:3): [True: 11, False: 6.42k]
  ------------------
  132|     11|    return CURL_DNSQ_A;
  ------------------
  |  |   51|     11|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  133|  6.41k|  default:
  ------------------
  |  Branch (133:3): [True: 6.41k, False: 17]
  ------------------
  134|  6.41k|    if(ipv6works(data))
  ------------------
  |  Branch (134:8): [True: 6.41k, False: 0]
  ------------------
  135|  6.41k|      return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|  6.41k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|  6.41k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  136|      0|    else
  137|      0|      return CURL_DNSQ_A;
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  138|  6.43k|  }
  139|  6.43k|}
Curl_resolv_query_str:
  143|    820|{
  144|    820|  switch(dns_queries) {
  145|      0|  case (CURL_DNSQ_A | CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                case (CURL_DNSQ_A | CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
                case (CURL_DNSQ_A | CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (145:3): [True: 0, False: 820]
  ------------------
  146|      0|    return "A+AAAA+HTTPS";
  147|      0|  case (CURL_DNSQ_A | CURL_DNSQ_AAAA):
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                case (CURL_DNSQ_A | CURL_DNSQ_AAAA):
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (147:3): [True: 0, False: 820]
  ------------------
  148|      0|    return "A+AAAA";
  149|      0|  case (CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
                case (CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (149:3): [True: 0, False: 820]
  ------------------
  150|      0|    return "AAAA+HTTPS";
  151|    364|  case (CURL_DNSQ_AAAA):
  ------------------
  |  |   52|    364|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (151:3): [True: 364, False: 456]
  ------------------
  152|    364|    return "AAAA";
  153|      0|  case (CURL_DNSQ_A | CURL_DNSQ_HTTPS):
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                case (CURL_DNSQ_A | CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (153:3): [True: 0, False: 820]
  ------------------
  154|      0|    return "A+HTTPS";
  155|    456|  case (CURL_DNSQ_A):
  ------------------
  |  |   51|    456|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (155:3): [True: 456, False: 364]
  ------------------
  156|    456|    return "A";
  157|      0|  case (CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (157:3): [True: 0, False: 820]
  ------------------
  158|      0|    return "HTTPS";
  159|      0|  case 0:
  ------------------
  |  Branch (159:3): [True: 0, False: 820]
  ------------------
  160|      0|    return "-";
  161|      0|  default:
  ------------------
  |  Branch (161:3): [True: 0, False: 820]
  ------------------
  162|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (162:5): [Folded, False: 0]
  |  Branch (162:5): [Folded, False: 0]
  ------------------
  163|      0|    return "???";
  164|    820|  }
  165|    820|}
Curl_printable_address:
  177|    228|{
  178|    228|  DEBUGASSERT(bufsize);
  ------------------
  |  | 1079|    228|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 228]
  |  Branch (178:3): [True: 228, False: 0]
  ------------------
  179|    228|  buf[0] = 0;
  180|       |
  181|    228|  switch(ai->ai_family) {
  182|    156|  case AF_INET: {
  ------------------
  |  Branch (182:3): [True: 156, False: 72]
  ------------------
  183|    156|    const struct sockaddr_in *sa4 = (const void *)ai->ai_addr;
  184|    156|    const struct in_addr *ipaddr4 = &sa4->sin_addr;
  185|    156|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr4, buf, bufsize);
  186|    156|    break;
  187|      0|  }
  188|      0|#ifdef USE_IPV6
  189|     72|  case AF_INET6: {
  ------------------
  |  Branch (189:3): [True: 72, False: 156]
  ------------------
  190|     72|    const struct sockaddr_in6 *sa6 = (const void *)ai->ai_addr;
  191|     72|    const struct in6_addr *ipaddr6 = &sa6->sin6_addr;
  192|     72|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr6, buf, bufsize);
  193|     72|    break;
  194|      0|  }
  195|      0|#endif
  196|      0|  default:
  ------------------
  |  Branch (196:3): [True: 0, False: 228]
  ------------------
  197|      0|    break;
  198|    228|  }
  199|    228|}
Curl_probeipv6:
  290|  11.7k|{
  291|       |  /* probe to see if we have a working IPv6 stack */
  292|  11.7k|  curl_socket_t s = CURL_SOCKET(PF_INET6, SOCK_DGRAM, 0);
  ------------------
  |  | 1431|  11.7k|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  293|  11.7k|  multi->ipv6_works = FALSE;
  ------------------
  |  | 1056|  11.7k|#define FALSE false
  ------------------
  294|  11.7k|  if(s == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  11.7k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (294:6): [True: 0, False: 11.7k]
  ------------------
  295|      0|    if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1093|      0|#define SOCKERRNO         errno
  ------------------
                  if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1131|      0|#define SOCKENOMEM        ENOMEM
  ------------------
  |  Branch (295:8): [True: 0, False: 0]
  ------------------
  296|      0|      return CURLE_OUT_OF_MEMORY;
  297|      0|  }
  298|  11.7k|  else {
  299|  11.7k|    multi->ipv6_works = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  300|  11.7k|    sclose(s);
  ------------------
  |  | 1423|  11.7k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  301|  11.7k|  }
  302|  11.7k|  return CURLE_OK;
  303|  11.7k|}
Curl_host_is_ipnum:
  321|    792|{
  322|    792|  struct in_addr in;
  323|    792|#ifdef USE_IPV6
  324|    792|  struct in6_addr in6;
  325|    792|#endif
  326|    792|  if(curlx_inet_pton(AF_INET, hostname, &in) > 0
  ------------------
  |  Branch (326:6): [True: 2, False: 790]
  ------------------
  327|    790|#ifdef USE_IPV6
  328|    790|     || curlx_inet_pton(AF_INET6, hostname, &in6) > 0
  ------------------
  |  Branch (328:9): [True: 18, False: 772]
  ------------------
  329|    792|#endif
  330|    792|    )
  331|     20|    return TRUE;
  ------------------
  |  | 1053|     20|#define TRUE true
  ------------------
  332|    772|  return FALSE;
  ------------------
  |  | 1056|    772|#define FALSE false
  ------------------
  333|    792|}
Curl_resolv_announce_start:
  364|  6.59k|{
  365|  6.59k|  if(data->set.resolver_start) {
  ------------------
  |  Branch (365:6): [True: 0, False: 6.59k]
  ------------------
  366|      0|    struct Curl_mapi_guard guard;
  367|      0|    int rc;
  368|       |
  369|      0|    CURL_TRC_DNS(data, "announcing resolve to application");
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  370|      0|    CURL_CBAPI_START(&guard, data, easy_resolver_start);
  ------------------
  |  |  195|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  371|      0|    rc = data->set.resolver_start(resolver, NULL,
  372|      0|                                  data->set.resolver_start_client);
  373|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|      0|  Curl_cbapi_leave(g)
  ------------------
  374|      0|    if(rc) {
  ------------------
  |  Branch (374:8): [True: 0, False: 0]
  ------------------
  375|      0|      CURL_TRC_DNS(data, "application aborted resolve");
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  376|      0|      return CURLE_ABORTED_BY_CALLBACK;
  377|      0|    }
  378|      0|  }
  379|  6.59k|  return CURLE_OK;
  380|  6.59k|}
Curl_resolv_elapsed_ms:
  478|  1.18k|{
  479|  1.18k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  480|  1.18k|  if(!async)
  ------------------
  |  Branch (480:6): [True: 0, False: 1.18k]
  ------------------
  481|      0|    return CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
  482|  1.18k|  return curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  483|  1.18k|}
Curl_resolv_has_answers:
  487|  1.24k|{
  488|  1.24k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  489|  1.24k|  uint8_t check_queries;
  490|       |  /* a no longer existing/running resolve has all answers. */
  491|  1.24k|  if(!async || async->done)
  ------------------
  |  Branch (491:6): [True: 0, False: 1.24k]
  |  Branch (491:16): [True: 0, False: 1.24k]
  ------------------
  492|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  493|       |  /* Relevant are only queries undertaken. Others are considered answered. */
  494|  1.24k|  check_queries = (dns_queries & async->dns_queries);
  495|  1.24k|  if((check_queries & async->dns_responses) != check_queries) {
  ------------------
  |  Branch (495:6): [True: 1.18k, False: 61]
  ------------------
  496|  1.18k|    return FALSE;
  ------------------
  |  | 1056|  1.18k|#define FALSE false
  ------------------
  497|  1.18k|  }
  498|     61|  return TRUE;
  ------------------
  |  | 1053|     61|#define TRUE true
  ------------------
  499|  1.24k|}
Curl_resolv_get_ai:
  505|    192|{
  506|    192|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  507|    192|  (void)index;
  508|    192|  if(!async)
  ------------------
  |  Branch (508:6): [True: 0, False: 192]
  ------------------
  509|      0|    return NULL;
  510|    192|  if((ai_family == AF_INET) && !(async->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|     96|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (510:6): [True: 96, False: 96]
  |  Branch (510:32): [True: 0, False: 96]
  ------------------
  511|      0|    return NULL;
  512|    192|#ifdef USE_IPV6
  513|    192|  if((ai_family == AF_INET6) && !(async->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|     96|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (513:6): [True: 96, False: 96]
  |  Branch (513:33): [True: 22, False: 74]
  ------------------
  514|     22|    return NULL;
  515|    170|#endif
  516|    170|  return Curl_async_get_ai(data, async, ai_family, index);
  517|    192|}
Curl_resolv_blocking:
  794|    258|{
  795|    258|  CURLcode result;
  796|    258|  uint32_t resolv_id;
  797|    258|  DEBUGASSERT(hostname && *hostname);
  ------------------
  |  | 1079|    258|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (797:3): [True: 0, False: 258]
  |  Branch (797:3): [True: 0, False: 0]
  |  Branch (797:3): [True: 258, False: 0]
  |  Branch (797:3): [True: 258, False: 0]
  ------------------
  798|    258|  *pdns = NULL;
  799|       |  /* We cannot do a blocking resolve using DoH currently */
  800|    258|  result = hostip_resolv(data, dns_queries,
  801|    258|                         hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1056|    258|#define FALSE false
  ------------------
                                       hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1056|    258|#define FALSE false
  ------------------
  802|    258|                         &resolv_id, pdns);
  803|    258|  switch(result) {
  804|     79|  case CURLE_OK:
  ------------------
  |  Branch (804:3): [True: 79, False: 179]
  ------------------
  805|     79|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1079|     79|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (805:5): [True: 0, False: 79]
  |  Branch (805:5): [True: 79, False: 0]
  ------------------
  806|     79|    break;
  807|     79|#ifdef USE_CURL_ASYNC
  808|    179|  case CURLE_AGAIN:
  ------------------
  |  Branch (808:3): [True: 179, False: 79]
  ------------------
  809|    179|    DEBUGASSERT(!*pdns);
  ------------------
  |  | 1079|    179|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (809:5): [True: 0, False: 179]
  |  Branch (809:5): [True: 179, False: 0]
  ------------------
  810|    179|    result = Curl_async_await(data, resolv_id, pdns);
  811|    179|    Curl_resolv_destroy(data, resolv_id);
  812|    179|    break;
  813|      0|#endif
  814|      0|  default:
  ------------------
  |  Branch (814:3): [True: 0, False: 258]
  ------------------
  815|      0|    break;
  816|    258|  }
  817|    258|  return result;
  818|    258|}
Curl_resolv:
 1023|  6.41k|{
 1024|  6.41k|  *presolv_id = 0;
 1025|  6.41k|  *pdns = NULL;
 1026|       |
 1027|  6.41k|  if(timeout_ms < 0)
  ------------------
  |  Branch (1027:6): [True: 0, False: 6.41k]
  ------------------
 1028|       |    /* got an already expired timeout */
 1029|      0|    return CURLE_OPERATION_TIMEDOUT;
 1030|  6.41k|  else if(!timeout_ms)
  ------------------
  |  Branch (1030:11): [True: 0, False: 6.41k]
  ------------------
 1031|      0|    timeout_ms = CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
 1032|       |
 1033|  6.41k|#ifdef USE_UNIX_SOCKETS
 1034|  6.41k|  if((dns_queries & CURL_DNSQ_ADDR) && peer->unix_socket)
  ------------------
  |  |   55|  6.41k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   51|  6.41k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   52|  6.41k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
  |  Branch (1034:6): [True: 6.41k, False: 0]
  |  Branch (1034:40): [True: 35, False: 6.38k]
  ------------------
 1035|     35|    return resolv_unix(data, peer->hostname, (bool)peer->abstract_uds, pdns);
 1036|       |#else
 1037|       |  if(peer->unix_socket)
 1038|       |    return hostip_resolv_failed(data, peer->hostname, for_proxy);
 1039|       |#endif
 1040|       |
 1041|       |#ifdef USE_ALARM_TIMEOUT
 1042|       |  if(dns_queries & CURL_DNSQ_ADDR) {
 1043|       |    if(timeout_ms && data->set.no_signal) {
 1044|       |      /* Cannot use ALARM when signals are disabled */
 1045|       |      timeout_ms = 0;
 1046|       |    }
 1047|       |    if(timeout_ms && !Curl_doh_wanted(data)) {
 1048|       |      return resolv_alarm_timeout(data, dns_queries,
 1049|       |                                  peer->hostname, peer->port,
 1050|       |                                  transport, for_proxy, timeout_ms,
 1051|       |                                  presolv_id, pdns);
 1052|       |    }
 1053|       |  }
 1054|       |#endif /* !USE_ALARM_TIMEOUT */
 1055|       |
 1056|       |#ifndef CURLRES_ASYNCH
 1057|       |  if(timeout_ms)
 1058|       |    infof(data, "timeout on name lookup is not supported");
 1059|       |#endif
 1060|       |
 1061|  6.38k|  return hostip_resolv(data, dns_queries, peer->hostname, peer->port,
 1062|       |                       transport, for_proxy, timeout_ms, TRUE, presolv_id,
  ------------------
  |  | 1053|  6.38k|#define TRUE true
  ------------------
 1063|  6.38k|                       pdns);
 1064|  6.41k|}
Curl_async_get:
 1070|  4.87k|{
 1071|  4.87k|  struct Curl_resolv_async *async = data->state.async;
 1072|  4.87k|  for(; async; async = async->next) {
  ------------------
  |  Branch (1072:9): [True: 4.87k, False: 0]
  ------------------
 1073|  4.87k|    if(async->id == resolv_id)
  ------------------
  |  Branch (1073:8): [True: 4.87k, False: 0]
  ------------------
 1074|  4.87k|      return async;
 1075|  4.87k|  }
 1076|      0|  return NULL;
 1077|  4.87k|}
Curl_resolv_take_result:
 1081|  1.41k|{
 1082|  1.41k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
 1083|  1.41k|  CURLcode result;
 1084|       |
 1085|       |  /* If async resolving is ongoing, this must be set */
 1086|  1.41k|  if(!async)
  ------------------
  |  Branch (1086:6): [True: 0, False: 1.41k]
  ------------------
 1087|      0|    return CURLE_FAILED_INIT;
 1088|       |
 1089|       |  /* check if we have the name resolved by now (from someone else) */
 1090|  1.41k|  result = Curl_dnscache_get(data, async->dns_queries,
 1091|  1.41k|                             async->hostname, async->port, pdns);
 1092|  1.41k|  if(*pdns) {
  ------------------
  |  Branch (1092:6): [True: 0, False: 1.41k]
  ------------------
 1093|       |    /* Tell a possibly async resolver we no longer need the results. */
 1094|      0|    infof(data, "Hostname '%s' was found in DNS cache", async->hostname);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1095|      0|    Curl_async_shutdown(data, async);
 1096|      0|    return CURLE_OK;
 1097|      0|  }
 1098|  1.41k|  else if(result) {
  ------------------
  |  Branch (1098:11): [True: 0, False: 1.41k]
  ------------------
 1099|      0|    Curl_async_shutdown(data, async);
 1100|      0|    return Curl_async_failed(data, async, NULL);
 1101|      0|  }
 1102|       |
 1103|  1.41k|  result = hostip_resolv_take_result(data, async, pdns);
 1104|       |
 1105|  1.41k|  if(*pdns) {
  ------------------
  |  Branch (1105:6): [True: 0, False: 1.41k]
  ------------------
 1106|       |    /* Add to cache */
 1107|      0|    result = Curl_dnscache_add(data, *pdns);
 1108|      0|    if(result)
  ------------------
  |  Branch (1108:8): [True: 0, False: 0]
  ------------------
 1109|      0|      Curl_dns_entry_unlink(data, pdns);
 1110|      0|  }
 1111|  1.41k|  else if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|  1.41k|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 22, False: 1.39k]
  |  |  ------------------
  |  |   78|  1.41k|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 145, False: 1.24k]
  |  |  ------------------
  ------------------
 1112|       |    /* Only cache the failure when the resolver answered that the
 1113|       |       name does not exist. Transient failures, e.g. an unreachable
 1114|       |       or overloaded DNS server or local resource shortages, say
 1115|       |       nothing about the name and would poison the cache for every
 1116|       |       transfer using it. */
 1117|    167|    if(async->negative_answer)
  ------------------
  |  Branch (1117:8): [True: 167, False: 0]
  ------------------
 1118|    167|      Curl_dnscache_add_negative(data, async->dns_queries,
 1119|    167|                                 async->hostname, async->port);
 1120|    167|    if(async->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))
  ------------------
  |  |   51|    167|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                  if(async->dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))
  ------------------
  |  |   52|    167|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (1120:8): [True: 167, False: 0]
  ------------------
 1121|    167|      failf(data, "Could not resolve: %s:%u", async->hostname, async->port);
  ------------------
  |  |   62|    167|#define failf Curl_failf
  ------------------
 1122|    167|  }
 1123|  1.24k|  else if(result) {
  ------------------
  |  Branch (1123:11): [True: 0, False: 1.24k]
  ------------------
 1124|      0|    failf(data, "Error %d resolving %s:%u",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1125|      0|          (int)result, async->hostname, async->port);
 1126|      0|  }
 1127|  1.41k|  return result;
 1128|  1.41k|}
Curl_resolv_pollset:
 1132|  2.47k|{
 1133|  2.47k|  struct Curl_resolv_async *async = data->state.async;
 1134|  2.47k|  CURLcode result = CURLE_OK;
 1135|       |
 1136|  2.47k|  (void)ps;
 1137|  3.74k|  for(; async && !result; async = async->next) {
  ------------------
  |  Branch (1137:9): [True: 1.27k, False: 2.47k]
  |  Branch (1137:18): [True: 1.27k, False: 0]
  ------------------
 1138|  1.27k|#ifndef CURL_DISABLE_DOH
 1139|  1.27k|    if(async->doh) /* DoH has nothing for the pollset */
  ------------------
  |  Branch (1139:8): [True: 659, False: 614]
  ------------------
 1140|    659|      continue;
 1141|    614|#endif
 1142|    614|    result = Curl_async_pollset(data, async, ps);
 1143|    614|  }
 1144|  2.47k|  return result;
 1145|  2.47k|}
Curl_resolv_destroy:
 1148|    179|{
 1149|    179|  struct Curl_resolv_async **panchor = &data->state.async;
 1150|       |
 1151|    179|  for(; *panchor; panchor = &(*panchor)->next) {
  ------------------
  |  Branch (1151:9): [True: 179, False: 0]
  ------------------
 1152|    179|    struct Curl_resolv_async *async = *panchor;
 1153|    179|    if(async->id == resolv_id) {
  ------------------
  |  Branch (1153:8): [True: 179, False: 0]
  ------------------
 1154|    179|      *panchor = async->next;
 1155|    179|      Curl_async_destroy(data, async);
 1156|    179|      break;
 1157|    179|    }
 1158|    179|  }
 1159|    179|}
Curl_resolv_shutdown_all:
 1162|  6.25k|{
 1163|  6.25k|  struct Curl_resolv_async *async = data->state.async;
 1164|  6.97k|  for(; async; async = async->next) {
  ------------------
  |  Branch (1164:9): [True: 724, False: 6.25k]
  ------------------
 1165|    724|    Curl_async_shutdown(data, async);
 1166|    724|  }
 1167|  6.25k|}
Curl_resolv_destroy_all:
 1170|  34.6k|{
 1171|  35.3k|  while(data->state.async) {
  ------------------
  |  Branch (1171:9): [True: 724, False: 34.6k]
  ------------------
 1172|    724|    struct Curl_resolv_async *async = data->state.async;
 1173|    724|    data->state.async = async->next;
 1174|    724|    Curl_async_destroy(data, async);
 1175|    724|  }
 1176|  34.6k|}
hostip.c:ipv6works:
  309|  6.46k|{
  310|  6.46k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  6.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (310:3): [True: 0, False: 6.46k]
  |  Branch (310:3): [True: 6.46k, False: 0]
  ------------------
  311|  6.46k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1079|  6.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:3): [True: 0, False: 6.46k]
  |  Branch (311:3): [True: 6.46k, False: 0]
  ------------------
  312|  6.46k|  return data ? data->multi->ipv6_works : FALSE;
  ------------------
  |  | 1056|  6.46k|#define FALSE false
  ------------------
  |  Branch (312:10): [True: 6.46k, False: 0]
  ------------------
  313|  6.46k|}
hostip.c:hostip_resolv:
  712|  6.63k|{
  713|  6.63k|  size_t hostname_len;
  714|  6.63k|  CURLcode result = RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|  6.63k|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 2.79k, False: 3.84k]
  |  |  ------------------
  ------------------
  715|  6.63k|  bool cache_dns = FALSE;
  ------------------
  |  | 1056|  6.63k|#define FALSE false
  ------------------
  716|  6.63k|  bool negative = FALSE;
  ------------------
  |  | 1056|  6.63k|#define FALSE false
  ------------------
  717|       |
  718|  6.63k|  (void)timeout_ms; /* not used in all ifdefs */
  719|  6.63k|  *presolv_id = 0;
  720|  6.63k|  *pdns = NULL;
  721|       |
  722|       |#ifdef CURL_DISABLE_DOH
  723|       |  (void)allowDOH;
  724|       |#endif
  725|       |
  726|       |  /* We should intentionally error and not resolve .onion TLDs */
  727|  6.63k|  hostname_len = strlen(hostname);
  728|  6.63k|  DEBUGASSERT(hostname_len);
  ------------------
  |  | 1079|  6.63k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (728:3): [True: 0, False: 6.63k]
  |  Branch (728:3): [True: 6.63k, False: 0]
  ------------------
  729|  6.63k|  if(hostname_len >= 7 &&
  ------------------
  |  Branch (729:6): [True: 5.83k, False: 808]
  ------------------
  730|  5.83k|     (curl_strequal(&hostname[hostname_len - 6], ".onion") ||
  ------------------
  |  Branch (730:7): [True: 0, False: 5.83k]
  ------------------
  731|  5.83k|      curl_strequal(&hostname[hostname_len - 7], ".onion."))) {
  ------------------
  |  Branch (731:7): [True: 0, False: 5.83k]
  ------------------
  732|      0|    failf(data, "Not resolving .onion address (RFC 7686)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  733|      0|    goto out;
  734|      0|  }
  735|       |
  736|  6.63k|#ifdef DEBUGBUILD
  737|  6.63k|  CURL_TRC_DNS(data, "[%s] hostip_resolv(%s:%u)",
  ------------------
  |  |  168|  6.63k|  do {                                 \
  |  |  169|  6.63k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  6.63k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.63k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  13.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.63k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.63k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  13.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.63k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  6.63k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  6.63k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 6.63k]
  |  |  ------------------
  ------------------
  738|  6.63k|               Curl_resolv_query_str(dns_queries), hostname, port);
  739|  6.63k|  if((CURL_DNSQ_IS_ADDR(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   56|  6.63k|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|  6.63k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  6.63k|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  6.63k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IS_ADDR(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  6.63k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (739:6): [True: 88, False: 6.55k]
  ------------------
  740|     88|     getenv("CURL_DBG_RESOLV_FAIL_IPV6")) {
  ------------------
  |  Branch (740:6): [True: 0, False: 88]
  ------------------
  741|      0|    infof(data, "DEBUG fail ipv6 resolve");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  742|      0|    result = hostip_resolv_failed(data, hostname, for_proxy);
  743|      0|    goto out;
  744|      0|  }
  745|  6.63k|#endif
  746|       |  /* Let's check our DNS cache first */
  747|  6.63k|  result = Curl_dnscache_get(data, dns_queries, hostname, port, pdns);
  748|  6.63k|  if(*pdns) {
  ------------------
  |  Branch (748:6): [True: 24, False: 6.61k]
  ------------------
  749|     24|    infof(data, "Hostname %s was found in DNS cache", hostname);
  ------------------
  |  |  143|     24|  do {                               \
  |  |  144|     24|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     24|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 24, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 24]
  |  |  |  |  ------------------
  |  |  |  |  323|     24|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     24|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     24|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 24]
  |  |  ------------------
  ------------------
  750|     24|    result = CURLE_OK;
  751|     24|  }
  752|  6.61k|  else if(result) {
  ------------------
  |  Branch (752:11): [True: 21, False: 6.59k]
  ------------------
  753|     21|    infof(data, "Negative DNS entry");
  ------------------
  |  |  143|     21|  do {                               \
  |  |  144|     21|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     21|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 21, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  323|     21|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     21|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     21|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 21]
  |  |  ------------------
  ------------------
  754|     21|    result = hostip_resolv_failed(data, hostname, for_proxy);
  755|     21|  }
  756|  6.59k|  else {
  757|       |    /* No luck, we need to start resolving. */
  758|  6.59k|    cache_dns = TRUE;
  ------------------
  |  | 1053|  6.59k|#define TRUE true
  ------------------
  759|  6.59k|    result = hostip_resolv_start(data, dns_queries, hostname, port,
  760|  6.59k|                                 transport, for_proxy, timeout_ms, allowDOH,
  761|  6.59k|                                 presolv_id, pdns, &negative);
  762|  6.59k|    CURL_TRC_DNS(data, "[%s] hostip_resolv started -> %d",
  ------------------
  |  |  168|  6.59k|  do {                                 \
  |  |  169|  6.59k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  6.59k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.59k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  13.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.59k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  13.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.59k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  6.59k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  6.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 6.59k]
  |  |  ------------------
  ------------------
  763|  6.59k|                 Curl_resolv_query_str(dns_queries), (int)result);
  764|  6.59k|  }
  765|       |
  766|  6.63k|out:
  767|  6.63k|  if(result && (result != CURLE_AGAIN)) {
  ------------------
  |  Branch (767:6): [True: 934, False: 5.70k]
  |  Branch (767:16): [True: 31, False: 903]
  ------------------
  768|     31|    Curl_dns_entry_unlink(data, pdns);
  769|     31|    if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|     31|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 21, False: 10]
  |  |  ------------------
  |  |   78|     31|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 0, False: 10]
  |  |  ------------------
  ------------------
  770|     21|      if(cache_dns && negative)
  ------------------
  |  Branch (770:10): [True: 0, False: 21]
  |  Branch (770:23): [True: 0, False: 0]
  ------------------
  771|      0|        Curl_dnscache_add_negative(data, dns_queries, hostname, port);
  772|     21|      if(dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))
  ------------------
  |  |   51|     21|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    if(dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA))
  ------------------
  |  |   52|     21|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (772:10): [True: 21, False: 0]
  ------------------
  773|     21|        failf(data, "Could not resolve: %s:%u", hostname, port);
  ------------------
  |  |   62|     21|#define failf Curl_failf
  ------------------
  774|     21|    }
  775|     10|    else {
  776|     10|      failf(data, "Error %d resolving %s:%u", (int)result, hostname, port);
  ------------------
  |  |   62|     10|#define failf Curl_failf
  ------------------
  777|     10|    }
  778|     31|  }
  779|  6.60k|  else if(cache_dns && *pdns) {
  ------------------
  |  Branch (779:11): [True: 6.58k, False: 24]
  |  Branch (779:24): [True: 5.68k, False: 903]
  ------------------
  780|  5.68k|    result = Curl_dnscache_add(data, *pdns);
  781|  5.68k|    if(result)
  ------------------
  |  Branch (781:8): [True: 0, False: 5.68k]
  ------------------
  782|      0|      Curl_dns_entry_unlink(data, pdns);
  783|  5.68k|  }
  784|       |
  785|  6.63k|  return result;
  786|  6.63k|}
hostip.c:hostip_resolv_failed:
  347|     21|{
  348|     21|  failf(data, "Could not resolve %s: %s",
  ------------------
  |  |   62|     21|#define failf Curl_failf
  ------------------
  349|     21|        for_proxy ? "proxy" : "host", hostname);
  ------------------
  |  Branch (349:9): [True: 0, False: 21]
  ------------------
  350|     21|  return RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|     21|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 0, False: 21]
  |  |  ------------------
  ------------------
  351|     21|}
hostip.c:hostip_resolv_start:
  567|  6.59k|{
  568|  6.59k|#ifdef USE_CURL_ASYNC
  569|  6.59k|  struct Curl_resolv_async *async = NULL;
  570|  6.59k|#endif
  571|  6.59k|  struct Curl_addrinfo *addr = NULL;
  572|  6.59k|  size_t hostname_len;
  573|  6.59k|  bool addr_queries = (dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA));
  ------------------
  |  |   51|  6.59k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                bool addr_queries = (dns_queries & (CURL_DNSQ_A|CURL_DNSQ_AAAA));
  ------------------
  |  |   52|  6.59k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  574|  6.59k|  CURLcode result = CURLE_OK;
  575|       |
  576|  6.59k|  *pnegative = FALSE;
  ------------------
  |  | 1056|  6.59k|#define FALSE false
  ------------------
  577|       |
  578|  6.59k|  (void)timeout_ms; /* not in all ifdefs */
  579|  6.59k|  *presolv_id = 0;
  580|  6.59k|  *pdns = NULL;
  581|       |
  582|       |  /* Check for "known" things to resolve ourselves. */
  583|  6.59k|  if(addr_queries) {
  ------------------
  |  Branch (583:6): [True: 6.59k, False: 0]
  ------------------
  584|  6.59k|#ifndef USE_RESOLVE_ON_IPS
  585|  6.59k|    if(Curl_is_ipaddr(hostname)) {
  ------------------
  |  Branch (585:8): [True: 5.48k, False: 1.10k]
  ------------------
  586|       |      /* test655 verifies that the announce is done, even though there
  587|       |       * is no real resolving. So, keep doing this. */
  588|  5.48k|      result = Curl_resolv_announce_start(data, NULL);
  589|  5.48k|      if(result)
  ------------------
  |  Branch (589:10): [True: 0, False: 5.48k]
  ------------------
  590|      0|        goto out;
  591|       |      /* shortcut literal IP addresses, if we are not told to resolve them. */
  592|  5.48k|      result = Curl_str2addr(hostname, port, &addr);
  593|  5.48k|      goto out;
  594|  5.48k|    }
  595|  1.10k|#endif
  596|       |
  597|  1.10k|    hostname_len = strlen(hostname);
  598|  1.10k|    if(curl_strequal(hostname, "localhost") ||
  ------------------
  |  Branch (598:8): [True: 82, False: 1.02k]
  ------------------
  599|  1.02k|       curl_strequal(hostname, "localhost.") ||
  ------------------
  |  Branch (599:8): [True: 50, False: 975]
  ------------------
  600|    975|       tailmatch(hostname, hostname_len, STRCONST(".localhost")) ||
  ------------------
  |  | 1301|    975|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|    975|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (600:8): [True: 7, False: 968]
  ------------------
  601|    968|       tailmatch(hostname, hostname_len, STRCONST(".localhost."))) {
  ------------------
  |  | 1301|    968|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|    968|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (601:8): [True: 55, False: 913]
  ------------------
  602|    194|      result = Curl_resolv_announce_start(data, NULL);
  603|    194|      if(result)
  ------------------
  |  Branch (603:10): [True: 0, False: 194]
  ------------------
  604|      0|        goto out;
  605|    194|      addr = get_localhost(port, hostname);
  606|    194|      if(!addr)
  ------------------
  |  Branch (606:10): [True: 0, False: 194]
  ------------------
  607|      0|        result = CURLE_OUT_OF_MEMORY;
  608|    194|      goto out;
  609|    194|    }
  610|  1.10k|  }
  611|    913|#ifndef CURL_DISABLE_DOH
  612|    913|  if(!Curl_is_ipaddr(hostname) && allowDOH && data->set.doh) {
  ------------------
  |  Branch (612:6): [True: 913, False: 0]
  |  Branch (612:35): [True: 734, False: 179]
  |  Branch (612:47): [True: 409, False: 325]
  ------------------
  613|    409|    result = Curl_resolv_announce_start(data, NULL);
  614|    409|    if(result)
  ------------------
  |  Branch (614:8): [True: 0, False: 409]
  ------------------
  615|      0|      goto out;
  616|    409|    if(!async) {
  ------------------
  |  Branch (616:8): [True: 409, False: 0]
  ------------------
  617|    409|      async = hostip_async_new(data, dns_queries, hostname, port,
  618|    409|                               transport, for_proxy, timeout_ms);
  619|    409|      if(!async) {
  ------------------
  |  Branch (619:10): [True: 0, False: 409]
  ------------------
  620|      0|        result = CURLE_OUT_OF_MEMORY;
  621|      0|        goto out;
  622|      0|      }
  623|    409|    }
  624|    409|    result = Curl_doh(data, async);
  625|    409|    goto out;
  626|    409|  }
  627|       |#else
  628|       |  (void)allowDOH;
  629|       |#endif
  630|       |
  631|       |  /* Can we provide the requested IP specifics in resolving? */
  632|    504|  if(!can_resolve_dns_queries(data, dns_queries)) {
  ------------------
  |  Branch (632:6): [True: 0, False: 504]
  ------------------
  633|      0|    result = RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|      0|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  634|      0|    goto out;
  635|      0|  }
  636|       |
  637|    504|#ifdef CURLRES_ASYNCH
  638|    504|  (void)addr;
  639|    504|  if(!async) {
  ------------------
  |  Branch (639:6): [True: 504, False: 0]
  ------------------
  640|    504|    async = hostip_async_new(data, dns_queries, hostname, port,
  641|    504|                             transport, for_proxy, timeout_ms);
  642|    504|    if(!async) {
  ------------------
  |  Branch (642:8): [True: 0, False: 504]
  ------------------
  643|      0|      result = CURLE_OUT_OF_MEMORY;
  644|      0|      goto out;
  645|      0|    }
  646|    504|  }
  647|    504|  result = Curl_async_getaddrinfo(data, async);
  648|    504|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (648:6): [True: 0, False: 504]
  ------------------
  649|       |    /* the answer might be there already. Check. */
  650|      0|    CURLcode r2 = hostip_resolv_take_result(data, async, pdns);
  651|      0|    if(r2)
  ------------------
  |  Branch (651:8): [True: 0, False: 0]
  ------------------
  652|      0|      result = r2;
  653|      0|    else if(*pdns)
  ------------------
  |  Branch (653:13): [True: 0, False: 0]
  ------------------
  654|      0|      result = CURLE_OK;
  655|      0|  }
  656|       |#else
  657|       |  result = Curl_resolv_announce_start(data, NULL);
  658|       |  if(result)
  659|       |    goto out;
  660|       |  addr = Curl_sync_getaddrinfo(data, dns_queries, hostname, port, transport);
  661|       |  if(!addr) {
  662|       |    result = RESOLV_FAIL(for_proxy);
  663|       |    /* the synchronous resolvers do not tell a transient failure from
  664|       |       an authoritative negative answer, treat it as before */
  665|       |    *pnegative = TRUE;
  666|       |  }
  667|       |#endif
  668|       |
  669|  6.59k|out:
  670|  6.59k|  if(!result) {
  ------------------
  |  Branch (670:6): [True: 6.58k, False: 10]
  ------------------
  671|  6.58k|    if(addr) {
  ------------------
  |  Branch (671:8): [True: 5.68k, False: 903]
  ------------------
  672|       |      /* we got a response, create a dns entry, add to cache, return */
  673|  5.68k|      DEBUGASSERT(!*pdns);
  ------------------
  |  | 1079|  5.68k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (673:7): [True: 0, False: 5.68k]
  |  Branch (673:7): [True: 5.68k, False: 0]
  ------------------
  674|  5.68k|      *pdns = Curl_dnsc_mk_addr(data, dns_queries, &addr, hostname, port);
  675|  5.68k|      if(!*pdns)
  ------------------
  |  Branch (675:10): [True: 0, False: 5.68k]
  ------------------
  676|      0|        result = CURLE_OUT_OF_MEMORY;
  677|  5.68k|    }
  678|    903|    else if(!*pdns)
  ------------------
  |  Branch (678:13): [True: 903, False: 0]
  ------------------
  679|    903|      result = CURLE_AGAIN;
  680|  6.58k|  }
  681|     10|  else if(*pdns)
  ------------------
  |  Branch (681:11): [True: 0, False: 10]
  ------------------
  682|      0|    Curl_dns_entry_unlink(data, pdns);
  683|     10|  else if(addr)
  ------------------
  |  Branch (683:11): [True: 0, False: 10]
  ------------------
  684|      0|    Curl_freeaddrinfo(addr);
  685|       |
  686|  6.59k|#ifdef USE_CURL_ASYNC
  687|  6.59k|  if(async) {
  ------------------
  |  Branch (687:6): [True: 913, False: 5.68k]
  ------------------
  688|    913|    if(result == CURLE_AGAIN) { /* still need it, link, return id. */
  ------------------
  |  Branch (688:8): [True: 903, False: 10]
  ------------------
  689|    903|      *presolv_id = async->id;
  690|    903|      async->next = data->state.async;
  691|    903|      data->state.async = async;
  692|    903|    }
  693|     10|    else {
  694|     10|      *pnegative = !!async->negative_answer;
  695|     10|      Curl_async_destroy(data, async);
  696|     10|    }
  697|    913|  }
  698|  6.59k|#endif
  699|  6.59k|  return result;
  700|  6.59k|}
hostip.c:tailmatch:
  338|  1.94k|{
  339|  1.94k|  if(plen > flen)
  ------------------
  |  Branch (339:6): [True: 1.59k, False: 353]
  ------------------
  340|  1.59k|    return FALSE;
  ------------------
  |  | 1056|  1.59k|#define FALSE false
  ------------------
  341|    353|  return curl_strnequal(part, &full[flen - plen], plen);
  342|  1.94k|}
hostip.c:get_localhost:
  248|    194|{
  249|    194|  struct Curl_addrinfo *ca;
  250|    194|  struct Curl_addrinfo *ca6;
  251|    194|  const size_t ss_size = sizeof(struct sockaddr_in);
  252|    194|  const size_t hostlen = strlen(name);
  253|    194|  struct sockaddr_in sa;
  254|    194|  unsigned int ipv4;
  255|    194|  unsigned short port16 = (unsigned short)(port & 0xffff);
  256|       |
  257|       |  /* memset to clear the sa.sin_zero field */
  258|    194|  memset(&sa, 0, sizeof(sa));
  259|    194|  sa.sin_family = AF_INET;
  260|    194|  sa.sin_port = htons(port16);
  261|    194|  if(curlx_inet_pton(AF_INET, "127.0.0.1", (char *)&ipv4) < 1)
  ------------------
  |  Branch (261:6): [True: 0, False: 194]
  ------------------
  262|      0|    return NULL;
  263|    194|  memcpy(&sa.sin_addr, &ipv4, sizeof(ipv4));
  264|       |
  265|    194|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1475|    194|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  266|    194|  if(!ca)
  ------------------
  |  Branch (266:6): [True: 0, False: 194]
  ------------------
  267|      0|    return NULL;
  268|    194|  ca->ai_flags     = 0;
  269|    194|  ca->ai_family    = AF_INET;
  270|    194|  ca->ai_socktype  = SOCK_STREAM;
  271|    194|  ca->ai_protocol  = IPPROTO_TCP;
  272|    194|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  273|    194|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  274|    194|  memcpy(ca->ai_addr, &sa, ss_size);
  275|    194|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  276|    194|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  277|       |
  278|    194|  ca6 = get_localhost6(port, name);
  279|    194|  if(!ca6)
  ------------------
  |  Branch (279:6): [True: 0, False: 194]
  ------------------
  280|      0|    return ca;
  281|    194|  ca6->ai_next = ca;
  282|    194|  return ca6;
  283|    194|}
hostip.c:get_localhost6:
  212|    194|{
  213|    194|  struct Curl_addrinfo *ca;
  214|    194|  const size_t ss_size = sizeof(struct sockaddr_in6);
  215|    194|  const size_t hostlen = strlen(name);
  216|    194|  struct sockaddr_in6 sa6;
  217|    194|  unsigned char ipv6[16];
  218|    194|  unsigned short port16 = (unsigned short)(port & 0xffff);
  219|    194|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1475|    194|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  220|    194|  if(!ca)
  ------------------
  |  Branch (220:6): [True: 0, False: 194]
  ------------------
  221|      0|    return NULL;
  222|       |
  223|    194|  memset(&sa6, 0, sizeof(sa6));
  224|    194|  sa6.sin6_family = AF_INET6;
  225|    194|  sa6.sin6_port = htons(port16);
  226|       |
  227|    194|  (void)curlx_inet_pton(AF_INET6, "::1", ipv6);
  228|    194|  memcpy(&sa6.sin6_addr, ipv6, sizeof(ipv6));
  229|       |
  230|    194|  ca->ai_flags     = 0;
  231|    194|  ca->ai_family    = AF_INET6;
  232|    194|  ca->ai_socktype  = SOCK_STREAM;
  233|    194|  ca->ai_protocol  = IPPROTO_TCP;
  234|    194|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  235|       |  ca->ai_next      = NULL;
  236|    194|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  237|    194|  memcpy(ca->ai_addr, &sa6, ss_size);
  238|    194|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  239|    194|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  240|    194|  return ca;
  241|    194|}
hostip.c:hostip_async_new:
  391|    913|{
  392|    913|  struct Curl_resolv_async *async;
  393|    913|  size_t hostlen = strlen(hostname);
  394|       |
  395|    913|  if(!data->multi) {
  ------------------
  |  Branch (395:6): [True: 0, False: 913]
  ------------------
  396|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (396:5): [Folded, False: 0]
  |  Branch (396:5): [Folded, False: 0]
  ------------------
  397|      0|    return NULL;
  398|      0|  }
  399|       |
  400|       |  /* struct size already includes the NUL for hostname */
  401|    913|  async = curlx_calloc(1, sizeof(*async) + hostlen);
  ------------------
  |  | 1475|    913|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  402|    913|  if(!async)
  ------------------
  |  Branch (402:6): [True: 0, False: 913]
  ------------------
  403|      0|    return NULL;
  404|       |
  405|       |  /* Give every async resolve operation a "unique" id. This may
  406|       |   * wrap around after a long time, making collisions highly unlikely.
  407|       |   * As we keep the async structs at the easy handle, chances of
  408|       |   * easy `mid plus resolv->id` colliding should be astronomical.
  409|       |   * `resolv_id == 0` is never used. */
  410|    913|  if(data->multi->last_resolv_id == UINT32_MAX)
  ------------------
  |  Branch (410:6): [True: 0, False: 913]
  ------------------
  411|      0|    data->multi->last_resolv_id = 1; /* wrap around */
  412|    913|  else
  413|    913|    data->multi->last_resolv_id++;
  414|    913|  async->id = data->multi->last_resolv_id;
  415|    913|  async->dns_queries = dns_queries;
  416|    913|  async->port = port;
  417|    913|  async->transport = transport;
  418|    913|  async->for_proxy = for_proxy;
  419|    913|  async->start = *Curl_pgrs_now(data);
  420|    913|  async->timeout_ms = timeout_ms;
  421|    913|  if(hostlen) {
  ------------------
  |  Branch (421:6): [True: 913, False: 0]
  ------------------
  422|    913|    memcpy(async->hostname, hostname, hostlen);
  423|    913|    async->is_ipaddr = Curl_is_ipaddr(async->hostname);
  424|    913|    if(async->is_ipaddr)
  ------------------
  |  Branch (424:8): [True: 0, False: 913]
  ------------------
  425|      0|      async->is_ipv4addr = Curl_is_ipv4addr(async->hostname);
  426|    913|  }
  427|       |
  428|    913|  return async;
  429|    913|}
hostip.c:can_resolve_dns_queries:
  355|    504|{
  356|    504|  (void)data;
  357|    504|  if((CURL_DNSQ_IS_ADDR(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   56|    504|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|    504|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|    504|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|    504|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IS_ADDR(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   52|    504|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (357:6): [True: 48, False: 456]
  |  Branch (357:60): [True: 0, False: 48]
  ------------------
  358|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  359|    504|  return TRUE;
  ------------------
  |  | 1053|    504|#define TRUE true
  ------------------
  360|    504|}
hostip.c:resolv_unix:
  973|     35|{
  974|     35|  struct Curl_addrinfo *addr;
  975|     35|  CURLcode result;
  976|       |
  977|     35|  DEBUGASSERT(unix_path);
  ------------------
  |  | 1079|     35|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (977:3): [True: 0, False: 35]
  |  Branch (977:3): [True: 35, False: 0]
  ------------------
  978|     35|  *pdns = NULL;
  979|       |
  980|     35|  result = Curl_unix2addr(unix_path, abstract_path, &addr);
  981|     35|  if(result) {
  ------------------
  |  Branch (981:6): [True: 7, False: 28]
  ------------------
  982|      7|    if(result == CURLE_TOO_LARGE) {
  ------------------
  |  Branch (982:8): [True: 7, False: 0]
  ------------------
  983|       |      /* Long paths are not supported for now */
  984|      7|      failf(data, "Unix socket path too long: '%s'", unix_path);
  ------------------
  |  |   62|      7|#define failf Curl_failf
  ------------------
  985|      7|      result = CURLE_COULDNT_RESOLVE_HOST;
  986|      7|    }
  987|      7|    return result;
  988|      7|  }
  989|       |
  990|     28|  *pdns = Curl_dnsc_mk_addr(data, 0, &addr, NULL, 0);
  991|     28|  return *pdns ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (991:10): [True: 28, False: 0]
  ------------------
  992|     35|}
hostip.c:hostip_resolv_take_result:
  434|  1.41k|{
  435|  1.41k|  CURLcode result;
  436|       |
  437|       |  /* If async resolving is ongoing, this must be set */
  438|  1.41k|  if(!async)
  ------------------
  |  Branch (438:6): [True: 0, False: 1.41k]
  ------------------
  439|      0|    return CURLE_FAILED_INIT;
  440|       |
  441|  1.41k|#ifndef CURL_DISABLE_DOH
  442|  1.41k|  if(async->doh)
  ------------------
  |  Branch (442:6): [True: 781, False: 632]
  ------------------
  443|    781|    result = Curl_doh_take_result(data, async, pdns);
  444|    632|  else
  445|    632|#endif
  446|    632|  result = Curl_async_take_result(data, async, pdns);
  447|       |
  448|  1.41k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (448:6): [True: 1.24k, False: 167]
  ------------------
  449|  1.24k|    CURL_TRC_DNS(data, "[%s] resolve incomplete, responses=%s, "
  ------------------
  |  |  168|  1.24k|  do {                                 \
  |  |  169|  1.24k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  1.24k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  1.24k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  2.49k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 1.24k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.24k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  2.49k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  1.24k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  1.24k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  1.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 1.24k]
  |  |  ------------------
  ------------------
  450|  1.24k|                 "ongoing=%d for %s:%d",
  451|  1.24k|                 Curl_resolv_query_str(async->dns_queries),
  452|  1.24k|                 Curl_resolv_query_str(async->dns_responses),
  453|  1.24k|                 async->queries_ongoing, async->hostname, async->port);
  454|  1.24k|    result = CURLE_OK;
  455|  1.24k|  }
  456|    167|  else if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|    167|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 158, False: 9]
  |  |  ------------------
  |  |   78|    167|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 9, False: 0]
  |  |  ------------------
  ------------------
  457|    167|    result = Curl_async_failed(data, async, NULL);
  458|    167|  }
  459|      0|  else if(result) {
  ------------------
  |  Branch (459:11): [True: 0, False: 0]
  ------------------
  460|       |    /* a local failure, not a resolve answer. Keep the error as it
  461|       |       is so it does not get treated as one. */
  462|      0|    CURL_TRC_DNS(data, "[%s] resolve error %d for %s:%u",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  463|      0|                 Curl_resolv_query_str(async->dns_queries),
  464|      0|                 (int)result, async->hostname, async->port);
  465|      0|  }
  466|      0|  else {
  467|      0|    CURL_TRC_DNS(data, "[%s] resolve complete for %s:%u",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  468|      0|                 Curl_resolv_query_str(async->dns_queries),
  469|      0|                 async->hostname, async->port);
  470|      0|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (470:5): [True: 0, False: 0]
  |  Branch (470:5): [True: 0, False: 0]
  ------------------
  471|      0|  }
  472|       |
  473|  1.41k|  return result;
  474|  1.41k|}

Curl_hsts_init:
   67|  11.7k|{
   68|  11.7k|  struct hsts *h = curlx_calloc(1, sizeof(struct hsts));
  ------------------
  |  | 1475|  11.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   69|  11.7k|  if(h) {
  ------------------
  |  Branch (69:6): [True: 11.7k, False: 0]
  ------------------
   70|       |    Curl_llist_init(&h->list, NULL);
   71|  11.7k|  }
   72|  11.7k|  return h;
   73|  11.7k|}
Curl_hsts_cleanup:
   78|  26.2k|{
   79|  26.2k|  struct hsts *h = *hp;
   80|  26.2k|  if(h) {
  ------------------
  |  Branch (80:6): [True: 11.7k, False: 14.4k]
  ------------------
   81|  11.7k|    struct Curl_llist_node *e;
   82|  11.7k|    struct Curl_llist_node *n;
   83|  11.7k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (83:40): [True: 0, False: 11.7k]
  ------------------
   84|      0|      struct stsentry *sts = Curl_node_elem(e);
   85|      0|      n = Curl_node_next(e);
   86|      0|      hsts_free(sts);
  ------------------
  |  |   75|      0|#define hsts_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
   87|      0|    }
   88|  11.7k|    curlx_free(h->filename);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   89|  11.7k|    curlx_free(h);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   90|       |    *hp = NULL;
   91|  11.7k|  }
   92|  26.2k|}
hsts_check:
  165|    788|{
  166|    788|  struct stsentry *bestsub = NULL;
  167|    788|  if(h) {
  ------------------
  |  Branch (167:6): [True: 788, False: 0]
  ------------------
  168|    788|    time_t now = time(NULL);
  ------------------
  |  |   63|    788|#define time(x) hsts_debugtime(x)
  ------------------
  169|    788|    struct Curl_llist_node *e;
  170|    788|    struct Curl_llist_node *n;
  171|    788|    size_t blen = 0;
  172|       |
  173|    788|    if((hlen > MAX_HSTS_HOSTLEN) || !hlen)
  ------------------
  |  |   42|    788|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  |  Branch (173:8): [True: 4, False: 784]
  |  Branch (173:37): [True: 0, False: 784]
  ------------------
  174|      4|      return NULL;
  175|    784|    if(hostname[hlen - 1] == '.')
  ------------------
  |  Branch (175:8): [True: 26, False: 758]
  ------------------
  176|       |      /* remove the trailing dot */
  177|     26|      --hlen;
  178|       |
  179|    784|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (179:40): [True: 0, False: 784]
  ------------------
  180|      0|      struct stsentry *sts = Curl_node_elem(e);
  181|      0|      size_t ntail;
  182|      0|      n = Curl_node_next(e);
  183|      0|      if(sts->expires <= now) {
  ------------------
  |  Branch (183:10): [True: 0, False: 0]
  ------------------
  184|       |        /* remove expired entries */
  185|      0|        Curl_node_remove(&sts->node);
  186|      0|        hsts_free(sts);
  ------------------
  |  |   75|      0|#define hsts_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  187|      0|        continue;
  188|      0|      }
  189|      0|      ntail = strlen(sts->host);
  190|      0|      if((subdomain && sts->includeSubDomains) && (ntail < hlen)) {
  ------------------
  |  Branch (190:11): [True: 0, False: 0]
  |  Branch (190:24): [True: 0, False: 0]
  |  Branch (190:51): [True: 0, False: 0]
  ------------------
  191|      0|        size_t offs = hlen - ntail;
  192|      0|        if((hostname[offs - 1] == '.') &&
  ------------------
  |  Branch (192:12): [True: 0, False: 0]
  ------------------
  193|      0|           curl_strnequal(&hostname[offs], sts->host, ntail) &&
  ------------------
  |  Branch (193:12): [True: 0, False: 0]
  ------------------
  194|      0|           (ntail > blen)) {
  ------------------
  |  Branch (194:12): [True: 0, False: 0]
  ------------------
  195|       |          /* save the tail match with the longest tail */
  196|      0|          bestsub = sts;
  197|      0|          blen = ntail;
  198|      0|        }
  199|      0|      }
  200|       |      /* avoid curl_strequal because the hostname is not null-terminated */
  201|      0|      if((hlen == ntail) && curl_strnequal(hostname, sts->host, hlen))
  ------------------
  |  Branch (201:10): [True: 0, False: 0]
  |  Branch (201:29): [True: 0, False: 0]
  ------------------
  202|      0|        return sts;
  203|      0|    }
  204|    784|  }
  205|    784|  return bestsub;
  206|    788|}
Curl_hsts_save:
  368|  26.2k|{
  369|  26.2k|  struct Curl_llist_node *e;
  370|  26.2k|  struct Curl_llist_node *n;
  371|  26.2k|  CURLcode result = CURLE_OK;
  372|  26.2k|  FILE *out;
  373|  26.2k|  char *tempstore = NULL;
  374|       |
  375|  26.2k|  if(!h)
  ------------------
  |  Branch (375:6): [True: 14.4k, False: 11.7k]
  ------------------
  376|       |    /* no cache activated */
  377|  14.4k|    return CURLE_OK;
  378|       |
  379|       |  /* if no new name is given, use the one we stored from the load */
  380|  11.7k|  if(!file && h->filename)
  ------------------
  |  Branch (380:6): [True: 2, False: 11.7k]
  |  Branch (380:15): [True: 0, False: 2]
  ------------------
  381|      0|    file = h->filename;
  382|       |
  383|  11.7k|  if((h->flags & CURLHSTS_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1082|  11.7k|#define CURLHSTS_READONLYFILE (1L << 1)
  ------------------
  |  Branch (383:6): [True: 0, False: 11.7k]
  |  Branch (383:44): [True: 2, False: 11.7k]
  |  Branch (383:53): [True: 0, False: 11.7k]
  ------------------
  384|       |    /* marked as read-only, no file or zero length filename */
  385|      2|    goto skipsave;
  386|       |
  387|  11.7k|  result = Curl_fopen(data, file, &out, &tempstore);
  388|  11.7k|  if(!result) {
  ------------------
  |  Branch (388:6): [True: 11.7k, False: 0]
  ------------------
  389|  11.7k|    fputs("# Your HSTS cache. https://curl.se/docs/hsts.html\n"
  390|  11.7k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  391|  11.7k|          out);
  392|  11.7k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (392:40): [True: 0, False: 11.7k]
  ------------------
  393|      0|      struct stsentry *sts = Curl_node_elem(e);
  394|      0|      n = Curl_node_next(e);
  395|      0|      result = hsts_out(sts, out);
  396|      0|      if(result)
  ------------------
  |  Branch (396:10): [True: 0, False: 0]
  ------------------
  397|      0|        break;
  398|      0|    }
  399|  11.7k|    curlx_fclose(out);
  ------------------
  |  |   79|  11.7k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  400|  11.7k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (400:8): [True: 11.7k, False: 0]
  |  Branch (400:19): [True: 0, False: 11.7k]
  |  Branch (400:32): [True: 0, False: 0]
  ------------------
  401|      0|      result = CURLE_WRITE_ERROR;
  402|       |
  403|  11.7k|    if(result && tempstore)
  ------------------
  |  Branch (403:8): [True: 0, False: 11.7k]
  |  Branch (403:18): [True: 0, False: 0]
  ------------------
  404|      0|      unlink(tempstore);
  405|  11.7k|  }
  406|  11.7k|  curlx_free(tempstore);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  407|  11.7k|skipsave:
  408|  11.7k|  if(data->set.hsts_write) {
  ------------------
  |  Branch (408:6): [True: 0, False: 11.7k]
  ------------------
  409|       |    /* if there is a write callback */
  410|      0|    struct curl_index i; /* count */
  411|      0|    i.total = Curl_llist_count(&h->list);
  412|      0|    i.index = 0;
  413|      0|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (413:40): [True: 0, False: 0]
  ------------------
  414|      0|      struct stsentry *sts = Curl_node_elem(e);
  415|      0|      bool stop;
  416|      0|      n = Curl_node_next(e);
  417|      0|      result = hsts_push(data, &i, sts, &stop);
  418|      0|      if(result || stop)
  ------------------
  |  Branch (418:10): [True: 0, False: 0]
  |  Branch (418:20): [True: 0, False: 0]
  ------------------
  419|      0|        break;
  420|      0|      i.index++;
  421|      0|    }
  422|      0|  }
  423|  11.7k|  return result;
  424|  11.7k|}
Curl_hsts_loadfile:
  603|  7.57k|{
  604|  7.57k|  DEBUGASSERT(h);
  ------------------
  |  | 1079|  7.57k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (604:3): [True: 0, False: 7.57k]
  |  Branch (604:3): [True: 7.57k, False: 0]
  ------------------
  605|  7.57k|  (void)data;
  606|  7.57k|  return hsts_load(h, file);
  607|  7.57k|}
Curl_hsts_loadcb:
  613|  8.36k|{
  614|  8.36k|  if(h)
  ------------------
  |  Branch (614:6): [True: 7.57k, False: 785]
  ------------------
  615|  7.57k|    return hsts_pull(data, h);
  616|    785|  return CURLE_OK;
  617|  8.36k|}
Curl_hsts_loadfiles:
  620|  8.36k|{
  621|  8.36k|  CURLcode result = CURLE_OK;
  622|  8.36k|  struct curl_slist *l = data->state.hstslist;
  623|  8.36k|  if(l) {
  ------------------
  |  Branch (623:6): [True: 7.57k, False: 785]
  ------------------
  624|  7.57k|    Curl_share_lock(data, CURL_LOCK_DATA_HSTS, CURL_LOCK_ACCESS_SINGLE);
  625|       |
  626|  15.1k|    while(l) {
  ------------------
  |  Branch (626:11): [True: 7.57k, False: 7.57k]
  ------------------
  627|  7.57k|      result = Curl_hsts_loadfile(data, data->hsts, l->data);
  628|  7.57k|      if(result)
  ------------------
  |  Branch (628:10): [True: 0, False: 7.57k]
  ------------------
  629|      0|        break;
  630|  7.57k|      l = l->next;
  631|  7.57k|    }
  632|  7.57k|    Curl_share_unlock(data, CURL_LOCK_DATA_HSTS);
  633|  7.57k|  }
  634|  8.36k|  return result;
  635|  8.36k|}
Curl_hsts_applies:
  638|    788|{
  639|       |  return !!hsts_check(h, dest->hostname, strlen(dest->hostname), TRUE);
  ------------------
  |  | 1053|    788|#define TRUE true
  ------------------
  640|    788|}
hsts.c:hsts_debugtime:
   51|    788|{
   52|    788|  const char *timestr = getenv("CURL_TIME");
   53|    788|  (void)unused;
   54|    788|  if(timestr) {
  ------------------
  |  Branch (54:6): [True: 0, False: 788]
  ------------------
   55|      0|    curl_off_t val;
   56|      0|    if(!curlx_str_number(&timestr, &val, TIME_T_MAX))
  ------------------
  |  |  616|      0|#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (56:8): [True: 0, False: 0]
  ------------------
   57|      0|      val += (curl_off_t)deltatime;
   58|      0|    return (time_t)val;
   59|      0|  }
   60|    788|  return time(NULL);
   61|    788|}
hsts.c:hsts_load:
  558|  7.57k|{
  559|  7.57k|  CURLcode result = CURLE_OK;
  560|  7.57k|  FILE *fp;
  561|       |
  562|       |  /* we need a private copy of the filename so that the hsts cache file
  563|       |     name survives an easy handle reset */
  564|  7.57k|  curlx_free(h->filename);
  ------------------
  |  | 1478|  7.57k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  565|  7.57k|  h->filename = curlx_strdup(file);
  ------------------
  |  | 1472|  7.57k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  566|  7.57k|  if(!h->filename)
  ------------------
  |  Branch (566:6): [True: 0, False: 7.57k]
  ------------------
  567|      0|    return CURLE_OUT_OF_MEMORY;
  568|       |
  569|  7.57k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   74|  7.57k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  570|  7.57k|  if(fp) {
  ------------------
  |  Branch (570:6): [True: 7.57k, False: 0]
  ------------------
  571|  7.57k|    curlx_struct_stat stat;
  ------------------
  |  |   63|  7.57k|#define curlx_struct_stat       struct stat
  ------------------
  572|  7.57k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  7.57k|#define curlx_fstat             fstat
  ------------------
  |  Branch (572:8): [True: 0, False: 7.57k]
  |  Branch (572:50): [True: 7.57k, False: 0]
  ------------------
  573|  7.57k|      struct dynbuf buf;
  574|  7.57k|      bool eof = FALSE;
  ------------------
  |  | 1056|  7.57k|#define FALSE false
  ------------------
  575|  7.57k|      curlx_dyn_init(&buf, MAX_HSTS_LINE);
  ------------------
  |  |   41|  7.57k|#define MAX_HSTS_LINE    4095
  ------------------
  576|  7.57k|      do {
  577|  7.57k|        result = Curl_get_line(&buf, fp, &eof);
  578|  7.57k|        if(!result) {
  ------------------
  |  Branch (578:12): [True: 7.57k, False: 0]
  ------------------
  579|  7.57k|          const char *lineptr = curlx_dyn_ptr(&buf);
  580|  7.57k|          curlx_str_passblanks(&lineptr);
  581|       |
  582|       |          /* Skip empty or commented lines, since we know the line will have
  583|       |             a trailing newline from Curl_get_line we can treat length 1 as
  584|       |             empty. */
  585|  7.57k|          if((*lineptr == '#') || strlen(lineptr) <= 1)
  ------------------
  |  Branch (585:14): [True: 0, False: 7.57k]
  |  Branch (585:35): [True: 7.57k, False: 0]
  ------------------
  586|  7.57k|            continue;
  587|       |
  588|      0|          hsts_add(h, lineptr);
  589|      0|        }
  590|  7.57k|      } while(!result && !eof);
  ------------------
  |  Branch (590:15): [True: 7.57k, False: 0]
  |  Branch (590:26): [True: 0, False: 7.57k]
  ------------------
  591|  7.57k|      curlx_dyn_free(&buf); /* free the line buffer */
  592|  7.57k|    }
  593|  7.57k|    curlx_fclose(fp);
  ------------------
  |  |   79|  7.57k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  594|  7.57k|  }
  595|  7.57k|  return result;
  596|  7.57k|}
hsts.c:hsts_pull:
  510|  7.57k|{
  511|       |  /* if the HSTS read callback is set, use it */
  512|  7.57k|  if(data->set.hsts_read) {
  ------------------
  |  Branch (512:6): [True: 0, False: 7.57k]
  ------------------
  513|      0|    CURLSTScode sc;
  514|      0|    DEBUGASSERT(h);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (514:5): [True: 0, False: 0]
  |  Branch (514:5): [True: 0, False: 0]
  ------------------
  515|      0|    do {
  516|      0|      char buffer[MAX_HSTS_HOSTLEN + 1];
  517|      0|      struct curl_hstsentry e;
  518|      0|      e.name = buffer;
  519|      0|      e.namelen = sizeof(buffer) - 1;
  520|      0|      e.includeSubDomains = FALSE; /* default */
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  521|      0|      e.expire[0] = 0;
  522|      0|      e.expire[MAX_HSTS_DATELEN] = 0;
  ------------------
  |  |   43|      0|#define MAX_HSTS_DATELEN 17
  ------------------
  523|      0|      e.name[0] = 0; /* to make it clean */
  524|      0|      e.name[MAX_HSTS_HOSTLEN] = 0;
  ------------------
  |  |   42|      0|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  525|      0|      sc = data->set.hsts_read(data, &e, data->set.hsts_read_userp);
  526|      0|      if(sc == CURLSTS_OK) {
  ------------------
  |  Branch (526:10): [True: 0, False: 0]
  ------------------
  527|      0|        CURLcode result;
  528|      0|        const char *date = e.expire;
  529|      0|        if(!e.name[0] || e.expire[MAX_HSTS_DATELEN] ||
  ------------------
  |  |   43|      0|#define MAX_HSTS_DATELEN 17
  ------------------
  |  Branch (529:12): [True: 0, False: 0]
  |  Branch (529:26): [True: 0, False: 0]
  ------------------
  530|      0|           e.name[MAX_HSTS_HOSTLEN])
  ------------------
  |  |   42|      0|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  |  Branch (530:12): [True: 0, False: 0]
  ------------------
  531|       |          /* bail out if no name was stored or if a null-terminator is gone */
  532|      0|          return CURLE_BAD_FUNCTION_ARGUMENT;
  533|      0|        if(!date[0])
  ------------------
  |  Branch (533:12): [True: 0, False: 0]
  ------------------
  534|      0|          date = UNLIMITED;
  ------------------
  |  |   44|      0|#define UNLIMITED        "unlimited"
  ------------------
  535|      0|        result = hsts_add_host_expire(h, e.name, strlen(e.name),
  536|      0|                                      date, strlen(date),
  537|       |                                      /* bitfield to bool conversion: */
  538|      0|                                      e.includeSubDomains ? TRUE : FALSE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
                                                    e.includeSubDomains ? TRUE : FALSE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  |  Branch (538:39): [True: 0, False: 0]
  ------------------
  539|      0|        if(result)
  ------------------
  |  Branch (539:12): [True: 0, False: 0]
  ------------------
  540|      0|          return result;
  541|      0|      }
  542|      0|      else if(sc == CURLSTS_FAIL)
  ------------------
  |  Branch (542:15): [True: 0, False: 0]
  ------------------
  543|      0|        return CURLE_ABORTED_BY_CALLBACK;
  544|      0|    } while(sc == CURLSTS_OK);
  ------------------
  |  Branch (544:13): [True: 0, False: 0]
  ------------------
  545|      0|  }
  546|  7.57k|  return CURLE_OK;
  547|  7.57k|}

Curl_http_neg_init:
   90|  8.36k|{
   91|  8.36k|  memset(neg, 0, sizeof(*neg));
   92|  8.36k|  neg->accept_09 = data->set.http09_allowed;
   93|  8.36k|  switch(data->set.httpwant) {
   94|      3|  case CURL_HTTP_VERSION_1_0:
  ------------------
  |  | 2339|      3|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  |  Branch (94:3): [True: 3, False: 8.36k]
  ------------------
   95|      3|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      3|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   96|      3|    neg->only_10 = TRUE;
  ------------------
  |  | 1053|      3|#define TRUE true
  ------------------
   97|      3|    break;
   98|      4|  case CURL_HTTP_VERSION_1_1:
  ------------------
  |  | 2340|      4|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  |  Branch (98:3): [True: 4, False: 8.36k]
  ------------------
   99|      4|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      4|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  100|      4|    break;
  101|      1|  case CURL_HTTP_VERSION_2_0:
  ------------------
  |  | 2341|      1|#define CURL_HTTP_VERSION_2_0   3L /* please use HTTP 2 in the request */
  ------------------
  |  Branch (101:3): [True: 1, False: 8.36k]
  ------------------
  102|      1|    neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|      1|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  103|      1|    neg->h2_upgrade = TRUE;
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
  104|      1|    break;
  105|    787|  case CURL_HTTP_VERSION_2TLS:
  ------------------
  |  | 2342|    787|#define CURL_HTTP_VERSION_2TLS  4L /* use version 2 for HTTPS, version 1.1 for
  ------------------
  |  Branch (105:3): [True: 787, False: 7.57k]
  ------------------
  106|    787|    neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|    787|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|    787|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  107|    787|    break;
  108|      3|  case CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:
  ------------------
  |  | 2344|      3|#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
  ------------------
  |  Branch (108:3): [True: 3, False: 8.36k]
  ------------------
  109|      3|    neg->wanted = neg->allowed = (CURL_HTTP_V2x);
  ------------------
  |  |   41|      3|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  110|      3|    data->state.http_neg.h2_prior_knowledge = TRUE;
  ------------------
  |  | 1053|      3|#define TRUE true
  ------------------
  111|      3|    break;
  112|      0|  case CURL_HTTP_VERSION_3:
  ------------------
  |  | 2346|      0|#define CURL_HTTP_VERSION_3     30L /* Use HTTP/3, fallback to HTTP/2 or
  ------------------
  |  Branch (112:3): [True: 0, False: 8.36k]
  ------------------
  113|      0|    neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  114|      0|    neg->allowed = neg->wanted;
  115|      0|    break;
  116|      0|  case CURL_HTTP_VERSION_3ONLY:
  ------------------
  |  | 2350|      0|#define CURL_HTTP_VERSION_3ONLY 31L /* Use HTTP/3 without fallback. For
  ------------------
  |  Branch (116:3): [True: 0, False: 8.36k]
  ------------------
  117|      0|    neg->wanted = neg->allowed = (CURL_HTTP_V3x);
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  118|      0|    break;
  119|  7.56k|  case CURL_HTTP_VERSION_NONE:
  ------------------
  |  | 2336|  7.56k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (119:3): [True: 7.56k, False: 798]
  ------------------
  120|  7.56k|  default:
  ------------------
  |  Branch (120:3): [True: 0, False: 8.36k]
  ------------------
  121|  7.56k|    neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|  7.56k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|  7.56k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  122|  7.56k|    neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   40|  7.56k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   41|  7.56k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   42|  7.56k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  123|  7.56k|    break;
  124|  8.36k|  }
  125|  8.36k|}
Curl_http_setup_conn:
  129|  6.50k|{
  130|       |  /* allocate the HTTP-specific struct for the Curl_easy, only to survive
  131|       |     during this request */
  132|  6.50k|  if(data->state.http_neg.wanted == CURL_HTTP_V3x) {
  ------------------
  |  |   42|  6.50k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (132:6): [True: 0, False: 6.50k]
  ------------------
  133|       |    /* only HTTP/3, needs to work */
  134|      0|    CURLcode result = Curl_conn_may_http3(data, conn, conn->transport_wanted);
  135|      0|    if(result)
  ------------------
  |  Branch (135:8): [True: 0, False: 0]
  ------------------
  136|      0|      return result;
  137|      0|  }
  138|  6.50k|  return CURLE_OK;
  139|  6.50k|}
Curl_checkProxyheaders:
  155|  6.06k|{
  156|  6.06k|  struct curl_slist *head;
  157|       |
  158|  6.06k|  for(head = (conn->http_proxy.peer && data->set.sep_headers) ?
  ------------------
  |  Branch (158:15): [True: 6.06k, False: 0]
  |  Branch (158:40): [True: 5.17k, False: 891]
  ------------------
  159|  5.17k|        data->set.proxyheaders : data->set.headers;
  160|   136k|      head; head = head->next) {
  ------------------
  |  Branch (160:7): [True: 130k, False: 6.06k]
  ------------------
  161|   130k|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (161:8): [True: 77, False: 130k]
  ------------------
  162|     77|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|     77|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 1, False: 76]
  |  |  |  Branch (26:45): [True: 1, False: 75]
  |  |  ------------------
  ------------------
  163|      2|      return head->data;
  164|   130k|  }
  165|       |
  166|  6.06k|  return NULL;
  167|  6.06k|}
Curl_http_auth_act:
  557|     57|{
  558|     57|  struct connectdata *conn = data->conn;
  559|     57|  bool pickhost = FALSE;
  ------------------
  |  | 1056|     57|#define FALSE false
  ------------------
  560|     57|  bool pickproxy = FALSE;
  ------------------
  |  | 1056|     57|#define FALSE false
  ------------------
  561|     57|  CURLcode result = CURLE_OK;
  562|     57|  unsigned long authmask = ~0UL;
  563|       |
  564|     57|  if(!Curl_creds_has_oauth_bearer(data->state.creds))
  ------------------
  |  |   79|     57|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (79:43): [True: 2, False: 55]
  |  |  |  Branch (79:50): [True: 1, False: 1]
  |  |  ------------------
  ------------------
  565|     56|    authmask &= (unsigned long)~CURLAUTH_BEARER;
  ------------------
  |  |  844|     56|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  566|       |
  567|     57|  if(100 <= data->req.httpcode && data->req.httpcode <= 199)
  ------------------
  |  Branch (567:6): [True: 10, False: 47]
  |  Branch (567:35): [True: 5, False: 5]
  ------------------
  568|       |    /* this is a transient response code, ignore */
  569|      5|    return CURLE_OK;
  570|       |
  571|     52|  if(data->state.authproblem)
  ------------------
  |  Branch (571:6): [True: 0, False: 52]
  ------------------
  572|      0|    return data->set.http_fail_on_error ? CURLE_HTTP_RETURNED_ERROR : CURLE_OK;
  ------------------
  |  Branch (572:12): [True: 0, False: 0]
  ------------------
  573|       |
  574|     52|  if(data->state.creds &&
  ------------------
  |  Branch (574:6): [True: 2, False: 50]
  ------------------
  575|      2|     ((data->req.httpcode == 401) ||
  ------------------
  |  Branch (575:7): [True: 0, False: 2]
  ------------------
  576|      2|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (576:8): [True: 0, False: 2]
  |  Branch (576:29): [True: 0, False: 0]
  ------------------
  577|      0|    pickhost = pickoneauth(&data->state.authhost, authmask, data->state.creds);
  578|      0|    if(!pickhost)
  ------------------
  |  Branch (578:8): [True: 0, False: 0]
  ------------------
  579|      0|      data->state.authproblem = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  580|      0|    else
  581|      0|      data->info.httpauthpicked = data->state.authhost.picked;
  582|      0|    if(data->state.authhost.picked == CURLAUTH_NTLM &&
  ------------------
  |  |  838|      0|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (582:8): [True: 0, False: 0]
  ------------------
  583|      0|       (data->req.httpversion_sent > 11)) {
  ------------------
  |  Branch (583:8): [True: 0, False: 0]
  ------------------
  584|      0|      infof(data, "Forcing HTTP/1.1 for NTLM");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  585|      0|      connclose(conn);
  ------------------
  |  |   88|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   82|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  586|      0|      data->state.http_neg.wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  587|      0|      data->state.http_neg.allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  588|      0|    }
  589|      0|  }
  590|     52|#ifndef CURL_DISABLE_PROXY
  591|     52|  if(conn->http_proxy.creds &&
  ------------------
  |  Branch (591:6): [True: 19, False: 33]
  ------------------
  592|     19|     ((data->req.httpcode == 407) ||
  ------------------
  |  Branch (592:7): [True: 2, False: 17]
  ------------------
  593|     17|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (593:8): [True: 0, False: 17]
  |  Branch (593:29): [True: 0, False: 0]
  ------------------
  594|      2|    pickproxy = pickoneauth(&data->state.authproxy,
  595|      2|                            authmask & ~CURLAUTH_BEARER,
  ------------------
  |  |  844|      2|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  596|      2|                            conn->http_proxy.creds);
  597|      2|    if(!pickproxy)
  ------------------
  |  Branch (597:8): [True: 2, False: 0]
  ------------------
  598|      2|      data->state.authproblem = TRUE;
  ------------------
  |  | 1053|      2|#define TRUE true
  ------------------
  599|      0|    else
  600|      0|      data->info.proxyauthpicked = data->state.authproxy.picked;
  601|      2|  }
  602|     52|#endif
  603|       |
  604|     52|  if(pickhost || pickproxy) {
  ------------------
  |  Branch (604:6): [True: 0, False: 52]
  |  Branch (604:18): [True: 0, False: 52]
  ------------------
  605|      0|    result = http_perhapsrewind(data, conn);
  606|      0|    if(result)
  ------------------
  |  Branch (606:8): [True: 0, False: 0]
  ------------------
  607|      0|      return result;
  608|       |
  609|       |    /* In case this is GSS auth, the newurl field is already allocated so
  610|       |       we must make sure to free it before allocating a new one. As figured
  611|       |       out in bug #2284386 */
  612|      0|    curlx_free(data->req.newurl);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  613|       |    /* clone URL */
  614|      0|    data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  615|      0|    if(!data->req.newurl)
  ------------------
  |  Branch (615:8): [True: 0, False: 0]
  ------------------
  616|      0|      return CURLE_OUT_OF_MEMORY;
  617|      0|  }
  618|     52|  else if((data->req.httpcode < 300) &&
  ------------------
  |  Branch (618:11): [True: 47, False: 5]
  ------------------
  619|     47|          !data->state.authhost.done &&
  ------------------
  |  Branch (619:11): [True: 1, False: 46]
  ------------------
  620|      1|          data->req.authneg) {
  ------------------
  |  Branch (620:11): [True: 0, False: 1]
  ------------------
  621|       |    /* no (known) authentication available,
  622|       |       authentication is not "done" yet and
  623|       |       no authentication seems to be required and
  624|       |       we did not try HEAD or GET */
  625|      0|    if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (625:8): [True: 0, False: 0]
  ------------------
  626|      0|       (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (626:8): [True: 0, False: 0]
  ------------------
  627|       |      /* clone URL */
  628|      0|      data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  629|      0|      if(!data->req.newurl)
  ------------------
  |  Branch (629:10): [True: 0, False: 0]
  ------------------
  630|      0|        return CURLE_OUT_OF_MEMORY;
  631|      0|      data->state.authhost.done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  632|      0|    }
  633|      0|  }
  634|     52|  if(http_should_fail(data, data->req.httpcode)) {
  ------------------
  |  Branch (634:6): [True: 0, False: 52]
  ------------------
  635|      0|    failf(data, "The requested URL returned error: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  636|      0|          data->req.httpcode);
  637|      0|    result = CURLE_HTTP_RETURNED_ERROR;
  638|      0|  }
  639|       |
  640|     52|  return result;
  641|     52|}
Curl_http_output_auth:
  798|  1.60k|{
  799|  1.60k|  CURLcode result = CURLE_OK;
  800|  1.60k|  struct auth *authhost;
  801|  1.60k|  struct auth *authproxy;
  802|  1.60k|  const char *path_and_query = path;
  803|  1.60k|  char *tmp_str = NULL;
  804|       |
  805|  1.60k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  1.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (805:3): [True: 0, False: 1.60k]
  |  Branch (805:3): [True: 1.60k, False: 0]
  ------------------
  806|  1.60k|  authhost = &data->state.authhost;
  807|  1.60k|  authproxy = &data->state.authproxy;
  808|       |
  809|  1.60k|  if(
  810|  1.60k|#ifndef CURL_DISABLE_PROXY
  811|  1.60k|    (!conn->http_proxy.peer || !conn->http_proxy.creds) &&
  ------------------
  |  Branch (811:6): [True: 0, False: 1.60k]
  |  Branch (811:32): [True: 180, False: 1.42k]
  ------------------
  812|    180|#endif
  813|       |#ifdef USE_SPNEGO
  814|       |    !(authhost->want & CURLAUTH_NEGOTIATE) &&
  815|       |    !(authproxy->want & CURLAUTH_NEGOTIATE) &&
  816|       |#endif
  817|       |#ifndef CURL_DISABLE_HTTPSIG
  818|       |    !(authhost->want & CURLAUTH_HTTPSIG) &&
  819|       |#endif
  820|    180|    !data->state.creds) {
  ------------------
  |  Branch (820:5): [True: 156, False: 24]
  ------------------
  821|       |    /* no authentication with no user or password */
  822|    156|    authhost->done = TRUE;
  ------------------
  |  | 1053|    156|#define TRUE true
  ------------------
  823|    156|    authproxy->done = TRUE;
  ------------------
  |  | 1053|    156|#define TRUE true
  ------------------
  824|    156|    result = CURLE_OK;
  825|    156|    goto out;
  826|    156|  }
  827|       |
  828|  1.44k|  if(query) {
  ------------------
  |  Branch (828:6): [True: 0, False: 1.44k]
  ------------------
  829|      0|    tmp_str = curl_maprintf("%s?%s", path, query);
  830|      0|    if(!tmp_str) {
  ------------------
  |  Branch (830:8): [True: 0, False: 0]
  ------------------
  831|      0|      result = CURLE_OUT_OF_MEMORY;
  832|      0|      goto out;
  833|      0|    }
  834|      0|    path_and_query = tmp_str;
  835|      0|  }
  836|       |
  837|  1.44k|  if(authhost->want && !authhost->picked)
  ------------------
  |  Branch (837:6): [True: 1.44k, False: 1]
  |  Branch (837:24): [True: 1.44k, False: 0]
  ------------------
  838|       |    /* The app has selected one or more methods, but none has been picked
  839|       |       so far by a server round-trip. Then we set the picked one to the
  840|       |       want one, and if this is one single bit it will be used instantly. */
  841|  1.44k|    authhost->picked = authhost->want;
  842|       |
  843|  1.44k|  if(authproxy->want && !authproxy->picked)
  ------------------
  |  Branch (843:6): [True: 1.44k, False: 1]
  |  Branch (843:25): [True: 1.44k, False: 0]
  ------------------
  844|       |    /* The app has selected one or more methods, but none has been picked so
  845|       |       far by a proxy round-trip. Then we set the picked one to the want one,
  846|       |       and if this is one single bit it will be used instantly. */
  847|  1.44k|    authproxy->picked = authproxy->want;
  848|       |
  849|  1.44k|#ifndef CURL_DISABLE_PROXY
  850|       |  /* Send proxy authentication header if needed */
  851|  1.44k|  if(conn->bits.origin_is_proxy || is_connect) {
  ------------------
  |  Branch (851:6): [True: 0, False: 1.44k]
  |  Branch (851:36): [True: 1.44k, False: 0]
  ------------------
  852|  1.44k|    result = output_auth_headers(data, conn, authproxy, request,
  853|  1.44k|                                 path_and_query, TRUE);
  ------------------
  |  | 1053|  1.44k|#define TRUE true
  ------------------
  854|  1.44k|    if(result)
  ------------------
  |  Branch (854:8): [True: 0, False: 1.44k]
  ------------------
  855|      0|      goto out;
  856|  1.44k|  }
  857|      0|  else
  858|       |#else
  859|       |  (void)is_connect;
  860|       |#endif /* CURL_DISABLE_PROXY */
  861|       |    /* we have no proxy so let's pretend we are done authenticating
  862|       |       with it */
  863|      0|    authproxy->done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  864|       |
  865|       |  /* Either we have credentials for the origin we talk to or
  866|       |     performing authentication is allowed here */
  867|  1.44k|  if(data->state.creds || Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (867:6): [True: 152, False: 1.29k]
  |  Branch (867:27): [True: 1.29k, False: 0]
  ------------------
  868|  1.44k|    result = output_auth_headers(data, conn, authhost, request,
  869|  1.44k|                                 path_and_query, FALSE);
  ------------------
  |  | 1056|  1.44k|#define FALSE false
  ------------------
  870|      0|  else
  871|      0|    authhost->done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  872|       |
  873|  1.44k|  if(((authhost->multipass && !authhost->done) ||
  ------------------
  |  Branch (873:8): [True: 1, False: 1.44k]
  |  Branch (873:31): [True: 1, False: 0]
  ------------------
  874|  1.44k|      (authproxy->multipass && !authproxy->done)) &&
  ------------------
  |  Branch (874:8): [True: 1, False: 1.44k]
  |  Branch (874:32): [True: 1, False: 0]
  ------------------
  875|      2|     (httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (875:6): [True: 0, False: 2]
  ------------------
  876|      0|     (httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (876:6): [True: 0, False: 0]
  ------------------
  877|       |    /* Auth is required and we are not authenticated yet. Make a PUT or POST
  878|       |       with content-length zero as a "probe". */
  879|      0|    data->req.authneg = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  880|      0|  }
  881|  1.44k|  else
  882|  1.44k|    data->req.authneg = FALSE;
  ------------------
  |  | 1056|  1.44k|#define FALSE false
  ------------------
  883|       |
  884|  1.60k|out:
  885|  1.60k|  curlx_free(tmp_str);
  ------------------
  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  886|  1.60k|  return result;
  887|  1.44k|}
Curl_compareheader:
 1422|  2.41k|{
 1423|       |  /* RFC2616, section 4.2 says: "Each header field consists of a name followed
 1424|       |   * by a colon (":") and the field value. Field names are case-insensitive.
 1425|       |   * The field value MAY be preceded by any amount of LWS, though a single SP
 1426|       |   * is preferred." */
 1427|       |
 1428|  2.41k|  const char *p;
 1429|  2.41k|  struct Curl_str val;
 1430|  2.41k|  DEBUGASSERT(hlen);
  ------------------
  |  | 1079|  2.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1430:3): [True: 0, False: 2.41k]
  |  Branch (1430:3): [True: 2.41k, False: 0]
  ------------------
 1431|  2.41k|  DEBUGASSERT(clen);
  ------------------
  |  | 1079|  2.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1431:3): [True: 0, False: 2.41k]
  |  Branch (1431:3): [True: 2.41k, False: 0]
  ------------------
 1432|  2.41k|  DEBUGASSERT(header);
  ------------------
  |  | 1079|  2.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1432:3): [True: 0, False: 2.41k]
  |  Branch (1432:3): [True: 2.41k, False: 0]
  ------------------
 1433|  2.41k|  DEBUGASSERT(content);
  ------------------
  |  | 1079|  2.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1433:3): [True: 0, False: 2.41k]
  |  Branch (1433:3): [True: 2.41k, False: 0]
  ------------------
 1434|       |
 1435|  2.41k|  if(!curl_strnequal(headerline, header, hlen))
  ------------------
  |  Branch (1435:6): [True: 2.30k, False: 109]
  ------------------
 1436|  2.30k|    return FALSE; /* does not start with header */
  ------------------
  |  | 1056|  2.30k|#define FALSE false
  ------------------
 1437|       |
 1438|       |  /* pass the header */
 1439|    109|  p = &headerline[hlen];
 1440|       |
 1441|    109|  if(curlx_str_cspn(&p, &val, "\r\n"))
  ------------------
  |  Branch (1441:6): [True: 10, False: 99]
  ------------------
 1442|     10|    return FALSE;
  ------------------
  |  | 1056|     10|#define FALSE false
  ------------------
 1443|     99|  curlx_str_trimblanks(&val);
 1444|       |
 1445|       |  /* find the content string in the rest of the line */
 1446|     99|  if(curlx_strlen(&val) >= clen) {
  ------------------
  |  |   50|     99|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1446:6): [True: 78, False: 21]
  ------------------
 1447|     78|    size_t len;
 1448|     78|    p = curlx_str(&val);
  ------------------
  |  |   49|     78|#define curlx_str(x)    ((x)->str)
  ------------------
 1449|    225|    for(len = curlx_strlen(&val); len >= clen;) {
  ------------------
  |  |   50|     78|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1449:35): [True: 204, False: 21]
  ------------------
 1450|    204|      struct Curl_str next;
 1451|    204|      const char *o = p;
 1452|       |      /* after a match there must be a comma, space, newline or null byte */
 1453|    204|      if(curl_strnequal(p, content, clen) &&
  ------------------
  |  Branch (1453:10): [True: 0, False: 204]
  ------------------
 1454|      0|         ((p[clen] == ',') || ISBLANK(p[clen]) || ISNEWLINE(p[clen]) ||
  ------------------
  |  |   43|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                       ((p[clen] == ',') || ISBLANK(p[clen]) || ISNEWLINE(p[clen]) ||
  ------------------
  |  |   48|      0|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (48:26): [True: 0, False: 0]
  |  |  |  Branch (48:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1454:11): [True: 0, False: 0]
  ------------------
 1455|      0|          !p[clen]))
  ------------------
  |  Branch (1455:11): [True: 0, False: 0]
  ------------------
 1456|      0|        return TRUE; /* match! */
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1457|       |      /* advance to the next comma */
 1458|    204|      if(curlx_str_until(&p, &next, len, ',') ||
  ------------------
  |  Branch (1458:10): [True: 45, False: 159]
  ------------------
 1459|    159|         curlx_str_single(&p, ','))
  ------------------
  |  Branch (1459:10): [True: 0, False: 159]
  ------------------
 1460|     45|        break; /* no comma, get out */
 1461|       |
 1462|       |      /* if there are more dummy commas, move over them as well */
 1463|    159|      do
 1464|    382|        curlx_str_passblanks(&p);
 1465|    382|      while(!curlx_str_single(&p, ','));
  ------------------
  |  Branch (1465:13): [True: 223, False: 159]
  ------------------
 1466|       |      /* trailing blanks may move the parsing point past the value end,
 1467|       |         then there is nothing left to match */
 1468|    159|      if((size_t)(p - o) > len)
  ------------------
  |  Branch (1468:10): [True: 12, False: 147]
  ------------------
 1469|     12|        break;
 1470|    147|      len -= (p - o);
 1471|    147|    }
 1472|     78|  }
 1473|     99|  return FALSE; /* no match */
  ------------------
  |  | 1056|     99|#define FALSE false
  ------------------
 1474|     99|}
Curl_http_method:
 1973|  1.07k|{
 1974|  1.07k|  Curl_HttpReq httpreq = (Curl_HttpReq)data->state.httpreq;
 1975|  1.07k|  const char *request;
 1976|  1.07k|#ifndef CURL_DISABLE_WEBSOCKETS
 1977|  1.07k|  if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   63|  1.07k|#define CURLPROTO_WS     (1L << 30)
  ------------------
                if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   64|  1.07k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  ------------------
  |  Branch (1977:6): [True: 0, False: 1.07k]
  ------------------
 1978|      0|    httpreq = HTTPREQ_GET;
 1979|  1.07k|  else
 1980|  1.07k|#endif
 1981|  1.07k|  if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  |   84|  1.07k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1086|  1.07k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1087|  1.07k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  1.07k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  1.07k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  1.07k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
                if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  | 1088|  1.07k|#define CURLPROTO_FTP     (1L << 2)
  ------------------
  |  Branch (1981:6): [True: 1.07k, False: 0]
  ------------------
 1982|  1.07k|     data->state.upload)
  ------------------
  |  Branch (1982:6): [True: 2, False: 1.06k]
  ------------------
 1983|      2|    httpreq = HTTPREQ_PUT;
 1984|       |
 1985|       |  /* Now set the 'request' pointer to the proper request string */
 1986|  1.07k|  if(data->set.str[STRING_CUSTOMREQUEST] &&
  ------------------
  |  Branch (1986:6): [True: 1, False: 1.07k]
  ------------------
 1987|      1|     !data->state.http_ignorecustom) {
  ------------------
  |  Branch (1987:6): [True: 1, False: 0]
  ------------------
 1988|      1|    request = data->set.str[STRING_CUSTOMREQUEST];
 1989|      1|  }
 1990|  1.07k|  else {
 1991|  1.07k|    if(data->req.no_body)
  ------------------
  |  Branch (1991:8): [True: 1, False: 1.06k]
  ------------------
 1992|      1|      request = "HEAD";
 1993|  1.06k|    else {
 1994|  1.06k|      DEBUGASSERT((httpreq >= HTTPREQ_GET) && (httpreq <= HTTPREQ_HEAD));
  ------------------
  |  | 1079|  1.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1994:7): [True: 0, False: 1.06k]
  |  Branch (1994:7): [True: 0, False: 0]
  |  Branch (1994:7): [True: 1.06k, False: 0]
  |  Branch (1994:7): [True: 1.06k, False: 0]
  ------------------
 1995|  1.06k|      switch(httpreq) {
 1996|      3|      case HTTPREQ_POST:
  ------------------
  |  Branch (1996:7): [True: 3, False: 1.06k]
  ------------------
 1997|      7|      case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (1997:7): [True: 4, False: 1.06k]
  ------------------
 1998|     41|      case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (1998:7): [True: 34, False: 1.03k]
  ------------------
 1999|     41|        request = "POST";
 2000|     41|        break;
 2001|      2|      case HTTPREQ_PUT:
  ------------------
  |  Branch (2001:7): [True: 2, False: 1.06k]
  ------------------
 2002|      2|        request = "PUT";
 2003|      2|        break;
 2004|      0|      default: /* this should never happen */
  ------------------
  |  Branch (2004:7): [True: 0, False: 1.06k]
  ------------------
 2005|  1.02k|      case HTTPREQ_GET:
  ------------------
  |  Branch (2005:7): [True: 1.02k, False: 43]
  ------------------
 2006|  1.02k|        request = "GET";
 2007|  1.02k|        break;
 2008|      0|      case HTTPREQ_HEAD:
  ------------------
  |  Branch (2008:7): [True: 0, False: 1.06k]
  ------------------
 2009|      0|        request = "HEAD";
 2010|      0|        break;
 2011|  1.06k|      }
 2012|  1.06k|    }
 2013|  1.07k|  }
 2014|  1.07k|  *method = request;
 2015|  1.07k|  *reqp = httpreq;
 2016|  1.07k|}
Curl_verify_header:
 3865|  1.32k|{
 3866|  1.32k|  struct SingleRequest *k = &data->req;
 3867|  1.32k|  const char *ptr = memchr(hd, 0x00, hdlen);
 3868|  1.32k|  if(ptr) {
  ------------------
  |  Branch (3868:6): [True: 21, False: 1.30k]
  ------------------
 3869|       |    /* this is bad, bail out */
 3870|     21|    failf(data, "Nul byte in header");
  ------------------
  |  |   62|     21|#define failf Curl_failf
  ------------------
 3871|     21|    return CURLE_WEIRD_SERVER_REPLY;
 3872|     21|  }
 3873|  1.30k|  if(hdlen > 2) {
  ------------------
  |  Branch (3873:6): [True: 889, False: 415]
  ------------------
 3874|    889|    ptr = memchr(hd, '\r', hdlen - 2);
 3875|    889|    if(ptr) {
  ------------------
  |  Branch (3875:8): [True: 2, False: 887]
  ------------------
 3876|       |      /* CR may only precede the LF, nothing else */
 3877|      2|      failf(data, "Carriage return found in header");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
 3878|      2|      return CURLE_WEIRD_SERVER_REPLY;
 3879|      2|    }
 3880|    889|  }
 3881|  1.30k|  if(k->headerline < 2)
  ------------------
  |  Branch (3881:6): [True: 1.30k, False: 0]
  ------------------
 3882|       |    /* the first "header" is the status-line and it has no colon */
 3883|  1.30k|    return CURLE_OK;
 3884|      0|  if(((hd[0] == ' ') || (hd[0] == '\t')) && k->headerline > 2)
  ------------------
  |  Branch (3884:7): [True: 0, False: 0]
  |  Branch (3884:25): [True: 0, False: 0]
  |  Branch (3884:45): [True: 0, False: 0]
  ------------------
 3885|       |    /* line folding, cannot happen on line 2 */
 3886|      0|    ;
 3887|      0|  else {
 3888|      0|    ptr = memchr(hd, ':', hdlen);
 3889|      0|    if(!ptr) {
  ------------------
  |  Branch (3889:8): [True: 0, False: 0]
  ------------------
 3890|       |      /* this is bad, bail out */
 3891|      0|      failf(data, "Header without colon");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3892|      0|      return CURLE_WEIRD_SERVER_REPLY;
 3893|      0|    }
 3894|      0|  }
 3895|      0|  return CURLE_OK;
 3896|      0|}
Curl_bump_headersize:
 3901|  1.27k|{
 3902|  1.27k|  size_t bad = 0;
 3903|  1.27k|  unsigned int max = MAX_HTTP_RESP_HEADER_SIZE;
  ------------------
  |  |  157|  1.27k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
 3904|  1.27k|  if(delta < MAX_HTTP_RESP_HEADER_SIZE) {
  ------------------
  |  |  157|  1.27k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (3904:6): [True: 1.27k, False: 0]
  ------------------
 3905|  1.27k|    data->info.header_size += (unsigned int)delta;
 3906|  1.27k|    data->req.allheadercount += (unsigned int)delta;
 3907|  1.27k|    if(!connect_only)
  ------------------
  |  Branch (3907:8): [True: 0, False: 1.27k]
  ------------------
 3908|      0|      data->req.headerbytecount += (unsigned int)delta;
 3909|  1.27k|    if(data->req.allheadercount > max)
  ------------------
  |  Branch (3909:8): [True: 0, False: 1.27k]
  ------------------
 3910|      0|      bad = data->req.allheadercount;
 3911|  1.27k|    else if(data->info.header_size > (max * 20)) {
  ------------------
  |  Branch (3911:13): [True: 0, False: 1.27k]
  ------------------
 3912|      0|      bad = data->info.header_size;
 3913|      0|      max *= 20;
 3914|      0|    }
 3915|  1.27k|  }
 3916|      0|  else
 3917|      0|    bad = data->req.allheadercount + delta;
 3918|  1.27k|  if(bad) {
  ------------------
  |  Branch (3918:6): [True: 0, False: 1.27k]
  ------------------
 3919|      0|    failf(data, "Too large response headers: %zu > %u", bad, max);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3920|      0|    return CURLE_RECV_ERROR;
 3921|      0|  }
 3922|  1.27k|  return CURLE_OK;
 3923|  1.27k|}
Curl_http_to_fold:
 4441|    911|{
 4442|    911|  size_t len = curlx_dyn_len(bf);
 4443|    911|  const char *hd = curlx_dyn_ptr(bf);
 4444|    911|  if(len && (hd[len - 1] == '\n'))
  ------------------
  |  Branch (4444:6): [True: 911, False: 0]
  |  Branch (4444:13): [True: 911, False: 0]
  ------------------
 4445|    911|    len--;
 4446|    911|  if(len && (hd[len - 1] == '\r'))
  ------------------
  |  Branch (4446:6): [True: 911, False: 0]
  |  Branch (4446:13): [True: 621, False: 290]
  ------------------
 4447|    621|    len--;
 4448|  2.19k|  while(len && ISBLANK(hd[len - 1])) /* strip off trailing whitespace */
  ------------------
  |  |   43|  2.17k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 258, False: 1.91k]
  |  |  |  Branch (43:38): [True: 1.02k, False: 886]
  |  |  ------------------
  ------------------
  |  Branch (4448:9): [True: 2.17k, False: 25]
  ------------------
 4449|  1.28k|    len--;
 4450|    911|  curlx_dyn_setlen(bf, len);
 4451|    911|}
Curl_http_req_make:
 4738|  1.60k|{
 4739|  1.60k|  struct httpreq *req;
 4740|  1.60k|  CURLcode result = CURLE_OUT_OF_MEMORY;
 4741|       |
 4742|  1.60k|  DEBUGASSERT(method && m_len);
  ------------------
  |  | 1079|  1.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4742:3): [True: 0, False: 1.60k]
  |  Branch (4742:3): [True: 0, False: 0]
  |  Branch (4742:3): [True: 1.60k, False: 0]
  |  Branch (4742:3): [True: 1.60k, False: 0]
  ------------------
 4743|       |
 4744|  1.60k|  req = curlx_calloc(1, sizeof(*req) + m_len);
  ------------------
  |  | 1475|  1.60k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 4745|  1.60k|  if(!req)
  ------------------
  |  Branch (4745:6): [True: 0, False: 1.60k]
  ------------------
 4746|      0|    goto out;
 4747|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4748|       |#pragma GCC diagnostic push
 4749|       |/* error: 'memcpy' offset [137, 142] from the object at 'req' is out of
 4750|       |   the bounds of referenced subobject 'method' with type 'char[1]' at
 4751|       |   offset 136 */
 4752|       |#pragma GCC diagnostic ignored "-Warray-bounds"
 4753|       |#endif
 4754|  1.60k|  memcpy(req->method, method, m_len);
 4755|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4756|       |#pragma GCC diagnostic pop
 4757|       |#endif
 4758|  1.60k|  if(scheme) {
  ------------------
  |  Branch (4758:6): [True: 0, False: 1.60k]
  ------------------
 4759|      0|    req->scheme = curlx_memdup0(scheme, s_len);
 4760|      0|    if(!req->scheme)
  ------------------
  |  Branch (4760:8): [True: 0, False: 0]
  ------------------
 4761|      0|      goto out;
 4762|      0|  }
 4763|  1.60k|  if(authority) {
  ------------------
  |  Branch (4763:6): [True: 1.60k, False: 0]
  ------------------
 4764|  1.60k|    req->authority = curlx_memdup0(authority, a_len);
 4765|  1.60k|    if(!req->authority)
  ------------------
  |  Branch (4765:8): [True: 0, False: 1.60k]
  ------------------
 4766|      0|      goto out;
 4767|  1.60k|  }
 4768|  1.60k|  if(path) {
  ------------------
  |  Branch (4768:6): [True: 0, False: 1.60k]
  ------------------
 4769|      0|    req->path = curlx_memdup0(path, p_len);
 4770|      0|    if(!req->path)
  ------------------
  |  Branch (4770:8): [True: 0, False: 0]
  ------------------
 4771|      0|      goto out;
 4772|      0|  }
 4773|  1.60k|  Curl_dynhds_init(&req->headers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  1.60k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4774|  1.60k|  Curl_dynhds_init(&req->trailers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  1.60k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4775|  1.60k|  result = CURLE_OK;
 4776|       |
 4777|  1.60k|out:
 4778|  1.60k|  if(result && req)
  ------------------
  |  Branch (4778:6): [True: 0, False: 1.60k]
  |  Branch (4778:16): [True: 0, False: 0]
  ------------------
 4779|      0|    Curl_http_req_free(req);
 4780|  1.60k|  *preq = result ? NULL : req;
  ------------------
  |  Branch (4780:11): [True: 0, False: 1.60k]
  ------------------
 4781|  1.60k|  return result;
 4782|  1.60k|}
Curl_http_req_free:
 4906|  1.60k|{
 4907|  1.60k|  if(req) {
  ------------------
  |  Branch (4907:6): [True: 1.60k, False: 0]
  ------------------
 4908|  1.60k|    curlx_free(req->scheme);
  ------------------
  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4909|  1.60k|    curlx_free(req->authority);
  ------------------
  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4910|  1.60k|    curlx_free(req->path);
  ------------------
  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4911|  1.60k|    Curl_dynhds_free(&req->headers);
 4912|  1.60k|    Curl_dynhds_free(&req->trailers);
 4913|  1.60k|    curlx_free(req);
  ------------------
  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4914|  1.60k|  }
 4915|  1.60k|}
http.c:pickoneauth:
  352|      2|{
  353|      2|  bool have_user_pass = Curl_creds_has_user_or_pass(creds);
  ------------------
  |  |   78|      2|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (78:6): [True: 2, False: 0]
  |  |  |  Branch (78:14): [True: 1, False: 1]
  |  |  |  Branch (78:30): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  354|      2|  bool picked;
  355|       |  /* only deal with authentication we want */
  356|      2|  unsigned long avail = pick->avail & pick->want & mask;
  357|      2|  picked = TRUE;
  ------------------
  |  | 1053|      2|#define TRUE true
  ------------------
  358|       |
  359|       |  /* The order of these checks is highly relevant, as this will be the order
  360|       |     of preference in case of the existence of multiple accepted types. */
  361|      2|  if(avail & CURLAUTH_NEGOTIATE)  /* available on empty creds */
  ------------------
  |  |  833|      2|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  |  Branch (361:6): [True: 0, False: 2]
  ------------------
  362|      0|    pick->picked = CURLAUTH_NEGOTIATE;
  ------------------
  |  |  833|      0|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  363|      2|#ifndef CURL_DISABLE_BEARER_AUTH
  364|      2|  else if((avail & CURLAUTH_BEARER) && Curl_creds_has_oauth_bearer(creds))
  ------------------
  |  |  844|      2|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
                else if((avail & CURLAUTH_BEARER) && Curl_creds_has_oauth_bearer(creds))
  ------------------
  |  |   79|      0|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (79:43): [True: 0, False: 0]
  |  |  |  Branch (79:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (364:11): [True: 0, False: 2]
  ------------------
  365|      0|    pick->picked = CURLAUTH_BEARER;
  ------------------
  |  |  844|      0|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  366|      2|#endif
  367|      2|#ifndef CURL_DISABLE_DIGEST_AUTH
  368|      2|  else if((avail & CURLAUTH_DIGEST) && have_user_pass)
  ------------------
  |  |  832|      2|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (368:11): [True: 0, False: 2]
  |  Branch (368:40): [True: 0, False: 0]
  ------------------
  369|      0|    pick->picked = CURLAUTH_DIGEST;
  ------------------
  |  |  832|      0|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  370|      2|#endif
  371|      2|  else if(avail & CURLAUTH_NTLM)
  ------------------
  |  |  838|      2|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (371:11): [True: 0, False: 2]
  ------------------
  372|      0|    pick->picked = CURLAUTH_NTLM;
  ------------------
  |  |  838|      0|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  373|      2|#ifndef CURL_DISABLE_BASIC_AUTH
  374|      2|  else if((avail & CURLAUTH_BASIC) && have_user_pass)
  ------------------
  |  |  831|      2|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (374:11): [True: 0, False: 2]
  |  Branch (374:39): [True: 0, False: 0]
  ------------------
  375|      0|    pick->picked = CURLAUTH_BASIC;
  ------------------
  |  |  831|      0|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  376|      2|#endif
  377|      2|#ifndef CURL_DISABLE_AWS
  378|      2|  else if(avail & CURLAUTH_AWS_SIGV4)
  ------------------
  |  |  845|      2|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (378:11): [True: 0, False: 2]
  ------------------
  379|      0|    pick->picked = CURLAUTH_AWS_SIGV4;
  ------------------
  |  |  845|      0|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  380|      2|#endif
  381|       |#ifndef CURL_DISABLE_HTTPSIG
  382|       |  else if(avail & CURLAUTH_HTTPSIG)
  383|       |    pick->picked = CURLAUTH_HTTPSIG;
  384|       |#endif
  385|      2|  else {
  386|      2|    pick->picked = CURLAUTH_PICKNONE; /* we select to use nothing */
  ------------------
  |  |  128|      2|#define CURLAUTH_PICKNONE (1 << 30) /* do not use auth */
  ------------------
  387|      2|    picked = FALSE;
  ------------------
  |  | 1056|      2|#define FALSE false
  ------------------
  388|      2|  }
  389|      2|  pick->avail = CURLAUTH_NONE; /* clear it here */
  ------------------
  |  |  830|      2|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
  390|       |
  391|      2|  return picked;
  392|      2|}
http.c:http_should_fail:
  488|     52|{
  489|     52|  DEBUGASSERT(data);
  ------------------
  |  | 1079|     52|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (489:3): [True: 0, False: 52]
  |  Branch (489:3): [True: 52, False: 0]
  ------------------
  490|     52|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1079|     52|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (490:3): [True: 0, False: 52]
  |  Branch (490:3): [True: 52, False: 0]
  ------------------
  491|       |
  492|       |  /*
  493|       |   * If we have not been asked to fail on error,
  494|       |   * do not fail.
  495|       |   */
  496|     52|  if(!data->set.http_fail_on_error)
  ------------------
  |  Branch (496:6): [True: 51, False: 1]
  ------------------
  497|     51|    return FALSE;
  ------------------
  |  | 1056|     51|#define FALSE false
  ------------------
  498|       |
  499|       |  /*
  500|       |   * Any code < 400 is never terminal.
  501|       |   */
  502|      1|  if(httpcode < 400)
  ------------------
  |  Branch (502:6): [True: 1, False: 0]
  ------------------
  503|      1|    return FALSE;
  ------------------
  |  | 1056|      1|#define FALSE false
  ------------------
  504|       |
  505|       |  /*
  506|       |   * A 416 response to a resume request is presumably because the file is
  507|       |   * already completely downloaded and thus not actually a fail.
  508|       |   */
  509|      0|  if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
  ------------------
  |  Branch (509:6): [True: 0, False: 0]
  |  Branch (509:33): [True: 0, False: 0]
  ------------------
  510|      0|     httpcode == 416)
  ------------------
  |  Branch (510:6): [True: 0, False: 0]
  ------------------
  511|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  512|       |
  513|       |  /*
  514|       |   * Any code >= 400 that is not 401 or 407 is always
  515|       |   * a terminal error
  516|       |   */
  517|      0|  if((httpcode != 401) && (httpcode != 407))
  ------------------
  |  Branch (517:6): [True: 0, False: 0]
  |  Branch (517:27): [True: 0, False: 0]
  ------------------
  518|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  519|       |
  520|       |  /*
  521|       |   * All we have left to deal with is 401 and 407
  522|       |   */
  523|      0|  DEBUGASSERT((httpcode == 401) || (httpcode == 407));
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (523:3): [True: 0, False: 0]
  |  Branch (523:3): [True: 0, False: 0]
  |  Branch (523:3): [True: 0, False: 0]
  |  Branch (523:3): [True: 0, False: 0]
  ------------------
  524|       |
  525|       |  /*
  526|       |   * Examine the current authentication state to see if this is an error. The
  527|       |   * idea is for this function to get called after processing all the headers
  528|       |   * in a response message. If we have been to asked to authenticate
  529|       |   * a particular stage, and we have done it, we are OK. If we are already
  530|       |   * completely authenticated, it is not OK to get another 401 or 407.
  531|       |   *
  532|       |   * It is possible for authentication to go stale such that the client needs
  533|       |   * to reauthenticate. Once that info is available, use it here.
  534|       |   */
  535|       |
  536|       |  /*
  537|       |   * Either we are not authenticating, or we are supposed to be authenticating
  538|       |   * something else. This is an error.
  539|       |   */
  540|      0|  if((httpcode == 401) && !data->state.creds)
  ------------------
  |  Branch (540:6): [True: 0, False: 0]
  |  Branch (540:27): [True: 0, False: 0]
  ------------------
  541|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  542|      0|#ifndef CURL_DISABLE_PROXY
  543|      0|  if((httpcode == 407) && !data->conn->http_proxy.creds)
  ------------------
  |  Branch (543:6): [True: 0, False: 0]
  |  Branch (543:27): [True: 0, False: 0]
  ------------------
  544|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  545|      0|#endif
  546|       |
  547|      0|  return (bool)data->state.authproblem;
  548|      0|}
http.c:output_auth_headers:
  654|  2.88k|{
  655|  2.88k|  const char *auth = NULL;
  656|  2.88k|  CURLcode result = CURLE_OK;
  657|  2.88k|  (void)conn;
  658|       |
  659|       |#ifdef CURL_DISABLE_DIGEST_AUTH
  660|       |  (void)request;
  661|       |  (void)path;
  662|       |#endif
  663|  2.88k|#ifndef CURL_DISABLE_AWS
  664|  2.88k|  if((authstatus->picked == CURLAUTH_AWS_SIGV4) && !proxy) {
  ------------------
  |  |  845|  2.88k|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (664:6): [True: 1.08k, False: 1.80k]
  |  Branch (664:52): [True: 1.08k, False: 1]
  ------------------
  665|       |    /* this method is never for proxy */
  666|  1.08k|    auth = "AWS_SIGV4";
  667|  1.08k|    result = Curl_output_aws_sigv4(data);
  668|  1.08k|    if(result)
  ------------------
  |  Branch (668:8): [True: 13, False: 1.07k]
  ------------------
  669|     13|      return result;
  670|  1.08k|  }
  671|  1.80k|  else
  672|  1.80k|#endif
  673|       |#ifndef CURL_DISABLE_HTTPSIG
  674|       |  if((authstatus->picked == CURLAUTH_HTTPSIG) && !proxy) {
  675|       |    /* HTTPSIG uses its own configured key material rather than
  676|       |       data->state.creds. Do not let unrelated credentials from a
  677|       |       redirected URL bypass the cross-host auth boundary. */
  678|       |    if(Curl_auth_allowed_to_host(data)) {
  679|       |      auth = "HTTPSIG";
  680|       |      result = Curl_output_httpsig(data);
  681|       |      if(result)
  682|       |        return result;
  683|       |    }
  684|       |    else
  685|       |      authstatus->done = TRUE;
  686|       |  }
  687|       |  else
  688|       |#endif
  689|       |#ifdef USE_SPNEGO
  690|       |  if(authstatus->picked == CURLAUTH_NEGOTIATE) {
  691|       |    auth = "Negotiate";
  692|       |    result = Curl_output_negotiate(data, conn, proxy);
  693|       |    if(result)
  694|       |      return result;
  695|       |  }
  696|       |  else
  697|       |#endif
  698|       |#ifdef USE_NTLM
  699|       |  if(authstatus->picked == CURLAUTH_NTLM) {
  700|       |    auth = "NTLM";
  701|       |    result = Curl_output_ntlm(data, proxy);
  702|       |    if(result)
  703|       |      return result;
  704|       |  }
  705|       |  else
  706|       |#endif
  707|  1.80k|#ifndef CURL_DISABLE_DIGEST_AUTH
  708|  1.80k|  if(authstatus->picked == CURLAUTH_DIGEST) {
  ------------------
  |  |  832|  1.80k|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (708:6): [True: 2, False: 1.80k]
  ------------------
  709|      2|    auth = "Digest";
  710|      2|    result = Curl_output_digest(data,
  711|      2|                                proxy,
  712|      2|                                (const unsigned char *)request,
  713|      2|                                (const unsigned char *)path);
  714|      2|    if(result)
  ------------------
  |  Branch (714:8): [True: 0, False: 2]
  ------------------
  715|      0|      return result;
  716|      2|  }
  717|  1.80k|  else
  718|  1.80k|#endif
  719|  1.80k|#ifndef CURL_DISABLE_BASIC_AUTH
  720|  1.80k|  if(authstatus->picked == CURLAUTH_BASIC) {
  ------------------
  |  |  831|  1.80k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (720:6): [True: 1.72k, False: 83]
  ------------------
  721|       |    /* Basic */
  722|  1.72k|    if(
  723|  1.72k|#ifndef CURL_DISABLE_PROXY
  724|  1.72k|       (proxy && conn->http_proxy.creds &&
  ------------------
  |  Branch (724:9): [True: 1.39k, False: 322]
  |  Branch (724:18): [True: 1.37k, False: 24]
  ------------------
  725|  1.37k|        Curl_creds_has_user_or_pass(conn->http_proxy.creds) &&
  ------------------
  |  |   78|  3.09k|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (78:6): [True: 1.37k, False: 0]
  |  |  |  Branch (78:14): [True: 1.28k, False: 92]
  |  |  |  Branch (78:30): [True: 26, False: 66]
  |  |  ------------------
  ------------------
  726|  1.30k|        !Curl_checkProxyheaders(data, conn,
  ------------------
  |  Branch (726:9): [True: 1.30k, False: 0]
  ------------------
  727|  1.30k|                                STRCONST("Proxy-authorization"))) ||
  ------------------
  |  | 1301|  1.30k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.30k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  728|    412|#endif
  729|    412|       (!proxy && data->state.creds &&
  ------------------
  |  Branch (729:9): [True: 322, False: 90]
  |  Branch (729:19): [True: 25, False: 297]
  ------------------
  730|     25|        Curl_creds_has_user_or_pass(data->state.creds) &&
  ------------------
  |  |   78|    437|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (78:6): [True: 25, False: 0]
  |  |  |  Branch (78:14): [True: 16, False: 9]
  |  |  |  Branch (78:30): [True: 5, False: 4]
  |  |  ------------------
  ------------------
  731|  1.32k|        !Curl_checkheaders(data, STRCONST("Authorization")))) {
  ------------------
  |  | 1301|     21|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|     21|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (731:9): [True: 21, False: 0]
  ------------------
  732|  1.32k|      auth = "Basic";
  733|  1.32k|      result = http_output_basic(data, conn, proxy);
  734|  1.32k|      if(result)
  ------------------
  |  Branch (734:10): [True: 0, False: 1.32k]
  ------------------
  735|      0|        return result;
  736|  1.32k|    }
  737|       |
  738|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  739|       |       functions work that way */
  740|  1.72k|    authstatus->done = TRUE;
  ------------------
  |  | 1053|  1.72k|#define TRUE true
  ------------------
  741|  1.72k|  }
  742|  2.87k|#endif
  743|  2.87k|#ifndef CURL_DISABLE_BEARER_AUTH
  744|  2.87k|  if(authstatus->picked == CURLAUTH_BEARER) {
  ------------------
  |  |  844|  2.87k|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (744:6): [True: 3, False: 2.87k]
  ------------------
  745|       |    /* Bearer */
  746|      3|    if(!proxy && Curl_creds_has_oauth_bearer(data->state.creds) &&
  ------------------
  |  |   79|      5|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (79:43): [True: 1, False: 1]
  |  |  |  Branch (79:50): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (746:8): [True: 2, False: 1]
  ------------------
  747|      0|       !Curl_checkheaders(data, STRCONST("Authorization"))) {
  ------------------
  |  | 1301|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (747:8): [True: 0, False: 0]
  ------------------
  748|      0|      auth = "Bearer";
  749|      0|      result = http_output_bearer(data);
  750|      0|      if(result)
  ------------------
  |  Branch (750:10): [True: 0, False: 0]
  ------------------
  751|      0|        return result;
  752|      0|    }
  753|       |
  754|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  755|       |       functions work that way */
  756|      3|    authstatus->done = TRUE;
  ------------------
  |  | 1053|      3|#define TRUE true
  ------------------
  757|      3|  }
  758|  2.87k|#endif
  759|       |
  760|  2.87k|  if(auth) {
  ------------------
  |  Branch (760:6): [True: 2.40k, False: 474]
  ------------------
  761|  2.40k|#ifndef CURL_DISABLE_PROXY
  762|  2.40k|    if(proxy)
  ------------------
  |  Branch (762:8): [True: 1.30k, False: 1.09k]
  ------------------
  763|  1.30k|      data->info.proxyauthpicked = authstatus->picked;
  764|  1.09k|    else
  765|  1.09k|      data->info.httpauthpicked = authstatus->picked;
  766|  2.40k|    infof(data, "%s auth using %s with user '%s'",
  ------------------
  |  |  143|  2.40k|  do {                               \
  |  |  144|  2.40k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  2.40k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 2.40k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  323|  2.40k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.40k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  2.40k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  767|  2.40k|          proxy ? "Proxy" : "Server", auth,
  768|  2.40k|          proxy ? (conn->http_proxy.creds ?
  769|  2.40k|                   conn->http_proxy.creds->user : "") :
  770|  2.40k|          (data->state.creds ?
  771|  2.40k|           data->state.creds->user : ""));
  772|       |#else
  773|       |    (void)proxy;
  774|       |    infof(data, "Server auth using %s with user '%s'",
  775|       |          auth, data->state.creds ?
  776|       |          data->state.creds->user : "");
  777|       |#endif
  778|  2.40k|    authstatus->multipass = !authstatus->done;
  779|  2.40k|  }
  780|    474|  else {
  781|    474|    authstatus->multipass = FALSE;
  ------------------
  |  | 1056|    474|#define FALSE false
  ------------------
  782|    474|    if(proxy)
  ------------------
  |  Branch (782:8): [True: 135, False: 339]
  ------------------
  783|    135|      data->info.proxyauthpicked = 0;
  784|    339|    else
  785|    339|      data->info.httpauthpicked = 0;
  786|    474|  }
  787|       |
  788|  2.87k|  return result;
  789|  2.87k|}
http.c:http_output_basic:
  255|  1.32k|{
  256|  1.32k|  size_t size = 0;
  257|  1.32k|  char *authorization = NULL;
  258|  1.32k|  char **p_hd;
  259|  1.32k|  CURLcode result;
  260|  1.32k|  struct Curl_creds *creds = NULL;
  261|  1.32k|  char *out;
  262|       |
  263|       |  /* credentials are unique per transfer for HTTP, do not use the ones for the
  264|       |     connection */
  265|  1.32k|  if(proxy) {
  ------------------
  |  Branch (265:6): [True: 1.30k, False: 21]
  ------------------
  266|  1.30k|#ifndef CURL_DISABLE_PROXY
  267|  1.30k|    p_hd = &data->req.hd_proxy_auth;
  268|  1.30k|    creds = conn->http_proxy.creds;
  269|       |#else
  270|       |    (void)conn;
  271|       |    return CURLE_NOT_BUILT_IN;
  272|       |#endif
  273|  1.30k|  }
  274|     21|  else {
  275|     21|    p_hd = &data->req.hd_auth;
  276|     21|    creds = data->state.creds;
  277|     21|  }
  278|       |
  279|  1.32k|  if(!creds) {
  ------------------
  |  Branch (279:6): [True: 0, False: 1.32k]
  ------------------
  280|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (280:5): [Folded, False: 0]
  |  Branch (280:5): [Folded, False: 0]
  ------------------
  281|      0|    return CURLE_FAILED_INIT;
  282|      0|  }
  283|       |
  284|  1.32k|  out = curl_maprintf("%s:%s", creds->user, creds->passwd);
  285|  1.32k|  if(!out)
  ------------------
  |  Branch (285:6): [True: 0, False: 1.32k]
  ------------------
  286|      0|    return CURLE_OUT_OF_MEMORY;
  287|       |
  288|  1.32k|  result = curlx_base64_encode((uint8_t *)out, strlen(out),
  289|  1.32k|                               &authorization, &size);
  290|  1.32k|  if(result)
  ------------------
  |  Branch (290:6): [True: 0, False: 1.32k]
  ------------------
  291|      0|    goto fail;
  292|       |
  293|  1.32k|  if(!authorization) {
  ------------------
  |  Branch (293:6): [True: 0, False: 1.32k]
  ------------------
  294|      0|    result = CURLE_REMOTE_ACCESS_DENIED;
  295|      0|    goto fail;
  296|      0|  }
  297|       |
  298|  1.32k|  curlx_free(*p_hd);
  ------------------
  |  | 1478|  1.32k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  299|  1.32k|  *p_hd = curl_maprintf("%sAuthorization: Basic %s\r\n",
  300|  1.32k|                        proxy ? "Proxy-" : "",
  ------------------
  |  Branch (300:25): [True: 1.30k, False: 21]
  ------------------
  301|  1.32k|                        authorization);
  302|  1.32k|  curlx_free(authorization);
  ------------------
  |  | 1478|  1.32k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  303|  1.32k|  if(!*p_hd) {
  ------------------
  |  Branch (303:6): [True: 0, False: 1.32k]
  ------------------
  304|      0|    result = CURLE_OUT_OF_MEMORY;
  305|      0|    goto fail;
  306|      0|  }
  307|       |
  308|  1.32k|fail:
  309|  1.32k|  curlx_free(out);
  ------------------
  |  | 1478|  1.32k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  310|  1.32k|  return result;
  311|  1.32k|}

Curl_h1_req_write_head:
  324|  1.58k|{
  325|  1.58k|  CURLcode result;
  326|       |
  327|  1.58k|  result = curlx_dyn_addf(dbuf, "%s %s%s%s%s HTTP/1.%d\r\n",
  328|  1.58k|                          req->method,
  329|  1.58k|                          req->scheme ? req->scheme : "",
  ------------------
  |  Branch (329:27): [True: 0, False: 1.58k]
  ------------------
  330|  1.58k|                          req->scheme ? "://" : "",
  ------------------
  |  Branch (330:27): [True: 0, False: 1.58k]
  ------------------
  331|  1.58k|                          req->authority ? req->authority : "",
  ------------------
  |  Branch (331:27): [True: 1.58k, False: 0]
  ------------------
  332|  1.58k|                          req->path ? req->path : "",
  ------------------
  |  Branch (332:27): [True: 0, False: 1.58k]
  ------------------
  333|  1.58k|                          http_minor);
  334|  1.58k|  if(result)
  ------------------
  |  Branch (334:6): [True: 0, False: 1.58k]
  ------------------
  335|      0|    goto out;
  336|       |
  337|  1.58k|  result = Curl_dynhds_h1_dprint(&req->headers, dbuf);
  338|  1.58k|  if(result)
  ------------------
  |  Branch (338:6): [True: 0, False: 1.58k]
  ------------------
  339|      0|    goto out;
  340|       |
  341|  1.58k|  result = curlx_dyn_addn(dbuf, STRCONST("\r\n"));
  ------------------
  |  | 1301|  1.58k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.58k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  342|       |
  343|  1.58k|out:
  344|  1.58k|  return result;
  345|  1.58k|}

canon_path:
  684|  1.07k|{
  685|  1.07k|  CURLcode result = CURLE_OK;
  686|       |
  687|  1.07k|  struct Curl_str original_path;
  688|       |
  689|  1.07k|  curlx_str_assign(&original_path, q, len);
  690|       |
  691|       |  /* Normalized path will be either the same or shorter than the original
  692|       |   * path, plus trailing slash */
  693|       |
  694|  1.07k|  if(do_uri_encode)
  ------------------
  |  Branch (694:6): [True: 1.06k, False: 3]
  ------------------
  695|  1.06k|    result = uri_encode_path(&original_path, new_path);
  696|      3|  else
  697|      3|    result = curlx_dyn_addn(new_path, q, len);
  698|       |
  699|  1.07k|  if(!result) {
  ------------------
  |  Branch (699:6): [True: 1.07k, False: 0]
  ------------------
  700|  1.07k|    if(curlx_dyn_len(new_path) == 0)
  ------------------
  |  Branch (700:8): [True: 0, False: 1.07k]
  ------------------
  701|      0|      result = curlx_dyn_add(new_path, "/");
  702|  1.07k|  }
  703|       |
  704|  1.07k|  return result;
  705|  1.07k|}
canon_query:
  710|  1.07k|{
  711|  1.07k|  CURLcode result = CURLE_OK;
  712|       |
  713|  1.07k|  struct dynbuf query_array[MAX_QUERY_COMPONENTS];
  714|  1.07k|  struct pair encoded_query_array[MAX_QUERY_COMPONENTS];
  715|  1.07k|  size_t num_query_components;
  716|  1.07k|  size_t counted_query_components = 0;
  717|  1.07k|  size_t index;
  718|       |
  719|  1.07k|  if(!query)
  ------------------
  |  Branch (719:6): [True: 639, False: 431]
  ------------------
  720|    639|    return result;
  721|       |
  722|    431|  result = split_to_dyn_array(query, &query_array[0], &num_query_components);
  723|    431|  if(result) {
  ------------------
  |  Branch (723:6): [True: 0, False: 431]
  ------------------
  724|      0|    goto fail;
  725|      0|  }
  726|       |
  727|       |  /* Create list of pairs, each pair containing an encoded query
  728|       |   * component */
  729|       |
  730|  2.34k|  for(index = 0; index < num_query_components; index++) {
  ------------------
  |  Branch (730:18): [True: 1.91k, False: 431]
  ------------------
  731|  1.91k|    const char *in_key;
  732|  1.91k|    size_t in_key_len;
  733|  1.91k|    const char *offset;
  734|  1.91k|    size_t query_part_len = curlx_dyn_len(&query_array[index]);
  735|  1.91k|    const char *query_part = curlx_dyn_ptr(&query_array[index]);
  736|       |
  737|  1.91k|    in_key = query_part;
  738|       |
  739|  1.91k|    offset = strchr(query_part, '=');
  740|       |    /* If there is no equals, this key has no value */
  741|  1.91k|    if(!offset) {
  ------------------
  |  Branch (741:8): [True: 1.15k, False: 754]
  ------------------
  742|  1.15k|      in_key_len = strlen(in_key);
  743|  1.15k|    }
  744|    754|    else {
  745|    754|      in_key_len = offset - in_key;
  746|    754|    }
  747|       |
  748|  1.91k|    curlx_dyn_init(&encoded_query_array[index].key,
  749|  1.91k|      (query_part_len * 3) + 1);
  750|  1.91k|    curlx_dyn_init(&encoded_query_array[index].value,
  751|  1.91k|      (query_part_len * 3) + 1);
  752|  1.91k|    counted_query_components++;
  753|       |
  754|       |    /* Decode/encode the key */
  755|  1.91k|    result = normalize_query(in_key, in_key_len,
  756|  1.91k|                             &encoded_query_array[index].key);
  757|  1.91k|    if(result) {
  ------------------
  |  Branch (757:8): [True: 0, False: 1.91k]
  ------------------
  758|      0|      goto fail;
  759|      0|    }
  760|       |
  761|       |    /* Decode/encode the value if it exists */
  762|  1.91k|    if(offset && offset != (query_part + query_part_len - 1)) {
  ------------------
  |  Branch (762:8): [True: 754, False: 1.15k]
  |  Branch (762:18): [True: 532, False: 222]
  ------------------
  763|    532|      size_t in_value_len;
  764|    532|      const char *in_value = offset + 1;
  765|    532|      in_value_len = query_part + query_part_len - (offset + 1);
  766|    532|      result = normalize_query(in_value, in_value_len,
  767|    532|                               &encoded_query_array[index].value);
  768|    532|      if(result) {
  ------------------
  |  Branch (768:10): [True: 0, False: 532]
  ------------------
  769|      0|        goto fail;
  770|      0|      }
  771|    532|    }
  772|  1.37k|    else {
  773|       |      /* If there is no value, the value is an empty string */
  774|  1.37k|      curlx_dyn_init(&encoded_query_array[index].value, 2);
  775|  1.37k|      result = curlx_dyn_addn(&encoded_query_array[index].value, "", 1);
  776|  1.37k|    }
  777|       |
  778|  1.91k|    if(result) {
  ------------------
  |  Branch (778:8): [True: 0, False: 1.91k]
  ------------------
  779|      0|      goto fail;
  780|      0|    }
  781|  1.91k|  }
  782|       |
  783|       |  /* Sort the encoded query components by key and value */
  784|    431|  qsort(&encoded_query_array, num_query_components,
  785|    431|        sizeof(struct pair), compare_func);
  786|       |
  787|       |  /* Append the query components together to make a full query string */
  788|  2.34k|  for(index = 0; index < num_query_components; index++) {
  ------------------
  |  Branch (788:18): [True: 1.91k, False: 431]
  ------------------
  789|       |
  790|  1.91k|    if(index)
  ------------------
  |  Branch (790:8): [True: 1.48k, False: 429]
  ------------------
  791|  1.48k|      result = curlx_dyn_addn(dq, "&", 1);
  792|  1.91k|    if(!result) {
  ------------------
  |  Branch (792:8): [True: 1.91k, False: 0]
  ------------------
  793|  1.91k|      const char *key_ptr = curlx_dyn_ptr(&encoded_query_array[index].key);
  794|  1.91k|      const char *value_ptr = curlx_dyn_ptr(&encoded_query_array[index].value);
  795|  1.91k|      size_t vlen = curlx_dyn_len(&encoded_query_array[index].value);
  796|  1.91k|      if(value_ptr && vlen) {
  ------------------
  |  Branch (796:10): [True: 1.91k, False: 0]
  |  Branch (796:23): [True: 1.91k, False: 0]
  ------------------
  797|  1.91k|        result = curlx_dyn_addf(dq, "%s=%s", key_ptr, value_ptr);
  798|  1.91k|      }
  799|      0|      else {
  800|       |        /* Empty value is always encoded to key= */
  801|      0|        result = curlx_dyn_addf(dq, "%s=", key_ptr);
  802|      0|      }
  803|  1.91k|    }
  804|  1.91k|    if(result)
  ------------------
  |  Branch (804:8): [True: 0, False: 1.91k]
  ------------------
  805|      0|      break;
  806|  1.91k|  }
  807|       |
  808|    431|fail:
  809|    431|  if(counted_query_components)
  ------------------
  |  Branch (809:6): [True: 429, False: 2]
  ------------------
  810|       |    /* the encoded_query_array might not be initialized yet */
  811|    429|    pair_array_free(&encoded_query_array[0], counted_query_components);
  812|    431|  dyn_array_free(&query_array[0], num_query_components);
  813|    431|  return result;
  814|    431|}
Curl_output_aws_sigv4:
 1161|  1.08k|{
 1162|  1.08k|  CURLcode result = CURLE_OUT_OF_MEMORY;
 1163|  1.08k|  struct Curl_str provider0 = { NULL, 0 };
 1164|  1.08k|  struct Curl_str provider1 = { NULL, 0 };
 1165|  1.08k|  struct Curl_str region = { NULL, 0 };
 1166|  1.08k|  struct Curl_str service = { NULL, 0 };
 1167|  1.08k|  const char *hostname = data->state.origin->hostname;
 1168|  1.08k|  char timestamp[TIMESTAMP_SIZE];
 1169|  1.08k|  char date[9];
 1170|  1.08k|  struct dynbuf canonical_headers;
 1171|  1.08k|  struct dynbuf signed_headers;
 1172|  1.08k|  char *date_header = NULL;
 1173|  1.08k|  Curl_HttpReq httpreq;
 1174|  1.08k|  const char *method = NULL;
 1175|  1.08k|  const char *payload_hash = NULL;
 1176|  1.08k|  size_t payload_hash_len = 0;
 1177|  1.08k|  unsigned char sha_hash[CURL_SHA256_DIGEST_LENGTH];
 1178|  1.08k|  char sha_hex[SHA256_HEX_LENGTH];
 1179|  1.08k|  char content_sha256_hdr[CONTENT_SHA256_HDR_LEN + 2] = ""; /* add \r\n */
 1180|  1.08k|  char *canonical_request = NULL;
 1181|  1.08k|  char *request_type = NULL;
 1182|  1.08k|  char *credential_scope = NULL;
 1183|  1.08k|  char *str_to_sign = NULL;
 1184|       |
 1185|  1.08k|  if(data->set.path_as_is) {
  ------------------
  |  Branch (1185:6): [True: 1, False: 1.08k]
  ------------------
 1186|      1|    failf(data, "Cannot use sigv4 authentication with path-as-is flag");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1187|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1188|      1|  }
 1189|       |
 1190|  1.08k|  if(Curl_checkheaders(data, STRCONST("Authorization")))
  ------------------
  |  | 1301|  1.08k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.08k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (1190:6): [True: 0, False: 1.08k]
  ------------------
 1191|       |    /* Authorization already present, Bailing out */
 1192|      0|    return CURLE_OK;
 1193|       |
 1194|       |  /* we init those buffers here, so goto fail will free initialized dynbuf */
 1195|  1.08k|  curlx_dyn_init(&canonical_headers, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  1.08k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
 1196|  1.08k|  curlx_dyn_init(&signed_headers, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  1.08k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
 1197|       |
 1198|  1.08k|  result = parse_sigv4_params(data, hostname, &provider0, &provider1,
 1199|  1.08k|                              &region, &service);
 1200|  1.08k|  if(!result) {
  ------------------
  |  Branch (1200:6): [True: 1.07k, False: 11]
  ------------------
 1201|  1.07k|    Curl_http_method(data, &method, &httpreq);
 1202|  1.07k|    result = get_payload_hash(data, httpreq, &provider0, &provider1, &service,
 1203|  1.07k|                              sha_hash, sha_hex, content_sha256_hdr,
 1204|  1.07k|                              &payload_hash, &payload_hash_len);
 1205|  1.07k|  }
 1206|       |
 1207|  1.08k|  if(!result)
  ------------------
  |  Branch (1207:6): [True: 1.07k, False: 11]
  ------------------
 1208|  1.07k|    result = get_timestamp(timestamp, sizeof(timestamp));
 1209|       |
 1210|  1.08k|  if(!result)
  ------------------
  |  Branch (1210:6): [True: 1.07k, False: 11]
  ------------------
 1211|  1.07k|    result = make_canonical_request(data, hostname, timestamp,
 1212|  1.07k|                                    &provider1, &service,
 1213|  1.07k|                                    method, payload_hash, payload_hash_len,
 1214|  1.07k|                                    &date_header, content_sha256_hdr,
 1215|  1.07k|                                    &canonical_headers, &signed_headers,
 1216|  1.07k|                                    &canonical_request);
 1217|  1.08k|  if(!result) {
  ------------------
  |  Branch (1217:6): [True: 1.07k, False: 12]
  ------------------
 1218|       |    /* the timestamp might have been updated in make_canonical_request */
 1219|  1.07k|    memcpy(date, timestamp, sizeof(date) - 1);
 1220|  1.07k|    date[sizeof(date) - 1] = 0;
 1221|       |
 1222|  1.07k|    result = make_string_to_sign(data, &provider0, &region, &service,
 1223|  1.07k|                                 date, timestamp, canonical_request,
 1224|  1.07k|                                 &request_type, &credential_scope,
 1225|  1.07k|                                 &str_to_sign);
 1226|  1.07k|  }
 1227|  1.08k|  if(!result)
  ------------------
  |  Branch (1227:6): [True: 1.07k, False: 12]
  ------------------
 1228|  1.07k|    result = sign_and_set_auth_headers(data, &provider0, &region, &service,
 1229|  1.07k|                                       request_type, credential_scope,
 1230|  1.07k|                                       date, str_to_sign, date_header,
 1231|  1.07k|                                       content_sha256_hdr, &signed_headers);
 1232|       |
 1233|  1.08k|  curlx_dyn_free(&canonical_headers);
 1234|  1.08k|  curlx_dyn_free(&signed_headers);
 1235|  1.08k|  curlx_free(canonical_request);
  ------------------
  |  | 1478|  1.08k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1236|  1.08k|  curlx_free(request_type);
  ------------------
  |  | 1478|  1.08k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1237|  1.08k|  curlx_free(credential_scope);
  ------------------
  |  | 1478|  1.08k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1238|  1.08k|  curlx_free(str_to_sign);
  ------------------
  |  | 1478|  1.08k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1239|  1.08k|  curlx_free(date_header);
  ------------------
  |  | 1478|  1.08k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1240|  1.08k|  return result;
 1241|  1.08k|}
http_aws_sigv4.c:uri_encode_path:
  206|  1.06k|{
  207|  1.06k|  const char *p = curlx_str(original_path);
  ------------------
  |  |   49|  1.06k|#define curlx_str(x)    ((x)->str)
  ------------------
  208|  1.06k|  size_t i;
  209|       |
  210|  9.04k|  for(i = 0; i < curlx_strlen(original_path); i++) {
  ------------------
  |  |   50|  9.04k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (210:14): [True: 7.97k, False: 1.06k]
  ------------------
  211|       |    /* Do not encode slashes or unreserved chars from RFC 3986 */
  212|  7.97k|    CURLcode result = CURLE_OK;
  213|  7.97k|    unsigned char c = p[i];
  214|  7.97k|    if(is_reserved_char(c) || c == '/')
  ------------------
  |  Branch (214:8): [True: 4.60k, False: 3.37k]
  |  Branch (214:31): [True: 1.29k, False: 2.08k]
  ------------------
  215|  5.89k|      result = curlx_dyn_addn(new_path, &c, 1);
  216|  2.08k|    else
  217|  2.08k|      result = curlx_dyn_addf(new_path, "%%%02X", c);
  218|  7.97k|    if(result)
  ------------------
  |  Branch (218:8): [True: 0, False: 7.97k]
  ------------------
  219|      0|      return result;
  220|  7.97k|  }
  221|       |
  222|  1.06k|  return CURLE_OK;
  223|  1.06k|}
http_aws_sigv4.c:is_reserved_char:
  200|  22.4k|{
  201|  22.4k|  return (ISALNUM(c) || ISURLPUNTCS(c));
  ------------------
  |  |   39|  44.9k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  44.9k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 10.6k, False: 11.8k]
  |  |  |  |  |  Branch (42:38): [True: 2.30k, False: 8.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|  42.6k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 2.39k, False: 17.7k]
  |  |  |  |  |  Branch (41:38): [True: 1.65k, False: 736]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|  18.5k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 5.75k, False: 12.7k]
  |  |  |  |  |  Branch (40:38): [True: 4.26k, False: 1.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                return (ISALNUM(c) || ISURLPUNTCS(c));
  ------------------
  |  |   46|  14.2k|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  ------------------
  |  |  |  Branch (46:4): [True: 596, False: 13.6k]
  |  |  |  Branch (46:20): [True: 589, False: 13.0k]
  |  |  |  Branch (46:36): [True: 575, False: 12.5k]
  |  |  |  Branch (46:52): [True: 429, False: 12.0k]
  |  |  ------------------
  ------------------
  202|  22.4k|}
http_aws_sigv4.c:split_to_dyn_array:
  153|    431|{
  154|    431|  CURLcode result = CURLE_OK;
  155|    431|  size_t len = strlen(source);
  156|    431|  size_t pos;         /* Position in result buffer */
  157|    431|  size_t start = 0;   /* Start of current segment */
  158|    431|  size_t segment_length = 0;
  159|    431|  size_t index = 0;
  160|    431|  size_t num_splits = 0;
  161|       |
  162|       |  /* Split source_ptr on SPLIT_BY and store the segment offsets and length in
  163|       |   * array */
  164|  18.7k|  for(pos = 0; pos < len; pos++) {
  ------------------
  |  Branch (164:16): [True: 18.2k, False: 431]
  ------------------
  165|  18.2k|    if(source[pos] == SPLIT_BY) {
  ------------------
  |  |  148|  18.2k|#define SPLIT_BY '&'
  ------------------
  |  Branch (165:8): [True: 1.92k, False: 16.3k]
  ------------------
  166|  1.92k|      if(segment_length) {
  ------------------
  |  Branch (166:10): [True: 1.50k, False: 418]
  ------------------
  167|  1.50k|        curlx_dyn_init(&db[index], segment_length + 1);
  168|  1.50k|        result = curlx_dyn_addn(&db[index], &source[start], segment_length);
  169|  1.50k|        if(result)
  ------------------
  |  Branch (169:12): [True: 0, False: 1.50k]
  ------------------
  170|      0|          goto fail;
  171|       |
  172|  1.50k|        segment_length = 0;
  173|  1.50k|        index++;
  174|  1.50k|        if(++num_splits == MAX_QUERY_COMPONENTS) {
  ------------------
  |  |   58|  1.50k|#define MAX_QUERY_COMPONENTS 128
  ------------------
  |  Branch (174:12): [True: 0, False: 1.50k]
  ------------------
  175|      0|          result = CURLE_TOO_LARGE;
  176|      0|          goto fail;
  177|      0|        }
  178|  1.50k|      }
  179|  1.92k|      start = pos + 1;
  180|  1.92k|    }
  181|  16.3k|    else {
  182|  16.3k|      segment_length++;
  183|  16.3k|    }
  184|  18.2k|  }
  185|       |
  186|    431|  if(segment_length) {
  ------------------
  |  Branch (186:6): [True: 405, False: 26]
  ------------------
  187|    405|    curlx_dyn_init(&db[index], segment_length + 1);
  188|    405|    result = curlx_dyn_addn(&db[index], &source[start], segment_length);
  189|    405|    if(!result) {
  ------------------
  |  Branch (189:8): [True: 405, False: 0]
  ------------------
  190|    405|      if(++num_splits == MAX_QUERY_COMPONENTS)
  ------------------
  |  |   58|    405|#define MAX_QUERY_COMPONENTS 128
  ------------------
  |  Branch (190:10): [True: 0, False: 405]
  ------------------
  191|      0|        result = CURLE_TOO_LARGE;
  192|    405|    }
  193|    405|  }
  194|    431|fail:
  195|    431|  *num_splits_out = num_splits;
  196|    431|  return result;
  197|    431|}
http_aws_sigv4.c:normalize_query:
  229|  2.44k|{
  230|  2.44k|  CURLcode result = CURLE_OK;
  231|       |
  232|  16.9k|  while(len && !result) {
  ------------------
  |  Branch (232:9): [True: 14.5k, False: 2.44k]
  |  Branch (232:16): [True: 14.5k, False: 0]
  ------------------
  233|  14.5k|    unsigned char in = (unsigned char)*string;
  234|  14.5k|    if(('%' == in) && (len > 2) &&
  ------------------
  |  Branch (234:8): [True: 2.53k, False: 12.0k]
  |  Branch (234:23): [True: 2.25k, False: 279]
  ------------------
  235|  2.25k|       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   37|  16.7k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  4.50k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 1.18k, False: 1.06k]
  |  |  |  |  |  Branch (42:38): [True: 431, False: 752]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  4.07k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 301, False: 1.52k]
  |  |  |  |  |  Branch (27:43): [True: 165, False: 136]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  1.65k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 555, False: 1.10k]
  |  |  |  |  |  Branch (28:43): [True: 338, False: 217]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                     ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   37|    934|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  1.86k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 680, False: 254]
  |  |  |  |  |  Branch (42:38): [True: 235, False: 445]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  1.63k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 236, False: 463]
  |  |  |  |  |  Branch (27:43): [True: 132, False: 104]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|    567|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 285, False: 282]
  |  |  |  |  |  Branch (28:43): [True: 160, False: 125]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|       |      /* this is two hexadecimal digits following a '%' */
  237|    527|      in = (unsigned char)((curlx_hexval(string[1]) << 4) |
  ------------------
  |  |  111|    527|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  238|    527|                           curlx_hexval(string[2]));
  ------------------
  |  |  111|    527|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  239|    527|      string += 3;
  240|    527|      len -= 3;
  241|    527|      if(in == '+') {
  ------------------
  |  Branch (241:10): [True: 22, False: 505]
  ------------------
  242|       |        /* decodes to plus, so leave this encoded */
  243|     22|        result = curlx_dyn_addn(db, "%2B", 3);
  244|     22|        continue;
  245|     22|      }
  246|    527|    }
  247|  14.0k|    else {
  248|  14.0k|      string++;
  249|  14.0k|      len--;
  250|  14.0k|    }
  251|       |
  252|  14.5k|    if(is_reserved_char(in))
  ------------------
  |  Branch (252:8): [True: 5.81k, False: 8.70k]
  ------------------
  253|       |      /* Escape unreserved chars from RFC 3986 */
  254|  5.81k|      result = curlx_dyn_addn(db, &in, 1);
  255|  8.70k|    else if(in == '+')
  ------------------
  |  Branch (255:13): [True: 286, False: 8.41k]
  ------------------
  256|       |      /* Encode '+' as space */
  257|    286|      result = curlx_dyn_add(db, "%20");
  258|  8.41k|    else
  259|  8.41k|      result = curlx_dyn_addf(db, "%%%02X", in);
  260|  14.5k|  }
  261|       |
  262|  2.44k|  return result;
  263|  2.44k|}
http_aws_sigv4.c:compare_func:
  642|  4.55k|{
  643|  4.55k|  const struct pair *aa = a;
  644|  4.55k|  const struct pair *bb = b;
  645|  4.55k|  const size_t aa_key_len = curlx_dyn_len(&aa->key);
  646|  4.55k|  const size_t bb_key_len = curlx_dyn_len(&bb->key);
  647|  4.55k|  const size_t aa_value_len = curlx_dyn_len(&aa->value);
  648|  4.55k|  const size_t bb_value_len = curlx_dyn_len(&bb->value);
  649|  4.55k|  int compare;
  650|       |
  651|       |  /* If one element is empty, the other is always sorted higher */
  652|       |
  653|       |  /* Compare keys */
  654|  4.55k|  if((aa_key_len == 0) && (bb_key_len == 0))
  ------------------
  |  Branch (654:6): [True: 739, False: 3.81k]
  |  Branch (654:27): [True: 584, False: 155]
  ------------------
  655|    584|    return 0;
  656|  3.97k|  if(aa_key_len == 0)
  ------------------
  |  Branch (656:6): [True: 155, False: 3.81k]
  ------------------
  657|    155|    return -1;
  658|  3.81k|  if(bb_key_len == 0)
  ------------------
  |  Branch (658:6): [True: 735, False: 3.08k]
  ------------------
  659|    735|    return 1;
  660|  3.08k|  compare = strcmp(curlx_dyn_ptr(&aa->key), curlx_dyn_ptr(&bb->key));
  661|  3.08k|  if(compare) {
  ------------------
  |  Branch (661:6): [True: 2.52k, False: 564]
  ------------------
  662|  2.52k|    return compare;
  663|  2.52k|  }
  664|       |
  665|       |  /* Compare values */
  666|    564|  if((aa_value_len == 0) && (bb_value_len == 0))
  ------------------
  |  Branch (666:6): [True: 0, False: 564]
  |  Branch (666:29): [True: 0, False: 0]
  ------------------
  667|      0|    return 0;
  668|    564|  if(aa_value_len == 0)
  ------------------
  |  Branch (668:6): [True: 0, False: 564]
  ------------------
  669|      0|    return -1;
  670|    564|  if(bb_value_len == 0)
  ------------------
  |  Branch (670:6): [True: 0, False: 564]
  ------------------
  671|      0|    return 1;
  672|    564|  compare = strcmp(curlx_dyn_ptr(&aa->value), curlx_dyn_ptr(&bb->value));
  673|       |
  674|    564|  return compare;
  675|    564|}
http_aws_sigv4.c:pair_array_free:
  122|    429|{
  123|    429|  size_t index;
  124|       |
  125|  2.33k|  for(index = 0; index != num_elements; index++) {
  ------------------
  |  Branch (125:18): [True: 1.91k, False: 429]
  ------------------
  126|  1.91k|    curlx_dyn_free(&pair_array[index].key);
  127|  1.91k|    curlx_dyn_free(&pair_array[index].value);
  128|  1.91k|  }
  129|    429|}
http_aws_sigv4.c:dyn_array_free:
  135|    431|{
  136|    431|  size_t index;
  137|       |
  138|  2.34k|  for(index = 0; index < num_elements; index++)
  ------------------
  |  Branch (138:18): [True: 1.91k, False: 431]
  ------------------
  139|  1.91k|    curlx_dyn_free((&db[index]));
  140|    431|}
http_aws_sigv4.c:parse_sigv4_params:
  822|  1.08k|{
  823|  1.08k|  const char *line = data->set.str[STRING_AWS_SIGV4];
  824|  1.08k|  if(!line || !*line)
  ------------------
  |  Branch (824:6): [True: 1, False: 1.08k]
  |  Branch (824:15): [True: 989, False: 92]
  ------------------
  825|    990|    line = "aws:amz";
  826|       |
  827|       |  /* provider0[:provider1[:region[:service]]]
  828|       |
  829|       |     No string can be longer than N bytes of non-whitespace */
  830|  1.08k|  if(curlx_str_until(&line, provider0, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  282|  1.08k|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (830:6): [True: 1, False: 1.08k]
  ------------------
  831|      1|    failf(data, "first aws-sigv4 provider cannot be empty");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  832|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  833|      1|  }
  834|  1.08k|  if(curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (834:6): [True: 81, False: 1.00k]
  ------------------
  835|  1.00k|     curlx_str_until(&line, provider1, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  282|  1.00k|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (835:6): [True: 2, False: 998]
  ------------------
  836|     83|    *provider1 = *provider0;
  837|     83|  }
  838|    998|  else if(curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (838:11): [True: 991, False: 7]
  ------------------
  839|      7|          curlx_str_until(&line, region, MAX_SIGV4_LEN, ':') ||
  ------------------
  |  |  282|      7|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (839:11): [True: 1, False: 6]
  ------------------
  840|      6|          curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (840:11): [True: 3, False: 3]
  ------------------
  841|    995|          curlx_str_until(&line, service, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  282|      3|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (841:11): [True: 0, False: 3]
  ------------------
  842|       |    /* nothing to do */
  843|    995|  }
  844|       |
  845|  1.08k|  if(!curlx_strlen(service)) {
  ------------------
  |  |   50|  1.08k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (845:6): [True: 1.07k, False: 3]
  ------------------
  846|  1.07k|    const char *p = hostname;
  847|  1.07k|    if(curlx_str_until(&p, service, MAX_SIGV4_LEN, '.') ||
  ------------------
  |  |  282|  1.07k|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (847:8): [True: 1, False: 1.07k]
  ------------------
  848|  1.07k|       curlx_str_single(&p, '.')) {
  ------------------
  |  Branch (848:8): [True: 7, False: 1.07k]
  ------------------
  849|      8|      failf(data, "aws-sigv4: service missing in parameters and hostname");
  ------------------
  |  |   62|      8|#define failf Curl_failf
  ------------------
  850|      8|      return CURLE_URL_MALFORMAT;
  851|      8|    }
  852|       |
  853|  1.07k|    infof(data, "aws_sigv4: picked service %.*s from host",
  ------------------
  |  |  143|  1.07k|  do {                               \
  |  |  144|  1.07k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  1.07k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1.07k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.07k]
  |  |  |  |  ------------------
  |  |  |  |  323|  1.07k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.07k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
  854|  1.07k|          (int)curlx_strlen(service), curlx_str(service));
  855|       |
  856|  1.07k|    if(!curlx_strlen(region)) {
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (856:8): [True: 1.06k, False: 3]
  ------------------
  857|  1.06k|      if(curlx_str_until(&p, region, MAX_SIGV4_LEN, '.') ||
  ------------------
  |  |  282|  1.06k|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (857:10): [True: 1, False: 1.06k]
  ------------------
  858|  1.06k|         curlx_str_single(&p, '.')) {
  ------------------
  |  Branch (858:10): [True: 1, False: 1.06k]
  ------------------
  859|      2|        failf(data, "aws-sigv4: region missing in parameters and hostname");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  860|      2|        return CURLE_URL_MALFORMAT;
  861|      2|      }
  862|  1.06k|      infof(data, "aws_sigv4: picked region %.*s from host",
  ------------------
  |  |  143|  1.06k|  do {                               \
  |  |  144|  1.06k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  1.06k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1.06k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.06k]
  |  |  |  |  ------------------
  |  |  |  |  323|  1.06k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.06k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.06k]
  |  |  ------------------
  ------------------
  863|  1.06k|            (int)curlx_strlen(region), curlx_str(region));
  864|  1.06k|    }
  865|  1.07k|  }
  866|       |
  867|  1.07k|  return CURLE_OK;
  868|  1.08k|}
http_aws_sigv4.c:get_payload_hash:
  880|  1.07k|{
  881|  1.07k|  *payload_hash_out =
  882|  1.07k|    parse_content_sha_hdr(data, curlx_str(provider1),
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
  883|  1.07k|                          curlx_strlen(provider1), payload_hash_len_out);
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
  884|       |
  885|  1.07k|  if(!*payload_hash_out) {
  ------------------
  |  Branch (885:6): [True: 1.07k, False: 0]
  ------------------
  886|  1.07k|    CURLcode result;
  887|       |    /* AWS S3 requires a x-amz-content-sha256 header, and supports special
  888|       |     * values like UNSIGNED-PAYLOAD */
  889|  1.07k|    bool sign_as_s3 = curlx_str_casecompare(provider0, "aws") &&
  ------------------
  |  Branch (889:23): [True: 981, False: 90]
  ------------------
  890|    981|                      curlx_str_casecompare(service, "s3");
  ------------------
  |  Branch (890:23): [True: 3, False: 978]
  ------------------
  891|       |
  892|  1.07k|    if(sign_as_s3)
  ------------------
  |  Branch (892:8): [True: 3, False: 1.06k]
  ------------------
  893|      3|      result = calc_s3_payload_hash(data, httpreq, curlx_str(provider1),
  ------------------
  |  |   49|      3|#define curlx_str(x)    ((x)->str)
  ------------------
  894|      3|                                    curlx_strlen(provider1), sha_hash,
  ------------------
  |  |   50|      3|#define curlx_strlen(x) ((x)->len)
  ------------------
  895|      3|                                    sha_hex, content_sha256_hdr);
  896|  1.06k|    else
  897|  1.06k|      result = calc_payload_hash(data, sha_hash, sha_hex);
  898|  1.07k|    if(result)
  ------------------
  |  Branch (898:8): [True: 0, False: 1.07k]
  ------------------
  899|      0|      return result;
  900|       |
  901|  1.07k|    *payload_hash_out = sha_hex;
  902|       |    /* may be shorter than SHA256_HEX_LENGTH, like S3_UNSIGNED_PAYLOAD */
  903|  1.07k|    *payload_hash_len_out = strlen(sha_hex);
  904|  1.07k|  }
  905|  1.07k|  return CURLE_OK;
  906|  1.07k|}
http_aws_sigv4.c:parse_content_sha_hdr:
  554|  1.07k|{
  555|  1.07k|  char key[CONTENT_SHA256_KEY_LEN];
  556|  1.07k|  size_t key_len;
  557|  1.07k|  const char *value;
  558|  1.07k|  size_t len;
  559|       |
  560|  1.07k|  key_len = curl_msnprintf(key, sizeof(key), "x-%.*s-content-sha256",
  561|  1.07k|                           (int)plen, provider1);
  562|       |
  563|  1.07k|  value = Curl_checkheaders(data, key, key_len);
  564|  1.07k|  if(!value)
  ------------------
  |  Branch (564:6): [True: 1.07k, False: 0]
  ------------------
  565|  1.07k|    return NULL;
  566|       |
  567|      0|  value = strchr(value, ':');
  568|      0|  if(!value)
  ------------------
  |  Branch (568:6): [True: 0, False: 0]
  ------------------
  569|      0|    return NULL;
  570|      0|  ++value;
  571|       |
  572|      0|  curlx_str_passblanks(&value);
  573|       |
  574|      0|  len = strlen(value);
  575|      0|  while(len > 0 && ISBLANK(value[len - 1]))
  ------------------
  |  |   43|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (575:9): [True: 0, False: 0]
  ------------------
  576|      0|    --len;
  577|       |
  578|      0|  *value_len = len;
  579|      0|  return value;
  580|      0|}
http_aws_sigv4.c:calc_s3_payload_hash:
  610|      3|{
  611|      3|  bool empty_method = (httpreq == HTTPREQ_GET || httpreq == HTTPREQ_HEAD);
  ------------------
  |  Branch (611:24): [True: 1, False: 2]
  |  Branch (611:50): [True: 0, False: 2]
  ------------------
  612|       |  /* The request method or filesize indicate no request payload */
  613|      3|  bool empty_payload = (empty_method || data->set.filesize == 0);
  ------------------
  |  Branch (613:25): [True: 1, False: 2]
  |  Branch (613:41): [True: 0, False: 2]
  ------------------
  614|       |  /* The POST payload is in memory */
  615|      3|  bool post_payload = (httpreq == HTTPREQ_POST && data->set.postfields);
  ------------------
  |  Branch (615:24): [True: 1, False: 2]
  |  Branch (615:51): [True: 1, False: 0]
  ------------------
  616|      3|  CURLcode result = CURLE_OUT_OF_MEMORY;
  617|       |
  618|      3|  if(empty_payload || post_payload) {
  ------------------
  |  Branch (618:6): [True: 1, False: 2]
  |  Branch (618:23): [True: 1, False: 1]
  ------------------
  619|       |    /* Calculate a real hash when we know the request payload */
  620|      2|    result = calc_payload_hash(data, sha_hash, sha_hex);
  621|      2|    if(result)
  ------------------
  |  Branch (621:8): [True: 0, False: 2]
  ------------------
  622|      0|      goto fail;
  623|      2|  }
  624|      1|  else {
  625|       |    /* Fall back to s3's UNSIGNED-PAYLOAD */
  626|      1|    size_t len = CURL_CSTRLEN(S3_UNSIGNED_PAYLOAD);
  ------------------
  |  | 1296|      1|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  627|      1|    DEBUGASSERT(len < SHA256_HEX_LENGTH); /* 16 < 65 */
  ------------------
  |  | 1079|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (627:5): [True: 0, False: 1]
  |  Branch (627:5): [True: 1, False: 0]
  ------------------
  628|      1|    memcpy(sha_hex, S3_UNSIGNED_PAYLOAD, len);
  ------------------
  |  |  602|      1|#define S3_UNSIGNED_PAYLOAD "UNSIGNED-PAYLOAD"
  ------------------
  629|      1|    sha_hex[len] = 0;
  630|      1|  }
  631|       |
  632|       |  /* format the required content-sha256 header */
  633|      3|  curl_msnprintf(header, CONTENT_SHA256_HDR_LEN,
  ------------------
  |  |  547|      3|#define CONTENT_SHA256_HDR_LEN (CONTENT_SHA256_KEY_LEN + 2 + SHA256_HEX_LENGTH)
  |  |  ------------------
  |  |  |  |  545|      3|#define CONTENT_SHA256_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Content-Sha256"))
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|      3|#define MAX_SIGV4_LEN    64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CONTENT_SHA256_HDR_LEN (CONTENT_SHA256_KEY_LEN + 2 + SHA256_HEX_LENGTH)
  |  |  ------------------
  |  |  |  |   56|      3|#define SHA256_HEX_LENGTH ((2 * CURL_SHA256_DIGEST_LENGTH) + 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      3|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  634|      3|                 "x-%.*s-content-sha256: %s", (int)plen, provider1, sha_hex);
  635|       |
  636|      3|  result = CURLE_OK;
  637|      3|fail:
  638|      3|  return result;
  639|      3|}
http_aws_sigv4.c:calc_payload_hash:
  584|  1.07k|{
  585|  1.07k|  const char *post_data = data->set.postfields;
  586|  1.07k|  size_t post_data_len = 0;
  587|  1.07k|  CURLcode result;
  588|       |
  589|  1.07k|  if(post_data) {
  ------------------
  |  Branch (589:6): [True: 3, False: 1.06k]
  ------------------
  590|      3|    if(data->set.postfieldsize < 0)
  ------------------
  |  Branch (590:8): [True: 3, False: 0]
  ------------------
  591|      3|      post_data_len = strlen(post_data);
  592|      0|    else
  593|      0|      post_data_len = (size_t)data->set.postfieldsize;
  594|      3|  }
  595|  1.07k|  result = Curl_sha256it(sha_hash, (const unsigned char *)post_data,
  596|  1.07k|                         post_data_len);
  597|  1.07k|  if(!result)
  ------------------
  |  Branch (597:6): [True: 1.07k, False: 0]
  ------------------
  598|  1.07k|    sha256_to_hex(sha_hex, sha_hash);
  599|  1.07k|  return result;
  600|  1.07k|}
http_aws_sigv4.c:sha256_to_hex:
   66|  3.21k|{
   67|  3.21k|  Curl_hexencode(sha, CURL_SHA256_DIGEST_LENGTH,
  ------------------
  |  |   38|  3.21k|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  ------------------
   68|  3.21k|                 (unsigned char *)dst, SHA256_HEX_LENGTH);
  ------------------
  |  |   56|  3.21k|#define SHA256_HEX_LENGTH ((2 * CURL_SHA256_DIGEST_LENGTH) + 1)
  |  |  ------------------
  |  |  |  |   38|  3.21k|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  |  |  ------------------
  ------------------
   69|  3.21k|}
http_aws_sigv4.c:get_timestamp:
  909|  1.07k|{
  910|  1.07k|  time_t clock;
  911|  1.07k|  struct tm tm;
  912|  1.07k|  CURLcode result;
  913|       |
  914|  1.07k|#ifdef DEBUGBUILD
  915|  1.07k|  {
  916|  1.07k|    char *force_timestamp = getenv("CURL_FORCETIME");
  917|  1.07k|    if(force_timestamp)
  ------------------
  |  Branch (917:8): [True: 0, False: 1.07k]
  ------------------
  918|      0|      clock = 0;
  919|  1.07k|    else
  920|  1.07k|      clock = time(NULL);
  921|  1.07k|  }
  922|       |#else
  923|       |  clock = time(NULL);
  924|       |#endif
  925|  1.07k|  result = curlx_gmtime(clock, &tm);
  926|  1.07k|  if(result)
  ------------------
  |  Branch (926:6): [True: 0, False: 1.07k]
  ------------------
  927|      0|    return result;
  928|       |
  929|  1.07k|  if(!strftime(timestamp, stampsize, "%Y%m%dT%H%M%SZ", &tm))
  ------------------
  |  Branch (929:6): [True: 0, False: 1.07k]
  ------------------
  930|      0|    return CURLE_OUT_OF_MEMORY;
  931|       |
  932|  1.07k|  return CURLE_OK;
  933|  1.07k|}
http_aws_sigv4.c:make_canonical_request:
  948|  1.07k|{
  949|  1.07k|  struct dynbuf canonical_query;
  950|  1.07k|  struct dynbuf canonical_path;
  951|  1.07k|  CURLcode result;
  952|       |
  953|  1.07k|  curlx_dyn_init(&canonical_query, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  1.07k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  954|  1.07k|  curlx_dyn_init(&canonical_path, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  1.07k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  955|       |
  956|  1.07k|  result = make_headers(data, hostname, timestamp,
  957|  1.07k|                        curlx_str(provider1), curlx_strlen(provider1),
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
                                      curlx_str(provider1), curlx_strlen(provider1),
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
  958|  1.07k|                        date_header_out, content_sha256_hdr,
  959|  1.07k|                        canonical_headers, signed_headers);
  960|  1.07k|  if(result)
  ------------------
  |  Branch (960:6): [True: 1, False: 1.07k]
  ------------------
  961|      1|    goto fail;
  962|       |
  963|  1.07k|  result = canon_query(data->state.up.query, &canonical_query);
  964|  1.07k|  if(result)
  ------------------
  |  Branch (964:6): [True: 0, False: 1.07k]
  ------------------
  965|      0|    goto fail;
  966|       |
  967|  1.07k|  result = canon_path(data->state.up.path, strlen(data->state.up.path),
  968|  1.07k|                      &canonical_path,
  969|  1.07k|                      should_urlencode(service));
  970|  1.07k|  if(result)
  ------------------
  |  Branch (970:6): [True: 0, False: 1.07k]
  ------------------
  971|      0|    goto fail;
  972|       |
  973|  1.07k|  *canonical_request_out =
  974|  1.07k|    curl_maprintf("%s\n" /* HTTPRequestMethod */
  975|  1.07k|                  "%s\n" /* CanonicalURI */
  976|  1.07k|                  "%s\n" /* CanonicalQueryString */
  977|  1.07k|                  "%s\n" /* CanonicalHeaders */
  978|  1.07k|                  "%s\n" /* SignedHeaders */
  979|  1.07k|                  "%.*s",  /* HashedRequestPayload in hex */
  980|  1.07k|                  method,
  981|  1.07k|                  curlx_dyn_ptr(&canonical_path),
  982|  1.07k|                  curlx_dyn_ptr(&canonical_query) ?
  ------------------
  |  Branch (982:19): [True: 429, False: 641]
  ------------------
  983|    641|                  curlx_dyn_ptr(&canonical_query) : "",
  984|  1.07k|                  curlx_dyn_ptr(canonical_headers),
  985|  1.07k|                  curlx_dyn_ptr(signed_headers),
  986|  1.07k|                  (int)payload_hash_len, payload_hash);
  987|  1.07k|  if(!*canonical_request_out) {
  ------------------
  |  Branch (987:6): [True: 0, False: 1.07k]
  ------------------
  988|      0|    result = CURLE_OUT_OF_MEMORY;
  989|      0|    goto fail;
  990|      0|  }
  991|       |
  992|  1.07k|  result = CURLE_OK;
  993|  1.07k|fail:
  994|  1.07k|  curlx_dyn_free(&canonical_query);
  995|  1.07k|  curlx_dyn_free(&canonical_path);
  996|  1.07k|  return result;
  997|  1.07k|}
http_aws_sigv4.c:make_headers:
  380|  1.07k|{
  381|  1.07k|  char date_hdr_key[DATE_HDR_KEY_LEN];
  382|  1.07k|  char date_full_hdr[DATE_FULL_HDR_LEN];
  383|  1.07k|  struct curl_slist *head = NULL;
  384|  1.07k|  struct curl_slist *tmp_head = NULL;
  385|  1.07k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  386|  1.07k|  struct curl_slist *l;
  387|  1.07k|  bool again = TRUE;
  ------------------
  |  | 1053|  1.07k|#define TRUE true
  ------------------
  388|       |
  389|  1.07k|  curl_msnprintf(date_hdr_key, DATE_HDR_KEY_LEN, "X-%.*s-Date",
  ------------------
  |  |  283|  1.07k|#define DATE_HDR_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Date"))
  |  |  ------------------
  |  |  |  |  282|  1.07k|#define MAX_SIGV4_LEN    64
  |  |  ------------------
  ------------------
  390|  1.07k|                 (int)plen, provider1);
  391|       |  /* provider1 ucfirst */
  392|  1.07k|  Curl_strntolower(&date_hdr_key[2], provider1, plen);
  393|  1.07k|  date_hdr_key[2] = Curl_raw_toupper(provider1[0]);
  394|       |
  395|  1.07k|  curl_msnprintf(date_full_hdr, DATE_FULL_HDR_LEN,
  ------------------
  |  |  286|  1.07k|#define DATE_FULL_HDR_LEN (DATE_HDR_KEY_LEN + TIMESTAMP_SIZE + 1)
  |  |  ------------------
  |  |  |  |  283|  1.07k|#define DATE_HDR_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Date"))
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  1.07k|#define MAX_SIGV4_LEN    64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DATE_FULL_HDR_LEN (DATE_HDR_KEY_LEN + TIMESTAMP_SIZE + 1)
  |  |  ------------------
  |  |  |  |   53|  1.07k|#define TIMESTAMP_SIZE 17
  |  |  ------------------
  ------------------
  396|  1.07k|                 "x-%.*s-date:%s", (int)plen, provider1, timestamp);
  397|       |  /* provider1 lowercase */
  398|  1.07k|  Curl_strntolower(&date_full_hdr[2], provider1, plen);
  399|       |
  400|  1.07k|  if(!Curl_checkheaders(data, STRCONST("Host"))) {
  ------------------
  |  | 1301|  1.07k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.07k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (400:6): [True: 1.06k, False: 6]
  ------------------
  401|  1.06k|    char *fullhost;
  402|       |
  403|  1.06k|    if(data->state.aptr.host)
  ------------------
  |  Branch (403:8): [True: 0, False: 1.06k]
  ------------------
  404|      0|      fullhost = curlx_strdup(data->state.aptr.host);
  ------------------
  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  405|  1.06k|    else
  406|  1.06k|      fullhost = curl_maprintf("host:%s", hostname);
  407|       |
  408|  1.06k|    if(fullhost)
  ------------------
  |  Branch (408:8): [True: 1.06k, False: 0]
  ------------------
  409|  1.06k|      head = Curl_slist_append_nodup(NULL, fullhost);
  410|  1.06k|    if(!head) {
  ------------------
  |  Branch (410:8): [True: 0, False: 1.06k]
  ------------------
  411|      0|      curlx_free(fullhost);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  412|      0|      goto fail;
  413|      0|    }
  414|  1.06k|  }
  415|       |
  416|  1.07k|  if(*content_sha256_header) {
  ------------------
  |  Branch (416:6): [True: 3, False: 1.06k]
  ------------------
  417|      3|    tmp_head = curl_slist_append(head, content_sha256_header);
  418|      3|    if(!tmp_head)
  ------------------
  |  Branch (418:8): [True: 0, False: 3]
  ------------------
  419|      0|      goto fail;
  420|      3|    head = tmp_head;
  421|      3|  }
  422|       |
  423|       |  /* copy user headers to our header list. the logic is based on how http.c
  424|       |     handles user headers.
  425|       |
  426|       |     user headers in format 'name:' with no value are used to signal that an
  427|       |     internal header of that name should be removed. those user headers are not
  428|       |     added to this list.
  429|       |
  430|       |     user headers in format 'name;' with no value are used to signal that a
  431|       |     header of that name with no value should be sent. those user headers are
  432|       |     added to this list but in the format that they will be sent, ie the
  433|       |     semi-colon is changed to a colon for format 'name:'.
  434|       |
  435|       |     user headers with a value of whitespace only, or without a colon or
  436|       |     semi-colon, are not added to this list.
  437|       |     */
  438|  34.3k|  for(l = data->set.headers; l; l = l->next) {
  ------------------
  |  Branch (438:30): [True: 33.2k, False: 1.07k]
  ------------------
  439|  33.2k|    char *dupdata;
  440|  33.2k|    const char *ptr;
  441|  33.2k|    const char *sep = strchr(l->data, ':');
  442|  33.2k|    if(!sep)
  ------------------
  |  Branch (442:8): [True: 4.71k, False: 28.5k]
  ------------------
  443|  4.71k|      sep = strchr(l->data, ';');
  444|  33.2k|    if(!sep || (*sep == ':' && !*(sep + 1)))
  ------------------
  |  Branch (444:8): [True: 1.50k, False: 31.7k]
  |  Branch (444:17): [True: 28.5k, False: 3.21k]
  |  Branch (444:32): [True: 178, False: 28.3k]
  ------------------
  445|  1.67k|      continue;
  446|  32.0k|    for(ptr = sep + 1; ISBLANK(*ptr); ++ptr)
  ------------------
  |  |   43|  32.0k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 270, False: 31.7k]
  |  |  |  Branch (43:38): [True: 149, False: 31.6k]
  |  |  ------------------
  ------------------
  447|    419|      ;
  448|  31.6k|    if(!*ptr && ptr != sep + 1) /* a value of whitespace only */
  ------------------
  |  Branch (448:8): [True: 1.24k, False: 30.3k]
  |  Branch (448:17): [True: 94, False: 1.15k]
  ------------------
  449|     94|      continue;
  450|  31.5k|    dupdata = curlx_strdup(l->data);
  ------------------
  |  | 1472|  31.5k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  451|  31.5k|    if(!dupdata)
  ------------------
  |  Branch (451:8): [True: 0, False: 31.5k]
  ------------------
  452|      0|      goto fail;
  453|  31.5k|    dupdata[sep - l->data] = ':';
  454|  31.5k|    tmp_head = Curl_slist_append_nodup(head, dupdata);
  455|  31.5k|    if(!tmp_head) {
  ------------------
  |  Branch (455:8): [True: 0, False: 31.5k]
  ------------------
  456|      0|      curlx_free(dupdata);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  457|      0|      goto fail;
  458|      0|    }
  459|  31.5k|    head = tmp_head;
  460|  31.5k|  }
  461|       |
  462|  1.07k|  trim_headers(head);
  463|       |
  464|  1.07k|  *date_header = find_date_hdr(data, date_hdr_key);
  465|  1.07k|  if(!*date_header) {
  ------------------
  |  Branch (465:6): [True: 1.04k, False: 27]
  ------------------
  466|  1.04k|    tmp_head = curl_slist_append(head, date_full_hdr);
  467|  1.04k|    if(!tmp_head)
  ------------------
  |  Branch (467:8): [True: 0, False: 1.04k]
  ------------------
  468|      0|      goto fail;
  469|  1.04k|    head = tmp_head;
  470|  1.04k|    *date_header = curl_maprintf("%s: %s\r\n", date_hdr_key, timestamp);
  471|  1.04k|    if(!*date_header)
  ------------------
  |  Branch (471:8): [True: 0, False: 1.04k]
  ------------------
  472|      0|      goto fail;
  473|  1.04k|  }
  474|     27|  else {
  475|     27|    const char *value;
  476|     27|    const char *endp;
  477|     27|    value = strchr(*date_header, ':');
  478|     27|    if(!value) {
  ------------------
  |  Branch (478:8): [True: 1, False: 26]
  ------------------
  479|      1|      *date_header = NULL;
  480|      1|      goto fail;
  481|      1|    }
  482|     26|    ++value;
  483|     26|    curlx_str_passblanks(&value);
  484|     26|    endp = value;
  485|  1.06k|    while(*endp && ISALNUM(*endp))
  ------------------
  |  |   39|  1.06k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  2.12k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 1.04k, False: 16]
  |  |  |  |  |  Branch (42:38): [True: 460, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|  1.66k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 329, False: 275]
  |  |  |  |  |  Branch (41:38): [True: 328, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|    276|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 257, False: 19]
  |  |  |  |  |  Branch (40:38): [True: 255, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (485:11): [True: 1.06k, False: 5]
  ------------------
  486|  1.04k|      ++endp;
  487|       |    /* 16 bytes => "19700101T000000Z" */
  488|     26|    if((endp - value) == TIMESTAMP_SIZE - 1) {
  ------------------
  |  |   53|     26|#define TIMESTAMP_SIZE 17
  ------------------
  |  Branch (488:8): [True: 1, False: 25]
  ------------------
  489|      1|      memcpy(timestamp, value, TIMESTAMP_SIZE - 1);
  ------------------
  |  |   53|      1|#define TIMESTAMP_SIZE 17
  ------------------
  490|      1|      timestamp[TIMESTAMP_SIZE - 1] = 0;
  ------------------
  |  |   53|      1|#define TIMESTAMP_SIZE 17
  ------------------
  491|      1|    }
  492|     25|    else
  493|       |      /* bad timestamp length */
  494|     25|      timestamp[0] = 0;
  495|     26|    *date_header = NULL;
  496|     26|  }
  497|       |
  498|       |  /* alpha-sort by header name in a case sensitive manner */
  499|  31.2k|  do {
  500|  31.2k|    again = FALSE;
  ------------------
  |  | 1056|  31.2k|#define FALSE false
  ------------------
  501|  32.5M|    for(l = head; l; l = l->next) {
  ------------------
  |  Branch (501:19): [True: 32.5M, False: 31.2k]
  ------------------
  502|  32.5M|      struct curl_slist *next = l->next;
  503|       |
  504|  32.5M|      if(next && compare_header_names(l->data, next->data) > 0) {
  ------------------
  |  Branch (504:10): [True: 32.5M, False: 31.2k]
  |  Branch (504:18): [True: 264k, False: 32.2M]
  ------------------
  505|   264k|        char *tmp = l->data;
  506|       |
  507|   264k|        l->data = next->data;
  508|   264k|        next->data = tmp;
  509|   264k|        again = TRUE;
  ------------------
  |  | 1053|   264k|#define TRUE true
  ------------------
  510|   264k|      }
  511|  32.5M|    }
  512|  31.2k|  } while(again);
  ------------------
  |  Branch (512:11): [True: 30.2k, False: 1.07k]
  ------------------
  513|       |
  514|  1.07k|  result = merge_duplicate_headers(head);
  515|  1.07k|  if(result)
  ------------------
  |  Branch (515:6): [True: 0, False: 1.07k]
  ------------------
  516|      0|    goto fail;
  517|       |
  518|  4.26k|  for(l = head; l; l = l->next) {
  ------------------
  |  Branch (518:17): [True: 3.19k, False: 1.07k]
  ------------------
  519|  3.19k|    char *tmp;
  520|       |
  521|  3.19k|    if(curlx_dyn_add(canonical_headers, l->data))
  ------------------
  |  Branch (521:8): [True: 0, False: 3.19k]
  ------------------
  522|      0|      goto fail;
  523|  3.19k|    if(curlx_dyn_add(canonical_headers, "\n"))
  ------------------
  |  Branch (523:8): [True: 0, False: 3.19k]
  ------------------
  524|      0|      goto fail;
  525|       |
  526|  3.19k|    tmp = strchr(l->data, ':');
  527|  3.19k|    if(tmp)
  ------------------
  |  Branch (527:8): [True: 3.19k, False: 0]
  ------------------
  528|  3.19k|      *tmp = 0;
  529|       |
  530|  3.19k|    if(l != head) {
  ------------------
  |  Branch (530:8): [True: 2.12k, False: 1.07k]
  ------------------
  531|  2.12k|      if(curlx_dyn_add(signed_headers, ";"))
  ------------------
  |  Branch (531:10): [True: 0, False: 2.12k]
  ------------------
  532|      0|        goto fail;
  533|  2.12k|    }
  534|  3.19k|    if(curlx_dyn_add(signed_headers, l->data))
  ------------------
  |  Branch (534:8): [True: 0, False: 3.19k]
  ------------------
  535|      0|      goto fail;
  536|  3.19k|  }
  537|       |
  538|  1.07k|  result = CURLE_OK;
  539|  1.07k|fail:
  540|  1.07k|  curl_slist_free_all(head);
  541|       |
  542|  1.07k|  return result;
  543|  1.07k|}
http_aws_sigv4.c:trim_headers:
   82|  1.07k|{
   83|  1.07k|  struct curl_slist *l;
   84|  33.6k|  for(l = head; l; l = l->next) {
  ------------------
  |  Branch (84:17): [True: 32.5k, False: 1.07k]
  ------------------
   85|  32.5k|    const char *value; /* to read from */
   86|  32.5k|    char *store;
   87|  32.5k|    size_t colon = strcspn(l->data, ":");
   88|  32.5k|    Curl_strntolower(l->data, l->data, colon);
   89|       |
   90|  32.5k|    value = &l->data[colon];
   91|  32.5k|    if(!*value)
  ------------------
  |  Branch (91:8): [True: 0, False: 32.5k]
  ------------------
   92|      0|      continue;
   93|  32.5k|    ++value;
   94|  32.5k|    store = (char *)CURL_UNCONST(value);
  ------------------
  |  |  864|  32.5k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   95|       |
   96|       |    /* skip leading whitespace */
   97|  32.5k|    curlx_str_passblanks(&value);
   98|       |
   99|   261k|    while(*value) {
  ------------------
  |  Branch (99:11): [True: 228k, False: 32.5k]
  ------------------
  100|   228k|      int space = 0;
  101|   231k|      while(ISBLANK(*value)) {
  ------------------
  |  |   43|   231k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 1.89k, False: 229k]
  |  |  |  Branch (43:38): [True: 805, False: 228k]
  |  |  ------------------
  ------------------
  102|  2.70k|        value++;
  103|  2.70k|        space++;
  104|  2.70k|      }
  105|   228k|      if(space) {
  ------------------
  |  Branch (105:10): [True: 1.73k, False: 227k]
  ------------------
  106|       |        /* replace any number of consecutive whitespace with a single space,
  107|       |           unless at the end of the string, then nothing */
  108|  1.73k|        if(*value)
  ------------------
  |  Branch (108:12): [True: 1.53k, False: 202]
  ------------------
  109|  1.53k|          *store++ = ' ';
  110|  1.73k|      }
  111|   227k|      else
  112|   227k|        *store++ = *value++;
  113|   228k|    }
  114|  32.5k|    *store = 0; /* null-terminate */
  115|  32.5k|  }
  116|  1.07k|}
http_aws_sigv4.c:find_date_hdr:
   72|  1.07k|{
   73|  1.07k|  char *tmp = Curl_checkheaders(data, sig_hdr, strlen(sig_hdr));
   74|       |
   75|  1.07k|  if(tmp)
  ------------------
  |  Branch (75:6): [True: 26, False: 1.04k]
  ------------------
   76|     26|    return tmp;
   77|  1.04k|  return Curl_checkheaders(data, STRCONST("Date"));
  ------------------
  |  | 1301|  1.04k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.04k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
   78|  1.07k|}
http_aws_sigv4.c:compare_header_names:
  291|  32.5M|{
  292|  32.5M|  const char *colon_a;
  293|  32.5M|  const char *colon_b;
  294|  32.5M|  size_t len_a;
  295|  32.5M|  size_t len_b;
  296|  32.5M|  size_t min_len;
  297|  32.5M|  int cmp;
  298|       |
  299|  32.5M|  colon_a = strchr(a, ':');
  300|  32.5M|  colon_b = strchr(b, ':');
  301|       |
  302|  32.5M|  DEBUGASSERT(colon_a);
  ------------------
  |  | 1079|  32.5M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (302:3): [True: 0, False: 32.5M]
  |  Branch (302:3): [True: 32.5M, False: 0]
  ------------------
  303|  32.5M|  DEBUGASSERT(colon_b);
  ------------------
  |  | 1079|  32.5M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (303:3): [True: 0, False: 32.5M]
  |  Branch (303:3): [True: 32.5M, False: 0]
  ------------------
  304|       |
  305|  32.5M|  len_a = colon_a ? (size_t)(colon_a - a) : strlen(a);
  ------------------
  |  Branch (305:11): [True: 32.5M, False: 0]
  ------------------
  306|  32.5M|  len_b = colon_b ? (size_t)(colon_b - b) : strlen(b);
  ------------------
  |  Branch (306:11): [True: 32.5M, False: 0]
  ------------------
  307|       |
  308|  32.5M|  min_len = (len_a < len_b) ? len_a : len_b;
  ------------------
  |  Branch (308:13): [True: 170k, False: 32.3M]
  ------------------
  309|       |
  310|  32.5M|  cmp = strncmp(a, b, min_len);
  311|       |
  312|       |  /* return the shorter of the two if one is shorter */
  313|  32.5M|  if(!cmp)
  ------------------
  |  Branch (313:6): [True: 32.0M, False: 489k]
  ------------------
  314|  32.0M|    return (int)(len_a - len_b);
  315|       |
  316|   489k|  return cmp;
  317|  32.5M|}
http_aws_sigv4.c:merge_duplicate_headers:
  323|  1.07k|{
  324|  1.07k|  struct curl_slist *curr = head;
  325|  1.07k|  CURLcode result = CURLE_OK;
  326|       |
  327|  33.6k|  while(curr) {
  ------------------
  |  Branch (327:9): [True: 33.6k, False: 0]
  ------------------
  328|  33.6k|    struct curl_slist *next = curr->next;
  329|  33.6k|    if(!next)
  ------------------
  |  Branch (329:8): [True: 1.07k, False: 32.5k]
  ------------------
  330|  1.07k|      break;
  331|       |
  332|  32.5k|    if(compare_header_names(curr->data, next->data) == 0) {
  ------------------
  |  Branch (332:8): [True: 30.4k, False: 2.12k]
  ------------------
  333|  30.4k|      struct dynbuf buf;
  334|  30.4k|      const char *colon_next;
  335|  30.4k|      const char *val_next;
  336|       |
  337|  30.4k|      curlx_dyn_init(&buf, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  30.4k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  338|       |
  339|  30.4k|      result = curlx_dyn_add(&buf, curr->data);
  340|  30.4k|      if(result)
  ------------------
  |  Branch (340:10): [True: 0, False: 30.4k]
  ------------------
  341|      0|        return result;
  342|       |
  343|  30.4k|      colon_next = strchr(next->data, ':');
  344|  30.4k|      DEBUGASSERT(colon_next);
  ------------------
  |  | 1079|  30.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (344:7): [True: 0, False: 30.4k]
  |  Branch (344:7): [True: 30.4k, False: 0]
  ------------------
  345|  30.4k|      val_next = colon_next + 1;
  346|       |
  347|  30.4k|      result = curlx_dyn_addn(&buf, ",", 1);
  348|  30.4k|      if(result)
  ------------------
  |  Branch (348:10): [True: 0, False: 30.4k]
  ------------------
  349|      0|        return result;
  350|       |
  351|  30.4k|      result = curlx_dyn_add(&buf, val_next);
  352|  30.4k|      if(result)
  ------------------
  |  Branch (352:10): [True: 0, False: 30.4k]
  ------------------
  353|      0|        return result;
  354|       |
  355|  30.4k|      curlx_free(curr->data);
  ------------------
  |  | 1478|  30.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  356|  30.4k|      curr->data = curlx_dyn_ptr(&buf);
  357|       |
  358|  30.4k|      curr->next = next->next;
  359|  30.4k|      curlx_free(next->data);
  ------------------
  |  | 1478|  30.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  360|  30.4k|      curlx_free(next);
  ------------------
  |  | 1478|  30.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  361|  30.4k|    }
  362|  2.12k|    else {
  363|  2.12k|      curr = curr->next;
  364|  2.12k|    }
  365|  32.5k|  }
  366|       |
  367|  1.07k|  return CURLE_OK;
  368|  1.07k|}
http_aws_sigv4.c:should_urlencode:
  266|  1.07k|{
  267|       |  /*
  268|       |   * These services require unmodified (not additionally URL-encoded) URL
  269|       |   * paths.
  270|       |   * should_urlencode == true is equivalent to should_urlencode_uri_path
  271|       |   * from the AWS SDK. Urls are already normalized by the curl URL parser
  272|       |   */
  273|  1.07k|  if(curlx_str_cmp(service_name, "s3") ||
  ------------------
  |  Branch (273:6): [True: 3, False: 1.06k]
  ------------------
  274|  1.06k|     curlx_str_cmp(service_name, "s3-express") ||
  ------------------
  |  Branch (274:6): [True: 0, False: 1.06k]
  ------------------
  275|  1.06k|     curlx_str_cmp(service_name, "s3-outposts")) {
  ------------------
  |  Branch (275:6): [True: 0, False: 1.06k]
  ------------------
  276|      3|    return FALSE;
  ------------------
  |  | 1056|      3|#define FALSE false
  ------------------
  277|      3|  }
  278|  1.06k|  return TRUE;
  ------------------
  |  | 1053|  1.06k|#define TRUE true
  ------------------
  279|  1.07k|}
http_aws_sigv4.c:make_string_to_sign:
 1009|  1.07k|{
 1010|  1.07k|  char *request_type;
 1011|  1.07k|  char *credential_scope;
 1012|  1.07k|  char *str_to_sign;
 1013|  1.07k|  unsigned char sha_hash[CURL_SHA256_DIGEST_LENGTH];
 1014|  1.07k|  char sha_hex[SHA256_HEX_LENGTH];
 1015|       |
 1016|  1.07k|  request_type = curl_maprintf("%.*s4_request",
 1017|  1.07k|                               (int)curlx_strlen(provider0),
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1018|  1.07k|                               curlx_str(provider0));
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
 1019|  1.07k|  if(!request_type)
  ------------------
  |  Branch (1019:6): [True: 0, False: 1.07k]
  ------------------
 1020|      0|    return CURLE_OUT_OF_MEMORY;
 1021|       |
 1022|       |  /* provider0 is lowercased *after* curl_maprintf() so that the buffer
 1023|       |     can be written to */
 1024|  1.07k|  Curl_strntolower(request_type, request_type, curlx_strlen(provider0));
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1025|       |
 1026|  1.07k|  credential_scope = curl_maprintf("%s/%.*s/%.*s/%s", date,
 1027|  1.07k|                                   (int)curlx_strlen(region),
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1028|  1.07k|                                   curlx_str(region),
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
 1029|  1.07k|                                   (int)curlx_strlen(service),
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1030|  1.07k|                                   curlx_str(service),
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
 1031|  1.07k|                                   request_type);
 1032|  1.07k|  if(!credential_scope) {
  ------------------
  |  Branch (1032:6): [True: 0, False: 1.07k]
  ------------------
 1033|      0|    curlx_free(request_type);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1034|      0|    return CURLE_OUT_OF_MEMORY;
 1035|      0|  }
 1036|       |
 1037|  1.07k|  if(Curl_sha256it(sha_hash, (const unsigned char *)canonical_request,
  ------------------
  |  Branch (1037:6): [True: 0, False: 1.07k]
  ------------------
 1038|  1.07k|                   strlen(canonical_request))) {
 1039|      0|    curlx_free(request_type);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1040|      0|    curlx_free(credential_scope);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1041|      0|    return CURLE_OUT_OF_MEMORY;
 1042|      0|  }
 1043|       |
 1044|  1.07k|  sha256_to_hex(sha_hex, sha_hash);
 1045|       |
 1046|       |  /*
 1047|       |   * Google allows using RSA key instead of HMAC, so this code might change
 1048|       |   * in the future. For now we only support HMAC.
 1049|       |   */
 1050|  1.07k|  str_to_sign = curl_maprintf("%.*s4-HMAC-SHA256\n" /* Algorithm */
 1051|  1.07k|                              "%s\n" /* RequestDateTime */
 1052|  1.07k|                              "%s\n" /* CredentialScope */
 1053|  1.07k|                              "%s",  /* HashedCanonicalRequest in hex */
 1054|  1.07k|                              (int)curlx_strlen(provider0),
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1055|  1.07k|                              curlx_str(provider0),
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
 1056|  1.07k|                              timestamp,
 1057|  1.07k|                              credential_scope,
 1058|  1.07k|                              sha_hex);
 1059|  1.07k|  if(!str_to_sign) {
  ------------------
  |  Branch (1059:6): [True: 0, False: 1.07k]
  ------------------
 1060|      0|    curlx_free(request_type);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1061|      0|    curlx_free(credential_scope);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1062|      0|    return CURLE_OUT_OF_MEMORY;
 1063|      0|  }
 1064|       |
 1065|       |  /* make provider0 part done uppercase */
 1066|  1.07k|  Curl_strntoupper(str_to_sign, curlx_str(provider0),
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
 1067|  1.07k|                   curlx_strlen(provider0));
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1068|       |
 1069|  1.07k|  infof(data, "aws_sigv4: String to sign (enclosed in []) - [%s]",
  ------------------
  |  |  143|  1.07k|  do {                               \
  |  |  144|  1.07k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  1.07k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1.07k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.07k]
  |  |  |  |  ------------------
  |  |  |  |  323|  1.07k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.07k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
 1070|  1.07k|        str_to_sign);
 1071|       |
 1072|  1.07k|  *request_type_out = request_type;
 1073|  1.07k|  *credential_scope_out = credential_scope;
 1074|  1.07k|  *str_to_sign_out = str_to_sign;
 1075|  1.07k|  return CURLE_OK;
 1076|  1.07k|}
http_aws_sigv4.c:sign_and_set_auth_headers:
 1089|  1.07k|{
 1090|  1.07k|  CURLcode result = CURLE_OUT_OF_MEMORY;
 1091|  1.07k|  const char *passwd = Curl_creds_passwd(data->state.creds);
  ------------------
  |  |   82|  1.07k|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 126, False: 944]
  |  |  ------------------
  ------------------
 1092|  1.07k|  char *secret = NULL;
 1093|  1.07k|  unsigned char sign0[CURL_SHA256_DIGEST_LENGTH] = { 0 };
 1094|  1.07k|  unsigned char sign1[CURL_SHA256_DIGEST_LENGTH] = { 0 };
 1095|  1.07k|  char sha_hex[SHA256_HEX_LENGTH];
 1096|  1.07k|  char *auth_headers = NULL;
 1097|  1.07k|  char *user = curl_escape(Curl_creds_user(data->state.creds), 0);
  ------------------
  |  |   81|  1.07k|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 126, False: 944]
  |  |  ------------------
  ------------------
 1098|  1.07k|  if(!user)
  ------------------
  |  Branch (1098:6): [True: 0, False: 1.07k]
  ------------------
 1099|      0|    return CURLE_OUT_OF_MEMORY;
 1100|       |
 1101|  1.07k|  secret = curl_maprintf("%.*s4%s", (int)curlx_strlen(provider0),
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1102|  1.07k|                         curlx_str(provider0), passwd);
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
 1103|  1.07k|  if(!secret)
  ------------------
  |  Branch (1103:6): [True: 0, False: 1.07k]
  ------------------
 1104|      0|    goto fail;
 1105|       |  /* make provider0 part done uppercase */
 1106|  1.07k|  Curl_strntoupper(secret, curlx_str(provider0), curlx_strlen(provider0));
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
                Curl_strntoupper(secret, curlx_str(provider0), curlx_strlen(provider0));
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1107|       |
 1108|  1.07k|  HMAC_SHA256(secret, strlen(secret), date, strlen(date), sign0);
  ------------------
  |  |   42|  1.07k|  do {                                               \
  |  |   43|  1.07k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  1.07k|                         (const unsigned char *)(k), \
  |  |   45|  1.07k|                         kl,                         \
  |  |   46|  1.07k|                         (const unsigned char *)(d), \
  |  |   47|  1.07k|                         dl, o);                     \
  |  |   48|  1.07k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1.07k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  1.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
 1109|  1.07k|  HMAC_SHA256(sign0, sizeof(sign0),
  ------------------
  |  |   42|  1.07k|  do {                                               \
  |  |   43|  1.07k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  1.07k|                         (const unsigned char *)(k), \
  |  |   45|  1.07k|                         kl,                         \
  |  |   46|  1.07k|                         (const unsigned char *)(d), \
  |  |   47|  1.07k|                         dl, o);                     \
  |  |   48|  1.07k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1.07k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  1.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
 1110|  1.07k|              curlx_str(region), curlx_strlen(region), sign1);
 1111|  1.07k|  HMAC_SHA256(sign1, sizeof(sign1),
  ------------------
  |  |   42|  1.07k|  do {                                               \
  |  |   43|  1.07k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  1.07k|                         (const unsigned char *)(k), \
  |  |   45|  1.07k|                         kl,                         \
  |  |   46|  1.07k|                         (const unsigned char *)(d), \
  |  |   47|  1.07k|                         dl, o);                     \
  |  |   48|  1.07k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1.07k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  1.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
 1112|  1.07k|              curlx_str(service), curlx_strlen(service), sign0);
 1113|  1.07k|  HMAC_SHA256(sign0, sizeof(sign0),
  ------------------
  |  |   42|  1.07k|  do {                                               \
  |  |   43|  1.07k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  1.07k|                         (const unsigned char *)(k), \
  |  |   45|  1.07k|                         kl,                         \
  |  |   46|  1.07k|                         (const unsigned char *)(d), \
  |  |   47|  1.07k|                         dl, o);                     \
  |  |   48|  1.07k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1.07k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  1.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
 1114|  1.07k|              request_type, strlen(request_type), sign1);
 1115|  1.07k|  HMAC_SHA256(sign1, sizeof(sign1),
  ------------------
  |  |   42|  1.07k|  do {                                               \
  |  |   43|  1.07k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  1.07k|                         (const unsigned char *)(k), \
  |  |   45|  1.07k|                         kl,                         \
  |  |   46|  1.07k|                         (const unsigned char *)(d), \
  |  |   47|  1.07k|                         dl, o);                     \
  |  |   48|  1.07k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1.07k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  1.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
 1116|  1.07k|              str_to_sign, strlen(str_to_sign), sign0);
 1117|       |
 1118|  1.07k|  sha256_to_hex(sha_hex, sign0);
 1119|       |
 1120|  1.07k|  infof(data, "aws_sigv4: Signature - %s", sha_hex);
  ------------------
  |  |  143|  1.07k|  do {                               \
  |  |  144|  1.07k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  1.07k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1.07k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.07k]
  |  |  |  |  ------------------
  |  |  |  |  323|  1.07k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.07k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.07k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.07k]
  |  |  ------------------
  ------------------
 1121|       |
 1122|  1.07k|  auth_headers = curl_maprintf("Authorization: %.*s4-HMAC-SHA256 "
 1123|  1.07k|                               "Credential=%s/%s, "
 1124|  1.07k|                               "SignedHeaders=%s, "
 1125|  1.07k|                               "Signature=%s\r\n"
 1126|  1.07k|                               "%s"
 1127|  1.07k|                               "%s%s",
 1128|  1.07k|                               (int)curlx_strlen(provider0),
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1129|  1.07k|                               curlx_str(provider0),
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
 1130|  1.07k|                               user,
 1131|  1.07k|                               credential_scope,
 1132|  1.07k|                               curlx_dyn_ptr(signed_headers),
 1133|  1.07k|                               sha_hex,
 1134|       |                               /*
 1135|       |                                * date_header is added here, only if it was not
 1136|       |                                * user-specified (using CURLOPT_HTTPHEADER).
 1137|       |                                * date_header includes \r\n
 1138|       |                                */
 1139|  1.07k|                               date_header ? date_header : "",
  ------------------
  |  Branch (1139:32): [True: 1.04k, False: 26]
  ------------------
 1140|  1.07k|                               content_sha256_hdr,
 1141|  1.07k|                               content_sha256_hdr[0] ? "\r\n": "");
  ------------------
  |  Branch (1141:32): [True: 3, False: 1.06k]
  ------------------
 1142|  1.07k|  if(!auth_headers)
  ------------------
  |  Branch (1142:6): [True: 0, False: 1.07k]
  ------------------
 1143|      0|    goto fail;
 1144|       |
 1145|       |  /* provider 0 uppercase */
 1146|  1.07k|  Curl_strntoupper(&auth_headers[CURL_CSTRLEN("Authorization: ")],
  ------------------
  |  | 1296|  1.07k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
 1147|  1.07k|                   curlx_str(provider0), curlx_strlen(provider0));
  ------------------
  |  |   49|  1.07k|#define curlx_str(x)    ((x)->str)
  ------------------
                                 curlx_str(provider0), curlx_strlen(provider0));
  ------------------
  |  |   50|  1.07k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1148|       |
 1149|  1.07k|  curlx_free(data->req.hd_auth);
  ------------------
  |  | 1478|  1.07k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1150|  1.07k|  data->req.hd_auth = auth_headers;
 1151|  1.07k|  data->state.authhost.done = TRUE;
  ------------------
  |  | 1053|  1.07k|#define TRUE true
  ------------------
 1152|  1.07k|  result = CURLE_OK;
 1153|       |
 1154|  1.07k|fail:
 1155|  1.07k|  curlx_free(user);
  ------------------
  |  | 1478|  1.07k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1156|  1.07k|  curlx_free(secret);
  ------------------
  |  | 1478|  1.07k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1157|  1.07k|  return result;
 1158|  1.07k|}

Curl_httpchunk_init:
   75|  1.60k|{
   76|  1.60k|  (void)data;
   77|  1.60k|  ch->hexindex = 0;      /* start at 0 */
   78|  1.60k|  ch->state = CHUNK_HEX; /* we get hex first! */
   79|  1.60k|  ch->last_code = CHUNKE_OK;
   80|  1.60k|  curlx_dyn_init(&ch->trailer, DYN_H1_TRAILER);
  ------------------
  |  |   75|  1.60k|#define DYN_H1_TRAILER      4096
  ------------------
   81|  1.60k|  ch->ignore_body = ignore_body;
   82|  1.60k|}
Curl_httpchunk_free:
   96|  1.60k|{
   97|  1.60k|  (void)data;
   98|  1.60k|  curlx_dyn_free(&ch->trailer);
   99|  1.60k|}

Curl_output_digest:
   88|      2|{
   89|      2|  CURLcode result;
   90|      2|  char *response;
   91|      2|  size_t len;
   92|      2|  bool have_chlg;
   93|       |
   94|       |  /* Point to the address of the pointer that holds the string to send to the
   95|       |     server, which is for a plain host or for an HTTP proxy */
   96|      2|  char **allocuserpwd;
   97|       |
   98|       |  /* Point to the name and password for this */
   99|      2|  struct Curl_creds *creds = NULL;
  100|       |
  101|       |  /* Point to the correct struct with this */
  102|      2|  struct digestdata *digest;
  103|      2|  struct auth *authp;
  104|       |
  105|      2|  if(proxy) {
  ------------------
  |  Branch (105:6): [True: 1, False: 1]
  ------------------
  106|       |#ifdef CURL_DISABLE_PROXY
  107|       |    return CURLE_NOT_BUILT_IN;
  108|       |#else
  109|      1|    digest = &data->state.proxydigest;
  110|      1|    digest_flush_stale(digest, data->conn->http_proxy.peer,
  111|      1|                       data->conn->http_proxy.creds);
  112|      1|    allocuserpwd = &data->req.hd_proxy_auth;
  113|      1|    creds = data->conn->http_proxy.creds;
  114|      1|    authp = &data->state.authproxy;
  115|      1|#endif
  116|      1|  }
  117|      1|  else {
  118|      1|    DEBUGASSERT(data->state.origin);
  ------------------
  |  | 1079|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (118:5): [True: 0, False: 1]
  |  Branch (118:5): [True: 1, False: 0]
  ------------------
  119|      1|    digest = &data->state.digest;
  120|      1|    digest_flush_stale(digest, data->state.origin, data->state.creds);
  121|      1|    allocuserpwd = &data->req.hd_auth;
  122|      1|    creds = data->state.creds;
  123|      1|    authp = &data->state.authhost;
  124|      1|  }
  125|       |
  126|      2|  curlx_safefree(*allocuserpwd);
  ------------------
  |  | 1336|      2|  do {                      \
  |  | 1337|      2|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      2|    (ptr) = NULL;           \
  |  | 1339|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  127|       |
  128|       |#ifdef USE_WINDOWS_SSPI
  129|       |  have_chlg = !!digest->input_token;
  130|       |#else
  131|      2|  have_chlg = !!digest->nonce;
  132|      2|#endif
  133|       |
  134|      2|  if(!have_chlg) {
  ------------------
  |  Branch (134:6): [True: 2, False: 0]
  ------------------
  135|      2|    authp->done = FALSE;
  ------------------
  |  | 1056|      2|#define FALSE false
  ------------------
  136|      2|    return CURLE_OK;
  137|      2|  }
  138|       |
  139|      0|  result = Curl_auth_create_digest_http_message(data, creds, request,
  140|      0|                                                uripath, digest,
  141|      0|                                                &response, &len);
  142|      0|  if(result)
  ------------------
  |  Branch (142:6): [True: 0, False: 0]
  ------------------
  143|      0|    return result;
  144|       |
  145|      0|  *allocuserpwd = curl_maprintf("%sAuthorization: Digest %s\r\n",
  146|      0|                                proxy ? "Proxy-" : "", response);
  ------------------
  |  Branch (146:33): [True: 0, False: 0]
  ------------------
  147|      0|  curlx_free(response);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  148|      0|  if(!*allocuserpwd)
  ------------------
  |  Branch (148:6): [True: 0, False: 0]
  ------------------
  149|      0|    return CURLE_OUT_OF_MEMORY;
  150|       |
  151|      0|  authp->done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  152|       |
  153|      0|  return CURLE_OK;
  154|      0|}
Curl_http_auth_cleanup_digest:
  157|  26.2k|{
  158|  26.2k|  Curl_auth_digest_cleanup(&data->state.digest);
  159|  26.2k|  Curl_auth_digest_cleanup(&data->state.proxydigest);
  160|  26.2k|}
http_digest.c:digest_flush_stale:
   69|      2|{
   70|      2|  bool flush = FALSE;
  ------------------
  |  | 1056|      2|#define FALSE false
  ------------------
   71|      2|  if(digest->origin && !Curl_peer_same_destination(peer, digest->origin))
  ------------------
  |  Branch (71:6): [True: 0, False: 2]
  |  Branch (71:24): [True: 0, False: 0]
  ------------------
   72|      0|    flush = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
   73|      2|  else if(digest->creds && !Curl_creds_same(creds, digest->creds))
  ------------------
  |  Branch (73:11): [True: 0, False: 2]
  |  Branch (73:28): [True: 0, False: 0]
  ------------------
   74|      0|    flush = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
   75|       |
   76|      2|  if(flush)
  ------------------
  |  Branch (76:6): [True: 0, False: 2]
  ------------------
   77|       |    /* flush Digest state */
   78|      0|    Curl_auth_digest_cleanup(digest);
   79|       |
   80|      2|  Curl_peer_link(&digest->origin, peer);
   81|      2|  Curl_creds_link(&digest->creds, creds);
   82|      2|}

Curl_http_proxy_create_tunnel_request:
  444|  1.60k|{
  445|  1.60k|  CURLcode result;
  446|       |
  447|  1.60k|  if(udp_tunnel)
  ------------------
  |  Branch (447:6): [True: 0, False: 1.60k]
  ------------------
  448|      0|    result = http_proxy_create_CONNECTUDP(preq, cf, data, dest, ver);
  449|  1.60k|  else
  450|  1.60k|    result = http_proxy_create_CONNECT(preq, cf, data, dest, ver);
  451|  1.60k|  if(result)
  ------------------
  |  Branch (451:6): [True: 13, False: 1.58k]
  ------------------
  452|     13|    return result;
  453|       |
  454|  1.58k|  if(udp_tunnel)
  ------------------
  |  Branch (454:6): [True: 0, False: 1.58k]
  ------------------
  455|      0|    infof(data, "Establishing %s proxy UDP tunnel to %s:%u",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  456|  1.58k|          (ver == PROXY_HTTP_V2) ? "HTTP/2" :
  457|  1.58k|          (ver == PROXY_HTTP_V3) ? "HTTP/3" : "HTTP",
  458|  1.58k|          dest->user_hostname, dest->port);
  459|  1.58k|  else
  460|  1.58k|    infof(data, "Establishing %s proxy tunnel to %s",
  ------------------
  |  |  143|  1.58k|  do {                               \
  |  |  144|  1.58k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  1.58k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1.58k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.58k]
  |  |  |  |  ------------------
  |  |  |  |  323|  1.58k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.58k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  1.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.58k]
  |  |  ------------------
  ------------------
  461|  1.58k|          (ver == PROXY_HTTP_V2) ? "HTTP/2" :
  462|  1.58k|          (ver == PROXY_HTTP_V3) ? "HTTP/3" : "HTTP",
  463|  1.58k|          (*preq)->authority);
  464|  1.58k|  return CURLE_OK;
  465|  1.60k|}
Curl_cf_http_proxy_insert_after:
  738|  2.03k|{
  739|  2.03k|  struct Curl_cfilter *cf;
  740|  2.03k|  struct cf_proxy_ctx *ctx = NULL;
  741|  2.03k|  CURLcode result;
  742|       |
  743|  2.03k|  (void)data;
  744|  2.03k|  if(!peer || !tunnel_peer)
  ------------------
  |  Branch (744:6): [True: 0, False: 2.03k]
  |  Branch (744:15): [True: 0, False: 2.03k]
  ------------------
  745|      0|    return CURLE_FAILED_INIT;
  746|       |
  747|  2.03k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|  2.03k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  748|  2.03k|  if(!ctx) {
  ------------------
  |  Branch (748:6): [True: 0, False: 2.03k]
  ------------------
  749|      0|    result = CURLE_OUT_OF_MEMORY;
  750|      0|    goto out;
  751|      0|  }
  752|  2.03k|  Curl_peer_link(&ctx->peer, peer);
  753|  2.03k|  Curl_peer_link(&ctx->tunnel_peer, tunnel_peer);
  754|  2.03k|  ctx->proxytype = proxytype;
  755|  2.03k|  ctx->tunnel_transport = tunnel_transport;
  756|       |
  757|  2.03k|  result = Curl_cf_create(&cf, &Curl_cft_http_proxy, ctx);
  758|  2.03k|  if(result)
  ------------------
  |  Branch (758:6): [True: 0, False: 2.03k]
  ------------------
  759|      0|    goto out;
  760|  2.03k|  ctx = NULL;
  761|  2.03k|  Curl_conn_cf_insert_after(cf_at, cf);
  762|       |
  763|  2.03k|out:
  764|  2.03k|  cf_https_proxy_ctx_free(ctx);
  765|  2.03k|  return result;
  766|  2.03k|}
Curl_http_proxy_transport:
  769|  2.06k|{
  770|  2.06k|  switch(proxytype) {
  771|      0|  case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|      0|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (771:3): [True: 0, False: 2.06k]
  ------------------
  772|      0|    return TRNSPRT_QUIC;
  ------------------
  |  |  239|      0|#define TRNSPRT_QUIC 5
  ------------------
  773|  2.06k|  default:
  ------------------
  |  Branch (773:3): [True: 2.06k, False: 0]
  ------------------
  774|  2.06k|    return TRNSPRT_TCP;
  ------------------
  |  |  237|  2.06k|#define TRNSPRT_TCP  3
  ------------------
  775|  2.06k|  }
  776|  2.06k|}
http_proxy.c:proxy_http_ver_major:
  185|  1.60k|{
  186|  1.60k|  switch(ver) {
  ------------------
  |  Branch (186:10): [True: 1.60k, False: 0]
  ------------------
  187|  1.60k|  case PROXY_HTTP_V1:
  ------------------
  |  Branch (187:3): [True: 1.60k, False: 0]
  ------------------
  188|  1.60k|    return 11;
  189|      0|  case PROXY_HTTP_V2:
  ------------------
  |  Branch (189:3): [True: 0, False: 1.60k]
  ------------------
  190|      0|    return 20;
  191|      0|  case PROXY_HTTP_V3:
  ------------------
  |  Branch (191:3): [True: 0, False: 1.60k]
  ------------------
  192|      0|    return 30;
  193|  1.60k|  }
  194|      0|  return 0;
  195|  1.60k|}
http_proxy.c:dynhds_add_custom:
   44|  1.58k|{
   45|  1.58k|  struct connectdata *conn = data->conn;
   46|  1.58k|  struct curl_slist *h[2];
   47|  1.58k|  struct curl_slist *headers;
   48|  1.58k|  int numlists = 1; /* by default */
   49|  1.58k|  int i;
   50|       |
   51|  1.58k|  enum Curl_proxy_use proxy;
   52|       |
   53|  1.58k|  if(is_connect && !is_udp)
  ------------------
  |  Branch (53:6): [True: 1.58k, False: 0]
  |  Branch (53:20): [True: 1.58k, False: 0]
  ------------------
   54|  1.58k|    proxy = HEADER_CONNECT;
   55|      0|  else if(is_connect && is_udp)
  ------------------
  |  Branch (55:11): [True: 0, False: 0]
  |  Branch (55:25): [True: 0, False: 0]
  ------------------
   56|      0|    proxy = HEADER_CONNECT_UDP;
   57|      0|  else
   58|      0|    proxy = conn->bits.origin_is_proxy ? HEADER_PROXY : HEADER_SERVER;
  ------------------
  |  Branch (58:13): [True: 0, False: 0]
  ------------------
   59|       |
   60|  1.58k|  switch(proxy) {
  ------------------
  |  Branch (60:10): [True: 1.58k, False: 0]
  ------------------
   61|      0|  case HEADER_SERVER:
  ------------------
  |  Branch (61:3): [True: 0, False: 1.58k]
  ------------------
   62|      0|    h[0] = data->set.headers;
   63|      0|    break;
   64|      0|  case HEADER_PROXY:
  ------------------
  |  Branch (64:3): [True: 0, False: 1.58k]
  ------------------
   65|      0|    h[0] = data->set.headers;
   66|      0|    if(data->set.sep_headers) {
  ------------------
  |  Branch (66:8): [True: 0, False: 0]
  ------------------
   67|      0|      h[1] = data->set.proxyheaders;
   68|      0|      numlists++;
   69|      0|    }
   70|      0|    break;
   71|  1.58k|  case HEADER_CONNECT:
  ------------------
  |  Branch (71:3): [True: 1.58k, False: 0]
  ------------------
   72|  1.58k|    if(data->set.sep_headers)
  ------------------
  |  Branch (72:8): [True: 1.36k, False: 223]
  ------------------
   73|  1.36k|      h[0] = data->set.proxyheaders;
   74|    223|    else
   75|    223|      h[0] = data->set.headers;
   76|  1.58k|    break;
   77|      0|  case HEADER_CONNECT_UDP:
  ------------------
  |  Branch (77:3): [True: 0, False: 1.58k]
  ------------------
   78|      0|    if(data->set.sep_headers)
  ------------------
  |  Branch (78:8): [True: 0, False: 0]
  ------------------
   79|      0|      h[0] = data->set.proxyheaders;
   80|      0|    else
   81|      0|      h[0] = data->set.headers;
   82|      0|    break;
   83|  1.58k|  }
   84|       |
   85|       |  /* loop through one or two lists */
   86|  3.17k|  for(i = 0; i < numlists; i++) {
  ------------------
  |  Branch (86:14): [True: 1.58k, False: 1.58k]
  ------------------
   87|  34.1k|    for(headers = h[i]; headers; headers = headers->next) {
  ------------------
  |  Branch (87:25): [True: 32.5k, False: 1.58k]
  ------------------
   88|  32.5k|      struct Curl_str name;
   89|  32.5k|      const char *value = NULL;
   90|  32.5k|      size_t valuelen = 0;
   91|  32.5k|      const char *ptr = headers->data;
   92|       |
   93|       |      /* There are 2 quirks in place for custom headers:
   94|       |       * 1. setting only 'name:' to suppress a header from being sent
   95|       |       * 2. setting only 'name;' to send an empty (illegal) header
   96|       |       */
   97|  32.5k|      if(!curlx_str_cspn(&ptr, &name, ";:")) {
  ------------------
  |  Branch (97:10): [True: 31.7k, False: 873]
  ------------------
   98|  31.7k|        if(!curlx_str_single(&ptr, ':')) {
  ------------------
  |  Branch (98:12): [True: 28.3k, False: 3.41k]
  ------------------
   99|  28.3k|          curlx_str_passblanks(&ptr);
  100|  28.3k|          if(*ptr) {
  ------------------
  |  Branch (100:14): [True: 28.1k, False: 179]
  ------------------
  101|  28.1k|            value = ptr;
  102|  28.1k|            valuelen = strlen(value);
  103|  28.1k|          }
  104|    179|          else {
  105|       |            /* quirk #1, suppress this header */
  106|    179|            continue;
  107|    179|          }
  108|  28.3k|        }
  109|  3.41k|        else if(!curlx_str_single(&ptr, ';')) {
  ------------------
  |  Branch (109:17): [True: 2.66k, False: 747]
  ------------------
  110|  2.66k|          curlx_str_passblanks(&ptr);
  111|  2.66k|          if(!*ptr) {
  ------------------
  |  Branch (111:14): [True: 1.17k, False: 1.48k]
  ------------------
  112|       |            /* quirk #2, send an empty header */
  113|  1.17k|            value = "";
  114|  1.17k|            valuelen = 0;
  115|  1.17k|          }
  116|  1.48k|          else {
  117|       |            /* this may be used for something else in the future,
  118|       |             * ignore this for now */
  119|  1.48k|            continue;
  120|  1.48k|          }
  121|  2.66k|        }
  122|    747|        else
  123|       |          /* neither : nor ; in provided header value. We ignore this
  124|       |           * silently */
  125|    747|          continue;
  126|  31.7k|      }
  127|    873|      else
  128|       |        /* no name, move on */
  129|    873|        continue;
  130|       |
  131|  29.3k|      DEBUGASSERT(curlx_strlen(&name) && value);
  ------------------
  |  | 1079|  29.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (131:7): [True: 0, False: 29.3k]
  |  Branch (131:7): [True: 0, False: 0]
  |  Branch (131:7): [True: 29.3k, False: 0]
  |  Branch (131:7): [True: 29.3k, False: 0]
  ------------------
  132|       |      /* trim surrounding whitespace so a padded field name (e.g.
  133|       |         `Authorization :`) cannot slip past the Authorization/Cookie check */
  134|  29.3k|      curlx_str_trimblanks(&name);
  135|  29.3k|      if(data->state.aptr.host &&
  ------------------
  |  Branch (135:10): [True: 0, False: 29.3k]
  ------------------
  136|       |         /* a Host: header was sent already, do not pass on any custom Host:
  137|       |            header as that will produce *two* in the same request! */
  138|      0|         curlx_str_casecompare(&name, "Host"))
  ------------------
  |  Branch (138:10): [True: 0, False: 0]
  ------------------
  139|      0|        ;
  140|  29.3k|      else if(data->state.httpreq == HTTPREQ_POST_FORM &&
  ------------------
  |  Branch (140:15): [True: 194, False: 29.1k]
  ------------------
  141|       |              /* this header (extended by formdata.c) is sent later */
  142|    194|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (142:15): [True: 0, False: 194]
  ------------------
  143|      0|        ;
  144|  29.3k|      else if(data->state.httpreq == HTTPREQ_POST_MIME &&
  ------------------
  |  Branch (144:15): [True: 22.4k, False: 6.86k]
  ------------------
  145|       |              /* this header is sent later */
  146|  22.4k|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (146:15): [True: 0, False: 22.4k]
  ------------------
  147|      0|        ;
  148|  29.3k|      else if(data->req.authneg &&
  ------------------
  |  Branch (148:15): [True: 0, False: 29.3k]
  ------------------
  149|       |              /* while doing auth neg, do not allow the custom length since
  150|       |                 we will force length zero then */
  151|      0|              curlx_str_casecompare(&name, "Content-Length"))
  ------------------
  |  Branch (151:15): [True: 0, False: 0]
  ------------------
  152|      0|        ;
  153|  29.3k|      else if((httpversion >= 20) &&
  ------------------
  |  Branch (153:15): [True: 0, False: 29.3k]
  ------------------
  154|      0|              curlx_str_casecompare(&name, "Transfer-Encoding"))
  ------------------
  |  Branch (154:15): [True: 0, False: 0]
  ------------------
  155|      0|        ;
  156|       |      /* HTTP/2 and HTTP/3 do not support chunked requests */
  157|  29.3k|      else if((curlx_str_casecompare(&name, "Authorization") ||
  ------------------
  |  Branch (157:16): [True: 0, False: 29.3k]
  ------------------
  158|  29.3k|               curlx_str_casecompare(&name, "Cookie")) &&
  ------------------
  |  Branch (158:16): [True: 53, False: 29.2k]
  ------------------
  159|       |              /* be careful of sending this potentially sensitive header to
  160|       |                 other hosts */
  161|     53|              !Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (161:15): [True: 0, False: 53]
  ------------------
  162|      0|        ;
  163|  29.3k|      else {
  164|  29.3k|        CURLcode result =
  165|  29.3k|          Curl_dynhds_add(hds, curlx_str(&name), curlx_strlen(&name),
  ------------------
  |  |   49|  29.3k|#define curlx_str(x)    ((x)->str)
  ------------------
                        Curl_dynhds_add(hds, curlx_str(&name), curlx_strlen(&name),
  ------------------
  |  |   50|  29.3k|#define curlx_strlen(x) ((x)->len)
  ------------------
  166|  29.3k|                          value, valuelen);
  167|  29.3k|        if(result)
  ------------------
  |  Branch (167:12): [True: 0, False: 29.3k]
  ------------------
  168|      0|          return result;
  169|  29.3k|      }
  170|  29.3k|    }
  171|  1.58k|  }
  172|       |
  173|  1.58k|  return CURLE_OK;
  174|  1.58k|}
http_proxy.c:http_proxy_create_CONNECT:
  202|  1.60k|{
  203|  1.60k|  char *authority = NULL;
  204|  1.60k|  int httpversion = proxy_http_ver_major(ver);
  205|  1.60k|  CURLcode result;
  206|  1.60k|  struct httpreq *req = NULL;
  207|       |
  208|  1.60k|  authority = curl_maprintf("%s%s%s:%u",
  209|  1.60k|                            dest->ipv6 ? "[" : "",
  ------------------
  |  Branch (209:29): [True: 0, False: 1.60k]
  ------------------
  210|  1.60k|                            dest->hostname,
  211|  1.60k|                            dest->ipv6 ? "]" : "",
  ------------------
  |  Branch (211:29): [True: 0, False: 1.60k]
  ------------------
  212|  1.60k|                            dest->port);
  213|  1.60k|  if(!authority) {
  ------------------
  |  Branch (213:6): [True: 0, False: 1.60k]
  ------------------
  214|      0|    result = CURLE_OUT_OF_MEMORY;
  215|      0|    goto out;
  216|      0|  }
  217|       |
  218|  1.60k|  result = Curl_http_req_make(&req, "CONNECT", CURL_CSTRLEN("CONNECT"),
  ------------------
  |  | 1296|  1.60k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  219|  1.60k|                              NULL, 0, authority, strlen(authority),
  220|  1.60k|                              NULL, 0);
  221|  1.60k|  if(result)
  ------------------
  |  Branch (221:6): [True: 0, False: 1.60k]
  ------------------
  222|      0|    goto out;
  223|       |
  224|       |  /* Setup the proxy-authorization header, if any */
  225|  1.60k|  result = Curl_http_output_auth(data, cf->conn, req->method, HTTPREQ_GET,
  226|  1.60k|                                 req->authority, NULL, TRUE);
  ------------------
  |  | 1053|  1.60k|#define TRUE true
  ------------------
  227|  1.60k|  if(result)
  ------------------
  |  Branch (227:6): [True: 13, False: 1.58k]
  ------------------
  228|     13|    goto out;
  229|       |
  230|       |  /* If user is not overriding Host: header, we add for HTTP/1.x */
  231|  1.58k|  if(ver == PROXY_HTTP_V1 &&
  ------------------
  |  Branch (231:6): [True: 1.58k, False: 0]
  ------------------
  232|  1.58k|     !Curl_checkProxyheaders(data, cf->conn, STRCONST("Host"))) {
  ------------------
  |  | 1301|  1.58k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.58k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (232:6): [True: 1.58k, False: 2]
  ------------------
  233|  1.58k|    result = Curl_dynhds_cadd(&req->headers, "Host", authority);
  234|  1.58k|    if(result)
  ------------------
  |  Branch (234:8): [True: 0, False: 1.58k]
  ------------------
  235|      0|      goto out;
  236|  1.58k|  }
  237|       |
  238|  1.58k|  if(data->req.hd_proxy_auth) {
  ------------------
  |  Branch (238:6): [True: 1.29k, False: 290]
  ------------------
  239|  1.29k|    result = Curl_dynhds_h1_cadd_line(&req->headers,
  240|  1.29k|                                      data->req.hd_proxy_auth);
  241|  1.29k|    if(result)
  ------------------
  |  Branch (241:8): [True: 0, False: 1.29k]
  ------------------
  242|      0|      goto out;
  243|  1.29k|  }
  244|       |
  245|  1.58k|  if(!Curl_checkProxyheaders(data, cf->conn, STRCONST("User-Agent")) &&
  ------------------
  |  | 1301|  1.58k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.58k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (245:6): [True: 1.58k, False: 0]
  ------------------
  246|  1.58k|     data->set.str[STRING_USERAGENT] && *data->set.str[STRING_USERAGENT]) {
  ------------------
  |  Branch (246:6): [True: 6, False: 1.58k]
  |  Branch (246:41): [True: 5, False: 1]
  ------------------
  247|      5|    result = Curl_dynhds_cadd(&req->headers, "User-Agent",
  248|      5|                              data->set.str[STRING_USERAGENT]);
  249|      5|    if(result)
  ------------------
  |  Branch (249:8): [True: 0, False: 5]
  ------------------
  250|      0|      goto out;
  251|      5|  }
  252|       |
  253|  1.58k|  if(ver == PROXY_HTTP_V1 &&
  ------------------
  |  Branch (253:6): [True: 1.58k, False: 0]
  ------------------
  254|  1.58k|     !Curl_checkProxyheaders(data, cf->conn, STRCONST("Proxy-Connection"))) {
  ------------------
  |  | 1301|  1.58k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|  1.58k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (254:6): [True: 1.58k, False: 0]
  ------------------
  255|  1.58k|    result = Curl_dynhds_cadd(&req->headers, "Proxy-Connection", "Keep-Alive");
  256|  1.58k|    if(result)
  ------------------
  |  Branch (256:8): [True: 0, False: 1.58k]
  ------------------
  257|      0|      goto out;
  258|  1.58k|  }
  259|       |
  260|  1.58k|  result = dynhds_add_custom(data, TRUE, httpversion,
  ------------------
  |  | 1053|  1.58k|#define TRUE true
  ------------------
  261|  1.58k|                             FALSE, &req->headers);
  ------------------
  |  | 1056|  1.58k|#define FALSE false
  ------------------
  262|       |
  263|  1.60k|out:
  264|  1.60k|  if(result && req) {
  ------------------
  |  Branch (264:6): [True: 13, False: 1.58k]
  |  Branch (264:16): [True: 13, False: 0]
  ------------------
  265|     13|    Curl_http_req_free(req);
  266|     13|    req = NULL;
  267|     13|  }
  268|  1.60k|  curlx_free(authority);
  ------------------
  |  | 1478|  1.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  269|  1.60k|  *preq = req;
  270|  1.60k|  return result;
  271|  1.58k|}
http_proxy.c:http_proxy_cf_destroy:
  707|  2.03k|{
  708|  2.03k|  struct cf_proxy_ctx *ctx = cf->ctx;
  709|  2.03k|  if(ctx) {
  ------------------
  |  Branch (709:6): [True: 2.03k, False: 0]
  ------------------
  710|  2.03k|    CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  2.03k|  do {                                          \
  |  |  154|  2.03k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  2.03k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  4.06k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2.03k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  4.06k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.03k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.03k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.03k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.03k]
  |  |  ------------------
  ------------------
  711|  2.03k|    cf_https_proxy_ctx_free(ctx);
  712|  2.03k|  }
  713|  2.03k|}
http_proxy.c:http_proxy_cf_connect:
  559|  2.68k|{
  560|  2.68k|  struct cf_proxy_ctx *ctx = cf->ctx;
  561|  2.68k|  CURLcode result;
  562|  2.68k|  bool udp_tunnel = TRNSPRT_IS_DGRAM(ctx->tunnel_transport);
  ------------------
  |  |  242|  2.68k|#define TRNSPRT_IS_DGRAM(x)   (((x) == TRNSPRT_UDP) || ((x) == TRNSPRT_QUIC))
  |  |  ------------------
  |  |  |  |  238|  2.68k|#define TRNSPRT_UDP  4
  |  |  ------------------
  |  |               #define TRNSPRT_IS_DGRAM(x)   (((x) == TRNSPRT_UDP) || ((x) == TRNSPRT_QUIC))
  |  |  ------------------
  |  |  |  |  239|  2.68k|#define TRNSPRT_QUIC 5
  |  |  ------------------
  |  |  |  Branch (242:32): [True: 0, False: 2.68k]
  |  |  |  Branch (242:56): [True: 0, False: 2.68k]
  |  |  ------------------
  ------------------
  563|  2.68k|  const char *tunnel_type = udp_tunnel ? "CONNECT-UDP" : "CONNECT";
  ------------------
  |  Branch (563:29): [True: 0, False: 2.68k]
  ------------------
  564|       |
  565|  2.68k|  if(cf->connected) {
  ------------------
  |  Branch (565:6): [True: 0, False: 2.68k]
  ------------------
  566|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  567|      0|    return CURLE_OK;
  568|      0|  }
  569|       |
  570|  2.68k|  CURL_TRC_CF(data, cf, "%s", tunnel_type);
  ------------------
  |  |  153|  2.68k|  do {                                          \
  |  |  154|  2.68k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  2.68k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  5.37k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2.68k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  5.37k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.68k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.68k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.68k]
  |  |  ------------------
  ------------------
  571|  4.28k|connect_sub:
  572|       |  /* in case of h3_proxy, cf->next will be NULL initially */
  573|  4.28k|  if(cf->next) {
  ------------------
  |  Branch (573:6): [True: 4.28k, False: 0]
  ------------------
  574|  4.28k|    result = cf->next->cft->do_connect(cf->next, data, done);
  575|  4.28k|    if(result || !*done)
  ------------------
  |  Branch (575:8): [True: 2.01k, False: 2.27k]
  |  Branch (575:18): [True: 665, False: 1.60k]
  ------------------
  576|  2.68k|      return result;
  577|  4.28k|  }
  578|       |
  579|  1.60k|  *done = FALSE;
  ------------------
  |  | 1056|  1.60k|#define FALSE false
  ------------------
  580|  1.60k|  if(!ctx->sub_filter_installed) {
  ------------------
  |  Branch (580:6): [True: 1.60k, False: 5]
  ------------------
  581|  1.60k|    const char *alpn = NULL;
  582|       |
  583|       |    /* in case of h3_proxy, cf->next will be NULL initially */
  584|  1.60k|    if(cf->next) {
  ------------------
  |  Branch (584:8): [True: 1.60k, False: 0]
  ------------------
  585|  1.60k|      alpn = Curl_conn_cf_get_alpn_negotiated(cf->next, data);
  586|  1.60k|    }
  587|       |
  588|  1.60k|    if(alpn)
  ------------------
  |  Branch (588:8): [True: 0, False: 1.60k]
  ------------------
  589|      0|      infof(data, "%s: '%s' negotiated", tunnel_type, alpn);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  590|  1.60k|    else if(!alpn) {
  ------------------
  |  Branch (590:13): [True: 1.60k, False: 0]
  ------------------
  591|       |      /* No ALPN, proxytype rules. Fake ALPN */
  592|  1.60k|      infof(data, "%s: no ALPN negotiated", tunnel_type);
  ------------------
  |  |  143|  1.60k|  do {                               \
  |  |  144|  1.60k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  1.60k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1.60k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.60k]
  |  |  |  |  ------------------
  |  |  |  |  323|  1.60k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.60k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.60k]
  |  |  ------------------
  ------------------
  593|  1.60k|      switch(ctx->proxytype) {
  594|      1|      case CURLPROXY_HTTP_1_0:
  ------------------
  |  |  792|      1|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (594:7): [True: 1, False: 1.59k]
  ------------------
  595|      1|        alpn = "http/1.0";
  596|      1|        break;
  597|      0|      case CURLPROXY_HTTPS2:
  ------------------
  |  |  796|      0|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (597:7): [True: 0, False: 1.60k]
  ------------------
  598|      0|        alpn = "h2";
  599|      0|        break;
  600|      0|      case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|      0|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (600:7): [True: 0, False: 1.60k]
  ------------------
  601|      0|        alpn = "h3";
  602|      0|        break;
  603|  1.59k|      default:
  ------------------
  |  Branch (603:7): [True: 1.59k, False: 1]
  ------------------
  604|  1.59k|        alpn = "http/1.1";
  605|  1.59k|        break;
  606|  1.60k|      }
  607|  1.60k|    }
  608|       |
  609|  1.60k|    if(!strcmp(alpn, "http/1.0")) {
  ------------------
  |  Branch (609:8): [True: 1, False: 1.59k]
  ------------------
  610|      1|      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/1.0");
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      1|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  611|      1|      result = Curl_cf_h1_proxy_insert_after(cf, data, ctx->tunnel_peer, 10,
  612|      1|                                             udp_tunnel);
  613|      1|      if(result)
  ------------------
  |  Branch (613:10): [True: 0, False: 1]
  ------------------
  614|      0|        goto out;
  615|      1|    }
  616|  1.59k|    else if(!strcmp(alpn, "http/1.1")) {
  ------------------
  |  Branch (616:13): [True: 1.59k, False: 0]
  ------------------
  617|  1.59k|      int httpversion = (ctx->proxytype == CURLPROXY_HTTP_1_0) ? 10 : 11;
  ------------------
  |  |  792|  1.59k|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (617:25): [True: 0, False: 1.59k]
  ------------------
  618|  1.59k|      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/1.%d",
  ------------------
  |  |  153|  1.59k|  do {                                          \
  |  |  154|  1.59k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  1.59k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  3.19k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.59k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  3.19k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.59k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.59k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.59k]
  |  |  ------------------
  ------------------
  619|  1.59k|                  httpversion % 10);
  620|  1.59k|      result = Curl_cf_h1_proxy_insert_after(cf, data, ctx->tunnel_peer,
  621|  1.59k|                                             httpversion, udp_tunnel);
  622|  1.59k|      if(result)
  ------------------
  |  Branch (622:10): [True: 0, False: 1.59k]
  ------------------
  623|      0|        goto out;
  624|  1.59k|    }
  625|      0|#ifdef USE_NGHTTP2
  626|      0|    else if(!strcmp(alpn, "h2")) {
  ------------------
  |  Branch (626:13): [True: 0, False: 0]
  ------------------
  627|      0|      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/2");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  628|      0|      result = Curl_cf_h2_proxy_insert_after(cf, data, ctx->tunnel_peer,
  629|      0|                                             udp_tunnel);
  630|      0|      if(result)
  ------------------
  |  Branch (630:10): [True: 0, False: 0]
  ------------------
  631|      0|        goto out;
  632|      0|    }
  633|      0|#endif /* USE_NGHTTP2 */
  634|       |#if defined(USE_PROXY_HTTP3) && defined(USE_NGHTTP3) && \
  635|       |  defined(USE_NGTCP2) && defined(USE_OPENSSL)
  636|       |    else if(!strcmp(alpn, "h3")) {
  637|       |      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/3");
  638|       |      result = Curl_cf_h3_proxy_insert_after(cf, data, ctx->peer, ctx->peer,
  639|       |                                             ctx->tunnel_peer,
  640|       |                                             ctx->tunnel_transport);
  641|       |      if(result)
  642|       |        goto out;
  643|       |    }
  644|       |#endif /* USE_PROXY_HTTP3 && USE_NGHTTP3 && USE_NGTCP2 && USE_OPENSSL */
  645|      0|    else {
  646|      0|      failf(data, "%s: negotiated ALPN '%s' not supported", tunnel_type, alpn);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  647|      0|      result = CURLE_COULDNT_CONNECT;
  648|      0|      goto out;
  649|      0|    }
  650|       |
  651|  1.60k|    ctx->sub_filter_installed = TRUE;
  ------------------
  |  | 1053|  1.60k|#define TRUE true
  ------------------
  652|       |    /* after we installed the filter "below" us, we call connect
  653|       |     * on out sub-chain again.
  654|       |     */
  655|  1.60k|    goto connect_sub;
  656|  1.60k|  }
  657|      5|  else {
  658|       |    /* subchain connected and we had already installed the protocol filter.
  659|       |     * This means the protocol tunnel is established, we are done. */
  660|      5|    DEBUGASSERT(ctx->sub_filter_installed);
  ------------------
  |  | 1079|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (660:5): [True: 0, False: 5]
  |  Branch (660:5): [True: 5, False: 0]
  ------------------
  661|      5|    result = CURLE_OK;
  662|      5|  }
  663|       |
  664|      5|out:
  665|      5|  if(!result) {
  ------------------
  |  Branch (665:6): [True: 5, False: 0]
  ------------------
  666|      5|    cf->connected = TRUE;
  ------------------
  |  | 1053|      5|#define TRUE true
  ------------------
  667|       |    *done = TRUE;
  ------------------
  |  | 1053|      5|#define TRUE true
  ------------------
  668|      5|  }
  669|      5|  return result;
  670|  1.60k|}
http_proxy.c:cf_http_proxy_query:
  675|  4.71k|{
  676|  4.71k|  struct cf_proxy_ctx *ctx = cf->ctx;
  677|  4.71k|  switch(query) {
  678|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  173|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (678:3): [True: 0, False: 4.71k]
  ------------------
  679|      0|    *pres1 = (int)ctx->tunnel_peer->port;
  680|      0|    *((const char **)pres2) = ctx->tunnel_peer->hostname;
  681|      0|    return CURLE_OK;
  682|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  177|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (682:3): [True: 0, False: 4.71k]
  ------------------
  683|      0|    const char **palpn = pres2;
  684|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (684:5): [True: 0, False: 0]
  |  Branch (684:5): [True: 0, False: 0]
  ------------------
  685|      0|    *palpn = NULL;
  686|      0|    return CURLE_OK;
  687|      0|  }
  688|  4.71k|  default:
  ------------------
  |  Branch (688:3): [True: 4.71k, False: 0]
  ------------------
  689|  4.71k|    break;
  690|  4.71k|  }
  691|  4.71k|  return cf->next ?
  ------------------
  |  Branch (691:10): [True: 4.71k, False: 0]
  ------------------
  692|  4.71k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  693|  4.71k|    CURLE_UNKNOWN_OPTION;
  694|  4.71k|}
http_proxy.c:cf_https_proxy_ctx_free:
  697|  4.06k|{
  698|  4.06k|  if(ctx) {
  ------------------
  |  Branch (698:6): [True: 2.03k, False: 2.03k]
  ------------------
  699|  2.03k|    Curl_peer_unlink(&ctx->peer);
  700|  2.03k|    Curl_peer_unlink(&ctx->tunnel_peer);
  701|  2.03k|    curlx_free(ctx);
  ------------------
  |  | 1478|  2.03k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  702|  2.03k|  }
  703|  4.06k|}

Curl_is_ASCII_str:
  238|  15.9k|{
  239|  15.9k|  if(s && s->len) {
  ------------------
  |  Branch (239:6): [True: 15.9k, False: 0]
  |  Branch (239:11): [True: 15.9k, False: 0]
  ------------------
  240|  15.9k|    const unsigned char *ch = (const unsigned char *)s->str;
  241|  15.9k|    size_t i;
  242|   262k|    for(i = 0; i < s->len; ++i) {
  ------------------
  |  Branch (242:16): [True: 246k, False: 15.7k]
  ------------------
  243|   246k|      if(ch[i] & 0x80)
  ------------------
  |  Branch (243:10): [True: 123, False: 246k]
  ------------------
  244|    123|        return FALSE;
  ------------------
  |  | 1056|    123|#define FALSE false
  ------------------
  245|   246k|    }
  246|  15.9k|  }
  247|  15.7k|  return TRUE;
  ------------------
  |  | 1053|  15.7k|#define TRUE true
  ------------------
  248|  15.9k|}
Curl_idn_decode:
  315|    123|{
  316|    123|  char *d = NULL;
  317|    123|  CURLcode result = idn_decode(input, &d);
  318|    123|#ifdef USE_LIBIDN2
  319|    123|  if(!result) {
  ------------------
  |  Branch (319:6): [True: 0, False: 123]
  ------------------
  320|      0|    char *c = curlx_strdup(d);
  ------------------
  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  321|      0|    idn2_free(d);
  322|      0|    if(c)
  ------------------
  |  Branch (322:8): [True: 0, False: 0]
  ------------------
  323|      0|      d = c;
  324|      0|    else
  325|      0|      result = CURLE_OUT_OF_MEMORY;
  326|      0|  }
  327|    123|#endif
  328|    123|  if(!result) {
  ------------------
  |  Branch (328:6): [True: 0, False: 123]
  ------------------
  329|      0|    if(!d[0]) { /* ended up zero length, not acceptable */
  ------------------
  |  Branch (329:8): [True: 0, False: 0]
  ------------------
  330|      0|      result = CURLE_URL_MALFORMAT;
  331|      0|      curlx_free(d);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  332|      0|    }
  333|      0|    else
  334|      0|      *output = d;
  335|      0|  }
  336|    123|  return result;
  337|    123|}
idn.c:idn_decode:
  260|    123|{
  261|    123|  char *decoded = NULL;
  262|    123|  CURLcode result = CURLE_OK;
  263|    123|#ifdef USE_LIBIDN2
  264|    123|  if(idn2_check_version(IDN2_VERSION)) {
  ------------------
  |  Branch (264:6): [True: 123, False: 0]
  ------------------
  265|    123|    int flags = IDN2_NFC_INPUT
  266|    123|#if IDN2_VERSION_NUMBER >= 0x00140000
  267|       |      /* IDN2_NFC_INPUT: Normalize input string using normalization form C.
  268|       |         IDN2_NONTRANSITIONAL: Perform Unicode TR46 non-transitional
  269|       |         processing. */
  270|    123|      | IDN2_NONTRANSITIONAL
  271|    123|#endif
  272|    123|      ;
  273|    123|    int rc = IDN2_LOOKUP(input, &decoded, flags);
  ------------------
  |  |   41|    123|  idn2_lookup_ul((const char *)(name), (char **)(host), flags)
  ------------------
  274|    123|    if(rc != IDN2_OK)
  ------------------
  |  Branch (274:8): [True: 123, False: 0]
  ------------------
  275|       |      /* fallback to TR46 Transitional mode for better IDNA2003
  276|       |         compatibility */
  277|    123|      rc = IDN2_LOOKUP(input, &decoded, IDN2_TRANSITIONAL);
  ------------------
  |  |   41|    123|  idn2_lookup_ul((const char *)(name), (char **)(host), flags)
  ------------------
  278|    123|    if(rc != IDN2_OK)
  ------------------
  |  Branch (278:8): [True: 123, False: 0]
  ------------------
  279|    123|      result = CURLE_URL_MALFORMAT;
  280|    123|  }
  281|      0|  else
  282|       |    /* a too old libidn2 version */
  283|      0|    result = CURLE_NOT_BUILT_IN;
  284|       |#elif defined(USE_WIN32_IDN)
  285|       |  result = win32_idn_to_ascii(input, &decoded);
  286|       |#elif defined(USE_APPLE_IDN)
  287|       |  result = mac_idn_to_ascii(input, &decoded);
  288|       |#endif
  289|    123|  if(!result)
  ------------------
  |  Branch (289:6): [True: 0, False: 123]
  ------------------
  290|      0|    *output = decoded;
  291|    123|  return result;
  292|    123|}

Curl_ipv6_scope:
   62|  5.56k|{
   63|  5.56k|  if(sa->sa_family == AF_INET6) {
  ------------------
  |  Branch (63:6): [True: 178, False: 5.38k]
  ------------------
   64|    178|    const struct sockaddr_in6 *sa6 =
   65|    178|      (const struct sockaddr_in6 *)(const void *)sa;
   66|    178|    const unsigned char *b = sa6->sin6_addr.s6_addr;
   67|    178|    unsigned short w = (unsigned short)((b[0] << 8) | b[1]);
   68|       |
   69|    178|    if((b[0] & 0xFE) == 0xFC) /* Handle ULAs */
  ------------------
  |  Branch (69:8): [True: 3, False: 175]
  ------------------
   70|      3|      return IPV6_SCOPE_UNIQUELOCAL;
  ------------------
  |  |   32|      3|#define IPV6_SCOPE_UNIQUELOCAL  3       /* Unique local */
  ------------------
   71|    175|    switch(w & 0xFFC0) {
   72|      3|    case 0xFE80:
  ------------------
  |  Branch (72:5): [True: 3, False: 172]
  ------------------
   73|      3|      return IPV6_SCOPE_LINKLOCAL;
  ------------------
  |  |   30|      3|#define IPV6_SCOPE_LINKLOCAL    1       /* Link-local scope. */
  ------------------
   74|      3|    case 0xFEC0:
  ------------------
  |  Branch (74:5): [True: 3, False: 172]
  ------------------
   75|      3|      return IPV6_SCOPE_SITELOCAL;
  ------------------
  |  |   31|      3|#define IPV6_SCOPE_SITELOCAL    2       /* Site-local scope (deprecated). */
  ------------------
   76|    150|    case 0x0000:
  ------------------
  |  Branch (76:5): [True: 150, False: 25]
  ------------------
   77|    150|      w = b[1] | b[2] | b[3] | b[4] | b[5] | b[6] | b[7] | b[8] | b[9] |
   78|    150|          b[10] | b[11] | b[12] | b[13] | b[14];
   79|    150|      if(w || b[15] != 0x01)
  ------------------
  |  Branch (79:10): [True: 15, False: 135]
  |  Branch (79:15): [True: 9, False: 126]
  ------------------
   80|     24|        break;
   81|    126|      return IPV6_SCOPE_NODELOCAL;
  ------------------
  |  |   33|    126|#define IPV6_SCOPE_NODELOCAL    4       /* Loopback. */
  ------------------
   82|     19|    default:
  ------------------
  |  Branch (82:5): [True: 19, False: 156]
  ------------------
   83|     19|      break;
   84|    175|    }
   85|    175|  }
   86|  5.43k|  return IPV6_SCOPE_GLOBAL;
  ------------------
  |  |   29|  5.43k|#define IPV6_SCOPE_GLOBAL       0       /* Global scope. */
  ------------------
   87|  5.56k|}
Curl_if2ip:
  101|    249|{
  102|    249|  struct ifaddrs *iface, *head;
  103|    249|  if2ip_result_t res = IF2IP_NOT_FOUND;
  104|       |
  105|       |#if defined(USE_IPV6) && !defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
  106|       |  (void)local_scope_id;
  107|       |#endif
  108|       |
  109|    249|  if(getifaddrs(&head) >= 0) {
  ------------------
  |  Branch (109:6): [True: 249, False: 0]
  ------------------
  110|  1.24k|    for(iface = head; iface; iface = iface->ifa_next) {
  ------------------
  |  Branch (110:23): [True: 994, False: 247]
  ------------------
  111|    994|      if(iface->ifa_addr) {
  ------------------
  |  Branch (111:10): [True: 994, False: 0]
  ------------------
  112|    994|        if(iface->ifa_addr->sa_family == af) {
  ------------------
  |  Branch (112:12): [True: 332, False: 662]
  ------------------
  113|    332|          if(curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (113:14): [True: 2, False: 330]
  ------------------
  114|      2|            void *addr;
  115|      2|            const char *ip;
  116|      2|            char scope[12] = "";
  117|      2|            char ipstr[64];
  118|      2|#ifdef USE_IPV6
  119|      2|            if(af == AF_INET6) {
  ------------------
  |  Branch (119:16): [True: 0, False: 2]
  ------------------
  120|      0|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  121|      0|              unsigned int scopeid = 0;
  122|      0|#endif
  123|      0|              unsigned int ifscope = Curl_ipv6_scope(iface->ifa_addr);
  124|       |
  125|      0|              if(ifscope != remote_scope) {
  ------------------
  |  Branch (125:18): [True: 0, False: 0]
  ------------------
  126|       |                /* We are interested only in interface addresses whose scope
  127|       |                   matches the remote address we want to connect to: global
  128|       |                   for global, link-local for link-local, etc... */
  129|      0|                if(res == IF2IP_NOT_FOUND)
  ------------------
  |  Branch (129:20): [True: 0, False: 0]
  ------------------
  130|      0|                  res = IF2IP_AF_NOT_SUPPORTED;
  131|      0|                continue;
  132|      0|              }
  133|       |
  134|      0|              addr =
  135|      0|                &((struct sockaddr_in6 *)(void *)iface->ifa_addr)->sin6_addr;
  136|      0|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  137|       |              /* Include the scope of this interface as part of the address */
  138|      0|              scopeid = ((struct sockaddr_in6 *)(void *)iface->ifa_addr)
  139|      0|                          ->sin6_scope_id;
  140|       |
  141|       |              /* If given, scope id should match. */
  142|      0|              if(local_scope_id && scopeid != local_scope_id) {
  ------------------
  |  Branch (142:18): [True: 0, False: 0]
  |  Branch (142:36): [True: 0, False: 0]
  ------------------
  143|      0|                if(res == IF2IP_NOT_FOUND)
  ------------------
  |  Branch (143:20): [True: 0, False: 0]
  ------------------
  144|      0|                  res = IF2IP_AF_NOT_SUPPORTED;
  145|       |
  146|      0|                continue;
  147|      0|              }
  148|       |
  149|      0|              if(scopeid)
  ------------------
  |  Branch (149:18): [True: 0, False: 0]
  ------------------
  150|      0|                curl_msnprintf(scope, sizeof(scope), "%%%u", scopeid);
  151|      0|#endif
  152|      0|            }
  153|      2|            else
  154|      2|#endif
  155|      2|              addr =
  156|      2|                &((struct sockaddr_in *)(void *)iface->ifa_addr)->sin_addr;
  157|      2|            res = IF2IP_FOUND;
  158|      2|            ip = curlx_inet_ntop(af, addr, ipstr, sizeof(ipstr));
  159|      2|            curl_msnprintf(buf, buf_size, "%s%s", ip, scope);
  160|      2|            break;
  161|      2|          }
  162|    332|        }
  163|    662|        else if((res == IF2IP_NOT_FOUND) &&
  ------------------
  |  Branch (163:17): [True: 657, False: 5]
  ------------------
  164|    657|                curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (164:17): [True: 3, False: 654]
  ------------------
  165|      3|          res = IF2IP_AF_NOT_SUPPORTED;
  166|      3|        }
  167|    994|      }
  168|    994|    }
  169|       |
  170|    249|    freeifaddrs(head);
  171|    249|  }
  172|       |
  173|    249|  return res;
  174|    249|}

Curl_llist_init:
   46|  1.22M|{
   47|  1.22M|  l->_size = 0;
   48|  1.22M|  l->_dtor = dtor;
   49|  1.22M|  l->_head = NULL;
   50|  1.22M|  l->_tail = NULL;
   51|  1.22M|#ifdef DEBUGBUILD
   52|  1.22M|  l->_init = LLISTINIT;
  ------------------
  |  |   29|  1.22M|#define LLISTINIT 0x100cc001 /* random pattern */
  ------------------
   53|  1.22M|#endif
   54|  1.22M|}
Curl_llist_insert_next:
   71|  32.4k|{
   72|  32.4k|  DEBUGASSERT(list);
  ------------------
  |  | 1079|  32.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (72:3): [True: 0, False: 32.4k]
  |  Branch (72:3): [True: 32.4k, False: 0]
  ------------------
   73|  32.4k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1079|  32.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (73:3): [True: 0, False: 32.4k]
  |  Branch (73:3): [True: 32.4k, False: 0]
  ------------------
   74|  32.4k|  DEBUGASSERT(ne);
  ------------------
  |  | 1079|  32.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (74:3): [True: 0, False: 32.4k]
  |  Branch (74:3): [True: 32.4k, False: 0]
  ------------------
   75|       |
   76|  32.4k|#ifdef DEBUGBUILD
   77|  32.4k|  ne->_init = NODEINIT;
  ------------------
  |  |   30|  32.4k|#define NODEINIT  0x12344321 /* random pattern */
  ------------------
   78|  32.4k|#endif
   79|  32.4k|  ne->_ptr = CURL_UNCONST(p);
  ------------------
  |  |  864|  32.4k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   80|  32.4k|  ne->_list = list;
   81|  32.4k|  if(list->_size == 0) {
  ------------------
  |  Branch (81:6): [True: 29.5k, False: 2.86k]
  ------------------
   82|  29.5k|    list->_head = ne;
   83|  29.5k|    list->_head->_prev = NULL;
   84|  29.5k|    list->_head->_next = NULL;
   85|  29.5k|    list->_tail = ne;
   86|  29.5k|  }
   87|  2.86k|  else {
   88|       |    /* if 'e' is NULL here, we insert the new element first in the list */
   89|  2.86k|    ne->_next = e ? e->_next : list->_head;
  ------------------
  |  Branch (89:17): [True: 2.81k, False: 49]
  ------------------
   90|  2.86k|    ne->_prev = e;
   91|  2.86k|    if(!e) {
  ------------------
  |  Branch (91:8): [True: 49, False: 2.81k]
  ------------------
   92|     49|      list->_head->_prev = ne;
   93|     49|      list->_head = ne;
   94|     49|    }
   95|  2.81k|    else if(e->_next) {
  ------------------
  |  Branch (95:13): [True: 67, False: 2.74k]
  ------------------
   96|     67|      e->_next->_prev = ne;
   97|     67|    }
   98|  2.74k|    else {
   99|  2.74k|      list->_tail = ne;
  100|  2.74k|    }
  101|  2.86k|    if(e)
  ------------------
  |  Branch (101:8): [True: 2.81k, False: 49]
  ------------------
  102|  2.81k|      e->_next = ne;
  103|  2.86k|  }
  104|       |
  105|  32.4k|  ++list->_size;
  106|  32.4k|}
Curl_llist_append:
  119|  23.2k|{
  120|  23.2k|  DEBUGASSERT(list);
  ------------------
  |  | 1079|  23.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (120:3): [True: 0, False: 23.2k]
  |  Branch (120:3): [True: 23.2k, False: 0]
  ------------------
  121|  23.2k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1079|  23.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (121:3): [True: 0, False: 23.2k]
  |  Branch (121:3): [True: 23.2k, False: 0]
  ------------------
  122|  23.2k|  DEBUGASSERT(ne);
  ------------------
  |  | 1079|  23.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (122:3): [True: 0, False: 23.2k]
  |  Branch (122:3): [True: 23.2k, False: 0]
  ------------------
  123|  23.2k|  Curl_llist_insert_next(list, list->_tail, p, ne);
  124|  23.2k|}
Curl_node_take_elem:
  127|  31.4k|{
  128|  31.4k|  void *ptr;
  129|  31.4k|  struct Curl_llist *list;
  130|  31.4k|  if(!e)
  ------------------
  |  Branch (130:6): [True: 0, False: 31.4k]
  ------------------
  131|      0|    return NULL;
  132|       |
  133|  31.4k|  list = e->_list;
  134|  31.4k|  DEBUGASSERT(list);
  ------------------
  |  | 1079|  31.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (134:3): [True: 0, False: 31.4k]
  |  Branch (134:3): [True: 31.4k, False: 0]
  ------------------
  135|  31.4k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1079|  31.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (135:3): [True: 0, False: 31.4k]
  |  Branch (135:3): [True: 31.4k, False: 0]
  ------------------
  136|  31.4k|  DEBUGASSERT(list->_size);
  ------------------
  |  | 1079|  31.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (136:3): [True: 0, False: 31.4k]
  |  Branch (136:3): [True: 31.4k, False: 0]
  ------------------
  137|  31.4k|  DEBUGASSERT(e->_init == NODEINIT);
  ------------------
  |  | 1079|  31.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 0, False: 31.4k]
  |  Branch (137:3): [True: 31.4k, False: 0]
  ------------------
  138|  31.4k|  if(list) {
  ------------------
  |  Branch (138:6): [True: 31.4k, False: 0]
  ------------------
  139|  31.4k|    if(e == list->_head) {
  ------------------
  |  Branch (139:8): [True: 30.4k, False: 1.02k]
  ------------------
  140|  30.4k|      list->_head = e->_next;
  141|       |
  142|  30.4k|      if(!list->_head)
  ------------------
  |  Branch (142:10): [True: 29.4k, False: 991]
  ------------------
  143|  29.4k|        list->_tail = NULL;
  144|    991|      else
  145|    991|        e->_next->_prev = NULL;
  146|  30.4k|    }
  147|  1.02k|    else {
  148|  1.02k|      if(e->_prev)
  ------------------
  |  Branch (148:10): [True: 1.02k, False: 0]
  ------------------
  149|  1.02k|        e->_prev->_next = e->_next;
  150|       |
  151|  1.02k|      if(!e->_next)
  ------------------
  |  Branch (151:10): [True: 985, False: 35]
  ------------------
  152|    985|        list->_tail = e->_prev;
  153|     35|      else
  154|     35|        e->_next->_prev = e->_prev;
  155|  1.02k|    }
  156|  31.4k|    --list->_size;
  157|  31.4k|  }
  158|  31.4k|  ptr = e->_ptr;
  159|       |
  160|  31.4k|  e->_list = NULL;
  161|  31.4k|  e->_ptr  = NULL;
  162|  31.4k|  e->_prev = NULL;
  163|  31.4k|  e->_next = NULL;
  164|  31.4k|#ifdef DEBUGBUILD
  165|  31.4k|  e->_init = NODEREM; /* specific pattern on remove - not zero */
  ------------------
  |  |   31|  31.4k|#define NODEREM   0x54321012 /* random pattern */
  ------------------
  166|  31.4k|#endif
  167|       |
  168|  31.4k|  return ptr;
  169|  31.4k|}
Curl_node_remove:
  188|  21.4k|{
  189|       |  node_uremove(e, NULL);
  190|  21.4k|}
Curl_llist_destroy:
  193|   326k|{
  194|   326k|  if(list) {
  ------------------
  |  Branch (194:6): [True: 326k, False: 0]
  ------------------
  195|   326k|    DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1079|   326k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (195:5): [True: 0, False: 326k]
  |  Branch (195:5): [True: 326k, False: 0]
  ------------------
  196|   335k|    while(list->_size > 0)
  ------------------
  |  Branch (196:11): [True: 8.85k, False: 326k]
  ------------------
  197|  8.85k|      node_uremove(list->_tail, user);
  198|   326k|  }
  199|   326k|}
Curl_llist_head:
  204|  3.35M|{
  205|  3.35M|  DEBUGASSERT(list);
  ------------------
  |  | 1079|  3.35M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (205:3): [True: 0, False: 3.35M]
  |  Branch (205:3): [True: 3.35M, False: 0]
  ------------------
  206|  3.35M|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1079|  3.35M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (206:3): [True: 0, False: 3.35M]
  |  Branch (206:3): [True: 3.35M, False: 0]
  ------------------
  207|  3.35M|  return VERIFYNODE(list->_head);
  ------------------
  |  |   33|  3.35M|#define VERIFYNODE(x) verifynode(x)
  ------------------
  208|  3.35M|}
Curl_llist_count:
  226|  1.22M|{
  227|  1.22M|  DEBUGASSERT(list);
  ------------------
  |  | 1079|  1.22M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (227:3): [True: 0, False: 1.22M]
  |  Branch (227:3): [True: 1.22M, False: 0]
  ------------------
  228|  1.22M|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1079|  1.22M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (228:3): [True: 0, False: 1.22M]
  |  Branch (228:3): [True: 1.22M, False: 0]
  ------------------
  229|  1.22M|  return list->_size;
  230|  1.22M|}
Curl_node_elem:
  234|   149k|{
  235|   149k|  DEBUGASSERT(n);
  ------------------
  |  | 1079|   149k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (235:3): [True: 0, False: 149k]
  |  Branch (235:3): [True: 149k, False: 0]
  ------------------
  236|   149k|  DEBUGASSERT(n->_init == NODEINIT);
  ------------------
  |  | 1079|   149k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (236:3): [True: 0, False: 149k]
  |  Branch (236:3): [True: 149k, False: 0]
  ------------------
  237|   149k|  return n->_ptr;
  238|   149k|}
Curl_node_next:
  243|   136k|{
  244|   136k|  DEBUGASSERT(n);
  ------------------
  |  | 1079|   136k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:3): [True: 0, False: 136k]
  |  Branch (244:3): [True: 136k, False: 0]
  ------------------
  245|   136k|  DEBUGASSERT(n->_init == NODEINIT);
  ------------------
  |  | 1079|   136k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (245:3): [True: 0, False: 136k]
  |  Branch (245:3): [True: 136k, False: 0]
  ------------------
  246|   136k|  return VERIFYNODE(n->_next);
  ------------------
  |  |   33|   136k|#define VERIFYNODE(x) verifynode(x)
  ------------------
  247|   136k|}
Curl_node_llist:
  266|  21.0k|{
  267|  21.0k|  DEBUGASSERT(n);
  ------------------
  |  | 1079|  21.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (267:3): [True: 0, False: 21.0k]
  |  Branch (267:3): [True: 21.0k, False: 0]
  ------------------
  268|  21.0k|  DEBUGASSERT(!n->_list || n->_init == NODEINIT);
  ------------------
  |  | 1079|  21.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (268:3): [True: 21.0k, False: 0]
  |  Branch (268:3): [True: 0, False: 0]
  |  Branch (268:3): [True: 6.76k, False: 14.2k]
  |  Branch (268:3): [True: 14.2k, False: 0]
  ------------------
  269|  21.0k|  return n->_list;
  270|  21.0k|}
llist.c:node_uremove:
  172|  30.2k|{
  173|  30.2k|  struct Curl_llist *list;
  174|  30.2k|  void *ptr;
  175|  30.2k|  if(!e)
  ------------------
  |  Branch (175:6): [True: 0, False: 30.2k]
  ------------------
  176|      0|    return;
  177|       |
  178|  30.2k|  list = e->_list;
  179|  30.2k|  DEBUGASSERT(list);
  ------------------
  |  | 1079|  30.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 30.2k]
  |  Branch (179:3): [True: 30.2k, False: 0]
  ------------------
  180|  30.2k|  if(list) {
  ------------------
  |  Branch (180:6): [True: 30.2k, False: 0]
  ------------------
  181|  30.2k|    ptr = Curl_node_take_elem(e);
  182|  30.2k|    if(list->_dtor)
  ------------------
  |  Branch (182:8): [True: 187, False: 30.0k]
  ------------------
  183|    187|      list->_dtor(user, ptr);
  184|  30.2k|  }
  185|  30.2k|}
llist.c:verifynode:
   35|  3.49M|{
   36|  3.49M|  DEBUGASSERT(!n || (n->_init == NODEINIT));
  ------------------
  |  | 1079|  3.49M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (36:3): [True: 3.49M, False: 0]
  |  Branch (36:3): [True: 0, False: 0]
  |  Branch (36:3): [True: 3.32M, False: 164k]
  |  Branch (36:3): [True: 164k, False: 0]
  ------------------
   37|  3.49M|  return n;
   38|  3.49M|}

curl_dbg_malloc:
  212|   506k|{
  213|   506k|  struct memdebug *mem;
  214|   506k|  size_t size;
  215|       |
  216|   506k|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1079|   506k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 0, False: 506k]
  |  Branch (216:3): [True: 506k, False: 0]
  ------------------
  217|       |
  218|   506k|  if(countcheck("malloc", line, source))
  ------------------
  |  Branch (218:6): [True: 0, False: 506k]
  ------------------
  219|      0|    return NULL;
  220|       |
  221|       |  /* alloc at least 64 bytes */
  222|   506k|  size = sizeof(struct memdebug) + wantedsize;
  223|       |
  224|   506k|  mem = Curl_cmalloc(size);
  225|   506k|  if(mem) {
  ------------------
  |  Branch (225:6): [True: 506k, False: 0]
  ------------------
  226|   506k|    mem->size = wantedsize;
  227|   506k|  }
  228|       |
  229|   506k|  if(source)
  ------------------
  |  Branch (229:6): [True: 193k, False: 312k]
  ------------------
  230|   193k|    curl_dbg_log("MEM %s:%d malloc(%zu) = %p\n",
  231|   193k|                 source, line, wantedsize,
  232|   193k|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (232:18): [True: 193k, False: 0]
  ------------------
  233|       |
  234|   506k|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (234:10): [True: 506k, False: 0]
  ------------------
  235|   506k|}
curl_dbg_calloc:
  240|   415k|{
  241|   415k|  struct memdebug *mem;
  242|   415k|  size_t size, user_size;
  243|       |
  244|   415k|  DEBUGASSERT(wanted_elements != 0);
  ------------------
  |  | 1079|   415k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:3): [True: 0, False: 415k]
  |  Branch (244:3): [True: 415k, False: 0]
  ------------------
  245|   415k|  DEBUGASSERT(wanted_size != 0);
  ------------------
  |  | 1079|   415k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (245:3): [True: 0, False: 415k]
  |  Branch (245:3): [True: 415k, False: 0]
  ------------------
  246|       |
  247|   415k|  if(countcheck("calloc", line, source))
  ------------------
  |  Branch (247:6): [True: 0, False: 415k]
  ------------------
  248|      0|    return NULL;
  249|       |
  250|       |  /* alloc at least 64 bytes */
  251|   415k|  user_size = wanted_size * wanted_elements;
  252|   415k|  size = sizeof(struct memdebug) + user_size;
  253|       |
  254|   415k|  mem = Curl_ccalloc(1, size);
  255|   415k|  if(mem)
  ------------------
  |  Branch (255:6): [True: 415k, False: 0]
  ------------------
  256|   415k|    mem->size = user_size;
  257|       |
  258|   415k|  if(source)
  ------------------
  |  Branch (258:6): [True: 415k, False: 0]
  ------------------
  259|   415k|    curl_dbg_log("MEM %s:%d calloc(%zu,%zu) = %p\n",
  260|   415k|                 source, line, wanted_elements, wanted_size,
  261|   415k|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (261:18): [True: 415k, False: 0]
  ------------------
  262|       |
  263|   415k|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (263:10): [True: 415k, False: 0]
  ------------------
  264|   415k|}
curl_dbg_strdup:
  268|   312k|{
  269|   312k|  char *mem;
  270|   312k|  size_t len;
  271|       |
  272|   312k|  DEBUGASSERT(str);
  ------------------
  |  | 1079|   312k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (272:3): [True: 0, False: 312k]
  |  Branch (272:3): [True: 312k, False: 0]
  ------------------
  273|       |
  274|   312k|  if(countcheck("strdup", line, source))
  ------------------
  |  Branch (274:6): [True: 0, False: 312k]
  ------------------
  275|      0|    return NULL;
  276|       |
  277|   312k|  len = strlen(str) + 1;
  278|       |
  279|   312k|  mem = curl_dbg_malloc(len, 0, NULL); /* NULL prevents logging */
  280|   312k|  if(mem)
  ------------------
  |  Branch (280:6): [True: 312k, False: 0]
  ------------------
  281|   312k|    memcpy(mem, str, len);
  282|       |
  283|   312k|  if(source)
  ------------------
  |  Branch (283:6): [True: 312k, False: 0]
  ------------------
  284|   312k|    curl_dbg_log("MEM %s:%d strdup(%p) (%zu) = %p\n",
  285|   312k|                 source, line, (const void *)str, len, (const void *)mem);
  286|       |
  287|   312k|  return mem;
  288|   312k|}
curl_dbg_realloc:
  321|   178k|{
  322|   178k|  struct memdebug *mem = NULL;
  323|   178k|  bool was_locked;
  324|       |
  325|   178k|  size_t size = sizeof(struct memdebug) + wantedsize;
  326|       |
  327|   178k|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1079|   178k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (327:3): [True: 0, False: 178k]
  |  Branch (327:3): [True: 178k, False: 0]
  ------------------
  328|       |
  329|   178k|  if(countcheck("realloc", line, source))
  ------------------
  |  Branch (329:6): [True: 0, False: 178k]
  ------------------
  330|      0|    return NULL;
  331|       |
  332|       |  /* need to realloc under lock, as we get out-of-order log
  333|       |   * entries otherwise, since another thread might alloc the
  334|       |   * memory released by realloc() before otherwise would log it. */
  335|   178k|  was_locked = curl_dbg_lock();
  336|       |#ifdef __INTEL_COMPILER
  337|       |#  pragma warning(push)
  338|       |#  pragma warning(disable:1684)
  339|       |   /* 1684: conversion from pointer to same-sized integral type */
  340|       |#endif
  341|       |
  342|   178k|  if(ptr)
  ------------------
  |  Branch (342:6): [True: 59.8k, False: 118k]
  ------------------
  343|  59.8k|    mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
  344|       |
  345|       |#ifdef __INTEL_COMPILER
  346|       |#  pragma warning(pop)
  347|       |#endif
  348|       |
  349|   178k|  mem = Curl_crealloc(mem, size);
  350|   178k|  if(source)
  ------------------
  |  Branch (350:6): [True: 178k, False: 0]
  ------------------
  351|   178k|    curl_dbg_log_locked("MEM %s:%d realloc(%p, %zu) = %p\n",
  352|   178k|                        source, line, (void *)ptr, wantedsize,
  353|   178k|                        mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (353:25): [True: 178k, False: 0]
  ------------------
  354|       |
  355|   178k|  curl_dbg_unlock(was_locked);
  356|   178k|  if(mem) {
  ------------------
  |  Branch (356:6): [True: 178k, False: 0]
  ------------------
  357|   178k|    mem->size = wantedsize;
  358|   178k|    return mem->mem;
  359|   178k|  }
  360|       |
  361|      0|  return NULL;
  362|   178k|}
curl_dbg_free:
  365|  5.81M|{
  366|  5.81M|  if(ptr) {
  ------------------
  |  Branch (366:6): [True: 1.04M, False: 4.77M]
  ------------------
  367|  1.04M|    struct memdebug *mem;
  368|       |
  369|  1.04M|    if(source)
  ------------------
  |  Branch (369:8): [True: 1.04M, False: 0]
  ------------------
  370|  1.04M|      curl_dbg_log("MEM %s:%d free(%p)\n", source, line, (void *)ptr);
  371|       |
  372|       |#ifdef __INTEL_COMPILER
  373|       |#  pragma warning(push)
  374|       |#  pragma warning(disable:1684)
  375|       |   /* 1684: conversion from pointer to same-sized integral type */
  376|       |#endif
  377|       |
  378|  1.04M|    mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
  379|       |
  380|       |#ifdef __INTEL_COMPILER
  381|       |#  pragma warning(pop)
  382|       |#endif
  383|       |
  384|       |    /* free for real */
  385|  1.04M|    Curl_cfree(mem);
  386|  1.04M|  }
  387|  5.81M|}
curl_dbg_socket:
  391|  11.8k|{
  392|  11.8k|  curl_socket_t sockfd;
  393|       |
  394|  11.8k|  if(countcheck("socket", line, source))
  ------------------
  |  Branch (394:6): [True: 0, False: 11.8k]
  ------------------
  395|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  396|       |
  397|       |  /* !checksrc! disable BANNEDFUNC 1 */
  398|  11.8k|  sockfd = socket(domain, type, protocol);
  399|       |
  400|  11.8k|  if(source && (sockfd != CURL_SOCKET_BAD))
  ------------------
  |  |  145|  11.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (400:6): [True: 11.8k, False: 0]
  |  Branch (400:16): [True: 11.8k, False: 0]
  ------------------
  401|  11.8k|    curl_dbg_log("FD %s:%d socket() = %" FMT_SOCKET_T "\n",
  402|  11.8k|                 source, line, sockfd);
  403|       |
  404|  11.8k|  return sockfd;
  405|  11.8k|}
curl_dbg_mark_sclose:
  461|  17.3k|{
  462|  17.3k|  if(source)
  ------------------
  |  Branch (462:6): [True: 17.3k, False: 0]
  ------------------
  463|  17.3k|    curl_dbg_log("FD %s:%d sclose(%" FMT_SOCKET_T ")\n",
  464|  17.3k|                 source, line, sockfd);
  465|  17.3k|}
curl_dbg_sclose:
  469|  17.3k|{
  470|  17.3k|  curl_dbg_mark_sclose(sockfd, line, source);
  471|  17.3k|  return CURL_SCLOSE(sockfd);
  ------------------
  |  |  997|  17.3k|#  define CURL_SCLOSE(x)  close(x)
  ------------------
  472|  17.3k|}
curl_dbg_fopen:
  477|  58.0k|{
  478|  58.0k|  FILE *res = CURLX_FOPEN_LOW(file, mode);
  ------------------
  |  |   64|  58.0k|#define CURLX_FOPEN_LOW         fopen
  ------------------
  479|  58.0k|  if(source)
  ------------------
  |  Branch (479:6): [True: 58.0k, False: 0]
  ------------------
  480|  58.0k|    curl_dbg_log("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n",
  481|  58.0k|                 source, line, file, mode, (void *)res);
  482|       |
  483|  58.0k|  return res;
  484|  58.0k|}
curl_dbg_fclose:
  510|  58.0k|{
  511|  58.0k|  int res;
  512|       |
  513|  58.0k|  DEBUGASSERT(file);
  ------------------
  |  | 1079|  58.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (513:3): [True: 0, False: 58.0k]
  |  Branch (513:3): [True: 58.0k, False: 0]
  ------------------
  514|       |
  515|  58.0k|  if(source)
  ------------------
  |  Branch (515:6): [True: 58.0k, False: 0]
  ------------------
  516|  58.0k|    curl_dbg_log("FILE %s:%d fclose(%p)\n", source, line, (void *)file);
  517|       |
  518|       |  /* !checksrc! disable BANNEDFUNC 1 */
  519|  58.0k|  res = fclose(file);
  520|       |
  521|  58.0k|  return res;
  522|  58.0k|}
curl_dbg_log:
  565|  2.10M|{
  566|  2.10M|  bool was_locked;
  567|  2.10M|  va_list ap;
  568|       |
  569|  2.10M|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (569:6): [True: 2.10M, False: 1]
  ------------------
  570|  2.10M|    return;
  571|       |
  572|      1|  was_locked = curl_dbg_lock();
  573|      1|  va_start(ap, format);
  574|      1|  curl_dbg_vlog(format, ap);
  575|       |  va_end(ap);
  576|      1|  curl_dbg_unlock(was_locked);
  577|      1|}
memdebug.c:countcheck:
  187|  1.42M|{
  188|       |  /* if source is NULL, then the call is made internally and this check
  189|       |     should not be made */
  190|  1.42M|  if(memlimit && source) {
  ------------------
  |  Branch (190:6): [True: 0, False: 1.42M]
  |  Branch (190:18): [True: 0, False: 0]
  ------------------
  191|      0|    if(!memsize) {
  ------------------
  |  Branch (191:8): [True: 0, False: 0]
  ------------------
  192|       |      /* log to file */
  193|      0|      curl_dbg_log("LIMIT %s:%d %s reached memlimit\n", source, line, func);
  194|       |      /* log to stderr also */
  195|      0|      curl_mfprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
  196|      0|                    source, line, func);
  197|      0|      dump_bt();
  198|      0|      fflush(curl_dbg_logfile); /* because it might crash now */
  199|       |      /* !checksrc! disable ERRNOVAR 1 */
  200|      0|      errno = ENOMEM;
  201|      0|      return TRUE; /* RETURN ERROR! */
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  202|      0|    }
  203|      0|    else
  204|      0|      memsize--; /* countdown */
  205|      0|  }
  206|       |
  207|  1.42M|  return FALSE; /* allow this */
  ------------------
  |  | 1056|  1.42M|#define FALSE false
  ------------------
  208|  1.42M|}
memdebug.c:curl_dbg_lock:
   74|   178k|{
   75|   178k|#ifdef USE_MUTEX
   76|   178k|  if(dbg_mutex_init) {
  ------------------
  |  Branch (76:6): [True: 0, False: 178k]
  ------------------
   77|      0|    Curl_mutex_acquire(&dbg_mutex);
  ------------------
  |  |   37|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
   78|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
   79|      0|  }
   80|   178k|#endif
   81|   178k|  return FALSE;
  ------------------
  |  | 1056|   178k|#define FALSE false
  ------------------
   82|   178k|}
memdebug.c:curl_dbg_unlock:
   85|   178k|{
   86|   178k|#ifdef USE_MUTEX
   87|   178k|  if(was_locked)
  ------------------
  |  Branch (87:6): [True: 0, False: 178k]
  ------------------
   88|      0|    Curl_mutex_release(&dbg_mutex);
  ------------------
  |  |   38|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
   89|       |#else
   90|       |  (void)was_locked;
   91|       |#endif
   92|   178k|}
memdebug.c:curl_dbg_log_locked:
  552|   178k|{
  553|   178k|  va_list ap;
  554|       |
  555|   178k|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (555:6): [True: 178k, False: 0]
  ------------------
  556|   178k|    return;
  557|       |
  558|   178k|  va_start(ap, format);
  559|      0|  curl_dbg_vlog(format, ap);
  560|       |  va_end(ap);
  561|      0|}

Curl_mime_cleanpart:
 1099|  55.3k|{
 1100|  55.3k|  if(part) {
  ------------------
  |  Branch (1100:6): [True: 2.77k, False: 52.5k]
  ------------------
 1101|  2.77k|    cleanup_part_content(part);
 1102|  2.77k|    curl_slist_free_all(part->curlheaders);
 1103|  2.77k|    if(part->flags & MIME_USERHEADERS_OWNER)
  ------------------
  |  |   34|  2.77k|#define MIME_USERHEADERS_OWNER  (1 << 0)
  ------------------
  |  Branch (1103:8): [True: 0, False: 2.77k]
  ------------------
 1104|      0|      curl_slist_free_all(part->userheaders);
 1105|  2.77k|    curlx_safefree(part->mimetype);
  ------------------
  |  | 1336|  2.77k|  do {                      \
  |  | 1337|  2.77k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  2.77k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  2.77k|    (ptr) = NULL;           \
  |  | 1339|  2.77k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 2.77k]
  |  |  ------------------
  ------------------
 1106|  2.77k|    curlx_safefree(part->name);
  ------------------
  |  | 1336|  2.77k|  do {                      \
  |  | 1337|  2.77k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  2.77k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  2.77k|    (ptr) = NULL;           \
  |  | 1339|  2.77k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 2.77k]
  |  |  ------------------
  ------------------
 1107|       |    curlx_safefree(part->filename);
  ------------------
  |  | 1336|  2.77k|  do {                      \
  |  | 1337|  2.77k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  2.77k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  2.77k|    (ptr) = NULL;           \
  |  | 1339|  2.77k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 2.77k]
  |  |  ------------------
  ------------------
 1108|  2.77k|    Curl_mime_initpart(part);
 1109|  2.77k|  }
 1110|  55.3k|}
curl_mime_free:
 1114|    185|{
 1115|    185|  curl_mimepart *part;
 1116|       |
 1117|    185|  if(mime) {
  ------------------
  |  Branch (1117:6): [True: 185, False: 0]
  ------------------
 1118|    185|    mime_subparts_unbind(mime);  /* Be sure it is not referenced anymore. */
 1119|  2.79k|    while(mime->firstpart) {
  ------------------
  |  Branch (1119:11): [True: 2.60k, False: 185]
  ------------------
 1120|  2.60k|      part = mime->firstpart;
 1121|  2.60k|      mime->firstpart = part->nextpart;
 1122|  2.60k|      Curl_mime_cleanpart(part);
 1123|  2.60k|      curlx_free(part);
  ------------------
  |  | 1478|  2.60k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1124|  2.60k|    }
 1125|    185|    curlx_free(mime);
  ------------------
  |  | 1478|    185|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1126|    185|  }
 1127|    185|}
curl_mime_init:
 1213|    185|{
 1214|    185|  curl_mime *mime = curlx_malloc(sizeof(*mime));
  ------------------
  |  | 1473|    185|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1215|       |
 1216|    185|  if(mime) {
  ------------------
  |  Branch (1216:6): [True: 185, False: 0]
  ------------------
 1217|    185|    mime->parent = NULL;
 1218|    185|    mime->firstpart = NULL;
 1219|    185|    mime->lastpart = NULL;
 1220|       |
 1221|    185|    memset(mime->boundary, '-', MIME_BOUNDARY_DASHES);
  ------------------
  |  |   28|    185|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1222|    185|    if(Curl_rand_alnum(easy,
  ------------------
  |  Branch (1222:8): [True: 0, False: 185]
  ------------------
 1223|    185|                       (unsigned char *)&mime->boundary[MIME_BOUNDARY_DASHES],
  ------------------
  |  |   28|    185|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1224|    185|                       MIME_RAND_BOUNDARY_CHARS + 1)) {
  ------------------
  |  |   29|    185|#define MIME_RAND_BOUNDARY_CHARS        22  /* Nb. of random boundary chars. */
  ------------------
 1225|       |      /* failed to get random separator, bail out */
 1226|      0|      curlx_free(mime);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1227|      0|      return NULL;
 1228|      0|    }
 1229|    185|    mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
 1230|    185|  }
 1231|       |
 1232|    185|  return mime;
 1233|    185|}
Curl_mime_initpart:
 1237|  5.55k|{
 1238|  5.55k|  memset(part, 0, sizeof(*part));
 1239|  5.55k|  part->lastreadstatus = 1; /* Successful read status. */
 1240|       |  mimesetstate(&part->state, MIMESTATE_BEGIN, NULL);
 1241|  5.55k|}
curl_mime_addpart:
 1245|  2.60k|{
 1246|  2.60k|  curl_mimepart *part;
 1247|       |
 1248|  2.60k|  if(!mime)
  ------------------
  |  Branch (1248:6): [True: 0, False: 2.60k]
  ------------------
 1249|      0|    return NULL;
 1250|       |
 1251|  2.60k|  part = curlx_malloc(sizeof(*part));
  ------------------
  |  | 1473|  2.60k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1252|       |
 1253|  2.60k|  if(part) {
  ------------------
  |  Branch (1253:6): [True: 2.60k, False: 0]
  ------------------
 1254|  2.60k|    Curl_mime_initpart(part);
 1255|  2.60k|    part->parent = mime;
 1256|       |
 1257|  2.60k|    if(mime->lastpart)
  ------------------
  |  Branch (1257:8): [True: 2.42k, False: 185]
  ------------------
 1258|  2.42k|      mime->lastpart->nextpart = part;
 1259|    185|    else
 1260|    185|      mime->firstpart = part;
 1261|       |
 1262|  2.60k|    mime->lastpart = part;
 1263|  2.60k|  }
 1264|       |
 1265|  2.60k|  return part;
 1266|  2.60k|}
curl_mime_name:
 1270|    309|{
 1271|    309|  if(!part)
  ------------------
  |  Branch (1271:6): [True: 0, False: 309]
  ------------------
 1272|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1273|       |
 1274|    309|  curlx_safefree(part->name);
  ------------------
  |  | 1336|    309|  do {                      \
  |  | 1337|    309|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|    309|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|    309|    (ptr) = NULL;           \
  |  | 1339|    309|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 309]
  |  |  ------------------
  ------------------
 1275|       |
 1276|    309|  if(name) {
  ------------------
  |  Branch (1276:6): [True: 309, False: 0]
  ------------------
 1277|    309|    part->name = curlx_strdup(name);
  ------------------
  |  | 1472|    309|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1278|    309|    if(!part->name)
  ------------------
  |  Branch (1278:8): [True: 0, False: 309]
  ------------------
 1279|      0|      return CURLE_OUT_OF_MEMORY;
 1280|    309|  }
 1281|       |
 1282|    309|  return CURLE_OK;
 1283|    309|}
curl_mime_data:
 1304|    937|{
 1305|    937|  if(!part)
  ------------------
  |  Branch (1305:6): [True: 0, False: 937]
  ------------------
 1306|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1307|       |
 1308|    937|  cleanup_part_content(part);
 1309|       |
 1310|    937|  if(data) {
  ------------------
  |  Branch (1310:6): [True: 937, False: 0]
  ------------------
 1311|    937|    if(datasize == CURL_ZERO_TERMINATED)
  ------------------
  |  | 2447|    937|#define CURL_ZERO_TERMINATED ((size_t)-1)
  ------------------
  |  Branch (1311:8): [True: 0, False: 937]
  ------------------
 1312|      0|      datasize = strlen(data);
 1313|       |
 1314|    937|    part->data = curlx_memdup0(data, datasize);
 1315|    937|    if(!part->data)
  ------------------
  |  Branch (1315:8): [True: 0, False: 937]
  ------------------
 1316|      0|      return CURLE_OUT_OF_MEMORY;
 1317|       |
 1318|    937|    part->datasize = datasize;
 1319|    937|    part->readfunc = mime_mem_read;
 1320|    937|    part->seekfunc = mime_mem_seek;
 1321|    937|    part->freefunc = mime_mem_free;
 1322|    937|    part->flags |= MIME_FAST_READ;
  ------------------
  |  |   36|    937|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1323|    937|    part->kind = MIMEKIND_DATA;
 1324|    937|  }
 1325|       |
 1326|    937|  return CURLE_OK;
 1327|    937|}
Curl_mime_set_subparts:
 1470|    168|{
 1471|    168|  curl_mime *root;
 1472|       |
 1473|    168|  if(!part)
  ------------------
  |  Branch (1473:6): [True: 0, False: 168]
  ------------------
 1474|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1475|       |
 1476|       |  /* Accept setting twice the same subparts. */
 1477|    168|  if(part->kind == MIMEKIND_MULTIPART && part->arg == subparts)
  ------------------
  |  Branch (1477:6): [True: 0, False: 168]
  |  Branch (1477:42): [True: 0, False: 0]
  ------------------
 1478|      0|    return CURLE_OK;
 1479|       |
 1480|    168|  cleanup_part_content(part);
 1481|       |
 1482|    168|  if(subparts) {
  ------------------
  |  Branch (1482:6): [True: 168, False: 0]
  ------------------
 1483|       |    /* Should not have been attached already. */
 1484|    168|    if(subparts->parent)
  ------------------
  |  Branch (1484:8): [True: 0, False: 168]
  ------------------
 1485|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1486|       |
 1487|       |    /* Should not be the part's root. */
 1488|    168|    root = part->parent;
 1489|    168|    if(root) {
  ------------------
  |  Branch (1489:8): [True: 0, False: 168]
  ------------------
 1490|      0|      while(root->parent && root->parent->parent)
  ------------------
  |  Branch (1490:13): [True: 0, False: 0]
  |  Branch (1490:29): [True: 0, False: 0]
  ------------------
 1491|      0|        root = root->parent->parent;
 1492|      0|      if(subparts == root) {
  ------------------
  |  Branch (1492:10): [True: 0, False: 0]
  ------------------
 1493|       |        /* cannot add as a subpart of itself. */
 1494|      0|        return CURLE_BAD_FUNCTION_ARGUMENT;
 1495|      0|      }
 1496|      0|    }
 1497|       |
 1498|       |    /* If subparts have already been used as a top-level MIMEPOST,
 1499|       |       they might not be positioned at start. Rewind them now, as
 1500|       |       a future check while rewinding the parent may cause this
 1501|       |       content to be skipped. */
 1502|    168|    if(mime_subparts_seek(subparts, (curl_off_t)0, SEEK_SET) !=
  ------------------
  |  Branch (1502:8): [True: 0, False: 168]
  ------------------
 1503|    168|       CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|    168|#define CURL_SEEKFUNC_OK       0
  ------------------
 1504|      0|      return CURLE_SEND_FAIL_REWIND;
 1505|       |
 1506|    168|    subparts->parent = part;
 1507|       |    /* Subparts are processed internally: no read callback. */
 1508|    168|    part->seekfunc = mime_subparts_seek;
 1509|    168|    part->freefunc = take_ownership ? mime_subparts_free :
  ------------------
  |  Branch (1509:22): [True: 0, False: 168]
  ------------------
 1510|    168|      mime_subparts_unbind;
 1511|    168|    part->arg = subparts;
 1512|    168|    part->datasize = -1;
 1513|    168|    part->kind = MIMEKIND_MULTIPART;
 1514|    168|  }
 1515|       |
 1516|    168|  return CURLE_OK;
 1517|    168|}
mime.c:cleanup_part_content:
 1057|  4.04k|{
 1058|  4.04k|  if(part->freefunc)
  ------------------
  |  Branch (1058:6): [True: 937, False: 3.11k]
  ------------------
 1059|    937|    part->freefunc(part->arg);
 1060|       |
 1061|  4.04k|  part->readfunc = NULL;
 1062|  4.04k|  part->seekfunc = NULL;
 1063|  4.04k|  part->freefunc = NULL;
 1064|  4.04k|  part->arg = (void *)part;           /* Defaults to part itself. */
 1065|  4.04k|  part->data = NULL;
 1066|  4.04k|  part->fp = NULL;
 1067|  4.04k|  part->datasize = (curl_off_t)0;     /* No size yet. */
 1068|  4.04k|  cleanup_encoder_state(&part->encstate);
 1069|  4.04k|  part->kind = MIMEKIND_NONE;
 1070|  4.04k|  part->flags &= ~(unsigned int)MIME_FAST_READ;
  ------------------
  |  |   36|  4.04k|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1071|  4.04k|  part->lastreadstatus = 1; /* Successful read status. */
 1072|  4.04k|  part->state.state = MIMESTATE_BEGIN;
 1073|  4.04k|}
mime.c:cleanup_encoder_state:
  284|  4.04k|{
  285|  4.04k|  p->pos = 0;
  286|  4.04k|  p->bufbeg = 0;
  287|  4.04k|  p->bufend = 0;
  288|  4.04k|}
mime.c:mime_subparts_unbind:
 1088|    185|{
 1089|    185|  curl_mime *mime = (curl_mime *)ptr;
 1090|       |
 1091|    185|  if(mime && mime->parent) {
  ------------------
  |  Branch (1091:6): [True: 185, False: 0]
  |  Branch (1091:14): [True: 168, False: 17]
  ------------------
 1092|    168|    mime->parent->freefunc = NULL;  /* Be sure we will not be called again. */
 1093|    168|    cleanup_part_content(mime->parent);  /* Avoid dangling pointer in part. */
 1094|       |    mime->parent = NULL;
 1095|    168|  }
 1096|    185|}
mime.c:mimesetstate:
  190|  5.73k|{
  191|  5.73k|  state->state = tok;
  192|  5.73k|  state->ptr = ptr;
  193|  5.73k|  state->offset = 0;
  194|  5.73k|}
mime.c:mime_mem_free:
  614|    937|{
  615|       |  curlx_safefree(((curl_mimepart *)ptr)->data);
  ------------------
  |  | 1336|    937|  do {                      \
  |  | 1337|    937|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|    937|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|    937|    (ptr) = NULL;           \
  |  | 1339|    937|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 937]
  |  |  ------------------
  ------------------
  616|    937|}
mime.c:mime_subparts_seek:
 1032|    168|{
 1033|    168|  curl_mime *mime = (curl_mime *)instream;
 1034|    168|  curl_mimepart *part;
 1035|    168|  int rc = CURL_SEEKFUNC_OK;
  ------------------
  |  |  380|    168|#define CURL_SEEKFUNC_OK       0
  ------------------
 1036|       |
 1037|    168|  if(whence != SEEK_SET || offset)
  ------------------
  |  Branch (1037:6): [True: 0, False: 168]
  |  Branch (1037:28): [True: 0, False: 168]
  ------------------
 1038|      0|    return CURL_SEEKFUNC_CANTSEEK;    /* Only support full rewind. */
  ------------------
  |  |  382|      0|#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking cannot be done, so
  ------------------
 1039|       |
 1040|    168|  if(mime->state.state == MIMESTATE_BEGIN)
  ------------------
  |  Branch (1040:6): [True: 168, False: 0]
  ------------------
 1041|    168|    return CURL_SEEKFUNC_OK;           /* Already rewound. */
  ------------------
  |  |  380|    168|#define CURL_SEEKFUNC_OK       0
  ------------------
 1042|       |
 1043|      0|  for(part = mime->firstpart; part; part = part->nextpart) {
  ------------------
  |  Branch (1043:31): [True: 0, False: 0]
  ------------------
 1044|      0|    int res = mime_part_rewind(part);
 1045|      0|    if(res != CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|      0|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1045:8): [True: 0, False: 0]
  ------------------
 1046|      0|      rc = res;
 1047|      0|  }
 1048|       |
 1049|      0|  if(rc == CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|      0|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1049:6): [True: 0, False: 0]
  ------------------
 1050|      0|    mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
 1051|       |
 1052|      0|  return rc;
 1053|    168|}

curl_mvsnprintf:
 1106|  36.6k|{
 1107|  36.6k|  int retcode;
 1108|  36.6k|  struct nsprintf info;
 1109|       |
 1110|  36.6k|  info.buffer = buffer;
 1111|  36.6k|  info.length = 0;
 1112|  36.6k|  info.max = maxlength;
 1113|       |
 1114|  36.6k|  retcode = formatf(&info, addbyter, format, args);
 1115|  36.6k|  if(info.max) {
  ------------------
  |  Branch (1115:6): [True: 36.6k, False: 1]
  ------------------
 1116|       |    /* we terminate this with a zero byte */
 1117|  36.6k|    if(info.max == info.length) {
  ------------------
  |  Branch (1117:8): [True: 25, False: 36.5k]
  ------------------
 1118|       |      /* we are at maximum, scrap the last letter */
 1119|     25|      info.buffer[-1] = 0;
 1120|     25|      DEBUGASSERT(retcode);
  ------------------
  |  | 1079|     25|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1120:7): [True: 0, False: 25]
  |  Branch (1120:7): [True: 25, False: 0]
  ------------------
 1121|     25|      retcode--; /* do not count the nul byte */
 1122|     25|    }
 1123|  36.5k|    else
 1124|  36.5k|      info.buffer[0] = 0;
 1125|  36.6k|  }
 1126|  36.6k|  return retcode;
 1127|  36.6k|}
curl_msnprintf:
 1130|  36.6k|{
 1131|  36.6k|  int retcode;
 1132|  36.6k|  va_list args; /* argument pointer */
 1133|  36.6k|  va_start(args, format);
 1134|  36.6k|  retcode = curl_mvsnprintf(buffer, maxlength, format, args);
 1135|       |  va_end(args);
 1136|  36.6k|  return retcode;
 1137|  36.6k|}
curlx_dyn_vprintf:
 1153|  79.3k|{
 1154|  79.3k|  struct asprintf info;
 1155|  79.3k|  info.b = dyn;
 1156|  79.3k|  info.merr = MERR_OK;
  ------------------
  |  |   27|  79.3k|#define MERR_OK        0
  ------------------
 1157|       |
 1158|  79.3k|  (void)formatf(&info, alloc_addbyter, format, args);
 1159|  79.3k|  if(info.merr) {
  ------------------
  |  Branch (1159:6): [True: 5, False: 79.3k]
  ------------------
 1160|      5|    curlx_dyn_free(info.b);
 1161|      5|    return info.merr;
 1162|      5|  }
 1163|  79.3k|  return 0;
 1164|  79.3k|}
curl_mvaprintf:
 1167|  27.7k|{
 1168|  27.7k|  struct asprintf info;
 1169|  27.7k|  struct dynbuf dyn;
 1170|  27.7k|  info.b = &dyn;
 1171|  27.7k|  curlx_dyn_init(info.b, DYN_APRINTF);
  ------------------
  |  |   70|  27.7k|#define DYN_APRINTF         8000000
  ------------------
 1172|  27.7k|  info.merr = MERR_OK;
  ------------------
  |  |   27|  27.7k|#define MERR_OK        0
  ------------------
 1173|       |
 1174|  27.7k|  (void)formatf(&info, alloc_addbyter, format, args);
 1175|  27.7k|  if(info.merr) {
  ------------------
  |  Branch (1175:6): [True: 0, False: 27.7k]
  ------------------
 1176|      0|    curlx_dyn_free(info.b);
 1177|      0|    return NULL;
 1178|      0|  }
 1179|  27.7k|  if(curlx_dyn_len(info.b))
  ------------------
  |  Branch (1179:6): [True: 27.7k, False: 0]
  ------------------
 1180|  27.7k|    return curlx_dyn_ptr(info.b);
 1181|      0|  return curlx_strdup("");
  ------------------
  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1182|  27.7k|}
curl_maprintf:
 1185|  27.7k|{
 1186|  27.7k|  va_list args;
 1187|  27.7k|  char *s;
 1188|  27.7k|  va_start(args, format);
 1189|  27.7k|  s = curl_mvaprintf(format, args);
 1190|       |  va_end(args);
 1191|  27.7k|  return s;
 1192|  27.7k|}
curl_mfprintf:
 1232|    161|{
 1233|    161|  int retcode;
 1234|    161|  va_list args; /* argument pointer */
 1235|    161|  va_start(args, format);
 1236|    161|  retcode = formatf(fd, fputc_wrapper, format, args);
 1237|       |  va_end(args);
 1238|    161|  return retcode;
 1239|    161|}
mprintf.c:formatf:
  976|   143k|{
  977|   143k|  int done = 0;   /* number of characters written */
  978|   143k|  int i;
  979|   143k|  int ocount = 0; /* number of output segments */
  980|   143k|  int icount = 0; /* number of input arguments */
  981|       |
  982|   143k|  struct outsegment output[MAX_SEGMENTS];
  983|   143k|  struct va_input input[MAX_PARAMETERS];
  984|   143k|  char work[BUFFSIZE + 2];
  985|       |
  986|       |  /* Parse the format string */
  987|   143k|  if(parsefmt(format, output, input, &ocount, &icount, ap_save))
  ------------------
  |  Branch (987:6): [True: 0, False: 143k]
  ------------------
  988|      0|    return 0;
  989|       |
  990|   583k|  for(i = 0; i < ocount; i++) {
  ------------------
  |  Branch (990:14): [True: 439k, False: 143k]
  ------------------
  991|   439k|    struct outsegment *optr = &output[i];
  992|   439k|    struct va_input *iptr = &input[optr->input];
  993|   439k|    struct mproperty p;
  994|   439k|    size_t outlen = optr->outlen;
  995|       |
  996|   439k|    if(outlen) {
  ------------------
  |  Branch (996:8): [True: 232k, False: 206k]
  ------------------
  997|   232k|      const char *str = optr->start;
  998|   779k|      for(; outlen && *str; outlen--) {
  ------------------
  |  Branch (998:13): [True: 546k, False: 232k]
  |  Branch (998:23): [True: 546k, False: 0]
  ------------------
  999|   546k|        if(stream(*str++, userp))
  ------------------
  |  Branch (999:12): [True: 5, False: 546k]
  ------------------
 1000|      5|          return done;
 1001|   546k|        done++;
 1002|   546k|      }
 1003|   232k|      if(optr->flags & FLAGS_SUBSTR)
  ------------------
  |  Branch (1003:10): [True: 52.1k, False: 180k]
  ------------------
 1004|       |        /* this is a substring */
 1005|  52.1k|        continue;
 1006|   232k|    }
 1007|       |
 1008|   387k|    p.flags = optr->flags;
 1009|       |
 1010|       |    /* pick up the specified width */
 1011|   387k|    if(p.flags & FLAGS_WIDTHPARAM) {
  ------------------
  |  Branch (1011:8): [True: 0, False: 387k]
  ------------------
 1012|      0|      p.width = (int)input[optr->width].val.nums;
 1013|      0|      if(p.width < 0) {
  ------------------
  |  Branch (1013:10): [True: 0, False: 0]
  ------------------
 1014|       |        /* "A negative field width is taken as a '-' flag followed by a
 1015|       |           positive field width." */
 1016|      0|        if(p.width == INT_MIN)
  ------------------
  |  Branch (1016:12): [True: 0, False: 0]
  ------------------
 1017|      0|          p.width = INT_MAX;
 1018|      0|        else
 1019|      0|          p.width = -p.width;
 1020|      0|        p.flags |= FLAGS_LEFT;
 1021|      0|        p.flags &= ~(unsigned int)FLAGS_PAD_NIL;
 1022|      0|      }
 1023|      0|    }
 1024|   387k|    else
 1025|   387k|      p.width = optr->width;
 1026|       |
 1027|       |    /* pick up the specified precision */
 1028|   387k|    if(p.flags & FLAGS_PRECPARAM) {
  ------------------
  |  Branch (1028:8): [True: 78.2k, False: 309k]
  ------------------
 1029|  78.2k|      p.prec = (int)input[optr->precision].val.nums;
 1030|  78.2k|      if(p.prec < 0)
  ------------------
  |  Branch (1030:10): [True: 0, False: 78.2k]
  ------------------
 1031|       |        /* "A negative precision is taken as if the precision were
 1032|       |           omitted." */
 1033|      0|        p.prec = -1;
 1034|  78.2k|    }
 1035|   309k|    else if(p.flags & FLAGS_PREC)
  ------------------
  |  Branch (1035:13): [True: 0, False: 309k]
  ------------------
 1036|      0|      p.prec = optr->precision;
 1037|   309k|    else
 1038|   309k|      p.prec = -1;
 1039|       |
 1040|   387k|    switch(iptr->type) {
 1041|  63.5k|    case MTYPE_INTU:
  ------------------
  |  Branch (1041:5): [True: 63.5k, False: 323k]
  ------------------
 1042|  63.5k|    case MTYPE_LONGU:
  ------------------
  |  Branch (1042:5): [True: 0, False: 387k]
  ------------------
 1043|  63.5k|    case MTYPE_LONGLONGU:
  ------------------
  |  Branch (1043:5): [True: 0, False: 387k]
  ------------------
 1044|  63.5k|      p.flags |= FLAGS_UNSIGNED;
 1045|  63.5k|      if(out_number(userp, stream, &p, iptr->val.numu, 0, work, &done))
  ------------------
  |  Branch (1045:10): [True: 3, False: 63.5k]
  ------------------
 1046|      3|        return done;
 1047|  63.5k|      break;
 1048|       |
 1049|  63.5k|    case MTYPE_INT:
  ------------------
  |  Branch (1049:5): [True: 31.0k, False: 356k]
  ------------------
 1050|  32.1k|    case MTYPE_LONG:
  ------------------
  |  Branch (1050:5): [True: 1.13k, False: 386k]
  ------------------
 1051|  32.1k|    case MTYPE_LONGLONG:
  ------------------
  |  Branch (1051:5): [True: 0, False: 387k]
  ------------------
 1052|  32.1k|      if(out_number(userp, stream, &p, iptr->val.numu,
  ------------------
  |  Branch (1052:10): [True: 1, False: 32.1k]
  ------------------
 1053|  32.1k|                    iptr->val.nums, work, &done))
 1054|      1|        return done;
 1055|  32.1k|      break;
 1056|       |
 1057|   291k|    case MTYPE_STRING:
  ------------------
  |  Branch (1057:5): [True: 291k, False: 95.7k]
  ------------------
 1058|   291k|      if(out_string(userp, stream, &p, iptr->val.str, &done))
  ------------------
  |  Branch (1058:10): [True: 20, False: 291k]
  ------------------
 1059|     20|        return done;
 1060|   291k|      break;
 1061|       |
 1062|   291k|    case MTYPE_PTR:
  ------------------
  |  Branch (1062:5): [True: 0, False: 387k]
  ------------------
 1063|      0|      if(out_pointer(userp, stream, &p, iptr->val.ptr, work, &done))
  ------------------
  |  Branch (1063:10): [True: 0, False: 0]
  ------------------
 1064|      0|        return done;
 1065|      0|      break;
 1066|       |
 1067|      0|    case MTYPE_DOUBLE:
  ------------------
  |  Branch (1067:5): [True: 0, False: 387k]
  ------------------
 1068|      0|      if(out_double(userp, stream, &p, iptr->val.dnum, work, &done))
  ------------------
  |  Branch (1068:10): [True: 0, False: 0]
  ------------------
 1069|      0|        return done;
 1070|      0|      break;
 1071|       |
 1072|      0|    case MTYPE_INTPTR:
  ------------------
  |  Branch (1072:5): [True: 0, False: 387k]
  ------------------
 1073|       |      /* Answer the count of characters written. */
 1074|      0|      if(p.flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (1074:10): [True: 0, False: 0]
  ------------------
 1075|      0|        *(int64_t *)iptr->val.ptr = (int64_t)done;
 1076|      0|      else if(p.flags & FLAGS_LONG)
  ------------------
  |  Branch (1076:15): [True: 0, False: 0]
  ------------------
 1077|      0|        *(long *)iptr->val.ptr = (long)done;
 1078|      0|      else if(!(p.flags & FLAGS_SHORT))
  ------------------
  |  Branch (1078:15): [True: 0, False: 0]
  ------------------
 1079|      0|        *(int *)iptr->val.ptr = done;
 1080|      0|      else
 1081|      0|        *(short *)iptr->val.ptr = (short)done;
 1082|      0|      break;
 1083|       |
 1084|      0|    default:
  ------------------
  |  Branch (1084:5): [True: 0, False: 387k]
  ------------------
 1085|      0|      break;
 1086|   387k|    }
 1087|   387k|  }
 1088|   143k|  return done;
 1089|   143k|}
mprintf.c:parsefmt:
  431|   143k|{
  432|   143k|  const char *fmt = format;
  433|   143k|  int param_num = 0;
  434|   143k|  int max_param = -1;
  435|   143k|  int i;
  436|   143k|  int ocount = 0;
  437|   143k|  unsigned char usedinput[MAX_PARAMETERS / 8];
  438|   143k|  size_t outlen = 0;
  439|   143k|  struct outsegment *optr;
  440|   143k|  int use_dollar = DOLLAR_UNKNOWN;
  441|   143k|  const char *start = fmt;
  442|       |
  443|       |  /* clear, set a bit for each used input */
  444|   143k|  memset(usedinput, 0, sizeof(usedinput));
  445|       |
  446|  1.07M|  while(*fmt) {
  ------------------
  |  Branch (446:9): [True: 933k, False: 143k]
  ------------------
  447|   933k|    if(*fmt == '%') {
  ------------------
  |  Branch (447:8): [True: 397k, False: 535k]
  ------------------
  448|   397k|      struct va_input *iptr;
  449|   397k|      FormatType type;
  450|   397k|      unsigned int flags = 0;
  451|   397k|      int width = 0;
  452|   397k|      int precision = 0;
  453|   397k|      int param = -1;
  454|   397k|      int rc;
  455|   397k|      fmt++;
  456|   397k|      outlen = (size_t)(fmt - start - 1);
  457|   397k|      if(*fmt == '%') {
  ------------------
  |  Branch (457:10): [True: 10.5k, False: 387k]
  ------------------
  458|       |        /* this means a %% that should be output only as %. Create an output
  459|       |           segment. */
  460|  10.5k|        if(outlen) {
  ------------------
  |  Branch (460:12): [True: 51, False: 10.5k]
  ------------------
  461|     51|          optr = &out[ocount++];
  462|     51|          if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|     51|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (462:14): [True: 0, False: 51]
  ------------------
  463|      0|            return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  464|     51|          optr->input = 0;
  465|     51|          optr->flags = FLAGS_SUBSTR;
  466|     51|          optr->start = start;
  467|     51|          optr->outlen = outlen;
  468|     51|        }
  469|  10.5k|        start = fmt;
  470|  10.5k|        fmt++;
  471|  10.5k|        continue; /* while */
  472|  10.5k|      }
  473|       |
  474|   387k|      if(use_dollar != DOLLAR_NOPE) {
  ------------------
  |  Branch (474:10): [True: 140k, False: 246k]
  ------------------
  475|   140k|        param = dollarstring(fmt, &fmt);
  476|   140k|        if(param < 0) {
  ------------------
  |  Branch (476:12): [True: 140k, False: 0]
  ------------------
  477|   140k|          if(use_dollar == DOLLAR_USE)
  ------------------
  |  Branch (477:14): [True: 0, False: 140k]
  ------------------
  478|       |            /* illegal combo */
  479|      0|            return PFMT_DOLLAR;
  ------------------
  |  |  160|      0|#define PFMT_DOLLAR      1 /* bad dollar for main param */
  ------------------
  480|       |
  481|       |          /* we got no positional, get the next arg */
  482|   140k|          param = -1;
  483|   140k|          use_dollar = DOLLAR_NOPE;
  484|   140k|        }
  485|      0|        else
  486|      0|          use_dollar = DOLLAR_USE;
  487|   140k|      }
  488|       |
  489|   387k|      rc = parse_flags(&fmt, &flags, use_dollar, &precision, &width);
  490|   387k|      if(rc)
  ------------------
  |  Branch (490:10): [True: 0, False: 387k]
  ------------------
  491|      0|        return rc;
  492|       |
  493|   387k|      if(parse_conversion(*fmt, &flags, &type))
  ------------------
  |  Branch (493:10): [True: 0, False: 387k]
  ------------------
  494|      0|        continue;
  495|       |
  496|   387k|      if(flags & FLAGS_WIDTHPARAM) {
  ------------------
  |  Branch (496:10): [True: 0, False: 387k]
  ------------------
  497|      0|        if(width < 0)
  ------------------
  |  Branch (497:12): [True: 0, False: 0]
  ------------------
  498|      0|          width = param_num++;
  499|      0|        else {
  500|       |          /* if this identifies a parameter already used, this is illegal */
  501|      0|          if(is_arg_used(usedinput, width))
  ------------------
  |  |  148|      0|#define is_arg_used(x, y)   ((x)[(y) / 8] & (1 << ((y) & 7)))
  |  |  ------------------
  |  |  |  Branch (148:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  502|      0|            return PFMT_WIDTHARG;
  ------------------
  |  |  168|      0|#define PFMT_WIDTHARG    9 /* attempted to use same arg twice, for width */
  ------------------
  503|      0|        }
  504|      0|        if(width >= MAX_PARAMETERS)
  ------------------
  |  |   33|      0|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (504:12): [True: 0, False: 0]
  ------------------
  505|      0|          return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  506|      0|        if(width >= max_param)
  ------------------
  |  Branch (506:12): [True: 0, False: 0]
  ------------------
  507|      0|          max_param = width;
  508|       |
  509|      0|        in[width].type = MTYPE_WIDTH;
  510|       |        /* mark as used */
  511|      0|        mark_arg_used(usedinput, width);
  ------------------
  |  |  149|      0|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  512|      0|      }
  513|       |
  514|   387k|      if(flags & FLAGS_PRECPARAM) {
  ------------------
  |  Branch (514:10): [True: 78.2k, False: 309k]
  ------------------
  515|  78.2k|        if(precision < 0)
  ------------------
  |  Branch (515:12): [True: 78.2k, False: 0]
  ------------------
  516|  78.2k|          precision = param_num++;
  517|      0|        else {
  518|       |          /* if this identifies a parameter already used, this is illegal */
  519|      0|          if(is_arg_used(usedinput, precision))
  ------------------
  |  |  148|      0|#define is_arg_used(x, y)   ((x)[(y) / 8] & (1 << ((y) & 7)))
  |  |  ------------------
  |  |  |  Branch (148:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  520|      0|            return PFMT_PRECARG;
  ------------------
  |  |  169|      0|#define PFMT_PRECARG    10 /* attempted to use same arg twice, for prec */
  ------------------
  521|      0|        }
  522|  78.2k|        if(precision >= MAX_PARAMETERS)
  ------------------
  |  |   33|  78.2k|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (522:12): [True: 0, False: 78.2k]
  ------------------
  523|      0|          return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  524|  78.2k|        if(precision >= max_param)
  ------------------
  |  Branch (524:12): [True: 78.2k, False: 0]
  ------------------
  525|  78.2k|          max_param = precision;
  526|       |
  527|  78.2k|        in[precision].type = MTYPE_PRECISION;
  528|  78.2k|        mark_arg_used(usedinput, precision);
  ------------------
  |  |  149|  78.2k|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  529|  78.2k|      }
  530|       |
  531|       |      /* Handle the specifier */
  532|   387k|      if(param < 0)
  ------------------
  |  Branch (532:10): [True: 387k, False: 2]
  ------------------
  533|   387k|        param = param_num++;
  534|   387k|      if(param >= MAX_PARAMETERS)
  ------------------
  |  |   33|   387k|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (534:10): [True: 0, False: 387k]
  ------------------
  535|      0|        return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  536|   387k|      if(param >= max_param)
  ------------------
  |  Branch (536:10): [True: 387k, False: 2]
  ------------------
  537|   387k|        max_param = param;
  538|       |
  539|   387k|      iptr = &in[param];
  540|   387k|      iptr->type = type;
  541|       |
  542|       |      /* mark this input as used */
  543|   387k|      mark_arg_used(usedinput, param);
  ------------------
  |  |  149|   387k|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  544|       |
  545|   387k|      fmt++;
  546|   387k|      optr = &out[ocount++];
  547|   387k|      if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|   387k|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (547:10): [True: 0, False: 387k]
  ------------------
  548|      0|        return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  549|   387k|      optr->input = (unsigned int)param;
  550|   387k|      optr->flags = flags;
  551|   387k|      optr->width = width;
  552|   387k|      optr->precision = precision;
  553|   387k|      optr->start = start;
  554|   387k|      optr->outlen = outlen;
  555|   387k|      start = fmt;
  556|   387k|    }
  557|   535k|    else
  558|   535k|      fmt++;
  559|   933k|  }
  560|       |
  561|       |  /* is there a trailing piece */
  562|   143k|  outlen = (size_t)(fmt - start);
  563|   143k|  if(outlen) {
  ------------------
  |  Branch (563:6): [True: 52.1k, False: 91.7k]
  ------------------
  564|  52.1k|    optr = &out[ocount++];
  565|  52.1k|    if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|  52.1k|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (565:8): [True: 0, False: 52.1k]
  ------------------
  566|      0|      return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  567|  52.1k|    optr->input = 0;
  568|  52.1k|    optr->flags = FLAGS_SUBSTR;
  569|  52.1k|    optr->start = start;
  570|  52.1k|    optr->outlen = outlen;
  571|  52.1k|  }
  572|       |
  573|       |  /* Read the arg list parameters into our data list */
  574|   609k|  for(i = 0; i < max_param + 1; i++) {
  ------------------
  |  Branch (574:14): [True: 465k, False: 143k]
  ------------------
  575|   465k|    struct va_input *iptr = &in[i];
  576|   465k|    if(!is_arg_used(usedinput, i))
  ------------------
  |  |  148|   465k|#define is_arg_used(x, y)   ((x)[(y) / 8] & (1 << ((y) & 7)))
  ------------------
  |  Branch (576:8): [True: 0, False: 465k]
  ------------------
  577|       |      /* bad input */
  578|      0|      return PFMT_INPUTGAP;
  ------------------
  |  |  167|      0|#define PFMT_INPUTGAP    8 /* gap in arguments */
  ------------------
  579|       |
  580|       |    /* based on the type, read the correct argument */
  581|   465k|    switch(iptr->type) {
  582|   291k|    case MTYPE_STRING:
  ------------------
  |  Branch (582:5): [True: 291k, False: 174k]
  ------------------
  583|   291k|      iptr->val.str = va_arg(arglist, const char *);
  584|   291k|      break;
  585|       |
  586|      0|    case MTYPE_INTPTR:
  ------------------
  |  Branch (586:5): [True: 0, False: 465k]
  ------------------
  587|      0|    case MTYPE_PTR:
  ------------------
  |  Branch (587:5): [True: 0, False: 465k]
  ------------------
  588|      0|      iptr->val.ptr = va_arg(arglist, void *);
  589|      0|      break;
  590|       |
  591|      0|    case MTYPE_LONGLONGU:
  ------------------
  |  Branch (591:5): [True: 0, False: 465k]
  ------------------
  592|      0|      iptr->val.numu = va_arg(arglist, uint64_t);
  593|      0|      break;
  594|       |
  595|      0|    case MTYPE_LONGLONG:
  ------------------
  |  Branch (595:5): [True: 0, False: 465k]
  ------------------
  596|      0|      iptr->val.nums = va_arg(arglist, int64_t);
  597|      0|      break;
  598|       |
  599|      0|    case MTYPE_LONGU:
  ------------------
  |  Branch (599:5): [True: 0, False: 465k]
  ------------------
  600|      0|      iptr->val.numu = va_arg(arglist, unsigned long);
  601|      0|      break;
  602|       |
  603|  1.13k|    case MTYPE_LONG:
  ------------------
  |  Branch (603:5): [True: 1.13k, False: 464k]
  ------------------
  604|  1.13k|      iptr->val.nums = va_arg(arglist, long);
  605|  1.13k|      break;
  606|       |
  607|  63.6k|    case MTYPE_INTU:
  ------------------
  |  Branch (607:5): [True: 63.6k, False: 402k]
  ------------------
  608|  63.6k|      iptr->val.numu = va_arg(arglist, unsigned int);
  609|  63.6k|      break;
  610|       |
  611|  31.0k|    case MTYPE_INT:
  ------------------
  |  Branch (611:5): [True: 31.0k, False: 434k]
  ------------------
  612|  31.0k|    case MTYPE_WIDTH:
  ------------------
  |  Branch (612:5): [True: 0, False: 465k]
  ------------------
  613|   109k|    case MTYPE_PRECISION:
  ------------------
  |  Branch (613:5): [True: 78.2k, False: 387k]
  ------------------
  614|   109k|      iptr->val.nums = va_arg(arglist, int);
  615|   109k|      break;
  616|       |
  617|      0|    case MTYPE_DOUBLE:
  ------------------
  |  Branch (617:5): [True: 0, False: 465k]
  ------------------
  618|      0|      iptr->val.dnum = va_arg(arglist, double);
  619|      0|      break;
  620|       |
  621|      0|    default:
  ------------------
  |  Branch (621:5): [True: 0, False: 465k]
  ------------------
  622|      0|      DEBUGASSERT(NULL); /* unexpected */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (622:7): [True: 0, False: 0]
  |  Branch (622:7): [True: 0, False: 0]
  ------------------
  623|      0|      break;
  624|   465k|    }
  625|   465k|  }
  626|   143k|  *ipieces = max_param + 1;
  627|   143k|  *opieces = ocount;
  628|       |
  629|   143k|  return PFMT_OK;
  ------------------
  |  |  159|   143k|#define PFMT_OK          0
  ------------------
  630|   143k|}
mprintf.c:dollarstring:
  139|   140k|{
  140|   140k|  curl_off_t num;
  141|   140k|  if(curlx_str_number(&p, &num, MAX_PARAMETERS) ||
  ------------------
  |  |   33|   140k|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (141:6): [True: 129k, False: 10.6k]
  ------------------
  142|  10.6k|     curlx_str_single(&p, '$') || !num)
  ------------------
  |  Branch (142:6): [True: 10.6k, False: 0]
  |  Branch (142:35): [True: 0, False: 0]
  ------------------
  143|   140k|    return -1;
  144|      0|  *end = p;
  145|      0|  return (int)num - 1;
  146|   140k|}
mprintf.c:parse_flags:
  174|   387k|{
  175|   387k|  const char *fmt = *fmtp;
  176|   387k|  bool loopit = TRUE;
  ------------------
  |  | 1053|   387k|#define TRUE true
  ------------------
  177|   387k|  unsigned int flags = 0;
  178|   387k|  int width = 0;
  179|   387k|  int precision = 0;
  180|       |
  181|       |  /* Handle the flags */
  182|   477k|  do {
  183|   477k|    switch(*fmt++) {
  184|      0|    case ' ':
  ------------------
  |  Branch (184:5): [True: 0, False: 477k]
  ------------------
  185|      0|      flags |= FLAGS_SPACE;
  186|      0|      break;
  187|      0|    case '+':
  ------------------
  |  Branch (187:5): [True: 0, False: 477k]
  ------------------
  188|      0|      flags |= FLAGS_SHOWSIGN;
  189|      0|      break;
  190|      0|    case '-':
  ------------------
  |  Branch (190:5): [True: 0, False: 477k]
  ------------------
  191|      0|      flags |= FLAGS_LEFT;
  192|      0|      flags &= ~(unsigned int)FLAGS_PAD_NIL;
  193|      0|      break;
  194|      0|    case '#':
  ------------------
  |  Branch (194:5): [True: 0, False: 477k]
  ------------------
  195|      0|      flags |= FLAGS_ALT;
  196|      0|      break;
  197|  78.2k|    case '.':
  ------------------
  |  Branch (197:5): [True: 78.2k, False: 399k]
  ------------------
  198|  78.2k|      if('*' == *fmt) {
  ------------------
  |  Branch (198:10): [True: 78.2k, False: 0]
  ------------------
  199|       |        /* The precision is picked from a specified parameter */
  200|  78.2k|        flags |= FLAGS_PRECPARAM;
  201|  78.2k|        fmt++;
  202|       |
  203|  78.2k|        if(use_dollar == DOLLAR_USE) {
  ------------------
  |  Branch (203:12): [True: 0, False: 78.2k]
  ------------------
  204|      0|          precision = dollarstring(fmt, &fmt);
  205|      0|          if(precision < 0)
  ------------------
  |  Branch (205:14): [True: 0, False: 0]
  ------------------
  206|       |            /* illegal combo */
  207|      0|            return PFMT_DOLLARPREC;
  ------------------
  |  |  162|      0|#define PFMT_DOLLARPREC  3 /* bad dollar use for precision */
  ------------------
  208|      0|        }
  209|  78.2k|        else
  210|       |          /* get it from the next argument */
  211|  78.2k|          precision = -1;
  212|  78.2k|      }
  213|      0|      else {
  214|      0|        bool is_neg;
  215|      0|        curl_off_t num;
  216|      0|        flags |= FLAGS_PREC;
  217|      0|        is_neg = ('-' == *fmt);
  218|      0|        if(is_neg)
  ------------------
  |  Branch (218:12): [True: 0, False: 0]
  ------------------
  219|      0|          fmt++;
  220|      0|        if(curlx_str_number(&fmt, &num, INT_MAX))
  ------------------
  |  Branch (220:12): [True: 0, False: 0]
  ------------------
  221|      0|          return PFMT_PREC;
  ------------------
  |  |  164|      0|#define PFMT_PREC        5 /* precision overflow */
  ------------------
  222|      0|        precision = (int)num;
  223|      0|        if(is_neg)
  ------------------
  |  Branch (223:12): [True: 0, False: 0]
  ------------------
  224|      0|          precision = -precision;
  225|      0|      }
  226|  78.2k|      if((flags & (FLAGS_PREC | FLAGS_PRECPARAM)) ==
  ------------------
  |  Branch (226:10): [True: 0, False: 78.2k]
  ------------------
  227|  78.2k|         (FLAGS_PREC | FLAGS_PRECPARAM))
  228|       |        /* it is not permitted to use both kinds of precision for the same
  229|       |           argument */
  230|      0|        return PFMT_PRECMIX;
  ------------------
  |  |  165|      0|#define PFMT_PRECMIX     6 /* bad mix of precision specifiers */
  ------------------
  231|  78.2k|      break;
  232|  78.2k|    case 'h':
  ------------------
  |  Branch (232:5): [True: 0, False: 477k]
  ------------------
  233|      0|      flags |= FLAGS_SHORT;
  234|      0|      break;
  235|       |#ifdef _WIN32
  236|       |    case 'I':
  237|       |      /* Non-ANSI integer extensions I32 I64 */
  238|       |      if((fmt[0] == '3') && (fmt[1] == '2')) {
  239|       |        flags |= FLAGS_LONG;
  240|       |        fmt += 2;
  241|       |      }
  242|       |      else if((fmt[0] == '6') && (fmt[1] == '4')) {
  243|       |        flags |= FLAGS_LONGLONG;
  244|       |        fmt += 2;
  245|       |      }
  246|       |      else {
  247|       |#if SIZEOF_CURL_OFF_T > SIZEOF_LONG
  248|       |        flags |= FLAGS_LONGLONG;
  249|       |#else
  250|       |        flags |= FLAGS_LONG;
  251|       |#endif
  252|       |      }
  253|       |      break;
  254|       |#endif /* _WIN32 */
  255|  1.13k|    case 'l':
  ------------------
  |  Branch (255:5): [True: 1.13k, False: 476k]
  ------------------
  256|  1.13k|      if(flags & FLAGS_LONG)
  ------------------
  |  Branch (256:10): [True: 0, False: 1.13k]
  ------------------
  257|      0|        flags |= FLAGS_LONGLONG;
  258|  1.13k|      else
  259|  1.13k|        flags |= FLAGS_LONG;
  260|  1.13k|      break;
  261|      0|    case 'L':
  ------------------
  |  Branch (261:5): [True: 0, False: 477k]
  ------------------
  262|      0|      flags |= FLAGS_LONGDOUBLE;
  263|      0|      break;
  264|      0|    case 'q':
  ------------------
  |  Branch (264:5): [True: 0, False: 477k]
  ------------------
  265|      0|      flags |= FLAGS_LONGLONG;
  266|      0|      break;
  267|      0|    case 'z':
  ------------------
  |  Branch (267:5): [True: 0, False: 477k]
  ------------------
  268|       |      /* the code below generates a warning if -Wunreachable-code is
  269|       |         used */
  270|       |#if SIZEOF_SIZE_T > SIZEOF_LONG
  271|       |      flags |= FLAGS_LONGLONG;
  272|       |#else
  273|      0|      flags |= FLAGS_LONG;
  274|      0|#endif
  275|      0|      break;
  276|      0|    case 'O':
  ------------------
  |  Branch (276:5): [True: 0, False: 477k]
  ------------------
  277|       |#if SIZEOF_CURL_OFF_T > SIZEOF_LONG
  278|       |      flags |= FLAGS_LONGLONG;
  279|       |#else
  280|      0|      flags |= FLAGS_LONG;
  281|      0|#endif
  282|      0|      break;
  283|  10.4k|    case '0':
  ------------------
  |  Branch (283:5): [True: 10.4k, False: 466k]
  ------------------
  284|  10.4k|      if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (284:10): [True: 10.4k, False: 0]
  ------------------
  285|  10.4k|        flags |= FLAGS_PAD_NIL;
  286|  10.4k|      FALLTHROUGH();
  ------------------
  |  |  823|  10.4k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  287|  10.4k|    case '1':
  ------------------
  |  Branch (287:5): [True: 0, False: 477k]
  ------------------
  288|  10.4k|    case '2':
  ------------------
  |  Branch (288:5): [True: 0, False: 477k]
  ------------------
  289|  10.5k|    case '3':
  ------------------
  |  Branch (289:5): [True: 51, False: 477k]
  ------------------
  290|  10.5k|    case '4':
  ------------------
  |  Branch (290:5): [True: 0, False: 477k]
  ------------------
  291|  10.5k|    case '5':
  ------------------
  |  Branch (291:5): [True: 0, False: 477k]
  ------------------
  292|  10.6k|    case '6':
  ------------------
  |  Branch (292:5): [True: 102, False: 477k]
  ------------------
  293|  10.6k|    case '7':
  ------------------
  |  Branch (293:5): [True: 0, False: 477k]
  ------------------
  294|  10.6k|    case '8':
  ------------------
  |  Branch (294:5): [True: 0, False: 477k]
  ------------------
  295|  10.6k|    case '9': {
  ------------------
  |  Branch (295:5): [True: 0, False: 477k]
  ------------------
  296|  10.6k|      curl_off_t num;
  297|  10.6k|      flags |= FLAGS_WIDTH;
  298|  10.6k|      fmt--;
  299|  10.6k|      if(curlx_str_number(&fmt, &num, INT_MAX))
  ------------------
  |  Branch (299:10): [True: 0, False: 10.6k]
  ------------------
  300|      0|        return PFMT_WIDTH;
  ------------------
  |  |  166|      0|#define PFMT_WIDTH       7 /* width overflow */
  ------------------
  301|  10.6k|      width = (int)num;
  302|  10.6k|      break;
  303|  10.6k|    }
  304|      0|    case '*':  /* read width from argument list */
  ------------------
  |  Branch (304:5): [True: 0, False: 477k]
  ------------------
  305|      0|      flags |= FLAGS_WIDTHPARAM;
  306|      0|      if(use_dollar == DOLLAR_USE) {
  ------------------
  |  Branch (306:10): [True: 0, False: 0]
  ------------------
  307|      0|        width = dollarstring(fmt, &fmt);
  308|      0|        if(width < 0)
  ------------------
  |  Branch (308:12): [True: 0, False: 0]
  ------------------
  309|       |          /* illegal combo */
  310|      0|          return PFMT_DOLLARWIDTH;
  ------------------
  |  |  161|      0|#define PFMT_DOLLARWIDTH 2 /* bad dollar use for width */
  ------------------
  311|      0|      }
  312|      0|      else
  313|       |        /* pick from the next argument */
  314|      0|        width = -1;
  315|      0|      break;
  316|   387k|    default:
  ------------------
  |  Branch (316:5): [True: 387k, False: 90.0k]
  ------------------
  317|   387k|      loopit = FALSE;
  ------------------
  |  | 1056|   387k|#define FALSE false
  ------------------
  318|   387k|      fmt--;
  319|   387k|      break;
  320|   477k|    } /* switch */
  321|   477k|  } while(loopit); /* do */
  ------------------
  |  Branch (321:11): [True: 90.0k, False: 387k]
  ------------------
  322|   387k|  *flagsp = flags;
  323|   387k|  *precp = precision;
  324|   387k|  *widthp = width;
  325|   387k|  *fmtp = fmt;
  326|   387k|  return PFMT_OK;
  ------------------
  |  |  159|   387k|#define PFMT_OK          0
  ------------------
  327|   387k|}
mprintf.c:parse_conversion:
  331|   387k|{
  332|   387k|  unsigned int flags = *flagp;
  333|   387k|  FormatType type;
  334|   387k|  switch(f) {
  335|      0|  case 'S':
  ------------------
  |  Branch (335:3): [True: 0, False: 387k]
  ------------------
  336|      0|    flags |= FLAGS_ALT;
  337|      0|    type = MTYPE_STRING;
  338|      0|    break;
  339|   291k|  case 's':
  ------------------
  |  Branch (339:3): [True: 291k, False: 95.7k]
  ------------------
  340|   291k|    type = MTYPE_STRING;
  341|   291k|    break;
  342|      0|  case 'n':
  ------------------
  |  Branch (342:3): [True: 0, False: 387k]
  ------------------
  343|      0|    type = MTYPE_INTPTR;
  344|      0|    break;
  345|      0|  case 'p':
  ------------------
  |  Branch (345:3): [True: 0, False: 387k]
  ------------------
  346|      0|    type = MTYPE_PTR;
  347|      0|    break;
  348|  32.1k|  case 'd':
  ------------------
  |  Branch (348:3): [True: 32.1k, False: 355k]
  ------------------
  349|  32.1k|  case 'i':
  ------------------
  |  Branch (349:3): [True: 0, False: 387k]
  ------------------
  350|  32.1k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (350:8): [True: 0, False: 32.1k]
  ------------------
  351|      0|      type = MTYPE_LONGLONG;
  352|  32.1k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (352:13): [True: 1.13k, False: 31.0k]
  ------------------
  353|  1.13k|      type = MTYPE_LONG;
  354|  31.0k|    else
  355|  31.0k|      type = MTYPE_INT;
  356|  32.1k|    break;
  357|  53.1k|  case 'u':
  ------------------
  |  Branch (357:3): [True: 53.1k, False: 334k]
  ------------------
  358|  53.1k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (358:8): [True: 0, False: 53.1k]
  ------------------
  359|      0|      type = MTYPE_LONGLONGU;
  360|  53.1k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (360:13): [True: 0, False: 53.1k]
  ------------------
  361|      0|      type = MTYPE_LONGU;
  362|  53.1k|    else
  363|  53.1k|      type = MTYPE_INTU;
  364|  53.1k|    flags |= FLAGS_UNSIGNED;
  365|  53.1k|    break;
  366|      0|  case 'o':
  ------------------
  |  Branch (366:3): [True: 0, False: 387k]
  ------------------
  367|      0|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (367:8): [True: 0, False: 0]
  ------------------
  368|      0|      type = MTYPE_LONGLONGU;
  369|      0|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (369:13): [True: 0, False: 0]
  ------------------
  370|      0|      type = MTYPE_LONGU;
  371|      0|    else
  372|      0|      type = MTYPE_INTU;
  373|      0|    flags |= FLAGS_OCTAL | FLAGS_UNSIGNED;
  374|      0|    break;
  375|      4|  case 'x':
  ------------------
  |  Branch (375:3): [True: 4, False: 387k]
  ------------------
  376|      4|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (376:8): [True: 0, False: 4]
  ------------------
  377|      0|      type = MTYPE_LONGLONGU;
  378|      4|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (378:13): [True: 0, False: 4]
  ------------------
  379|      0|      type = MTYPE_LONGU;
  380|      4|    else
  381|      4|      type = MTYPE_INTU;
  382|      4|    flags |= FLAGS_HEX | FLAGS_UNSIGNED;
  383|      4|    break;
  384|  10.4k|  case 'X':
  ------------------
  |  Branch (384:3): [True: 10.4k, False: 376k]
  ------------------
  385|  10.4k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (385:8): [True: 0, False: 10.4k]
  ------------------
  386|      0|      type = MTYPE_LONGLONGU;
  387|  10.4k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (387:13): [True: 0, False: 10.4k]
  ------------------
  388|      0|      type = MTYPE_LONGU;
  389|  10.4k|    else
  390|  10.4k|      type = MTYPE_INTU;
  391|  10.4k|    flags |= FLAGS_HEX | FLAGS_UPPER | FLAGS_UNSIGNED;
  392|  10.4k|    break;
  393|      0|  case 'c':
  ------------------
  |  Branch (393:3): [True: 0, False: 387k]
  ------------------
  394|      0|    type = MTYPE_INT;
  395|      0|    flags |= FLAGS_CHAR;
  396|      0|    break;
  397|      0|  case 'f':
  ------------------
  |  Branch (397:3): [True: 0, False: 387k]
  ------------------
  398|      0|    type = MTYPE_DOUBLE;
  399|      0|    break;
  400|      0|  case 'e':
  ------------------
  |  Branch (400:3): [True: 0, False: 387k]
  ------------------
  401|      0|    type = MTYPE_DOUBLE;
  402|      0|    flags |= FLAGS_FLOATE;
  403|      0|    break;
  404|      0|  case 'E':
  ------------------
  |  Branch (404:3): [True: 0, False: 387k]
  ------------------
  405|      0|    type = MTYPE_DOUBLE;
  406|      0|    flags |= FLAGS_FLOATE | FLAGS_UPPER;
  407|      0|    break;
  408|      0|  case 'g':
  ------------------
  |  Branch (408:3): [True: 0, False: 387k]
  ------------------
  409|      0|    type = MTYPE_DOUBLE;
  410|      0|    flags |= FLAGS_FLOATG;
  411|      0|    break;
  412|      0|  case 'G':
  ------------------
  |  Branch (412:3): [True: 0, False: 387k]
  ------------------
  413|      0|    type = MTYPE_DOUBLE;
  414|      0|    flags |= FLAGS_FLOATG | FLAGS_UPPER;
  415|      0|    break;
  416|      0|  default:
  ------------------
  |  Branch (416:3): [True: 0, False: 387k]
  ------------------
  417|       |    /* invalid instruction, disregard and continue */
  418|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  419|   387k|  } /* switch */
  420|       |
  421|   387k|  *flagp |= flags;
  422|   387k|  *typep = type;
  423|       |  return FALSE;
  ------------------
  |  | 1056|   387k|#define FALSE false
  ------------------
  424|   387k|}
mprintf.c:out_number:
  738|  95.7k|{
  739|  95.7k|  const unsigned char *digits = Curl_ldigits;
  740|  95.7k|  int flags = p->flags;
  741|  95.7k|  int width = p->width;
  742|  95.7k|  int prec = p->prec;
  743|  95.7k|  bool is_alt = flags & FLAGS_ALT;
  744|  95.7k|  bool is_neg = FALSE;
  ------------------
  |  | 1056|  95.7k|#define FALSE false
  ------------------
  745|  95.7k|  int base = 10;
  746|       |
  747|       |  /* 'workend' points to the final buffer byte position, but with an extra
  748|       |     byte as margin to avoid the (FALSE?) warning Coverity gives us
  749|       |     otherwise */
  750|  95.7k|  char *workend = &work[BUFFSIZE - 2];
  ------------------
  |  |   31|  95.7k|#define BUFFSIZE 326 /* buffer for long-to-str and float-to-str calcs, should
  ------------------
  751|  95.7k|  char *w;
  752|       |
  753|  95.7k|  if(flags & FLAGS_CHAR) {
  ------------------
  |  Branch (753:6): [True: 0, False: 95.7k]
  ------------------
  754|       |    /* Character. */
  755|      0|    if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (755:8): [True: 0, False: 0]
  ------------------
  756|      0|      while(--width > 0)
  ------------------
  |  Branch (756:13): [True: 0, False: 0]
  ------------------
  757|      0|        OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  758|      0|    OUTCHAR((char)num);
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  759|      0|    if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (759:8): [True: 0, False: 0]
  ------------------
  760|      0|      while(--width > 0)
  ------------------
  |  Branch (760:13): [True: 0, False: 0]
  ------------------
  761|      0|        OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  762|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  763|      0|  }
  764|  95.7k|  if(flags & FLAGS_OCTAL)
  ------------------
  |  Branch (764:6): [True: 0, False: 95.7k]
  ------------------
  765|       |    /* Octal unsigned integer */
  766|      0|    base = 8;
  767|       |
  768|  95.7k|  else if(flags & FLAGS_HEX) {
  ------------------
  |  Branch (768:11): [True: 10.5k, False: 85.2k]
  ------------------
  769|       |    /* Hexadecimal unsigned integer */
  770|  10.5k|    digits = (flags & FLAGS_UPPER) ? Curl_udigits : Curl_ldigits;
  ------------------
  |  Branch (770:14): [True: 10.4k, False: 4]
  ------------------
  771|  10.5k|    base = 16;
  772|  10.5k|  }
  773|  85.2k|  else if(flags & FLAGS_UNSIGNED)
  ------------------
  |  Branch (773:11): [True: 53.0k, False: 32.1k]
  ------------------
  774|       |    /* Decimal unsigned integer */
  775|  53.0k|    ;
  776|       |
  777|  32.1k|  else {
  778|       |    /* Decimal integer. */
  779|  32.1k|    is_neg = (nums < 0);
  780|  32.1k|    if(is_neg) {
  ------------------
  |  Branch (780:8): [True: 0, False: 32.1k]
  ------------------
  781|       |      /* signed_num might fail to hold absolute negative minimum by 1 */
  782|      0|      int64_t signed_num; /* Used to convert negative in positive. */
  783|      0|      signed_num = nums + (int64_t)1;
  784|      0|      signed_num = -signed_num;
  785|      0|      num = (uint64_t)signed_num;
  786|      0|      num += (uint64_t)1;
  787|      0|    }
  788|  32.1k|  }
  789|       |
  790|       |  /* Supply a default precision if none was given. */
  791|  95.7k|  if(prec == -1)
  ------------------
  |  Branch (791:6): [True: 95.7k, False: 0]
  ------------------
  792|  95.7k|    prec = 1;
  793|       |
  794|       |  /* Put the number in WORK. */
  795|  95.7k|  w = workend;
  796|  95.7k|  DEBUGASSERT(base <= 16);
  ------------------
  |  | 1079|  95.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (796:3): [True: 0, False: 95.7k]
  |  Branch (796:3): [True: 95.7k, False: 0]
  ------------------
  797|  95.7k|  switch(base) {
  798|  85.2k|  case 10:
  ------------------
  |  Branch (798:3): [True: 85.2k, False: 10.5k]
  ------------------
  799|   201k|    while(num > 0) {
  ------------------
  |  Branch (799:11): [True: 116k, False: 85.2k]
  ------------------
  800|   116k|      *w-- = (char)('0' + (num % 10));
  801|   116k|      num /= 10;
  802|   116k|    }
  803|  85.2k|    break;
  804|  10.5k|  default:
  ------------------
  |  Branch (804:3): [True: 10.5k, False: 85.2k]
  ------------------
  805|  31.4k|    while(num > 0) {
  ------------------
  |  Branch (805:11): [True: 20.9k, False: 10.5k]
  ------------------
  806|  20.9k|      *w-- = digits[num % base];
  807|  20.9k|      num /= base;
  808|  20.9k|    }
  809|  10.5k|    break;
  810|  95.7k|  }
  811|  95.7k|  width -= (int)(workend - w);
  812|  95.7k|  prec -= (int)(workend - w);
  813|       |
  814|  95.7k|  if(is_alt && base == 8 && prec <= 0) {
  ------------------
  |  Branch (814:6): [True: 0, False: 95.7k]
  |  Branch (814:16): [True: 0, False: 0]
  |  Branch (814:29): [True: 0, False: 0]
  ------------------
  815|      0|    *w-- = '0';
  816|      0|    --width;
  817|      0|  }
  818|       |
  819|  95.7k|  if(prec > 0) {
  ------------------
  |  Branch (819:6): [True: 35.5k, False: 60.1k]
  ------------------
  820|  35.5k|    width -= prec;
  821|  71.0k|    while(prec-- > 0 && w >= work)
  ------------------
  |  Branch (821:11): [True: 35.5k, False: 35.5k]
  |  Branch (821:25): [True: 35.5k, False: 0]
  ------------------
  822|  35.5k|      *w-- = '0';
  823|  35.5k|  }
  824|       |
  825|  95.7k|  if(is_alt && base == 16)
  ------------------
  |  Branch (825:6): [True: 0, False: 95.7k]
  |  Branch (825:16): [True: 0, False: 0]
  ------------------
  826|      0|    width -= 2;
  827|       |
  828|  95.7k|  if(is_neg || (flags & FLAGS_SHOWSIGN) || (flags & FLAGS_SPACE))
  ------------------
  |  Branch (828:6): [True: 1, False: 95.7k]
  |  Branch (828:16): [True: 0, False: 95.7k]
  |  Branch (828:44): [True: 0, False: 95.7k]
  ------------------
  829|      0|    --width;
  830|       |
  831|  95.7k|  if(!(flags & FLAGS_LEFT) && !(flags & FLAGS_PAD_NIL))
  ------------------
  |  Branch (831:6): [True: 95.7k, False: 1]
  |  Branch (831:31): [True: 85.2k, False: 10.4k]
  ------------------
  832|  85.8k|    while(width-- > 0)
  ------------------
  |  Branch (832:11): [True: 612, False: 85.2k]
  ------------------
  833|    612|      OUTCHAR(' ');
  ------------------
  |  |   43|    612|  do {                                    \
  |  |   44|    612|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 612]
  |  |  ------------------
  |  |   45|    612|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|    612|    (*donep)++;                           \
  |  |   47|    612|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 612]
  |  |  ------------------
  ------------------
  834|       |
  835|  95.7k|  if(is_neg)
  ------------------
  |  Branch (835:6): [True: 0, False: 95.7k]
  ------------------
  836|      0|    OUTCHAR('-');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  837|  95.7k|  else if(flags & FLAGS_SHOWSIGN)
  ------------------
  |  Branch (837:11): [True: 0, False: 95.7k]
  ------------------
  838|      0|    OUTCHAR('+');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  839|  95.7k|  else if(flags & FLAGS_SPACE)
  ------------------
  |  Branch (839:11): [True: 0, False: 95.7k]
  ------------------
  840|      0|    OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  841|       |
  842|  95.7k|  if(is_alt && base == 16) {
  ------------------
  |  Branch (842:6): [True: 0, False: 95.7k]
  |  Branch (842:16): [True: 0, False: 0]
  ------------------
  843|      0|    OUTCHAR('0');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  844|      0|    if(flags & FLAGS_UPPER)
  ------------------
  |  Branch (844:8): [True: 0, False: 0]
  ------------------
  845|      0|      OUTCHAR('X');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  846|      0|    else
  847|      0|      OUTCHAR('x');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  848|      0|  }
  849|       |
  850|  95.7k|  if(!(flags & FLAGS_LEFT) && (flags & FLAGS_PAD_NIL))
  ------------------
  |  Branch (850:6): [True: 95.7k, False: 1]
  |  Branch (850:31): [True: 10.4k, False: 85.2k]
  ------------------
  851|  10.5k|    while(width-- > 0)
  ------------------
  |  Branch (851:11): [True: 54, False: 10.4k]
  ------------------
  852|     54|      OUTCHAR('0');
  ------------------
  |  |   43|     54|  do {                                    \
  |  |   44|     54|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 54]
  |  |  ------------------
  |  |   45|     54|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|     54|    (*donep)++;                           \
  |  |   47|     54|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 54]
  |  |  ------------------
  ------------------
  853|       |
  854|       |  /* Write the number. */
  855|   268k|  while(++w <= workend) {
  ------------------
  |  Branch (855:9): [True: 173k, False: 95.7k]
  ------------------
  856|   173k|    OUTCHAR(*w);
  ------------------
  |  |   43|   173k|  do {                                    \
  |  |   44|   173k|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 4, False: 173k]
  |  |  ------------------
  |  |   45|   173k|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      4|#define TRUE true
  |  |  ------------------
  |  |   46|   173k|    (*donep)++;                           \
  |  |   47|   173k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 173k]
  |  |  ------------------
  ------------------
  857|   173k|  }
  858|       |
  859|  95.7k|  if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (859:6): [True: 0, False: 95.7k]
  ------------------
  860|      0|    while(width-- > 0)
  ------------------
  |  Branch (860:11): [True: 0, False: 0]
  ------------------
  861|      0|      OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  862|       |
  863|  95.7k|  return FALSE;
  ------------------
  |  | 1056|  95.7k|#define FALSE false
  ------------------
  864|  95.7k|}
mprintf.c:out_string:
  873|   291k|{
  874|   291k|  int flags = p->flags;
  875|   291k|  int width = p->width;
  876|   291k|  int prec = p->prec;
  877|   291k|  size_t len;
  878|       |
  879|   291k|  if(!str) {
  ------------------
  |  Branch (879:6): [True: 327, False: 291k]
  ------------------
  880|       |    /* Write null string if there is space. */
  881|    327|    if(prec == -1 || prec >= (int)CURL_CSTRLEN(nilstr)) {
  ------------------
  |  | 1296|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  |  Branch (881:8): [True: 327, False: 0]
  |  Branch (881:22): [True: 0, False: 0]
  ------------------
  882|    327|      str = nilstr;
  883|    327|      len = CURL_CSTRLEN(nilstr);
  ------------------
  |  | 1296|    327|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  884|       |      /* Disable quotes around (nil) */
  885|    327|      flags &= ~(unsigned int)FLAGS_ALT;
  886|    327|    }
  887|      0|    else {
  888|      0|      str = "";
  889|      0|      len = 0;
  890|      0|    }
  891|    327|  }
  892|   291k|  else if(prec != -1)
  ------------------
  |  Branch (892:11): [True: 78.2k, False: 213k]
  ------------------
  893|  78.2k|    len = (size_t)prec;
  894|   213k|  else if(*str == '\0')
  ------------------
  |  Branch (894:11): [True: 104k, False: 108k]
  ------------------
  895|   104k|    len = 0;
  896|   108k|  else
  897|   108k|    len = strlen(str);
  898|       |
  899|   291k|  width -= (len > INT_MAX) ? INT_MAX : (int)len;
  ------------------
  |  Branch (899:12): [True: 0, False: 291k]
  ------------------
  900|       |
  901|   291k|  if(flags & FLAGS_ALT)
  ------------------
  |  Branch (901:6): [True: 0, False: 291k]
  ------------------
  902|      0|    OUTCHAR('"');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  903|       |
  904|   291k|  if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (904:6): [True: 291k, False: 0]
  ------------------
  905|   291k|    while(width-- > 0)
  ------------------
  |  Branch (905:11): [True: 0, False: 291k]
  ------------------
  906|      0|      OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  907|       |
  908|  17.8M|  for(; len && *str; len--)
  ------------------
  |  Branch (908:9): [True: 17.5M, False: 291k]
  |  Branch (908:16): [True: 17.5M, False: 0]
  ------------------
  909|  17.5M|    OUTCHAR(*str++);
  ------------------
  |  |   43|  17.8M|  do {                                    \
  |  |   44|  17.5M|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 20, False: 17.5M]
  |  |  ------------------
  |  |   45|  17.5M|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|     20|#define TRUE true
  |  |  ------------------
  |  |   46|  17.5M|    (*donep)++;                           \
  |  |   47|  17.5M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 17.5M]
  |  |  ------------------
  ------------------
  910|   291k|  if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (910:6): [True: 0, False: 291k]
  ------------------
  911|      0|    while(width-- > 0)
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  ------------------
  912|      0|      OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  913|       |
  914|   291k|  if(flags & FLAGS_ALT)
  ------------------
  |  Branch (914:6): [True: 0, False: 291k]
  ------------------
  915|      0|    OUTCHAR('"');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  916|       |
  917|   291k|  return FALSE;
  ------------------
  |  | 1056|   291k|#define FALSE false
  ------------------
  918|   291k|}
mprintf.c:addbyter:
 1093|   306k|{
 1094|   306k|  struct nsprintf *infop = f;
 1095|   306k|  if(infop->length < infop->max) {
  ------------------
  |  Branch (1095:6): [True: 306k, False: 24]
  ------------------
 1096|       |    /* only do this if we have not reached max length yet */
 1097|   306k|    *infop->buffer++ = (char)outc; /* store */
 1098|   306k|    infop->length++; /* we are now one byte larger */
 1099|   306k|    return 0;     /* fputc() returns like this on success */
 1100|   306k|  }
 1101|     24|  return 1;
 1102|   306k|}
mprintf.c:alloc_addbyter:
 1141|  17.9M|{
 1142|  17.9M|  struct asprintf *infop = f;
 1143|  17.9M|  CURLcode result = curlx_dyn_addn(infop->b, &outc, 1);
 1144|  17.9M|  if(result) {
  ------------------
  |  Branch (1144:6): [True: 5, False: 17.9M]
  ------------------
 1145|      5|    infop->merr = result == CURLE_TOO_LARGE ? MERR_TOO_LARGE : MERR_MEM;
  ------------------
  |  |   29|      5|#define MERR_TOO_LARGE 2
  ------------------
                  infop->merr = result == CURLE_TOO_LARGE ? MERR_TOO_LARGE : MERR_MEM;
  ------------------
  |  |   28|      5|#define MERR_MEM       1
  ------------------
  |  Branch (1145:19): [True: 5, False: 0]
  ------------------
 1146|      5|    return 1; /* fail */
 1147|      5|  }
 1148|  17.9M|  return 0;
 1149|  17.9M|}
mprintf.c:fputc_wrapper:
 1214|  8.42k|{
 1215|  8.42k|  int out = outc;
 1216|  8.42k|  FILE *s = f;
 1217|  8.42k|  int rc = fputc(out, s);
 1218|       |  return rc == EOF;
 1219|  8.42k|}

Curl_multi_handle:
  228|  11.7k|{
  229|  11.7k|  struct Curl_multi *multi = curlx_calloc(1, sizeof(struct Curl_multi));
  ------------------
  |  | 1475|  11.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  230|       |
  231|  11.7k|  if(!multi)
  ------------------
  |  Branch (231:6): [True: 0, False: 11.7k]
  ------------------
  232|      0|    return NULL;
  233|       |
  234|  11.7k|  multi->magic = CURLMULTI_MAGIC_NUMBER;
  ------------------
  |  |   41|  11.7k|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  ------------------
  235|       |
  236|  11.7k|  Curl_dnscache_init(&multi->dnscache, dnssize);
  237|  11.7k|  Curl_mntfy_init(multi);
  238|  11.7k|  Curl_multi_ev_init(multi, ev_hashsize);
  239|  11.7k|  Curl_uint32_tbl_init(&multi->xfers, NULL);
  240|  11.7k|  Curl_uint32_bset_init(&multi->process);
  241|  11.7k|  Curl_uint32_bset_init(&multi->dirty);
  242|  11.7k|  Curl_uint32_bset_init(&multi->pending);
  243|  11.7k|  Curl_uint32_bset_init(&multi->msgsent);
  244|  11.7k|  Curl_hash_init(&multi->proto_hash, 23,
  245|  11.7k|                 Curl_hash_str, curlx_str_key_compare, ph_freeentry);
  246|  11.7k|  Curl_llist_init(&multi->msglist, NULL);
  247|       |
  248|  11.7k|  multi->multiplexing = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  249|  11.7k|  multi->max_concurrent_streams = 100;
  250|  11.7k|  multi->last_timeout_ms = -1;
  251|  11.7k|#ifdef ENABLE_WAKEUP
  252|  11.7k|  multi->wakeup_pair[0] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  11.7k|#define CURL_SOCKET_BAD (-1)
  ------------------
  253|  11.7k|  multi->wakeup_pair[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  11.7k|#define CURL_SOCKET_BAD (-1)
  ------------------
  254|  11.7k|#endif
  255|  11.7k|#ifdef ENABLE_INTERNAL_WAKEUP
  256|  11.7k|  multi->wakeup_internal[0] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  11.7k|#define CURL_SOCKET_BAD (-1)
  ------------------
  257|  11.7k|  multi->wakeup_internal[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  11.7k|#define CURL_SOCKET_BAD (-1)
  ------------------
  258|  11.7k|#endif
  259|       |
  260|  11.7k|  if(Curl_mntfy_resize(multi) ||
  ------------------
  |  Branch (260:6): [True: 0, False: 11.7k]
  ------------------
  261|  11.7k|     Curl_uint32_bset_resize(&multi->process, xfer_table_size) ||
  ------------------
  |  Branch (261:6): [True: 0, False: 11.7k]
  ------------------
  262|  11.7k|     Curl_uint32_bset_resize(&multi->pending, xfer_table_size) ||
  ------------------
  |  Branch (262:6): [True: 0, False: 11.7k]
  ------------------
  263|  11.7k|     Curl_uint32_bset_resize(&multi->dirty, xfer_table_size) ||
  ------------------
  |  Branch (263:6): [True: 0, False: 11.7k]
  ------------------
  264|  11.7k|     Curl_uint32_bset_resize(&multi->msgsent, xfer_table_size) ||
  ------------------
  |  Branch (264:6): [True: 0, False: 11.7k]
  ------------------
  265|  11.7k|     Curl_uint32_tbl_resize(&multi->xfers, xfer_table_size))
  ------------------
  |  Branch (265:6): [True: 0, False: 11.7k]
  ------------------
  266|      0|    goto error;
  267|       |
  268|  11.7k|  multi->admin = curl_easy_init();
  269|  11.7k|  if(!multi->admin)
  ------------------
  |  Branch (269:6): [True: 0, False: 11.7k]
  ------------------
  270|      0|    goto error;
  271|       |  /* Initialize admin handle to operate inside this multi */
  272|  11.7k|  multi->admin->multi = multi;
  273|  11.7k|  multi->admin->state.internal = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  274|  11.7k|  Curl_llist_init(&multi->admin->state.timeoutlist, NULL);
  275|       |
  276|  11.7k|#ifdef DEBUGBUILD
  277|  11.7k|  if(getenv("CURL_DEBUG"))
  ------------------
  |  Branch (277:6): [True: 0, False: 11.7k]
  ------------------
  278|      0|    multi->admin->set.verbose = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  279|  11.7k|#endif
  280|  11.7k|  Curl_uint32_tbl_add(&multi->xfers, multi->admin, &multi->admin->mid);
  281|  11.7k|  Curl_uint32_bset_add(&multi->process, multi->admin->mid);
  282|       |
  283|  11.7k|  if(Curl_cshutdn_init(&multi->cshutdn, multi))
  ------------------
  |  Branch (283:6): [True: 0, False: 11.7k]
  ------------------
  284|      0|    goto error;
  285|       |
  286|  11.7k|  Curl_cpool_init(&multi->cpool, multi->admin, NULL, chashsize);
  287|       |
  288|  11.7k|#ifdef USE_SSL
  289|  11.7k|  if(Curl_ssl_scache_create(sesssize, 2, &multi->ssl_scache))
  ------------------
  |  Branch (289:6): [True: 0, False: 11.7k]
  ------------------
  290|      0|    goto error;
  291|       |#else
  292|       |  (void)sesssize;
  293|       |#endif
  294|       |
  295|       |#ifdef USE_WINSOCK
  296|       |  multi->wsa_event = WSACreateEvent();
  297|       |  if(multi->wsa_event == WSA_INVALID_EVENT)
  298|       |    goto error;
  299|       |#endif
  300|  11.7k|#ifdef ENABLE_WAKEUP
  301|       |  /* When enabled, rely on this to work. We ignore this in previous
  302|       |   * versions, but that seems an unnecessary complication. */
  303|  11.7k|  if(Curl_wakeup_init(multi->wakeup_pair, TRUE) < 0)
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  |  Branch (303:6): [True: 0, False: 11.7k]
  ------------------
  304|      0|    goto error;
  305|  11.7k|#endif
  306|  11.7k|#ifdef ENABLE_INTERNAL_WAKEUP
  307|  11.7k|  if(Curl_wakeup_init(multi->wakeup_internal, TRUE) < 0)
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  |  Branch (307:6): [True: 0, False: 11.7k]
  ------------------
  308|      0|    goto error;
  309|  11.7k|#endif
  310|       |
  311|  11.7k|  if(Curl_probeipv6(multi))
  ------------------
  |  Branch (311:6): [True: 0, False: 11.7k]
  ------------------
  312|      0|    goto error;
  313|       |
  314|  11.7k|#ifdef USE_RESOLV_THREADED
  315|  11.7k|  if(xfer_table_size < CURL_XFER_TABLE_SIZE) { /* easy multi */
  ------------------
  |  |   52|  11.7k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  |  Branch (315:6): [True: 0, False: 11.7k]
  ------------------
  316|      0|    if(Curl_async_thrdd_multi_init(multi, 0, 2, 10))
  ------------------
  |  Branch (316:8): [True: 0, False: 0]
  ------------------
  317|      0|      goto error;
  318|      0|  }
  319|  11.7k|  else { /* real multi handle */
  320|  11.7k|    if(Curl_async_thrdd_multi_init(multi, 0, 20, 2000))
  ------------------
  |  Branch (320:8): [True: 0, False: 11.7k]
  ------------------
  321|      0|      goto error;
  322|  11.7k|  }
  323|  11.7k|#endif
  324|       |
  325|  11.7k|  return multi;
  326|       |
  327|      0|error:
  328|       |
  329|      0|#ifdef USE_RESOLV_THREADED
  330|      0|  Curl_async_thrdd_multi_destroy(multi, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  331|      0|#endif
  332|      0|  Curl_multi_ev_cleanup(multi);
  333|      0|  Curl_hash_destroy(&multi->proto_hash);
  334|      0|  Curl_dnscache_destroy(&multi->dnscache);
  335|      0|  Curl_cpool_destroy(&multi->cpool);
  336|      0|  Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
  337|      0|#ifdef USE_SSL
  338|      0|  Curl_ssl_scache_destroy(multi->ssl_scache);
  339|      0|#endif
  340|      0|  if(multi->admin) {
  ------------------
  |  Branch (340:6): [True: 0, False: 0]
  ------------------
  341|      0|    Curl_multi_ev_xfer_done(multi, multi->admin);
  342|      0|    multi->admin->multi = NULL;
  343|      0|    Curl_close(&multi->admin);
  344|      0|  }
  345|      0|  Curl_mntfy_cleanup(multi);
  346|       |
  347|      0|  Curl_uint32_bset_destroy(&multi->process);
  348|      0|  Curl_uint32_bset_destroy(&multi->dirty);
  349|      0|  Curl_uint32_bset_destroy(&multi->pending);
  350|      0|  Curl_uint32_bset_destroy(&multi->msgsent);
  351|      0|  Curl_uint32_tbl_destroy(&multi->xfers);
  352|      0|#ifdef ENABLE_WAKEUP
  353|      0|  Curl_wakeup_destroy(multi->wakeup_pair);
  354|      0|#endif
  355|      0|#ifdef ENABLE_INTERNAL_WAKEUP
  356|      0|  Curl_wakeup_destroy(multi->wakeup_internal);
  357|      0|#endif
  358|       |
  359|      0|  curlx_free(multi);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  360|       |  return NULL;
  361|  11.7k|}
curl_multi_init:
  364|  11.7k|{
  365|  11.7k|  return Curl_multi_handle(CURL_XFER_TABLE_SIZE,
  ------------------
  |  |   52|  11.7k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  366|  11.7k|                           CURL_SOCKET_HASH_TABLE_SIZE,
  ------------------
  |  |   58|  11.7k|#define CURL_SOCKET_HASH_TABLE_SIZE 911
  ------------------
  367|  11.7k|                           CURL_CONNECTION_HASH_SIZE,
  ------------------
  |  |   62|  11.7k|#define CURL_CONNECTION_HASH_SIZE 97
  ------------------
  368|  11.7k|                           CURL_DNS_HASH_SIZE,
  ------------------
  |  |   66|  11.7k|#define CURL_DNS_HASH_SIZE 71
  ------------------
  369|  11.7k|                           CURL_TLS_SESSION_SIZE);
  ------------------
  |  |   70|  11.7k|#define CURL_TLS_SESSION_SIZE 25
  ------------------
  370|  11.7k|}
Curl_is_connecting:
  387|  35.1k|{
  388|  35.1k|  return data->mstate < MSTATE_DO;
  389|  35.1k|}
Curl_multi_add_handle:
  463|  12.5k|{
  464|  12.5k|  CURLMcode mresult;
  465|       |
  466|       |  /* Prevent users from adding same easy handle more than once and prevent
  467|       |     adding to more than one multi stack */
  468|  12.5k|  if(data->multi)
  ------------------
  |  Branch (468:6): [True: 0, False: 12.5k]
  ------------------
  469|      0|    return CURLM_ADDED_ALREADY;
  470|       |
  471|  12.5k|  if(multi->dead) {
  ------------------
  |  Branch (471:6): [True: 0, False: 12.5k]
  ------------------
  472|       |    /* a "dead" handle cannot get added transfers while any existing easy
  473|       |       handles are still alive - but if there are none alive anymore, it is
  474|       |       fine to start over and unmark the "deadness" of this handle.
  475|       |       This means only the admin handle MUST be present. */
  476|      0|    if((Curl_uint32_tbl_count(&multi->xfers) != 1) ||
  ------------------
  |  Branch (476:8): [True: 0, False: 0]
  ------------------
  477|      0|       !Curl_uint32_tbl_contains(&multi->xfers, 0))
  ------------------
  |  Branch (477:8): [True: 0, False: 0]
  ------------------
  478|      0|      return CURLM_ABORTED_BY_CALLBACK;
  479|      0|    multi->dead = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  480|      0|    Curl_uint32_bset_clear(&multi->process);
  481|      0|    Curl_uint32_bset_clear(&multi->dirty);
  482|      0|    Curl_uint32_bset_clear(&multi->pending);
  483|      0|    Curl_uint32_bset_clear(&multi->msgsent);
  484|      0|  }
  485|       |
  486|  12.5k|  if(data->multi_easy) {
  ------------------
  |  Branch (486:6): [True: 0, False: 12.5k]
  ------------------
  487|       |    /* if this easy handle was previously used for curl_easy_perform(), there
  488|       |       is a private multi handle here that we can kill */
  489|      0|    curl_multi_cleanup(data->multi_easy);
  490|      0|    data->multi_easy = NULL;
  491|      0|  }
  492|       |
  493|       |  /* Insert the easy into the multi->xfers table, assigning it a `mid`. */
  494|  12.5k|  if(multi_xfers_add(multi, data))
  ------------------
  |  Branch (494:6): [True: 0, False: 12.5k]
  ------------------
  495|      0|    return CURLM_OUT_OF_MEMORY;
  496|       |
  497|       |  /* Initialize timeout list for this handle */
  498|  12.5k|  Curl_llist_init(&data->state.timeoutlist, NULL);
  499|       |
  500|       |  /*
  501|       |   * No failure allowed in this function beyond this point. No modification
  502|       |   * of easy nor multi handle allowed before this except for potential
  503|       |   * multi's connection pool growing which will not be undone in this
  504|       |   * function no matter what.
  505|       |   */
  506|  12.5k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (506:6): [True: 0, False: 12.5k]
  ------------------
  507|      0|    data->set.errorbuffer[0] = 0;
  508|       |
  509|  12.5k|  data->state.os_errno = 0;
  510|       |
  511|       |  /* make the Curl_easy refer back to this multi handle - before
  512|       |     Curl_expire() is called. */
  513|  12.5k|  data->multi = multi;
  514|       |
  515|       |  /* set the easy handle */
  516|  12.5k|  multistate(data, MSTATE_INIT);
  ------------------
  |  |  196|  12.5k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
  517|       |  /* not yet passed INIT state */
  518|  12.5k|  data->state.really_alive = FALSE;
  ------------------
  |  | 1056|  12.5k|#define FALSE false
  ------------------
  519|       |
  520|       |#ifdef USE_LIBPSL
  521|       |  /* Do the same for PSL. */
  522|       |  if(data->share && (data->share->specifier & (1 << CURL_LOCK_DATA_PSL)))
  523|       |    data->psl = &data->share->psl;
  524|       |  else
  525|       |    data->psl = &multi->psl;
  526|       |#endif
  527|       |
  528|       |  /* add the easy handle to the process set */
  529|  12.5k|  Curl_uint32_bset_add(&multi->process, data->mid);
  530|  12.5k|  ++multi->xfers_alive;
  531|  12.5k|  ++multi->xfers_total_ever;
  532|       |
  533|  12.5k|  Curl_cpool_xfer_init(data);
  534|  12.5k|  multi_warn_debug(multi, data);
  535|       |
  536|       |  /* Make sure the new handle will run */
  537|  12.5k|  Curl_multi_mark_dirty(data);
  538|       |
  539|       |  /* Necessary in event based processing, where dirty handles trigger
  540|       |   * a timeout callback invocation. */
  541|  12.5k|  mresult = Curl_update_timer(multi);
  542|  12.5k|  if(mresult) {
  ------------------
  |  Branch (542:6): [True: 0, False: 12.5k]
  ------------------
  543|      0|    data->multi = NULL; /* not anymore */
  544|      0|    Curl_uint32_tbl_remove(&multi->xfers, data->mid);
  545|      0|    data->mid = UINT32_MAX;
  546|      0|    return mresult;
  547|      0|  }
  548|       |
  549|       |  /* The admin handle only ever has default timeouts set. To improve the
  550|       |     state somewhat we clone the timeouts from each added handle so that the
  551|       |     admin handle always has the same timeouts as the most recently added
  552|       |     easy handle. */
  553|  12.5k|  multi->admin->set.timeout = data->set.timeout;
  554|  12.5k|  multi->admin->set.server_response_timeout =
  555|  12.5k|    data->set.server_response_timeout;
  556|  12.5k|  multi->admin->set.no_signal = data->set.no_signal;
  557|       |
  558|  12.5k|  CURL_TRC_M(data, "added to multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  12.5k|  do {                                   \
  |  |  149|  12.5k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  12.5k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  12.5k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  25.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 12.5k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 12.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  25.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  12.5k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  12.5k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  559|  12.5k|             data->mid, Curl_multi_xfers_running(multi),
  560|  12.5k|             Curl_uint32_tbl_count(&multi->xfers));
  561|  12.5k|  return CURLM_OK;
  562|  12.5k|}
curl_multi_add_handle:
  565|  11.7k|{
  566|  11.7k|  struct Curl_mapi_guard guard;
  567|  11.7k|  CURLMcode mresult;
  568|       |
  569|  11.7k|  if(CURL_MAPI_ENTER(&guard, m, multi_add_handle, &mresult)) {
  ------------------
  |  |  183|  11.7k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (183:3): [True: 11.7k, False: 0]
  |  |  |  Branch (183:56): [True: 11.7k, False: 0]
  |  |  ------------------
  ------------------
  570|  11.7k|    struct Curl_easy *data = curl;
  571|       |    /* Verify that we got a somewhat good easy handle too */
  572|  11.7k|    if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |   34|  11.7k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|  11.7k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|  11.7k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 11.7k, False: 0]
  |  |  |  Branch (34:12): [True: 11.7k, False: 0]
  |  |  ------------------
  |  |   35|  11.7k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (572:8): [True: 0, False: 11.7k]
  |  Branch (572:9): [True: 0, False: 0]
  |  Branch (572:9): [True: 0, False: 0]
  ------------------
  573|      0|      mresult = CURLM_BAD_EASY_HANDLE;
  574|  11.7k|    else
  575|  11.7k|      mresult = Curl_multi_add_handle(m, data);
  576|  11.7k|  }
  577|  11.7k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  185|  11.7k|  Curl_mapi_leave(g)
  ------------------
  578|  11.7k|  return mresult;
  579|  11.7k|}
Curl_multi_remove_handle:
  776|  12.5k|{
  777|  12.5k|  CURLMcode mresult;
  778|  12.5k|  bool premature;
  779|  12.5k|  struct Curl_llist_node *e;
  780|  12.5k|  uint32_t mid;
  781|       |
  782|       |  /* Prevent users from trying to remove same easy handle more than once */
  783|  12.5k|  if(!data->multi)
  ------------------
  |  Branch (783:6): [True: 0, False: 12.5k]
  ------------------
  784|      0|    return CURLM_OK; /* it is already removed so let's say it is fine! */
  785|       |
  786|       |  /* Prevent users from trying to remove an easy handle from the wrong multi */
  787|  12.5k|  if(data->multi != multi)
  ------------------
  |  Branch (787:6): [True: 0, False: 12.5k]
  ------------------
  788|      0|    return CURLM_BAD_EASY_HANDLE;
  789|       |
  790|  12.5k|  if(data->mid == UINT32_MAX) {
  ------------------
  |  Branch (790:6): [True: 0, False: 12.5k]
  ------------------
  791|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (791:5): [Folded, False: 0]
  |  Branch (791:5): [Folded, False: 0]
  ------------------
  792|      0|    return CURLM_INTERNAL_ERROR;
  793|      0|  }
  794|  12.5k|  if(Curl_uint32_tbl_get(&multi->xfers, data->mid) != data) {
  ------------------
  |  Branch (794:6): [True: 0, False: 12.5k]
  ------------------
  795|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (795:5): [Folded, False: 0]
  |  Branch (795:5): [Folded, False: 0]
  ------------------
  796|      0|    return CURLM_INTERNAL_ERROR;
  797|      0|  }
  798|       |
  799|  12.5k|  premature = (data->mstate < MSTATE_COMPLETED);
  800|       |
  801|  12.5k|  if(data->conn) {
  ------------------
  |  Branch (801:6): [True: 596, False: 11.9k]
  ------------------
  802|       |    /* If the 'state' is not INIT or COMPLETED, we might need to do something
  803|       |       nice to put the easy_handle in a good known state when this returns. */
  804|    596|    if(premature && (data->mstate > MSTATE_DO))
  ------------------
  |  Branch (804:8): [True: 596, False: 0]
  |  Branch (804:21): [True: 0, False: 596]
  ------------------
  805|      0|      streamclose(data->conn);
  ------------------
  |  |   87|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   83|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
  806|       |
  807|       |    /* multi_done() clears the association between the easy handle and the
  808|       |       connection.
  809|       |       Note that this ignores the return code because there is
  810|       |       nothing really useful to do with it anyway! */
  811|    596|    (void)multi_done(data, data->result, premature);
  812|    596|  }
  813|       |
  814|       |  /* The timer must be shut down before data->multi is set to NULL, else the
  815|       |     timenode will remain in the splay tree after curl_easy_cleanup is
  816|       |     called. Do it after multi_done() in case that sets another time! */
  817|  12.5k|  Curl_expire_clear(data);
  818|       |
  819|       |  /* If in `msgsent`, it was deducted from `multi->xfers_alive` already. */
  820|  12.5k|  if(!Curl_uint32_bset_contains(&multi->msgsent, data->mid))
  ------------------
  |  Branch (820:6): [True: 817, False: 11.7k]
  ------------------
  821|    817|    --multi->xfers_alive;
  822|       |
  823|  12.5k|  if(data->state.really_alive) {
  ------------------
  |  Branch (823:6): [True: 817, False: 11.7k]
  ------------------
  824|    817|    data->state.really_alive = FALSE;
  ------------------
  |  | 1056|    817|#define FALSE false
  ------------------
  825|    817|    --multi->xfers_really_alive;
  826|    817|    if(!multi->xfers_really_alive)
  ------------------
  |  Branch (826:8): [True: 361, False: 456]
  ------------------
  827|    361|      (void)multi_assess_wakeup(multi);
  828|    817|  }
  829|       |
  830|  12.5k|  Curl_wildcard_dtor(&data->wildcard);
  831|       |
  832|  12.5k|  data->mstate = MSTATE_COMPLETED;
  833|       |
  834|       |  /* Remove the association between the connection and the handle */
  835|  12.5k|  Curl_detach_connection(data);
  836|       |
  837|       |  /* Tell event handling that this transfer is definitely going away */
  838|  12.5k|  Curl_multi_ev_xfer_done(multi, data);
  839|       |
  840|  12.5k|  if(data->set.connect_only) {
  ------------------
  |  Branch (840:6): [True: 3, False: 12.5k]
  ------------------
  841|      3|    if(data->multi_easy) {
  ------------------
  |  Branch (841:8): [True: 0, False: 3]
  ------------------
  842|      0|      if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (842:10): [True: 0, False: 0]
  ------------------
  843|       |        /* Mark any connect-only connection for closure */
  844|      0|        struct connectdata *conn;
  845|      0|        (void)Curl_getconnectinfo(data, &conn);
  846|      0|        if(conn && conn->bits.connect_only)
  ------------------
  |  Branch (846:12): [True: 0, False: 0]
  |  Branch (846:20): [True: 0, False: 0]
  ------------------
  847|      0|          connclose(conn);
  ------------------
  |  |   88|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   82|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  848|      0|      }
  849|      0|    }
  850|      3|    else {
  851|       |      /* This removes a handle that was part the multi interface that used
  852|       |         CONNECT_ONLY, that connection is now left alive but since this handle
  853|       |         has bits.close set nothing can use that connection anymore and it is
  854|       |         forbidden from reuse. This easy handle cannot find the connection
  855|       |         anymore once removed from the multi handle
  856|       |
  857|       |         Better close the connection here, at once. */
  858|      3|      struct connectdata *conn;
  859|      3|      (void)Curl_getconnectinfo(data, &conn);
  860|      3|      if(conn)
  ------------------
  |  Branch (860:10): [True: 0, False: 3]
  ------------------
  861|      0|        Curl_conn_terminate(data, conn, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  862|      3|    }
  863|      3|  }
  864|       |
  865|       |#ifdef USE_LIBPSL
  866|       |  /* Remove the PSL association. */
  867|       |  if(data->psl == &multi->psl)
  868|       |    data->psl = NULL;
  869|       |#endif
  870|       |
  871|       |  /* make sure there is no pending message in the queue sent from this easy
  872|       |     handle */
  873|  12.5k|  for(e = Curl_llist_head(&multi->msglist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (873:45): [True: 11.4k, False: 1.14k]
  ------------------
  874|  11.4k|    struct Curl_message *msg = Curl_node_elem(e);
  875|       |
  876|  11.4k|    if(msg->extmsg.easy_handle == data) {
  ------------------
  |  Branch (876:8): [True: 11.4k, False: 0]
  ------------------
  877|  11.4k|      Curl_node_remove(e);
  878|       |      /* there can only be one from this specific handle */
  879|  11.4k|      break;
  880|  11.4k|    }
  881|  11.4k|  }
  882|       |
  883|       |  /* clear the association to this multi handle */
  884|  12.5k|  mid = data->mid;
  885|  12.5k|  DEBUGASSERT(Curl_uint32_tbl_contains(&multi->xfers, mid));
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (885:3): [True: 0, False: 12.5k]
  |  Branch (885:3): [True: 12.5k, False: 0]
  ------------------
  886|  12.5k|  Curl_uint32_tbl_remove(&multi->xfers, mid);
  887|  12.5k|  Curl_uint32_bset_remove(&multi->process, mid);
  888|  12.5k|  Curl_uint32_bset_remove(&multi->dirty, mid);
  889|  12.5k|  Curl_uint32_bset_remove(&multi->pending, mid);
  890|  12.5k|  Curl_uint32_bset_remove(&multi->msgsent, mid);
  891|  12.5k|  data->multi = NULL;
  892|  12.5k|  data->mid = UINT32_MAX;
  893|  12.5k|  data->master_mid = UINT32_MAX;
  894|       |
  895|       |  /* A pending transfer *might* be able to run now. */
  896|  12.5k|  multi_schedule_pending(multi);
  897|  12.5k|  mresult = Curl_update_timer(multi);
  898|  12.5k|  if(mresult)
  ------------------
  |  Branch (898:6): [True: 0, False: 12.5k]
  ------------------
  899|      0|    return mresult;
  900|       |
  901|  12.5k|  mresult = multi_assess_wakeup(multi);
  902|  12.5k|  if(mresult) {
  ------------------
  |  Branch (902:6): [True: 0, False: 12.5k]
  ------------------
  903|      0|    failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  904|      0|    return mresult;
  905|      0|  }
  906|       |
  907|  12.5k|  CURL_TRC_M(data, "removed from multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  12.5k|  do {                                   \
  |  |  149|  12.5k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  12.5k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  12.5k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  25.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 12.5k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 12.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  25.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  12.5k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  12.5k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  908|  12.5k|             mid, Curl_multi_xfers_running(multi),
  909|  12.5k|             Curl_uint32_tbl_count(&multi->xfers));
  910|  12.5k|  return CURLM_OK;
  911|  12.5k|}
curl_multi_remove_handle:
  914|  11.7k|{
  915|  11.7k|  struct Curl_mapi_guard guard;
  916|  11.7k|  CURLMcode mresult;
  917|       |
  918|  11.7k|  if(CURL_MAPI_ENTER(&guard, m, multi_remove_handle, &mresult)) {
  ------------------
  |  |  183|  11.7k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (183:3): [True: 11.7k, False: 0]
  |  |  |  Branch (183:56): [True: 11.7k, False: 0]
  |  |  ------------------
  ------------------
  919|  11.7k|    struct Curl_easy *data = curl;
  920|  11.7k|    if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |   34|  11.7k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|  11.7k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|  11.7k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 11.7k, False: 0]
  |  |  |  Branch (34:12): [True: 11.7k, False: 0]
  |  |  ------------------
  |  |   35|  11.7k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (920:8): [True: 0, False: 11.7k]
  |  Branch (920:9): [True: 0, False: 0]
  |  Branch (920:9): [True: 0, False: 0]
  ------------------
  921|      0|      mresult = CURLM_BAD_EASY_HANDLE;
  922|  11.7k|    else
  923|  11.7k|      mresult = Curl_multi_remove_handle(m, data);
  924|  11.7k|  }
  925|  11.7k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  185|  11.7k|  Curl_mapi_leave(g)
  ------------------
  926|  11.7k|  return mresult;
  927|  11.7k|}
Curl_multiplex_wanted:
  931|  6.50k|{
  932|  6.50k|  return multi && multi->multiplexing;
  ------------------
  |  Branch (932:10): [True: 6.50k, False: 0]
  |  Branch (932:19): [True: 6.50k, False: 0]
  ------------------
  933|  6.50k|}
Curl_detach_connection:
  942|  63.0k|{
  943|  63.0k|  struct connectdata *conn = data->conn;
  944|  63.0k|  if(conn) {
  ------------------
  |  Branch (944:6): [True: 12.5k, False: 50.5k]
  ------------------
  945|       |    /* this should never happen, prevent underflow */
  946|  12.5k|    DEBUGASSERT(conn->attached_xfers);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (946:5): [True: 0, False: 12.5k]
  |  Branch (946:5): [True: 12.5k, False: 0]
  ------------------
  947|  12.5k|    if(conn->attached_xfers) {
  ------------------
  |  Branch (947:8): [True: 12.5k, False: 0]
  ------------------
  948|  12.5k|      conn->attached_xfers--;
  949|  12.5k|      if(!conn->attached_xfers)
  ------------------
  |  Branch (949:10): [True: 12.5k, False: 0]
  ------------------
  950|  12.5k|        conn->attached_multi = NULL;
  951|  12.5k|    }
  952|  12.5k|  }
  953|  63.0k|  data->conn = NULL;
  954|  63.0k|}
Curl_attach_connection:
  963|  12.5k|{
  964|  12.5k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (964:3): [True: 0, False: 12.5k]
  |  Branch (964:3): [True: 12.5k, False: 0]
  ------------------
  965|  12.5k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (965:3): [True: 0, False: 12.5k]
  |  Branch (965:3): [True: 12.5k, False: 0]
  ------------------
  966|  12.5k|  DEBUGASSERT(conn);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (966:3): [True: 0, False: 12.5k]
  |  Branch (966:3): [True: 12.5k, False: 0]
  ------------------
  967|  12.5k|  DEBUGASSERT(conn->attached_xfers < UINT32_MAX);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (967:3): [True: 0, False: 12.5k]
  |  Branch (967:3): [True: 12.5k, False: 0]
  ------------------
  968|  12.5k|  data->conn = conn;
  969|  12.5k|  conn->attached_xfers++;
  970|       |  /* all attached transfers must be from the same multi */
  971|  12.5k|  if(!conn->attached_multi)
  ------------------
  |  Branch (971:6): [True: 12.5k, False: 0]
  ------------------
  972|  12.5k|    conn->attached_multi = data->multi;
  973|  12.5k|  DEBUGASSERT(conn->attached_multi == data->multi);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (973:3): [True: 0, False: 12.5k]
  |  Branch (973:3): [True: 12.5k, False: 0]
  ------------------
  974|       |
  975|  12.5k|  if(conn->scheme && conn->scheme->run->attach)
  ------------------
  |  Branch (975:6): [True: 12.5k, False: 0]
  |  Branch (975:22): [True: 0, False: 12.5k]
  ------------------
  976|      0|    conn->scheme->run->attach(data, conn);
  977|  12.5k|}
Curl_multi_pollset:
 1136|  4.02k|{
 1137|  4.02k|  CURLcode result = CURLE_OK;
 1138|       |
 1139|  4.02k|  Curl_pollset_reset(ps);
 1140|  4.02k|#ifdef ENABLE_INTERNAL_WAKEUP
 1141|       |  /* The admin handle always listens on the wakeup socket when there
 1142|       |   * are transfers alive. */
 1143|  4.02k|  if(data->multi && (data == data->multi->admin) &&
  ------------------
  |  Branch (1143:6): [True: 4.02k, False: 0]
  |  Branch (1143:21): [True: 1.76k, False: 2.25k]
  ------------------
 1144|  1.76k|     data->multi->xfers_really_alive) {
  ------------------
  |  Branch (1144:6): [True: 1.76k, False: 0]
  ------------------
 1145|  1.76k|    CURL_TRC_M(data, "adding wakeup, %u xfers really alive",
  ------------------
  |  |  148|  1.76k|  do {                                   \
  |  |  149|  1.76k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  1.76k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  1.76k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  3.53k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 1.76k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.76k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  3.53k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  1.76k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  1.76k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  1.76k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 1.76k]
  |  |  ------------------
  ------------------
 1146|  1.76k|               data->multi->xfers_really_alive);
 1147|  1.76k|    result = Curl_pollset_add_in(data, ps, data->multi->wakeup_internal[0]);
  ------------------
  |  |  160|  1.76k|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|  1.76k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1148|  1.76k|  }
 1149|  4.02k|#endif
 1150|       |  /* If the transfer has no connection, this is fine. Happens when
 1151|       |     called via curl_multi_remove_handle() => Curl_multi_ev_assess() =>
 1152|       |     Curl_multi_pollset(). */
 1153|  4.02k|  if(!result && data->conn) {
  ------------------
  |  Branch (1153:6): [True: 4.02k, False: 0]
  |  Branch (1153:17): [True: 2.24k, False: 1.77k]
  ------------------
 1154|  2.24k|    switch(data->mstate) {
 1155|      0|    case MSTATE_INIT:
  ------------------
  |  Branch (1155:5): [True: 0, False: 2.24k]
  ------------------
 1156|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (1156:5): [True: 0, False: 2.24k]
  ------------------
 1157|      0|    case MSTATE_SETUP:
  ------------------
  |  Branch (1157:5): [True: 0, False: 2.24k]
  ------------------
 1158|      0|    case MSTATE_CONNECT:
  ------------------
  |  Branch (1158:5): [True: 0, False: 2.24k]
  ------------------
 1159|       |      /* nothing to poll for yet */
 1160|      0|      break;
 1161|       |
 1162|  2.24k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (1162:5): [True: 2.24k, False: 0]
  ------------------
 1163|  2.24k|      result = mstate_connecting_pollset(data, ps);
 1164|  2.24k|      break;
 1165|       |
 1166|      0|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (1166:5): [True: 0, False: 2.24k]
  ------------------
 1167|      0|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (1167:5): [True: 0, False: 2.24k]
  ------------------
 1168|      0|      result = mstate_protocol_pollset(data, ps);
 1169|      0|      break;
 1170|       |
 1171|      0|    case MSTATE_DO:
  ------------------
  |  Branch (1171:5): [True: 0, False: 2.24k]
  ------------------
 1172|      0|    case MSTATE_DOING:
  ------------------
  |  Branch (1172:5): [True: 0, False: 2.24k]
  ------------------
 1173|      0|      result = mstate_do_pollset(data, ps);
 1174|      0|      break;
 1175|       |
 1176|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (1176:5): [True: 0, False: 2.24k]
  ------------------
 1177|      0|      result = mstate_domore_pollset(data, ps);
 1178|      0|      break;
 1179|       |
 1180|      0|    case MSTATE_DID: /* same as PERFORMING in regard to polling */
  ------------------
  |  Branch (1180:5): [True: 0, False: 2.24k]
  ------------------
 1181|      0|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (1181:5): [True: 0, False: 2.24k]
  ------------------
 1182|      0|      result = mstate_perform_pollset(data, ps);
 1183|      0|      break;
 1184|       |
 1185|      0|    case MSTATE_RATELIMITING:
  ------------------
  |  Branch (1185:5): [True: 0, False: 2.24k]
  ------------------
 1186|       |      /* we need to let time pass, ignore socket(s) */
 1187|      0|      break;
 1188|       |
 1189|      0|    case MSTATE_DONE:
  ------------------
  |  Branch (1189:5): [True: 0, False: 2.24k]
  ------------------
 1190|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (1190:5): [True: 0, False: 2.24k]
  ------------------
 1191|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (1191:5): [True: 0, False: 2.24k]
  ------------------
 1192|       |      /* nothing more to poll for */
 1193|      0|      break;
 1194|       |
 1195|      0|    default:
  ------------------
  |  Branch (1195:5): [True: 0, False: 2.24k]
  ------------------
 1196|      0|      failf(data, "multi_getsock: unexpected multi state %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1197|      0|            (int)data->mstate);
 1198|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1198:7): [Folded, False: 0]
  |  Branch (1198:7): [Folded, False: 0]
  ------------------
 1199|      0|      break;
 1200|  2.24k|    }
 1201|  2.24k|  }
 1202|       |
 1203|  4.02k|  if(result) {
  ------------------
  |  Branch (1203:6): [True: 0, False: 4.02k]
  ------------------
 1204|      0|    if(result == CURLE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1204:8): [True: 0, False: 0]
  ------------------
 1205|      0|      return CURLM_OUT_OF_MEMORY;
 1206|      0|    failf(data, "error determining pollset: %d", (int)result);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1207|      0|    return CURLM_INTERNAL_ERROR;
 1208|      0|  }
 1209|       |
 1210|  4.02k|#ifdef CURLVERBOSE
 1211|  4.02k|  if(CURL_TRC_M_is_verbose(data)) {
  ------------------
  |  |  135|  4.02k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  329|  4.02k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  8.04k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 4.02k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 4.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  8.04k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  4.02k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1212|      0|    size_t timeout_count = Curl_llist_count(&data->state.timeoutlist);
 1213|      0|    switch(ps->n) {
 1214|      0|    case 0:
  ------------------
  |  Branch (1214:5): [True: 0, False: 0]
  ------------------
 1215|      0|      CURL_TRC_M(data, "pollset[], timeouts=%zu, paused %d/%d (r/w)",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1216|      0|                 timeout_count,
 1217|      0|                 Curl_xfer_send_is_paused(data),
 1218|      0|                 Curl_xfer_recv_is_paused(data));
 1219|      0|      break;
 1220|      0|    case 1:
  ------------------
  |  Branch (1220:5): [True: 0, False: 0]
  ------------------
 1221|      0|      CURL_TRC_M(data, "pollset[fd=%" FMT_SOCKET_T " %s%s], timeouts=%zu",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1222|      0|                 ps->sockets[0],
 1223|      0|                 (ps->actions[0] & CURL_POLL_IN) ? "IN" : "",
 1224|      0|                 (ps->actions[0] & CURL_POLL_OUT) ? "OUT" : "",
 1225|      0|                 timeout_count);
 1226|      0|      break;
 1227|      0|    case 2:
  ------------------
  |  Branch (1227:5): [True: 0, False: 0]
  ------------------
 1228|      0|      CURL_TRC_M(data, "pollset[fd=%" FMT_SOCKET_T " %s%s, "
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1229|      0|                 "fd=%" FMT_SOCKET_T " %s%s], timeouts=%zu",
 1230|      0|                 ps->sockets[0],
 1231|      0|                 (ps->actions[0] & CURL_POLL_IN) ? "IN" : "",
 1232|      0|                 (ps->actions[0] & CURL_POLL_OUT) ? "OUT" : "",
 1233|      0|                 ps->sockets[1],
 1234|      0|                 (ps->actions[1] & CURL_POLL_IN) ? "IN" : "",
 1235|      0|                 (ps->actions[1] & CURL_POLL_OUT) ? "OUT" : "",
 1236|      0|                 timeout_count);
 1237|      0|      break;
 1238|      0|    default:
  ------------------
  |  Branch (1238:5): [True: 0, False: 0]
  ------------------
 1239|      0|      CURL_TRC_M(data, "pollset[fds=%u], timeouts=%zu", ps->n, timeout_count);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1240|      0|      break;
 1241|      0|    }
 1242|      0|    CURL_TRC_EASY_TIMERS(data);
  ------------------
  |  |  333|      0|  do {                                  \
  |  |  334|      0|    if(CURL_TRC_TIMER_is_verbose(data)) \
  |  |  ------------------
  |  |  |  |  139|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  335|      0|      Curl_trc_easy_timers(data);       \
  |  |  336|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (336:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1243|      0|  }
 1244|  4.02k|#endif
 1245|       |
 1246|  4.02k|  return CURLM_OK;
 1247|  4.02k|}
curl_multi_fdset:
 1252|  1.76k|{
 1253|  1.76k|  struct Curl_mapi_guard guard;
 1254|  1.76k|  CURLMcode mresult;
 1255|       |
 1256|  1.76k|  if(CURL_MAPI_ENTER(&guard, m, multi_fdset, &mresult)) {
  ------------------
  |  |  183|  1.76k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (183:3): [True: 1.76k, False: 0]
  |  |  |  Branch (183:56): [True: 1.76k, False: 0]
  |  |  ------------------
  ------------------
 1257|       |    /* Scan through all the easy handles to get the file descriptors set.
 1258|       |       Some easy handles may not have connected to the remote host yet,
 1259|       |       and then we must make sure that is done. */
 1260|  1.76k|    struct Curl_multi *multi = m;
 1261|  1.76k|    struct easy_pollset ps;
 1262|  1.76k|    int this_max_fd = -1;
 1263|  1.76k|    unsigned int i;
 1264|  1.76k|    uint32_t mid;
 1265|  1.76k|    (void)exc_fd_set;
 1266|       |
 1267|  1.76k|    Curl_pollset_init(&ps);
 1268|  1.76k|    if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (1268:8): [True: 1.76k, False: 0]
  ------------------
 1269|  4.02k|      do {
 1270|  4.02k|        struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 1271|       |
 1272|  4.02k|        if(!data) {
  ------------------
  |  Branch (1272:12): [True: 0, False: 4.02k]
  ------------------
 1273|      0|          DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1273:11): [Folded, False: 0]
  |  Branch (1273:11): [Folded, False: 0]
  ------------------
 1274|      0|          continue;
 1275|      0|        }
 1276|       |
 1277|  4.02k|        Curl_multi_pollset(data, &ps);
 1278|  6.80k|        for(i = 0; i < ps.n; i++) {
  ------------------
  |  Branch (1278:20): [True: 2.78k, False: 4.02k]
  ------------------
 1279|  2.78k|          if(!FDSET_SOCK(ps.sockets[i]))
  ------------------
  |  |   99|  2.78k|#define FDSET_SOCK(s) ((s) < FD_SETSIZE)
  ------------------
  |  Branch (1279:14): [True: 0, False: 2.78k]
  ------------------
 1280|       |            /* pretend it does not exist */
 1281|      0|            continue;
 1282|  2.78k|          if(ps.actions[i] & CURL_POLL_IN)
  ------------------
  |  |  283|  2.78k|#define CURL_POLL_IN     1
  ------------------
  |  Branch (1282:14): [True: 2.71k, False: 62]
  ------------------
 1283|  2.78k|            FD_SET(ps.sockets[i], read_fd_set);
 1284|  2.78k|          if(ps.actions[i] & CURL_POLL_OUT)
  ------------------
  |  |  284|  2.78k|#define CURL_POLL_OUT    2
  ------------------
  |  Branch (1284:14): [True: 62, False: 2.71k]
  ------------------
 1285|  2.78k|            FD_SET(ps.sockets[i], write_fd_set);
 1286|  2.78k|          if((int)ps.sockets[i] > this_max_fd)
  ------------------
  |  Branch (1286:14): [True: 2.78k, False: 0]
  ------------------
 1287|  2.78k|            this_max_fd = (int)ps.sockets[i];
 1288|  2.78k|        }
 1289|  4.02k|      } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (1289:15): [True: 2.25k, False: 1.76k]
  ------------------
 1290|  1.76k|    }
 1291|       |
 1292|  1.76k|    Curl_cshutdn_setfds(&multi->cshutdn, multi->admin,
 1293|  1.76k|                        read_fd_set, write_fd_set, &this_max_fd);
 1294|       |
 1295|  1.76k|    *max_fd = this_max_fd;
 1296|  1.76k|    Curl_pollset_cleanup(&ps);
 1297|       |
 1298|  1.76k|    mresult = CURLM_OK;
 1299|  1.76k|  }
 1300|  1.76k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  185|  1.76k|  Curl_mapi_leave(g)
  ------------------
 1301|  1.76k|  return mresult;
 1302|  1.76k|}
Curl_multi_wakeup_internal:
 1716|    511|{
 1717|       |  /* This is expected to be invocable from another thread which
 1718|       |   * does NOT outlive the multi handle. Check for sanity. */
 1719|    511|  if(GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   48|    511|  (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  |   41|    511|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|    511|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (48:3): [True: 511, False: 0]
  |  |  |  Branch (48:5): [True: 511, False: 0]
  |  |  |  Branch (48:12): [True: 511, False: 0]
  |  |  ------------------
  |  |   49|    511|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1719:6): [True: 0, False: 0]
  |  Branch (1719:6): [True: 0, False: 0]
  ------------------
 1720|    511|    Curl_wakeup_signal(multi->wakeup_internal);
 1721|      0|  else
 1722|       |    DEBUGASSERT(0);
  ------------------
  |  | 1079|    511|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1722:5): [Folded, False: 0]
  |  Branch (1722:5): [Folded, False: 0]
  ------------------
 1723|    511|}
Curl_multi_connchanged:
 1754|  6.25k|{
 1755|       |  multi->recheckstate = TRUE;
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
 1756|  6.25k|}
curl_multi_perform:
 2959|  13.1k|{
 2960|  13.1k|  struct Curl_mapi_guard guard;
 2961|  13.1k|  CURLMcode mresult;
 2962|       |
 2963|  13.1k|  if(CURL_MAPI_ENTER(&guard, m, multi_perform, &mresult)) {
  ------------------
  |  |  183|  13.1k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (183:3): [True: 13.1k, False: 0]
  |  |  |  Branch (183:56): [True: 13.1k, False: 0]
  |  |  ------------------
  ------------------
 2964|  13.1k|    mresult = multi_perform(m, running_handles);
 2965|  13.1k|  }
 2966|  13.1k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  185|  13.1k|  Curl_mapi_leave(g)
  ------------------
 2967|  13.1k|  return mresult;
 2968|  13.1k|}
curl_multi_cleanup:
 2971|  11.7k|{
 2972|  11.7k|  struct Curl_mapi_guard guard;
 2973|  11.7k|  CURLMcode mresult;
 2974|       |
 2975|  11.7k|  if(CURL_MAPI_ENTER(&guard, m, multi_cleanup, &mresult)) {
  ------------------
  |  |  183|  11.7k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (183:3): [True: 11.7k, False: 0]
  |  |  |  Branch (183:56): [True: 11.7k, False: 0]
  |  |  ------------------
  ------------------
 2976|  11.7k|    struct Curl_multi *multi = m;
 2977|  11.7k|    void *entry;
 2978|  11.7k|    uint32_t mid;
 2979|       |
 2980|       |    /* First remove all remaining easy handles,
 2981|       |     * close internal ones. admin handle is special */
 2982|  11.7k|    if(Curl_uint32_tbl_first(&multi->xfers, &mid, &entry)) {
  ------------------
  |  Branch (2982:8): [True: 11.7k, False: 0]
  ------------------
 2983|  11.7k|      do {
 2984|  11.7k|        struct Curl_easy *data = entry;
 2985|  11.7k|        if(!GOOD_EASY_HANDLE(data)) {
  ------------------
  |  |   34|  11.7k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|  11.7k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|  11.7k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 11.7k, False: 0]
  |  |  |  Branch (34:12): [True: 11.7k, False: 0]
  |  |  ------------------
  |  |   35|  11.7k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2985:12): [True: 0, False: 11.7k]
  |  Branch (2985:13): [True: 0, False: 0]
  |  Branch (2985:13): [True: 0, False: 0]
  ------------------
 2986|      0|          mresult = CURLM_BAD_HANDLE;
 2987|      0|          goto out;
 2988|      0|        }
 2989|       |
 2990|  11.7k|#ifdef DEBUGBUILD
 2991|  11.7k|        if(mid != data->mid) {
  ------------------
  |  Branch (2991:12): [True: 0, False: 11.7k]
  ------------------
 2992|      0|          CURL_TRC_M(data, "multi_cleanup: still present with mid=%u, "
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2993|      0|                     "but unexpected data->mid=%u\n", mid, data->mid);
 2994|      0|          DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2994:11): [Folded, False: 0]
  |  Branch (2994:11): [Folded, False: 0]
  ------------------
 2995|      0|        }
 2996|  11.7k|#endif
 2997|       |
 2998|  11.7k|        if(data == multi->admin)
  ------------------
  |  Branch (2998:12): [True: 11.7k, False: 0]
  ------------------
 2999|  11.7k|          continue;
 3000|       |
 3001|      0|        if(!data->state.done && data->conn)
  ------------------
  |  Branch (3001:12): [True: 0, False: 0]
  |  Branch (3001:33): [True: 0, False: 0]
  ------------------
 3002|       |          /* if DONE was never called for this handle */
 3003|      0|          (void)multi_done(data, CURLE_OK, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 3004|       |
 3005|      0|        data->multi = NULL; /* clear the association */
 3006|      0|        Curl_uint32_tbl_remove(&multi->xfers, mid);
 3007|      0|        data->mid = UINT32_MAX;
 3008|       |
 3009|       |#ifdef USE_LIBPSL
 3010|       |        if(data->psl == &multi->psl)
 3011|       |          data->psl = NULL;
 3012|       |#endif
 3013|      0|        if(data->state.internal)
  ------------------
  |  Branch (3013:12): [True: 0, False: 0]
  ------------------
 3014|      0|          Curl_close(&data);
 3015|  11.7k|      } while(Curl_uint32_tbl_next(&multi->xfers, mid, &mid, &entry));
  ------------------
  |  Branch (3015:15): [True: 0, False: 11.7k]
  ------------------
 3016|  11.7k|    }
 3017|       |
 3018|  11.7k|#ifdef USE_RESOLV_THREADED
 3019|  11.7k|    Curl_async_thrdd_multi_destroy(multi, !multi->quick_exit);
 3020|  11.7k|#endif
 3021|  11.7k|    Curl_cpool_destroy(&multi->cpool);
 3022|  11.7k|    Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
 3023|  11.7k|    if(multi->admin) {
  ------------------
  |  Branch (3023:8): [True: 11.7k, False: 0]
  ------------------
 3024|  11.7k|      CURL_TRC_M(multi->admin, "multi_cleanup, closing admin handle, done");
  ------------------
  |  |  148|  11.7k|  do {                                   \
  |  |  149|  11.7k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  11.7k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  23.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 11.7k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 11.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  23.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  11.7k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.7k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
 3025|  11.7k|      multi->admin->multi = NULL;
 3026|  11.7k|      Curl_uint32_tbl_remove(&multi->xfers, multi->admin->mid);
 3027|  11.7k|      Curl_close(&multi->admin);
 3028|  11.7k|    }
 3029|       |
 3030|  11.7k|    multi->magic = 0; /* not good anymore */
 3031|       |
 3032|  11.7k|    Curl_multi_ev_cleanup(multi);
 3033|  11.7k|    Curl_hash_destroy(&multi->proto_hash);
 3034|  11.7k|    Curl_dnscache_destroy(&multi->dnscache);
 3035|  11.7k|    Curl_psl_destroy(&multi->psl);
 3036|  11.7k|#ifdef USE_SSL
 3037|  11.7k|    Curl_ssl_scache_destroy(multi->ssl_scache);
 3038|  11.7k|#endif
 3039|       |
 3040|       |#ifdef USE_WINSOCK
 3041|       |    WSACloseEvent(multi->wsa_event);
 3042|       |#endif
 3043|  11.7k|#ifdef ENABLE_WAKEUP
 3044|  11.7k|  Curl_wakeup_destroy(multi->wakeup_pair);
 3045|  11.7k|#endif
 3046|  11.7k|#ifdef ENABLE_INTERNAL_WAKEUP
 3047|  11.7k|  Curl_wakeup_destroy(multi->wakeup_internal);
 3048|  11.7k|#endif
 3049|       |
 3050|  11.7k|    multi_xfer_bufs_free(multi);
 3051|  11.7k|    Curl_mntfy_cleanup(multi);
 3052|  11.7k|#ifdef DEBUGBUILD
 3053|  11.7k|    if(Curl_uint32_tbl_count(&multi->xfers)) {
  ------------------
  |  Branch (3053:8): [True: 0, False: 11.7k]
  ------------------
 3054|      0|      multi_xfer_tbl_dump(multi);
 3055|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3055:7): [Folded, False: 0]
  |  Branch (3055:7): [Folded, False: 0]
  ------------------
 3056|      0|    }
 3057|  11.7k|#endif
 3058|  11.7k|    Curl_uint32_bset_destroy(&multi->process);
 3059|  11.7k|    Curl_uint32_bset_destroy(&multi->dirty);
 3060|  11.7k|    Curl_uint32_bset_destroy(&multi->pending);
 3061|  11.7k|    Curl_uint32_bset_destroy(&multi->msgsent);
 3062|  11.7k|    Curl_uint32_tbl_destroy(&multi->xfers);
 3063|  11.7k|    curlx_memzero(multi, sizeof(*multi));
 3064|  11.7k|    curlx_free(multi);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3065|       |
 3066|  11.7k|    mresult = CURLM_OK;
 3067|  11.7k|  }
 3068|  11.7k|out:
 3069|  11.7k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  185|  11.7k|  Curl_mapi_leave(g)
  ------------------
 3070|  11.7k|  return mresult;
 3071|  11.7k|}
Curl_multi_will_close:
 3114|  5.59k|{
 3115|  5.59k|  if(data) {
  ------------------
  |  Branch (3115:6): [True: 5.59k, False: 0]
  ------------------
 3116|  5.59k|    struct Curl_multi *multi = data->multi;
 3117|  5.59k|    if(multi) {
  ------------------
  |  Branch (3117:8): [True: 5.59k, False: 0]
  ------------------
 3118|  5.59k|      CURL_TRC_M(data, "Curl_multi_will_close fd=%" FMT_SOCKET_T, s);
  ------------------
  |  |  148|  5.59k|  do {                                   \
  |  |  149|  5.59k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.59k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  5.59k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  11.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 5.59k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  11.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  5.59k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.59k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.59k]
  |  |  ------------------
  ------------------
 3119|  5.59k|      Curl_multi_ev_socket_done(multi, data, s);
 3120|  5.59k|    }
 3121|  5.59k|  }
 3122|  5.59k|}
Curl_update_timer:
 3604|  38.3k|{
 3605|  38.3k|  struct curltime expire_ts = { 0, 0 };
 3606|  38.3k|  long timeout_ms;
 3607|  38.3k|  int rc;
 3608|  38.3k|  bool set_value = FALSE;
  ------------------
  |  | 1056|  38.3k|#define FALSE false
  ------------------
 3609|       |
 3610|  38.3k|  if(!multi->timer_cb || multi->dead)
  ------------------
  |  Branch (3610:6): [True: 38.3k, False: 0]
  |  Branch (3610:26): [True: 0, False: 0]
  ------------------
 3611|  38.3k|    return CURLM_OK;
 3612|      0|  multi_timeout(multi, &expire_ts, &timeout_ms);
 3613|       |
 3614|      0|  if(timeout_ms < 0 && multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3614:6): [True: 0, False: 0]
  |  Branch (3614:24): [True: 0, False: 0]
  ------------------
 3615|       |    /* nothing to do */
 3616|      0|  }
 3617|      0|  else if(timeout_ms < 0) {
  ------------------
  |  Branch (3617:11): [True: 0, False: 0]
  ------------------
 3618|       |    /* there is no timeout now but there was one previously */
 3619|      0|    CURL_TRC_M(multi->admin, "[TIMER] clear");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3620|      0|    timeout_ms = -1; /* normalize */
 3621|      0|    set_value = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 3622|      0|  }
 3623|      0|  else if(multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3623:11): [True: 0, False: 0]
  ------------------
 3624|      0|    CURL_TRC_M(multi->admin, "[TIMER] set %ldms, none before", timeout_ms);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3625|      0|    set_value = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 3626|      0|  }
 3627|      0|  else if(curlx_ptimediff_us(&multi->last_expire_ts, &expire_ts)) {
  ------------------
  |  Branch (3627:11): [True: 0, False: 0]
  ------------------
 3628|       |    /* We had a timeout before and have one now, the absolute timestamp
 3629|       |     * differs. The relative timeout_ms may be the same, but the starting
 3630|       |     * point differs. Let the application restart its timer. */
 3631|      0|    CURL_TRC_M(multi->admin, "[TIMER] set %ldms, replace previous",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3632|      0|               timeout_ms);
 3633|      0|    set_value = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 3634|      0|  }
 3635|      0|  else {
 3636|       |    /* We have same expire time as previously. Our relative 'timeout_ms'
 3637|       |     * may be different now, but the application has the timer running
 3638|       |     * and we do not to tell it to start this again. */
 3639|      0|  }
 3640|       |
 3641|      0|  if(set_value) {
  ------------------
  |  Branch (3641:6): [True: 0, False: 0]
  ------------------
 3642|      0|    struct Curl_mapi_guard guard;
 3643|       |
 3644|      0|    multi->last_expire_ts = expire_ts;
 3645|      0|    multi->last_timeout_ms = timeout_ms;
 3646|      0|    CURL_CBAPI_MULTI_START(&guard, multi, multi_timer_cb);
  ------------------
  |  |  197|      0|  Curl_cbapi_enter((g), NULL, (m), CURL_CBAPI_FN_##fn)
  ------------------
 3647|      0|    rc = multi->timer_cb(multi, timeout_ms, multi->timer_userp);
 3648|      0|    CURL_CBAPI_MULTI_END(&guard);
  ------------------
  |  |  201|      0|  Curl_cbapi_leave(g)
  ------------------
 3649|      0|    if(rc == -1) {
  ------------------
  |  Branch (3649:8): [True: 0, False: 0]
  ------------------
 3650|      0|      multi->dead = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 3651|      0|      return CURLM_ABORTED_BY_CALLBACK;
 3652|      0|    }
 3653|      0|  }
 3654|      0|  return CURLM_OK;
 3655|      0|}
Curl_expire_ex:
 3721|  9.16k|{
 3722|  9.16k|  struct Curl_multi *multi = data->multi;
 3723|  9.16k|  struct curltime *curr_expire = &data->state.expiretime;
 3724|  9.16k|  struct curltime set;
 3725|       |
 3726|       |  /* this is only interesting while there is still an associated multi struct
 3727|       |     remaining! */
 3728|  9.16k|  if(!multi)
  ------------------
  |  Branch (3728:6): [True: 0, False: 9.16k]
  ------------------
 3729|      0|    return;
 3730|       |
 3731|  9.16k|  DEBUGASSERT(id < EXPIRE_LAST);
  ------------------
  |  | 1079|  9.16k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3731:3): [True: 0, False: 9.16k]
  |  Branch (3731:3): [True: 9.16k, False: 0]
  ------------------
 3732|       |
 3733|  9.16k|  set = *Curl_pgrs_now(data);
 3734|  9.16k|  set.tv_sec += (time_t)(milli / 1000); /* may be a 64 to 32-bit conversion */
 3735|  9.16k|  set.tv_usec += (int)(milli % 1000) * 1000;
 3736|       |
 3737|  9.16k|  if(set.tv_usec >= 1000000) {
  ------------------
  |  Branch (3737:6): [True: 1.79k, False: 7.36k]
  ------------------
 3738|  1.79k|    set.tv_sec++;
 3739|  1.79k|    set.tv_usec -= 1000000;
 3740|  1.79k|  }
 3741|       |
 3742|       |  /* Remove any timer with the same id */
 3743|  9.16k|  multi_deltimeout(data, id);
 3744|       |
 3745|       |  /* Add it to the timer list. It must stay in the list until it has expired
 3746|       |     in case we need to recompute the minimum timer later. */
 3747|  9.16k|  multi_addtimeout(data, &set, id);
 3748|       |
 3749|  9.16k|  if(curr_expire->tv_sec || curr_expire->tv_usec) {
  ------------------
  |  Branch (3749:6): [True: 801, False: 8.36k]
  |  Branch (3749:29): [True: 0, False: 8.36k]
  ------------------
 3750|       |    /* This means that the struct is added as a node in the splay tree.
 3751|       |       Compare if the new time is earlier, and only remove-old/add-new if it
 3752|       |       is. */
 3753|    801|    timediff_t diff = curlx_ptimediff_ms(&set, curr_expire);
 3754|    801|    int rc;
 3755|       |
 3756|    801|    if(diff > 0) {
  ------------------
  |  Branch (3756:8): [True: 139, False: 662]
  ------------------
 3757|       |      /* The current splay tree entry is sooner than this new expiry time.
 3758|       |         We do not need to update our splay tree entry. */
 3759|    139|      return;
 3760|    139|    }
 3761|       |
 3762|       |    /* Since this is an updated time, we must remove the previous entry from
 3763|       |       the splay tree first and then re-add the new value */
 3764|    662|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3765|    662|                          &multi->timetree);
 3766|    662|    if(rc)
  ------------------
  |  Branch (3766:8): [True: 0, False: 662]
  ------------------
 3767|      0|      infof(data, "Internal error removing splay node = %d", rc);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3768|    662|  }
 3769|       |
 3770|       |  /* Indicate that we are in the splay tree and insert the new timer expiry
 3771|       |     value since it is our local minimum. */
 3772|  9.02k|  *curr_expire = set;
 3773|  9.02k|  Curl_splayset(&data->state.timenode, data);
 3774|  9.02k|  multi->timetree = Curl_splayinsert(curr_expire, multi->timetree,
 3775|  9.02k|                                     &data->state.timenode);
 3776|  9.02k|}
Curl_expire:
 3790|  9.16k|{
 3791|  9.16k|  Curl_expire_ex(data, milli, id);
 3792|  9.16k|}
Curl_expire_done:
 3801|  5.45k|{
 3802|       |  /* remove the timer, if there */
 3803|  5.45k|  multi_deltimeout(data, id);
 3804|  5.45k|  CURL_TRC_TIMER(data, id, "cleared");
  ------------------
  |  |  173|  5.45k|  do {                                        \
  |  |  174|  5.45k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  5.45k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  5.45k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  10.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 5.45k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.45k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  10.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  5.45k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  5.45k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  5.45k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 5.45k]
  |  |  ------------------
  ------------------
 3805|  5.45k|}
Curl_expire_clear:
 3813|  50.5k|{
 3814|  50.5k|  struct Curl_multi *multi = data->multi;
 3815|  50.5k|  struct curltime *nowp = &data->state.expiretime;
 3816|       |
 3817|       |  /* this is only interesting while there is still an associated multi struct
 3818|       |     remaining! */
 3819|  50.5k|  if(!multi)
  ------------------
  |  Branch (3819:6): [True: 26.2k, False: 24.3k]
  ------------------
 3820|  26.2k|    return;
 3821|       |
 3822|  24.3k|  if(nowp->tv_sec || nowp->tv_usec) {
  ------------------
  |  Branch (3822:6): [True: 8.36k, False: 15.9k]
  |  Branch (3822:22): [True: 0, False: 15.9k]
  ------------------
 3823|       |    /* Since this is an cleared time, we must remove the previous entry from
 3824|       |       the splay tree */
 3825|  8.36k|    struct Curl_llist *list = &data->state.timeoutlist;
 3826|  8.36k|    int rc;
 3827|       |
 3828|  8.36k|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3829|  8.36k|                          &multi->timetree);
 3830|  8.36k|    if(rc)
  ------------------
  |  Branch (3830:8): [True: 0, False: 8.36k]
  ------------------
 3831|      0|      infof(data, "Internal error clearing splay node = %d", rc);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3832|       |
 3833|       |    /* clear the timeout list too */
 3834|  8.36k|    Curl_llist_destroy(list, NULL);
 3835|       |
 3836|  8.36k|    if(data->id >= 0)
  ------------------
  |  Branch (3836:8): [True: 8.36k, False: 0]
  ------------------
 3837|  8.36k|      CURL_TRC_M(data, "[TIMEOUT] all cleared");
  ------------------
  |  |  148|  8.36k|  do {                                   \
  |  |  149|  8.36k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  8.36k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  8.36k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  16.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 8.36k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 8.36k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  16.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  8.36k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  8.36k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  8.36k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 8.36k]
  |  |  ------------------
  ------------------
 3838|  8.36k|    nowp->tv_sec = 0;
 3839|  8.36k|    nowp->tv_usec = 0;
 3840|  8.36k|  }
 3841|  24.3k|}
Curl_multi_get_easy:
 4174|  33.1k|{
 4175|  33.1k|  struct Curl_easy *data = Curl_uint32_tbl_get(&multi->xfers, mid);
 4176|  33.1k|  if(GOOD_EASY_HANDLE(data))
  ------------------
  |  |   34|  33.1k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|  33.1k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1053|  33.1k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:3): [True: 33.1k, False: 0]
  |  |  |  Branch (34:5): [True: 33.1k, False: 0]
  |  |  |  Branch (34:12): [True: 33.1k, False: 0]
  |  |  ------------------
  |  |   35|  33.1k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (4176:6): [True: 0, False: 0]
  |  Branch (4176:6): [True: 0, False: 0]
  ------------------
 4177|  33.1k|    return data;
 4178|      0|  CURL_TRC_M(multi->admin, "invalid easy handle in xfer table for mid=%u",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4179|      0|             mid);
 4180|      0|  Curl_uint32_tbl_remove(&multi->xfers, mid);
 4181|       |  return NULL;
 4182|  33.1k|}
Curl_multi_xfers_running:
 4190|  13.1k|{
 4191|  13.1k|  DEBUGASSERT(multi);
  ------------------
  |  | 1079|  13.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4191:3): [True: 0, False: 13.1k]
  |  Branch (4191:3): [True: 13.1k, False: 0]
  ------------------
 4192|  13.1k|  if(!multi)
  ------------------
  |  Branch (4192:6): [True: 0, False: 13.1k]
  ------------------
 4193|      0|    return 0;
 4194|  13.1k|  return multi->xfers_alive;
 4195|  13.1k|}
Curl_multi_mark_dirty:
 4198|  13.4k|{
 4199|  13.4k|  if(data->multi && data->mid != UINT32_MAX)
  ------------------
  |  Branch (4199:6): [True: 13.4k, False: 0]
  |  Branch (4199:21): [True: 13.4k, False: 0]
  ------------------
 4200|  13.4k|    Curl_uint32_bset_add(&data->multi->dirty, data->mid);
 4201|  13.4k|}
multi.c:multi_xfers_add:
  404|  12.5k|{
  405|  12.5k|  uint32_t capacity = Curl_uint32_tbl_capacity(&multi->xfers);
  406|  12.5k|  uint32_t new_size = 0;
  407|       |  /* Prepare to make this into a CURLMOPT_MAX_TRANSFERS, because some
  408|       |   * applications may want to prevent a run-away of their memory use. */
  409|       |  /* UINT_MAX is our "invalid" id, do not let the table grow up to that. */
  410|  12.5k|  const uint32_t max_capacity = UINT_MAX - 1;
  411|       |
  412|  12.5k|  if(capacity < max_capacity) {
  ------------------
  |  Branch (412:6): [True: 12.5k, False: 0]
  ------------------
  413|       |    /* We want `multi->xfers` to have "sufficient" free rows, so that we do
  414|       |     * not have to reuse the `mid` from a removed easy right away.
  415|       |     * Since uint_tbl and uint_bset are memory efficient,
  416|       |     * regard less than 25% free as insufficient.
  417|       |     * (for low capacities, e.g. multi_easy, 4 or less). */
  418|  12.5k|    uint32_t used = Curl_uint32_tbl_count(&multi->xfers);
  419|  12.5k|    uint32_t unused = capacity - used;
  420|  12.5k|    uint32_t min_unused = CURLMAX(capacity >> 2, 4);
  ------------------
  |  | 1291|  12.5k|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 12.5k, False: 0]
  |  |  ------------------
  ------------------
  421|  12.5k|    if(unused <= min_unused) {
  ------------------
  |  Branch (421:8): [True: 0, False: 12.5k]
  ------------------
  422|       |      /* Make sure the uint arithmetic here works on the corner
  423|       |       * cases where we are close to max_capacity or UINT_MAX */
  424|      0|      if((min_unused >= max_capacity) ||
  ------------------
  |  Branch (424:10): [True: 0, False: 0]
  ------------------
  425|      0|         ((max_capacity - min_unused) <= capacity) ||
  ------------------
  |  Branch (425:10): [True: 0, False: 0]
  ------------------
  426|      0|         ((UINT_MAX - min_unused - 63) <= capacity)) {
  ------------------
  |  Branch (426:10): [True: 0, False: 0]
  ------------------
  427|      0|        new_size = max_capacity; /* can not be larger than this */
  428|      0|      }
  429|      0|      else {
  430|       |        /* make it a 64 multiple, since our bitsets grow by that and
  431|       |         * small (easy_multi) grows to at least 64 on first resize. */
  432|      0|        new_size = (((used + min_unused) + 63) / 64) * 64;
  433|      0|      }
  434|      0|    }
  435|  12.5k|  }
  436|       |
  437|  12.5k|  if(new_size > capacity) {
  ------------------
  |  Branch (437:6): [True: 0, False: 12.5k]
  ------------------
  438|       |    /* Grow the bitsets first. Should one fail, we do not need
  439|       |     * to downsize the already resized ones. The sets continue
  440|       |     * to work properly when larger than the table, but not
  441|       |     * the other way around. */
  442|      0|    CURL_TRC_M(data, "increasing xfer table size to %u", new_size);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  443|      0|    if(Curl_uint32_bset_resize(&multi->process, new_size) ||
  ------------------
  |  Branch (443:8): [True: 0, False: 0]
  ------------------
  444|      0|       Curl_uint32_bset_resize(&multi->dirty, new_size) ||
  ------------------
  |  Branch (444:8): [True: 0, False: 0]
  ------------------
  445|      0|       Curl_uint32_bset_resize(&multi->pending, new_size) ||
  ------------------
  |  Branch (445:8): [True: 0, False: 0]
  ------------------
  446|      0|       Curl_uint32_bset_resize(&multi->msgsent, new_size) ||
  ------------------
  |  Branch (446:8): [True: 0, False: 0]
  ------------------
  447|      0|       Curl_uint32_tbl_resize(&multi->xfers, new_size))
  ------------------
  |  Branch (447:8): [True: 0, False: 0]
  ------------------
  448|      0|      return CURLM_OUT_OF_MEMORY;
  449|      0|  }
  450|       |
  451|       |  /* Insert the easy into the table now */
  452|  12.5k|  if(!Curl_uint32_tbl_add(&multi->xfers, data, &data->mid)) {
  ------------------
  |  Branch (452:6): [True: 0, False: 12.5k]
  ------------------
  453|       |    /* MUST only happen when table is full */
  454|      0|    DEBUGASSERT(Curl_uint32_tbl_capacity(&multi->xfers) <=
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (454:5): [True: 0, False: 0]
  |  Branch (454:5): [True: 0, False: 0]
  ------------------
  455|      0|                Curl_uint32_tbl_count(&multi->xfers));
  456|      0|    return CURLM_OUT_OF_MEMORY;
  457|      0|  }
  458|  12.5k|  return CURLM_OK;
  459|  12.5k|}
multi.c:mstate:
  155|  59.5k|{
  156|  59.5k|  CURLMstate oldstate = data->mstate;
  157|  59.5k|  static const mstate_enter_func state_enter[MSTATE_LAST] = {
  158|  59.5k|    NULL,                      /* INIT */
  159|  59.5k|    NULL,                      /* PENDING */
  160|  59.5k|    NULL,                      /* SETUP */
  161|  59.5k|    mstate_enter_connect,      /* CONNECT */
  162|  59.5k|    NULL,                      /* CONNECTING */
  163|  59.5k|    NULL,                      /* PROTOCONNECT */
  164|  59.5k|    NULL,                      /* PROTOCONNECTING */
  165|  59.5k|    NULL,                      /* DO */
  166|  59.5k|    NULL,                      /* DOING */
  167|  59.5k|    NULL,                      /* DOING_MORE */
  168|  59.5k|    mstate_enter_did,          /* DID */
  169|  59.5k|    NULL,                      /* PERFORMING */
  170|  59.5k|    NULL,                      /* RATELIMITING */
  171|  59.5k|    mstate_enter_done,         /* DONE */
  172|  59.5k|    mstate_enter_completed,    /* COMPLETED */
  173|       |    NULL                       /* MSGSENT */
  174|  59.5k|  };
  175|       |
  176|  59.5k|  if(oldstate == state)
  ------------------
  |  Branch (176:6): [True: 12.5k, False: 46.9k]
  ------------------
  177|       |    /* do not bother when the new state is the same as the old state */
  178|  12.5k|    return;
  179|       |
  180|  46.9k|#ifdef DEBUGBUILD
  181|  46.9k|  NOVERBOSE((void)lineno);
  ------------------
  |  | 1614|  46.9k|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1187|  46.9k|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1187:35): [Folded, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|  46.9k|  CURL_TRC_M(data, "-> [%s] (line %d)", CURL_MSTATE_NAME(state), lineno);
  ------------------
  |  |  148|  46.9k|  do {                                   \
  |  |  149|  46.9k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  46.9k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  46.9k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  93.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 46.9k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 46.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  93.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  46.9k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  46.9k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  46.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 46.9k]
  |  |  ------------------
  ------------------
  183|       |#else
  184|       |  CURL_TRC_M(data, "-> [%s]", CURL_MSTATE_NAME(state));
  185|       |#endif
  186|       |
  187|       |  /* really switching state */
  188|  46.9k|  data->mstate = state;
  189|  46.9k|  if(state_enter[state])
  ------------------
  |  Branch (189:6): [True: 20.3k, False: 26.6k]
  ------------------
  190|  20.3k|    state_enter[state](data, oldstate);
  191|  46.9k|}
multi.c:mstate_enter_connect:
   99|  8.61k|{
  100|  8.61k|  (void)from_state;
  101|  8.61k|  Curl_init_CONNECT(data);
  102|  8.61k|}
multi.c:mstate_enter_completed:
  123|  11.7k|{
  124|       |  /* we sometimes directly jump to COMPLETED, trigger things
  125|       |   * we then missed. */
  126|  11.7k|  if(from_state < MSTATE_DID) {
  ------------------
  |  Branch (126:6): [True: 11.7k, False: 0]
  ------------------
  127|  11.7k|    Curl_pgrsTime(data, TIMER_PRETRANSFER);
  128|  11.7k|    Curl_pgrsTime(data, TIMER_POSTRANSFER);
  129|  11.7k|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  130|  11.7k|  }
  131|  11.7k|  Curl_pgrsCompleted(data);
  132|  11.7k|  if(from_state < MSTATE_DONE)
  ------------------
  |  Branch (132:6): [True: 11.7k, False: 0]
  ------------------
  133|  11.7k|    CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|  11.7k|  do {                                                \
  |  |   52|  11.7k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 11.7k, False: 0]
  |  |  |  Branch (52:15): [True: 11.7k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |   53|  11.7k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  134|       |  /* changing to COMPLETED means it is in process and needs to go */
  135|  11.7k|  DEBUGASSERT(Curl_uint32_bset_contains(&data->multi->process, data->mid));
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (135:3): [True: 0, False: 11.7k]
  |  Branch (135:3): [True: 11.7k, False: 0]
  ------------------
  136|  11.7k|  Curl_uint32_bset_remove(&data->multi->process, data->mid);
  137|  11.7k|  Curl_uint32_bset_remove(&data->multi->pending, data->mid); /* to be sure */
  138|       |
  139|  11.7k|  if(Curl_uint32_bset_empty(&data->multi->process)) {
  ------------------
  |  Branch (139:6): [True: 0, False: 11.7k]
  ------------------
  140|       |    /* free the transfer buffer when we have no more active transfers */
  141|      0|    multi_xfer_bufs_free(data->multi);
  142|      0|  }
  143|       |  /* Important: reset the conn pointer so that we do not point to memory
  144|       |     that could be freed anytime */
  145|  11.7k|  Curl_detach_connection(data);
  146|  11.7k|  Curl_expire_clear(data); /* stop all timers */
  147|  11.7k|}
multi.c:multi_warn_debug:
  374|  39.9k|{
  375|  39.9k|  if(!multi->warned) {
  ------------------
  |  Branch (375:6): [True: 11.7k, False: 28.2k]
  ------------------
  376|  11.7k|    infof(data, "!!! WARNING !!!");
  ------------------
  |  |  143|  11.7k|  do {                               \
  |  |  144|  11.7k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  11.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 11.7k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 11.7k]
  |  |  |  |  ------------------
  |  |  |  |  323|  11.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  11.7k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  377|  11.7k|    infof(data, "This is a debug build of libcurl, "
  ------------------
  |  |  143|  11.7k|  do {                               \
  |  |  144|  11.7k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  11.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 11.7k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 11.7k]
  |  |  |  |  ------------------
  |  |  |  |  323|  11.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  11.7k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  378|  11.7k|                "do not use in production.");
  379|       |    multi->warned = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  380|  11.7k|  }
  381|  39.9k|}
multi.c:multi_done:
  698|  6.25k|{
  699|  6.25k|  CURLcode result;
  700|  6.25k|  struct connectdata *conn = data->conn;
  701|       |
  702|  6.25k|  CURL_TRC_M(data, "multi_done: status: %d prem: %d done: %d",
  ------------------
  |  |  148|  6.25k|  do {                                   \
  |  |  149|  6.25k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.25k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.25k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  12.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.25k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  12.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.25k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.25k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  703|  6.25k|             (int)status, (int)premature, data->state.done);
  704|       |
  705|  6.25k|  if(data->state.done)
  ------------------
  |  Branch (705:6): [True: 0, False: 6.25k]
  ------------------
  706|       |    /* Stop if multi_done() has already been called */
  707|      0|    return CURLE_OK;
  708|       |
  709|       |  /* Shut down any ongoing async resolver operation. */
  710|  6.25k|  Curl_resolv_shutdown_all(data);
  711|       |
  712|       |  /* Cleanup possible redirect junk */
  713|  6.25k|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1336|  6.25k|  do {                      \
  |  | 1337|  6.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  6.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  6.25k|    (ptr) = NULL;           \
  |  | 1339|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  714|  6.25k|  curlx_safefree(data->req.location);
  ------------------
  |  | 1336|  6.25k|  do {                      \
  |  | 1337|  6.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  6.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  6.25k|    (ptr) = NULL;           \
  |  | 1339|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  715|       |
  716|  6.25k|  switch(status) {
  717|      0|  case CURLE_ABORTED_BY_CALLBACK:
  ------------------
  |  Branch (717:3): [True: 0, False: 6.25k]
  ------------------
  718|      0|  case CURLE_READ_ERROR:
  ------------------
  |  Branch (718:3): [True: 0, False: 6.25k]
  ------------------
  719|      0|  case CURLE_WRITE_ERROR:
  ------------------
  |  Branch (719:3): [True: 0, False: 6.25k]
  ------------------
  720|       |    /* When we are aborted due to a callback return code it has to be counted
  721|       |       as premature as there is trouble ahead if we do not. We have many
  722|       |       callbacks and protocols work differently, we could potentially do this
  723|       |       more fine-grained in the future. */
  724|      0|    premature = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  725|      0|    FALLTHROUGH();
  ------------------
  |  |  823|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  726|  6.25k|  default:
  ------------------
  |  Branch (726:3): [True: 6.25k, False: 0]
  ------------------
  727|  6.25k|    break;
  728|  6.25k|  }
  729|       |
  730|       |  /* this calls the protocol-specific function pointer previously set */
  731|  6.25k|  if(conn && conn->scheme->run->done && (data->mstate >= MSTATE_PROTOCONNECT))
  ------------------
  |  Branch (731:6): [True: 6.25k, False: 0]
  |  Branch (731:14): [True: 6.25k, False: 0]
  |  Branch (731:41): [True: 0, False: 6.25k]
  ------------------
  732|      0|    result = conn->scheme->run->done(data, status, premature);
  733|  6.25k|  else
  734|  6.25k|    result = status;
  735|       |
  736|  6.25k|  if(data->mstate > MSTATE_CONNECTING &&
  ------------------
  |  Branch (736:6): [True: 0, False: 6.25k]
  ------------------
  737|      0|     (result != CURLE_ABORTED_BY_CALLBACK)) {
  ------------------
  |  Branch (737:6): [True: 0, False: 0]
  ------------------
  738|       |    /* avoid this if
  739|       |     * - the transfer has not connected
  740|       |     * - we already aborted by callback to avoid this calling another callback
  741|       |     */
  742|      0|    int rc = Curl_pgrsDone(data);
  743|      0|    if(!result && rc)
  ------------------
  |  Branch (743:8): [True: 0, False: 0]
  |  Branch (743:19): [True: 0, False: 0]
  ------------------
  744|      0|      result = CURLE_ABORTED_BY_CALLBACK;
  745|      0|  }
  746|       |
  747|       |  /* Make sure that transfer client writes are really done now. */
  748|  6.25k|  result = Curl_1st_fatal(result, Curl_xfer_write_done(data, premature));
  749|       |
  750|       |  /* Inform connection filters that this transfer is done */
  751|  6.25k|  if(conn)
  ------------------
  |  Branch (751:6): [True: 6.25k, False: 0]
  ------------------
  752|  6.25k|    Curl_conn_ev_data_done(data, premature);
  753|       |
  754|  6.25k|  multi_schedule_pending(data->multi); /* connection / multiplex */
  755|       |
  756|  6.25k|  if(!result)
  ------------------
  |  Branch (756:6): [True: 596, False: 5.65k]
  ------------------
  757|    596|    result = Curl_req_done(&data->req, data, premature);
  758|       |
  759|  6.25k|  if(conn) {
  ------------------
  |  Branch (759:6): [True: 6.25k, False: 0]
  ------------------
  760|       |    /* Under the potential connection pool's share lock, decide what to
  761|       |     * do with the transfer's connection. */
  762|  6.25k|    struct multi_done_ctx mdctx;
  763|       |
  764|  6.25k|    memset(&mdctx, 0, sizeof(mdctx));
  765|  6.25k|    mdctx.premature = premature;
  766|  6.25k|    Curl_cpool_do_locked(data, data->conn, multi_done_locked, &mdctx);
  767|  6.25k|  }
  768|       |
  769|       |  /* flush the netrc cache */
  770|  6.25k|  Curl_netrc_cleanup(&data->state.netrc);
  771|  6.25k|  return result;
  772|  6.25k|}
multi.c:multi_done_locked:
  645|  6.25k|{
  646|  6.25k|  struct multi_done_ctx *mdctx = userdata;
  647|       |
  648|  6.25k|  Curl_detach_connection(data);
  649|       |
  650|  6.25k|  CURL_TRC_M(data, "multi_done_locked, in use=%u", conn->attached_xfers);
  ------------------
  |  |  148|  6.25k|  do {                                   \
  |  |  149|  6.25k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.25k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.25k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  12.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.25k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  12.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.25k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.25k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  651|  6.25k|  if(CONN_INUSE(conn)) {
  ------------------
  |  |  272|  6.25k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (272:23): [True: 0, False: 6.25k]
  |  |  ------------------
  ------------------
  652|       |    /* Stop if still used. */
  653|      0|    CURL_TRC_M(data, "Connection still in use %u, no more multi_done now!",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  654|      0|               conn->attached_xfers);
  655|      0|    return;
  656|      0|  }
  657|       |
  658|  6.25k|  data->state.done = TRUE; /* called now! */
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
  659|  6.25k|  data->state.recent_conn_id = conn->connection_id;
  660|       |
  661|  6.25k|  Curl_dnscache_prune(data);
  662|       |
  663|  6.25k|  if(multi_conn_should_close(conn, data, (bool)mdctx->premature)) {
  ------------------
  |  Branch (663:6): [True: 6.25k, False: 0]
  ------------------
  664|  6.25k|    CURL_TRC_M(data, "multi_done, terminating conn #%" FMT_OFF_T " to %s, "
  ------------------
  |  |  148|  6.25k|  do {                                   \
  |  |  149|  6.25k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.25k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.25k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  12.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.25k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  12.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.25k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.25k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
  665|  6.25k|               "forbid=%d, close=%d, premature=%d, conn_multiplex=%d",
  666|  6.25k|               conn->connection_id, conn->destination,
  667|  6.25k|               data->set.reuse_forbid, conn->bits.close, mdctx->premature,
  668|  6.25k|               Curl_conn_is_multiplex(conn, FIRSTSOCKET));
  669|  6.25k|    connclose(conn);
  ------------------
  |  |   88|  6.25k|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   82|  6.25k|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  670|  6.25k|    Curl_conn_terminate(data, conn, (bool)mdctx->premature);
  671|  6.25k|  }
  672|      0|  else if(!Curl_conn_get_max_concurrent(data, conn, FIRSTSOCKET)) {
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (672:11): [True: 0, False: 0]
  ------------------
  673|      0|    CURL_TRC_M(data, "multi_done, conn #%" FMT_OFF_T " to %s was shutdown"
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  674|      0|               " by server, not reusing", conn->connection_id,
  675|      0|               conn->destination);
  676|      0|    connclose(conn);
  ------------------
  |  |   88|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   82|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  677|      0|    Curl_conn_terminate(data, conn, (bool)mdctx->premature);
  678|      0|  }
  679|      0|  else {
  680|       |    /* the connection is no longer in use by any transfer */
  681|      0|    if(Curl_cpool_conn_now_idle(data, conn)) {
  ------------------
  |  Branch (681:8): [True: 0, False: 0]
  ------------------
  682|       |      /* connection kept in the cpool */
  683|      0|      data->state.lastconnect_id = conn->connection_id;
  684|      0|      infof(data, "Connection #%" FMT_OFF_T " to host %s left intact",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  685|      0|            conn->connection_id, conn->destination);
  686|      0|    }
  687|      0|    else {
  688|       |      /* connection was removed from the cpool and destroyed. */
  689|      0|      data->state.lastconnect_id = -1;
  690|      0|    }
  691|      0|  }
  692|  6.25k|}
multi.c:multi_conn_should_close:
  604|  6.25k|{
  605|       |  /* if conn->bits.close is TRUE, it means that the connection should be
  606|       |     closed in spite of everything else. */
  607|  6.25k|  if(conn->bits.close)
  ------------------
  |  Branch (607:6): [True: 0, False: 6.25k]
  ------------------
  608|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  609|       |
  610|       |  /* if data->set.reuse_forbid is TRUE, it means the libcurl client has
  611|       |     forced us to close this connection. This is ignored for requests taking
  612|       |     place in a NTLM/NEGOTIATE authentication handshake. */
  613|  6.25k|  if(data->set.reuse_forbid
  ------------------
  |  Branch (613:6): [True: 2, False: 6.25k]
  ------------------
  614|       |#ifdef USE_NTLM
  615|       |     && !(conn->http_ntlm_state == NTLMSTATE_TYPE2 ||
  616|       |          conn->proxy_ntlm_state == NTLMSTATE_TYPE2)
  617|       |#endif
  618|       |#ifdef USE_SPNEGO
  619|       |     && !(conn->http_negotiate_state == GSS_AUTHRECV ||
  620|       |          conn->proxy_negotiate_state == GSS_AUTHRECV)
  621|       |#endif
  622|  6.25k|    )
  623|      2|    return TRUE;
  ------------------
  |  | 1053|      2|#define TRUE true
  ------------------
  624|       |
  625|       |  /* Unless this connection is for a "connect-only" transfer, it
  626|       |   * needs to be closed if the protocol handler does not support reuse. */
  627|  6.25k|  if(!data->set.connect_only && conn->scheme &&
  ------------------
  |  Branch (627:6): [True: 6.25k, False: 1]
  |  Branch (627:33): [True: 6.25k, False: 0]
  ------------------
  628|  6.25k|     !(conn->scheme->flags & PROTOPT_CONN_REUSE))
  ------------------
  |  |  237|  6.25k|#define PROTOPT_CONN_REUSE (1 << 16)  /* this protocol can reuse connections */
  ------------------
  |  Branch (628:6): [True: 0, False: 6.25k]
  ------------------
  629|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  630|       |
  631|       |  /* if premature is TRUE, it means this connection was said to be DONE before
  632|       |     the entire request operation is complete and thus we cannot know in what
  633|       |     state it is for reusing, so we are forced to close it. In a perfect world
  634|       |     we can add code that keep track of if we really must close it here or not,
  635|       |     but currently we have no such detail knowledge. */
  636|  6.25k|  if(premature && !Curl_conn_is_multiplex(conn, FIRSTSOCKET))
  ------------------
  |  |  233|  6.25k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (636:6): [True: 6.25k, False: 0]
  |  Branch (636:19): [True: 6.25k, False: 0]
  ------------------
  637|  6.25k|    return TRUE;
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
  638|       |
  639|      0|  return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  640|  6.25k|}
multi.c:multi_assess_wakeup:
  392|  47.5k|{
  393|  47.5k|#ifdef ENABLE_INTERNAL_WAKEUP
  394|  47.5k|  if(multi->socket_cb)
  ------------------
  |  Branch (394:6): [True: 0, False: 47.5k]
  ------------------
  395|      0|    return Curl_multi_ev_assess_xfer(multi, multi->admin);
  396|       |#else
  397|       |  (void)multi;
  398|       |#endif
  399|  47.5k|  return CURLM_OK;
  400|  47.5k|}
multi.c:mstate_connecting_pollset:
 1026|  2.24k|{
 1027|  2.24k|  struct connectdata *conn = data->conn;
 1028|  2.24k|  curl_socket_t sockfd;
 1029|  2.24k|  CURLcode result = CURLE_OK;
 1030|       |
 1031|  2.24k|  if(Curl_xfer_recv_is_paused(data))
  ------------------
  |  Branch (1031:6): [True: 0, False: 2.24k]
  ------------------
 1032|      0|    return CURLE_OK;
 1033|       |  /* If a socket is set, receiving is default. If the socket
 1034|       |   * has not been determined yet (eyeballing), always ask the
 1035|       |   * connection filters for what to monitor. */
 1036|  2.24k|  sockfd = Curl_conn_get_first_socket(data);
 1037|  2.24k|  if(sockfd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  2.24k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1037:6): [True: 74, False: 2.17k]
  ------------------
 1038|     74|    result = Curl_pollset_change(data, ps, sockfd, CURL_POLL_IN, 0);
  ------------------
  |  |  283|     74|#define CURL_POLL_IN     1
  ------------------
 1039|     74|    if(!result)
  ------------------
  |  Branch (1039:8): [True: 74, False: 0]
  ------------------
 1040|     74|      result = multi_adjust_pollset(data, ps);
 1041|     74|  }
 1042|  2.24k|  if(!result)
  ------------------
  |  Branch (1042:6): [True: 2.24k, False: 0]
  ------------------
 1043|  2.24k|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1044|  2.24k|  return result;
 1045|  2.24k|}
multi.c:multi_adjust_pollset:
  982|     74|{
  983|     74|  CURLcode result = CURLE_OK;
  984|       |
  985|     74|  if(ps->n) {
  ------------------
  |  Branch (985:6): [True: 74, False: 0]
  ------------------
  986|     74|    bool send_blocked, recv_blocked;
  987|       |
  988|     74|    recv_blocked = (Curl_rlimit_avail(&data->progress.dl.rlimit, NULL) <= 0);
  989|     74|    send_blocked = (Curl_rlimit_avail(&data->progress.ul.rlimit, NULL) <= 0);
  990|     74|    if(send_blocked || recv_blocked) {
  ------------------
  |  Branch (990:8): [True: 0, False: 74]
  |  Branch (990:24): [True: 0, False: 74]
  ------------------
  991|      0|      int i;
  992|      0|      for(i = 0; i <= SECONDARYSOCKET; ++i) {
  ------------------
  |  |  234|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (992:18): [True: 0, False: 0]
  ------------------
  993|      0|        curl_socket_t sock = data->conn->sock[i];
  994|      0|        if(sock == CURL_SOCKET_BAD)
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (994:12): [True: 0, False: 0]
  ------------------
  995|      0|          continue;
  996|      0|        if(recv_blocked && Curl_pollset_want_recv(data, ps, sock)) {
  ------------------
  |  Branch (996:12): [True: 0, False: 0]
  |  Branch (996:28): [True: 0, False: 0]
  ------------------
  997|      0|          result = Curl_pollset_remove_in(data, ps, sock);
  ------------------
  |  |  162|      0|  Curl_pollset_change(data, ps, sock, 0, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  998|      0|          if(result)
  ------------------
  |  Branch (998:14): [True: 0, False: 0]
  ------------------
  999|      0|            break;
 1000|      0|        }
 1001|      0|        if(send_blocked && Curl_pollset_want_send(data, ps, sock)) {
  ------------------
  |  Branch (1001:12): [True: 0, False: 0]
  |  Branch (1001:28): [True: 0, False: 0]
  ------------------
 1002|      0|          result = Curl_pollset_remove_out(data, ps, sock);
  ------------------
  |  |  166|      0|  Curl_pollset_change(data, ps, sock, 0, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1003|      0|          if(result)
  ------------------
  |  Branch (1003:14): [True: 0, False: 0]
  ------------------
 1004|      0|            break;
 1005|      0|        }
 1006|      0|      }
 1007|      0|    }
 1008|       |
 1009|       |    /* Not blocked and wanting to receive. If there is data pending
 1010|       |     * in the connection filters, make transfer run again. */
 1011|     74|    if(!recv_blocked &&
  ------------------
  |  Branch (1011:8): [True: 74, False: 0]
  ------------------
 1012|     74|       ((Curl_pollset_want_recv(data, ps, data->conn->sock[FIRSTSOCKET]) &&
  ------------------
  |  |  233|     74|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1012:10): [True: 0, False: 74]
  ------------------
 1013|      0|         Curl_conn_data_pending(data, FIRSTSOCKET)) ||
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1013:10): [True: 0, False: 0]
  ------------------
 1014|     74|        (Curl_pollset_want_recv(data, ps, data->conn->sock[SECONDARYSOCKET]) &&
  ------------------
  |  |  234|     74|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1014:10): [True: 0, False: 74]
  ------------------
 1015|      0|         Curl_conn_data_pending(data, SECONDARYSOCKET)))) {
  ------------------
  |  |  234|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1015:10): [True: 0, False: 0]
  ------------------
 1016|      0|      CURL_TRC_M(data, "pollset[] has POLLIN, but there is still "
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1017|      0|                 "buffered input -> mark as dirty");
 1018|      0|      Curl_multi_mark_dirty(data);
 1019|      0|    }
 1020|     74|  }
 1021|     74|  return result;
 1022|     74|}
multi.c:multi_perform:
 2884|  13.1k|{
 2885|  13.1k|  CURLMcode returncode = CURLM_OK;
 2886|  13.1k|  struct curltime start = *multi_now(multi);
 2887|  13.1k|  uint32_t mid;
 2888|  13.1k|  struct Curl_sigpipe_ctx sigpipe_ctx;
 2889|       |
 2890|  13.1k|  sigpipe_init(&sigpipe_ctx);
 2891|       |
 2892|  13.1k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (2892:6): [True: 13.1k, False: 0]
  ------------------
 2893|  13.1k|    CURL_TRC_M(multi->admin, "multi_perform(running=%u)",
  ------------------
  |  |  148|  13.1k|  do {                                   \
  |  |  149|  13.1k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  13.1k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  13.1k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  26.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 13.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 13.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  26.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  13.1k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  13.1k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  13.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 13.1k]
  |  |  ------------------
  ------------------
 2894|  13.1k|               Curl_multi_xfers_running(multi));
 2895|  27.4k|    do {
 2896|  27.4k|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 2897|  27.4k|      CURLMcode mresult;
 2898|  27.4k|      if(!data) {
  ------------------
  |  Branch (2898:10): [True: 0, False: 27.4k]
  ------------------
 2899|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2899:9): [Folded, False: 0]
  |  Branch (2899:9): [Folded, False: 0]
  ------------------
 2900|      0|        Curl_uint32_bset_remove(&multi->process, mid);
 2901|      0|        Curl_uint32_bset_remove(&multi->dirty, mid);
 2902|      0|        continue;
 2903|      0|      }
 2904|  27.4k|      mresult = multi_runsingle(multi, data, &sigpipe_ctx);
 2905|  27.4k|      if(mresult)
  ------------------
  |  Branch (2905:10): [True: 0, False: 27.4k]
  ------------------
 2906|      0|        returncode = mresult;
 2907|  27.4k|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (2907:13): [True: 14.2k, False: 13.1k]
  ------------------
 2908|  13.1k|  }
 2909|  13.1k|  sigpipe_restore(&sigpipe_ctx);
 2910|       |
 2911|  13.1k|  if(multi_ischanged(multi, TRUE))
  ------------------
  |  | 1053|  13.1k|#define TRUE true
  ------------------
  |  Branch (2911:6): [True: 5.61k, False: 7.57k]
  ------------------
 2912|  5.61k|    multi_schedule_pending(multi);
 2913|       |
 2914|  13.1k|  if(!returncode && CURL_MNTFY_HAS_ENTRIES(multi))
  ------------------
  |  |   56|  13.1k|#define CURL_MNTFY_HAS_ENTRIES(m)       ((m)->ntfy.has_entries)
  |  |  ------------------
  |  |  |  Branch (56:41): [True: 0, False: 13.1k]
  |  |  ------------------
  ------------------
  |  Branch (2914:6): [True: 13.1k, False: 0]
  ------------------
 2915|      0|    returncode = Curl_mntfy_dispatch_all(multi);
 2916|       |
 2917|       |  /*
 2918|       |   * Remove all expired timers from the splay since handles are dealt
 2919|       |   * with unconditionally by this function and curl_multi_timeout() requires
 2920|       |   * that already passed/handled expire times are removed from the splay.
 2921|       |   *
 2922|       |   * It is important that the 'now' value is set at the entry of this function
 2923|       |   * and not for the current time as it may have ticked a little while since
 2924|       |   * then and then we risk this loop to remove timers that actually have not
 2925|       |   * been handled!
 2926|       |   */
 2927|  13.1k|  if(multi->timetree) {
  ------------------
  |  Branch (2927:6): [True: 1.76k, False: 11.4k]
  ------------------
 2928|  1.76k|    struct Curl_tree *t = NULL;
 2929|  1.76k|    do {
 2930|  1.76k|      multi->timetree = Curl_splaygetbest(&start, multi->timetree, &t);
 2931|  1.76k|      if(t) {
  ------------------
  |  Branch (2931:10): [True: 0, False: 1.76k]
  ------------------
 2932|       |        /* the removed may have another timeout in queue */
 2933|      0|        struct Curl_easy *data = Curl_splayget(t);
 2934|      0|        (void)add_next_timeout(&start, multi, data);
 2935|      0|        if(data->mstate == MSTATE_PENDING) {
  ------------------
  |  Branch (2935:12): [True: 0, False: 0]
  ------------------
 2936|      0|          bool stream_unused;
 2937|      0|          CURLcode result_unused;
 2938|      0|          if(multi_handle_timeout(data, &stream_unused, &result_unused)) {
  ------------------
  |  Branch (2938:14): [True: 0, False: 0]
  ------------------
 2939|      0|            infof(data, "PENDING handle timeout");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2940|      0|            move_pending_to_connect(multi, data);
 2941|      0|          }
 2942|      0|        }
 2943|      0|      }
 2944|  1.76k|    } while(t);
  ------------------
  |  Branch (2944:13): [True: 0, False: 1.76k]
  ------------------
 2945|  1.76k|  }
 2946|       |
 2947|  13.1k|  if(running_handles) {
  ------------------
  |  Branch (2947:6): [True: 13.1k, False: 0]
  ------------------
 2948|  13.1k|    unsigned int running = Curl_multi_xfers_running(multi);
 2949|  13.1k|    *running_handles = (running < INT_MAX) ? (int)running : INT_MAX;
  ------------------
  |  Branch (2949:24): [True: 13.1k, False: 0]
  ------------------
 2950|  13.1k|  }
 2951|       |
 2952|  13.1k|  if(CURLM_OK >= returncode)
  ------------------
  |  Branch (2952:6): [True: 13.1k, False: 0]
  ------------------
 2953|  13.1k|    returncode = Curl_update_timer(multi);
 2954|       |
 2955|  13.1k|  return returncode;
 2956|  13.1k|}
multi.c:multi_now:
   88|  13.1k|{
   89|  13.1k|  curlx_pnow(&multi->now);
   90|  13.1k|  return &multi->now;
   91|  13.1k|}
multi.c:multi_runsingle:
 2718|  27.4k|{
 2719|  27.4k|  CURLMcode mresult;
 2720|  27.4k|  CURLcode result = CURLE_OK;
 2721|       |
 2722|  27.4k|  if(multi->dead) {
  ------------------
  |  Branch (2722:6): [True: 0, False: 27.4k]
  ------------------
 2723|       |    /* a multi-level callback returned error before, meaning every individual
 2724|       |     transfer now has failed */
 2725|      0|    result = CURLE_ABORTED_BY_CALLBACK;
 2726|      0|    multi_posttransfer(data);
 2727|      0|    multi_done(data, result, FALSE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 2728|      0|    multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2729|      0|  }
 2730|       |
 2731|  27.4k|  multi_warn_debug(multi, data);
 2732|       |
 2733|       |  /* transfer runs now, clear the dirty bit. This may be set
 2734|       |   * again during processing, triggering a re-run later. */
 2735|  27.4k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2736|       |
 2737|  27.4k|  if(data == multi->admin) {
  ------------------
  |  Branch (2737:6): [True: 13.1k, False: 14.2k]
  ------------------
 2738|  13.1k|#ifdef ENABLE_INTERNAL_WAKEUP
 2739|       |    /* Consume any pending wakeup signals before processing.
 2740|       |     * This is necessary for event based processing. See #21547 */
 2741|  13.1k|    (void)Curl_wakeup_consume(multi->wakeup_internal, TRUE);
  ------------------
  |  | 1053|  13.1k|#define TRUE true
  ------------------
 2742|  13.1k|#endif
 2743|  13.1k|#ifdef USE_RESOLV_THREADED
 2744|  13.1k|    Curl_async_thrdd_multi_process(multi);
 2745|  13.1k|#endif
 2746|  13.1k|    Curl_cshutdn_perform(&multi->cshutdn, multi->admin, sigpipe_ctx);
 2747|  13.1k|    return CURLM_OK;
 2748|  13.1k|  }
 2749|       |
 2750|  14.2k|  sigpipe_apply(data, sigpipe_ctx);
 2751|  37.2k|  do {
 2752|       |    /* A "stream" here is a logical stream if the protocol can handle that
 2753|       |       (HTTP/2), or the full connection for older protocols */
 2754|  37.2k|    bool stream_error = FALSE;
  ------------------
  |  | 1056|  37.2k|#define FALSE false
  ------------------
 2755|  37.2k|    mresult = CURLM_OK;
 2756|       |
 2757|  37.2k|    if(multi_ischanged(multi, TRUE)) {
  ------------------
  |  | 1053|  37.2k|#define TRUE true
  ------------------
  |  Branch (2757:8): [True: 43, False: 37.1k]
  ------------------
 2758|     43|      CURL_TRC_M(data, "multi changed, check CONNECT_PEND queue");
  ------------------
  |  |  148|     43|  do {                                   \
  |  |  149|     43|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|     43|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|     43|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     86|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 43, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 43]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     86|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|     43|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|     43|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|     43|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 43]
  |  |  ------------------
  ------------------
 2759|     43|      multi_schedule_pending(multi); /* multiplexed */
 2760|     43|    }
 2761|       |
 2762|  37.2k|    if(data->mstate > MSTATE_CONNECT &&
  ------------------
  |  Branch (2762:8): [True: 7.90k, False: 29.3k]
  ------------------
 2763|  7.90k|       data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2763:8): [True: 7.90k, False: 0]
  ------------------
 2764|       |      /* Make sure we set the connection's current owner */
 2765|  7.90k|      DEBUGASSERT(data->conn);
  ------------------
  |  | 1079|  7.90k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2765:7): [True: 0, False: 7.90k]
  |  Branch (2765:7): [True: 7.90k, False: 0]
  ------------------
 2766|  7.90k|      if(!data->conn)
  ------------------
  |  Branch (2766:10): [True: 0, False: 7.90k]
  ------------------
 2767|      0|        return CURLM_INTERNAL_ERROR;
 2768|  7.90k|    }
 2769|       |
 2770|       |    /* Wait for the connect state as only then is the start time stored, but
 2771|       |       we must not check already completed handles */
 2772|  37.2k|    if((data->mstate >= MSTATE_CONNECT) && (data->mstate < MSTATE_COMPLETED) &&
  ------------------
  |  Branch (2772:8): [True: 16.2k, False: 20.9k]
  |  Branch (2772:44): [True: 16.2k, False: 0]
  ------------------
 2773|  16.2k|       multi_handle_timeout(data, &stream_error, &result))
  ------------------
  |  Branch (2773:8): [True: 16, False: 16.2k]
  ------------------
 2774|       |      /* Skip the statemachine and go directly to error handling section. */
 2775|     16|      goto statemachine_end;
 2776|       |
 2777|  37.2k|    switch(data->mstate) {
 2778|  12.5k|    case MSTATE_INIT:
  ------------------
  |  Branch (2778:5): [True: 12.5k, False: 24.6k]
  ------------------
 2779|       |      /* Transitional state. init this transfer. A handle never comes back to
 2780|       |         this state. */
 2781|  12.5k|      mresult = multistate_init(data, &result);
 2782|  12.5k|      break;
 2783|       |
 2784|  8.36k|    case MSTATE_SETUP:
  ------------------
  |  Branch (2784:5): [True: 8.36k, False: 28.8k]
  ------------------
 2785|       |      /* Transitional state. Setup things for a new transfer. The handle
 2786|       |         can come back to this state on a redirect. */
 2787|  8.36k|      mresult = multistate_setup(data);
 2788|  8.36k|      break;
 2789|       |
 2790|  8.39k|    case MSTATE_CONNECT:
  ------------------
  |  Branch (2790:5): [True: 8.39k, False: 28.8k]
  ------------------
 2791|  8.39k|      mresult = multistate_connect(multi, data, &result);
 2792|  8.39k|      break;
 2793|       |
 2794|  7.88k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (2794:5): [True: 7.88k, False: 29.3k]
  ------------------
 2795|       |      /* awaiting a completion of an asynch TCP connect */
 2796|  7.88k|      mresult = multistate_connecting(data, &stream_error, &result);
 2797|  7.88k|      break;
 2798|       |
 2799|      0|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (2799:5): [True: 0, False: 37.2k]
  ------------------
 2800|      0|      mresult = multistate_protoconnect(data, &stream_error, &result);
 2801|      0|      break;
 2802|       |
 2803|      0|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (2803:5): [True: 0, False: 37.2k]
  ------------------
 2804|       |      /* protocol-specific connect phase */
 2805|      0|      mresult = multistate_protoconnecting(data, &stream_error, &result);
 2806|      0|      break;
 2807|       |
 2808|      0|    case MSTATE_DO:
  ------------------
  |  Branch (2808:5): [True: 0, False: 37.2k]
  ------------------
 2809|      0|      mresult = multistate_do(data, &stream_error, &result);
 2810|      0|      break;
 2811|       |
 2812|      0|    case MSTATE_DOING:
  ------------------
  |  Branch (2812:5): [True: 0, False: 37.2k]
  ------------------
 2813|       |      /* we continue DOING until the DO phase is complete */
 2814|      0|      mresult = multistate_doing(data, &stream_error, &result);
 2815|      0|      break;
 2816|       |
 2817|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (2817:5): [True: 0, False: 37.2k]
  ------------------
 2818|       |      /*
 2819|       |       * When we are connected, DOING MORE and then go DID
 2820|       |       */
 2821|      0|      mresult = multistate_doing_more(data, &stream_error, &result);
 2822|      0|      break;
 2823|       |
 2824|      0|    case MSTATE_DID:
  ------------------
  |  Branch (2824:5): [True: 0, False: 37.2k]
  ------------------
 2825|      0|      mresult = multistate_did(multi, data);
 2826|      0|      break;
 2827|       |
 2828|      0|    case MSTATE_RATELIMITING: /* limit-rate exceeded in either direction */
  ------------------
  |  Branch (2828:5): [True: 0, False: 37.2k]
  ------------------
 2829|      0|      mresult = multistate_ratelimiting(data, &result);
 2830|      0|      break;
 2831|       |
 2832|      0|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (2832:5): [True: 0, False: 37.2k]
  ------------------
 2833|      0|      mresult = multistate_performing(data, &stream_error, &result);
 2834|      0|      break;
 2835|       |
 2836|      0|    case MSTATE_DONE:
  ------------------
  |  Branch (2836:5): [True: 0, False: 37.2k]
  ------------------
 2837|      0|      mresult = multistate_done(data, &result);
 2838|      0|      break;
 2839|       |
 2840|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (2840:5): [True: 0, False: 37.2k]
  ------------------
 2841|      0|      break;
 2842|       |
 2843|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (2843:5): [True: 0, False: 37.2k]
  ------------------
 2844|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (2844:5): [True: 0, False: 37.2k]
  ------------------
 2845|       |      /* handles in these states should NOT be in this list */
 2846|      0|      break;
 2847|       |
 2848|      0|    default:
  ------------------
  |  Branch (2848:5): [True: 0, False: 37.2k]
  ------------------
 2849|      0|      return CURLM_INTERNAL_ERROR;
 2850|  37.2k|    }
 2851|       |
 2852|  37.2k|    if(data->mstate >= MSTATE_CONNECT &&
  ------------------
  |  Branch (2852:8): [True: 24.3k, False: 12.8k]
  ------------------
 2853|  24.3k|       data->mstate < MSTATE_DO &&
  ------------------
  |  Branch (2853:8): [True: 24.3k, False: 0]
  ------------------
 2854|  24.3k|       mresult != CURLM_CALL_MULTI_PERFORM &&
  ------------------
  |  Branch (2854:8): [True: 9.77k, False: 14.6k]
  ------------------
 2855|  9.77k|       !multi_ischanged(multi, FALSE)) {
  ------------------
  |  | 1056|  9.77k|#define FALSE false
  ------------------
  |  Branch (2855:8): [True: 4.13k, False: 5.64k]
  ------------------
 2856|       |      /* We now handle stream timeouts if and only if this will be the last
 2857|       |       * loop iteration. We only check this on the last iteration to ensure
 2858|       |       * that if we know we have additional work to do immediately
 2859|       |       * (i.e. CURLM_CALL_MULTI_PERFORM == TRUE) then we should do that before
 2860|       |       * declaring the connection timed out as we may almost have a completed
 2861|       |       * connection. */
 2862|  4.13k|      multi_handle_timeout(data, &stream_error, &result);
 2863|  4.13k|    }
 2864|       |
 2865|  37.2k|statemachine_end:
 2866|       |
 2867|  37.2k|    result = is_finished(multi, data, stream_error, result);
 2868|  37.2k|    if(result)
  ------------------
  |  Branch (2868:8): [True: 11.7k, False: 25.4k]
  ------------------
 2869|  11.7k|      mresult = CURLM_CALL_MULTI_PERFORM;
 2870|       |
 2871|  37.2k|    if(MSTATE_COMPLETED == data->mstate) {
  ------------------
  |  Branch (2871:8): [True: 11.7k, False: 25.4k]
  ------------------
 2872|  11.7k|      handle_completed(multi, data, result);
 2873|  11.7k|      return CURLM_OK;
 2874|  11.7k|    }
 2875|  37.2k|  } while((mresult == CURLM_CALL_MULTI_PERFORM) ||
  ------------------
  |  Branch (2875:11): [True: 22.9k, False: 2.49k]
  ------------------
 2876|  2.49k|          multi_ischanged(multi, FALSE));
  ------------------
  |  | 1056|  2.49k|#define FALSE false
  ------------------
  |  Branch (2876:11): [True: 0, False: 2.49k]
  ------------------
 2877|       |
 2878|  2.49k|  data->result = result;
 2879|  2.49k|  return mresult;
 2880|  14.2k|}
multi.c:multi_posttransfer:
 1949|  7.53k|{
 1950|       |#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL)
 1951|       |  /* restore the signal handler for SIGPIPE before we get back */
 1952|       |  if(!data->set.no_signal)
 1953|       |    signal(SIGPIPE, data->state.prev_signal);
 1954|       |#else
 1955|  7.53k|  (void)data;
 1956|  7.53k|#endif
 1957|  7.53k|}
multi.c:multistate_init:
 2476|  12.5k|{
 2477|  12.5k|  if(!data->state.really_alive) {
  ------------------
  |  Branch (2477:6): [True: 12.5k, False: 0]
  ------------------
 2478|  12.5k|    data->state.really_alive = TRUE;
  ------------------
  |  | 1053|  12.5k|#define TRUE true
  ------------------
 2479|  12.5k|    ++data->multi->xfers_really_alive;
 2480|  12.5k|    if(data->multi->xfers_really_alive == 1) {
  ------------------
  |  Branch (2480:8): [True: 11.7k, False: 785]
  ------------------
 2481|  11.7k|      CURLMcode mresult = multi_assess_wakeup(data->multi);
 2482|  11.7k|      if(mresult) {
  ------------------
  |  Branch (2482:10): [True: 0, False: 11.7k]
  ------------------
 2483|      0|        failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2484|      0|        return mresult;
 2485|      0|      }
 2486|  11.7k|    }
 2487|  12.5k|  }
 2488|       |
 2489|  12.5k|  *result = Curl_pretransfer(data);
 2490|  12.5k|  if(*result)
  ------------------
  |  Branch (2490:6): [True: 4.20k, False: 8.36k]
  ------------------
 2491|  4.20k|    return CURLM_OK;
 2492|       |
 2493|       |  /* after init, go SETUP */
 2494|  8.36k|  multistate(data, MSTATE_SETUP);
  ------------------
  |  |  196|  8.36k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2495|  8.36k|  Curl_pgrsTime(data, TIMER_STARTOP);
 2496|  8.36k|  return CURLM_CALL_MULTI_PERFORM;
 2497|  12.5k|}
multi.c:multistate_setup:
 2500|  8.36k|{
 2501|  8.36k|  Curl_pgrsTime(data, TIMER_STARTSINGLE);
 2502|  8.36k|  if(data->set.timeout)
  ------------------
  |  Branch (2502:6): [True: 8.36k, False: 0]
  ------------------
 2503|  8.36k|    Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT);
 2504|  8.36k|  if(data->set.connecttimeout)
  ------------------
  |  Branch (2504:6): [True: 187, False: 8.17k]
  ------------------
 2505|       |    /* Since a connection might go to pending and back to CONNECT several
 2506|       |       times before it actually takes off, we need to set the timeout once
 2507|       |       in SETUP before we enter CONNECT the first time. */
 2508|    187|    Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT);
 2509|       |
 2510|  8.36k|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  196|  8.36k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2511|  8.36k|  return CURLM_CALL_MULTI_PERFORM;
 2512|  8.36k|}
multi.c:multistate_connect:
 2328|  8.39k|{
 2329|       |  /* Connect. We want to get a connection identifier filled in. This state can
 2330|       |     be entered from SETUP and from PENDING. */
 2331|  8.39k|  bool connected;
 2332|  8.39k|  CURLMcode mresult = CURLM_OK;
 2333|  8.39k|  CURLcode result = Curl_connect(data, &connected);
 2334|  8.39k|  if(result == CURLE_NO_CONNECTION_AVAILABLE) {
  ------------------
  |  Branch (2334:6): [True: 248, False: 8.14k]
  ------------------
 2335|       |    /* There was no connection available. We will go to the pending state and
 2336|       |       wait for an available connection. */
 2337|    248|    multistate(data, MSTATE_PENDING);
  ------------------
  |  |  196|    248|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2338|       |    /* move from process to pending set */
 2339|    248|    Curl_uint32_bset_remove(&multi->process, data->mid);
 2340|    248|    Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2341|    248|    Curl_uint32_bset_add(&multi->pending, data->mid);
 2342|    248|    *resultp = CURLE_OK;
 2343|    248|    return mresult;
 2344|    248|  }
 2345|  8.14k|  else
 2346|  8.14k|    multi_schedule_pending(data->multi);
 2347|       |
 2348|  8.14k|  if(!result) {
  ------------------
  |  Branch (2348:6): [True: 6.25k, False: 1.88k]
  ------------------
 2349|       |    /* after the connect has been sent off, go WAITCONNECT unless the
 2350|       |       protocol connect is already done and we can go directly to WAITDO or
 2351|       |       DO! */
 2352|  6.25k|    mresult = CURLM_CALL_MULTI_PERFORM;
 2353|       |
 2354|  6.25k|    if(connected) {
  ------------------
  |  Branch (2354:8): [True: 0, False: 6.25k]
  ------------------
 2355|      0|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2355:10): [True: 0, False: 0]
  ------------------
 2356|      0|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2356:10): [True: 0, False: 0]
  ------------------
 2357|       |        /* new connection, can multiplex, wake pending handles */
 2358|      0|        multi_schedule_pending(data->multi);
 2359|      0|      }
 2360|      0|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2361|      0|    }
 2362|  6.25k|    else {
 2363|  6.25k|      multistate(data, MSTATE_CONNECTING);
  ------------------
  |  |  196|  6.25k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2364|  6.25k|    }
 2365|  6.25k|  }
 2366|  8.14k|  *resultp = result;
 2367|  8.14k|  return mresult;
 2368|  8.39k|}
multi.c:multistate_connecting:
 2517|  7.88k|{
 2518|  7.88k|  bool connected;
 2519|       |
 2520|  7.88k|  if(!data->conn) {
  ------------------
  |  Branch (2520:6): [True: 0, False: 7.88k]
  ------------------
 2521|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2521:5): [Folded, False: 0]
  |  Branch (2521:5): [Folded, False: 0]
  ------------------
 2522|      0|    *result = CURLE_FAILED_INIT;
 2523|      0|    return CURLM_OK;
 2524|      0|  }
 2525|  7.88k|  if(!Curl_xfer_recv_is_paused(data)) {
  ------------------
  |  Branch (2525:6): [True: 7.88k, False: 0]
  ------------------
 2526|  7.88k|    *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  |  233|  7.88k|#define FIRSTSOCKET     0
  ------------------
                  *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  | 1056|  7.88k|#define FALSE false
  ------------------
 2527|  7.88k|    if(connected && !*result) {
  ------------------
  |  Branch (2527:8): [True: 0, False: 7.88k]
  |  Branch (2527:21): [True: 0, False: 0]
  ------------------
 2528|      0|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2528:10): [True: 0, False: 0]
  ------------------
 2529|      0|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2529:10): [True: 0, False: 0]
  ------------------
 2530|       |        /* new connection, can multiplex, wake pending handles */
 2531|      0|        multi_schedule_pending(data->multi);
 2532|      0|      }
 2533|      0|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2534|      0|      return CURLM_CALL_MULTI_PERFORM;
 2535|      0|    }
 2536|  7.88k|    else if(*result) {
  ------------------
  |  Branch (2536:13): [True: 5.64k, False: 2.24k]
  ------------------
 2537|       |      /* failure detected */
 2538|  5.64k|      CURL_TRC_M(data, "connect failed -> %d", (int)*result);
  ------------------
  |  |  148|  5.64k|  do {                                   \
  |  |  149|  5.64k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.64k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  5.64k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  11.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 5.64k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.64k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  11.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  5.64k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.64k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.64k]
  |  |  ------------------
  ------------------
 2539|  5.64k|      multi_posttransfer(data);
 2540|  5.64k|      multi_done(data, *result, TRUE);
  ------------------
  |  | 1053|  5.64k|#define TRUE true
  ------------------
 2541|  5.64k|      *stream_error = TRUE;
  ------------------
  |  | 1053|  5.64k|#define TRUE true
  ------------------
 2542|  5.64k|      return CURLM_OK;
 2543|  5.64k|    }
 2544|  7.88k|  }
 2545|  2.24k|  return CURLM_OK;
 2546|  7.88k|}
multi.c:is_finished:
 2375|  37.2k|{
 2376|  37.2k|  if(data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2376:6): [True: 37.2k, False: 0]
  ------------------
 2377|  37.2k|    if(result) {
  ------------------
  |  Branch (2377:8): [True: 11.7k, False: 25.4k]
  ------------------
 2378|       |      /*
 2379|       |       * If an error was returned, and we are not in completed state now,
 2380|       |       * then we go to completed and consider this transfer aborted.
 2381|       |       */
 2382|       |
 2383|       |      /* No attempt to disconnect connections must be made before this -
 2384|       |         connection detach and termination happens only here */
 2385|       |
 2386|       |      /* Check if we can move pending requests to send pipe */
 2387|  11.7k|      multi_schedule_pending(multi); /* connection */
 2388|       |
 2389|  11.7k|      if(data->conn) {
  ------------------
  |  Branch (2389:10): [True: 0, False: 11.7k]
  ------------------
 2390|      0|        if(stream_error) {
  ------------------
  |  Branch (2390:12): [True: 0, False: 0]
  ------------------
 2391|       |          /* Do not attempt to send data over a connection that timed out */
 2392|      0|          bool dead_connection = result == CURLE_OPERATION_TIMEDOUT;
 2393|      0|          struct connectdata *conn = data->conn;
 2394|       |
 2395|       |          /* This is where we make sure that the conn pointer is reset.
 2396|       |             We do not have to do this in every case block above where a
 2397|       |             failure is detected */
 2398|      0|          Curl_detach_connection(data);
 2399|      0|          Curl_conn_terminate(data, conn, dead_connection);
 2400|      0|        }
 2401|      0|      }
 2402|  11.7k|      else if(data->mstate == MSTATE_CONNECT) {
  ------------------
  |  Branch (2402:15): [True: 1.88k, False: 9.86k]
  ------------------
 2403|       |        /* Curl_connect() failed */
 2404|  1.88k|        multi_posttransfer(data);
 2405|  1.88k|        Curl_pgrsUpdate_nometer(data);
 2406|  1.88k|      }
 2407|       |
 2408|  11.7k|      multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  196|  11.7k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2409|  11.7k|      return result;
 2410|  11.7k|    }
 2411|       |    /* if there is still a connection to use, call the progress function */
 2412|  25.4k|    else if(data->conn && Curl_conn_is_connected(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  233|  8.50k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2412:13): [True: 8.50k, False: 16.9k]
  |  Branch (2412:27): [True: 0, False: 8.50k]
  ------------------
 2413|      0|      result = Curl_pgrsUpdate(data);
 2414|      0|      if(result) {
  ------------------
  |  Branch (2414:10): [True: 0, False: 0]
  ------------------
 2415|       |        /* aborted due to progress callback return code must close the
 2416|       |           connection */
 2417|      0|        streamclose(data->conn);
  ------------------
  |  |   87|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   83|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 2418|       |
 2419|       |        /* if not yet in DONE state, go there, otherwise COMPLETED */
 2420|      0|        multistate(data, (data->mstate < MSTATE_DONE) ?
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (196:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2421|      0|                   MSTATE_DONE : MSTATE_COMPLETED);
 2422|      0|        return result;
 2423|      0|      }
 2424|      0|    }
 2425|  37.2k|  }
 2426|  25.4k|  return result;
 2427|  37.2k|}
multi.c:handle_completed:
 2432|  11.7k|{
 2433|  11.7k|  if(data->master_mid != UINT32_MAX) {
  ------------------
  |  Branch (2433:6): [True: 329, False: 11.4k]
  ------------------
 2434|       |    /* A sub transfer, not for msgsent to application. Is anyone still
 2435|       |     * interested in processing its results? */
 2436|    329|    if(data->sub_xfer_done) {
  ------------------
  |  Branch (2436:8): [True: 329, False: 0]
  ------------------
 2437|    329|      struct Curl_easy *master = Curl_multi_get_easy(multi, data->master_mid);
 2438|       |
 2439|    329|      CURL_TRC_M(data, "sub xfer done for master %u", data->master_mid);
  ------------------
  |  |  148|    329|  do {                                   \
  |  |  149|    329|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    329|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|    329|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|    658|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 329, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 329]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|    658|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|    329|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    329|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    329|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 329]
  |  |  ------------------
  ------------------
 2440|    329|      if(master)
  ------------------
  |  Branch (2440:10): [True: 329, False: 0]
  ------------------
 2441|    329|        data->sub_xfer_done(data, master, result);
 2442|      0|      else
 2443|      0|        CURL_TRC_M(data, "master easy %u already gone.", data->master_mid);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2444|    329|    }
 2445|    329|  }
 2446|  11.4k|  else {
 2447|       |    /* now fill in the Curl_message with this info */
 2448|  11.4k|    struct Curl_message *msg = &data->msg;
 2449|       |
 2450|  11.4k|    msg->extmsg.msg = CURLMSG_DONE;
 2451|  11.4k|    msg->extmsg.easy_handle = data;
 2452|  11.4k|    msg->extmsg.data.result = result;
 2453|       |
 2454|  11.4k|    multi_addmsg(multi, msg);
 2455|  11.4k|    DEBUGASSERT(!data->conn);
  ------------------
  |  | 1079|  11.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2455:5): [True: 0, False: 11.4k]
  |  Branch (2455:5): [True: 11.4k, False: 0]
  ------------------
 2456|  11.4k|  }
 2457|  11.7k|  multistate(data, MSTATE_MSGSENT);
  ------------------
  |  |  196|  11.7k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2458|       |
 2459|       |  /* remove from the other sets, add to msgsent */
 2460|  11.7k|  Curl_uint32_bset_remove(&multi->process, data->mid);
 2461|  11.7k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2462|  11.7k|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 2463|  11.7k|  Curl_uint32_bset_add(&multi->msgsent, data->mid);
 2464|  11.7k|  if(data->state.really_alive) {
  ------------------
  |  Branch (2464:6): [True: 11.7k, False: 0]
  ------------------
 2465|  11.7k|    data->state.really_alive = FALSE;
  ------------------
  |  | 1056|  11.7k|#define FALSE false
  ------------------
 2466|  11.7k|    --multi->xfers_really_alive;
 2467|  11.7k|    if(!multi->xfers_really_alive)
  ------------------
  |  Branch (2467:8): [True: 11.4k, False: 329]
  ------------------
 2468|  11.4k|      (void)multi_assess_wakeup(multi);
 2469|  11.7k|  }
 2470|  11.7k|  --multi->xfers_alive;
 2471|  11.7k|  if(!multi->xfers_alive)
  ------------------
  |  Branch (2471:6): [True: 11.4k, False: 329]
  ------------------
 2472|  11.4k|    multi_assess_wakeup(multi);
 2473|  11.7k|}
multi.c:multi_addmsg:
  217|  11.4k|{
  218|  11.4k|  if(!Curl_llist_count(&multi->msglist))
  ------------------
  |  Branch (218:6): [True: 11.4k, False: 0]
  ------------------
  219|  11.4k|    CURLM_NTFY(multi->admin, CURLMNOTIFY_INFO_READ);
  ------------------
  |  |   51|  11.4k|  do {                                                \
  |  |   52|  11.4k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 11.4k, False: 0]
  |  |  |  Branch (52:15): [True: 11.4k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 11.4k]
  |  |  ------------------
  |  |   53|  11.4k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  11.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
  220|  11.4k|  Curl_llist_append(&multi->msglist, msg, &msg->list);
  221|  11.4k|}
multi.c:multi_ischanged:
 1735|  62.6k|{
 1736|  62.6k|  bool retval = FALSE;
  ------------------
  |  | 1056|  62.6k|#define FALSE false
  ------------------
 1737|  62.6k|  DEBUGASSERT(multi);
  ------------------
  |  | 1079|  62.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1737:3): [True: 0, False: 62.6k]
  |  Branch (1737:3): [True: 62.6k, False: 0]
  ------------------
 1738|  62.6k|  if(multi) {
  ------------------
  |  Branch (1738:6): [True: 62.6k, False: 0]
  ------------------
 1739|  62.6k|    retval = (bool)multi->recheckstate;
 1740|  62.6k|    if(clear)
  ------------------
  |  Branch (1740:8): [True: 50.4k, False: 12.2k]
  ------------------
 1741|  50.4k|      multi->recheckstate = FALSE;
  ------------------
  |  | 1056|  50.4k|#define FALSE false
  ------------------
 1742|  62.6k|  }
 1743|  62.6k|  return retval;
 1744|  62.6k|}
multi.c:multi_handle_timeout:
 1826|  20.4k|{
 1827|  20.4k|  timediff_t timeout_ms;
 1828|       |
 1829|  20.4k|  timeout_ms = Curl_timeleft_ms(data);
 1830|  20.4k|  if(timeout_ms < 0) {
  ------------------
  |  Branch (1830:6): [True: 16, False: 20.4k]
  ------------------
 1831|       |    /* Handle timed out */
 1832|     16|    struct curltime since;
 1833|     16|    if(Curl_is_connecting(data))
  ------------------
  |  Branch (1833:8): [True: 16, False: 0]
  ------------------
 1834|     16|      since = data->progress.t_startsingle;
 1835|      0|    else
 1836|      0|      since = data->progress.t_startop;
 1837|     16|    if(data->mstate == MSTATE_CONNECTING)
  ------------------
  |  Branch (1837:8): [True: 16, False: 0]
  ------------------
 1838|     16|      failf(data, "%s timed out after %" FMT_TIMEDIFF_T " milliseconds",
  ------------------
  |  |   62|     16|#define failf Curl_failf
  ------------------
 1839|     16|            data->conn->bits.dns_resolved ? "Connection" : "Resolving",
  ------------------
  |  Branch (1839:13): [True: 3, False: 13]
  ------------------
 1840|     16|            curlx_ptimediff_ms(Curl_pgrs_now(data), &since));
 1841|      0|    else {
 1842|      0|      struct SingleRequest *k = &data->req;
 1843|      0|      if(k->size != -1) {
  ------------------
  |  Branch (1843:10): [True: 0, False: 0]
  ------------------
 1844|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1845|      0|              " milliseconds with %" FMT_OFF_T " out of %"
 1846|      0|              FMT_OFF_T " bytes received",
 1847|      0|              curlx_ptimediff_ms(Curl_pgrs_now(data), &since),
 1848|      0|              k->bytecount, k->size);
 1849|      0|      }
 1850|      0|      else {
 1851|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1852|      0|              " milliseconds with %" FMT_OFF_T " bytes received",
 1853|      0|              curlx_ptimediff_ms(Curl_pgrs_now(data), &since),
 1854|      0|              k->bytecount);
 1855|      0|      }
 1856|      0|    }
 1857|     16|    *result = CURLE_OPERATION_TIMEDOUT;
 1858|     16|    if(data->conn) {
  ------------------
  |  Branch (1858:8): [True: 16, False: 0]
  ------------------
 1859|       |      /* Force connection closed if the connection has indeed been used */
 1860|     16|      if(data->mstate > MSTATE_DO) {
  ------------------
  |  Branch (1860:10): [True: 0, False: 16]
  ------------------
 1861|      0|        streamclose(data->conn);
  ------------------
  |  |   87|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   83|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 1862|      0|        *stream_error = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1863|      0|      }
 1864|     16|      (void)multi_done(data, *result, TRUE);
  ------------------
  |  | 1053|     16|#define TRUE true
  ------------------
 1865|     16|    }
 1866|     16|    return TRUE;
  ------------------
  |  | 1053|     16|#define TRUE true
  ------------------
 1867|     16|  }
 1868|       |
 1869|  20.4k|  return FALSE;
  ------------------
  |  | 1056|  20.4k|#define FALSE false
  ------------------
 1870|  20.4k|}
multi.c:move_pending_to_connect:
 3858|    248|{
 3859|    248|  DEBUGASSERT(data->mstate == MSTATE_PENDING);
  ------------------
  |  | 1079|    248|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3859:3): [True: 0, False: 248]
  |  Branch (3859:3): [True: 248, False: 0]
  ------------------
 3860|       |
 3861|       |  /* Remove this node from the pending set, add into process set */
 3862|    248|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 3863|    248|  Curl_uint32_bset_add(&multi->process, data->mid);
 3864|       |
 3865|    248|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  196|    248|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 3866|    248|  Curl_multi_mark_dirty(data); /* make it run */
 3867|    248|}
multi.c:multi_deltimeout:
 3663|  14.6k|{
 3664|  14.6k|  struct Curl_llist_node *e;
 3665|  14.6k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3666|       |  /* find and remove the specific node from the list */
 3667|  20.9k|  for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3667:41): [True: 6.63k, False: 14.3k]
  ------------------
 3668|  6.63k|    struct time_node *n = Curl_node_elem(e);
 3669|  6.63k|    if(n->eid == eid) {
  ------------------
  |  Branch (3669:8): [True: 320, False: 6.31k]
  ------------------
 3670|    320|      Curl_node_remove(e);
 3671|    320|      return;
 3672|    320|    }
 3673|  6.63k|  }
 3674|  14.6k|}
multi.c:multi_addtimeout:
 3686|  9.16k|{
 3687|  9.16k|  struct Curl_llist_node *e;
 3688|  9.16k|  struct time_node *node;
 3689|  9.16k|  struct Curl_llist_node *prev = NULL;
 3690|  9.16k|  size_t n;
 3691|  9.16k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3692|       |
 3693|  9.16k|  node = &data->state.expires[eid];
 3694|       |
 3695|       |  /* copy the timestamp and id */
 3696|  9.16k|  memcpy(&node->time, stamp, sizeof(*stamp));
 3697|  9.16k|  node->eid = eid; /* also marks it as in use */
 3698|       |
 3699|  9.16k|  n = Curl_llist_count(timeoutlist);
 3700|  9.16k|  if(n) {
  ------------------
  |  Branch (3700:6): [True: 801, False: 8.36k]
  ------------------
 3701|       |    /* find the correct spot in the list */
 3702|  1.55k|    for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3702:43): [True: 872, False: 685]
  ------------------
 3703|    872|      struct time_node *check = Curl_node_elem(e);
 3704|    872|      timediff_t diff = curlx_ptimediff_ms(&check->time, &node->time);
 3705|    872|      if(diff > 0)
  ------------------
  |  Branch (3705:10): [True: 116, False: 756]
  ------------------
 3706|    116|        break;
 3707|    756|      prev = e;
 3708|    756|    }
 3709|    801|  }
 3710|       |  /* else
 3711|       |     this is the first timeout on the list */
 3712|       |
 3713|  9.16k|  Curl_llist_insert_next(timeoutlist, prev, node, &node->list);
 3714|  9.16k|  CURL_TRC_TIMER(data, eid, "set for %" FMT_TIMEDIFF_T "us",
  ------------------
  |  |  173|  9.16k|  do {                                        \
  |  |  174|  9.16k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  9.16k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  9.16k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  18.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 9.16k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 9.16k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  18.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  9.16k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  9.16k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  9.16k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 9.16k]
  |  |  ------------------
  ------------------
 3715|  9.16k|                 curlx_ptimediff_us(&node->time, Curl_pgrs_now(data)));
 3716|  9.16k|  return CURLM_OK;
 3717|  9.16k|}
multi.c:multi_schedule_pending:
 3883|  44.3k|{
 3884|  44.3k|  uint32_t mid = multi->last_pending_mid;
 3885|       |
 3886|  44.3k|  if(mid) {
  ------------------
  |  Branch (3886:6): [True: 248, False: 44.1k]
  ------------------
 3887|    248|    while(Curl_uint32_bset_next(&multi->pending, mid, &mid)) {
  ------------------
  |  Branch (3887:11): [True: 0, False: 248]
  ------------------
 3888|      0|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3889|      0|      if(data) {
  ------------------
  |  Branch (3889:10): [True: 0, False: 0]
  ------------------
 3890|      0|        move_pending_to_connect(multi, data);
 3891|      0|        multi->last_pending_mid = mid;
 3892|      0|        return;
 3893|      0|      }
 3894|       |      /* transfer no longer known, should not happen */
 3895|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3896|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3896:7): [Folded, False: 0]
  |  Branch (3896:7): [Folded, False: 0]
  ------------------
 3897|      0|    }
 3898|       |    /* found no pending transfers with `mid` larger than `last_pending_mid`.
 3899|       |     * Start at the beginning of the pending set again. */
 3900|    248|    multi->last_pending_mid = 0;
 3901|    248|  }
 3902|       |
 3903|  44.3k|  if(Curl_uint32_bset_first(&multi->pending, &mid)) {
  ------------------
  |  Branch (3903:6): [True: 248, False: 44.1k]
  ------------------
 3904|    248|    do {
 3905|    248|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3906|    248|      if(data) {
  ------------------
  |  Branch (3906:10): [True: 248, False: 0]
  ------------------
 3907|    248|        move_pending_to_connect(multi, data);
 3908|    248|        multi->last_pending_mid = mid;
 3909|    248|        return;
 3910|    248|      }
 3911|       |      /* transfer no longer known, should not happen */
 3912|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3913|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3913:7): [Folded, False: 0]
  |  Branch (3913:7): [Folded, False: 0]
  ------------------
 3914|      0|    } while(Curl_uint32_bset_next(&multi->pending, mid, &mid));
  ------------------
  |  Branch (3914:13): [True: 0, False: 0]
  ------------------
 3915|    248|  }
 3916|  44.3k|}
multi.c:multi_xfer_bufs_free:
 4159|  11.7k|{
 4160|  11.7k|  DEBUGASSERT(multi);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4160:3): [True: 0, False: 11.7k]
  |  Branch (4160:3): [True: 11.7k, False: 0]
  ------------------
 4161|  11.7k|  curlx_safefree(multi->xfer_buf);
  ------------------
  |  | 1336|  11.7k|  do {                      \
  |  | 1337|  11.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  11.7k|    (ptr) = NULL;           \
  |  | 1339|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
 4162|  11.7k|  multi->xfer_buf_len = 0;
 4163|  11.7k|  multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1056|  11.7k|#define FALSE false
  ------------------
 4164|  11.7k|  curlx_safefree(multi->xfer_ulbuf);
  ------------------
  |  | 1336|  11.7k|  do {                      \
  |  | 1337|  11.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  11.7k|    (ptr) = NULL;           \
  |  | 1339|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
 4165|  11.7k|  multi->xfer_ulbuf_len = 0;
 4166|  11.7k|  multi->xfer_ulbuf_borrowed = FALSE;
  ------------------
  |  | 1056|  11.7k|#define FALSE false
  ------------------
 4167|  11.7k|  curlx_safefree(multi->xfer_sockbuf);
  ------------------
  |  | 1336|  11.7k|  do {                      \
  |  | 1337|  11.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  11.7k|    (ptr) = NULL;           \
  |  | 1339|  11.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
 4168|  11.7k|  multi->xfer_sockbuf_len = 0;
 4169|       |  multi->xfer_sockbuf_borrowed = FALSE;
  ------------------
  |  | 1056|  11.7k|#define FALSE false
  ------------------
 4170|  11.7k|}

Curl_multi_ev_socket_done:
  618|  5.59k|{
  619|  5.59k|  mev_forget_socket(multi, data, s, "socket done");
  620|  5.59k|}
Curl_multi_ev_xfer_done:
  624|  12.5k|{
  625|  12.5k|  DEBUGASSERT(!data->conn); /* transfer should have been detached */
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (625:3): [True: 0, False: 12.5k]
  |  Branch (625:3): [True: 12.5k, False: 0]
  ------------------
  626|  12.5k|  (void)mev_assess(multi, data, NULL);
  627|  12.5k|  Curl_meta_remove(data, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  12.5k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  628|  12.5k|}
Curl_multi_ev_conn_done:
  633|  6.25k|{
  634|  6.25k|  (void)mev_assess(multi, data, conn);
  635|  6.25k|  Curl_conn_meta_remove(conn, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  6.25k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  636|  6.25k|}
Curl_multi_ev_init:
  639|  11.7k|{
  640|  11.7k|  Curl_hash_init(&multi->ev.sh_entries, hashsize, mev_sh_entry_hash,
  641|  11.7k|                 mev_sh_entry_compare, mev_sh_entry_dtor);
  642|  11.7k|}
Curl_multi_ev_cleanup:
  645|  11.7k|{
  646|  11.7k|  Curl_hash_destroy(&multi->ev.sh_entries);
  647|  11.7k|}
multi_ev.c:mev_assess:
  500|  18.8k|{
  501|  18.8k|  struct easy_pollset ps, *last_ps;
  502|  18.8k|  CURLMcode mresult = CURLM_OK;
  503|       |
  504|  18.8k|  if(!multi || !multi->socket_cb)
  ------------------
  |  Branch (504:6): [True: 0, False: 18.8k]
  |  Branch (504:16): [True: 18.8k, False: 0]
  ------------------
  505|  18.8k|    return CURLM_OK;
  506|       |
  507|      0|  Curl_pollset_init(&ps);
  508|      0|  if(conn) {
  ------------------
  |  Branch (508:6): [True: 0, False: 0]
  ------------------
  509|      0|    CURLcode result = Curl_conn_adjust_pollset(data, conn, &ps);
  510|      0|    if(result) {
  ------------------
  |  Branch (510:8): [True: 0, False: 0]
  ------------------
  511|      0|      mresult = (result == CURLE_OUT_OF_MEMORY) ?
  ------------------
  |  Branch (511:17): [True: 0, False: 0]
  ------------------
  512|      0|        CURLM_OUT_OF_MEMORY : CURLM_INTERNAL_ERROR;
  513|      0|      goto out;
  514|      0|    }
  515|      0|  }
  516|      0|  else
  517|      0|    Curl_multi_pollset(data, &ps);
  518|      0|  last_ps = mev_get_last_pollset(data, conn);
  519|       |
  520|      0|  if(!last_ps && ps.n) {
  ------------------
  |  Branch (520:6): [True: 0, False: 0]
  |  Branch (520:18): [True: 0, False: 0]
  ------------------
  521|      0|    if(conn)
  ------------------
  |  Branch (521:8): [True: 0, False: 0]
  ------------------
  522|      0|      last_ps = mev_add_new_conn_pollset(conn);
  523|      0|    else
  524|      0|      last_ps = mev_add_new_xfer_pollset(data);
  525|      0|    if(!last_ps) {
  ------------------
  |  Branch (525:8): [True: 0, False: 0]
  ------------------
  526|      0|      mresult = CURLM_OUT_OF_MEMORY;
  527|      0|      goto out;
  528|      0|    }
  529|      0|  }
  530|       |
  531|      0|  if(last_ps)
  ------------------
  |  Branch (531:6): [True: 0, False: 0]
  ------------------
  532|      0|    mresult = mev_pollset_diff(multi, data, conn, &ps, last_ps);
  533|      0|  else
  534|      0|    DEBUGASSERT(!ps.n);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (534:5): [True: 0, False: 0]
  |  Branch (534:5): [True: 0, False: 0]
  ------------------
  535|      0|out:
  536|      0|  Curl_pollset_cleanup(&ps);
  537|      0|  return mresult;
  538|      0|}
multi_ev.c:mev_sh_entry_get:
   88|  5.59k|{
   89|  5.59k|  if(s != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.59k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (89:6): [True: 5.59k, False: 0]
  ------------------
   90|       |    /* only look for proper sockets */
   91|  5.59k|    return Curl_hash_pick(sh, (char *)&s, sizeof(curl_socket_t));
   92|  5.59k|  }
   93|      0|  return NULL;
   94|  5.59k|}
multi_ev.c:mev_forget_socket:
  195|  5.59k|{
  196|  5.59k|  struct mev_sh_entry *entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
  197|  5.59k|  int rc = 0;
  198|       |
  199|  5.59k|  if(!entry) /* we never knew or already forgot about this socket */
  ------------------
  |  Branch (199:6): [True: 5.59k, False: 0]
  ------------------
  200|  5.59k|    return CURLM_OK;
  201|       |
  202|       |  /* We managed this socket before, tell the socket callback to forget it. */
  203|      0|  if(entry->announced && multi->socket_cb) {
  ------------------
  |  Branch (203:6): [True: 0, False: 0]
  |  Branch (203:26): [True: 0, False: 0]
  ------------------
  204|      0|    struct Curl_mapi_guard guard;
  205|       |
  206|      0|    NOVERBOSE((void)cause);
  ------------------
  |  | 1614|      0|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1187|      0|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1187:35): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  207|      0|    CURL_TRC_M(data, "ev %s, call(fd=%" FMT_SOCKET_T ", ev=REMOVE)", cause, s);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  208|      0|    CURL_CBAPI_MULTI_START(&guard, multi, multi_socket_cb);
  ------------------
  |  |  197|      0|  Curl_cbapi_enter((g), NULL, (m), CURL_CBAPI_FN_##fn)
  ------------------
  209|      0|    rc = multi->socket_cb(data, s, CURL_POLL_REMOVE,
  ------------------
  |  |  286|      0|#define CURL_POLL_REMOVE 4
  ------------------
  210|      0|                          multi->socket_userp, entry->user_data);
  211|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|      0|  Curl_cbapi_leave(g)
  ------------------
  212|      0|    entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
  213|      0|    if(entry)
  ------------------
  |  Branch (213:8): [True: 0, False: 0]
  ------------------
  214|      0|      entry->announced = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  215|      0|  }
  216|       |
  217|      0|  mev_sh_entry_kill(multi, s);
  218|      0|  if(rc == -1) {
  ------------------
  |  Branch (218:6): [True: 0, False: 0]
  ------------------
  219|      0|    multi->dead = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  220|      0|    return CURLM_ABORTED_BY_CALLBACK;
  221|      0|  }
  222|      0|  return CURLM_OK;
  223|      0|}

Curl_mntfy_init:
  125|  11.7k|{
  126|  11.7k|  memset(&multi->ntfy, 0, sizeof(multi->ntfy));
  127|  11.7k|  Curl_uint32_bset_init(&multi->ntfy.enabled);
  128|  11.7k|}
Curl_mntfy_resize:
  131|  11.7k|{
  132|  11.7k|  if(Curl_uint32_bset_resize(&multi->ntfy.enabled, CURLMNOTIFY_EASY_DONE + 1))
  ------------------
  |  |  540|  11.7k|#define CURLMNOTIFY_EASY_DONE    1
  ------------------
  |  Branch (132:6): [True: 0, False: 11.7k]
  ------------------
  133|      0|    return CURLM_OUT_OF_MEMORY;
  134|  11.7k|  return CURLM_OK;
  135|  11.7k|}
Curl_mntfy_cleanup:
  138|  11.7k|{
  139|  11.7k|  while(multi->ntfy.head) {
  ------------------
  |  Branch (139:9): [True: 0, False: 11.7k]
  ------------------
  140|      0|    struct mntfy_chunk *chunk = multi->ntfy.head;
  141|      0|    multi->ntfy.head = chunk->next;
  142|      0|    mnfty_chunk_destroy(chunk);
  143|      0|  }
  144|       |  multi->ntfy.tail = NULL;
  145|  11.7k|  Curl_uint32_bset_destroy(&multi->ntfy.enabled);
  146|  11.7k|}

Curl_netrc_scan:
  581|      5|{
  582|      5|  NETRCcode retcode = NETRC_OK;
  583|       |
  584|      5|  CURL_TRC_M(data, "[NETRC] scanning '%s' for host '%s' user '%s'",
  ------------------
  |  |  148|      5|  do {                                   \
  |  |  149|      5|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      5|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      5|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     10|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 5, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     10|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      5|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      5|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  585|      5|             netrcfile, hostname, user);
  586|      5|  Curl_creds_unlink(pcreds);
  587|      5|  if(!netrcfile) {
  ------------------
  |  Branch (587:6): [True: 0, False: 5]
  ------------------
  588|      0|    char *home = NULL;
  589|      0|    char *homea = NULL;
  590|      0|    char *filealloc = NULL;
  591|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  592|      0|    char pwbuf[1024];
  593|      0|#endif
  594|      0|    filealloc = curl_getenv("NETRC");
  595|      0|    if(!filealloc) {
  ------------------
  |  Branch (595:8): [True: 0, False: 0]
  ------------------
  596|      0|      homea = curl_getenv("HOME"); /* portable environment reader */
  597|      0|      if(homea) {
  ------------------
  |  Branch (597:10): [True: 0, False: 0]
  ------------------
  598|      0|        home = homea;
  599|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  600|      0|      }
  601|      0|      else {
  602|      0|        struct passwd pw, *pw_res;
  603|      0|        if(!getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) &&
  ------------------
  |  Branch (603:12): [True: 0, False: 0]
  ------------------
  604|      0|           pw_res) {
  ------------------
  |  Branch (604:12): [True: 0, False: 0]
  ------------------
  605|      0|          home = pw.pw_dir;
  606|      0|        }
  607|       |#elif defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
  608|       |      }
  609|       |      else {
  610|       |        struct passwd *pw;
  611|       |        pw = getpwuid(geteuid());
  612|       |        if(pw) {
  613|       |          home = pw->pw_dir;
  614|       |        }
  615|       |#elif defined(_WIN32)
  616|       |      }
  617|       |      else {
  618|       |        homea = curl_getenv("USERPROFILE");
  619|       |        if(homea) {
  620|       |          home = homea;
  621|       |        }
  622|       |#endif
  623|      0|      }
  624|       |
  625|      0|      if(!home)
  ------------------
  |  Branch (625:10): [True: 0, False: 0]
  ------------------
  626|      0|        return NETRC_FILE_MISSING; /* no home directory found (or possibly out
  627|       |                                      of memory) */
  628|       |
  629|      0|      filealloc = curl_maprintf("%s%s.netrc", home, DIR_CHAR);
  ------------------
  |  |  681|      0|#  define DIR_CHAR      "/"
  ------------------
  630|      0|      if(!filealloc) {
  ------------------
  |  Branch (630:10): [True: 0, False: 0]
  ------------------
  631|      0|        curlx_free(homea);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  632|      0|        retcode = NETRC_OUT_OF_MEMORY;
  633|      0|        goto out;
  634|      0|      }
  635|      0|    }
  636|      0|    retcode = netrc_scan_file(
  637|      0|      data, store, hostname, user, filealloc, pcreds);
  638|      0|    curlx_free(filealloc);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  639|       |#ifdef _WIN32
  640|       |    if(retcode == NETRC_FILE_MISSING) {
  641|       |      /* fallback to the old-style "_netrc" file */
  642|       |      filealloc = curl_maprintf("%s%s_netrc", home, DIR_CHAR);
  643|       |      if(!filealloc) {
  644|       |        curlx_free(homea);
  645|       |        return NETRC_OUT_OF_MEMORY;
  646|       |      }
  647|       |      retcode = netrc_scan_file(
  648|       |        data, store, hostname, user, filealloc, pcreds);
  649|       |      curlx_free(filealloc);
  650|       |    }
  651|       |#endif
  652|      0|    curlx_free(homea);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  653|      0|  }
  654|      5|  else
  655|      5|    retcode = netrc_scan_file(
  656|      5|      data, store, hostname, user, netrcfile, pcreds);
  657|       |
  658|      5|out:
  659|      5|  if(retcode)
  ------------------
  |  Branch (659:6): [True: 5, False: 0]
  ------------------
  660|      5|    Curl_creds_unlink(pcreds);
  661|      5|  return retcode;
  662|      5|}
Curl_netrc_init:
  665|  26.2k|{
  666|  26.2k|  curlx_dyn_init(&store->filebuf, MAX_NETRC_FILE);
  ------------------
  |  |   77|  26.2k|#define MAX_NETRC_FILE  (128 * 1024)
  ------------------
  667|  26.2k|  store->loaded = FALSE;
  ------------------
  |  | 1056|  26.2k|#define FALSE false
  ------------------
  668|       |  store->filename = NULL;
  669|  26.2k|}
Curl_netrc_cleanup:
  671|  32.5k|{
  672|  32.5k|  curlx_dyn_free(&store->filebuf);
  673|  32.5k|  curlx_safefree(store->filename);
  ------------------
  |  | 1336|  32.5k|  do {                      \
  |  | 1337|  32.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  32.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  32.5k|    (ptr) = NULL;           \
  |  | 1339|  32.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 32.5k]
  |  |  ------------------
  ------------------
  674|       |  store->loaded = FALSE;
  ------------------
  |  | 1056|  32.5k|#define FALSE false
  ------------------
  675|  32.5k|}
netrc.c:netrc_scan_file:
  546|      5|{
  547|      5|  struct dynbuf *filebuf = &store->filebuf;
  548|       |
  549|      5|  if(!store->loaded || strcmp(netrcfile, store->filename)) {
  ------------------
  |  Branch (549:6): [True: 5, False: 0]
  |  Branch (549:24): [True: 0, False: 0]
  ------------------
  550|      5|    NETRCcode ret;
  551|      5|    store->loaded = FALSE;
  ------------------
  |  | 1056|      5|#define FALSE false
  ------------------
  552|      5|    ret = file2memory(netrcfile, filebuf);
  553|      5|    if(ret) {
  ------------------
  |  Branch (553:8): [True: 0, False: 5]
  ------------------
  554|      0|      CURL_TRC_M(data, "[NETRC] could not load '%s'", netrcfile);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  555|      0|      return ret;
  556|      0|    }
  557|      5|    curlx_free(store->filename);
  ------------------
  |  | 1478|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  558|      5|    store->filename = curlx_strdup(netrcfile);
  ------------------
  |  | 1472|      5|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  559|      5|    if(!store->filename) {
  ------------------
  |  Branch (559:8): [True: 0, False: 5]
  ------------------
  560|      0|      curlx_dyn_reset(&store->filebuf);
  561|      0|      return NETRC_OUT_OF_MEMORY;
  562|      0|    }
  563|      5|    store->loaded = TRUE;
  ------------------
  |  | 1053|      5|#define TRUE true
  ------------------
  564|      5|  }
  565|       |
  566|      5|  return netrc_scan(data, curlx_dyn_ptr(filebuf), hostname, user, pcreds);
  567|      5|}
netrc.c:file2memory:
  502|      5|{
  503|      5|  NETRCcode ret = NETRC_FILE_MISSING; /* if it cannot open the file */
  504|      5|  FILE *file = curlx_fopen(filename, FOPEN_READTEXT);
  ------------------
  |  |   74|      5|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  505|       |
  506|      5|  curlx_dyn_reset(filebuf);
  507|      5|  if(file) {
  ------------------
  |  Branch (507:6): [True: 5, False: 0]
  ------------------
  508|      5|    curlx_struct_stat stat;
  ------------------
  |  |   63|      5|#define curlx_struct_stat       struct stat
  ------------------
  509|      5|    if((curlx_fstat(fileno(file), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|      5|#define curlx_fstat             fstat
  ------------------
  |  Branch (509:8): [True: 0, False: 5]
  |  Branch (509:52): [True: 5, False: 0]
  ------------------
  510|      5|      CURLcode result = CURLE_OK;
  511|      5|      bool eof;
  512|      5|      struct dynbuf linebuf;
  513|      5|      curlx_dyn_init(&linebuf, MAX_NETRC_LINE);
  ------------------
  |  |   76|      5|#define MAX_NETRC_LINE  16384
  ------------------
  514|      5|      ret = NETRC_OK;
  515|      5|      do {
  516|      5|        const char *line;
  517|       |        /* Curl_get_line always returns lines ending with a newline */
  518|      5|        result = Curl_get_line(&linebuf, file, &eof);
  519|      5|        if(!result) {
  ------------------
  |  Branch (519:12): [True: 5, False: 0]
  ------------------
  520|      5|          line = curlx_dyn_ptr(&linebuf);
  521|       |          /* skip comments on load */
  522|      5|          curlx_str_passblanks(&line);
  523|      5|          if(*line == '#')
  ------------------
  |  Branch (523:14): [True: 0, False: 5]
  ------------------
  524|      0|            continue;
  525|      5|          result = curlx_dyn_add(filebuf, line);
  526|      5|        }
  527|      5|        if(result) {
  ------------------
  |  Branch (527:12): [True: 0, False: 5]
  ------------------
  528|      0|          curlx_dyn_free(filebuf);
  529|      0|          ret = curl2netrc(result);
  ------------------
  |  |   84|      0|  ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
  |  |  ------------------
  |  |  |  Branch (84:4): [True: 0, False: 0]
  |  |  |  Branch (84:25): [True: 0, False: 0]
  |  |  ------------------
  |  |   85|      0|   NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
  ------------------
  530|      0|          break;
  531|      0|        }
  532|      5|      } while(!eof);
  ------------------
  |  Branch (532:15): [True: 0, False: 5]
  ------------------
  533|      5|      curlx_dyn_free(&linebuf);
  534|      5|    }
  535|      5|    curlx_fclose(file);
  ------------------
  |  |   79|      5|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  536|      5|  }
  537|      5|  return ret;
  538|      5|}
netrc.c:netrc_scan:
  426|      5|{
  427|      5|  struct netrc_scanner sc;
  428|      5|  NETRCcode rc = NETRC_OK;
  429|       |
  430|      5|  Curl_creds_unlink(pcreds);
  431|      5|  netrc_scan_init(&sc, data, content, hostname, user);
  432|       |
  433|      5|  while(!rc && !sc.found) {
  ------------------
  |  Branch (433:9): [True: 5, False: 0]
  |  Branch (433:16): [True: 5, False: 0]
  ------------------
  434|      5|    rc = netrc_lexer_next(&sc.lexer, FALSE);
  ------------------
  |  | 1056|      5|#define FALSE false
  ------------------
  435|      5|    if(!rc) {
  ------------------
  |  Branch (435:8): [True: 5, False: 0]
  ------------------
  436|       |      /* Does this token end any previous entry? */
  437|      5|      switch(sc.lexer.token) {
  438|      5|      case NETRC_TOK_EOF:
  ------------------
  |  Branch (438:7): [True: 5, False: 0]
  ------------------
  439|      5|      case NETRC_TOK_MACHINE:
  ------------------
  |  Branch (439:7): [True: 0, False: 5]
  ------------------
  440|      5|      case NETRC_TOK_DEFAULT:
  ------------------
  |  Branch (440:7): [True: 0, False: 5]
  ------------------
  441|      5|      case NETRC_TOK_MACDEF:
  ------------------
  |  Branch (441:7): [True: 0, False: 5]
  ------------------
  442|      5|        rc = netrc_scan_end_entry(&sc);
  443|      5|        if(rc || sc.found)
  ------------------
  |  Branch (443:12): [True: 0, False: 5]
  |  Branch (443:18): [True: 0, False: 5]
  ------------------
  444|      0|          goto out;
  445|      5|        break;
  446|      5|      default:
  ------------------
  |  Branch (446:7): [True: 0, False: 5]
  ------------------
  447|      0|        break;
  448|      5|      }
  449|       |
  450|      5|      switch(sc.lexer.token) {
  451|      5|      case NETRC_TOK_EOF:
  ------------------
  |  Branch (451:7): [True: 5, False: 0]
  ------------------
  452|      5|        goto out;
  453|      0|      case NETRC_TOK_MACHINE:
  ------------------
  |  Branch (453:7): [True: 0, False: 5]
  ------------------
  454|      0|        rc = netrc_lexer_next(&sc.lexer, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  455|      0|        if(!rc) {
  ------------------
  |  Branch (455:12): [True: 0, False: 0]
  ------------------
  456|      0|          if(sc.lexer.token == NETRC_TOK_LITERAL) {
  ------------------
  |  Branch (456:14): [True: 0, False: 0]
  ------------------
  457|      0|            sc.matches_host = curl_strequal(
  458|      0|              sc.hostname, curlx_dyn_ptr(&sc.lexer.literal));
  459|      0|          }
  460|      0|          else {
  461|      0|            sc.matches_host = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  462|      0|            netrc_lexer_push(&sc.lexer);
  463|      0|          }
  464|      0|        }
  465|      0|        break;
  466|      0|      case NETRC_TOK_DEFAULT:
  ------------------
  |  Branch (466:7): [True: 0, False: 5]
  ------------------
  467|      0|        sc.matches_host = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  468|      0|        break;
  469|      0|      case NETRC_TOK_ACCOUNT:
  ------------------
  |  Branch (469:7): [True: 0, False: 5]
  ------------------
  470|      0|        rc = netrc_scan_literal(&sc, NULL); /* ignore, not used */
  471|      0|        break;
  472|      0|      case NETRC_TOK_LOGIN:
  ------------------
  |  Branch (472:7): [True: 0, False: 5]
  ------------------
  473|      0|        rc = netrc_scan_literal(&sc, &sc.login);
  474|      0|        break;
  475|      0|      case NETRC_TOK_PASSWD:
  ------------------
  |  Branch (475:7): [True: 0, False: 5]
  ------------------
  476|      0|        rc = netrc_scan_literal(&sc, &sc.passwd);
  477|      0|        break;
  478|      0|      case NETRC_TOK_MACDEF:
  ------------------
  |  Branch (478:7): [True: 0, False: 5]
  ------------------
  479|      0|        netrc_skip_to_empty_line(&sc.lexer);
  480|      0|        break;
  481|      0|      case NETRC_TOK_LITERAL:
  ------------------
  |  Branch (481:7): [True: 0, False: 5]
  ------------------
  482|      0|      case NETRC_TOK_JUNK:
  ------------------
  |  Branch (482:7): [True: 0, False: 5]
  ------------------
  483|      0|      default:
  ------------------
  |  Branch (483:7): [True: 0, False: 5]
  ------------------
  484|       |        /* skip this */
  485|      0|        break;
  486|      5|      }
  487|      5|    }
  488|      5|  }
  489|       |
  490|      5|out:
  491|      5|  if(!rc) {
  ------------------
  |  Branch (491:6): [True: 5, False: 0]
  ------------------
  492|      5|    if(sc.creds)
  ------------------
  |  Branch (492:8): [True: 0, False: 5]
  ------------------
  493|      0|      Curl_creds_link(pcreds, sc.creds);
  494|      5|    else
  495|      5|      rc = NETRC_NO_MATCH;
  496|      5|  }
  497|      5|  netrc_scan_cleanup(&sc);
  498|      5|  return rc;
  499|      5|}
netrc.c:netrc_scan_init:
  343|      5|{
  344|      5|  memset(sc, 0, sizeof(*sc));
  345|      5|  netrc_lexer_init(&sc->lexer, data, content);
  346|      5|  sc->hostname = hostname;
  347|      5|  sc->user = (user && user[0]) ? user : NULL;
  ------------------
  |  Branch (347:15): [True: 5, False: 0]
  |  Branch (347:23): [True: 2, False: 3]
  ------------------
  348|      5|  netrc_scan_reset(sc);
  349|      5|}
netrc.c:netrc_lexer_init:
  139|      5|{
  140|      5|  curlx_dyn_init(&lexer->literal, MAX_NETRC_TOKEN);
  ------------------
  |  |   78|      5|#define MAX_NETRC_TOKEN 4096
  ------------------
  141|      5|  lexer->data = data;
  142|      5|  lexer->content = lexer->pos = content;
  143|      5|}
netrc.c:netrc_scan_reset:
  332|     15|{
  333|     15|  curlx_safefree(sc->login);
  ------------------
  |  | 1336|     15|  do {                      \
  |  | 1337|     15|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|     15|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|     15|    (ptr) = NULL;           \
  |  | 1339|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  334|     15|  curlx_safefree(sc->passwd);
  ------------------
  |  | 1336|     15|  do {                      \
  |  | 1337|     15|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|     15|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|     15|    (ptr) = NULL;           \
  |  | 1339|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  335|       |  sc->matches_host = FALSE;
  ------------------
  |  | 1056|     15|#define FALSE false
  ------------------
  336|     15|}
netrc.c:netrc_lexer_next:
  248|      5|{
  249|      5|  const char *s = lexer->pos, *start;
  250|      5|  NETRCcode rc = NETRC_OK;
  251|      5|  size_t slen;
  252|      5|  CURLcode result;
  253|       |
  254|      5|  if(lexer->pushed) {
  ------------------
  |  Branch (254:6): [True: 0, False: 5]
  ------------------
  255|      0|    lexer->pushed = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  256|      0|    goto out;
  257|      0|  }
  258|       |
  259|      5|  curlx_dyn_reset(&lexer->literal);
  260|      5|  netrc_skip_blanks(lexer);
  261|      5|  s = lexer->pos;
  262|       |
  263|      5|  switch(*s) {
  264|      5|  case 0:
  ------------------
  |  Branch (264:3): [True: 5, False: 0]
  ------------------
  265|      5|    lexer->token = NETRC_TOK_EOF;
  266|      5|    break;
  267|      0|  case '\"':
  ------------------
  |  Branch (267:3): [True: 0, False: 5]
  ------------------
  268|      0|    rc = netrc_lexer_quoted(lexer);
  269|      0|    lexer->token = NETRC_TOK_LITERAL;
  270|      0|    s = lexer->pos;
  271|      0|    break;
  272|      0|  default:
  ------------------
  |  Branch (272:3): [True: 0, False: 5]
  ------------------
  273|       |    /* unquoted token */
  274|      0|    start = s;
  275|      0|    while(*s && !ISBLANK(*s) && !ISNEWLINE(*s))
  ------------------
  |  |   43|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  while(*s && !ISBLANK(*s) && !ISNEWLINE(*s))
  ------------------
  |  |   48|      0|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (48:26): [True: 0, False: 0]
  |  |  |  Branch (48:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (275:11): [True: 0, False: 0]
  ------------------
  276|      0|      ++s;
  277|      0|    slen = s - start;
  278|      0|    if(!slen) {
  ------------------
  |  Branch (278:8): [True: 0, False: 0]
  ------------------
  279|      0|      rc = NETRC_SYNTAX_ERROR;
  280|      0|    }
  281|      0|    if(want_literal) {
  ------------------
  |  Branch (281:8): [True: 0, False: 0]
  ------------------
  282|      0|      lexer->token = NETRC_TOK_LITERAL;
  283|      0|      result = curlx_dyn_addn(&lexer->literal, start, slen);
  284|      0|      rc = curl2netrc(result);
  ------------------
  |  |   84|      0|  ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
  |  |  ------------------
  |  |  |  Branch (84:4): [True: 0, False: 0]
  |  |  |  Branch (84:25): [True: 0, False: 0]
  |  |  ------------------
  |  |   85|      0|   NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
  ------------------
  285|      0|    }
  286|      0|    else if((slen == 7) && curl_strnequal(start, "machine", slen)) {
  ------------------
  |  Branch (286:13): [True: 0, False: 0]
  |  Branch (286:28): [True: 0, False: 0]
  ------------------
  287|      0|      lexer->token = NETRC_TOK_MACHINE;
  288|      0|    }
  289|      0|    else if((slen == 7) && curl_strnequal(start, "default", slen)) {
  ------------------
  |  Branch (289:13): [True: 0, False: 0]
  |  Branch (289:28): [True: 0, False: 0]
  ------------------
  290|      0|      lexer->token = NETRC_TOK_DEFAULT;
  291|      0|    }
  292|      0|    else if((slen == 7) && curl_strnequal(start, "account", slen)) {
  ------------------
  |  Branch (292:13): [True: 0, False: 0]
  |  Branch (292:28): [True: 0, False: 0]
  ------------------
  293|      0|      lexer->token = NETRC_TOK_ACCOUNT;
  294|      0|    }
  295|      0|    else if((slen == 5) && curl_strnequal(start, "login", slen)) {
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  |  Branch (295:28): [True: 0, False: 0]
  ------------------
  296|      0|      lexer->token = NETRC_TOK_LOGIN;
  297|      0|    }
  298|      0|    else if((slen == 8) && curl_strnequal(start, "password", slen)) {
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  |  Branch (298:28): [True: 0, False: 0]
  ------------------
  299|      0|      lexer->token = NETRC_TOK_PASSWD;
  300|      0|    }
  301|      0|    else if((slen == 6) && curl_strnequal(start, "macdef", slen)) {
  ------------------
  |  Branch (301:13): [True: 0, False: 0]
  |  Branch (301:28): [True: 0, False: 0]
  ------------------
  302|      0|      lexer->token = NETRC_TOK_MACDEF;
  303|      0|    }
  304|      0|    else {
  305|      0|      lexer->token = NETRC_TOK_JUNK;
  306|      0|    }
  307|      0|    break;
  308|      5|  }
  309|       |
  310|      5|out:
  311|       |#if NETRC_DEBUG
  312|       |  CURL_TRC_M(lexer->data, "[NETRC] token %s '%s', rc=%d",
  313|       |             netrc_tokenstr(lexer->token),
  314|       |             curlx_dyn_ptr(&lexer->literal), rc);
  315|       |#endif
  316|      5|  lexer->pos = s;
  317|      5|  return rc;
  318|      5|}
netrc.c:netrc_skip_blanks:
  153|      5|{
  154|      5|  const char *s = lexer->pos;
  155|     10|  while(*s) {
  ------------------
  |  Branch (155:9): [True: 5, False: 5]
  ------------------
  156|      5|    curlx_str_passblanks(&s);
  157|      5|    while(*s == '\r')
  ------------------
  |  Branch (157:11): [True: 0, False: 5]
  ------------------
  158|      0|      ++s;
  159|      5|    if(*s == '\n') {
  ------------------
  |  Branch (159:8): [True: 5, False: 0]
  ------------------
  160|      5|      ++s;
  161|      5|    }
  162|      0|    else
  163|      0|      break;
  164|      5|  }
  165|      5|  lexer->pos = s;
  166|      5|}
netrc.c:netrc_scan_end_entry:
  380|      5|{
  381|      5|  NETRCcode rc = NETRC_OK;
  382|       |#if NETRC_DEBUG
  383|       |  CURL_TRC_M(sc->lexer.data,
  384|       |             "[NETRC] entry matches_host=%d, login='%s', passwd='%s'",
  385|       |             sc->matches_host, sc->login, sc->passwd);
  386|       |#endif
  387|      5|  if(sc->matches_host) {
  ------------------
  |  Branch (387:6): [True: 0, False: 5]
  ------------------
  388|      0|    if(sc->login) {
  ------------------
  |  Branch (388:8): [True: 0, False: 0]
  ------------------
  389|      0|      if(sc->user) {
  ------------------
  |  Branch (389:10): [True: 0, False: 0]
  ------------------
  390|      0|        if(Curl_timestrcmp(sc->user, sc->login))
  ------------------
  |  Branch (390:12): [True: 0, False: 0]
  ------------------
  391|      0|          goto out;
  392|       |        /* We look for a specific user,
  393|       |         * entry is only interesting with password */
  394|      0|        sc->found = !!sc->passwd;
  395|      0|      }
  396|      0|      else {
  397|      0|        sc->found = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  398|      0|      }
  399|      0|    }
  400|      0|    else if(sc->passwd) {
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|       |      /* found a passwd that applies to any user */
  402|      0|      sc->found = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  403|      0|    }
  404|      0|    else {
  405|       |      /* entry has nothing interesting */
  406|      0|    }
  407|      0|    if(sc->found) {
  ------------------
  |  Branch (407:8): [True: 0, False: 0]
  ------------------
  408|       |#if NETRC_DEBUG
  409|       |      CURL_TRC_M(sc->lexer.data, "[NETRC] entry match found");
  410|       |#endif
  411|      0|      if(Curl_creds_create(sc->user ? sc->user : sc->login, sc->passwd,
  ------------------
  |  Branch (411:10): [True: 0, False: 0]
  |  Branch (411:28): [True: 0, False: 0]
  ------------------
  412|      0|                           NULL, NULL, NULL, CREDS_NETRC, &sc->creds))
  ------------------
  |  |   32|      0|#define CREDS_NETRC  3 /* username/passwd found in netrc */
  ------------------
  413|      0|        rc = NETRC_OUT_OF_MEMORY;
  414|      0|    }
  415|      0|  }
  416|      5|out:
  417|      5|  netrc_scan_reset(sc);
  418|      5|  return rc;
  419|      5|}
netrc.c:netrc_scan_cleanup:
  352|      5|{
  353|      5|  netrc_scan_reset(sc);
  354|      5|  sc->hostname = NULL;
  355|       |  sc->user = NULL;
  356|      5|  Curl_creds_unlink(&sc->creds);
  357|      5|  netrc_lexer_cleanup(&sc->lexer);
  358|      5|}
netrc.c:netrc_lexer_cleanup:
  146|      5|{
  147|      5|  lexer->content = lexer->pos = NULL;
  148|       |  lexer->data = NULL;
  149|      5|  curlx_dyn_free(&lexer->literal);
  150|      5|}

Curl_getdate_capped:
  603|  11.5k|{
  604|  11.5k|  int rc = parsedate(p, tp);
  605|  11.5k|  return (rc == PARSEDATE_FAIL);
  ------------------
  |  |   95|  11.5k|#define PARSEDATE_FAIL   (-1)
  ------------------
  606|  11.5k|}
parsedate.c:parsedate:
  540|  11.5k|{
  541|  11.5k|  curl_off_t seconds = 0;
  542|  11.5k|  enum assume dignext = DATE_MDAY;
  543|  11.5k|  const char *indate = date; /* save the original pointer */
  544|  11.5k|  int part = 0; /* max 6 parts */
  545|  11.5k|  int rc = 0;
  546|  11.5k|  struct when w;
  547|  11.5k|  initwhen(&w);
  548|       |
  549|  35.5k|  while(*date && (part < 6)) {
  ------------------
  |  Branch (549:9): [True: 30.7k, False: 4.84k]
  |  Branch (549:18): [True: 30.7k, False: 0]
  ------------------
  550|  30.7k|    skip(&date);
  551|       |
  552|  30.7k|    if(ISALPHA(*date))
  ------------------
  |  |   36|  30.7k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|  61.4k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 3.30k, False: 27.4k]
  |  |  |  |  |  Branch (41:38): [True: 3.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|  27.4k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 7.80k, False: 19.6k]
  |  |  |  |  |  Branch (40:38): [True: 7.80k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  553|  11.1k|      rc = datestring(&date, &w);
  554|  19.6k|    else if(ISDIGIT(*date))
  ------------------
  |  |   42|  19.6k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 17.3k, False: 2.31k]
  |  |  |  Branch (42:38): [True: 17.3k, False: 0]
  |  |  ------------------
  ------------------
  555|  17.3k|      rc = datenum(indate, &date, &w, &dignext);
  556|  30.7k|    if(rc)
  ------------------
  |  Branch (556:8): [True: 6.72k, False: 24.0k]
  ------------------
  557|  6.72k|      return rc;
  558|       |
  559|  24.0k|    part++;
  560|  24.0k|  }
  561|       |
  562|  4.84k|  rc = datecheck(&w);
  563|  4.84k|  if(rc)
  ------------------
  |  Branch (563:6): [True: 4.53k, False: 310]
  ------------------
  564|  4.53k|    return rc;
  565|       |
  566|    310|  seconds = time2epoch(&w); /* get number of seconds */
  567|    310|  tzadjust(&seconds, &w); /* handle the time zone offset */
  568|    310|  rc = mktimet(seconds, output); /* squeeze seconds into a time_t */
  569|       |
  570|    310|  return rc;
  571|  4.84k|}
parsedate.c:initwhen:
  357|  11.5k|{
  358|  11.5k|  w->wday = w->mon = w->mday = w->hour = w->min = w->sec = w->year = w->tzoff =
  359|  11.5k|    -1;
  360|  11.5k|}
parsedate.c:skip:
  253|  30.7k|{
  254|       |  /* skip everything that are not letters or digits */
  255|  55.3k|  while(**date && !ISALNUM(**date))
  ------------------
  |  |   39|  53.0k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|   106k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 39.2k, False: 13.7k]
  |  |  |  |  |  Branch (42:38): [True: 17.3k, False: 21.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|  88.7k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 5.15k, False: 30.5k]
  |  |  |  |  |  Branch (41:38): [True: 3.30k, False: 1.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|  32.4k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 11.2k, False: 21.1k]
  |  |  |  |  |  Branch (40:38): [True: 7.80k, False: 3.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (255:9): [True: 53.0k, False: 2.31k]
  ------------------
  256|  24.6k|    (*date)++;
  257|  30.7k|}
parsedate.c:datestring:
  363|  11.1k|{
  364|       |  /* a name coming up */
  365|  11.1k|  size_t len = 0;
  366|  11.1k|  const char *p = *datep;
  367|  11.1k|  bool found = FALSE;
  ------------------
  |  | 1056|  11.1k|#define FALSE false
  ------------------
  368|  37.5k|  while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |   36|  75.0k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|  75.0k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 13.3k, False: 24.1k]
  |  |  |  |  |  Branch (41:38): [True: 12.9k, False: 409]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|  24.5k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 14.4k, False: 10.0k]
  |  |  |  |  |  Branch (40:38): [True: 13.4k, False: 979]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |  354|  26.4k|#define NAME_LEN 12
  ------------------
  |  Branch (368:24): [True: 26.3k, False: 52]
  ------------------
  369|  26.3k|    p++;
  370|  26.3k|    len++;
  371|  26.3k|  }
  372|       |
  373|  11.1k|  if(len != NAME_LEN) {
  ------------------
  |  |  354|  11.1k|#define NAME_LEN 12
  ------------------
  |  Branch (373:6): [True: 10.9k, False: 114]
  ------------------
  374|  10.9k|    if(w->wday == -1) {
  ------------------
  |  Branch (374:8): [True: 10.2k, False: 719]
  ------------------
  375|  10.2k|      w->wday = checkday(*datep, len);
  376|  10.2k|      if(w->wday != -1)
  ------------------
  |  Branch (376:10): [True: 527, False: 9.74k]
  ------------------
  377|    527|        found = TRUE;
  ------------------
  |  | 1053|    527|#define TRUE true
  ------------------
  378|  10.2k|    }
  379|  10.9k|    if(!found && (w->mon == -1)) {
  ------------------
  |  Branch (379:8): [True: 10.4k, False: 527]
  |  Branch (379:18): [True: 8.79k, False: 1.67k]
  ------------------
  380|  8.79k|      w->mon = checkmonth(*datep, len);
  381|  8.79k|      if(w->mon != -1)
  ------------------
  |  Branch (381:10): [True: 2.40k, False: 6.39k]
  ------------------
  382|  2.40k|        found = TRUE;
  ------------------
  |  | 1053|  2.40k|#define TRUE true
  ------------------
  383|  8.79k|    }
  384|       |
  385|  10.9k|    if(!found && (w->tzoff == -1)) {
  ------------------
  |  Branch (385:8): [True: 8.06k, False: 2.92k]
  |  Branch (385:18): [True: 6.09k, False: 1.96k]
  ------------------
  386|       |      /* this must be a time zone string */
  387|  6.09k|      w->tzoff = checktz(*datep, len);
  388|  6.09k|      if(w->tzoff != -1)
  ------------------
  |  Branch (388:10): [True: 3.60k, False: 2.49k]
  ------------------
  389|  3.60k|        found = TRUE;
  ------------------
  |  | 1053|  3.60k|#define TRUE true
  ------------------
  390|  6.09k|    }
  391|  10.9k|  }
  392|  11.1k|  if(!found)
  ------------------
  |  Branch (392:6): [True: 4.57k, False: 6.53k]
  ------------------
  393|  4.57k|    return PARSEDATE_FAIL; /* bad string */
  ------------------
  |  |   95|  4.57k|#define PARSEDATE_FAIL   (-1)
  ------------------
  394|       |
  395|  6.53k|  *datep += len;
  396|  6.53k|  return PARSEDATE_OK;
  ------------------
  |  |   94|  6.53k|#define PARSEDATE_OK     0
  ------------------
  397|  11.1k|}
parsedate.c:checkday:
  196|  10.2k|{
  197|  10.2k|  int i;
  198|  10.2k|  const char * const *what;
  199|  10.2k|  if(len > 3)
  ------------------
  |  Branch (199:6): [True: 1.15k, False: 9.11k]
  ------------------
  200|  1.15k|    what = &weekday[0];
  201|  9.11k|  else if(len == 3)
  ------------------
  |  Branch (201:11): [True: 4.13k, False: 4.98k]
  ------------------
  202|  4.13k|    what = &Curl_wkday[0];
  203|  4.98k|  else
  204|  4.98k|    return -1; /* too short */
  205|  40.5k|  for(i = 0; i < 7; i++) {
  ------------------
  |  Branch (205:14): [True: 35.7k, False: 4.76k]
  ------------------
  206|  35.7k|    size_t ilen = strlen(what[0]);
  207|  35.7k|    if((ilen == len) &&
  ------------------
  |  Branch (207:8): [True: 28.0k, False: 7.73k]
  ------------------
  208|  28.0k|       curl_strnequal(check, what[0], len))
  ------------------
  |  Branch (208:8): [True: 527, False: 27.5k]
  ------------------
  209|    527|      return i;
  210|  35.2k|    what++;
  211|  35.2k|  }
  212|  4.76k|  return -1;
  213|  5.29k|}
parsedate.c:checkmonth:
  216|  8.79k|{
  217|  8.79k|  int i;
  218|  8.79k|  const char * const *what = &Curl_month[0];
  219|  8.79k|  if(len != 3)
  ------------------
  |  Branch (219:6): [True: 5.26k, False: 3.53k]
  ------------------
  220|  5.26k|    return -1; /* not a month */
  221|       |
  222|  31.1k|  for(i = 0; i < 12; i++) {
  ------------------
  |  Branch (222:14): [True: 30.0k, False: 1.13k]
  ------------------
  223|  30.0k|    if(curl_strnequal(check, what[0], 3))
  ------------------
  |  Branch (223:8): [True: 2.40k, False: 27.6k]
  ------------------
  224|  2.40k|      return i;
  225|  27.6k|    what++;
  226|  27.6k|  }
  227|  1.13k|  return -1; /* return the offset or -1, no real offset is -1 */
  228|  3.53k|}
parsedate.c:checktz:
  240|  6.09k|{
  241|  6.09k|  if(len <= 4) {
  ------------------
  |  Branch (241:6): [True: 5.45k, False: 647]
  ------------------
  242|  5.45k|    const struct tzinfo *what;
  243|  5.45k|    struct tzinfo find;
  244|  5.45k|    curlx_strcopy(find.name, sizeof(find.name), check, len);
  245|  5.45k|    what = bsearch(&find, tz, CURL_ARRAYSIZE(tz), sizeof(tz[0]), tzcompare);
  ------------------
  |  | 1303|  5.45k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  246|  5.45k|    if(what)
  ------------------
  |  Branch (246:8): [True: 3.60k, False: 1.84k]
  ------------------
  247|  3.60k|      return what->offset * 60;
  248|  5.45k|  }
  249|  2.49k|  return -1;
  250|  6.09k|}
parsedate.c:tzcompare:
  231|  30.7k|{
  232|  30.7k|  const struct tzinfo *tz1 = m1;
  233|  30.7k|  const struct tzinfo *tz2 = m2;
  234|  30.7k|  return strcmp(tz1->name, tz2->name);
  235|  30.7k|}
parsedate.c:datenum:
  401|  17.3k|{
  402|       |  /* a digit */
  403|  17.3k|  unsigned int val;
  404|  17.3k|  char *end;
  405|  17.3k|  const char *date = *datep;
  406|  17.3k|  enum assume dignext = *dignextp;
  407|       |
  408|  17.3k|  if((w->sec == -1) && match_time(date, w, &end)) {
  ------------------
  |  Branch (408:6): [True: 15.2k, False: 2.03k]
  |  Branch (408:24): [True: 2.54k, False: 12.7k]
  ------------------
  409|       |    /* time stamp */
  410|  2.54k|    date = end;
  411|  2.54k|  }
  412|  14.7k|  else {
  413|  14.7k|    bool found = FALSE;
  ------------------
  |  | 1056|  14.7k|#define FALSE false
  ------------------
  414|  14.7k|    curl_off_t lval;
  415|  14.7k|    int num_digits = 0;
  416|  14.7k|    const char *p = *datep;
  417|  14.7k|    if(curlx_str_number(&p, &lval, 99999999))
  ------------------
  |  Branch (417:8): [True: 146, False: 14.6k]
  ------------------
  418|    146|      return PARSEDATE_FAIL;
  ------------------
  |  |   95|    146|#define PARSEDATE_FAIL   (-1)
  ------------------
  419|       |
  420|       |    /* we know num_digits cannot be larger than 8 */
  421|  14.6k|    num_digits = (int)(p - *datep);
  422|  14.6k|    val = (unsigned int)lval;
  423|       |
  424|  14.6k|    if((w->tzoff == -1) &&
  ------------------
  |  Branch (424:8): [True: 11.9k, False: 2.64k]
  ------------------
  425|  11.9k|       (num_digits == 4) &&
  ------------------
  |  Branch (425:8): [True: 1.66k, False: 10.3k]
  ------------------
  426|  1.66k|       (val <= 1400) &&
  ------------------
  |  Branch (426:8): [True: 1.23k, False: 436]
  ------------------
  427|  1.23k|       (indate < date) &&
  ------------------
  |  Branch (427:8): [True: 974, False: 256]
  ------------------
  428|    974|       (date[-1] == '+' || date[-1] == '-')) {
  ------------------
  |  Branch (428:9): [True: 268, False: 706]
  |  Branch (428:28): [True: 447, False: 259]
  ------------------
  429|       |      /* four digits and a value less than or equal to 1400 (to take into
  430|       |         account all sorts of funny time zone diffs) and it is preceded
  431|       |         with a plus or minus. This is a time zone indication. 1400 is
  432|       |         picked since +1300 is frequently used and +1400 is mentioned as
  433|       |         an edge number in the document "ISO C 200X Proposal: Timezone
  434|       |         Functions" at http://david.tribble.com/text/c0xtimezone.html If
  435|       |         anyone has a more authoritative source for the exact maximum time
  436|       |         zone offsets, please speak up! */
  437|    715|      found = TRUE;
  ------------------
  |  | 1053|    715|#define TRUE true
  ------------------
  438|    715|      w->tzoff = ((val / 100 * 60) + (val % 100)) * 60;
  439|       |
  440|       |      /* the + and - prefix indicates the local time compared to GMT,
  441|       |         this we need their reversed math to get what we want */
  442|    715|      w->tzoff = date[-1] == '+' ? -w->tzoff : w->tzoff;
  ------------------
  |  Branch (442:18): [True: 268, False: 447]
  ------------------
  443|    715|    }
  444|       |
  445|  13.8k|    else if((num_digits == 8) && (w->year == -1) &&
  ------------------
  |  Branch (445:13): [True: 1.04k, False: 12.8k]
  |  Branch (445:34): [True: 895, False: 149]
  ------------------
  446|    895|            (w->mon == -1) && (w->mday == -1)) {
  ------------------
  |  Branch (446:13): [True: 797, False: 98]
  |  Branch (446:31): [True: 585, False: 212]
  ------------------
  447|       |      /* 8 digits, no year, month or day yet. This is YYYYMMDD */
  448|    585|      found = TRUE;
  ------------------
  |  | 1053|    585|#define TRUE true
  ------------------
  449|    585|      w->year = val / 10000;
  450|    585|      w->mon = ((val % 10000) / 100) - 1; /* month is 0 - 11 */
  451|    585|      w->mday = val % 100;
  452|    585|    }
  453|       |
  454|  14.6k|    if(!found && (dignext == DATE_MDAY) && (w->mday == -1)) {
  ------------------
  |  Branch (454:8): [True: 13.3k, False: 1.30k]
  |  Branch (454:18): [True: 8.69k, False: 4.61k]
  |  Branch (454:44): [True: 8.58k, False: 114]
  ------------------
  455|  8.58k|      if((val > 0) && (val < 32)) {
  ------------------
  |  Branch (455:10): [True: 7.17k, False: 1.40k]
  |  Branch (455:23): [True: 5.60k, False: 1.57k]
  ------------------
  456|  5.60k|        w->mday = val;
  457|  5.60k|        found = TRUE;
  ------------------
  |  | 1053|  5.60k|#define TRUE true
  ------------------
  458|  5.60k|      }
  459|  8.58k|      dignext = DATE_YEAR;
  460|  8.58k|    }
  461|       |
  462|  14.6k|    if(!found && (dignext == DATE_YEAR) && (w->year == -1)) {
  ------------------
  |  Branch (462:8): [True: 7.71k, False: 6.90k]
  |  Branch (462:18): [True: 7.59k, False: 114]
  |  Branch (462:44): [True: 5.71k, False: 1.88k]
  ------------------
  463|  5.71k|      w->year = val;
  464|  5.71k|      found = TRUE;
  ------------------
  |  | 1053|  5.71k|#define TRUE true
  ------------------
  465|  5.71k|      if(w->year < 100) {
  ------------------
  |  Branch (465:10): [True: 3.97k, False: 1.73k]
  ------------------
  466|  3.97k|        if(w->year > 70)
  ------------------
  |  Branch (466:12): [True: 525, False: 3.44k]
  ------------------
  467|    525|          w->year += 1900;
  468|  3.44k|        else
  469|  3.44k|          w->year += 2000;
  470|  3.97k|      }
  471|  5.71k|      if(w->mday == -1)
  ------------------
  |  Branch (471:10): [True: 2.49k, False: 3.22k]
  ------------------
  472|  2.49k|        dignext = DATE_MDAY;
  473|  5.71k|    }
  474|       |
  475|  14.6k|    if(!found)
  ------------------
  |  Branch (475:8): [True: 2.00k, False: 12.6k]
  ------------------
  476|  2.00k|      return PARSEDATE_FAIL;
  ------------------
  |  |   95|  2.00k|#define PARSEDATE_FAIL   (-1)
  ------------------
  477|       |
  478|  12.6k|    date = p;
  479|  12.6k|  }
  480|  15.1k|  *datep = date;
  481|  15.1k|  *dignextp = dignext;
  482|  15.1k|  return PARSEDATE_OK;
  ------------------
  |  |   94|  15.1k|#define PARSEDATE_OK     0
  ------------------
  483|  17.3k|}
parsedate.c:match_time:
  313|  15.2k|{
  314|  15.2k|  const char *p;
  315|  15.2k|  int hh, mm, ss = 0;
  316|  15.2k|  hh = oneortwodigit(date, &p);
  317|  15.2k|  if((hh < 24) && (*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   42|  4.48k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 4.01k, False: 462]
  |  |  |  Branch (42:38): [True: 3.58k, False: 434]
  |  |  ------------------
  ------------------
  |  Branch (317:6): [True: 12.1k, False: 3.07k]
  |  Branch (317:19): [True: 4.48k, False: 7.71k]
  ------------------
  318|  3.58k|    mm = oneortwodigit(&p[1], &p);
  319|  3.58k|    if(mm < 60) {
  ------------------
  |  Branch (319:8): [True: 2.99k, False: 591]
  ------------------
  320|  2.99k|      if((*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   42|  1.91k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 1.49k, False: 421]
  |  |  |  Branch (42:38): [True: 1.09k, False: 395]
  |  |  ------------------
  ------------------
  |  Branch (320:10): [True: 1.91k, False: 1.08k]
  ------------------
  321|  1.09k|        ss = oneortwodigit(&p[1], &p);
  322|  1.09k|        if(ss <= 60) {
  ------------------
  |  Branch (322:12): [True: 646, False: 450]
  ------------------
  323|       |          /* valid HH:MM:SS */
  324|    646|          goto match;
  325|    646|        }
  326|  1.09k|      }
  327|  1.89k|      else {
  328|       |        /* valid HH:MM */
  329|  1.89k|        goto match;
  330|  1.89k|      }
  331|  2.99k|    }
  332|  3.58k|  }
  333|  12.7k|  return FALSE; /* not a time string */
  ------------------
  |  | 1056|  12.7k|#define FALSE false
  ------------------
  334|  2.54k|match:
  335|  2.54k|  w->hour = hh;
  336|  2.54k|  w->min = mm;
  337|  2.54k|  w->sec = ss;
  338|  2.54k|  *endp = (char *)CURL_UNCONST(p);
  ------------------
  |  |  864|  2.54k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  339|       |  return TRUE;
  ------------------
  |  | 1053|  2.54k|#define TRUE true
  ------------------
  340|  15.2k|}
parsedate.c:oneortwodigit:
  301|  19.9k|{
  302|  19.9k|  int num = date[0] - '0';
  303|  19.9k|  if(ISDIGIT(date[1])) {
  ------------------
  |  |   42|  19.9k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 17.2k, False: 2.71k]
  |  |  |  Branch (42:38): [True: 8.11k, False: 9.12k]
  |  |  ------------------
  ------------------
  304|  8.11k|    *endp = &date[2];
  305|  8.11k|    return (num * 10) + (date[1] - '0');
  306|  8.11k|  }
  307|  11.8k|  *endp = &date[1];
  308|  11.8k|  return num;
  309|  19.9k|}
parsedate.c:datecheck:
  486|  4.84k|{
  487|  4.84k|  if(w->sec == -1)
  ------------------
  |  Branch (487:6): [True: 3.48k, False: 1.35k]
  ------------------
  488|  3.48k|    w->sec = w->min = w->hour = 0; /* no time, make it zero */
  489|       |
  490|  4.84k|  if((w->mday == -1) || (w->mon == -1) || (w->year == -1))
  ------------------
  |  Branch (490:6): [True: 1.79k, False: 3.04k]
  |  Branch (490:25): [True: 1.68k, False: 1.36k]
  |  Branch (490:43): [True: 364, False: 999]
  ------------------
  491|       |    /* lacks vital info, fail */
  492|  3.84k|    return PARSEDATE_FAIL;
  ------------------
  |  |   95|  3.84k|#define PARSEDATE_FAIL   (-1)
  ------------------
  493|       |
  494|       |  /* The Gregorian calendar was introduced 1582 */
  495|    999|  else if(w->year < 1583)
  ------------------
  |  Branch (495:11): [True: 380, False: 619]
  ------------------
  496|    380|    return PARSEDATE_FAIL;
  ------------------
  |  |   95|    380|#define PARSEDATE_FAIL   (-1)
  ------------------
  497|       |
  498|    619|  else if((w->mday > 31) || (w->mon > 11) || (w->hour > 23) ||
  ------------------
  |  Branch (498:11): [True: 221, False: 398]
  |  Branch (498:29): [True: 88, False: 310]
  |  Branch (498:46): [True: 0, False: 310]
  ------------------
  499|    310|          (w->min > 59) || (w->sec > 60))
  ------------------
  |  Branch (499:11): [True: 0, False: 310]
  |  Branch (499:28): [True: 0, False: 310]
  ------------------
  500|    309|    return PARSEDATE_FAIL; /* clearly an illegal date */
  ------------------
  |  |   95|    309|#define PARSEDATE_FAIL   (-1)
  ------------------
  501|       |
  502|    310|  return PARSEDATE_OK;
  ------------------
  |  |   94|    310|#define PARSEDATE_OK     0
  ------------------
  503|  4.84k|}
parsedate.c:time2epoch:
  285|    310|{
  286|    310|  static const int cumulative_days[12] = {
  287|    310|    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
  288|    310|  };
  289|    310|  int y = w->year - (w->mon <= 1);
  290|    310|  int leap_days = (y / 4) - (y / 100) + (y / 400) - LEAP_DAYS_BEFORE_1969;
  ------------------
  |  |  278|    310|#define LEAP_DAYS_BEFORE_1969 477
  ------------------
  291|    310|  curl_off_t days = (curl_off_t)(w->year - 1970) * 365 + leap_days +
  292|    310|    cumulative_days[w->mon] + w->mday - 1;
  293|       |
  294|    310|  return (((days * 24 + w->hour) * 60 + w->min) * 60) + w->sec;
  295|    310|}
parsedate.c:tzadjust:
  506|    310|{
  507|    310|  if(w->tzoff == -1) /* unknown tz means no offset */
  ------------------
  |  Branch (507:6): [True: 241, False: 69]
  ------------------
  508|    241|    w->tzoff = 0;
  509|       |
  510|       |  /* Add the time zone diff between local time zone and GMT. */
  511|    310|  if((w->tzoff > 0) && (*tp > (curl_off_t)(CURL_OFF_T_MAX - w->tzoff)))
  ------------------
  |  |  596|     28|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (511:6): [True: 28, False: 282]
  |  Branch (511:24): [True: 0, False: 28]
  ------------------
  512|      0|    *tp = CURL_OFF_T_MAX;
  ------------------
  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  513|    310|  else
  514|    310|    *tp += w->tzoff;
  515|       |  /* this needs no minimum check since we require a year > 1582 */
  516|    310|}
parsedate.c:mktimet:
  519|    310|{
  520|       |#if SIZEOF_TIME_T < 5
  521|       |  if(seconds > TIME_T_MAX) {
  522|       |    *output = TIME_T_MAX;
  523|       |    return PARSEDATE_LATER;
  524|       |  }
  525|       |  else if(seconds < TIME_T_MIN) {
  526|       |    *output = TIME_T_MIN;
  527|       |    return PARSEDATE_SOONER;
  528|       |  }
  529|       |#elif defined(HAVE_TIME_T_UNSIGNED)
  530|       |  if(seconds < 0) {
  531|       |    *output = 0;
  532|       |    return PARSEDATE_SOONER;
  533|       |  }
  534|       |#endif
  535|    310|  *output = (time_t)seconds;
  536|    310|  return PARSEDATE_OK;
  ------------------
  |  |   94|    310|#define PARSEDATE_OK     0
  ------------------
  537|    310|}

Curl_peer_uds_create:
  270|     34|{
  271|     34|  struct peer_parse pp;
  272|     34|  size_t pathlen = path ? strlen(path) : 0;
  ------------------
  |  Branch (272:20): [True: 34, False: 0]
  ------------------
  273|     34|  CURLcode result = CURLE_OK;
  274|       |
  275|     34|  Curl_peer_unlink(ppeer);
  276|     34|  memset(&pp, 0, sizeof(pp));
  277|     34|  if(!scheme)
  ------------------
  |  Branch (277:6): [True: 0, False: 34]
  ------------------
  278|      0|    return CURLE_FAILED_INIT;
  279|     34|  if(!pathlen)
  ------------------
  |  Branch (279:6): [True: 1, False: 33]
  ------------------
  280|      1|    return CURLE_FAILED_INIT;
  281|       |
  282|     33|  pp.scheme = scheme;
  283|     33|  pp.host_user.str = pp.host.str = path;
  284|     33|  pp.host_user.len = pp.host.len = pathlen;
  285|     33|  pp.unix_socket = TRUE;
  ------------------
  |  | 1053|     33|#define TRUE true
  ------------------
  286|     33|  pp.abstract_uds = abstract_unix_socket;
  287|       |
  288|     33|  result = peer_create(&pp, ppeer);
  289|     33|  peer_parse_clear(&pp);
  290|     33|  return result;
  291|     34|}
Curl_peer_link:
  295|  79.1k|{
  296|  79.1k|  if(*pdest != src) {
  ------------------
  |  Branch (296:6): [True: 71.7k, False: 7.45k]
  ------------------
  297|  71.7k|    Curl_peer_unlink(pdest);
  298|  71.7k|    *pdest = src;
  299|  71.7k|    if(src) {
  ------------------
  |  Branch (299:8): [True: 71.7k, False: 0]
  ------------------
  300|  71.7k|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1079|  71.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (300:7): [True: 0, False: 71.7k]
  |  Branch (300:7): [True: 71.7k, False: 0]
  ------------------
  301|  71.7k|      src->refcount++;
  302|  71.7k|    }
  303|  71.7k|  }
  304|  79.1k|}
Curl_peer_unlink:
  307|   369k|{
  308|   369k|  if(*ppeer) {
  ------------------
  |  Branch (308:6): [True: 87.9k, False: 281k]
  ------------------
  309|  87.9k|    struct Curl_peer *peer = *ppeer;
  310|       |
  311|  87.9k|    DEBUGASSERT(peer->refcount);
  ------------------
  |  | 1079|  87.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:5): [True: 0, False: 87.9k]
  |  Branch (311:5): [True: 87.9k, False: 0]
  ------------------
  312|  87.9k|    *ppeer = NULL;
  313|  87.9k|    if(peer->refcount)
  ------------------
  |  Branch (313:8): [True: 87.9k, False: 0]
  ------------------
  314|  87.9k|      peer->refcount--;
  315|  87.9k|    if(!peer->refcount) {
  ------------------
  |  Branch (315:8): [True: 16.1k, False: 71.7k]
  ------------------
  316|  16.1k|      curlx_free(peer);
  ------------------
  |  | 1478|  16.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  317|  16.1k|    }
  318|  87.9k|  }
  319|   369k|}
Curl_peer_equal:
  322|  28.0k|{
  323|  28.0k|  return (p1 == p2) ||
  ------------------
  |  Branch (323:10): [True: 21.0k, False: 6.92k]
  ------------------
  324|  6.92k|         (p1 && p2 &&
  ------------------
  |  Branch (324:11): [True: 6.92k, False: 0]
  |  Branch (324:17): [True: 6.25k, False: 661]
  ------------------
  325|  6.25k|          (p1->scheme == p2->scheme) &&
  ------------------
  |  Branch (325:11): [True: 6.16k, False: 93]
  ------------------
  326|  6.16k|          Curl_peer_same_destination(p1, p2));
  ------------------
  |  Branch (326:11): [True: 54, False: 6.11k]
  ------------------
  327|  28.0k|}
Curl_peer_same_destination:
  342|  25.1k|{
  343|  25.1k|  return (p1 == p2) ||
  ------------------
  |  Branch (343:10): [True: 18.1k, False: 7.01k]
  ------------------
  344|  7.01k|         (p1 && p2 &&
  ------------------
  |  Branch (344:11): [True: 7.01k, False: 0]
  |  Branch (344:17): [True: 7.01k, False: 0]
  ------------------
  345|  7.01k|          (p1->port == p2->port) &&
  ------------------
  |  Branch (345:11): [True: 6.38k, False: 628]
  ------------------
  346|  6.38k|          peer_same_hostname(p1, p2) &&
  ------------------
  |  Branch (346:11): [True: 305, False: 6.08k]
  ------------------
  347|    305|          (p1->scopeid == p2->scopeid) &&
  ------------------
  |  Branch (347:11): [True: 305, False: 0]
  ------------------
  348|    305|          (p1->scopeid || curl_strequal(p1->zoneid, p2->zoneid)));
  ------------------
  |  Branch (348:12): [True: 0, False: 305]
  |  Branch (348:27): [True: 305, False: 0]
  ------------------
  349|  25.1k|}
Curl_peer_from_url:
  355|  7.55k|{
  356|  7.55k|  struct peer_parse pp;
  357|  7.55k|  char *zoneid = NULL, *scheme = NULL, *hostname = NULL;
  358|  7.55k|  CURLUcode uc;
  359|  7.55k|  CURLcode result;
  360|       |
  361|  7.55k|  Curl_peer_unlink(ppeer);
  362|  7.55k|  memset(&pp, 0, sizeof(pp));
  363|       |
  364|  7.55k|  uc = curl_url_get(uh, CURLUPART_SCHEME, &scheme, 0);
  365|  7.55k|  if(uc)
  ------------------
  |  Branch (365:6): [True: 0, False: 7.55k]
  ------------------
  366|      0|    return Curl_uc_to_curlcode(uc);
  367|  7.55k|  pp.scheme = Curl_get_scheme(scheme);
  368|  7.55k|  if(!pp.scheme) {
  ------------------
  |  Branch (368:6): [True: 46, False: 7.50k]
  ------------------
  369|     46|    failf(data, "Protocol \"%s\" not supported%s", scheme,
  ------------------
  |  |   62|     46|#define failf Curl_failf
  ------------------
  370|     46|          data->state.this_is_a_follow ? " (in redirect)" : "");
  ------------------
  |  Branch (370:11): [True: 0, False: 46]
  ------------------
  371|     46|    result = CURLE_UNSUPPORTED_PROTOCOL;
  372|     46|    goto out;
  373|     46|  }
  374|       |
  375|  7.50k|  uc = curl_url_get(uh, CURLUPART_HOST, &hostname, 0);
  376|  7.50k|  if(uc) {
  ------------------
  |  Branch (376:6): [True: 58, False: 7.44k]
  ------------------
  377|     58|    if((uc == CURLUE_NO_HOST) && (pp.scheme->flags & PROTOPT_NONETWORK))
  ------------------
  |  |  214|     58|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (377:8): [True: 58, False: 0]
  |  Branch (377:34): [True: 58, False: 0]
  ------------------
  378|     58|      ; /* acceptable */
  379|      0|    else {
  380|      0|      result = CURLE_OUT_OF_MEMORY;
  381|      0|      goto out;
  382|      0|    }
  383|     58|  }
  384|  7.44k|  else if(strlen(hostname) > MAX_URL_LEN) {
  ------------------
  |  |   29|  7.44k|#define MAX_URL_LEN 0xffff
  ------------------
  |  Branch (384:11): [True: 1, False: 7.44k]
  ------------------
  385|      1|    failf(data, "Too long hostname (maximum is %d)", MAX_URL_LEN);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
                  failf(data, "Too long hostname (maximum is %d)", MAX_URL_LEN);
  ------------------
  |  |   29|      1|#define MAX_URL_LEN 0xffff
  ------------------
  386|      1|    result = CURLE_URL_MALFORMAT;
  387|      1|    goto out;
  388|      1|  }
  389|       |
  390|  7.50k|  pp.host_user.str = hostname ? hostname : "";
  ------------------
  |  Branch (390:22): [True: 7.44k, False: 58]
  ------------------
  391|  7.50k|  pp.host_user.len = strlen(pp.host_user.str);
  392|  7.50k|  if(pp.host_user.len) {
  ------------------
  |  Branch (392:6): [True: 7.44k, False: 58]
  ------------------
  393|  7.44k|    result = peer_parse_host(data, &pp, FALSE);
  ------------------
  |  | 1056|  7.44k|#define FALSE false
  ------------------
  394|  7.44k|    if(result)
  ------------------
  |  Branch (394:8): [True: 118, False: 7.32k]
  ------------------
  395|    118|      goto out;
  396|  7.44k|  }
  397|     58|  else
  398|     58|    pp.host = pp.host_user;
  399|       |
  400|  7.38k|  if(port_override) {
  ------------------
  |  Branch (400:6): [True: 16, False: 7.37k]
  ------------------
  401|       |    /* if set, we use this instead of the port possibly given in the URL */
  402|     16|    char portbuf[16];
  403|     16|    curl_msnprintf(portbuf, sizeof(portbuf), "%d", port_override);
  404|     16|    uc = curl_url_set(uh, CURLUPART_PORT, portbuf, 0);
  405|     16|    if(uc) {
  ------------------
  |  Branch (405:8): [True: 0, False: 16]
  ------------------
  406|      0|      result = CURLE_OUT_OF_MEMORY;
  407|      0|      goto out;
  408|      0|    }
  409|     16|    else
  410|     16|      pp.port = port_override;
  411|     16|  }
  412|  7.37k|  else {
  413|  7.37k|    uc = Curl_url_get_port(uh, &pp.port);
  414|  7.37k|    if(uc) {
  ------------------
  |  Branch (414:8): [True: 58, False: 7.31k]
  ------------------
  415|     58|      if(uc == CURLUE_OUT_OF_MEMORY) {
  ------------------
  |  Branch (415:10): [True: 0, False: 58]
  ------------------
  416|      0|        result = CURLE_OUT_OF_MEMORY;
  417|      0|        goto out;
  418|      0|      }
  419|     58|      else if(!(pp.scheme->flags & PROTOPT_NONETWORK)) {
  ------------------
  |  |  214|     58|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (419:15): [True: 0, False: 58]
  ------------------
  420|      0|        result = CURLE_URL_MALFORMAT;
  421|      0|        goto out;
  422|      0|      }
  423|       |      /* no port ok when not a network scheme */
  424|     58|    }
  425|  7.37k|  }
  426|       |
  427|  7.38k|  if(scopeid_override)
  ------------------
  |  Branch (427:6): [True: 152, False: 7.23k]
  ------------------
  428|       |    /* Override any scope id from an URL zone. */
  429|    152|    pp.scopeid = scopeid_override;
  430|  7.23k|  else {
  431|  7.23k|    if(curl_url_get(uh, CURLUPART_ZONEID, &zoneid, 0) ==
  ------------------
  |  Branch (431:8): [True: 0, False: 7.23k]
  ------------------
  432|  7.23k|       CURLUE_OUT_OF_MEMORY) {
  433|      0|      result = CURLE_OUT_OF_MEMORY;
  434|      0|      goto out;
  435|      0|    }
  436|  7.23k|    if(zoneid) {
  ------------------
  |  Branch (436:8): [True: 14, False: 7.22k]
  ------------------
  437|     14|      pp.zoneid.str = zoneid;
  438|     14|      pp.zoneid.len = strlen(zoneid);
  439|     14|    }
  440|  7.23k|  }
  441|       |
  442|  7.38k|  result = peer_create(&pp, ppeer);
  443|  7.38k|  if(result)
  ------------------
  |  Branch (443:6): [True: 0, False: 7.38k]
  ------------------
  444|      0|    failf(data, "Error %d creating peer for %s:%u",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  445|      0|          (int)result, pp.host_user.str, pp.port);
  446|       |
  447|  7.55k|out:
  448|  7.55k|  peer_parse_clear(&pp);
  449|  7.55k|  curlx_free(scheme);
  ------------------
  |  | 1478|  7.55k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  450|  7.55k|  curlx_free(hostname);
  ------------------
  |  | 1478|  7.55k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  451|  7.55k|  curlx_free(zoneid);
  ------------------
  |  | 1478|  7.55k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  452|  7.55k|  return result;
  453|  7.38k|}
Curl_peer_from_connect_to:
  461|  5.92k|{
  462|  5.92k|  struct peer_parse pp;
  463|  5.92k|  const char *portstr = NULL;
  464|  5.92k|  CURLcode result;
  465|       |
  466|  5.92k|  Curl_peer_unlink(ppeer);
  467|  5.92k|  memset(&pp, 0, sizeof(pp));
  468|  5.92k|  if(!connect_to || !*connect_to)
  ------------------
  |  Branch (468:6): [True: 0, False: 5.92k]
  |  Branch (468:21): [True: 0, False: 5.92k]
  ------------------
  469|      0|    return CURLE_FAILED_INIT;
  470|       |
  471|  5.92k|  pp.scheme = dest->scheme;
  472|       |
  473|       |  /* detect and extract RFC6874-style IPv6-addresses */
  474|  5.92k|  if(connect_to[0] == '[') {
  ------------------
  |  Branch (474:6): [True: 0, False: 5.92k]
  ------------------
  475|      0|    const char *s = strchr(connect_to + 1, ']');
  476|      0|    if(!s) {
  ------------------
  |  Branch (476:8): [True: 0, False: 0]
  ------------------
  477|      0|      failf(data, "Invalid IPv6 address format in '%s'", connect_to);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  478|      0|      result = CURLE_SETOPT_OPTION_SYNTAX;
  479|      0|      goto out;
  480|      0|    }
  481|      0|    portstr = strchr(s, ':');
  482|      0|    pp.host_user.str = connect_to;
  483|      0|    pp.host_user.len = s - pp.host_user.str + 1;
  484|      0|    pp.ipv6 = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  485|      0|  }
  486|  5.92k|  else {
  487|  5.92k|    portstr = strchr(connect_to, ':');
  488|  5.92k|    pp.host_user.str = connect_to;
  489|  5.92k|    pp.host_user.len = portstr ?
  ------------------
  |  Branch (489:24): [True: 5.92k, False: 0]
  ------------------
  490|  5.92k|      (size_t)(portstr - connect_to) : strlen(connect_to);
  491|  5.92k|  }
  492|       |
  493|  5.92k|  if(!pp.host_user.len) { /* no hostname found, only port switch */
  ------------------
  |  Branch (493:6): [True: 0, False: 5.92k]
  ------------------
  494|      0|    pp.host_user.str = dest->user_hostname;
  495|      0|    pp.host_user.len = strlen(dest->user_hostname);
  496|      0|  }
  497|       |
  498|  5.92k|  result = peer_parse_host(data, &pp, FALSE);
  ------------------
  |  | 1056|  5.92k|#define FALSE false
  ------------------
  499|  5.92k|  if(result)
  ------------------
  |  Branch (499:6): [True: 0, False: 5.92k]
  ------------------
  500|      0|    goto out;
  501|       |
  502|  5.92k|  if(portstr && portstr[1]) {
  ------------------
  |  Branch (502:6): [True: 5.92k, False: 0]
  |  Branch (502:17): [True: 0, False: 5.92k]
  ------------------
  503|      0|    const char *p = portstr + 1;
  504|      0|    curl_off_t portparse;
  505|      0|    if(curlx_str_number(&p, &portparse, 0xffff)) {
  ------------------
  |  Branch (505:8): [True: 0, False: 0]
  ------------------
  506|      0|      failf(data, "No valid port number in '%s'", connect_to);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  507|      0|      result = CURLE_SETOPT_OPTION_SYNTAX;
  508|      0|      goto out;
  509|      0|    }
  510|      0|    pp.port = (uint16_t)portparse; /* we know it will fit */
  511|      0|  }
  512|  5.92k|  else
  513|  5.92k|    pp.port = dest->port;
  514|       |
  515|       |#ifndef USE_IPV6
  516|       |  if(pp.ipv6) {
  517|       |    failf(data, "Use of IPv6 in *_CONNECT_TO without IPv6 support built-in");
  518|       |    result = CURLE_NOT_BUILT_IN;
  519|       |    goto out;
  520|       |  }
  521|       |#endif
  522|       |
  523|  5.92k|  result = peer_create(&pp, ppeer);
  524|  5.92k|  CURL_TRC_M(data, "connect-to peer_create2 -> %d", (int)result);
  ------------------
  |  |  148|  5.92k|  do {                                   \
  |  |  149|  5.92k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.92k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  5.92k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  11.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 5.92k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.92k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  11.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  5.92k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.92k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.92k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.92k]
  |  |  ------------------
  ------------------
  525|       |
  526|  5.92k|out:
  527|  5.92k|  CURL_TRC_M(data, "parse connect_to peer: %s -> %d", connect_to, (int)result);
  ------------------
  |  |  148|  5.92k|  do {                                   \
  |  |  149|  5.92k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.92k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  5.92k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  11.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 5.92k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 5.92k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  11.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  5.92k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.92k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.92k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.92k]
  |  |  ------------------
  ------------------
  528|  5.92k|  peer_parse_clear(&pp);
  529|  5.92k|  return result;
  530|  5.92k|}
Curl_scheme_to_proxytype:
  541|    873|{
  542|    873|  if(!scheme)
  ------------------
  |  Branch (542:6): [True: 0, False: 873]
  ------------------
  543|      0|    return CURLE_OK;
  544|       |
  545|    873|  if(curl_strequal("https", scheme)) {
  ------------------
  |  Branch (545:6): [True: 870, False: 3]
  ------------------
  546|    870|    if(*proxytype != CURLPROXY_HTTPS2 && *proxytype != CURLPROXY_HTTPS3)
  ------------------
  |  |  796|  1.74k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
                  if(*proxytype != CURLPROXY_HTTPS2 && *proxytype != CURLPROXY_HTTPS3)
  ------------------
  |  |  805|    868|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (546:8): [True: 868, False: 2]
  |  Branch (546:42): [True: 868, False: 0]
  ------------------
  547|    868|      *proxytype = CURLPROXY_HTTPS;
  ------------------
  |  |  794|    868|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  ------------------
  548|    870|  }
  549|      3|  else if(curl_strequal("socks5h", scheme))
  ------------------
  |  Branch (549:11): [True: 0, False: 3]
  ------------------
  550|      0|    *proxytype = CURLPROXY_SOCKS5_HOSTNAME;
  ------------------
  |  |  802|      0|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  551|      3|  else if(curl_strequal("socks5", scheme))
  ------------------
  |  Branch (551:11): [True: 0, False: 3]
  ------------------
  552|      0|    *proxytype = CURLPROXY_SOCKS5;
  ------------------
  |  |  800|      0|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  553|      3|  else if(curl_strequal("socks4a", scheme))
  ------------------
  |  Branch (553:11): [True: 0, False: 3]
  ------------------
  554|      0|    *proxytype = CURLPROXY_SOCKS4A;
  ------------------
  |  |  801|      0|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  555|      3|  else if(curl_strequal("socks4", scheme) || curl_strequal("socks", scheme))
  ------------------
  |  Branch (555:11): [True: 0, False: 3]
  |  Branch (555:46): [True: 0, False: 3]
  ------------------
  556|      0|    *proxytype = CURLPROXY_SOCKS4;
  ------------------
  |  |  798|      0|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  557|      3|  else if(curl_strequal("http", scheme)) {
  ------------------
  |  Branch (557:11): [True: 2, False: 1]
  ------------------
  558|      2|    if(*proxytype != CURLPROXY_HTTP_1_0)
  ------------------
  |  |  792|      2|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (558:8): [True: 2, False: 0]
  ------------------
  559|      2|      *proxytype = CURLPROXY_HTTP;
  ------------------
  |  |  790|      2|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  560|      2|  }
  561|      1|  else {
  562|       |    /* Any other xxx:// reject! */
  563|      1|    failf(data, "Unsupported proxy scheme for \'%s\'", url);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  564|      1|    return CURLE_COULDNT_CONNECT;
  565|      1|  }
  566|    872|  return CURLE_OK;
  567|    873|}
Curl_peer_from_proxy_url:
  575|  2.84k|{
  576|  2.84k|  struct peer_parse pp;
  577|  2.84k|  char *scheme = NULL;
  578|  2.84k|  char *portptr = NULL;
  579|  2.84k|#ifdef USE_UNIX_SOCKETS
  580|  2.84k|  bool is_socks = FALSE;
  ------------------
  |  | 1056|  2.84k|#define FALSE false
  ------------------
  581|  2.84k|#endif
  582|  2.84k|  CURLUcode uc;
  583|  2.84k|  CURLcode result = CURLE_OK;
  584|       |
  585|  2.84k|  Curl_peer_unlink(ppeer);
  586|  2.84k|  memset(&pp, 0, sizeof(pp));
  587|  2.84k|  pp.port = CURL_DEFAULT_PROXY_PORT;
  ------------------
  |  |   70|  2.84k|#define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */
  ------------------
  588|  2.84k|  uc = curl_url_get(uh, CURLUPART_SCHEME, &scheme,
  589|  2.84k|                    CURLU_NON_SUPPORT_SCHEME | CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |   91|  2.84k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
                                  CURLU_NON_SUPPORT_SCHEME | CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  106|  2.84k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  590|  2.84k|  if(uc) {
  ------------------
  |  Branch (590:6): [True: 2.40k, False: 436]
  ------------------
  591|  2.40k|    if(uc == CURLUE_OUT_OF_MEMORY) {
  ------------------
  |  Branch (591:8): [True: 0, False: 2.40k]
  ------------------
  592|      0|      result = CURLE_OUT_OF_MEMORY;
  593|      0|      goto out;
  594|      0|    }
  595|       |    /* URL came without scheme, the passed `proxytype` determines it */
  596|  2.40k|    switch(proxytype) {
  597|  1.85k|    case CURLPROXY_HTTP:
  ------------------
  |  |  790|  1.85k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  |  Branch (597:5): [True: 1.85k, False: 551]
  ------------------
  598|  1.85k|    case CURLPROXY_HTTP_1_0:
  ------------------
  |  |  792|  1.85k|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (598:5): [True: 1, False: 2.40k]
  ------------------
  599|  1.85k|      pp.scheme = &Curl_scheme_http;
  600|  1.85k|      break;
  601|      3|    case CURLPROXY_HTTPS:
  ------------------
  |  |  794|      3|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  ------------------
  |  Branch (601:5): [True: 3, False: 2.40k]
  ------------------
  602|      5|    case CURLPROXY_HTTPS2:
  ------------------
  |  |  796|      5|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (602:5): [True: 2, False: 2.40k]
  ------------------
  603|      5|    case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|      5|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (603:5): [True: 0, False: 2.40k]
  ------------------
  604|      5|      pp.scheme = &Curl_scheme_https;
  605|      5|      break;
  606|    498|    case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    498|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (606:5): [True: 498, False: 1.90k]
  ------------------
  607|    498|      pp.scheme = &Curl_scheme_socks4;
  608|    498|      break;
  609|      5|    case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|      5|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (609:5): [True: 5, False: 2.39k]
  ------------------
  610|      5|      pp.scheme = &Curl_scheme_socks4a;
  611|      5|      break;
  612|     38|    case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     38|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (612:5): [True: 38, False: 2.36k]
  ------------------
  613|     38|      pp.scheme = &Curl_scheme_socks5;
  614|     38|      break;
  615|      4|    case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|      4|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (615:5): [True: 4, False: 2.40k]
  ------------------
  616|      4|      pp.scheme = &Curl_scheme_socks5h;
  617|      4|      break;
  618|      0|    default:
  ------------------
  |  Branch (618:5): [True: 0, False: 2.40k]
  ------------------
  619|      0|      failf(data, "Unsupported proxy type %u for \'%s\'", proxytype, url);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  620|      0|      result = CURLE_COULDNT_RESOLVE_PROXY;
  621|      0|      goto out;
  622|  2.40k|    }
  623|  2.40k|  }
  624|    436|  else {
  625|    436|    pp.scheme = Curl_get_scheme(scheme);
  626|    436|    result = Curl_scheme_to_proxytype(data, scheme, &proxytype, url);
  627|    436|    if(result)
  ------------------
  |  Branch (627:8): [True: 0, False: 436]
  ------------------
  628|      0|      goto out;
  629|    436|  }
  630|  2.84k|  DEBUGASSERT(pp.scheme);
  ------------------
  |  | 1079|  2.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (630:3): [True: 0, False: 2.84k]
  |  Branch (630:3): [True: 2.84k, False: 0]
  ------------------
  631|       |
  632|  2.84k|  if(CURL_PROXY_IS_HTTPS(proxytype) &&
  ------------------
  |  |   42|  5.68k|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  794|  2.84k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 437, False: 2.40k]
  |  |  ------------------
  |  |   43|  2.84k|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  796|  2.40k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (43:4): [True: 3, False: 2.40k]
  |  |  ------------------
  |  |   44|  5.68k|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  805|  2.40k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (44:4): [True: 0, False: 2.40k]
  |  |  ------------------
  ------------------
  633|    440|     !Curl_ssl_supports(data, SSLSUPP_HTTPS_PROXY)) {
  ------------------
  |  |   39|    440|#define SSLSUPP_HTTPS_PROXY  (1 << 4) /* supports access via HTTPS proxies */
  ------------------
  |  Branch (633:6): [True: 0, False: 440]
  ------------------
  634|      0|    failf(data, "Unsupported proxy \'%s\', libcurl is built without the "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  635|      0|          "HTTPS-proxy support.", url);
  636|      0|    result = CURLE_NOT_BUILT_IN;
  637|      0|    goto out;
  638|      0|  }
  639|       |
  640|  2.84k|  switch(pp.scheme->family) {
  641|    545|  case CURLPROTO_SOCKS:
  ------------------
  |  |   66|    545|#define CURLPROTO_SOCKS  (1LL << 33)
  ------------------
  |  Branch (641:3): [True: 545, False: 2.29k]
  ------------------
  642|    545|#ifdef USE_UNIX_SOCKETS
  643|    545|    is_socks = TRUE;
  ------------------
  |  | 1053|    545|#define TRUE true
  ------------------
  644|    545|#endif
  645|    545|    break;
  646|  2.29k|  case CURLPROTO_HTTP:
  ------------------
  |  | 1086|  2.29k|#define CURLPROTO_HTTP    (1L << 0)
  ------------------
  |  Branch (646:3): [True: 2.29k, False: 545]
  ------------------
  647|  2.29k|    break;
  648|      0|  default:
  ------------------
  |  Branch (648:3): [True: 0, False: 2.84k]
  ------------------
  649|      0|    failf(data, "Unsupported proxy protocol for \'%s\'", url);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  650|      0|    result = CURLE_COULDNT_CONNECT;
  651|      0|    goto out;
  652|  2.84k|  }
  653|       |
  654|  2.84k|  uc = curl_url_get(uh, CURLUPART_PORT, &portptr, CURLU_NO_DEFAULT_PORT);
  ------------------
  |  |   86|  2.84k|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  655|  2.84k|  if(uc == CURLUE_OUT_OF_MEMORY) {
  ------------------
  |  Branch (655:6): [True: 0, False: 2.84k]
  ------------------
  656|      0|    result = CURLE_OUT_OF_MEMORY;
  657|      0|    goto out;
  658|      0|  }
  659|  2.84k|  if(portptr) {
  ------------------
  |  Branch (659:6): [True: 24, False: 2.81k]
  ------------------
  660|     24|    curl_off_t num;
  661|     24|    const char *p = portptr;
  662|     24|    if(!curlx_str_number(&p, &num, UINT16_MAX))
  ------------------
  |  Branch (662:8): [True: 24, False: 0]
  ------------------
  663|     24|      pp.port = (uint16_t)num;
  664|       |    /* Should we not error out when the port number is invalid? */
  665|     24|    curlx_free(portptr);
  ------------------
  |  | 1478|     24|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  666|     24|  }
  667|  2.81k|  else {
  668|       |    /* No port in URL, take the set one or the scheme's default */
  669|  2.81k|    if(data->set.proxyport)
  ------------------
  |  Branch (669:8): [True: 10, False: 2.80k]
  ------------------
  670|     10|      pp.port = data->set.proxyport;
  671|  2.80k|    else
  672|  2.80k|      pp.port = pp.scheme->defport;
  673|  2.81k|  }
  674|       |
  675|       |  /* now, clone the proxy hostname */
  676|  2.84k|  uc = curl_url_get(uh, CURLUPART_HOST, &pp.tmp_host_user, CURLU_URLDECODE);
  ------------------
  |  |   94|  2.84k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  677|  2.84k|  if(uc) {
  ------------------
  |  Branch (677:6): [True: 0, False: 2.84k]
  ------------------
  678|      0|    result = CURLE_OUT_OF_MEMORY;
  679|      0|    goto out;
  680|      0|  }
  681|  2.84k|  pp.host_user.str = pp.tmp_host_user;
  682|  2.84k|  pp.host_user.len = strlen(pp.tmp_host_user);
  683|       |
  684|  2.84k|#ifdef USE_UNIX_SOCKETS
  685|  2.84k|  if(is_socks && curl_strequal(UNIX_SOCKET_PREFIX, pp.tmp_host_user)) {
  ------------------
  |  |  535|    545|#define UNIX_SOCKET_PREFIX "localhost"
  ------------------
  |  Branch (685:6): [True: 545, False: 2.29k]
  |  Branch (685:18): [True: 78, False: 467]
  ------------------
  686|     78|    uc = curl_url_get(uh, CURLUPART_PATH, &pp.tmp_host, CURLU_URLDECODE);
  ------------------
  |  |   94|     78|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  687|     78|    if(uc) {
  ------------------
  |  Branch (687:8): [True: 1, False: 77]
  ------------------
  688|      1|      result = CURLE_OUT_OF_MEMORY;
  689|      1|      goto out;
  690|      1|    }
  691|       |    /* path will be "/", if no path was found */
  692|     77|    if(strcmp("/", pp.tmp_host)) {
  ------------------
  |  Branch (692:8): [True: 2, False: 75]
  ------------------
  693|      2|      pp.host.str = pp.tmp_host;
  694|      2|      pp.host.len = strlen(pp.tmp_host);
  695|      2|      pp.unix_socket = TRUE;
  ------------------
  |  | 1053|      2|#define TRUE true
  ------------------
  696|      2|    }
  697|     75|    else {
  698|     75|      pp.host = pp.host_user;
  699|     75|    }
  700|     77|  }
  701|  2.83k|#endif /* USE_UNIX_SOCKETS */
  702|       |
  703|  2.83k|  if(!pp.host.len) {
  ------------------
  |  Branch (703:6): [True: 2.76k, False: 77]
  ------------------
  704|  2.76k|    result = peer_parse_host(data, &pp, FALSE);
  ------------------
  |  | 1056|  2.76k|#define FALSE false
  ------------------
  705|  2.76k|    if(result)
  ------------------
  |  Branch (705:8): [True: 5, False: 2.75k]
  ------------------
  706|      5|      goto out;
  707|  2.76k|  }
  708|       |
  709|  2.83k|  uc = curl_url_get(uh, CURLUPART_ZONEID, &pp.tmp_zoneid, 0);
  710|  2.83k|  if(uc == CURLUE_OUT_OF_MEMORY) {
  ------------------
  |  Branch (710:6): [True: 0, False: 2.83k]
  ------------------
  711|      0|    result = CURLE_OUT_OF_MEMORY;
  712|      0|    goto out;
  713|      0|  }
  714|  2.83k|  if(pp.tmp_zoneid) {
  ------------------
  |  Branch (714:6): [True: 13, False: 2.82k]
  ------------------
  715|     13|    pp.zoneid.str = pp.tmp_zoneid;
  716|     13|    pp.zoneid.len = strlen(pp.tmp_zoneid);
  717|     13|  }
  718|       |
  719|  2.83k|  *pproxytype = proxytype;
  720|  2.83k|  result = peer_create(&pp, ppeer);
  721|       |
  722|  2.84k|out:
  723|  2.84k|  peer_parse_clear(&pp);
  724|  2.84k|  curlx_free(scheme);
  ------------------
  |  | 1478|  2.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  725|  2.84k|#ifdef DEBUGBUILD
  726|  2.84k|  if(!result)
  ------------------
  |  Branch (726:6): [True: 2.83k, False: 6]
  ------------------
  727|  2.84k|    DEBUGASSERT(*ppeer);
  ------------------
  |  | 1079|  2.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (727:5): [True: 0, False: 2.83k]
  |  Branch (727:5): [True: 2.83k, False: 0]
  ------------------
  728|  2.84k|#endif
  729|  2.84k|  return result;
  730|  2.84k|}
peer.c:peer_parse_host:
  186|  16.1k|{
  187|  16.1k|  if(!pp || !pp->host_user.str || !pp->host_user.len)
  ------------------
  |  Branch (187:6): [True: 0, False: 16.1k]
  |  Branch (187:13): [True: 0, False: 16.1k]
  |  Branch (187:35): [True: 0, False: 16.1k]
  ------------------
  188|      0|    return CURLE_FAILED_INIT;
  189|       |
  190|  16.1k|  if(pp->host_user.str[0] == '[') {
  ------------------
  |  Branch (190:6): [True: 214, False: 15.9k]
  ------------------
  191|    214|    const char *s = pp->host_user.str + 1;
  192|    214|    struct Curl_str tmp;
  193|    214|    if(curlx_str_until(&s, &tmp, pp->host_user.len - 1, ']'))
  ------------------
  |  Branch (193:8): [True: 0, False: 214]
  ------------------
  194|      0|      return CURLE_URL_MALFORMAT;
  195|       |
  196|    214|    if(!Curl_looks_like_ipv6(tmp.str, tmp.len, TRUE,
  ------------------
  |  | 1053|    214|#define TRUE true
  ------------------
  |  Branch (196:8): [True: 0, False: 214]
  ------------------
  197|    214|                             &pp->host, &pp->zoneid)) {
  198|      0|      failf(data, "Invalid IPv6 address format in '%.*s'",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  199|      0|            (int)pp->host_user.len, pp->host_user.str);
  200|      0|      return CURLE_URL_MALFORMAT;
  201|      0|    }
  202|    214|    pp->ipv6 = TRUE;
  ------------------
  |  | 1053|    214|#define TRUE true
  ------------------
  203|    214|  }
  204|  15.9k|  else {
  205|  15.9k|#ifdef USE_IDN
  206|  15.9k|    if(!Curl_is_ASCII_str(&pp->host_user)) {
  ------------------
  |  Branch (206:8): [True: 123, False: 15.7k]
  ------------------
  207|    123|      CURLcode result;
  208|    123|      if(!pp->tmp_host_user) {
  ------------------
  |  Branch (208:10): [True: 118, False: 5]
  ------------------
  209|       |        /* need a null-terminated string for IDN */
  210|    118|        pp->tmp_host_user = curlx_memdup0(pp->host_user.str,
  211|    118|                                          pp->host_user.len);
  212|    118|        if(!pp->tmp_host_user)
  ------------------
  |  Branch (212:12): [True: 0, False: 118]
  ------------------
  213|      0|          return CURLE_OUT_OF_MEMORY;
  214|    118|      }
  215|    123|      result = Curl_idn_decode(pp->tmp_host_user, &pp->tmp_host);
  216|    123|      if(result)
  ------------------
  |  Branch (216:10): [True: 123, False: 0]
  ------------------
  217|    123|        return result;
  218|      0|      pp->host.str = pp->tmp_host;
  219|      0|      pp->host.len = strlen(pp->host.str);
  220|      0|    }
  221|  15.7k|    else
  222|  15.7k|#endif
  223|  15.7k|    if(scan_for_ipv6 &&
  ------------------
  |  Branch (223:8): [True: 0, False: 15.7k]
  ------------------
  224|      0|       Curl_looks_like_ipv6(pp->host_user.str, pp->host_user.len, TRUE,
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  |  Branch (224:8): [True: 0, False: 0]
  ------------------
  225|      0|                            &pp->host, &pp->zoneid)) {
  226|      0|      if(pp->host_user.len < MAX_IPADR_LEN) {
  ------------------
  |  |   41|      0|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  |  Branch (226:10): [True: 0, False: 0]
  ------------------
  227|      0|        char tmp[MAX_IPADR_LEN];
  228|      0|        memcpy(tmp, pp->host_user.str, pp->host_user.len);
  229|      0|        tmp[pp->host_user.len] = 0;
  230|      0|        pp->ipv6 = !Curl_is_ipv4addr(tmp);
  231|      0|      }
  232|      0|      else
  233|      0|        pp->ipv6 = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  234|      0|    }
  235|  15.7k|    else
  236|  15.7k|      pp->host = pp->host_user;
  237|  15.9k|  }
  238|  16.0k|  return CURLE_OK;
  239|  16.1k|}
peer.c:peer_create:
  105|  16.1k|{
  106|  16.1k|  struct Curl_peer *peer = NULL;
  107|  16.1k|  CURLcode result = CURLE_OK;
  108|  16.1k|  size_t zone_alen = 0, host_alen = 0;
  109|       |
  110|  16.1k|  if(!pp || !pp->scheme)
  ------------------
  |  Branch (110:6): [True: 0, False: 16.1k]
  |  Branch (110:13): [True: 0, False: 16.1k]
  ------------------
  111|      0|    return CURLE_FAILED_INIT;
  112|  16.1k|  if(!pp->host.len && !(pp->scheme->flags & PROTOPT_NONETWORK))
  ------------------
  |  |  214|     58|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (112:6): [True: 58, False: 16.1k]
  |  Branch (112:23): [True: 0, False: 58]
  ------------------
  113|      0|    return CURLE_FAILED_INIT;
  114|       |
  115|  16.1k|  if((pp->host.str != pp->host_user.str) ||
  ------------------
  |  Branch (115:6): [True: 216, False: 15.9k]
  ------------------
  116|  15.9k|     (pp->host.len != pp->host_user.len)) {
  ------------------
  |  Branch (116:6): [True: 0, False: 15.9k]
  ------------------
  117|    216|    host_alen = pp->host.len + 1;
  118|    216|  }
  119|  16.1k|  zone_alen = pp->zoneid.len ? (pp->zoneid.len + 1) : 0;
  ------------------
  |  Branch (119:15): [True: 27, False: 16.1k]
  ------------------
  120|       |
  121|       |  /* null-terminator already part of struct */
  122|  16.1k|  peer = curlx_calloc(1, sizeof(*peer) +
  ------------------
  |  | 1475|  16.1k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  123|  16.1k|                         pp->host_user.len + host_alen + zone_alen);
  124|  16.1k|  if(!peer) {
  ------------------
  |  Branch (124:6): [True: 0, False: 16.1k]
  ------------------
  125|      0|    result = CURLE_OUT_OF_MEMORY;
  126|      0|    goto out;
  127|      0|  }
  128|       |
  129|  16.1k|  peer->refcount = 1;
  130|  16.1k|  peer->scheme = pp->scheme;
  131|  16.1k|  peer->hostname = peer->user_hostname;
  132|  16.1k|  peer->port = pp->port;
  133|  16.1k|  peer->scopeid = pp->scopeid;
  134|  16.1k|  peer->ipv6 = pp->ipv6;
  135|  16.1k|  peer->unix_socket = pp->unix_socket;
  136|  16.1k|  peer->abstract_uds = pp->abstract_uds;
  137|       |
  138|  16.1k|  if(pp->host_user.len)
  ------------------
  |  Branch (138:6): [True: 16.1k, False: 58]
  ------------------
  139|  16.1k|    memcpy(peer->user_hostname, pp->host_user.str, pp->host_user.len);
  140|       |
  141|  16.1k|  if(host_alen) {
  ------------------
  |  Branch (141:6): [True: 216, False: 15.9k]
  ------------------
  142|    216|    peer->hostname = peer->user_hostname + pp->host_user.len + 1;
  143|    216|    memcpy(peer->hostname, pp->host.str, pp->host.len);
  144|    216|  }
  145|       |
  146|  16.1k|  if(zone_alen) {
  ------------------
  |  Branch (146:6): [True: 27, False: 16.1k]
  ------------------
  147|     27|    peer->zoneid = peer->user_hostname + pp->host_user.len + 1 + host_alen;
  148|     27|    memcpy(peer->zoneid, pp->zoneid.str, pp->zoneid.len);
  149|     27|#ifdef USE_IPV6
  150|       |    /* Determine scope_id if not already provided */
  151|     27|    if(!peer->scopeid) {
  ------------------
  |  Branch (151:8): [True: 27, False: 0]
  ------------------
  152|     27|      const char *p = peer->zoneid;
  153|     27|      curl_off_t scope;
  154|     27|      if(!curlx_str_number(&p, &scope, UINT_MAX)) {
  ------------------
  |  Branch (154:10): [True: 5, False: 22]
  ------------------
  155|       |        /* A plain number, use it directly as a scope id. */
  156|      5|        peer->scopeid = (uint32_t)scope;
  157|      5|      }
  158|     22|#ifdef HAVE_IF_NAMETOINDEX
  159|     22|      else {
  160|       |        /* Zone identifier is not numeric */
  161|     22|        unsigned int idx = 0;
  162|     22|        idx = if_nametoindex(peer->zoneid);
  163|     22|        if(idx) {
  ------------------
  |  Branch (163:12): [True: 3, False: 19]
  ------------------
  164|      3|          peer->scopeid = (uint32_t)idx;
  165|      3|        }
  166|     19|        else {
  167|       |          /* Do we want to return an error here? */
  168|     19|        }
  169|     22|      }
  170|     27|#endif /* HAVE_IF_NAMETOINDEX */
  171|     27|    }
  172|     27|#endif /* USE_IPV6 */
  173|     27|  }
  174|       |
  175|  16.1k|out:
  176|  16.1k|  if(!result)
  ------------------
  |  Branch (176:6): [True: 16.1k, False: 0]
  ------------------
  177|  16.1k|    *ppeer = peer;
  178|      0|  else
  179|      0|    Curl_peer_unlink(&peer);
  180|  16.1k|  return result;
  181|  16.1k|}
peer.c:peer_parse_clear:
   96|  16.3k|{
   97|  16.3k|  curlx_free(pp->tmp_host_user);
  ------------------
  |  | 1478|  16.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   98|  16.3k|  curlx_free(pp->tmp_host);
  ------------------
  |  | 1478|  16.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   99|  16.3k|  curlx_free(pp->tmp_zoneid);
  ------------------
  |  | 1478|  16.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  100|  16.3k|  memset(pp, 0, sizeof(*pp));
  101|  16.3k|}
peer.c:peer_same_hostname:
  330|  6.38k|{
  331|       |  /* UNIX domain socket paths must be compared case-sensitive,
  332|       |   * as many filesystem are like that. */
  333|  6.38k|  return (p1->unix_socket == p2->unix_socket) &&
  ------------------
  |  Branch (333:10): [True: 6.38k, False: 1]
  ------------------
  334|  6.38k|         (p1->abstract_uds == p2->abstract_uds) &&
  ------------------
  |  Branch (334:10): [True: 6.38k, False: 0]
  ------------------
  335|  6.38k|         (p1->ipv6 == p2->ipv6) &&
  ------------------
  |  Branch (335:10): [True: 6.29k, False: 94]
  ------------------
  336|  6.29k|         (p1->unix_socket ?
  ------------------
  |  Branch (336:10): [True: 305, False: 5.98k]
  |  Branch (336:11): [True: 0, False: 6.29k]
  ------------------
  337|      0|          !strcmp(p1->hostname, p2->hostname) :
  338|  6.29k|          curl_strequal(p1->hostname, p2->hostname));
  339|  6.38k|}

time2str:
   39|     51|{
   40|     51|  curl_off_t h;
   41|     51|  if(seconds <= 0) {
  ------------------
  |  Branch (41:6): [True: 51, False: 0]
  ------------------
   42|     51|    curlx_strcopy(r, rsize, STRCONST("       "));
  ------------------
  |  | 1301|     51|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|     51|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
   43|     51|    return;
   44|     51|  }
   45|      0|  h = seconds / 3600;
   46|      0|  if(h <= 99) {
  ------------------
  |  Branch (46:6): [True: 0, False: 0]
  ------------------
   47|      0|    curl_off_t m = (seconds - (h * 3600)) / 60;
   48|      0|    if(h <= 9) {
  ------------------
  |  Branch (48:8): [True: 0, False: 0]
  ------------------
   49|      0|      curl_off_t s = (seconds - (h * 3600)) - (m * 60);
   50|      0|      if(h)
  ------------------
  |  Branch (50:10): [True: 0, False: 0]
  ------------------
   51|      0|        curl_msnprintf(r, rsize, "%" FMT_OFF_T ":%02" FMT_OFF_T ":"
   52|      0|                       "%02" FMT_OFF_T, h, m, s);
  ------------------
  |  |  600|      0|#define FMT_OFF_T  CURL_FORMAT_CURL_OFF_T
  |  |  ------------------
  |  |  |  |  341|      0|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  |  |  ------------------
  ------------------
   53|      0|      else
   54|      0|        curl_msnprintf(r, rsize, "  %02" FMT_OFF_T ":%02" FMT_OFF_T, m, s);
  ------------------
  |  |  600|      0|#define FMT_OFF_T  CURL_FORMAT_CURL_OFF_T
  |  |  ------------------
  |  |  |  |  341|      0|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  |  |  ------------------
  ------------------
   55|      0|    }
   56|      0|    else
   57|      0|      curl_msnprintf(r, rsize, "%" FMT_OFF_T "h %02" FMT_OFF_T "m", h, m);
   58|      0|  }
   59|      0|  else {
   60|      0|    curl_off_t d = seconds / 86400;
   61|      0|    h = (seconds - (d * 86400)) / 3600;
   62|      0|    if(d <= 99)
  ------------------
  |  Branch (62:8): [True: 0, False: 0]
  ------------------
   63|      0|      curl_msnprintf(r, rsize, "%2" FMT_OFF_T "d %02" FMT_OFF_T "h", d, h);
   64|      0|    else if(d <= 999)
  ------------------
  |  Branch (64:13): [True: 0, False: 0]
  ------------------
   65|      0|      curl_msnprintf(r, rsize, "%6" FMT_OFF_T "d", d);
   66|      0|    else { /* more than 999 days */
   67|      0|      curl_off_t m = d / 30;
   68|      0|      if(m <= 999)
  ------------------
  |  Branch (68:10): [True: 0, False: 0]
  ------------------
   69|      0|        curl_msnprintf(r, rsize, "%6" FMT_OFF_T "m", m);
   70|      0|      else { /* more than 999 months */
   71|      0|        curl_off_t y = d / 365;
   72|      0|        if(y <= 99999)
  ------------------
  |  Branch (72:12): [True: 0, False: 0]
  ------------------
   73|      0|          curl_msnprintf(r, rsize, "%6" FMT_OFF_T "y", y);
   74|      0|        else
   75|      0|          curlx_strcopy(r, rsize, STRCONST(">99999y"));
  ------------------
  |  | 1301|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1296|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
   76|      0|      }
   77|      0|    }
   78|      0|  }
   79|      0|}
max6out:
   88|    102|{
   89|       |  /* a signed 64-bit value is 8192 petabytes maximum, shown as
   90|       |     8.0E (exabytes)*/
   91|    102|  if(bytes < 100000)
  ------------------
  |  Branch (91:6): [True: 102, False: 0]
  ------------------
   92|    102|    curl_msnprintf(max6, mlen, "%6" CURL_FORMAT_CURL_OFF_T, bytes);
  ------------------
  |  |  341|    102|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  ------------------
   93|      0|  else {
   94|      0|    static const char unit[] = { 'k', 'M', 'G', 'T', 'P', 'E', 0 };
   95|      0|    int k = 0;
   96|      0|    curl_off_t nbytes;
   97|      0|    curl_off_t rest;
   98|      0|    do {
   99|      0|      nbytes = bytes / 1024;
  100|      0|      if(nbytes < 1000)
  ------------------
  |  Branch (100:10): [True: 0, False: 0]
  ------------------
  101|      0|        break;
  102|      0|      bytes = nbytes;
  103|      0|      k++;
  104|      0|      DEBUGASSERT(unit[k]);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (104:7): [True: 0, False: 0]
  |  Branch (104:7): [True: 0, False: 0]
  ------------------
  105|      0|    } while(unit[k]);
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|      0|    rest = bytes % 1024;
  107|      0|    if(nbytes <= 99)
  ------------------
  |  Branch (107:8): [True: 0, False: 0]
  ------------------
  108|       |      /* xx.yyU */
  109|      0|      curl_msnprintf(max6, mlen, "%2" CURL_FORMAT_CURL_OFF_T
  110|      0|                     ".%02" CURL_FORMAT_CURL_OFF_T "%c", nbytes,
  111|      0|                     rest * 100 / 1024, unit[k]);
  112|      0|    else
  113|       |      /* xxx.yU */
  114|      0|      curl_msnprintf(max6, mlen, "%3" CURL_FORMAT_CURL_OFF_T
  115|      0|                     ".%" CURL_FORMAT_CURL_OFF_T "%c", nbytes,
  116|      0|                     rest * 10 / 1024, unit[k]);
  117|      0|  }
  118|    102|  return max6;
  119|    102|}
Curl_pgrs_now:
  172|  1.52M|{
  173|  1.52M|  curlx_pnow(&data->progress.now);
  174|  1.52M|  return &data->progress.now;
  175|  1.52M|}
Curl_pgrsReset:
  205|  6.25k|{
  206|  6.25k|  Curl_pgrsSetUploadCounter(data, 0);
  207|  6.25k|  data->progress.dl.cur_size = 0;
  208|  6.25k|  Curl_pgrsSetUploadSize(data, -1);
  209|  6.25k|  Curl_pgrsSetDownloadSize(data, -1);
  210|  6.25k|  data->progress.speeder_c = 0; /* reset speed records */
  211|  6.25k|  data->progress.deliver = 0;
  212|  6.25k|  pgrs_speedinit(data);
  213|  6.25k|}
Curl_pgrsResetTransferSizes:
  217|  8.36k|{
  218|  8.36k|  Curl_pgrsSetDownloadSize(data, -1);
  219|  8.36k|  Curl_pgrsSetUploadSize(data, -1);
  220|  8.36k|}
Curl_pgrsTimeWas:
  267|  69.0k|{
  268|  69.0k|  timediff_t *delta = NULL;
  269|       |
  270|  69.0k|  switch(timer) {
  271|      0|  default:
  ------------------
  |  Branch (271:3): [True: 0, False: 69.0k]
  ------------------
  272|      0|  case TIMER_NONE:
  ------------------
  |  Branch (272:3): [True: 0, False: 69.0k]
  ------------------
  273|       |    /* mistake filter */
  274|      0|    break;
  275|  8.36k|  case TIMER_STARTOP:
  ------------------
  |  Branch (275:3): [True: 8.36k, False: 60.7k]
  ------------------
  276|       |    /* This is set at the start of a transfer */
  277|  8.36k|    data->progress.t_startop = timestamp;
  278|  8.36k|    data->progress.t_startqueue = timestamp;
  279|  8.36k|    data->progress.t_postqueue = 0;
  280|  8.36k|    break;
  281|  8.36k|  case TIMER_STARTSINGLE:
  ------------------
  |  Branch (281:3): [True: 8.36k, False: 60.7k]
  ------------------
  282|       |    /* This is set at the start of each single transfer */
  283|  8.36k|    data->progress.t_startsingle = timestamp;
  284|  8.36k|    data->progress.is_t_startransfer_set = FALSE;
  ------------------
  |  | 1056|  8.36k|#define FALSE false
  ------------------
  285|  8.36k|    break;
  286|  6.25k|  case TIMER_POSTQUEUE:
  ------------------
  |  Branch (286:3): [True: 6.25k, False: 62.8k]
  ------------------
  287|       |    /* Queue time is accumulative from all involved redirects */
  288|  6.25k|    data->progress.t_postqueue +=
  289|  6.25k|      curlx_ptimediff_us(&timestamp, &data->progress.t_startqueue);
  290|  6.25k|    break;
  291|      0|  case TIMER_STARTACCEPT:
  ------------------
  |  Branch (291:3): [True: 0, False: 69.0k]
  ------------------
  292|      0|    data->progress.t_acceptdata = timestamp;
  293|      0|    break;
  294|  5.65k|  case TIMER_NAMELOOKUP:
  ------------------
  |  Branch (294:3): [True: 5.65k, False: 63.4k]
  ------------------
  295|  5.65k|    delta = &data->progress.t_nslookup;
  296|  5.65k|    break;
  297|  5.21k|  case TIMER_CONNECT:
  ------------------
  |  Branch (297:3): [True: 5.21k, False: 63.8k]
  ------------------
  298|  5.21k|    delta = &data->progress.t_connect;
  299|  5.21k|    break;
  300|      0|  case TIMER_APPCONNECT:
  ------------------
  |  Branch (300:3): [True: 0, False: 69.0k]
  ------------------
  301|      0|    delta = &data->progress.t_appconnect;
  302|      0|    break;
  303|  11.7k|  case TIMER_PRETRANSFER:
  ------------------
  |  Branch (303:3): [True: 11.7k, False: 57.3k]
  ------------------
  304|  11.7k|    delta = &data->progress.t_pretransfer;
  305|  11.7k|    break;
  306|  11.7k|  case TIMER_STARTTRANSFER:
  ------------------
  |  Branch (306:3): [True: 11.7k, False: 57.3k]
  ------------------
  307|       |    /* prevent updating t_starttransfer unless:
  308|       |     *   1. this is the first time we are setting t_starttransfer
  309|       |     *   2. a redirect has occurred since the last time t_starttransfer was set
  310|       |     * This prevents repeated invocations of the function from incorrectly
  311|       |     * changing the t_starttransfer time.
  312|       |     */
  313|  11.7k|    if(data->progress.is_t_startransfer_set) {
  ------------------
  |  Branch (313:8): [True: 0, False: 11.7k]
  ------------------
  314|      0|      CURL_TRC_M(data, "[%s] ignored", pgrs_timer_name(timer));
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  315|      0|      return;
  316|      0|    }
  317|  11.7k|    data->progress.is_t_startransfer_set = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  318|  11.7k|    delta = &data->progress.t_starttransfer;
  319|  11.7k|    break;
  320|  11.7k|  case TIMER_POSTRANSFER:
  ------------------
  |  Branch (320:3): [True: 11.7k, False: 57.3k]
  ------------------
  321|  11.7k|    delta = &data->progress.t_posttransfer;
  322|  11.7k|    break;
  323|      0|  case TIMER_REDIRECT:
  ------------------
  |  Branch (323:3): [True: 0, False: 69.0k]
  ------------------
  324|      0|    data->progress.t_redirect = curlx_ptimediff_us(&timestamp,
  325|      0|                                                   &data->progress.start);
  326|      0|    data->progress.t_startqueue = timestamp;
  327|      0|    break;
  328|  69.0k|  }
  329|  69.0k|  if(delta) {
  ------------------
  |  Branch (329:6): [True: 46.1k, False: 22.9k]
  ------------------
  330|  46.1k|    timediff_t us = curlx_ptimediff_us(&timestamp,
  331|  46.1k|                                       &data->progress.t_startsingle);
  332|  46.1k|    if(us < 1)
  ------------------
  |  Branch (332:8): [True: 7, False: 46.1k]
  ------------------
  333|      7|      us = 1; /* make sure at least one microsecond passed */
  334|  46.1k|    *delta += us;
  335|  46.1k|    CURL_TRC_M(data, "[%s] added %" FMT_TIMEDIFF_T "us",
  ------------------
  |  |  148|  46.1k|  do {                                   \
  |  |  149|  46.1k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  46.1k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  46.1k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  92.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 46.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 46.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  92.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  46.1k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  46.1k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  46.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 46.1k]
  |  |  ------------------
  ------------------
  336|  46.1k|               pgrs_timer_name(timer), us);
  337|  46.1k|  }
  338|  22.9k|  else
  339|  22.9k|    CURL_TRC_M(data, "[%s] set", pgrs_timer_name(timer));
  ------------------
  |  |  148|  22.9k|  do {                                   \
  |  |  149|  22.9k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  22.9k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  22.9k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  45.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 22.9k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 22.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  45.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  22.9k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  22.9k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  22.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 22.9k]
  |  |  ------------------
  ------------------
  340|  69.0k|}
Curl_pgrsTime:
  349|  63.8k|{
  350|  63.8k|  Curl_pgrsTimeWas(data, timer, *Curl_pgrs_now(data));
  351|  63.8k|}
Curl_pgrsStartNow:
  354|  8.36k|{
  355|  8.36k|  struct Progress *p = &data->progress;
  356|       |
  357|  8.36k|  p->speeder_c = 0; /* reset the progress meter display */
  358|  8.36k|  p->start = *Curl_pgrs_now(data);
  359|  8.36k|  p->is_t_startransfer_set = FALSE;
  ------------------
  |  | 1056|  8.36k|#define FALSE false
  ------------------
  360|  8.36k|  p->dl.cur_size = 0;
  361|  8.36k|  p->ul.cur_size = 0;
  362|       |  /* the sizes are unknown at start */
  363|  8.36k|  p->dl_size_known = FALSE;
  ------------------
  |  | 1056|  8.36k|#define FALSE false
  ------------------
  364|       |  p->ul_size_known = FALSE;
  ------------------
  |  | 1056|  8.36k|#define FALSE false
  ------------------
  365|  8.36k|}
Curl_pgrs_deliver_check:
  370|    329|{
  371|    329|  if(data->set.max_filesize &&
  ------------------
  |  Branch (371:6): [True: 189, False: 140]
  ------------------
  372|    189|     ((curl_off_t)delta > data->set.max_filesize - data->progress.deliver)) {
  ------------------
  |  Branch (372:6): [True: 2, False: 187]
  ------------------
  373|      2|    failf(data, "Would have exceeded max file size");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  374|      2|    return CURLE_FILESIZE_EXCEEDED;
  375|      2|  }
  376|    327|  return CURLE_OK;
  377|    329|}
Curl_pgrs_deliver_inc:
  382|    327|{
  383|    327|  data->progress.deliver += delta;
  384|    327|}
Curl_pgrsSetUploadCounter:
  406|  6.25k|{
  407|  6.25k|  data->progress.ul.cur_size = size;
  408|  6.25k|}
Curl_pgrsSetDownloadSize:
  411|  14.6k|{
  412|  14.6k|  if(size >= 0) {
  ------------------
  |  Branch (412:6): [True: 0, False: 14.6k]
  ------------------
  413|      0|    data->progress.dl.total_size = size;
  414|      0|    data->progress.dl_size_known = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  415|      0|  }
  416|  14.6k|  else {
  417|  14.6k|    data->progress.dl.total_size = 0;
  418|       |    data->progress.dl_size_known = FALSE;
  ------------------
  |  | 1056|  14.6k|#define FALSE false
  ------------------
  419|  14.6k|  }
  420|  14.6k|}
Curl_pgrsSetUploadSize:
  423|  14.6k|{
  424|  14.6k|  if(size >= 0) {
  ------------------
  |  Branch (424:6): [True: 0, False: 14.6k]
  ------------------
  425|      0|    data->progress.ul.total_size = size;
  426|      0|    data->progress.ul_size_known = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  427|      0|  }
  428|  14.6k|  else {
  429|  14.6k|    data->progress.ul.total_size = 0;
  430|       |    data->progress.ul_size_known = FALSE;
  ------------------
  |  | 1056|  14.6k|#define FALSE false
  ------------------
  431|  14.6k|  }
  432|  14.6k|}
Curl_pgrsUpdate:
  709|   157k|{
  710|   157k|  return pgrs_update(data, Curl_pgrs_now(data));
  711|   157k|}
Curl_pgrsUpdate_nometer:
  727|  1.88k|{
  728|  1.88k|  (void)progress_calc(data, Curl_pgrs_now(data));
  729|  1.88k|}
Curl_pgrsCompleted:
  732|  11.7k|{
  733|  11.7k|  struct Progress * const p = &data->progress;
  734|  11.7k|  p->timespent = curlx_ptimediff_us(Curl_pgrs_now(data), &p->start);
  735|  11.7k|}
progress.c:pgrs_speedinit:
  123|  6.25k|{
  124|  6.25k|  memset(&data->state.keeps_speed, 0, sizeof(struct curltime));
  125|  6.25k|}
progress.c:pgrs_update:
  703|   157k|{
  704|       |  bool showprogress = progress_calc(data, pnow);
  705|   157k|  return pgrsupdate(data, showprogress);
  706|   157k|}
progress.c:pgrsupdate:
  654|   157k|{
  655|   157k|  if(!data->progress.hide) {
  ------------------
  |  Branch (655:6): [True: 217, False: 157k]
  ------------------
  656|    217|    int rc;
  657|    217|    if(data->set.fxferinfo) {
  ------------------
  |  Branch (657:8): [True: 0, False: 217]
  ------------------
  658|       |      /* There is a callback set, call that */
  659|      0|      struct Curl_mapi_guard guard;
  660|      0|      CURL_CBAPI_START(&guard, data, easy_fxferinfo);
  ------------------
  |  |  195|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  661|      0|      rc = data->set.fxferinfo(data->set.progress_client,
  662|      0|                               data->progress.dl.total_size,
  663|      0|                               data->progress.dl.cur_size,
  664|      0|                               data->progress.ul.total_size,
  665|      0|                               data->progress.ul.cur_size);
  666|      0|      CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|      0|  Curl_cbapi_leave(g)
  ------------------
  667|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  234|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (667:10): [True: 0, False: 0]
  ------------------
  668|      0|        if(rc) {
  ------------------
  |  Branch (668:12): [True: 0, False: 0]
  ------------------
  669|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  670|      0|          return CURLE_ABORTED_BY_CALLBACK;
  671|      0|        }
  672|      0|        return CURLE_OK;
  673|      0|      }
  674|      0|    }
  675|    217|    else if(data->set.fprogress) {
  ------------------
  |  Branch (675:13): [True: 0, False: 217]
  ------------------
  676|       |      /* The older deprecated callback is set, call that */
  677|      0|      struct Curl_mapi_guard guard;
  678|      0|      CURL_CBAPI_START(&guard, data, easy_fprogress);
  ------------------
  |  |  195|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  679|      0|      rc = data->set.fprogress(data->set.progress_client,
  680|      0|                               (double)data->progress.dl.total_size,
  681|      0|                               (double)data->progress.dl.cur_size,
  682|      0|                               (double)data->progress.ul.total_size,
  683|      0|                               (double)data->progress.ul.cur_size);
  684|      0|      CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|      0|  Curl_cbapi_leave(g)
  ------------------
  685|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  234|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (685:10): [True: 0, False: 0]
  ------------------
  686|      0|        if(rc) {
  ------------------
  |  Branch (686:12): [True: 0, False: 0]
  ------------------
  687|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  688|      0|          return CURLE_ABORTED_BY_CALLBACK;
  689|      0|        }
  690|      0|        return CURLE_OK;
  691|      0|      }
  692|      0|    }
  693|       |
  694|    217|    if(showprogress)
  ------------------
  |  Branch (694:8): [True: 17, False: 200]
  ------------------
  695|     17|      progress_meter(data);
  696|    217|  }
  697|       |
  698|   157k|  return CURLE_OK;
  699|   157k|}
progress.c:progress_meter:
  560|     17|{
  561|     17|  struct Progress *p = &data->progress;
  562|     17|  char max6[6][7];
  563|     17|  struct pgrs_estimate dl_estm;
  564|     17|  struct pgrs_estimate ul_estm;
  565|     17|  struct pgrs_estimate total_estm;
  566|     17|  curl_off_t total_cur_size;
  567|     17|  curl_off_t total_expected_size;
  568|     17|  curl_off_t dl_size;
  569|     17|  char time_left[8];
  570|     17|  char time_total[8];
  571|     17|  char time_spent[8];
  572|     17|  curl_off_t cur_secs = (curl_off_t)p->timespent / 1000000; /* seconds */
  573|       |
  574|     17|  if(!p->headers_out) {
  ------------------
  |  Branch (574:6): [True: 17, False: 0]
  ------------------
  575|     17|    if(data->state.resume_from) {
  ------------------
  |  Branch (575:8): [True: 5, False: 12]
  ------------------
  576|      5|      curl_mfprintf(data->set.err,
  577|      5|                    "** Resuming transfer from byte position %" FMT_OFF_T "\n",
  578|      5|                    data->state.resume_from);
  579|      5|    }
  580|     17|    curl_mfprintf(data->set.err,
  581|     17|                  "  %% Total    %% Received %% Xferd  Average Speed  "
  582|     17|                  "Time    Time    Time   Current\n"
  583|     17|                  "                                 Dload  Upload  "
  584|     17|                  "Total   Spent   Left   Speed\n");
  585|     17|    p->headers_out = TRUE; /* headers are shown */
  ------------------
  |  | 1053|     17|#define TRUE true
  ------------------
  586|     17|  }
  587|       |
  588|       |  /* Figure out the estimated time of arrival for upload and download */
  589|     17|  pgrs_estimates(&p->ul, (bool)p->ul_size_known, &ul_estm);
  590|     17|  pgrs_estimates(&p->dl, (bool)p->dl_size_known, &dl_estm);
  591|       |
  592|       |  /* Since both happen at the same time, total expected duration is max. */
  593|     17|  total_estm.secs = CURLMAX(ul_estm.secs, dl_estm.secs);
  ------------------
  |  | 1291|     17|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 0, False: 17]
  |  |  ------------------
  ------------------
  594|       |  /* create the three time strings */
  595|     17|  time2str(time_left, sizeof(time_left),
  596|     17|           total_estm.secs > 0 ? (total_estm.secs - cur_secs) : 0);
  ------------------
  |  Branch (596:12): [True: 0, False: 17]
  ------------------
  597|     17|  time2str(time_total, sizeof(time_total), total_estm.secs);
  598|     17|  time2str(time_spent, sizeof(time_spent), cur_secs);
  599|       |
  600|       |  /* Get the total amount of data expected to get transferred */
  601|     17|  total_expected_size = p->ul_size_known ? p->ul.total_size : p->ul.cur_size;
  ------------------
  |  Branch (601:25): [True: 0, False: 17]
  ------------------
  602|       |
  603|     17|  dl_size = p->dl_size_known ? p->dl.total_size : p->dl.cur_size;
  ------------------
  |  Branch (603:13): [True: 0, False: 17]
  ------------------
  604|       |
  605|       |  /* integer overflow check */
  606|     17|  if((CURL_OFF_T_MAX - total_expected_size) < dl_size)
  ------------------
  |  |  596|     17|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (606:6): [True: 0, False: 17]
  ------------------
  607|      0|    total_expected_size = CURL_OFF_T_MAX; /* capped */
  ------------------
  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  608|     17|  else
  609|     17|    total_expected_size += dl_size;
  610|       |
  611|       |  /* We have transferred this much so far */
  612|     17|  total_cur_size = p->dl.cur_size + p->ul.cur_size;
  613|       |
  614|       |  /* Get the percentage of data transferred so far */
  615|     17|  total_estm.percent = pgrs_est_percent(total_expected_size, total_cur_size);
  616|       |
  617|     17|  curl_mfprintf(data->set.err,
  618|     17|                "\r"
  619|     17|                "%3" FMT_OFF_T " %s "
  620|     17|                "%3" FMT_OFF_T " %s "
  621|     17|                "%3" FMT_OFF_T " %s %s %s %s %s %s %s",
  622|     17|                total_estm.percent, /* 3 letters */    /* total % */
  623|     17|                max6out(total_expected_size, max6[2],
  624|     17|                        sizeof(max6[2])),              /* total size */
  625|     17|                dl_estm.percent, /* 3 letters */       /* rcvd % */
  626|     17|                max6out(p->dl.cur_size, max6[0],
  627|     17|                        sizeof(max6[0])),              /* rcvd size */
  628|     17|                ul_estm.percent, /* 3 letters */       /* xfer % */
  629|     17|                max6out(p->ul.cur_size, max6[1],
  630|     17|                        sizeof(max6[1])),              /* xfer size */
  631|     17|                max6out(p->dl.speed, max6[3],
  632|     17|                        sizeof(max6[3])),              /* avrg dl speed */
  633|     17|                max6out(p->ul.speed, max6[4],
  634|     17|                        sizeof(max6[4])),              /* avrg ul speed */
  635|     17|                time_total,    /* 7 letters */         /* total time */
  636|     17|                time_spent,    /* 7 letters */         /* time spent */
  637|     17|                time_left,     /* 7 letters */         /* time left */
  638|     17|                max6out(p->current_speed, max6[5],
  639|     17|                        sizeof(max6[5]))               /* current speed */
  640|     17|    );
  641|       |
  642|       |  /* we flush the output stream to make it appear as soon as possible */
  643|     17|  fflush(data->set.err);
  644|     17|}
progress.c:pgrs_estimates:
  550|     34|{
  551|     34|  est->secs = 0;
  552|     34|  est->percent = 0;
  553|     34|  if(total_known && (d->speed > 0)) {
  ------------------
  |  Branch (553:6): [True: 0, False: 34]
  |  Branch (553:21): [True: 0, False: 0]
  ------------------
  554|      0|    est->secs = d->total_size / d->speed;
  555|      0|    est->percent = pgrs_est_percent(d->total_size, d->cur_size);
  556|      0|  }
  557|     34|}
progress.c:pgrs_est_percent:
  539|     17|{
  540|     17|  if(total > 10000)
  ------------------
  |  Branch (540:6): [True: 0, False: 17]
  ------------------
  541|      0|    return cur / (total / 100);
  542|     17|  else if(total > 0)
  ------------------
  |  Branch (542:11): [True: 0, False: 17]
  ------------------
  543|      0|    return (cur * 100) / total;
  544|     17|  return 0;
  545|     17|}
progress.c:progress_calc:
  456|   159k|{
  457|   159k|  struct Progress * const p = &data->progress;
  458|   159k|  int i_next, i_oldest, i_latest;
  459|   159k|  timediff_t duration_us;
  460|   159k|  curl_off_t amount;
  461|       |
  462|       |  /* The time spent so far (from the start) in microseconds */
  463|   159k|  p->timespent = curlx_ptimediff_us(pnow, &p->start);
  464|   159k|  p->dl.speed = trspeed(p->dl.cur_size, p->timespent);
  465|   159k|  p->ul.speed = trspeed(p->ul.cur_size, p->timespent);
  466|       |
  467|   159k|  if(!p->speeder_c) { /* no previous record exists */
  ------------------
  |  Branch (467:6): [True: 3.47k, False: 155k]
  ------------------
  468|  3.47k|    p->speed_amount[0] = p->dl.cur_size + p->ul.cur_size;
  469|  3.47k|    p->speed_time[0] = *pnow;
  470|  3.47k|    p->speeder_c++;
  471|       |    /* use the overall average at the start */
  472|  3.47k|    p->current_speed = p->ul.speed + p->dl.speed;
  473|  3.47k|    p->lastshow = pnow->tv_sec;
  474|  3.47k|    return TRUE;
  ------------------
  |  | 1053|  3.47k|#define TRUE true
  ------------------
  475|  3.47k|  }
  476|       |  /* We have at least one record now. Where to put the next and
  477|       |   * where is the latest one? */
  478|   155k|  i_next = p->speeder_c % CURL_SPEED_RECORDS;
  ------------------
  |  |  467|   155k|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  479|   155k|  i_latest = (i_next > 0) ? (i_next - 1) : (CURL_SPEED_RECORDS - 1);
  ------------------
  |  |  467|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (479:14): [True: 155k, False: 0]
  ------------------
  480|       |
  481|       |  /* Make a new record only when some time has passed.
  482|       |   * Too frequent calls otherwise ruin the history. */
  483|   155k|  if(curlx_ptimediff_ms(pnow, &p->speed_time[i_latest]) >= 1000) {
  ------------------
  |  Branch (483:6): [True: 0, False: 155k]
  ------------------
  484|      0|    p->speeder_c++;
  485|      0|    i_latest = i_next;
  486|      0|    p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  487|      0|    p->speed_time[i_latest] = *pnow;
  488|      0|  }
  489|   155k|  else if(data->req.done) {
  ------------------
  |  Branch (489:11): [True: 0, False: 155k]
  ------------------
  490|       |    /* When a transfer is done, and we did not have a current speed
  491|       |     * already, update the last record. Otherwise, stay at the speed
  492|       |     * we have. The last chunk of data, when rate limiting, would increase
  493|       |     * reported speed since it no longer measures a full second. */
  494|      0|    if(!p->current_speed) {
  ------------------
  |  Branch (494:8): [True: 0, False: 0]
  ------------------
  495|      0|      p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  496|      0|      p->speed_time[i_latest] = *pnow;
  497|      0|    }
  498|      0|  }
  499|   155k|  else {
  500|       |    /* transfer ongoing, wait for more time to pass. */
  501|   155k|    return FALSE;
  ------------------
  |  | 1056|   155k|#define FALSE false
  ------------------
  502|   155k|  }
  503|       |
  504|      0|  i_oldest = (p->speeder_c < CURL_SPEED_RECORDS) ? 0 :
  ------------------
  |  |  467|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (504:14): [True: 0, False: 0]
  ------------------
  505|      0|             ((i_latest + 1) % CURL_SPEED_RECORDS);
  ------------------
  |  |  467|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  506|       |
  507|       |  /* How much we transferred between oldest and current records */
  508|      0|  amount = p->speed_amount[i_latest] - p->speed_amount[i_oldest];
  509|       |  /* How long this took */
  510|      0|  duration_us = curlx_ptimediff_us(&p->speed_time[i_latest],
  511|      0|                                   &p->speed_time[i_oldest]);
  512|      0|  if(duration_us <= 0)
  ------------------
  |  Branch (512:6): [True: 0, False: 0]
  ------------------
  513|      0|    duration_us = 1;
  514|       |
  515|      0|  if(amount > (CURL_OFF_T_MAX / 1000000)) {
  ------------------
  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (515:6): [True: 0, False: 0]
  ------------------
  516|       |    /* the 'amount' value is bigger than would fit in 64 bits if
  517|       |       multiplied with 1000000, so we use the double math for this */
  518|      0|    p->current_speed =
  519|      0|      (curl_off_t)(((double)amount * 1000000.0) / (double)duration_us);
  520|      0|  }
  521|      0|  else {
  522|      0|    p->current_speed = amount * 1000000 / duration_us;
  523|      0|  }
  524|       |
  525|      0|  if((p->lastshow == pnow->tv_sec) && !data->req.done)
  ------------------
  |  Branch (525:6): [True: 0, False: 0]
  |  Branch (525:39): [True: 0, False: 0]
  ------------------
  526|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  527|      0|  p->lastshow = pnow->tv_sec;
  528|       |  return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  529|      0|}
progress.c:trspeed:
  442|   318k|{
  443|   318k|  if(us < 1)
  ------------------
  |  Branch (443:6): [True: 8, False: 318k]
  ------------------
  444|      8|    return size * 1000000;
  445|   318k|  else if(size < CURL_OFF_T_MAX / 1000000)
  ------------------
  |  |  596|   318k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (445:11): [True: 318k, False: 0]
  ------------------
  446|   318k|    return (size * 1000000) / us;
  447|      0|  else if(us >= 1000000)
  ------------------
  |  Branch (447:11): [True: 0, False: 0]
  ------------------
  448|      0|    return size / (us / 1000000);
  449|      0|  else
  450|      0|    return CURL_OFF_T_MAX;
  ------------------
  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  451|   318k|}

Curl_getn_scheme:
  469|  42.2k|{
  470|       |  /* table generated by schemetable.c:
  471|       |     1. gcc schemetable.c && ./a.out
  472|       |     2. check how small the table gets
  473|       |     3. tweak the hash algorithm, then rerun from 1
  474|       |     4. when the table is good enough
  475|       |     5. copy the table into this source code
  476|       |     6. make sure this function uses the same hash function that worked for
  477|       |     schemetable.c
  478|       |     */
  479|  42.2k|  static const struct Curl_scheme * const all_schemes[59] = { NULL,
  480|  42.2k|    &Curl_scheme_pop3, NULL,
  481|  42.2k|    &Curl_scheme_smtps,
  482|  42.2k|    &Curl_scheme_socks,
  483|  42.2k|    &Curl_scheme_socks4,
  484|  42.2k|    &Curl_scheme_socks5, NULL, NULL,
  485|  42.2k|    &Curl_scheme_gophers,
  486|  42.2k|    &Curl_scheme_ws,
  487|  42.2k|    &Curl_scheme_sftp,
  488|  42.2k|    &Curl_scheme_socks4a,
  489|  42.2k|    &Curl_scheme_scp,
  490|  42.2k|    &Curl_scheme_rtsp,
  491|  42.2k|    &Curl_scheme_dict, NULL, NULL,
  492|  42.2k|    &Curl_scheme_gopher, NULL, NULL, NULL,
  493|  42.2k|    &Curl_scheme_wss, NULL,
  494|  42.2k|    &Curl_scheme_smb, NULL,
  495|  42.2k|    &Curl_scheme_ldap,
  496|  42.2k|    &Curl_scheme_ldaps,
  497|  42.2k|    &Curl_scheme_imap, NULL, NULL, NULL,
  498|  42.2k|    &Curl_scheme_imaps,
  499|  42.2k|    &Curl_scheme_https,
  500|  42.2k|    &Curl_scheme_tftp,
  501|  42.2k|    &Curl_scheme_telnet, NULL, NULL, NULL,
  502|  42.2k|    &Curl_scheme_file,
  503|  42.2k|    &Curl_scheme_smtp, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  504|  42.2k|    &Curl_scheme_ftp,
  505|  42.2k|    &Curl_scheme_mqtt, NULL,
  506|  42.2k|    &Curl_scheme_socks5h,
  507|  42.2k|    &Curl_scheme_http,
  508|  42.2k|    &Curl_scheme_pop3s, NULL,
  509|  42.2k|    &Curl_scheme_mqtts, NULL,
  510|  42.2k|    &Curl_scheme_smbs,
  511|  42.2k|    &Curl_scheme_ftps,
  512|  42.2k|  };
  513|       |
  514|  42.2k|  if(len && (len <= 7)) {
  ------------------
  |  Branch (514:6): [True: 42.2k, False: 0]
  |  Branch (514:13): [True: 42.2k, False: 29]
  ------------------
  515|  42.2k|    const char *s = scheme;
  516|  42.2k|    size_t l = len;
  517|  42.2k|    const struct Curl_scheme *h;
  518|  42.2k|    unsigned int c = 443;
  519|   249k|    while(l) {
  ------------------
  |  Branch (519:11): [True: 207k, False: 42.2k]
  ------------------
  520|   207k|      c <<= 5;
  521|   207k|      c += (unsigned int)Curl_raw_tolower(*s);
  522|   207k|      s++;
  523|   207k|      l--;
  524|   207k|    }
  525|       |
  526|  42.2k|    h = all_schemes[c % 59];
  527|  42.2k|    if(h && curl_strnequal(scheme, h->name, len) && !h->name[len])
  ------------------
  |  Branch (527:8): [True: 42.1k, False: 61]
  |  Branch (527:13): [True: 42.1k, False: 86]
  |  Branch (527:53): [True: 42.0k, False: 36]
  ------------------
  528|  42.0k|      return h;
  529|  42.2k|  }
  530|    212|  return NULL;
  531|  42.2k|}
Curl_get_scheme:
  534|  30.3k|{
  535|  30.3k|  return Curl_getn_scheme(scheme, strlen(scheme));
  536|  30.3k|}

cidr4_match:
   59|    962|{
   60|    962|  unsigned int address = 0;
   61|    962|  unsigned int check = 0;
   62|       |
   63|    962|  if(bits > 32)
  ------------------
  |  Branch (63:6): [True: 9, False: 953]
  ------------------
   64|       |    /* strange input */
   65|      9|    return FALSE;
  ------------------
  |  | 1056|      9|#define FALSE false
  ------------------
   66|       |
   67|    953|  if(curlx_inet_pton(AF_INET, ipv4, &address) != 1)
  ------------------
  |  Branch (67:6): [True: 0, False: 953]
  ------------------
   68|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
   69|    953|  if(curlx_inet_pton(AF_INET, network, &check) != 1)
  ------------------
  |  Branch (69:6): [True: 925, False: 28]
  ------------------
   70|    925|    return FALSE;
  ------------------
  |  | 1056|    925|#define FALSE false
  ------------------
   71|       |
   72|     28|  if(bits && (bits != 32)) {
  ------------------
  |  Branch (72:6): [True: 15, False: 13]
  |  Branch (72:14): [True: 11, False: 4]
  ------------------
   73|     11|    unsigned int mask = 0xffffffff << (32 - bits);
   74|     11|    unsigned int haddr = htonl(address);
   75|     11|    unsigned int hcheck = htonl(check);
   76|       |#if 0
   77|       |    curl_mfprintf(stderr, "Host %s (%x) network %s (%x) "
   78|       |                  "bits %u mask %x => %x\n",
   79|       |                  ipv4, haddr, network, hcheck, bits, mask,
   80|       |                  (haddr ^ hcheck) & mask);
   81|       |#endif
   82|     11|    if((haddr ^ hcheck) & mask)
  ------------------
  |  Branch (82:8): [True: 10, False: 1]
  ------------------
   83|     10|      return FALSE;
  ------------------
  |  | 1056|     10|#define FALSE false
  ------------------
   84|      1|    return TRUE;
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
   85|     11|  }
   86|     17|  return address == check;
   87|     28|}
cidr6_match:
   94|    488|{
   95|    488|#ifdef USE_IPV6
   96|    488|  unsigned int bytes;
   97|    488|  unsigned int rest;
   98|    488|  unsigned char address[16];
   99|    488|  unsigned char check[16];
  100|       |
  101|    488|  if(!bits)
  ------------------
  |  Branch (101:6): [True: 472, False: 16]
  ------------------
  102|    472|    bits = 128;
  103|       |
  104|    488|  bytes = bits / 8;
  105|    488|  rest = bits & 0x07;
  106|    488|  if((bytes > 16) || ((bytes == 16) && rest))
  ------------------
  |  Branch (106:6): [True: 0, False: 488]
  |  Branch (106:23): [True: 472, False: 16]
  |  Branch (106:40): [True: 0, False: 472]
  ------------------
  107|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  108|    488|  if(curlx_inet_pton(AF_INET6, ipv6, address) != 1)
  ------------------
  |  Branch (108:6): [True: 0, False: 488]
  ------------------
  109|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  110|    488|  if(curlx_inet_pton(AF_INET6, network, check) != 1)
  ------------------
  |  Branch (110:6): [True: 427, False: 61]
  ------------------
  111|    427|    return FALSE;
  ------------------
  |  | 1056|    427|#define FALSE false
  ------------------
  112|     61|  if(bytes && memcmp(address, check, bytes))
  ------------------
  |  Branch (112:6): [True: 60, False: 1]
  |  Branch (112:15): [True: 56, False: 4]
  ------------------
  113|     56|    return FALSE;
  ------------------
  |  | 1056|     56|#define FALSE false
  ------------------
  114|      5|  if(rest && ((address[bytes] ^ check[bytes]) & (0xff << (8 - rest))))
  ------------------
  |  Branch (114:6): [True: 4, False: 1]
  |  Branch (114:14): [True: 2, False: 2]
  ------------------
  115|      2|    return FALSE;
  ------------------
  |  | 1056|      2|#define FALSE false
  ------------------
  116|       |
  117|      3|  return TRUE;
  ------------------
  |  | 1053|      3|#define TRUE true
  ------------------
  118|       |#else
  119|       |  (void)ipv6;
  120|       |  (void)network;
  121|       |  (void)bits;
  122|       |  return FALSE;
  123|       |#endif
  124|      5|}
proxy_check_noproxy:
  199|  6.48k|{
  200|       |  /*
  201|       |   * If we do not have a hostname at all, like for example with a FILE
  202|       |   * transfer, we have nothing to interrogate the noproxy list with.
  203|       |   */
  204|  6.48k|  if(!name || name[0] == '\0')
  ------------------
  |  Branch (204:6): [True: 0, False: 6.48k]
  |  Branch (204:15): [True: 0, False: 6.48k]
  ------------------
  205|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  206|       |
  207|       |  /* no_proxy=domain1.dom,host.domain2.dom
  208|       |   *   (a comma-separated list of hosts which should
  209|       |   *   not be proxied, or an asterisk to override
  210|       |   *   all proxy variables)
  211|       |   */
  212|  6.48k|  if(no_proxy && no_proxy[0]) {
  ------------------
  |  Branch (212:6): [True: 255, False: 6.23k]
  |  Branch (212:18): [True: 253, False: 2]
  ------------------
  213|    253|    const char *p = no_proxy;
  214|    253|    size_t namelen;
  215|    253|    char address[16];
  216|    253|    enum nametype type = TYPE_HOST;
  217|    253|    if(!strcmp("*", no_proxy))
  ------------------
  |  Branch (217:8): [True: 1, False: 252]
  ------------------
  218|      1|      return TRUE;
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
  219|       |
  220|       |    /* NO_PROXY was specified and it was not only an asterisk */
  221|       |
  222|       |    /* Check if name is an IP address; if not, assume it being a hostname. */
  223|    252|    namelen = strlen(name);
  224|    252|    if(curlx_inet_pton(AF_INET, name, &address) == 1)
  ------------------
  |  Branch (224:8): [True: 68, False: 184]
  ------------------
  225|     68|      type = TYPE_IPV4;
  226|    184|#ifdef USE_IPV6
  227|    184|    else if(curlx_inet_pton(AF_INET6, name, &address) == 1)
  ------------------
  |  Branch (227:13): [True: 79, False: 105]
  ------------------
  228|     79|      type = TYPE_IPV6;
  229|    105|#endif
  230|    105|    else {
  231|       |      /* ignore trailing dots in the hostname */
  232|    105|      if(name[namelen - 1] == '.')
  ------------------
  |  Branch (232:10): [True: 2, False: 103]
  ------------------
  233|      2|        namelen--;
  234|    105|    }
  235|       |
  236|  3.98k|    while(*p) {
  ------------------
  |  Branch (236:11): [True: 3.95k, False: 31]
  ------------------
  237|  3.95k|      const char *token;
  238|  3.95k|      size_t tokenlen = 0;
  239|       |
  240|       |      /* pass blanks */
  241|  3.95k|      curlx_str_passblanks(&p);
  242|       |
  243|  3.95k|      token = p;
  244|       |      /* pass over the pattern */
  245|   291k|      while(*p && !ISBLANK(*p) && (*p != ',')) {
  ------------------
  |  |   43|   583k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 99, False: 291k]
  |  |  |  Branch (43:38): [True: 28, False: 291k]
  |  |  ------------------
  ------------------
  |  Branch (245:13): [True: 291k, False: 190]
  |  Branch (245:35): [True: 287k, False: 3.63k]
  ------------------
  246|   287k|        p++;
  247|   287k|        tokenlen++;
  248|   287k|      }
  249|       |
  250|  3.95k|      if(tokenlen) {
  ------------------
  |  Branch (250:10): [True: 3.87k, False: 75]
  ------------------
  251|  3.87k|        bool match = FALSE;
  ------------------
  |  | 1056|  3.87k|#define FALSE false
  ------------------
  252|  3.87k|        if(type == TYPE_HOST)
  ------------------
  |  Branch (252:12): [True: 2.05k, False: 1.82k]
  ------------------
  253|  2.05k|          match = match_host(token, tokenlen, name, namelen);
  254|  1.82k|        else
  255|  1.82k|          match = match_ip(type, token, tokenlen, name);
  256|       |
  257|  3.87k|        if(match)
  ------------------
  |  Branch (257:12): [True: 8, False: 3.87k]
  ------------------
  258|      8|          return TRUE;
  ------------------
  |  | 1053|      8|#define TRUE true
  ------------------
  259|  3.87k|      }
  260|       |
  261|       |      /* pass blanks after pattern */
  262|  3.94k|      curlx_str_passblanks(&p);
  263|       |      /* if not a comma, this ends the loop */
  264|  3.94k|      if(*p != ',')
  ------------------
  |  Branch (264:10): [True: 213, False: 3.73k]
  ------------------
  265|    213|        break;
  266|       |      /* pass any number of commas */
  267|  8.77k|      while(*p == ',')
  ------------------
  |  Branch (267:13): [True: 5.04k, False: 3.73k]
  ------------------
  268|  5.04k|        p++;
  269|  3.73k|    } /* while(*p) */
  270|    252|  } /* NO_PROXY was specified and it was not only an asterisk */
  271|       |
  272|  6.47k|  return FALSE;
  ------------------
  |  | 1056|  6.47k|#define FALSE false
  ------------------
  273|  6.48k|}
Curl_proxy_init_conn:
  521|  6.48k|{
  522|  6.48k|  char *proxy = NULL;
  523|  6.48k|  char *pre_proxy = NULL;
  524|  6.48k|  bool do_env_detect = TRUE;
  ------------------
  |  | 1053|  6.48k|#define TRUE true
  ------------------
  525|  6.48k|  CURLcode result = CURLE_OK;
  526|       |
  527|       |  /* Enforce no proxy use unless we decide to use one */
  528|  6.48k|  conn->bits.origin_is_proxy = FALSE;
  ------------------
  |  | 1056|  6.48k|#define FALSE false
  ------------------
  529|  6.48k|  DEBUGASSERT(!conn->socks_proxy.peer);
  ------------------
  |  | 1079|  6.48k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (529:3): [True: 0, False: 6.48k]
  |  Branch (529:3): [True: 6.48k, False: 0]
  ------------------
  530|  6.48k|  DEBUGASSERT(!conn->http_proxy.peer);
  ------------------
  |  | 1079|  6.48k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (530:3): [True: 0, False: 6.48k]
  |  Branch (530:3): [True: 6.48k, False: 0]
  ------------------
  531|       |
  532|  6.48k|  if(proxy_do_not_proxy(data))
  ------------------
  |  Branch (532:6): [True: 9, False: 6.47k]
  ------------------
  533|      9|    goto out;
  534|       |
  535|       |  /*************************************************************
  536|       |   * Detect what (if any) proxy to use
  537|       |   *************************************************************/
  538|       |  /* the empty config strings disable proxy use and env detects */
  539|  6.47k|  if(data->set.str[STRING_PROXY]) {
  ------------------
  |  Branch (539:6): [True: 2.35k, False: 4.12k]
  ------------------
  540|  2.35k|    if(*data->set.str[STRING_PROXY]) {
  ------------------
  |  Branch (540:8): [True: 2.34k, False: 9]
  ------------------
  541|  2.34k|      proxy = curlx_strdup(data->set.str[STRING_PROXY]);
  ------------------
  |  | 1472|  2.34k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  542|       |      /* if global proxy is set, this is it */
  543|  2.34k|      if(!proxy) {
  ------------------
  |  Branch (543:10): [True: 0, False: 2.34k]
  ------------------
  544|      0|        failf(data, "memory shortage");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  545|      0|        result = CURLE_OUT_OF_MEMORY;
  546|      0|        goto out;
  547|      0|      }
  548|  2.34k|    }
  549|      9|    else
  550|      9|      do_env_detect = FALSE;
  ------------------
  |  | 1056|      9|#define FALSE false
  ------------------
  551|  2.35k|  }
  552|       |
  553|  6.47k|  if(data->set.str[STRING_PRE_PROXY]) {
  ------------------
  |  Branch (553:6): [True: 503, False: 5.97k]
  ------------------
  554|    503|    if(*data->set.str[STRING_PRE_PROXY]) {
  ------------------
  |  Branch (554:8): [True: 499, False: 4]
  ------------------
  555|    499|      pre_proxy = curlx_strdup(data->set.str[STRING_PRE_PROXY]);
  ------------------
  |  | 1472|    499|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  556|       |      /* if global socks proxy is set, this is it */
  557|    499|      if(!pre_proxy) {
  ------------------
  |  Branch (557:10): [True: 0, False: 499]
  ------------------
  558|      0|        failf(data, "memory shortage");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  559|      0|        result = CURLE_OUT_OF_MEMORY;
  560|      0|        goto out;
  561|      0|      }
  562|    499|    }
  563|      4|    else
  564|      4|      do_env_detect = FALSE;
  ------------------
  |  | 1056|      4|#define FALSE false
  ------------------
  565|    503|  }
  566|       |
  567|  6.47k|#ifndef CURL_DISABLE_HTTP
  568|       |  /* None configured, detect possible proxy from environment. */
  569|  6.47k|  if(!proxy && !pre_proxy && do_env_detect)
  ------------------
  |  Branch (569:6): [True: 4.13k, False: 2.34k]
  |  Branch (569:16): [True: 3.66k, False: 467]
  |  Branch (569:30): [True: 3.65k, False: 12]
  ------------------
  570|  3.65k|    proxy = proxy_detect_proxy(data, conn->scheme);
  571|       |#else
  572|       |  (void)do_env_detect;
  573|       |#endif /* CURL_DISABLE_HTTP */
  574|       |
  575|  6.47k|  if(!proxy && !pre_proxy)
  ------------------
  |  Branch (575:6): [True: 4.13k, False: 2.34k]
  |  Branch (575:16): [True: 3.66k, False: 467]
  ------------------
  576|  3.66k|    goto out;
  577|       |
  578|  2.81k|  if(pre_proxy) {
  ------------------
  |  Branch (578:6): [True: 499, False: 2.31k]
  ------------------
  579|    499|    result = parse_proxy(data, pre_proxy, TRUE, &conn->socks_proxy);
  ------------------
  |  | 1053|    499|#define TRUE true
  ------------------
  580|    499|    if(result)
  ------------------
  |  Branch (580:8): [True: 11, False: 488]
  ------------------
  581|     11|      goto out;
  582|    499|  }
  583|       |
  584|  2.80k|  if(proxy) {
  ------------------
  |  Branch (584:6): [True: 2.34k, False: 456]
  ------------------
  585|  2.34k|    result = parse_proxy(data, proxy, FALSE, &conn->http_proxy);
  ------------------
  |  | 1056|  2.34k|#define FALSE false
  ------------------
  586|  2.34k|    if(result)
  ------------------
  |  Branch (586:8): [True: 5, False: 2.34k]
  ------------------
  587|      5|      goto out;
  588|       |
  589|  2.34k|    switch(conn->http_proxy.proxytype) {
  590|      5|    case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|      5|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (590:5): [True: 5, False: 2.33k]
  ------------------
  591|     10|    case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|     10|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (591:5): [True: 5, False: 2.33k]
  ------------------
  592|     48|    case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     48|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (592:5): [True: 38, False: 2.30k]
  ------------------
  593|     52|    case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     52|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (593:5): [True: 4, False: 2.33k]
  ------------------
  594|       |      /* Whoops, it is not an HTTP proxy */
  595|     52|      if(pre_proxy) {
  ------------------
  |  Branch (595:10): [True: 1, False: 51]
  ------------------
  596|       |        /* and we already have a SOCKS pre-proxy. Cannot have both */
  597|      1|        failf(data, "Having a SOCKS pre-proxy and proxy is not "
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  598|      1|              "supported with \'%s\'", proxy);
  599|      1|        result = CURLE_COULDNT_RESOLVE_PROXY;
  600|      1|        goto out;
  601|      1|      }
  602|       |      /* switch */
  603|     51|      conn->socks_proxy = conn->http_proxy;
  604|     51|      memset(&conn->http_proxy, 0, sizeof(conn->http_proxy));
  605|     51|      break;
  606|  2.29k|    default:
  ------------------
  |  Branch (606:5): [True: 2.29k, False: 52]
  ------------------
  607|       |      /* all other types are HTTP */
  608|  2.29k|      break;
  609|  2.34k|    }
  610|  2.34k|  }
  611|       |
  612|  2.79k|  if(conn->socks_proxy.peer) {
  ------------------
  |  Branch (612:6): [True: 537, False: 2.26k]
  ------------------
  613|    537|    DEBUGASSERT(!CURL_PROXY_IS_ANY_HTTP(conn->socks_proxy.proxytype));
  ------------------
  |  | 1079|    537|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (613:5): [True: 537, False: 0]
  |  Branch (613:5): [True: 0, False: 0]
  |  Branch (613:5): [True: 0, False: 0]
  |  Branch (613:5): [True: 0, False: 0]
  |  Branch (613:5): [True: 0, False: 0]
  |  Branch (613:5): [True: 0, False: 537]
  |  Branch (613:5): [True: 0, False: 537]
  |  Branch (613:5): [True: 0, False: 537]
  |  Branch (613:5): [True: 0, False: 537]
  |  Branch (613:5): [True: 0, False: 537]
  ------------------
  614|    537|  }
  615|       |
  616|       |#ifdef CURL_DISABLE_HTTP
  617|       |  if(conn->http_proxy.peer) {
  618|       |    /* asking for an HTTP proxy is a bit funny when HTTP is disabled... */
  619|       |    result = CURLE_UNSUPPORTED_PROTOCOL;
  620|       |    goto out;
  621|       |  }
  622|       |
  623|       |#else /* CURL_DISABLE_HTTP */
  624|  2.79k|  if(conn->http_proxy.peer) {
  ------------------
  |  Branch (624:6): [True: 2.29k, False: 507]
  ------------------
  625|  2.29k|    const struct Curl_scheme *scheme = data->state.origin->scheme;
  626|  2.29k|    bool tunnel_proxy = (bool)data->set.tunnel_thru_httpproxy;
  627|  2.29k|    DEBUGASSERT(CURL_PROXY_IS_ANY_HTTP(conn->http_proxy.proxytype));
  ------------------
  |  | 1079|  2.29k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (627:5): [True: 2.29k, False: 0]
  |  Branch (627:5): [True: 0, False: 0]
  |  Branch (627:5): [True: 0, False: 0]
  |  Branch (627:5): [True: 0, False: 0]
  |  Branch (627:5): [True: 0, False: 0]
  |  Branch (627:5): [True: 1.85k, False: 438]
  |  Branch (627:5): [True: 1, False: 437]
  |  Branch (627:5): [True: 435, False: 2]
  |  Branch (627:5): [True: 2, False: 0]
  |  Branch (627:5): [True: 0, False: 0]
  ------------------
  628|       |
  629|  2.29k|    if(!tunnel_proxy) {
  ------------------
  |  Branch (629:8): [True: 2.28k, False: 1]
  ------------------
  630|       |      /* Decide if we tunnel through proxy automatically */
  631|  2.28k|      if(conn->via_peer) {
  ------------------
  |  Branch (631:10): [True: 2.28k, False: 0]
  ------------------
  632|       |        /* With connect-to, we always tunnel */
  633|  2.28k|        tunnel_proxy = TRUE;
  ------------------
  |  | 1053|  2.28k|#define TRUE true
  ------------------
  634|  2.28k|      }
  635|      0|      else if(scheme->flags & PROTOPT_SSL) {
  ------------------
  |  |  207|      0|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (635:15): [True: 0, False: 0]
  ------------------
  636|       |        /* If the transfer is supposed to be secure, we tunnel */
  637|      0|        tunnel_proxy = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  638|      0|      }
  639|      0|      else if(scheme->flags & PROTOPT_HTTP_PROXY_TUNNEL) {
  ------------------
  |  |  239|      0|#define PROTOPT_HTTP_PROXY_TUNNEL (1 << 18) /* Using this protocol with a
  ------------------
  |  Branch (639:15): [True: 0, False: 0]
  ------------------
  640|       |        /* transfer scheme required tunneling */
  641|      0|        tunnel_proxy = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  642|      0|      }
  643|      0|      else if(!(scheme->protocol & PROTO_FAMILY_HTTP) &&
  ------------------
  |  |   84|      0|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1086|      0|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1087|      0|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|      0|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|      0|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|      0|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (643:15): [True: 0, False: 0]
  ------------------
  644|      0|              !(scheme->flags & PROTOPT_PROXY_AS_HTTP)) {
  ------------------
  |  |  226|      0|#define PROTOPT_PROXY_AS_HTTP (1 << 11) /* allow this non-HTTP scheme over a
  ------------------
  |  Branch (644:15): [True: 0, False: 0]
  ------------------
  645|       |        /* Cannot delegate transfer URL to HTTP proxy */
  646|      0|        tunnel_proxy = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  647|      0|      }
  648|  2.28k|    }
  649|       |
  650|  2.29k|    if(!tunnel_proxy) {
  ------------------
  |  Branch (650:8): [True: 0, False: 2.29k]
  ------------------
  651|       |      /* HTTP proxy used in forwarding mode. This means the connection
  652|       |       * is really to the proxy and NOT the origin of the transfer. */
  653|      0|      DEBUGASSERT(!conn->via_peer);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (653:7): [True: 0, False: 0]
  |  Branch (653:7): [True: 0, False: 0]
  ------------------
  654|      0|      Curl_peer_link(&conn->origin, conn->http_proxy.peer);
  655|      0|      conn->scheme = conn->http_proxy.peer->scheme;
  656|      0|      conn->bits.origin_is_proxy = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  657|      0|    }
  658|       |
  659|  2.29k|#ifndef CURL_DISABLE_DIGEST_AUTH
  660|  2.29k|    if(!Curl_safecmp(data->state.envproxy, proxy)) {
  ------------------
  |  Branch (660:8): [True: 2.29k, False: 0]
  ------------------
  661|       |      /* proxy changed */
  662|  2.29k|      Curl_auth_digest_cleanup(&data->state.proxydigest);
  663|  2.29k|      curlx_free(data->state.envproxy);
  ------------------
  |  | 1478|  2.29k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  664|  2.29k|      data->state.envproxy = curlx_strdup(proxy);
  ------------------
  |  | 1472|  2.29k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  665|  2.29k|    }
  666|  2.29k|#endif
  667|  2.29k|  }
  668|  2.79k|#endif /* !CURL_DISABLE_HTTP */
  669|       |
  670|  6.48k|out:
  671|  6.48k|  curlx_free(pre_proxy);
  ------------------
  |  | 1478|  6.48k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  672|  6.48k|  curlx_free(proxy);
  ------------------
  |  | 1478|  6.48k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  673|  6.48k|  return result;
  674|  2.79k|}
proxy.c:match_host:
  134|  2.05k|{
  135|  2.05k|  bool match = FALSE;
  ------------------
  |  | 1056|  2.05k|#define FALSE false
  ------------------
  136|       |
  137|       |  /* ignore trailing dots in the token to check */
  138|  2.05k|  if(token[tokenlen - 1] == '.')
  ------------------
  |  Branch (138:6): [True: 362, False: 1.68k]
  ------------------
  139|    362|    tokenlen--;
  140|       |
  141|  2.05k|  if(tokenlen && (*token == '.')) {
  ------------------
  |  Branch (141:6): [True: 1.90k, False: 147]
  |  Branch (141:18): [True: 219, False: 1.68k]
  ------------------
  142|       |    /* ignore leading token dot as well */
  143|    219|    token++;
  144|    219|    tokenlen--;
  145|    219|  }
  146|       |  /* A: example.com matches 'example.com'
  147|       |     B: www.example.com matches 'example.com'
  148|       |     C: nonexample.com DOES NOT match 'example.com'
  149|       |   */
  150|  2.05k|  if(tokenlen == namelen)
  ------------------
  |  Branch (150:6): [True: 426, False: 1.62k]
  ------------------
  151|       |    /* case A, exact match */
  152|    426|    match = curl_strnequal(token, name, namelen);
  153|  1.62k|  else if(tokenlen < namelen) {
  ------------------
  |  Branch (153:11): [True: 847, False: 778]
  ------------------
  154|       |    /* case B, tailmatch domain */
  155|    847|    match = (name[namelen - tokenlen - 1] == '.') &&
  ------------------
  |  Branch (155:13): [True: 290, False: 557]
  ------------------
  156|    290|            curl_strnequal(token, name + (namelen - tokenlen), tokenlen);
  ------------------
  |  Branch (156:13): [True: 1, False: 289]
  ------------------
  157|    847|  }
  158|       |  /* case C passes through, not a match */
  159|  2.05k|  return match;
  160|  2.05k|}
proxy.c:match_ip:
  164|  1.82k|{
  165|  1.82k|  char *slash;
  166|  1.82k|  unsigned int bits = 0;
  167|  1.82k|  char checkip[128];
  168|  1.82k|  if(tokenlen >= sizeof(checkip))
  ------------------
  |  Branch (168:6): [True: 50, False: 1.77k]
  ------------------
  169|       |    /* this cannot match */
  170|     50|    return FALSE;
  ------------------
  |  | 1056|     50|#define FALSE false
  ------------------
  171|       |  /* copy the check name to a temp buffer */
  172|  1.77k|  memcpy(checkip, token, tokenlen);
  173|  1.77k|  checkip[tokenlen] = 0;
  174|       |
  175|  1.77k|  slash = strchr(checkip, '/');
  176|       |  /* if the slash is part of this token, use it */
  177|  1.77k|  if(slash) {
  ------------------
  |  Branch (177:6): [True: 393, False: 1.38k]
  ------------------
  178|    393|    curl_off_t value;
  179|    393|    const char *p = &slash[1];
  180|    393|    if(curlx_str_number(&p, &value, 128) || *p)
  ------------------
  |  Branch (180:8): [True: 307, False: 86]
  |  Branch (180:45): [True: 21, False: 65]
  ------------------
  181|    328|      return FALSE;
  ------------------
  |  | 1056|    328|#define FALSE false
  ------------------
  182|       |    /* a too large value is rejected in the cidr function below */
  183|     65|    bits = (unsigned int)value;
  184|     65|    *slash = 0; /* null-terminate there */
  185|     65|  }
  186|  1.45k|  if(type == TYPE_IPV6)
  ------------------
  |  Branch (186:6): [True: 488, False: 962]
  ------------------
  187|    488|    return cidr6_match(name, checkip, bits);
  188|    962|  else
  189|    962|    return cidr4_match(name, checkip, bits);
  190|  1.45k|}
proxy.c:proxy_do_not_proxy:
  492|  6.48k|{
  493|  6.48k|  const char *no_proxy;
  494|  6.48k|  char *env_no_proxy = NULL;
  495|  6.48k|  bool do_not_proxy;
  496|       |
  497|       |  /* no proxying if the transfer does not use the network */
  498|  6.48k|  if(data->state.origin->scheme->flags & PROTOPT_NONETWORK)
  ------------------
  |  |  214|  6.48k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (498:6): [True: 0, False: 6.48k]
  ------------------
  499|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  500|       |
  501|  6.48k|  no_proxy = data->set.str[STRING_NOPROXY];
  502|  6.48k|  if(!no_proxy) {
  ------------------
  |  Branch (502:6): [True: 6.23k, False: 255]
  ------------------
  503|  6.23k|    const char *p = "no_proxy";
  504|  6.23k|    env_no_proxy = curl_getenv(p);
  505|  6.23k|    if(!env_no_proxy) {
  ------------------
  |  Branch (505:8): [True: 6.23k, False: 0]
  ------------------
  506|  6.23k|      p = "NO_PROXY";
  507|  6.23k|      env_no_proxy = curl_getenv(p);
  508|  6.23k|    }
  509|  6.23k|    if(env_no_proxy)
  ------------------
  |  Branch (509:8): [True: 0, False: 6.23k]
  ------------------
  510|      0|      infof(data, "Uses proxy env variable %s == '%s'", p, env_no_proxy);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  511|  6.23k|    no_proxy = env_no_proxy;
  512|  6.23k|  }
  513|       |
  514|  6.48k|  do_not_proxy = proxy_check_noproxy(data->state.origin->hostname, no_proxy);
  515|       |  curlx_safefree(env_no_proxy);
  ------------------
  |  | 1336|  6.48k|  do {                      \
  |  | 1337|  6.48k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  6.48k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  6.48k|    (ptr) = NULL;           \
  |  | 1339|  6.48k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 6.48k]
  |  |  ------------------
  ------------------
  516|  6.48k|  return do_not_proxy;
  517|  6.48k|}
proxy.c:proxy_detect_proxy:
  284|  3.65k|{
  285|       |  /* If proxy was not specified, we check for default proxy environment
  286|       |   * variables, to enable i.e Lynx compliance:
  287|       |   *
  288|       |   * http_proxy=http://some.server.dom:port/
  289|       |   * https_proxy=http://some.server.dom:port/
  290|       |   * ftp_proxy=http://some.server.dom:port/
  291|       |   * no_proxy=domain1.dom,host.domain2.dom
  292|       |   *   (a comma-separated list of hosts which should
  293|       |   *   not be proxied, or an asterisk to override
  294|       |   *   all proxy variables)
  295|       |   * all_proxy=http://some.server.dom:port/
  296|       |   *   (seems to exist for the CERN www lib. Probably
  297|       |   *   the first to check for.)
  298|       |   *
  299|       |   * For compatibility, the all-uppercase versions of these variables are
  300|       |   * checked if the lowercase versions do not exist.
  301|       |   */
  302|  3.65k|  const char *env_name = NULL;
  303|  3.65k|  char *proxy = NULL;
  304|  3.65k|  char name_buf[20];
  305|       |
  306|       |  /* Try scheme specific env var first, unless http(s).
  307|       |   * lowercase first, then uppercase. */
  308|  3.65k|  if((scheme != &Curl_scheme_https) && (scheme != &Curl_scheme_http)) {
  ------------------
  |  Branch (308:6): [True: 11, False: 3.64k]
  |  Branch (308:40): [True: 0, False: 11]
  ------------------
  309|      0|    curl_msnprintf(name_buf, sizeof(name_buf), "%s_proxy", scheme->name);
  310|      0|    env_name = name_buf;
  311|      0|    proxy = curl_getenv(env_name);
  312|      0|    if(!proxy) {
  ------------------
  |  Branch (312:8): [True: 0, False: 0]
  ------------------
  313|      0|      Curl_strntoupper(name_buf, name_buf, sizeof(name_buf));
  314|      0|      proxy = curl_getenv(env_name);
  315|      0|    }
  316|      0|  }
  317|       |
  318|  3.65k|  if(!proxy &&
  ------------------
  |  Branch (318:6): [True: 3.65k, False: 0]
  ------------------
  319|  3.65k|     ((scheme == &Curl_scheme_https) || (scheme == &Curl_scheme_wss))) {
  ------------------
  |  Branch (319:7): [True: 3.64k, False: 11]
  |  Branch (319:41): [True: 0, False: 11]
  ------------------
  320|       |    /* Not found, check 'https' env vars, also for 'wss'.
  321|       |     * Again, first lowercase then uppercase. */
  322|  3.64k|    env_name = "https_proxy";
  323|  3.64k|    proxy = curl_getenv(env_name);
  324|  3.64k|    if(!proxy) {
  ------------------
  |  Branch (324:8): [True: 3.64k, False: 0]
  ------------------
  325|  3.64k|      env_name = "HTTPS_PROXY";
  326|  3.64k|      proxy = curl_getenv(env_name);
  327|  3.64k|    }
  328|  3.64k|  }
  329|     11|  else if(!proxy &&
  ------------------
  |  Branch (329:11): [True: 11, False: 0]
  ------------------
  330|     11|          ((scheme == &Curl_scheme_http) || (scheme == &Curl_scheme_ws))) {
  ------------------
  |  Branch (330:12): [True: 11, False: 0]
  |  Branch (330:45): [True: 0, False: 0]
  ------------------
  331|       |    /* Not found, check 'http' env vars, also for 'ws'.
  332|       |     * We do NOT try the uppercase version 'HTTP_PROXY' because of
  333|       |     * security reasons:
  334|       |     *
  335|       |     * When curl is used in a webserver application
  336|       |     * environment (cgi or php), this environment variable can
  337|       |     * be controlled by the web server user by setting the
  338|       |     * http header 'Proxy:' to some value.
  339|       |     *
  340|       |     * This can cause 'internal' http/ftp requests to be
  341|       |     * arbitrarily redirected by any external attacker.
  342|       |     */
  343|     11|    env_name = "http_proxy";
  344|     11|    proxy = curl_getenv(env_name);
  345|     11|  }
  346|       |
  347|  3.65k|  if(!proxy) {
  ------------------
  |  Branch (347:6): [True: 3.65k, False: 0]
  ------------------
  348|       |    /* still not found, last resort checks. */
  349|  3.65k|    env_name = "all_proxy";
  350|  3.65k|    proxy = curl_getenv(env_name);
  351|  3.65k|    if(!proxy) {
  ------------------
  |  Branch (351:8): [True: 3.65k, False: 0]
  ------------------
  352|  3.65k|      env_name = "ALL_PROXY";
  353|  3.65k|      proxy = curl_getenv(env_name);
  354|  3.65k|    }
  355|  3.65k|  }
  356|       |
  357|  3.65k|  if(proxy)
  ------------------
  |  Branch (357:6): [True: 0, False: 3.65k]
  ------------------
  358|      0|    infof(data, "Uses proxy env variable %s == '%s'", env_name, proxy);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  359|       |
  360|  3.65k|  return proxy;
  361|  3.65k|}
proxy.c:parse_proxy:
  373|  2.84k|{
  374|  2.84k|  char *proxyuser = NULL;
  375|  2.84k|  char *proxypasswd = NULL;
  376|  2.84k|  char *scheme = NULL;
  377|  2.84k|  CURLcode result = CURLE_OK;
  378|       |  /* Set the start proxy type for URL scheme guessing */
  379|  2.84k|  uint8_t proxytype = for_pre_proxy ? CURLPROXY_SOCKS4 : data->set.proxytype;
  ------------------
  |  |  798|    499|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (379:23): [True: 499, False: 2.34k]
  ------------------
  380|  2.84k|  CURLU *uhp = curl_url();
  381|  2.84k|  CURLUcode uc;
  382|       |
  383|  2.84k|  if(!uhp) {
  ------------------
  |  Branch (383:6): [True: 0, False: 2.84k]
  ------------------
  384|      0|    result = CURLE_OUT_OF_MEMORY;
  385|      0|    goto error;
  386|      0|  }
  387|       |  /* When parsing the proxy, allowing non-supported schemes since we have
  388|       |     these made up ones for proxies. Guess scheme for URLs without it. */
  389|  2.84k|  uc = curl_url_set(uhp, CURLUPART_URL, proxy,
  390|  2.84k|                    CURLU_NON_SUPPORT_SCHEME | CURLU_GUESS_SCHEME);
  ------------------
  |  |   91|  2.84k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
                                  CURLU_NON_SUPPORT_SCHEME | CURLU_GUESS_SCHEME);
  ------------------
  |  |   97|  2.84k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  391|  2.84k|  if(!uc) {
  ------------------
  |  Branch (391:6): [True: 2.84k, False: 5]
  ------------------
  392|       |    /* parsed okay as a URL - only update proxytype when scheme was explicit */
  393|  2.84k|    uc = curl_url_get(uhp, CURLUPART_SCHEME, &scheme, CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  106|  2.84k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  394|  2.84k|    if(!uc) {
  ------------------
  |  Branch (394:8): [True: 437, False: 2.40k]
  ------------------
  395|    437|      result = Curl_scheme_to_proxytype(data, scheme, &proxytype, proxy);
  396|    437|      if(result)
  ------------------
  |  Branch (396:10): [True: 1, False: 436]
  ------------------
  397|      1|        goto error;
  398|    437|    }
  399|  2.40k|    else if(uc != CURLUE_NO_SCHEME) {
  ------------------
  |  Branch (399:13): [True: 0, False: 2.40k]
  ------------------
  400|      0|      result = CURLE_OUT_OF_MEMORY;
  401|      0|      goto error;
  402|      0|    }
  403|       |    /* else: no explicit scheme, keep the configured proxytype */
  404|  2.84k|  }
  405|      5|  else {
  406|      5|    failf(data, "Unsupported proxy syntax in \'%s\': %s", proxy,
  ------------------
  |  |   62|      5|#define failf Curl_failf
  ------------------
  407|      5|          curl_url_strerror(uc));
  408|      5|    result = CURLE_COULDNT_RESOLVE_PROXY;
  409|      5|    goto error;
  410|      5|  }
  411|       |
  412|  2.84k|  result = Curl_peer_from_proxy_url(uhp, data, proxy, proxytype,
  413|  2.84k|                                    &proxyinfo->peer, &proxytype);
  414|  2.84k|  if(result)
  ------------------
  |  Branch (414:6): [True: 6, False: 2.83k]
  ------------------
  415|      6|    goto error;
  416|       |
  417|  2.83k|  switch(proxytype) {
  418|  1.85k|    case CURLPROXY_HTTP:
  ------------------
  |  |  790|  1.85k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  |  Branch (418:5): [True: 1.85k, False: 982]
  ------------------
  419|  1.85k|    case CURLPROXY_HTTP_1_0:
  ------------------
  |  |  792|  1.85k|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (419:5): [True: 1, False: 2.83k]
  ------------------
  420|  2.29k|    case CURLPROXY_HTTPS:
  ------------------
  |  |  794|  2.29k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  ------------------
  |  Branch (420:5): [True: 437, False: 2.39k]
  ------------------
  421|  2.29k|    case CURLPROXY_HTTPS2:
  ------------------
  |  |  796|  2.29k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (421:5): [True: 2, False: 2.83k]
  ------------------
  422|  2.29k|    case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|  2.29k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (422:5): [True: 0, False: 2.83k]
  ------------------
  423|  2.29k|      if(for_pre_proxy) {
  ------------------
  |  Branch (423:10): [True: 2, False: 2.29k]
  ------------------
  424|      2|        failf(data, "Unsupported pre-proxy type for \'%s\'", proxy);
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  425|      2|        result = CURLE_COULDNT_RESOLVE_PROXY;
  426|      2|        goto error;
  427|      2|      }
  428|  2.29k|      break;
  429|  2.29k|    case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    495|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (429:5): [True: 495, False: 2.33k]
  ------------------
  430|    500|    case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|    500|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (430:5): [True: 5, False: 2.82k]
  ------------------
  431|    538|    case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|    538|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (431:5): [True: 38, False: 2.79k]
  ------------------
  432|    542|    case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|    542|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (432:5): [True: 4, False: 2.83k]
  ------------------
  433|    542|      break;
  434|      0|    default:
  ------------------
  |  Branch (434:5): [True: 0, False: 2.83k]
  ------------------
  435|      0|      failf(data, "Unsupported proxy type %u for \'%s\'", proxytype, proxy);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  436|      0|      result = CURLE_COULDNT_RESOLVE_PROXY;
  437|      0|      goto error;
  438|  2.83k|  }
  439|       |
  440|       |  /* Is there a username and password given in this proxy URL? */
  441|  2.83k|  uc = curl_url_get(uhp, CURLUPART_USER, &proxyuser, CURLU_URLDECODE);
  ------------------
  |  |   94|  2.83k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  442|  2.83k|  if(uc && (uc != CURLUE_NO_USER)) {
  ------------------
  |  Branch (442:6): [True: 1.37k, False: 1.45k]
  |  Branch (442:12): [True: 1, False: 1.37k]
  ------------------
  443|      1|    result = Curl_uc_to_curlcode(uc);
  444|      1|    goto error;
  445|      1|  }
  446|  2.83k|  uc = curl_url_get(uhp, CURLUPART_PASSWORD, &proxypasswd, CURLU_URLDECODE);
  ------------------
  |  |   94|  2.83k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  447|  2.83k|  if(uc && (uc != CURLUE_NO_PASSWORD)) {
  ------------------
  |  Branch (447:6): [True: 2.43k, False: 397]
  |  Branch (447:12): [True: 1, False: 2.43k]
  ------------------
  448|      1|    result = Curl_uc_to_curlcode(uc);
  449|      1|    goto error;
  450|      1|  }
  451|       |
  452|  2.83k|  if(proxyuser || proxypasswd) {
  ------------------
  |  Branch (452:6): [True: 1.45k, False: 1.37k]
  |  Branch (452:19): [True: 0, False: 1.37k]
  ------------------
  453|  1.45k|    result = Curl_creds_create(proxyuser, proxypasswd, NULL, NULL,
  454|  1.45k|                               data->set.str[STRING_PROXY_SERVICE_NAME],
  455|  1.45k|                               CREDS_URL, &proxyinfo->creds);
  ------------------
  |  |   30|  1.45k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
  456|  1.45k|    if(result)
  ------------------
  |  Branch (456:8): [True: 0, False: 1.45k]
  ------------------
  457|      0|      goto error;
  458|  1.45k|  }
  459|  1.37k|  else if(!for_pre_proxy &&
  ------------------
  |  Branch (459:11): [True: 911, False: 463]
  ------------------
  460|    911|          (data->set.str[STRING_PROXYUSERNAME] ||
  ------------------
  |  Branch (460:12): [True: 31, False: 880]
  ------------------
  461|    880|           data->set.str[STRING_PROXYPASSWORD] ||
  ------------------
  |  Branch (461:12): [True: 3, False: 877]
  ------------------
  462|    877|           data->set.str[STRING_PROXY_SERVICE_NAME])) {
  ------------------
  |  Branch (462:12): [True: 2, False: 875]
  ------------------
  463|       |    /* No user/passwd in URL, if this is not a pre-proxy, the
  464|       |     * CURLOPT_PROXY* settings apply. */
  465|     36|    result = Curl_creds_create(data->set.str[STRING_PROXYUSERNAME],
  466|     36|                               data->set.str[STRING_PROXYPASSWORD],
  467|     36|                               NULL, NULL,
  468|     36|                               data->set.str[STRING_PROXY_SERVICE_NAME],
  469|     36|                               CREDS_OPTION, &proxyinfo->creds);
  ------------------
  |  |   31|     36|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
  470|     36|  }
  471|  1.33k|  else
  472|  1.33k|    Curl_creds_unlink(&proxyinfo->creds);
  473|       |
  474|  2.83k|  proxyinfo->proxytype = proxytype;
  475|       |
  476|  2.84k|error:
  477|  2.84k|  curlx_free(scheme);
  ------------------
  |  | 1478|  2.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  478|  2.84k|  curlx_free(proxyuser);
  ------------------
  |  | 1478|  2.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  479|  2.84k|  curlx_free(proxypasswd);
  ------------------
  |  | 1478|  2.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  480|  2.84k|  curl_url_cleanup(uhp);
  481|  2.84k|#ifdef DEBUGBUILD
  482|  2.84k|  if(!result) {
  ------------------
  |  Branch (482:6): [True: 2.83k, False: 16]
  ------------------
  483|  2.83k|    DEBUGASSERT(proxyinfo);
  ------------------
  |  | 1079|  2.83k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (483:5): [True: 0, False: 2.83k]
  |  Branch (483:5): [True: 2.83k, False: 0]
  ------------------
  484|  2.83k|    DEBUGASSERT(proxyinfo->peer);
  ------------------
  |  | 1079|  2.83k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (484:5): [True: 0, False: 2.83k]
  |  Branch (484:5): [True: 2.83k, False: 0]
  ------------------
  485|  2.83k|  }
  486|  2.84k|#endif
  487|  2.84k|  return result;
  488|  2.84k|}

Curl_rand_bytes:
  144|     23|{
  145|     23|  CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
  146|       |#ifndef DEBUGBUILD
  147|       |  const bool env_override = FALSE;
  148|       |#endif
  149|       |
  150|     23|  DEBUGASSERT(num);
  ------------------
  |  | 1079|     23|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (150:3): [True: 0, False: 23]
  |  Branch (150:3): [True: 23, False: 0]
  ------------------
  151|       |
  152|     69|  while(num) {
  ------------------
  |  Branch (152:9): [True: 46, False: 23]
  ------------------
  153|     46|    unsigned int r;
  154|     46|    size_t left = num < sizeof(unsigned int) ? num : sizeof(unsigned int);
  ------------------
  |  Branch (154:19): [True: 0, False: 46]
  ------------------
  155|       |
  156|     46|    result = randit(data, &r, env_override);
  157|     46|    if(result)
  ------------------
  |  Branch (157:8): [True: 0, False: 46]
  ------------------
  158|      0|      return result;
  159|       |
  160|    230|    while(left) {
  ------------------
  |  Branch (160:11): [True: 184, False: 46]
  ------------------
  161|    184|      *rnd++ = (unsigned char)(r & 0xFF);
  162|    184|      r >>= 8;
  163|    184|      --num;
  164|    184|      --left;
  165|    184|    }
  166|     46|  }
  167|       |
  168|     23|  return result;
  169|     23|}
Curl_rand_alnum:
  209|    185|{
  210|    185|  CURLcode result = CURLE_OK;
  211|    185|  const unsigned int alnumspace = CURL_CSTRLEN(alnum);
  ------------------
  |  | 1296|    185|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  212|    185|  unsigned int r;
  213|    185|  DEBUGASSERT(num > 1);
  ------------------
  |  | 1079|    185|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (213:3): [True: 0, False: 185]
  |  Branch (213:3): [True: 185, False: 0]
  ------------------
  214|       |
  215|    185|  num--; /* save one for null-termination */
  216|       |
  217|  4.25k|  while(num) {
  ------------------
  |  Branch (217:9): [True: 4.07k, False: 185]
  ------------------
  218|  4.07k|    do {
  219|  4.07k|      result = randit(data, &r, TRUE);
  ------------------
  |  | 1053|  4.07k|#define TRUE true
  ------------------
  220|  4.07k|      if(result)
  ------------------
  |  Branch (220:10): [True: 0, False: 4.07k]
  ------------------
  221|      0|        return result;
  222|  4.07k|    } while(r >= (UINT_MAX - UINT_MAX % alnumspace));
  ------------------
  |  Branch (222:13): [True: 0, False: 4.07k]
  ------------------
  223|       |
  224|  4.07k|    *rnd++ = (unsigned char)alnum[r % alnumspace];
  225|  4.07k|    num--;
  226|  4.07k|  }
  227|    185|  *rnd = 0;
  228|       |
  229|    185|  return result;
  230|    185|}
rand.c:randit:
   89|  4.11k|{
   90|  4.11k|#ifdef DEBUGBUILD
   91|  4.11k|  if(env_override) {
  ------------------
  |  Branch (91:6): [True: 4.11k, False: 0]
  ------------------
   92|  4.11k|    char *force_entropy = getenv("CURL_ENTROPY");
   93|  4.11k|    if(force_entropy) {
  ------------------
  |  Branch (93:8): [True: 0, False: 4.11k]
  ------------------
   94|      0|      static unsigned int randseed;
   95|      0|      static bool seeded = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
   96|       |
   97|      0|      if(!seeded) {
  ------------------
  |  Branch (97:10): [True: 0, False: 0]
  ------------------
   98|      0|        unsigned int seed = 0;
   99|      0|        size_t elen = strlen(force_entropy);
  100|      0|        size_t clen = sizeof(seed);
  101|      0|        size_t min = elen < clen ? elen : clen;
  ------------------
  |  Branch (101:22): [True: 0, False: 0]
  ------------------
  102|      0|        memcpy((char *)&seed, force_entropy, min);
  103|      0|        randseed = ntohl(seed);
  104|      0|        seeded = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  105|      0|      }
  106|      0|      else
  107|      0|        randseed++;
  108|      0|      *rnd = randseed;
  109|      0|      return CURLE_OK;
  110|      0|    }
  111|  4.11k|  }
  112|       |#else
  113|       |  (void)env_override;
  114|       |#endif
  115|       |
  116|       |  /* data may be NULL! */
  117|  4.11k|#ifdef USE_SSL
  118|  4.11k|  return Curl_ssl_random(data, (unsigned char *)rnd, sizeof(*rnd));
  119|       |#else
  120|       |  return weak_random(data, (unsigned char *)rnd, sizeof(*rnd));
  121|       |#endif
  122|  4.11k|}

Curl_rlimit_init:
  158|    150|{
  159|    150|  DEBUGASSERT(rate_per_sec >= 0);
  ------------------
  |  | 1079|    150|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (159:3): [True: 0, False: 150]
  |  Branch (159:3): [True: 150, False: 0]
  ------------------
  160|    150|  DEBUGASSERT(burst_per_sec >= rate_per_sec || !burst_per_sec);
  ------------------
  |  | 1079|    150|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (160:3): [True: 150, False: 0]
  |  Branch (160:3): [True: 0, False: 0]
  |  Branch (160:3): [True: 150, False: 0]
  |  Branch (160:3): [True: 0, False: 0]
  ------------------
  161|    150|  DEBUGASSERT(pts);
  ------------------
  |  | 1079|    150|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (161:3): [True: 0, False: 150]
  |  Branch (161:3): [True: 150, False: 0]
  ------------------
  162|    150|  r->rate_per_step = r->rate_per_sec = rate_per_sec;
  163|    150|  r->burst_per_step = r->burst_per_sec = burst_per_sec;
  164|    150|  r->step_us = CURL_US_PER_SEC;
  ------------------
  |  |   29|    150|#define CURL_US_PER_SEC         1000000
  ------------------
  165|    150|  r->spare_us = 0;
  166|    150|  r->tokens = r->rate_per_step;
  167|    150|  r->ts = *pts;
  168|       |  r->blocked = FALSE;
  ------------------
  |  | 1056|    150|#define FALSE false
  ------------------
  169|    150|}
Curl_rlimit_is_blocked:
  196|  10.1k|{
  197|  10.1k|  return (bool)r->blocked;
  198|  10.1k|}
Curl_rlimit_avail:
  202|    148|{
  203|    148|  struct curltime ts;
  204|       |
  205|    148|  if(r->blocked)
  ------------------
  |  Branch (205:6): [True: 0, False: 148]
  ------------------
  206|      0|    return 0;
  207|    148|  else if(r->rate_per_step) {
  ------------------
  |  Branch (207:11): [True: 69, False: 79]
  ------------------
  208|     69|    if(!pts) {
  ------------------
  |  Branch (208:8): [True: 69, False: 0]
  ------------------
  209|     69|      curlx_pnow(&ts);
  210|     69|      pts = &ts;
  211|     69|    }
  212|     69|    rlimit_update(r, pts);
  213|     69|    return r->tokens;
  214|     69|  }
  215|     79|  else
  216|     79|    return INT64_MAX;
  217|    148|}
Curl_rlimit_block:
  292|  16.7k|{
  293|  16.7k|  if(!activate == !r->blocked)
  ------------------
  |  Branch (293:6): [True: 16.7k, False: 0]
  ------------------
  294|  16.7k|    return;
  295|       |
  296|      0|  r->ts = *pts;
  297|      0|  r->blocked = activate;
  298|      0|  if(!r->blocked) {
  ------------------
  |  Branch (298:6): [True: 0, False: 0]
  ------------------
  299|       |    /* Start rate limiting fresh. The amount of time this was blocked
  300|       |     * does not generate extra tokens. */
  301|      0|    Curl_rlimit_start(r, pts, -1);
  302|      0|  }
  303|      0|  else {
  304|      0|    r->tokens = 0;
  305|      0|  }
  306|      0|}
ratelimit.c:rlimit_update:
   35|     69|{
   36|     69|  timediff_t elapsed_us, elapsed_steps;
   37|     69|  int64_t token_gain;
   38|       |
   39|     69|  DEBUGASSERT(r->rate_per_step);
  ------------------
  |  | 1079|     69|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 69]
  |  Branch (39:3): [True: 69, False: 0]
  ------------------
   40|     69|  if((r->ts.tv_sec == pts->tv_sec) && (r->ts.tv_usec == pts->tv_usec))
  ------------------
  |  Branch (40:6): [True: 67, False: 2]
  |  Branch (40:39): [True: 0, False: 67]
  ------------------
   41|      0|    return;
   42|       |
   43|     69|  elapsed_us = curlx_ptimediff_us(pts, &r->ts);
   44|     69|  if(elapsed_us < 0) { /* not going back in time */
  ------------------
  |  Branch (44:6): [True: 0, False: 69]
  ------------------
   45|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (45:5): [Folded, False: 0]
  |  Branch (45:5): [Folded, False: 0]
  ------------------
   46|      0|    return;
   47|      0|  }
   48|       |
   49|     69|  elapsed_us += r->spare_us;
   50|     69|  if(elapsed_us < r->step_us)
  ------------------
  |  Branch (50:6): [True: 69, False: 0]
  ------------------
   51|     69|    return;
   52|       |
   53|       |  /* we do the update */
   54|      0|  r->ts = *pts;
   55|      0|  elapsed_steps = elapsed_us / r->step_us;
   56|      0|  r->spare_us = elapsed_us % r->step_us;
   57|       |
   58|       |  /* How many tokens did we gain since the last update? */
   59|      0|  if(r->rate_per_step > (INT64_MAX / elapsed_steps))
  ------------------
  |  Branch (59:6): [True: 0, False: 0]
  ------------------
   60|      0|    token_gain = INT64_MAX;
   61|      0|  else {
   62|      0|    token_gain = r->rate_per_step * elapsed_steps;
   63|      0|  }
   64|       |
   65|      0|  if((INT64_MAX - token_gain) > r->tokens)
  ------------------
  |  Branch (65:6): [True: 0, False: 0]
  ------------------
   66|      0|    r->tokens += token_gain;
   67|      0|  else
   68|      0|    r->tokens = INT64_MAX;
   69|       |
   70|       |  /* Limit the token again by the burst rate (if set), so we
   71|       |   * do not suddenly have a huge number of tokens after inactivity. */
   72|      0|  if(r->burst_per_step && (r->tokens > r->burst_per_step)) {
  ------------------
  |  Branch (72:6): [True: 0, False: 0]
  |  Branch (72:27): [True: 0, False: 0]
  ------------------
   73|      0|    r->tokens = r->burst_per_step;
   74|      0|  }
   75|      0|}

Curl_req_init:
   39|  26.2k|{
   40|  26.2k|  memset(req, 0, sizeof(*req));
   41|  26.2k|}
Curl_req_soft_reset:
   45|  6.25k|{
   46|  6.25k|  CURLcode result;
   47|       |
   48|  6.25k|  req->done = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   49|  6.25k|  req->upload_done = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   50|  6.25k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   51|  6.25k|  req->download_done = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   52|  6.25k|  req->eos_written = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   53|  6.25k|  req->eos_read = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   54|  6.25k|  req->eos_sent = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   55|  6.25k|  req->ignorebody = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   56|  6.25k|  req->shutdown = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   57|  6.25k|  req->bytecount = 0;
   58|  6.25k|  req->writebytecount = 0;
   59|  6.25k|  req->header = FALSE;
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
   60|  6.25k|  req->headerline = 0;
   61|  6.25k|  req->headerbytecount = 0;
   62|  6.25k|  req->allheadercount = 0;
   63|  6.25k|  req->deductheadercount = 0;
   64|  6.25k|  req->httpversion_sent = 0;
   65|  6.25k|  req->httpversion = 0;
   66|  6.25k|  req->sendbuf_hds_len = 0;
   67|       |
   68|  6.25k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1336|  6.25k|  do {                      \
  |  | 1337|  6.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  6.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  6.25k|    (ptr) = NULL;           \
  |  | 1339|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
   69|  6.25k|#ifndef CURL_DISABLE_PROXY
   70|  6.25k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1336|  6.25k|  do {                      \
  |  | 1337|  6.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  6.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  6.25k|    (ptr) = NULL;           \
  |  | 1339|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
   71|  6.25k|#endif
   72|       |
   73|  6.25k|  result = Curl_client_start(data);
   74|  6.25k|  if(result)
  ------------------
  |  Branch (74:6): [True: 0, False: 6.25k]
  ------------------
   75|      0|    return result;
   76|       |
   77|  6.25k|  if(!req->sendbuf_init) {
  ------------------
  |  Branch (77:6): [True: 6.25k, False: 5]
  ------------------
   78|  6.25k|    Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   79|  6.25k|                    BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|  6.25k|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   80|  6.25k|    req->sendbuf_init = TRUE;
  ------------------
  |  | 1053|  6.25k|#define TRUE true
  ------------------
   81|  6.25k|  }
   82|      5|  else {
   83|      5|    Curl_bufq_reset(&req->sendbuf);
   84|      5|    if(data->set.upload_buffer_size != req->sendbuf.chunk_size) {
  ------------------
  |  Branch (84:8): [True: 0, False: 5]
  ------------------
   85|      0|      Curl_bufq_free(&req->sendbuf);
   86|      0|      Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   87|      0|                      BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|      0|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   88|      0|    }
   89|      5|  }
   90|       |
   91|  6.25k|  return CURLE_OK;
   92|  6.25k|}
Curl_req_start:
   96|  6.25k|{
   97|  6.25k|  req->start = *Curl_pgrs_now(data);
   98|  6.25k|  return Curl_req_soft_reset(req, data);
   99|  6.25k|}
Curl_req_done:
  105|    596|{
  106|    596|  (void)req;
  107|    596|  if(!aborted)
  ------------------
  |  Branch (107:6): [True: 0, False: 596]
  ------------------
  108|      0|    (void)req_flush(data);
  109|    596|  Curl_client_reset(data);
  110|    596|  return CURLE_OK;
  111|    596|}
Curl_req_hard_reset:
  114|  8.39k|{
  115|  8.39k|  struct curltime t0 = { 0, 0 };
  116|       |
  117|  8.39k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1336|  8.39k|  do {                      \
  |  | 1337|  8.39k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  8.39k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  8.39k|    (ptr) = NULL;           \
  |  | 1339|  8.39k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 8.39k]
  |  |  ------------------
  ------------------
  118|  8.39k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1336|  8.39k|  do {                      \
  |  | 1337|  8.39k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  8.39k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  8.39k|    (ptr) = NULL;           \
  |  | 1339|  8.39k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 8.39k]
  |  |  ------------------
  ------------------
  119|  8.39k|#ifndef CURL_DISABLE_PROXY
  120|  8.39k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1336|  8.39k|  do {                      \
  |  | 1337|  8.39k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  8.39k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  8.39k|    (ptr) = NULL;           \
  |  | 1339|  8.39k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 8.39k]
  |  |  ------------------
  ------------------
  121|  8.39k|#endif
  122|  8.39k|#ifndef CURL_DISABLE_COOKIES
  123|  8.39k|  curlx_safefree(req->cookiehost);
  ------------------
  |  | 1336|  8.39k|  do {                      \
  |  | 1337|  8.39k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  8.39k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  8.39k|    (ptr) = NULL;           \
  |  | 1339|  8.39k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 8.39k]
  |  |  ------------------
  ------------------
  124|  8.39k|#endif
  125|  8.39k|  Curl_client_reset(data);
  126|  8.39k|  if(req->sendbuf_init)
  ------------------
  |  Branch (126:6): [True: 0, False: 8.39k]
  ------------------
  127|      0|    Curl_bufq_reset(&req->sendbuf);
  128|       |
  129|       |  /* clear any resolve data */
  130|  8.39k|  Curl_resolv_destroy_all(data);
  131|       |  /* Can no longer memset() this struct as we need to keep some state */
  132|  8.39k|  req->size = -1;
  133|  8.39k|  req->maxdownload = -1;
  134|  8.39k|  req->bytecount = 0;
  135|  8.39k|  req->writebytecount = 0;
  136|  8.39k|  req->start = t0;
  137|  8.39k|  req->headerbytecount = 0;
  138|  8.39k|  req->allheadercount = 0;
  139|  8.39k|  req->deductheadercount = 0;
  140|  8.39k|  req->headerline = 0;
  141|  8.39k|  req->offset = 0;
  142|  8.39k|  req->httpcode = 0;
  143|  8.39k|  req->io_flags = 0;
  144|  8.39k|  req->upgr101 = UPGR101_NONE;
  145|  8.39k|  req->sendbuf_hds_len = 0;
  146|  8.39k|  req->timeofdoc = 0;
  147|  8.39k|  req->location = NULL;
  148|  8.39k|  req->newurl = NULL;
  149|  8.39k|#ifndef CURL_DISABLE_COOKIES
  150|  8.39k|  req->setcookies = 0;
  151|  8.39k|#endif
  152|  8.39k|  req->header = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  153|  8.39k|  req->content_range = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  154|  8.39k|  req->download_done = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  155|  8.39k|  req->eos_written = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  156|  8.39k|  req->eos_read = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  157|  8.39k|  req->eos_sent = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  158|  8.39k|  req->rewind_read = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  159|  8.39k|  req->upload_done = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  160|  8.39k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  161|  8.39k|  req->ignorebody = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  162|  8.39k|  req->http_bodyless = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  163|  8.39k|  req->chunk = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  164|  8.39k|  req->resp_trailer = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  165|  8.39k|  req->ignore_cl = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  166|  8.39k|  req->upload_chunky = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  167|  8.39k|  req->no_body = data->set.opt_no_body;
  168|  8.39k|  req->authneg = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  169|  8.39k|  req->shutdown = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  170|       |  /* Unpause all directions */
  171|  8.39k|  Curl_rlimit_block(&data->progress.dl.rlimit, FALSE, &t0);
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  172|       |  Curl_rlimit_block(&data->progress.ul.rlimit, FALSE, &t0);
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
  173|  8.39k|}
Curl_req_free:
  176|  26.2k|{
  177|  26.2k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  178|  26.2k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  179|  26.2k|#ifndef CURL_DISABLE_PROXY
  180|  26.2k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  181|  26.2k|#endif
  182|  26.2k|  if(req->sendbuf_init)
  ------------------
  |  Branch (182:6): [True: 6.25k, False: 19.9k]
  ------------------
  183|  6.25k|    Curl_bufq_free(&req->sendbuf);
  184|  26.2k|  Curl_client_cleanup(data);
  185|  26.2k|}

Curl_socket_check:
  124|     30|{
  125|     30|  struct pollfd pfd[3];
  126|     30|  int num;
  127|     30|  int r;
  128|       |
  129|     30|  if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
                if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (129:6): [True: 30, False: 0]
  |  Branch (129:38): [True: 30, False: 0]
  ------------------
  130|     30|     (writefd == CURL_SOCKET_BAD)) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (130:6): [True: 0, False: 30]
  ------------------
  131|       |    /* no sockets, wait */
  132|      0|    return curlx_wait_ms(timeout_ms);
  133|      0|  }
  134|       |
  135|       |  /* Avoid initial timestamp, avoid curlx_now() call, when elapsed
  136|       |     time in this function does not need to be measured. This happens
  137|       |     when function is called with a zero timeout or a negative timeout
  138|       |     value indicating a blocking call should be performed. */
  139|       |
  140|     30|  num = 0;
  141|     30|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (141:6): [True: 0, False: 30]
  ------------------
  142|      0|    pfd[num].fd = readfd0;
  143|      0|    pfd[num].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
  144|      0|    pfd[num].revents = 0;
  145|      0|    num++;
  146|      0|  }
  147|     30|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (147:6): [True: 0, False: 30]
  ------------------
  148|      0|    pfd[num].fd = readfd1;
  149|      0|    pfd[num].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
  150|      0|    pfd[num].revents = 0;
  151|      0|    num++;
  152|      0|  }
  153|     30|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (153:6): [True: 30, False: 0]
  ------------------
  154|     30|    pfd[num].fd = writefd;
  155|     30|    pfd[num].events = POLLWRNORM | POLLOUT | POLLPRI;
  156|     30|    pfd[num].revents = 0;
  157|     30|    num++;
  158|     30|  }
  159|       |
  160|     30|  r = Curl_poll(pfd, (unsigned int)num, timeout_ms);
  161|     30|  if(r <= 0)
  ------------------
  |  Branch (161:6): [True: 24, False: 6]
  ------------------
  162|     24|    return r;
  163|       |
  164|      6|  r = 0;
  165|      6|  num = 0;
  166|      6|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|      6|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (166:6): [True: 0, False: 6]
  ------------------
  167|      0|    if(pfd[num].revents & (POLLRDNORM | POLLIN | POLLERR | POLLHUP))
  ------------------
  |  Branch (167:8): [True: 0, False: 0]
  ------------------
  168|      0|      r |= CURL_CSELECT_IN;
  ------------------
  |  |  290|      0|#define CURL_CSELECT_IN   0x01
  ------------------
  169|      0|    if(pfd[num].revents & (POLLPRI | POLLNVAL))
  ------------------
  |  Branch (169:8): [True: 0, False: 0]
  ------------------
  170|      0|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|      0|#define CURL_CSELECT_ERR  0x04
  ------------------
  171|      0|    num++;
  172|      0|  }
  173|      6|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|      6|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (173:6): [True: 0, False: 6]
  ------------------
  174|      0|    if(pfd[num].revents & (POLLRDNORM | POLLIN | POLLERR | POLLHUP))
  ------------------
  |  Branch (174:8): [True: 0, False: 0]
  ------------------
  175|      0|      r |= CURL_CSELECT_IN2;
  ------------------
  |  |   70|      0|#define CURL_CSELECT_IN2 (CURL_CSELECT_ERR << 1)
  |  |  ------------------
  |  |  |  |  292|      0|#define CURL_CSELECT_ERR  0x04
  |  |  ------------------
  ------------------
  176|      0|    if(pfd[num].revents & (POLLPRI | POLLNVAL))
  ------------------
  |  Branch (176:8): [True: 0, False: 0]
  ------------------
  177|      0|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|      0|#define CURL_CSELECT_ERR  0x04
  ------------------
  178|      0|    num++;
  179|      0|  }
  180|      6|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|      6|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (180:6): [True: 6, False: 0]
  ------------------
  181|      6|    if(pfd[num].revents & (POLLWRNORM | POLLOUT))
  ------------------
  |  Branch (181:8): [True: 6, False: 0]
  ------------------
  182|      6|      r |= CURL_CSELECT_OUT;
  ------------------
  |  |  291|      6|#define CURL_CSELECT_OUT  0x02
  ------------------
  183|      6|    if(pfd[num].revents & (POLLERR | POLLHUP | POLLPRI | POLLNVAL))
  ------------------
  |  Branch (183:8): [True: 6, False: 0]
  ------------------
  184|      6|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|      6|#define CURL_CSELECT_ERR  0x04
  ------------------
  185|      6|  }
  186|       |
  187|      6|  return r;
  188|     30|}
Curl_poll:
  204|     30|{
  205|     30|#ifdef HAVE_POLL
  206|     30|  int pending_ms;
  207|       |#else
  208|       |  fd_set fds_read;
  209|       |  fd_set fds_write;
  210|       |  fd_set fds_err;
  211|       |  curl_socket_t maxfd;
  212|       |#endif
  213|     30|  bool fds_none = TRUE;
  ------------------
  |  | 1053|     30|#define TRUE true
  ------------------
  214|     30|  unsigned int i;
  215|     30|  int r;
  216|       |
  217|     30|  if(ufds) {
  ------------------
  |  Branch (217:6): [True: 30, False: 0]
  ------------------
  218|     30|    for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (218:16): [True: 30, False: 0]
  ------------------
  219|     30|      if(ufds[i].fd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (219:10): [True: 30, False: 0]
  ------------------
  220|     30|        fds_none = FALSE;
  ------------------
  |  | 1056|     30|#define FALSE false
  ------------------
  221|     30|        break;
  222|     30|      }
  223|     30|    }
  224|     30|  }
  225|     30|  if(fds_none) {
  ------------------
  |  Branch (225:6): [True: 0, False: 30]
  ------------------
  226|       |    /* no sockets, wait */
  227|      0|    return curlx_wait_ms(timeout_ms);
  228|      0|  }
  229|       |
  230|       |  /* Avoid initial timestamp, avoid curlx_now() call, when elapsed
  231|       |     time in this function does not need to be measured. This happens
  232|       |     when function is called with a zero timeout or a negative timeout
  233|       |     value indicating a blocking call should be performed. */
  234|       |
  235|     30|#ifdef HAVE_POLL
  236|       |
  237|       |  /* prevent overflow, timeout_ms is typecast to int. */
  238|     30|#if TIMEDIFF_T_MAX > INT_MAX
  239|     30|  if(timeout_ms > INT_MAX)
  ------------------
  |  Branch (239:6): [True: 0, False: 30]
  ------------------
  240|      0|    timeout_ms = INT_MAX;
  241|     30|#endif
  242|     30|  if(timeout_ms > 0)
  ------------------
  |  Branch (242:6): [True: 0, False: 30]
  ------------------
  243|      0|    pending_ms = (int)timeout_ms;
  244|     30|  else if(timeout_ms < 0)
  ------------------
  |  Branch (244:11): [True: 0, False: 30]
  ------------------
  245|      0|    pending_ms = -1;
  246|     30|  else
  247|     30|    pending_ms = 0;
  248|     30|  r = poll(ufds, nfds, pending_ms);
  249|     30|  if(r <= 0) {
  ------------------
  |  Branch (249:6): [True: 24, False: 6]
  ------------------
  250|     24|    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1093|      0|#define SOCKERRNO         errno
  ------------------
                  if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1127|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (250:8): [True: 0, False: 24]
  |  Branch (250:21): [True: 0, False: 0]
  ------------------
  251|       |      /* make EINTR from select or poll not a "lethal" error */
  252|      0|      r = 0;
  253|     24|    return r;
  254|     24|  }
  255|       |
  256|     12|  for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (256:14): [True: 6, False: 6]
  ------------------
  257|      6|    if(ufds[i].fd == CURL_SOCKET_BAD)
  ------------------
  |  |  145|      6|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (257:8): [True: 0, False: 6]
  ------------------
  258|      0|      continue;
  259|      6|    if(ufds[i].revents & POLLHUP)
  ------------------
  |  Branch (259:8): [True: 6, False: 0]
  ------------------
  260|      6|      ufds[i].revents |= POLLIN;
  261|      6|    if(ufds[i].revents & POLLERR)
  ------------------
  |  Branch (261:8): [True: 6, False: 0]
  ------------------
  262|      6|      ufds[i].revents |= POLLIN | POLLOUT;
  263|      6|  }
  264|       |
  265|       |#else /* !HAVE_POLL */
  266|       |
  267|       |  FD_ZERO(&fds_read);
  268|       |  FD_ZERO(&fds_write);
  269|       |  FD_ZERO(&fds_err);
  270|       |  maxfd = (curl_socket_t)-1;
  271|       |
  272|       |  for(i = 0; i < nfds; i++) {
  273|       |    ufds[i].revents = 0;
  274|       |    if(ufds[i].fd == CURL_SOCKET_BAD)
  275|       |      continue;
  276|       |    VERIFY_SOCK(ufds[i].fd);
  277|       |    if(ufds[i].events & (POLLIN | POLLOUT | POLLPRI |
  278|       |                         POLLRDNORM | POLLWRNORM | POLLRDBAND)) {
  279|       |      if(ufds[i].fd > maxfd)
  280|       |        maxfd = ufds[i].fd;
  281|       |      if(ufds[i].events & (POLLRDNORM | POLLIN))
  282|       |        FD_SET(ufds[i].fd, &fds_read);
  283|       |      if(ufds[i].events & (POLLWRNORM | POLLOUT))
  284|       |        FD_SET(ufds[i].fd, &fds_write);
  285|       |      if(ufds[i].events & (POLLRDBAND | POLLPRI))
  286|       |        FD_SET(ufds[i].fd, &fds_err);
  287|       |    }
  288|       |  }
  289|       |
  290|       |  /* Note also that Winsock ignores the first argument, so we do not worry
  291|       |     about the fact that maxfd is computed incorrectly with Winsock (since
  292|       |     curl_socket_t is unsigned in such cases and thus -1 is the largest
  293|       |     value). */
  294|       |  r = our_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
  295|       |  if(r <= 0) {
  296|       |    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  297|       |      /* make EINTR from select or poll not a "lethal" error */
  298|       |      r = 0;
  299|       |    return r;
  300|       |  }
  301|       |
  302|       |  r = 0;
  303|       |  for(i = 0; i < nfds; i++) {
  304|       |    ufds[i].revents = 0;
  305|       |    if(ufds[i].fd == CURL_SOCKET_BAD)
  306|       |      continue;
  307|       |    if(FD_ISSET(ufds[i].fd, &fds_read)) {
  308|       |      if(ufds[i].events & POLLRDNORM)
  309|       |        ufds[i].revents |= POLLRDNORM;
  310|       |      if(ufds[i].events & POLLIN)
  311|       |        ufds[i].revents |= POLLIN;
  312|       |    }
  313|       |    if(FD_ISSET(ufds[i].fd, &fds_write)) {
  314|       |      if(ufds[i].events & POLLWRNORM)
  315|       |        ufds[i].revents |= POLLWRNORM;
  316|       |      if(ufds[i].events & POLLOUT)
  317|       |        ufds[i].revents |= POLLOUT;
  318|       |    }
  319|       |    if(FD_ISSET(ufds[i].fd, &fds_err)) {
  320|       |      if(ufds[i].events & POLLRDBAND)
  321|       |        ufds[i].revents |= POLLRDBAND;
  322|       |      if(ufds[i].events & POLLPRI)
  323|       |        ufds[i].revents |= POLLPRI;
  324|       |    }
  325|       |    if(ufds[i].revents)
  326|       |      r++;
  327|       |  }
  328|       |
  329|       |#endif /* HAVE_POLL */
  330|       |
  331|      6|  return r;
  332|     30|}
Curl_pollfds_init:
  337|  7.88k|{
  338|  7.88k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1079|  7.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (338:3): [True: 0, False: 7.88k]
  |  Branch (338:3): [True: 7.88k, False: 0]
  ------------------
  339|  7.88k|  memset(cpfds, 0, sizeof(*cpfds));
  340|  7.88k|  if(static_pfds && static_count) {
  ------------------
  |  Branch (340:6): [True: 7.88k, False: 0]
  |  Branch (340:21): [True: 7.88k, False: 0]
  ------------------
  341|  7.88k|    cpfds->pfds = static_pfds;
  342|  7.88k|    cpfds->count = static_count;
  343|  7.88k|  }
  344|  7.88k|}
Curl_pollfds_cleanup:
  352|  7.88k|{
  353|  7.88k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1079|  7.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (353:3): [True: 0, False: 7.88k]
  |  Branch (353:3): [True: 7.88k, False: 0]
  ------------------
  354|  7.88k|  if(cpfds->allocated_pfds) {
  ------------------
  |  Branch (354:6): [True: 0, False: 7.88k]
  ------------------
  355|      0|    curlx_free(cpfds->pfds);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  356|      0|  }
  357|  7.88k|  memset(cpfds, 0, sizeof(*cpfds));
  358|  7.88k|}
Curl_pollset_reset:
  486|  23.3k|{
  487|  23.3k|  unsigned int i;
  488|  23.3k|  ps->n = 0;
  489|  23.3k|#ifdef DEBUGBUILD
  490|  23.3k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1079|  23.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (490:3): [True: 0, False: 23.3k]
  |  Branch (490:3): [True: 23.3k, False: 0]
  ------------------
  491|  23.3k|#endif
  492|  23.3k|  DEBUGASSERT(ps->count);
  ------------------
  |  | 1079|  23.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (492:3): [True: 0, False: 23.3k]
  |  Branch (492:3): [True: 23.3k, False: 0]
  ------------------
  493|  69.9k|  for(i = 0; i < ps->count; i++)
  ------------------
  |  Branch (493:14): [True: 46.6k, False: 23.3k]
  ------------------
  494|  46.6k|    ps->sockets[i] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  69.9k|#define CURL_SOCKET_BAD (-1)
  ------------------
  495|  23.3k|  memset(ps->actions, 0, ps->count * sizeof(ps->actions[0]));
  496|  23.3k|}
Curl_pollset_init:
  499|  9.65k|{
  500|  9.65k|#ifdef DEBUGBUILD
  501|  9.65k|  ps->init = CURL_EASY_POLLSET_MAGIC;
  ------------------
  |  |  129|  9.65k|#define CURL_EASY_POLLSET_MAGIC  0x7a657370
  ------------------
  502|  9.65k|#endif
  503|  9.65k|  ps->sockets = ps->def_sockets;
  504|  9.65k|  ps->actions = ps->def_actions;
  505|  9.65k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1303|  9.65k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  506|  9.65k|  ps->n = 0;
  507|  9.65k|  Curl_pollset_reset(ps);
  508|  9.65k|}
Curl_pollset_cleanup:
  519|  9.65k|{
  520|  9.65k|#ifdef DEBUGBUILD
  521|  9.65k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1079|  9.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (521:3): [True: 0, False: 9.65k]
  |  Branch (521:3): [True: 9.65k, False: 0]
  ------------------
  522|  9.65k|#endif
  523|  9.65k|  if(ps->sockets != ps->def_sockets) {
  ------------------
  |  Branch (523:6): [True: 0, False: 9.65k]
  ------------------
  524|      0|    curlx_free(ps->sockets);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  525|      0|    ps->sockets = ps->def_sockets;
  526|      0|  }
  527|  9.65k|  if(ps->actions != ps->def_actions) {
  ------------------
  |  Branch (527:6): [True: 0, False: 9.65k]
  ------------------
  528|      0|    curlx_free(ps->actions);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  529|      0|    ps->actions = ps->def_actions;
  530|      0|  }
  531|  9.65k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1303|  9.65k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  532|  9.65k|  Curl_pollset_reset(ps);
  533|  9.65k|}
Curl_pollset_change:
  562|  3.80k|{
  563|  3.80k|  unsigned int i;
  564|       |
  565|  3.80k|#ifdef DEBUGBUILD
  566|  3.80k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1079|  3.80k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (566:3): [True: 0, False: 3.80k]
  |  Branch (566:3): [True: 3.80k, False: 0]
  ------------------
  567|  3.80k|#endif
  568|       |
  569|  3.80k|  DEBUGASSERT(VALID_SOCK(sock));
  ------------------
  |  | 1079|  3.80k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (569:3): [True: 0, False: 3.80k]
  |  Branch (569:3): [True: 3.80k, False: 0]
  ------------------
  570|  3.80k|  if(!VALID_SOCK(sock))
  ------------------
  |  |   96|  3.80k|#define VALID_SOCK(s) ((s) >= 0)
  ------------------
  |  Branch (570:6): [True: 0, False: 3.80k]
  ------------------
  571|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  572|       |
  573|  3.80k|  DEBUGASSERT(add_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1079|  3.80k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (573:3): [True: 0, False: 3.80k]
  |  Branch (573:3): [True: 3.80k, False: 0]
  ------------------
  574|  3.80k|  DEBUGASSERT(remove_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1079|  3.80k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (574:3): [True: 0, False: 3.80k]
  |  Branch (574:3): [True: 3.80k, False: 0]
  ------------------
  575|  3.80k|  DEBUGASSERT((add_flags & remove_flags) == 0); /* no overlap */
  ------------------
  |  | 1079|  3.80k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (575:3): [True: 0, False: 3.80k]
  |  Branch (575:3): [True: 3.80k, False: 0]
  ------------------
  576|  3.80k|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (576:14): [True: 1.02k, False: 2.78k]
  ------------------
  577|  1.02k|    if(ps->sockets[i] == sock) {
  ------------------
  |  Branch (577:8): [True: 1.02k, False: 0]
  ------------------
  578|  1.02k|      ps->actions[i] &= (unsigned char)(~remove_flags);
  579|  1.02k|      ps->actions[i] |= (unsigned char)add_flags;
  580|       |      /* all gone? remove socket */
  581|  1.02k|      if(!ps->actions[i]) {
  ------------------
  |  Branch (581:10): [True: 0, False: 1.02k]
  ------------------
  582|      0|        if((i + 1) < ps->n) {
  ------------------
  |  Branch (582:12): [True: 0, False: 0]
  ------------------
  583|      0|          memmove(&ps->sockets[i], &ps->sockets[i + 1],
  584|      0|                  (ps->n - (i + 1)) * sizeof(ps->sockets[0]));
  585|      0|          memmove(&ps->actions[i], &ps->actions[i + 1],
  586|      0|                  (ps->n - (i + 1)) * sizeof(ps->actions[0]));
  587|      0|        }
  588|      0|        --ps->n;
  589|      0|      }
  590|  1.02k|      return CURLE_OK;
  591|  1.02k|    }
  592|  1.02k|  }
  593|       |  /* not present */
  594|  2.78k|  if(add_flags) {
  ------------------
  |  Branch (594:6): [True: 2.78k, False: 0]
  ------------------
  595|  2.78k|    if(i >= ps->count) { /* need to grow */
  ------------------
  |  Branch (595:8): [True: 0, False: 2.78k]
  ------------------
  596|      0|      unsigned int new_count = CURLMAX(ps->count * 2, 8);
  ------------------
  |  | 1291|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  597|      0|      curl_socket_t *nsockets;
  598|      0|      unsigned char *nactions;
  599|       |
  600|      0|      CURL_TRC_M(data, "growing pollset capacity from %u to %u",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  601|      0|                 ps->count, new_count);
  602|      0|      if(new_count <= ps->count)
  ------------------
  |  Branch (602:10): [True: 0, False: 0]
  ------------------
  603|      0|        return CURLE_OUT_OF_MEMORY;
  604|      0|      nsockets = curlx_calloc(new_count, sizeof(nsockets[0]));
  ------------------
  |  | 1475|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  605|      0|      if(!nsockets)
  ------------------
  |  Branch (605:10): [True: 0, False: 0]
  ------------------
  606|      0|        return CURLE_OUT_OF_MEMORY;
  607|      0|      nactions = curlx_calloc(new_count, sizeof(nactions[0]));
  ------------------
  |  | 1475|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  608|      0|      if(!nactions) {
  ------------------
  |  Branch (608:10): [True: 0, False: 0]
  ------------------
  609|      0|        curlx_free(nsockets);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  610|      0|        return CURLE_OUT_OF_MEMORY;
  611|      0|      }
  612|      0|      memcpy(nsockets, ps->sockets, ps->count * sizeof(ps->sockets[0]));
  613|      0|      memcpy(nactions, ps->actions, ps->count * sizeof(ps->actions[0]));
  614|      0|      if(ps->sockets != ps->def_sockets)
  ------------------
  |  Branch (614:10): [True: 0, False: 0]
  ------------------
  615|      0|        curlx_free(ps->sockets);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  616|      0|      ps->sockets = nsockets;
  617|      0|      if(ps->actions != ps->def_actions)
  ------------------
  |  Branch (617:10): [True: 0, False: 0]
  ------------------
  618|      0|        curlx_free(ps->actions);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  619|      0|      ps->actions = nactions;
  620|      0|      ps->count = new_count;
  621|      0|    }
  622|  2.78k|    DEBUGASSERT(i < ps->count);
  ------------------
  |  | 1079|  2.78k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (622:5): [True: 0, False: 2.78k]
  |  Branch (622:5): [True: 2.78k, False: 0]
  ------------------
  623|  2.78k|    if(i < ps->count) {
  ------------------
  |  Branch (623:8): [True: 2.78k, False: 0]
  ------------------
  624|  2.78k|      ps->sockets[i] = sock;
  625|  2.78k|      ps->actions[i] = (unsigned char)add_flags;
  626|  2.78k|      ps->n = i + 1;
  627|  2.78k|    }
  628|  2.78k|  }
  629|  2.78k|  return CURLE_OK;
  630|  2.78k|}
Curl_pollset_want_recv:
  710|    148|{
  711|    148|  unsigned int i;
  712|    148|  (void)data;
  713|    296|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (713:14): [True: 148, False: 148]
  ------------------
  714|    148|    if((ps->sockets[i] == sock) && (ps->actions[i] & CURL_POLL_IN))
  ------------------
  |  |  283|      0|#define CURL_POLL_IN     1
  ------------------
  |  Branch (714:8): [True: 0, False: 148]
  |  Branch (714:36): [True: 0, False: 0]
  ------------------
  715|      0|      return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  716|    148|  }
  717|    148|  return FALSE;
  ------------------
  |  | 1056|    148|#define FALSE false
  ------------------
  718|    148|}

Curl_client_cleanup:
   72|  26.2k|{
   73|  26.2k|  cl_reset_reader(data);
   74|  26.2k|  cl_reset_writer(data);
   75|       |
   76|  26.2k|  data->req.bytecount = 0;
   77|  26.2k|  data->req.headerline = 0;
   78|  26.2k|}
Curl_client_reset:
   81|  8.99k|{
   82|  8.99k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (82:6): [True: 0, False: 8.99k]
  ------------------
   83|       |    /* already requested */
   84|      0|    CURL_TRC_READ(data, "client_reset, will rewind reader");
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
   85|      0|  }
   86|  8.99k|  else {
   87|  8.99k|    CURL_TRC_READ(data, "client_reset, clear readers");
  ------------------
  |  |  163|  8.99k|  do {                                                    \
  |  |  164|  8.99k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|  8.99k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  17.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 8.99k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 8.99k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  17.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  8.99k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|  8.99k|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|  8.99k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 8.99k]
  |  |  ------------------
  ------------------
   88|  8.99k|    cl_reset_reader(data);
   89|  8.99k|  }
   90|  8.99k|  cl_reset_writer(data);
   91|       |
   92|  8.99k|  data->req.bytecount = 0;
   93|  8.99k|  data->req.headerline = 0;
   94|  8.99k|}
Curl_client_start:
   97|  6.25k|{
   98|  6.25k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (98:6): [True: 0, False: 6.25k]
  ------------------
   99|      0|    struct Curl_creader *r = data->req.reader.stack;
  100|      0|    CURLcode result = CURLE_OK;
  101|       |
  102|      0|    CURL_TRC_READ(data, "client start, rewind readers");
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  103|      0|    while(r) {
  ------------------
  |  Branch (103:11): [True: 0, False: 0]
  ------------------
  104|      0|      result = r->crt->cntrl(data, r, CURL_CRCNTRL_REWIND);
  105|      0|      if(result) {
  ------------------
  |  Branch (105:10): [True: 0, False: 0]
  ------------------
  106|      0|        failf(data, "rewind of client reader '%s' failed: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  107|      0|              r->crt->name, (int)result);
  108|      0|        return result;
  109|      0|      }
  110|      0|      r = r->next;
  111|      0|    }
  112|      0|    data->req.rewind_read = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  113|      0|    cl_reset_reader(data);
  114|      0|  }
  115|  6.25k|  return CURLE_OK;
  116|  6.25k|}
Curl_cwriter_def_init:
  130|  18.7k|{
  131|  18.7k|  (void)data;
  132|  18.7k|  (void)writer;
  133|  18.7k|  return CURLE_OK;
  134|  18.7k|}
Curl_cwriter_def_flush:
  145|  18.7k|{
  146|  18.7k|  return Curl_cwriter_flush(data, writer->next);
  ------------------
  |  |  191|  18.7k|  ((w) ? (w)->cwt->do_flush((d), (w)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (191:4): [True: 18.7k, False: 0]
  |  |  ------------------
  ------------------
  147|  18.7k|}
Curl_cwriter_def_close:
  151|  18.7k|{
  152|  18.7k|  (void)data;
  153|  18.7k|  (void)writer;
  154|  18.7k|}
Curl_client_write:
  371|  1.30k|{
  372|  1.30k|  CURLcode result;
  373|       |
  374|       |  /* it is one of those, at least */
  375|  1.30k|  DEBUGASSERT(type &
  ------------------
  |  | 1079|  1.30k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (375:3): [True: 0, False: 1.30k]
  |  Branch (375:3): [True: 1.30k, False: 0]
  ------------------
  376|  1.30k|              (CLIENTWRITE_BODY | CLIENTWRITE_HEADER | CLIENTWRITE_INFO));
  377|       |  /* BODY is only BODY (with optional EOS) */
  378|  1.30k|  DEBUGASSERT(!(type & CLIENTWRITE_BODY) ||
  ------------------
  |  | 1079|  1.30k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (378:3): [True: 1.30k, False: 0]
  |  Branch (378:3): [True: 0, False: 0]
  |  Branch (378:3): [True: 1.30k, False: 0]
  |  Branch (378:3): [True: 0, False: 0]
  ------------------
  379|  1.30k|              ((type & ~(CLIENTWRITE_BODY | CLIENTWRITE_EOS)) == 0));
  380|       |  /* INFO is only INFO (with optional EOS) */
  381|  1.30k|  DEBUGASSERT(!(type & CLIENTWRITE_INFO) ||
  ------------------
  |  | 1079|  1.30k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 1.30k, False: 0]
  |  Branch (381:3): [True: 0, False: 0]
  |  Branch (381:3): [True: 1.30k, False: 0]
  |  Branch (381:3): [True: 0, False: 0]
  ------------------
  382|  1.30k|              ((type & ~(CLIENTWRITE_INFO | CLIENTWRITE_EOS)) == 0));
  383|       |
  384|  1.30k|  if(!data->req.writer.stack) {
  ------------------
  |  Branch (384:6): [True: 0, False: 1.30k]
  ------------------
  385|      0|    result = do_init_writer_stack(data);
  386|      0|    if(result)
  ------------------
  |  Branch (386:8): [True: 0, False: 0]
  ------------------
  387|      0|      return result;
  388|      0|    DEBUGASSERT(data->req.writer.stack);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (388:5): [True: 0, False: 0]
  |  Branch (388:5): [True: 0, False: 0]
  ------------------
  389|      0|  }
  390|       |
  391|  1.30k|  result = Curl_cwriter_write(data, data->req.writer.stack, type, buf, len);
  ------------------
  |  |  188|  1.30k|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 1.30k, False: 0]
  |  |  ------------------
  ------------------
  392|  1.30k|  CURL_TRC_WRITE(data, "client_write(type=%x, len=%zu) -> %d",
  ------------------
  |  |  158|  1.30k|  do {                                                     \
  |  |  159|  1.30k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|  1.30k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  2.60k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.30k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  2.60k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  1.30k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.30k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.30k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.30k]
  |  |  ------------------
  ------------------
  393|  1.30k|                 (unsigned int)type, len, (int)result);
  394|  1.30k|  return result;
  395|  1.30k|}
Curl_client_flush:
  398|  6.24k|{
  399|  6.24k|  CURLcode result;
  400|       |
  401|  6.24k|  if(!data->req.writer.stack) {
  ------------------
  |  Branch (401:6): [True: 0, False: 6.24k]
  ------------------
  402|      0|    result = do_init_writer_stack(data);
  403|      0|    if(result)
  ------------------
  |  Branch (403:8): [True: 0, False: 0]
  ------------------
  404|      0|      return result;
  405|      0|    DEBUGASSERT(data->req.writer.stack);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (405:5): [True: 0, False: 0]
  |  Branch (405:5): [True: 0, False: 0]
  ------------------
  406|      0|  }
  407|       |
  408|  6.24k|  result = Curl_cwriter_flush(data, data->req.writer.stack);
  ------------------
  |  |  191|  6.24k|  ((w) ? (w)->cwt->do_flush((d), (w)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (191:4): [True: 6.24k, False: 0]
  |  |  ------------------
  ------------------
  409|  6.24k|  CURL_TRC_WRITE(data, "client_flush() -> %d", (int)result);
  ------------------
  |  |  158|  6.24k|  do {                                                     \
  |  |  159|  6.24k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|  6.24k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  12.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 6.24k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  12.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  6.24k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  6.24k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  6.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 6.24k]
  |  |  ------------------
  ------------------
  410|  6.24k|  return result;
  411|  6.24k|}
Curl_cwriter_create:
  418|  25.0k|{
  419|  25.0k|  struct Curl_cwriter *writer = NULL;
  420|  25.0k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  421|  25.0k|  void *p;
  422|       |
  423|  25.0k|  DEBUGASSERT(cwt->cwriter_size >= sizeof(struct Curl_cwriter));
  ------------------
  |  | 1079|  25.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (423:3): [True: 0, False: 25.0k]
  |  Branch (423:3): [True: 25.0k, False: 0]
  ------------------
  424|  25.0k|  p = curlx_calloc(1, cwt->cwriter_size);
  ------------------
  |  | 1475|  25.0k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  425|  25.0k|  if(!p)
  ------------------
  |  Branch (425:6): [True: 0, False: 25.0k]
  ------------------
  426|      0|    goto out;
  427|       |
  428|  25.0k|  writer = (struct Curl_cwriter *)p;
  429|  25.0k|  writer->cwt = cwt;
  430|  25.0k|  writer->ctx = p;
  431|  25.0k|  writer->phase = phase;
  432|  25.0k|  result = cwt->do_init(data, writer);
  433|       |
  434|  25.0k|out:
  435|  25.0k|  *pwriter = result ? NULL : writer;
  ------------------
  |  Branch (435:14): [True: 0, False: 25.0k]
  ------------------
  436|  25.0k|  if(result)
  ------------------
  |  Branch (436:6): [True: 0, False: 25.0k]
  ------------------
  437|      0|    curlx_free(writer);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  438|  25.0k|  return result;
  439|  25.0k|}
Curl_cwriter_add:
  479|  6.25k|{
  480|  6.25k|  CURLcode result;
  481|  6.25k|  struct Curl_cwriter **anchor = &data->req.writer.stack;
  482|       |
  483|  6.25k|  if(!*anchor) {
  ------------------
  |  Branch (483:6): [True: 6.25k, False: 0]
  ------------------
  484|  6.25k|    result = do_init_writer_stack(data);
  485|  6.25k|    if(result)
  ------------------
  |  Branch (485:8): [True: 0, False: 6.25k]
  ------------------
  486|      0|      return result;
  487|  6.25k|  }
  488|       |
  489|  6.25k|  if(writer->cwt->flags & CURL_CW_FLAG_BLOWUP) {
  ------------------
  |  |  114|  6.25k|#define CURL_CW_FLAG_BLOWUP     (1U << 0)
  ------------------
  |  Branch (489:6): [True: 0, False: 6.25k]
  ------------------
  490|       |    /* On adding a writer that may blow up write sizes, e.g. zip bombs,
  491|       |     * add the pause writer. Do this first as any failure will make the
  492|       |     * caller destroy the writer again. */
  493|      0|    result = cwriter_ensure_pause_writer(data);
  494|      0|    if(result)
  ------------------
  |  Branch (494:8): [True: 0, False: 0]
  ------------------
  495|      0|      return result;
  496|      0|  }
  497|       |
  498|  6.25k|  cwriter_add(data, writer);
  499|  6.25k|  return CURLE_OK;
  500|  6.25k|}
Curl_cwriter_get_by_name:
  504|  6.25k|{
  505|  6.25k|  struct Curl_cwriter *writer;
  506|  6.25k|  for(writer = data->req.writer.stack; writer; writer = writer->next) {
  ------------------
  |  Branch (506:40): [True: 0, False: 6.25k]
  ------------------
  507|      0|    if(!strcmp(name, writer->cwt->name))
  ------------------
  |  Branch (507:8): [True: 0, False: 0]
  ------------------
  508|      0|      return writer;
  509|      0|  }
  510|  6.25k|  return NULL;
  511|  6.25k|}
Curl_cwriter_get_by_type:
  515|  6.25k|{
  516|  6.25k|  struct Curl_cwriter *writer;
  517|  25.0k|  for(writer = data->req.writer.stack; writer; writer = writer->next) {
  ------------------
  |  Branch (517:40): [True: 24.9k, False: 5]
  ------------------
  518|  24.9k|    if(writer->cwt == cwt)
  ------------------
  |  Branch (518:8): [True: 6.24k, False: 18.7k]
  ------------------
  519|  6.24k|      return writer;
  520|  24.9k|  }
  521|      5|  return NULL;
  522|  6.25k|}
Curl_creader_def_init:
  552|  1.58k|{
  553|  1.58k|  (void)data;
  554|  1.58k|  (void)reader;
  555|  1.58k|  return CURLE_OK;
  556|  1.58k|}
Curl_creader_def_close:
  560|  1.58k|{
  561|  1.58k|  (void)data;
  562|  1.58k|  (void)reader;
  563|  1.58k|}
Curl_creader_create:
  946|  1.58k|{
  947|  1.58k|  struct Curl_creader *reader = NULL;
  948|  1.58k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  949|  1.58k|  void *p;
  950|       |
  951|  1.58k|  DEBUGASSERT(crt->creader_size >= sizeof(struct Curl_creader));
  ------------------
  |  | 1079|  1.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (951:3): [True: 0, False: 1.58k]
  |  Branch (951:3): [True: 1.58k, False: 0]
  ------------------
  952|  1.58k|  p = curlx_calloc(1, crt->creader_size);
  ------------------
  |  | 1475|  1.58k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  953|  1.58k|  if(!p)
  ------------------
  |  Branch (953:6): [True: 0, False: 1.58k]
  ------------------
  954|      0|    goto out;
  955|       |
  956|  1.58k|  reader = (struct Curl_creader *)p;
  957|  1.58k|  reader->crt = crt;
  958|  1.58k|  reader->ctx = p;
  959|  1.58k|  reader->phase = phase;
  960|  1.58k|  result = crt->do_init(data, reader);
  961|       |
  962|  1.58k|out:
  963|  1.58k|  *preader = result ? NULL : reader;
  ------------------
  |  Branch (963:14): [True: 0, False: 1.58k]
  ------------------
  964|  1.58k|  if(result)
  ------------------
  |  Branch (964:6): [True: 0, False: 1.58k]
  ------------------
  965|      0|    curlx_free(reader);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  966|  1.58k|  return result;
  967|  1.58k|}
Curl_creader_set_null:
 1294|  1.58k|{
 1295|  1.58k|  struct Curl_creader *r;
 1296|  1.58k|  CURLcode result;
 1297|       |
 1298|  1.58k|  result = Curl_creader_create(&r, data, &cr_null, CURL_CR_CLIENT);
 1299|  1.58k|  if(result)
  ------------------
  |  Branch (1299:6): [True: 0, False: 1.58k]
  ------------------
 1300|      0|    return result;
 1301|       |
 1302|  1.58k|  cl_reset_reader(data);
 1303|  1.58k|  return do_init_reader_stack(data, r);
 1304|  1.58k|}
sendf.c:cl_reset_reader:
   60|  36.8k|{
   61|  36.8k|  struct Curl_creader *reader = data->req.reader.stack;
   62|  36.8k|  data->req.reader_started = FALSE;
  ------------------
  |  | 1056|  36.8k|#define FALSE false
  ------------------
   63|  38.4k|  while(reader) {
  ------------------
  |  Branch (63:9): [True: 1.58k, False: 36.8k]
  ------------------
   64|  1.58k|    data->req.reader.stack = reader->next;
   65|  1.58k|    reader->crt->do_close(data, reader);
   66|  1.58k|    curlx_free(reader);
  ------------------
  |  | 1478|  1.58k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|  1.58k|    reader = data->req.reader.stack;
   68|  1.58k|  }
   69|  36.8k|}
sendf.c:cl_reset_writer:
   48|  35.2k|{
   49|  35.2k|  struct Curl_cwriter *writer = data->req.writer.stack;
   50|  60.2k|  while(writer) {
  ------------------
  |  Branch (50:9): [True: 25.0k, False: 35.2k]
  ------------------
   51|  25.0k|    data->req.writer.stack = writer->next;
   52|  25.0k|    writer->cwt->do_close(data, writer);
   53|  25.0k|    curlx_free(writer);
  ------------------
  |  | 1478|  25.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   54|  25.0k|    writer = data->req.writer.stack;
   55|  25.0k|  }
   56|       |  data->req.writer.paused = FALSE;
  ------------------
  |  | 1056|  35.2k|#define FALSE false
  ------------------
   57|  35.2k|}
sendf.c:do_init_writer_stack:
  341|  6.25k|{
  342|  6.25k|  struct Curl_cwriter *writer;
  343|  6.25k|  CURLcode result;
  344|       |
  345|  6.25k|  DEBUGASSERT(!data->req.writer.stack);
  ------------------
  |  | 1079|  6.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (345:3): [True: 0, False: 6.25k]
  |  Branch (345:3): [True: 6.25k, False: 0]
  ------------------
  346|  6.25k|  result = Curl_cwriter_create(&data->req.writer.stack,
  347|  6.25k|                               data, &Curl_cwt_out, CURL_CW_CLIENT);
  348|  6.25k|  if(result)
  ------------------
  |  Branch (348:6): [True: 0, False: 6.25k]
  ------------------
  349|      0|    return result;
  350|       |
  351|  6.25k|  result = Curl_cwriter_create(&writer, data, &cw_download, CURL_CW_PROTOCOL);
  352|  6.25k|  if(result)
  ------------------
  |  Branch (352:6): [True: 0, False: 6.25k]
  ------------------
  353|      0|    return result;
  354|  6.25k|  cwriter_add(data, writer);
  355|       |
  356|  6.25k|  result = Curl_cwriter_create(&writer, data, &cw_raw, CURL_CW_RAW);
  357|  6.25k|  if(result)
  ------------------
  |  Branch (357:6): [True: 0, False: 6.25k]
  ------------------
  358|      0|    return result;
  359|  6.25k|  cwriter_add(data, writer);
  360|       |
  361|  6.25k|  return result;
  362|  6.25k|}
sendf.c:cw_download_write:
  176|  1.27k|{
  177|  1.27k|  struct cw_download_ctx *ctx = writer->ctx;
  178|  1.27k|  CURLcode result;
  179|  1.27k|  size_t nwrite, excess_len = 0;
  180|  1.27k|  bool is_connect = !!(type & CLIENTWRITE_CONNECT);
  ------------------
  |  |   47|  1.27k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  181|       |
  182|  1.27k|  if(!ctx->started_response &&
  ------------------
  |  Branch (182:6): [True: 1.27k, False: 0]
  ------------------
  183|  1.27k|     !(type & CLIENTWRITE_CONNECT) &&
  ------------------
  |  |   47|  1.27k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (183:6): [True: 0, False: 1.27k]
  ------------------
  184|      0|     (!(type & CLIENTWRITE_INFO) || data->req.upload_done)) {
  ------------------
  |  |   44|      0|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  |  Branch (184:7): [True: 0, False: 0]
  |  Branch (184:37): [True: 0, False: 0]
  ------------------
  185|      0|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  186|      0|    ctx->started_response = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  187|      0|  }
  188|       |
  189|  1.27k|  if(!(type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   43|  1.27k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (189:6): [True: 1.27k, False: 0]
  ------------------
  190|  1.27k|    if(is_connect && data->set.suppress_connect_headers)
  ------------------
  |  Branch (190:8): [True: 1.27k, False: 0]
  |  Branch (190:22): [True: 101, False: 1.17k]
  ------------------
  191|    101|      return CURLE_OK;
  192|  1.17k|    result = Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  ------------------
  |  |  188|  1.17k|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 1.17k, False: 0]
  |  |  ------------------
  ------------------
  193|  1.17k|    CURL_TRC_WRITE(data, "download_write header(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|  1.17k|  do {                                                     \
  |  |  159|  1.17k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|  1.17k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  2.34k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1.17k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  2.34k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  1.17k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.17k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.17k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.17k]
  |  |  ------------------
  ------------------
  194|  1.17k|                   (unsigned int)type, nbytes, (int)result);
  195|  1.17k|    return result;
  196|  1.27k|  }
  197|       |
  198|      0|  if(!ctx->started_body &&
  ------------------
  |  Branch (198:6): [True: 0, False: 0]
  ------------------
  199|      0|     !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   44|      0|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
                   !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   47|      0|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (199:6): [True: 0, False: 0]
  ------------------
  200|      0|    Curl_rlimit_start(&data->progress.dl.rlimit, Curl_pgrs_now(data),
  201|      0|                      data->req.size);
  202|      0|    ctx->started_body = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  203|      0|  }
  204|       |
  205|       |  /* Here, we deal with REAL BODY bytes. All filtering and transfer
  206|       |   * encodings have been applied and only the true content, e.g. BODY,
  207|       |   * bytes are passed here.
  208|       |   * This allows us to check sizes, update stats, etc. independent
  209|       |   * from the protocol in play. */
  210|       |
  211|      0|  if(data->req.no_body && nbytes > 0) {
  ------------------
  |  Branch (211:6): [True: 0, False: 0]
  |  Branch (211:27): [True: 0, False: 0]
  ------------------
  212|       |    /* BODY arrives although we want none, bail out */
  213|      0|    streamclose(data->conn);
  ------------------
  |  |   87|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   83|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
  214|      0|    CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu), "
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  215|      0|                   "did not want a BODY", (unsigned int)type, nbytes);
  216|      0|    data->req.download_done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  217|      0|    if(data->info.header_size)
  ------------------
  |  Branch (217:8): [True: 0, False: 0]
  ------------------
  218|       |      /* if headers have been received, this is fine */
  219|      0|      return CURLE_OK;
  220|      0|    return CURLE_WEIRD_SERVER_REPLY;
  221|      0|  }
  222|       |
  223|       |  /* Determine if we see any bytes in excess to what is allowed.
  224|       |   * We write the allowed bytes and handle excess further below.
  225|       |   * This gives deterministic BODY writes on varying buffer receive
  226|       |   * lengths. */
  227|      0|  nwrite = nbytes;
  228|      0|  if(data->req.maxdownload != -1) {
  ------------------
  |  Branch (228:6): [True: 0, False: 0]
  ------------------
  229|      0|    size_t wmax = get_max_body_write_len(data, data->req.maxdownload);
  230|      0|    if(nwrite > wmax) {
  ------------------
  |  Branch (230:8): [True: 0, False: 0]
  ------------------
  231|      0|      excess_len = nbytes - wmax;
  232|      0|      nwrite = wmax;
  233|      0|    }
  234|       |
  235|      0|    if(nwrite == wmax) {
  ------------------
  |  Branch (235:8): [True: 0, False: 0]
  ------------------
  236|      0|      data->req.download_done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  237|      0|    }
  238|       |
  239|      0|    if((type & CLIENTWRITE_EOS) && !data->req.no_body &&
  ------------------
  |  |   50|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (239:8): [True: 0, False: 0]
  |  Branch (239:36): [True: 0, False: 0]
  ------------------
  240|      0|       (data->req.size > data->req.bytecount)) {
  ------------------
  |  Branch (240:8): [True: 0, False: 0]
  ------------------
  241|      0|      failf(data, "end of response with %" FMT_OFF_T " bytes missing",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  242|      0|            data->req.size - data->req.bytecount);
  243|      0|      return CURLE_PARTIAL_FILE;
  244|      0|    }
  245|      0|  }
  246|       |
  247|       |  /* Error on too large filesize is handled below, after writing
  248|       |   * the permitted bytes */
  249|      0|  if(data->set.max_filesize && !data->req.ignorebody) {
  ------------------
  |  Branch (249:6): [True: 0, False: 0]
  |  Branch (249:32): [True: 0, False: 0]
  ------------------
  250|      0|    size_t wmax = get_max_body_write_len(data, data->set.max_filesize);
  251|      0|    if(nwrite > wmax) {
  ------------------
  |  Branch (251:8): [True: 0, False: 0]
  ------------------
  252|      0|      nwrite = wmax;
  253|      0|    }
  254|      0|  }
  255|       |
  256|      0|  if(!data->req.ignorebody && (nwrite || (type & CLIENTWRITE_EOS))) {
  ------------------
  |  |   50|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (256:6): [True: 0, False: 0]
  |  Branch (256:32): [True: 0, False: 0]
  |  Branch (256:42): [True: 0, False: 0]
  ------------------
  257|      0|    result = Curl_cwriter_write(data, writer->next, type, buf, nwrite);
  ------------------
  |  |  188|      0|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  258|      0|    CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  259|      0|                   (unsigned int)type, nbytes, (int)result);
  260|      0|    if(result)
  ------------------
  |  Branch (260:8): [True: 0, False: 0]
  ------------------
  261|      0|      return result;
  262|      0|  }
  263|       |
  264|       |  /* Update stats, write and report progress */
  265|      0|  if(nwrite) {
  ------------------
  |  Branch (265:6): [True: 0, False: 0]
  ------------------
  266|      0|    data->req.bytecount += nwrite;
  267|      0|    Curl_pgrs_download_inc(data, nwrite);
  268|      0|  }
  269|       |
  270|      0|  if(excess_len) {
  ------------------
  |  Branch (270:6): [True: 0, False: 0]
  ------------------
  271|      0|    if(!data->req.ignorebody) {
  ------------------
  |  Branch (271:8): [True: 0, False: 0]
  ------------------
  272|      0|      infof(data,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  273|      0|            "Excess found writing body:"
  274|      0|            " excess = %zu"
  275|      0|            ", size = %" FMT_OFF_T
  276|      0|            ", maxdownload = %" FMT_OFF_T
  277|      0|            ", bytecount = %" FMT_OFF_T,
  278|      0|            excess_len, data->req.size, data->req.maxdownload,
  279|      0|            data->req.bytecount);
  280|      0|      connclose(data->conn);
  ------------------
  |  |   88|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   82|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  281|      0|    }
  282|      0|  }
  283|      0|  else if((nwrite < nbytes) && !data->req.ignorebody) {
  ------------------
  |  Branch (283:11): [True: 0, False: 0]
  |  Branch (283:32): [True: 0, False: 0]
  ------------------
  284|      0|    failf(data, "Exceeded the maximum allowed file size "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  285|      0|          "(%" FMT_OFF_T ") with %" FMT_OFF_T " bytes",
  286|      0|          data->set.max_filesize, data->req.bytecount);
  287|      0|    return CURLE_FILESIZE_EXCEEDED;
  288|      0|  }
  289|       |
  290|      0|  return CURLE_OK;
  291|      0|}
sendf.c:cw_raw_write:
  309|  1.30k|{
  310|  1.30k|  if(type & CLIENTWRITE_BODY && data->set.verbose && !data->req.ignorebody) {
  ------------------
  |  |   43|  2.60k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (310:6): [True: 0, False: 1.30k]
  |  Branch (310:33): [True: 0, False: 0]
  |  Branch (310:54): [True: 0, False: 0]
  ------------------
  311|      0|    Curl_debug(data, CURLINFO_DATA_IN, buf, nbytes);
  312|      0|  }
  313|  1.30k|  return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  ------------------
  |  |  188|  1.30k|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 1.30k, False: 0]
  |  |  ------------------
  ------------------
  314|  1.30k|}
sendf.c:cwriter_add:
  329|  18.7k|{
  330|  18.7k|  struct Curl_cwriter **anchor = &data->req.writer.stack;
  331|       |
  332|       |  /* Insert the writer as first in its phase.
  333|       |   * Skip existing writers of lower phases. */
  334|  25.0k|  while(*anchor && (*anchor)->phase < writer->phase)
  ------------------
  |  Branch (334:9): [True: 25.0k, False: 0]
  |  Branch (334:20): [True: 6.25k, False: 18.7k]
  ------------------
  335|  6.25k|    anchor = &((*anchor)->next);
  336|  18.7k|  writer->next = *anchor;
  337|  18.7k|  *anchor = writer;
  338|  18.7k|}
sendf.c:do_init_reader_stack:
 1120|  1.58k|{
 1121|  1.58k|  CURLcode result = CURLE_OK;
 1122|  1.58k|  curl_off_t clen;
 1123|       |
 1124|  1.58k|  DEBUGASSERT(r);
  ------------------
  |  | 1079|  1.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1124:3): [True: 0, False: 1.58k]
  |  Branch (1124:3): [True: 1.58k, False: 0]
  ------------------
 1125|  1.58k|  DEBUGASSERT(r->crt);
  ------------------
  |  | 1079|  1.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1125:3): [True: 0, False: 1.58k]
  |  Branch (1125:3): [True: 1.58k, False: 0]
  ------------------
 1126|  1.58k|  DEBUGASSERT(r->phase == CURL_CR_CLIENT);
  ------------------
  |  | 1079|  1.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1126:3): [True: 0, False: 1.58k]
  |  Branch (1126:3): [True: 1.58k, False: 0]
  ------------------
 1127|  1.58k|  DEBUGASSERT(!data->req.reader.stack);
  ------------------
  |  | 1079|  1.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1127:3): [True: 0, False: 1.58k]
  |  Branch (1127:3): [True: 1.58k, False: 0]
  ------------------
 1128|       |
 1129|  1.58k|  data->req.reader.stack = r;
 1130|  1.58k|  clen = r->crt->total_length(data, r);
 1131|       |  /* if we do not have 0 length init, and crlf conversion is wanted,
 1132|       |   * add the reader for it */
 1133|  1.58k|  if(clen && (data->set.crlf
  ------------------
  |  Branch (1133:6): [True: 0, False: 1.58k]
  |  Branch (1133:15): [True: 0, False: 0]
  ------------------
 1134|      0|#ifdef CURL_PREFER_LF_LINEENDS
 1135|      0|     || data->state.prefer_ascii
  ------------------
  |  Branch (1135:9): [True: 0, False: 0]
  ------------------
 1136|      0|#endif
 1137|      0|    )) {
 1138|      0|    result = cr_lc_add(data);
 1139|      0|    if(result)
  ------------------
  |  Branch (1139:8): [True: 0, False: 0]
  ------------------
 1140|      0|      return result;
 1141|      0|  }
 1142|       |
 1143|  1.58k|  return result;
 1144|  1.58k|}
sendf.c:cr_null_total_length:
 1272|  1.58k|{
 1273|       |  /* this reader changes length depending on input */
 1274|  1.58k|  (void)data;
 1275|  1.58k|  (void)reader;
 1276|  1.58k|  return 0;
 1277|  1.58k|}

Curl_setstropt:
   83|   103k|{
   84|       |  /* Release the previous storage at `charp' and replace by a dynamic storage
   85|       |     copy of `s'. Return CURLE_OK or CURLE_OUT_OF_MEMORY. */
   86|       |
   87|   103k|  curlx_safefree(*charp);
  ------------------
  |  | 1336|   103k|  do {                      \
  |  | 1337|   103k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|   103k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|   103k|    (ptr) = NULL;           \
  |  | 1339|   103k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 103k]
  |  |  ------------------
  ------------------
   88|       |
   89|   103k|  if(s) {
  ------------------
  |  Branch (89:6): [True: 103k, False: 0]
  ------------------
   90|   103k|    if(strlen(s) > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|   103k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (90:8): [True: 0, False: 103k]
  ------------------
   91|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
   92|       |
   93|   103k|    *charp = curlx_strdup(s);
  ------------------
  |  | 1472|   103k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   94|   103k|    if(!*charp)
  ------------------
  |  Branch (94:8): [True: 0, False: 103k]
  ------------------
   95|      0|      return CURLE_OUT_OF_MEMORY;
   96|   103k|  }
   97|       |
   98|   103k|  return CURLE_OK;
   99|   103k|}
Curl_setopt_SSLVERSION:
  318|  52.6k|{
  319|       |  /*
  320|       |   * Set explicit SSL version to try to connect with, as some SSL
  321|       |   * implementations are lame.
  322|       |   */
  323|  52.6k|  {
  324|  52.6k|    long version, version_max;
  325|  52.6k|    struct ssl_primary_config *primary = &data->set.ssl.primary;
  326|  52.6k|#ifndef CURL_DISABLE_PROXY
  327|  52.6k|    if(option != CURLOPT_SSLVERSION)
  ------------------
  |  Branch (327:8): [True: 26.2k, False: 26.3k]
  ------------------
  328|  26.2k|      primary = &data->set.proxy_ssl.primary;
  329|       |#else
  330|       |    (void)option; /* unused */
  331|       |#endif
  332|  52.6k|    version = C_SSLVERSION_VALUE(arg);
  ------------------
  |  |  195|  52.6k|#define C_SSLVERSION_VALUE(x)     ((x) & 0xffff)
  ------------------
  333|  52.6k|    version_max = (long)C_SSLVERSION_MAX_VALUE(arg);
  ------------------
  |  |  196|  52.6k|#define C_SSLVERSION_MAX_VALUE(x) ((unsigned long)(x) & 0xffff0000)
  ------------------
  334|       |
  335|  52.6k|    if(version < CURL_SSLVERSION_DEFAULT ||
  ------------------
  |  | 2392|   105k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  |  Branch (335:8): [True: 0, False: 52.6k]
  ------------------
  336|  52.6k|       version == CURL_SSLVERSION_SSLv2 ||
  ------------------
  |  | 2394|   105k|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (336:8): [True: 1, False: 52.6k]
  ------------------
  337|  52.6k|       version == CURL_SSLVERSION_SSLv3 ||
  ------------------
  |  | 2395|   105k|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (337:8): [True: 1, False: 52.6k]
  ------------------
  338|  52.6k|       version >= CURL_SSLVERSION_LAST ||
  ------------------
  |  | 2401|   105k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (338:8): [True: 21, False: 52.6k]
  ------------------
  339|  52.6k|       version_max < CURL_SSLVERSION_MAX_NONE ||
  ------------------
  |  | 2403|   105k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (339:8): [True: 0, False: 52.6k]
  ------------------
  340|  52.6k|       version_max >= CURL_SSLVERSION_MAX_LAST)
  ------------------
  |  | 2411|  52.6k|#define CURL_SSLVERSION_MAX_LAST    (CURL_SSLVERSION_LAST    << 16)
  |  |  ------------------
  |  |  |  | 2401|  52.6k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  |  |  ------------------
  ------------------
  |  Branch (340:8): [True: 12, False: 52.6k]
  ------------------
  341|     35|      return CURLE_BAD_FUNCTION_ARGUMENT;
  342|  52.6k|    if(version == CURL_SSLVERSION_DEFAULT)
  ------------------
  |  | 2392|  52.6k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  |  Branch (342:8): [True: 52.5k, False: 84]
  ------------------
  343|  52.5k|      version = CURL_SSLVERSION_TLSv1_2;
  ------------------
  |  | 2398|  52.5k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  344|       |
  345|  52.6k|    primary->version = (unsigned char)version;
  346|  52.6k|    primary->version_max = (unsigned int)version_max;
  347|  52.6k|  }
  348|      0|  return CURLE_OK;
  349|  52.6k|}
Curl_vsetopt:
 2897|   239k|{
 2898|   239k|  if(option < CURLOPTTYPE_OBJECTPOINT)
  ------------------
  |  | 1122|   239k|#define CURLOPTTYPE_OBJECTPOINT   10000
  ------------------
  |  Branch (2898:6): [True: 34.4k, False: 204k]
  ------------------
 2899|  34.4k|    return setopt_long(data, option, va_arg(param, long));
 2900|   204k|  else if(option < CURLOPTTYPE_FUNCTIONPOINT) {
  ------------------
  |  | 1123|   204k|#define CURLOPTTYPE_FUNCTIONPOINT 20000
  ------------------
  |  Branch (2900:11): [True: 156k, False: 48.2k]
  ------------------
 2901|       |    /* unfortunately, different pointer types cannot be identified any other
 2902|       |       way than being listed explicitly */
 2903|   156k|    switch(option) {
 2904|  1.27k|    case CURLOPT_HTTPHEADER:
  ------------------
  |  Branch (2904:5): [True: 1.27k, False: 155k]
  ------------------
 2905|  1.27k|    case CURLOPT_QUOTE:
  ------------------
  |  Branch (2905:5): [True: 0, False: 156k]
  ------------------
 2906|  1.27k|    case CURLOPT_POSTQUOTE:
  ------------------
  |  Branch (2906:5): [True: 0, False: 156k]
  ------------------
 2907|  1.27k|    case CURLOPT_TELNETOPTIONS:
  ------------------
  |  Branch (2907:5): [True: 0, False: 156k]
  ------------------
 2908|  1.27k|    case CURLOPT_PREQUOTE:
  ------------------
  |  Branch (2908:5): [True: 0, False: 156k]
  ------------------
 2909|  1.27k|    case CURLOPT_HTTP200ALIASES:
  ------------------
  |  Branch (2909:5): [True: 0, False: 156k]
  ------------------
 2910|  1.29k|    case CURLOPT_MAIL_RCPT:
  ------------------
  |  Branch (2910:5): [True: 22, False: 156k]
  ------------------
 2911|  1.29k|    case CURLOPT_RESOLVE:
  ------------------
  |  Branch (2911:5): [True: 0, False: 156k]
  ------------------
 2912|  1.29k|    case CURLOPT_PROXYHEADER:
  ------------------
  |  Branch (2912:5): [True: 0, False: 156k]
  ------------------
 2913|  13.0k|    case CURLOPT_CONNECT_TO:
  ------------------
  |  Branch (2913:5): [True: 11.7k, False: 144k]
  ------------------
 2914|  13.0k|      return setopt_slist(data, option, va_arg(param, struct curl_slist *));
 2915|     69|    case CURLOPT_HTTPPOST:         /* curl_httppost * */
  ------------------
  |  Branch (2915:5): [True: 69, False: 156k]
  ------------------
 2916|    237|    case CURLOPT_MIMEPOST:         /* curl_mime * */
  ------------------
  |  Branch (2916:5): [True: 168, False: 156k]
  ------------------
 2917|    237|    case CURLOPT_STDERR:           /* FILE * */
  ------------------
  |  Branch (2917:5): [True: 0, False: 156k]
  ------------------
 2918|  1.02k|    case CURLOPT_SHARE:            /* CURLSH * */
  ------------------
  |  Branch (2918:5): [True: 785, False: 155k]
  ------------------
 2919|  1.02k|    case CURLOPT_CURLU:            /* CURLU * */
  ------------------
  |  Branch (2919:5): [True: 0, False: 156k]
  ------------------
 2920|  1.02k|      return setopt_pointers(data, option, param);
 2921|      0|    case CURLOPT_STREAM_DEPENDS:   /* CURL * */
  ------------------
  |  Branch (2921:5): [True: 0, False: 156k]
  ------------------
 2922|      0|    case CURLOPT_STREAM_DEPENDS_E: /* CURL * */
  ------------------
  |  Branch (2922:5): [True: 0, False: 156k]
  ------------------
 2923|      0|      return CURLE_OK;
 2924|   142k|    default:
  ------------------
  |  Branch (2924:5): [True: 142k, False: 14.1k]
  ------------------
 2925|   142k|      break;
 2926|   156k|    }
 2927|       |    /* the char pointer options */
 2928|   142k|    return setopt_cptr(data, option, va_arg(param, char *));
 2929|   156k|  }
 2930|  48.2k|  else if(option < CURLOPTTYPE_OFF_T)
  ------------------
  |  | 1124|  48.2k|#define CURLOPTTYPE_OFF_T         30000
  ------------------
  |  Branch (2930:11): [True: 47.9k, False: 324]
  ------------------
 2931|  47.9k|    return setopt_func(data, option, param);
 2932|    324|  else if(option < CURLOPTTYPE_BLOB)
  ------------------
  |  | 1125|    324|#define CURLOPTTYPE_BLOB          40000
  ------------------
  |  Branch (2932:11): [True: 324, False: 0]
  ------------------
 2933|    324|    return setopt_offt(data, option, va_arg(param, curl_off_t));
 2934|      0|  return setopt_blob(data, option, va_arg(param, struct curl_blob *));
 2935|   239k|}
curl_easy_setopt:
 2946|   239k|{
 2947|   239k|  struct Curl_eapi_guard guard;
 2948|   239k|  CURLcode result;
 2949|       |
 2950|   239k|  if(CURL_EAPI_ENTER(&guard, curl, easy_setopt, &result)) {
  ------------------
  |  |  157|   239k|  Curl_eapi_enter((g), (curl), CURL_EAPI_FN_##fn, (r)) && (curl)
  |  |  ------------------
  |  |  |  Branch (157:3): [True: 239k, False: 0]
  |  |  |  Branch (157:59): [True: 239k, False: 0]
  |  |  ------------------
  ------------------
 2951|   239k|    struct Curl_easy *data = curl;
 2952|   239k|    va_list arg;
 2953|       |
 2954|   239k|    va_start(arg, option);
 2955|       |
 2956|   239k|    result = Curl_vsetopt(data, option, arg);
 2957|       |
 2958|   239k|    va_end(arg);
 2959|   239k|    if(result == CURLE_BAD_FUNCTION_ARGUMENT)
  ------------------
  |  Branch (2959:8): [True: 609, False: 238k]
  ------------------
 2960|    609|      failf(data, "setopt 0x%x got bad argument", (unsigned int)option);
  ------------------
  |  |   62|    609|#define failf Curl_failf
  ------------------
 2961|   239k|  }
 2962|   239k|  CURL_EAPI_LEAVE(&guard);
  ------------------
  |  |  159|   239k|  Curl_eapi_leave(g)
  ------------------
 2963|   239k|  return result;
 2964|   239k|}
setopt.c:setopt_long:
 1315|  34.4k|{
 1316|  34.4k|  typedef CURLcode (*setoptfunc)(struct Curl_easy *data,
 1317|  34.4k|                                 CURLoption option, long arg);
 1318|  34.4k|  static const setoptfunc setopt_call[] = {
 1319|  34.4k|    setopt_long_bool,
 1320|  34.4k|    setopt_long_net,
 1321|  34.4k|    setopt_long_http,
 1322|  34.4k|    setopt_long_proxy,
 1323|  34.4k|    setopt_long_ssl,
 1324|  34.4k|    setopt_long_proto,
 1325|  34.4k|    setopt_long_misc
 1326|  34.4k|  };
 1327|  34.4k|  size_t i;
 1328|       |
 1329|  80.0k|  for(i = 0; i < CURL_ARRAYSIZE(setopt_call); i++) {
  ------------------
  |  | 1303|  80.0k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (1329:14): [True: 80.0k, False: 7]
  ------------------
 1330|  80.0k|    CURLcode result = setopt_call[i](data, option, arg);
 1331|  80.0k|    if(result != CURLE_UNKNOWN_OPTION)
  ------------------
  |  Branch (1331:8): [True: 34.4k, False: 45.6k]
  ------------------
 1332|  34.4k|      return result;
 1333|  80.0k|  }
 1334|      7|  return CURLE_UNKNOWN_OPTION;
 1335|  34.4k|}
setopt.c:setopt_long_bool:
  405|  34.4k|{
  406|  34.4k|  bool enabled = !!arg;
  407|  34.4k|  int ok = 1;
  408|  34.4k|  struct UserDefined *s = &data->set;
  409|  34.4k|  switch(option) {
  410|      9|  case CURLOPT_FORBID_REUSE:
  ------------------
  |  Branch (410:3): [True: 9, False: 34.4k]
  ------------------
  411|       |    /*
  412|       |     * When this transfer is done, it must not be left to be reused by a
  413|       |     * subsequent transfer but shall be closed immediately.
  414|       |     */
  415|      9|    s->reuse_forbid = enabled;
  416|      9|    break;
  417|      6|  case CURLOPT_FRESH_CONNECT:
  ------------------
  |  Branch (417:3): [True: 6, False: 34.4k]
  ------------------
  418|       |    /*
  419|       |     * This transfer shall not use a previously cached connection but
  420|       |     * should be made with a fresh new connect!
  421|       |     */
  422|      6|    s->reuse_fresh = enabled;
  423|      6|    break;
  424|      0|  case CURLOPT_VERBOSE:
  ------------------
  |  Branch (424:3): [True: 0, False: 34.4k]
  ------------------
  425|       |    /*
  426|       |     * Verbose means infof() calls that give a lot of information about
  427|       |     * the connection and transfer procedures as well as internal choices.
  428|       |     */
  429|      0|    s->verbose = enabled;
  430|      0|    break;
  431|     58|  case CURLOPT_HEADER:
  ------------------
  |  Branch (431:3): [True: 58, False: 34.3k]
  ------------------
  432|       |    /*
  433|       |     * Set to include the header in the general data output stream.
  434|       |     */
  435|     58|    s->include_header = enabled;
  436|     58|    break;
  437|     20|  case CURLOPT_NOPROGRESS:
  ------------------
  |  Branch (437:3): [True: 20, False: 34.3k]
  ------------------
  438|       |    /*
  439|       |     * Shut off the internal supported progress meter
  440|       |     */
  441|     20|    data->progress.hide = enabled;
  442|     20|    break;
  443|     12|  case CURLOPT_NOBODY:
  ------------------
  |  Branch (443:3): [True: 12, False: 34.4k]
  ------------------
  444|       |    /*
  445|       |     * Do not include the body part in the output data stream.
  446|       |     */
  447|     12|    s->opt_no_body = enabled;
  448|     12|#ifndef CURL_DISABLE_HTTP
  449|     12|    if(s->opt_no_body)
  ------------------
  |  Branch (449:8): [True: 8, False: 4]
  ------------------
  450|       |      /* in HTTP lingo, no body means using the HEAD request... */
  451|      8|      s->method = HTTPREQ_HEAD;
  452|      4|    else if(s->method == HTTPREQ_HEAD)
  ------------------
  |  Branch (452:13): [True: 0, False: 4]
  ------------------
  453|      0|      s->method = HTTPREQ_GET;
  454|     12|#endif
  455|     12|    break;
  456|      6|  case CURLOPT_FAILONERROR:
  ------------------
  |  Branch (456:3): [True: 6, False: 34.4k]
  ------------------
  457|       |    /*
  458|       |     * Do not output the >=400 error code HTML-page, but instead only
  459|       |     * return error.
  460|       |     */
  461|      6|    s->http_fail_on_error = enabled;
  462|      6|    break;
  463|      3|  case CURLOPT_KEEP_SENDING_ON_ERROR:
  ------------------
  |  Branch (463:3): [True: 3, False: 34.4k]
  ------------------
  464|      3|    s->http_keep_sending_on_error = enabled;
  465|      3|    break;
  466|     31|  case CURLOPT_UPLOAD:
  ------------------
  |  Branch (466:3): [True: 31, False: 34.3k]
  ------------------
  467|     31|  case CURLOPT_PUT:
  ------------------
  |  Branch (467:3): [True: 0, False: 34.4k]
  ------------------
  468|       |    /*
  469|       |     * We want to send data to the remote host. If this is HTTP, that equals
  470|       |     * using the PUT request.
  471|       |     */
  472|     31|    if(enabled) {
  ------------------
  |  Branch (472:8): [True: 31, False: 0]
  ------------------
  473|       |      /* If this is HTTP, PUT is what's needed to "upload" */
  474|     31|      s->method = HTTPREQ_PUT;
  475|     31|      s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1056|     31|#define FALSE false
  ------------------
  476|     31|    }
  477|      0|    else
  478|       |      /* In HTTP, the opposite of upload is GET (unless NOBODY is true as
  479|       |         then this can be changed to HEAD later on) */
  480|      0|      s->method = HTTPREQ_GET;
  481|     31|    break;
  482|      3|  case CURLOPT_FILETIME:
  ------------------
  |  Branch (482:3): [True: 3, False: 34.4k]
  ------------------
  483|       |    /*
  484|       |     * Try to get the file time of the remote document. The time will
  485|       |     * later (possibly) become available using curl_easy_getinfo().
  486|       |     */
  487|      3|    s->get_filetime = enabled;
  488|      3|    break;
  489|      0|#ifndef CURL_DISABLE_HTTP
  490|      4|  case CURLOPT_HTTP09_ALLOWED:
  ------------------
  |  Branch (490:3): [True: 4, False: 34.4k]
  ------------------
  491|      4|    s->http09_allowed = enabled;
  492|      4|    break;
  493|      0|#ifndef CURL_DISABLE_COOKIES
  494|      3|  case CURLOPT_COOKIESESSION:
  ------------------
  |  Branch (494:3): [True: 3, False: 34.4k]
  ------------------
  495|       |    /*
  496|       |     * Set this option to TRUE to start a new "cookie session". It will
  497|       |     * prevent the forthcoming read-cookies-from-file actions to accept
  498|       |     * cookies that are marked as being session cookies, as they belong to a
  499|       |     * previous session.
  500|       |     */
  501|      3|    s->cookiesession = enabled;
  502|      3|    break;
  503|      0|#endif
  504|      4|  case CURLOPT_AUTOREFERER:
  ------------------
  |  Branch (504:3): [True: 4, False: 34.4k]
  ------------------
  505|       |    /*
  506|       |     * Switch on automatic referer that gets set if curl follows locations.
  507|       |     */
  508|      4|    s->http_auto_referer = enabled;
  509|      4|    break;
  510|      2|  case CURLOPT_TRANSFER_ENCODING:
  ------------------
  |  Branch (510:3): [True: 2, False: 34.4k]
  ------------------
  511|      2|    s->http_transfer_encoding = enabled;
  512|      2|    break;
  513|      6|  case CURLOPT_UNRESTRICTED_AUTH:
  ------------------
  |  Branch (513:3): [True: 6, False: 34.4k]
  ------------------
  514|       |    /*
  515|       |     * Send authentication (user+password) when following locations, even when
  516|       |     * hostname changed.
  517|       |     */
  518|      6|    s->allow_auth_to_other_hosts = enabled;
  519|      6|    break;
  520|      2|  case CURLOPT_HTTP_TRANSFER_DECODING:
  ------------------
  |  Branch (520:3): [True: 2, False: 34.4k]
  ------------------
  521|       |    /*
  522|       |     * disable libcurl transfer encoding is used
  523|       |     */
  524|      2|    s->http_te_skip = !enabled; /* reversed */
  525|      2|    break;
  526|      5|  case CURLOPT_HTTP_CONTENT_DECODING:
  ------------------
  |  Branch (526:3): [True: 5, False: 34.4k]
  ------------------
  527|       |    /*
  528|       |     * raw data passed to the application when content encoding is used
  529|       |     */
  530|      5|    s->http_ce_skip = !enabled; /* reversed */
  531|      5|    break;
  532|      7|  case CURLOPT_HTTPGET:
  ------------------
  |  Branch (532:3): [True: 7, False: 34.4k]
  ------------------
  533|       |    /*
  534|       |     * Set to force us do HTTP GET
  535|       |     */
  536|      7|    if(enabled) {
  ------------------
  |  Branch (536:8): [True: 6, False: 1]
  ------------------
  537|      6|      s->method = HTTPREQ_GET;
  538|      6|      s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1056|      6|#define FALSE false
  ------------------
  539|      6|    }
  540|      7|    break;
  541|      8|  case CURLOPT_POST:
  ------------------
  |  Branch (541:3): [True: 8, False: 34.4k]
  ------------------
  542|       |    /* Does this option serve a purpose anymore? Yes it does, when
  543|       |       CURLOPT_POSTFIELDS is not used and the POST data is read off the
  544|       |       callback! */
  545|      8|    if(enabled) {
  ------------------
  |  Branch (545:8): [True: 6, False: 2]
  ------------------
  546|      6|      s->method = HTTPREQ_POST;
  547|      6|      s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1056|      6|#define FALSE false
  ------------------
  548|      6|    }
  549|      2|    else
  550|      2|      s->method = HTTPREQ_GET;
  551|      8|    break;
  552|      0|#endif /* !CURL_DISABLE_HTTP */
  553|      0|#ifndef CURL_DISABLE_PROXY
  554|      3|  case CURLOPT_HTTPPROXYTUNNEL:
  ------------------
  |  Branch (554:3): [True: 3, False: 34.4k]
  ------------------
  555|       |    /*
  556|       |     * Tunnel operations through the proxy instead of normal proxy use
  557|       |     */
  558|      3|    s->tunnel_thru_httpproxy = enabled;
  559|      3|    break;
  560|      4|  case CURLOPT_HAPROXYPROTOCOL:
  ------------------
  |  Branch (560:3): [True: 4, False: 34.4k]
  ------------------
  561|       |    /*
  562|       |     * Set to send the HAProxy Proxy Protocol header
  563|       |     */
  564|      4|    s->haproxyprotocol = enabled;
  565|      4|    break;
  566|     10|  case CURLOPT_PROXY_SSL_VERIFYPEER:
  ------------------
  |  Branch (566:3): [True: 10, False: 34.4k]
  ------------------
  567|       |    /*
  568|       |     * Enable peer SSL verifying for proxy.
  569|       |     */
  570|     10|    s->proxy_ssl.primary.verifypeer = enabled;
  571|       |
  572|       |    /* Update the current connection proxy_ssl_config. */
  573|     10|    Curl_ssl_conn_config_update(data, TRUE);
  ------------------
  |  | 1053|     10|#define TRUE true
  ------------------
  574|     10|    break;
  575|      3|  case CURLOPT_PROXY_SSL_VERIFYHOST:
  ------------------
  |  Branch (575:3): [True: 3, False: 34.4k]
  ------------------
  576|       |    /*
  577|       |     * Enable verification of the hostname in the peer certificate for proxy
  578|       |     */
  579|      3|    s->proxy_ssl.primary.verifyhost = enabled;
  580|      3|    ok = 2;
  581|       |    /* Update the current connection proxy_ssl_config. */
  582|      3|    Curl_ssl_conn_config_update(data, TRUE);
  ------------------
  |  | 1053|      3|#define TRUE true
  ------------------
  583|      3|    break;
  584|      2|  case CURLOPT_PROXY_TRANSFER_MODE:
  ------------------
  |  Branch (584:3): [True: 2, False: 34.4k]
  ------------------
  585|       |    /*
  586|       |     * set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy
  587|       |     */
  588|      2|    s->proxy_transfer_mode = enabled;
  589|      2|    break;
  590|      0|#endif /* !CURL_DISABLE_PROXY */
  591|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  592|       |  case CURLOPT_SOCKS5_GSSAPI_NEC:
  593|       |    /*
  594|       |     * Set flag for NEC SOCKS5 support
  595|       |     */
  596|       |    s->socks5_gssapi_nec = enabled;
  597|       |    break;
  598|       |#endif
  599|      0|#ifdef CURL_LIST_ONLY_PROTOCOL
  600|      4|  case CURLOPT_DIRLISTONLY:
  ------------------
  |  Branch (600:3): [True: 4, False: 34.4k]
  ------------------
  601|       |    /*
  602|       |     * An option that changes the command to one that asks for a list only, no
  603|       |     * file info details. Used for FTP, POP3 and SFTP.
  604|       |     */
  605|      4|    s->list_only = enabled;
  606|      4|    break;
  607|      0|#endif
  608|      2|  case CURLOPT_APPEND:
  ------------------
  |  Branch (608:3): [True: 2, False: 34.4k]
  ------------------
  609|       |    /*
  610|       |     * We want to upload and append to an existing file. Used for FTP and
  611|       |     * SFTP.
  612|       |     */
  613|      2|    s->remote_append = enabled;
  614|      2|    break;
  615|      0|#ifndef CURL_DISABLE_FTP
  616|      4|  case CURLOPT_FTP_USE_EPRT:
  ------------------
  |  Branch (616:3): [True: 4, False: 34.4k]
  ------------------
  617|      4|    s->ftp_use_eprt = enabled;
  618|      4|    break;
  619|      4|  case CURLOPT_FTP_USE_EPSV:
  ------------------
  |  Branch (619:3): [True: 4, False: 34.4k]
  ------------------
  620|      4|    s->ftp_use_epsv = enabled;
  621|      4|    break;
  622|      2|  case CURLOPT_FTP_USE_PRET:
  ------------------
  |  Branch (622:3): [True: 2, False: 34.4k]
  ------------------
  623|      2|    s->ftp_use_pret = enabled;
  624|      2|    break;
  625|      3|  case CURLOPT_FTP_SKIP_PASV_IP:
  ------------------
  |  Branch (625:3): [True: 3, False: 34.4k]
  ------------------
  626|       |    /*
  627|       |     * Enable or disable FTP_SKIP_PASV_IP, which will disable/enable the
  628|       |     * bypass of the IP address in PASV responses.
  629|       |     */
  630|      3|    s->ftp_skip_ip = enabled;
  631|      3|    break;
  632|     10|  case CURLOPT_WILDCARDMATCH:
  ------------------
  |  Branch (632:3): [True: 10, False: 34.4k]
  ------------------
  633|     10|    s->wildcard_enabled = enabled;
  634|     10|    break;
  635|      0|#endif
  636|      0|  case CURLOPT_CRLF:
  ------------------
  |  Branch (636:3): [True: 0, False: 34.4k]
  ------------------
  637|       |    /*
  638|       |     * Kludgy option to enable CRLF conversions. Subject for removal.
  639|       |     */
  640|      0|    s->crlf = enabled;
  641|      0|    break;
  642|      0|#ifndef CURL_DISABLE_TFTP
  643|      4|  case CURLOPT_TFTP_NO_OPTIONS:
  ------------------
  |  Branch (643:3): [True: 4, False: 34.4k]
  ------------------
  644|       |    /*
  645|       |     * Option that prevents libcurl from sending TFTP option requests to the
  646|       |     * server.
  647|       |     */
  648|      4|    s->tftp_no_options = enabled;
  649|      4|    break;
  650|      0|#endif /* !CURL_DISABLE_TFTP */
  651|      4|  case CURLOPT_TRANSFERTEXT:
  ------------------
  |  Branch (651:3): [True: 4, False: 34.4k]
  ------------------
  652|       |    /*
  653|       |     * This option was previously named 'FTPASCII'. Renamed to work with
  654|       |     * more protocols than merely FTP.
  655|       |     *
  656|       |     * Transfer using ASCII (instead of BINARY).
  657|       |     */
  658|      4|    s->prefer_ascii = enabled;
  659|      4|    break;
  660|    851|  case CURLOPT_SSL_VERIFYPEER:
  ------------------
  |  Branch (660:3): [True: 851, False: 33.5k]
  ------------------
  661|       |    /*
  662|       |     * Enable peer SSL verifying.
  663|       |     */
  664|    851|    s->ssl.primary.verifypeer = enabled;
  665|       |
  666|       |    /* Update the current connection ssl_config. */
  667|    851|    Curl_ssl_conn_config_update(data, FALSE);
  ------------------
  |  | 1056|    851|#define FALSE false
  ------------------
  668|    851|    break;
  669|      0|#ifndef CURL_DISABLE_DOH
  670|      2|  case CURLOPT_DOH_SSL_VERIFYPEER:
  ------------------
  |  Branch (670:3): [True: 2, False: 34.4k]
  ------------------
  671|       |    /*
  672|       |     * Enable peer SSL verifying for DoH.
  673|       |     */
  674|      2|    s->doh_verifypeer = enabled;
  675|      2|    break;
  676|      3|  case CURLOPT_DOH_SSL_VERIFYHOST:
  ------------------
  |  Branch (676:3): [True: 3, False: 34.4k]
  ------------------
  677|       |    /*
  678|       |     * Enable verification of the hostname in the peer certificate for DoH
  679|       |     */
  680|      3|    s->doh_verifyhost = enabled;
  681|      3|    ok = 2;
  682|      3|    break;
  683|      5|  case CURLOPT_DOH_SSL_VERIFYSTATUS:
  ------------------
  |  Branch (683:3): [True: 5, False: 34.4k]
  ------------------
  684|       |    /*
  685|       |     * Enable certificate status verifying for DoH.
  686|       |     */
  687|      5|    if(!Curl_ssl_cert_status_request())
  ------------------
  |  Branch (687:8): [True: 0, False: 5]
  ------------------
  688|      0|      return CURLE_NOT_BUILT_IN;
  689|       |
  690|      5|    s->doh_verifystatus = enabled;
  691|      5|    ok = 2;
  692|      5|    break;
  693|      0|#endif /* !CURL_DISABLE_DOH */
  694|    796|  case CURLOPT_SSL_VERIFYHOST:
  ------------------
  |  Branch (694:3): [True: 796, False: 33.6k]
  ------------------
  695|       |    /*
  696|       |     * Enable verification of the hostname in the peer certificate
  697|       |     */
  698|       |
  699|       |    /* Obviously people are not reading documentation and too many thought
  700|       |       this argument took a boolean when it was not and misused it.
  701|       |       Treat 1 and 2 the same */
  702|    796|    s->ssl.primary.verifyhost = enabled;
  703|    796|    ok = 2;
  704|       |
  705|       |    /* Update the current connection ssl_config. */
  706|    796|    Curl_ssl_conn_config_update(data, FALSE);
  ------------------
  |  | 1056|    796|#define FALSE false
  ------------------
  707|    796|    break;
  708|    791|  case CURLOPT_SSL_VERIFYSTATUS:
  ------------------
  |  Branch (708:3): [True: 791, False: 33.6k]
  ------------------
  709|       |    /*
  710|       |     * Enable certificate status verifying.
  711|       |     */
  712|    791|    if(!Curl_ssl_cert_status_request())
  ------------------
  |  Branch (712:8): [True: 0, False: 791]
  ------------------
  713|      0|      return CURLE_NOT_BUILT_IN;
  714|       |
  715|    791|    s->ssl.primary.verifystatus = enabled;
  716|       |
  717|       |    /* Update the current connection ssl_config. */
  718|    791|    Curl_ssl_conn_config_update(data, FALSE);
  ------------------
  |  | 1056|    791|#define FALSE false
  ------------------
  719|    791|    break;
  720|      8|  case CURLOPT_CERTINFO:
  ------------------
  |  Branch (720:3): [True: 8, False: 34.4k]
  ------------------
  721|      8|#ifdef USE_SSL
  722|      8|    if(Curl_ssl_supports(data, SSLSUPP_CERTINFO))
  ------------------
  |  |   36|      8|#define SSLSUPP_CERTINFO     (1 << 1) /* supports CURLOPT_CERTINFO */
  ------------------
  |  Branch (722:8): [True: 8, False: 0]
  ------------------
  723|      8|      s->ssl.certinfo = enabled;
  724|      0|    else
  725|      0|#endif
  726|      0|      return CURLE_NOT_BUILT_IN;
  727|      8|    break;
  728|     22|  case CURLOPT_NOSIGNAL:
  ------------------
  |  Branch (728:3): [True: 22, False: 34.3k]
  ------------------
  729|       |    /*
  730|       |     * The application asks not to set any signal() or alarm() handlers,
  731|       |     * even when using a timeout.
  732|       |     */
  733|     22|    s->no_signal = enabled;
  734|     22|    break;
  735|      5|  case CURLOPT_TCP_NODELAY:
  ------------------
  |  Branch (735:3): [True: 5, False: 34.4k]
  ------------------
  736|       |    /*
  737|       |     * Enable or disable TCP_NODELAY, which will disable/enable the Nagle
  738|       |     * algorithm
  739|       |     */
  740|      5|    s->tcp_nodelay = enabled;
  741|      5|    break;
  742|      3|  case CURLOPT_IGNORE_CONTENT_LENGTH:
  ------------------
  |  Branch (742:3): [True: 3, False: 34.4k]
  ------------------
  743|      3|    s->ignorecl = enabled;
  744|      3|    break;
  745|      5|  case CURLOPT_SSL_SESSIONID_CACHE:
  ------------------
  |  Branch (745:3): [True: 5, False: 34.4k]
  ------------------
  746|      5|    s->ssl.primary.cache_session = enabled;
  747|      5|#ifndef CURL_DISABLE_PROXY
  748|      5|    s->proxy_ssl.primary.cache_session = s->ssl.primary.cache_session;
  749|      5|#endif
  750|      5|    break;
  751|       |#ifdef USE_SSH
  752|       |  case CURLOPT_SSH_COMPRESSION:
  753|       |    s->ssh_compression = enabled;
  754|       |    break;
  755|       |#endif /* !USE_SSH */
  756|      0|#ifndef CURL_DISABLE_SMTP
  757|      2|  case CURLOPT_MAIL_RCPT_ALLOWFAILS:
  ------------------
  |  Branch (757:3): [True: 2, False: 34.4k]
  ------------------
  758|       |    /* allow RCPT TO command to fail for some recipients */
  759|      2|    s->mail_rcpt_allowfails = enabled;
  760|      2|    break;
  761|      0|#endif /* !CURL_DISABLE_SMTP */
  762|      2|  case CURLOPT_SASL_IR:
  ------------------
  |  Branch (762:3): [True: 2, False: 34.4k]
  ------------------
  763|       |    /* Enable/disable SASL initial response */
  764|      2|    s->sasl_ir = enabled;
  765|      2|    break;
  766|     24|  case CURLOPT_TCP_KEEPALIVE:
  ------------------
  |  Branch (766:3): [True: 24, False: 34.3k]
  ------------------
  767|     24|    s->tcp_keepalive = enabled;
  768|     24|    break;
  769|      3|  case CURLOPT_TCP_FASTOPEN:
  ------------------
  |  Branch (769:3): [True: 3, False: 34.4k]
  ------------------
  770|      3|#if defined(CONNECT_DATA_IDEMPOTENT) || defined(MSG_FASTOPEN) || \
  771|      3|  defined(TCP_FASTOPEN_CONNECT)
  772|      3|    s->tcp_fastopen = enabled;
  773|      3|    break;
  774|       |#else
  775|       |    return CURLE_NOT_BUILT_IN;
  776|       |#endif
  777|     57|  case CURLOPT_SSL_ENABLE_ALPN:
  ------------------
  |  Branch (777:3): [True: 57, False: 34.3k]
  ------------------
  778|     57|    s->ssl_enable_alpn = enabled;
  779|     57|    break;
  780|      8|  case CURLOPT_PATH_AS_IS:
  ------------------
  |  Branch (780:3): [True: 8, False: 34.4k]
  ------------------
  781|      8|    s->path_as_is = enabled;
  782|      8|    break;
  783|    788|  case CURLOPT_PIPEWAIT:
  ------------------
  |  Branch (783:3): [True: 788, False: 33.6k]
  ------------------
  784|    788|    s->pipewait = enabled;
  785|    788|    break;
  786|     11|  case CURLOPT_SUPPRESS_CONNECT_HEADERS:
  ------------------
  |  Branch (786:3): [True: 11, False: 34.4k]
  ------------------
  787|     11|    s->suppress_connect_headers = enabled;
  788|     11|    break;
  789|      0|#ifndef CURL_DISABLE_SHUFFLE_DNS
  790|     18|  case CURLOPT_DNS_SHUFFLE_ADDRESSES:
  ------------------
  |  Branch (790:3): [True: 18, False: 34.3k]
  ------------------
  791|     18|    s->dns_shuffle_addresses = enabled;
  792|     18|    break;
  793|      0|#endif
  794|      5|  case CURLOPT_DISALLOW_USERNAME_IN_URL:
  ------------------
  |  Branch (794:3): [True: 5, False: 34.4k]
  ------------------
  795|      5|    s->disallow_username_in_url = enabled;
  796|      5|    break;
  797|      4|  case CURLOPT_QUICK_EXIT:
  ------------------
  |  Branch (797:3): [True: 4, False: 34.4k]
  ------------------
  798|      4|    s->quick_exit = enabled;
  799|      4|    break;
  800|  30.7k|  default:
  ------------------
  |  Branch (800:3): [True: 30.7k, False: 3.66k]
  ------------------
  801|  30.7k|    return CURLE_UNKNOWN_OPTION;
  802|  34.4k|  }
  803|  3.66k|  if((arg > ok) || (arg < 0))
  ------------------
  |  Branch (803:6): [True: 330, False: 3.33k]
  |  Branch (803:20): [True: 0, False: 3.33k]
  ------------------
  804|       |    /* reserve other values for future use */
  805|    330|    infof(data, "boolean setopt(%d) got unsupported argument %ld,"
  ------------------
  |  |  143|    330|  do {                               \
  |  |  144|    330|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    330|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 330, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 330]
  |  |  |  |  ------------------
  |  |  |  |  323|    330|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    330|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    330|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 330]
  |  |  ------------------
  ------------------
  806|  3.66k|          " treated as %d", (int)option, arg, enabled);
  807|       |
  808|  3.66k|  return CURLE_OK;
  809|  34.4k|}
setopt.c:setopt_long_net:
  824|  30.7k|{
  825|  30.7k|  CURLcode result = CURLE_OK;
  826|  30.7k|  struct UserDefined *s = &data->set;
  827|       |
  828|  30.7k|  switch(option) {
  829|    116|  case CURLOPT_DNS_CACHE_TIMEOUT:
  ------------------
  |  Branch (829:3): [True: 116, False: 30.6k]
  ------------------
  830|    116|    if(arg != -1)
  ------------------
  |  Branch (830:8): [True: 116, False: 0]
  ------------------
  831|    116|      return setopt_set_timeout_sec(&s->dns_cache_timeout_ms, arg);
  832|      0|    s->dns_cache_timeout_ms = -1;
  833|      0|    break;
  834|     55|  case CURLOPT_MAXCONNECTS:
  ------------------
  |  Branch (834:3): [True: 55, False: 30.7k]
  ------------------
  835|     55|    result = value_range(&arg, 0, 0, INT_MAX);
  836|     55|    if(!result)
  ------------------
  |  Branch (836:8): [True: 55, False: 0]
  ------------------
  837|     55|      s->maxconnects = arg ? (uint32_t)arg : DEFAULT_CONNCACHE_SIZE;
  ------------------
  |  |   38|      1|#define DEFAULT_CONNCACHE_SIZE 5
  ------------------
  |  Branch (837:24): [True: 54, False: 1]
  ------------------
  838|     55|    break;
  839|  11.7k|  case CURLOPT_SERVER_RESPONSE_TIMEOUT:
  ------------------
  |  Branch (839:3): [True: 11.7k, False: 18.9k]
  ------------------
  840|  11.7k|    return setopt_set_timeout_sec(&s->server_response_timeout, arg);
  841|     27|  case CURLOPT_SERVER_RESPONSE_TIMEOUT_MS:
  ------------------
  |  Branch (841:3): [True: 27, False: 30.7k]
  ------------------
  842|     27|    return setopt_set_timeout_ms(&s->server_response_timeout, arg);
  843|     25|  case CURLOPT_LOW_SPEED_LIMIT:
  ------------------
  |  Branch (843:3): [True: 25, False: 30.7k]
  ------------------
  844|     25|    if(arg < 0)
  ------------------
  |  Branch (844:8): [True: 0, False: 25]
  ------------------
  845|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  846|     25|    else
  847|     25|      s->low_speed_limit = arg;
  848|     25|    break;
  849|     53|  case CURLOPT_LOW_SPEED_TIME:
  ------------------
  |  Branch (849:3): [True: 53, False: 30.7k]
  ------------------
  850|     53|    result = value_range(&arg, 0, 0, USHRT_MAX);
  851|     53|    if(!result)
  ------------------
  |  Branch (851:8): [True: 53, False: 0]
  ------------------
  852|     53|      s->low_speed_time = (uint16_t)arg;
  853|     53|    break;
  854|     68|  case CURLOPT_PORT:
  ------------------
  |  Branch (854:3): [True: 68, False: 30.6k]
  ------------------
  855|     68|    if((arg < 0) || (arg > 65535))
  ------------------
  |  Branch (855:8): [True: 0, False: 68]
  |  Branch (855:21): [True: 34, False: 34]
  ------------------
  856|     34|      return CURLE_BAD_FUNCTION_ARGUMENT;
  857|     34|    s->use_port = (unsigned short)arg;
  858|     34|    break;
  859|      0|  case CURLOPT_TIMEOUT:
  ------------------
  |  Branch (859:3): [True: 0, False: 30.7k]
  ------------------
  860|      0|    return setopt_set_timeout_sec(&s->timeout, arg);
  861|  12.5k|  case CURLOPT_TIMEOUT_MS:
  ------------------
  |  Branch (861:3): [True: 12.5k, False: 18.1k]
  ------------------
  862|  12.5k|    return setopt_set_timeout_ms(&s->timeout, arg);
  863|    118|  case CURLOPT_CONNECTTIMEOUT:
  ------------------
  |  Branch (863:3): [True: 118, False: 30.6k]
  ------------------
  864|    118|    return setopt_set_timeout_sec(&s->connecttimeout, arg);
  865|    143|  case CURLOPT_CONNECTTIMEOUT_MS:
  ------------------
  |  Branch (865:3): [True: 143, False: 30.6k]
  ------------------
  866|    143|    return setopt_set_timeout_ms(&s->connecttimeout, arg);
  867|      0|#ifndef CURL_DISABLE_BINDLOCAL
  868|     47|  case CURLOPT_LOCALPORT:
  ------------------
  |  Branch (868:3): [True: 47, False: 30.7k]
  ------------------
  869|     47|    if((arg < 0) || (arg > 65535))
  ------------------
  |  Branch (869:8): [True: 0, False: 47]
  |  Branch (869:21): [True: 16, False: 31]
  ------------------
  870|     16|      return CURLE_BAD_FUNCTION_ARGUMENT;
  871|     31|    s->localport = curlx_sltous(arg);
  872|     31|    break;
  873|     63|  case CURLOPT_LOCALPORTRANGE:
  ------------------
  |  Branch (873:3): [True: 63, False: 30.6k]
  ------------------
  874|     63|    if((arg < 0) || (arg > 65535))
  ------------------
  |  Branch (874:8): [True: 0, False: 63]
  |  Branch (874:21): [True: 31, False: 32]
  ------------------
  875|     31|      return CURLE_BAD_FUNCTION_ARGUMENT;
  876|     32|    s->localportrange = curlx_sltous(arg);
  877|     32|    break;
  878|      0|#endif
  879|     62|  case CURLOPT_BUFFERSIZE:
  ------------------
  |  Branch (879:3): [True: 62, False: 30.6k]
  ------------------
  880|     62|    result = value_range(&arg, 0, READBUFFER_MIN, READBUFFER_MAX);
  ------------------
  |  |  122|     62|#define READBUFFER_MIN  1024
  ------------------
                  result = value_range(&arg, 0, READBUFFER_MIN, READBUFFER_MAX);
  ------------------
  |  |  121|     62|#define READBUFFER_MAX  CURL_MAX_READ_SIZE
  |  |  ------------------
  |  |  |  |  255|     62|#define CURL_MAX_READ_SIZE (10 * 1024 * 1024)
  |  |  ------------------
  ------------------
  881|     62|    if(!result)
  ------------------
  |  Branch (881:8): [True: 62, False: 0]
  ------------------
  882|     62|      s->buffer_size = (unsigned int)arg;
  883|     62|    break;
  884|     80|  case CURLOPT_UPLOAD_BUFFERSIZE:
  ------------------
  |  Branch (884:3): [True: 80, False: 30.6k]
  ------------------
  885|     80|    result = value_range(&arg, 0, UPLOADBUFFER_MIN, UPLOADBUFFER_MAX);
  ------------------
  |  |  134|     80|#define UPLOADBUFFER_MIN     CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  265|     80|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
                  result = value_range(&arg, 0, UPLOADBUFFER_MIN, UPLOADBUFFER_MAX);
  ------------------
  |  |  133|     80|#define UPLOADBUFFER_MAX     (2 * 1024 * 1024)
  ------------------
  886|     80|    if(!result)
  ------------------
  |  Branch (886:8): [True: 80, False: 0]
  ------------------
  887|     80|      s->upload_buffer_size = (unsigned int)arg;
  888|     80|    break;
  889|     28|  case CURLOPT_MAXFILESIZE:
  ------------------
  |  Branch (889:3): [True: 28, False: 30.7k]
  ------------------
  890|     28|    if(arg < 0)
  ------------------
  |  Branch (890:8): [True: 0, False: 28]
  ------------------
  891|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  892|     28|    else
  893|     28|      s->max_filesize = arg;
  894|     28|    break;
  895|     52|  case CURLOPT_IPRESOLVE:
  ------------------
  |  Branch (895:3): [True: 52, False: 30.7k]
  ------------------
  896|     52|    if((arg < CURL_IPRESOLVE_WHATEVER) || (arg > CURL_IPRESOLVE_V6))
  ------------------
  |  | 2327|     52|#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
  ------------------
                  if((arg < CURL_IPRESOLVE_WHATEVER) || (arg > CURL_IPRESOLVE_V6))
  ------------------
  |  | 2330|     52|#define CURL_IPRESOLVE_V6       2L /* uses only IPv6 addresses/connections */
  ------------------
  |  Branch (896:8): [True: 0, False: 52]
  |  Branch (896:43): [True: 34, False: 18]
  ------------------
  897|     34|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  898|     18|    else
  899|     18|      s->ipver = (unsigned char)arg;
  900|     52|    break;
  901|     41|  case CURLOPT_CONNECT_ONLY:
  ------------------
  |  Branch (901:3): [True: 41, False: 30.7k]
  ------------------
  902|     41|    if(arg < 0 || arg > 2)
  ------------------
  |  Branch (902:8): [True: 0, False: 41]
  |  Branch (902:19): [True: 36, False: 5]
  ------------------
  903|     36|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  904|      5|    else {
  905|      5|      s->connect_only = !!arg;
  906|      5|      s->connect_only_ws = (arg == 2);
  907|      5|    }
  908|     41|    break;
  909|      0|#ifdef USE_IPV6
  910|    206|  case CURLOPT_ADDRESS_SCOPE:
  ------------------
  |  Branch (910:3): [True: 206, False: 30.5k]
  ------------------
  911|    206|#if SIZEOF_LONG > 4
  912|    206|    if((unsigned long)arg > UINT_MAX)
  ------------------
  |  Branch (912:8): [True: 0, False: 206]
  ------------------
  913|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  914|    206|    else
  915|    206|#endif
  916|    206|    s->scope_id = (unsigned int)arg;
  917|    206|    break;
  918|      0|#endif
  919|     60|  case CURLOPT_TCP_KEEPIDLE:
  ------------------
  |  Branch (919:3): [True: 60, False: 30.6k]
  ------------------
  920|     60|    result = value_range(&arg, 0, 0, INT_MAX);
  921|     60|    if(!result)
  ------------------
  |  Branch (921:8): [True: 60, False: 0]
  ------------------
  922|     60|      s->tcp_keepidle = (int)arg;
  923|     60|    break;
  924|     76|  case CURLOPT_TCP_KEEPINTVL:
  ------------------
  |  Branch (924:3): [True: 76, False: 30.6k]
  ------------------
  925|     76|    result = value_range(&arg, 0, 0, INT_MAX);
  926|     76|    if(!result)
  ------------------
  |  Branch (926:8): [True: 76, False: 0]
  ------------------
  927|     76|      s->tcp_keepintvl = (int)arg;
  928|     76|    break;
  929|     63|  case CURLOPT_TCP_KEEPCNT:
  ------------------
  |  Branch (929:3): [True: 63, False: 30.6k]
  ------------------
  930|     63|    result = value_range(&arg, 0, 0, INT_MAX);
  931|     63|    if(!result)
  ------------------
  |  Branch (931:8): [True: 63, False: 0]
  ------------------
  932|     63|      s->tcp_keepcnt = (int)arg;
  933|     63|    break;
  934|      6|  case CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS:
  ------------------
  |  Branch (934:3): [True: 6, False: 30.7k]
  ------------------
  935|      6|    return setopt_set_timeout_ms(&s->happy_eyeballs_timeout, arg);
  936|     30|  case CURLOPT_UPKEEP_INTERVAL_MS:
  ------------------
  |  Branch (936:3): [True: 30, False: 30.7k]
  ------------------
  937|     30|    return setopt_set_timeout_ms(&s->upkeep_interval_ms, arg);
  938|     53|  case CURLOPT_MAXAGE_CONN:
  ------------------
  |  Branch (938:3): [True: 53, False: 30.7k]
  ------------------
  939|     53|    return setopt_set_timeout_sec(&s->conn_max_idle_ms, arg);
  940|     43|  case CURLOPT_MAXLIFETIME_CONN:
  ------------------
  |  Branch (940:3): [True: 43, False: 30.7k]
  ------------------
  941|     43|    return setopt_set_timeout_sec(&s->conn_max_age_ms, arg);
  942|      0|  case CURLOPT_DNS_USE_GLOBAL_CACHE:
  ------------------
  |  Branch (942:3): [True: 0, False: 30.7k]
  ------------------
  943|       |    /* deprecated */
  944|      0|    break;
  945|  4.89k|  default:
  ------------------
  |  Branch (945:3): [True: 4.89k, False: 25.8k]
  ------------------
  946|  4.89k|    return CURLE_UNKNOWN_OPTION;
  947|  30.7k|  }
  948|    898|  return result;
  949|  30.7k|}
setopt.c:setopt_set_timeout_sec:
   55|  12.1k|{
   56|  12.1k|  if(secs < 0)
  ------------------
  |  Branch (56:6): [True: 0, False: 12.1k]
  ------------------
   57|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
   58|  12.1k|#if LONG_MAX > (TIMEDIFF_T_MAX / 1000)
   59|  12.1k|  if(secs > (TIMEDIFF_T_MAX / 1000)) {
  ------------------
  |  |   33|  12.1k|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  596|  12.1k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (59:6): [True: 0, False: 12.1k]
  ------------------
   60|      0|    *ptimeout_ms = TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  596|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
   61|      0|    return CURLE_OK;
   62|      0|  }
   63|  12.1k|#endif
   64|  12.1k|  *ptimeout_ms = (timediff_t)secs * 1000;
   65|  12.1k|  return CURLE_OK;
   66|  12.1k|}
setopt.c:value_range:
  812|    811|{
  813|    811|  if(*value < below_error)
  ------------------
  |  Branch (813:6): [True: 0, False: 811]
  ------------------
  814|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  815|    811|  else if(*value < min)
  ------------------
  |  Branch (815:11): [True: 26, False: 785]
  ------------------
  816|     26|    *value = min;
  817|    785|  else if(*value > max)
  ------------------
  |  Branch (817:11): [True: 322, False: 463]
  ------------------
  818|    322|    *value = max;
  819|    811|  return CURLE_OK;
  820|    811|}
setopt.c:setopt_set_timeout_ms:
   69|  12.8k|{
   70|  12.8k|  if(ms < 0)
  ------------------
  |  Branch (70:6): [True: 0, False: 12.8k]
  ------------------
   71|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
   72|       |#if LONG_MAX > TIMEDIFF_T_MAX
   73|       |  if(ms > TIMEDIFF_T_MAX) {
   74|       |    *ptimeout_ms = TIMEDIFF_T_MAX;
   75|       |    return CURLE_OK;
   76|       |  }
   77|       |#endif
   78|  12.8k|  *ptimeout_ms = (timediff_t)ms;
   79|  12.8k|  return CURLE_OK;
   80|  12.8k|}
setopt.c:setopt_long_http:
 1061|  4.89k|{
 1062|  4.89k|#ifndef CURL_DISABLE_HTTP
 1063|  4.89k|  CURLcode result = CURLE_OK;
 1064|  4.89k|  struct UserDefined *s = &data->set;
 1065|       |
 1066|  4.89k|  switch(option) {
 1067|     31|  case CURLOPT_FOLLOWLOCATION:
  ------------------
  |  Branch (1067:3): [True: 31, False: 4.86k]
  ------------------
 1068|     31|    if((unsigned long)arg > 3)
  ------------------
  |  Branch (1068:8): [True: 29, False: 2]
  ------------------
 1069|     29|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1070|      2|    else
 1071|      2|      s->http_follow_mode = (unsigned char)arg;
 1072|     31|    break;
 1073|     51|  case CURLOPT_MAXREDIRS:
  ------------------
  |  Branch (1073:3): [True: 51, False: 4.84k]
  ------------------
 1074|     51|    result = value_range(&arg, -1, -1, 0x7fff);
 1075|     51|    if(!result)
  ------------------
  |  Branch (1075:8): [True: 51, False: 0]
  ------------------
 1076|     51|      s->maxredirs = (short)arg;
 1077|     51|    break;
 1078|     30|  case CURLOPT_POSTREDIR:
  ------------------
  |  Branch (1078:3): [True: 30, False: 4.86k]
  ------------------
 1079|     30|    if(arg < CURL_REDIR_GET_ALL)
  ------------------
  |  | 2427|     30|#define CURL_REDIR_GET_ALL  0L
  ------------------
  |  Branch (1079:8): [True: 0, False: 30]
  ------------------
 1080|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1081|     30|    else {
 1082|     30|      s->post301 = !!(arg & CURL_REDIR_POST_301);
  ------------------
  |  | 2428|     30|#define CURL_REDIR_POST_301 1L
  ------------------
 1083|     30|      s->post302 = !!(arg & CURL_REDIR_POST_302);
  ------------------
  |  | 2429|     30|#define CURL_REDIR_POST_302 2L
  ------------------
 1084|     30|      s->post303 = !!(arg & CURL_REDIR_POST_303);
  ------------------
  |  | 2430|     30|#define CURL_REDIR_POST_303 4L
  ------------------
 1085|     30|    }
 1086|     30|    break;
 1087|    236|  case CURLOPT_HEADEROPT:
  ------------------
  |  Branch (1087:3): [True: 236, False: 4.65k]
  ------------------
 1088|    236|    s->sep_headers = !!(arg & CURLHEADER_SEPARATE);
  ------------------
  |  | 1039|    236|#define CURLHEADER_SEPARATE (1L << 0)
  ------------------
 1089|    236|    break;
 1090|     81|  case CURLOPT_HTTPAUTH:
  ------------------
  |  Branch (1090:3): [True: 81, False: 4.81k]
  ------------------
 1091|     81|    return httpauth(data, FALSE, (unsigned long)arg);
  ------------------
  |  | 1056|     81|#define FALSE false
  ------------------
 1092|    827|  case CURLOPT_HTTP_VERSION:
  ------------------
  |  Branch (1092:3): [True: 827, False: 4.06k]
  ------------------
 1093|    827|    return setopt_HTTP_VERSION(data, arg);
 1094|     52|  case CURLOPT_EXPECT_100_TIMEOUT_MS:
  ------------------
  |  Branch (1094:3): [True: 52, False: 4.83k]
  ------------------
 1095|     52|    result = value_range(&arg, 0, 0, 0xffff);
 1096|     52|    if(!result)
  ------------------
  |  Branch (1096:8): [True: 52, False: 0]
  ------------------
 1097|     52|      s->expect_100_timeout = (unsigned short)arg;
 1098|     52|    break;
 1099|     40|  case CURLOPT_STREAM_WEIGHT:
  ------------------
  |  Branch (1099:3): [True: 40, False: 4.85k]
  ------------------
 1100|     40|#if defined(USE_HTTP2) || defined(USE_HTTP3)
 1101|     40|    if((arg >= 1) && (arg <= 256))
  ------------------
  |  Branch (1101:8): [True: 39, False: 1]
  |  Branch (1101:22): [True: 11, False: 28]
  ------------------
 1102|     11|      s->priority.weight = (int)arg;
 1103|     40|    break;
 1104|       |#else
 1105|       |    result = CURLE_NOT_BUILT_IN;
 1106|       |    break;
 1107|       |#endif
 1108|       |#ifndef CURL_DISABLE_HTTPSIG
 1109|       |  case CURLOPT_HTTPSIG_ALGORITHM:
 1110|       |    if(arg != CURLHTTPSIG_NONE &&
 1111|       |       arg != CURLHTTPSIG_ED25519 &&
 1112|       |       arg != CURLHTTPSIG_HMAC_SHA256)
 1113|       |      return CURLE_BAD_FUNCTION_ARGUMENT;
 1114|       |    s->httpsig_algorithm = (uint8_t)arg;
 1115|       |    if(arg)
 1116|       |      s->httpauth = (uint32_t)CURLAUTH_HTTPSIG;
 1117|       |    else
 1118|       |      s->httpauth &= ~(uint32_t)CURLAUTH_HTTPSIG;
 1119|       |    break;
 1120|       |#endif
 1121|  3.54k|  default:
  ------------------
  |  Branch (1121:3): [True: 3.54k, False: 1.34k]
  ------------------
 1122|  3.54k|    return CURLE_UNKNOWN_OPTION;
 1123|  4.89k|  }
 1124|    440|  return result;
 1125|       |#else
 1126|       |  (void)data;
 1127|       |  (void)option;
 1128|       |  (void)arg;
 1129|       |  return CURLE_UNKNOWN_OPTION;
 1130|       |#endif
 1131|  4.89k|}
setopt.c:httpauth:
  240|    158|{
  241|    158|  if(auth != CURLAUTH_NONE) {
  ------------------
  |  |  830|    158|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
  |  Branch (241:6): [True: 153, False: 5]
  ------------------
  242|    153|    int bitcheck = 0;
  243|    153|    bool authbits = FALSE;
  ------------------
  |  | 1056|    153|#define FALSE false
  ------------------
  244|    153|    if(auth & CURLAUTH_DIGEST_IE) {
  ------------------
  |  |  839|    153|#define CURLAUTH_DIGEST_IE    (((unsigned long)1) << 4)
  ------------------
  |  Branch (244:8): [True: 75, False: 78]
  ------------------
  245|     75|      auth |= CURLAUTH_DIGEST; /* set standard digest bit */
  ------------------
  |  |  832|     75|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  246|     75|      auth &= ~CURLAUTH_DIGEST_IE; /* drop the legacy bit */
  ------------------
  |  |  839|     75|#define CURLAUTH_DIGEST_IE    (((unsigned long)1) << 4)
  ------------------
  247|     75|    }
  248|       |
  249|       |    /* switch off bits we cannot support */
  250|    153|#ifndef USE_NTLM
  251|    153|    auth &= ~CURLAUTH_NTLM; /* no NTLM support */
  ------------------
  |  |  838|    153|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  252|    153|#endif
  253|    153|#ifndef USE_SPNEGO
  254|    153|    auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without GSS-API
  ------------------
  |  |  833|    153|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  255|       |                                    or SSPI */
  256|    153|#endif
  257|       |
  258|       |    /* check if any auth bit lower than CURLAUTH_ONLY is still set */
  259|    749|    while(bitcheck < 31) {
  ------------------
  |  Branch (259:11): [True: 747, False: 2]
  ------------------
  260|    747|      if(auth & (1UL << bitcheck++)) {
  ------------------
  |  Branch (260:10): [True: 151, False: 596]
  ------------------
  261|    151|        authbits = TRUE;
  ------------------
  |  | 1053|    151|#define TRUE true
  ------------------
  262|    151|        break;
  263|    151|      }
  264|    747|    }
  265|    153|    if(!authbits)
  ------------------
  |  Branch (265:8): [True: 2, False: 151]
  ------------------
  266|      2|      return CURLE_NOT_BUILT_IN; /* no supported types left! */
  267|    153|  }
  268|    156|  if(proxy)
  ------------------
  |  Branch (268:6): [True: 76, False: 80]
  ------------------
  269|     76|    data->set.proxyauth = (uint32_t)auth;
  270|     80|  else
  271|     80|    data->set.httpauth = (uint32_t)auth;
  272|    156|  return CURLE_OK;
  273|    158|}
setopt.c:setopt_HTTP_VERSION:
  278|    827|{
  279|       |  /*
  280|       |   * This sets a requested HTTP version to be used. The value is one of
  281|       |   * the listed enums in curl/curl.h.
  282|       |   */
  283|    827|  switch(arg) {
  284|      0|  case CURL_HTTP_VERSION_NONE:
  ------------------
  |  | 2336|      0|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (284:3): [True: 0, False: 827]
  ------------------
  285|       |    /* accepted */
  286|      0|    break;
  287|      4|  case CURL_HTTP_VERSION_1_0:
  ------------------
  |  | 2339|      4|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  |  Branch (287:3): [True: 4, False: 823]
  ------------------
  288|      8|  case CURL_HTTP_VERSION_1_1:
  ------------------
  |  | 2340|      8|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  |  Branch (288:3): [True: 4, False: 823]
  ------------------
  289|       |    /* accepted */
  290|      8|    break;
  291|      0|#ifdef USE_HTTP2
  292|      2|  case CURL_HTTP_VERSION_2_0:
  ------------------
  |  | 2341|      2|#define CURL_HTTP_VERSION_2_0   3L /* please use HTTP 2 in the request */
  ------------------
  |  Branch (292:3): [True: 2, False: 825]
  ------------------
  293|    789|  case CURL_HTTP_VERSION_2TLS:
  ------------------
  |  | 2342|    789|#define CURL_HTTP_VERSION_2TLS  4L /* use version 2 for HTTPS, version 1.1 for
  ------------------
  |  Branch (293:3): [True: 787, False: 40]
  ------------------
  294|    792|  case CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:
  ------------------
  |  | 2344|    792|#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
  ------------------
  |  Branch (294:3): [True: 3, False: 824]
  ------------------
  295|       |    /* accepted */
  296|    792|    break;
  297|      0|#endif
  298|       |#ifdef USE_HTTP3
  299|       |  case CURL_HTTP_VERSION_3:
  300|       |  case CURL_HTTP_VERSION_3ONLY:
  301|       |    /* accepted */
  302|       |    break;
  303|       |#endif
  304|     27|  default:
  ------------------
  |  Branch (304:3): [True: 27, False: 800]
  ------------------
  305|       |    /* not accepted */
  306|     27|    if(arg < CURL_HTTP_VERSION_NONE)
  ------------------
  |  | 2336|     27|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (306:8): [True: 0, False: 27]
  ------------------
  307|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
  308|     27|    return CURLE_UNSUPPORTED_PROTOCOL;
  309|    827|  }
  310|    800|  data->set.httpwant = (unsigned char)arg;
  311|    800|  return CURLE_OK;
  312|    827|}
setopt.c:setopt_long_proxy:
 1016|  3.54k|{
 1017|  3.54k|  struct UserDefined *s = &data->set;
 1018|       |
 1019|  3.54k|  switch(option) {
 1020|     70|  case CURLOPT_PROXYPORT:
  ------------------
  |  Branch (1020:3): [True: 70, False: 3.47k]
  ------------------
 1021|     70|    if((arg < 0) || (arg > UINT16_MAX))
  ------------------
  |  Branch (1021:8): [True: 0, False: 70]
  |  Branch (1021:21): [True: 37, False: 33]
  ------------------
 1022|     37|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1023|     33|    if(arg != s->proxyport)
  ------------------
  |  Branch (1023:8): [True: 31, False: 2]
  ------------------
 1024|     31|      changeproxy(data);
 1025|     33|    s->proxyport = (uint16_t)arg;
 1026|     33|    break;
 1027|     77|  case CURLOPT_PROXYAUTH:
  ------------------
  |  Branch (1027:3): [True: 77, False: 3.46k]
  ------------------
 1028|     77|    return httpauth(data, TRUE, (unsigned long)arg);
  ------------------
  |  | 1053|     77|#define TRUE true
  ------------------
 1029|    104|  case CURLOPT_PROXYTYPE:
  ------------------
  |  Branch (1029:3): [True: 104, False: 3.43k]
  ------------------
 1030|    104|    if((arg < CURLPROXY_HTTP) || (arg > CURLPROXY_HTTPS3))
  ------------------
  |  |  790|    104|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
                  if((arg < CURLPROXY_HTTP) || (arg > CURLPROXY_HTTPS3))
  ------------------
  |  |  805|    104|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (1030:8): [True: 0, False: 104]
  |  Branch (1030:34): [True: 36, False: 68]
  ------------------
 1031|     36|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1032|     68|#ifndef USE_PROXY_HTTP3
 1033|     68|    if(arg == CURLPROXY_HTTPS3)
  ------------------
  |  |  805|     68|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (1033:8): [True: 1, False: 67]
  ------------------
 1034|      1|      return CURLE_NOT_BUILT_IN;
 1035|     67|#endif
 1036|     67|    s->proxytype = (unsigned char)arg;
 1037|     67|    break;
 1038|     28|  case CURLOPT_SOCKS5_AUTH:
  ------------------
  |  Branch (1038:3): [True: 28, False: 3.51k]
  ------------------
 1039|     28|    if(arg & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  831|     28|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                  if(arg & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  837|     28|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|     28|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (1039:8): [True: 26, False: 2]
  ------------------
 1040|     26|      return CURLE_NOT_BUILT_IN;
 1041|      2|    s->socks5auth = (unsigned char)arg;
 1042|      2|    break;
 1043|  3.26k|  default:
  ------------------
  |  Branch (1043:3): [True: 3.26k, False: 279]
  ------------------
 1044|  3.26k|    return CURLE_UNKNOWN_OPTION;
 1045|  3.54k|  }
 1046|    102|  return CURLE_OK;
 1047|  3.54k|}
setopt.c:changeproxy:
 1009|  2.41k|{
 1010|  2.41k|  Curl_auth_digest_cleanup(&data->state.proxydigest);
 1011|  2.41k|  memset(&data->state.authproxy, 0, sizeof(data->state.authproxy));
 1012|  2.41k|}
setopt.c:setopt_long_ssl:
  953|  3.26k|{
  954|  3.26k|#ifdef USE_SSL
  955|  3.26k|  CURLcode result = CURLE_OK;
  956|  3.26k|  struct UserDefined *s = &data->set;
  957|  3.26k|  switch(option) {
  958|     62|  case CURLOPT_CA_CACHE_TIMEOUT:
  ------------------
  |  Branch (958:3): [True: 62, False: 3.20k]
  ------------------
  959|     62|    if(Curl_ssl_supports(data, SSLSUPP_CA_CACHE)) {
  ------------------
  |  |   43|     62|#define SSLSUPP_CA_CACHE     (1 << 8)
  ------------------
  |  Branch (959:8): [True: 62, False: 0]
  ------------------
  960|     62|      result = value_range(&arg, -1, -1, INT_MAX);
  961|     62|      if(!result)
  ------------------
  |  Branch (961:10): [True: 62, False: 0]
  ------------------
  962|     62|        s->general_ssl.ca_cache_timeout = (int)arg;
  963|     62|    }
  964|      0|    else
  965|      0|      result = CURLE_NOT_BUILT_IN;
  966|     62|    break;
  967|    118|  case CURLOPT_SSLVERSION:
  ------------------
  |  Branch (967:3): [True: 118, False: 3.14k]
  ------------------
  968|    118|#ifndef CURL_DISABLE_PROXY
  969|    136|  case CURLOPT_PROXY_SSLVERSION:
  ------------------
  |  Branch (969:3): [True: 18, False: 3.24k]
  ------------------
  970|    136|#endif
  971|    136|    return Curl_setopt_SSLVERSION(data, option, arg);
  972|      1|  case CURLOPT_SSL_FALSESTART:
  ------------------
  |  Branch (972:3): [True: 1, False: 3.26k]
  ------------------
  973|      1|    result = CURLE_NOT_BUILT_IN;
  974|      1|    break;
  975|     41|  case CURLOPT_USE_SSL:
  ------------------
  |  Branch (975:3): [True: 41, False: 3.22k]
  ------------------
  976|     41|    if((arg < CURLUSESSL_NONE) || (arg >= CURLUSESSL_LAST))
  ------------------
  |  |  932|     41|#define CURLUSESSL_NONE    0L /* do not attempt to use SSL */
  ------------------
  |  Branch (976:8): [True: 0, False: 41]
  |  Branch (976:35): [True: 39, False: 2]
  ------------------
  977|     39|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  978|      2|    else
  979|      2|      s->use_ssl = (unsigned char)arg;
  980|     41|    break;
  981|    793|  case CURLOPT_SSL_OPTIONS:
  ------------------
  |  Branch (981:3): [True: 793, False: 2.47k]
  ------------------
  982|    793|    s->ssl.primary.ssl_options = (unsigned char)(arg & 0xff);
  983|    793|    break;
  984|      0|#ifndef CURL_DISABLE_PROXY
  985|      3|  case CURLOPT_PROXY_SSL_OPTIONS:
  ------------------
  |  Branch (985:3): [True: 3, False: 3.26k]
  ------------------
  986|      3|    s->proxy_ssl.primary.ssl_options = (unsigned char)(arg & 0xff);
  987|      3|    break;
  988|      0|#endif
  989|      0|  case CURLOPT_SSL_ENABLE_NPN:
  ------------------
  |  Branch (989:3): [True: 0, False: 3.26k]
  ------------------
  990|      0|    break;
  991|      4|  case CURLOPT_SSLENGINE_DEFAULT:
  ------------------
  |  Branch (991:3): [True: 4, False: 3.26k]
  ------------------
  992|      4|    curlx_safefree(s->str[STRING_SSL_ENGINE]);
  ------------------
  |  | 1336|      4|  do {                      \
  |  | 1337|      4|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      4|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      4|    (ptr) = NULL;           \
  |  | 1339|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  993|      4|    result = Curl_ssl_set_engine_default(data);
  994|      4|    break;
  995|  2.22k|  default:
  ------------------
  |  Branch (995:3): [True: 2.22k, False: 1.04k]
  ------------------
  996|  2.22k|    return CURLE_UNKNOWN_OPTION;
  997|  3.26k|  }
  998|    904|  return result;
  999|       |#else  /* USE_SSL */
 1000|       |  (void)data;
 1001|       |  (void)option;
 1002|       |  (void)arg;
 1003|       |  return CURLE_UNKNOWN_OPTION;
 1004|       |#endif /* !USE_SSL */
 1005|  3.26k|}
setopt.c:setopt_long_proto:
 1135|  2.22k|{
 1136|  2.22k|  CURLcode result = CURLE_OK;
 1137|  2.22k|  struct UserDefined *s = &data->set;
 1138|       |
 1139|  2.22k|  switch(option) {
 1140|      0|#ifndef CURL_DISABLE_TFTP
 1141|     59|  case CURLOPT_TFTP_BLKSIZE:
  ------------------
  |  Branch (1141:3): [True: 59, False: 2.16k]
  ------------------
 1142|     59|    result = value_range(&arg, 0, TFTP_BLKSIZE_MIN, TFTP_BLKSIZE_MAX);
  ------------------
  |  |   30|     59|#define TFTP_BLKSIZE_MIN 8
  ------------------
                  result = value_range(&arg, 0, TFTP_BLKSIZE_MIN, TFTP_BLKSIZE_MAX);
  ------------------
  |  |   31|     59|#define TFTP_BLKSIZE_MAX 65464
  ------------------
 1143|     59|    if(!result)
  ------------------
  |  Branch (1143:8): [True: 59, False: 0]
  ------------------
 1144|     59|      s->tftp_blksize = (unsigned short)arg;
 1145|     59|    break;
 1146|      0|#endif
 1147|      0|#ifndef CURL_DISABLE_NETRC
 1148|     41|  case CURLOPT_NETRC:
  ------------------
  |  Branch (1148:3): [True: 41, False: 2.18k]
  ------------------
 1149|     41|    if((arg < CURL_NETRC_IGNORED) || (arg >= CURL_NETRC_LAST))
  ------------------
  |  | 2379|     41|#define CURL_NETRC_IGNORED  0L /* The .netrc is never read.
  ------------------
  |  Branch (1149:8): [True: 0, False: 41]
  |  Branch (1149:38): [True: 32, False: 9]
  ------------------
 1150|     32|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1151|      9|    else
 1152|      9|      s->use_netrc = (unsigned char)arg;
 1153|     41|    break;
 1154|      0|#endif
 1155|      0|#ifndef CURL_DISABLE_FTP
 1156|     43|  case CURLOPT_FTP_FILEMETHOD:
  ------------------
  |  Branch (1156:3): [True: 43, False: 2.18k]
  ------------------
 1157|     43|    if((arg < CURLFTPMETHOD_DEFAULT) || (arg >= CURLFTPMETHOD_LAST))
  ------------------
  |  | 1027|     43|#define CURLFTPMETHOD_DEFAULT   0L /* let libcurl pick */
  ------------------
  |  Branch (1157:8): [True: 0, False: 43]
  |  Branch (1157:41): [True: 41, False: 2]
  ------------------
 1158|     41|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1159|      2|    else
 1160|      2|      s->ftp_filemethod = (unsigned char)arg;
 1161|     43|    break;
 1162|     35|  case CURLOPT_FTP_SSL_CCC:
  ------------------
  |  Branch (1162:3): [True: 35, False: 2.18k]
  ------------------
 1163|     35|    if((arg < CURLFTPSSL_CCC_NONE) || (arg >= CURLFTPSSL_CCC_LAST))
  ------------------
  |  |  997|     35|#define CURLFTPSSL_CCC_NONE    0L /* do not send CCC */
  ------------------
  |  Branch (1163:8): [True: 0, False: 35]
  |  Branch (1163:39): [True: 33, False: 2]
  ------------------
 1164|     33|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1165|      2|    else
 1166|      2|      s->ftp_ccc = (unsigned char)arg;
 1167|     35|    break;
 1168|     36|  case CURLOPT_FTPSSLAUTH:
  ------------------
  |  Branch (1168:3): [True: 36, False: 2.18k]
  ------------------
 1169|     36|    if((arg < CURLFTPAUTH_DEFAULT) || (arg >= CURLFTPAUTH_LAST))
  ------------------
  |  | 1006|     36|#define CURLFTPAUTH_DEFAULT 0L /* let libcurl decide */
  ------------------
  |  Branch (1169:8): [True: 0, False: 36]
  |  Branch (1169:39): [True: 33, False: 3]
  ------------------
 1170|     33|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1171|      3|    else
 1172|      3|      s->ftpsslauth = (unsigned char)arg;
 1173|     36|    break;
 1174|     40|  case CURLOPT_ACCEPTTIMEOUT_MS:
  ------------------
  |  Branch (1174:3): [True: 40, False: 2.18k]
  ------------------
 1175|     40|    return setopt_set_timeout_ms(&s->accepttimeout, arg);
 1176|      0|#endif
 1177|      0|#if !defined(CURL_DISABLE_FTP) || defined(USE_SSH)
 1178|     25|  case CURLOPT_FTP_CREATE_MISSING_DIRS:
  ------------------
  |  Branch (1178:3): [True: 25, False: 2.19k]
  ------------------
 1179|     25|    if((arg < CURLFTP_CREATE_DIR_NONE) || (arg > CURLFTP_CREATE_DIR_RETRY))
  ------------------
  |  | 1015|     25|#define CURLFTP_CREATE_DIR_NONE  0L /* do NOT create missing dirs! */
  ------------------
                  if((arg < CURLFTP_CREATE_DIR_NONE) || (arg > CURLFTP_CREATE_DIR_RETRY))
  ------------------
  |  | 1019|     25|#define CURLFTP_CREATE_DIR_RETRY 2L /* (FTP only) if CWD fails, try MKD and
  ------------------
  |  Branch (1179:8): [True: 0, False: 25]
  |  Branch (1179:43): [True: 22, False: 3]
  ------------------
 1180|     22|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1181|      3|    else
 1182|      3|      s->ftp_create_missing_dirs = (unsigned char)arg;
 1183|     25|    break;
 1184|     51|  case CURLOPT_NEW_FILE_PERMS:
  ------------------
  |  Branch (1184:3): [True: 51, False: 2.17k]
  ------------------
 1185|     51|    if((arg < 0) || (arg > 0777))
  ------------------
  |  Branch (1185:8): [True: 0, False: 51]
  |  Branch (1185:21): [True: 41, False: 10]
  ------------------
 1186|     41|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1187|     10|    else
 1188|     10|      s->new_file_perms = (unsigned int)arg;
 1189|     51|    break;
 1190|      0|#endif
 1191|      0|#ifndef CURL_DISABLE_RTSP
 1192|     30|  case CURLOPT_RTSP_REQUEST:
  ------------------
  |  Branch (1192:3): [True: 30, False: 2.19k]
  ------------------
 1193|     30|    return setopt_RTSP_REQUEST(data, arg);
 1194|     77|  case CURLOPT_RTSP_CLIENT_CSEQ:
  ------------------
  |  Branch (1194:3): [True: 77, False: 2.14k]
  ------------------
 1195|     77|    result = value_range(&arg, 0, 0, INT_MAX);
 1196|     77|    if(!result)
  ------------------
  |  Branch (1196:8): [True: 77, False: 0]
  ------------------
 1197|     77|      data->state.rtsp_next_client_CSeq = (uint32_t)arg;
 1198|     77|    break;
 1199|     61|  case CURLOPT_RTSP_SERVER_CSEQ:
  ------------------
  |  Branch (1199:3): [True: 61, False: 2.16k]
  ------------------
 1200|     61|    result = value_range(&arg, 0, 0, INT_MAX);
 1201|     61|    if(!result)
  ------------------
  |  Branch (1201:8): [True: 61, False: 0]
  ------------------
 1202|     61|      data->state.rtsp_next_server_CSeq = (uint32_t)arg;
 1203|     61|    break;
 1204|      0|#endif
 1205|       |#ifdef USE_SSH
 1206|       |  case CURLOPT_SSH_AUTH_TYPES:
 1207|       |    s->ssh_auth_types = (uint32_t)arg;
 1208|       |    break;
 1209|       |  case CURLOPT_NEW_DIRECTORY_PERMS:
 1210|       |    if((arg < 0) || (arg > 0777))
 1211|       |      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1212|       |    else
 1213|       |      s->new_directory_perms = (unsigned int)arg;
 1214|       |    break;
 1215|       |#endif
 1216|    785|  case CURLOPT_PROTOCOLS:
  ------------------
  |  Branch (1216:3): [True: 785, False: 1.43k]
  ------------------
 1217|    785|    s->allowed_protocols = (curl_prot_t)arg;
 1218|    785|    break;
 1219|      0|  case CURLOPT_REDIR_PROTOCOLS:
  ------------------
  |  Branch (1219:3): [True: 0, False: 2.22k]
  ------------------
 1220|      0|    s->redir_protocols = (curl_prot_t)arg;
 1221|      0|    break;
 1222|      0|#ifndef CURL_DISABLE_WEBSOCKETS
 1223|      8|  case CURLOPT_WS_OPTIONS:
  ------------------
  |  Branch (1223:3): [True: 8, False: 2.21k]
  ------------------
 1224|      8|    s->ws_raw_mode = (bool)(arg & CURLWS_RAW_MODE);
  ------------------
  |  |   89|      8|#define CURLWS_RAW_MODE   (1L << 0)
  ------------------
 1225|      8|    s->ws_no_auto_pong = (bool)(arg & CURLWS_NOAUTOPONG);
  ------------------
  |  |   90|      8|#define CURLWS_NOAUTOPONG (1L << 1)
  ------------------
 1226|      8|    break;
 1227|      0|#endif
 1228|    933|  default:
  ------------------
  |  Branch (1228:3): [True: 933, False: 1.29k]
  ------------------
 1229|    933|    return CURLE_UNKNOWN_OPTION;
 1230|  2.22k|  }
 1231|  1.22k|  return result;
 1232|  2.22k|}
setopt.c:setopt_RTSP_REQUEST:
  354|     30|{
  355|       |  /*
  356|       |   * Set the RTSP request method (OPTIONS, SETUP, PLAY, etc...) Would this be
  357|       |   * better if the RTSPREQ_* were moved into here?
  358|       |   */
  359|     30|  Curl_RtspReq rtspreq = RTSPREQ_NONE;
  360|     30|  switch(arg) {
  361|      0|  case CURL_RTSPREQ_OPTIONS:
  ------------------
  |  | 2365|      0|#define CURL_RTSPREQ_OPTIONS       1L
  ------------------
  |  Branch (361:3): [True: 0, False: 30]
  ------------------
  362|      0|    rtspreq = RTSPREQ_OPTIONS;
  363|      0|    break;
  364|      0|  case CURL_RTSPREQ_DESCRIBE:
  ------------------
  |  | 2366|      0|#define CURL_RTSPREQ_DESCRIBE      2L
  ------------------
  |  Branch (364:3): [True: 0, False: 30]
  ------------------
  365|      0|    rtspreq = RTSPREQ_DESCRIBE;
  366|      0|    break;
  367|      1|  case CURL_RTSPREQ_ANNOUNCE:
  ------------------
  |  | 2367|      1|#define CURL_RTSPREQ_ANNOUNCE      3L
  ------------------
  |  Branch (367:3): [True: 1, False: 29]
  ------------------
  368|      1|    rtspreq = RTSPREQ_ANNOUNCE;
  369|      1|    break;
  370|      0|  case CURL_RTSPREQ_SETUP:
  ------------------
  |  | 2368|      0|#define CURL_RTSPREQ_SETUP         4L
  ------------------
  |  Branch (370:3): [True: 0, False: 30]
  ------------------
  371|      0|    rtspreq = RTSPREQ_SETUP;
  372|      0|    break;
  373|      0|  case CURL_RTSPREQ_PLAY:
  ------------------
  |  | 2369|      0|#define CURL_RTSPREQ_PLAY          5L
  ------------------
  |  Branch (373:3): [True: 0, False: 30]
  ------------------
  374|      0|    rtspreq = RTSPREQ_PLAY;
  375|      0|    break;
  376|      1|  case CURL_RTSPREQ_PAUSE:
  ------------------
  |  | 2370|      1|#define CURL_RTSPREQ_PAUSE         6L
  ------------------
  |  Branch (376:3): [True: 1, False: 29]
  ------------------
  377|      1|    rtspreq = RTSPREQ_PAUSE;
  378|      1|    break;
  379|      0|  case CURL_RTSPREQ_TEARDOWN:
  ------------------
  |  | 2371|      0|#define CURL_RTSPREQ_TEARDOWN      7L
  ------------------
  |  Branch (379:3): [True: 0, False: 30]
  ------------------
  380|      0|    rtspreq = RTSPREQ_TEARDOWN;
  381|      0|    break;
  382|      1|  case CURL_RTSPREQ_GET_PARAMETER:
  ------------------
  |  | 2372|      1|#define CURL_RTSPREQ_GET_PARAMETER 8L
  ------------------
  |  Branch (382:3): [True: 1, False: 29]
  ------------------
  383|      1|    rtspreq = RTSPREQ_GET_PARAMETER;
  384|      1|    break;
  385|      0|  case CURL_RTSPREQ_SET_PARAMETER:
  ------------------
  |  | 2373|      0|#define CURL_RTSPREQ_SET_PARAMETER 9L
  ------------------
  |  Branch (385:3): [True: 0, False: 30]
  ------------------
  386|      0|    rtspreq = RTSPREQ_SET_PARAMETER;
  387|      0|    break;
  388|      1|  case CURL_RTSPREQ_RECORD:
  ------------------
  |  | 2374|      1|#define CURL_RTSPREQ_RECORD        10L
  ------------------
  |  Branch (388:3): [True: 1, False: 29]
  ------------------
  389|      1|    rtspreq = RTSPREQ_RECORD;
  390|      1|    break;
  391|      7|  case CURL_RTSPREQ_RECEIVE:
  ------------------
  |  | 2375|      7|#define CURL_RTSPREQ_RECEIVE       11L
  ------------------
  |  Branch (391:3): [True: 7, False: 23]
  ------------------
  392|      7|    rtspreq = RTSPREQ_RECEIVE;
  393|      7|    break;
  394|     19|  default:
  ------------------
  |  Branch (394:3): [True: 19, False: 11]
  ------------------
  395|     19|    return CURLE_BAD_FUNCTION_ARGUMENT;
  396|     30|  }
  397|       |
  398|     11|  data->set.rtspreq = rtspreq;
  399|     11|  return CURLE_OK;
  400|     30|}
setopt.c:setopt_long_misc:
 1236|    933|{
 1237|    933|  struct UserDefined *s = &data->set;
 1238|       |
 1239|    933|  switch(option) {
 1240|     46|  case CURLOPT_TIMECONDITION:
  ------------------
  |  Branch (1240:3): [True: 46, False: 887]
  ------------------
 1241|     46|    if((arg < CURL_TIMECOND_NONE) || (arg >= CURL_TIMECOND_LAST))
  ------------------
  |  | 2434|     46|#define CURL_TIMECOND_NONE         0L
  ------------------
  |  Branch (1241:8): [True: 0, False: 46]
  |  Branch (1241:38): [True: 40, False: 6]
  ------------------
 1242|     40|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1243|      6|    s->timecondition = (unsigned char)arg;
 1244|      6|    break;
 1245|      3|  case CURLOPT_TIMEVALUE:
  ------------------
  |  Branch (1245:3): [True: 3, False: 930]
  ------------------
 1246|      3|    s->timevalue = (time_t)arg;
 1247|      3|    break;
 1248|    785|  case CURLOPT_POSTFIELDSIZE:
  ------------------
  |  Branch (1248:3): [True: 785, False: 148]
  ------------------
 1249|    785|    if(arg < -1)
  ------------------
  |  Branch (1249:8): [True: 0, False: 785]
  ------------------
 1250|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1251|    785|    if(s->postfieldsize < arg &&
  ------------------
  |  Branch (1251:8): [True: 785, False: 0]
  ------------------
 1252|    785|       s->postfields == s->str[STRING_COPYPOSTFIELDS]) {
  ------------------
  |  Branch (1252:8): [True: 0, False: 785]
  ------------------
 1253|      0|      curlx_safefree(s->str[STRING_COPYPOSTFIELDS]);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1254|      0|      s->postfields = NULL;
 1255|      0|    }
 1256|    785|    s->postfieldsize = arg;
 1257|    785|    break;
 1258|      0|  case CURLOPT_INFILESIZE:
  ------------------
  |  Branch (1258:3): [True: 0, False: 933]
  ------------------
 1259|      0|    if(arg < -1)
  ------------------
  |  Branch (1259:8): [True: 0, False: 0]
  ------------------
 1260|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1261|      0|    s->filesize = arg;
 1262|      0|    break;
 1263|     47|  case CURLOPT_RESUME_FROM:
  ------------------
  |  Branch (1263:3): [True: 47, False: 886]
  ------------------
 1264|     47|    if(arg < -1)
  ------------------
  |  Branch (1264:8): [True: 0, False: 47]
  ------------------
 1265|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1266|     47|    s->set_resume_from = arg;
 1267|     47|    break;
 1268|      0|  case CURLOPT_UPLOAD_FLAGS:
  ------------------
  |  Branch (1268:3): [True: 0, False: 933]
  ------------------
 1269|      0|    s->upload_flags = (unsigned char)arg;
 1270|      0|    break;
 1271|      0|#ifndef CURL_DISABLE_MIME
 1272|      5|  case CURLOPT_MIME_OPTIONS:
  ------------------
  |  Branch (1272:3): [True: 5, False: 928]
  ------------------
 1273|      5|    s->mime_formescape = !!(arg & CURLMIMEOPT_FORMESCAPE);
  ------------------
  |  | 2459|      5|#define CURLMIMEOPT_FORMESCAPE (1L << 0) /* Use backslash-escaping for forms */
  ------------------
 1274|      5|    break;
 1275|      0|#endif
 1276|      0|#ifndef CURL_DISABLE_HSTS
 1277|      7|  case CURLOPT_HSTS_CTRL:
  ------------------
  |  Branch (1277:3): [True: 7, False: 926]
  ------------------
 1278|      7|    if(arg & CURLHSTS_ENABLE) {
  ------------------
  |  | 1081|      7|#define CURLHSTS_ENABLE       (1L << 0)
  ------------------
  |  Branch (1278:8): [True: 4, False: 3]
  ------------------
 1279|      4|      if(!data->hsts) {
  ------------------
  |  Branch (1279:10): [True: 4, False: 0]
  ------------------
 1280|      4|        data->hsts = Curl_hsts_init();
 1281|      4|        if(!data->hsts)
  ------------------
  |  Branch (1281:12): [True: 0, False: 4]
  ------------------
 1282|      0|          return CURLE_OUT_OF_MEMORY;
 1283|      4|      }
 1284|      4|    }
 1285|      3|    else if(!data->share || !data->share->hsts) {
  ------------------
  |  Branch (1285:13): [True: 3, False: 0]
  |  Branch (1285:29): [True: 0, False: 0]
  ------------------
 1286|       |      /* throw away the HSTS cache unless shared */
 1287|      3|      Curl_hsts_cleanup(&data->hsts);
 1288|       |      /* flush all the entries */
 1289|      3|      curl_slist_free_all(data->state.hstslist);
 1290|      3|      data->state.hstslist = NULL;
 1291|      3|    }
 1292|      0|    else
 1293|       |      /* detach from shared HSTS cache without freeing it */
 1294|      0|      data->hsts = NULL;
 1295|      7|    break;
 1296|      7|#endif
 1297|      7|#ifndef CURL_DISABLE_ALTSVC
 1298|     33|  case CURLOPT_ALTSVC_CTRL:
  ------------------
  |  Branch (1298:3): [True: 33, False: 900]
  ------------------
 1299|     33|    return Curl_altsvc_ctrl(data, arg);
 1300|      0|#endif
 1301|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1302|       |  case CURLOPT_GSSAPI_DELEGATION:
 1303|       |    s->gssapi_delegation = (unsigned char)arg &
 1304|       |      (CURLGSSAPI_DELEGATION_POLICY_FLAG | CURLGSSAPI_DELEGATION_FLAG);
 1305|       |    break;
 1306|       |#endif
 1307|      7|  default:
  ------------------
  |  Branch (1307:3): [True: 7, False: 926]
  ------------------
 1308|      7|    return CURLE_UNKNOWN_OPTION;
 1309|    933|  }
 1310|    853|  return CURLE_OK;
 1311|    933|}
setopt.c:setopt_slist:
 1339|  13.0k|{
 1340|  13.0k|  CURLcode result = CURLE_OK;
 1341|  13.0k|  struct UserDefined *s = &data->set;
 1342|  13.0k|  switch(option) {
 1343|      0|#ifndef CURL_DISABLE_PROXY
 1344|      0|  case CURLOPT_PROXYHEADER:
  ------------------
  |  Branch (1344:3): [True: 0, False: 13.0k]
  ------------------
 1345|       |    /*
 1346|       |     * Set a list with proxy headers to use (or replace internals with)
 1347|       |     *
 1348|       |     * Since CURLOPT_HTTPHEADER was the only way to set HTTP headers for a
 1349|       |     * long time we remain doing it this way until CURLOPT_PROXYHEADER is
 1350|       |     * used. As soon as this option has been used, if set to anything but
 1351|       |     * NULL, custom headers for proxies are only picked from this list.
 1352|       |     *
 1353|       |     * Set this option to NULL to restore the previous behavior.
 1354|       |     */
 1355|      0|    s->proxyheaders = slist;
 1356|      0|    break;
 1357|      0|#endif
 1358|      0|#ifndef CURL_DISABLE_HTTP
 1359|      0|  case CURLOPT_HTTP200ALIASES:
  ------------------
  |  Branch (1359:3): [True: 0, False: 13.0k]
  ------------------
 1360|       |    /*
 1361|       |     * Set a list of aliases for HTTP 200 in response header
 1362|       |     */
 1363|      0|    s->http200aliases = slist;
 1364|      0|    break;
 1365|      0|#endif
 1366|      0|#if !defined(CURL_DISABLE_FTP) || defined(USE_SSH)
 1367|      0|  case CURLOPT_POSTQUOTE:
  ------------------
  |  Branch (1367:3): [True: 0, False: 13.0k]
  ------------------
 1368|       |    /*
 1369|       |     * List of RAW FTP commands to use after a transfer
 1370|       |     */
 1371|      0|    s->postquote = slist;
 1372|      0|    break;
 1373|      0|  case CURLOPT_PREQUOTE:
  ------------------
  |  Branch (1373:3): [True: 0, False: 13.0k]
  ------------------
 1374|       |    /*
 1375|       |     * List of RAW FTP commands to use prior to RETR (Wesley Laxton)
 1376|       |     */
 1377|      0|    s->prequote = slist;
 1378|      0|    break;
 1379|      0|  case CURLOPT_QUOTE:
  ------------------
  |  Branch (1379:3): [True: 0, False: 13.0k]
  ------------------
 1380|       |    /*
 1381|       |     * List of RAW FTP commands to use before a transfer
 1382|       |     */
 1383|      0|    s->quote = slist;
 1384|      0|    break;
 1385|      0|#endif
 1386|      0|  case CURLOPT_RESOLVE:
  ------------------
  |  Branch (1386:3): [True: 0, False: 13.0k]
  ------------------
 1387|       |    /*
 1388|       |     * List of HOST:PORT:[addresses] strings to populate the DNS cache with
 1389|       |     * Entries added this way will remain in the cache until explicitly
 1390|       |     * removed or the handle is cleaned up.
 1391|       |     *
 1392|       |     * Prefix the HOST with plus sign (+) to have the entry expire like
 1393|       |     * automatically added entries.
 1394|       |     *
 1395|       |     * Prefix the HOST with dash (-) to _remove_ the entry from the cache.
 1396|       |     *
 1397|       |     * This API can remove any entry from the DNS cache, but only entries
 1398|       |     * that are not actually in use right now will be pruned immediately.
 1399|       |     */
 1400|      0|    s->resolve = slist;
 1401|      0|    data->state.resolve = s->resolve;
 1402|      0|    break;
 1403|      0|#if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_MIME)
 1404|  1.27k|  case CURLOPT_HTTPHEADER:
  ------------------
  |  Branch (1404:3): [True: 1.27k, False: 11.8k]
  ------------------
 1405|       |    /*
 1406|       |     * Set a list with HTTP headers to use (or replace internals with)
 1407|       |     */
 1408|  1.27k|    s->headers = slist;
 1409|  1.27k|    break;
 1410|      0|#endif
 1411|      0|#ifndef CURL_DISABLE_TELNET
 1412|      0|  case CURLOPT_TELNETOPTIONS:
  ------------------
  |  Branch (1412:3): [True: 0, False: 13.0k]
  ------------------
 1413|       |    /*
 1414|       |     * Set a linked list of telnet options
 1415|       |     */
 1416|      0|    s->telnet_options = slist;
 1417|      0|    break;
 1418|      0|#endif
 1419|      0|#ifndef CURL_DISABLE_SMTP
 1420|     22|  case CURLOPT_MAIL_RCPT:
  ------------------
  |  Branch (1420:3): [True: 22, False: 13.0k]
  ------------------
 1421|       |    /* Set the list of mail recipients */
 1422|     22|    s->mail_rcpt = slist;
 1423|     22|    break;
 1424|      0|#endif
 1425|  11.7k|  case CURLOPT_CONNECT_TO:
  ------------------
  |  Branch (1425:3): [True: 11.7k, False: 1.29k]
  ------------------
 1426|  11.7k|    s->connect_to = slist;
 1427|  11.7k|    break;
 1428|      0|  default:
  ------------------
  |  Branch (1428:3): [True: 0, False: 13.0k]
  ------------------
 1429|      0|    return CURLE_UNKNOWN_OPTION;
 1430|  13.0k|  }
 1431|  13.0k|  return result;
 1432|  13.0k|}
setopt.c:setopt_pointers:
 1489|  1.02k|{
 1490|  1.02k|  CURLcode result = CURLE_OK;
 1491|  1.02k|  struct UserDefined *s = &data->set;
 1492|  1.02k|  switch(option) {
 1493|      0|  case CURLOPT_CURLU:
  ------------------
  |  Branch (1493:3): [True: 0, False: 1.02k]
  ------------------
 1494|       |    /*
 1495|       |     * pass CURLU to set URL
 1496|       |     */
 1497|      0|    Curl_bufref_free(&data->state.url);
 1498|      0|    curlx_safefree(s->str[STRING_SET_URL]);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1499|      0|    s->uh = va_arg(param, CURLU *);
 1500|      0|    break;
 1501|      0|#ifndef CURL_DISABLE_HTTP
 1502|      0|#ifndef CURL_DISABLE_FORM_API
 1503|     69|  case CURLOPT_HTTPPOST:
  ------------------
  |  Branch (1503:3): [True: 69, False: 953]
  ------------------
 1504|       |    /*
 1505|       |     * Set to make us do HTTP POST. Legacy API-style.
 1506|       |     */
 1507|     69|    s->httppost = va_arg(param, struct curl_httppost *);
 1508|     69|    s->method = HTTPREQ_POST_FORM;
 1509|     69|    s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1056|     69|#define FALSE false
  ------------------
 1510|     69|    Curl_mime_cleanpart(data->state.formp);
 1511|     69|    curlx_safefree(data->state.formp);
  ------------------
  |  | 1336|     69|  do {                      \
  |  | 1337|     69|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|     69|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|     69|    (ptr) = NULL;           \
  |  | 1339|     69|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 69]
  |  |  ------------------
  ------------------
 1512|     69|    data->state.mimepost = NULL;
 1513|     69|    break;
 1514|      0|#endif /* !CURL_DISABLE_FORM_API */
 1515|      0|#endif /* !CURL_DISABLE_HTTP */
 1516|      0|#if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_SMTP) ||       \
 1517|      0|  !defined(CURL_DISABLE_IMAP)
 1518|      0|#ifndef CURL_DISABLE_MIME
 1519|    168|  case CURLOPT_MIMEPOST:
  ------------------
  |  Branch (1519:3): [True: 168, False: 854]
  ------------------
 1520|    168|    result = setopt_mimepost(data, va_arg(param, curl_mime *));
 1521|    168|    break;
 1522|      0|#endif /* !CURL_DISABLE_MIME */
 1523|      0|#endif /* !CURL_DISABLE_HTTP || !CURL_DISABLE_SMTP || !CURL_DISABLE_IMAP */
 1524|      0|  case CURLOPT_STDERR:
  ------------------
  |  Branch (1524:3): [True: 0, False: 1.02k]
  ------------------
 1525|       |    /*
 1526|       |     * Set to a FILE * that should receive all error writes. This
 1527|       |     * defaults to stderr for normal operations.
 1528|       |     */
 1529|      0|    s->err = va_arg(param, FILE *);
 1530|      0|    if(!s->err)
  ------------------
  |  Branch (1530:8): [True: 0, False: 0]
  ------------------
 1531|      0|      s->err = stderr;
 1532|      0|    break;
 1533|    785|  case CURLOPT_SHARE:
  ------------------
  |  Branch (1533:3): [True: 785, False: 237]
  ------------------
 1534|    785|    return setopt_share(data, va_arg(param, struct Curl_share *));
 1535|       |
 1536|      0|  default:
  ------------------
  |  Branch (1536:3): [True: 0, False: 1.02k]
  ------------------
 1537|      0|    return CURLE_UNKNOWN_OPTION;
 1538|  1.02k|  }
 1539|    237|  return result;
 1540|  1.02k|}
setopt.c:setopt_mimepost:
 1438|    168|{
 1439|       |  /*
 1440|       |   * Set to make us do MIME POST
 1441|       |   */
 1442|    168|  CURLcode result;
 1443|    168|  struct UserDefined *s = &data->set;
 1444|    168|  if(!s->mimepostp) {
  ------------------
  |  Branch (1444:6): [True: 168, False: 0]
  ------------------
 1445|    168|    s->mimepostp = curlx_malloc(sizeof(*s->mimepostp));
  ------------------
  |  | 1473|    168|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1446|    168|    if(!s->mimepostp)
  ------------------
  |  Branch (1446:8): [True: 0, False: 168]
  ------------------
 1447|      0|      return CURLE_OUT_OF_MEMORY;
 1448|    168|    Curl_mime_initpart(s->mimepostp);
 1449|    168|  }
 1450|       |
 1451|    168|  result = Curl_mime_set_subparts(s->mimepostp, mimep, FALSE);
  ------------------
  |  | 1056|    168|#define FALSE false
  ------------------
 1452|    168|  if(!result) {
  ------------------
  |  Branch (1452:6): [True: 168, False: 0]
  ------------------
 1453|    168|    s->method = HTTPREQ_POST_MIME;
 1454|    168|    s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1056|    168|#define FALSE false
  ------------------
 1455|    168|#ifndef CURL_DISABLE_FORM_API
 1456|    168|    Curl_mime_cleanpart(data->state.formp);
 1457|    168|    curlx_safefree(data->state.formp);
  ------------------
  |  | 1336|    168|  do {                      \
  |  | 1337|    168|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|    168|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|    168|    (ptr) = NULL;           \
  |  | 1339|    168|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 168]
  |  |  ------------------
  ------------------
 1458|       |    data->state.mimepost = NULL;
 1459|    168|#endif
 1460|    168|  }
 1461|    168|  return result;
 1462|    168|}
setopt.c:setopt_share:
 1467|    785|{
 1468|    785|  CURLcode result;
 1469|       |
 1470|    785|  if(data->conn) {
  ------------------
  |  Branch (1470:6): [True: 0, False: 785]
  ------------------
 1471|       |    /* As this handle already has a connection attached, changing share now
 1472|       |       would be complicated and error-prone */
 1473|      0|    infof(data, "Cannot change share object while in use");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1474|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
 1475|      0|  }
 1476|    785|  else {
 1477|       |    /* disconnect from old share, if any and possible */
 1478|    785|    result = Curl_share_easy_unlink(data);
 1479|    785|    if(!result && GOOD_SHARE_HANDLE(set))
  ------------------
  |  |   38|    785|#define GOOD_SHARE_HANDLE(x) ((x) && (x)->magic == CURL_GOOD_SHARE)
  |  |  ------------------
  |  |  |  |   37|      0|#define CURL_GOOD_SHARE 0x7e117a1e
  |  |  ------------------
  |  |  |  Branch (38:31): [True: 0, False: 785]
  |  |  |  Branch (38:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1479:8): [True: 785, False: 0]
  ------------------
 1480|       |      /* use new share if it set */
 1481|      0|      result = Curl_share_easy_link(data, set);
 1482|    785|  }
 1483|    785|  return result;
 1484|    785|}
setopt.c:setopt_cptr:
 2509|   142k|{
 2510|   142k|  typedef CURLcode (*ptrfunc)(struct Curl_easy *data, CURLoption option,
 2511|   142k|                              char *ptr);
 2512|   142k|  static const ptrfunc setopt_call[] = {
 2513|   142k|#ifndef CURL_DISABLE_PROXY
 2514|   142k|    setopt_cptr_proxy,
 2515|   142k|#endif
 2516|   142k|#if defined(USE_SSL) || defined(USE_SSH)
 2517|   142k|    setopt_cptr_ssl,
 2518|   142k|#endif
 2519|       |#ifdef USE_SSH
 2520|       |    setopt_cptr_ssh,
 2521|       |#endif
 2522|   142k|#ifndef CURL_DISABLE_FTP
 2523|   142k|    setopt_cptr_ftp,
 2524|   142k|#endif
 2525|   142k|#if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_MQTT)
 2526|   142k|    setopt_cptr_http_mqtt,
 2527|   142k|#endif
 2528|   142k|    setopt_cptr_net,
 2529|   142k|    setopt_cptr_misc,
 2530|   142k|  };
 2531|   142k|  size_t i;
 2532|       |
 2533|   710k|  for(i = 0; i < CURL_ARRAYSIZE(setopt_call); i++) {
  ------------------
  |  | 1303|   710k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (2533:14): [True: 710k, False: 14]
  ------------------
 2534|   710k|    CURLcode result = setopt_call[i](data, option, ptr);
 2535|   710k|    if(result != CURLE_UNKNOWN_OPTION)
  ------------------
  |  Branch (2535:8): [True: 142k, False: 568k]
  ------------------
 2536|   142k|      return result;
 2537|   710k|  }
 2538|     14|  return CURLE_UNKNOWN_OPTION;
 2539|   142k|}
setopt.c:setopt_cptr_proxy:
 1648|   142k|{
 1649|   142k|  CURLcode result = CURLE_OK;
 1650|   142k|  struct UserDefined *s = &data->set;
 1651|   142k|  switch(option) {
 1652|    164|  case CURLOPT_PROXYUSERPWD: {
  ------------------
  |  Branch (1652:3): [True: 164, False: 142k]
  ------------------
 1653|       |    /*
 1654|       |     * user:password needed to use the proxy
 1655|       |     */
 1656|    164|    char *u = NULL;
 1657|    164|    char *p = NULL;
 1658|    164|    result = setstropt_userpwd(ptr, &u, &p);
 1659|       |
 1660|       |    /* URL decode the components */
 1661|    164|    if(!result) {
  ------------------
  |  Branch (1661:8): [True: 164, False: 0]
  ------------------
 1662|    164|      curlx_safefree(s->str[STRING_PROXYUSERNAME]);
  ------------------
  |  | 1336|    164|  do {                      \
  |  | 1337|    164|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|    164|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|    164|    (ptr) = NULL;           \
  |  | 1339|    164|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 164]
  |  |  ------------------
  ------------------
 1663|    164|      curlx_safefree(s->str[STRING_PROXYPASSWORD]);
  ------------------
  |  | 1336|    164|  do {                      \
  |  | 1337|    164|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|    164|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|    164|    (ptr) = NULL;           \
  |  | 1339|    164|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 164]
  |  |  ------------------
  ------------------
 1664|    164|      if(u)
  ------------------
  |  Branch (1664:10): [True: 164, False: 0]
  ------------------
 1665|    164|        result = Curl_urldecode(u, 0, &s->str[STRING_PROXYUSERNAME], NULL,
 1666|    164|                                REJECT_ZERO);
 1667|    164|    }
 1668|    164|    if(!result && p)
  ------------------
  |  Branch (1668:8): [True: 162, False: 2]
  |  Branch (1668:19): [True: 38, False: 124]
  ------------------
 1669|     38|      result = Curl_urldecode(p, 0, &s->str[STRING_PROXYPASSWORD], NULL,
 1670|     38|                              REJECT_ZERO);
 1671|    164|    curlx_free(u);
  ------------------
  |  | 1478|    164|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1672|    164|    curlx_strzero(p);
 1673|    164|    curlx_free(p);
  ------------------
  |  | 1478|    164|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1674|    164|    break;
 1675|      0|  }
 1676|      4|  case CURLOPT_PROXYUSERNAME:
  ------------------
  |  Branch (1676:3): [True: 4, False: 142k]
  ------------------
 1677|       |    /*
 1678|       |     * authentication username to use in the operation
 1679|       |     */
 1680|      4|    return Curl_setstropt(&s->str[STRING_PROXYUSERNAME], ptr);
 1681|       |
 1682|     19|  case CURLOPT_PROXYPASSWORD:
  ------------------
  |  Branch (1682:3): [True: 19, False: 142k]
  ------------------
 1683|       |    /*
 1684|       |     * authentication password to use in the operation
 1685|       |     */
 1686|     19|    return Curl_setstropt(&s->str[STRING_PROXYPASSWORD], ptr);
 1687|       |
 1688|    266|  case CURLOPT_NOPROXY:
  ------------------
  |  Branch (1688:3): [True: 266, False: 141k]
  ------------------
 1689|       |    /*
 1690|       |     * proxy exception list
 1691|       |     */
 1692|    266|    return Curl_setstropt(&s->str[STRING_NOPROXY], ptr);
 1693|     95|  case CURLOPT_PROXY_SSLCERT:
  ------------------
  |  Branch (1693:3): [True: 95, False: 142k]
  ------------------
 1694|       |    /*
 1695|       |     * String that holds filename of the SSL certificate to use for proxy
 1696|       |     */
 1697|     95|    return Curl_setstropt(&s->str[STRING_CERT_PROXY], ptr);
 1698|     13|  case CURLOPT_PROXY_SSLCERTTYPE:
  ------------------
  |  Branch (1698:3): [True: 13, False: 142k]
  ------------------
 1699|       |    /*
 1700|       |     * String that holds file type of the SSL certificate to use for proxy
 1701|       |     */
 1702|     13|    return Curl_setstropt(&s->str[STRING_CERT_TYPE_PROXY], ptr);
 1703|     14|  case CURLOPT_PROXY_SSLKEY:
  ------------------
  |  Branch (1703:3): [True: 14, False: 142k]
  ------------------
 1704|       |    /*
 1705|       |     * String that holds filename of the SSL key to use for proxy
 1706|       |     */
 1707|     14|    return Curl_setstropt(&s->str[STRING_KEY_PROXY], ptr);
 1708|     16|  case CURLOPT_PROXY_KEYPASSWD:
  ------------------
  |  Branch (1708:3): [True: 16, False: 142k]
  ------------------
 1709|       |    /*
 1710|       |     * String that holds the SSL private key password for proxy.
 1711|       |     */
 1712|     16|    return Curl_setstropt(&s->str[STRING_KEY_PASSWD_PROXY], ptr);
 1713|     18|  case CURLOPT_PROXY_SSLKEYTYPE:
  ------------------
  |  Branch (1713:3): [True: 18, False: 142k]
  ------------------
 1714|       |    /*
 1715|       |     * String that holds file type of the SSL key to use for proxy
 1716|       |     */
 1717|     18|    return Curl_setstropt(&s->str[STRING_KEY_TYPE_PROXY], ptr);
 1718|      7|  case CURLOPT_PROXY_SSL_CIPHER_LIST:
  ------------------
  |  Branch (1718:3): [True: 7, False: 142k]
  ------------------
 1719|      7|    if(Curl_ssl_supports(data, SSLSUPP_CIPHER_LIST)) {
  ------------------
  |  |   44|      7|#define SSLSUPP_CIPHER_LIST  (1 << 9) /* supports TLS 1.0-1.2 ciphersuites */
  ------------------
  |  Branch (1719:8): [True: 7, False: 0]
  ------------------
 1720|       |      /* set a list of cipher we want to use in the SSL connection for proxy */
 1721|      7|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER_LIST_PROXY], ptr);
 1722|      7|    }
 1723|      0|    else
 1724|      0|      return CURLE_NOT_BUILT_IN;
 1725|     18|  case CURLOPT_PROXY_TLS13_CIPHERS:
  ------------------
  |  Branch (1725:3): [True: 18, False: 142k]
  ------------------
 1726|     18|    if(Curl_ssl_supports(data, SSLSUPP_TLS13_CIPHERSUITES))
  ------------------
  |  |   40|     18|#define SSLSUPP_TLS13_CIPHERSUITES (1 << 5) /* supports TLS 1.3 ciphersuites */
  ------------------
  |  Branch (1726:8): [True: 18, False: 0]
  ------------------
 1727|       |      /* set preferred list of TLS 1.3 cipher suites for proxy */
 1728|     18|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER13_LIST_PROXY], ptr);
 1729|      0|    else
 1730|      0|      return CURLE_NOT_BUILT_IN;
 1731|  2.38k|  case CURLOPT_PROXY:
  ------------------
  |  Branch (1731:3): [True: 2.38k, False: 139k]
  ------------------
 1732|       |    /*
 1733|       |     * Set proxy server:port to use as proxy.
 1734|       |     *
 1735|       |     * If the proxy is set to "" (and CURLOPT_PRE_PROXY is set to "" or NULL)
 1736|       |     * we explicitly say that we do not want to use a proxy (even though there
 1737|       |     * might be environment variables saying so).
 1738|       |     *
 1739|       |     * Setting it to NULL, means no proxy but allows the environment variables
 1740|       |     * to decide for us (if CURLOPT_PRE_PROXY setting it to NULL).
 1741|       |     */
 1742|  2.38k|    return setproxy(data, ptr);
 1743|    519|  case CURLOPT_PRE_PROXY:
  ------------------
  |  Branch (1743:3): [True: 519, False: 141k]
  ------------------
 1744|       |    /*
 1745|       |     * Set proxy server:port to use as SOCKS proxy.
 1746|       |     *
 1747|       |     * If the proxy is set to "" or NULL we explicitly say that we do not want
 1748|       |     * to use the socks proxy.
 1749|       |     */
 1750|    519|    return Curl_setstropt(&s->str[STRING_PRE_PROXY], ptr);
 1751|      0|  case CURLOPT_SOCKS5_GSSAPI_SERVICE:
  ------------------
  |  Branch (1751:3): [True: 0, False: 142k]
  ------------------
 1752|     16|  case CURLOPT_PROXY_SERVICE_NAME:
  ------------------
  |  Branch (1752:3): [True: 16, False: 142k]
  ------------------
 1753|       |    /*
 1754|       |     * Set proxy authentication service name for Kerberos 5 and SPNEGO
 1755|       |     */
 1756|     16|    return Curl_setstropt(&s->str[STRING_PROXY_SERVICE_NAME], ptr);
 1757|     23|  case CURLOPT_PROXY_PINNEDPUBLICKEY:
  ------------------
  |  Branch (1757:3): [True: 23, False: 142k]
  ------------------
 1758|       |    /*
 1759|       |     * Set pinned public key for SSL connection.
 1760|       |     * Specify filename of the public key in DER format.
 1761|       |     */
 1762|     23|#ifdef USE_SSL
 1763|     23|    if(Curl_ssl_supports(data, SSLSUPP_PINNEDPUBKEY))
  ------------------
  |  |   37|     23|#define SSLSUPP_PINNEDPUBKEY (1 << 2) /* supports CURLOPT_PINNEDPUBLICKEY */
  ------------------
  |  Branch (1763:8): [True: 23, False: 0]
  ------------------
 1764|     23|      return Curl_setstropt(&s->str[STRING_SSL_PINNEDPUBLICKEY_PROXY], ptr);
 1765|      0|#endif
 1766|      0|    return CURLE_NOT_BUILT_IN;
 1767|       |
 1768|     16|  case CURLOPT_HAPROXY_CLIENT_IP:
  ------------------
  |  Branch (1768:3): [True: 16, False: 142k]
  ------------------
 1769|       |    /*
 1770|       |     * Set the client IP to send through HAProxy PROXY protocol
 1771|       |     */
 1772|     16|    result = Curl_setstropt(&s->str[STRING_HAPROXY_CLIENT_IP], ptr);
 1773|       |
 1774|       |    /* enable the HAProxy protocol if an IP is provided */
 1775|     16|    s->haproxyprotocol = !!s->str[STRING_HAPROXY_CLIENT_IP];
 1776|     16|    break;
 1777|     13|  case CURLOPT_PROXY_CAINFO:
  ------------------
  |  Branch (1777:3): [True: 13, False: 142k]
  ------------------
 1778|       |    /*
 1779|       |     * Set CA info SSL connection for proxy. Specify filename of the
 1780|       |     * CA certificate
 1781|       |     */
 1782|     13|    result = Curl_setstropt(&s->str[STRING_SSL_CAFILE_PROXY], ptr);
 1783|     13|    s->proxy_ssl.custom_cafile = !!s->str[STRING_SSL_CAFILE_PROXY];
 1784|     13|    return result;
 1785|     10|  case CURLOPT_PROXY_CRLFILE:
  ------------------
  |  Branch (1785:3): [True: 10, False: 142k]
  ------------------
 1786|       |    /*
 1787|       |     * Set CRL file info for SSL connection for proxy. Specify filename of the
 1788|       |     * CRL to check certificates revocation
 1789|       |     */
 1790|     10|    if(Curl_ssl_supports(data, SSLSUPP_CRLFILE))
  ------------------
  |  |   48|     10|#define SSLSUPP_CRLFILE      (1 << 13) /* supports CURLOPT_CRLFILE */
  ------------------
  |  Branch (1790:8): [True: 10, False: 0]
  ------------------
 1791|     10|      return Curl_setstropt(&s->str[STRING_SSL_CRLFILE_PROXY], ptr);
 1792|      0|    return CURLE_NOT_BUILT_IN;
 1793|     12|  case CURLOPT_PROXY_ISSUERCERT:
  ------------------
  |  Branch (1793:3): [True: 12, False: 142k]
  ------------------
 1794|       |    /*
 1795|       |     * Set Issuer certificate file to check certificates issuer
 1796|       |     */
 1797|     12|    if(Curl_ssl_supports(data, SSLSUPP_ISSUERCERT))
  ------------------
  |  |   46|     12|#define SSLSUPP_ISSUERCERT   (1 << 11) /* supports CURLOPT_ISSUERCERT */
  ------------------
  |  Branch (1797:8): [True: 12, False: 0]
  ------------------
 1798|     12|      return Curl_setstropt(&s->str[STRING_SSL_ISSUERCERT_PROXY], ptr);
 1799|      0|    return CURLE_NOT_BUILT_IN;
 1800|     13|  case CURLOPT_PROXY_CAPATH:
  ------------------
  |  Branch (1800:3): [True: 13, False: 142k]
  ------------------
 1801|       |    /*
 1802|       |     * Set CA path info for SSL connection proxy. Specify directory name of the
 1803|       |     * CA certificates which have been prepared using openssl c_rehash utility.
 1804|       |     */
 1805|     13|#ifdef USE_SSL
 1806|     13|    if(Curl_ssl_supports(data, SSLSUPP_CA_PATH)) {
  ------------------
  |  |   35|     13|#define SSLSUPP_CA_PATH      (1 << 0) /* supports CAPATH */
  ------------------
  |  Branch (1806:8): [True: 13, False: 0]
  ------------------
 1807|       |      /* This does not work on Windows. */
 1808|     13|      result = Curl_setstropt(&s->str[STRING_SSL_CAPATH_PROXY], ptr);
 1809|     13|      s->proxy_ssl.custom_capath = !!s->str[STRING_SSL_CAPATH_PROXY];
 1810|     13|      return result;
 1811|     13|    }
 1812|      0|#endif
 1813|      0|    return CURLE_NOT_BUILT_IN;
 1814|   138k|  default:
  ------------------
  |  Branch (1814:3): [True: 138k, False: 3.64k]
  ------------------
 1815|   138k|    return CURLE_UNKNOWN_OPTION;
 1816|   142k|  }
 1817|    180|  return result;
 1818|   142k|}
setopt.c:setstropt_userpwd:
  134|    239|{
  135|    239|  char *user = NULL;
  136|    239|  char *passwd = NULL;
  137|       |
  138|    239|  DEBUGASSERT(userp);
  ------------------
  |  | 1079|    239|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 0, False: 239]
  |  Branch (138:3): [True: 239, False: 0]
  ------------------
  139|    239|  DEBUGASSERT(passwdp);
  ------------------
  |  | 1079|    239|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (139:3): [True: 0, False: 239]
  |  Branch (139:3): [True: 239, False: 0]
  ------------------
  140|       |
  141|       |  /* Parse the login details if specified. If not, then we treat NULL as a
  142|       |     hint to clear the existing data */
  143|    239|  if(option) {
  ------------------
  |  Branch (143:6): [True: 239, False: 0]
  ------------------
  144|    239|    size_t len = strlen(option);
  145|    239|    CURLcode result;
  146|    239|    if(len > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|    239|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (146:8): [True: 0, False: 239]
  ------------------
  147|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
  148|       |
  149|    239|    result = Curl_parse_login_details(option, len, &user, &passwd, NULL);
  150|    239|    if(result)
  ------------------
  |  Branch (150:8): [True: 0, False: 239]
  ------------------
  151|      0|      return result;
  152|    239|  }
  153|       |
  154|    239|  curlx_free(*userp);
  ------------------
  |  | 1478|    239|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  155|    239|  *userp = user;
  156|       |
  157|    239|  curlx_strzero(*passwdp);
  158|    239|  curlx_free(*passwdp);
  ------------------
  |  | 1478|    239|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  159|    239|  *passwdp = passwd;
  160|       |
  161|    239|  return CURLE_OK;
  162|    239|}
setopt.c:setproxy:
 1636|  2.38k|{
 1637|  2.38k|  if((data->set.str[STRING_PROXY] && proxy) &&
  ------------------
  |  Branch (1637:7): [True: 0, False: 2.38k]
  |  Branch (1637:38): [True: 0, False: 0]
  ------------------
 1638|       |     /* there was one set, is this a new one? */
 1639|      0|     !strcmp(data->set.str[STRING_PROXY], proxy))
  ------------------
  |  Branch (1639:6): [True: 0, False: 0]
  ------------------
 1640|      0|    return CURLE_OK; /* same one as before */
 1641|       |
 1642|  2.38k|  changeproxy(data);
 1643|  2.38k|  return Curl_setstropt(&data->set.str[STRING_PROXY], proxy);
 1644|  2.38k|}
setopt.c:setopt_cptr_ssl:
 1901|   138k|{
 1902|   138k|  CURLcode result = CURLE_OK;
 1903|   138k|  struct UserDefined *s = &data->set;
 1904|       |
 1905|   138k|  switch(option) {
 1906|     18|  case CURLOPT_KEYPASSWD:
  ------------------
  |  Branch (1906:3): [True: 18, False: 138k]
  ------------------
 1907|       |    /*
 1908|       |     * String that holds the SSL or SSH private key password.
 1909|       |     */
 1910|     18|    result = Curl_setstropt(&s->str[STRING_KEY_PASSWD], ptr);
 1911|     18|    break;
 1912|      0|#ifdef USE_SSL
 1913|  1.01k|  case CURLOPT_CAINFO:
  ------------------
  |  Branch (1913:3): [True: 1.01k, False: 137k]
  ------------------
 1914|       |    /*
 1915|       |     * Set CA info for SSL connection. Specify filename of the CA certificate
 1916|       |     */
 1917|  1.01k|    result = Curl_setstropt(&s->str[STRING_SSL_CAFILE], ptr);
 1918|  1.01k|    s->ssl.custom_cafile = !!s->str[STRING_SSL_CAFILE];
 1919|  1.01k|    return result;
 1920|    961|  case CURLOPT_CAPATH:
  ------------------
  |  Branch (1920:3): [True: 961, False: 137k]
  ------------------
 1921|       |    /*
 1922|       |     * Set CA path info for SSL connection. Specify directory name of the CA
 1923|       |     * certificates which have been prepared using openssl c_rehash utility.
 1924|       |     */
 1925|    961|    if(Curl_ssl_supports(data, SSLSUPP_CA_PATH)) {
  ------------------
  |  |   35|    961|#define SSLSUPP_CA_PATH      (1 << 0) /* supports CAPATH */
  ------------------
  |  Branch (1925:8): [True: 961, False: 0]
  ------------------
 1926|       |      /* This does not work on Windows. */
 1927|    961|      result = Curl_setstropt(&s->str[STRING_SSL_CAPATH], ptr);
 1928|    961|      s->ssl.custom_capath = !!s->str[STRING_SSL_CAPATH];
 1929|    961|      return result;
 1930|    961|    }
 1931|      0|    return CURLE_NOT_BUILT_IN;
 1932|  12.5k|  case CURLOPT_CRLFILE:
  ------------------
  |  Branch (1932:3): [True: 12.5k, False: 126k]
  ------------------
 1933|       |    /*
 1934|       |     * Set CRL file info for SSL connection. Specify filename of the CRL
 1935|       |     * to check certificates revocation
 1936|       |     */
 1937|  12.5k|    if(Curl_ssl_supports(data, SSLSUPP_CRLFILE))
  ------------------
  |  |   48|  12.5k|#define SSLSUPP_CRLFILE      (1 << 13) /* supports CURLOPT_CRLFILE */
  ------------------
  |  Branch (1937:8): [True: 12.5k, False: 0]
  ------------------
 1938|  12.5k|      return Curl_setstropt(&s->str[STRING_SSL_CRLFILE], ptr);
 1939|      0|    return CURLE_NOT_BUILT_IN;
 1940|    862|  case CURLOPT_SSL_CIPHER_LIST:
  ------------------
  |  Branch (1940:3): [True: 862, False: 137k]
  ------------------
 1941|    862|    if(Curl_ssl_supports(data, SSLSUPP_CIPHER_LIST))
  ------------------
  |  |   44|    862|#define SSLSUPP_CIPHER_LIST  (1 << 9) /* supports TLS 1.0-1.2 ciphersuites */
  ------------------
  |  Branch (1941:8): [True: 862, False: 0]
  ------------------
 1942|       |      /* set a list of cipher we want to use in the SSL connection */
 1943|    862|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER_LIST], ptr);
 1944|      0|    else
 1945|      0|      return CURLE_NOT_BUILT_IN;
 1946|    138|  case CURLOPT_TLS13_CIPHERS:
  ------------------
  |  Branch (1946:3): [True: 138, False: 138k]
  ------------------
 1947|    138|    if(Curl_ssl_supports(data, SSLSUPP_TLS13_CIPHERSUITES))
  ------------------
  |  |   40|    138|#define SSLSUPP_TLS13_CIPHERSUITES (1 << 5) /* supports TLS 1.3 ciphersuites */
  ------------------
  |  Branch (1947:8): [True: 138, False: 0]
  ------------------
 1948|       |      /* set preferred list of TLS 1.3 cipher suites */
 1949|    138|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER13_LIST], ptr);
 1950|      0|    else
 1951|      0|      return CURLE_NOT_BUILT_IN;
 1952|      0|  case CURLOPT_RANDOM_FILE:
  ------------------
  |  Branch (1952:3): [True: 0, False: 138k]
  ------------------
 1953|      0|    break;
 1954|      0|  case CURLOPT_EGDSOCKET:
  ------------------
  |  Branch (1954:3): [True: 0, False: 138k]
  ------------------
 1955|      0|    break;
 1956|      0|  case CURLOPT_SSL_CTX_DATA:
  ------------------
  |  Branch (1956:3): [True: 0, False: 138k]
  ------------------
 1957|       |    /*
 1958|       |     * Set an SSL_CTX callback parameter pointer
 1959|       |     */
 1960|      0|    if(Curl_ssl_supports(data, SSLSUPP_SSL_CTX)) {
  ------------------
  |  |   38|      0|#define SSLSUPP_SSL_CTX      (1 << 3) /* supports CURLOPT_SSL_CTX */
  ------------------
  |  Branch (1960:8): [True: 0, False: 0]
  ------------------
 1961|      0|      s->ssl.fsslctxp = ptr;
 1962|      0|      break;
 1963|      0|    }
 1964|      0|    else
 1965|      0|      return CURLE_NOT_BUILT_IN;
 1966|     22|  case CURLOPT_SSLCERT:
  ------------------
  |  Branch (1966:3): [True: 22, False: 138k]
  ------------------
 1967|       |    /*
 1968|       |     * String that holds filename of the SSL certificate to use
 1969|       |     */
 1970|     22|    return Curl_setstropt(&s->str[STRING_CERT], ptr);
 1971|     25|  case CURLOPT_SSLCERTTYPE:
  ------------------
  |  Branch (1971:3): [True: 25, False: 138k]
  ------------------
 1972|       |    /*
 1973|       |     * String that holds file type of the SSL certificate to use
 1974|       |     */
 1975|     25|    return Curl_setstropt(&s->str[STRING_CERT_TYPE], ptr);
 1976|     15|  case CURLOPT_SSLKEY:
  ------------------
  |  Branch (1976:3): [True: 15, False: 138k]
  ------------------
 1977|       |    /*
 1978|       |     * String that holds filename of the SSL key to use
 1979|       |     */
 1980|     15|    return Curl_setstropt(&s->str[STRING_KEY], ptr);
 1981|     33|  case CURLOPT_SSLKEYTYPE:
  ------------------
  |  Branch (1981:3): [True: 33, False: 138k]
  ------------------
 1982|       |    /*
 1983|       |     * String that holds file type of the SSL key to use
 1984|       |     */
 1985|     33|    return Curl_setstropt(&s->str[STRING_KEY_TYPE], ptr);
 1986|    812|  case CURLOPT_SSLENGINE:
  ------------------
  |  Branch (1986:3): [True: 812, False: 137k]
  ------------------
 1987|       |    /*
 1988|       |     * String that holds the SSL crypto engine.
 1989|       |     */
 1990|    812|    if(ptr && ptr[0]) {
  ------------------
  |  Branch (1990:8): [True: 812, False: 0]
  |  Branch (1990:15): [True: 810, False: 2]
  ------------------
 1991|    810|      result = Curl_setstropt(&s->str[STRING_SSL_ENGINE], ptr);
 1992|    810|      if(!result) {
  ------------------
  |  Branch (1992:10): [True: 810, False: 0]
  ------------------
 1993|    810|        result = Curl_ssl_set_engine(data, ptr);
 1994|    810|      }
 1995|    810|    }
 1996|    812|    break;
 1997|     17|  case CURLOPT_ISSUERCERT:
  ------------------
  |  Branch (1997:3): [True: 17, False: 138k]
  ------------------
 1998|       |    /*
 1999|       |     * Set Issuer certificate file
 2000|       |     * to check certificates issuer
 2001|       |     */
 2002|     17|    if(Curl_ssl_supports(data, SSLSUPP_ISSUERCERT))
  ------------------
  |  |   46|     17|#define SSLSUPP_ISSUERCERT   (1 << 11) /* supports CURLOPT_ISSUERCERT */
  ------------------
  |  Branch (2002:8): [True: 17, False: 0]
  ------------------
 2003|     17|      return Curl_setstropt(&s->str[STRING_SSL_ISSUERCERT], ptr);
 2004|      0|    return CURLE_NOT_BUILT_IN;
 2005|    696|  case CURLOPT_SSL_EC_CURVES:
  ------------------
  |  Branch (2005:3): [True: 696, False: 137k]
  ------------------
 2006|       |    /*
 2007|       |     * Set accepted curves in SSL connection setup.
 2008|       |     * Specify colon-delimited list of curve algorithm names.
 2009|       |     */
 2010|    696|    if(Curl_ssl_supports(data, SSLSUPP_SSL_EC_CURVES))
  ------------------
  |  |   47|    696|#define SSLSUPP_SSL_EC_CURVES (1 << 12) /* supports CURLOPT_SSL_EC_CURVES */
  ------------------
  |  Branch (2010:8): [True: 696, False: 0]
  ------------------
 2011|    696|      return Curl_setstropt(&s->str[STRING_SSL_EC_CURVES], ptr);
 2012|      0|    return CURLE_NOT_BUILT_IN;
 2013|      0|  case CURLOPT_SSL_SIGNATURE_ALGORITHMS:
  ------------------
  |  Branch (2013:3): [True: 0, False: 138k]
  ------------------
 2014|       |    /*
 2015|       |     * Set accepted signature algorithms.
 2016|       |     * Specify colon-delimited list of signature scheme names.
 2017|       |     */
 2018|      0|    if(Curl_ssl_supports(data, SSLSUPP_SIGNATURE_ALGORITHMS))
  ------------------
  |  |   45|      0|#define SSLSUPP_SIGNATURE_ALGORITHMS (1 << 10) /* supports TLS sigalgs */
  ------------------
  |  Branch (2018:8): [True: 0, False: 0]
  ------------------
 2019|      0|      return Curl_setstropt(&s->str[STRING_SSL_SIGNATURE_ALGORITHMS], ptr);
 2020|      0|    return CURLE_NOT_BUILT_IN;
 2021|     14|  case CURLOPT_PINNEDPUBLICKEY:
  ------------------
  |  Branch (2021:3): [True: 14, False: 138k]
  ------------------
 2022|       |    /*
 2023|       |     * Set pinned public key for SSL connection.
 2024|       |     * Specify filename of the public key in DER format.
 2025|       |     */
 2026|     14|    if(Curl_ssl_supports(data, SSLSUPP_PINNEDPUBKEY))
  ------------------
  |  |   37|     14|#define SSLSUPP_PINNEDPUBKEY (1 << 2) /* supports CURLOPT_PINNEDPUBLICKEY */
  ------------------
  |  Branch (2026:8): [True: 14, False: 0]
  ------------------
 2027|     14|      return Curl_setstropt(&s->str[STRING_SSL_PINNEDPUBLICKEY], ptr);
 2028|      0|    return CURLE_NOT_BUILT_IN;
 2029|      1|  case CURLOPT_ECH:
  ------------------
  |  Branch (2029:3): [True: 1, False: 138k]
  ------------------
 2030|      1|    return setopt_ech(data, ptr);
  ------------------
  |  | 1894|      1|#define setopt_ech(x,y) CURLE_NOT_BUILT_IN
  ------------------
 2031|      0|#endif
 2032|   121k|  default:
  ------------------
  |  Branch (2032:3): [True: 121k, False: 17.1k]
  ------------------
 2033|   121k|    return CURLE_UNKNOWN_OPTION;
 2034|   138k|  }
 2035|    830|  return result;
 2036|   138k|}
setopt.c:setopt_cptr_ftp:
 2223|   121k|{
 2224|   121k|  CURLcode result = CURLE_OK;
 2225|   121k|  struct UserDefined *s = &data->set;
 2226|   121k|  switch(option) {
 2227|      6|  case CURLOPT_FTPPORT:
  ------------------
  |  Branch (2227:3): [True: 6, False: 121k]
  ------------------
 2228|       |    /*
 2229|       |     * Use FTP PORT, this also specifies which IP address to use
 2230|       |     */
 2231|      6|    result = Curl_setstropt(&s->str[STRING_FTPPORT], ptr);
 2232|      6|    s->ftp_use_port = !!(s->str[STRING_FTPPORT]);
 2233|      6|    break;
 2234|       |
 2235|    119|  case CURLOPT_FTP_ACCOUNT:
  ------------------
  |  Branch (2235:3): [True: 119, False: 121k]
  ------------------
 2236|    119|    return Curl_setstropt(&s->str[STRING_FTP_ACCOUNT], ptr);
 2237|       |
 2238|      9|  case CURLOPT_FTP_ALTERNATIVE_TO_USER:
  ------------------
  |  Branch (2238:3): [True: 9, False: 121k]
  ------------------
 2239|      9|    return Curl_setstropt(&s->str[STRING_FTP_ALTERNATIVE_TO_USER], ptr);
 2240|       |
 2241|      1|  case CURLOPT_KRBLEVEL:
  ------------------
  |  Branch (2241:3): [True: 1, False: 121k]
  ------------------
 2242|      1|    return CURLE_NOT_BUILT_IN; /* removed in 8.17.0 */
 2243|      0|  case CURLOPT_CHUNK_DATA:
  ------------------
  |  Branch (2243:3): [True: 0, False: 121k]
  ------------------
 2244|      0|    s->wildcardptr = ptr;
 2245|      0|    break;
 2246|      0|  case CURLOPT_FNMATCH_DATA:
  ------------------
  |  Branch (2246:3): [True: 0, False: 121k]
  ------------------
 2247|      0|    s->fnmatch_data = ptr;
 2248|      0|    break;
 2249|   121k|  default:
  ------------------
  |  Branch (2249:3): [True: 121k, False: 135]
  ------------------
 2250|   121k|    return CURLE_UNKNOWN_OPTION;
 2251|   121k|  }
 2252|      6|  return result;
 2253|   121k|}
setopt.c:setopt_cptr_http_mqtt:
 2042|   121k|{
 2043|   121k|  CURLcode result = CURLE_OK;
 2044|   121k|  struct UserDefined *s = &data->set;
 2045|       |
 2046|   121k|  switch(option) {
 2047|      0|  case CURLOPT_COPYPOSTFIELDS:
  ------------------
  |  Branch (2047:3): [True: 0, False: 121k]
  ------------------
 2048|      0|    return setopt_copypostfields(ptr, s);
 2049|       |
 2050|    816|  case CURLOPT_POSTFIELDS:
  ------------------
  |  Branch (2050:3): [True: 816, False: 120k]
  ------------------
 2051|       |    /*
 2052|       |     * Like above, but use static data instead of copying it.
 2053|       |     */
 2054|    816|    s->postfields = ptr;
 2055|       |    /* Release old copied data. */
 2056|    816|    curlx_safefree(s->str[STRING_COPYPOSTFIELDS]);
  ------------------
  |  | 1336|    816|  do {                      \
  |  | 1337|    816|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|    816|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|    816|    (ptr) = NULL;           \
  |  | 1339|    816|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 816]
  |  |  ------------------
  ------------------
 2057|    816|    s->method = HTTPREQ_POST;
 2058|    816|    break;
 2059|       |
 2060|      0|#ifndef CURL_DISABLE_HTTP
 2061|      0|  case CURLOPT_TRAILERDATA:
  ------------------
  |  Branch (2061:3): [True: 0, False: 121k]
  ------------------
 2062|      0|    s->trailer_data = ptr;
 2063|      0|    break;
 2064|     23|  case CURLOPT_ACCEPT_ENCODING:
  ------------------
  |  Branch (2064:3): [True: 23, False: 121k]
  ------------------
 2065|       |    /*
 2066|       |     * String to use at the value of Accept-Encoding header.
 2067|       |     *
 2068|       |     * If the encoding is set to "" we use an Accept-Encoding header that
 2069|       |     * encompasses all the encodings we support.
 2070|       |     * If the encoding is set to NULL we do not send an Accept-Encoding header
 2071|       |     * and ignore any received Content-Encoding header.
 2072|       |     *
 2073|       |     */
 2074|     23|    if(ptr && !*ptr) {
  ------------------
  |  Branch (2074:8): [True: 23, False: 0]
  |  Branch (2074:15): [True: 11, False: 12]
  ------------------
 2075|     11|      ptr = Curl_get_content_encodings();
 2076|     11|      if(ptr) {
  ------------------
  |  Branch (2076:10): [True: 11, False: 0]
  ------------------
 2077|     11|        curlx_free(s->str[STRING_ENCODING]);
  ------------------
  |  | 1478|     11|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2078|     11|        s->str[STRING_ENCODING] = ptr;
 2079|     11|      }
 2080|      0|      else
 2081|      0|        result = CURLE_OUT_OF_MEMORY;
 2082|     11|      return result;
 2083|     11|    }
 2084|     12|    return Curl_setstropt(&s->str[STRING_ENCODING], ptr);
 2085|       |
 2086|      0|#ifndef CURL_DISABLE_AWS
 2087|  1.13k|  case CURLOPT_AWS_SIGV4:
  ------------------
  |  Branch (2087:3): [True: 1.13k, False: 120k]
  ------------------
 2088|       |    /*
 2089|       |     * String that is merged to some authentication
 2090|       |     * parameters are used by the algorithm.
 2091|       |     */
 2092|  1.13k|    result = Curl_setstropt(&s->str[STRING_AWS_SIGV4], ptr);
 2093|       |    /*
 2094|       |     * Basic has been set by default; it needs to be unset here.
 2095|       |     */
 2096|  1.13k|    if(s->str[STRING_AWS_SIGV4])
  ------------------
  |  Branch (2096:8): [True: 1.13k, False: 0]
  ------------------
 2097|  1.13k|      s->httpauth = CURLAUTH_AWS_SIGV4;
  ------------------
  |  |  845|  1.13k|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
 2098|  1.13k|    break;
 2099|      0|#endif
 2100|       |#ifndef CURL_DISABLE_HTTPSIG
 2101|       |  case CURLOPT_HTTPSIG_KEY:
 2102|       |    result = Curl_setstropt(&s->str[STRING_HTTPSIG_KEY], ptr);
 2103|       |    break;
 2104|       |  case CURLOPT_HTTPSIG_KEYID:
 2105|       |    result = Curl_setstropt(&s->str[STRING_HTTPSIG_KEYID], ptr);
 2106|       |    break;
 2107|       |  case CURLOPT_HTTPSIG_HEADERS:
 2108|       |    result = Curl_setstropt(&s->str[STRING_HTTPSIG_HEADERS], ptr);
 2109|       |    break;
 2110|       |#endif
 2111|      9|  case CURLOPT_REFERER:
  ------------------
  |  Branch (2111:3): [True: 9, False: 121k]
  ------------------
 2112|       |    /*
 2113|       |     * String to set in the HTTP Referer: field.
 2114|       |     */
 2115|      9|    Curl_bufref_free(&data->state.referer);
 2116|      9|    result = Curl_setstropt(&s->str[STRING_SET_REFERER], ptr);
 2117|      9|    break;
 2118|       |
 2119|     20|  case CURLOPT_USERAGENT:
  ------------------
  |  Branch (2119:3): [True: 20, False: 121k]
  ------------------
 2120|       |    /*
 2121|       |     * String to use in the HTTP User-Agent field
 2122|       |     */
 2123|     20|    return Curl_setstropt(&s->str[STRING_USERAGENT], ptr);
 2124|       |
 2125|      0|#ifndef CURL_DISABLE_COOKIES
 2126|     32|  case CURLOPT_COOKIE:
  ------------------
  |  Branch (2126:3): [True: 32, False: 121k]
  ------------------
 2127|       |    /*
 2128|       |     * Cookie string to send to the remote server in the request.
 2129|       |     */
 2130|     32|    return Curl_setstropt(&s->str[STRING_COOKIE], ptr);
 2131|       |
 2132|  11.7k|  case CURLOPT_COOKIEFILE:
  ------------------
  |  Branch (2132:3): [True: 11.7k, False: 109k]
  ------------------
 2133|  11.7k|    return cookiefile(data, ptr);
 2134|       |
 2135|  11.7k|  case CURLOPT_COOKIEJAR:
  ------------------
  |  Branch (2135:3): [True: 11.7k, False: 109k]
  ------------------
 2136|       |    /*
 2137|       |     * Set cookie filename to dump all cookies to when we are done.
 2138|       |     */
 2139|  11.7k|    result = Curl_setstropt(&s->str[STRING_COOKIEJAR], ptr);
 2140|  11.7k|    if(!result) {
  ------------------
  |  Branch (2140:8): [True: 11.7k, False: 0]
  ------------------
 2141|       |      /*
 2142|       |       * Activate the cookie parser. This may or may not already
 2143|       |       * have been made.
 2144|       |       */
 2145|  11.7k|      if(!data->cookies)
  ------------------
  |  Branch (2145:10): [True: 9.94k, False: 1.83k]
  ------------------
 2146|  9.94k|        data->cookies = Curl_cookie_init();
 2147|  11.7k|      if(!data->cookies)
  ------------------
  |  Branch (2147:10): [True: 0, False: 11.7k]
  ------------------
 2148|      0|        result = CURLE_OUT_OF_MEMORY;
 2149|  11.7k|      else
 2150|  11.7k|        data->state.cookie_engine = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
 2151|  11.7k|    }
 2152|  11.7k|    break;
 2153|       |
 2154|  1.89k|  case CURLOPT_COOKIELIST:
  ------------------
  |  Branch (2154:3): [True: 1.89k, False: 119k]
  ------------------
 2155|  1.89k|    return cookielist(data, ptr);
 2156|      0|#endif /* !CURL_DISABLE_COOKIES */
 2157|       |
 2158|      0|#endif /* !CURL_DISABLE_HTTP */
 2159|  93.7k|  default:
  ------------------
  |  Branch (2159:3): [True: 93.7k, False: 27.4k]
  ------------------
 2160|  93.7k|    return CURLE_UNKNOWN_OPTION;
 2161|   121k|  }
 2162|  13.7k|  return result;
 2163|   121k|}
setopt.c:cookiefile:
 1597|  11.7k|{
 1598|       |  /*
 1599|       |   * Set cookie file to read and parse. Can be used multiple times.
 1600|       |   */
 1601|  11.7k|  if(ptr) {
  ------------------
  |  Branch (1601:6): [True: 11.7k, False: 0]
  ------------------
 1602|  11.7k|    struct curl_slist *cl;
 1603|       |    /* general protection against mistakes and abuse */
 1604|  11.7k|    if(strlen(ptr) > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  11.7k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1604:8): [True: 0, False: 11.7k]
  ------------------
 1605|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1606|       |    /* append the cookie filename to the list of filenames, and deal with
 1607|       |       them later */
 1608|  11.7k|    cl = curl_slist_append(data->state.cookielist, ptr);
 1609|  11.7k|    if(!cl) {
  ------------------
  |  Branch (1609:8): [True: 0, False: 11.7k]
  ------------------
 1610|      0|      curl_slist_free_all(data->state.cookielist);
 1611|      0|      data->state.cookielist = NULL;
 1612|      0|      return CURLE_OUT_OF_MEMORY;
 1613|      0|    }
 1614|  11.7k|    data->state.cookielist = cl; /* store the list for later use */
 1615|  11.7k|  }
 1616|      0|  else {
 1617|       |    /* clear the list of cookie files */
 1618|      0|    curl_slist_free_all(data->state.cookielist);
 1619|      0|    data->state.cookielist = NULL;
 1620|       |
 1621|      0|    if(!data->share || !data->share->cookies) {
  ------------------
  |  Branch (1621:8): [True: 0, False: 0]
  |  Branch (1621:24): [True: 0, False: 0]
  ------------------
 1622|       |      /* throw away all existing cookies if this is not a shared cookie
 1623|       |         container */
 1624|      0|      Curl_cookie_clearall(data->cookies);
 1625|      0|      Curl_cookie_cleanup(data->cookies);
 1626|      0|    }
 1627|       |    /* disable the cookie engine */
 1628|      0|    data->cookies = NULL;
 1629|      0|  }
 1630|  11.7k|  return CURLE_OK;
 1631|  11.7k|}
setopt.c:cookielist:
 1544|  1.89k|{
 1545|  1.89k|  CURLcode result = CURLE_OK;
 1546|  1.89k|  if(!ptr)
  ------------------
  |  Branch (1546:6): [True: 0, False: 1.89k]
  ------------------
 1547|      0|    return CURLE_OK;
 1548|       |
 1549|  1.89k|  if(curl_strequal(ptr, "ALL")) {
  ------------------
  |  Branch (1549:6): [True: 1, False: 1.89k]
  ------------------
 1550|       |    /* clear all cookies */
 1551|      1|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1552|      1|    Curl_cookie_clearall(data->cookies);
 1553|      1|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1554|      1|  }
 1555|  1.89k|  else if(curl_strequal(ptr, "SESS")) {
  ------------------
  |  Branch (1555:11): [True: 1, False: 1.89k]
  ------------------
 1556|       |    /* clear session cookies */
 1557|      1|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1558|      1|    Curl_cookie_clearsess(data->cookies);
 1559|      1|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1560|      1|  }
 1561|  1.89k|  else if(curl_strequal(ptr, "FLUSH")) {
  ------------------
  |  Branch (1561:11): [True: 2, False: 1.89k]
  ------------------
 1562|       |    /* flush cookies to file, takes care of the locking */
 1563|      2|    Curl_flush_cookies(data, FALSE);
  ------------------
  |  | 1056|      2|#define FALSE false
  ------------------
 1564|      2|  }
 1565|  1.89k|  else if(curl_strequal(ptr, "RELOAD")) {
  ------------------
  |  Branch (1565:11): [True: 3, False: 1.88k]
  ------------------
 1566|       |    /* reload cookies from file */
 1567|      3|    return Curl_cookie_loadfiles(data);
 1568|      3|  }
 1569|  1.88k|  else {
 1570|  1.88k|    if(!data->cookies) {
  ------------------
  |  Branch (1570:8): [True: 1.88k, False: 0]
  ------------------
 1571|       |      /* if cookie engine was not running, activate it */
 1572|  1.88k|      data->cookies = Curl_cookie_init();
 1573|  1.88k|      if(!data->cookies)
  ------------------
  |  Branch (1573:10): [True: 0, False: 1.88k]
  ------------------
 1574|      0|        return CURLE_OUT_OF_MEMORY;
 1575|  1.88k|      data->state.cookie_engine = TRUE;
  ------------------
  |  | 1053|  1.88k|#define TRUE true
  ------------------
 1576|  1.88k|    }
 1577|       |
 1578|       |    /* general protection against mistakes and abuse */
 1579|  1.88k|    if(strlen(ptr) > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  1.88k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1579:8): [True: 0, False: 1.88k]
  ------------------
 1580|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1581|       |
 1582|  1.88k|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1583|  1.88k|    if(checkprefix("Set-Cookie:", ptr))
  ------------------
  |  |   33|  1.88k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  1.88k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  1.88k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1.18k, False: 705]
  |  |  ------------------
  ------------------
 1584|       |      /* HTTP Header format line */
 1585|  1.18k|      result = Curl_cookie_add(data, data->cookies, TRUE, FALSE, ptr + 11,
  ------------------
  |  | 1053|  1.18k|#define TRUE true
  ------------------
                    result = Curl_cookie_add(data, data->cookies, TRUE, FALSE, ptr + 11,
  ------------------
  |  | 1056|  1.18k|#define FALSE false
  ------------------
 1586|  1.18k|                               NULL, NULL, TRUE);
  ------------------
  |  | 1053|  1.18k|#define TRUE true
  ------------------
 1587|    705|    else
 1588|       |      /* Netscape format line */
 1589|    705|      result = Curl_cookie_add(data, data->cookies, FALSE, FALSE, ptr, NULL,
  ------------------
  |  | 1056|    705|#define FALSE false
  ------------------
                    result = Curl_cookie_add(data, data->cookies, FALSE, FALSE, ptr, NULL,
  ------------------
  |  | 1056|    705|#define FALSE false
  ------------------
 1590|    705|                               NULL, TRUE);
  ------------------
  |  | 1053|    705|#define TRUE true
  ------------------
 1591|  1.88k|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1592|  1.88k|  }
 1593|  1.89k|  return result;
 1594|  1.89k|}
setopt.c:setopt_cptr_net:
 2258|  93.7k|{
 2259|  93.7k|  struct UserDefined *s = &data->set;
 2260|  93.7k|  switch(option) {
 2261|    304|  case CURLOPT_INTERFACE:
  ------------------
  |  Branch (2261:3): [True: 304, False: 93.4k]
  ------------------
 2262|       |    /*
 2263|       |     * Set what interface or address/hostname to bind the socket to when
 2264|       |     * performing an operation and thus what from-IP your connection will use.
 2265|       |     */
 2266|    304|    return setstropt_interface(ptr,
 2267|    304|                               &s->str[STRING_DEVICE],
 2268|    304|                               &s->str[STRING_INTERFACE],
 2269|    304|                               &s->str[STRING_BINDHOST]);
 2270|       |#ifdef USE_RESOLV_ARES
 2271|       |  case CURLOPT_DNS_SERVERS:
 2272|       |    return Curl_setstropt(&s->str[STRING_DNS_SERVERS], ptr);
 2273|       |
 2274|       |  case CURLOPT_DNS_INTERFACE:
 2275|       |    return Curl_setstropt(&s->str[STRING_DNS_INTERFACE], ptr);
 2276|       |
 2277|       |  case CURLOPT_DNS_LOCAL_IP4:
 2278|       |    return Curl_setstropt(&s->str[STRING_DNS_LOCAL_IP4], ptr);
 2279|       |
 2280|       |  case CURLOPT_DNS_LOCAL_IP6:
 2281|       |    return Curl_setstropt(&s->str[STRING_DNS_LOCAL_IP6], ptr);
 2282|       |#endif
 2283|      0|#ifdef USE_UNIX_SOCKETS
 2284|     24|  case CURLOPT_UNIX_SOCKET_PATH:
  ------------------
  |  Branch (2284:3): [True: 24, False: 93.7k]
  ------------------
 2285|     24|    s->abstract_unix_socket = FALSE;
  ------------------
  |  | 1056|     24|#define FALSE false
  ------------------
 2286|     24|    return Curl_setstropt(&s->str[STRING_UNIX_SOCKET_PATH], ptr);
 2287|       |
 2288|     23|  case CURLOPT_ABSTRACT_UNIX_SOCKET:
  ------------------
  |  Branch (2288:3): [True: 23, False: 93.7k]
  ------------------
 2289|     23|    s->abstract_unix_socket = TRUE;
  ------------------
  |  | 1053|     23|#define TRUE true
  ------------------
 2290|     23|    return Curl_setstropt(&s->str[STRING_UNIX_SOCKET_PATH], ptr);
 2291|      0|#endif
 2292|      0|#ifndef CURL_DISABLE_DOH
 2293|    420|  case CURLOPT_DOH_URL:
  ------------------
  |  Branch (2293:3): [True: 420, False: 93.3k]
  ------------------
 2294|    420|    {
 2295|    420|      CURLcode result = Curl_setstropt(&s->str[STRING_DOH], ptr);
 2296|    420|      s->doh = !!(s->str[STRING_DOH]);
 2297|    420|      return result;
 2298|      0|    }
 2299|      0|#endif
 2300|  93.0k|  default:
  ------------------
  |  Branch (2300:3): [True: 93.0k, False: 771]
  ------------------
 2301|  93.0k|    return CURLE_UNKNOWN_OPTION;
 2302|  93.7k|  }
 2303|  93.7k|}
setopt.c:setstropt_interface:
  166|    304|{
  167|    304|  char *dev = NULL;
  168|    304|  char *iface = NULL;
  169|    304|  char *host = NULL;
  170|    304|  CURLcode result;
  171|       |
  172|    304|  DEBUGASSERT(devp);
  ------------------
  |  | 1079|    304|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (172:3): [True: 0, False: 304]
  |  Branch (172:3): [True: 304, False: 0]
  ------------------
  173|    304|  DEBUGASSERT(ifacep);
  ------------------
  |  | 1079|    304|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (173:3): [True: 0, False: 304]
  |  Branch (173:3): [True: 304, False: 0]
  ------------------
  174|    304|  DEBUGASSERT(hostp);
  ------------------
  |  | 1079|    304|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (174:3): [True: 0, False: 304]
  |  Branch (174:3): [True: 304, False: 0]
  ------------------
  175|       |
  176|    304|  if(option) {
  ------------------
  |  Branch (176:6): [True: 304, False: 0]
  ------------------
  177|       |    /* Parse the interface details if set, otherwise clear them all */
  178|    304|    result = Curl_parse_interface(option, &dev, &iface, &host);
  179|    304|    if(result)
  ------------------
  |  Branch (179:8): [True: 7, False: 297]
  ------------------
  180|      7|      return result;
  181|    304|  }
  182|    297|  curlx_free(*devp);
  ------------------
  |  | 1478|    297|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  183|    297|  *devp = dev;
  184|       |
  185|    297|  curlx_free(*ifacep);
  ------------------
  |  | 1478|    297|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  186|    297|  *ifacep = iface;
  187|       |
  188|    297|  curlx_free(*hostp);
  ------------------
  |  | 1478|    297|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  189|    297|  *hostp = host;
  190|       |
  191|    297|  return CURLE_OK;
  192|    304|}
setopt.c:setopt_cptr_misc:
 2307|  93.0k|{
 2308|  93.0k|  CURLcode result = CURLE_OK;
 2309|  93.0k|  struct UserDefined *s = &data->set;
 2310|       |
 2311|  93.0k|  switch(option) {
 2312|     13|  case CURLOPT_REQUEST_TARGET:
  ------------------
  |  Branch (2312:3): [True: 13, False: 93.0k]
  ------------------
 2313|     13|    return Curl_setstropt(&s->str[STRING_TARGET], ptr);
 2314|      0|#ifndef CURL_DISABLE_NETRC
 2315|  11.7k|  case CURLOPT_NETRC_FILE:
  ------------------
  |  Branch (2315:3): [True: 11.7k, False: 81.2k]
  ------------------
 2316|  11.7k|    return Curl_setstropt(&s->str[STRING_NETRC_FILE], ptr);
 2317|      0|#endif
 2318|     13|  case CURLOPT_CUSTOMREQUEST:
  ------------------
  |  Branch (2318:3): [True: 13, False: 93.0k]
  ------------------
 2319|     13|    return Curl_setstropt(&s->str[STRING_CUSTOMREQUEST], ptr);
 2320|       |
 2321|       |    /* we do not set s->method = HTTPREQ_CUSTOM; here, we continue as if we
 2322|       |       were using the already set type and this changes the actual request
 2323|       |       keyword */
 2324|     15|  case CURLOPT_SERVICE_NAME:
  ------------------
  |  Branch (2324:3): [True: 15, False: 93.0k]
  ------------------
 2325|     15|    return Curl_setstropt(&s->str[STRING_SERVICE_NAME], ptr);
 2326|       |
 2327|      0|  case CURLOPT_HEADERDATA:
  ------------------
  |  Branch (2327:3): [True: 0, False: 93.0k]
  ------------------
 2328|      0|    s->writeheader = ptr;
 2329|      0|    break;
 2330|  11.7k|  case CURLOPT_READDATA:
  ------------------
  |  Branch (2330:3): [True: 11.7k, False: 81.2k]
  ------------------
 2331|  11.7k|    s->in_set = ptr;
 2332|  11.7k|    break;
 2333|  12.5k|  case CURLOPT_WRITEDATA:
  ------------------
  |  Branch (2333:3): [True: 12.5k, False: 80.4k]
  ------------------
 2334|  12.5k|    s->out = ptr;
 2335|  12.5k|    break;
 2336|      0|  case CURLOPT_DEBUGDATA:
  ------------------
  |  Branch (2336:3): [True: 0, False: 93.0k]
  ------------------
 2337|      0|    s->debugdata = ptr;
 2338|      0|    break;
 2339|      0|  case CURLOPT_PROGRESSDATA:
  ------------------
  |  | 1351|      0|#define CURLOPT_PROGRESSDATA CURLOPT_XFERINFODATA
  ------------------
  |  Branch (2339:3): [True: 0, False: 93.0k]
  ------------------
 2340|      0|    s->progress_client = ptr;
 2341|      0|    break;
 2342|      0|  case CURLOPT_SEEKDATA:
  ------------------
  |  Branch (2342:3): [True: 0, False: 93.0k]
  ------------------
 2343|      0|    s->seek_client = ptr;
 2344|      0|    break;
 2345|      0|  case CURLOPT_IOCTLDATA:
  ------------------
  |  Branch (2345:3): [True: 0, False: 93.0k]
  ------------------
 2346|      0|    s->ioctl_client = ptr;
 2347|      0|    break;
 2348|      0|  case CURLOPT_SOCKOPTDATA:
  ------------------
  |  Branch (2348:3): [True: 0, False: 93.0k]
  ------------------
 2349|      0|    s->sockopt_client = ptr;
 2350|      0|    break;
 2351|  11.7k|  case CURLOPT_OPENSOCKETDATA:
  ------------------
  |  Branch (2351:3): [True: 11.7k, False: 81.2k]
  ------------------
 2352|  11.7k|    s->opensocket_client = ptr;
 2353|  11.7k|    break;
 2354|      0|  case CURLOPT_RESOLVER_START_DATA:
  ------------------
  |  Branch (2354:3): [True: 0, False: 93.0k]
  ------------------
 2355|      0|    s->resolver_start_client = ptr;
 2356|      0|    break;
 2357|      0|  case CURLOPT_CLOSESOCKETDATA:
  ------------------
  |  Branch (2357:3): [True: 0, False: 93.0k]
  ------------------
 2358|      0|    s->closesocket_client = ptr;
 2359|      0|    break;
 2360|      0|  case CURLOPT_PREREQDATA:
  ------------------
  |  Branch (2360:3): [True: 0, False: 93.0k]
  ------------------
 2361|      0|    s->prereq_userp = ptr;
 2362|      0|    break;
 2363|      0|  case CURLOPT_ERRORBUFFER:
  ------------------
  |  Branch (2363:3): [True: 0, False: 93.0k]
  ------------------
 2364|      0|    s->errorbuffer = ptr;
 2365|      0|    break;
 2366|  8.43k|  case CURLOPT_URL:
  ------------------
  |  Branch (2366:3): [True: 8.43k, False: 84.5k]
  ------------------
 2367|  8.43k|    result = Curl_setstropt(&s->str[STRING_SET_URL], ptr);
 2368|  8.43k|    Curl_bufref_set(&data->state.url, s->str[STRING_SET_URL], 0, NULL);
 2369|  8.43k|    break;
 2370|       |
 2371|     75|  case CURLOPT_USERPWD:
  ------------------
  |  Branch (2371:3): [True: 75, False: 92.9k]
  ------------------
 2372|     75|    return setstropt_userpwd(ptr, &s->str[STRING_USERNAME],
 2373|     75|                             &s->str[STRING_PASSWORD]);
 2374|       |
 2375|     33|  case CURLOPT_USERNAME:
  ------------------
  |  Branch (2375:3): [True: 33, False: 92.9k]
  ------------------
 2376|     33|    return Curl_setstropt(&s->str[STRING_USERNAME], ptr);
 2377|       |
 2378|     96|  case CURLOPT_PASSWORD:
  ------------------
  |  Branch (2378:3): [True: 96, False: 92.9k]
  ------------------
 2379|     96|    return Curl_setstropt(&s->str[STRING_PASSWORD], ptr);
 2380|       |
 2381|     10|  case CURLOPT_LOGIN_OPTIONS:
  ------------------
  |  Branch (2381:3): [True: 10, False: 93.0k]
  ------------------
 2382|     10|    return Curl_setstropt(&s->str[STRING_OPTIONS], ptr);
 2383|       |
 2384|     21|  case CURLOPT_XOAUTH2_BEARER:
  ------------------
  |  Branch (2384:3): [True: 21, False: 92.9k]
  ------------------
 2385|     21|    return Curl_setstropt(&s->str[STRING_BEARER], ptr);
 2386|     31|  case CURLOPT_RANGE:
  ------------------
  |  Branch (2386:3): [True: 31, False: 92.9k]
  ------------------
 2387|     31|    return Curl_setstropt(&s->str[STRING_SET_RANGE], ptr);
 2388|      0|  case CURLOPT_PRIVATE:
  ------------------
  |  Branch (2388:3): [True: 0, False: 93.0k]
  ------------------
 2389|      0|    s->private_data = ptr;
 2390|      0|    break;
 2391|  11.7k|  case CURLOPT_PROTOCOLS_STR:
  ------------------
  |  Branch (2391:3): [True: 11.7k, False: 81.2k]
  ------------------
 2392|  11.7k|    if(ptr) {
  ------------------
  |  Branch (2392:8): [True: 11.7k, False: 0]
  ------------------
 2393|  11.7k|      curl_prot_t protos;
 2394|  11.7k|      result = protocol2num(ptr, &protos);
 2395|  11.7k|      if(!result)
  ------------------
  |  Branch (2395:10): [True: 11.7k, False: 0]
  ------------------
 2396|  11.7k|        s->allowed_protocols = protos;
 2397|  11.7k|    }
 2398|      0|    else
 2399|       |      /* make a NULL argument reset to default */
 2400|      0|      s->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
  ------------------
  |  |   68|      0|#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
  ------------------
 2401|  11.7k|    break;
 2402|     42|  case CURLOPT_REDIR_PROTOCOLS_STR:
  ------------------
  |  Branch (2402:3): [True: 42, False: 92.9k]
  ------------------
 2403|     42|    if(ptr) {
  ------------------
  |  Branch (2403:8): [True: 42, False: 0]
  ------------------
 2404|     42|      curl_prot_t protos;
 2405|     42|      result = protocol2num(ptr, &protos);
 2406|     42|      if(!result)
  ------------------
  |  Branch (2406:10): [True: 11, False: 31]
  ------------------
 2407|     11|        s->redir_protocols = protos;
 2408|     42|    }
 2409|      0|    else
 2410|       |      /* make a NULL argument reset to default */
 2411|      0|      s->redir_protocols = (curl_prot_t)CURLPROTO_REDIR;
  ------------------
  |  |   71|      0|#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1086|      0|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1087|      0|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1088|      0|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |   72|      0|                         CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1089|      0|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
 2412|     42|    break;
 2413|    870|  case CURLOPT_DEFAULT_PROTOCOL:
  ------------------
  |  Branch (2413:3): [True: 870, False: 92.1k]
  ------------------
 2414|       |    /* Set the protocol to use when the URL does not include any protocol */
 2415|    870|    return Curl_setstropt(&s->str[STRING_DEFAULT_PROTOCOL], ptr);
 2416|      0|#ifndef CURL_DISABLE_SMTP
 2417|     10|  case CURLOPT_MAIL_FROM:
  ------------------
  |  Branch (2417:3): [True: 10, False: 93.0k]
  ------------------
 2418|       |    /* Set the SMTP mail originator */
 2419|     10|    return Curl_setstropt(&s->str[STRING_MAIL_FROM], ptr);
 2420|     15|  case CURLOPT_MAIL_AUTH:
  ------------------
  |  Branch (2420:3): [True: 15, False: 93.0k]
  ------------------
 2421|       |    /* Set the SMTP auth originator */
 2422|     15|    return Curl_setstropt(&s->str[STRING_MAIL_AUTH], ptr);
 2423|      0|#endif
 2424|     23|  case CURLOPT_SASL_AUTHZID:
  ------------------
  |  Branch (2424:3): [True: 23, False: 92.9k]
  ------------------
 2425|       |    /* Authorization identity (identity to act as) */
 2426|     23|    return Curl_setstropt(&s->str[STRING_SASL_AUTHZID], ptr);
 2427|      0|#ifndef CURL_DISABLE_RTSP
 2428|      6|  case CURLOPT_RTSP_SESSION_ID:
  ------------------
  |  Branch (2428:3): [True: 6, False: 93.0k]
  ------------------
 2429|      6|    return Curl_setstropt(&s->str[STRING_RTSP_SESSION_ID], ptr);
 2430|      7|  case CURLOPT_RTSP_STREAM_URI:
  ------------------
  |  Branch (2430:3): [True: 7, False: 93.0k]
  ------------------
 2431|      7|    return Curl_setstropt(&s->str[STRING_RTSP_STREAM_URI], ptr);
 2432|     18|  case CURLOPT_RTSP_TRANSPORT:
  ------------------
  |  Branch (2432:3): [True: 18, False: 92.9k]
  ------------------
 2433|     18|    return Curl_setstropt(&s->str[STRING_RTSP_TRANSPORT], ptr);
 2434|      0|  case CURLOPT_INTERLEAVEDATA:
  ------------------
  |  Branch (2434:3): [True: 0, False: 93.0k]
  ------------------
 2435|      0|    s->rtp_out = ptr;
 2436|      0|    break;
 2437|      0|#endif /* !CURL_DISABLE_RTSP */
 2438|      2|  case CURLOPT_TLSAUTH_USERNAME:
  ------------------
  |  Branch (2438:3): [True: 2, False: 93.0k]
  ------------------
 2439|      5|  case CURLOPT_TLSAUTH_PASSWORD:
  ------------------
  |  Branch (2439:3): [True: 3, False: 93.0k]
  ------------------
 2440|      6|  case CURLOPT_TLSAUTH_TYPE:
  ------------------
  |  Branch (2440:3): [True: 1, False: 93.0k]
  ------------------
 2441|      7|  case CURLOPT_PROXY_TLSAUTH_USERNAME:
  ------------------
  |  Branch (2441:3): [True: 1, False: 93.0k]
  ------------------
 2442|      8|  case CURLOPT_PROXY_TLSAUTH_PASSWORD:
  ------------------
  |  Branch (2442:3): [True: 1, False: 93.0k]
  ------------------
 2443|      9|  case CURLOPT_PROXY_TLSAUTH_TYPE:
  ------------------
  |  Branch (2443:3): [True: 1, False: 93.0k]
  ------------------
 2444|      9|    return CURLE_NOT_BUILT_IN;
 2445|      0|#ifndef CURL_DISABLE_HSTS
 2446|      0|  case CURLOPT_HSTSREADDATA:
  ------------------
  |  Branch (2446:3): [True: 0, False: 93.0k]
  ------------------
 2447|      0|    s->hsts_read_userp = ptr;
 2448|      0|    break;
 2449|      0|  case CURLOPT_HSTSWRITEDATA:
  ------------------
  |  Branch (2449:3): [True: 0, False: 93.0k]
  ------------------
 2450|      0|    s->hsts_write_userp = ptr;
 2451|      0|    break;
 2452|  11.7k|  case CURLOPT_HSTS: {
  ------------------
  |  Branch (2452:3): [True: 11.7k, False: 81.2k]
  ------------------
 2453|  11.7k|    struct curl_slist *h;
 2454|  11.7k|    if(!data->hsts) {
  ------------------
  |  Branch (2454:8): [True: 11.7k, False: 2]
  ------------------
 2455|  11.7k|      data->hsts = Curl_hsts_init();
 2456|  11.7k|      if(!data->hsts)
  ------------------
  |  Branch (2456:10): [True: 0, False: 11.7k]
  ------------------
 2457|      0|        return CURLE_OUT_OF_MEMORY;
 2458|  11.7k|    }
 2459|  11.7k|    if(ptr) {
  ------------------
  |  Branch (2459:8): [True: 11.7k, False: 0]
  ------------------
 2460|  11.7k|      result = Curl_setstropt(&s->str[STRING_HSTS], ptr);
 2461|  11.7k|      if(result)
  ------------------
  |  Branch (2461:10): [True: 0, False: 11.7k]
  ------------------
 2462|      0|        return result;
 2463|       |      /* this needs to build a list of filenames to read from, so that it can
 2464|       |         read them later, as we might get a shared HSTS handle to load them
 2465|       |         into */
 2466|  11.7k|      h = curl_slist_append(data->state.hstslist, ptr);
 2467|  11.7k|      if(!h) {
  ------------------
  |  Branch (2467:10): [True: 0, False: 11.7k]
  ------------------
 2468|      0|        curl_slist_free_all(data->state.hstslist);
 2469|      0|        data->state.hstslist = NULL;
 2470|      0|        return CURLE_OUT_OF_MEMORY;
 2471|      0|      }
 2472|  11.7k|      data->state.hstslist = h; /* store the list for later use */
 2473|  11.7k|    }
 2474|      0|    else {
 2475|       |      /* clear the list of HSTS files */
 2476|      0|      curl_slist_free_all(data->state.hstslist);
 2477|      0|      data->state.hstslist = NULL;
 2478|      0|      if(!data->share || !data->share->hsts)
  ------------------
  |  Branch (2478:10): [True: 0, False: 0]
  |  Branch (2478:26): [True: 0, False: 0]
  ------------------
 2479|       |        /* throw away the HSTS cache unless shared */
 2480|      0|        Curl_hsts_cleanup(&data->hsts);
 2481|      0|    }
 2482|  11.7k|    break;
 2483|  11.7k|  }
 2484|  11.7k|#endif /* !CURL_DISABLE_HSTS */
 2485|  11.7k|#ifndef CURL_DISABLE_ALTSVC
 2486|  11.7k|  case CURLOPT_ALTSVC:
  ------------------
  |  Branch (2486:3): [True: 11.7k, False: 81.2k]
  ------------------
 2487|  11.7k|    if(!data->asi) {
  ------------------
  |  Branch (2487:8): [True: 11.7k, False: 27]
  ------------------
 2488|  11.7k|      data->asi = Curl_altsvc_init();
 2489|  11.7k|      if(!data->asi)
  ------------------
  |  Branch (2489:10): [True: 0, False: 11.7k]
  ------------------
 2490|      0|        return CURLE_OUT_OF_MEMORY;
 2491|  11.7k|    }
 2492|  11.7k|    result = Curl_setstropt(&s->str[STRING_ALTSVC], ptr);
 2493|  11.7k|    if(result)
  ------------------
  |  Branch (2493:8): [True: 0, False: 11.7k]
  ------------------
 2494|      0|      break;
 2495|  11.7k|    if(ptr)
  ------------------
  |  Branch (2495:8): [True: 11.7k, False: 0]
  ------------------
 2496|  11.7k|      return Curl_altsvc_load(data->asi, ptr);
 2497|      0|    break;
 2498|      0|#endif /* !CURL_DISABLE_ALTSVC */
 2499|      0|  case CURLOPT_ECH:
  ------------------
  |  Branch (2499:3): [True: 0, False: 93.0k]
  ------------------
 2500|      0|    return setopt_ech(data, ptr);
  ------------------
  |  | 1894|      0|#define setopt_ech(x,y) CURLE_NOT_BUILT_IN
  ------------------
 2501|     14|  default:
  ------------------
  |  Branch (2501:3): [True: 14, False: 93.0k]
  ------------------
 2502|     14|    return CURLE_UNKNOWN_OPTION;
 2503|  93.0k|  }
 2504|  68.1k|  return result;
 2505|  93.0k|}
setopt.c:protocol2num:
  200|  11.8k|{
  201|       |  /*
  202|       |   * We are asked to cherry-pick protocols, so play it safe and disallow all
  203|       |   * protocols to start with, and re-add the wanted ones back in.
  204|       |   */
  205|  11.8k|  *val = 0;
  206|       |
  207|  11.8k|  if(!str)
  ------------------
  |  Branch (207:6): [True: 0, False: 11.8k]
  ------------------
  208|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  209|       |
  210|  11.8k|  if(curl_strequal(str, "all")) {
  ------------------
  |  Branch (210:6): [True: 2, False: 11.8k]
  ------------------
  211|      2|    *val = ~(curl_prot_t)0;
  212|      2|    return CURLE_OK;
  213|      2|  }
  214|       |
  215|  12.1k|  do {
  216|  12.1k|    const char *token = str;
  217|  12.1k|    size_t tlen;
  218|       |
  219|  12.1k|    str = strchr(str, ',');
  220|  12.1k|    tlen = str ? (size_t)(str - token) : strlen(token);
  ------------------
  |  Branch (220:12): [True: 364, False: 11.8k]
  ------------------
  221|  12.1k|    if(tlen) {
  ------------------
  |  Branch (221:8): [True: 11.9k, False: 250]
  ------------------
  222|  11.9k|      const struct Curl_scheme *h = Curl_getn_scheme(token, tlen);
  223|       |
  224|  11.9k|      if(!h || !h->run)
  ------------------
  |  Branch (224:10): [True: 19, False: 11.9k]
  |  Branch (224:16): [True: 1, False: 11.9k]
  ------------------
  225|     20|        return CURLE_UNSUPPORTED_PROTOCOL;
  226|       |
  227|  11.9k|      *val |= h->protocol;
  228|  11.9k|    }
  229|  12.1k|  } while(str && str++);
  ------------------
  |  Branch (229:11): [True: 362, False: 11.8k]
  |  Branch (229:18): [True: 362, False: 0]
  ------------------
  230|       |
  231|  11.8k|  if(!*val)
  ------------------
  |  Branch (231:6): [True: 11, False: 11.7k]
  ------------------
  232|       |    /* no protocol listed */
  233|     11|    return CURLE_BAD_FUNCTION_ARGUMENT;
  234|  11.7k|  return CURLE_OK;
  235|  11.8k|}
setopt.c:setopt_func:
 2543|  47.9k|{
 2544|  47.9k|  struct UserDefined *s = &data->set;
 2545|  47.9k|  switch(option) {
 2546|      0|  case CURLOPT_PROGRESSFUNCTION:
  ------------------
  |  Branch (2546:3): [True: 0, False: 47.9k]
  ------------------
 2547|       |    /*
 2548|       |     * Progress callback function
 2549|       |     */
 2550|      0|    s->fprogress = va_arg(param, curl_progress_callback);
 2551|      0|    if(s->fprogress)
  ------------------
  |  Branch (2551:8): [True: 0, False: 0]
  ------------------
 2552|      0|      data->progress.callback = TRUE; /* no longer internal */
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2553|      0|    else
 2554|      0|      data->progress.callback = FALSE; /* NULL enforces internal */
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 2555|      0|    break;
 2556|       |
 2557|      0|  case CURLOPT_XFERINFOFUNCTION:
  ------------------
  |  Branch (2557:3): [True: 0, False: 47.9k]
  ------------------
 2558|       |    /*
 2559|       |     * Transfer info callback function
 2560|       |     */
 2561|      0|    s->fxferinfo = va_arg(param, curl_xferinfo_callback);
 2562|      0|    if(s->fxferinfo)
  ------------------
  |  Branch (2562:8): [True: 0, False: 0]
  ------------------
 2563|      0|      data->progress.callback = TRUE; /* no longer internal */
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2564|      0|    else
 2565|      0|      data->progress.callback = FALSE; /* NULL enforces internal */
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 2566|       |
 2567|      0|    break;
 2568|      0|  case CURLOPT_DEBUGFUNCTION:
  ------------------
  |  Branch (2568:3): [True: 0, False: 47.9k]
  ------------------
 2569|       |    /*
 2570|       |     * stderr write callback.
 2571|       |     */
 2572|      0|    s->fdebug = va_arg(param, curl_debug_callback);
 2573|       |    /*
 2574|       |     * if the callback provided is NULL, it will use the default callback
 2575|       |     */
 2576|      0|    break;
 2577|      0|  case CURLOPT_HEADERFUNCTION:
  ------------------
  |  Branch (2577:3): [True: 0, False: 47.9k]
  ------------------
 2578|       |    /*
 2579|       |     * Set header write callback
 2580|       |     */
 2581|      0|    s->fwrite_header = va_arg(param, curl_write_callback);
 2582|      0|    break;
 2583|  12.5k|  case CURLOPT_WRITEFUNCTION:
  ------------------
  |  Branch (2583:3): [True: 12.5k, False: 35.3k]
  ------------------
 2584|       |    /*
 2585|       |     * Set data write callback
 2586|       |     */
 2587|  12.5k|    s->fwrite_func = va_arg(param, curl_write_callback);
 2588|  12.5k|    if(!s->fwrite_func)
  ------------------
  |  Branch (2588:8): [True: 0, False: 12.5k]
  ------------------
 2589|      0|#if defined(__clang__) && __clang_major__ >= 16
 2590|      0|#pragma clang diagnostic push
 2591|      0|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
 2592|      0|#endif
 2593|       |      /* When set to NULL, reset to our internal default function */
 2594|      0|      s->fwrite_func = (curl_write_callback)fwrite;
 2595|  12.5k|#if defined(__clang__) && __clang_major__ >= 16
 2596|  12.5k|#pragma clang diagnostic pop
 2597|  12.5k|#endif
 2598|  12.5k|    break;
 2599|  11.7k|  case CURLOPT_READFUNCTION:
  ------------------
  |  Branch (2599:3): [True: 11.7k, False: 36.1k]
  ------------------
 2600|       |    /*
 2601|       |     * Read data callback
 2602|       |     */
 2603|  11.7k|    s->fread_func_set = va_arg(param, curl_read_callback);
 2604|  11.7k|    if(!s->fread_func_set) {
  ------------------
  |  Branch (2604:8): [True: 0, False: 11.7k]
  ------------------
 2605|      0|      s->is_fread_set = 0;
 2606|      0|#if defined(__clang__) && __clang_major__ >= 16
 2607|      0|#pragma clang diagnostic push
 2608|      0|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
 2609|      0|#endif
 2610|       |      /* When set to NULL, reset to our internal default function */
 2611|      0|      s->fread_func_set = (curl_read_callback)fread;
 2612|      0|#if defined(__clang__) && __clang_major__ >= 16
 2613|      0|#pragma clang diagnostic pop
 2614|      0|#endif
 2615|      0|    }
 2616|  11.7k|    else
 2617|  11.7k|      s->is_fread_set = 1;
 2618|  11.7k|    break;
 2619|      0|  case CURLOPT_SEEKFUNCTION:
  ------------------
  |  Branch (2619:3): [True: 0, False: 47.9k]
  ------------------
 2620|       |    /*
 2621|       |     * Seek callback. Might be NULL.
 2622|       |     */
 2623|      0|    s->seek_func = va_arg(param, curl_seek_callback);
 2624|      0|    break;
 2625|      0|  case CURLOPT_IOCTLFUNCTION:
  ------------------
  |  Branch (2625:3): [True: 0, False: 47.9k]
  ------------------
 2626|       |    /*
 2627|       |     * I/O control callback. Might be NULL.
 2628|       |     */
 2629|      0|    s->ioctl_func = va_arg(param, curl_ioctl_callback);
 2630|      0|    break;
 2631|      0|  case CURLOPT_SSL_CTX_FUNCTION:
  ------------------
  |  Branch (2631:3): [True: 0, False: 47.9k]
  ------------------
 2632|       |    /*
 2633|       |     * Set an SSL_CTX callback
 2634|       |     */
 2635|      0|#ifdef USE_SSL
 2636|      0|    if(Curl_ssl_supports(data, SSLSUPP_SSL_CTX)) {
  ------------------
  |  |   38|      0|#define SSLSUPP_SSL_CTX      (1 << 3) /* supports CURLOPT_SSL_CTX */
  ------------------
  |  Branch (2636:8): [True: 0, False: 0]
  ------------------
 2637|      0|      s->ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback);
 2638|      0|      break;
 2639|      0|    }
 2640|      0|    else
 2641|      0|#endif
 2642|      0|      return CURLE_NOT_BUILT_IN;
 2643|       |
 2644|  11.7k|  case CURLOPT_SOCKOPTFUNCTION:
  ------------------
  |  Branch (2644:3): [True: 11.7k, False: 36.1k]
  ------------------
 2645|       |    /*
 2646|       |     * socket callback function: called after socket() but before connect()
 2647|       |     */
 2648|  11.7k|    s->fsockopt = va_arg(param, curl_sockopt_callback);
 2649|  11.7k|    break;
 2650|       |
 2651|  11.7k|  case CURLOPT_OPENSOCKETFUNCTION:
  ------------------
  |  Branch (2651:3): [True: 11.7k, False: 36.1k]
  ------------------
 2652|       |    /*
 2653|       |     * open/create socket callback function: called instead of socket(),
 2654|       |     * before connect()
 2655|       |     */
 2656|  11.7k|    s->fopensocket = va_arg(param, curl_opensocket_callback);
 2657|  11.7k|    break;
 2658|       |
 2659|      0|  case CURLOPT_CLOSESOCKETFUNCTION:
  ------------------
  |  Branch (2659:3): [True: 0, False: 47.9k]
  ------------------
 2660|       |    /*
 2661|       |     * close socket callback function: called instead of close()
 2662|       |     * when shutting down a connection
 2663|       |     */
 2664|      0|    s->fclosesocket = va_arg(param, curl_closesocket_callback);
 2665|      0|    break;
 2666|       |
 2667|      0|  case CURLOPT_RESOLVER_START_FUNCTION:
  ------------------
  |  Branch (2667:3): [True: 0, False: 47.9k]
  ------------------
 2668|       |    /*
 2669|       |     * resolver start callback function: called before a new resolver request
 2670|       |     * is started
 2671|       |     */
 2672|      0|    s->resolver_start = va_arg(param, curl_resolver_start_callback);
 2673|      0|    break;
 2674|       |
 2675|       |#ifdef USE_SSH
 2676|       |#ifdef USE_LIBSSH2
 2677|       |  case CURLOPT_SSH_HOSTKEYFUNCTION:
 2678|       |    /* the callback to check the hostkey without the knownhost file */
 2679|       |    s->ssh_hostkeyfunc = va_arg(param, curl_sshhostkeycallback);
 2680|       |    break;
 2681|       |#endif
 2682|       |
 2683|       |  case CURLOPT_SSH_KEYFUNCTION:
 2684|       |    /* setting to NULL is fine since the ssh.c functions themselves will
 2685|       |       then revert to use the internal default */
 2686|       |    s->ssh_keyfunc = va_arg(param, curl_sshkeycallback);
 2687|       |    break;
 2688|       |
 2689|       |#endif /* USE_SSH */
 2690|       |
 2691|      0|#ifndef CURL_DISABLE_RTSP
 2692|      0|  case CURLOPT_INTERLEAVEFUNCTION:
  ------------------
  |  Branch (2692:3): [True: 0, False: 47.9k]
  ------------------
 2693|       |    /* Set the user defined RTP write function */
 2694|      0|    s->fwrite_rtp = va_arg(param, curl_write_callback);
 2695|      0|    break;
 2696|      0|#endif
 2697|      0|#ifndef CURL_DISABLE_FTP
 2698|      0|  case CURLOPT_CHUNK_BGN_FUNCTION:
  ------------------
  |  Branch (2698:3): [True: 0, False: 47.9k]
  ------------------
 2699|      0|    s->chunk_bgn = va_arg(param, curl_chunk_bgn_callback);
 2700|      0|    break;
 2701|      0|  case CURLOPT_CHUNK_END_FUNCTION:
  ------------------
  |  Branch (2701:3): [True: 0, False: 47.9k]
  ------------------
 2702|      0|    s->chunk_end = va_arg(param, curl_chunk_end_callback);
 2703|      0|    break;
 2704|      0|  case CURLOPT_FNMATCH_FUNCTION:
  ------------------
  |  Branch (2704:3): [True: 0, False: 47.9k]
  ------------------
 2705|      0|    s->fnmatch = va_arg(param, curl_fnmatch_callback);
 2706|      0|    break;
 2707|      0|#endif
 2708|      0|#ifndef CURL_DISABLE_HTTP
 2709|      0|  case CURLOPT_TRAILERFUNCTION:
  ------------------
  |  Branch (2709:3): [True: 0, False: 47.9k]
  ------------------
 2710|      0|    s->trailer_callback = va_arg(param, curl_trailer_callback);
 2711|      0|    break;
 2712|      0|#endif
 2713|      0|#ifndef CURL_DISABLE_HSTS
 2714|      0|  case CURLOPT_HSTSREADFUNCTION:
  ------------------
  |  Branch (2714:3): [True: 0, False: 47.9k]
  ------------------
 2715|      0|    s->hsts_read = va_arg(param, curl_hstsread_callback);
 2716|      0|    break;
 2717|      0|  case CURLOPT_HSTSWRITEFUNCTION:
  ------------------
  |  Branch (2717:3): [True: 0, False: 47.9k]
  ------------------
 2718|      0|    s->hsts_write = va_arg(param, curl_hstswrite_callback);
 2719|      0|    break;
 2720|      0|#endif
 2721|      0|  case CURLOPT_PREREQFUNCTION:
  ------------------
  |  Branch (2721:3): [True: 0, False: 47.9k]
  ------------------
 2722|      0|    s->fprereq = va_arg(param, curl_prereq_callback);
 2723|      0|    break;
 2724|      0|  default:
  ------------------
  |  Branch (2724:3): [True: 0, False: 47.9k]
  ------------------
 2725|      0|    return CURLE_UNKNOWN_OPTION;
 2726|  47.9k|  }
 2727|  47.9k|  return CURLE_OK;
 2728|  47.9k|}
setopt.c:setopt_offt:
 2732|    324|{
 2733|    324|  struct UserDefined *s = &data->set;
 2734|    324|  switch(option) {
 2735|      3|  case CURLOPT_TIMEVALUE_LARGE:
  ------------------
  |  Branch (2735:3): [True: 3, False: 321]
  ------------------
 2736|       |    /*
 2737|       |     * This is the value to compare with the remote document with the
 2738|       |     * method set with CURLOPT_TIMECONDITION
 2739|       |     */
 2740|      3|    s->timevalue = (time_t)offt;
 2741|      3|    break;
 2742|       |
 2743|       |    /* MQTT "borrows" some of the HTTP options */
 2744|      0|  case CURLOPT_POSTFIELDSIZE_LARGE:
  ------------------
  |  Branch (2744:3): [True: 0, False: 324]
  ------------------
 2745|       |    /*
 2746|       |     * The size of the POSTFIELD data to prevent libcurl to do strlen() to
 2747|       |     * figure it out. Enables binary posts.
 2748|       |     */
 2749|      0|    if(offt < -1)
  ------------------
  |  Branch (2749:8): [True: 0, False: 0]
  ------------------
 2750|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2751|       |
 2752|      0|    if(s->postfieldsize < offt &&
  ------------------
  |  Branch (2752:8): [True: 0, False: 0]
  ------------------
 2753|      0|       s->postfields == s->str[STRING_COPYPOSTFIELDS]) {
  ------------------
  |  Branch (2753:8): [True: 0, False: 0]
  ------------------
 2754|       |      /* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */
 2755|      0|      curlx_safefree(s->str[STRING_COPYPOSTFIELDS]);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2756|      0|      s->postfields = NULL;
 2757|      0|    }
 2758|      0|    s->postfieldsize = offt;
 2759|      0|    break;
 2760|     31|  case CURLOPT_INFILESIZE_LARGE:
  ------------------
  |  Branch (2760:3): [True: 31, False: 293]
  ------------------
 2761|       |    /*
 2762|       |     * If known, this should inform curl about the file size of the
 2763|       |     * to-be-uploaded file.
 2764|       |     */
 2765|     31|    if(offt < -1)
  ------------------
  |  Branch (2765:8): [True: 0, False: 31]
  ------------------
 2766|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2767|     31|    s->filesize = offt;
 2768|     31|    break;
 2769|     95|  case CURLOPT_MAX_SEND_SPEED_LARGE:
  ------------------
  |  Branch (2769:3): [True: 95, False: 229]
  ------------------
 2770|       |    /*
 2771|       |     * When transfer uploads are faster than CURLOPT_MAX_SEND_SPEED_LARGE
 2772|       |     * bytes per second the transfer is throttled..
 2773|       |     */
 2774|     95|    if(offt < 0)
  ------------------
  |  Branch (2774:8): [True: 0, False: 95]
  ------------------
 2775|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2776|     95|    s->max_send_speed = offt;
 2777|       |    /* use minimal burst rate of 32k. some protocol batch IO */
 2778|     95|    Curl_rlimit_init(&data->progress.ul.rlimit, offt,
 2779|     95|                     CURLMAX(offt, (32 * 1024)),
  ------------------
  |  | 1291|     95|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 71, False: 24]
  |  |  ------------------
  ------------------
 2780|     95|                     Curl_pgrs_now(data));
 2781|     95|    break;
 2782|     55|  case CURLOPT_MAX_RECV_SPEED_LARGE:
  ------------------
  |  Branch (2782:3): [True: 55, False: 269]
  ------------------
 2783|       |    /*
 2784|       |     * When receiving data faster than CURLOPT_MAX_RECV_SPEED_LARGE bytes per
 2785|       |     * second the transfer is throttled..
 2786|       |     */
 2787|     55|    if(offt < 0)
  ------------------
  |  Branch (2787:8): [True: 0, False: 55]
  ------------------
 2788|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2789|     55|    s->max_recv_speed = offt;
 2790|       |    /* use minimal burst rate of 32k. some protocol batch IO */
 2791|     55|    Curl_rlimit_init(&data->progress.dl.rlimit, offt,
 2792|     55|                     CURLMAX(offt, (32 * 1024)),
  ------------------
  |  | 1291|     55|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 35, False: 20]
  |  |  ------------------
  ------------------
 2793|     55|                     Curl_pgrs_now(data));
 2794|     55|    break;
 2795|     74|  case CURLOPT_RESUME_FROM_LARGE:
  ------------------
  |  Branch (2795:3): [True: 74, False: 250]
  ------------------
 2796|       |    /*
 2797|       |     * Resume transfer at the given file position
 2798|       |     */
 2799|     74|    if(offt < -1)
  ------------------
  |  Branch (2799:8): [True: 0, False: 74]
  ------------------
 2800|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2801|     74|    s->set_resume_from = offt;
 2802|     74|    break;
 2803|     66|  case CURLOPT_MAXFILESIZE_LARGE:
  ------------------
  |  Branch (2803:3): [True: 66, False: 258]
  ------------------
 2804|       |    /*
 2805|       |     * Set the maximum size of a file to download.
 2806|       |     */
 2807|     66|    if(offt < 0)
  ------------------
  |  Branch (2807:8): [True: 0, False: 66]
  ------------------
 2808|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2809|     66|    s->max_filesize = offt;
 2810|     66|    break;
 2811|       |
 2812|      0|  default:
  ------------------
  |  Branch (2812:3): [True: 0, False: 324]
  ------------------
 2813|      0|    return CURLE_UNKNOWN_OPTION;
 2814|    324|  }
 2815|    324|  return CURLE_OK;
 2816|    324|}

Curl_sha256it:
  486|  2.14k|{
  487|  2.14k|  CURLcode result;
  488|  2.14k|  my_sha256_ctx ctx;
  489|       |
  490|  2.14k|  result = my_sha256_init(&ctx);
  491|  2.14k|  if(!result) {
  ------------------
  |  Branch (491:6): [True: 2.14k, False: 0]
  ------------------
  492|  2.14k|    do {
  493|  2.14k|      unsigned int ilen = (unsigned int)CURLMIN(len, UINT_MAX);
  ------------------
  |  | 1292|  2.14k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 2.14k, False: 0]
  |  |  ------------------
  ------------------
  494|  2.14k|      my_sha256_update(&ctx, input, ilen);
  495|  2.14k|      len -= ilen;
  496|  2.14k|      input += ilen;
  497|  2.14k|    } while(len);
  ------------------
  |  Branch (497:13): [True: 0, False: 2.14k]
  ------------------
  498|  2.14k|    my_sha256_final(output, &ctx);
  499|  2.14k|  }
  500|  2.14k|  return result;
  501|  2.14k|}
sha256.c:my_sha256_init:
   62|  12.8k|{
   63|  12.8k|  my_sha256_ctx *ctx = (my_sha256_ctx *)in;
   64|  12.8k|  ctx->openssl_ctx = EVP_MD_CTX_new();
   65|  12.8k|  if(!ctx->openssl_ctx)
  ------------------
  |  Branch (65:6): [True: 0, False: 12.8k]
  ------------------
   66|      0|    return CURLE_OUT_OF_MEMORY;
   67|       |
   68|  12.8k|  if(!EVP_DigestInit_ex(ctx->openssl_ctx, EVP_sha256(), NULL)) {
  ------------------
  |  Branch (68:6): [True: 0, False: 12.8k]
  ------------------
   69|      0|    EVP_MD_CTX_free(ctx->openssl_ctx);
   70|      0|    return CURLE_FAILED_INIT;
   71|      0|  }
   72|  12.8k|  return CURLE_OK;
   73|  12.8k|}
sha256.c:my_sha256_update:
   78|   697k|{
   79|   697k|  my_sha256_ctx *ctx = (my_sha256_ctx *)in;
   80|   697k|  EVP_DigestUpdate(ctx->openssl_ctx, data, length);
   81|   697k|}
sha256.c:my_sha256_final:
   84|  12.8k|{
   85|  12.8k|  my_sha256_ctx *ctx = (my_sha256_ctx *)in;
   86|       |  EVP_DigestFinal_ex(ctx->openssl_ctx, digest, NULL);
   87|  12.8k|  EVP_MD_CTX_free(ctx->openssl_ctx);
   88|  12.8k|}

easy.c:sigpipe_ignore:
   49|  13.6k|{
   50|       |  /* get a local copy of no_signal because the Curl_easy might not be
   51|       |     around when we restore */
   52|  13.6k|  ig->no_signal = data->set.no_signal;
   53|  13.6k|  if(!data->set.no_signal) {
  ------------------
  |  Branch (53:6): [True: 13.6k, False: 17]
  ------------------
   54|  13.6k|    struct sigaction action;
   55|       |    /* first, extract the existing situation */
   56|  13.6k|    sigaction(SIGPIPE, NULL, &ig->old_pipe_act);
   57|  13.6k|    action = ig->old_pipe_act;
   58|       |    /* ignore this signal */
   59|  13.6k|    action.sa_handler = SIG_IGN;
   60|  13.6k|#ifdef SA_SIGINFO
   61|       |    /* clear SA_SIGINFO flag since we are using sa_handler */
   62|  13.6k|    action.sa_flags &= ~SA_SIGINFO;
   63|  13.6k|#endif
   64|  13.6k|    sigaction(SIGPIPE, &action, NULL);
   65|  13.6k|  }
   66|  13.6k|}
easy.c:sigpipe_restore:
   74|  13.6k|{
   75|  13.6k|  if(!ig->no_signal)
  ------------------
  |  Branch (75:6): [True: 13.6k, False: 17]
  ------------------
   76|       |    /* restore the outside state */
   77|  13.6k|    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
   78|  13.6k|}
multi.c:sigpipe_init:
   37|  13.1k|{
   38|  13.1k|  memset(ig, 0, sizeof(*ig));
   39|       |  ig->no_signal = TRUE;
  ------------------
  |  | 1053|  13.1k|#define TRUE true
  ------------------
   40|  13.1k|}
multi.c:sigpipe_apply:
   82|  14.2k|{
   83|  14.2k|  if(data && (data->set.no_signal != ig->no_signal)) {
  ------------------
  |  Branch (83:6): [True: 14.2k, False: 0]
  |  Branch (83:14): [True: 13.1k, False: 1.07k]
  ------------------
   84|  13.1k|    sigpipe_restore(ig);
   85|  13.1k|    sigpipe_ignore(data, ig);
   86|  13.1k|  }
   87|  14.2k|}
multi.c:sigpipe_ignore:
   49|  13.1k|{
   50|       |  /* get a local copy of no_signal because the Curl_easy might not be
   51|       |     around when we restore */
   52|  13.1k|  ig->no_signal = data->set.no_signal;
   53|  13.1k|  if(!data->set.no_signal) {
  ------------------
  |  Branch (53:6): [True: 13.1k, False: 0]
  ------------------
   54|  13.1k|    struct sigaction action;
   55|       |    /* first, extract the existing situation */
   56|  13.1k|    sigaction(SIGPIPE, NULL, &ig->old_pipe_act);
   57|  13.1k|    action = ig->old_pipe_act;
   58|       |    /* ignore this signal */
   59|  13.1k|    action.sa_handler = SIG_IGN;
   60|  13.1k|#ifdef SA_SIGINFO
   61|       |    /* clear SA_SIGINFO flag since we are using sa_handler */
   62|  13.1k|    action.sa_flags &= ~SA_SIGINFO;
   63|  13.1k|#endif
   64|  13.1k|    sigaction(SIGPIPE, &action, NULL);
   65|  13.1k|  }
   66|  13.1k|}
multi.c:sigpipe_restore:
   74|  26.3k|{
   75|  26.3k|  if(!ig->no_signal)
  ------------------
  |  Branch (75:6): [True: 13.1k, False: 13.1k]
  ------------------
   76|       |    /* restore the outside state */
   77|  13.1k|    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
   78|  26.3k|}
conncache.c:sigpipe_init:
   37|  11.7k|{
   38|  11.7k|  memset(ig, 0, sizeof(*ig));
   39|       |  ig->no_signal = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
   40|  11.7k|}
conncache.c:sigpipe_restore:
   74|  11.7k|{
   75|  11.7k|  if(!ig->no_signal)
  ------------------
  |  Branch (75:6): [True: 0, False: 11.7k]
  ------------------
   76|       |    /* restore the outside state */
   77|      0|    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
   78|  11.7k|}
cshutdn.c:sigpipe_init:
   37|  11.7k|{
   38|  11.7k|  memset(ig, 0, sizeof(*ig));
   39|       |  ig->no_signal = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
   40|  11.7k|}
cshutdn.c:sigpipe_restore:
   74|  11.7k|{
   75|  11.7k|  if(!ig->no_signal)
  ------------------
  |  Branch (75:6): [True: 0, False: 11.7k]
  ------------------
   76|       |    /* restore the outside state */
   77|      0|    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
   78|  11.7k|}

Curl_slist_append_nodup:
   56|   115k|{
   57|   115k|  struct curl_slist *last;
   58|   115k|  struct curl_slist *new_item;
   59|       |
   60|   115k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|   115k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (60:3): [True: 0, False: 115k]
  |  Branch (60:3): [True: 115k, False: 0]
  ------------------
   61|       |
   62|   115k|  new_item = curlx_malloc(sizeof(struct curl_slist));
  ------------------
  |  | 1473|   115k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   63|   115k|  if(!new_item)
  ------------------
  |  Branch (63:6): [True: 0, False: 115k]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|   115k|  new_item->next = NULL;
   67|   115k|  new_item->data = CURL_UNCONST(data);
  ------------------
  |  |  864|   115k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   68|       |
   69|       |  /* if this is the first item, then new_item *is* the list */
   70|   115k|  if(!list)
  ------------------
  |  Branch (70:6): [True: 37.7k, False: 77.5k]
  ------------------
   71|  37.7k|    return new_item;
   72|       |
   73|  77.5k|  last = slist_get_last(list);
   74|  77.5k|  last->next = new_item;
   75|  77.5k|  return list;
   76|   115k|}
curl_slist_append:
   86|  82.7k|{
   87|  82.7k|  char *dupdata = curlx_strdup(data);
  ------------------
  |  | 1472|  82.7k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   88|       |
   89|  82.7k|  if(!dupdata)
  ------------------
  |  Branch (89:6): [True: 0, False: 82.7k]
  ------------------
   90|      0|    return NULL;
   91|       |
   92|  82.7k|  list = Curl_slist_append_nodup(list, dupdata);
   93|  82.7k|  if(!list)
  ------------------
  |  Branch (93:6): [True: 0, False: 82.7k]
  ------------------
   94|      0|    curlx_free(dupdata);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   95|       |
   96|  82.7k|  return list;
   97|  82.7k|}
curl_slist_free_all:
  125|  69.4k|{
  126|  69.4k|  struct curl_slist *next;
  127|  69.4k|  struct curl_slist *item;
  128|       |
  129|  69.4k|  if(!list)
  ------------------
  |  Branch (129:6): [True: 31.7k, False: 37.7k]
  ------------------
  130|  31.7k|    return;
  131|       |
  132|  37.7k|  item = list;
  133|  84.8k|  do {
  134|  84.8k|    next = item->next;
  135|  84.8k|    curlx_safefree(item->data);
  ------------------
  |  | 1336|  84.8k|  do {                      \
  |  | 1337|  84.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  84.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  84.8k|    (ptr) = NULL;           \
  |  | 1339|  84.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 84.8k]
  |  |  ------------------
  ------------------
  136|  84.8k|    curlx_free(item);
  ------------------
  |  | 1478|  84.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  137|  84.8k|    item = next;
  138|  84.8k|  } while(next);
  ------------------
  |  Branch (138:11): [True: 47.1k, False: 37.7k]
  ------------------
  139|  37.7k|}
slist.c:slist_get_last:
   30|  77.5k|{
   31|  77.5k|  struct curl_slist *item;
   32|       |
   33|       |  /* if caller passed us a NULL, return now */
   34|  77.5k|  if(!list)
  ------------------
  |  Branch (34:6): [True: 0, False: 77.5k]
  ------------------
   35|      0|    return NULL;
   36|       |
   37|       |  /* loop through to find the last item */
   38|  77.5k|  item = list;
   39|  43.4M|  while(item->next) {
  ------------------
  |  Branch (39:9): [True: 43.3M, False: 77.5k]
  ------------------
   40|  43.3M|    item = item->next;
   41|  43.3M|  }
   42|  77.5k|  return item;
   43|  77.5k|}

Curl_wakeup_init:
  277|  23.5k|{
  278|  23.5k|#ifdef USE_EVENTFD
  279|  23.5k|  return wakeup_eventfd(socks, nonblocking);
  280|       |#elif defined(HAVE_PIPE)
  281|       |  return wakeup_pipe(socks, nonblocking);
  282|       |#elif defined(HAVE_SOCKETPAIR)
  283|       |  return wakeup_socketpair(socks, nonblocking);
  284|       |#else
  285|       |  return wakeup_inet(socks, nonblocking);
  286|       |#endif
  287|  23.5k|}
Curl_wakeup_signal:
  304|    511|{
  305|    511|  int sockerr = 0;
  306|    511|#ifdef USE_EVENTFD
  307|    511|  const uint64_t buf[1] = { 1 };
  308|       |#else
  309|       |  const char buf[1] = { 1 };
  310|       |#endif
  311|       |
  312|    511|  while(1) {
  ------------------
  |  Branch (312:9): [True: 511, Folded]
  ------------------
  313|    511|    sockerr = 0;
  314|    511|    if(wakeup_write(socks[1], buf, sizeof(buf)) < 0) {
  ------------------
  |  |  291|    511|#define wakeup_write        write
  ------------------
  |  Branch (314:8): [True: 0, False: 511]
  ------------------
  315|      0|      sockerr = SOCKERRNO;
  ------------------
  |  | 1093|      0|#define SOCKERRNO         errno
  ------------------
  316|      0|#ifndef USE_WINSOCK
  317|      0|      if(sockerr == SOCKEINTR)
  ------------------
  |  | 1127|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (317:10): [True: 0, False: 0]
  ------------------
  318|      0|        continue;
  319|      0|#endif
  320|      0|      if(SOCK_EAGAIN(sockerr))
  ------------------
  |  | 1144|      0|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1135|      0|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1144:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  321|      0|        sockerr = 0; /* wakeup is already ongoing */
  322|      0|    }
  323|    511|    break;
  324|    511|  }
  325|    511|  return sockerr;
  326|    511|}
Curl_wakeup_consume:
  329|  13.1k|{
  330|  13.1k|  char buf[64];
  331|  13.1k|  ssize_t rc;
  332|  13.1k|  CURLcode result = CURLE_OK;
  333|       |
  334|  13.3k|  do {
  335|  13.3k|    rc = wakeup_read(socks[0], buf, sizeof(buf));
  ------------------
  |  |  292|  13.3k|#define wakeup_read         read
  ------------------
  336|  13.3k|    if(!rc)
  ------------------
  |  Branch (336:8): [True: 0, False: 13.3k]
  ------------------
  337|      0|      break;
  338|  13.3k|    else if(rc < 0) {
  ------------------
  |  Branch (338:13): [True: 13.1k, False: 125]
  ------------------
  339|  13.1k|      int sockerr = SOCKERRNO;
  ------------------
  |  | 1093|  13.1k|#define SOCKERRNO         errno
  ------------------
  340|  13.1k|#ifndef USE_WINSOCK
  341|  13.1k|      if(sockerr == SOCKEINTR)
  ------------------
  |  | 1127|  13.1k|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (341:10): [True: 0, False: 13.1k]
  ------------------
  342|      0|        continue;
  343|  13.1k|#endif
  344|  13.1k|      if(SOCK_EAGAIN(sockerr))
  ------------------
  |  | 1144|  13.1k|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1135|  13.1k|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1144:24): [True: 13.1k, False: 0]
  |  |  ------------------
  ------------------
  345|  13.1k|        break;
  346|      0|      result = CURLE_READ_ERROR;
  347|      0|      break;
  348|  13.1k|    }
  349|  13.3k|  } while(all);
  ------------------
  |  Branch (349:11): [True: 125, False: 0]
  ------------------
  350|  13.1k|  return result;
  351|  13.1k|}
Curl_wakeup_destroy:
  354|  23.5k|{
  355|       |#ifndef USE_EVENTFD
  356|       |  if(socks[1] != CURL_SOCKET_BAD)
  357|       |    wakeup_close(socks[1]);
  358|       |#endif
  359|  23.5k|  if(socks[0] != CURL_SOCKET_BAD)
  ------------------
  |  |  145|  23.5k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (359:6): [True: 23.5k, False: 0]
  ------------------
  360|  23.5k|    wakeup_close(socks[0]);
  ------------------
  |  |  293|  23.5k|#define wakeup_close        close
  ------------------
  361|  23.5k|  socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  23.5k|#define CURL_SOCKET_BAD (-1)
  ------------------
  362|  23.5k|}
socketpair.c:wakeup_eventfd:
   39|  23.5k|{
   40|  23.5k|  int efd = eventfd(0, nonblocking ? EFD_CLOEXEC | EFD_NONBLOCK : EFD_CLOEXEC);
  ------------------
  |  Branch (40:24): [True: 23.5k, False: 0]
  ------------------
   41|  23.5k|  if(efd == -1) {
  ------------------
  |  Branch (41:6): [True: 0, False: 23.5k]
  ------------------
   42|      0|    socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   43|      0|    return -1;
   44|      0|  }
   45|  23.5k|  socks[0] = socks[1] = efd;
   46|  23.5k|  return 0;
   47|  23.5k|}

Curl_cf_socks_proxy_insert_after:
 1317|    177|{
 1318|    177|  struct Curl_cfilter *cf;
 1319|    177|  struct socks_ctx *ctx;
 1320|    177|  bool resolve_local = FALSE;
  ------------------
  |  | 1056|    177|#define FALSE false
  ------------------
 1321|    177|  uint8_t dns_queries = Curl_resolv_dns_queries(data, ip_version);
 1322|    177|  CURLcode result;
 1323|       |
 1324|    177|  if(!dest)
  ------------------
  |  Branch (1324:6): [True: 0, False: 177]
  ------------------
 1325|      0|    return CURLE_FAILED_INIT;
 1326|       |
 1327|    177|  switch(proxy_type) {
 1328|     38|  case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     38|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1328:3): [True: 38, False: 139]
  ------------------
 1329|     38|    resolve_local = TRUE;
  ------------------
  |  | 1053|     38|#define TRUE true
  ------------------
 1330|     38|    break;
 1331|      4|  case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|      4|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1331:3): [True: 4, False: 173]
  ------------------
 1332|      4|    break;
 1333|    130|  case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    130|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1333:3): [True: 130, False: 47]
  ------------------
 1334|    130|    resolve_local = TRUE;
  ------------------
  |  | 1053|    130|#define TRUE true
  ------------------
 1335|    130|    dns_queries = (uint8_t)(dns_queries & ~CURL_DNSQ_AAAA);
  ------------------
  |  |   52|    130|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
 1336|    130|    break;
 1337|      5|  case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|      5|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1337:3): [True: 5, False: 172]
  ------------------
 1338|      5|    break;
 1339|      0|  default:
  ------------------
  |  Branch (1339:3): [True: 0, False: 177]
  ------------------
 1340|      0|    failf(data, "unknown proxytype %d option given", proxy_type);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1341|      0|    return CURLE_COULDNT_CONNECT;
 1342|    177|  }
 1343|       |
 1344|       |  /* NUL byte already part of struct size */
 1345|    177|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|    177|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1346|    177|  if(!ctx) {
  ------------------
  |  Branch (1346:6): [True: 0, False: 177]
  ------------------
 1347|      0|    return CURLE_OUT_OF_MEMORY;
 1348|      0|  }
 1349|       |
 1350|    177|  Curl_peer_link(&ctx->dest, dest);
 1351|    177|  ctx->ip_version = ip_version;
 1352|    177|  ctx->proxy_type = proxy_type;
 1353|    177|  ctx->resolve_local = resolve_local;
 1354|    177|  Curl_creds_link(&ctx->creds, creds);
 1355|    177|  Curl_bufq_init2(&ctx->iobuf, SOCKS_CHUNK_SIZE, SOCKS_CHUNKS,
  ------------------
  |  |   94|    177|#define SOCKS_CHUNK_SIZE    1024
  ------------------
                Curl_bufq_init2(&ctx->iobuf, SOCKS_CHUNK_SIZE, SOCKS_CHUNKS,
  ------------------
  |  |   95|    177|#define SOCKS_CHUNKS        1
  ------------------
 1356|    177|                  BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|    177|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
 1357|       |
 1358|    177|  result = Curl_cf_create(&cf, &Curl_cft_socks_proxy, ctx);
 1359|    177|  if(!result) {
  ------------------
  |  Branch (1359:6): [True: 177, False: 0]
  ------------------
 1360|    177|    Curl_conn_cf_insert_after(cf_at, cf);
 1361|    177|    if(ctx->resolve_local) {
  ------------------
  |  Branch (1361:8): [True: 168, False: 9]
  ------------------
 1362|    168|      result = Curl_conn_dns_add_addr_resolve(data, cf_at->conn,
 1363|    168|                                              cf_at->sockindex,
 1364|    168|                                              ctx->dest, dns_queries,
 1365|    168|                                              TRNSPRT_TCP);
  ------------------
  |  |  237|    168|#define TRNSPRT_TCP  3
  ------------------
 1366|    168|    }
 1367|    177|  }
 1368|      0|  else
 1369|      0|    socks_proxy_ctx_free(ctx);
 1370|    177|  return result;
 1371|    177|}
socks.c:socks_proxy_cf_destroy:
 1260|    177|{
 1261|    177|  (void)data;
 1262|    177|  socks_proxy_ctx_free(cf->ctx);
 1263|       |  cf->ctx = NULL;
 1264|    177|}
socks.c:socks_proxy_cf_connect:
 1166|    391|{
 1167|    391|  struct socks_ctx *ctx = cf->ctx;
 1168|    391|  CURLproxycode pxresult = CURLPX_OK;
 1169|    391|  CURLcode result;
 1170|       |
 1171|    391|  if(cf->connected) {
  ------------------
  |  Branch (1171:6): [True: 5, False: 386]
  ------------------
 1172|      5|    *done = TRUE;
  ------------------
  |  | 1053|      5|#define TRUE true
  ------------------
 1173|      5|    return CURLE_OK;
 1174|      5|  }
 1175|       |
 1176|    386|  result = cf->next->cft->do_connect(cf->next, data, done);
 1177|    386|  if(result || !*done)
  ------------------
  |  Branch (1177:6): [True: 0, False: 386]
  |  Branch (1177:16): [True: 0, False: 386]
  ------------------
 1178|      0|    return result;
 1179|       |
 1180|    386|  switch(ctx->proxy_type) {
 1181|     77|  case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     77|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1181:3): [True: 77, False: 309]
  ------------------
 1182|     84|  case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     84|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1182:3): [True: 7, False: 379]
  ------------------
 1183|     84|    pxresult = socks5_connect(cf, ctx, data);
 1184|     84|    break;
 1185|       |
 1186|    293|  case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    293|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1186:3): [True: 293, False: 93]
  ------------------
 1187|    302|  case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|    302|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1187:3): [True: 9, False: 377]
  ------------------
 1188|    302|    pxresult = socks4_connect(cf, ctx, data);
 1189|    302|    break;
 1190|       |
 1191|      0|  default:
  ------------------
  |  Branch (1191:3): [True: 0, False: 386]
  ------------------
 1192|      0|    DEBUGASSERT(0); /* should not come here, checked it at creation time */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1192:5): [Folded, False: 0]
  |  Branch (1192:5): [Folded, False: 0]
  ------------------
 1193|      0|    result = CURLE_COULDNT_CONNECT;
 1194|      0|    goto out;
 1195|    386|  }
 1196|       |
 1197|    386|  if(pxresult) {
  ------------------
  |  Branch (1197:6): [True: 149, False: 237]
  ------------------
 1198|    149|    result = CURLE_PROXY;
 1199|    149|    data->info.pxcode = pxresult;
 1200|    149|    goto out;
 1201|    149|  }
 1202|    237|  else if(ctx->state != SOCKS_ST_SUCCESS)
  ------------------
  |  Branch (1202:11): [True: 233, False: 4]
  ------------------
 1203|    233|    goto out;
 1204|       |
 1205|      4|#ifdef CURLVERBOSE
 1206|      4|  if(Curl_trc_is_verbose(data)) {
  ------------------
  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (322:4): [True: 4, False: 0]
  |  |  |  Branch (322:14): [True: 0, False: 4]
  |  |  ------------------
  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1207|      0|    struct ip_quadruple ipquad;
 1208|      0|    bool is_ipv6;
 1209|      0|    if(!Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad))
  ------------------
  |  Branch (1209:8): [True: 0, False: 0]
  ------------------
 1210|      0|      infof(data, "Opened %sSOCKS connection from %s port %d to %s port %d "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1211|      0|            "(via %s port %u)",
 1212|      0|            (cf->sockindex == SECONDARYSOCKET) ? "2nd " : "",
 1213|      0|            ipquad.local_ip, ipquad.local_port,
 1214|      0|            ctx->dest->hostname, ctx->dest->port,
 1215|      0|            ipquad.remote_ip, ipquad.remote_port);
 1216|      0|    else
 1217|      0|      infof(data, "Opened %sSOCKS connection",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1218|      0|            (cf->sockindex == SECONDARYSOCKET) ? "2nd " : "");
 1219|      0|  }
 1220|      4|#endif
 1221|      4|  cf->connected = TRUE;
  ------------------
  |  | 1053|      4|#define TRUE true
  ------------------
 1222|       |
 1223|    386|out:
 1224|    386|  *done = (bool)cf->connected;
 1225|    386|  if(*done || result)
  ------------------
  |  Branch (1225:6): [True: 4, False: 382]
  |  Branch (1225:15): [True: 149, False: 233]
  ------------------
 1226|    153|    Curl_creds_unlink(&ctx->creds);
 1227|    386|  return result;
 1228|      4|}
socks.c:socks5_connect:
 1002|     84|{
 1003|     84|  CURLproxycode presult;
 1004|     84|  bool done;
 1005|       |
 1006|    115|process_state:
 1007|    115|  switch(sx->state) {
 1008|     42|  case SOCKS_ST_INIT:
  ------------------
  |  Branch (1008:3): [True: 42, False: 73]
  ------------------
 1009|     42|    sx->version = 5;
 1010|     42|    sxstate(sx, cf, data, SOCKS5_ST_START);
  ------------------
  |  |  161|     42|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1011|     42|    FALLTHROUGH();
  ------------------
  |  |  823|     42|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1012|       |
 1013|     42|  case SOCKS5_ST_START:
  ------------------
  |  Branch (1013:3): [True: 0, False: 115]
  ------------------
 1014|     42|    CURL_TRC_CF(data, cf, "SOCKS5: connecting to %s:%u",
  ------------------
  |  |  153|     42|  do {                                          \
  |  |  154|     42|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     42|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     84|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 42, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 42]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     84|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     42|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     42|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     42|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 42]
  |  |  ------------------
  ------------------
 1015|     42|                sx->dest->hostname, sx->dest->port);
 1016|     42|    presult = socks5_req0_init(cf, sx, data);
 1017|     42|    if(presult)
  ------------------
  |  Branch (1017:8): [True: 0, False: 42]
  ------------------
 1018|      0|      return socks_failed(sx, cf, data, presult);
 1019|     42|    sxstate(sx, cf, data, SOCKS5_ST_REQ0_SEND);
  ------------------
  |  |  161|     42|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1020|     42|    FALLTHROUGH();
  ------------------
  |  |  823|     42|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1021|       |
 1022|     42|  case SOCKS5_ST_REQ0_SEND:
  ------------------
  |  Branch (1022:3): [True: 0, False: 115]
  ------------------
 1023|     42|    presult = socks_flush(sx, cf, data, &done);
 1024|     42|    if(presult)
  ------------------
  |  Branch (1024:8): [True: 0, False: 42]
  ------------------
 1025|      0|      return socks_failed(sx, cf, data, presult);
 1026|     42|    else if(!done)
  ------------------
  |  Branch (1026:13): [True: 0, False: 42]
  ------------------
 1027|      0|      return CURLPX_OK;
 1028|       |    /* done sending! */
 1029|     42|    sxstate(sx, cf, data, SOCKS5_ST_RESP0_RECV);
  ------------------
  |  |  161|     42|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1030|     42|    FALLTHROUGH();
  ------------------
  |  |  823|     42|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1031|       |
 1032|     77|  case SOCKS5_ST_RESP0_RECV:
  ------------------
  |  Branch (1032:3): [True: 35, False: 80]
  ------------------
 1033|     77|    presult = socks_recv(sx, cf, data, 2, &done);
 1034|     77|    if(presult)
  ------------------
  |  Branch (1034:8): [True: 5, False: 72]
  ------------------
 1035|      5|      return socks_failed(sx, cf, data, presult);
 1036|     72|    else if(!done)
  ------------------
  |  Branch (1036:13): [True: 37, False: 35]
  ------------------
 1037|     37|      return CURLPX_OK;
 1038|     35|    presult = socks5_check_resp0(sx, cf, data);
 1039|     35|    if(presult)
  ------------------
  |  Branch (1039:8): [True: 5, False: 30]
  ------------------
 1040|      5|      return socks_failed(sx, cf, data, presult);
 1041|       |    /* socks5_check_resp0() sets next socks state */
 1042|     30|    goto process_state;
 1043|       |
 1044|     30|  case SOCKS5_ST_GSSAPI_INIT: {
  ------------------
  |  Branch (1044:3): [True: 1, False: 114]
  ------------------
 1045|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1046|       |    /* GSSAPI stuff done non-blocking */
 1047|       |    CURLcode result = Curl_SOCKS5_gssapi_negotiate(cf, data, sx->creds);
 1048|       |    if(result) {
 1049|       |      failf(data, "Unable to negotiate SOCKS5 GSS-API context.");
 1050|       |      return CURLPX_GSSAPI;
 1051|       |    }
 1052|       |    sxstate(sx, cf, data, SOCKS5_ST_REQ1_INIT);
 1053|       |    goto process_state;
 1054|       |#else
 1055|      1|    failf(data, "SOCKS5 GSSAPI per-message authentication is not supported.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1056|      1|    return socks_failed(sx, cf, data, CURLPX_GSSAPI_PERMSG);
 1057|     35|#endif
 1058|     35|  }
 1059|       |
 1060|     26|  case SOCKS5_ST_AUTH_INIT:
  ------------------
  |  Branch (1060:3): [True: 26, False: 89]
  ------------------
 1061|     26|    presult = socks5_auth_init(cf, sx, data);
 1062|     26|    if(presult)
  ------------------
  |  Branch (1062:8): [True: 3, False: 23]
  ------------------
 1063|      3|      return socks_failed(sx, cf, data, presult);
 1064|     23|    sxstate(sx, cf, data, SOCKS5_ST_AUTH_SEND);
  ------------------
  |  |  161|     23|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1065|     23|    FALLTHROUGH();
  ------------------
  |  |  823|     23|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1066|       |
 1067|     23|  case SOCKS5_ST_AUTH_SEND:
  ------------------
  |  Branch (1067:3): [True: 0, False: 115]
  ------------------
 1068|     23|    presult = socks_flush(sx, cf, data, &done);
 1069|     23|    if(presult)
  ------------------
  |  Branch (1069:8): [True: 0, False: 23]
  ------------------
 1070|      0|      return socks_failed(sx, cf, data, presult);
 1071|     23|    else if(!done)
  ------------------
  |  Branch (1071:13): [True: 0, False: 23]
  ------------------
 1072|      0|      return CURLPX_OK;
 1073|     23|    sxstate(sx, cf, data, SOCKS5_ST_AUTH_RECV);
  ------------------
  |  |  161|     23|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1074|     23|    FALLTHROUGH();
  ------------------
  |  |  823|     23|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1075|       |
 1076|     23|  case SOCKS5_ST_AUTH_RECV:
  ------------------
  |  Branch (1076:3): [True: 0, False: 115]
  ------------------
 1077|     23|    presult = socks_recv(sx, cf, data, 2, &done);
 1078|     23|    if(presult)
  ------------------
  |  Branch (1078:8): [True: 1, False: 22]
  ------------------
 1079|      1|      return socks_failed(sx, cf, data, presult);
 1080|     22|    else if(!done)
  ------------------
  |  Branch (1080:13): [True: 0, False: 22]
  ------------------
 1081|      0|      return CURLPX_OK;
 1082|     22|    presult = socks5_check_auth_resp(sx, cf, data);
 1083|     22|    if(presult)
  ------------------
  |  Branch (1083:8): [True: 2, False: 20]
  ------------------
 1084|      2|      return socks_failed(sx, cf, data, presult);
 1085|       |    /* Everything is good so far, user was authenticated! */
 1086|     20|    sxstate(sx, cf, data, SOCKS5_ST_REQ1_INIT);
  ------------------
  |  |  161|     20|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1087|     20|    FALLTHROUGH();
  ------------------
  |  |  823|     20|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1088|       |
 1089|     23|  case SOCKS5_ST_REQ1_INIT:
  ------------------
  |  Branch (1089:3): [True: 3, False: 112]
  ------------------
 1090|     23|    presult = socks5_req1_init(sx, cf, data);
 1091|     23|    if(presult)
  ------------------
  |  Branch (1091:8): [True: 0, False: 23]
  ------------------
 1092|      0|      return socks_failed(sx, cf, data, presult);
 1093|     23|    if(!sx->resolve_local) {
  ------------------
  |  Branch (1093:8): [True: 1, False: 22]
  ------------------
 1094|       |      /* we do not resolve, request is complete */
 1095|      1|      sxstate(sx, cf, data, SOCKS5_ST_REQ1_SEND);
  ------------------
  |  |  161|      1|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1096|      1|      goto process_state;
 1097|      1|    }
 1098|     22|    sxstate(sx, cf, data, SOCKS5_ST_RESOLVING);
  ------------------
  |  |  161|     22|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1099|     22|    FALLTHROUGH();
  ------------------
  |  |  823|     22|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1100|       |
 1101|     24|  case SOCKS5_ST_RESOLVING:
  ------------------
  |  Branch (1101:3): [True: 2, False: 113]
  ------------------
 1102|     24|    presult = socks5_resolving(sx, cf, data, &done);
 1103|     24|    if(presult)
  ------------------
  |  Branch (1103:8): [True: 0, False: 24]
  ------------------
 1104|      0|      return socks_failed(sx, cf, data, presult);
 1105|     24|    if(!done)
  ------------------
  |  Branch (1105:8): [True: 2, False: 22]
  ------------------
 1106|      2|      return CURLPX_OK;
 1107|     22|    sxstate(sx, cf, data, SOCKS5_ST_REQ1_SEND);
  ------------------
  |  |  161|     22|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1108|     22|    FALLTHROUGH();
  ------------------
  |  |  823|     22|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1109|       |
 1110|     23|  case SOCKS5_ST_REQ1_SEND:
  ------------------
  |  Branch (1110:3): [True: 1, False: 114]
  ------------------
 1111|     23|    presult = socks_flush(sx, cf, data, &done);
 1112|     23|    if(presult)
  ------------------
  |  Branch (1112:8): [True: 0, False: 23]
  ------------------
 1113|      0|      return socks_failed(sx, cf, data, presult);
 1114|     23|    else if(!done)
  ------------------
  |  Branch (1114:13): [True: 0, False: 23]
  ------------------
 1115|      0|      return CURLPX_OK;
 1116|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1117|       |    if(cf->conn->socks5_gssapi_enctype) {
 1118|       |      failf(data, "SOCKS5 GSS-API protection not yet implemented.");
 1119|       |      return CURLPX_GSSAPI_PROTECTION;
 1120|       |    }
 1121|       |#endif
 1122|     23|    sxstate(sx, cf, data, SOCKS5_ST_RESP1_RECV);
  ------------------
  |  |  161|     23|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1123|     23|    FALLTHROUGH();
  ------------------
  |  |  823|     23|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1124|       |
 1125|     28|  case SOCKS5_ST_RESP1_RECV:
  ------------------
  |  Branch (1125:3): [True: 5, False: 110]
  ------------------
 1126|     28|    presult = socks5_recv_resp1(sx, cf, data, &done);
 1127|     28|    if(presult)
  ------------------
  |  Branch (1127:8): [True: 21, False: 7]
  ------------------
 1128|     21|      return socks_failed(sx, cf, data, presult);
 1129|      7|    if(!done)
  ------------------
  |  Branch (1129:8): [True: 6, False: 1]
  ------------------
 1130|      6|      return CURLPX_OK;
 1131|      1|    CURL_TRC_CF(data, cf, "SOCKS5 request granted.");
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      1|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1132|      1|    sxstate(sx, cf, data, SOCKS_ST_SUCCESS);
  ------------------
  |  |  161|      1|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1133|      1|    FALLTHROUGH();
  ------------------
  |  |  823|      1|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1134|       |
 1135|      1|  case SOCKS_ST_SUCCESS:
  ------------------
  |  Branch (1135:3): [True: 0, False: 115]
  ------------------
 1136|      1|    return CURLPX_OK;
 1137|       |
 1138|      0|  case SOCKS_ST_FAILED:
  ------------------
  |  Branch (1138:3): [True: 0, False: 115]
  ------------------
 1139|      0|    DEBUGASSERT(sx->presult);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1139:5): [True: 0, False: 0]
  |  Branch (1139:5): [True: 0, False: 0]
  ------------------
 1140|      0|    return sx->presult;
 1141|       |
 1142|      0|  default:
  ------------------
  |  Branch (1142:3): [True: 0, False: 115]
  ------------------
 1143|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1143:5): [Folded, False: 0]
  |  Branch (1143:5): [Folded, False: 0]
  ------------------
 1144|      0|    return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
 1145|    115|  }
 1146|    115|}
socks.c:socksstate:
  175|    955|{
  176|    955|  enum socks_state_t oldstate = sx->state;
  177|       |
  178|    955|  if(oldstate == state)
  ------------------
  |  Branch (178:6): [True: 23, False: 932]
  ------------------
  179|       |    /* do not bother when the new state is the same as the old state */
  180|     23|    return;
  181|       |
  182|    932|  sx->state = state;
  183|       |
  184|    932|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  185|    932|  CURL_TRC_CF(data, cf, "[%s] -> [%s] (line %d)",
  ------------------
  |  |  153|    932|  do {                                          \
  |  |  154|    932|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    932|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  1.86k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 932, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 932]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  1.86k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    932|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    932|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    932|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 932]
  |  |  ------------------
  ------------------
  186|    932|              cf_socks_statename[oldstate],
  187|    932|              cf_socks_statename[sx->state], lineno);
  188|       |#else
  189|       |  (void)cf;
  190|       |  (void)data;
  191|       |#endif
  192|    932|}
socks.c:socks5_req0_init:
  567|     42|{
  568|     42|  const unsigned char auth = data->set.socks5auth;
  569|     42|  unsigned char req[5]; /* version + len + 3 possible auth methods */
  570|     42|  unsigned char nauths;
  571|     42|  size_t req_len, nwritten;
  572|     42|  CURLcode result;
  573|       |
  574|     42|  (void)cf;
  575|       |  /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
  576|     42|  if(!sx->resolve_local && strlen(sx->dest->hostname) > 255) {
  ------------------
  |  Branch (576:6): [True: 4, False: 38]
  |  Branch (576:28): [True: 0, False: 4]
  ------------------
  577|      0|    failf(data, "SOCKS5: the destination hostname is too long to be "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  578|      0|          "resolved remotely by the proxy.");
  579|      0|    return CURLPX_LONG_HOSTNAME;
  580|      0|  }
  581|       |
  582|     42|  if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  831|     42|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  837|     42|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|     42|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (582:6): [True: 0, False: 42]
  ------------------
  583|      0|    infof(data, "warning: unsupported value passed to "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  584|     42|          "CURLOPT_SOCKS5_AUTH: %u", auth);
  585|     42|  if(!(auth & CURLAUTH_BASIC))
  ------------------
  |  |  831|     42|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (585:6): [True: 0, False: 42]
  ------------------
  586|       |    /* disable username/password auth */
  587|      0|    Curl_creds_unlink(&sx->creds);
  588|       |
  589|     42|  req[0] = 5;   /* version */
  590|     42|  nauths = 1;
  591|     42|  req[1 + nauths] = 0;   /* 1. no authentication */
  592|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  593|       |  if(auth & CURLAUTH_GSSAPI) {
  594|       |    ++nauths;
  595|       |    req[1 + nauths] = 1; /* GSS-API */
  596|       |  }
  597|       |#endif
  598|     42|  if(sx->creds) {
  ------------------
  |  Branch (598:6): [True: 27, False: 15]
  ------------------
  599|     27|    ++nauths;
  600|     27|    req[1 + nauths] = 2; /* username/password */
  601|     27|  }
  602|     42|  req[1] = nauths;
  603|     42|  req_len = 2 + nauths;
  604|       |
  605|     42|  result = Curl_bufq_write(&sx->iobuf, req, req_len, &nwritten);
  606|     42|  if(result || (nwritten != req_len))
  ------------------
  |  Branch (606:6): [True: 0, False: 42]
  |  Branch (606:16): [True: 0, False: 42]
  ------------------
  607|      0|    return CURLPX_SEND_REQUEST;
  608|     42|  return CURLPX_OK;
  609|     42|}
socks.c:socks_failed:
  198|    149|{
  199|    149|  sxstate(sx, cf, data, SOCKS_ST_FAILED);
  ------------------
  |  |  161|    149|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  200|    149|  sx->presult = presult;
  201|    149|  return presult;
  202|    149|}
socks.c:socks_flush:
  208|    200|{
  209|    200|  CURLcode result;
  210|    200|  size_t nwritten;
  211|       |
  212|    200|  *done = FALSE;
  ------------------
  |  | 1056|    200|#define FALSE false
  ------------------
  213|    400|  while(!Curl_bufq_is_empty(&sx->iobuf)) {
  ------------------
  |  Branch (213:9): [True: 200, False: 200]
  ------------------
  214|    200|    result = Curl_cf_send_bufq(cf->next, data, &sx->iobuf, NULL, 0,
  215|    200|                               &nwritten);
  216|    200|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (216:8): [True: 0, False: 200]
  ------------------
  217|      0|      return CURLPX_OK;
  218|    200|    else if(result) {
  ------------------
  |  Branch (218:13): [True: 0, False: 200]
  ------------------
  219|      0|      failf(data, "Failed to send SOCKS request: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  220|      0|            curl_easy_strerror(result));
  221|      0|      return socks_failed(sx, cf, data, CURLPX_SEND_CONNECT);
  222|      0|    }
  223|    200|  }
  224|    200|  *done = TRUE;
  ------------------
  |  | 1053|    200|#define TRUE true
  ------------------
  225|    200|  return CURLPX_OK;
  226|    200|}
socks.c:socks_recv:
  233|    295|{
  234|    295|  CURLcode result;
  235|    295|  size_t nread;
  236|       |
  237|    295|  *done = FALSE;
  ------------------
  |  | 1056|    295|#define FALSE false
  ------------------
  238|    390|  while(Curl_bufq_len(&sx->iobuf) < min_bytes) {
  ------------------
  |  Branch (238:9): [True: 296, False: 94]
  ------------------
  239|    296|    result = Curl_cf_recv_bufq(cf->next, data, &sx->iobuf,
  240|    296|                               min_bytes - Curl_bufq_len(&sx->iobuf),
  241|    296|                               &nread);
  242|    296|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (242:8): [True: 90, False: 206]
  ------------------
  243|     90|      return CURLPX_OK;
  244|    206|    else if(result) {
  ------------------
  |  Branch (244:13): [True: 0, False: 206]
  ------------------
  245|      0|      failf(data, "Failed to receive SOCKS response: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  246|      0|            curl_easy_strerror(result));
  247|      0|      return CURLPX_RECV_CONNECT;
  248|      0|    }
  249|    206|    else if(!nread) { /* EOF */
  ------------------
  |  Branch (249:13): [True: 111, False: 95]
  ------------------
  250|    111|      if(Curl_bufq_len(&sx->iobuf) < min_bytes) {
  ------------------
  |  Branch (250:10): [True: 111, False: 0]
  ------------------
  251|    111|        failf(data, "Failed to receive SOCKS response, "
  ------------------
  |  |   62|    111|#define failf Curl_failf
  ------------------
  252|    111|              "proxy closed connection");
  253|    111|        return CURLPX_RECV_CONNECT;
  254|    111|      }
  255|      0|      break;
  256|    111|    }
  257|    296|  }
  258|     94|  *done = TRUE;
  ------------------
  |  | 1053|     94|#define TRUE true
  ------------------
  259|     94|  return CURLPX_OK;
  260|    295|}
socks.c:socks5_check_resp0:
  614|     35|{
  615|     35|  const unsigned char *resp;
  616|     35|  unsigned char auth_mode;
  617|     35|  size_t rlen;
  618|       |
  619|     35|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < 2) {
  ------------------
  |  Branch (619:6): [True: 0, False: 35]
  |  Branch (619:51): [True: 0, False: 35]
  ------------------
  620|      0|    failf(data, "SOCKS5 initial reply is incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  621|      0|    return CURLPX_RECV_CONNECT;
  622|      0|  }
  623|       |
  624|     35|  if(resp[0] != 5) {
  ------------------
  |  Branch (624:6): [True: 3, False: 32]
  ------------------
  625|      3|    failf(data, "Received invalid version in initial SOCKS5 response.");
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  626|      3|    return CURLPX_BAD_VERSION;
  627|      3|  }
  628|       |
  629|     32|  auth_mode = resp[1];
  630|     32|  Curl_bufq_skip(&sx->iobuf, 2);
  631|       |
  632|     32|  switch(auth_mode) {
  633|      3|  case 0:
  ------------------
  |  Branch (633:3): [True: 3, False: 29]
  ------------------
  634|       |    /* DONE! No authentication needed. Send request. */
  635|      3|    sxstate(sx, cf, data, SOCKS5_ST_REQ1_INIT);
  ------------------
  |  |  161|      3|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  636|      3|    return CURLPX_OK;
  637|      1|  case 1:
  ------------------
  |  Branch (637:3): [True: 1, False: 31]
  ------------------
  638|      1|    if(data->set.socks5auth & CURLAUTH_GSSAPI) {
  ------------------
  |  |  837|      1|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|      1|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (638:8): [True: 1, False: 0]
  ------------------
  639|      1|      sxstate(sx, cf, data, SOCKS5_ST_GSSAPI_INIT);
  ------------------
  |  |  161|      1|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  640|      1|      return CURLPX_OK;
  641|      1|    }
  642|      0|    failf(data, "SOCKS5 GSSAPI per-message authentication is not enabled.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  643|      0|    return CURLPX_GSSAPI_PERMSG;
  644|     26|  case 2:
  ------------------
  |  Branch (644:3): [True: 26, False: 6]
  ------------------
  645|       |    /* regular name + password authentication */
  646|     26|    if(data->set.socks5auth & CURLAUTH_BASIC) {
  ------------------
  |  |  831|     26|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (646:8): [True: 26, False: 0]
  ------------------
  647|     26|      sxstate(sx, cf, data, SOCKS5_ST_AUTH_INIT);
  ------------------
  |  |  161|     26|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  648|     26|      return CURLPX_OK;
  649|     26|    }
  650|      0|    failf(data, "BASIC authentication proposed but not enabled.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  651|      0|    return CURLPX_NO_AUTH;
  652|      1|  case 255:
  ------------------
  |  Branch (652:3): [True: 1, False: 31]
  ------------------
  653|      1|    failf(data, "No authentication method was acceptable.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  654|      1|    return CURLPX_NO_AUTH;
  655|      1|  default:
  ------------------
  |  Branch (655:3): [True: 1, False: 31]
  ------------------
  656|      1|    failf(data, "Unknown SOCKS5 mode attempted to be used by server.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  657|      1|    return CURLPX_UNKNOWN_MODE;
  658|     32|  }
  659|     32|}
socks.c:socks5_auth_init:
  664|     26|{
  665|       |  /* Needs username and password */
  666|     26|  size_t ulen = 0, plen = 0, nwritten;
  667|     26|  unsigned char buf[2];
  668|     26|  CURLcode result;
  669|       |
  670|     26|  if(sx->creds) {
  ------------------
  |  Branch (670:6): [True: 15, False: 11]
  ------------------
  671|     15|    ulen = strlen(sx->creds->user);
  672|     15|    plen = strlen(sx->creds->passwd);
  673|       |    /* the lengths must fit in a single byte */
  674|     15|    if(ulen > 255) {
  ------------------
  |  Branch (674:8): [True: 2, False: 13]
  ------------------
  675|      2|      failf(data, "Excessive username length for proxy auth");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  676|      2|      return CURLPX_LONG_USER;
  677|      2|    }
  678|     13|    if(plen > 255) {
  ------------------
  |  Branch (678:8): [True: 1, False: 12]
  ------------------
  679|      1|      failf(data, "Excessive password length for proxy auth");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  680|      1|      return CURLPX_LONG_PASSWD;
  681|      1|    }
  682|     13|  }
  683|       |
  684|       |  /*   username/password request looks like
  685|       |   * +----+------+----------+------+----------+
  686|       |   * |VER | ULEN |  UNAME   | PLEN |  PASSWD  |
  687|       |   * +----+------+----------+------+----------+
  688|       |   * | 1  |  1   | 1 to 255 |  1   | 1 to 255 |
  689|       |   * +----+------+----------+------+----------+
  690|       |   */
  691|     23|  buf[0] = 1;    /* username/pw subnegotiation version */
  692|     23|  buf[1] = (unsigned char)ulen;
  693|     23|  result = Curl_bufq_write(&sx->iobuf, buf, 2, &nwritten);
  694|     23|  if(result || (nwritten != 2))
  ------------------
  |  Branch (694:6): [True: 0, False: 23]
  |  Branch (694:16): [True: 0, False: 23]
  ------------------
  695|      0|    return CURLPX_SEND_REQUEST;
  696|     23|  if(ulen) {
  ------------------
  |  Branch (696:6): [True: 11, False: 12]
  ------------------
  697|     11|    result = Curl_bufq_cwrite(&sx->iobuf, sx->creds->user, ulen, &nwritten);
  698|     11|    if(result || (nwritten != ulen))
  ------------------
  |  Branch (698:8): [True: 0, False: 11]
  |  Branch (698:18): [True: 0, False: 11]
  ------------------
  699|      0|      return CURLPX_SEND_REQUEST;
  700|     11|  }
  701|     23|  buf[0] = (unsigned char)plen;
  702|     23|  result = Curl_bufq_write(&sx->iobuf, buf, 1, &nwritten);
  703|     23|  if(result || (nwritten != 1))
  ------------------
  |  Branch (703:6): [True: 0, False: 23]
  |  Branch (703:16): [True: 0, False: 23]
  ------------------
  704|      0|    return CURLPX_SEND_REQUEST;
  705|     23|  if(plen) {
  ------------------
  |  Branch (705:6): [True: 6, False: 17]
  ------------------
  706|      6|    result = Curl_bufq_cwrite(&sx->iobuf, sx->creds->passwd, plen, &nwritten);
  707|      6|    if(result || (nwritten != plen))
  ------------------
  |  Branch (707:8): [True: 0, False: 6]
  |  Branch (707:18): [True: 0, False: 6]
  ------------------
  708|      0|      return CURLPX_SEND_REQUEST;
  709|      6|  }
  710|     23|  sxstate(sx, cf, data, SOCKS5_ST_AUTH_SEND);
  ------------------
  |  |  161|     23|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  711|     23|  return CURLPX_OK;
  712|     23|}
socks.c:socks5_check_auth_resp:
  717|     22|{
  718|     22|  const unsigned char *resp;
  719|     22|  unsigned char auth_status;
  720|     22|  size_t rlen;
  721|       |
  722|     22|  (void)cf;
  723|     22|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < 2) {
  ------------------
  |  Branch (723:6): [True: 0, False: 22]
  |  Branch (723:51): [True: 0, False: 22]
  ------------------
  724|      0|    failf(data, "SOCKS5 sub-negotiation response incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  725|      0|    return CURLPX_RECV_CONNECT;
  726|      0|  }
  727|       |
  728|       |  /* ignore the first (VER) byte */
  729|     22|  auth_status = resp[1];
  730|     22|  if(auth_status) {
  ------------------
  |  Branch (730:6): [True: 2, False: 20]
  ------------------
  731|      2|    failf(data, "User was rejected by the SOCKS5 server (%d %d).",
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  732|      2|          resp[0], resp[1]);
  733|      2|    return CURLPX_USER_REJECTED;
  734|      2|  }
  735|     20|  Curl_bufq_skip(&sx->iobuf, 2);
  736|     20|  return CURLPX_OK;
  737|     22|}
socks.c:socks5_req1_init:
  742|     23|{
  743|     23|  unsigned char req[5];
  744|     23|  unsigned char ipbuf[16];
  745|     23|  const unsigned char *destination;
  746|     23|  unsigned char desttype, destlen, hdlen;
  747|     23|  size_t nwritten;
  748|     23|  CURLcode result;
  749|       |
  750|     23|  req[0] = 5; /* version (SOCKS5) */
  751|     23|  req[1] = 1; /* connect */
  752|     23|  req[2] = 0; /* must be zero */
  753|     23|  if(sx->resolve_local) {
  ------------------
  |  Branch (753:6): [True: 22, False: 1]
  ------------------
  754|       |    /* rest of request is added after resolving */
  755|     22|    result = Curl_bufq_write(&sx->iobuf, req, 3, &nwritten);
  756|     22|    if(result || (nwritten != 3))
  ------------------
  |  Branch (756:8): [True: 0, False: 22]
  |  Branch (756:18): [True: 0, False: 22]
  ------------------
  757|      0|      return CURLPX_SEND_REQUEST;
  758|     22|    return CURLPX_OK;
  759|     22|  }
  760|       |
  761|       |  /* remote resolving, send what type+addr/string to resolve */
  762|      1|#ifdef USE_IPV6
  763|      1|  if(strchr(sx->dest->hostname, ':')) {
  ------------------
  |  Branch (763:6): [True: 0, False: 1]
  ------------------
  764|      0|    desttype = 4;
  765|      0|    destination = ipbuf;
  766|      0|    destlen = 16;
  767|      0|    if(curlx_inet_pton(AF_INET6, sx->dest->hostname, ipbuf) != 1)
  ------------------
  |  Branch (767:8): [True: 0, False: 0]
  ------------------
  768|      0|      return CURLPX_BAD_ADDRESS_TYPE;
  769|      0|  }
  770|      1|  else
  771|      1|#endif
  772|      1|  if(curlx_inet_pton(AF_INET, sx->dest->hostname, ipbuf) == 1) {
  ------------------
  |  Branch (772:6): [True: 1, False: 0]
  ------------------
  773|      1|    desttype = 1;
  774|      1|    destination = ipbuf;
  775|      1|    destlen = 4;
  776|      1|  }
  777|      0|  else {
  778|      0|    const size_t hostname_len = strlen(sx->dest->hostname);
  779|       |    /* socks5_req0_init() already rejects hostnames longer than 255 bytes, so
  780|       |       this cast to unsigned char is safe. Assert to guard against future
  781|       |       refactoring that might remove or reorder that earlier check. */
  782|      0|    DEBUGASSERT(hostname_len <= 255);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (782:5): [True: 0, False: 0]
  |  Branch (782:5): [True: 0, False: 0]
  ------------------
  783|      0|    desttype = 3;
  784|      0|    destination = (const unsigned char *)sx->dest->hostname;
  785|      0|    destlen = (unsigned char)hostname_len; /* 1-byte length */
  786|      0|  }
  787|       |
  788|      1|  req[3] = desttype;
  789|      1|  req[4] = destlen;
  790|      1|  hdlen = (desttype == 3) ? 5 : 4; /* no length byte for ip addresses */
  ------------------
  |  Branch (790:11): [True: 0, False: 1]
  ------------------
  791|      1|  result = Curl_bufq_write(&sx->iobuf, req, hdlen, &nwritten);
  792|      1|  if(result || (nwritten != hdlen))
  ------------------
  |  Branch (792:6): [True: 0, False: 1]
  |  Branch (792:16): [True: 0, False: 1]
  ------------------
  793|      0|    return CURLPX_SEND_REQUEST;
  794|      1|  result = Curl_bufq_write(&sx->iobuf, destination, destlen, &nwritten);
  795|      1|  if(result || (nwritten != destlen))
  ------------------
  |  Branch (795:6): [True: 0, False: 1]
  |  Branch (795:16): [True: 0, False: 1]
  ------------------
  796|      0|    return CURLPX_SEND_REQUEST;
  797|       |  /* PORT MSB+LSB */
  798|      1|  req[0] = (unsigned char)((sx->dest->port >> 8) & 0xff);
  799|      1|  req[1] = (unsigned char)(sx->dest->port & 0xff);
  800|      1|  result = Curl_bufq_write(&sx->iobuf, req, 2, &nwritten);
  801|      1|  if(result || (nwritten != 2))
  ------------------
  |  Branch (801:6): [True: 0, False: 1]
  |  Branch (801:16): [True: 0, False: 1]
  ------------------
  802|      0|    return CURLPX_SEND_REQUEST;
  803|      1|  CURL_TRC_CF(data, cf, "SOCKS5 connect to %s:%u (remotely resolved)",
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      1|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  804|      1|              sx->dest->hostname, sx->dest->port);
  805|      1|  return CURLPX_OK;
  806|      1|}
socks.c:socks5_resolving:
  812|     24|{
  813|     24|  const struct Curl_addrinfo *ai = NULL;
  814|     24|  char dest[MAX_IPADR_LEN];  /* printable address */
  815|     24|  const unsigned char *destination = NULL;
  816|     24|  unsigned char desttype = 1, destlen = 4;
  817|     24|  unsigned char req[2];
  818|     24|  CURLcode result;
  819|     24|  CURLproxycode presult = CURLPX_OK;
  820|     24|  size_t nwritten;
  821|       |
  822|     24|  *done = FALSE;
  ------------------
  |  | 1056|     24|#define FALSE false
  ------------------
  823|     24|  result = Curl_conn_dns_addr_result(cf->conn, cf->sockindex, sx->dest);
  824|     24|  if(result) {
  ------------------
  |  Branch (824:6): [True: 2, False: 22]
  ------------------
  825|      2|    if(result != CURLE_AGAIN) {
  ------------------
  |  Branch (825:8): [True: 0, False: 2]
  ------------------
  826|      0|      failf(data, "error %d resolving SOCKS destination %s:%u",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  827|      0|            (int)result, sx->dest->hostname, sx->dest->port);
  828|      0|      return CURLPX_RESOLVE_HOST;
  829|      0|    }
  830|      2|    return CURLPX_OK;
  831|      2|  }
  832|       |
  833|     22|#ifdef USE_IPV6
  834|     22|  if(data->set.ipver != CURL_IPRESOLVE_V4)
  ------------------
  |  | 2329|     22|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  |  Branch (834:6): [True: 22, False: 0]
  ------------------
  835|     22|    ai = Curl_conn_dns_get_ai(data, sx->dest, cf->sockindex, AF_INET6, 0);
  836|     22|#endif
  837|     22|  if(!ai)
  ------------------
  |  Branch (837:6): [True: 22, False: 0]
  ------------------
  838|     22|    ai = Curl_conn_dns_get_ai(data, sx->dest, cf->sockindex, AF_INET, 0);
  839|       |
  840|     22|  if(!ai) {
  ------------------
  |  Branch (840:6): [True: 0, False: 22]
  ------------------
  841|      0|    failf(data, "Failed to resolve \"%s\" for SOCKS5 connect.",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  842|      0|          sx->dest->hostname);
  843|      0|    presult = CURLPX_RESOLVE_HOST;
  844|      0|    goto out;
  845|      0|  }
  846|       |
  847|     22|  Curl_printable_address(ai, dest, sizeof(dest));
  848|       |
  849|     22|  if(ai->ai_family == AF_INET) {
  ------------------
  |  Branch (849:6): [True: 22, False: 0]
  ------------------
  850|     22|    struct sockaddr_in *saddr_in;
  851|     22|    desttype = 1; /* ATYP: IPv4 = 1 */
  852|     22|    destlen = 4;
  853|     22|    saddr_in = (struct sockaddr_in *)(void *)ai->ai_addr;
  854|     22|    destination = (const unsigned char *)&saddr_in->sin_addr.s_addr;
  855|     22|    CURL_TRC_CF(data, cf, "SOCKS5 connect to %s:%u (locally resolved)",
  ------------------
  |  |  153|     22|  do {                                          \
  |  |  154|     22|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     22|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     44|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 22, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     44|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     22|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     22|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     22|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 22]
  |  |  ------------------
  ------------------
  856|     22|                dest, sx->dest->port);
  857|     22|  }
  858|      0|#ifdef USE_IPV6
  859|      0|  else if(ai->ai_family == AF_INET6) {
  ------------------
  |  Branch (859:11): [True: 0, False: 0]
  ------------------
  860|      0|    struct sockaddr_in6 *saddr_in6;
  861|      0|    desttype = 4; /* ATYP: IPv6 = 4 */
  862|      0|    destlen = 16;
  863|      0|    saddr_in6 = (struct sockaddr_in6 *)(void *)ai->ai_addr;
  864|      0|    destination = (const unsigned char *)&saddr_in6->sin6_addr.s6_addr;
  865|      0|    CURL_TRC_CF(data, cf, "SOCKS5 connect to [%s]:%u (locally resolved)",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  866|      0|                dest, sx->dest->port);
  867|      0|  }
  868|     22|#endif
  869|       |
  870|     22|  if(!destination) {
  ------------------
  |  Branch (870:6): [True: 0, False: 22]
  ------------------
  871|      0|    failf(data, "SOCKS5 connection to %s not supported", dest);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  872|      0|    presult = CURLPX_RESOLVE_HOST;
  873|      0|    goto out;
  874|      0|  }
  875|       |
  876|     22|  req[0] = desttype;
  877|     22|  result = Curl_bufq_write(&sx->iobuf, req, 1, &nwritten);
  878|     22|  if(result || (nwritten != 1)) {
  ------------------
  |  Branch (878:6): [True: 0, False: 22]
  |  Branch (878:16): [True: 0, False: 22]
  ------------------
  879|      0|    presult = CURLPX_SEND_REQUEST;
  880|      0|    goto out;
  881|      0|  }
  882|     22|  result = Curl_bufq_write(&sx->iobuf, destination, destlen, &nwritten);
  883|     22|  if(result || (nwritten != destlen)) {
  ------------------
  |  Branch (883:6): [True: 0, False: 22]
  |  Branch (883:16): [True: 0, False: 22]
  ------------------
  884|      0|    presult = CURLPX_SEND_REQUEST;
  885|      0|    goto out;
  886|      0|  }
  887|       |  /* PORT MSB+LSB */
  888|     22|  req[0] = (unsigned char)((sx->dest->port >> 8) & 0xffU);
  889|     22|  req[1] = (unsigned char)(sx->dest->port & 0xffU);
  890|     22|  result = Curl_bufq_write(&sx->iobuf, req, 2, &nwritten);
  891|     22|  if(result || (nwritten != 2)) {
  ------------------
  |  Branch (891:6): [True: 0, False: 22]
  |  Branch (891:16): [True: 0, False: 22]
  ------------------
  892|      0|    presult = CURLPX_SEND_REQUEST;
  893|      0|    goto out;
  894|      0|  }
  895|       |
  896|     22|out:
  897|     22|  *done = (presult == CURLPX_OK);
  898|     22|  return presult;
  899|     22|}
socks.c:socks5_recv_resp1:
  905|     28|{
  906|     28|  const unsigned char *resp;
  907|     28|  size_t rlen, resp_len = 8; /* minimum response length */
  908|     28|  CURLproxycode presult;
  909|       |
  910|     28|  presult = socks_recv(sx, cf, data, resp_len, done);
  911|     28|  if(presult)
  ------------------
  |  Branch (911:6): [True: 4, False: 24]
  ------------------
  912|      4|    return presult;
  913|     24|  else if(!*done)
  ------------------
  |  Branch (913:11): [True: 0, False: 24]
  ------------------
  914|      0|    return CURLPX_OK;
  915|       |
  916|     24|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < resp_len) {
  ------------------
  |  Branch (916:6): [True: 0, False: 24]
  |  Branch (916:51): [True: 0, False: 24]
  ------------------
  917|      0|    failf(data, "SOCKS5 response is incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  918|      0|    return CURLPX_RECV_CONNECT;
  919|      0|  }
  920|       |
  921|       |  /* Response packet includes BND.ADDR is variable length parameter by RFC
  922|       |     1928, so the response packet MUST be read until the end to avoid errors
  923|       |     at subsequent protocol level.
  924|       |
  925|       |     +----+-----+-------+------+----------+----------+
  926|       |     |VER | REP |  RSV  | ATYP | BND.ADDR | BND.PORT |
  927|       |     +----+-----+-------+------+----------+----------+
  928|       |     | 1  |  1  | 0x00  |  1   | Variable |    2     |
  929|       |     +----+-----+-------+------+----------+----------+
  930|       |
  931|       |     ATYP:
  932|       |     o IPv4 address: 0x01, BND.ADDR = 4-byte
  933|       |     o domain name:  0x03, BND.ADDR = [ 1-byte length, string ]
  934|       |     o IPv6 address: 0x04, BND.ADDR = 16-byte
  935|       |   */
  936|     24|  if(resp[0] != 5) { /* version */
  ------------------
  |  Branch (936:6): [True: 7, False: 17]
  ------------------
  937|      7|    failf(data, "SOCKS5 reply has wrong version, version should be 5.");
  ------------------
  |  |   62|      7|#define failf Curl_failf
  ------------------
  938|      7|    return CURLPX_BAD_VERSION;
  939|      7|  }
  940|     17|  else if(resp[1]) { /* Anything besides 0 is an error */
  ------------------
  |  Branch (940:11): [True: 2, False: 15]
  ------------------
  941|      2|    CURLproxycode rc = CURLPX_REPLY_UNASSIGNED;
  942|      2|    int code = resp[1];
  943|      2|    failf(data, "cannot complete SOCKS5 connection to %s. (%d)",
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  944|      2|          sx->dest->hostname, code);
  945|      2|    if(code < 9) {
  ------------------
  |  Branch (945:8): [True: 1, False: 1]
  ------------------
  946|       |      /* RFC 1928 section 6 lists: */
  947|      1|      static const CURLproxycode lookup[] = {
  948|      1|        CURLPX_OK,
  949|      1|        CURLPX_REPLY_GENERAL_SERVER_FAILURE,
  950|      1|        CURLPX_REPLY_NOT_ALLOWED,
  951|      1|        CURLPX_REPLY_NETWORK_UNREACHABLE,
  952|      1|        CURLPX_REPLY_HOST_UNREACHABLE,
  953|      1|        CURLPX_REPLY_CONNECTION_REFUSED,
  954|      1|        CURLPX_REPLY_TTL_EXPIRED,
  955|      1|        CURLPX_REPLY_COMMAND_NOT_SUPPORTED,
  956|      1|        CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED,
  957|      1|      };
  958|      1|      rc = lookup[code];
  959|      1|    }
  960|      2|    return rc;
  961|      2|  }
  962|       |
  963|       |  /* Calculate real packet size */
  964|     15|  switch(resp[3]) {
  965|      6|  case 1: /* IPv4 */
  ------------------
  |  Branch (965:3): [True: 6, False: 9]
  ------------------
  966|      6|    resp_len = 4 + 4 + 2;
  967|      6|    break;
  968|      4|  case 3: /* domain name */
  ------------------
  |  Branch (968:3): [True: 4, False: 11]
  ------------------
  969|      4|    resp_len = 4 + 1 + resp[4] + 2; /* header, var length, var bytes, port */
  970|      4|    break;
  971|      3|  case 4: /* IPv6 */
  ------------------
  |  Branch (971:3): [True: 3, False: 12]
  ------------------
  972|      3|    resp_len = 4 + 16 + 2;
  973|      3|    break;
  974|      2|  default:
  ------------------
  |  Branch (974:3): [True: 2, False: 13]
  ------------------
  975|      2|    failf(data, "SOCKS5 reply has wrong address type.");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  976|      2|    return CURLPX_BAD_ADDRESS_TYPE;
  977|     15|  }
  978|       |
  979|       |  /* receive the rest of the response */
  980|     13|  presult = socks_recv(sx, cf, data, resp_len, done);
  981|     13|  if(presult)
  ------------------
  |  Branch (981:6): [True: 6, False: 7]
  ------------------
  982|      6|    return presult;
  983|      7|  else if(!*done)
  ------------------
  |  Branch (983:11): [True: 6, False: 1]
  ------------------
  984|      6|    return CURLPX_OK;
  985|       |
  986|      1|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < resp_len) {
  ------------------
  |  Branch (986:6): [True: 0, False: 1]
  |  Branch (986:51): [True: 0, False: 1]
  ------------------
  987|      0|    failf(data, "SOCKS5 response is incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  988|      0|    return CURLPX_RECV_CONNECT;
  989|      0|  }
  990|       |  /* got it all */
  991|      1|  *done = TRUE;
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
  992|      1|  return CURLPX_OK;
  993|      1|}
socks.c:socks4_connect:
  450|    302|{
  451|    302|  size_t nwritten;
  452|    302|  CURLproxycode presult;
  453|    302|  CURLcode result;
  454|    302|  bool done;
  455|       |
  456|    306|process_state:
  457|    306|  switch(sx->state) {
  458|    135|  case SOCKS_ST_INIT:
  ------------------
  |  Branch (458:3): [True: 135, False: 171]
  ------------------
  459|    135|    sx->version = 4;
  460|    135|    sxstate(sx, cf, data, SOCKS4_ST_START);
  ------------------
  |  |  161|    135|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  461|    135|    FALLTHROUGH();
  ------------------
  |  |  823|    135|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  462|       |
  463|    135|  case SOCKS4_ST_START:
  ------------------
  |  Branch (463:3): [True: 0, False: 306]
  ------------------
  464|    135|    Curl_bufq_reset(&sx->iobuf);
  465|    135|    sx->socks4a = (sx->proxy_type == CURLPROXY_SOCKS4A);
  ------------------
  |  |  801|    135|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  466|    135|    sx->presult = CURLPX_OK;
  467|       |
  468|       |    /* SOCKS4 can only do IPv4, insist! */
  469|    135|    sx->ip_version = CURL_IPRESOLVE_V4;
  ------------------
  |  | 2329|    135|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  470|    135|    CURL_TRC_CF(data, cf, "SOCKS4%s connecting to %s:%u",
  ------------------
  |  |  153|    135|  do {                                          \
  |  |  154|    135|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    135|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    270|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 135, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 135]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    270|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    135|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    135|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|    135|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 135]
  |  |  ------------------
  ------------------
  471|    135|                sx->socks4a ? "a" : "",
  472|    135|                sx->dest->hostname, sx->dest->port);
  473|       |
  474|       |    /*
  475|       |     * Compose socks4 request
  476|       |     *
  477|       |     * Request format
  478|       |     *
  479|       |     *     +----+----+----+----+----+----+----+----+----+----+....+----+
  480|       |     *     | VN | CD | DSTPORT |      DSTIP        | USERID       |NULL|
  481|       |     *     +----+----+----+----+----+----+----+----+----+----+....+----+
  482|       |     * # of bytes:  1    1      2              4           variable       1
  483|       |     */
  484|    135|    presult = socks4_req_add_hd(sx, data);
  485|    135|    if(presult)
  ------------------
  |  Branch (485:8): [True: 0, False: 135]
  ------------------
  486|      0|      return socks_failed(sx, cf, data, presult);
  487|       |
  488|       |    /* DNS resolve only for SOCKS4, not SOCKS4a */
  489|    135|    if(!sx->resolve_local) {
  ------------------
  |  Branch (489:8): [True: 5, False: 130]
  ------------------
  490|       |      /* socks4a, not resolving locally, sends the hostname.
  491|       |       * add an invalid address + user + hostname */
  492|      5|      unsigned char buf[4] = { 0, 0, 0, 1 };
  493|      5|      size_t hlen = strlen(sx->dest->hostname) + 1; /* including NUL */
  494|       |
  495|      5|      if(hlen > 255) {
  ------------------
  |  Branch (495:10): [True: 0, False: 5]
  ------------------
  496|      0|        failf(data, "SOCKS4: too long hostname");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  497|      0|        return socks_failed(sx, cf, data, CURLPX_LONG_HOSTNAME);
  498|      0|      }
  499|      5|      result = Curl_bufq_write(&sx->iobuf, buf, 4, &nwritten);
  500|      5|      if(result || (nwritten != 4))
  ------------------
  |  Branch (500:10): [True: 0, False: 5]
  |  Branch (500:20): [True: 0, False: 5]
  ------------------
  501|      0|        return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
  502|      5|      presult = socks4_req_add_user(sx, data);
  503|      5|      if(presult)
  ------------------
  |  Branch (503:10): [True: 1, False: 4]
  ------------------
  504|      1|        return socks_failed(sx, cf, data, presult);
  505|      4|      result = Curl_bufq_cwrite(&sx->iobuf, sx->dest->hostname, hlen,
  506|      4|                                &nwritten);
  507|      4|      if(result || (nwritten != hlen))
  ------------------
  |  Branch (507:10): [True: 0, False: 4]
  |  Branch (507:20): [True: 0, False: 4]
  ------------------
  508|      0|        return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
  509|       |      /* request complete */
  510|      4|      sxstate(sx, cf, data, SOCKS4_ST_SEND);
  ------------------
  |  |  161|      4|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  511|      4|      goto process_state;
  512|      4|    }
  513|    130|    sxstate(sx, cf, data, SOCKS4_ST_RESOLVING);
  ------------------
  |  |  161|    130|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  514|    130|    FALLTHROUGH();
  ------------------
  |  |  823|    130|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  515|       |
  516|    255|  case SOCKS4_ST_RESOLVING:
  ------------------
  |  Branch (516:3): [True: 125, False: 181]
  ------------------
  517|    255|    presult = socks4_resolving(sx, cf, data, &done);
  518|    255|    if(presult)
  ------------------
  |  Branch (518:8): [True: 4, False: 251]
  ------------------
  519|      4|      return socks_failed(sx, cf, data, presult);
  520|    251|    if(!done)
  ------------------
  |  Branch (520:8): [True: 141, False: 110]
  ------------------
  521|    141|      return CURLPX_OK;
  522|       |    /* append user */
  523|    110|    presult = socks4_req_add_user(sx, data);
  524|    110|    if(presult)
  ------------------
  |  Branch (524:8): [True: 2, False: 108]
  ------------------
  525|      2|      return socks_failed(sx, cf, data, presult);
  526|    108|    sxstate(sx, cf, data, SOCKS4_ST_SEND);
  ------------------
  |  |  161|    108|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  527|    108|    FALLTHROUGH();
  ------------------
  |  |  823|    108|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  528|       |
  529|    112|  case SOCKS4_ST_SEND:
  ------------------
  |  Branch (529:3): [True: 4, False: 302]
  ------------------
  530|    112|    presult = socks_flush(sx, cf, data, &done);
  531|    112|    if(presult)
  ------------------
  |  Branch (531:8): [True: 0, False: 112]
  ------------------
  532|      0|      return socks_failed(sx, cf, data, presult);
  533|    112|    else if(!done)
  ------------------
  |  Branch (533:13): [True: 0, False: 112]
  ------------------
  534|      0|      return CURLPX_OK;
  535|    112|    sxstate(sx, cf, data, SOCKS4_ST_RECV);
  ------------------
  |  |  161|    112|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  536|    112|    FALLTHROUGH();
  ------------------
  |  |  823|    112|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  537|       |
  538|    154|  case SOCKS4_ST_RECV:
  ------------------
  |  Branch (538:3): [True: 42, False: 264]
  ------------------
  539|       |    /* Receive 8-byte response */
  540|    154|    presult = socks_recv(sx, cf, data, 8, &done);
  541|    154|    if(presult)
  ------------------
  |  Branch (541:8): [True: 95, False: 59]
  ------------------
  542|     95|      return socks_failed(sx, cf, data, presult);
  543|     59|    else if(!done)
  ------------------
  |  Branch (543:13): [True: 47, False: 12]
  ------------------
  544|     47|      return CURLPX_OK;
  545|     12|    presult = socks4_check_resp(sx, cf, data);
  546|     12|    if(presult)
  ------------------
  |  Branch (546:8): [True: 9, False: 3]
  ------------------
  547|      9|      return socks_failed(sx, cf, data, presult);
  548|      3|    sxstate(sx, cf, data, SOCKS_ST_SUCCESS);
  ------------------
  |  |  161|      3|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  549|      3|    FALLTHROUGH();
  ------------------
  |  |  823|      3|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  550|       |
  551|      3|  case SOCKS_ST_SUCCESS:
  ------------------
  |  Branch (551:3): [True: 0, False: 306]
  ------------------
  552|      3|    return CURLPX_OK;
  553|       |
  554|      0|  case SOCKS_ST_FAILED:
  ------------------
  |  Branch (554:3): [True: 0, False: 306]
  ------------------
  555|      0|    DEBUGASSERT(sx->presult);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (555:5): [True: 0, False: 0]
  |  Branch (555:5): [True: 0, False: 0]
  ------------------
  556|      0|    return sx->presult;
  557|       |
  558|      0|  default:
  ------------------
  |  Branch (558:3): [True: 0, False: 306]
  ------------------
  559|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (559:5): [Folded, False: 0]
  |  Branch (559:5): [Folded, False: 0]
  ------------------
  560|      0|    return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
  561|    306|  }
  562|    306|}
socks.c:socks4_req_add_hd:
  264|    135|{
  265|    135|  unsigned char buf[4];
  266|    135|  size_t nwritten;
  267|    135|  CURLcode result;
  268|       |
  269|    135|  (void)data;
  270|    135|  buf[0] = 4; /* version (SOCKS4) */
  271|    135|  buf[1] = 1; /* connect */
  272|    135|  buf[2] = (unsigned char)((sx->dest->port >> 8) & 0xffU); /* MSB */
  273|    135|  buf[3] = (unsigned char)(sx->dest->port & 0xffU);        /* LSB */
  274|       |
  275|    135|  result = Curl_bufq_write(&sx->iobuf, buf, 4, &nwritten);
  276|    135|  if(result || (nwritten != 4))
  ------------------
  |  Branch (276:6): [True: 0, False: 135]
  |  Branch (276:16): [True: 0, False: 135]
  ------------------
  277|      0|    return CURLPX_SEND_REQUEST;
  278|    135|  return CURLPX_OK;
  279|    135|}
socks.c:socks4_req_add_user:
  283|    115|{
  284|    115|  CURLcode result;
  285|    115|  size_t nwritten;
  286|       |
  287|    115|  if(sx->creds) {
  ------------------
  |  Branch (287:6): [True: 12, False: 103]
  ------------------
  288|     12|    size_t plen = strlen(sx->creds->user);
  289|     12|    if(plen > 255) {
  ------------------
  |  Branch (289:8): [True: 3, False: 9]
  ------------------
  290|       |      /* there is no real size limit to this field in the protocol, but
  291|       |         SOCKS5 limits the proxy user field to 255 bytes and it seems likely
  292|       |         that a longer field is either a mistake or malicious input */
  293|      3|      failf(data, "Too long SOCKS proxy username");
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  294|      3|      return CURLPX_LONG_USER;
  295|      3|    }
  296|       |    /* add proxy name WITH trailing zero */
  297|      9|    result = Curl_bufq_cwrite(&sx->iobuf, sx->creds->user, plen + 1,
  298|      9|                              &nwritten);
  299|      9|    if(result || (nwritten != (plen + 1)))
  ------------------
  |  Branch (299:8): [True: 0, False: 9]
  |  Branch (299:18): [True: 0, False: 9]
  ------------------
  300|      0|      return CURLPX_SEND_REQUEST;
  301|      9|  }
  302|    103|  else {
  303|       |    /* empty username */
  304|    103|    unsigned char b = 0;
  305|    103|    result = Curl_bufq_write(&sx->iobuf, &b, 1, &nwritten);
  306|    103|    if(result || (nwritten != 1))
  ------------------
  |  Branch (306:8): [True: 0, False: 103]
  |  Branch (306:18): [True: 0, False: 103]
  ------------------
  307|      0|      return CURLPX_SEND_REQUEST;
  308|    103|  }
  309|    112|  return CURLPX_OK;
  310|    115|}
socks.c:socks4_resolving:
  316|    255|{
  317|    255|  const struct Curl_addrinfo *ai = NULL;
  318|    255|  CURLcode result;
  319|    255|  size_t nwritten;
  320|       |
  321|    255|  *done = FALSE;
  ------------------
  |  | 1056|    255|#define FALSE false
  ------------------
  322|    255|  result = Curl_conn_dns_addr_result(cf->conn, cf->sockindex, sx->dest);
  323|    255|  if(result) {
  ------------------
  |  Branch (323:6): [True: 142, False: 113]
  ------------------
  324|    142|    if(result != CURLE_AGAIN) {
  ------------------
  |  Branch (324:8): [True: 1, False: 141]
  ------------------
  325|      1|      failf(data, "error %d resolving SOCKS destination %s:%u",
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  326|      1|            (int)result, sx->dest->hostname, sx->dest->port);
  327|      1|      return CURLPX_RESOLVE_HOST;
  328|      1|    }
  329|    141|    return CURLPX_OK;
  330|    142|  }
  331|       |
  332|    113|  ai = Curl_conn_dns_get_ai(data, sx->dest, cf->sockindex, AF_INET, 0);
  333|    113|  if(ai) {
  ------------------
  |  Branch (333:6): [True: 110, False: 3]
  ------------------
  334|    110|    struct sockaddr_in *saddr_in;
  335|    110|    char ipbuf[64];
  336|       |
  337|    110|    Curl_printable_address(ai, ipbuf, sizeof(ipbuf));
  338|    110|    CURL_TRC_CF(data, cf, "SOCKS4 connect to IPv4 %s (locally resolved)",
  ------------------
  |  |  153|    110|  do {                                          \
  |  |  154|    110|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    110|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    220|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 110, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 110]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    220|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    110|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    110|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    110|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 110]
  |  |  ------------------
  ------------------
  339|    110|                ipbuf);
  340|       |
  341|    110|    saddr_in = (struct sockaddr_in *)(void *)ai->ai_addr;
  342|    110|    result = Curl_bufq_write(&sx->iobuf,
  343|    110|                             (unsigned char *)&saddr_in->sin_addr.s_addr, 4,
  344|    110|                             &nwritten);
  345|       |
  346|    110|    if(result || (nwritten != 4))
  ------------------
  |  Branch (346:8): [True: 0, False: 110]
  |  Branch (346:18): [True: 0, False: 110]
  ------------------
  347|      0|      return CURLPX_SEND_REQUEST;
  348|    110|  }
  349|      3|  else {
  350|       |    /* No IPv4 address resolved */
  351|      3|    failf(data, "SOCKS4 connection to %s not supported", sx->dest->hostname);
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  352|      3|    return CURLPX_RESOLVE_HOST;
  353|      3|  }
  354|       |
  355|    110|  *done = TRUE;
  ------------------
  |  | 1053|    110|#define TRUE true
  ------------------
  356|    110|  return CURLPX_OK;
  357|    113|}
socks.c:socks4_check_resp:
  362|     12|{
  363|     12|  const unsigned char *resp;
  364|     12|  size_t rlen;
  365|       |
  366|     12|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < 8) {
  ------------------
  |  Branch (366:6): [True: 0, False: 12]
  |  Branch (366:51): [True: 0, False: 12]
  ------------------
  367|      0|    failf(data, "SOCKS4 reply is incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  368|      0|    return CURLPX_RECV_CONNECT;
  369|      0|  }
  370|       |
  371|     12|  DEBUGASSERT(rlen == 8);
  ------------------
  |  | 1079|     12|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (371:3): [True: 0, False: 12]
  |  Branch (371:3): [True: 12, False: 0]
  ------------------
  372|       |  /*
  373|       |   * Response format
  374|       |   *
  375|       |   *     +----+----+----+----+----+----+----+----+
  376|       |   *     | VN | CD | DSTPORT |      DSTIP        |
  377|       |   *     +----+----+----+----+----+----+----+----+
  378|       |   * # of bytes:  1    1      2              4
  379|       |   *
  380|       |   * VN is the version of the reply code and should be 0. CD is the result
  381|       |   * code with one of the following values:
  382|       |   *
  383|       |   * 90: request granted
  384|       |   * 91: request rejected or failed
  385|       |   * 92: request rejected because SOCKS server cannot connect to
  386|       |   *     identd on the client
  387|       |   * 93: request rejected because the client program and identd
  388|       |   *     report different user-ids
  389|       |   */
  390|       |
  391|       |  /* wrong version ? */
  392|     12|  if(resp[0]) {
  ------------------
  |  Branch (392:6): [True: 4, False: 8]
  ------------------
  393|      4|    failf(data, "SOCKS4 reply has wrong version, version should be 0.");
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
  394|      4|    return CURLPX_BAD_VERSION;
  395|      4|  }
  396|       |
  397|       |  /* Result */
  398|      8|  switch(resp[1]) {
  399|      3|  case 90:
  ------------------
  |  Branch (399:3): [True: 3, False: 5]
  ------------------
  400|      3|    CURL_TRC_CF(data, cf, "SOCKS4%s request granted.", sx->socks4a ? "a" : "");
  ------------------
  |  |  153|      3|  do {                                          \
  |  |  154|      3|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      3|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      6|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      6|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      3|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      3|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  401|      3|    Curl_bufq_skip(&sx->iobuf, 8);
  402|      3|    return CURLPX_OK;
  403|      1|  case 91:
  ------------------
  |  Branch (403:3): [True: 1, False: 7]
  ------------------
  404|      1|    failf(data,
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  405|      1|          "[SOCKS] cannot complete SOCKS4 connection to %u.%u.%u.%u:%u. (%u)"
  406|      1|          ", request rejected or failed.",
  407|      1|          resp[4], resp[5], resp[6], resp[7],
  408|      1|          (unsigned int)((resp[2] << 8) | resp[3]), resp[1]);
  409|      1|    return CURLPX_REQUEST_FAILED;
  410|      1|  case 92:
  ------------------
  |  Branch (410:3): [True: 1, False: 7]
  ------------------
  411|      1|    failf(data,
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  412|      1|          "[SOCKS] cannot complete SOCKS4 connection to %u.%u.%u.%u:%u. (%u)"
  413|      1|          ", request rejected because SOCKS server cannot connect to "
  414|      1|          "identd on the client.",
  415|      1|          resp[4], resp[5], resp[6], resp[7],
  416|      1|          (unsigned int)((resp[2] << 8) | resp[3]), resp[1]);
  417|      1|    return CURLPX_IDENTD;
  418|      1|  case 93:
  ------------------
  |  Branch (418:3): [True: 1, False: 7]
  ------------------
  419|      1|    failf(data,
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  420|      1|          "[SOCKS] cannot complete SOCKS4 connection to %u.%u.%u.%u:%u. (%u)"
  421|      1|          ", request rejected because the client program and identd "
  422|      1|          "report different user-ids.",
  423|      1|          resp[4], resp[5], resp[6], resp[7],
  424|      1|          (unsigned int)((resp[2] << 8) | resp[3]), resp[1]);
  425|      1|    return CURLPX_IDENTD_DIFFER;
  426|      2|  default:
  ------------------
  |  Branch (426:3): [True: 2, False: 6]
  ------------------
  427|      2|    failf(data,
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  428|      2|          "[SOCKS] cannot complete SOCKS4 connection to %u.%u.%u.%u:%u. (%u)"
  429|      2|          ", Unknown.",
  430|      2|          resp[4], resp[5], resp[6], resp[7],
  431|      2|          (unsigned int)((resp[2] << 8) | resp[3]), resp[1]);
  432|      2|    return CURLPX_UNKNOWN_FAIL;
  433|      8|  }
  434|      8|}
socks.c:socks_cf_adjust_pollset:
 1233|    234|{
 1234|    234|  struct socks_ctx *sx = cf->ctx;
 1235|    234|  CURLcode result = CURLE_OK;
 1236|       |
 1237|    234|  if(!cf->connected && sx) {
  ------------------
  |  Branch (1237:6): [True: 233, False: 1]
  |  Branch (1237:24): [True: 233, False: 0]
  ------------------
 1238|       |    /* If we are not connected, the filter below is and has nothing
 1239|       |     * to wait on, we determine what to wait for. */
 1240|    233|    curl_socket_t sock = Curl_conn_cf_get_socket(cf, data);
 1241|    233|    switch(sx->state) {
 1242|      0|    case SOCKS4_ST_SEND:
  ------------------
  |  Branch (1242:5): [True: 0, False: 233]
  ------------------
 1243|      0|    case SOCKS5_ST_REQ0_SEND:
  ------------------
  |  Branch (1243:5): [True: 0, False: 233]
  ------------------
 1244|      0|    case SOCKS5_ST_AUTH_SEND:
  ------------------
  |  Branch (1244:5): [True: 0, False: 233]
  ------------------
 1245|      0|    case SOCKS5_ST_REQ1_SEND:
  ------------------
  |  Branch (1245:5): [True: 0, False: 233]
  ------------------
 1246|      0|      CURL_TRC_CF(data, cf, "adjust pollset out (%d)", (int)sx->state);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1247|      0|      result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  172|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1248|      0|      break;
 1249|    233|    default:
  ------------------
  |  Branch (1249:5): [True: 233, False: 0]
  ------------------
 1250|    233|      CURL_TRC_CF(data, cf, "adjust pollset in (%d)", (int)sx->state);
  ------------------
  |  |  153|    233|  do {                                          \
  |  |  154|    233|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    233|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    466|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 233, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 233]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    466|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    233|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    233|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    233|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 233]
  |  |  ------------------
  ------------------
 1251|    233|      result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  170|    233|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|    233|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|    233|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1252|    233|      break;
 1253|    233|    }
 1254|    233|  }
 1255|    234|  return result;
 1256|    234|}
socks.c:socks_cf_query:
 1269|    812|{
 1270|    812|  struct socks_ctx *sx = cf->ctx;
 1271|       |
 1272|    812|  switch(query) {
 1273|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  173|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (1273:3): [True: 0, False: 812]
  ------------------
 1274|      0|    if(sx) {
  ------------------
  |  Branch (1274:8): [True: 0, False: 0]
  ------------------
 1275|      0|      *pres1 = sx->dest->port;
 1276|      0|      *((const char **)pres2) = sx->dest->hostname;
 1277|      0|      return CURLE_OK;
 1278|      0|    }
 1279|      0|    break;
 1280|      2|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  177|      2|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1280:3): [True: 2, False: 810]
  ------------------
 1281|      2|    const char **palpn = pres2;
 1282|      2|    DEBUGASSERT(palpn);
  ------------------
  |  | 1079|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1282:5): [True: 0, False: 2]
  |  Branch (1282:5): [True: 2, False: 0]
  ------------------
 1283|      2|    *palpn = NULL;
 1284|      2|    return CURLE_OK;
 1285|      2|  }
 1286|    810|  default:
  ------------------
  |  Branch (1286:3): [True: 810, False: 2]
  ------------------
 1287|    810|    break;
 1288|    812|  }
 1289|    810|  return cf->next ?
  ------------------
  |  Branch (1289:10): [True: 810, False: 0]
  ------------------
 1290|    810|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1291|    810|    CURLE_UNKNOWN_OPTION;
 1292|    812|}
socks.c:socks_proxy_ctx_free:
 1149|    177|{
 1150|    177|  if(ctx) {
  ------------------
  |  Branch (1150:6): [True: 177, False: 0]
  ------------------
 1151|    177|    Curl_peer_unlink(&ctx->dest);
 1152|    177|    Curl_creds_unlink(&ctx->creds);
 1153|    177|    Curl_bufq_free(&ctx->iobuf);
 1154|    177|    curlx_free(ctx);
  ------------------
  |  | 1478|    177|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1155|    177|  }
 1156|    177|}

Curl_splay:
   43|  13.1k|{
   44|  13.1k|  struct Curl_tree N, *l, *r, *y;
   45|       |
   46|  13.1k|  if(!t)
  ------------------
  |  Branch (46:6): [True: 0, False: 13.1k]
  ------------------
   47|      0|    return NULL;
   48|  13.1k|  N.smaller = N.larger = NULL;
   49|  13.1k|  l = r = &N;
   50|       |
   51|  14.1k|  for(;;) {
   52|  14.1k|    timediff_t comp = splay_compare(pkey, &t->key);
  ------------------
  |  |   35|  14.1k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
   53|  14.1k|    if(comp < 0) {
  ------------------
  |  Branch (53:8): [True: 2.21k, False: 11.9k]
  ------------------
   54|  2.21k|      if(!t->smaller)
  ------------------
  |  Branch (54:10): [True: 1.75k, False: 455]
  ------------------
   55|  1.75k|        break;
   56|    455|      if(splay_compare(pkey, &t->smaller->key) < 0) {
  ------------------
  |  |   35|    455|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (56:10): [True: 452, False: 3]
  ------------------
   57|    452|        y = t->smaller;                           /* rotate smaller */
   58|    452|        t->smaller = y->larger;
   59|    452|        y->larger = t;
   60|    452|        t = y;
   61|    452|        if(!t->smaller)
  ------------------
  |  Branch (61:12): [True: 13, False: 439]
  ------------------
   62|     13|          break;
   63|    452|      }
   64|    442|      r->smaller = t;                               /* link smaller */
   65|    442|      r = t;
   66|    442|      t = t->smaller;
   67|    442|    }
   68|  11.9k|    else if(comp > 0) {
  ------------------
  |  Branch (68:13): [True: 2.88k, False: 9.02k]
  ------------------
   69|  2.88k|      if(!t->larger)
  ------------------
  |  Branch (69:10): [True: 2.18k, False: 703]
  ------------------
   70|  2.18k|        break;
   71|    703|      if(splay_compare(pkey, &t->larger->key) > 0) {
  ------------------
  |  |   35|    703|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (71:10): [True: 409, False: 294]
  ------------------
   72|    409|        y = t->larger;                          /* rotate larger */
   73|    409|        t->larger = y->smaller;
   74|    409|        y->smaller = t;
   75|    409|        t = y;
   76|    409|        if(!t->larger)
  ------------------
  |  Branch (76:12): [True: 218, False: 191]
  ------------------
   77|    218|          break;
   78|    409|      }
   79|    485|      l->larger = t;                              /* link larger */
   80|    485|      l = t;
   81|    485|      t = t->larger;
   82|    485|    }
   83|  9.02k|    else
   84|  9.02k|      break;
   85|  14.1k|  }
   86|       |
   87|  13.1k|  l->larger = t->smaller;                                /* assemble */
   88|  13.1k|  r->smaller = t->larger;
   89|  13.1k|  t->smaller = N.larger;
   90|  13.1k|  t->larger = N.smaller;
   91|       |
   92|  13.1k|  return t;
   93|  13.1k|}
Curl_splayinsert:
  107|  9.02k|{
  108|  9.02k|  DEBUGASSERT(node);
  ------------------
  |  | 1079|  9.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (108:3): [True: 0, False: 9.02k]
  |  Branch (108:3): [True: 9.02k, False: 0]
  ------------------
  109|       |
  110|  9.02k|  if(t) {
  ------------------
  |  Branch (110:6): [True: 1.20k, False: 7.82k]
  ------------------
  111|  1.20k|    t = Curl_splay(pkey, t);
  112|  1.20k|    DEBUGASSERT(t);
  ------------------
  |  | 1079|  1.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:5): [True: 0, False: 1.20k]
  |  Branch (112:5): [True: 1.20k, False: 0]
  ------------------
  113|  1.20k|    if(splay_compare(pkey, &t->key) == 0) {
  ------------------
  |  |   35|  1.20k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (113:8): [True: 0, False: 1.20k]
  ------------------
  114|       |      /* There already exists a node in the tree with the same key. Build a
  115|       |         doubly-linked circular list of nodes. We add the new 'node' struct to
  116|       |         the end of this list. */
  117|       |
  118|      0|      node->key = SPLAY_SUBNODE; /* identify this node as a subnode */
  119|      0|      node->samen = t;
  120|      0|      node->samep = t->samep;
  121|      0|      t->samep->samen = node;
  122|      0|      t->samep = node;
  123|       |
  124|      0|      return t; /* the root node always stays the same */
  125|      0|    }
  126|  1.20k|  }
  127|       |
  128|  9.02k|  if(!t) {
  ------------------
  |  Branch (128:6): [True: 7.82k, False: 1.20k]
  ------------------
  129|  7.82k|    node->smaller = node->larger = NULL;
  130|  7.82k|  }
  131|  1.20k|  else if(splay_compare(pkey, &t->key) < 0) {
  ------------------
  |  |   35|  1.20k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (131:11): [True: 2, False: 1.20k]
  ------------------
  132|      2|    node->smaller = t->smaller;
  133|      2|    node->larger = t;
  134|      2|    t->smaller = NULL;
  135|      2|  }
  136|  1.20k|  else {
  137|  1.20k|    node->larger = t->larger;
  138|  1.20k|    node->smaller = t;
  139|  1.20k|    t->larger = NULL;
  140|  1.20k|  }
  141|  9.02k|  node->key = *pkey;
  142|       |
  143|       |  /* no identical nodes (yet), we are the only one in the list of nodes */
  144|  9.02k|  node->samen = node;
  145|  9.02k|  node->samep = node;
  146|  9.02k|  return node;
  147|  9.02k|}
Curl_splaygetbest:
  155|  1.76k|{
  156|  1.76k|  static const struct curltime tv_zero = { 0, 0 };
  157|  1.76k|  struct Curl_tree *x;
  158|       |
  159|  1.76k|  if(!t) {
  ------------------
  |  Branch (159:6): [True: 0, False: 1.76k]
  ------------------
  160|      0|    *removed = NULL; /* none removed since there was no root */
  161|      0|    return NULL;
  162|      0|  }
  163|       |
  164|       |  /* find smallest */
  165|  1.76k|  t = Curl_splay(&tv_zero, t);
  166|  1.76k|  DEBUGASSERT(t);
  ------------------
  |  | 1079|  1.76k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 1.76k]
  |  Branch (166:3): [True: 1.76k, False: 0]
  ------------------
  167|  1.76k|  if(splay_compare(pkey, &t->key) < 0) {
  ------------------
  |  |   35|  1.76k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (167:6): [True: 1.76k, False: 0]
  ------------------
  168|       |    /* even the smallest is too big */
  169|  1.76k|    *removed = NULL;
  170|  1.76k|    return t;
  171|  1.76k|  }
  172|       |
  173|       |  /* FIRST! Check if there is a list with identical keys */
  174|      0|  x = t->samen;
  175|      0|  if(x != t) {
  ------------------
  |  Branch (175:6): [True: 0, False: 0]
  ------------------
  176|       |    /* there is, pick one from the list */
  177|       |
  178|       |    /* 'x' is the new root node */
  179|       |
  180|      0|    x->key = t->key;
  181|      0|    x->larger = t->larger;
  182|      0|    x->smaller = t->smaller;
  183|      0|    x->samep = t->samep;
  184|      0|    t->samep->samen = x;
  185|       |
  186|      0|    *removed = t;
  187|      0|    return x; /* new root */
  188|      0|  }
  189|       |
  190|       |  /* we splayed the tree to the smallest element, there is no smaller */
  191|      0|  x = t->larger;
  192|      0|  *removed = t;
  193|       |
  194|      0|  return x;
  195|      0|}
Curl_splayremove:
  211|  9.02k|{
  212|  9.02k|  struct Curl_tree *x;
  213|       |
  214|  9.02k|  if(!t)
  ------------------
  |  Branch (214:6): [True: 0, False: 9.02k]
  ------------------
  215|      0|    return 1;
  216|       |
  217|  9.02k|  DEBUGASSERT(removenode);
  ------------------
  |  | 1079|  9.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (217:3): [True: 0, False: 9.02k]
  |  Branch (217:3): [True: 9.02k, False: 0]
  ------------------
  218|       |
  219|  9.02k|  if(splay_compare(&SPLAY_SUBNODE, &removenode->key) == 0) {
  ------------------
  |  |   35|  9.02k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (219:6): [True: 0, False: 9.02k]
  ------------------
  220|       |    /* It is a subnode within a 'same' linked list and thus we can unlink it
  221|       |       easily. */
  222|      0|    DEBUGASSERT(removenode->samen != removenode);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (222:5): [True: 0, False: 0]
  |  Branch (222:5): [True: 0, False: 0]
  ------------------
  223|      0|    if(removenode->samen == removenode)
  ------------------
  |  Branch (223:8): [True: 0, False: 0]
  ------------------
  224|       |      /* A non-subnode should never be set to SPLAY_SUBNODE */
  225|      0|      return 3;
  226|       |
  227|      0|    removenode->samep->samen = removenode->samen;
  228|      0|    removenode->samen->samep = removenode->samep;
  229|       |
  230|       |    /* Ensures that double-remove gets caught. */
  231|      0|    removenode->samen = removenode;
  232|       |
  233|      0|    *newroot = t; /* return the same root */
  234|      0|    return 0;
  235|      0|  }
  236|       |
  237|  9.02k|  t = Curl_splay(&removenode->key, t);
  238|  9.02k|  DEBUGASSERT(t);
  ------------------
  |  | 1079|  9.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (238:3): [True: 0, False: 9.02k]
  |  Branch (238:3): [True: 9.02k, False: 0]
  ------------------
  239|       |
  240|       |  /* First make sure that we got the same root node as the one we want
  241|       |     to remove, as otherwise we might be trying to remove a node that
  242|       |     is not actually in the tree.
  243|       |
  244|       |     We cannot compare the keys here as a double remove in quick
  245|       |     succession of a node with key != SPLAY_SUBNODE && same != NULL
  246|       |     could return the same key but a different node. */
  247|  9.02k|  DEBUGASSERT(t == removenode);
  ------------------
  |  | 1079|  9.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 9.02k]
  |  Branch (247:3): [True: 9.02k, False: 0]
  ------------------
  248|  9.02k|  if(t != removenode)
  ------------------
  |  Branch (248:6): [True: 0, False: 9.02k]
  ------------------
  249|      0|    return 2;
  250|       |
  251|       |  /* Check if there is a list with identical sizes, as then we are trying to
  252|       |     remove the root node of a list of nodes with identical keys. */
  253|  9.02k|  x = t->samen;
  254|  9.02k|  if(x != t) {
  ------------------
  |  Branch (254:6): [True: 0, False: 9.02k]
  ------------------
  255|       |    /* 'x' is the new root node, we make it use the root node's
  256|       |       smaller/larger links */
  257|       |
  258|      0|    x->key = t->key;
  259|      0|    x->larger = t->larger;
  260|      0|    x->smaller = t->smaller;
  261|      0|    x->samep = t->samep;
  262|      0|    t->samep->samen = x;
  263|      0|  }
  264|  9.02k|  else {
  265|       |    /* Remove the root node */
  266|  9.02k|    if(!t->smaller)
  ------------------
  |  Branch (266:8): [True: 7.82k, False: 1.20k]
  ------------------
  267|  7.82k|      x = t->larger;
  268|  1.20k|    else {
  269|  1.20k|      x = Curl_splay(&removenode->key, t->smaller);
  270|  1.20k|      DEBUGASSERT(x);
  ------------------
  |  | 1079|  1.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (270:7): [True: 0, False: 1.20k]
  |  Branch (270:7): [True: 1.20k, False: 0]
  ------------------
  271|  1.20k|      x->larger = t->larger;
  272|  1.20k|    }
  273|  9.02k|  }
  274|       |
  275|  9.02k|  *newroot = x; /* store new root pointer */
  276|       |
  277|  9.02k|  return 0;
  278|  9.02k|}
Curl_splayset:
  282|  9.02k|{
  283|  9.02k|  DEBUGASSERT(node);
  ------------------
  |  | 1079|  9.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (283:3): [True: 0, False: 9.02k]
  |  Branch (283:3): [True: 9.02k, False: 0]
  ------------------
  284|  9.02k|  node->ptr = payload;
  285|  9.02k|}

Curl_raw_toupper:
   75|  1.61M|{
   76|  1.61M|  return (char)touppermap[(unsigned char)in];
   77|  1.61M|}
Curl_raw_tolower:
   82|   866k|{
   83|   866k|  return (char)tolowermap[(unsigned char)in];
   84|   866k|}
Curl_strntoupper:
   92|  3.21k|{
   93|  3.21k|  if(n < 1)
  ------------------
  |  Branch (93:6): [True: 0, False: 3.21k]
  ------------------
   94|      0|    return;
   95|       |
   96|  10.4k|  do {
   97|  10.4k|    *dest++ = Curl_raw_toupper(*src);
   98|  10.4k|  } while(*src++ && --n);
  ------------------
  |  Branch (98:11): [True: 10.4k, False: 0]
  |  Branch (98:21): [True: 7.26k, False: 3.21k]
  ------------------
   99|  3.21k|}
Curl_strntolower:
  107|  65.1k|{
  108|  65.1k|  if(n < 1)
  ------------------
  |  Branch (108:6): [True: 531, False: 64.5k]
  ------------------
  109|    531|    return;
  110|       |
  111|   656k|  do {
  112|   656k|    *dest++ = Curl_raw_tolower(*src);
  113|   656k|  } while(*src++ && --n);
  ------------------
  |  Branch (113:11): [True: 656k, False: 0]
  |  Branch (113:21): [True: 591k, False: 64.5k]
  ------------------
  114|  64.5k|}
Curl_safecmp:
  120|  2.29k|{
  121|  2.29k|  if(a && b)
  ------------------
  |  Branch (121:6): [True: 0, False: 2.29k]
  |  Branch (121:11): [True: 0, False: 0]
  ------------------
  122|      0|    return !strcmp(a, b);
  123|  2.29k|  return !a && !b;
  ------------------
  |  Branch (123:10): [True: 2.29k, False: 0]
  |  Branch (123:16): [True: 0, False: 2.29k]
  ------------------
  124|  2.29k|}
Curl_timestrcmp:
  131|     30|{
  132|     30|  int match = 0;
  133|     30|  int i = 0;
  134|       |
  135|     30|  if(a && b) {
  ------------------
  |  Branch (135:6): [True: 30, False: 0]
  |  Branch (135:11): [True: 30, False: 0]
  ------------------
  136|     46|    while(1) {
  ------------------
  |  Branch (136:11): [True: 46, Folded]
  ------------------
  137|     46|      match |= a[i] ^ b[i];
  138|     46|      if(!a[i] || !b[i])
  ------------------
  |  Branch (138:10): [True: 30, False: 16]
  |  Branch (138:19): [True: 0, False: 16]
  ------------------
  139|     30|        break;
  140|     16|      i++;
  141|     16|    }
  142|     30|  }
  143|      0|  else
  144|      0|    return a || b;
  ------------------
  |  Branch (144:12): [True: 0, False: 0]
  |  Branch (144:17): [True: 0, False: 0]
  ------------------
  145|     30|  return match;
  146|     30|}

curl_strequal:
   77|  53.7k|{
   78|  53.7k|  if(s1 && s2)
  ------------------
  |  Branch (78:6): [True: 53.4k, False: 305]
  |  Branch (78:12): [True: 49.5k, False: 3.88k]
  ------------------
   79|       |    /* both pointers point to something then compare them */
   80|  49.5k|    return casecompare(s1, s2);
   81|       |
   82|       |  /* if both pointers are NULL then treat them as equal */
   83|  4.18k|  return NULL == s1 && NULL == s2;
  ------------------
  |  Branch (83:10): [True: 305, False: 3.88k]
  |  Branch (83:24): [True: 305, False: 0]
  ------------------
   84|  53.7k|}
curl_strnequal:
   88|   463k|{
   89|   463k|  if(s1 && s2)
  ------------------
  |  Branch (89:6): [True: 463k, False: 0]
  |  Branch (89:12): [True: 463k, False: 0]
  ------------------
   90|       |    /* both pointers point to something then compare them */
   91|   463k|    return ncasecompare(s1, s2, n);
   92|       |
   93|       |  /* if both pointers are NULL then treat them as equal if max is non-zero */
   94|      0|  return NULL == s1 && NULL == s2 && n;
  ------------------
  |  Branch (94:10): [True: 0, False: 0]
  |  Branch (94:24): [True: 0, False: 0]
  |  Branch (94:38): [True: 0, False: 0]
  ------------------
   95|   463k|}
strequal.c:casecompare:
   36|  49.5k|{
   37|  67.1k|  while(*first) {
  ------------------
  |  Branch (37:9): [True: 65.4k, False: 1.64k]
  ------------------
   38|  65.4k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (38:8): [True: 47.9k, False: 17.5k]
  ------------------
   39|       |      /* get out of the loop as soon as they do not match */
   40|  47.9k|      return 0;
   41|  17.5k|    first++;
   42|  17.5k|    second++;
   43|  17.5k|  }
   44|       |  /* If we are here either the strings are the same or the length is different.
   45|       |     We can test if the "current" character is non-zero for one and zero
   46|       |     for the other. Note that the characters may not be exactly the same even
   47|       |     if they match, we only want to compare zero-ness. */
   48|  1.64k|  return !*first == !*second;
   49|  49.5k|}
strequal.c:ncasecompare:
   52|   463k|{
   53|   793k|  while(*first && max) {
  ------------------
  |  Branch (53:9): [True: 743k, False: 49.7k]
  |  Branch (53:19): [True: 724k, False: 18.8k]
  ------------------
   54|   724k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (54:8): [True: 395k, False: 329k]
  ------------------
   55|   395k|      return 0;
   56|   329k|    max--;
   57|   329k|    first++;
   58|   329k|    second++;
   59|   329k|  }
   60|  68.5k|  if(max == 0)
  ------------------
  |  Branch (60:6): [True: 61.5k, False: 7.05k]
  ------------------
   61|  61.5k|    return 1; /* they are equal this far */
   62|       |
   63|  7.05k|  return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
   64|  68.5k|}

curl_easy_strerror:
   35|    229|{
   36|    229|#ifdef CURLVERBOSE
   37|    229|  switch(error) {
   38|      0|  case CURLE_OK:
  ------------------
  |  Branch (38:3): [True: 0, False: 229]
  ------------------
   39|      0|    return "No error";
   40|       |
   41|      0|  case CURLE_UNSUPPORTED_PROTOCOL:
  ------------------
  |  Branch (41:3): [True: 0, False: 229]
  ------------------
   42|      0|    return "Unsupported protocol";
   43|       |
   44|      0|  case CURLE_FAILED_INIT:
  ------------------
  |  Branch (44:3): [True: 0, False: 229]
  ------------------
   45|      0|    return "Failed initialization";
   46|       |
   47|      0|  case CURLE_URL_MALFORMAT:
  ------------------
  |  Branch (47:3): [True: 0, False: 229]
  ------------------
   48|      0|    return "URL using bad/illegal format or missing URL";
   49|       |
   50|      0|  case CURLE_NOT_BUILT_IN:
  ------------------
  |  Branch (50:3): [True: 0, False: 229]
  ------------------
   51|      0|    return "A requested feature, protocol or option was not found built-in in"
   52|      0|           " this libcurl due to a build-time decision.";
   53|       |
   54|      0|  case CURLE_COULDNT_RESOLVE_PROXY:
  ------------------
  |  Branch (54:3): [True: 0, False: 229]
  ------------------
   55|      0|    return "Could not resolve proxy name";
   56|       |
   57|      0|  case CURLE_COULDNT_RESOLVE_HOST:
  ------------------
  |  Branch (57:3): [True: 0, False: 229]
  ------------------
   58|      0|    return "Could not resolve hostname";
   59|       |
   60|     75|  case CURLE_COULDNT_CONNECT:
  ------------------
  |  Branch (60:3): [True: 75, False: 154]
  ------------------
   61|     75|    return "Could not connect to server";
   62|       |
   63|      0|  case CURLE_WEIRD_SERVER_REPLY:
  ------------------
  |  Branch (63:3): [True: 0, False: 229]
  ------------------
   64|      0|    return "Weird server reply";
   65|       |
   66|      0|  case CURLE_REMOTE_ACCESS_DENIED:
  ------------------
  |  Branch (66:3): [True: 0, False: 229]
  ------------------
   67|      0|    return "Access denied to remote resource";
   68|       |
   69|      0|  case CURLE_FTP_ACCEPT_FAILED:
  ------------------
  |  Branch (69:3): [True: 0, False: 229]
  ------------------
   70|      0|    return "FTP: The server failed to connect to data port";
   71|       |
   72|      0|  case CURLE_FTP_ACCEPT_TIMEOUT:
  ------------------
  |  Branch (72:3): [True: 0, False: 229]
  ------------------
   73|      0|    return "FTP: Accepting server connect has timed out";
   74|       |
   75|      0|  case CURLE_FTP_PRET_FAILED:
  ------------------
  |  Branch (75:3): [True: 0, False: 229]
  ------------------
   76|      0|    return "FTP: The server did not accept the PRET command.";
   77|       |
   78|      0|  case CURLE_FTP_WEIRD_PASS_REPLY:
  ------------------
  |  Branch (78:3): [True: 0, False: 229]
  ------------------
   79|      0|    return "FTP: unknown PASS reply";
   80|       |
   81|      0|  case CURLE_FTP_WEIRD_PASV_REPLY:
  ------------------
  |  Branch (81:3): [True: 0, False: 229]
  ------------------
   82|      0|    return "FTP: unknown PASV reply";
   83|       |
   84|      0|  case CURLE_FTP_WEIRD_227_FORMAT:
  ------------------
  |  Branch (84:3): [True: 0, False: 229]
  ------------------
   85|      0|    return "FTP: unknown 227 response format";
   86|       |
   87|      0|  case CURLE_FTP_CANT_GET_HOST:
  ------------------
  |  Branch (87:3): [True: 0, False: 229]
  ------------------
   88|      0|    return "FTP: cannot figure out the host in the PASV response";
   89|       |
   90|      0|  case CURLE_HTTP2:
  ------------------
  |  Branch (90:3): [True: 0, False: 229]
  ------------------
   91|      0|    return "Error in the HTTP2 framing layer";
   92|       |
   93|      0|  case CURLE_FTP_COULDNT_SET_TYPE:
  ------------------
  |  Branch (93:3): [True: 0, False: 229]
  ------------------
   94|      0|    return "FTP: could not set file type";
   95|       |
   96|      0|  case CURLE_PARTIAL_FILE:
  ------------------
  |  Branch (96:3): [True: 0, False: 229]
  ------------------
   97|      0|    return "Transferred a partial file";
   98|       |
   99|      0|  case CURLE_FTP_COULDNT_RETR_FILE:
  ------------------
  |  Branch (99:3): [True: 0, False: 229]
  ------------------
  100|      0|    return "FTP: could not retrieve (RETR failed) the specified file";
  101|       |
  102|      0|  case CURLE_QUOTE_ERROR:
  ------------------
  |  Branch (102:3): [True: 0, False: 229]
  ------------------
  103|      0|    return "Quote command returned error";
  104|       |
  105|      0|  case CURLE_HTTP_RETURNED_ERROR:
  ------------------
  |  Branch (105:3): [True: 0, False: 229]
  ------------------
  106|      0|    return "HTTP response code said error";
  107|       |
  108|      0|  case CURLE_WRITE_ERROR:
  ------------------
  |  Branch (108:3): [True: 0, False: 229]
  ------------------
  109|      0|    return "Failed writing received data to disk/application";
  110|       |
  111|      0|  case CURLE_UPLOAD_FAILED:
  ------------------
  |  Branch (111:3): [True: 0, False: 229]
  ------------------
  112|      0|    return "Upload failed (at start/before it took off)";
  113|       |
  114|      0|  case CURLE_READ_ERROR:
  ------------------
  |  Branch (114:3): [True: 0, False: 229]
  ------------------
  115|      0|    return "Failed to open/read local data from file/application";
  116|       |
  117|      0|  case CURLE_OUT_OF_MEMORY:
  ------------------
  |  Branch (117:3): [True: 0, False: 229]
  ------------------
  118|      0|    return "Out of memory";
  119|       |
  120|      0|  case CURLE_OPERATION_TIMEDOUT:
  ------------------
  |  Branch (120:3): [True: 0, False: 229]
  ------------------
  121|      0|    return "Timeout was reached";
  122|       |
  123|      0|  case CURLE_FTP_PORT_FAILED:
  ------------------
  |  Branch (123:3): [True: 0, False: 229]
  ------------------
  124|      0|    return "FTP: command PORT failed";
  125|       |
  126|      0|  case CURLE_FTP_COULDNT_USE_REST:
  ------------------
  |  Branch (126:3): [True: 0, False: 229]
  ------------------
  127|      0|    return "FTP: command REST failed";
  128|       |
  129|      0|  case CURLE_RANGE_ERROR:
  ------------------
  |  Branch (129:3): [True: 0, False: 229]
  ------------------
  130|      0|    return "Requested range was not delivered by the server";
  131|       |
  132|      0|  case CURLE_SSL_CONNECT_ERROR:
  ------------------
  |  Branch (132:3): [True: 0, False: 229]
  ------------------
  133|      0|    return "SSL connect error";
  134|       |
  135|      0|  case CURLE_BAD_DOWNLOAD_RESUME:
  ------------------
  |  Branch (135:3): [True: 0, False: 229]
  ------------------
  136|      0|    return "Could not resume download";
  137|       |
  138|      0|  case CURLE_FILE_COULDNT_READ_FILE:
  ------------------
  |  Branch (138:3): [True: 0, False: 229]
  ------------------
  139|      0|    return "Could not read a file:// file";
  140|       |
  141|      0|  case CURLE_LDAP_CANNOT_BIND:
  ------------------
  |  Branch (141:3): [True: 0, False: 229]
  ------------------
  142|      0|    return "LDAP: cannot bind";
  143|       |
  144|      0|  case CURLE_LDAP_SEARCH_FAILED:
  ------------------
  |  Branch (144:3): [True: 0, False: 229]
  ------------------
  145|      0|    return "LDAP: search failed";
  146|       |
  147|      0|  case CURLE_ABORTED_BY_CALLBACK:
  ------------------
  |  Branch (147:3): [True: 0, False: 229]
  ------------------
  148|      0|    return "Operation was aborted by an application callback";
  149|       |
  150|      2|  case CURLE_BAD_FUNCTION_ARGUMENT:
  ------------------
  |  Branch (150:3): [True: 2, False: 227]
  ------------------
  151|      2|    return "A libcurl function was given a bad argument";
  152|       |
  153|    152|  case CURLE_INTERFACE_FAILED:
  ------------------
  |  Branch (153:3): [True: 152, False: 77]
  ------------------
  154|    152|    return "Failed binding local connection end";
  155|       |
  156|      0|  case CURLE_TOO_MANY_REDIRECTS:
  ------------------
  |  Branch (156:3): [True: 0, False: 229]
  ------------------
  157|      0|    return "Number of redirects hit maximum amount";
  158|       |
  159|      0|  case CURLE_UNKNOWN_OPTION:
  ------------------
  |  Branch (159:3): [True: 0, False: 229]
  ------------------
  160|      0|    return "An unknown option was passed in to libcurl";
  161|       |
  162|      0|  case CURLE_SETOPT_OPTION_SYNTAX:
  ------------------
  |  Branch (162:3): [True: 0, False: 229]
  ------------------
  163|      0|    return "Malformed option provided in a setopt";
  164|       |
  165|      0|  case CURLE_GOT_NOTHING:
  ------------------
  |  Branch (165:3): [True: 0, False: 229]
  ------------------
  166|      0|    return "Server returned nothing (no headers, no data)";
  167|       |
  168|      0|  case CURLE_SSL_ENGINE_NOTFOUND:
  ------------------
  |  Branch (168:3): [True: 0, False: 229]
  ------------------
  169|      0|    return "SSL crypto engine not found";
  170|       |
  171|      0|  case CURLE_SSL_ENGINE_SETFAILED:
  ------------------
  |  Branch (171:3): [True: 0, False: 229]
  ------------------
  172|      0|    return "Can not set SSL crypto engine as default";
  173|       |
  174|      0|  case CURLE_SSL_ENGINE_INITFAILED:
  ------------------
  |  Branch (174:3): [True: 0, False: 229]
  ------------------
  175|      0|    return "Failed to initialize SSL crypto engine";
  176|       |
  177|      0|  case CURLE_SEND_ERROR:
  ------------------
  |  Branch (177:3): [True: 0, False: 229]
  ------------------
  178|      0|    return "Failed sending data to the peer";
  179|       |
  180|      0|  case CURLE_RECV_ERROR:
  ------------------
  |  Branch (180:3): [True: 0, False: 229]
  ------------------
  181|      0|    return "Failure when receiving data from the peer";
  182|       |
  183|      0|  case CURLE_SSL_CERTPROBLEM:
  ------------------
  |  Branch (183:3): [True: 0, False: 229]
  ------------------
  184|      0|    return "Problem with the local SSL certificate";
  185|       |
  186|      0|  case CURLE_SSL_CIPHER:
  ------------------
  |  Branch (186:3): [True: 0, False: 229]
  ------------------
  187|      0|    return "Could not use specified SSL cipher";
  188|       |
  189|      0|  case CURLE_PEER_FAILED_VERIFICATION:
  ------------------
  |  Branch (189:3): [True: 0, False: 229]
  ------------------
  190|      0|    return "SSL peer certificate or SSH remote key was not OK";
  191|       |
  192|      0|  case CURLE_SSL_CACERT_BADFILE:
  ------------------
  |  Branch (192:3): [True: 0, False: 229]
  ------------------
  193|      0|    return "Problem with the SSL CA cert (path? access rights?)";
  194|       |
  195|      0|  case CURLE_BAD_CONTENT_ENCODING:
  ------------------
  |  Branch (195:3): [True: 0, False: 229]
  ------------------
  196|      0|    return "Unrecognized or bad HTTP Content or Transfer-Encoding";
  197|       |
  198|      0|  case CURLE_FILESIZE_EXCEEDED:
  ------------------
  |  Branch (198:3): [True: 0, False: 229]
  ------------------
  199|      0|    return "Maximum file size exceeded";
  200|       |
  201|      0|  case CURLE_USE_SSL_FAILED:
  ------------------
  |  Branch (201:3): [True: 0, False: 229]
  ------------------
  202|      0|    return "Requested SSL level failed";
  203|       |
  204|      0|  case CURLE_SSL_SHUTDOWN_FAILED:
  ------------------
  |  Branch (204:3): [True: 0, False: 229]
  ------------------
  205|      0|    return "Failed to shut down the SSL connection";
  206|       |
  207|      0|  case CURLE_SSL_CRL_BADFILE:
  ------------------
  |  Branch (207:3): [True: 0, False: 229]
  ------------------
  208|      0|    return "Failed to load CRL file (path? access rights?, format?)";
  209|       |
  210|      0|  case CURLE_SSL_ISSUER_ERROR:
  ------------------
  |  Branch (210:3): [True: 0, False: 229]
  ------------------
  211|      0|    return "Issuer check against peer certificate failed";
  212|       |
  213|      0|  case CURLE_SEND_FAIL_REWIND:
  ------------------
  |  Branch (213:3): [True: 0, False: 229]
  ------------------
  214|      0|    return "Send failed since rewinding of the data stream failed";
  215|       |
  216|      0|  case CURLE_LOGIN_DENIED:
  ------------------
  |  Branch (216:3): [True: 0, False: 229]
  ------------------
  217|      0|    return "Login denied";
  218|       |
  219|      0|  case CURLE_TFTP_NOTFOUND:
  ------------------
  |  Branch (219:3): [True: 0, False: 229]
  ------------------
  220|      0|    return "TFTP: File Not Found";
  221|       |
  222|      0|  case CURLE_TFTP_PERM:
  ------------------
  |  Branch (222:3): [True: 0, False: 229]
  ------------------
  223|      0|    return "TFTP: Access Violation";
  224|       |
  225|      0|  case CURLE_REMOTE_DISK_FULL:
  ------------------
  |  Branch (225:3): [True: 0, False: 229]
  ------------------
  226|      0|    return "Disk full or allocation exceeded";
  227|       |
  228|      0|  case CURLE_TFTP_ILLEGAL:
  ------------------
  |  Branch (228:3): [True: 0, False: 229]
  ------------------
  229|      0|    return "TFTP: Illegal operation";
  230|       |
  231|      0|  case CURLE_TFTP_UNKNOWNID:
  ------------------
  |  Branch (231:3): [True: 0, False: 229]
  ------------------
  232|      0|    return "TFTP: Unknown transfer ID";
  233|       |
  234|      0|  case CURLE_REMOTE_FILE_EXISTS:
  ------------------
  |  Branch (234:3): [True: 0, False: 229]
  ------------------
  235|      0|    return "Remote file already exists";
  236|       |
  237|      0|  case CURLE_TFTP_NOSUCHUSER:
  ------------------
  |  Branch (237:3): [True: 0, False: 229]
  ------------------
  238|      0|    return "TFTP: No such user";
  239|       |
  240|      0|  case CURLE_REMOTE_FILE_NOT_FOUND:
  ------------------
  |  Branch (240:3): [True: 0, False: 229]
  ------------------
  241|      0|    return "Remote file not found";
  242|       |
  243|      0|  case CURLE_SSH:
  ------------------
  |  Branch (243:3): [True: 0, False: 229]
  ------------------
  244|      0|    return "Error in the SSH layer";
  245|       |
  246|      0|  case CURLE_AGAIN:
  ------------------
  |  Branch (246:3): [True: 0, False: 229]
  ------------------
  247|      0|    return "Socket not ready for send/recv";
  248|       |
  249|      0|  case CURLE_RTSP_CSEQ_ERROR:
  ------------------
  |  Branch (249:3): [True: 0, False: 229]
  ------------------
  250|      0|    return "RTSP CSeq mismatch or invalid CSeq";
  251|       |
  252|      0|  case CURLE_RTSP_SESSION_ERROR:
  ------------------
  |  Branch (252:3): [True: 0, False: 229]
  ------------------
  253|      0|    return "RTSP session error";
  254|       |
  255|      0|  case CURLE_FTP_BAD_FILE_LIST:
  ------------------
  |  Branch (255:3): [True: 0, False: 229]
  ------------------
  256|      0|    return "Unable to parse FTP file list";
  257|       |
  258|      0|  case CURLE_CHUNK_FAILED:
  ------------------
  |  Branch (258:3): [True: 0, False: 229]
  ------------------
  259|      0|    return "Chunk callback failed";
  260|       |
  261|      0|  case CURLE_NO_CONNECTION_AVAILABLE:
  ------------------
  |  Branch (261:3): [True: 0, False: 229]
  ------------------
  262|      0|    return "The max connection limit is reached";
  263|       |
  264|      0|  case CURLE_SSL_PINNEDPUBKEYNOTMATCH:
  ------------------
  |  Branch (264:3): [True: 0, False: 229]
  ------------------
  265|      0|    return "SSL public key does not match pinned public key";
  266|       |
  267|      0|  case CURLE_SSL_INVALIDCERTSTATUS:
  ------------------
  |  Branch (267:3): [True: 0, False: 229]
  ------------------
  268|      0|    return "SSL server certificate status verification FAILED";
  269|       |
  270|      0|  case CURLE_HTTP2_STREAM:
  ------------------
  |  Branch (270:3): [True: 0, False: 229]
  ------------------
  271|      0|    return "Stream error in the HTTP/2 framing layer";
  272|       |
  273|      0|  case CURLE_RECURSIVE_API_CALL:
  ------------------
  |  Branch (273:3): [True: 0, False: 229]
  ------------------
  274|      0|    return "API function called from within callback";
  275|       |
  276|      0|  case CURLE_AUTH_ERROR:
  ------------------
  |  Branch (276:3): [True: 0, False: 229]
  ------------------
  277|      0|    return "An authentication function returned an error";
  278|       |
  279|      0|  case CURLE_HTTP3:
  ------------------
  |  Branch (279:3): [True: 0, False: 229]
  ------------------
  280|      0|    return "HTTP/3 error";
  281|       |
  282|      0|  case CURLE_QUIC_CONNECT_ERROR:
  ------------------
  |  Branch (282:3): [True: 0, False: 229]
  ------------------
  283|      0|    return "QUIC connection error";
  284|       |
  285|      0|  case CURLE_PROXY:
  ------------------
  |  Branch (285:3): [True: 0, False: 229]
  ------------------
  286|      0|    return "proxy handshake error";
  287|       |
  288|      0|  case CURLE_SSL_CLIENTCERT:
  ------------------
  |  Branch (288:3): [True: 0, False: 229]
  ------------------
  289|      0|    return "SSL Client Certificate required";
  290|       |
  291|      0|  case CURLE_UNRECOVERABLE_POLL:
  ------------------
  |  Branch (291:3): [True: 0, False: 229]
  ------------------
  292|      0|    return "Unrecoverable error in select/poll";
  293|       |
  294|      0|  case CURLE_TOO_LARGE:
  ------------------
  |  Branch (294:3): [True: 0, False: 229]
  ------------------
  295|      0|    return "A value or data field grew larger than allowed";
  296|       |
  297|      0|  case CURLE_ECH_REQUIRED:
  ------------------
  |  Branch (297:3): [True: 0, False: 229]
  ------------------
  298|      0|    return "ECH attempted but failed";
  299|       |
  300|       |    /* error codes not used by current libcurl */
  301|      0|  default:
  ------------------
  |  Branch (301:3): [True: 0, False: 229]
  ------------------
  302|      0|    break;
  303|    229|  }
  304|       |  /*
  305|       |   * By using a switch, gcc -Wall will complain about enum values
  306|       |   * which do not appear, helping keep this function up-to-date.
  307|       |   * By using gcc -Wall -Werror, you cannot forget.
  308|       |   *
  309|       |   * A table would not have the same benefit. Most compilers will generate
  310|       |   * code similar to a table in any case, so there is little performance gain
  311|       |   * from a table. Something is broken for the user's application, anyways, so
  312|       |   * does it matter how fast it _does not_ work?
  313|       |   *
  314|       |   * The line number for the error will be near this comment, which is why it
  315|       |   * is here, and not at the start of the switch.
  316|       |   */
  317|      0|  return "Unknown error";
  318|       |#else
  319|       |  if(!error)
  320|       |    return "No error";
  321|       |  else
  322|       |    return "Error";
  323|       |#endif
  324|    229|}
curl_url_strerror:
  421|    845|{
  422|    845|#ifdef CURLVERBOSE
  423|    845|  switch(error) {
  ------------------
  |  Branch (423:10): [True: 845, False: 0]
  ------------------
  424|      0|  case CURLUE_OK:
  ------------------
  |  Branch (424:3): [True: 0, False: 845]
  ------------------
  425|      0|    return "No error";
  426|       |
  427|      0|  case CURLUE_BAD_HANDLE:
  ------------------
  |  Branch (427:3): [True: 0, False: 845]
  ------------------
  428|      0|    return "An invalid CURLU pointer was passed as argument";
  429|       |
  430|      0|  case CURLUE_BAD_PARTPOINTER:
  ------------------
  |  Branch (430:3): [True: 0, False: 845]
  ------------------
  431|      0|    return "An invalid 'part' argument was passed as argument";
  432|       |
  433|    331|  case CURLUE_MALFORMED_INPUT:
  ------------------
  |  Branch (433:3): [True: 331, False: 514]
  ------------------
  434|    331|    return "Malformed input to a URL function";
  435|       |
  436|     34|  case CURLUE_BAD_PORT_NUMBER:
  ------------------
  |  Branch (436:3): [True: 34, False: 811]
  ------------------
  437|     34|    return "Port number was not a decimal number between 0 and 65535";
  438|       |
  439|      0|  case CURLUE_UNSUPPORTED_SCHEME:
  ------------------
  |  Branch (439:3): [True: 0, False: 845]
  ------------------
  440|      0|    return "Unsupported URL scheme";
  441|       |
  442|      0|  case CURLUE_URLDECODE:
  ------------------
  |  Branch (442:3): [True: 0, False: 845]
  ------------------
  443|      0|    return "URL decode error, most likely because of rubbish in the input";
  444|       |
  445|      0|  case CURLUE_OUT_OF_MEMORY:
  ------------------
  |  Branch (445:3): [True: 0, False: 845]
  ------------------
  446|      0|    return "A memory function failed";
  447|       |
  448|      1|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (448:3): [True: 1, False: 844]
  ------------------
  449|      1|    return "Credentials was passed in the URL when prohibited";
  450|       |
  451|      0|  case CURLUE_UNKNOWN_PART:
  ------------------
  |  Branch (451:3): [True: 0, False: 845]
  ------------------
  452|      0|    return "An unknown part ID was passed to a URL API function";
  453|       |
  454|      0|  case CURLUE_NO_SCHEME:
  ------------------
  |  Branch (454:3): [True: 0, False: 845]
  ------------------
  455|      0|    return "No scheme present";
  456|       |
  457|      0|  case CURLUE_NO_USER:
  ------------------
  |  Branch (457:3): [True: 0, False: 845]
  ------------------
  458|      0|    return "No user present";
  459|       |
  460|      0|  case CURLUE_NO_PASSWORD:
  ------------------
  |  Branch (460:3): [True: 0, False: 845]
  ------------------
  461|      0|    return "No password present";
  462|       |
  463|      0|  case CURLUE_NO_OPTIONS:
  ------------------
  |  Branch (463:3): [True: 0, False: 845]
  ------------------
  464|      0|    return "No options present";
  465|       |
  466|    175|  case CURLUE_NO_HOST:
  ------------------
  |  Branch (466:3): [True: 175, False: 670]
  ------------------
  467|    175|    return "No host present";
  468|       |
  469|      0|  case CURLUE_NO_PORT:
  ------------------
  |  Branch (469:3): [True: 0, False: 845]
  ------------------
  470|      0|    return "No port number present";
  471|       |
  472|      0|  case CURLUE_NO_QUERY:
  ------------------
  |  Branch (472:3): [True: 0, False: 845]
  ------------------
  473|      0|    return "No query present";
  474|       |
  475|      0|  case CURLUE_NO_FRAGMENT:
  ------------------
  |  Branch (475:3): [True: 0, False: 845]
  ------------------
  476|      0|    return "No fragment present";
  477|       |
  478|      0|  case CURLUE_NO_ZONEID:
  ------------------
  |  Branch (478:3): [True: 0, False: 845]
  ------------------
  479|      0|    return "No zoneid present";
  480|       |
  481|      0|  case CURLUE_BAD_LOGIN:
  ------------------
  |  Branch (481:3): [True: 0, False: 845]
  ------------------
  482|      0|    return "Bad login";
  483|       |
  484|    105|  case CURLUE_BAD_IPV6:
  ------------------
  |  Branch (484:3): [True: 105, False: 740]
  ------------------
  485|    105|    return "Bad IPv6 address";
  486|       |
  487|    144|  case CURLUE_BAD_HOSTNAME:
  ------------------
  |  Branch (487:3): [True: 144, False: 701]
  ------------------
  488|    144|    return "Bad hostname";
  489|       |
  490|     49|  case CURLUE_BAD_FILE_URL:
  ------------------
  |  Branch (490:3): [True: 49, False: 796]
  ------------------
  491|     49|    return "Bad file:// URL";
  492|       |
  493|      3|  case CURLUE_BAD_SLASHES:
  ------------------
  |  Branch (493:3): [True: 3, False: 842]
  ------------------
  494|      3|    return "Unsupported number of slashes following scheme";
  495|       |
  496|      0|  case CURLUE_BAD_SCHEME:
  ------------------
  |  Branch (496:3): [True: 0, False: 845]
  ------------------
  497|      0|    return "Bad scheme";
  498|       |
  499|      0|  case CURLUE_BAD_PATH:
  ------------------
  |  Branch (499:3): [True: 0, False: 845]
  ------------------
  500|      0|    return "Bad path";
  501|       |
  502|      0|  case CURLUE_BAD_FRAGMENT:
  ------------------
  |  Branch (502:3): [True: 0, False: 845]
  ------------------
  503|      0|    return "Bad fragment";
  504|       |
  505|      0|  case CURLUE_BAD_QUERY:
  ------------------
  |  Branch (505:3): [True: 0, False: 845]
  ------------------
  506|      0|    return "Bad query";
  507|       |
  508|      0|  case CURLUE_BAD_PASSWORD:
  ------------------
  |  Branch (508:3): [True: 0, False: 845]
  ------------------
  509|      0|    return "Bad password";
  510|       |
  511|      0|  case CURLUE_BAD_USER:
  ------------------
  |  Branch (511:3): [True: 0, False: 845]
  ------------------
  512|      0|    return "Bad user";
  513|       |
  514|      0|  case CURLUE_LACKS_IDN:
  ------------------
  |  Branch (514:3): [True: 0, False: 845]
  ------------------
  515|      0|    return "libcurl lacks IDN support";
  516|       |
  517|      0|  case CURLUE_TOO_LARGE:
  ------------------
  |  Branch (517:3): [True: 0, False: 845]
  ------------------
  518|      0|    return "A value or data field is larger than allowed";
  519|       |
  520|      3|  case CURLUE_BACKSLASH:
  ------------------
  |  Branch (520:3): [True: 3, False: 842]
  ------------------
  521|      3|    return "Found a backslash where a forward slash was expected";
  522|       |
  523|      0|  case CURLUE_LAST:
  ------------------
  |  Branch (523:3): [True: 0, False: 845]
  ------------------
  524|      0|    break;
  525|    845|  }
  526|       |
  527|      0|  return "CURLUcode unknown";
  528|       |#else
  529|       |  if(error == CURLUE_OK)
  530|       |    return "No error";
  531|       |  else
  532|       |    return "Error";
  533|       |#endif
  534|    845|}

Curl_thrdpool_set_props:
  283|  11.7k|{
  284|  11.7k|  CURLcode result = CURLE_OK;
  285|  11.7k|  size_t running;
  286|       |
  287|  11.7k|  if(!max_threads || (min_threads > max_threads))
  ------------------
  |  Branch (287:6): [True: 0, False: 11.7k]
  |  Branch (287:22): [True: 0, False: 11.7k]
  ------------------
  288|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  289|       |
  290|  11.7k|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   37|  11.7k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  291|  11.7k|  tpool->min_threads = min_threads;
  292|  11.7k|  tpool->max_threads = max_threads;
  293|  11.7k|  tpool->idle_time_ms = idle_time_ms;
  294|  11.7k|  running = Curl_llist_count(&tpool->slots);
  295|  11.7k|  if(tpool->min_threads > running) {
  ------------------
  |  Branch (295:6): [True: 0, False: 11.7k]
  ------------------
  296|      0|    result = thrdpool_signal(tpool, tpool->min_threads - (uint32_t)running);
  297|      0|  }
  298|  11.7k|  Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   38|  11.7k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  299|       |
  300|  11.7k|  return result;
  301|  11.7k|}
Curl_thrdpool_create:
  312|  11.7k|{
  313|  11.7k|  struct curl_thrdpool *tpool;
  314|  11.7k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  315|       |
  316|  11.7k|  tpool = curlx_calloc(1, sizeof(*tpool));
  ------------------
  |  | 1475|  11.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  317|  11.7k|  if(!tpool)
  ------------------
  |  Branch (317:6): [True: 0, False: 11.7k]
  ------------------
  318|      0|    goto out;
  319|  11.7k|  tpool->refcount = 1;
  320|       |
  321|  11.7k|  Curl_mutex_init(&tpool->lock);
  ------------------
  |  |   36|  11.7k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  322|  11.7k|  Curl_cond_init(&tpool->await);
  ------------------
  |  |   41|  11.7k|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  323|  11.7k|  Curl_llist_init(&tpool->slots, NULL);
  324|  11.7k|  Curl_llist_init(&tpool->zombies, NULL);
  325|  11.7k|  tpool->fn_take = fn_take;
  326|  11.7k|  tpool->fn_process = fn_process;
  327|  11.7k|  tpool->fn_return = fn_return;
  328|  11.7k|  tpool->fn_user_data = user_data;
  329|       |
  330|  11.7k|  tpool->name = curlx_strdup(name);
  ------------------
  |  | 1472|  11.7k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  331|  11.7k|  if(!tpool->name)
  ------------------
  |  Branch (331:6): [True: 0, False: 11.7k]
  ------------------
  332|      0|    goto out;
  333|       |
  334|  11.7k|#ifdef DEBUGBUILD
  335|  11.7k|  {
  336|  11.7k|    const char *p = getenv("CURL_DBG_THRDPOOL_FAIL_STARTS");
  337|  11.7k|    if(p) {
  ------------------
  |  Branch (337:8): [True: 0, False: 11.7k]
  ------------------
  338|      0|      curl_off_t l;
  339|      0|      if(!curlx_str_number(&p, &l, INT_MAX))
  ------------------
  |  Branch (339:10): [True: 0, False: 0]
  ------------------
  340|      0|        tpool->dbg_fail_starts = (int)l;
  341|      0|    }
  342|  11.7k|  }
  343|  11.7k|#endif
  344|       |
  345|  11.7k|  result = Curl_thrdpool_set_props(tpool, min_threads, max_threads,
  346|  11.7k|                                   idle_time_ms);
  347|       |
  348|  11.7k|out:
  349|  11.7k|  if(result && tpool) {
  ------------------
  |  Branch (349:6): [True: 0, False: 11.7k]
  |  Branch (349:16): [True: 0, False: 0]
  ------------------
  350|      0|    tpool->aborted = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  351|      0|    thrdpool_unlink(tpool, FALSE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  352|       |    tpool = NULL;
  353|      0|  }
  354|  11.7k|  *ptpool = tpool;
  355|  11.7k|  return result;
  356|  11.7k|}
Curl_thrdpool_destroy:
  359|  11.7k|{
  360|  11.7k|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   37|  11.7k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  361|       |
  362|  11.7k|  tpool->aborted = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  363|       |
  364|  12.5k|  while(join && Curl_llist_count(&tpool->slots)) {
  ------------------
  |  Branch (364:9): [True: 12.5k, False: 0]
  |  Branch (364:17): [True: 761, False: 11.7k]
  ------------------
  365|    761|    thrdpool_wake_all(tpool);
  366|    761|    Curl_cond_wait(&tpool->await, &tpool->lock);
  367|    761|  }
  368|       |
  369|  11.7k|  thrdpool_join_zombies(tpool);
  370|       |
  371|       |  /* detach all still running threads */
  372|  11.7k|  if(Curl_llist_count(&tpool->slots)) {
  ------------------
  |  Branch (372:6): [True: 0, False: 11.7k]
  ------------------
  373|      0|    struct Curl_llist_node *e;
  374|      0|    for(e = Curl_llist_head(&tpool->slots); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (374:45): [True: 0, False: 0]
  ------------------
  375|      0|      struct thrdslot *tslot = Curl_node_elem(e);
  376|      0|      if(tslot->thread != curl_thread_t_null)
  ------------------
  |  |   35|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (376:10): [True: 0, False: 0]
  ------------------
  377|      0|        Curl_thread_destroy(&tslot->thread);
  378|      0|    }
  379|      0|    tpool->detached = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  380|      0|  }
  381|       |
  382|  11.7k|  if(!thrdpool_unlink(tpool, TRUE)) {
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  |  Branch (382:6): [True: 0, False: 11.7k]
  ------------------
  383|       |    /* tpool not destroyed */
  384|      0|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   38|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  385|      0|  }
  386|  11.7k|}
Curl_thrdpool_signal:
  389|   125k|{
  390|   125k|  CURLcode result;
  391|       |
  392|   125k|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   37|   125k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  393|   125k|  result = thrdpool_signal(tpool, nthreads);
  394|   125k|  Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   38|   125k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  395|   125k|  return result;
  396|   125k|}
thrdpool.c:thrdpool_signal:
  248|   125k|{
  249|   125k|  struct Curl_llist_node *e, *n;
  250|   125k|  CURLcode result = CURLE_OK;
  251|       |
  252|   125k|  DEBUGASSERT(!tpool->aborted);
  ------------------
  |  | 1079|   125k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (252:3): [True: 0, False: 125k]
  |  Branch (252:3): [True: 125k, False: 0]
  ------------------
  253|   125k|  thrdpool_join_zombies(tpool);
  254|       |
  255|   250k|  for(e = Curl_llist_head(&tpool->slots); e && nthreads; e = n) {
  ------------------
  |  Branch (255:43): [True: 139k, False: 111k]
  |  Branch (255:48): [True: 125k, False: 14.3k]
  ------------------
  256|   125k|    struct thrdslot *tslot = Curl_node_elem(e);
  257|   125k|    n = Curl_node_next(e);
  258|   125k|    if(tslot->idle) {
  ------------------
  |  Branch (258:8): [True: 17.8k, False: 107k]
  ------------------
  259|  17.8k|      Curl_cond_signal(&tslot->await);
  260|  17.8k|      --nthreads;
  261|  17.8k|    }
  262|   107k|    else if(!tslot->starttime.tv_sec && !tslot->starttime.tv_usec) {
  ------------------
  |  Branch (262:13): [True: 107k, False: 220]
  |  Branch (262:41): [True: 107k, False: 0]
  ------------------
  263|       |      /* starting thread, queries for work soon. */
  264|   107k|      --nthreads;
  265|   107k|    }
  266|   125k|  }
  267|       |
  268|   126k|  while(nthreads && !result &&
  ------------------
  |  Branch (268:9): [True: 889, False: 125k]
  |  Branch (268:21): [True: 889, False: 0]
  ------------------
  269|    889|        Curl_llist_count(&tpool->slots) < tpool->max_threads) {
  ------------------
  |  Branch (269:9): [True: 889, False: 0]
  ------------------
  270|    889|    result = thrdslot_start(tpool);
  271|    889|    if(result)
  ------------------
  |  Branch (271:8): [True: 0, False: 889]
  ------------------
  272|      0|      break;
  273|    889|    --nthreads;
  274|    889|  }
  275|       |
  276|   125k|  return result;
  277|   125k|}
thrdpool.c:thrdslot_start:
  159|    889|{
  160|    889|  struct thrdslot *tslot;
  161|    889|  CURLcode result = CURLE_OUT_OF_MEMORY;
  162|       |
  163|    889|  tslot = curlx_calloc(1, sizeof(*tslot));
  ------------------
  |  | 1475|    889|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  164|    889|  if(!tslot)
  ------------------
  |  Branch (164:6): [True: 0, False: 889]
  ------------------
  165|      0|    goto out;
  166|    889|  tslot->id = tpool->next_id++;
  167|    889|  tslot->tpool = tpool;
  168|    889|  tslot->thread = curl_thread_t_null;
  ------------------
  |  |   35|    889|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  169|    889|  Curl_cond_init(&tslot->await);
  ------------------
  |  |   41|    889|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  170|       |
  171|    889|  tpool->refcount++;
  172|    889|  tslot->running = TRUE;
  ------------------
  |  | 1053|    889|#define TRUE true
  ------------------
  173|    889|#ifdef DEBUGBUILD
  174|    889|  if(tpool->dbg_fail_starts > 0) {
  ------------------
  |  Branch (174:6): [True: 0, False: 889]
  ------------------
  175|      0|    --tpool->dbg_fail_starts;
  176|      0|    tslot->thread = curl_thread_t_null;
  ------------------
  |  |   35|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  177|      0|  }
  178|    889|  else
  179|    889|#endif
  180|    889|    tslot->thread = Curl_thread_create(thrdslot_run, tslot);
  181|    889|  if(tslot->thread == curl_thread_t_null) { /* never started */
  ------------------
  |  |   35|    889|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (181:6): [True: 0, False: 889]
  ------------------
  182|      0|    tslot->running = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  183|      0|    thrdpool_unlink(tpool, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  184|      0|    result = CURLE_FAILED_INIT;
  185|      0|    goto out;
  186|      0|  }
  187|       |
  188|    889|  Curl_llist_append(&tpool->slots, tslot, &tslot->node);
  189|    889|  tslot = NULL;
  190|    889|  result = CURLE_OK;
  191|       |
  192|    889|out:
  193|    889|  if(tslot)
  ------------------
  |  Branch (193:6): [True: 0, False: 889]
  ------------------
  194|      0|    thrdslot_destroy(tslot);
  195|    889|  return result;
  196|    889|}
thrdpool.c:thrdslot_run:
   98|    889|{
   99|    889|  struct thrdslot *tslot = arg;
  100|    889|  struct curl_thrdpool *tpool = tslot->tpool;
  101|    889|  void *item;
  102|       |
  103|    889|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   37|    889|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  104|    889|  DEBUGASSERT(Curl_node_llist(&tslot->node) == &tpool->slots);
  ------------------
  |  | 1079|    889|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (104:3): [True: 0, False: 889]
  |  Branch (104:3): [True: 889, False: 0]
  ------------------
  105|  1.50k|  for(;;) {
  106|  2.31k|    while(!tpool->aborted) {
  ------------------
  |  Branch (106:11): [True: 1.42k, False: 889]
  ------------------
  107|  1.42k|      tslot->work_description = NULL;
  108|  1.42k|      tslot->work_timeout_ms = 0;
  109|  1.42k|      item = tpool->fn_take(tpool->fn_user_data, &tslot->work_description,
  110|  1.42k|                            &tslot->work_timeout_ms);
  111|  1.42k|      if(!item)
  ------------------
  |  Branch (111:10): [True: 612, False: 811]
  ------------------
  112|    612|        break;
  113|    811|      tslot->starttime = curlx_now();
  114|    811|      tslot->idle = FALSE;
  ------------------
  |  | 1056|    811|#define FALSE false
  ------------------
  115|    811|      Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   38|    811|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  116|       |
  117|    811|      tpool->fn_process(item);
  118|       |
  119|    811|      Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   37|    811|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  120|    811|      tslot->work_description = NULL;
  121|    811|      tpool->fn_return(item, tpool->aborted ? NULL : tpool->fn_user_data);
  ------------------
  |  Branch (121:30): [True: 298, False: 513]
  ------------------
  122|    811|    }
  123|       |
  124|  1.50k|    if(tpool->aborted ||
  ------------------
  |  Branch (124:8): [True: 889, False: 612]
  ------------------
  125|    612|       (Curl_llist_count(&tpool->slots) > tpool->max_threads))
  ------------------
  |  Branch (125:8): [True: 0, False: 612]
  ------------------
  126|    889|      goto out;
  127|       |
  128|    612|    tslot->idle = TRUE;
  ------------------
  |  | 1053|    612|#define TRUE true
  ------------------
  129|    612|    tslot->starttime = curlx_now();
  130|    612|    thrdpool_join_zombies(tpool);
  131|    612|    Curl_cond_signal(&tpool->await);
  132|       |    /* Only wait with idle timeout when we are above the minimum
  133|       |     * number of threads. Otherwise short idle timeouts will keep
  134|       |     * on activating threads that have no means to shut down. */
  135|    612|    if((tpool->idle_time_ms > 0) &&
  ------------------
  |  Branch (135:8): [True: 612, False: 0]
  ------------------
  136|    612|       (Curl_llist_count(&tpool->slots) > tpool->min_threads)) {
  ------------------
  |  Branch (136:8): [True: 612, False: 0]
  ------------------
  137|    612|      CURLcode result = Curl_cond_timedwait(&tslot->await, &tpool->lock,
  138|    612|                                            tpool->idle_time_ms);
  139|    612|      if((result == CURLE_OPERATION_TIMEDOUT) &&
  ------------------
  |  Branch (139:10): [True: 0, False: 612]
  ------------------
  140|      0|         (Curl_llist_count(&tpool->slots) > tpool->min_threads)) {
  ------------------
  |  Branch (140:10): [True: 0, False: 0]
  ------------------
  141|      0|        goto out;
  142|      0|      }
  143|    612|    }
  144|      0|    else {
  145|      0|      Curl_cond_wait(&tslot->await, &tpool->lock);
  146|      0|    }
  147|    612|  }
  148|       |
  149|    889|out:
  150|    889|  thrdslot_done(tslot);
  151|    889|  if(!thrdpool_unlink(tslot->tpool, TRUE)) {
  ------------------
  |  | 1053|    889|#define TRUE true
  ------------------
  |  Branch (151:6): [True: 889, False: 0]
  ------------------
  152|       |    /* tpool not destroyed */
  153|    889|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   38|    889|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  154|    889|  }
  155|    889|  return 0;
  156|    889|}
thrdpool.c:thrdslot_done:
   87|    889|{
   88|    889|  struct curl_thrdpool *tpool = tslot->tpool;
   89|       |
   90|    889|  DEBUGASSERT(Curl_node_llist(&tslot->node) == &tpool->slots);
  ------------------
  |  | 1079|    889|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (90:3): [True: 0, False: 889]
  |  Branch (90:3): [True: 889, False: 0]
  ------------------
   91|    889|  Curl_node_remove(&tslot->node);
   92|       |  tslot->running = FALSE;
  ------------------
  |  | 1056|    889|#define FALSE false
  ------------------
   93|    889|  Curl_llist_append(&tpool->zombies, tslot, &tslot->node);
   94|    889|  Curl_cond_signal(&tpool->await);
   95|    889|}
thrdpool.c:thrdslot_destroy:
   79|    889|{
   80|    889|  DEBUGASSERT(tslot->thread == curl_thread_t_null);
  ------------------
  |  | 1079|    889|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (80:3): [True: 0, False: 889]
  |  Branch (80:3): [True: 889, False: 0]
  ------------------
   81|    889|  DEBUGASSERT(!tslot->running);
  ------------------
  |  | 1079|    889|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (81:3): [True: 0, False: 889]
  |  Branch (81:3): [True: 889, False: 0]
  ------------------
   82|    889|  Curl_cond_destroy(&tslot->await);
  ------------------
  |  |   42|    889|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
   83|    889|  curlx_free(tslot);
  ------------------
  |  | 1478|    889|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   84|    889|}
thrdpool.c:thrdpool_unlink:
  227|  12.6k|{
  228|  12.6k|  DEBUGASSERT(tpool->refcount);
  ------------------
  |  | 1079|  12.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (228:3): [True: 0, False: 12.6k]
  |  Branch (228:3): [True: 12.6k, False: 0]
  ------------------
  229|  12.6k|  if(tpool->refcount)
  ------------------
  |  Branch (229:6): [True: 12.6k, False: 0]
  ------------------
  230|  12.6k|    tpool->refcount--;
  231|  12.6k|  if(tpool->refcount)
  ------------------
  |  Branch (231:6): [True: 889, False: 11.7k]
  ------------------
  232|    889|    return FALSE;
  ------------------
  |  | 1056|    889|#define FALSE false
  ------------------
  233|       |
  234|       |  /* no more references, free */
  235|  11.7k|  DEBUGASSERT(tpool->aborted);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (235:3): [True: 0, False: 11.7k]
  |  Branch (235:3): [True: 11.7k, False: 0]
  ------------------
  236|  11.7k|  thrdpool_join_zombies(tpool);
  237|  11.7k|  if(locked)
  ------------------
  |  Branch (237:6): [True: 11.7k, False: 0]
  ------------------
  238|  11.7k|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   38|  11.7k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  239|  11.7k|  curlx_free(tpool->name);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  240|  11.7k|  Curl_cond_destroy(&tpool->await);
  ------------------
  |  |   42|  11.7k|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
  241|  11.7k|  Curl_mutex_destroy(&tpool->lock);
  ------------------
  |  |   39|  11.7k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  242|  11.7k|  curlx_free(tpool);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  243|       |  return TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  244|  11.7k|}
thrdpool.c:thrdpool_wake_all:
  199|    761|{
  200|    761|  struct Curl_llist_node *e;
  201|  1.95k|  for(e = Curl_llist_head(&tpool->slots); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (201:43): [True: 1.19k, False: 761]
  ------------------
  202|  1.19k|    struct thrdslot *tslot = Curl_node_elem(e);
  203|  1.19k|    Curl_cond_signal(&tslot->await);
  204|  1.19k|  }
  205|    761|}
thrdpool.c:thrdpool_join_zombies:
  208|   149k|{
  209|   149k|  struct Curl_llist_node *e;
  210|       |
  211|   150k|  for(e = Curl_llist_head(&tpool->zombies); e;
  ------------------
  |  Branch (211:45): [True: 889, False: 149k]
  ------------------
  212|   149k|      e = Curl_llist_head(&tpool->zombies)) {
  213|    889|    struct thrdslot *tslot = Curl_node_elem(e);
  214|       |
  215|    889|    Curl_node_remove(&tslot->node);
  216|    889|    if(tslot->thread != curl_thread_t_null) {
  ------------------
  |  |   35|    889|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (216:8): [True: 889, False: 0]
  ------------------
  217|    889|      Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   38|    889|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  218|    889|      Curl_thread_join(&tslot->thread);
  219|    889|      Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   37|    889|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  220|    889|      tslot->thread = curl_thread_t_null;
  ------------------
  |  |   35|    889|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  221|    889|    }
  222|    889|    thrdslot_destroy(tslot);
  223|    889|  }
  224|   149k|}

Curl_thrdq_create:
  207|  11.7k|{
  208|  11.7k|  struct curl_thrdq *tqueue;
  209|  11.7k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  210|       |
  211|  11.7k|  tqueue = curlx_calloc(1, sizeof(*tqueue));
  ------------------
  |  | 1475|  11.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  212|  11.7k|  if(!tqueue)
  ------------------
  |  Branch (212:6): [True: 0, False: 11.7k]
  ------------------
  213|      0|    goto out;
  214|       |
  215|  11.7k|  Curl_mutex_init(&tqueue->lock);
  ------------------
  |  |   36|  11.7k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  216|  11.7k|  Curl_cond_init(&tqueue->await);
  ------------------
  |  |   41|  11.7k|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  217|  11.7k|  Curl_llist_init(&tqueue->sendq, thrdq_item_list_dtor);
  218|  11.7k|  Curl_llist_init(&tqueue->recvq, thrdq_item_list_dtor);
  219|  11.7k|  tqueue->fn_free = fn_free;
  220|  11.7k|  tqueue->fn_process = fn_process;
  221|  11.7k|  tqueue->fn_event = fn_event;
  222|  11.7k|  tqueue->fn_user_data = user_data;
  223|       |
  224|  11.7k|  tqueue->name = curlx_strdup(name);
  ------------------
  |  | 1472|  11.7k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  225|  11.7k|  if(!tqueue->name)
  ------------------
  |  Branch (225:6): [True: 0, False: 11.7k]
  ------------------
  226|      0|    goto out;
  227|       |
  228|  11.7k|  result = Curl_thrdpool_create(&tqueue->tpool, name,
  229|  11.7k|                                min_threads, max_threads, idle_time_ms,
  230|  11.7k|                                thrdq_tpool_take,
  231|  11.7k|                                thrdq_tpool_process,
  232|  11.7k|                                thrdq_tpool_return,
  233|  11.7k|                                tqueue);
  234|       |
  235|  11.7k|out:
  236|  11.7k|  if(result && tqueue) {
  ------------------
  |  Branch (236:6): [True: 0, False: 11.7k]
  |  Branch (236:16): [True: 0, False: 0]
  ------------------
  237|      0|    tqueue->aborted = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  238|      0|    thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
                  thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  239|       |    tqueue = NULL;
  240|      0|  }
  241|  11.7k|  *ptqueue = tqueue;
  242|  11.7k|  return result;
  243|  11.7k|}
Curl_thrdq_destroy:
  246|  11.7k|{
  247|  11.7k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   37|  11.7k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  248|  11.7k|  DEBUGASSERT(!tqueue->aborted);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 11.7k]
  |  Branch (248:3): [True: 11.7k, False: 0]
  ------------------
  249|  11.7k|  tqueue->aborted = TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  250|       |  thrdq_unlink(tqueue, TRUE, join);
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  251|  11.7k|}
Curl_thrdq_send:
  261|    820|{
  262|    820|  struct thrdq_item *qitem;
  263|    820|  CURLcode result = CURLE_OK;
  264|    820|  uint32_t signals = 0;
  265|       |
  266|    820|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   37|    820|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  267|    820|  if(tqueue->aborted) {
  ------------------
  |  Branch (267:6): [True: 0, False: 820]
  ------------------
  268|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (268:5): [Folded, False: 0]
  |  Branch (268:5): [Folded, False: 0]
  ------------------
  269|      0|    result = CURLE_SEND_ERROR;
  270|      0|    goto out;
  271|      0|  }
  272|    820|  if(timeout_ms < 0) {
  ------------------
  |  Branch (272:6): [True: 0, False: 820]
  ------------------
  273|      0|    result = CURLE_OPERATION_TIMEDOUT;
  274|      0|    goto out;
  275|      0|  }
  276|       |
  277|    820|  qitem = thrdq_item_create(tqueue, item, description, timeout_ms);
  278|    820|  if(!qitem) {
  ------------------
  |  Branch (278:6): [True: 0, False: 820]
  ------------------
  279|      0|    result = CURLE_OUT_OF_MEMORY;
  280|      0|    goto out;
  281|      0|  }
  282|    820|  Curl_llist_append(&tqueue->sendq, qitem, &qitem->node);
  283|    820|  signals = thrdq_get_signals(tqueue);
  284|       |
  285|    820|out:
  286|    820|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   38|    820|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  287|       |  /* Signal thread pool unlocked to avoid deadlocks. Since we added
  288|       |   * item to the queue already, it might have been taken for processing
  289|       |   * already. Any error in signalling the pool cannot be reported to
  290|       |   * the caller since it needs to give up ownership of item. */
  291|    820|  if(!result && signals)
  ------------------
  |  Branch (291:6): [True: 820, False: 0]
  |  Branch (291:17): [True: 820, False: 0]
  ------------------
  292|    820|    (void)Curl_thrdpool_signal(tqueue->tpool, (uint32_t)signals);
  293|    820|  return result;
  294|    820|}
Curl_thrdq_check_started:
  297|    614|{
  298|    614|  size_t unprocessed;
  299|       |
  300|    614|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   37|    614|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  301|    614|  unprocessed = tqueue->aborted ? 0 : Curl_llist_count(&tqueue->sendq);
  ------------------
  |  Branch (301:17): [True: 0, False: 614]
  ------------------
  302|    614|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   38|    614|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  303|    614|  return !unprocessed ||
  ------------------
  |  Branch (303:10): [True: 282, False: 332]
  ------------------
  304|    332|         !Curl_thrdpool_signal(tqueue->tpool, (uint32_t)unprocessed);
  ------------------
  |  Branch (304:10): [True: 332, False: 0]
  ------------------
  305|    614|}
Curl_thrdq_recv:
  308|  1.13M|{
  309|  1.13M|  CURLcode result = CURLE_AGAIN;
  310|  1.13M|  struct Curl_llist_node *e;
  311|  1.13M|  uint32_t signals = 0;
  312|       |
  313|  1.13M|  *pitem = NULL;
  314|  1.13M|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   37|  1.13M|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  315|  1.13M|  if(tqueue->aborted) {
  ------------------
  |  Branch (315:6): [True: 0, False: 1.13M]
  ------------------
  316|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (316:5): [Folded, False: 0]
  |  Branch (316:5): [Folded, False: 0]
  ------------------
  317|      0|    result = CURLE_RECV_ERROR;
  318|      0|    goto out;
  319|      0|  }
  320|       |
  321|  1.13M|  e = Curl_llist_head(&tqueue->recvq);
  322|  1.13M|  if(e) {
  ------------------
  |  Branch (322:6): [True: 333, False: 1.13M]
  ------------------
  323|    333|    struct thrdq_item *qitem = Curl_node_take_elem(e);
  324|    333|    *pitem = qitem->item;
  325|    333|    qitem->item = NULL;
  326|    333|    thrdq_item_destroy(qitem);
  327|    333|    result = CURLE_OK;
  328|    333|  }
  329|  1.13M|  else
  330|  1.13M|    signals = thrdq_get_signals(tqueue);
  331|       |
  332|  1.13M|out:
  333|  1.13M|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   38|  1.13M|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  334|       |  /* Signal thread pool unlocked to avoid deadlocks. If items await
  335|       |   * processing while nothing was ready, make sure the pool has a
  336|       |   * thread to work on them. An earlier thread start may have failed,
  337|       |   * which `Curl_thrdq_send()` cannot report to its caller. Without
  338|       |   * this, such items would sit unprocessed until the next send. */
  339|  1.13M|  if(signals)
  ------------------
  |  Branch (339:6): [True: 124k, False: 1.01M]
  ------------------
  340|   124k|    (void)Curl_thrdpool_signal(tqueue->tpool, (uint32_t)signals);
  341|  1.13M|  return result;
  342|  1.13M|}
Curl_thrdq_clear:
  362|    294|{
  363|    294|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   37|    294|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  364|    294|  if(tqueue->aborted) {
  ------------------
  |  Branch (364:6): [True: 0, False: 294]
  ------------------
  365|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (365:5): [Folded, False: 0]
  |  Branch (365:5): [Folded, False: 0]
  ------------------
  366|      0|    goto out;
  367|      0|  }
  368|    294|  thrdq_llist_clean_matches(&tqueue->sendq, fn_match, match_data);
  369|    294|  thrdq_llist_clean_matches(&tqueue->recvq, fn_match, match_data);
  370|    294|out:
  371|    294|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   38|    294|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  372|    294|}
Curl_thrdq_trace:
  407|  1.15M|{
  408|  1.15M|  struct curl_trc_feat *feat = &Curl_trc_feat_threads;
  409|  1.15M|  if(Curl_trc_ft_is_verbose(data, feat)) {
  ------------------
  |  |  329|  1.15M|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  322|  2.30M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1.15M, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1.15M]
  |  |  |  |  ------------------
  |  |  |  |  323|  2.30M|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  330|  1.15M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  410|      0|    struct Curl_llist_node *e;
  411|      0|    struct thrdq_item *qitem;
  412|       |
  413|      0|    Curl_thrdpool_trace(tqueue->tpool, data);
  414|      0|    Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   37|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  415|      0|    if(!Curl_llist_count(&tqueue->sendq) &&
  ------------------
  |  Branch (415:8): [True: 0, False: 0]
  ------------------
  416|      0|       !Curl_llist_count(&tqueue->recvq)) {
  ------------------
  |  Branch (416:8): [True: 0, False: 0]
  ------------------
  417|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] empty", tqueue->name);
  418|      0|    }
  419|      0|    for(e = Curl_llist_head(&tqueue->sendq); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (419:46): [True: 0, False: 0]
  ------------------
  420|      0|      qitem = Curl_node_elem(e);
  421|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] in: %s",
  422|      0|                          tqueue->name, qitem->description);
  423|      0|    }
  424|      0|    for(e = Curl_llist_head(&tqueue->recvq); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (424:46): [True: 0, False: 0]
  ------------------
  425|      0|      qitem = Curl_node_elem(e);
  426|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] out: %s",
  427|      0|                          tqueue->name, qitem->description);
  428|      0|    }
  429|      0|    Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   38|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  430|      0|  }
  431|  1.15M|}
thrdqueue.c:thrdq_item_list_dtor:
   92|    187|{
   93|    187|  (void)user_data;
   94|    187|  thrdq_item_destroy(elem);
   95|    187|}
thrdqueue.c:thrdq_tpool_take:
   99|  1.42k|{
  100|  1.42k|  struct curl_thrdq *tqueue = user_data;
  101|  1.42k|  struct thrdq_item *qitem = NULL;
  102|  1.42k|  struct Curl_llist_node *e;
  103|  1.42k|  Curl_thrdq_ev_cb *fn_event = NULL;
  104|  1.42k|  void *fn_user_data = NULL;
  105|       |
  106|  1.42k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   37|  1.42k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  107|  1.42k|  *pdescription = NULL;
  108|  1.42k|  *ptimeout_ms = 0;
  109|  1.42k|  if(!tqueue->aborted) {
  ------------------
  |  Branch (109:6): [True: 1.41k, False: 4]
  ------------------
  110|  1.41k|    e = Curl_llist_head(&tqueue->sendq);
  111|  1.41k|    if(e) {
  ------------------
  |  Branch (111:8): [True: 811, False: 608]
  ------------------
  112|    811|      struct curltime now = curlx_now();
  113|    811|      timediff_t timeout_ms;
  114|    811|      while(e) {
  ------------------
  |  Branch (114:13): [True: 811, False: 0]
  ------------------
  115|    811|        qitem = Curl_node_take_elem(e);
  116|    811|        timeout_ms = (!qitem->timeout_ms) ? 0 :
  ------------------
  |  Branch (116:22): [True: 179, False: 632]
  ------------------
  117|    811|          (qitem->timeout_ms - curlx_ptimediff_ms(&now, &qitem->start));
  118|    811|        if(timeout_ms < 0) {
  ------------------
  |  Branch (118:12): [True: 0, False: 811]
  ------------------
  119|       |          /* timed out while queued, place on receive queue */
  120|      0|          Curl_llist_append(&tqueue->recvq, qitem, &qitem->node);
  121|      0|          fn_event = tqueue->fn_event;
  122|      0|          fn_user_data = tqueue->fn_user_data;
  123|      0|          qitem = NULL;
  124|      0|          e = Curl_llist_head(&tqueue->sendq);
  125|      0|          continue;
  126|      0|        }
  127|    811|        else {
  128|    811|          *pdescription = qitem->description;
  129|    811|          *ptimeout_ms = timeout_ms;
  130|    811|          break;
  131|    811|        }
  132|    811|      }
  133|    811|    }
  134|  1.41k|  }
  135|  1.42k|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   38|  1.42k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  136|       |  /* avoiding deadlocks */
  137|  1.42k|  if(fn_event)
  ------------------
  |  Branch (137:6): [True: 0, False: 1.42k]
  ------------------
  138|      0|    fn_event(tqueue, CURL_THRDQ_EV_ITEM_DONE, fn_user_data);
  139|  1.42k|  return qitem;
  140|  1.42k|}
thrdqueue.c:thrdq_tpool_process:
  171|    811|{
  172|    811|  struct thrdq_item *qitem = item;
  173|    811|  qitem->fn_process(qitem->item);
  174|    811|}
thrdqueue.c:thrdq_tpool_return:
  143|    811|{
  144|    811|  struct curl_thrdq *tqueue = user_data;
  145|    811|  struct thrdq_item *qitem = item;
  146|    811|  Curl_thrdq_ev_cb *fn_event = NULL;
  147|    811|  void *fn_user_data = NULL;
  148|       |
  149|    811|  if(!tqueue) {
  ------------------
  |  Branch (149:6): [True: 298, False: 513]
  ------------------
  150|    298|    thrdq_item_destroy(item);
  151|    298|    return;
  152|    298|  }
  153|       |
  154|    513|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   37|    513|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  155|    513|  if(tqueue->aborted) {
  ------------------
  |  Branch (155:6): [True: 2, False: 511]
  ------------------
  156|      2|    thrdq_item_destroy(qitem);
  157|      2|  }
  158|    511|  else {
  159|    511|    DEBUGASSERT(!Curl_node_llist(&qitem->node));
  ------------------
  |  | 1079|    511|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (159:5): [True: 0, False: 511]
  |  Branch (159:5): [True: 511, False: 0]
  ------------------
  160|    511|    Curl_llist_append(&tqueue->recvq, qitem, &qitem->node);
  161|    511|    fn_event = tqueue->fn_event;
  162|    511|    fn_user_data = tqueue->fn_user_data;
  163|    511|  }
  164|    513|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   38|    513|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  165|       |  /* avoiding deadlocks */
  166|    513|  if(fn_event)
  ------------------
  |  Branch (166:6): [True: 511, False: 2]
  ------------------
  167|    511|    fn_event(tqueue, CURL_THRDQ_EV_ITEM_DONE, fn_user_data);
  168|    513|}
thrdqueue.c:thrdq_unlink:
  177|  11.7k|{
  178|  11.7k|  DEBUGASSERT(tqueue->aborted);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 11.7k]
  |  Branch (178:3): [True: 11.7k, False: 0]
  ------------------
  179|  11.7k|  if(tqueue->tpool) {
  ------------------
  |  Branch (179:6): [True: 11.7k, False: 0]
  ------------------
  180|  11.7k|    if(locked)
  ------------------
  |  Branch (180:8): [True: 11.7k, False: 0]
  ------------------
  181|  11.7k|      Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   38|  11.7k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  182|  11.7k|    Curl_thrdpool_destroy(tqueue->tpool, join);
  183|  11.7k|    tqueue->tpool = NULL;
  184|  11.7k|    if(locked)
  ------------------
  |  Branch (184:8): [True: 11.7k, False: 0]
  ------------------
  185|  11.7k|      Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   37|  11.7k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  186|  11.7k|  }
  187|       |
  188|  11.7k|  Curl_llist_destroy(&tqueue->sendq, NULL);
  189|  11.7k|  Curl_llist_destroy(&tqueue->recvq, NULL);
  190|  11.7k|  curlx_free(tqueue->name);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  191|  11.7k|  Curl_cond_destroy(&tqueue->await);
  ------------------
  |  |   42|  11.7k|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
  192|  11.7k|  if(locked)
  ------------------
  |  Branch (192:6): [True: 11.7k, False: 0]
  ------------------
  193|  11.7k|    Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   38|  11.7k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  194|  11.7k|  Curl_mutex_destroy(&tqueue->lock);
  ------------------
  |  |   39|  11.7k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  195|  11.7k|  curlx_free(tqueue);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  196|  11.7k|}
thrdqueue.c:thrdq_item_create:
   67|    820|{
   68|    820|  struct thrdq_item *qitem;
   69|       |
   70|    820|  qitem = curlx_calloc(1, sizeof(*qitem));
  ------------------
  |  | 1475|    820|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   71|    820|  if(!qitem)
  ------------------
  |  Branch (71:6): [True: 0, False: 820]
  ------------------
   72|      0|    return NULL;
   73|    820|  qitem->item = item;
   74|    820|  qitem->description = description;
   75|    820|  qitem->fn_free = tqueue->fn_free;
   76|    820|  qitem->fn_process = tqueue->fn_process;
   77|    820|  if(timeout_ms) {
  ------------------
  |  Branch (77:6): [True: 641, False: 179]
  ------------------
   78|    641|    qitem->start = curlx_now();
   79|    641|    qitem->timeout_ms = timeout_ms;
   80|    641|  }
   81|    820|  return qitem;
   82|    820|}
thrdqueue.c:thrdq_get_signals:
  254|  1.13M|{
  255|  1.13M|  size_t qlen = Curl_llist_count(&tqueue->sendq);
  256|  1.13M|  return (qlen <= UINT32_MAX) ? (uint32_t)qlen : UINT32_MAX;
  ------------------
  |  Branch (256:10): [True: 1.13M, False: 0]
  ------------------
  257|  1.13M|}
thrdqueue.c:thrdq_item_destroy:
   85|    820|{
   86|    820|  if(qitem->item)
  ------------------
  |  Branch (86:6): [True: 487, False: 333]
  ------------------
   87|    487|    qitem->fn_free(qitem->item);
   88|    820|  curlx_free(qitem);
  ------------------
  |  | 1478|    820|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   89|    820|}
thrdqueue.c:thrdq_llist_clean_matches:
  347|    588|{
  348|    588|  struct Curl_llist_node *e, *n;
  349|    588|  struct thrdq_item *qitem;
  350|       |
  351|    768|  for(e = Curl_llist_head(llist); e; e = n) {
  ------------------
  |  Branch (351:35): [True: 180, False: 588]
  ------------------
  352|    180|    n = Curl_node_next(e);
  353|    180|    qitem = Curl_node_elem(e);
  354|    180|    if(fn_match(qitem->item, match_data))
  ------------------
  |  Branch (354:8): [True: 180, False: 0]
  ------------------
  355|    180|      Curl_node_remove(e);
  356|    180|  }
  357|    588|}

Curl_checkheaders:
   88|  5.36k|{
   89|  5.36k|  struct curl_slist *head;
   90|  5.36k|  DEBUGASSERT(thislen);
  ------------------
  |  | 1079|  5.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (90:3): [True: 0, False: 5.36k]
  |  Branch (90:3): [True: 5.36k, False: 0]
  ------------------
   91|  5.36k|  DEBUGASSERT(thisheader[thislen - 1] != ':');
  ------------------
  |  | 1079|  5.36k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:3): [True: 0, False: 5.36k]
  |  Branch (91:3): [True: 5.36k, False: 0]
  ------------------
   92|       |
   93|   171k|  for(head = data->set.headers; head; head = head->next) {
  ------------------
  |  Branch (93:33): [True: 166k, False: 5.32k]
  ------------------
   94|   166k|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (94:8): [True: 190, False: 166k]
  ------------------
   95|    190|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|    190|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 31, False: 159]
  |  |  |  Branch (26:45): [True: 2, False: 157]
  |  |  ------------------
  ------------------
   96|     33|      return head->data;
   97|   166k|  }
   98|       |
   99|  5.32k|  return NULL;
  100|  5.36k|}
Curl_init_CONNECT:
  434|  8.61k|{
  435|  8.61k|  data->state.fread_func = data->set.fread_func_set;
  436|  8.61k|  data->state.in = data->set.in_set;
  437|  8.61k|  data->state.upload = (data->state.httpreq == HTTPREQ_PUT);
  438|  8.61k|}
Curl_pretransfer:
  446|  12.5k|{
  447|  12.5k|  CURLcode result = CURLE_OK;
  448|       |
  449|       |  /* Reset the retry count at the start of each request.
  450|       |   * If the retry count is not reset, when the connection drops,
  451|       |   * it will not enter the retry mechanism on CONN_MAX_RETRIES + 1 attempts
  452|       |   * and will immediately throw
  453|       |   * "Connection died, tried CONN_MAX_RETRIES times before giving up".
  454|       |   * By resetting it here, we ensure each new request starts fresh. */
  455|  12.5k|  data->state.retrycount = 0;
  456|       |
  457|  12.5k|  if(!data->set.str[STRING_SET_URL] && !data->set.uh) {
  ------------------
  |  Branch (457:6): [True: 4.18k, False: 8.38k]
  |  Branch (457:40): [True: 4.18k, False: 0]
  ------------------
  458|       |    /* we cannot do anything without URL */
  459|  4.18k|    failf(data, "No URL set");
  ------------------
  |  |   62|  4.18k|#define failf Curl_failf
  ------------------
  460|  4.18k|    return CURLE_URL_MALFORMAT;
  461|  4.18k|  }
  462|       |
  463|       |  /* CURLOPT_CURLU overrides CURLOPT_URL and the contents of the CURLU handle
  464|       |     is allowed to be changed by the user between transfers */
  465|  8.38k|  if(data->set.uh) {
  ------------------
  |  Branch (465:6): [True: 0, False: 8.38k]
  ------------------
  466|      0|    CURLUcode uc;
  467|      0|    curlx_free(data->set.str[STRING_SET_URL]);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  468|      0|    uc = curl_url_get(data->set.uh,
  469|      0|                      CURLUPART_URL, &data->set.str[STRING_SET_URL], 0);
  470|      0|    if(uc) {
  ------------------
  |  Branch (470:8): [True: 0, False: 0]
  ------------------
  471|       |      /* clear the pointer to not point to freed memory anymore */
  472|      0|      Curl_bufref_set(&data->state.url, NULL, 0, NULL);
  473|      0|      failf(data, "No URL set");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  474|      0|      return CURLE_URL_MALFORMAT;
  475|      0|    }
  476|      0|  }
  477|       |
  478|  8.38k|  Curl_bufref_set(&data->state.url, data->set.str[STRING_SET_URL], 0, NULL);
  479|       |
  480|  8.38k|  if(data->set.postfields && data->set.set_resume_from) {
  ------------------
  |  Branch (480:6): [True: 813, False: 7.57k]
  |  Branch (480:30): [True: 23, False: 790]
  ------------------
  481|       |    /* we cannot */
  482|     23|    failf(data, "cannot mix POSTFIELDS with RESUME_FROM");
  ------------------
  |  |   62|     23|#define failf Curl_failf
  ------------------
  483|     23|    return CURLE_BAD_FUNCTION_ARGUMENT;
  484|     23|  }
  485|       |
  486|  8.36k|  data->state.prefer_ascii = data->set.prefer_ascii;
  487|  8.36k|#ifdef CURL_LIST_ONLY_PROTOCOL
  488|  8.36k|  data->state.list_only = data->set.list_only;
  489|  8.36k|#endif
  490|  8.36k|  data->state.httpreq = data->set.method;
  491|       |
  492|       |  /* initial transfer request coming up, forget the initial origin
  493|       |   * from a previous perform() on this handle. */
  494|  8.36k|  Curl_peer_unlink(&data->state.initial_origin);
  495|  8.36k|  Curl_peer_unlink(&data->state.origin);
  496|  8.36k|  data->state.requests = 0;
  497|  8.36k|  data->state.followlocation = 0; /* reset the location-follow counter */
  498|  8.36k|  data->state.this_is_a_follow = FALSE; /* reset this */
  ------------------
  |  | 1056|  8.36k|#define FALSE false
  ------------------
  499|  8.36k|  data->state.http_ignorecustom = FALSE; /* use custom HTTP method */
  ------------------
  |  | 1056|  8.36k|#define FALSE false
  ------------------
  500|  8.36k|  data->state.errorbuf = FALSE; /* no error has occurred */
  ------------------
  |  | 1056|  8.36k|#define FALSE false
  ------------------
  501|  8.36k|#ifndef CURL_DISABLE_HTTP
  502|  8.36k|  Curl_http_neg_init(data, &data->state.http_neg);
  503|  8.36k|#endif
  504|  8.36k|  data->state.authproblem = FALSE;
  ------------------
  |  | 1056|  8.36k|#define FALSE false
  ------------------
  505|  8.36k|  data->state.authhost.want = data->set.httpauth;
  506|  8.36k|  data->state.authproxy.want = data->set.proxyauth;
  507|  8.36k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1336|  8.36k|  do {                      \
  |  | 1337|  8.36k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  8.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  8.36k|    (ptr) = NULL;           \
  |  | 1339|  8.36k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 8.36k]
  |  |  ------------------
  ------------------
  508|  8.36k|  Curl_data_priority_clear_state(data);
  509|  8.36k|  if(data->set.http_auto_referer)
  ------------------
  |  Branch (509:6): [True: 2, False: 8.36k]
  ------------------
  510|      2|    Curl_bufref_free(&data->state.referer);
  511|  8.36k|  if(data->set.str[STRING_SET_REFERER])
  ------------------
  |  Branch (511:6): [True: 4, False: 8.36k]
  ------------------
  512|      4|    Curl_bufref_set(&data->state.referer, data->set.str[STRING_SET_REFERER],
  513|      4|                    0, NULL);
  514|  8.36k|  else
  515|  8.36k|    Curl_bufref_free(&data->state.referer);
  516|       |
  517|  8.36k|  if(data->state.httpreq == HTTPREQ_PUT)
  ------------------
  |  Branch (517:6): [True: 3, False: 8.36k]
  ------------------
  518|      3|    data->state.infilesize = data->set.filesize;
  519|  8.36k|  else if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (519:11): [True: 866, False: 7.49k]
  ------------------
  520|    866|          (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (520:11): [True: 862, False: 4]
  ------------------
  521|    862|    data->state.infilesize = data->set.postfieldsize;
  522|    862|    if(data->set.postfields && (data->state.infilesize == -1))
  ------------------
  |  Branch (522:8): [True: 790, False: 72]
  |  Branch (522:32): [True: 5, False: 785]
  ------------------
  523|      5|      data->state.infilesize = (curl_off_t)strlen(data->set.postfields);
  524|    862|  }
  525|  7.49k|  else
  526|  7.49k|    data->state.infilesize = 0;
  527|       |
  528|       |  /* If there is a list of cookie files to read, do it now! */
  529|  8.36k|  result = Curl_cookie_loadfiles(data);
  530|  8.36k|  if(!result)
  ------------------
  |  Branch (530:6): [True: 8.36k, False: 0]
  ------------------
  531|  8.36k|    Curl_cookie_run(data); /* activate */
  532|       |
  533|       |  /* If there is a list of host pairs to deal with */
  534|  8.36k|  if(!result && data->state.resolve)
  ------------------
  |  Branch (534:6): [True: 8.36k, False: 0]
  |  Branch (534:17): [True: 0, False: 8.36k]
  ------------------
  535|      0|    result = Curl_loadhostpairs(data);
  536|       |
  537|  8.36k|  if(!result)
  ------------------
  |  Branch (537:6): [True: 8.36k, False: 0]
  ------------------
  538|       |    /* If there is a list of hsts files to read */
  539|  8.36k|    result = Curl_hsts_loadfiles(data);
  540|       |
  541|  8.36k|  if(!result) {
  ------------------
  |  Branch (541:6): [True: 8.36k, False: 0]
  ------------------
  542|       |    /* Allow data->set.use_port to set which port to use. This needs to be
  543|       |     * disabled for example when we follow Location: headers to URLs using
  544|       |     * different ports! */
  545|  8.36k|    data->state.allow_port = TRUE;
  ------------------
  |  | 1053|  8.36k|#define TRUE true
  ------------------
  546|       |
  547|       |#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL)
  548|       |    /*************************************************************
  549|       |     * Tell signal handler to ignore SIGPIPE
  550|       |     *************************************************************/
  551|       |    if(!data->set.no_signal)
  552|       |      data->state.prev_signal = signal(SIGPIPE, SIG_IGN);
  553|       |#endif
  554|       |
  555|  8.36k|    Curl_initinfo(data); /* reset session-specific information "variables" */
  556|  8.36k|    Curl_pgrsResetTransferSizes(data);
  557|  8.36k|    Curl_pgrsStartNow(data);
  558|       |
  559|       |    /* In case the handle is reused and an authentication method was picked
  560|       |       in the session we need to make sure we only use the one(s) we now
  561|       |       consider to be fine */
  562|  8.36k|    data->state.authhost.picked &= data->state.authhost.want;
  563|  8.36k|    data->state.authproxy.picked &= data->state.authproxy.want;
  564|       |
  565|  8.36k|#ifndef CURL_DISABLE_FTP
  566|  8.36k|    data->state.wildcardmatch = data->set.wildcard_enabled;
  567|  8.36k|    if(data->state.wildcardmatch) {
  ------------------
  |  Branch (567:8): [True: 5, False: 8.35k]
  ------------------
  568|      5|      struct WildcardData *wc;
  569|      5|      if(!data->wildcard) {
  ------------------
  |  Branch (569:10): [True: 5, False: 0]
  ------------------
  570|      5|        data->wildcard = curlx_calloc(1, sizeof(struct WildcardData));
  ------------------
  |  | 1475|      5|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  571|      5|        if(!data->wildcard)
  ------------------
  |  Branch (571:12): [True: 0, False: 5]
  ------------------
  572|      0|          return CURLE_OUT_OF_MEMORY;
  573|      5|      }
  574|      5|      wc = data->wildcard;
  575|      5|      if(wc->state < CURLWC_INIT) {
  ------------------
  |  Branch (575:10): [True: 5, False: 0]
  ------------------
  576|      5|        if(wc->ftpwc)
  ------------------
  |  Branch (576:12): [True: 0, False: 5]
  ------------------
  577|      0|          wc->dtor(wc->ftpwc);
  578|      5|        curlx_safefree(wc->pattern);
  ------------------
  |  | 1336|      5|  do {                      \
  |  | 1337|      5|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      5|    (ptr) = NULL;           \
  |  | 1339|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  579|      5|        curlx_safefree(wc->path);
  ------------------
  |  | 1336|      5|  do {                      \
  |  | 1337|      5|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      5|    (ptr) = NULL;           \
  |  | 1339|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  580|      5|        Curl_wildcard_init(wc); /* init wildcard structures */
  581|      5|      }
  582|      5|    }
  583|  8.36k|#endif
  584|  8.36k|    result = Curl_hsts_loadcb(data, data->hsts);
  585|  8.36k|  }
  586|       |
  587|       |  /*
  588|       |   * Set user-agent. Used for HTTP, but since we can attempt to tunnel
  589|       |   * anything through an HTTP proxy we cannot limit this based on protocol.
  590|       |   */
  591|  8.36k|  if(!result && data->set.str[STRING_USERAGENT]) {
  ------------------
  |  Branch (591:6): [True: 8.36k, False: 0]
  |  Branch (591:17): [True: 12, False: 8.35k]
  ------------------
  592|     12|    curlx_free(data->state.aptr.uagent);
  ------------------
  |  | 1478|     12|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  593|     12|    data->state.aptr.uagent =
  594|     12|      curl_maprintf("User-Agent: %s\r\n", data->set.str[STRING_USERAGENT]);
  595|     12|    if(!data->state.aptr.uagent)
  ------------------
  |  Branch (595:8): [True: 0, False: 12]
  ------------------
  596|      0|      return CURLE_OUT_OF_MEMORY;
  597|     12|  }
  598|       |
  599|  8.36k|  data->req.headerbytecount = 0;
  600|  8.36k|  Curl_headers_cleanup(data);
  601|  8.36k|  return result;
  602|  8.36k|}
Curl_xfer_write_done:
  803|  6.25k|{
  804|  6.25k|  (void)premature;
  805|  6.25k|  return Curl_cw_out_done(data);
  806|  6.25k|}
Curl_xfer_recv_is_paused:
  878|  10.1k|{
  879|  10.1k|  return Curl_rlimit_is_blocked(&data->progress.dl.rlimit);
  880|  10.1k|}

Curl_uint32_bset_init:
   33|  58.9k|{
   34|  58.9k|  memset(bset, 0, sizeof(*bset));
   35|  58.9k|#ifdef DEBUGBUILD
   36|  58.9k|  bset->init = CURL_UINT32_BSET_MAGIC;
  ------------------
  |  |   29|  58.9k|#define CURL_UINT32_BSET_MAGIC  0x62757473
  ------------------
   37|  58.9k|#endif
   38|  58.9k|}
Curl_uint32_bset_resize:
   41|  58.9k|{
   42|  58.9k|  uint32_t nslots = (nmax < (UINT32_MAX - 63)) ?
  ------------------
  |  Branch (42:21): [True: 58.9k, False: 0]
  ------------------
   43|  58.9k|                    ((nmax + 63) / 64) : (UINT32_MAX / 64);
   44|       |
   45|  58.9k|  DEBUGASSERT(bset->init == CURL_UINT32_BSET_MAGIC);
  ------------------
  |  | 1079|  58.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (45:3): [True: 0, False: 58.9k]
  |  Branch (45:3): [True: 58.9k, False: 0]
  ------------------
   46|  58.9k|  if(nslots != bset->nslots) {
  ------------------
  |  Branch (46:6): [True: 58.9k, False: 0]
  ------------------
   47|  58.9k|    uint64_t *slots = curlx_calloc(nslots, sizeof(uint64_t));
  ------------------
  |  | 1475|  58.9k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   48|  58.9k|    if(!slots)
  ------------------
  |  Branch (48:8): [True: 0, False: 58.9k]
  ------------------
   49|      0|      return CURLE_OUT_OF_MEMORY;
   50|       |
   51|  58.9k|    if(bset->slots) {
  ------------------
  |  Branch (51:8): [True: 0, False: 58.9k]
  ------------------
   52|      0|      memcpy(slots, bset->slots,
   53|      0|             (CURLMIN(nslots, bset->nslots) * sizeof(uint64_t)));
  ------------------
  |  | 1292|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   54|      0|      curlx_free(bset->slots);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   55|      0|    }
   56|  58.9k|    bset->slots = slots;
   57|  58.9k|    bset->nslots = nslots;
   58|  58.9k|    bset->first_slot_used = 0;
   59|  58.9k|  }
   60|  58.9k|  return CURLE_OK;
   61|  58.9k|}
Curl_uint32_bset_destroy:
   64|  58.9k|{
   65|  58.9k|  DEBUGASSERT(bset->init == CURL_UINT32_BSET_MAGIC);
  ------------------
  |  | 1079|  58.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (65:3): [True: 0, False: 58.9k]
  |  Branch (65:3): [True: 58.9k, False: 0]
  ------------------
   66|  58.9k|  curlx_free(bset->slots);
  ------------------
  |  | 1478|  58.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|  58.9k|  memset(bset, 0, sizeof(*bset));
   68|  58.9k|}
Curl_uint32_bset_empty:
   91|  11.7k|{
   92|  11.7k|  uint32_t i;
   93|  11.7k|  for(i = bset->first_slot_used; i < bset->nslots; ++i) {
  ------------------
  |  Branch (93:34): [True: 11.7k, False: 0]
  ------------------
   94|  11.7k|    if(bset->slots[i])
  ------------------
  |  Branch (94:8): [True: 11.7k, False: 0]
  ------------------
   95|  11.7k|      return FALSE;
  ------------------
  |  | 1056|  11.7k|#define FALSE false
  ------------------
   96|  11.7k|  }
   97|      0|  return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
   98|  11.7k|}
Curl_uint32_bset_add:
  109|  50.0k|{
  110|  50.0k|  uint32_t islot = i / 64;
  111|  50.0k|  if(islot >= bset->nslots)
  ------------------
  |  Branch (111:6): [True: 0, False: 50.0k]
  ------------------
  112|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  113|  50.0k|  bset->slots[islot] |= ((uint64_t)1 << (i % 64));
  114|  50.0k|  if(islot < bset->first_slot_used)
  ------------------
  |  Branch (114:6): [True: 248, False: 49.8k]
  ------------------
  115|    248|    bset->first_slot_used = islot;
  116|       |  return TRUE;
  ------------------
  |  | 1053|  50.0k|#define TRUE true
  ------------------
  117|  50.0k|}
Curl_uint32_bset_remove:
  120|   137k|{
  121|   137k|  size_t islot = i / 64;
  122|   137k|  if(islot < bset->nslots)
  ------------------
  |  Branch (122:6): [True: 137k, False: 0]
  ------------------
  123|   137k|    bset->slots[islot] &= ~((uint64_t)1 << (i % 64));
  124|   137k|}
Curl_uint32_bset_contains:
  127|  24.3k|{
  128|  24.3k|  uint32_t islot = i / 64;
  129|  24.3k|  if(islot >= bset->nslots)
  ------------------
  |  Branch (129:6): [True: 0, False: 24.3k]
  ------------------
  130|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  131|  24.3k|  return (bset->slots[islot] & ((uint64_t)1 << (i % 64))) != 0;
  132|  24.3k|}
Curl_uint32_bset_first:
  135|  59.3k|{
  136|  59.3k|  uint32_t i;
  137|   155k|  for(i = bset->first_slot_used; i < bset->nslots; ++i) {
  ------------------
  |  Branch (137:34): [True: 111k, False: 44.1k]
  ------------------
  138|   111k|    if(bset->slots[i]) {
  ------------------
  |  Branch (138:8): [True: 15.2k, False: 96.2k]
  ------------------
  139|  15.2k|      *pfirst = (i * 64) + CURL_CTZ64(bset->slots[i]);
  ------------------
  |  |  348|  15.2k|#      define CURL_CTZ64(x)            __builtin_ctzl(x)
  ------------------
  140|  15.2k|      bset->first_slot_used = i;
  141|  15.2k|      return TRUE;
  ------------------
  |  | 1053|  15.2k|#define TRUE true
  ------------------
  142|  15.2k|    }
  143|   111k|  }
  144|  44.1k|  bset->first_slot_used = *pfirst = UINT32_MAX;
  145|       |  return FALSE;
  ------------------
  |  | 1056|  44.1k|#define FALSE false
  ------------------
  146|  59.3k|}
Curl_uint32_bset_next:
  150|  31.7k|{
  151|  31.7k|  uint32_t islot;
  152|  31.7k|  uint64_t x;
  153|       |
  154|  31.7k|  ++last; /* look for number one higher than last */
  155|  31.7k|  islot = last / 64; /* the slot this would be in */
  156|  31.7k|  if(islot < bset->nslots) {
  ------------------
  |  Branch (156:6): [True: 31.7k, False: 0]
  ------------------
  157|       |    /* shift away the bits we already iterated in this slot */
  158|  31.7k|    x = (bset->slots[islot] >> (last % 64));
  159|  31.7k|    if(x) {
  ------------------
  |  Branch (159:8): [True: 16.4k, False: 15.2k]
  ------------------
  160|       |      /* more bits set, next is `last` + trailing 0s of the shifted slot */
  161|  16.4k|      *pnext = last + CURL_CTZ64(x);
  ------------------
  |  |  348|  16.4k|#      define CURL_CTZ64(x)            __builtin_ctzl(x)
  ------------------
  162|  16.4k|      return TRUE;
  ------------------
  |  | 1053|  16.4k|#define TRUE true
  ------------------
  163|  16.4k|    }
  164|       |    /* no more bits set in the last slot, scan forward */
  165|   121k|    for(islot = islot + 1; islot < bset->nslots; ++islot) {
  ------------------
  |  Branch (165:28): [True: 106k, False: 15.2k]
  ------------------
  166|   106k|      if(bset->slots[islot]) {
  ------------------
  |  Branch (166:10): [True: 0, False: 106k]
  ------------------
  167|      0|        *pnext = (islot * 64) + CURL_CTZ64(bset->slots[islot]);
  ------------------
  |  |  348|      0|#      define CURL_CTZ64(x)            __builtin_ctzl(x)
  ------------------
  168|      0|        return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  169|      0|      }
  170|   106k|    }
  171|  15.2k|  }
  172|  15.2k|  *pnext = UINT32_MAX; /* a value we cannot store */
  173|       |  return FALSE;
  ------------------
  |  | 1056|  15.2k|#define FALSE false
  ------------------
  174|  31.7k|}

Curl_uint32_tbl_init:
   34|  11.7k|{
   35|  11.7k|  memset(tbl, 0, sizeof(*tbl));
   36|  11.7k|  tbl->entry_dtor = entry_dtor;
   37|  11.7k|  tbl->last_key_added = UINT32_MAX;
   38|  11.7k|#ifdef DEBUGBUILD
   39|  11.7k|  tbl->init = CURL_UINT32_TBL_MAGIC;
  ------------------
  |  |   29|  11.7k|#define CURL_UINT32_TBL_MAGIC  0x62757473
  ------------------
   40|  11.7k|#endif
   41|  11.7k|}
Curl_uint32_tbl_resize:
   61|  11.7k|{
   62|       |  /* we use `tbl->nrows + 1` during iteration, want that to work */
   63|  11.7k|  DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (63:3): [True: 0, False: 11.7k]
  |  Branch (63:3): [True: 11.7k, False: 0]
  ------------------
   64|  11.7k|  if(!nrows)
  ------------------
  |  Branch (64:6): [True: 0, False: 11.7k]
  ------------------
   65|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
   66|  11.7k|  if(nrows != tbl->nrows) {
  ------------------
  |  Branch (66:6): [True: 11.7k, False: 0]
  ------------------
   67|  11.7k|    void **rows = curlx_calloc(nrows, sizeof(void *));
  ------------------
  |  | 1475|  11.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   68|  11.7k|    if(!rows)
  ------------------
  |  Branch (68:8): [True: 0, False: 11.7k]
  ------------------
   69|      0|      return CURLE_OUT_OF_MEMORY;
   70|  11.7k|    if(tbl->rows) {
  ------------------
  |  Branch (70:8): [True: 0, False: 11.7k]
  ------------------
   71|      0|      memcpy(rows, tbl->rows, (CURLMIN(nrows, tbl->nrows) * sizeof(void *)));
  ------------------
  |  | 1292|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   72|      0|      if(nrows < tbl->nrows)
  ------------------
  |  Branch (72:10): [True: 0, False: 0]
  ------------------
   73|      0|        uint32_tbl_clear_rows(tbl, nrows, tbl->nrows);
   74|      0|      curlx_free(tbl->rows);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|      0|    }
   76|  11.7k|    tbl->rows = rows;
   77|  11.7k|    tbl->nrows = nrows;
   78|  11.7k|  }
   79|  11.7k|  return CURLE_OK;
   80|  11.7k|}
uint32_tbl_clear:
   88|  11.7k|{
   89|  11.7k|  DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (89:3): [True: 0, False: 11.7k]
  |  Branch (89:3): [True: 11.7k, False: 0]
  ------------------
   90|  11.7k|  uint32_tbl_clear_rows(tbl, 0, tbl->nrows);
   91|  11.7k|  DEBUGASSERT(!tbl->nentries);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:3): [True: 0, False: 11.7k]
  |  Branch (91:3): [True: 11.7k, False: 0]
  ------------------
   92|  11.7k|  tbl->last_key_added = UINT32_MAX;
   93|  11.7k|}
Curl_uint32_tbl_destroy:
   96|  11.7k|{
   97|  11.7k|  DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
  ------------------
  |  | 1079|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (97:3): [True: 0, False: 11.7k]
  |  Branch (97:3): [True: 11.7k, False: 0]
  ------------------
   98|  11.7k|  uint32_tbl_clear(tbl);
   99|  11.7k|  curlx_free(tbl->rows);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  100|  11.7k|  memset(tbl, 0, sizeof(*tbl));
  101|  11.7k|}
Curl_uint32_tbl_capacity:
  104|  12.5k|{
  105|  12.5k|  return tbl->nrows;
  106|  12.5k|}
Curl_uint32_tbl_count:
  109|  24.3k|{
  110|  24.3k|  return tbl->nentries;
  111|  24.3k|}
Curl_uint32_tbl_get:
  114|  45.7k|{
  115|  45.7k|  return (key < tbl->nrows) ? tbl->rows[key] : NULL;
  ------------------
  |  Branch (115:10): [True: 45.7k, False: 0]
  ------------------
  116|  45.7k|}
Curl_uint32_tbl_add:
  119|  24.3k|{
  120|  24.3k|  uint32_t key, start_pos;
  121|       |
  122|  24.3k|  DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
  ------------------
  |  | 1079|  24.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (122:3): [True: 0, False: 24.3k]
  |  Branch (122:3): [True: 24.3k, False: 0]
  ------------------
  123|  24.3k|  if(!entry || !pkey)
  ------------------
  |  Branch (123:6): [True: 0, False: 24.3k]
  |  Branch (123:16): [True: 0, False: 24.3k]
  ------------------
  124|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  125|  24.3k|  *pkey = UINT32_MAX;
  126|  24.3k|  if(tbl->nentries == tbl->nrows)  /* full */
  ------------------
  |  Branch (126:6): [True: 0, False: 24.3k]
  ------------------
  127|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  128|       |
  129|  24.3k|  start_pos = CURLMIN(tbl->last_key_added, tbl->nrows) + 1;
  ------------------
  |  | 1292|  24.3k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 12.5k, False: 11.7k]
  |  |  ------------------
  ------------------
  130|  24.3k|  for(key = start_pos; key < tbl->nrows; ++key) {
  ------------------
  |  Branch (130:24): [True: 12.5k, False: 11.7k]
  ------------------
  131|  12.5k|    if(!tbl->rows[key]) {
  ------------------
  |  Branch (131:8): [True: 12.5k, False: 0]
  ------------------
  132|  12.5k|      tbl->rows[key] = entry;
  133|  12.5k|      tbl->nentries++;
  134|  12.5k|      tbl->last_key_added = key;
  135|  12.5k|      *pkey = key;
  136|  12.5k|      return TRUE;
  ------------------
  |  | 1053|  12.5k|#define TRUE true
  ------------------
  137|  12.5k|    }
  138|  12.5k|  }
  139|       |  /* no free entry at or above tbl->maybe_next_key, wrap around */
  140|  11.7k|  for(key = 0; key < start_pos; ++key) {
  ------------------
  |  Branch (140:16): [True: 11.7k, False: 0]
  ------------------
  141|  11.7k|    if(!tbl->rows[key]) {
  ------------------
  |  Branch (141:8): [True: 11.7k, False: 0]
  ------------------
  142|  11.7k|      tbl->rows[key] = entry;
  143|  11.7k|      tbl->nentries++;
  144|  11.7k|      tbl->last_key_added = key;
  145|  11.7k|      *pkey = key;
  146|  11.7k|      return TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  147|  11.7k|    }
  148|  11.7k|  }
  149|       |  /* Did not find any free row? Should not happen */
  150|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (150:3): [Folded, False: 0]
  |  Branch (150:3): [Folded, False: 0]
  ------------------
  151|      0|  return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  152|      0|}
Curl_uint32_tbl_remove:
  155|  24.3k|{
  156|  24.3k|  uint32_tbl_clear_rows(tbl, key, key + 1);
  157|  24.3k|}
Curl_uint32_tbl_contains:
  160|  12.5k|{
  161|  12.5k|  return (key < tbl->nrows) ? !!tbl->rows[key] : FALSE;
  ------------------
  |  | 1056|  12.5k|#define FALSE false
  ------------------
  |  Branch (161:10): [True: 12.5k, False: 0]
  ------------------
  162|  12.5k|}
Curl_uint32_tbl_first:
  181|  11.7k|{
  182|  11.7k|  if(!pkey || !pentry)
  ------------------
  |  Branch (182:6): [True: 0, False: 11.7k]
  |  Branch (182:15): [True: 0, False: 11.7k]
  ------------------
  183|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  184|  11.7k|  if(tbl->nentries && uint32_tbl_next_at(tbl, 0, pkey, pentry))
  ------------------
  |  Branch (184:6): [True: 11.7k, False: 0]
  |  Branch (184:23): [True: 11.7k, False: 0]
  ------------------
  185|  11.7k|    return TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  186|      0|  DEBUGASSERT(!tbl->nentries);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (186:3): [True: 0, False: 0]
  |  Branch (186:3): [True: 0, False: 0]
  ------------------
  187|      0|  *pkey = UINT32_MAX;  /* always invalid */
  188|      0|  *pentry = NULL;
  189|       |  return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  190|      0|}
Curl_uint32_tbl_next:
  194|  11.7k|{
  195|  11.7k|  if(!pkey || !pentry)
  ------------------
  |  Branch (195:6): [True: 0, False: 11.7k]
  |  Branch (195:15): [True: 0, False: 11.7k]
  ------------------
  196|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  197|  11.7k|  if(uint32_tbl_next_at(tbl, last_key + 1, pkey, pentry))
  ------------------
  |  Branch (197:6): [True: 0, False: 11.7k]
  ------------------
  198|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  199|  11.7k|  *pkey = UINT32_MAX;  /* always invalid */
  200|  11.7k|  *pentry = NULL;
  201|       |  return FALSE;
  ------------------
  |  | 1056|  11.7k|#define FALSE false
  ------------------
  202|  11.7k|}
uint-table.c:uint32_tbl_clear_rows:
   46|  36.1k|{
   47|  36.1k|  uint32_t i, end;
   48|       |
   49|  36.1k|  end = CURLMIN(upto_excluding, tbl->nrows);
  ------------------
  |  | 1292|  36.1k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 24.3k, False: 11.7k]
  |  |  ------------------
  ------------------
   50|  6.09M|  for(i = from; i < end; ++i) {
  ------------------
  |  Branch (50:17): [True: 6.05M, False: 36.1k]
  ------------------
   51|  6.05M|    if(tbl->rows[i]) {
  ------------------
  |  Branch (51:8): [True: 24.3k, False: 6.03M]
  ------------------
   52|  24.3k|      if(tbl->entry_dtor)
  ------------------
  |  Branch (52:10): [True: 0, False: 24.3k]
  ------------------
   53|      0|        tbl->entry_dtor(i, tbl->rows[i]);
   54|       |      tbl->rows[i] = NULL;
   55|  24.3k|      tbl->nentries--;
   56|  24.3k|    }
   57|  6.05M|  }
   58|  36.1k|}
uint-table.c:uint32_tbl_next_at:
  166|  23.5k|{
  167|  6.04M|  for(; key < tbl->nrows; ++key) {
  ------------------
  |  Branch (167:9): [True: 6.03M, False: 11.7k]
  ------------------
  168|  6.03M|    if(tbl->rows[key]) {
  ------------------
  |  Branch (168:8): [True: 11.7k, False: 6.02M]
  ------------------
  169|  11.7k|      *pkey = key;
  170|  11.7k|      *pentry = tbl->rows[key];
  171|  11.7k|      return TRUE;
  ------------------
  |  | 1053|  11.7k|#define TRUE true
  ------------------
  172|  11.7k|    }
  173|  6.03M|  }
  174|  11.7k|  *pkey = UINT32_MAX;  /* always invalid */
  175|  11.7k|  *pentry = NULL;
  176|       |  return FALSE;
  ------------------
  |  | 1056|  11.7k|#define FALSE false
  ------------------
  177|  23.5k|}

Curl_freeset:
  150|  26.2k|{
  151|       |  /* Free all dynamic strings stored in the data->set substructure. */
  152|  26.2k|  enum dupstring i;
  153|  26.2k|  enum dupblob j;
  154|       |
  155|  1.89M|  for(i = (enum dupstring)0; i < STRING_LAST; i++) {
  ------------------
  |  Branch (155:30): [True: 1.86M, False: 26.2k]
  ------------------
  156|  1.86M|    if(i == STRING_PASSWORD ||
  ------------------
  |  Branch (156:8): [True: 26.2k, False: 1.83M]
  ------------------
  157|  1.83M|       i == STRING_KEY_PASSWD ||
  ------------------
  |  Branch (157:8): [True: 26.2k, False: 1.81M]
  ------------------
  158|  1.81M|#ifndef CURL_DISABLE_PROXY
  159|  1.81M|       i == STRING_PROXYPASSWORD ||
  ------------------
  |  Branch (159:8): [True: 26.2k, False: 1.78M]
  ------------------
  160|  1.78M|       i == STRING_KEY_PASSWD_PROXY ||
  ------------------
  |  Branch (160:8): [True: 26.2k, False: 1.75M]
  ------------------
  161|  1.75M|#endif
  162|  1.75M|       i == STRING_BEARER) {
  ------------------
  |  Branch (162:8): [True: 26.2k, False: 1.73M]
  ------------------
  163|   131k|      curlx_strzero(data->set.str[i]);
  164|   131k|    }
  165|  1.86M|    curlx_safefree(data->set.str[i]);
  ------------------
  |  | 1336|  1.86M|  do {                      \
  |  | 1337|  1.86M|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  1.86M|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  1.86M|    (ptr) = NULL;           \
  |  | 1339|  1.86M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 1.86M]
  |  |  ------------------
  ------------------
  166|  1.86M|  }
  167|       |
  168|   236k|  for(j = (enum dupblob)0; j < BLOB_LAST; j++) {
  ------------------
  |  Branch (168:28): [True: 210k, False: 26.2k]
  ------------------
  169|   210k|    curlx_safefree(data->set.blobs[j]);
  ------------------
  |  | 1336|   210k|  do {                      \
  |  | 1337|   210k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|   210k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|   210k|    (ptr) = NULL;           \
  |  | 1339|   210k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 210k]
  |  |  ------------------
  ------------------
  170|   210k|  }
  171|       |
  172|  26.2k|  Curl_bufref_free(&data->state.referer);
  173|  26.2k|  Curl_bufref_free(&data->state.url);
  174|       |
  175|  26.2k|#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
  176|  26.2k|  Curl_mime_cleanpart(data->set.mimepostp);
  177|  26.2k|  curlx_safefree(data->set.mimepostp);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  178|  26.2k|#endif
  179|       |
  180|  26.2k|#ifndef CURL_DISABLE_COOKIES
  181|  26.2k|  curl_slist_free_all(data->state.cookielist);
  182|       |  data->state.cookielist = NULL;
  183|  26.2k|#endif
  184|  26.2k|}
Curl_close:
  205|  26.2k|{
  206|  26.2k|  struct Curl_easy *data;
  207|       |
  208|  26.2k|  if(!datap || !*datap)
  ------------------
  |  Branch (208:6): [True: 0, False: 26.2k]
  |  Branch (208:16): [True: 10, False: 26.2k]
  ------------------
  209|     10|    return CURLE_OK;
  210|       |
  211|  26.2k|  data = *datap;
  212|  26.2k|  *datap = NULL;
  213|       |
  214|  26.2k|  if(!data->state.internal && data->multi) {
  ------------------
  |  Branch (214:6): [True: 13.6k, False: 12.5k]
  |  Branch (214:31): [True: 0, False: 13.6k]
  ------------------
  215|       |    /* This handle is still part of a multi handle, take care of this first
  216|       |       and detach this handle from there.
  217|       |       This detaches the connection. */
  218|      0|    Curl_multi_remove_handle(data->multi, data);
  219|      0|  }
  220|  26.2k|  else {
  221|       |    /* Detach connection if any is left. This should not be normal, but can be
  222|       |       the case for example with CONNECT_ONLY + recv/send (test 556) */
  223|  26.2k|    Curl_detach_connection(data);
  224|  26.2k|    if(!data->state.internal && data->multi_easy) {
  ------------------
  |  Branch (224:8): [True: 13.6k, False: 12.5k]
  |  Branch (224:33): [True: 0, False: 13.6k]
  ------------------
  225|       |      /* when curl_easy_perform() is used, it creates its own multi handle to
  226|       |         use and this is the one */
  227|      0|      curl_multi_cleanup(data->multi_easy);
  228|      0|      data->multi_easy = NULL;
  229|      0|    }
  230|  26.2k|  }
  231|  26.2k|  DEBUGASSERT(!data->conn || data->state.internal);
  ------------------
  |  | 1079|  26.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (231:3): [True: 26.2k, False: 0]
  |  Branch (231:3): [True: 0, False: 0]
  |  Branch (231:3): [True: 26.2k, False: 0]
  |  Branch (231:3): [True: 0, False: 0]
  ------------------
  232|       |
  233|  26.2k|  Curl_expire_clear(data); /* shut off any timers left */
  234|       |
  235|  26.2k|  if(data->state.rangestringalloc)
  ------------------
  |  Branch (235:6): [True: 46, False: 26.2k]
  ------------------
  236|     46|    curlx_free(data->state.range);
  ------------------
  |  | 1478|     46|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  237|       |
  238|       |  /* release any resolve information this transfer kept */
  239|  26.2k|  Curl_resolv_destroy_all(data);
  240|       |
  241|  26.2k|  data->set.verbose = FALSE; /* no more calls to DEBUGFUNCTION */
  ------------------
  |  | 1056|  26.2k|#define FALSE false
  ------------------
  242|  26.2k|  data->magic = 0; /* force a clear AFTER the possibly enforced removal from
  243|       |                    * the multi handle and async dns shutdown. The multi
  244|       |                    * handle might check the magic and so might any
  245|       |                    * DEBUGFUNCTION invoked for tracing */
  246|       |
  247|       |  /* freed here in case DONE was not called */
  248|  26.2k|  Curl_req_free(&data->req, data);
  249|       |
  250|       |  /* Close down all open SSL info and sessions */
  251|  26.2k|  Curl_ssl_close_all(data);
  252|  26.2k|  Curl_peer_unlink(&data->state.origin);
  253|  26.2k|  Curl_peer_unlink(&data->state.initial_origin);
  254|  26.2k|  Curl_ssl_free_certinfo(data);
  255|       |
  256|  26.2k|  Curl_bufref_free(&data->state.referer);
  257|       |
  258|  26.2k|  up_free(data);
  259|  26.2k|  curlx_dyn_free(&data->state.headerb);
  260|  26.2k|  Curl_flush_cookies(data, TRUE);
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  261|  26.2k|#ifndef CURL_DISABLE_ALTSVC
  262|  26.2k|  Curl_altsvc_save(data, data->asi, data->set.str[STRING_ALTSVC]);
  263|  26.2k|  Curl_altsvc_cleanup(&data->asi);
  264|  26.2k|#endif
  265|  26.2k|#ifndef CURL_DISABLE_HSTS
  266|  26.2k|  Curl_hsts_save(data, data->hsts, data->set.str[STRING_HSTS]);
  267|  26.2k|  if(!data->share || !data->share->hsts)
  ------------------
  |  Branch (267:6): [True: 26.2k, False: 0]
  |  Branch (267:22): [True: 0, False: 0]
  ------------------
  268|  26.2k|    Curl_hsts_cleanup(&data->hsts);
  269|  26.2k|  curl_slist_free_all(data->state.hstslist); /* clean up list */
  270|  26.2k|#endif
  271|  26.2k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
  272|  26.2k|  Curl_http_auth_cleanup_digest(data);
  273|  26.2k|#endif
  274|  26.2k|  curlx_safefree(data->state.most_recent_ftp_entrypath);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  275|  26.2k|  curlx_safefree(data->info.contenttype);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  276|  26.2k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  277|       |
  278|       |  /* No longer a dirty share, if it exists */
  279|  26.2k|  if(Curl_share_easy_unlink(data))
  ------------------
  |  Branch (279:6): [True: 0, False: 26.2k]
  ------------------
  280|  26.2k|    DEBUGASSERT(0);
  ------------------
  |  | 1079|  26.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (280:5): [Folded, False: 0]
  |  Branch (280:5): [Folded, False: 0]
  ------------------
  281|       |
  282|  26.2k|  Curl_hash_destroy(&data->meta_hash);
  283|  26.2k|  Curl_creds_unlink(&data->state.creds);
  284|  26.2k|  curlx_safefree(data->state.aptr.uagent);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  285|  26.2k|  curlx_safefree(data->state.aptr.accept_encoding);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  286|  26.2k|  curlx_safefree(data->state.aptr.rangeline);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  287|  26.2k|  curlx_safefree(data->state.aptr.ref);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  288|  26.2k|  curlx_safefree(data->state.aptr.host);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  289|  26.2k|#ifndef CURL_DISABLE_COOKIES
  290|  26.2k|  curlx_safefree(data->req.cookiehost);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  291|  26.2k|#endif
  292|  26.2k|#ifndef CURL_DISABLE_RTSP
  293|  26.2k|  curlx_safefree(data->state.aptr.rtsp_transport);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  294|  26.2k|#endif
  295|       |
  296|  26.2k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_FORM_API)
  297|  26.2k|  Curl_mime_cleanpart(data->state.formp);
  298|  26.2k|  curlx_safefree(data->state.formp);
  ------------------
  |  | 1336|  26.2k|  do {                      \
  |  | 1337|  26.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.2k|    (ptr) = NULL;           \
  |  | 1339|  26.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  299|  26.2k|#endif
  300|       |
  301|       |  /* destruct wildcard structures if it is needed */
  302|  26.2k|  Curl_wildcard_dtor(&data->wildcard);
  303|  26.2k|  Curl_freeset(data);
  304|  26.2k|  Curl_headers_cleanup(data);
  305|  26.2k|  Curl_netrc_cleanup(&data->state.netrc);
  306|  26.2k|#ifndef CURL_DISABLE_DIGEST_AUTH
  307|  26.2k|  curlx_free(data->state.envproxy);
  ------------------
  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  308|  26.2k|#endif
  309|  26.2k|  Curl_ssl_config_cleanup(&data->set.ssl.primary);
  310|  26.2k|#ifndef CURL_DISABLE_PROXY
  311|  26.2k|  Curl_ssl_config_cleanup(&data->set.proxy_ssl.primary);
  312|  26.2k|#endif
  313|  26.2k|  curlx_memzero(data, sizeof(*data));
  314|  26.2k|  curlx_free(data);
  ------------------
  |  | 1478|  26.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  315|  26.2k|  return CURLE_OK;
  316|  26.2k|}
Curl_init_userdefined:
  323|  26.2k|{
  324|  26.2k|  struct UserDefined *set = &data->set;
  325|       |
  326|  26.2k|  set->out = stdout;  /* default output to stdout */
  327|  26.2k|  set->in_set = stdin;  /* default input from stdin */
  328|  26.2k|  set->err = stderr;  /* default stderr to stderr */
  329|       |
  330|  26.2k|#if defined(__clang__) && __clang_major__ >= 16
  331|  26.2k|#pragma clang diagnostic push
  332|  26.2k|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
  333|  26.2k|#endif
  334|       |  /* use fwrite as default function to store output */
  335|  26.2k|  set->fwrite_func = (curl_write_callback)fwrite;
  336|       |
  337|       |  /* use fread as default function to read input */
  338|  26.2k|  set->fread_func_set = (curl_read_callback)fread;
  339|  26.2k|#if defined(__clang__) && __clang_major__ >= 16
  340|  26.2k|#pragma clang diagnostic pop
  341|  26.2k|#endif
  342|  26.2k|  set->is_fread_set = 0;
  343|       |
  344|  26.2k|  set->seek_client = ZERO_NULL;
  ------------------
  |  | 1162|  26.2k|#define ZERO_NULL 0
  ------------------
  345|       |
  346|  26.2k|  set->filesize = -1;        /* we do not know the size */
  347|  26.2k|  set->postfieldsize = -1;   /* unknown size */
  348|  26.2k|  set->maxredirs = 30;       /* sensible default */
  349|       |
  350|  26.2k|  set->method = HTTPREQ_GET; /* Default HTTP request */
  351|  26.2k|#ifndef CURL_DISABLE_RTSP
  352|  26.2k|  set->rtspreq = RTSPREQ_OPTIONS; /* Default RTSP request */
  353|  26.2k|#endif
  354|  26.2k|#ifndef CURL_DISABLE_FTP
  355|  26.2k|  set->ftp_use_epsv = TRUE;   /* FTP defaults to EPSV operations */
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  356|  26.2k|  set->ftp_use_eprt = TRUE;   /* FTP defaults to EPRT operations */
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  357|  26.2k|  set->ftp_use_pret = FALSE;  /* mainly useful for drftpd servers */
  ------------------
  |  | 1056|  26.2k|#define FALSE false
  ------------------
  358|  26.2k|  set->ftp_filemethod = FTPFILE_MULTICWD;
  359|  26.2k|  set->ftp_skip_ip = TRUE;    /* skip PASV IP by default */
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  360|  26.2k|#endif
  361|  26.2k|  set->dns_cache_timeout_ms = 60000; /* Timeout every 60 seconds by default */
  362|       |
  363|       |  /* Timeout every 24 hours by default */
  364|  26.2k|  set->general_ssl.ca_cache_timeout = 24 * 60 * 60;
  365|       |
  366|  26.2k|  set->httpauth = CURLAUTH_BASIC;  /* defaults to basic */
  ------------------
  |  |  831|  26.2k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  367|       |
  368|  26.2k|  Curl_ssl_config_init(&data->set.ssl.primary);
  369|  26.2k|#ifndef CURL_DISABLE_PROXY
  370|  26.2k|  Curl_ssl_config_init(&data->set.proxy_ssl.primary);
  371|  26.2k|  set->proxyport = 0;
  372|  26.2k|  set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
  ------------------
  |  |  790|  26.2k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  373|  26.2k|  set->proxyauth = CURLAUTH_BASIC; /* defaults to basic */
  ------------------
  |  |  831|  26.2k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  374|       |  /* SOCKS5 proxy auth defaults to username/password + GSS-API */
  375|  26.2k|  set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  831|  26.2k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  837|  26.2k|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|  26.2k|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  376|  26.2k|#endif
  377|       |
  378|  26.2k|#ifndef CURL_DISABLE_DOH
  379|  26.2k|  set->doh_verifyhost = TRUE;
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  380|  26.2k|  set->doh_verifypeer = TRUE;
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  381|  26.2k|#endif
  382|       |#ifdef USE_SSH
  383|       |  /* defaults to any auth type */
  384|       |  set->ssh_auth_types = CURLSSH_AUTH_DEFAULT;
  385|       |  set->new_directory_perms = 0755; /* Default permissions */
  386|       |#endif
  387|       |
  388|  26.2k|  set->new_file_perms = 0644;    /* Default permissions */
  389|  26.2k|  set->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
  ------------------
  |  |   68|  26.2k|#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
  ------------------
  390|  26.2k|  set->redir_protocols = CURLPROTO_REDIR;
  ------------------
  |  |   71|  26.2k|#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1086|  26.2k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1087|  26.2k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1088|  26.2k|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |   72|  26.2k|                         CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1089|  26.2k|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  391|       |
  392|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  393|       |  /*
  394|       |   * disallow unprotected protection negotiation NEC reference implementation
  395|       |   * seem not to follow rfc1961 section 4.3/4.4
  396|       |   */
  397|       |  set->socks5_gssapi_nec = FALSE;
  398|       |#endif
  399|       |
  400|       |  /* set default minimum TLS version */
  401|  26.2k|#ifdef USE_SSL
  402|  26.2k|  Curl_setopt_SSLVERSION(data, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2392|  26.2k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  403|  26.2k|#ifndef CURL_DISABLE_PROXY
  404|  26.2k|  Curl_setopt_SSLVERSION(data, CURLOPT_PROXY_SSLVERSION,
  405|  26.2k|                         CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2392|  26.2k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  406|  26.2k|#endif
  407|  26.2k|#endif
  408|  26.2k|#ifndef CURL_DISABLE_FTP
  409|  26.2k|  set->wildcard_enabled = FALSE;
  ------------------
  |  | 1056|  26.2k|#define FALSE false
  ------------------
  410|  26.2k|  set->chunk_bgn = ZERO_NULL;
  ------------------
  |  | 1162|  26.2k|#define ZERO_NULL 0
  ------------------
  411|  26.2k|  set->chunk_end = ZERO_NULL;
  ------------------
  |  | 1162|  26.2k|#define ZERO_NULL 0
  ------------------
  412|  26.2k|  set->fnmatch = ZERO_NULL;
  ------------------
  |  | 1162|  26.2k|#define ZERO_NULL 0
  ------------------
  413|  26.2k|#endif
  414|  26.2k|  set->tcp_keepalive = FALSE;
  ------------------
  |  | 1056|  26.2k|#define FALSE false
  ------------------
  415|  26.2k|  set->tcp_keepintvl = 60;
  416|  26.2k|  set->tcp_keepidle = 60;
  417|  26.2k|  set->tcp_keepcnt = 9;
  418|  26.2k|  set->tcp_fastopen = FALSE;
  ------------------
  |  | 1056|  26.2k|#define FALSE false
  ------------------
  419|  26.2k|  set->tcp_nodelay = TRUE;
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  420|  26.2k|  set->ssl_enable_alpn = TRUE;
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  421|  26.2k|  set->expect_100_timeout = 1000L; /* Wait for a second by default. */
  422|  26.2k|  set->sep_headers = TRUE; /* separated header lists by default */
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  423|  26.2k|  set->buffer_size = READBUFFER_SIZE;
  ------------------
  |  |  120|  26.2k|#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  265|  26.2k|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
  424|  26.2k|  set->upload_buffer_size = UPLOADBUFFER_DEFAULT;
  ------------------
  |  |  132|  26.2k|#define UPLOADBUFFER_DEFAULT 65536
  ------------------
  425|  26.2k|  set->upload_flags = CURLULFLAG_SEEN;
  ------------------
  |  | 1052|  26.2k|#define CURLULFLAG_SEEN     (1L << 4)
  ------------------
  426|  26.2k|  set->happy_eyeballs_timeout = CURL_HET_DEFAULT;
  ------------------
  |  |  977|  26.2k|#define CURL_HET_DEFAULT 200L
  ------------------
  427|  26.2k|  set->upkeep_interval_ms = CURL_UPKEEP_INTERVAL_DEFAULT;
  ------------------
  |  |  980|  26.2k|#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
  ------------------
  428|  26.2k|  set->maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
  ------------------
  |  |   38|  26.2k|#define DEFAULT_CONNCACHE_SIZE 5
  ------------------
  429|  26.2k|  set->conn_max_idle_ms = 118 * 1000;
  430|  26.2k|  set->conn_max_age_ms = 24 * 3600 * 1000;
  431|  26.2k|  set->http09_allowed = FALSE;
  ------------------
  |  | 1056|  26.2k|#define FALSE false
  ------------------
  432|  26.2k|  set->httpwant = CURL_HTTP_VERSION_NONE;
  ------------------
  |  | 2336|  26.2k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  433|  26.2k|#if defined(USE_HTTP2) || defined(USE_HTTP3)
  434|  26.2k|  memset(&set->priority, 0, sizeof(set->priority));
  435|  26.2k|#endif
  436|  26.2k|  set->quick_exit = 0L;
  437|  26.2k|#ifndef CURL_DISABLE_WEBSOCKETS
  438|  26.2k|  set->ws_raw_mode = FALSE;
  ------------------
  |  | 1056|  26.2k|#define FALSE false
  ------------------
  439|       |  set->ws_no_auto_pong = FALSE;
  ------------------
  |  | 1056|  26.2k|#define FALSE false
  ------------------
  440|  26.2k|#endif
  441|  26.2k|}
Curl_open:
  463|  26.2k|{
  464|  26.2k|  struct Curl_easy *data;
  465|       |
  466|       |  /* simple start-up: alloc the struct, init it with zeroes and return */
  467|  26.2k|  data = curlx_calloc(1, sizeof(struct Curl_easy));
  ------------------
  |  | 1475|  26.2k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  468|  26.2k|  if(!data) {
  ------------------
  |  Branch (468:6): [True: 0, False: 26.2k]
  ------------------
  469|       |    /* this is a serious error */
  470|      0|    DEBUGF(curl_mfprintf(stderr, "Error: calloc of Curl_easy failed\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
  471|      0|    return CURLE_OUT_OF_MEMORY;
  472|      0|  }
  473|       |
  474|  26.2k|  data->magic = CURLEASY_MAGIC_NUMBER;
  ------------------
  |  |   28|  26.2k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  ------------------
  475|       |  /* most recent connection is not yet defined */
  476|  26.2k|  data->state.lastconnect_id = -1;
  477|  26.2k|  data->state.recent_conn_id = -1;
  478|       |  /* and not assigned an id yet */
  479|  26.2k|  data->id = -1;
  480|  26.2k|  data->mid = UINT32_MAX;
  481|  26.2k|  data->master_mid = UINT32_MAX;
  482|  26.2k|  data->progress.hide = TRUE;
  ------------------
  |  | 1053|  26.2k|#define TRUE true
  ------------------
  483|  26.2k|  data->state.current_speed = -1; /* init to negative == impossible */
  484|       |
  485|  26.2k|  Curl_hash_init(&data->meta_hash, 23,
  486|  26.2k|                 Curl_hash_str, curlx_str_key_compare, easy_meta_freeentry);
  487|  26.2k|  curlx_dyn_init(&data->state.headerb, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  26.2k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  488|  26.2k|  Curl_bufref_init(&data->state.url);
  489|  26.2k|  Curl_bufref_init(&data->state.referer);
  490|  26.2k|  Curl_req_init(&data->req);
  491|  26.2k|  Curl_initinfo(data);
  492|  26.2k|#ifndef CURL_DISABLE_HTTP
  493|  26.2k|  Curl_llist_init(&data->state.httphdrs, NULL);
  494|  26.2k|#endif
  495|  26.2k|  Curl_netrc_init(&data->state.netrc);
  496|  26.2k|  Curl_init_userdefined(data);
  497|       |
  498|  26.2k|  *curl = data;
  499|  26.2k|  return CURLE_OK;
  500|  26.2k|}
Curl_conn_free:
  503|  7.37k|{
  504|  7.37k|  size_t i;
  505|       |
  506|  7.37k|  DEBUGASSERT(conn);
  ------------------
  |  | 1079|  7.37k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (506:3): [True: 0, False: 7.37k]
  |  Branch (506:3): [True: 7.37k, False: 0]
  ------------------
  507|       |
  508|  7.37k|  if(conn->scheme && conn->scheme->run->disconnect &&
  ------------------
  |  Branch (508:6): [True: 6.52k, False: 856]
  |  Branch (508:22): [True: 0, False: 6.52k]
  ------------------
  509|      0|     !conn->bits.shutdown_handler)
  ------------------
  |  Branch (509:6): [True: 0, False: 0]
  ------------------
  510|      0|    conn->scheme->run->disconnect(data, conn, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  511|       |
  512|  22.1k|  for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1303|  22.1k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (512:14): [True: 14.7k, False: 7.37k]
  ------------------
  513|  14.7k|    Curl_conn_cf_discard_all(data, conn, (int)i);
  514|  14.7k|  }
  515|       |
  516|  7.37k|#ifndef CURL_DISABLE_PROXY
  517|  7.37k|  Curl_peer_unlink(&conn->http_proxy.peer);
  518|  7.37k|  Curl_peer_unlink(&conn->socks_proxy.peer);
  519|  7.37k|  Curl_creds_unlink(&conn->http_proxy.creds);
  520|  7.37k|  Curl_creds_unlink(&conn->socks_proxy.creds);
  521|  7.37k|#endif
  522|  7.37k|  Curl_creds_unlink(&conn->creds);
  523|  7.37k|  Curl_peer_unlink(&conn->creds_origin);
  524|  7.37k|  curlx_safefree(conn->options);
  ------------------
  |  | 1336|  7.37k|  do {                      \
  |  | 1337|  7.37k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  7.37k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  7.37k|    (ptr) = NULL;           \
  |  | 1339|  7.37k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 7.37k]
  |  |  ------------------
  ------------------
  525|  7.37k|  curlx_safefree(conn->localdev);
  ------------------
  |  | 1336|  7.37k|  do {                      \
  |  | 1337|  7.37k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  7.37k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  7.37k|    (ptr) = NULL;           \
  |  | 1339|  7.37k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 7.37k]
  |  |  ------------------
  ------------------
  526|  7.37k|  Curl_ssl_conn_config_cleanup(conn);
  527|       |
  528|  7.37k|  curlx_safefree(conn->destination);
  ------------------
  |  | 1336|  7.37k|  do {                      \
  |  | 1337|  7.37k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  7.37k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  7.37k|    (ptr) = NULL;           \
  |  | 1339|  7.37k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 7.37k]
  |  |  ------------------
  ------------------
  529|  7.37k|  Curl_hash_destroy(&conn->meta_hash);
  530|  7.37k|  Curl_peer_unlink(&conn->origin);
  531|  7.37k|  Curl_peer_unlink(&conn->via_peer);
  532|  7.37k|  Curl_peer_unlink(&conn->origin2);
  533|  7.37k|  Curl_peer_unlink(&conn->via_peer2);
  534|       |
  535|  7.37k|  curlx_free(conn); /* free all the connection oriented data */
  ------------------
  |  | 1478|  7.37k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  536|  7.37k|}
Curl_uc_to_curlcode:
 1259|    842|{
 1260|    842|  switch(uc) {
 1261|    841|  default:
  ------------------
  |  Branch (1261:3): [True: 841, False: 1]
  ------------------
 1262|    841|    return CURLE_URL_MALFORMAT;
 1263|      0|  case CURLUE_UNSUPPORTED_SCHEME:
  ------------------
  |  Branch (1263:3): [True: 0, False: 842]
  ------------------
 1264|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
 1265|      0|  case CURLUE_OUT_OF_MEMORY:
  ------------------
  |  Branch (1265:3): [True: 0, False: 842]
  ------------------
 1266|      0|    return CURLE_OUT_OF_MEMORY;
 1267|      1|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (1267:3): [True: 1, False: 841]
  ------------------
 1268|      1|    return CURLE_LOGIN_DENIED;
 1269|    842|  }
 1270|    842|}
Curl_parse_login_details:
 1664|  2.05k|{
 1665|  2.05k|  char *ubuf = NULL;
 1666|  2.05k|  char *pbuf = NULL;
 1667|  2.05k|  const char *psep = NULL;
 1668|  2.05k|  const char *osep = NULL;
 1669|  2.05k|  size_t ulen;
 1670|  2.05k|  size_t plen;
 1671|  2.05k|  size_t olen;
 1672|       |
 1673|  2.05k|  DEBUGASSERT(userp);
  ------------------
  |  | 1079|  2.05k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1673:3): [True: 0, False: 2.05k]
  |  Branch (1673:3): [True: 2.05k, False: 0]
  ------------------
 1674|  2.05k|  DEBUGASSERT(passwdp);
  ------------------
  |  | 1079|  2.05k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1674:3): [True: 0, False: 2.05k]
  |  Branch (1674:3): [True: 2.05k, False: 0]
  ------------------
 1675|       |
 1676|       |  /* Attempt to find the password separator */
 1677|  2.05k|  psep = memchr(login, ':', len);
 1678|       |
 1679|       |  /* Attempt to find the options separator */
 1680|  2.05k|  if(optionsp)
  ------------------
  |  Branch (1680:6): [True: 13, False: 2.04k]
  ------------------
 1681|     13|    osep = memchr(login, ';', len);
 1682|       |
 1683|       |  /* Calculate the portion lengths */
 1684|  2.05k|  ulen = (psep ?
  ------------------
  |  Branch (1684:11): [True: 540, False: 1.51k]
  ------------------
 1685|    540|          (size_t)(osep && psep > osep ? osep - login : psep - login) :
  ------------------
  |  Branch (1685:20): [True: 7, False: 533]
  |  Branch (1685:28): [True: 4, False: 3]
  ------------------
 1686|  2.05k|          (osep ? (size_t)(osep - login) : len));
  ------------------
  |  Branch (1686:12): [True: 5, False: 1.51k]
  ------------------
 1687|  2.05k|  plen = (psep ?
  ------------------
  |  Branch (1687:11): [True: 540, False: 1.51k]
  ------------------
 1688|    540|          (osep && osep > psep ? (size_t)(osep - psep) :
  ------------------
  |  Branch (1688:12): [True: 7, False: 533]
  |  Branch (1688:20): [True: 3, False: 4]
  ------------------
 1689|  1.51k|           (size_t)(login + len - psep)) - 1 : 0);
 1690|  2.05k|  olen = (osep ?
  ------------------
  |  Branch (1690:11): [True: 12, False: 2.04k]
  ------------------
 1691|     12|          (psep && psep > osep ? (size_t)(psep - osep) :
  ------------------
  |  Branch (1691:12): [True: 7, False: 5]
  |  Branch (1691:20): [True: 4, False: 3]
  ------------------
 1692|  2.04k|           (size_t)(login + len - osep)) - 1 : 0);
 1693|       |
 1694|       |  /* Clone the user portion buffer, which can be zero length */
 1695|  2.05k|  ubuf = curlx_memdup0(login, ulen);
 1696|  2.05k|  if(!ubuf)
  ------------------
  |  Branch (1696:6): [True: 0, False: 2.05k]
  ------------------
 1697|      0|    goto error;
 1698|       |
 1699|       |  /* Clone the password portion buffer */
 1700|  2.05k|  if(psep) {
  ------------------
  |  Branch (1700:6): [True: 540, False: 1.51k]
  ------------------
 1701|    540|    pbuf = curlx_memdup0(&psep[1], plen);
 1702|    540|    if(!pbuf)
  ------------------
  |  Branch (1702:8): [True: 0, False: 540]
  ------------------
 1703|      0|      goto error;
 1704|    540|  }
 1705|       |
 1706|       |  /* Allocate the options portion buffer */
 1707|  2.05k|  if(optionsp) {
  ------------------
  |  Branch (1707:6): [True: 13, False: 2.04k]
  ------------------
 1708|     13|    char *obuf = NULL;
 1709|     13|    if(olen) {
  ------------------
  |  Branch (1709:8): [True: 5, False: 8]
  ------------------
 1710|      5|      obuf = curlx_memdup0(&osep[1], olen);
 1711|      5|      if(!obuf)
  ------------------
  |  Branch (1711:10): [True: 0, False: 5]
  ------------------
 1712|      0|        goto error;
 1713|      5|    }
 1714|     13|    *optionsp = obuf;
 1715|     13|  }
 1716|  2.05k|  *userp = ubuf;
 1717|  2.05k|  *passwdp = pbuf;
 1718|  2.05k|  return CURLE_OK;
 1719|      0|error:
 1720|      0|  curlx_free(ubuf);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1721|      0|  curlx_free(pbuf);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1722|      0|  return CURLE_OUT_OF_MEMORY;
 1723|  2.05k|}
Curl_connect:
 2439|  8.39k|{
 2440|  8.39k|  CURLcode result;
 2441|  8.39k|  struct connectdata *conn = NULL;
 2442|       |
 2443|  8.39k|  *pconnected = FALSE;
  ------------------
  |  | 1056|  8.39k|#define FALSE false
  ------------------
 2444|       |
 2445|       |  /* Set the request to virgin state based on transfer settings */
 2446|  8.39k|  Curl_req_hard_reset(&data->req, data);
 2447|       |  /* Determine the origin of the transfer and what credentials to use */
 2448|  8.39k|  result = url_set_data_origin_and_creds(data);
 2449|  8.39k|  if(result)
  ------------------
  |  Branch (2449:6): [True: 1.01k, False: 7.37k]
  ------------------
 2450|  1.01k|    goto out;
 2451|  7.37k|  if(!data->state.origin) { /* just make really sure */
  ------------------
  |  Branch (2451:6): [True: 0, False: 7.37k]
  ------------------
 2452|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2452:5): [Folded, False: 0]
  |  Branch (2452:5): [Folded, False: 0]
  ------------------
 2453|      0|    result = CURLE_FAILED_INIT;
 2454|      0|    goto out;
 2455|      0|  }
 2456|       |
 2457|       |  /* Get or create a connection for the transfer. */
 2458|  7.37k|  result = url_find_or_create_conn(data);
 2459|  7.37k|  conn = data->conn;
 2460|  7.37k|  if(result)
  ------------------
  |  Branch (2460:6): [True: 1.12k, False: 6.25k]
  ------------------
 2461|  1.12k|    goto out;
 2462|  6.25k|  if(!data->conn) { /* just make really sure */
  ------------------
  |  Branch (2462:6): [True: 0, False: 6.25k]
  ------------------
 2463|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2463:5): [Folded, False: 0]
  |  Branch (2463:5): [Folded, False: 0]
  ------------------
 2464|      0|    result = CURLE_FAILED_INIT;
 2465|      0|    goto out;
 2466|      0|  }
 2467|       |
 2468|  6.25k|  Curl_pgrsTime(data, TIMER_POSTQUEUE);
 2469|  6.25k|  if(conn->bits.reuse) {
  ------------------
  |  Branch (2469:6): [True: 0, False: 6.25k]
  ------------------
 2470|      0|    if(conn->attached_xfers > 1)
  ------------------
  |  Branch (2470:8): [True: 0, False: 0]
  ------------------
 2471|       |      /* multiplexed */
 2472|      0|      *pconnected = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2473|      0|  }
 2474|  6.25k|  else if(conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  214|  6.25k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2474:11): [True: 0, False: 6.25k]
  ------------------
 2475|      0|    Curl_pgrsTime(data, TIMER_NAMELOOKUP);
 2476|      0|    *pconnected = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2477|      0|  }
 2478|  6.25k|  else {
 2479|  6.25k|    result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  233|  6.25k|#define FIRSTSOCKET     0
  ------------------
                  result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  355|  6.25k|#define CURL_CF_SSL_DEFAULT  (-1)
  ------------------
 2480|  6.25k|    if(!result)
  ------------------
  |  Branch (2480:8): [True: 6.25k, False: 0]
  ------------------
 2481|  6.25k|      result = Curl_headers_init(data);
 2482|  6.25k|    CURL_TRC_M(data, "Curl_conn_setup() -> %d", (int)result);
  ------------------
  |  |  148|  6.25k|  do {                                   \
  |  |  149|  6.25k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.25k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  6.25k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  12.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 6.25k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  12.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  6.25k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.25k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.25k]
  |  |  ------------------
  ------------------
 2483|  6.25k|  }
 2484|       |
 2485|  8.39k|out:
 2486|  8.39k|  if(result == CURLE_NO_CONNECTION_AVAILABLE)
  ------------------
  |  Branch (2486:6): [True: 248, False: 8.14k]
  ------------------
 2487|  8.39k|    DEBUGASSERT(!conn);
  ------------------
  |  | 1079|  8.39k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2487:5): [True: 0, False: 248]
  |  Branch (2487:5): [True: 248, False: 0]
  ------------------
 2488|       |
 2489|  8.39k|  if(result && conn) {
  ------------------
  |  Branch (2489:6): [True: 2.13k, False: 6.25k]
  |  Branch (2489:16): [True: 0, False: 2.13k]
  ------------------
 2490|       |    /* We are not allowed to return failure with memory left allocated in the
 2491|       |       connectdata struct, free those here */
 2492|      0|    Curl_detach_connection(data);
 2493|      0|    Curl_conn_terminate(data, conn, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2494|      0|  }
 2495|       |
 2496|  8.39k|  return result;
 2497|  8.39k|}
Curl_init_do:
 2510|  6.25k|{
 2511|  6.25k|  CURLcode result;
 2512|       |
 2513|  6.25k|  if(conn) {
  ------------------
  |  Branch (2513:6): [True: 6.25k, False: 0]
  ------------------
 2514|  6.25k|    conn->bits.do_more = FALSE; /* by default there is no curl_do_more() to
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
 2515|       |                                   use */
 2516|       |    /* if the protocol used does not support wildcards, switch it off */
 2517|  6.25k|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (2517:8): [True: 4, False: 6.25k]
  ------------------
 2518|      4|       !(conn->scheme->flags & PROTOPT_WILDCARD))
  ------------------
  |  |  230|      4|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (2518:8): [True: 4, False: 0]
  ------------------
 2519|      4|      data->state.wildcardmatch = FALSE;
  ------------------
  |  | 1056|      4|#define FALSE false
  ------------------
 2520|  6.25k|  }
 2521|       |
 2522|  6.25k|  data->state.done = FALSE; /* *_done() is not called yet */
  ------------------
  |  | 1056|  6.25k|#define FALSE false
  ------------------
 2523|       |
 2524|  6.25k|  data->req.no_body = data->set.opt_no_body;
 2525|  6.25k|  if(data->req.no_body)
  ------------------
  |  Branch (2525:6): [True: 3, False: 6.25k]
  ------------------
 2526|       |    /* in HTTP lingo, no body means using the HEAD request... */
 2527|      3|    data->state.httpreq = HTTPREQ_HEAD;
 2528|       |
 2529|  6.25k|  result = Curl_req_start(&data->req, data);
 2530|  6.25k|  if(!result) {
  ------------------
  |  Branch (2530:6): [True: 6.25k, False: 0]
  ------------------
 2531|  6.25k|    Curl_pgrsReset(data);
 2532|  6.25k|  }
 2533|  6.25k|  return result;
 2534|  6.25k|}
Curl_data_priority_clear_state:
 2539|  8.36k|{
 2540|  8.36k|  memset(&data->state.priority, 0, sizeof(data->state.priority));
 2541|  8.36k|}
Curl_conn_meta_remove:
 2557|  6.25k|{
 2558|  6.25k|  Curl_hash_delete(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  864|  6.25k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2559|  6.25k|}
Curl_1st_fatal:
 2567|  6.25k|{
 2568|  6.25k|  if(r1 && (r1 != CURLE_AGAIN))
  ------------------
  |  Branch (2568:6): [True: 5.65k, False: 596]
  |  Branch (2568:12): [True: 5.65k, False: 0]
  ------------------
 2569|  5.65k|    return r1;
 2570|    596|  if(r2 && (r2 != CURLE_AGAIN))
  ------------------
  |  Branch (2570:6): [True: 0, False: 596]
  |  Branch (2570:12): [True: 0, False: 0]
  ------------------
 2571|      0|    return r2;
 2572|    596|  return r1;
 2573|    596|}
url.c:up_free:
  188|  34.6k|{
  189|  34.6k|  struct urlpieces *up = &data->state.up;
  190|  34.6k|  curlx_safefree(up->options);
  ------------------
  |  | 1336|  34.6k|  do {                      \
  |  | 1337|  34.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  34.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  34.6k|    (ptr) = NULL;           \
  |  | 1339|  34.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 34.6k]
  |  |  ------------------
  ------------------
  191|  34.6k|  curlx_safefree(up->path);
  ------------------
  |  | 1336|  34.6k|  do {                      \
  |  | 1337|  34.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  34.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  34.6k|    (ptr) = NULL;           \
  |  | 1339|  34.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 34.6k]
  |  |  ------------------
  ------------------
  192|  34.6k|  curlx_safefree(up->query);
  ------------------
  |  | 1336|  34.6k|  do {                      \
  |  | 1337|  34.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  34.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  34.6k|    (ptr) = NULL;           \
  |  | 1339|  34.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 34.6k]
  |  |  ------------------
  ------------------
  193|  34.6k|  curl_url_cleanup(data->state.uh);
  194|       |  data->state.uh = NULL;
  195|  34.6k|}
url.c:url_set_data_origin_and_creds:
 2124|  8.39k|{
 2125|  8.39k|  CURLcode result = CURLE_OK;
 2126|  8.39k|  CURLU *uh;
 2127|  8.39k|  CURLUcode uc;
 2128|  8.39k|  bool use_set_uh = (data->set.uh && !data->state.this_is_a_follow);
  ------------------
  |  Branch (2128:22): [True: 0, False: 8.39k]
  |  Branch (2128:38): [True: 0, False: 0]
  ------------------
 2129|  8.39k|  uint16_t port_override = data->state.allow_port ? data->set.use_port : 0;
  ------------------
  |  Branch (2129:28): [True: 8.39k, False: 0]
  ------------------
 2130|  8.39k|  uint32_t scope_id = 0;
 2131|       |
 2132|       |  /*************************************************************
 2133|       |   * Check input data
 2134|       |   *************************************************************/
 2135|  8.39k|  if(!Curl_bufref_ptr(&data->state.url)) {
  ------------------
  |  Branch (2135:6): [True: 0, False: 8.39k]
  ------------------
 2136|      0|    result = CURLE_URL_MALFORMAT;
 2137|      0|    goto out;
 2138|      0|  }
 2139|       |
 2140|  8.39k|  up_free(data); /* cleanup previous leftovers first */
 2141|       |
 2142|       |  /* parse the URL */
 2143|  8.39k|  if(use_set_uh)
  ------------------
  |  Branch (2143:6): [True: 0, False: 8.39k]
  ------------------
 2144|      0|    uh = data->state.uh = curl_url_dup(data->set.uh);
 2145|  8.39k|  else
 2146|  8.39k|    uh = data->state.uh = curl_url();
 2147|  8.39k|  if(!uh) {
  ------------------
  |  Branch (2147:6): [True: 0, False: 8.39k]
  ------------------
 2148|      0|    result = CURLE_OUT_OF_MEMORY;
 2149|      0|    goto out;
 2150|      0|  }
 2151|       |
 2152|       |  /* Calculate the *real* URL this transfer uses, applying defaults
 2153|       |   * where information is missing. */
 2154|  8.39k|  if(data->set.str[STRING_DEFAULT_PROTOCOL] &&
  ------------------
  |  Branch (2154:6): [True: 885, False: 7.50k]
  ------------------
 2155|    885|     !Curl_is_absolute_url(Curl_bufref_ptr(&data->state.url), NULL, 0, TRUE)) {
  ------------------
  |  | 1053|    885|#define TRUE true
  ------------------
  |  Branch (2155:6): [True: 769, False: 116]
  ------------------
 2156|    769|    char *url = curl_maprintf("%s://%s",
 2157|    769|                              data->set.str[STRING_DEFAULT_PROTOCOL],
 2158|    769|                              Curl_bufref_ptr(&data->state.url));
 2159|    769|    if(!url) {
  ------------------
  |  Branch (2159:8): [True: 0, False: 769]
  ------------------
 2160|      0|      result = CURLE_OUT_OF_MEMORY;
 2161|      0|      goto out;
 2162|      0|    }
 2163|    769|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 2164|    769|  }
 2165|       |
 2166|  8.39k|  if(!use_set_uh) {
  ------------------
  |  Branch (2166:6): [True: 8.39k, False: 0]
  ------------------
 2167|  8.39k|    char *newurl;
 2168|  8.39k|    uc = curl_url_set(uh, CURLUPART_URL, Curl_bufref_ptr(&data->state.url),
 2169|  8.39k|                      (unsigned int)(CURLU_GUESS_SCHEME |
  ------------------
  |  |   97|  8.39k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 2170|  8.39k|                       CURLU_NON_SUPPORT_SCHEME |
  ------------------
  |  |   91|  8.39k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
 2171|  8.39k|                       (data->set.disallow_username_in_url ?
  ------------------
  |  Branch (2171:25): [True: 2, False: 8.38k]
  ------------------
 2172|  8.38k|                        CURLU_DISALLOW_USER : 0) |
  ------------------
  |  |   93|      2|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
 2173|  8.39k|                       (data->set.path_as_is ? CURLU_PATH_AS_IS : 0)));
  ------------------
  |  |   92|      4|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (2173:25): [True: 4, False: 8.38k]
  ------------------
 2174|  8.39k|    if(uc) {
  ------------------
  |  Branch (2174:8): [True: 840, False: 7.55k]
  ------------------
 2175|    840|      failf(data, "URL rejected: %s", curl_url_strerror(uc));
  ------------------
  |  |   62|    840|#define failf Curl_failf
  ------------------
 2176|    840|      result = Curl_uc_to_curlcode(uc);
 2177|    840|      goto out;
 2178|    840|    }
 2179|       |
 2180|       |    /* after it was parsed, get the generated normalized version */
 2181|  7.55k|    uc = curl_url_get(uh, CURLUPART_URL, &newurl, CURLU_GET_EMPTY);
  ------------------
  |  |  103|  7.55k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 2182|  7.55k|    if(uc) {
  ------------------
  |  Branch (2182:8): [True: 0, False: 7.55k]
  ------------------
 2183|      0|      result = Curl_uc_to_curlcode(uc);
 2184|      0|      goto out;
 2185|      0|    }
 2186|  7.55k|    Curl_bufref_set(&data->state.url, newurl, 0, curl_free);
 2187|  7.55k|  }
 2188|       |
 2189|  7.55k|#ifdef USE_IPV6
 2190|  7.55k|  scope_id = data->set.scope_id;
 2191|  7.55k|#endif
 2192|       |
 2193|       |  /* `uh` is now as the connection should use it, probably. */
 2194|  7.55k|  result = Curl_peer_from_url(uh, data, port_override, scope_id,
 2195|  7.55k|                              &data->state.origin);
 2196|  7.55k|  if(result)
  ------------------
  |  Branch (2196:6): [True: 165, False: 7.38k]
  ------------------
 2197|    165|    goto out;
 2198|       |  /* The origin might get changed when HSTS applies */
 2199|  7.38k|  result = hsts_upgrade(data, uh, port_override, scope_id);
 2200|  7.38k|  if(result)
  ------------------
  |  Branch (2200:6): [True: 0, False: 7.38k]
  ------------------
 2201|      0|    goto out;
 2202|       |
 2203|       |  /* When the transfers initial_origin is not set, this is the initial
 2204|       |   * request. Remember this starting point. */
 2205|  7.38k|  if(!data->state.initial_origin)
  ------------------
  |  Branch (2205:6): [True: 7.35k, False: 27]
  ------------------
 2206|  7.35k|    Curl_peer_link(&data->state.initial_origin, data->state.origin);
 2207|       |
 2208|  7.38k|  uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path, CURLU_URLENCODE);
  ------------------
  |  |   95|  7.38k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2209|  7.38k|  if(uc) {
  ------------------
  |  Branch (2209:6): [True: 0, False: 7.38k]
  ------------------
 2210|      0|    result = Curl_uc_to_curlcode(uc);
 2211|      0|    goto out;
 2212|      0|  }
 2213|  7.38k|  uc = curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query,
 2214|  7.38k|                    CURLU_GET_EMPTY);
  ------------------
  |  |  103|  7.38k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 2215|  7.38k|  if(uc && (uc != CURLUE_NO_QUERY)) {
  ------------------
  |  Branch (2215:6): [True: 6.87k, False: 511]
  |  Branch (2215:12): [True: 0, False: 6.87k]
  ------------------
 2216|      0|    result = CURLE_OUT_OF_MEMORY;
 2217|      0|    goto out;
 2218|      0|  }
 2219|       |
 2220|  7.38k|  uc = curl_url_get(uh, CURLUPART_OPTIONS, &data->state.up.options,
 2221|  7.38k|                    CURLU_URLDECODE);
  ------------------
  |  |   94|  7.38k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 2222|  7.38k|  if(uc && (uc != CURLUE_NO_OPTIONS)) {
  ------------------
  |  Branch (2222:6): [True: 7.38k, False: 2]
  |  Branch (2222:12): [True: 0, False: 7.38k]
  ------------------
 2223|      0|    result = Curl_uc_to_curlcode(uc);
 2224|      0|    goto out;
 2225|      0|  }
 2226|       |
 2227|  7.38k|  result = url_set_data_creds(data, uh);
 2228|  7.38k|  if(result)
  ------------------
  |  Branch (2228:6): [True: 10, False: 7.37k]
  ------------------
 2229|     10|    goto out;
 2230|       |
 2231|  8.39k|out:
 2232|  8.39k|  return result;
 2233|  7.38k|}
url.c:hsts_upgrade:
 1277|  7.38k|{
 1278|       |  /* HSTS upgrade */
 1279|  7.38k|  if(data->hsts && (data->state.origin->scheme == &Curl_scheme_http) &&
  ------------------
  |  Branch (1279:6): [True: 6.79k, False: 587]
  |  Branch (1279:20): [True: 788, False: 6.01k]
  ------------------
 1280|    788|     Curl_hsts_applies(data->hsts, data->state.origin)) {
  ------------------
  |  Branch (1280:6): [True: 0, False: 788]
  ------------------
 1281|      0|    char *url;
 1282|      0|    CURLUcode uc;
 1283|      0|    CURLcode result;
 1284|       |
 1285|      0|    uc = curl_url_set(uh, CURLUPART_SCHEME, "https", 0);
 1286|      0|    if(uc)
  ------------------
  |  Branch (1286:8): [True: 0, False: 0]
  ------------------
 1287|      0|      return Curl_uc_to_curlcode(uc);
 1288|      0|    Curl_bufref_free(&data->state.url);
 1289|       |    /* after update, get the updated version */
 1290|      0|    uc = curl_url_get(uh, CURLUPART_URL, &url, 0);
 1291|      0|    if(uc)
  ------------------
  |  Branch (1291:8): [True: 0, False: 0]
  ------------------
 1292|      0|      return Curl_uc_to_curlcode(uc);
 1293|      0|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 1294|       |
 1295|      0|    result = Curl_peer_from_url(uh, data, port_override, scope_id,
 1296|      0|                                &data->state.origin);
 1297|      0|    if(result)
  ------------------
  |  Branch (1297:8): [True: 0, False: 0]
  ------------------
 1298|      0|      return result;
 1299|      0|    infof(data, "Switched from HTTP to HTTPS due to HSTS => %s", url);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1300|      0|  }
 1301|  7.38k|  return CURLE_OK;
 1302|  7.38k|}
url.c:url_set_data_creds:
 1429|  7.38k|{
 1430|  7.38k|  struct Curl_creds *newcreds = NULL;
 1431|  7.38k|  CURLcode result = CURLE_OK;
 1432|       |
 1433|  7.38k|  if((data->set.str[STRING_USERNAME] ||
  ------------------
  |  Branch (1433:7): [True: 73, False: 7.31k]
  ------------------
 1434|  7.31k|      data->set.str[STRING_PASSWORD] ||
  ------------------
  |  Branch (1434:7): [True: 69, False: 7.24k]
  ------------------
 1435|  7.24k|      data->set.str[STRING_BEARER] ||
  ------------------
  |  Branch (1435:7): [True: 13, False: 7.23k]
  ------------------
 1436|  7.23k|      data->set.str[STRING_SASL_AUTHZID] ||
  ------------------
  |  Branch (1436:7): [True: 11, False: 7.22k]
  ------------------
 1437|  7.22k|      data->set.str[STRING_SERVICE_NAME]) &&
  ------------------
  |  Branch (1437:7): [True: 7, False: 7.21k]
  ------------------
 1438|    173|     Curl_auth_allowed_to_origin(data, data->state.origin)) {
  ------------------
  |  Branch (1438:6): [True: 173, False: 0]
  ------------------
 1439|    173|    result = Curl_creds_create(data->set.str[STRING_USERNAME],
 1440|    173|                               data->set.str[STRING_PASSWORD],
 1441|    173|                               data->set.str[STRING_BEARER],
 1442|    173|                               data->set.str[STRING_SASL_AUTHZID],
 1443|    173|                               data->set.str[STRING_SERVICE_NAME],
 1444|    173|                               CREDS_OPTION, &newcreds);
  ------------------
  |  |   31|    173|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
 1445|    173|    if(result)
  ------------------
  |  Branch (1445:8): [True: 0, False: 173]
  ------------------
 1446|      0|      goto out;
 1447|    173|    if(newcreds &&
  ------------------
  |  Branch (1447:8): [True: 168, False: 5]
  ------------------
 1448|    168|       !(data->state.origin->scheme->flags & PROTOPT_USERPWDCTRL) &&
  ------------------
  |  |  231|    168|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1448:8): [True: 17, False: 151]
  ------------------
 1449|     17|       (str_has_ctrl(Curl_creds_user(newcreds)) ||
  ------------------
  |  |   81|     17|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 17, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1449:9): [True: 4, False: 13]
  ------------------
 1450|     13|        str_has_ctrl(Curl_creds_passwd(newcreds)))) {
  ------------------
  |  |   82|     13|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 13, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1450:9): [True: 3, False: 10]
  ------------------
 1451|       |      /* if the protocol cannot handle control codes in credentials, make
 1452|       |         sure there are none */
 1453|      7|      failf(data, "control code detected in credentials");
  ------------------
  |  |   62|      7|#define failf Curl_failf
  ------------------
 1454|      7|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1455|      7|      goto out;
 1456|      7|    }
 1457|    173|  }
 1458|       |
 1459|       |  /* Extract credentials from the URL only if there are none OR
 1460|       |   * if no CURLOPT_USER was set. */
 1461|  7.37k|  if(!newcreds || !Curl_creds_has_user(newcreds)) {
  ------------------
  |  |   75|    161|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 161, False: 0]
  |  |  |  Branch (75:50): [True: 61, False: 100]
  |  |  ------------------
  ------------------
  |  Branch (1461:6): [True: 7.21k, False: 161]
  ------------------
 1462|  7.31k|    char *user = NULL;
 1463|  7.31k|    char *passwd = NULL;
 1464|  7.31k|    char *udecoded = NULL;
 1465|  7.31k|    char *pdecoded = NULL;
 1466|  7.31k|    CURLUcode uc;
 1467|       |
 1468|  7.31k|    uc = curl_url_get(uh, CURLUPART_USER, &user, 0);
 1469|  7.31k|    if(uc && (uc != CURLUE_NO_USER))
  ------------------
  |  Branch (1469:8): [True: 7.04k, False: 270]
  |  Branch (1469:14): [True: 0, False: 7.04k]
  ------------------
 1470|      0|      result = Curl_uc_to_curlcode(uc);
 1471|  7.31k|    if(!result) {
  ------------------
  |  Branch (1471:8): [True: 7.31k, False: 0]
  ------------------
 1472|  7.31k|      uc = curl_url_get(uh, CURLUPART_PASSWORD, &passwd, 0);
 1473|  7.31k|      if(uc && (uc != CURLUE_NO_PASSWORD))
  ------------------
  |  Branch (1473:10): [True: 7.25k, False: 64]
  |  Branch (1473:16): [True: 0, False: 7.25k]
  ------------------
 1474|      0|        result = Curl_uc_to_curlcode(uc);
 1475|  7.31k|    }
 1476|  7.31k|    if(!result && user) {
  ------------------
  |  Branch (1476:8): [True: 7.31k, False: 0]
  |  Branch (1476:19): [True: 270, False: 7.04k]
  ------------------
 1477|    270|      result = Curl_urldecode(user, 0, &udecoded, NULL,
 1478|    270|                              (data->state.origin->scheme->flags &
  ------------------
  |  Branch (1478:31): [True: 266, False: 4]
  ------------------
 1479|    270|                               PROTOPT_USERPWDCTRL) ?
  ------------------
  |  |  231|    270|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
 1480|    266|                              REJECT_ZERO : REJECT_CTRL);
 1481|    270|    }
 1482|  7.31k|    if(!result && passwd) {
  ------------------
  |  Branch (1482:8): [True: 7.31k, False: 3]
  |  Branch (1482:19): [True: 64, False: 7.25k]
  ------------------
 1483|     64|      result = Curl_urldecode(passwd, 0, &pdecoded, NULL,
 1484|     64|                              (data->state.origin->scheme->flags &
  ------------------
  |  Branch (1484:31): [True: 61, False: 3]
  ------------------
 1485|     64|                               PROTOPT_USERPWDCTRL) ?
  ------------------
  |  |  231|     64|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
 1486|     61|                              REJECT_ZERO : REJECT_CTRL);
 1487|     64|    }
 1488|  7.31k|    if(!result)
  ------------------
  |  Branch (1488:8): [True: 7.31k, False: 3]
  ------------------
 1489|  7.31k|      result = Curl_creds_merge(udecoded, pdecoded, newcreds,
 1490|  7.31k|                                CREDS_URL, &newcreds);
  ------------------
  |  |   30|  7.31k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
 1491|       |
 1492|  7.31k|    curlx_free(udecoded);
  ------------------
  |  | 1478|  7.31k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1493|  7.31k|    curlx_free(pdecoded);
  ------------------
  |  | 1478|  7.31k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1494|  7.31k|    curlx_free(passwd);
  ------------------
  |  | 1478|  7.31k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1495|  7.31k|    curlx_free(user);
  ------------------
  |  | 1478|  7.31k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1496|  7.31k|    if(result) {
  ------------------
  |  Branch (1496:8): [True: 3, False: 7.31k]
  ------------------
 1497|      3|      failf(data, "error extracting credentials from URL");
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
 1498|      3|      goto out;
 1499|      3|    }
 1500|  7.31k|  }
 1501|       |
 1502|  7.37k|#ifndef CURL_DISABLE_NETRC
 1503|       |  /* Check for overridden login details and set them accordingly so that
 1504|       |     they are known when protocol->setup_connection is called! */
 1505|  7.37k|  result = url_set_data_creds_netrc(data, &newcreds);
 1506|  7.37k|#endif /* CURL_DISABLE_NETRC */
 1507|       |
 1508|  7.38k|out:
 1509|  7.38k|  if(!result && !Curl_creds_equal(data->state.creds, newcreds)) {
  ------------------
  |  Branch (1509:6): [True: 7.37k, False: 10]
  |  Branch (1509:17): [True: 417, False: 6.95k]
  ------------------
 1510|       |    /* Do we have more things to trigger on credentials change? */
 1511|    417|    Curl_creds_link(&data->state.creds, newcreds);
 1512|    417|  }
 1513|  7.38k|  Curl_creds_unlink(&newcreds);
 1514|  7.38k|  return result;
 1515|  7.37k|}
url.c:str_has_ctrl:
 1308|     30|{
 1309|     30|  if(input) {
  ------------------
  |  Branch (1309:6): [True: 30, False: 0]
  ------------------
 1310|     30|    const unsigned char *str = (const unsigned char *)input;
 1311|    473|    while(*str) {
  ------------------
  |  Branch (1311:11): [True: 450, False: 23]
  ------------------
 1312|    450|      if(*str < 0x20)
  ------------------
  |  Branch (1312:10): [True: 7, False: 443]
  ------------------
 1313|      7|        return TRUE;
  ------------------
  |  | 1053|      7|#define TRUE true
  ------------------
 1314|    443|      str++;
 1315|    443|    }
 1316|     30|  }
 1317|     23|  return FALSE;
  ------------------
  |  | 1056|     23|#define FALSE false
  ------------------
 1318|     30|}
url.c:url_set_data_creds_netrc:
 1327|  7.37k|{
 1328|  7.37k|  struct Curl_creds *ncreds_out = NULL;
 1329|  7.37k|  CURLcode result = CURLE_OK;
 1330|       |
 1331|  7.37k|  if(data->set.use_netrc) { /* not CURL_NETRC_IGNORED */
  ------------------
  |  Branch (1331:6): [True: 7, False: 7.36k]
  ------------------
 1332|      7|    struct Curl_creds *ncreds_in = NULL;
 1333|      7|    bool scan_netrc = TRUE;
  ------------------
  |  | 1053|      7|#define TRUE true
  ------------------
 1334|      7|    NETRCcode ret;
 1335|      7|    CURLUcode uc;
 1336|       |
 1337|      7|    if(*pcreds) {
  ------------------
  |  Branch (1337:8): [True: 5, False: 2]
  ------------------
 1338|      5|      switch((*pcreds)->source) {
 1339|      1|      case CREDS_OPTION:
  ------------------
  |  |   31|      1|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
  |  Branch (1339:7): [True: 1, False: 4]
  ------------------
 1340|       |        /* we never override credentials set via CURLOPT_*, leave. */
 1341|      1|        scan_netrc = FALSE;
  ------------------
  |  | 1056|      1|#define FALSE false
  ------------------
 1342|      1|        break;
 1343|      4|      case CREDS_URL: /* only apply when netrc is not required */
  ------------------
  |  |   30|      4|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
  |  Branch (1343:7): [True: 4, False: 1]
  ------------------
 1344|      4|        if(data->set.use_netrc == CURL_NETRC_REQUIRED) {
  ------------------
  |  | 2383|      4|#define CURL_NETRC_REQUIRED 2L /* A user:password in the URL is ignored.
  ------------------
  |  Branch (1344:12): [True: 1, False: 3]
  ------------------
 1345|       |          /* We ignore password from URL */
 1346|      1|          ncreds_in = *pcreds;
 1347|      1|        }
 1348|      3|        else if(!Curl_creds_has_user(*pcreds) ||
  ------------------
  |  |   75|      6|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 3, False: 0]
  |  |  |  Branch (75:50): [True: 2, False: 1]
  |  |  ------------------
  ------------------
 1349|      2|                !Curl_creds_has_passwd(*pcreds)) {
  ------------------
  |  |   76|      2|#define Curl_creds_has_passwd(c)         ((c) && (c)->passwd[0])
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 2, False: 0]
  |  |  |  Branch (76:50): [True: 1, False: 1]
  |  |  ------------------
  ------------------
 1350|       |          /* We use netrc to complete what is missing */
 1351|      2|          ncreds_in = *pcreds;
 1352|      2|        }
 1353|      1|        else
 1354|      1|          scan_netrc = FALSE;
  ------------------
  |  | 1056|      1|#define FALSE false
  ------------------
 1355|      4|        break;
 1356|      0|      default: /* ignore credentials from other sources */
  ------------------
  |  Branch (1356:7): [True: 0, False: 5]
  ------------------
 1357|      0|        break;
 1358|      5|      }
 1359|      5|    }
 1360|       |
 1361|      7|    if(!scan_netrc)
  ------------------
  |  Branch (1361:8): [True: 2, False: 5]
  ------------------
 1362|      2|      goto out;
 1363|       |
 1364|      5|    ret = Curl_netrc_scan(data, &data->state.netrc,
 1365|      5|                          data->state.origin->hostname,
 1366|      5|                          Curl_creds_user(ncreds_in),
  ------------------
  |  |   81|      5|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 3, False: 2]
  |  |  ------------------
  ------------------
 1367|      5|                          data->set.str[STRING_NETRC_FILE],
 1368|      5|                          &ncreds_out);
 1369|      5|    DEBUGASSERT(!ret || !ncreds_out);
  ------------------
  |  | 1079|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1369:5): [True: 5, False: 0]
  |  Branch (1369:5): [True: 0, False: 0]
  |  Branch (1369:5): [True: 0, False: 5]
  |  Branch (1369:5): [True: 5, False: 0]
  ------------------
 1370|      5|    if(ret == NETRC_OUT_OF_MEMORY) {
  ------------------
  |  Branch (1370:8): [True: 0, False: 5]
  ------------------
 1371|      0|      result = CURLE_OUT_OF_MEMORY;
 1372|      0|      goto out;
 1373|      0|    }
 1374|      5|    else if(ret && ((ret == NETRC_NO_MATCH) ||
  ------------------
  |  Branch (1374:13): [True: 5, False: 0]
  |  Branch (1374:21): [True: 5, False: 0]
  ------------------
 1375|      5|                    (data->set.use_netrc == CURL_NETRC_OPTIONAL))) {
  ------------------
  |  | 2381|      0|#define CURL_NETRC_OPTIONAL 1L /* A user:password in the URL is preferred
  ------------------
  |  Branch (1375:21): [True: 0, False: 0]
  ------------------
 1376|      5|      infof(data, "Could not find host %s in the %s file; using defaults",
  ------------------
  |  |  143|      5|  do {                               \
  |  |  144|      5|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      5|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 5, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  323|      5|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      5|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
 1377|      5|            data->state.origin->hostname,
 1378|      5|            (data->set.str[STRING_NETRC_FILE] ?
 1379|      5|             data->set.str[STRING_NETRC_FILE] : ".netrc"));
 1380|      5|    }
 1381|      0|    else if(ret) {
  ------------------
  |  Branch (1381:13): [True: 0, False: 0]
  ------------------
 1382|      0|      const char *m = Curl_netrc_strerror(ret);
 1383|      0|      failf(data, ".netrc error: %s", m);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1384|      0|      result = CURLE_READ_ERROR;
 1385|      0|      goto out;
 1386|      0|    }
 1387|      0|    else if(ncreds_out) {
  ------------------
  |  Branch (1387:13): [True: 0, False: 0]
  ------------------
 1388|      0|      if(!(data->state.origin->scheme->flags & PROTOPT_USERPWDCTRL)) {
  ------------------
  |  |  231|      0|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1388:10): [True: 0, False: 0]
  ------------------
 1389|       |        /* if the protocol cannot handle control codes in credentials, make
 1390|       |           sure there are none */
 1391|      0|        if(str_has_ctrl(ncreds_out->user) ||
  ------------------
  |  Branch (1391:12): [True: 0, False: 0]
  ------------------
 1392|      0|           str_has_ctrl(ncreds_out->passwd)) {
  ------------------
  |  Branch (1392:12): [True: 0, False: 0]
  ------------------
 1393|      0|          failf(data, "control code detected in .netrc credentials");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1394|      0|          result = CURLE_READ_ERROR;
 1395|      0|          goto out;
 1396|      0|        }
 1397|      0|      }
 1398|      0|      CURL_TRC_M(data, "netrc: using credentials for %s as %s",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1399|      0|                 data->state.origin->hostname, ncreds_out->user);
 1400|      0|      result = Curl_creds_merge(ncreds_out->user, ncreds_out->passwd,
 1401|      0|                                *pcreds, CREDS_NETRC, pcreds);
  ------------------
  |  |   32|      0|#define CREDS_NETRC  3 /* username/passwd found in netrc */
  ------------------
 1402|      0|      if(result)
  ------------------
  |  Branch (1402:10): [True: 0, False: 0]
  ------------------
 1403|      0|        goto out;
 1404|       |      /* for updated strings, we update them in the URL */
 1405|      0|      uc = curl_url_set(data->state.uh, CURLUPART_USER,
 1406|      0|                        Curl_creds_user(*pcreds), CURLU_URLENCODE);
  ------------------
  |  |   81|      0|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                      Curl_creds_user(*pcreds), CURLU_URLENCODE);
  ------------------
  |  |   95|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 1407|      0|      if(!uc)
  ------------------
  |  Branch (1407:10): [True: 0, False: 0]
  ------------------
 1408|      0|        uc = curl_url_set(data->state.uh, CURLUPART_PASSWORD,
 1409|      0|                          Curl_creds_passwd(*pcreds),
  ------------------
  |  |   82|      0|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1410|      0|                          CURLU_URLENCODE);
  ------------------
  |  |   95|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 1411|      0|      if(uc)
  ------------------
  |  Branch (1411:10): [True: 0, False: 0]
  ------------------
 1412|      0|        result = Curl_uc_to_curlcode(uc);
 1413|      0|    }
 1414|      0|    else
 1415|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1415:7): [Folded, False: 0]
  |  Branch (1415:7): [Folded, False: 0]
  ------------------
 1416|      5|  }
 1417|       |
 1418|  7.37k|#ifdef CURLVERBOSE
 1419|  7.37k|  Curl_creds_trace(data, data->state.creds, "transfer credentials");
 1420|  7.37k|#endif
 1421|       |
 1422|  7.37k|out:
 1423|  7.37k|  Curl_creds_unlink(&ncreds_out);
 1424|  7.37k|  return result;
 1425|  7.37k|}
url.c:url_find_or_create_conn:
 2244|  7.37k|{
 2245|  7.37k|  struct connectdata *needle = NULL;
 2246|  7.37k|  bool waitpipe = FALSE;
  ------------------
  |  | 1056|  7.37k|#define FALSE false
  ------------------
 2247|  7.37k|  CURLcode result;
 2248|       |
 2249|       |  /* create the template connection for transfer data. Use this needle to
 2250|       |   * find an existing connection or, if none exists, convert needle
 2251|       |   * to a full connection and attach it to data. */
 2252|  7.37k|  result = url_create_needle(data, &needle);
 2253|  7.37k|  if(result)
  ------------------
  |  Branch (2253:6): [True: 874, False: 6.50k]
  ------------------
 2254|    874|    goto out;
 2255|  6.50k|  DEBUGASSERT(needle);
  ------------------
  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2255:3): [True: 0, False: 6.50k]
  |  Branch (2255:3): [True: 6.50k, False: 0]
  ------------------
 2256|       |
 2257|       |  /***********************************************************************
 2258|       |   * file: is a special case in that it does not need a network connection
 2259|       |   ***********************************************************************/
 2260|  6.50k|#ifndef CURL_DISABLE_FILE
 2261|  6.50k|  if(needle->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  214|  6.50k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2261:6): [True: 0, False: 6.50k]
  ------------------
 2262|      0|    bool done;
 2263|       |    /* this is supposed to be the connect function so we better at least check
 2264|       |       that the file is present here! */
 2265|      0|    DEBUGASSERT(needle->scheme->run->connect_it);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2265:5): [True: 0, False: 0]
  |  Branch (2265:5): [True: 0, False: 0]
  ------------------
 2266|      0|    data->info.conn_scheme = needle->scheme->name;
 2267|       |    /* conn_protocol can only provide "old" protocols */
 2268|      0|    data->info.conn_protocol = (needle->scheme->protocol) & CURLPROTO_MASK;
  ------------------
  |  |   79|      0|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2269|      0|    result = needle->scheme->run->connect_it(data, &done);
 2270|      0|    if(result)
  ------------------
  |  Branch (2270:8): [True: 0, False: 0]
  ------------------
 2271|      0|      goto out;
 2272|       |
 2273|       |    /* Setup a "faked" transfer that will do nothing */
 2274|      0|    Curl_attach_connection(data, needle);
 2275|      0|    needle = NULL;
 2276|      0|    result = Curl_cpool_add(data, data->conn);
 2277|      0|    if(!result) {
  ------------------
  |  Branch (2277:8): [True: 0, False: 0]
  ------------------
 2278|       |      /* Setup whatever necessary for a resumed transfer */
 2279|      0|      result = setup_range(data);
 2280|      0|      if(!result) {
  ------------------
  |  Branch (2280:10): [True: 0, False: 0]
  ------------------
 2281|      0|        Curl_xfer_setup_nop(data);
 2282|      0|        result = Curl_init_do(data, data->conn);
 2283|      0|      }
 2284|      0|    }
 2285|       |
 2286|      0|    if(result) {
  ------------------
  |  Branch (2286:8): [True: 0, False: 0]
  ------------------
 2287|      0|      DEBUGASSERT(data->conn->scheme->run->done);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2287:7): [True: 0, False: 0]
  |  Branch (2287:7): [True: 0, False: 0]
  ------------------
 2288|       |      /* we ignore the return code for the protocol-specific DONE */
 2289|      0|      (void)data->conn->scheme->run->done(data, result, FALSE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 2290|      0|    }
 2291|      0|    goto out;
 2292|      0|  }
 2293|  6.50k|#endif
 2294|       |
 2295|       |  /* Complete the easy's SSL configuration for connection cache matching */
 2296|  6.50k|  result = Curl_ssl_easy_config_complete(data, needle->origin);
 2297|  6.50k|  if(result)
  ------------------
  |  Branch (2297:6): [True: 0, False: 6.50k]
  ------------------
 2298|      0|    goto out;
 2299|       |
 2300|       |  /*************************************************************
 2301|       |   * Reuse of existing connection is not allowed when
 2302|       |   * - connect_only is set or
 2303|       |   * - reuse_fresh is set and this is not a follow-up request
 2304|       |   *   (like with HTTP followlocation)
 2305|       |   *************************************************************/
 2306|  6.50k|  if((!data->set.reuse_fresh || data->state.followlocation) &&
  ------------------
  |  Branch (2306:7): [True: 6.50k, False: 1]
  |  Branch (2306:33): [True: 0, False: 1]
  ------------------
 2307|  6.50k|     !data->set.connect_only) {
  ------------------
  |  Branch (2307:6): [True: 6.50k, False: 1]
  ------------------
 2308|       |    /* Ok, try to find and attach an existing one */
 2309|  6.50k|    url_attach_existing(data, needle, &waitpipe);
 2310|  6.50k|  }
 2311|       |
 2312|  6.50k|  if(data->conn) {
  ------------------
  |  Branch (2312:6): [True: 0, False: 6.50k]
  ------------------
 2313|       |    /* We attached an existing connection for this transfer. Copy
 2314|       |     * over transfer specific properties over from needle. */
 2315|      0|    struct connectdata *conn = data->conn;
 2316|      0|    VERBOSE(bool tls_upgraded = (!(needle->given->flags & PROTOPT_SSL) &&
  ------------------
  |  | 1613|      0|#define VERBOSE(x) x
  |  |  ------------------
  |  |  |  Branch (1613:20): [True: 0, False: 0]
  |  |  |  Branch (1613:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2317|      0|                                 Curl_conn_is_ssl(conn, FIRSTSOCKET)));
 2318|       |
 2319|      0|    conn->bits.reuse = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2320|      0|    url_conn_reuse_adjust(data, needle);
 2321|       |
 2322|      0|#ifndef CURL_DISABLE_PROXY
 2323|      0|    infof(data, "Reusing existing %s: connection%s with %s %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2324|      0|          conn->given->name,
 2325|      0|          tls_upgraded ? " (upgraded to SSL)" : "",
 2326|      0|          (conn->socks_proxy.peer || conn->http_proxy.peer) ? "proxy" : "host",
 2327|      0|          conn->socks_proxy.peer ? conn->socks_proxy.peer->user_hostname :
 2328|      0|          conn->http_proxy.peer ? conn->http_proxy.peer->user_hostname :
 2329|      0|          conn->origin->hostname);
 2330|       |#else
 2331|       |    infof(data, "Reusing existing %s: connection%s with host %s",
 2332|       |          conn->given->name,
 2333|       |          tls_upgraded ? " (upgraded to SSL)" : "",
 2334|       |          conn->origin->hostname);
 2335|       |#endif
 2336|      0|  }
 2337|  6.50k|  else {
 2338|       |    /* We have decided that we want a new connection. We may not be able to do
 2339|       |       that if we have reached the limit of how many connections we are
 2340|       |       allowed to open. */
 2341|       |
 2342|  6.50k|    if(waitpipe) {
  ------------------
  |  Branch (2342:8): [True: 248, False: 6.25k]
  ------------------
 2343|       |      /* There is a connection that *might* become usable for multiplexing
 2344|       |         "soon", and we wait for that */
 2345|    248|      infof(data, "Waiting on connection to negotiate possible multiplexing.");
  ------------------
  |  |  143|    248|  do {                               \
  |  |  144|    248|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    248|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 248, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 248]
  |  |  |  |  ------------------
  |  |  |  |  323|    248|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    248|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    248|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 248]
  |  |  ------------------
  ------------------
 2346|    248|      result = CURLE_NO_CONNECTION_AVAILABLE;
 2347|    248|      goto out;
 2348|    248|    }
 2349|  6.25k|    else {
 2350|  6.25k|      switch(Curl_cpool_check_limits(data, needle)) {
 2351|      0|      case CPOOL_LIMIT_DEST:
  ------------------
  |  |   91|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  |  Branch (2351:7): [True: 0, False: 6.25k]
  ------------------
 2352|      0|        infof(data, "No more connections allowed to host");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2353|      0|        result = CURLE_NO_CONNECTION_AVAILABLE;
 2354|      0|        goto out;
 2355|      0|      case CPOOL_LIMIT_TOTAL:
  ------------------
  |  |   92|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  |  Branch (2355:7): [True: 0, False: 6.25k]
  ------------------
 2356|      0|        if(data->master_mid != UINT32_MAX)
  ------------------
  |  Branch (2356:12): [True: 0, False: 0]
  ------------------
 2357|      0|          CURL_TRC_M(data, "Allowing sub-requests (like DoH) to override "
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2358|      0|                     "max connection limit");
 2359|      0|        else {
 2360|      0|          infof(data, "No connections available, total of %zu reached.",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2361|      0|                data->multi->max_total_connections);
 2362|      0|          result = CURLE_NO_CONNECTION_AVAILABLE;
 2363|      0|          goto out;
 2364|      0|        }
 2365|      0|        break;
 2366|  6.25k|      default:
  ------------------
  |  Branch (2366:7): [True: 6.25k, False: 0]
  ------------------
 2367|  6.25k|        break;
 2368|  6.25k|      }
 2369|  6.25k|    }
 2370|       |
 2371|       |    /* Convert needle into a full connection by filling in all the
 2372|       |     * remaining parts like the cloned SSL configuration. */
 2373|  6.25k|    result = Curl_ssl_conn_config_init(data, needle);
 2374|  6.25k|    if(result) {
  ------------------
  |  Branch (2374:8): [True: 0, False: 6.25k]
  ------------------
 2375|      0|      DEBUGF(curl_mfprintf(stderr, "Error: init connection SSL config\n"));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  ------------------
 2376|      0|      goto out;
 2377|      0|    }
 2378|       |    /* attach it and no longer own it */
 2379|  6.25k|    Curl_attach_connection(data, needle);
 2380|  6.25k|    needle = NULL;
 2381|       |
 2382|  6.25k|    result = Curl_cpool_add(data, data->conn);
 2383|  6.25k|    if(result)
  ------------------
  |  Branch (2383:8): [True: 0, False: 6.25k]
  ------------------
 2384|      0|      goto out;
 2385|       |
 2386|       |#ifdef USE_NTLM
 2387|       |    /* If NTLM is requested in a part of this connection, make sure we do not
 2388|       |       assume the state is fine as this is a fresh connection and NTLM is
 2389|       |       connection based. */
 2390|       |    if((data->state.authhost.picked & CURLAUTH_NTLM) &&
 2391|       |       data->state.authhost.done) {
 2392|       |      infof(data, "NTLM picked AND auth done set, clear picked");
 2393|       |      data->state.authhost.picked = CURLAUTH_NONE;
 2394|       |      data->state.authhost.done = FALSE;
 2395|       |    }
 2396|       |
 2397|       |    if((data->state.authproxy.picked & CURLAUTH_NTLM) &&
 2398|       |       data->state.authproxy.done) {
 2399|       |      infof(data, "NTLM-proxy picked AND auth done set, clear picked");
 2400|       |      data->state.authproxy.picked = CURLAUTH_NONE;
 2401|       |      data->state.authproxy.done = FALSE;
 2402|       |    }
 2403|       |#endif
 2404|  6.25k|  }
 2405|       |
 2406|       |  /* Setup and init stuff before DO starts, in preparing for the transfer. */
 2407|  6.25k|  result = Curl_init_do(data, data->conn);
 2408|  6.25k|  if(result)
  ------------------
  |  Branch (2408:6): [True: 0, False: 6.25k]
  ------------------
 2409|      0|    goto out;
 2410|       |
 2411|       |  /* Setup whatever necessary for a resumed transfer */
 2412|  6.25k|  result = setup_range(data);
 2413|  6.25k|  if(result)
  ------------------
  |  Branch (2413:6): [True: 0, False: 6.25k]
  ------------------
 2414|      0|    goto out;
 2415|       |
 2416|       |  /* persist the scheme and handler the transfer is using */
 2417|  6.25k|  data->info.conn_scheme = data->conn->scheme->name;
 2418|       |  /* conn_protocol can only provide "old" protocols */
 2419|  6.25k|  data->info.conn_protocol = (data->conn->scheme->protocol) & CURLPROTO_MASK;
  ------------------
  |  |   79|  6.25k|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2420|  6.25k|  data->info.used_proxy =
 2421|       |#ifdef CURL_DISABLE_PROXY
 2422|       |    0
 2423|       |#else
 2424|  6.25k|    (data->conn->socks_proxy.peer || data->conn->http_proxy.peer)
  ------------------
  |  Branch (2424:6): [True: 537, False: 5.71k]
  |  Branch (2424:38): [True: 2.26k, False: 3.45k]
  ------------------
 2425|  6.25k|#endif
 2426|  6.25k|    ;
 2427|       |
 2428|       |  /* Lastly, inform connection filters that a new transfer is attached */
 2429|  6.25k|  result = Curl_conn_ev_data_setup(data);
 2430|       |
 2431|  7.37k|out:
 2432|  7.37k|  if(needle)
  ------------------
  |  Branch (2432:6): [True: 248, False: 7.12k]
  ------------------
 2433|    248|    Curl_conn_free(data, needle);
 2434|  7.37k|  DEBUGASSERT(result || data->conn);
  ------------------
  |  | 1079|  7.37k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2434:3): [True: 7.37k, False: 0]
  |  Branch (2434:3): [True: 0, False: 0]
  |  Branch (2434:3): [True: 1.12k, False: 6.25k]
  |  Branch (2434:3): [True: 6.25k, False: 0]
  ------------------
 2435|  7.37k|  return result;
 2436|  7.37k|}
url.c:url_create_needle:
 2003|  7.37k|{
 2004|  7.37k|  struct connectdata *needle = NULL;
 2005|  7.37k|  CURLcode result = CURLE_OK;
 2006|  7.37k|  bool network_scheme = TRUE; /* almost all are */
  ------------------
  |  | 1053|  7.37k|#define TRUE true
  ------------------
 2007|       |
 2008|       |  /* First, split up the current URL in parts so that we can use the
 2009|       |     parts for checking against the already present connections. In order
 2010|       |     to not have to modify everything at once, we allocate a temporary
 2011|       |     connection data struct and fill in for comparison purposes. */
 2012|  7.37k|  needle = allocate_conn(data);
 2013|  7.37k|  if(!needle) {
  ------------------
  |  Branch (2013:6): [True: 0, False: 7.37k]
  ------------------
 2014|      0|    result = CURLE_OUT_OF_MEMORY;
 2015|      0|    goto out;
 2016|      0|  }
 2017|       |
 2018|       |  /* Do the unfailable inits first, before checks that may early return */
 2019|  7.37k|  Curl_hash_init(&needle->meta_hash, 23,
 2020|  7.37k|                 Curl_hash_str, curlx_str_key_compare, conn_meta_freeentry);
 2021|       |
 2022|       |  /*************************************************************
 2023|       |   * Determine `conn->origin` and populate `data->state.up` and
 2024|       |   * other URL related properties.
 2025|       |   *************************************************************/
 2026|  7.37k|  result = url_set_conn_origin_etc(data, needle);
 2027|  7.37k|  if(result)
  ------------------
  |  Branch (2027:6): [True: 856, False: 6.52k]
  ------------------
 2028|    856|    goto out;
 2029|       |
 2030|  6.52k|  DEBUGASSERT(needle->origin);
  ------------------
  |  | 1079|  6.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2030:3): [True: 0, False: 6.52k]
  |  Branch (2030:3): [True: 6.52k, False: 0]
  ------------------
 2031|  6.52k|  network_scheme = !(needle->origin->scheme->flags & PROTOPT_NONETWORK);
  ------------------
  |  |  214|  6.52k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
 2032|       |
 2033|  6.52k|#ifdef USE_UNIX_SOCKETS
 2034|       |  /*************************************************************
 2035|       |   * Set UDS first. It overrides "via_peer" and proxy settings.
 2036|       |   *************************************************************/
 2037|  6.52k|  if(network_scheme && data->set.str[STRING_UNIX_SOCKET_PATH]) {
  ------------------
  |  Branch (2037:6): [True: 6.52k, False: 0]
  |  Branch (2037:24): [True: 34, False: 6.48k]
  ------------------
 2038|     34|    result = Curl_peer_uds_create(needle->origin->scheme,
 2039|     34|                                  data->set.str[STRING_UNIX_SOCKET_PATH],
 2040|     34|                                  (bool)data->set.abstract_unix_socket,
 2041|     34|                                  &needle->via_peer);
 2042|     34|    if(result)
  ------------------
  |  Branch (2042:8): [True: 1, False: 33]
  ------------------
 2043|      1|      goto out;
 2044|     34|  }
 2045|  6.51k|#endif /* USE_UNIX_SOCKETS */
 2046|       |
 2047|  6.51k|  if(network_scheme && !needle->via_peer) {
  ------------------
  |  Branch (2047:6): [True: 6.51k, False: 0]
  |  Branch (2047:24): [True: 6.48k, False: 33]
  ------------------
 2048|       |    /*************************************************************
 2049|       |     * If the `via_peer` is not already set (via UDS above),
 2050|       |     * determine if we talk to `conn->origin` directly or use
 2051|       |     * `conn->via_peer` using "connect to" and "alt-svc" properties.
 2052|       |     *************************************************************/
 2053|  6.48k|    result = url_set_conn_peer(data, needle);
 2054|  6.48k|    if(result)
  ------------------
  |  Branch (2054:8): [True: 0, False: 6.48k]
  ------------------
 2055|      0|      goto out;
 2056|  6.48k|  }
 2057|       |
 2058|       |  /*************************************************************
 2059|       |   * Check whether the host and the "connect to host" are equal.
 2060|       |   * Do this after the hostnames have been IDN-converted and
 2061|       |   * before initializing the proxy.
 2062|       |   *************************************************************/
 2063|  6.51k|  if(Curl_peer_equal(needle->origin, needle->via_peer)) {
  ------------------
  |  Branch (2063:6): [True: 0, False: 6.51k]
  ------------------
 2064|      0|    Curl_peer_unlink(&needle->via_peer);
 2065|      0|  }
 2066|       |
 2067|  6.51k|#ifndef CURL_DISABLE_PROXY
 2068|       |  /* Going via a unix socket ignores any proxy settings */
 2069|  6.51k|  if(network_scheme &&
  ------------------
  |  Branch (2069:6): [True: 6.51k, False: 0]
  ------------------
 2070|  6.51k|     (!needle->via_peer || !needle->via_peer->unix_socket)) {
  ------------------
  |  Branch (2070:7): [True: 563, False: 5.95k]
  |  Branch (2070:28): [True: 5.92k, False: 33]
  ------------------
 2071|  6.48k|    result = Curl_proxy_init_conn(data, needle);
 2072|  6.48k|    if(result)
  ------------------
  |  Branch (2072:8): [True: 17, False: 6.46k]
  ------------------
 2073|     17|      goto out;
 2074|  6.48k|  }
 2075|  6.50k|#endif /* CURL_DISABLE_PROXY */
 2076|       |
 2077|  6.50k|  result = url_set_conn_login(data, needle); /* default credentials */
 2078|  6.50k|  if(result)
  ------------------
  |  Branch (2078:6): [True: 0, False: 6.50k]
  ------------------
 2079|      0|    goto out;
 2080|       |
 2081|       |  /*************************************************************
 2082|       |   * Setup internals depending on protocol. Needs to be done after
 2083|       |   * we figured out what/if proxy to use.
 2084|       |   *************************************************************/
 2085|  6.50k|  result = setup_connection_internals(data, needle);
 2086|  6.50k|  if(result)
  ------------------
  |  Branch (2086:6): [True: 0, False: 6.50k]
  ------------------
 2087|      0|    goto out;
 2088|       |
 2089|  6.50k|  if(needle->scheme->flags & PROTOPT_ALPN) {
  ------------------
  |  |  222|  6.50k|#define PROTOPT_ALPN (1 << 8) /* set ALPN for this */
  ------------------
  |  Branch (2089:6): [True: 6.49k, False: 11]
  ------------------
 2090|       |    /* The protocol wants it, so set the bits if enabled in the easy handle
 2091|       |       (default) */
 2092|  6.49k|    if(data->set.ssl_enable_alpn)
  ------------------
  |  Branch (2092:8): [True: 6.44k, False: 51]
  ------------------
 2093|  6.44k|      needle->bits.tls_enable_alpn = TRUE;
  ------------------
  |  | 1053|  6.44k|#define TRUE true
  ------------------
 2094|  6.49k|  }
 2095|       |
 2096|  6.50k|  if(network_scheme) {
  ------------------
  |  Branch (2096:6): [True: 6.50k, False: 0]
  ------------------
 2097|       |    /* Setup callbacks for network connections */
 2098|  6.50k|    needle->recv[FIRSTSOCKET] = Curl_cf_recv;
  ------------------
  |  |  233|  6.50k|#define FIRSTSOCKET     0
  ------------------
 2099|  6.50k|    needle->send[FIRSTSOCKET] = Curl_cf_send;
  ------------------
  |  |  233|  6.50k|#define FIRSTSOCKET     0
  ------------------
 2100|  6.50k|    needle->recv[SECONDARYSOCKET] = Curl_cf_recv;
  ------------------
  |  |  234|  6.50k|#define SECONDARYSOCKET 1
  ------------------
 2101|  6.50k|    needle->send[SECONDARYSOCKET] = Curl_cf_send;
  ------------------
  |  |  234|  6.50k|#define SECONDARYSOCKET 1
  ------------------
 2102|  6.50k|    needle->bits.tcp_fastopen = data->set.tcp_fastopen;
 2103|  6.50k|#ifdef USE_UNIX_SOCKETS
 2104|  6.50k|    if(Curl_conn_get_first_peer(needle, FIRSTSOCKET)->unix_socket)
  ------------------
  |  |  233|  6.50k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2104:8): [True: 35, False: 6.46k]
  ------------------
 2105|     35|      needle->transport_wanted = TRNSPRT_UNIX;
  ------------------
  |  |  240|     35|#define TRNSPRT_UNIX 6
  ------------------
 2106|  6.50k|#endif
 2107|  6.50k|  }
 2108|       |
 2109|  7.37k|out:
 2110|  7.37k|  if(!result) {
  ------------------
  |  Branch (2110:6): [True: 6.50k, False: 874]
  ------------------
 2111|  6.50k|    DEBUGASSERT(needle);
  ------------------
  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2111:5): [True: 0, False: 6.50k]
  |  Branch (2111:5): [True: 6.50k, False: 0]
  ------------------
 2112|  6.50k|    DEBUGASSERT(needle->origin);
  ------------------
  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2112:5): [True: 0, False: 6.50k]
  |  Branch (2112:5): [True: 6.50k, False: 0]
  ------------------
 2113|  6.50k|    *pneedle = needle;
 2114|  6.50k|  }
 2115|    874|  else {
 2116|    874|    *pneedle = NULL;
 2117|    874|    if(needle)
  ------------------
  |  Branch (2117:8): [True: 874, False: 0]
  ------------------
 2118|    874|      Curl_conn_free(data, needle);
 2119|    874|  }
 2120|  7.37k|  return result;
 2121|  7.37k|}
url.c:allocate_conn:
 1181|  7.37k|{
 1182|  7.37k|  struct connectdata *conn = curlx_calloc(1, sizeof(struct connectdata));
  ------------------
  |  | 1475|  7.37k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1183|  7.37k|  if(!conn)
  ------------------
  |  Branch (1183:6): [True: 0, False: 7.37k]
  ------------------
 1184|      0|    return NULL;
 1185|       |
 1186|       |  /* and we setup a few fields in case we end up actually using this struct */
 1187|       |
 1188|  7.37k|  conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  233|  7.37k|#define FIRSTSOCKET     0
  ------------------
                conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  145|  7.37k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1189|  7.37k|  conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  234|  7.37k|#define SECONDARYSOCKET 1
  ------------------
                conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  145|  7.37k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1190|  7.37k|  conn->recv_idx = 0; /* default for receiving transfer data */
 1191|  7.37k|  conn->send_idx = 0; /* default for sending transfer data */
 1192|  7.37k|  conn->connection_id = -1;    /* no ID */
 1193|  7.37k|  conn->attached_xfers = 0;
 1194|       |
 1195|       |  /* Store creation time to help future close decision making */
 1196|  7.37k|  conn->created = *Curl_pgrs_now(data);
 1197|       |
 1198|       |  /* Store current time to give a baseline to keepalive connection times. */
 1199|  7.37k|  conn->keepalive = conn->created;
 1200|       |
 1201|  7.37k|#ifndef CURL_DISABLE_FTP
 1202|  7.37k|  conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
 1203|  7.37k|  conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
 1204|  7.37k|#endif
 1205|  7.37k|  conn->ip_version = data->set.ipver;
 1206|  7.37k|  conn->bits.connect_only = (bool)data->set.connect_only;
 1207|  7.37k|  conn->transport_wanted = TRNSPRT_TCP; /* most of them are TCP streams */
  ------------------
  |  |  237|  7.37k|#define TRNSPRT_TCP  3
  ------------------
 1208|       |
 1209|       |  /* Store the local bind parameters that will be used for this connection */
 1210|  7.37k|  if(data->set.str[STRING_DEVICE]) {
  ------------------
  |  Branch (1210:6): [True: 170, False: 7.20k]
  ------------------
 1211|    170|    conn->localdev = curlx_strdup(data->set.str[STRING_DEVICE]);
  ------------------
  |  | 1472|    170|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1212|    170|    if(!conn->localdev)
  ------------------
  |  Branch (1212:8): [True: 0, False: 170]
  ------------------
 1213|      0|      goto error;
 1214|    170|  }
 1215|  7.37k|#ifndef CURL_DISABLE_BINDLOCAL
 1216|  7.37k|  conn->localportrange = data->set.localportrange;
 1217|  7.37k|  conn->localport = data->set.localport;
 1218|  7.37k|#endif
 1219|       |
 1220|       |  /* the close socket stuff needs to be copied to the connection struct as
 1221|       |     it may live on without (this specific) Curl_easy */
 1222|  7.37k|  conn->fclosesocket = data->set.fclosesocket;
 1223|  7.37k|  conn->closesocket_client = data->set.closesocket_client;
 1224|  7.37k|  conn->lastused = conn->created;
 1225|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1226|       |  conn->gssapi_delegation = data->set.gssapi_delegation;
 1227|       |#endif
 1228|  7.37k|  return conn;
 1229|      0|error:
 1230|       |
 1231|      0|  curlx_free(conn->localdev);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1232|      0|  curlx_free(conn);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1233|       |  return NULL;
 1234|  7.37k|}
url.c:url_set_conn_origin_etc:
 1519|  7.37k|{
 1520|  7.37k|  CURLcode result = CURLE_OK;
 1521|       |
 1522|  7.37k|  Curl_peer_link(&conn->origin, data->state.origin);
 1523|       |
 1524|       |  /* set the connection scheme */
 1525|  7.37k|  result = url_set_conn_scheme(data, conn, conn->origin->scheme);
 1526|  7.37k|  if(result)
  ------------------
  |  Branch (1526:6): [True: 856, False: 6.52k]
  ------------------
 1527|    856|    goto out;
 1528|       |
 1529|       |  /* set the connection options */
 1530|  6.52k|  if(data->set.str[STRING_OPTIONS]) {
  ------------------
  |  Branch (1530:6): [True: 6, False: 6.51k]
  ------------------
 1531|      6|    conn->options = curlx_strdup(data->set.str[STRING_OPTIONS]);
  ------------------
  |  | 1472|      6|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1532|      6|    if(!conn->options) {
  ------------------
  |  Branch (1532:8): [True: 0, False: 6]
  ------------------
 1533|      0|      result = CURLE_OUT_OF_MEMORY;
 1534|      0|      goto out;
 1535|      0|    }
 1536|      6|  }
 1537|  6.51k|  else if(data->state.up.options) {
  ------------------
  |  Branch (1537:11): [True: 0, False: 6.51k]
  ------------------
 1538|      0|    conn->options = curlx_strdup(data->state.up.options);
  ------------------
  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1539|      0|    if(!conn->options) {
  ------------------
  |  Branch (1539:8): [True: 0, False: 0]
  ------------------
 1540|      0|      result = CURLE_OUT_OF_MEMORY;
 1541|      0|      goto out;
 1542|      0|    }
 1543|      0|  }
 1544|       |
 1545|  6.52k|#ifdef USE_IPV6
 1546|  6.52k|  conn->scope_id = data->set.scope_id ?
  ------------------
  |  Branch (1546:20): [True: 137, False: 6.38k]
  ------------------
 1547|  6.38k|                   data->set.scope_id : data->state.origin->scopeid;
 1548|  6.52k|#endif
 1549|       |
 1550|  7.37k|out:
 1551|  7.37k|  return result;
 1552|  6.52k|}
url.c:url_set_conn_scheme:
 1239|  7.37k|{
 1240|       |  /* URL scheme is usable for connection when it is
 1241|       |   * - allowed
 1242|       |   * - not from a redirect or an allowed redirect protocol */
 1243|  7.37k|  if(scheme->run &&
  ------------------
  |  Branch (1243:6): [True: 7.37k, False: 4]
  ------------------
 1244|  7.37k|     (data->set.allowed_protocols & scheme->protocol) &&
  ------------------
  |  Branch (1244:6): [True: 6.52k, False: 852]
  ------------------
 1245|  6.52k|     (!data->state.this_is_a_follow ||
  ------------------
  |  Branch (1245:7): [True: 6.52k, False: 0]
  ------------------
 1246|  6.52k|       (data->set.redir_protocols & scheme->protocol))) {
  ------------------
  |  Branch (1246:8): [True: 0, False: 0]
  ------------------
 1247|  6.52k|    conn->scheme = conn->given = scheme;
 1248|  6.52k|    return CURLE_OK;
 1249|  6.52k|  }
 1250|    856|  if(scheme->flags & PROTOPT_NO_TRANSFER)
  ------------------
  |  |  238|    856|#define PROTOPT_NO_TRANSFER (1 << 17) /* this protocol is not for transfers */
  ------------------
  |  Branch (1250:6): [True: 0, False: 856]
  ------------------
 1251|      0|    failf(data, "Protocol \"%s\" is not for transfers", scheme->name);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1252|    856|  else
 1253|    856|    failf(data, "Protocol \"%s\" is disabled%s", scheme->name,
  ------------------
  |  |   62|    856|#define failf Curl_failf
  ------------------
 1254|    856|          data->state.this_is_a_follow ? " (in redirect)" : "");
  ------------------
  |  Branch (1254:11): [True: 0, False: 856]
  ------------------
 1255|    856|  return CURLE_UNSUPPORTED_PROTOCOL;
 1256|  7.37k|}
url.c:url_set_conn_peer:
 1818|  6.48k|{
 1819|  6.48k|  CURLcode result = CURLE_OK;
 1820|  6.48k|  struct Curl_peer *origin = conn->origin;
 1821|  6.48k|  struct Curl_peer *via_peer = NULL;
 1822|  6.48k|  struct curl_slist *conn_to_entry = data->set.connect_to;
 1823|       |
 1824|  6.48k|  DEBUGASSERT(!conn->via_peer);
  ------------------
  |  | 1079|  6.48k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1824:3): [True: 0, False: 6.48k]
  |  Branch (1824:3): [True: 6.48k, False: 0]
  ------------------
 1825|  6.48k|  Curl_peer_unlink(&conn->via_peer);
 1826|       |
 1827|  12.4k|  while(conn_to_entry && !via_peer) {
  ------------------
  |  Branch (1827:9): [True: 5.92k, False: 6.48k]
  |  Branch (1827:26): [True: 5.92k, False: 0]
  ------------------
 1828|  5.92k|    result = parse_connect_to_string(data, origin, conn_to_entry->data,
 1829|  5.92k|                                     &via_peer);
 1830|  5.92k|    if(result)
  ------------------
  |  Branch (1830:8): [True: 0, False: 5.92k]
  ------------------
 1831|      0|      return result;
 1832|  5.92k|    conn_to_entry = conn_to_entry->next;
 1833|  5.92k|  }
 1834|       |
 1835|  6.48k|#ifndef CURL_DISABLE_ALTSVC
 1836|  6.48k|  if(data->asi && !via_peer &&
  ------------------
  |  Branch (1836:6): [True: 5.92k, False: 563]
  |  Branch (1836:19): [True: 0, False: 5.92k]
  ------------------
 1837|      0|     ((conn->scheme->protocol == CURLPROTO_HTTPS) ||
  ------------------
  |  | 1087|      0|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (1837:7): [True: 0, False: 0]
  ------------------
 1838|      0|#ifdef DEBUGBUILD
 1839|       |      /* allow debug builds to circumvent the HTTPS restriction */
 1840|      0|      getenv("CURL_ALTSVC_HTTP")
  ------------------
  |  Branch (1840:7): [True: 0, False: 0]
  ------------------
 1841|       |#else
 1842|       |      0
 1843|       |#endif
 1844|      0|       )) {
 1845|       |    /* no connect_to match, try alt-svc! */
 1846|      0|    enum alpnid srcalpnid = ALPN_none;
 1847|      0|    bool hit = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1848|      0|    struct altsvc *as = NULL;
 1849|      0|    int allowed_alpns = ALPN_none;
 1850|      0|    struct http_negotiation *neg = &data->state.http_neg;
 1851|      0|    bool same_dest = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1852|       |
 1853|      0|    DEBUGF(infof(data, "Alt-svc check wanted=%x, allowed=%x",
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1854|      0|                 neg->wanted, neg->allowed));
 1855|       |#ifdef USE_HTTP3
 1856|       |    if(neg->allowed & CURL_HTTP_V3x)
 1857|       |      allowed_alpns |= ALPN_h3;
 1858|       |#endif
 1859|      0|#ifdef USE_HTTP2
 1860|      0|    if(neg->allowed & CURL_HTTP_V2x)
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (1860:8): [True: 0, False: 0]
  ------------------
 1861|      0|      allowed_alpns |= ALPN_h2;
 1862|      0|#endif
 1863|      0|    if(neg->allowed & CURL_HTTP_V1x)
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (1863:8): [True: 0, False: 0]
  ------------------
 1864|      0|      allowed_alpns |= ALPN_h1;
 1865|      0|    allowed_alpns &= (int)data->asi->flags;
 1866|       |
 1867|      0|    DEBUGF(infof(data, "check Alt-Svc for host '%s'", origin->hostname));
  ------------------
  |  | 1065|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [True: 0, False: 0]
  |  |  |  Branch (1065:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1868|       |#ifdef USE_HTTP3
 1869|       |    if(!hit && (neg->wanted & CURL_HTTP_V3x)) {
 1870|       |      srcalpnid = ALPN_h3;
 1871|       |      hit = Curl_altsvc_lookup(data->asi,
 1872|       |                               origin, ALPN_h3, /* from */
 1873|       |                               &as /* to */,
 1874|       |                               allowed_alpns, &same_dest);
 1875|       |    }
 1876|       |#endif
 1877|      0|#ifdef USE_HTTP2
 1878|      0|    if(!hit && (neg->wanted & CURL_HTTP_V2x) &&
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (1878:8): [True: 0, False: 0]
  |  Branch (1878:16): [True: 0, False: 0]
  ------------------
 1879|      0|       !neg->h2_prior_knowledge) {
  ------------------
  |  Branch (1879:8): [True: 0, False: 0]
  ------------------
 1880|      0|      srcalpnid = ALPN_h2;
 1881|      0|      hit = Curl_altsvc_lookup(data->asi,
 1882|      0|                               origin, ALPN_h2, /* from */
 1883|      0|                               &as /* to */,
 1884|      0|                               allowed_alpns, &same_dest);
 1885|      0|    }
 1886|      0|#endif
 1887|      0|    if(!hit && (neg->wanted & CURL_HTTP_V1x) &&
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (1887:8): [True: 0, False: 0]
  |  Branch (1887:16): [True: 0, False: 0]
  ------------------
 1888|      0|       !neg->only_10) {
  ------------------
  |  Branch (1888:8): [True: 0, False: 0]
  ------------------
 1889|      0|      srcalpnid = ALPN_h1;
 1890|      0|      hit = Curl_altsvc_lookup(data->asi,
 1891|      0|                               origin, ALPN_h1, /* from */
 1892|      0|                               &as /* to */,
 1893|      0|                               allowed_alpns, &same_dest);
 1894|      0|    }
 1895|       |
 1896|      0|    if(hit && same_dest) {
  ------------------
  |  Branch (1896:8): [True: 0, False: 0]
  |  Branch (1896:15): [True: 0, False: 0]
  ------------------
 1897|       |      /* same destination, but more HTTPS version options */
 1898|      0|      switch(as->dst.alpnid) {
 1899|      0|      case ALPN_h1:
  ------------------
  |  Branch (1899:7): [True: 0, False: 0]
  ------------------
 1900|      0|        neg->wanted |= CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1901|      0|        neg->preferred = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1902|      0|        break;
 1903|      0|      case ALPN_h2:
  ------------------
  |  Branch (1903:7): [True: 0, False: 0]
  ------------------
 1904|      0|        neg->wanted |= CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1905|      0|        neg->preferred = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1906|      0|        break;
 1907|      0|      case ALPN_h3:
  ------------------
  |  Branch (1907:7): [True: 0, False: 0]
  ------------------
 1908|      0|        neg->wanted |= CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 1909|      0|        neg->preferred = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 1910|      0|        break;
 1911|      0|      default: /* should not be possible */
  ------------------
  |  Branch (1911:7): [True: 0, False: 0]
  ------------------
 1912|      0|        break;
 1913|      0|      }
 1914|      0|    }
 1915|      0|    else if(hit) {
  ------------------
  |  Branch (1915:13): [True: 0, False: 0]
  ------------------
 1916|      0|      result = Curl_peer_create(data, conn->origin->scheme,
 1917|      0|                                as->dst.host, as->dst.port,
 1918|      0|                                &via_peer);
 1919|      0|      if(result)
  ------------------
  |  Branch (1919:10): [True: 0, False: 0]
  ------------------
 1920|      0|        return result;
 1921|      0|      infof(data, "Alt-svc connecting from [%s]%s:%u to [%s]%s:%u",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1922|      0|            Curl_alpnid2str(srcalpnid), origin->hostname, origin->port,
 1923|      0|            Curl_alpnid2str(as->dst.alpnid),
 1924|      0|            via_peer->hostname, via_peer->port);
 1925|      0|      conn->bits.altused = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1926|      0|      if(srcalpnid != as->dst.alpnid) {
  ------------------
  |  Branch (1926:10): [True: 0, False: 0]
  ------------------
 1927|       |        /* protocol version switch */
 1928|      0|        switch(as->dst.alpnid) {
 1929|      0|        case ALPN_h1:
  ------------------
  |  Branch (1929:9): [True: 0, False: 0]
  ------------------
 1930|      0|          neg->wanted = neg->allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1931|      0|          neg->only_10 = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1932|      0|          break;
 1933|      0|        case ALPN_h2:
  ------------------
  |  Branch (1933:9): [True: 0, False: 0]
  ------------------
 1934|      0|          neg->wanted = neg->allowed = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1935|      0|          break;
 1936|      0|        case ALPN_h3:
  ------------------
  |  Branch (1936:9): [True: 0, False: 0]
  ------------------
 1937|      0|          conn->transport_wanted = TRNSPRT_QUIC;
  ------------------
  |  |  239|      0|#define TRNSPRT_QUIC 5
  ------------------
 1938|      0|          neg->wanted = neg->allowed = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 1939|      0|          break;
 1940|      0|        default: /* should not be possible */
  ------------------
  |  Branch (1940:9): [True: 0, False: 0]
  ------------------
 1941|      0|          break;
 1942|      0|        }
 1943|      0|      }
 1944|      0|    }
 1945|      0|  }
 1946|  6.48k|#endif
 1947|       |
 1948|  6.48k|  if(via_peer)
  ------------------
  |  Branch (1948:6): [True: 5.92k, False: 563]
  ------------------
 1949|  5.92k|    conn->via_peer = via_peer;
 1950|       |
 1951|  6.48k|  return result;
 1952|  6.48k|}
url.c:parse_connect_to_string:
 1758|  5.92k|{
 1759|  5.92k|  CURLcode result = CURLE_OK;
 1760|  5.92k|  const char *ptr = conn_to_line;
 1761|  5.92k|  bool host_match = FALSE;
  ------------------
  |  | 1056|  5.92k|#define FALSE false
  ------------------
 1762|  5.92k|  bool port_match = FALSE;
  ------------------
  |  | 1056|  5.92k|#define FALSE false
  ------------------
 1763|       |
 1764|  5.92k|  *pvia_dest = NULL;
 1765|       |
 1766|  5.92k|  if(*ptr == ':') {
  ------------------
  |  Branch (1766:6): [True: 5.92k, False: 0]
  ------------------
 1767|       |    /* an empty hostname always matches */
 1768|  5.92k|    host_match = TRUE;
  ------------------
  |  | 1053|  5.92k|#define TRUE true
  ------------------
 1769|  5.92k|    ptr++;
 1770|  5.92k|  }
 1771|      0|  else {
 1772|       |    /* check whether the URL's hostname matches. Use the URL hostname
 1773|       |     * when it was an IPv6 address. Otherwise use the connection's hostname
 1774|       |     * that has IDN conversion. */
 1775|      0|    size_t hlen = strlen(dest->hostname);
 1776|      0|    host_match = curl_strnequal(ptr, dest->hostname, hlen);
 1777|      0|    if(!host_match && (dest->user_hostname != dest->hostname)) {
  ------------------
  |  Branch (1777:8): [True: 0, False: 0]
  |  Branch (1777:23): [True: 0, False: 0]
  ------------------
 1778|       |      /* hostname was normalized, could be IPv6 or IDN */
 1779|      0|      hlen = strlen(dest->user_hostname);
 1780|      0|      host_match = curl_strnequal(ptr, dest->user_hostname, hlen);
 1781|      0|    }
 1782|      0|    host_match = host_match && ptr[hlen] == ':';
  ------------------
  |  Branch (1782:18): [True: 0, False: 0]
  |  Branch (1782:32): [True: 0, False: 0]
  ------------------
 1783|      0|    if(host_match)
  ------------------
  |  Branch (1783:8): [True: 0, False: 0]
  ------------------
 1784|      0|      ptr += hlen + 1;
 1785|      0|  }
 1786|       |
 1787|  5.92k|  if(host_match) {
  ------------------
  |  Branch (1787:6): [True: 5.92k, False: 0]
  ------------------
 1788|  5.92k|    if(*ptr == ':') {
  ------------------
  |  Branch (1788:8): [True: 5.92k, False: 0]
  ------------------
 1789|       |      /* an empty port always matches */
 1790|  5.92k|      port_match = TRUE;
  ------------------
  |  | 1053|  5.92k|#define TRUE true
  ------------------
 1791|  5.92k|      ptr++;
 1792|  5.92k|    }
 1793|      0|    else {
 1794|       |      /* check whether the URL's port matches */
 1795|      0|      const char *ptr_next = strchr(ptr, ':');
 1796|      0|      if(ptr_next) {
  ------------------
  |  Branch (1796:10): [True: 0, False: 0]
  ------------------
 1797|      0|        curl_off_t port_to_match;
 1798|      0|        if(!curlx_str_number(&ptr, &port_to_match, 0xffff) &&
  ------------------
  |  Branch (1798:12): [True: 0, False: 0]
  ------------------
 1799|      0|           ((uint16_t)port_to_match == dest->port)) {
  ------------------
  |  Branch (1799:12): [True: 0, False: 0]
  ------------------
 1800|      0|          port_match = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1801|      0|        }
 1802|      0|        ptr = ptr_next + 1;
 1803|      0|      }
 1804|      0|    }
 1805|  5.92k|  }
 1806|       |
 1807|  5.92k|  if(host_match && port_match && ptr && *ptr)
  ------------------
  |  Branch (1807:6): [True: 5.92k, False: 0]
  |  Branch (1807:20): [True: 5.92k, False: 0]
  |  Branch (1807:34): [True: 5.92k, False: 0]
  |  Branch (1807:41): [True: 5.92k, False: 0]
  ------------------
 1808|  5.92k|    result = Curl_peer_from_connect_to(data, dest, ptr, pvia_dest);
 1809|       |
 1810|  5.92k|  return result;
 1811|  5.92k|}
url.c:url_set_conn_login:
 1730|  6.50k|{
 1731|       |  /* If our protocol needs a password and we have none, use the defaults */
 1732|  6.50k|  if((conn->scheme->flags & PROTOPT_NEEDSPWD) && !conn->creds) {
  ------------------
  |  |  215|  6.50k|#define PROTOPT_NEEDSPWD (1 << 5)  /* needs a password, and if none is set it
  ------------------
  |  Branch (1732:6): [True: 0, False: 6.50k]
  |  Branch (1732:50): [True: 0, False: 0]
  ------------------
 1733|      0|    Curl_peer_link(&conn->creds_origin, data->state.origin);
 1734|      0|    if(data->state.creds)
  ------------------
  |  Branch (1734:8): [True: 0, False: 0]
  ------------------
 1735|      0|      Curl_creds_link(&conn->creds, data->state.creds);
 1736|      0|    else
 1737|      0|      return Curl_creds_create(CURL_DEFAULT_USER, CURL_DEFAULT_PASSWORD,
  ------------------
  |  |   29|      0|#define CURL_DEFAULT_USER     "anonymous"
  ------------------
                    return Curl_creds_create(CURL_DEFAULT_USER, CURL_DEFAULT_PASSWORD,
  ------------------
  |  |   30|      0|#define CURL_DEFAULT_PASSWORD "ftp@example.com"
  ------------------
 1738|      0|                               NULL, NULL, NULL, CREDS_NONE, &conn->creds);
  ------------------
  |  |   29|      0|#define CREDS_NONE   0 /* used for default username/passwd */
  ------------------
 1739|      0|  }
 1740|  6.50k|  else if(!(conn->scheme->flags & PROTOPT_CREDSPERREQUEST)) {
  ------------------
  |  |  219|  6.50k|#define PROTOPT_CREDSPERREQUEST (1 << 7) /* requires login credentials per
  ------------------
  |  Branch (1740:11): [True: 0, False: 6.50k]
  ------------------
 1741|       |    /* for protocols that do not handle credentials per request,
 1742|       |     * the connection credentials are set by the initial transfer. */
 1743|      0|    Curl_peer_link(&conn->creds_origin, data->state.origin);
 1744|      0|    Curl_creds_link(&conn->creds, data->state.creds);
 1745|      0|  }
 1746|       |
 1747|  6.50k|  return CURLE_OK;
 1748|  6.50k|}
url.c:setup_connection_internals:
 1596|  6.50k|{
 1597|  6.50k|  struct Curl_peer *peer = NULL;
 1598|  6.50k|  CURLcode result;
 1599|       |
 1600|  6.50k|  if(conn->scheme->run->setup_connection) {
  ------------------
  |  Branch (1600:6): [True: 6.50k, False: 0]
  ------------------
 1601|  6.50k|    result = conn->scheme->run->setup_connection(data, conn);
 1602|  6.50k|    if(result)
  ------------------
  |  Branch (1602:8): [True: 0, False: 6.50k]
  ------------------
 1603|      0|      return result;
 1604|  6.50k|  }
 1605|       |
 1606|       |  /* Now create the destination name */
 1607|  6.50k|  peer = Curl_conn_get_destination(conn, FIRSTSOCKET);
  ------------------
  |  |  233|  6.50k|#define FIRSTSOCKET     0
  ------------------
 1608|  6.50k|  if(!peer)
  ------------------
  |  Branch (1608:6): [True: 0, False: 6.50k]
  ------------------
 1609|      0|    return CURLE_FAILED_INIT;
 1610|       |
 1611|       |  /* IPv6 addresses with a scope_id (0 is default == global) have a
 1612|       |   * printable representation with a '%<scope_id>' suffix. */
 1613|  6.50k|  if(peer->ipv6)
  ------------------
  |  Branch (1613:6): [True: 32, False: 6.47k]
  ------------------
 1614|     32|    if(peer->scopeid)
  ------------------
  |  Branch (1614:8): [True: 6, False: 26]
  ------------------
 1615|      6|      conn->destination = curl_maprintf("[%s%%%u]:%u",
 1616|      6|        peer->hostname, peer->scopeid, peer->port);
 1617|     26|    else
 1618|     26|      conn->destination = curl_maprintf("[%s]:%u",
 1619|     26|        peer->hostname, peer->port);
 1620|  6.47k|  else
 1621|  6.47k|    conn->destination = curl_maprintf("%s:%u", peer->hostname, peer->port);
 1622|  6.50k|  if(!conn->destination)
  ------------------
  |  Branch (1622:6): [True: 0, False: 6.50k]
  ------------------
 1623|      0|    return CURLE_OUT_OF_MEMORY;
 1624|       |
 1625|  6.50k|  Curl_strntolower(conn->destination, conn->destination,
 1626|  6.50k|                   strlen(conn->destination));
 1627|       |
 1628|  6.50k|  return CURLE_OK;
 1629|  6.50k|}
url.c:setup_range:
 1559|  6.25k|{
 1560|  6.25k|  struct UrlState *s = &data->state;
 1561|  6.25k|  s->resume_from = data->set.set_resume_from;
 1562|  6.25k|  if(s->resume_from || data->set.str[STRING_SET_RANGE]) {
  ------------------
  |  Branch (1562:6): [True: 32, False: 6.22k]
  |  Branch (1562:24): [True: 14, False: 6.20k]
  ------------------
 1563|     46|    if(s->rangestringalloc)
  ------------------
  |  Branch (1563:8): [True: 0, False: 46]
  ------------------
 1564|      0|      curlx_free(s->range);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1565|       |
 1566|     46|    if(s->resume_from)
  ------------------
  |  Branch (1566:8): [True: 32, False: 14]
  ------------------
 1567|     32|      s->range = curl_maprintf("%" FMT_OFF_T "-", s->resume_from);
 1568|     14|    else
 1569|     14|      s->range = curlx_strdup(data->set.str[STRING_SET_RANGE]);
  ------------------
  |  | 1472|     14|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1570|       |
 1571|     46|    if(!s->range)
  ------------------
  |  Branch (1571:8): [True: 0, False: 46]
  ------------------
 1572|      0|      return CURLE_OUT_OF_MEMORY;
 1573|       |
 1574|     46|    s->rangestringalloc = TRUE;
  ------------------
  |  | 1053|     46|#define TRUE true
  ------------------
 1575|       |
 1576|       |    /* tell ourselves to fetch this range */
 1577|     46|    s->use_range = TRUE;        /* enable range download */
  ------------------
  |  | 1053|     46|#define TRUE true
  ------------------
 1578|     46|  }
 1579|  6.20k|  else
 1580|  6.20k|    s->use_range = FALSE; /* disable range download */
  ------------------
  |  | 1056|  6.20k|#define FALSE false
  ------------------
 1581|       |
 1582|  6.25k|  return CURLE_OK;
 1583|  6.25k|}
url.c:url_attach_existing:
 1127|  6.50k|{
 1128|  6.50k|  struct url_conn_match match;
 1129|  6.50k|  bool success;
 1130|       |
 1131|  6.50k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1079|  6.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1131:3): [True: 0, False: 6.50k]
  |  Branch (1131:3): [True: 6.50k, False: 0]
  ------------------
 1132|  6.50k|  Curl_cpool_prune_dead(data);
 1133|       |
 1134|  6.50k|  memset(&match, 0, sizeof(match));
 1135|  6.50k|  match.data = data;
 1136|  6.50k|  match.needle = needle;
 1137|  6.50k|  match.now = *Curl_pgrs_now(data);
 1138|  6.50k|  match.may_multiplex = xfer_may_multiplex(data, needle);
 1139|       |
 1140|       |#ifdef USE_NTLM
 1141|       |  match.want_ntlm_http =
 1142|       |    (data->state.authhost.want & CURLAUTH_NTLM) &&
 1143|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1144|       |#ifndef CURL_DISABLE_PROXY
 1145|       |  match.want_proxy_ntlm_http =
 1146|       |    needle->http_proxy.creds &&
 1147|       |    (data->state.authproxy.want & CURLAUTH_NTLM) &&
 1148|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1149|       |#endif
 1150|       |#endif
 1151|       |
 1152|       |#if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
 1153|       |  match.want_nego_http =
 1154|       |    (data->state.authhost.want & CURLAUTH_NEGOTIATE) &&
 1155|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1156|       |#ifndef CURL_DISABLE_PROXY
 1157|       |  match.want_proxy_nego_http =
 1158|       |    needle->http_proxy.creds &&
 1159|       |    (data->state.authproxy.want & CURLAUTH_NEGOTIATE) &&
 1160|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1161|       |#endif
 1162|       |#endif
 1163|  6.50k|  match.require_tls = data->set.use_ssl >= CURLUSESSL_CONTROL;
  ------------------
  |  |  934|  6.50k|#define CURLUSESSL_CONTROL 2L /* SSL for the control connection or fail */
  ------------------
 1164|  6.50k|  match.may_tls = data->set.use_ssl > CURLUSESSL_NONE;
  ------------------
  |  |  932|  6.50k|#define CURLUSESSL_NONE    0L /* do not attempt to use SSL */
  ------------------
 1165|       |
 1166|       |  /* Find a connection in the pool that matches what "data + needle"
 1167|       |   * requires. If a suitable candidate is found, it is attached to "data". */
 1168|  6.50k|  success = Curl_cpool_find(data, needle->destination,
 1169|  6.50k|                            url_match_conn, url_match_result, &match);
 1170|       |
 1171|       |  /* wait_pipe is TRUE if we encounter a bundle that is undecided. There
 1172|       |   * is no matching connection then, yet. */
 1173|  6.50k|  *waitpipe = (bool)match.wait_pipe;
 1174|  6.50k|  return success;
 1175|  6.50k|}
url.c:xfer_may_multiplex:
  546|  6.50k|{
  547|  6.50k|#ifndef CURL_DISABLE_HTTP
  548|       |  /* If an HTTP protocol and multiplexing is enabled */
  549|  6.50k|  if((conn->scheme->protocol & PROTO_FAMILY_HTTP) &&
  ------------------
  |  |   84|  6.50k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1086|  6.50k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1087|  6.50k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  6.50k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  6.50k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  6.50k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (549:6): [True: 6.50k, False: 0]
  ------------------
  550|  6.50k|     (!conn->bits.protoconnstart || !conn->bits.close)) {
  ------------------
  |  Branch (550:7): [True: 6.50k, False: 0]
  |  Branch (550:37): [True: 0, False: 0]
  ------------------
  551|       |
  552|  6.50k|    if(Curl_multiplex_wanted(data->multi) &&
  ------------------
  |  Branch (552:8): [True: 6.50k, False: 0]
  ------------------
  553|  6.50k|       (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   41|  6.50k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                     (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   42|  6.50k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (553:8): [True: 6.49k, False: 5]
  ------------------
  554|       |      /* allows HTTP/2 or newer */
  555|  6.49k|      return TRUE;
  ------------------
  |  | 1053|  6.49k|#define TRUE true
  ------------------
  556|  6.50k|  }
  557|       |#else
  558|       |  (void)data;
  559|       |  (void)conn;
  560|       |#endif
  561|      5|  return FALSE;
  ------------------
  |  | 1056|      5|#define FALSE false
  ------------------
  562|  6.50k|}
url.c:url_match_conn:
 1025|    248|{
 1026|    248|  struct url_conn_match *m = userdata;
 1027|       |  /* Check if `conn` can be used for transfer `m->data` */
 1028|       |
 1029|       |  /* general connect config setting match? */
 1030|    248|  if(!url_match_connect_config(conn, m))
  ------------------
  |  Branch (1030:6): [True: 0, False: 248]
  ------------------
 1031|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1032|       |
 1033|       |  /* match for destination and protocol? */
 1034|    248|  if(!url_match_destination(conn, m))
  ------------------
  |  Branch (1034:6): [True: 0, False: 248]
  ------------------
 1035|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1036|       |
 1037|    248|  if(!url_match_fully_connected(conn, m))
  ------------------
  |  Branch (1037:6): [True: 248, False: 0]
  ------------------
 1038|    248|    return FALSE;
  ------------------
  |  | 1056|    248|#define FALSE false
  ------------------
 1039|       |
 1040|      0|  if(!url_match_multiplex_needs(conn, m))
  ------------------
  |  Branch (1040:6): [True: 0, False: 0]
  ------------------
 1041|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1042|       |
 1043|      0|  if(!url_match_ssl_use(conn, m))
  ------------------
  |  Branch (1043:6): [True: 0, False: 0]
  ------------------
 1044|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1045|       |
 1046|      0|  if(!url_match_proxy_use(conn, m))
  ------------------
  |  Branch (1046:6): [True: 0, False: 0]
  ------------------
 1047|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1048|      0|  if(!url_match_ssl_config(conn, m))
  ------------------
  |  Branch (1048:6): [True: 0, False: 0]
  ------------------
 1049|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1050|       |
 1051|      0|  if(!url_match_http_multiplex(conn, m))
  ------------------
  |  Branch (1051:6): [True: 0, False: 0]
  ------------------
 1052|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1053|      0|  else if(m->wait_pipe)
  ------------------
  |  Branch (1053:11): [True: 0, False: 0]
  ------------------
 1054|       |    /* we decided to wait on PIPELINING */
 1055|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1056|       |
 1057|      0|  if(!url_match_auth(conn, m))
  ------------------
  |  Branch (1057:6): [True: 0, False: 0]
  ------------------
 1058|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1059|       |
 1060|      0|  if(!url_match_proto_config(conn, m))
  ------------------
  |  Branch (1060:6): [True: 0, False: 0]
  ------------------
 1061|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1062|       |
 1063|      0|  if(!url_match_auth_ntlm(conn, m))
  ------------------
  |  |  966|      0|#define url_match_auth_ntlm(c, m) ((void)(c), (void)(m), TRUE)
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (1063:6): [True: 0, False: 0]
  ------------------
 1064|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1065|      0|  else if(m->force_reuse)
  ------------------
  |  Branch (1065:11): [True: 0, False: 0]
  ------------------
 1066|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1067|       |
 1068|      0|  if(!url_match_auth_nego(conn, m))
  ------------------
  |  | 1021|      0|#define url_match_auth_nego(c, m) ((void)(c), (void)(m), TRUE)
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (1068:6): [True: 0, False: 0]
  ------------------
 1069|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1070|      0|  else if(m->force_reuse)
  ------------------
  |  Branch (1070:11): [True: 0, False: 0]
  ------------------
 1071|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1072|       |
 1073|      0|  if(!url_match_multiplex_limits(conn, m))
  ------------------
  |  Branch (1073:6): [True: 0, False: 0]
  ------------------
 1074|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1075|       |
 1076|       |  /* If we are going to pick an idle connection, do an extra
 1077|       |   * health check before we reuse it. */
 1078|      0|  if(!CONN_INUSE(conn) &&
  ------------------
  |  |  272|      0|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  ------------------
  |  Branch (1078:6): [True: 0, False: 0]
  ------------------
 1079|      0|     !Curl_cpool_conn_seems_healthy(conn, m->data, &m->now)) {
  ------------------
  |  Branch (1079:6): [True: 0, False: 0]
  ------------------
 1080|      0|    infof(m->data, "Connection %" FMT_OFF_T " seems to be dead, terminating",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1081|      0|          conn->connection_id);
 1082|      0|    Curl_conn_terminate(m->data, conn, FALSE);
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1083|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1084|      0|  }
 1085|       |
 1086|       |  /* conn matches our needs. */
 1087|      0|  m->found = conn;
 1088|       |  return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1089|      0|}
url.c:url_match_connect_config:
  614|    248|{
  615|       |  /* connect-only or to-be-closed connections will not be reused */
  616|    248|  if(conn->bits.connect_only || conn->bits.close || conn->bits.no_reuse)
  ------------------
  |  Branch (616:6): [True: 0, False: 248]
  |  Branch (616:33): [True: 0, False: 248]
  |  Branch (616:53): [True: 0, False: 248]
  ------------------
  617|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  618|       |
  619|       |  /* ip_version must match */
  620|    248|  if(m->data->set.ipver != CURL_IPRESOLVE_WHATEVER &&
  ------------------
  |  | 2327|    496|#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
  ------------------
  |  Branch (620:6): [True: 0, False: 248]
  ------------------
  621|      0|     m->data->set.ipver != conn->ip_version)
  ------------------
  |  Branch (621:6): [True: 0, False: 0]
  ------------------
  622|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  623|       |
  624|    248|  if(m->needle->localdev || m->needle->localport) {
  ------------------
  |  Branch (624:6): [True: 0, False: 248]
  |  Branch (624:29): [True: 0, False: 248]
  ------------------
  625|       |    /* If we are bound to a specific local end (IP+port), we must not reuse a
  626|       |       random other one, although if we did not ask for a particular one we
  627|       |       can reuse one that was bound.
  628|       |
  629|       |       This comparison is a bit rough and too strict. Since the input
  630|       |       parameters can be specified in numerous ways and still end up the same
  631|       |       it would take a lot of processing to make it really accurate. Instead,
  632|       |       this matching will assume that reuses of bound connections will most
  633|       |       likely also reuse the exact same binding parameters and missing out a
  634|       |       few edge cases should not hurt anyone much. */
  635|      0|    if((conn->localport != m->needle->localport) ||
  ------------------
  |  Branch (635:8): [True: 0, False: 0]
  ------------------
  636|      0|       (conn->localportrange != m->needle->localportrange) ||
  ------------------
  |  Branch (636:8): [True: 0, False: 0]
  ------------------
  637|      0|       (m->needle->localdev &&
  ------------------
  |  Branch (637:9): [True: 0, False: 0]
  ------------------
  638|      0|        (!conn->localdev || strcmp(conn->localdev, m->needle->localdev))))
  ------------------
  |  Branch (638:10): [True: 0, False: 0]
  |  Branch (638:29): [True: 0, False: 0]
  ------------------
  639|      0|      return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  640|      0|  }
  641|       |
  642|    248|  if(!m->needle->via_peer != !conn->via_peer)
  ------------------
  |  Branch (642:6): [True: 0, False: 248]
  ------------------
  643|       |    /* do not mix connections that use the "connect to host" feature and
  644|       |     * connections that do not use this feature */
  645|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  646|       |
  647|    248|  return TRUE;
  ------------------
  |  | 1053|    248|#define TRUE true
  ------------------
  648|    248|}
url.c:url_match_destination:
  873|    248|{
  874|       |  /* Different connect-to peers never match */
  875|    248|  if(!Curl_peer_same_destination(m->needle->via_peer, conn->via_peer))
  ------------------
  |  Branch (875:6): [True: 0, False: 248]
  ------------------
  876|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  877|       |
  878|    248|  if(m->needle->origin->scheme != conn->origin->scheme) {
  ------------------
  |  Branch (878:6): [True: 0, False: 248]
  ------------------
  879|       |    /* `needle` and `conn` not having the same scheme.
  880|       |     * This is allowed for the same family *if* conn is using TLS.
  881|       |     * - IMAP+STARTTLS works for IMAPS.
  882|       |     * - IMAPS works for IMAP. */
  883|      0|    if(get_protocol_family(conn->origin->scheme) !=
  ------------------
  |  Branch (883:8): [True: 0, False: 0]
  ------------------
  884|      0|       m->needle->scheme->protocol) {
  885|      0|      return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  886|      0|    }
  887|      0|  }
  888|       |  /* Scheme mismatch is acceptable, compare hostname/port */
  889|    248|  return Curl_peer_same_destination(m->needle->origin, conn->origin);
  890|    248|}
url.c:url_match_fully_connected:
  652|    248|{
  653|    248|  if(!Curl_conn_is_connected(conn, FIRSTSOCKET) ||
  ------------------
  |  |  233|    248|#define FIRSTSOCKET     0
  ------------------
  |  Branch (653:6): [True: 248, False: 0]
  ------------------
  654|    248|     conn->bits.upgrade_in_progress) {
  ------------------
  |  Branch (654:6): [True: 0, False: 0]
  ------------------
  655|       |    /* Not yet connected, or a protocol upgrade is in progress. The later
  656|       |     * happens for HTTP/2 Upgrade: requests that need a response. */
  657|    248|    if(m->may_multiplex) {
  ------------------
  |  Branch (657:8): [True: 248, False: 0]
  ------------------
  658|    248|      m->seen_pending_conn = TRUE;
  ------------------
  |  | 1053|    248|#define TRUE true
  ------------------
  659|       |      /* Do not pick a connection that has not connected yet */
  660|    248|      infof(m->data, "Connection #%" FMT_OFF_T
  ------------------
  |  |  143|    248|  do {                               \
  |  |  144|    248|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    248|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 248, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 248]
  |  |  |  |  ------------------
  |  |  |  |  323|    248|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    248|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    248|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 248]
  |  |  ------------------
  ------------------
  661|    248|            " is not open enough, cannot reuse", conn->connection_id);
  662|    248|    }
  663|       |    /* Do not pick a connection that has not connected yet */
  664|    248|    return FALSE;
  ------------------
  |  | 1056|    248|#define FALSE false
  ------------------
  665|    248|  }
  666|      0|  return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  667|    248|}
url.c:url_match_result:
 1092|  6.50k|{
 1093|  6.50k|  struct url_conn_match *match = userdata;
 1094|  6.50k|  if(match->found) {
  ------------------
  |  Branch (1094:6): [True: 0, False: 6.50k]
  ------------------
 1095|       |    /* Attach it now while still under lock, so the connection does
 1096|       |     * no longer appear idle and can be reaped. */
 1097|      0|    Curl_attach_connection(match->data, match->found);
 1098|      0|    return TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1099|      0|  }
 1100|  6.50k|  else if(match->seen_single_use_conn && !match->seen_multiplex_conn) {
  ------------------
  |  Branch (1100:11): [True: 0, False: 6.50k]
  |  Branch (1100:42): [True: 0, False: 0]
  ------------------
 1101|       |    /* We have seen a single-use, existing connection to the destination and
 1102|       |     * no multiplexed one. It seems safe to assume that the server does
 1103|       |     * not support multiplexing. */
 1104|      0|    match->wait_pipe = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1105|      0|  }
 1106|  6.50k|  else if(match->seen_pending_conn && match->data->set.pipewait) {
  ------------------
  |  Branch (1106:11): [True: 248, False: 6.25k]
  |  Branch (1106:39): [True: 248, False: 0]
  ------------------
 1107|    248|    infof(match->data,
  ------------------
  |  |  143|    248|  do {                               \
  |  |  144|    248|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    248|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 248, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 248]
  |  |  |  |  ------------------
  |  |  |  |  323|    248|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    248|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    248|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 248]
  |  |  ------------------
  ------------------
 1108|    248|          "Found pending candidate for reuse and CURLOPT_PIPEWAIT is set");
 1109|    248|    match->wait_pipe = TRUE;
  ------------------
  |  | 1053|    248|#define TRUE true
  ------------------
 1110|    248|  }
 1111|  6.50k|  match->force_reuse = FALSE;
  ------------------
  |  | 1056|  6.50k|#define FALSE false
  ------------------
 1112|       |  return FALSE;
  ------------------
  |  | 1056|  6.50k|#define FALSE false
  ------------------
 1113|  6.50k|}

urlencode_str:
  133|  7.38k|{
  134|       |  /* we must add this with whitespace-replacing */
  135|  7.38k|  const unsigned char *iptr;
  136|  7.38k|  const unsigned char *host_sep = (const unsigned char *)url;
  137|  7.38k|  CURLcode result = CURLE_OK;
  138|       |
  139|  7.38k|  DEBUGASSERT((query >= QUERY_NO) && (query <= QUERY_YES));
  ------------------
  |  | 1079|  7.38k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (139:3): [True: 0, False: 7.38k]
  |  Branch (139:3): [True: 0, False: 0]
  |  Branch (139:3): [True: 7.38k, False: 0]
  |  Branch (139:3): [True: 7.38k, False: 0]
  ------------------
  140|       |
  141|  7.38k|  if(!relative) {
  ------------------
  |  Branch (141:6): [True: 0, False: 7.38k]
  ------------------
  142|      0|    size_t n;
  143|      0|    host_sep = (const unsigned char *)find_host_sep(url);
  144|       |
  145|       |    /* output the first piece as-is */
  146|      0|    n = (const char *)host_sep - url;
  147|      0|    result = curlx_dyn_addn(o, url, n);
  148|      0|    len -= n;
  149|      0|  }
  150|       |
  151|  8.37M|  for(iptr = host_sep; len && !result; iptr++, len--) {
  ------------------
  |  Branch (151:24): [True: 8.36M, False: 7.38k]
  |  Branch (151:31): [True: 8.36M, False: 0]
  ------------------
  152|  8.36M|    if(*iptr == ' ') {
  ------------------
  |  Branch (152:8): [True: 0, False: 8.36M]
  ------------------
  153|      0|      if(query != QUERY_YES)
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
  |  Branch (153:10): [True: 0, False: 0]
  ------------------
  154|      0|        result = curlx_dyn_addn(o, "%20", 3);
  155|      0|      else
  156|      0|        result = curlx_dyn_addn(o, "+", 1);
  157|      0|    }
  158|  8.36M|    else if((*iptr < ' ') || (*iptr >= 0x7f)) {
  ------------------
  |  Branch (158:13): [True: 0, False: 8.36M]
  |  Branch (158:30): [True: 1.84M, False: 6.51M]
  ------------------
  159|  1.84M|      unsigned char out[3] = { '%' };
  160|  1.84M|      Curl_hexbyte(&out[1], *iptr);
  161|  1.84M|      result = curlx_dyn_addn(o, out, 3);
  162|  1.84M|    }
  163|  6.51M|    else if(*iptr == '%' && (len >= 3) &&
  ------------------
  |  Branch (163:13): [True: 4.05M, False: 2.45M]
  |  Branch (163:29): [True: 4.05M, False: 103]
  ------------------
  164|  4.05M|            ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   37|  10.5M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  8.11M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 47.2k, False: 4.01M]
  |  |  |  |  |  Branch (42:38): [True: 7.10k, False: 40.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  8.10M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 26.8k, False: 4.02M]
  |  |  |  |  |  Branch (27:43): [True: 6.33k, False: 20.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  4.04M|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 31.5k, False: 4.01M]
  |  |  |  |  |  Branch (28:43): [True: 6.19k, False: 25.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   37|  6.53M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  39.2k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 13.6k, False: 5.99k]
  |  |  |  |  |  Branch (42:38): [True: 2.79k, False: 10.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  36.4k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 5.93k, False: 10.8k]
  |  |  |  |  |  Branch (27:43): [True: 2.38k, False: 3.55k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  14.4k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 8.10k, False: 6.34k]
  |  |  |  |  |  Branch (28:43): [True: 2.41k, False: 5.68k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|  7.59k|            (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   41|  15.1k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (41:22): [True: 2.08k, False: 5.51k]
  |  |  |  Branch (41:38): [True: 2.08k, False: 0]
  |  |  ------------------
  ------------------
                          (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   41|  5.51k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (41:22): [True: 1.52k, False: 3.98k]
  |  |  |  Branch (41:38): [True: 1.52k, False: 0]
  |  |  ------------------
  ------------------
  166|       |      /* uppercase it */
  167|  3.61k|      unsigned char hex = (unsigned char)((curlx_hexval(iptr[1]) << 4) |
  ------------------
  |  |  111|  3.61k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  168|  3.61k|                                          curlx_hexval(iptr[2]));
  ------------------
  |  |  111|  3.61k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  169|  3.61k|      unsigned char out[3] = { '%' };
  170|  3.61k|      Curl_hexbyte(&out[1], hex);
  171|  3.61k|      result = curlx_dyn_addn(o, out, 3);
  172|  3.61k|      iptr += 2;
  173|  3.61k|      len -= 2;
  174|  3.61k|    }
  175|  6.51M|    else {
  176|  6.51M|      result = curlx_dyn_addn(o, iptr, 1);
  177|  6.51M|      if(*iptr == '?' && (query == QUERY_NOT_YET))
  ------------------
  |  |   53|      0|#define QUERY_NOT_YET 3 /* allow to change to query */
  ------------------
  |  Branch (177:10): [True: 0, False: 6.51M]
  |  Branch (177:26): [True: 0, False: 0]
  ------------------
  178|      0|        query = QUERY_YES;
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
  179|  6.51M|    }
  180|  8.36M|  }
  181|       |
  182|  7.38k|  if(result)
  ------------------
  |  Branch (182:6): [True: 0, False: 7.38k]
  ------------------
  183|      0|    return cc2cu(result);
  ------------------
  |  |  108|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (108:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  184|  7.38k|  return CURLUE_OK;
  185|  7.38k|}
Curl_is_absolute_url:
  197|  22.7k|{
  198|  22.7k|  size_t i = 0;
  199|  22.7k|  DEBUGASSERT(!buf || (buflen > MAX_SCHEME_LEN));
  ------------------
  |  | 1079|  22.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (199:3): [True: 22.7k, False: 0]
  |  Branch (199:3): [True: 0, False: 0]
  |  Branch (199:3): [True: 11.8k, False: 10.9k]
  |  Branch (199:3): [True: 10.9k, False: 0]
  ------------------
  200|  22.7k|  (void)buflen; /* only used in debug-builds */
  201|  22.7k|  if(buf)
  ------------------
  |  Branch (201:6): [True: 10.9k, False: 11.8k]
  ------------------
  202|  10.9k|    buf[0] = 0; /* always leave a defined value in buf */
  203|       |#ifdef _WIN32
  204|       |  if(guess_scheme && STARTS_WITH_DRIVE_PREFIX(url))
  205|       |    return 0;
  206|       |#endif
  207|  22.7k|  if(ISALPHA(url[0]))
  ------------------
  |  |   36|  22.7k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|  45.4k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 4.35k, False: 18.3k]
  |  |  |  |  |  Branch (41:38): [True: 4.24k, False: 106]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|  18.4k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 14.3k, False: 4.10k]
  |  |  |  |  |  Branch (40:38): [True: 13.9k, False: 441]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  208|  84.7k|    for(i = 1; i < MAX_SCHEME_LEN; ++i) {
  ------------------
  |  |   55|  84.7k|#define MAX_SCHEME_LEN 40
  ------------------
  |  Branch (208:16): [True: 84.6k, False: 43]
  ------------------
  209|  84.6k|      char s = url[i];
  210|  84.6k|      if(s && (ISALNUM(s) || (s == '+') || (s == '-') || (s == '.'))) {
  ------------------
  |  |   39|   167k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|   167k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 81.6k, False: 2.10k]
  |  |  |  |  |  Branch (42:38): [True: 1.10k, False: 80.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|   166k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 33.6k, False: 48.9k]
  |  |  |  |  |  Branch (41:38): [True: 33.6k, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|  49.0k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 30.6k, False: 18.3k]
  |  |  |  |  |  Branch (40:38): [True: 30.5k, False: 36]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (210:10): [True: 83.7k, False: 895]
  |  Branch (210:30): [True: 267, False: 18.1k]
  |  Branch (210:44): [True: 435, False: 17.7k]
  |  Branch (210:58): [True: 478, False: 17.2k]
  ------------------
  211|       |        /* RFC 3986 3.1 explains:
  212|       |           scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  213|       |         */
  214|  66.5k|      }
  215|  18.1k|      else {
  216|  18.1k|        break;
  217|  18.1k|      }
  218|  84.6k|    }
  219|  22.7k|  if(i && (url[i] == ':') && ((url[i + 1] == '/') || !guess_scheme)) {
  ------------------
  |  Branch (219:6): [True: 18.1k, False: 4.54k]
  |  Branch (219:11): [True: 15.1k, False: 3.02k]
  |  Branch (219:31): [True: 14.8k, False: 342]
  |  Branch (219:54): [True: 0, False: 342]
  ------------------
  220|       |    /* If this does not guess scheme, the scheme always ends with the colon so
  221|       |       that this also detects data: URLs etc. In guessing mode, data: could
  222|       |       be the hostname "data" with a specified port number. */
  223|       |
  224|       |    /* the length of the scheme is the name part only */
  225|  14.8k|    size_t len = i;
  226|  14.8k|    if(buf) {
  ------------------
  |  Branch (226:8): [True: 7.34k, False: 7.47k]
  ------------------
  227|  7.34k|      Curl_strntolower(buf, url, i);
  228|  7.34k|      buf[i] = 0;
  229|  7.34k|    }
  230|  14.8k|    return len;
  231|  14.8k|  }
  232|  7.91k|  return 0;
  233|  22.7k|}
Curl_junkscan:
  237|  10.9k|{
  238|  10.9k|  size_t n = strlen(url);
  239|  10.9k|  size_t i;
  240|  10.9k|  unsigned char control;
  241|  10.9k|  const unsigned char *p = (const unsigned char *)url;
  242|  10.9k|  if(n > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  10.9k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (242:6): [True: 0, False: 10.9k]
  ------------------
  243|      0|    return CURLUE_MALFORMED_INPUT;
  244|       |
  245|  10.9k|  control = allowspace ? 0x1f : 0x20;
  ------------------
  |  Branch (245:13): [True: 0, False: 10.9k]
  ------------------
  246|  20.6M|  for(i = 0; i < n; i++) {
  ------------------
  |  Branch (246:14): [True: 20.6M, False: 10.9k]
  ------------------
  247|  20.6M|    if(p[i] <= control || p[i] == 127)
  ------------------
  |  Branch (247:8): [True: 27, False: 20.6M]
  |  Branch (247:27): [True: 3, False: 20.6M]
  ------------------
  248|     30|      return CURLUE_MALFORMED_INPUT;
  249|  20.6M|  }
  250|  10.9k|  *urllen = n;
  251|  10.9k|  return CURLUE_OK;
  252|  10.9k|}
parse_hostname_login:
  272|  10.7k|{
  273|  10.7k|  CURLUcode ures = CURLUE_OK;
  274|  10.7k|  CURLcode result;
  275|  10.7k|  char *userp = NULL;
  276|  10.7k|  char *passwdp = NULL;
  277|  10.7k|  char *optionsp = NULL;
  278|  10.7k|  const struct Curl_scheme *h = NULL;
  279|       |
  280|       |  /* At this point, we assume all the other special cases have been taken
  281|       |   * care of, so the host is at most
  282|       |   *
  283|       |   *   [user[:password][;options]]@]hostname
  284|       |   *
  285|       |   * We need somewhere to put the embedded details, so do that first.
  286|       |   */
  287|  10.7k|  const char *ptr;
  288|       |
  289|  10.7k|  DEBUGASSERT(login);
  ------------------
  |  | 1079|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:3): [True: 0, False: 10.7k]
  |  Branch (289:3): [True: 10.7k, False: 0]
  ------------------
  290|       |
  291|  10.7k|  *hostname_offset = 0;
  292|  10.7k|  ptr = memchr(login, '@', len);
  293|  10.7k|  if(!ptr)
  ------------------
  |  Branch (293:6): [True: 8.90k, False: 1.81k]
  ------------------
  294|  8.90k|    goto out;
  295|       |
  296|       |  /* We will now try to extract the
  297|       |   * possible login information in a string like:
  298|       |   * ftp://user:password@ftp.site.example:8021/README */
  299|  1.81k|  ptr++;
  300|       |
  301|       |  /* if this is a known scheme, get some details */
  302|  1.81k|  if(u->scheme)
  ------------------
  |  Branch (302:6): [True: 271, False: 1.54k]
  ------------------
  303|    271|    h = Curl_get_scheme(u->scheme);
  304|       |
  305|       |  /* We could use the login information in the URL so extract it. Only parse
  306|       |     options if the handler says we should. Note that 'h' might be NULL! */
  307|  1.81k|  result = Curl_parse_login_details(login, ptr - login - 1,
  308|  1.81k|                                    &userp, &passwdp,
  309|  1.81k|                                    (h && (h->flags & PROTOPT_URLOPTIONS)) ?
  ------------------
  |  |  224|    247|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (309:38): [True: 247, False: 1.57k]
  |  Branch (309:43): [True: 13, False: 234]
  ------------------
  310|  1.81k|                                    &optionsp : NULL);
  311|  1.81k|  if(result) {
  ------------------
  |  Branch (311:6): [True: 0, False: 1.81k]
  ------------------
  312|       |    /* the only possible error from Curl_parse_login_details is out of
  313|       |       memory: */
  314|      0|    ures = CURLUE_OUT_OF_MEMORY;
  315|      0|    goto out;
  316|      0|  }
  317|       |
  318|  1.81k|  if(userp) {
  ------------------
  |  Branch (318:6): [True: 1.81k, False: 0]
  ------------------
  319|  1.81k|    if(flags & CURLU_DISALLOW_USER) {
  ------------------
  |  |   93|  1.81k|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
  |  Branch (319:8): [True: 1, False: 1.81k]
  ------------------
  320|       |      /* Option DISALLOW_USER is set and URL contains username. */
  321|      1|      ures = CURLUE_USER_NOT_ALLOWED;
  322|      1|      goto out;
  323|      1|    }
  324|  1.81k|    curlx_free(u->user);
  ------------------
  |  | 1478|  1.81k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  325|  1.81k|    u->user = userp;
  326|  1.81k|  }
  327|       |
  328|  1.81k|  if(passwdp) {
  ------------------
  |  Branch (328:6): [True: 471, False: 1.34k]
  ------------------
  329|    471|    curlx_strzero(u->password);
  330|    471|    curlx_free(u->password);
  ------------------
  |  | 1478|    471|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  331|    471|    u->password = passwdp;
  332|    471|  }
  333|       |
  334|  1.81k|  if(optionsp) {
  ------------------
  |  Branch (334:6): [True: 5, False: 1.81k]
  ------------------
  335|      5|    curlx_free(u->options);
  ------------------
  |  | 1478|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  336|      5|    u->options = optionsp;
  337|      5|  }
  338|       |
  339|       |  /* the hostname starts at this offset */
  340|  1.81k|  *hostname_offset = ptr - login;
  341|  1.81k|  return CURLUE_OK;
  342|       |
  343|  8.90k|out:
  344|       |
  345|  8.90k|  curlx_free(userp);
  ------------------
  |  | 1478|  8.90k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  346|  8.90k|  curlx_strzero(passwdp);
  347|  8.90k|  curlx_free(passwdp);
  ------------------
  |  | 1478|  8.90k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  348|  8.90k|  curlx_free(optionsp);
  ------------------
  |  | 1478|  8.90k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  349|  8.90k|  curlx_safefree(u->user);
  ------------------
  |  | 1336|  8.90k|  do {                      \
  |  | 1337|  8.90k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  8.90k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  8.90k|    (ptr) = NULL;           \
  |  | 1339|  8.90k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 8.90k]
  |  |  ------------------
  ------------------
  350|  8.90k|  curlx_strzero(u->password);
  351|  8.90k|  curlx_safefree(u->password);
  ------------------
  |  | 1336|  8.90k|  do {                      \
  |  | 1337|  8.90k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  8.90k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  8.90k|    (ptr) = NULL;           \
  |  | 1339|  8.90k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 8.90k]
  |  |  ------------------
  ------------------
  352|  8.90k|  curlx_safefree(u->options);
  ------------------
  |  | 1336|  8.90k|  do {                      \
  |  | 1337|  8.90k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  8.90k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  8.90k|    (ptr) = NULL;           \
  |  | 1339|  8.90k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 8.90k]
  |  |  ------------------
  ------------------
  353|       |
  354|  8.90k|  return ures;
  355|  1.81k|}
parse_port:
  362|  10.7k|{
  363|  10.7k|  const char *portptr;
  364|  10.7k|  const char *hostname = curlx_dyn_ptr(host);
  365|       |  /*
  366|       |   * Find the end of an IPv6 address on the ']' ending bracket.
  367|       |   */
  368|  10.7k|  u->portnum = 0;
  369|  10.7k|  u->port_present = FALSE;
  ------------------
  |  | 1056|  10.7k|#define FALSE false
  ------------------
  370|  10.7k|  if(hostname[0] == '[') {
  ------------------
  |  Branch (370:6): [True: 291, False: 10.4k]
  ------------------
  371|    291|    portptr = strchr(hostname, ']');
  372|    291|    if(!portptr)
  ------------------
  |  Branch (372:8): [True: 5, False: 286]
  ------------------
  373|      5|      return CURLUE_BAD_IPV6;
  374|    286|    portptr++;
  375|       |    /* this is a RFC2732-style specified IP-address */
  376|    286|    if(*portptr) {
  ------------------
  |  Branch (376:8): [True: 12, False: 274]
  ------------------
  377|     12|      if(*portptr != ':')
  ------------------
  |  Branch (377:10): [True: 6, False: 6]
  ------------------
  378|      6|        return CURLUE_BAD_PORT_NUMBER;
  379|     12|    }
  380|    274|    else
  381|    274|      portptr = NULL;
  382|    286|  }
  383|  10.4k|  else
  384|  10.4k|    portptr = strchr(hostname, ':');
  385|       |
  386|  10.7k|  if(portptr) {
  ------------------
  |  Branch (386:6): [True: 273, False: 10.4k]
  ------------------
  387|    273|    curl_off_t port;
  388|    273|    size_t keep = portptr - hostname;
  389|    273|    int rc;
  390|       |
  391|       |    /* Browser behavior adaptation. If there is a colon with no digits after,
  392|       |       cut off the name there which makes us ignore the colon and use the
  393|       |       default port. Firefox, Chrome and Safari all do that.
  394|       |
  395|       |       Do not do it if the URL has no scheme, to make something that looks like
  396|       |       a scheme not work! */
  397|    273|    curlx_dyn_setlen(host, keep);
  398|    273|    portptr++;
  399|    273|    if(!*portptr)
  ------------------
  |  Branch (399:8): [True: 163, False: 110]
  ------------------
  400|    163|      return has_scheme ? CURLUE_OK : CURLUE_BAD_PORT_NUMBER;
  ------------------
  |  Branch (400:14): [True: 101, False: 62]
  ------------------
  401|    110|    if(*portptr == '\\')
  ------------------
  |  Branch (401:8): [True: 3, False: 107]
  ------------------
  402|      3|      return CURLUE_BACKSLASH;
  403|    107|    rc = curlx_str_number(&portptr, &port, 0xffff);
  404|    107|    if(rc)
  ------------------
  |  Branch (404:8): [True: 34, False: 73]
  ------------------
  405|     34|      return CURLUE_BAD_PORT_NUMBER;
  406|     73|    else if(*portptr == '\\')
  ------------------
  |  Branch (406:13): [True: 1, False: 72]
  ------------------
  407|      1|      return CURLUE_BACKSLASH;
  408|     72|    else if(*portptr)
  ------------------
  |  Branch (408:13): [True: 5, False: 67]
  ------------------
  409|      5|      return CURLUE_BAD_PORT_NUMBER;
  410|       |
  411|     67|    u->portnum = (uint16_t)port;
  412|     67|    u->port_present = TRUE;
  ------------------
  |  | 1053|     67|#define TRUE true
  ------------------
  413|     67|  }
  414|       |
  415|  10.5k|  return CURLUE_OK;
  416|  10.7k|}
ipv6_parse:
  427|    323|{
  428|    323|  size_t len;
  429|    323|  DEBUGASSERT(*hostname == '[');
  ------------------
  |  | 1079|    323|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (429:3): [True: 0, False: 323]
  |  Branch (429:3): [True: 323, False: 0]
  ------------------
  430|    323|  if(hlen < 4) /* '[::]' is the shortest possible valid string */
  ------------------
  |  Branch (430:6): [True: 5, False: 318]
  ------------------
  431|      5|    return CURLUE_BAD_IPV6;
  432|    318|  hostname++;
  433|    318|  hlen -= 2;
  434|       |
  435|       |  /* only valid IPv6 letters are ok */
  436|    318|  len = strspn(hostname, "0123456789abcdefABCDEF:.");
  437|       |
  438|    318|  if(hlen != len) {
  ------------------
  |  Branch (438:6): [True: 93, False: 225]
  ------------------
  439|     93|    hlen = len;
  440|     93|    if(hostname[len] == '%') {
  ------------------
  |  Branch (440:8): [True: 89, False: 4]
  ------------------
  441|       |      /* this could now be '%[zone id]' */
  442|     89|      char zoneid[MAX_ZONEID_LEN];
  443|     89|      int i = 0;
  444|     89|      char *h = &hostname[len + 1];
  445|       |      /* pass '25' if present and is a URL encoded percent sign */
  446|     89|      if(!strncmp(h, "25", 2) && h[2] && (h[2] != ']'))
  ------------------
  |  Branch (446:10): [True: 10, False: 79]
  |  Branch (446:34): [True: 7, False: 3]
  |  Branch (446:42): [True: 6, False: 1]
  ------------------
  447|      6|        h += 2;
  448|    753|      while(*h && (*h != ']') && (i < (MAX_ZONEID_LEN - 1)))
  ------------------
  |  |   56|    691|#define MAX_ZONEID_LEN 16
  ------------------
  |  Branch (448:13): [True: 738, False: 15]
  |  Branch (448:19): [True: 691, False: 47]
  |  Branch (448:34): [True: 664, False: 27]
  ------------------
  449|    664|        zoneid[i++] = *h++;
  450|     89|      if(!i || (']' != *h))
  ------------------
  |  Branch (450:10): [True: 3, False: 86]
  |  Branch (450:16): [True: 42, False: 44]
  ------------------
  451|     45|        return CURLUE_BAD_IPV6;
  452|     44|      zoneid[i] = 0;
  453|     44|      u->zoneid = curlx_strdup(zoneid);
  ------------------
  |  | 1472|     44|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  454|     44|      if(!u->zoneid)
  ------------------
  |  Branch (454:10): [True: 0, False: 44]
  ------------------
  455|      0|        return CURLUE_OUT_OF_MEMORY;
  456|     44|      hostname[len] = ']'; /* insert end bracket */
  457|     44|      hostname[len + 1] = 0; /* terminate the hostname */
  458|     44|    }
  459|      4|    else
  460|      4|      return CURLUE_BAD_IPV6;
  461|       |    /* hostname is fine */
  462|     93|  }
  463|       |
  464|       |  /* Normalize the IPv6 address */
  465|    269|  {
  466|    269|    char dest[16]; /* fits a binary IPv6 address */
  467|    269|    hostname[hlen] = 0; /* end the address there */
  468|    269|    if(curlx_inet_pton(AF_INET6, hostname, dest) != 1)
  ------------------
  |  Branch (468:8): [True: 46, False: 223]
  ------------------
  469|     46|      return CURLUE_BAD_IPV6;
  470|    223|    if(curlx_inet_ntop(AF_INET6, dest, hostname, hlen + 1)) {
  ------------------
  |  Branch (470:8): [True: 205, False: 18]
  ------------------
  471|    205|      hlen = strlen(hostname); /* might be shorter now */
  472|    205|      hostname[hlen + 1] = 0;
  473|    205|    }
  474|    223|    hostname[hlen] = ']'; /* restore ending bracket */
  475|    223|  }
  476|      0|  return CURLUE_OK;
  477|    269|}
ipv4_normalize:
  525|  10.5k|{
  526|  10.5k|  bool done = FALSE;
  ------------------
  |  | 1056|  10.5k|#define FALSE false
  ------------------
  527|  10.5k|  int n = 0;
  528|  10.5k|  const char *c = curlx_dyn_ptr(host);
  529|  10.5k|  unsigned int parts[4] = { 0, 0, 0, 0 };
  530|  10.5k|  CURLcode result = CURLE_OK;
  531|       |
  532|  10.5k|  if(*c == '[')
  ------------------
  |  Branch (532:6): [True: 323, False: 10.2k]
  ------------------
  533|    323|    return HOST_IPV6;
  ------------------
  |  |   50|    323|#define HOST_IPV6    3
  ------------------
  534|       |
  535|  17.9k|  while(!done) {
  ------------------
  |  Branch (535:9): [True: 11.3k, False: 6.60k]
  ------------------
  536|  11.3k|    int rc;
  537|  11.3k|    curl_off_t l;
  538|  11.3k|    if(*c == '0') {
  ------------------
  |  Branch (538:8): [True: 2.66k, False: 8.68k]
  ------------------
  539|  2.66k|      if(Curl_raw_tolower(c[1]) == 'x') {
  ------------------
  |  Branch (539:10): [True: 53, False: 2.60k]
  ------------------
  540|     53|        c += 2; /* skip the prefix */
  541|     53|        rc = curlx_str_hex(&c, &l, UINT_MAX);
  542|     53|        if(rc)
  ------------------
  |  Branch (542:12): [True: 15, False: 38]
  ------------------
  543|     15|          return HOST_NAME;
  ------------------
  |  |   48|     15|#define HOST_NAME    1
  ------------------
  544|     53|      }
  545|  2.60k|      else
  546|  2.60k|        rc = curlx_str_octal(&c, &l, UINT_MAX);
  547|  2.66k|    }
  548|  8.68k|    else
  549|  8.68k|      rc = curlx_str_number(&c, &l, UINT_MAX);
  550|       |
  551|  11.3k|    if(rc) {
  ------------------
  |  Branch (551:8): [True: 3.48k, False: 7.84k]
  ------------------
  552|  3.48k|      if(!n || (rc != STRE_NO_NUM) || *c)
  ------------------
  |  |   36|     75|#define STRE_NO_NUM   8
  ------------------
  |  Branch (552:10): [True: 3.40k, False: 75]
  |  Branch (552:16): [True: 5, False: 70]
  |  Branch (552:39): [True: 23, False: 47]
  ------------------
  553|  3.43k|        return HOST_NAME;
  ------------------
  |  |   48|  3.43k|#define HOST_NAME    1
  ------------------
  554|     47|      n--;
  555|     47|    }
  556|  7.84k|    else
  557|  7.84k|      parts[n] = (unsigned int)l;
  558|       |
  559|  7.89k|    switch(*c) {
  560|  1.11k|    case '.':
  ------------------
  |  Branch (560:5): [True: 1.11k, False: 6.78k]
  ------------------
  561|  1.11k|      if(n == 3) {
  ------------------
  |  Branch (561:10): [True: 20, False: 1.09k]
  ------------------
  562|     20|        if(c[1])
  ------------------
  |  Branch (562:12): [True: 9, False: 11]
  ------------------
  563|       |          /* something follows this dot */
  564|      9|          return HOST_NAME;
  ------------------
  |  |   48|      9|#define HOST_NAME    1
  ------------------
  565|     11|        done = TRUE;
  ------------------
  |  | 1053|     11|#define TRUE true
  ------------------
  566|     11|      }
  567|  1.09k|      else {
  568|  1.09k|        n++;
  569|  1.09k|        c++;
  570|  1.09k|      }
  571|  1.10k|      break;
  572|       |
  573|  6.59k|    case '\0':
  ------------------
  |  Branch (573:5): [True: 6.59k, False: 1.30k]
  ------------------
  574|  6.59k|      done = TRUE;
  ------------------
  |  | 1053|  6.59k|#define TRUE true
  ------------------
  575|  6.59k|      break;
  576|       |
  577|    189|    default:
  ------------------
  |  Branch (577:5): [True: 189, False: 7.70k]
  ------------------
  578|    189|      return HOST_NAME;
  ------------------
  |  |   48|    189|#define HOST_NAME    1
  ------------------
  579|  7.89k|    }
  580|  7.89k|  }
  581|       |
  582|  6.60k|  switch(n) {
  ------------------
  |  Branch (582:10): [True: 6.60k, False: 0]
  ------------------
  583|  6.14k|  case 0: /* a -- 32 bits */
  ------------------
  |  Branch (583:3): [True: 6.14k, False: 455]
  ------------------
  584|  6.14k|    curlx_dyn_reset(host);
  585|       |
  586|  6.14k|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  587|  6.14k|                            (parts[0] >> 24),
  588|  6.14k|                            ((parts[0] >> 16) & 0xff),
  589|  6.14k|                            ((parts[0] >> 8) & 0xff),
  590|  6.14k|                            (parts[0] & 0xff));
  591|  6.14k|    break;
  592|    125|  case 1: /* a.b -- 8.24 bits */
  ------------------
  |  Branch (592:3): [True: 125, False: 6.47k]
  ------------------
  593|    125|    if((parts[0] > 0xff) || (parts[1] > 0xffffff))
  ------------------
  |  Branch (593:8): [True: 66, False: 59]
  |  Branch (593:29): [True: 13, False: 46]
  ------------------
  594|     79|      return HOST_NAME;
  ------------------
  |  |   48|     79|#define HOST_NAME    1
  ------------------
  595|     46|    curlx_dyn_reset(host);
  596|     46|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  597|     46|                            parts[0],
  598|     46|                            ((parts[1] >> 16) & 0xff),
  599|     46|                            ((parts[1] >> 8) & 0xff),
  600|     46|                            (parts[1] & 0xff));
  601|     46|    break;
  602|    151|  case 2: /* a.b.c -- 8.8.16 bits */
  ------------------
  |  Branch (602:3): [True: 151, False: 6.45k]
  ------------------
  603|    151|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xffff))
  ------------------
  |  Branch (603:8): [True: 50, False: 101]
  |  Branch (603:29): [True: 46, False: 55]
  |  Branch (603:50): [True: 26, False: 29]
  ------------------
  604|    122|      return HOST_NAME;
  ------------------
  |  |   48|    122|#define HOST_NAME    1
  ------------------
  605|     29|    curlx_dyn_reset(host);
  606|     29|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  607|     29|                            parts[0],
  608|     29|                            parts[1],
  609|     29|                            ((parts[2] >> 8) & 0xff),
  610|     29|                            (parts[2] & 0xff));
  611|     29|    break;
  612|    179|  case 3: /* a.b.c.d -- 8.8.8.8 bits */
  ------------------
  |  Branch (612:3): [True: 179, False: 6.42k]
  ------------------
  613|    179|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff) ||
  ------------------
  |  Branch (613:8): [True: 42, False: 137]
  |  Branch (613:29): [True: 40, False: 97]
  |  Branch (613:50): [True: 36, False: 61]
  ------------------
  614|     61|       (parts[3] > 0xff))
  ------------------
  |  Branch (614:8): [True: 43, False: 18]
  ------------------
  615|    161|      return HOST_NAME;
  ------------------
  |  |   48|    161|#define HOST_NAME    1
  ------------------
  616|     18|    curlx_dyn_reset(host);
  617|     18|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  618|     18|                            parts[0],
  619|     18|                            parts[1],
  620|     18|                            parts[2],
  621|     18|                            parts[3]);
  622|     18|    break;
  623|  6.60k|  }
  624|  6.24k|  if(result)
  ------------------
  |  Branch (624:6): [True: 0, False: 6.24k]
  ------------------
  625|      0|    return HOST_ERROR;
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  626|  6.24k|  return HOST_IPV4;
  ------------------
  |  |   49|  6.24k|#define HOST_IPV4    2
  ------------------
  627|  6.24k|}
dedotdotify:
  770|  1.10k|{
  771|  1.10k|  struct dynbuf out;
  772|  1.10k|  CURLcode result = CURLE_OK;
  773|       |
  774|       |  /* variables for leading dot checks */
  775|  1.10k|  const char *dinput = input;
  776|  1.10k|  size_t dlen = clen;
  777|       |
  778|  1.10k|  *outp = NULL;
  779|       |  /* a single byte path cannot be cleaned up */
  780|  1.10k|  if(clen < 2)
  ------------------
  |  Branch (780:6): [True: 11, False: 1.09k]
  ------------------
  781|     11|    return 0;
  782|       |
  783|  1.09k|  curlx_dyn_init(&out, clen + 1);
  784|       |
  785|       |  /* if the input buffer begins with a prefix of "../" or "./", then remove
  786|       |     that prefix from the input buffer; otherwise, */
  787|  1.09k|  if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (787:6): [True: 0, False: 1.09k]
  ------------------
  788|      0|    if(ISSLASH(*dinput)) {
  ------------------
  |  |  751|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  789|       |      /* one dot followed by a slash */
  790|      0|      input = dinput + 1;
  791|      0|      clen = dlen - 1;
  792|      0|    }
  793|       |
  794|       |    /* if the input buffer consists only of "." or "..", then remove
  795|       |       that from the input buffer; otherwise, */
  796|      0|    else if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (796:13): [True: 0, False: 0]
  ------------------
  797|      0|      if(!dlen)
  ------------------
  |  Branch (797:10): [True: 0, False: 0]
  ------------------
  798|       |        /* .. [end] */
  799|      0|        goto end;
  800|      0|      else if(ISSLASH(*dinput)) {
  ------------------
  |  |  751|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  801|       |        /* ../ */
  802|      0|        input = dinput + 1;
  803|      0|        clen = dlen - 1;
  804|      0|      }
  805|      0|    }
  806|      0|  }
  807|       |
  808|  11.0M|  while(clen && !result) { /* until end of path content */
  ------------------
  |  Branch (808:9): [True: 11.0M, False: 1.02k]
  |  Branch (808:17): [True: 11.0M, False: 0]
  ------------------
  809|  11.0M|    if(ISSLASH(*input)) {
  ------------------
  |  |  751|  11.0M|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 2.81M, False: 8.27M]
  |  |  ------------------
  ------------------
  810|  2.81M|      const char *p = &input[1];
  811|  2.81M|      size_t blen = clen - 1;
  812|       |      /* if the input buffer begins with a prefix of "/./" or "/.", where "."
  813|       |         is a complete path segment, then replace that prefix with "/" in the
  814|       |         input buffer; otherwise, */
  815|  2.81M|      if(is_dot(&p, &blen)) {
  ------------------
  |  Branch (815:10): [True: 24.7k, False: 2.78M]
  ------------------
  816|  24.7k|        if(!blen) { /* /. */
  ------------------
  |  Branch (816:12): [True: 31, False: 24.7k]
  ------------------
  817|     31|          result = curlx_dyn_addn(&out, "/", 1);
  818|     31|          break;
  819|     31|        }
  820|  24.7k|        else if(ISSLASH(*p)) { /* /./ */
  ------------------
  |  |  751|  24.7k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 4.60k, False: 20.1k]
  |  |  ------------------
  ------------------
  821|  4.60k|          input = p;
  822|  4.60k|          clen = blen;
  823|  4.60k|          continue;
  824|  4.60k|        }
  825|       |
  826|       |        /* if the input buffer begins with a prefix of "/../" or "/..", where
  827|       |           ".." is a complete path segment, then replace that prefix with "/"
  828|       |           in the input buffer and remove the last segment and its preceding
  829|       |           "/" (if any) from the output buffer; otherwise, */
  830|  20.1k|        else if(is_dot(&p, &blen) && (ISSLASH(*p) || !blen)) {
  ------------------
  |  |  751|  34.4k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 13.6k, False: 3.54k]
  |  |  ------------------
  ------------------
  |  Branch (830:17): [True: 17.2k, False: 2.90k]
  |  Branch (830:54): [True: 34, False: 3.51k]
  ------------------
  831|       |          /* remove the last segment from the output buffer */
  832|  13.7k|          size_t len = curlx_dyn_len(&out);
  833|  13.7k|          if(len) {
  ------------------
  |  Branch (833:14): [True: 6.49k, False: 7.21k]
  ------------------
  834|  6.49k|            const char *ptr = curlx_dyn_ptr(&out);
  835|  6.49k|            const char *last = memrchr(ptr, '/', len);
  836|  6.49k|            if(last)
  ------------------
  |  Branch (836:16): [True: 6.49k, False: 0]
  ------------------
  837|       |              /* trim the output at the slash */
  838|  6.49k|              curlx_dyn_setlen(&out, last - ptr);
  839|  6.49k|          }
  840|       |
  841|  13.7k|          if(blen) { /* /../ */
  ------------------
  |  Branch (841:14): [True: 13.6k, False: 34]
  ------------------
  842|  13.6k|            input = p;
  843|  13.6k|            clen = blen;
  844|  13.6k|            continue;
  845|  13.6k|          }
  846|     34|          result = curlx_dyn_addn(&out, "/", 1);
  847|     34|          break;
  848|  13.7k|        }
  849|  24.7k|      }
  850|  2.81M|    }
  851|       |
  852|       |    /* move the first path segment in the input buffer to the end of the
  853|       |       output buffer, including the initial "/" character (if any) and any
  854|       |       subsequent characters up to, but not including, the next "/" character
  855|       |       or the end of the input buffer. */
  856|       |
  857|  11.0M|    result = curlx_dyn_addn(&out, input, 1);
  858|  11.0M|    input++;
  859|  11.0M|    clen--;
  860|  11.0M|  }
  861|  1.09k|end:
  862|  1.09k|  if(!result) {
  ------------------
  |  Branch (862:6): [True: 1.09k, False: 0]
  ------------------
  863|  1.09k|    if(curlx_dyn_len(&out))
  ------------------
  |  Branch (863:8): [True: 1.09k, False: 0]
  ------------------
  864|  1.09k|      *outp = curlx_dyn_ptr(&out);
  865|      0|    else {
  866|      0|      *outp = curlx_strdup("");
  ------------------
  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  867|      0|      if(!*outp)
  ------------------
  |  Branch (867:10): [True: 0, False: 0]
  ------------------
  868|      0|        return 1;
  869|      0|    }
  870|  1.09k|  }
  871|  1.09k|  return result ? 1 : 0; /* success */
  ------------------
  |  Branch (871:10): [True: 0, False: 1.09k]
  ------------------
  872|  1.09k|}
parse_file:
  881|    107|{
  882|    107|  const char *path;
  883|    107|  size_t pathlen;
  884|       |
  885|    107|  *pathp = NULL;
  886|    107|  *pathlenp = 0;
  887|    107|  if(urllen <= 6)
  ------------------
  |  Branch (887:6): [True: 3, False: 104]
  ------------------
  888|       |    /* file:/ is not enough to actually be a complete file: URL */
  889|      3|    return CURLUE_BAD_FILE_URL;
  890|       |
  891|       |  /* path has been allocated large enough to hold this */
  892|    104|  path = &url[5];
  893|    104|  pathlen = urllen - 5;
  894|       |
  895|       |  /* RFC 8089: file-hier-part = ( "//" auth-path ) / local-path, where
  896|       |     local-path also starts with a "/". So reject anything that does not
  897|       |     start with at least one "/" */
  898|    104|  if(path[0] != '/')
  ------------------
  |  Branch (898:6): [True: 0, False: 104]
  ------------------
  899|      0|    return CURLUE_BAD_FILE_URL;
  900|       |
  901|       |  /* Extra handling URLs with an authority component (i.e. that start with
  902|       |   * "file://")
  903|       |   *
  904|       |   * We allow omitted hostname (e.g. file:/<path>) -- valid according to
  905|       |   * RFC 8089, but not the (current) WHAT-WG URL spec.
  906|       |   */
  907|    104|  if(path[1] == '/') {
  ------------------
  |  Branch (907:6): [True: 41, False: 63]
  ------------------
  908|       |    /* swallow the two slashes */
  909|     41|    const char *ptr = &path[2];
  910|       |
  911|       |    /*
  912|       |     * According to RFC 8089, a file: URL can be reliably dereferenced if:
  913|       |     *
  914|       |     *  o it has no/blank hostname, or
  915|       |     *
  916|       |     *  o the hostname matches "localhost" (case-insensitively), or
  917|       |     *
  918|       |     *  o the hostname is a FQDN that resolves to this machine, or
  919|       |     *
  920|       |     * For brevity, we only consider URLs with empty, "localhost", or
  921|       |     * "127.0.0.1" hostnames as local, otherwise as an UNC String.
  922|       |     *
  923|       |     * Additionally, there is an exception for URLs with a Windows drive
  924|       |     * letter in the authority (which was accidentally omitted from RFC 8089
  925|       |     * Appendix E, but believe me, it was meant to be there. --MK)
  926|       |     */
  927|     41|    if(ptr[0] != '/' && !STARTS_WITH_URL_DRIVE_PREFIX(ptr)) {
  ------------------
  |  |   49|     38|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 13, False: 25]
  |  |  |  Branch (49:25): [True: 10, False: 3]
  |  |  ------------------
  |  |   50|     38|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 21, False: 7]
  |  |  |  Branch (50:25): [True: 18, False: 3]
  |  |  ------------------
  |  |   51|     38|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 8, False: 20]
  |  |  |  Branch (51:24): [True: 6, False: 14]
  |  |  ------------------
  |  |   52|     38|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 11]
  |  |  |  Branch (52:24): [True: 3, False: 8]
  |  |  |  Branch (52:44): [True: 5, False: 3]
  |  |  ------------------
  ------------------
  |  Branch (927:8): [True: 38, False: 3]
  ------------------
  928|       |      /* the URL includes a hostname, it must match "localhost" or
  929|       |         "127.0.0.1" to be valid */
  930|     27|      if(checkprefix("localhost/", ptr) ||
  ------------------
  |  |   33|     54|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|     27|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|     27|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 26]
  |  |  ------------------
  ------------------
  931|     26|         checkprefix("127.0.0.1/", ptr)) {
  ------------------
  |  |   33|     26|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|     26|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|     26|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 25]
  |  |  ------------------
  ------------------
  932|      2|        ptr += 9; /* now points to the slash after the host */
  933|      2|      }
  934|     25|      else
  935|       |        /* Invalid file://hostname/, expected localhost or 127.0.0.1 or
  936|       |           none */
  937|     25|        return CURLUE_BAD_FILE_URL;
  938|     27|    }
  939|       |
  940|     16|    path = ptr;
  941|     16|    pathlen = urllen - (ptr - url);
  942|     16|  }
  943|       |
  944|     79|#if !defined(_WIN32) && !defined(MSDOS) && !defined(__CYGWIN__)
  945|       |  /* Do not allow Windows drive letters when not in Windows.
  946|       |   * This catches both "file:/c:" and "file:c:" */
  947|     79|  if(('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) ||
  ------------------
  |  |   49|     68|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 22, False: 46]
  |  |  |  Branch (49:25): [True: 19, False: 3]
  |  |  ------------------
  |  |   50|     68|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 15, False: 34]
  |  |  |  Branch (50:25): [True: 12, False: 3]
  |  |  ------------------
  |  |   51|     68|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 12, False: 19]
  |  |  |  Branch (51:24): [True: 3, False: 16]
  |  |  ------------------
  |  |   52|     68|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 12]
  |  |  |  Branch (52:24): [True: 3, False: 9]
  |  |  |  Branch (52:44): [True: 4, False: 5]
  |  |  ------------------
  ------------------
  |  Branch (947:7): [True: 68, False: 11]
  ------------------
  948|     69|     STARTS_WITH_URL_DRIVE_PREFIX(path)) {
  ------------------
  |  |   49|     69|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 4, False: 65]
  |  |  |  Branch (49:25): [True: 4, False: 0]
  |  |  ------------------
  |  |   50|     69|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 7, False: 58]
  |  |  |  Branch (50:25): [True: 7, False: 0]
  |  |  ------------------
  |  |   51|     69|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 6, False: 5]
  |  |  |  Branch (51:24): [True: 5, False: 0]
  |  |  ------------------
  |  |   52|     69|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 8]
  |  |  |  Branch (52:24): [True: 3, False: 5]
  |  |  |  Branch (52:44): [True: 5, False: 0]
  |  |  ------------------
  ------------------
  949|       |    /* File drive letters are only accepted in MS-DOS/Windows */
  950|     21|    return CURLUE_BAD_FILE_URL;
  951|     21|  }
  952|       |#else
  953|       |  /* If the path starts with a slash and a drive letter, ditch the slash */
  954|       |  if('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) {
  955|       |    /* This cannot be done with strcpy, as the memory chunks overlap! */
  956|       |    path++;
  957|       |    pathlen--;
  958|       |  }
  959|       |#endif
  960|     58|  u->scheme = curlx_strdup("file");
  ------------------
  |  | 1472|     58|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  961|     58|  if(!u->scheme)
  ------------------
  |  Branch (961:6): [True: 0, False: 58]
  ------------------
  962|      0|    return CURLUE_OUT_OF_MEMORY;
  963|       |
  964|     58|  *pathp = path;
  965|     58|  *pathlenp = pathlen;
  966|     58|  return CURLUE_OK;
  967|     58|}
curl_url:
 1335|  11.2k|{
 1336|  11.2k|  return curlx_calloc(1, sizeof(struct Curl_URL));
  ------------------
  |  | 1475|  11.2k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1337|  11.2k|}
curl_url_cleanup:
 1340|  37.4k|{
 1341|  37.4k|  if(u) {
  ------------------
  |  Branch (1341:6): [True: 11.2k, False: 26.2k]
  ------------------
 1342|  11.2k|    free_urlhandle(u);
 1343|  11.2k|    curlx_free(u);
  ------------------
  |  | 1478|  11.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1344|  11.2k|  }
 1345|  37.4k|}
curl_url_get:
 1602|  90.4k|{
 1603|  90.4k|  const char *ptr;
 1604|  90.4k|  CURLUcode ifmissing = CURLUE_UNKNOWN_PART;
 1605|  90.4k|  char portbuf[7];
 1606|  90.4k|  bool plusdecode = FALSE;
  ------------------
  |  | 1056|  90.4k|#define FALSE false
  ------------------
 1607|  90.4k|  if(!u)
  ------------------
  |  Branch (1607:6): [True: 0, False: 90.4k]
  ------------------
 1608|      0|    return CURLUE_BAD_HANDLE;
 1609|  90.4k|  if(!part)
  ------------------
  |  Branch (1609:6): [True: 0, False: 90.4k]
  ------------------
 1610|      0|    return CURLUE_BAD_PARTPOINTER;
 1611|  90.4k|  *part = NULL;
 1612|       |
 1613|  90.4k|  switch(what) {
 1614|  13.2k|  case CURLUPART_SCHEME:
  ------------------
  |  Branch (1614:3): [True: 13.2k, False: 77.2k]
  ------------------
 1615|  13.2k|    ptr = u->scheme;
 1616|  13.2k|    ifmissing = CURLUE_NO_SCHEME;
 1617|  13.2k|    flags &= ~U_CURLU_URLDECODE; /* never for schemes */
  ------------------
  |  |   63|  13.2k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   94|  13.2k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1618|  13.2k|    if((flags & CURLU_NO_GUESS_SCHEME) && u->guessed_scheme)
  ------------------
  |  |  106|  13.2k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1618:8): [True: 5.68k, False: 7.55k]
  |  Branch (1618:43): [True: 4.80k, False: 873]
  ------------------
 1619|  4.80k|      return CURLUE_NO_SCHEME;
 1620|  8.42k|    break;
 1621|  10.1k|  case CURLUPART_USER:
  ------------------
  |  Branch (1621:3): [True: 10.1k, False: 80.3k]
  ------------------
 1622|  10.1k|    ptr = u->user;
 1623|  10.1k|    ifmissing = CURLUE_NO_USER;
 1624|  10.1k|    break;
 1625|  10.1k|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (1625:3): [True: 10.1k, False: 80.3k]
  ------------------
 1626|  10.1k|    ptr = u->password;
 1627|  10.1k|    ifmissing = CURLUE_NO_PASSWORD;
 1628|  10.1k|    break;
 1629|  7.38k|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (1629:3): [True: 7.38k, False: 83.0k]
  ------------------
 1630|  7.38k|    ptr = u->options;
 1631|  7.38k|    ifmissing = CURLUE_NO_OPTIONS;
 1632|  7.38k|    break;
 1633|  10.3k|  case CURLUPART_HOST:
  ------------------
  |  Branch (1633:3): [True: 10.3k, False: 80.1k]
  ------------------
 1634|  10.3k|    ptr = u->host;
 1635|  10.3k|    ifmissing = CURLUE_NO_HOST;
 1636|  10.3k|    break;
 1637|  10.0k|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (1637:3): [True: 10.0k, False: 80.3k]
  ------------------
 1638|  10.0k|    ptr = u->zoneid;
 1639|  10.0k|    ifmissing = CURLUE_NO_ZONEID;
 1640|  10.0k|    break;
 1641|  2.84k|  case CURLUPART_PORT:
  ------------------
  |  Branch (1641:3): [True: 2.84k, False: 87.6k]
  ------------------
 1642|  2.84k|    ptr = NULL;
 1643|  2.84k|    ifmissing = CURLUE_NO_PORT;
 1644|  2.84k|    flags &= ~U_CURLU_URLDECODE; /* never for port */
  ------------------
  |  |   63|  2.84k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   94|  2.84k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1645|  2.84k|    if(u->port_present) {
  ------------------
  |  Branch (1645:8): [True: 25, False: 2.81k]
  ------------------
 1646|     25|      const struct Curl_scheme *h = u->scheme ?
  ------------------
  |  Branch (1646:37): [True: 25, False: 0]
  ------------------
 1647|     25|                                    Curl_get_scheme(u->scheme) : NULL;
 1648|       |      /* there is a stored port number, but ask to inhibit if
 1649|       |         it matches the default one for the scheme */
 1650|     25|      if(h && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1650:10): [True: 25, False: 0]
  |  Branch (1650:15): [True: 1, False: 24]
  ------------------
 1651|      1|         (flags & CURLU_NO_DEFAULT_PORT)) {
  ------------------
  |  |   86|      1|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1651:10): [True: 1, False: 0]
  ------------------
 1652|      1|        ptr = NULL;
 1653|      1|      }
 1654|     24|      else {
 1655|     24|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", u->portnum);
 1656|     24|        ptr = portbuf;
 1657|     24|      }
 1658|     25|    }
 1659|  2.81k|    else if((flags & CURLU_DEFAULT_PORT) && u->scheme) {
  ------------------
  |  |   85|  2.81k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1659:13): [True: 0, False: 2.81k]
  |  Branch (1659:45): [True: 0, False: 0]
  ------------------
 1660|       |      /* there is no stored port number, but asked to deliver
 1661|       |         a default one for the scheme */
 1662|      0|      const struct Curl_scheme *h = Curl_get_scheme(u->scheme);
 1663|      0|      if(h) {
  ------------------
  |  Branch (1663:10): [True: 0, False: 0]
  ------------------
 1664|      0|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1665|      0|        ptr = portbuf;
 1666|      0|      }
 1667|      0|    }
 1668|  2.84k|    break;
 1669|  7.46k|  case CURLUPART_PATH:
  ------------------
  |  Branch (1669:3): [True: 7.46k, False: 82.9k]
  ------------------
 1670|  7.46k|    ptr = u->path;
 1671|  7.46k|    if(!ptr)
  ------------------
  |  Branch (1671:8): [True: 6.67k, False: 789]
  ------------------
 1672|  6.67k|      ptr = "/";
 1673|  7.46k|    break;
 1674|  7.38k|  case CURLUPART_QUERY:
  ------------------
  |  Branch (1674:3): [True: 7.38k, False: 83.0k]
  ------------------
 1675|  7.38k|    ptr = u->query;
 1676|  7.38k|    ifmissing = CURLUE_NO_QUERY;
 1677|  7.38k|    plusdecode = flags & CURLU_URLDECODE;
  ------------------
  |  |   94|  7.38k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1678|  7.38k|    if(ptr && !ptr[0] && !(flags & CURLU_GET_EMPTY))
  ------------------
  |  |  103|     32|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1678:8): [True: 511, False: 6.87k]
  |  Branch (1678:15): [True: 32, False: 479]
  |  Branch (1678:26): [True: 0, False: 32]
  ------------------
 1679|       |      /* there was a blank query and the user do not ask for it */
 1680|      0|      ptr = NULL;
 1681|  7.38k|    break;
 1682|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (1682:3): [True: 0, False: 90.4k]
  ------------------
 1683|      0|    ptr = u->fragment;
 1684|      0|    ifmissing = CURLUE_NO_FRAGMENT;
 1685|      0|    if(!ptr && u->fragment_present && flags & CURLU_GET_EMPTY)
  ------------------
  |  |  103|      0|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1685:8): [True: 0, False: 0]
  |  Branch (1685:16): [True: 0, False: 0]
  |  Branch (1685:39): [True: 0, False: 0]
  ------------------
 1686|       |      /* there was a blank fragment and the user asks for it */
 1687|      0|      ptr = "";
 1688|      0|    break;
 1689|  11.4k|  case CURLUPART_URL:
  ------------------
  |  Branch (1689:3): [True: 11.4k, False: 79.0k]
  ------------------
 1690|  11.4k|    return urlget_url(u, part, flags);
 1691|      0|  default:
  ------------------
  |  Branch (1691:3): [True: 0, False: 90.4k]
  ------------------
 1692|      0|    ptr = NULL;
 1693|      0|    break;
 1694|  90.4k|  }
 1695|  74.2k|  if(ptr)
  ------------------
  |  Branch (1695:6): [True: 28.9k, False: 45.2k]
  ------------------
 1696|  28.9k|    return urlget_format(u, what, ptr, part, plusdecode, flags);
 1697|       |
 1698|  45.2k|  return ifmissing;
 1699|  74.2k|}
curl_url_set:
 1996|  11.2k|{
 1997|  11.2k|  char **storep = NULL;
 1998|  11.2k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   95|  11.2k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1998:20): [True: 0, False: 11.2k]
  ------------------
 1999|  11.2k|  bool plusencode = FALSE;
  ------------------
  |  | 1056|  11.2k|#define FALSE false
  ------------------
 2000|  11.2k|  bool pathmode = FALSE;
  ------------------
  |  | 1056|  11.2k|#define FALSE false
  ------------------
 2001|  11.2k|  bool leadingslash = FALSE;
  ------------------
  |  | 1056|  11.2k|#define FALSE false
  ------------------
 2002|  11.2k|  bool appendquery = FALSE;
  ------------------
  |  | 1056|  11.2k|#define FALSE false
  ------------------
 2003|  11.2k|  bool equalsencode = FALSE;
  ------------------
  |  | 1056|  11.2k|#define FALSE false
  ------------------
 2004|  11.2k|  size_t nalloc;
 2005|       |
 2006|  11.2k|  if(!u)
  ------------------
  |  Branch (2006:6): [True: 0, False: 11.2k]
  ------------------
 2007|      0|    return CURLUE_BAD_HANDLE;
 2008|  11.2k|  if(!part)
  ------------------
  |  Branch (2008:6): [True: 0, False: 11.2k]
  ------------------
 2009|       |    /* setting a part to NULL clears it */
 2010|      0|    return urlset_clear(u, what);
 2011|       |
 2012|  11.2k|  nalloc = strlen(part);
 2013|  11.2k|  if(nalloc > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  11.2k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (2013:6): [True: 0, False: 11.2k]
  ------------------
 2014|       |    /* excessive input length */
 2015|      0|    return CURLUE_MALFORMED_INPUT;
 2016|       |
 2017|  11.2k|  switch(what) {
 2018|      0|  case CURLUPART_SCHEME: {
  ------------------
  |  Branch (2018:3): [True: 0, False: 11.2k]
  ------------------
 2019|      0|    CURLUcode status = set_url_scheme(u, part, flags);
 2020|      0|    if(status)
  ------------------
  |  Branch (2020:8): [True: 0, False: 0]
  ------------------
 2021|      0|      return status;
 2022|      0|    storep = &u->scheme;
 2023|      0|    urlencode = FALSE; /* never */
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 2024|      0|    break;
 2025|      0|  }
 2026|      0|  case CURLUPART_USER:
  ------------------
  |  Branch (2026:3): [True: 0, False: 11.2k]
  ------------------
 2027|      0|    storep = &u->user;
 2028|      0|    break;
 2029|      0|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (2029:3): [True: 0, False: 11.2k]
  ------------------
 2030|      0|    storep = &u->password;
 2031|      0|    break;
 2032|      0|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (2032:3): [True: 0, False: 11.2k]
  ------------------
 2033|      0|    storep = &u->options;
 2034|      0|    break;
 2035|      0|  case CURLUPART_HOST:
  ------------------
  |  Branch (2035:3): [True: 0, False: 11.2k]
  ------------------
 2036|      0|    storep = &u->host;
 2037|      0|    curlx_safefree(u->zoneid);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2038|      0|    break;
 2039|      0|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (2039:3): [True: 0, False: 11.2k]
  ------------------
 2040|      0|    storep = &u->zoneid;
 2041|      0|    break;
 2042|     16|  case CURLUPART_PORT:
  ------------------
  |  Branch (2042:3): [True: 16, False: 11.2k]
  ------------------
 2043|     16|    return set_url_port(u, part);
 2044|      0|  case CURLUPART_PATH:
  ------------------
  |  Branch (2044:3): [True: 0, False: 11.2k]
  ------------------
 2045|      0|    pathmode = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2046|      0|    leadingslash = TRUE; /* enforce */
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2047|      0|    storep = &u->path;
 2048|      0|    break;
 2049|      0|  case CURLUPART_QUERY:
  ------------------
  |  Branch (2049:3): [True: 0, False: 11.2k]
  ------------------
 2050|      0|    plusencode = urlencode;
 2051|      0|    appendquery = (flags & CURLU_APPENDQUERY) ? 1 : 0;
  ------------------
  |  |   96|      0|#define CURLU_APPENDQUERY (1 << 8)        /* append a form style part */
  ------------------
  |  Branch (2051:19): [True: 0, False: 0]
  ------------------
 2052|      0|    equalsencode = appendquery;
 2053|      0|    storep = &u->query;
 2054|      0|    u->query_present = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2055|      0|    break;
 2056|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (2056:3): [True: 0, False: 11.2k]
  ------------------
 2057|      0|    storep = &u->fragment;
 2058|      0|    u->fragment_present = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 2059|      0|    break;
 2060|  11.2k|  case CURLUPART_URL:
  ------------------
  |  Branch (2060:3): [True: 11.2k, False: 16]
  ------------------
 2061|  11.2k|    return set_url(u, part, nalloc, flags);
 2062|      0|  default:
  ------------------
  |  Branch (2062:3): [True: 0, False: 11.2k]
  ------------------
 2063|      0|    return CURLUE_UNKNOWN_PART;
 2064|  11.2k|  }
 2065|      0|  DEBUGASSERT(storep);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2065:3): [True: 0, False: 0]
  |  Branch (2065:3): [True: 0, False: 0]
  ------------------
 2066|      0|  {
 2067|      0|    const char *newp = NULL;
 2068|      0|    struct dynbuf enc;
 2069|      0|    CURLUcode status;
 2070|      0|    curlx_dyn_init(&enc, (nalloc * 3) + 1 + leadingslash);
 2071|       |
 2072|      0|    if(leadingslash && (part[0] != '/')) {
  ------------------
  |  Branch (2072:8): [True: 0, False: 0]
  |  Branch (2072:24): [True: 0, False: 0]
  ------------------
 2073|      0|      CURLcode result = curlx_dyn_addn(&enc, "/", 1);
 2074|      0|      if(result)
  ------------------
  |  Branch (2074:10): [True: 0, False: 0]
  ------------------
 2075|      0|        return cc2cu(result);
  ------------------
  |  |  108|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (108:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2076|      0|    }
 2077|      0|    if(urlencode)
  ------------------
  |  Branch (2077:8): [True: 0, False: 0]
  ------------------
 2078|      0|      status = url_encode_part(&enc, part, plusencode, pathmode, equalsencode);
 2079|      0|    else
 2080|      0|      status = url_uppercasehex_part(&enc, part);
 2081|      0|    if(!status) {
  ------------------
  |  Branch (2081:8): [True: 0, False: 0]
  ------------------
 2082|      0|      newp = curlx_dyn_ptr(&enc);
 2083|       |
 2084|      0|      if(appendquery && newp)
  ------------------
  |  Branch (2084:10): [True: 0, False: 0]
  |  Branch (2084:25): [True: 0, False: 0]
  ------------------
 2085|      0|        return url_append_query(u, &enc);
 2086|      0|      else if(what == CURLUPART_HOST)
  ------------------
  |  Branch (2086:15): [True: 0, False: 0]
  ------------------
 2087|      0|        status = url_sethost(u, &enc, urlencode, flags);
 2088|      0|    }
 2089|      0|    if(status)
  ------------------
  |  Branch (2089:8): [True: 0, False: 0]
  ------------------
 2090|      0|      return status;
 2091|       |
 2092|      0|    if(what == CURLUPART_PASSWORD)
  ------------------
  |  Branch (2092:8): [True: 0, False: 0]
  ------------------
 2093|      0|      curlx_strzero(*storep);
 2094|      0|    curlx_free(*storep);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2095|      0|    *storep = (char *)CURL_UNCONST(newp);
  ------------------
  |  |  864|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2096|      0|  }
 2097|      0|  return CURLUE_OK;
 2098|      0|}
Curl_url_get_port:
 2136|  7.37k|{
 2137|  7.37k|  if(u->port_present) {
  ------------------
  |  Branch (2137:6): [True: 37, False: 7.33k]
  ------------------
 2138|     37|    *pport = u->portnum;
 2139|     37|    return CURLUE_OK;
 2140|     37|  }
 2141|  7.33k|  else if(u->scheme) {
  ------------------
  |  Branch (2141:11): [True: 7.33k, False: 0]
  ------------------
 2142|  7.33k|    const struct Curl_scheme *s = Curl_get_scheme(u->scheme);
 2143|  7.33k|    if(s && s->defport) {
  ------------------
  |  Branch (2143:8): [True: 7.33k, False: 0]
  |  Branch (2143:13): [True: 7.27k, False: 58]
  ------------------
 2144|  7.27k|      *pport = s->defport;
 2145|  7.27k|      return CURLUE_OK;
 2146|  7.27k|    }
 2147|  7.33k|  }
 2148|     58|  *pport = 0;
 2149|     58|  return CURLUE_NO_PORT;
 2150|  7.37k|}
urlapi.c:parse_authority:
  661|  10.7k|{
  662|  10.7k|  size_t offset;
  663|  10.7k|  CURLUcode uc;
  664|  10.7k|  CURLcode result;
  665|       |
  666|       |  /*
  667|       |   * Parse the login details and strip them out of the hostname.
  668|       |   */
  669|  10.7k|  uc = parse_hostname_login(u, auth, authlen, flags, &offset);
  670|  10.7k|  if(uc)
  ------------------
  |  Branch (670:6): [True: 1, False: 10.7k]
  ------------------
  671|      1|    return uc;
  672|       |
  673|  10.7k|  result = curlx_dyn_addn(host, auth + offset, authlen - offset);
  674|  10.7k|  if(result) {
  ------------------
  |  Branch (674:6): [True: 0, False: 10.7k]
  ------------------
  675|      0|    uc = cc2cu(result);
  ------------------
  |  |  108|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (108:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  676|      0|    return uc;
  677|      0|  }
  678|       |
  679|  10.7k|  uc = parse_port(u, host, has_scheme);
  680|       |
  681|  10.7k|  if(!curlx_dyn_len(host))
  ------------------
  |  Branch (681:6): [True: 98, False: 10.6k]
  ------------------
  682|       |    /* this makes no-host errors override port number problems */
  683|     98|    uc = CURLUE_NO_HOST;
  684|  10.7k|  if(!uc)
  ------------------
  |  Branch (684:6): [True: 10.5k, False: 140]
  ------------------
  685|  10.5k|    uc = urldecode_host(host);
  686|  10.7k|  if(uc)
  ------------------
  |  Branch (686:6): [True: 144, False: 10.5k]
  ------------------
  687|    144|    return uc;
  688|       |
  689|  10.5k|  switch(ipv4_normalize(host)) {
  690|  6.24k|  case HOST_IPV4:
  ------------------
  |  |   49|  6.24k|#define HOST_IPV4    2
  ------------------
  |  Branch (690:3): [True: 6.24k, False: 4.33k]
  ------------------
  691|  6.24k|    break;
  692|    323|  case HOST_IPV6:
  ------------------
  |  |   50|    323|#define HOST_IPV6    3
  ------------------
  |  Branch (692:3): [True: 323, False: 10.2k]
  ------------------
  693|    323|    uc = ipv6_parse(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  694|    323|    break;
  695|  4.01k|  case HOST_NAME:
  ------------------
  |  |   48|  4.01k|#define HOST_NAME    1
  ------------------
  |  Branch (695:3): [True: 4.01k, False: 6.56k]
  ------------------
  696|  4.01k|    uc = hostname_check(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  697|  4.01k|    break;
  698|      0|  case HOST_ERROR:
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  |  Branch (698:3): [True: 0, False: 10.5k]
  ------------------
  699|      0|    uc = CURLUE_OUT_OF_MEMORY;
  700|      0|    break;
  701|      0|  default:
  ------------------
  |  Branch (701:3): [True: 0, False: 10.5k]
  ------------------
  702|      0|    uc = CURLUE_BAD_HOSTNAME; /* Bad IPv4 address even */
  703|      0|    break;
  704|  10.5k|  }
  705|       |
  706|  10.5k|  return uc;
  707|  10.5k|}
urlapi.c:urldecode_host:
  631|  10.5k|{
  632|  10.5k|  const char *per;
  633|  10.5k|  const char *hostname = curlx_dyn_ptr(host);
  634|  10.5k|  per = strchr(hostname, '%');
  635|  10.5k|  if(!per)
  ------------------
  |  Branch (635:6): [True: 10.3k, False: 200]
  ------------------
  636|       |    /* nothing to decode */
  637|  10.3k|    return CURLUE_OK;
  638|    200|  else {
  639|       |    /* encoded */
  640|    200|    size_t dlen;
  641|    200|    char *decoded;
  642|    200|    CURLcode result = Curl_urldecode(hostname, 0, &decoded, &dlen,
  643|    200|                                     REJECT_CTRL);
  644|    200|    if(result)
  ------------------
  |  Branch (644:8): [True: 4, False: 196]
  ------------------
  645|      4|      return CURLUE_BAD_HOSTNAME;
  646|    196|    curlx_dyn_reset(host);
  647|    196|    result = curlx_dyn_addn(host, decoded, dlen);
  648|    196|    curlx_free(decoded);
  ------------------
  |  | 1478|    196|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  649|    196|    if(result)
  ------------------
  |  Branch (649:8): [True: 0, False: 196]
  ------------------
  650|      0|      return cc2cu(result);
  ------------------
  |  |  108|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (108:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  651|    196|  }
  652|       |
  653|    196|  return CURLUE_OK;
  654|  10.5k|}
urlapi.c:hostname_check:
  481|  4.01k|{
  482|  4.01k|  size_t len;
  483|  4.01k|  DEBUGASSERT(hostname);
  ------------------
  |  | 1079|  4.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (483:3): [True: 0, False: 4.01k]
  |  Branch (483:3): [True: 4.01k, False: 0]
  ------------------
  484|       |
  485|  4.01k|  if(!hlen)
  ------------------
  |  Branch (485:6): [True: 0, False: 4.01k]
  ------------------
  486|      0|    return CURLUE_NO_HOST;
  487|  4.01k|  else if(hostname[0] == '[')
  ------------------
  |  Branch (487:11): [True: 0, False: 4.01k]
  ------------------
  488|      0|    return ipv6_parse(u, hostname, hlen);
  489|  4.01k|  else {
  490|       |    /* letters from the second string are not ok */
  491|  4.01k|    len = strcspn(hostname, HOSTNAME_INVALID_CHARS);
  ------------------
  |  |   59|  4.01k|#define HOSTNAME_INVALID_CHARS " \r\n\t/:#?!@{}[]\\$\'\"^`*<>=;,+&()%|"
  ------------------
  492|  4.01k|    if(hlen != len)
  ------------------
  |  Branch (492:8): [True: 126, False: 3.88k]
  ------------------
  493|       |      /* hostname with bad content */
  494|    126|      return CURLUE_BAD_HOSTNAME;
  495|  3.88k|    else if((hlen >= 2) &&
  ------------------
  |  Branch (495:13): [True: 1.68k, False: 2.20k]
  ------------------
  496|  1.68k|            (hostname[hlen - 1] == '.') && (hostname[hlen - 2] == '.'))
  ------------------
  |  Branch (496:13): [True: 194, False: 1.48k]
  |  Branch (496:44): [True: 8, False: 186]
  ------------------
  497|       |      /* more than one trailing dot is not allowed */
  498|      8|      return CURLUE_BAD_HOSTNAME;
  499|  3.87k|    else if((hlen == 1) && (hostname[0] == '.'))
  ------------------
  |  Branch (499:13): [True: 2.20k, False: 1.67k]
  |  Branch (499:28): [True: 6, False: 2.19k]
  ------------------
  500|       |      /* a single dot alone is not allowed */
  501|      6|      return CURLUE_BAD_HOSTNAME;
  502|  4.01k|  }
  503|  3.87k|  return CURLUE_OK;
  504|  4.01k|}
urlapi.c:is_dot:
  735|  2.83M|{
  736|  2.83M|  const char *p = *str;
  737|  2.83M|  if(*p == '.') {
  ------------------
  |  Branch (737:6): [True: 41.9k, False: 2.78M]
  ------------------
  738|  41.9k|    (*str)++;
  739|  41.9k|    (*clen)--;
  740|  41.9k|    return TRUE;
  ------------------
  |  | 1053|  41.9k|#define TRUE true
  ------------------
  741|  41.9k|  }
  742|  2.78M|  else if((*clen >= 3) &&
  ------------------
  |  Branch (742:11): [True: 2.78M, False: 811]
  ------------------
  743|  2.78M|          (p[0] == '%') && (p[1] == '2') && ((p[2] | 0x20) == 'e')) {
  ------------------
  |  Branch (743:11): [True: 2.36k, False: 2.78M]
  |  Branch (743:28): [True: 205, False: 2.16k]
  |  Branch (743:45): [True: 70, False: 135]
  ------------------
  744|     70|    *str += 3;
  745|     70|    *clen -= 3;
  746|     70|    return TRUE;
  ------------------
  |  | 1053|     70|#define TRUE true
  ------------------
  747|     70|  }
  748|  2.78M|  return FALSE;
  ------------------
  |  | 1056|  2.78M|#define FALSE false
  ------------------
  749|  2.83M|}
urlapi.c:free_urlhandle:
   73|  22.1k|{
   74|  22.1k|  curlx_free(u->scheme);
  ------------------
  |  | 1478|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|  22.1k|  curlx_free(u->user);
  ------------------
  |  | 1478|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   76|  22.1k|  curlx_strzero(u->password);
   77|  22.1k|  curlx_free(u->password);
  ------------------
  |  | 1478|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   78|  22.1k|  curlx_free(u->options);
  ------------------
  |  | 1478|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  22.1k|  curlx_free(u->host);
  ------------------
  |  | 1478|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   80|  22.1k|  curlx_free(u->zoneid);
  ------------------
  |  | 1478|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   81|  22.1k|  curlx_free(u->path);
  ------------------
  |  | 1478|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   82|  22.1k|  curlx_free(u->query);
  ------------------
  |  | 1478|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   83|  22.1k|  curlx_free(u->fragment);
  ------------------
  |  | 1478|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   84|  22.1k|}
urlapi.c:urlget_url:
 1488|  11.4k|{
 1489|  11.4k|  char *url;
 1490|  11.4k|  char *allochost = NULL;
 1491|  11.4k|  const char *fragmentsep =
 1492|  11.4k|    (u->fragment || (u->fragment_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  103|     36|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1492:6): [True: 100, False: 11.3k]
  |  Branch (1492:22): [True: 36, False: 11.2k]
  |  Branch (1492:45): [True: 36, False: 0]
  ------------------
 1493|  11.2k|    "#" : "";
 1494|  11.4k|  const char *querysep = ((u->query && u->query[0]) ||
  ------------------
  |  Branch (1494:28): [True: 517, False: 10.9k]
  |  Branch (1494:40): [True: 485, False: 32]
  ------------------
 1495|  10.9k|                          (u->query_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  103|     32|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1495:28): [True: 32, False: 10.9k]
  |  Branch (1495:48): [True: 32, False: 0]
  ------------------
 1496|  10.9k|    "?" : "";
 1497|  11.4k|  char portbuf[7];
 1498|  11.4k|  if(curl_strequal("file", u->scheme))
  ------------------
  |  Branch (1498:6): [True: 58, False: 11.3k]
  ------------------
 1499|     58|    return file_url(u, part, fragmentsep, querysep);
 1500|  11.3k|  else if(!u->host)
  ------------------
  |  Branch (1500:11): [True: 3.88k, False: 7.49k]
  ------------------
 1501|  3.88k|    return CURLUE_NO_HOST;
 1502|  7.49k|  else {
 1503|  7.49k|    const char *scheme;
 1504|  7.49k|    char *options = u->options;
 1505|  7.49k|    char *port = NULL;
 1506|  7.49k|    const struct Curl_scheme *h = NULL;
 1507|  7.49k|    char schemebuf[MAX_SCHEME_LEN + 5];
 1508|  7.49k|    if(u->scheme)
  ------------------
  |  Branch (1508:8): [True: 7.49k, False: 0]
  ------------------
 1509|  7.49k|      scheme = u->scheme;
 1510|      0|    else if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   89|      0|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (1510:13): [True: 0, False: 0]
  ------------------
 1511|      0|      scheme = DEFAULT_SCHEME;
  ------------------
  |  |   70|      0|#define DEFAULT_SCHEME "https"
  ------------------
 1512|      0|    else
 1513|      0|      return CURLUE_NO_SCHEME;
 1514|       |
 1515|  7.49k|    if(u->port_present) {
  ------------------
  |  Branch (1515:8): [True: 40, False: 7.45k]
  ------------------
 1516|     40|      curl_msnprintf(portbuf, sizeof(portbuf), "%u", u->portnum);
 1517|     40|      port = portbuf;
 1518|     40|    }
 1519|       |
 1520|  7.49k|    h = Curl_get_scheme(scheme);
 1521|  7.49k|    if(h) {
  ------------------
  |  Branch (1521:8): [True: 7.44k, False: 46]
  ------------------
 1522|  7.44k|      if(!u->port_present && (flags & CURLU_DEFAULT_PORT)) {
  ------------------
  |  |   85|  7.40k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1522:10): [True: 7.40k, False: 40]
  |  Branch (1522:30): [True: 0, False: 7.40k]
  ------------------
 1523|       |        /* there is no stored port number, but asked to deliver a default one
 1524|       |           for the scheme */
 1525|      0|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1526|      0|        port = portbuf;
 1527|      0|      }
 1528|  7.44k|      else if(u->port_present && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1528:15): [True: 40, False: 7.40k]
  |  Branch (1528:34): [True: 5, False: 35]
  ------------------
 1529|      5|              (flags & CURLU_NO_DEFAULT_PORT)) {
  ------------------
  |  |   86|      5|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1529:15): [True: 0, False: 5]
  ------------------
 1530|       |        /* there is a stored port number, but asked to inhibit if it matches
 1531|       |           the default port for the scheme */
 1532|      0|        port = NULL;
 1533|      0|      }
 1534|       |
 1535|  7.44k|      if(!(h->flags & PROTOPT_URLOPTIONS))
  ------------------
  |  |  224|  7.44k|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (1535:10): [True: 7.44k, False: 7]
  ------------------
 1536|  7.44k|        options = NULL;
 1537|  7.44k|    }
 1538|       |
 1539|  7.49k|    if(u->host[0] == '[') {
  ------------------
  |  Branch (1539:8): [True: 196, False: 7.29k]
  ------------------
 1540|    196|      if(u->zoneid) {
  ------------------
  |  Branch (1540:10): [True: 14, False: 182]
  ------------------
 1541|       |        /* make it '[ host %25 zoneid ]' */
 1542|     14|        struct dynbuf enc;
 1543|     14|        size_t hostlen = strlen(u->host);
 1544|     14|        curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|     14|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1545|     14|        if(curlx_dyn_addf(&enc, "%.*s%%25%s]", (int)hostlen - 1, u->host,
  ------------------
  |  Branch (1545:12): [True: 0, False: 14]
  ------------------
 1546|     14|                          u->zoneid))
 1547|      0|          return CURLUE_OUT_OF_MEMORY;
 1548|     14|        allochost = curlx_dyn_ptr(&enc);
 1549|     14|      }
 1550|    196|    }
 1551|  7.29k|    else if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   95|  7.29k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1551:13): [True: 0, False: 7.29k]
  ------------------
 1552|      0|      allochost = curl_easy_escape(NULL, u->host, 0);
 1553|      0|      if(!allochost)
  ------------------
  |  Branch (1553:10): [True: 0, False: 0]
  ------------------
 1554|      0|        return CURLUE_OUT_OF_MEMORY;
 1555|      0|    }
 1556|  7.29k|    else if(flags & CURLU_PUNYCODE) {
  ------------------
  |  |  101|  7.29k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1556:13): [True: 0, False: 7.29k]
  ------------------
 1557|      0|      if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1557:10): [True: 0, False: 0]
  ------------------
 1558|      0|        CURLUcode ret = host_decode(u->host, &allochost);
 1559|      0|        if(ret)
  ------------------
  |  Branch (1559:12): [True: 0, False: 0]
  ------------------
 1560|      0|          return ret;
 1561|      0|      }
 1562|      0|    }
 1563|  7.29k|    else if(flags & CURLU_PUNY2IDN) {
  ------------------
  |  |  102|  7.29k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1563:13): [True: 0, False: 7.29k]
  ------------------
 1564|      0|      if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1564:10): [True: 0, False: 0]
  ------------------
 1565|      0|        CURLUcode ret = host_encode(u->host, &allochost);
 1566|      0|        if(ret)
  ------------------
  |  Branch (1566:12): [True: 0, False: 0]
  ------------------
 1567|      0|          return ret;
 1568|      0|      }
 1569|      0|    }
 1570|       |
 1571|  7.49k|    if(!(flags & CURLU_NO_GUESS_SCHEME) || !u->guessed_scheme)
  ------------------
  |  |  106|  7.49k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1571:8): [True: 7.49k, False: 0]
  |  Branch (1571:44): [True: 0, False: 0]
  ------------------
 1572|  7.49k|      curl_msnprintf(schemebuf, sizeof(schemebuf), "%s://", scheme);
 1573|      0|    else
 1574|      0|      schemebuf[0] = 0;
 1575|       |
 1576|  7.49k|    url = curl_maprintf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 1577|  7.49k|                        schemebuf,
 1578|  7.49k|                        u->user ? u->user : "",
  ------------------
  |  Branch (1578:25): [True: 298, False: 7.19k]
  ------------------
 1579|  7.49k|                        u->password ? ":" : "",
  ------------------
  |  Branch (1579:25): [True: 64, False: 7.42k]
  ------------------
 1580|  7.49k|                        u->password ? u->password : "",
  ------------------
  |  Branch (1580:25): [True: 64, False: 7.42k]
  ------------------
 1581|  7.49k|                        options ? ";" : "",
  ------------------
  |  Branch (1581:25): [True: 2, False: 7.49k]
  ------------------
 1582|  7.49k|                        options ? options : "",
  ------------------
  |  Branch (1582:25): [True: 2, False: 7.49k]
  ------------------
 1583|  7.49k|                        (u->user || u->password || options) ? "@" : "",
  ------------------
  |  Branch (1583:26): [True: 298, False: 7.19k]
  |  Branch (1583:37): [True: 0, False: 7.19k]
  |  Branch (1583:52): [True: 0, False: 7.19k]
  ------------------
 1584|  7.49k|                        allochost ? allochost : u->host,
  ------------------
  |  Branch (1584:25): [True: 14, False: 7.47k]
  ------------------
 1585|  7.49k|                        port ? ":" : "",
  ------------------
  |  Branch (1585:25): [True: 40, False: 7.45k]
  ------------------
 1586|  7.49k|                        port ? port : "",
  ------------------
  |  Branch (1586:25): [True: 40, False: 7.45k]
  ------------------
 1587|  7.49k|                        u->path ? u->path : "/",
  ------------------
  |  Branch (1587:25): [True: 774, False: 6.71k]
  ------------------
 1588|  7.49k|                        querysep,
 1589|  7.49k|                        u->query ? u->query : "",
  ------------------
  |  Branch (1589:25): [True: 512, False: 6.98k]
  ------------------
 1590|  7.49k|                        fragmentsep,
 1591|  7.49k|                        u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1591:25): [True: 97, False: 7.39k]
  ------------------
 1592|  7.49k|    curlx_free(allochost);
  ------------------
  |  | 1478|  7.49k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1593|  7.49k|  }
 1594|  7.49k|  if(!url)
  ------------------
  |  Branch (1594:6): [True: 0, False: 7.49k]
  ------------------
 1595|      0|    return CURLUE_OUT_OF_MEMORY;
 1596|  7.49k|  *part = url;
 1597|  7.49k|  return CURLUE_OK;
 1598|  7.49k|}
urlapi.c:file_url:
 1476|     58|{
 1477|     58|  char *url = curl_maprintf("file://%s%s%s%s%s",
 1478|     58|                            u->path, querysep, u->query ? u->query : "",
  ------------------
  |  Branch (1478:48): [True: 5, False: 53]
  ------------------
 1479|     58|                            fragmentsep, u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1479:42): [True: 3, False: 55]
  ------------------
 1480|     58|  if(!url)
  ------------------
  |  Branch (1480:6): [True: 0, False: 58]
  ------------------
 1481|      0|    return CURLUE_OUT_OF_MEMORY;
 1482|       |
 1483|     58|  *part = url;
 1484|     58|  return CURLUE_OK;
 1485|     58|}
urlapi.c:urlget_format:
 1406|  28.9k|{
 1407|  28.9k|  CURLUcode uc = CURLUE_OK;
 1408|  28.9k|  size_t partlen = strlen(ptr);
 1409|  28.9k|  bool urldecode = (flags & CURLU_URLDECODE) ? 1 : 0;
  ------------------
  |  |   94|  28.9k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  |  Branch (1409:20): [True: 4.77k, False: 24.1k]
  ------------------
 1410|  28.9k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   95|  28.9k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1410:20): [True: 7.38k, False: 21.5k]
  ------------------
 1411|  28.9k|  bool punycode = (flags & CURLU_PUNYCODE) && (what == CURLUPART_HOST);
  ------------------
  |  |  101|  28.9k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1411:19): [True: 0, False: 28.9k]
  |  Branch (1411:47): [True: 0, False: 0]
  ------------------
 1412|  28.9k|  bool depunyfy = (flags & CURLU_PUNY2IDN) && (what == CURLUPART_HOST);
  ------------------
  |  |  102|  28.9k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1412:19): [True: 0, False: 28.9k]
  |  Branch (1412:47): [True: 0, False: 0]
  ------------------
 1413|  28.9k|  char *part = curlx_memdup0(ptr, partlen);
 1414|  28.9k|  *partp = NULL;
 1415|  28.9k|  if(!part)
  ------------------
  |  Branch (1415:6): [True: 0, False: 28.9k]
  ------------------
 1416|      0|    return CURLUE_OUT_OF_MEMORY;
 1417|  28.9k|  if(plusdecode) {
  ------------------
  |  Branch (1417:6): [True: 0, False: 28.9k]
  ------------------
 1418|       |    /* convert + to space */
 1419|      0|    char *plus = part;
 1420|      0|    size_t i = 0;
 1421|      0|    for(i = 0; i < partlen; ++plus, i++) {
  ------------------
  |  Branch (1421:16): [True: 0, False: 0]
  ------------------
 1422|      0|      if(*plus == '+')
  ------------------
  |  Branch (1422:10): [True: 0, False: 0]
  ------------------
 1423|      0|        *plus = ' ';
 1424|      0|    }
 1425|      0|  }
 1426|  28.9k|  if(urldecode) {
  ------------------
  |  Branch (1426:6): [True: 4.77k, False: 24.1k]
  ------------------
 1427|  4.77k|    char *decoded;
 1428|  4.77k|    size_t dlen;
 1429|       |    /* this unconditional rejection of control bytes is documented API
 1430|       |       behavior */
 1431|  4.77k|    CURLcode result = Curl_urldecode(part, partlen, &decoded, &dlen,
 1432|  4.77k|                                     REJECT_CTRL);
 1433|  4.77k|    curlx_free(part);
  ------------------
  |  | 1478|  4.77k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1434|  4.77k|    if(result)
  ------------------
  |  Branch (1434:8): [True: 3, False: 4.77k]
  ------------------
 1435|      3|      return CURLUE_URLDECODE;
 1436|  4.77k|    part = decoded;
 1437|  4.77k|    partlen = dlen;
 1438|  4.77k|  }
 1439|  28.9k|  if(urlencode) {
  ------------------
  |  Branch (1439:6): [True: 7.38k, False: 21.5k]
  ------------------
 1440|  7.38k|    struct dynbuf enc;
 1441|  7.38k|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  7.38k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1442|  7.38k|    uc = urlencode_str(&enc, part, partlen, TRUE, what == CURLUPART_QUERY ?
  ------------------
  |  | 1053|  7.38k|#define TRUE true
  ------------------
  |  Branch (1442:51): [True: 0, False: 7.38k]
  ------------------
 1443|  7.38k|                       QUERY_YES : QUERY_NO);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
                                     QUERY_YES : QUERY_NO);
  ------------------
  |  |   52|  14.7k|#define QUERY_NO      2
  ------------------
 1444|  7.38k|    curlx_free(part);
  ------------------
  |  | 1478|  7.38k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1445|  7.38k|    if(uc)
  ------------------
  |  Branch (1445:8): [True: 0, False: 7.38k]
  ------------------
 1446|      0|      return uc;
 1447|  7.38k|    part = curlx_dyn_ptr(&enc);
 1448|  7.38k|  }
 1449|  21.5k|  else if(punycode) {
  ------------------
  |  Branch (1449:11): [True: 0, False: 21.5k]
  ------------------
 1450|      0|    if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1450:8): [True: 0, False: 0]
  ------------------
 1451|      0|      char *punyversion = NULL;
 1452|      0|      uc = host_decode(part, &punyversion);
 1453|      0|      curlx_free(part);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1454|      0|      if(uc)
  ------------------
  |  Branch (1454:10): [True: 0, False: 0]
  ------------------
 1455|      0|        return uc;
 1456|      0|      part = punyversion;
 1457|      0|    }
 1458|      0|  }
 1459|  21.5k|  else if(depunyfy) {
  ------------------
  |  Branch (1459:11): [True: 0, False: 21.5k]
  ------------------
 1460|      0|    if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1460:8): [True: 0, False: 0]
  ------------------
 1461|      0|      char *unpunified = NULL;
 1462|      0|      uc = host_encode(part, &unpunified);
 1463|      0|      curlx_free(part);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1464|      0|      if(uc)
  ------------------
  |  Branch (1464:10): [True: 0, False: 0]
  ------------------
 1465|      0|        return uc;
 1466|      0|      part = unpunified;
 1467|      0|    }
 1468|      0|  }
 1469|  28.9k|  *partp = part;
 1470|  28.9k|  return CURLUE_OK;
 1471|  28.9k|}
urlapi.c:set_url_port:
 1733|     16|{
 1734|     16|  curl_off_t port;
 1735|     16|  if(!ISDIGIT(provided_port[0]))
  ------------------
  |  |   42|     16|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 16, False: 0]
  |  |  |  Branch (42:38): [True: 16, False: 0]
  |  |  ------------------
  ------------------
 1736|       |    /* not a number */
 1737|      0|    return CURLUE_BAD_PORT_NUMBER;
 1738|     16|  if(curlx_str_number(&provided_port, &port, 0xffff) || *provided_port)
  ------------------
  |  Branch (1738:6): [True: 0, False: 16]
  |  Branch (1738:57): [True: 0, False: 16]
  ------------------
 1739|       |    /* weirdly provided number, not good! */
 1740|      0|    return CURLUE_BAD_PORT_NUMBER;
 1741|     16|  u->portnum = (uint16_t)port;
 1742|       |  u->port_present = TRUE;
  ------------------
  |  | 1053|     16|#define TRUE true
  ------------------
 1743|     16|  return CURLUE_OK;
 1744|     16|}
urlapi.c:set_url:
 1748|  11.2k|{
 1749|       |  /*
 1750|       |   * Allow a new URL to replace the existing (if any) contents.
 1751|       |   *
 1752|       |   * If the existing contents is enough for a URL, allow a relative URL to
 1753|       |   * replace it.
 1754|       |   */
 1755|  11.2k|  CURLUcode uc;
 1756|  11.2k|  char *oldurl = NULL;
 1757|       |
 1758|  11.2k|  if(!part_size) {
  ------------------
  |  Branch (1758:6): [True: 301, False: 10.9k]
  ------------------
 1759|       |    /* a blank URL is not a valid URL unless we already have a complete one
 1760|       |       and this is a redirect */
 1761|    301|    uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
 1762|    301|    if(!uc) {
  ------------------
  |  Branch (1762:8): [True: 0, False: 301]
  ------------------
 1763|       |      /* success, meaning the "" is a fine relative URL, and the new URL
 1764|       |         inherits scheme/authority/path/query, but not fragment, from the
 1765|       |         existing URL (RFC 3986 section 5.2.2) */
 1766|      0|      curlx_safefree(u->fragment);
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1767|      0|      u->fragment_present = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1768|      0|      curlx_free(oldurl);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1769|      0|      return CURLUE_OK;
 1770|      0|    }
 1771|    301|    if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1771:8): [True: 0, False: 301]
  ------------------
 1772|      0|      return uc;
 1773|    301|    return CURLUE_MALFORMED_INPUT;
 1774|    301|  }
 1775|       |
 1776|       |  /* if the new URL is absolute replace the existing with the new. */
 1777|  10.9k|  if(Curl_is_absolute_url(url, NULL, 0,
  ------------------
  |  Branch (1777:6): [True: 7.35k, False: 3.58k]
  ------------------
 1778|  10.9k|                          flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   97|  10.9k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
                                        flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   89|  10.9k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1779|  7.35k|    return parseurl_and_replace(url, u, flags);
 1780|       |
 1781|       |  /* if the old URL is incomplete (we cannot get an absolute URL in
 1782|       |     'oldurl'), replace the existing with the new.
 1783|       |     Always include "scheme://" to make the URL "complete" */
 1784|       |  /* Preserve empty query/fragment separators: they affect where relative
 1785|       |     references splice into the base URL. */
 1786|  3.58k|  uc = curl_url_get(u, CURLUPART_URL, &oldurl,
 1787|  3.58k|                    (flags & ~CURLU_NO_GUESS_SCHEME) | CURLU_GET_EMPTY);
  ------------------
  |  |  106|  3.58k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
                                  (flags & ~CURLU_NO_GUESS_SCHEME) | CURLU_GET_EMPTY);
  ------------------
  |  |  103|  3.58k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 1788|  3.58k|  if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1788:6): [True: 0, False: 3.58k]
  ------------------
 1789|      0|    return uc;
 1790|  3.58k|  else if(uc)
  ------------------
  |  Branch (1790:11): [True: 3.58k, False: 0]
  ------------------
 1791|  3.58k|    return parseurl_and_replace(url, u, flags);
 1792|       |
 1793|      0|  DEBUGASSERT(oldurl); /* it is set here */
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1793:3): [True: 0, False: 0]
  |  Branch (1793:3): [True: 0, False: 0]
  ------------------
 1794|       |  /* apply the relative part to create a new URL */
 1795|      0|  uc = redirect_url(oldurl, url, u, flags);
 1796|      0|  curlx_free(oldurl);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1797|      0|  return uc;
 1798|      0|}
urlapi.c:parseurl_and_replace:
 1241|  10.9k|{
 1242|  10.9k|  CURLUcode ures;
 1243|  10.9k|  CURLU tmpurl;
 1244|  10.9k|  memset(&tmpurl, 0, sizeof(tmpurl));
 1245|  10.9k|  ures = parseurl(url, &tmpurl, flags);
 1246|  10.9k|  if(!ures) {
  ------------------
  |  Branch (1246:6): [True: 10.3k, False: 544]
  ------------------
 1247|  10.3k|    free_urlhandle(u);
 1248|  10.3k|    *u = tmpurl;
 1249|  10.3k|  }
 1250|  10.9k|  return ures;
 1251|  10.9k|}
urlapi.c:parseurl:
 1151|  10.9k|{
 1152|  10.9k|  const char *path;
 1153|  10.9k|  size_t pathlen;
 1154|  10.9k|  char schemebuf[MAX_SCHEME_LEN + 1];
 1155|  10.9k|  size_t schemelen = 0;
 1156|  10.9k|  size_t urllen;
 1157|  10.9k|  CURLUcode ures = CURLUE_OK;
 1158|  10.9k|  struct dynbuf host;
 1159|  10.9k|  bool is_file = FALSE;
  ------------------
  |  | 1056|  10.9k|#define FALSE false
  ------------------
 1160|       |
 1161|  10.9k|  DEBUGASSERT(url);
  ------------------
  |  | 1079|  10.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1161:3): [True: 0, False: 10.9k]
  |  Branch (1161:3): [True: 10.9k, False: 0]
  ------------------
 1162|       |
 1163|  10.9k|  curlx_dyn_init(&host, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  10.9k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1164|       |
 1165|  10.9k|  ures = Curl_junkscan(url, &urllen, !!(flags & CURLU_ALLOW_SPACE));
  ------------------
  |  |  100|  10.9k|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1166|  10.9k|  if(ures)
  ------------------
  |  Branch (1166:6): [True: 30, False: 10.9k]
  ------------------
 1167|     30|    goto fail;
 1168|       |
 1169|  10.9k|  schemelen = Curl_is_absolute_url(url, schemebuf, sizeof(schemebuf),
 1170|  10.9k|                                   flags & (CURLU_GUESS_SCHEME |
  ------------------
  |  |   97|  10.9k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1171|  10.9k|                                            CURLU_DEFAULT_SCHEME));
  ------------------
  |  |   89|  10.9k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1172|       |
 1173|       |  /* handle the file: scheme */
 1174|  10.9k|  if(schemelen && !strcmp(schemebuf, "file")) {
  ------------------
  |  Branch (1174:6): [True: 7.34k, False: 3.56k]
  |  Branch (1174:19): [True: 107, False: 7.23k]
  ------------------
 1175|    107|    is_file = TRUE;
  ------------------
  |  | 1053|    107|#define TRUE true
  ------------------
 1176|    107|    ures = parse_file(url, urllen, u, &path, &pathlen);
 1177|    107|  }
 1178|  10.7k|  else {
 1179|  10.7k|    const char *hostp = NULL;
 1180|  10.7k|    size_t hostlen;
 1181|  10.7k|    ures = parse_scheme(url, u, schemebuf, schemelen, flags, &hostp);
 1182|  10.7k|    if(ures)
  ------------------
  |  Branch (1182:8): [True: 3, False: 10.7k]
  ------------------
 1183|      3|      goto fail;
 1184|       |
 1185|       |    /* find the end of the hostname + port number */
 1186|  10.7k|    hostlen = strcspn(hostp, "/?#");
 1187|  10.7k|    path = &hostp[hostlen];
 1188|       |
 1189|       |    /* this pathlen also contains the query and the fragment */
 1190|  10.7k|    pathlen = urllen - (path - url);
 1191|  10.7k|    if(hostlen) {
  ------------------
  |  Branch (1191:8): [True: 10.7k, False: 77]
  ------------------
 1192|  10.7k|      ures = parse_authority(u, hostp, hostlen, flags, &host, !!u->scheme);
 1193|  10.7k|      if(!ures && (flags & CURLU_GUESS_SCHEME) && !u->scheme)
  ------------------
  |  |   97|  10.3k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (1193:10): [True: 10.3k, False: 385]
  |  Branch (1193:19): [True: 10.3k, False: 0]
  |  Branch (1193:51): [True: 3.29k, False: 7.03k]
  ------------------
 1194|  3.29k|        ures = guess_scheme(u, &host);
 1195|  10.7k|    }
 1196|     77|    else if(flags & CURLU_NO_AUTHORITY) {
  ------------------
  |  |   98|     77|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (1196:13): [True: 0, False: 77]
  ------------------
 1197|       |      /* allowed to be empty. */
 1198|      0|      if(curlx_dyn_add(&host, ""))
  ------------------
  |  Branch (1198:10): [True: 0, False: 0]
  ------------------
 1199|      0|        ures = CURLUE_OUT_OF_MEMORY;
 1200|      0|    }
 1201|     77|    else
 1202|     77|      ures = CURLUE_NO_HOST;
 1203|  10.7k|  }
 1204|  10.9k|  if(!ures) {
  ------------------
  |  Branch (1204:6): [True: 10.3k, False: 511]
  ------------------
 1205|       |    /* The path might at this point contain a fragment and/or a query to
 1206|       |       handle */
 1207|  10.3k|    const char *fragment = strchr(path, '#');
 1208|  10.3k|    if(fragment) {
  ------------------
  |  Branch (1208:8): [True: 151, False: 10.2k]
  ------------------
 1209|    151|      size_t fraglen = pathlen - (fragment - path);
 1210|    151|      ures = handle_fragment(u, fragment, fraglen, flags);
 1211|       |      /* after this, pathlen still contains the query */
 1212|    151|      pathlen -= fraglen;
 1213|    151|    }
 1214|  10.3k|  }
 1215|  10.9k|  if(!ures) {
  ------------------
  |  Branch (1215:6): [True: 10.3k, False: 511]
  ------------------
 1216|  10.3k|    const char *query = memchr(path, '?', pathlen);
 1217|  10.3k|    if(query) {
  ------------------
  |  Branch (1217:8): [True: 591, False: 9.80k]
  ------------------
 1218|    591|      size_t qlen = pathlen - (query - path);
 1219|    591|      ures = handle_query(u, query, qlen, flags);
 1220|    591|      pathlen -= qlen;
 1221|    591|    }
 1222|  10.3k|  }
 1223|  10.9k|  if(!ures)
  ------------------
  |  Branch (1223:6): [True: 10.3k, False: 511]
  ------------------
 1224|       |    /* the fragment and query parts are trimmed off from the path */
 1225|  10.3k|    ures = handle_path(u, path, pathlen, flags, is_file);
 1226|  10.9k|  if(!ures) {
  ------------------
  |  Branch (1226:6): [True: 10.3k, False: 511]
  ------------------
 1227|  10.3k|    u->host = curlx_dyn_ptr(&host);
 1228|  10.3k|    return CURLUE_OK;
 1229|  10.3k|  }
 1230|    544|fail:
 1231|    544|  curlx_dyn_free(&host);
 1232|    544|  free_urlhandle(u);
 1233|    544|  return ures;
 1234|  10.9k|}
urlapi.c:parse_scheme:
  972|  10.7k|{
  973|       |  /* clear path */
  974|  10.7k|  const char *schemep = NULL;
  975|       |
  976|  10.7k|  if(schemelen) {
  ------------------
  |  Branch (976:6): [True: 7.23k, False: 3.56k]
  ------------------
  977|  7.23k|    int num_slashes = 0;
  978|  7.23k|    const char *p = &url[schemelen + 1];
  979|  7.23k|    if(!Curl_get_scheme(schemebuf) && !(flags & CURLU_NON_SUPPORT_SCHEME))
  ------------------
  |  |   91|     77|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
  |  Branch (979:8): [True: 77, False: 7.15k]
  |  Branch (979:39): [True: 0, False: 77]
  ------------------
  980|      0|      return CURLUE_UNSUPPORTED_SCHEME;
  981|       |
  982|  7.23k|    if(!ISSLASH(*p))
  ------------------
  |  |  751|  7.23k|#define ISSLASH(x) ((x) == '/')
  ------------------
  |  Branch (982:8): [True: 0, False: 7.23k]
  ------------------
  983|       |      /* less than one */
  984|      0|      return CURLUE_BAD_SLASHES;
  985|  7.23k|    if((flags & CURLU_NO_AUTHORITY)) {
  ------------------
  |  |   98|  7.23k|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (985:8): [True: 0, False: 7.23k]
  ------------------
  986|      0|      while(ISSLASH(*p) && (num_slashes < 2)) {
  ------------------
  |  |  751|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (986:28): [True: 0, False: 0]
  ------------------
  987|      0|        p++;
  988|      0|        num_slashes++;
  989|      0|      }
  990|      0|    }
  991|  7.23k|    else {
  992|  15.4k|      while(ISSLASH(*p) && (num_slashes < 4)) {
  ------------------
  |  |  751|  30.8k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 8.17k, False: 7.23k]
  |  |  ------------------
  ------------------
  |  Branch (992:28): [True: 8.17k, False: 0]
  ------------------
  993|  8.17k|        p++;
  994|  8.17k|        num_slashes++;
  995|  8.17k|      }
  996|  7.23k|      if(num_slashes > 3)
  ------------------
  |  Branch (996:10): [True: 3, False: 7.23k]
  ------------------
  997|      3|        return CURLUE_BAD_SLASHES;
  998|  7.23k|    }
  999|       |
 1000|  7.23k|    schemep = schemebuf;
 1001|  7.23k|    *hostpp = p; /* hostname starts here */
 1002|  7.23k|  }
 1003|  3.56k|  else {
 1004|       |    /* no scheme! */
 1005|       |
 1006|  3.56k|    if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   89|  3.56k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
                  if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   97|  3.56k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (1006:8): [True: 0, False: 3.56k]
  ------------------
 1007|      0|      return CURLUE_BAD_SCHEME;
 1008|       |
 1009|  3.56k|    if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   89|  3.56k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (1009:8): [True: 0, False: 3.56k]
  ------------------
 1010|      0|      schemep = DEFAULT_SCHEME;
  ------------------
  |  |   70|      0|#define DEFAULT_SCHEME "https"
  ------------------
 1011|       |
 1012|       |    /*
 1013|       |     * The URL was badly formatted, let's try without scheme specified.
 1014|       |     */
 1015|  3.56k|    *hostpp = url;
 1016|  3.56k|  }
 1017|       |
 1018|  10.7k|  if(schemep) {
  ------------------
  |  Branch (1018:6): [True: 7.23k, False: 3.56k]
  ------------------
 1019|  7.23k|    u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1472|  7.23k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1020|  7.23k|    if(!u->scheme)
  ------------------
  |  Branch (1020:8): [True: 0, False: 7.23k]
  ------------------
 1021|      0|      return CURLUE_OUT_OF_MEMORY;
 1022|  7.23k|  }
 1023|  10.7k|  return CURLUE_OK;
 1024|  10.7k|}
urlapi.c:guess_scheme:
 1027|  3.29k|{
 1028|  3.29k|  const char *hostname = curlx_dyn_ptr(host);
 1029|  3.29k|  const char *schemep = NULL;
 1030|       |  /* legacy curl-style guess based on hostname */
 1031|  3.29k|  if(checkprefix("ftp.", hostname))
  ------------------
  |  |   33|  3.29k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  3.29k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  3.29k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 3.29k]
  |  |  ------------------
  ------------------
 1032|      1|    schemep = "ftp";
 1033|  3.29k|  else if(checkprefix("dict.", hostname))
  ------------------
  |  |   33|  3.29k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  3.29k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  3.29k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 3.29k]
  |  |  ------------------
  ------------------
 1034|      1|    schemep = "dict";
 1035|  3.29k|  else if(checkprefix("ldap.", hostname))
  ------------------
  |  |   33|  3.29k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  3.29k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  3.29k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 3.29k]
  |  |  ------------------
  ------------------
 1036|      1|    schemep = "ldap";
 1037|  3.29k|  else if(checkprefix("imap.", hostname))
  ------------------
  |  |   33|  3.29k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  3.29k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  3.29k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 3.29k]
  |  |  ------------------
  ------------------
 1038|      1|    schemep = "imap";
 1039|  3.29k|  else if(checkprefix("smtp.", hostname))
  ------------------
  |  |   33|  3.29k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  3.29k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  3.29k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 3.29k]
  |  |  ------------------
  ------------------
 1040|      1|    schemep = "smtp";
 1041|  3.29k|  else if(checkprefix("pop3.", hostname))
  ------------------
  |  |   33|  3.29k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1301|  3.29k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1296|  3.29k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 3.29k]
  |  |  ------------------
  ------------------
 1042|      1|    schemep = "pop3";
 1043|  3.29k|  else
 1044|  3.29k|    schemep = "http";
 1045|       |
 1046|  3.29k|  u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1472|  3.29k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1047|  3.29k|  if(!u->scheme)
  ------------------
  |  Branch (1047:6): [True: 0, False: 3.29k]
  ------------------
 1048|      0|    return CURLUE_OUT_OF_MEMORY;
 1049|       |
 1050|  3.29k|  u->guessed_scheme = TRUE;
  ------------------
  |  | 1053|  3.29k|#define TRUE true
  ------------------
 1051|  3.29k|  return CURLUE_OK;
 1052|  3.29k|}
urlapi.c:handle_fragment:
 1056|    151|{
 1057|    151|  CURLUcode ures;
 1058|    151|  u->fragment_present = TRUE;
  ------------------
  |  | 1053|    151|#define TRUE true
  ------------------
 1059|    151|  if(fraglen > 1) {
  ------------------
  |  Branch (1059:6): [True: 104, False: 47]
  ------------------
 1060|       |    /* skip the leading '#' in the copy but include the null-terminator */
 1061|    104|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   95|    104|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1061:8): [True: 0, False: 104]
  ------------------
 1062|      0|      struct dynbuf enc;
 1063|      0|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1064|      0|      ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  |   52|      0|#define QUERY_NO      2
  ------------------
 1065|      0|      if(ures)
  ------------------
  |  Branch (1065:10): [True: 0, False: 0]
  ------------------
 1066|      0|        return ures;
 1067|      0|      u->fragment = curlx_dyn_ptr(&enc);
 1068|      0|    }
 1069|    104|    else {
 1070|    104|      u->fragment = curlx_memdup0(fragment + 1, fraglen - 1);
 1071|    104|      if(!u->fragment)
  ------------------
  |  Branch (1071:10): [True: 0, False: 104]
  ------------------
 1072|      0|        return CURLUE_OUT_OF_MEMORY;
 1073|    104|    }
 1074|    104|  }
 1075|    151|  return CURLUE_OK;
 1076|    151|}
urlapi.c:handle_query:
 1080|    591|{
 1081|    591|  u->query_present = TRUE;
  ------------------
  |  | 1053|    591|#define TRUE true
  ------------------
 1082|    591|  if(qlen > 1) {
  ------------------
  |  Branch (1082:6): [True: 523, False: 68]
  ------------------
 1083|    523|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   95|    523|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1083:8): [True: 0, False: 523]
  ------------------
 1084|      0|      struct dynbuf enc;
 1085|      0|      CURLUcode ures;
 1086|      0|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1087|       |      /* skip the leading question mark */
 1088|      0|      ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
 1089|      0|      if(ures)
  ------------------
  |  Branch (1089:10): [True: 0, False: 0]
  ------------------
 1090|      0|        return ures;
 1091|      0|      u->query = curlx_dyn_ptr(&enc);
 1092|      0|    }
 1093|    523|    else {
 1094|    523|      u->query = curlx_memdup0(query + 1, qlen - 1);
 1095|    523|      if(!u->query)
  ------------------
  |  Branch (1095:10): [True: 0, False: 523]
  ------------------
 1096|      0|        return CURLUE_OUT_OF_MEMORY;
 1097|    523|    }
 1098|    523|  }
 1099|     68|  else {
 1100|       |    /* single byte query */
 1101|     68|    u->query = curlx_strdup("");
  ------------------
  |  | 1472|     68|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1102|     68|    if(!u->query)
  ------------------
  |  Branch (1102:8): [True: 0, False: 68]
  ------------------
 1103|      0|      return CURLUE_OUT_OF_MEMORY;
 1104|     68|  }
 1105|    591|  return CURLUE_OK;
 1106|    591|}
urlapi.c:handle_path:
 1111|  10.3k|{
 1112|  10.3k|  CURLUcode ures;
 1113|  10.3k|  if(pathlen && (flags & CURLU_URLENCODE)) {
  ------------------
  |  |   95|  1.26k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1113:6): [True: 1.26k, False: 9.12k]
  |  Branch (1113:17): [True: 0, False: 1.26k]
  ------------------
 1114|      0|    struct dynbuf enc;
 1115|      0|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1116|      0|    ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
                  ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  |   52|      0|#define QUERY_NO      2
  ------------------
 1117|      0|    if(ures)
  ------------------
  |  Branch (1117:8): [True: 0, False: 0]
  ------------------
 1118|      0|      return ures;
 1119|      0|    pathlen = curlx_dyn_len(&enc);
 1120|      0|    path = u->path = curlx_dyn_ptr(&enc);
 1121|      0|  }
 1122|       |
 1123|  10.3k|  if(pathlen >= (size_t)(1 + !is_file)) {
  ------------------
  |  Branch (1123:6): [True: 1.10k, False: 9.28k]
  ------------------
 1124|       |    /* paths for file:// scheme can be one byte, others need to be two */
 1125|  1.10k|    if(!u->path) {
  ------------------
  |  Branch (1125:8): [True: 1.10k, False: 0]
  ------------------
 1126|  1.10k|      u->path = curlx_memdup0(path, pathlen);
 1127|  1.10k|      if(!u->path)
  ------------------
  |  Branch (1127:10): [True: 0, False: 1.10k]
  ------------------
 1128|      0|        return CURLUE_OUT_OF_MEMORY;
 1129|  1.10k|      path = u->path;
 1130|  1.10k|    }
 1131|      0|    else if(flags & CURLU_URLENCODE)
  ------------------
  |  |   95|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1131:13): [True: 0, False: 0]
  ------------------
 1132|       |      /* it might have encoded more than the path so cut it */
 1133|      0|      u->path[pathlen] = 0;
 1134|       |
 1135|  1.10k|    if(!(flags & CURLU_PATH_AS_IS)) {
  ------------------
  |  |   92|  1.10k|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1135:8): [True: 1.10k, False: 3]
  ------------------
 1136|       |      /* remove ../ and ./ sequences according to RFC3986 */
 1137|  1.10k|      char *dedot;
 1138|  1.10k|      int err = dedotdotify(path, pathlen, &dedot);
 1139|  1.10k|      if(err)
  ------------------
  |  Branch (1139:10): [True: 0, False: 1.10k]
  ------------------
 1140|      0|        return CURLUE_OUT_OF_MEMORY;
 1141|  1.10k|      if(dedot) {
  ------------------
  |  Branch (1141:10): [True: 1.09k, False: 11]
  ------------------
 1142|  1.09k|        curlx_free(u->path);
  ------------------
  |  | 1478|  1.09k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1143|  1.09k|        u->path = dedot;
 1144|  1.09k|      }
 1145|  1.10k|    }
 1146|  1.10k|  }
 1147|  10.3k|  return CURLUE_OK;
 1148|  10.3k|}

Curl_auth_digest_cleanup:
 1040|  57.2k|{
 1041|  57.2k|  Curl_peer_unlink(&digest->origin);
 1042|  57.2k|  Curl_creds_unlink(&digest->creds);
 1043|  57.2k|  curlx_safefree(digest->nonce);
  ------------------
  |  | 1336|  57.2k|  do {                      \
  |  | 1337|  57.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  57.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  57.2k|    (ptr) = NULL;           \
  |  | 1339|  57.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 57.2k]
  |  |  ------------------
  ------------------
 1044|  57.2k|  curlx_safefree(digest->cnonce);
  ------------------
  |  | 1336|  57.2k|  do {                      \
  |  | 1337|  57.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  57.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  57.2k|    (ptr) = NULL;           \
  |  | 1339|  57.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 57.2k]
  |  |  ------------------
  ------------------
 1045|  57.2k|  curlx_safefree(digest->realm);
  ------------------
  |  | 1336|  57.2k|  do {                      \
  |  | 1337|  57.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  57.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  57.2k|    (ptr) = NULL;           \
  |  | 1339|  57.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 57.2k]
  |  |  ------------------
  ------------------
 1046|  57.2k|  curlx_safefree(digest->opaque);
  ------------------
  |  | 1336|  57.2k|  do {                      \
  |  | 1337|  57.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  57.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  57.2k|    (ptr) = NULL;           \
  |  | 1339|  57.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 57.2k]
  |  |  ------------------
  ------------------
 1047|  57.2k|  curlx_safefree(digest->qop);
  ------------------
  |  | 1336|  57.2k|  do {                      \
  |  | 1337|  57.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  57.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  57.2k|    (ptr) = NULL;           \
  |  | 1339|  57.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 57.2k]
  |  |  ------------------
  ------------------
 1048|  57.2k|  curlx_safefree(digest->algorithm);
  ------------------
  |  | 1336|  57.2k|  do {                      \
  |  | 1337|  57.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  57.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  57.2k|    (ptr) = NULL;           \
  |  | 1339|  57.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 57.2k]
  |  |  ------------------
  ------------------
 1049|       |
 1050|  57.2k|  digest->nc = 0;
 1051|  57.2k|  digest->algo = ALGO_MD5; /* default algorithm */
  ------------------
  |  |   44|  57.2k|#define ALGO_MD5 0
  ------------------
 1052|  57.2k|  digest->stale = FALSE;   /* default means normal, not stale */
  ------------------
  |  | 1056|  57.2k|#define FALSE false
  ------------------
 1053|       |  digest->userhash = FALSE;
  ------------------
  |  | 1056|  57.2k|#define FALSE false
  ------------------
 1054|  57.2k|}

Curl_auth_allowed_to_host:
  141|  1.34k|{
  142|  1.34k|  return Curl_auth_allowed_to_origin(data, data->state.origin);
  143|  1.34k|}
Curl_auth_allowed_to_origin:
  147|  1.51k|{
  148|  1.51k|  return data->set.allow_auth_to_other_hosts ||
  ------------------
  |  Branch (148:10): [True: 2, False: 1.51k]
  ------------------
  149|  1.51k|         Curl_peer_equal(data->state.initial_origin, origin);
  ------------------
  |  Branch (149:10): [True: 1.51k, False: 0]
  ------------------
  150|  1.51k|}

Curl_tls_keylog_open:
   39|      1|{
   40|      1|  if(!keylog_file_fp) {
  ------------------
  |  Branch (40:6): [True: 1, False: 0]
  ------------------
   41|      1|    keylog_file_name = getenv("SSLKEYLOGFILE");
   42|      1|    if(keylog_file_name) {
  ------------------
  |  Branch (42:8): [True: 0, False: 1]
  ------------------
   43|      0|      keylog_file_fp = curlx_fopen(keylog_file_name, FOPEN_APPENDTEXT);
  ------------------
  |  |   74|      0|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
   44|      0|      if(keylog_file_fp) {
  ------------------
  |  Branch (44:10): [True: 0, False: 0]
  ------------------
   45|       |#ifdef _WIN32
   46|       |        if(setvbuf(keylog_file_fp, NULL, _IONBF, 0))
   47|       |#else
   48|      0|        if(setvbuf(keylog_file_fp, NULL, _IOLBF, 4096))
  ------------------
  |  Branch (48:12): [True: 0, False: 0]
  ------------------
   49|      0|#endif
   50|      0|        {
   51|      0|          curlx_fclose(keylog_file_fp);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
   52|       |          keylog_file_fp = NULL;
   53|      0|        }
   54|      0|      }
   55|      0|    }
   56|      1|  }
   57|      1|}
Curl_tls_keylog_enabled:
   68|  2.58k|{
   69|  2.58k|  return !!keylog_file_fp;
   70|  2.58k|}

Curl_ssl_setup_x509_store:
 3303|  4.58k|{
 3304|  4.58k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3305|  4.58k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3306|  4.58k|  CURLcode result = CURLE_OK;
 3307|  4.58k|  X509_STORE *cached_store;
 3308|  4.58k|  bool cache_criteria_met, is_empty;
 3309|       |
 3310|       |  /* Consider the X509 store cacheable if it comes exclusively from a CAfile,
 3311|       |     or no source is provided and we are falling back to OpenSSL's built-in
 3312|       |     default. */
 3313|  4.58k|  cache_criteria_met = (data->set.general_ssl.ca_cache_timeout != 0) &&
  ------------------
  |  Branch (3313:24): [True: 4.57k, False: 3]
  ------------------
 3314|  4.57k|    conn_config->verifypeer &&
  ------------------
  |  Branch (3314:5): [True: 4.52k, False: 58]
  ------------------
 3315|  4.52k|    !conn_config->CApath &&
  ------------------
  |  Branch (3315:5): [True: 0, False: 4.52k]
  ------------------
 3316|      0|    !conn_config->ca_info_blob &&
  ------------------
  |  Branch (3316:5): [True: 0, False: 0]
  ------------------
 3317|      0|    !ssl_config->primary.CRLfile &&
  ------------------
  |  Branch (3317:5): [True: 0, False: 0]
  ------------------
 3318|      0|    !ssl_config->native_ca_store;
  ------------------
  |  Branch (3318:5): [True: 0, False: 0]
  ------------------
 3319|       |
 3320|  4.58k|  ERR_set_mark();
 3321|       |
 3322|  4.58k|  cached_store = ossl_get_cached_x509_store(cf, data, &is_empty);
 3323|  4.58k|  if(cached_store && cache_criteria_met && X509_STORE_up_ref(cached_store)) {
  ------------------
  |  Branch (3323:6): [True: 0, False: 4.58k]
  |  Branch (3323:22): [True: 0, False: 0]
  |  Branch (3323:44): [True: 0, False: 0]
  ------------------
 3324|      0|    SSL_CTX_set_cert_store(octx->ssl_ctx, cached_store);
 3325|      0|    octx->store_is_empty = is_empty;
 3326|      0|  }
 3327|  4.58k|  else {
 3328|  4.58k|    X509_STORE *store = SSL_CTX_get_cert_store(octx->ssl_ctx);
 3329|       |
 3330|  4.58k|    result = ossl_populate_x509_store(cf, data, octx, store);
 3331|  4.58k|    if(result == CURLE_OK && cache_criteria_met) {
  ------------------
  |  Branch (3331:8): [True: 487, False: 4.09k]
  |  Branch (3331:30): [True: 0, False: 487]
  ------------------
 3332|      0|      ossl_set_cached_x509_store(cf, data, store, (bool)octx->store_is_empty);
 3333|      0|    }
 3334|  4.58k|  }
 3335|       |
 3336|  4.58k|  ERR_pop_to_mark();
 3337|       |
 3338|  4.58k|  return result;
 3339|  4.58k|}
Curl_ossl_need_httpsrr:
 3603|  3.47k|{
 3604|  3.47k|  (void)data;
 3605|       |  return FALSE;
  ------------------
  |  | 1056|  3.47k|#define FALSE false
  ------------------
 3606|  3.47k|}
Curl_ossl_ctx_init:
 3717|  3.47k|{
 3718|  3.47k|  CURLcode result = CURLE_OK;
 3719|  3.47k|  const char *ciphers;
 3720|  3.47k|  const SSL_METHOD *req_method = NULL;
 3721|  3.47k|  ctx_option_t ctx_options = 0;
 3722|  3.47k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3723|  3.47k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3724|  3.47k|  char * const ssl_cert = ssl_config->primary.clientcert;
 3725|  3.47k|  const struct curl_blob *ssl_cert_blob = ssl_config->primary.cert_blob;
 3726|  3.47k|  const char * const ssl_cert_type = ssl_config->primary.cert_type;
 3727|  3.47k|  unsigned int ssl_version_min;
 3728|  3.47k|  char error_buffer[256];
 3729|       |
 3730|       |  /* Make funny stuff to get random input */
 3731|  3.47k|  result = ossl_seed(data);
 3732|  3.47k|  if(result)
  ------------------
  |  Branch (3732:6): [True: 0, False: 3.47k]
  ------------------
 3733|      0|    return result;
 3734|       |
 3735|  3.47k|  ssl_config->certverifyresult = !X509_V_OK;
 3736|       |
 3737|  3.47k|  result = ossl_init_method(cf, data, peer, &req_method, &ssl_version_min);
 3738|  3.47k|  if(result)
  ------------------
  |  Branch (3738:6): [True: 0, False: 3.47k]
  ------------------
 3739|      0|    return result;
 3740|  3.47k|  DEBUGASSERT(req_method);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3740:3): [True: 0, False: 3.47k]
  |  Branch (3740:3): [True: 3.47k, False: 0]
  ------------------
 3741|       |
 3742|  3.47k|  DEBUGASSERT(!octx->ssl_ctx);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3742:3): [True: 0, False: 3.47k]
  |  Branch (3742:3): [True: 3.47k, False: 0]
  ------------------
 3743|  3.47k|  octx->ssl_ctx =
 3744|  3.47k|#ifdef OPENSSL_HAS_PROVIDERS
 3745|  3.47k|    data->state.libctx ?
  ------------------
  |  Branch (3745:5): [True: 708, False: 2.76k]
  ------------------
 3746|    708|    SSL_CTX_new_ex(data->state.libctx, data->state.propq, req_method):
 3747|  3.47k|#endif
 3748|  3.47k|    SSL_CTX_new(req_method);
 3749|       |
 3750|  3.47k|  if(!octx->ssl_ctx) {
  ------------------
  |  Branch (3750:6): [True: 113, False: 3.35k]
  ------------------
 3751|    113|    failf(data, "SSL: could not create a context: %s",
  ------------------
  |  |   62|    113|#define failf Curl_failf
  ------------------
 3752|    113|          ossl_strerror(ERR_peek_error(), error_buffer, sizeof(error_buffer)));
 3753|    113|    return CURLE_OUT_OF_MEMORY;
 3754|    113|  }
 3755|       |
 3756|  3.35k|  if(cb_setup) {
  ------------------
  |  Branch (3756:6): [True: 0, False: 3.35k]
  ------------------
 3757|      0|    result = cb_setup(cf, data, cb_user_data);
 3758|      0|    if(result)
  ------------------
  |  Branch (3758:8): [True: 0, False: 0]
  ------------------
 3759|      0|      return result;
 3760|      0|  }
 3761|       |
 3762|  3.35k|  if(data->set.fdebug && data->set.verbose &&
  ------------------
  |  Branch (3762:6): [True: 0, False: 3.35k]
  |  Branch (3762:26): [True: 0, False: 0]
  ------------------
 3763|      0|     (peer->transport != TRNSPRT_QUIC)) {
  ------------------
  |  |  239|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3763:6): [True: 0, False: 0]
  ------------------
 3764|       |    /* the SSL trace callback is only used for verbose logging;
 3765|       |     * QUIC connections use a different TLS record format that
 3766|       |     * ossl_trace cannot handle */
 3767|      0|    SSL_CTX_set_msg_callback(octx->ssl_ctx, ossl_trace);
 3768|      0|    SSL_CTX_set_msg_callback_arg(octx->ssl_ctx, cf);
 3769|      0|  }
 3770|       |
 3771|       |  /* OpenSSL contains code to work around lots of bugs and flaws in various
 3772|       |     SSL-implementations. SSL_CTX_set_options() is used to enabled those
 3773|       |     workarounds. The man page for this option states that SSL_OP_ALL enables
 3774|       |     all the workarounds and that "It is usually safe to use SSL_OP_ALL to
 3775|       |     enable the bug workaround options if compatibility with somewhat broken
 3776|       |     implementations is desired."
 3777|       |
 3778|       |     The "-no_ticket" option was introduced in OpenSSL 0.9.8j. it is a flag to
 3779|       |     disable "rfc4507bis session ticket support". rfc4507bis was later turned
 3780|       |     into the proper RFC5077: https://datatracker.ietf.org/doc/html/rfc5077
 3781|       |
 3782|       |     The enabled extension concerns the session management. I wonder how often
 3783|       |     libcurl stops a connection and then resumes a TLS session. Also, sending
 3784|       |     the session data is some overhead. I suggest that you use your proposed
 3785|       |     patch (which explicitly disables TICKET).
 3786|       |
 3787|       |     If someone writes an application with libcurl and OpenSSL who wants to
 3788|       |     enable the feature, one can do this in the SSL callback.
 3789|       |
 3790|       |     SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option enabling allowed proper
 3791|       |     interoperability with web server Netscape Enterprise Server 2.0.1 which
 3792|       |     was released back in 1996.
 3793|       |
 3794|       |     Due to CVE-2010-4180, option SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG has
 3795|       |     become ineffective as of OpenSSL 0.9.8q and 1.0.0c. In order to mitigate
 3796|       |     CVE-2010-4180 when using previous OpenSSL versions we no longer enable
 3797|       |     this option regardless of OpenSSL version and SSL_OP_ALL definition.
 3798|       |
 3799|       |     OpenSSL added a workaround for an SSL 3.0/TLS 1.0 CBC vulnerability:
 3800|       |     https://web.archive.org/web/20240114184648/openssl.org/~bodo/tls-cbc.txt.
 3801|       |     In 0.9.6e they added a bit to SSL_OP_ALL that _disables_ that workaround
 3802|       |     despite the fact that SSL_OP_ALL is documented to do "rather harmless"
 3803|       |     workarounds. In order to keep the secure workaround, the
 3804|       |     SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit must not be set. */
 3805|       |
 3806|  3.35k|  ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET | SSL_OP_NO_COMPRESSION;
 3807|       |
 3808|       |  /* mitigate CVE-2010-4180 */
 3809|  3.35k|  ctx_options &= ~(ctx_option_t)SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG;
 3810|       |
 3811|       |  /* unless the user explicitly asks to allow the protocol vulnerability we
 3812|       |     use the workaround */
 3813|  3.35k|  if(!ssl_config->enable_beast)
  ------------------
  |  Branch (3813:6): [True: 3.35k, False: 4]
  ------------------
 3814|  3.35k|    ctx_options &= ~(ctx_option_t)SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
 3815|       |
 3816|  3.35k|  DEBUGASSERT(ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1079|  3.35k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3816:3): [True: 0, False: 3.35k]
  |  Branch (3816:3): [True: 3.35k, False: 0]
  ------------------
 3817|  3.35k|  switch(ssl_version_min) {
 3818|      0|  case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2394|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3818:3): [True: 0, False: 3.35k]
  ------------------
 3819|      0|  case CURL_SSLVERSION_SSLv3:
  ------------------
  |  | 2395|      0|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (3819:3): [True: 0, False: 3.35k]
  ------------------
 3820|      0|    return CURLE_NOT_BUILT_IN;
 3821|       |
 3822|       |    /* "--tlsv<x.y>" options mean TLS >= version <x.y> */
 3823|      7|  case CURL_SSLVERSION_TLSv1:   /* TLS >= version 1.0 */
  ------------------
  |  | 2393|      7|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3823:3): [True: 7, False: 3.35k]
  ------------------
 3824|     16|  case CURL_SSLVERSION_TLSv1_0: /* TLS >= version 1.0 */
  ------------------
  |  | 2396|     16|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3824:3): [True: 9, False: 3.34k]
  ------------------
 3825|     67|  case CURL_SSLVERSION_TLSv1_1: /* TLS >= version 1.1 */
  ------------------
  |  | 2397|     67|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3825:3): [True: 51, False: 3.30k]
  ------------------
 3826|  3.35k|  case CURL_SSLVERSION_TLSv1_2: /* TLS >= version 1.2 */
  ------------------
  |  | 2398|  3.35k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3826:3): [True: 3.28k, False: 74]
  ------------------
 3827|  3.35k|  case CURL_SSLVERSION_TLSv1_3: /* TLS >= version 1.3 */
  ------------------
  |  | 2399|  3.35k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3827:3): [True: 7, False: 3.35k]
  ------------------
 3828|       |    /* asking for any TLS version as the minimum, means no SSL versions
 3829|       |       allowed */
 3830|  3.35k|    ctx_options |= SSL_OP_NO_SSLv2;
 3831|  3.35k|    ctx_options |= SSL_OP_NO_SSLv3;
 3832|       |
 3833|  3.35k|    result = ossl_set_ssl_version_min_max(cf, octx->ssl_ctx, ssl_version_min);
 3834|  3.35k|    if(result)
  ------------------
  |  Branch (3834:8): [True: 0, False: 3.35k]
  ------------------
 3835|      0|      return result;
 3836|  3.35k|    break;
 3837|       |
 3838|  3.35k|  default:
  ------------------
  |  Branch (3838:3): [True: 0, False: 3.35k]
  ------------------
 3839|      0|    failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3840|      0|    return CURLE_SSL_CONNECT_ERROR;
 3841|  3.35k|  }
 3842|       |
 3843|  3.35k|  SSL_CTX_set_options(octx->ssl_ctx, ctx_options);
 3844|  3.35k|  SSL_CTX_set_read_ahead(octx->ssl_ctx, 1);
 3845|       |
 3846|       |  /* Max TLS1.2 record size 0x4000 + 0x800.
 3847|       |     OpenSSL supports processing "jumbo TLS record" (8 TLS records) in one go
 3848|       |     for some algorithms, so match that here.
 3849|       |     Experimentation shows that a slightly larger buffer is needed
 3850|       |     to avoid short reads.
 3851|       |
 3852|       |     However using a large buffer (8 packets) actually decreases performance.
 3853|       |     4 packets is better.
 3854|       |   */
 3855|  3.35k|#ifdef HAVE_SSL_CTX_SET_DEFAULT_READ_BUFFER_LEN
 3856|  3.35k|  SSL_CTX_set_default_read_buffer_len(octx->ssl_ctx, 0x401e * 4);
 3857|  3.35k|#endif
 3858|       |
 3859|       |  /* We do retry writes sometimes from another buffer address */
 3860|  3.35k|  SSL_CTX_set_mode(octx->ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
 3861|       |
 3862|  3.35k|  ciphers = conn_config->cipher_list;
 3863|  3.35k|  if(!ciphers && (peer->transport != TRNSPRT_QUIC))
  ------------------
  |  |  239|  2.50k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3863:6): [True: 2.50k, False: 856]
  |  Branch (3863:18): [True: 2.50k, False: 0]
  ------------------
 3864|  2.50k|    ciphers = NULL;
 3865|  3.35k|  if(ciphers && (ssl_version_min < CURL_SSLVERSION_TLSv1_3)) {
  ------------------
  |  | 2399|    856|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3865:6): [True: 856, False: 2.50k]
  |  Branch (3865:17): [True: 855, False: 1]
  ------------------
 3866|    855|    if(!SSL_CTX_set_cipher_list(octx->ssl_ctx, ciphers)) {
  ------------------
  |  Branch (3866:8): [True: 555, False: 300]
  ------------------
 3867|    555|      failf(data, "failed setting cipher list: %s", ciphers);
  ------------------
  |  |   62|    555|#define failf Curl_failf
  ------------------
 3868|    555|      return CURLE_SSL_CIPHER;
 3869|    555|    }
 3870|    300|    infof(data, "Cipher selection: %s", ciphers);
  ------------------
  |  |  143|    300|  do {                               \
  |  |  144|    300|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    300|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 300, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 300]
  |  |  |  |  ------------------
  |  |  |  |  323|    300|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    300|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    300|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 300]
  |  |  ------------------
  ------------------
 3871|    300|  }
 3872|       |
 3873|  2.80k|#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
 3874|  2.80k|  {
 3875|  2.80k|    const char *ciphers13 = conn_config->cipher_list13;
 3876|  2.80k|    if(ciphers13 &&
  ------------------
  |  Branch (3876:8): [True: 133, False: 2.66k]
  ------------------
 3877|    133|       (!conn_config->version_max ||
  ------------------
  |  Branch (3877:9): [True: 126, False: 7]
  ------------------
 3878|      7|        (conn_config->version_max == CURL_SSLVERSION_MAX_DEFAULT) ||
  ------------------
  |  | 2404|      7|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2393|      7|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (3878:9): [True: 1, False: 6]
  ------------------
 3879|    129|        (conn_config->version_max >= CURL_SSLVERSION_MAX_TLSv1_3))) {
  ------------------
  |  | 2408|      6|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2399|      6|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (3879:9): [True: 2, False: 4]
  ------------------
 3880|    129|      if(!SSL_CTX_set_ciphersuites(octx->ssl_ctx, ciphers13)) {
  ------------------
  |  Branch (3880:10): [True: 70, False: 59]
  ------------------
 3881|     70|        failf(data, "failed setting TLS 1.3 cipher suite: %s", ciphers13);
  ------------------
  |  |   62|     70|#define failf Curl_failf
  ------------------
 3882|     70|        return CURLE_SSL_CIPHER;
 3883|     70|      }
 3884|     59|      infof(data, "TLS 1.3 cipher selection: %s", ciphers13);
  ------------------
  |  |  143|     59|  do {                               \
  |  |  144|     59|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     59|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 59, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 59]
  |  |  |  |  ------------------
  |  |  |  |  323|     59|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     59|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     59|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 59]
  |  |  ------------------
  ------------------
 3885|     59|    }
 3886|  2.80k|  }
 3887|  2.73k|#endif
 3888|       |
 3889|  2.73k|  if(ssl_cert || ssl_cert_blob || ssl_cert_type) {
  ------------------
  |  Branch (3889:6): [True: 18, False: 2.71k]
  |  Branch (3889:18): [True: 0, False: 2.71k]
  |  Branch (3889:35): [True: 15, False: 2.69k]
  ------------------
 3890|     33|    result = client_cert(data, octx->ssl_ctx,
 3891|     33|                         ssl_cert, ssl_cert_blob, ssl_cert_type,
 3892|     33|                         ssl_config->primary.key, ssl_config->primary.key_blob,
 3893|     33|                         ssl_config->primary.key_type,
 3894|     33|                         ssl_config->primary.key_passwd);
 3895|     33|    if(result)
  ------------------
  |  Branch (3895:8): [True: 18, False: 15]
  ------------------
 3896|       |      /* failf() is already done in client_cert() */
 3897|     18|      return result;
 3898|     33|  }
 3899|       |
 3900|  2.71k|#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
 3901|       |  /* OpenSSL 1.1.1 requires clients to opt-in for PHA */
 3902|  2.71k|  SSL_CTX_set_post_handshake_auth(octx->ssl_ctx, 1);
 3903|  2.71k|#endif
 3904|       |
 3905|  2.71k|  {
 3906|  2.71k|    const char *curves = conn_config->curves;
 3907|  2.71k|    if(curves) {
  ------------------
  |  Branch (3907:8): [True: 669, False: 2.04k]
  ------------------
 3908|       |#ifdef HAVE_BORINGSSL_LIKE
 3909|       |#define OSSL_CURVE_CAST(x) (x)
 3910|       |#else
 3911|    669|#define OSSL_CURVE_CAST(x) (char *)CURL_UNCONST(x)
 3912|    669|#endif
 3913|    669|      if(!SSL_CTX_set1_curves_list(octx->ssl_ctx, OSSL_CURVE_CAST(curves))) {
  ------------------
  |  Branch (3913:10): [True: 128, False: 541]
  ------------------
 3914|    128|        failf(data, "failed setting curves list: '%s'", curves);
  ------------------
  |  |   62|    128|#define failf Curl_failf
  ------------------
 3915|    128|        return CURLE_SSL_CIPHER;
 3916|    128|      }
 3917|    669|    }
 3918|  2.71k|  }
 3919|       |
 3920|  2.58k|#ifdef HAVE_SSL_CTX_SET1_SIGALGS
 3921|  2.58k|#define OSSL_SIGALG_CAST(x) OSSL_CURVE_CAST(x)
 3922|  2.58k|  {
 3923|  2.58k|    const char *signature_algorithms = conn_config->signature_algorithms;
 3924|  2.58k|    if(signature_algorithms) {
  ------------------
  |  Branch (3924:8): [True: 0, False: 2.58k]
  ------------------
 3925|      0|      if(!SSL_CTX_set1_sigalgs_list(octx->ssl_ctx,
  ------------------
  |  Branch (3925:10): [True: 0, False: 0]
  ------------------
 3926|      0|                                    OSSL_SIGALG_CAST(signature_algorithms))) {
 3927|      0|        failf(data, "failed setting signature algorithms: '%s'",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3928|      0|              signature_algorithms);
 3929|      0|        return CURLE_SSL_CIPHER;
 3930|      0|      }
 3931|      0|    }
 3932|  2.58k|  }
 3933|  2.58k|#endif
 3934|       |
 3935|       |  /* OpenSSL always tries to verify the peer. By setting the failure mode
 3936|       |   * to NONE, we allow the connect to complete, regardless of the outcome.
 3937|       |   * We then explicitly check the result and may try alternatives like
 3938|       |   * Apple's SecTrust for verification. */
 3939|  2.58k|  SSL_CTX_set_verify(octx->ssl_ctx, SSL_VERIFY_NONE, NULL);
 3940|       |
 3941|       |  /* Enable logging of secrets to the file specified in env SSLKEYLOGFILE. */
 3942|  2.58k|#if !defined(HAVE_KEYLOG_UPSTREAM) && defined(HAVE_KEYLOG_CALLBACK)
 3943|  2.58k|  if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (3943:6): [True: 0, False: 2.58k]
  ------------------
 3944|      0|    SSL_CTX_set_keylog_callback(octx->ssl_ctx, ossl_keylog_callback);
 3945|      0|  }
 3946|  2.58k|#endif
 3947|       |
 3948|  2.58k|  if(cb_new_session) {
  ------------------
  |  Branch (3948:6): [True: 2.58k, False: 0]
  ------------------
 3949|       |    /* Enable the session cache because it is a prerequisite for the
 3950|       |     * "new session" callback. Use the "external storage" mode to prevent
 3951|       |     * OpenSSL from creating an internal session cache.
 3952|       |     */
 3953|  2.58k|    SSL_CTX_set_session_cache_mode(octx->ssl_ctx,
 3954|  2.58k|                                   SSL_SESS_CACHE_CLIENT |
 3955|  2.58k|                                   SSL_SESS_CACHE_NO_INTERNAL);
 3956|  2.58k|    SSL_CTX_sess_set_new_cb(octx->ssl_ctx, cb_new_session);
 3957|  2.58k|  }
 3958|       |
 3959|       |  /* give application a chance to interfere with SSL set up. */
 3960|  2.58k|  if(data->set.ssl.fsslctx) {
  ------------------
  |  Branch (3960:6): [True: 0, False: 2.58k]
  ------------------
 3961|      0|    struct Curl_mapi_guard guard;
 3962|       |    /* When a user callback is installed to modify the SSL_CTX,
 3963|       |     * we need to do the full initialization before calling it.
 3964|       |     * See: #11800 */
 3965|      0|    if(!octx->x509_store_setup) {
  ------------------
  |  Branch (3965:8): [True: 0, False: 0]
  ------------------
 3966|      0|      result = Curl_ssl_setup_x509_store(cf, data, octx);
 3967|      0|      if(result)
  ------------------
  |  Branch (3967:10): [True: 0, False: 0]
  ------------------
 3968|      0|        return result;
 3969|      0|      octx->x509_store_setup = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 3970|      0|    }
 3971|      0|    CURL_CBAPI_START(&guard, data, easy_fsslctx);
  ------------------
  |  |  195|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
 3972|      0|    result = (*data->set.ssl.fsslctx)(data, octx->ssl_ctx,
 3973|      0|                                      data->set.ssl.fsslctxp);
 3974|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  199|      0|  Curl_cbapi_leave(g)
  ------------------
 3975|      0|    if(result) {
  ------------------
  |  Branch (3975:8): [True: 0, False: 0]
  ------------------
 3976|      0|      failf(data, "error signaled by SSL ctx callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3977|      0|      return result;
 3978|      0|    }
 3979|      0|  }
 3980|       |
 3981|  2.58k|  return ossl_init_ssl(octx, cf, data, peer, alpns_requested,
 3982|  2.58k|                       ssl_user_data, sess_reuse_cb);
 3983|  2.58k|}
Curl_ossl_version:
 5421|  4.17k|{
 5422|       |#ifdef LIBRESSL_VERSION_NUMBER
 5423|       |  char *p;
 5424|       |  size_t count;
 5425|       |  const char *ver = OpenSSL_version(OPENSSL_VERSION);
 5426|       |  static const char expected[] = OSSL_PACKAGE " "; /* ie "LibreSSL " */
 5427|       |  if(curl_strnequal(ver, expected, CURL_CSTRLEN(expected))) {
 5428|       |    ver += CURL_CSTRLEN(expected);
 5429|       |  }
 5430|       |  count = curl_msnprintf(buffer, size, "%s/%s", OSSL_PACKAGE, ver);
 5431|       |  for(p = buffer; *p; ++p) {
 5432|       |    if(ISBLANK(*p))
 5433|       |      *p = '_';
 5434|       |  }
 5435|       |  return count;
 5436|       |#elif defined(OPENSSL_IS_AWSLC)
 5437|       |  return curl_msnprintf(buffer, size, "%s/%s",
 5438|       |                        OSSL_PACKAGE, AWSLC_VERSION_NUMBER_STRING);
 5439|       |#elif defined(OPENSSL_IS_BORINGSSL)
 5440|       |#ifdef CURL_BORINGSSL_VERSION
 5441|       |  return curl_msnprintf(buffer, size, "%s/%s",
 5442|       |                        OSSL_PACKAGE, CURL_BORINGSSL_VERSION);
 5443|       |#else
 5444|       |  return curl_msnprintf(buffer, size, OSSL_PACKAGE);
 5445|       |#endif
 5446|       |#else /* OpenSSL 3+ */
 5447|  4.17k|  return curl_msnprintf(buffer, size, "%s/%s",
 5448|  4.17k|                        OSSL_PACKAGE, OpenSSL_version(OPENSSL_VERSION_STRING));
  ------------------
  |  |  163|  4.17k|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 5449|  4.17k|#endif
 5450|  4.17k|}
openssl.c:ossl_get_cached_x509_store:
 3225|  4.58k|{
 3226|  4.58k|  struct Curl_multi *multi = data->multi;
 3227|  4.58k|  struct ossl_x509_share *share;
 3228|  4.58k|  X509_STORE *store = NULL;
 3229|       |
 3230|  4.58k|  DEBUGASSERT(multi);
  ------------------
  |  | 1079|  4.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3230:3): [True: 0, False: 4.58k]
  |  Branch (3230:3): [True: 4.58k, False: 0]
  ------------------
 3231|  4.58k|  *pempty = TRUE;
  ------------------
  |  | 1053|  4.58k|#define TRUE true
  ------------------
 3232|  4.58k|  share = multi ? Curl_hash_pick(&multi->proto_hash,
  ------------------
  |  Branch (3232:11): [True: 4.58k, False: 0]
  ------------------
 3233|  4.58k|                                 CURL_UNCONST(MPROTO_OSSL_X509_KEY),
  ------------------
  |  |  864|  4.58k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3234|  4.58k|                                 CURL_CSTRLEN(MPROTO_OSSL_X509_KEY)) : NULL;
  ------------------
  |  | 1296|  4.58k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
 3235|  4.58k|  if(share && share->store &&
  ------------------
  |  Branch (3235:6): [True: 0, False: 4.58k]
  |  Branch (3235:15): [True: 0, False: 0]
  ------------------
 3236|      0|     !ossl_cached_x509_store_expired(data, share) &&
  ------------------
  |  Branch (3236:6): [True: 0, False: 0]
  ------------------
 3237|      0|     !ossl_cached_x509_store_different(cf, data, share)) {
  ------------------
  |  Branch (3237:6): [True: 0, False: 0]
  ------------------
 3238|      0|    store = share->store;
 3239|      0|    *pempty = (bool)share->store_is_empty;
 3240|      0|  }
 3241|       |
 3242|  4.58k|  return store;
 3243|  4.58k|}
openssl.c:ossl_populate_x509_store:
 3110|  4.58k|{
 3111|  4.58k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3112|  4.58k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3113|  4.58k|  CURLcode result = CURLE_OK;
 3114|  4.58k|  X509_LOOKUP *lookup = NULL;
 3115|  4.58k|  const char * const ssl_crlfile = ssl_config->primary.CRLfile;
 3116|  4.58k|  unsigned long x509flags = 0;
 3117|       |
 3118|  4.58k|  CURL_TRC_CF(data, cf, "configuring OpenSSL's x509 trust store");
  ------------------
  |  |  153|  4.58k|  do {                                          \
  |  |  154|  4.58k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  4.58k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  9.16k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 4.58k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 4.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  9.16k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  4.58k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  4.58k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.58k]
  |  |  ------------------
  ------------------
 3119|  4.58k|  if(!store)
  ------------------
  |  Branch (3119:6): [True: 0, False: 4.58k]
  ------------------
 3120|      0|    return CURLE_OUT_OF_MEMORY;
 3121|       |
 3122|  4.58k|  if(!conn_config->verifypeer) {
  ------------------
  |  Branch (3122:6): [True: 58, False: 4.52k]
  ------------------
 3123|     58|    infof(data, "SSL Trust: peer verification disabled");
  ------------------
  |  |  143|     58|  do {                               \
  |  |  144|     58|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     58|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 58, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 58]
  |  |  |  |  ------------------
  |  |  |  |  323|     58|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     58|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     58|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 58]
  |  |  ------------------
  ------------------
 3124|     58|    return CURLE_OK;
 3125|     58|  }
 3126|       |
 3127|  4.52k|  infof(data, "SSL Trust Anchors:");
  ------------------
  |  |  143|  4.52k|  do {                               \
  |  |  144|  4.52k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  4.52k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 4.52k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 4.52k]
  |  |  |  |  ------------------
  |  |  |  |  323|  4.52k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  4.52k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  4.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 4.52k]
  |  |  ------------------
  ------------------
 3128|  4.52k|  result = ossl_load_trust_anchors(cf, data, octx, store);
 3129|  4.52k|  if(result)
  ------------------
  |  Branch (3129:6): [True: 364, False: 4.16k]
  ------------------
 3130|    364|    return result;
 3131|       |
 3132|       |  /* Does not make sense to load a CRL file without peer verification */
 3133|  4.16k|  if(ssl_crlfile) {
  ------------------
  |  Branch (3133:6): [True: 3.73k, False: 429]
  ------------------
 3134|       |    /* tell OpenSSL where to find CRL file that is used to check certificate
 3135|       |     * revocation */
 3136|  3.73k|    lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
 3137|  3.73k|    if(!lookup ||
  ------------------
  |  Branch (3137:8): [True: 0, False: 3.73k]
  ------------------
 3138|  3.73k|       (!X509_load_crl_file(lookup, ssl_crlfile, X509_FILETYPE_PEM))) {
  ------------------
  |  Branch (3138:8): [True: 3.73k, False: 0]
  ------------------
 3139|  3.73k|      failf(data, "error loading CRL file: %s", ssl_crlfile);
  ------------------
  |  |   62|  3.73k|#define failf Curl_failf
  ------------------
 3140|  3.73k|      return CURLE_SSL_CRL_BADFILE;
 3141|  3.73k|    }
 3142|      0|    x509flags = X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL;
 3143|      0|    infof(data, " CRLfile: %s", ssl_crlfile);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3144|      0|  }
 3145|       |
 3146|       |  /* Try building a chain using issuers in the trusted store first to avoid
 3147|       |     problems with server-sent legacy intermediates. Newer versions of
 3148|       |     OpenSSL do alternate chain checking by default but we do not know how to
 3149|       |     determine that in a reliable manner.
 3150|       |     https://web.archive.org/web/20190422050538/rt.openssl.org/Ticket/Display.html?id=3621
 3151|       |   */
 3152|    429|  x509flags |= X509_V_FLAG_TRUSTED_FIRST;
 3153|       |
 3154|    429|  if(!ssl_config->no_partialchain && !ssl_crlfile) {
  ------------------
  |  Branch (3154:6): [True: 428, False: 1]
  |  Branch (3154:38): [True: 428, False: 0]
  ------------------
 3155|       |    /* Have intermediate certificates in the trust store be treated as
 3156|       |       trust-anchors, in the same way as self-signed root CA certificates are.
 3157|       |       This allows users to verify servers using the intermediate cert only,
 3158|       |       instead of needing the whole chain.
 3159|       |
 3160|       |       Due to OpenSSL bug https://github.com/openssl/openssl/issues/5081 we
 3161|       |       cannot do partial chains with a CRL check. */
 3162|    428|    x509flags |= X509_V_FLAG_PARTIAL_CHAIN;
 3163|    428|  }
 3164|    429|  (void)X509_STORE_set_flags(store, x509flags);
 3165|       |
 3166|    429|  return result;
 3167|  4.16k|}
openssl.c:ossl_load_trust_anchors:
 2999|  4.52k|{
 3000|  4.52k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3001|  4.52k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3002|  4.52k|  CURLcode result = CURLE_OK;
 3003|  4.52k|  const char * const ssl_cafile =
 3004|       |    /* CURLOPT_CAINFO_BLOB overrides CURLOPT_CAINFO */
 3005|  4.52k|    (conn_config->ca_info_blob ? NULL : conn_config->CAfile);
  ------------------
  |  Branch (3005:6): [True: 0, False: 4.52k]
  ------------------
 3006|  4.52k|  const char * const ssl_capath = conn_config->CApath;
 3007|  4.52k|  bool have_native_check = FALSE;
  ------------------
  |  | 1056|  4.52k|#define FALSE false
  ------------------
 3008|       |
 3009|  4.52k|  octx->store_is_empty = TRUE;
  ------------------
  |  | 1053|  4.52k|#define TRUE true
  ------------------
 3010|  4.52k|  if(ssl_config->native_ca_store) {
  ------------------
  |  Branch (3010:6): [True: 5, False: 4.51k]
  ------------------
 3011|       |#ifdef USE_WIN32_CRYPTO
 3012|       |    bool added = FALSE;
 3013|       |    result = ossl_windows_load_anchors(cf, data, store, &added);
 3014|       |    if(result)
 3015|       |      return result;
 3016|       |    if(added) {
 3017|       |      infof(data, "  Native: Windows System Stores ROOT+CA");
 3018|       |      octx->store_is_empty = FALSE;
 3019|       |    }
 3020|       |#elif defined(USE_APPLE_SECTRUST)
 3021|       |    infof(data, "  Native: Apple SecTrust");
 3022|       |    have_native_check = TRUE;
 3023|       |#endif
 3024|      5|  }
 3025|       |
 3026|  4.52k|  if(conn_config->ca_info_blob) {
  ------------------
  |  Branch (3026:6): [True: 0, False: 4.52k]
  ------------------
 3027|      0|    result = load_cacert_from_memory(store, conn_config->ca_info_blob);
 3028|      0|    if(result) {
  ------------------
  |  Branch (3028:8): [True: 0, False: 0]
  ------------------
 3029|      0|      failf(data, "error adding trust anchors from certificate blob: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3030|      0|            (int)result);
 3031|      0|      return result;
 3032|      0|    }
 3033|      0|    infof(data, "  CA Blob from configuration");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3034|      0|    octx->store_is_empty = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 3035|      0|  }
 3036|       |
 3037|  4.52k|  if(ssl_cafile || ssl_capath) {
  ------------------
  |  Branch (3037:6): [True: 4.52k, False: 0]
  |  Branch (3037:20): [True: 0, False: 0]
  ------------------
 3038|  4.52k|#ifdef HAVE_OPENSSL3
 3039|       |    /* OpenSSL 3.0.0 has deprecated SSL_CTX_load_verify_locations */
 3040|  4.52k|    if(ssl_cafile) {
  ------------------
  |  Branch (3040:8): [True: 4.52k, False: 0]
  ------------------
 3041|  4.52k|      if(!X509_STORE_load_file(store, ssl_cafile)) {
  ------------------
  |  Branch (3041:10): [True: 364, False: 4.16k]
  ------------------
 3042|    364|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3042:12): [True: 364, False: 0]
  |  Branch (3042:36): [True: 364, False: 0]
  ------------------
 3043|       |          /* Fail if we insist on successfully verifying the server. */
 3044|    364|          failf(data, "error adding trust anchors from file: %s", ssl_cafile);
  ------------------
  |  |   62|    364|#define failf Curl_failf
  ------------------
 3045|    364|          return CURLE_SSL_CACERT_BADFILE;
 3046|    364|        }
 3047|      0|        else
 3048|      0|          infof(data, "error setting certificate file, continuing anyway");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3049|    364|      }
 3050|  4.16k|      infof(data, "  CAfile: %s", ssl_cafile);
  ------------------
  |  |  143|  4.16k|  do {                               \
  |  |  144|  4.16k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  4.16k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 4.16k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 4.16k]
  |  |  |  |  ------------------
  |  |  |  |  323|  4.16k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  4.16k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  4.16k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 4.16k]
  |  |  ------------------
  ------------------
 3051|  4.16k|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1056|  4.16k|#define FALSE false
  ------------------
 3052|  4.16k|    }
 3053|  4.16k|    if(ssl_capath) {
  ------------------
  |  Branch (3053:8): [True: 4.16k, False: 0]
  ------------------
 3054|  4.16k|      if(!X509_STORE_load_path(store, ssl_capath)) {
  ------------------
  |  Branch (3054:10): [True: 9, False: 4.15k]
  ------------------
 3055|      9|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3055:12): [True: 0, False: 9]
  |  Branch (3055:36): [True: 0, False: 0]
  ------------------
 3056|       |          /* Fail if we insist on successfully verifying the server. */
 3057|      0|          failf(data, "error adding trust anchors from path: %s", ssl_capath);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3058|      0|          return CURLE_SSL_CACERT_BADFILE;
 3059|      0|        }
 3060|      9|        else
 3061|      9|          infof(data, "error setting certificate path, continuing anyway");
  ------------------
  |  |  143|      9|  do {                               \
  |  |  144|      9|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      9|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 9, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 9]
  |  |  |  |  ------------------
  |  |  |  |  323|      9|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      9|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      9|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 9]
  |  |  ------------------
  ------------------
 3062|      9|      }
 3063|  4.16k|      infof(data, "  CApath: %s", ssl_capath);
  ------------------
  |  |  143|  4.16k|  do {                               \
  |  |  144|  4.16k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  4.16k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 4.16k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 4.16k]
  |  |  |  |  ------------------
  |  |  |  |  323|  4.16k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  4.16k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  4.16k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 4.16k]
  |  |  ------------------
  ------------------
 3064|  4.16k|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1056|  4.16k|#define FALSE false
  ------------------
 3065|  4.16k|    }
 3066|       |#else
 3067|       |    /* tell OpenSSL where to find CA certificates that are used to verify the
 3068|       |       server's certificate. */
 3069|       |    if(!X509_STORE_load_locations(store, ssl_cafile, ssl_capath)) {
 3070|       |      if(octx->store_is_empty && !have_native_check) {
 3071|       |        /* Fail if we insist on successfully verifying the server. */
 3072|       |        failf(data, "error adding trust anchors from locations:"
 3073|       |              "  CAfile: %s CApath: %s",
 3074|       |              ssl_cafile ? ssl_cafile : "none",
 3075|       |              ssl_capath ? ssl_capath : "none");
 3076|       |        return CURLE_SSL_CACERT_BADFILE;
 3077|       |      }
 3078|       |      else {
 3079|       |        infof(data, "error setting certificate verify locations,"
 3080|       |              " continuing anyway");
 3081|       |      }
 3082|       |    }
 3083|       |    if(ssl_cafile)
 3084|       |      infof(data, "  CAfile: %s", ssl_cafile);
 3085|       |    if(ssl_capath)
 3086|       |      infof(data, "  CApath: %s", ssl_capath);
 3087|       |    octx->store_is_empty = FALSE;
 3088|       |#endif
 3089|  4.16k|  }
 3090|       |
 3091|       |#ifdef CURL_CA_FALLBACK
 3092|       |  if(octx->store_is_empty) {
 3093|       |    /* verifying the peer without any CA certificates does not
 3094|       |       work so use OpenSSL's built-in default as fallback */
 3095|       |    X509_STORE_set_default_paths(store);
 3096|       |    infof(data, "  OpenSSL default paths (fallback)");
 3097|       |    octx->store_is_empty = FALSE;
 3098|       |  }
 3099|       |#endif
 3100|  4.16k|  if(octx->store_is_empty && !have_native_check)
  ------------------
  |  Branch (3100:6): [True: 0, False: 4.16k]
  |  Branch (3100:30): [True: 0, False: 0]
  ------------------
 3101|      0|    infof(data, "  no trust anchors configured");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3102|       |
 3103|  4.16k|  return result;
 3104|  4.52k|}
openssl.c:ossl_seed:
  801|  7.58k|{
  802|       |  /* This might get called before it has been added to a multi handle */
  803|  7.58k|  if(data->multi && data->multi->ssl_seeded)
  ------------------
  |  Branch (803:6): [True: 3.51k, False: 4.07k]
  |  Branch (803:21): [True: 33, False: 3.48k]
  ------------------
  804|     33|    return CURLE_OK;
  805|       |
  806|  7.55k|  if(rand_enough()) {
  ------------------
  |  Branch (806:6): [True: 7.55k, False: 0]
  ------------------
  807|       |    /* OpenSSL 1.1.0+ should return here */
  808|  7.55k|    if(data->multi)
  ------------------
  |  Branch (808:8): [True: 3.48k, False: 4.07k]
  ------------------
  809|  3.48k|      data->multi->ssl_seeded = TRUE;
  ------------------
  |  | 1053|  3.48k|#define TRUE true
  ------------------
  810|  7.55k|    return CURLE_OK;
  811|  7.55k|  }
  812|      0|  failf(data, "Insufficient randomness");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  813|      0|  return CURLE_SSL_CONNECT_ERROR;
  814|  7.55k|}
openssl.c:rand_enough:
  796|  7.55k|{
  797|  7.55k|  return RAND_status() != 0;
  798|  7.55k|}
openssl.c:ossl_init_method:
 3659|  3.47k|{
 3660|  3.47k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3661|       |
 3662|  3.47k|  *pmethod = NULL;
 3663|  3.47k|  *pssl_version_min = conn_config->version;
 3664|  3.47k|  DEBUGASSERT(conn_config->version != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3664:3): [True: 0, False: 3.47k]
  |  Branch (3664:3): [True: 3.47k, False: 0]
  ------------------
 3665|  3.47k|  switch(peer->transport) {
 3666|  3.47k|  case TRNSPRT_TCP:
  ------------------
  |  |  237|  3.47k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (3666:3): [True: 3.47k, False: 0]
  ------------------
 3667|       |    /* check to see if we have been told to use an explicit SSL/TLS version */
 3668|  3.47k|    switch(*pssl_version_min) {
 3669|      7|    case CURL_SSLVERSION_TLSv1:
  ------------------
  |  | 2393|      7|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3669:5): [True: 7, False: 3.46k]
  ------------------
 3670|     16|    case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2396|     16|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3670:5): [True: 9, False: 3.46k]
  ------------------
 3671|     67|    case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2397|     67|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3671:5): [True: 51, False: 3.41k]
  ------------------
 3672|  3.46k|    case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2398|  3.46k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3672:5): [True: 3.39k, False: 74]
  ------------------
 3673|  3.47k|    case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2399|  3.47k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3673:5): [True: 7, False: 3.46k]
  ------------------
 3674|       |      /* it is handled later with the context options */
 3675|  3.47k|      *pmethod = TLS_client_method();
 3676|  3.47k|      break;
 3677|      0|    case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2394|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3677:5): [True: 0, False: 3.47k]
  ------------------
 3678|      0|      failf(data, "No SSLv2 support");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3679|      0|      return CURLE_NOT_BUILT_IN;
 3680|      0|    case CURL_SSLVERSION_SSLv3:
  ------------------
  |  | 2395|      0|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (3680:5): [True: 0, False: 3.47k]
  ------------------
 3681|      0|      failf(data, "No SSLv3 support");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3682|      0|      return CURLE_NOT_BUILT_IN;
 3683|      0|    default:
  ------------------
  |  Branch (3683:5): [True: 0, False: 3.47k]
  ------------------
 3684|      0|      failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3685|      0|      return CURLE_SSL_CONNECT_ERROR;
 3686|  3.47k|    }
 3687|  3.47k|    break;
 3688|  3.47k|  case TRNSPRT_QUIC:
  ------------------
  |  |  239|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3688:3): [True: 0, False: 3.47k]
  ------------------
 3689|      0|    *pssl_version_min = CURL_SSLVERSION_TLSv1_3;
  ------------------
  |  | 2399|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
 3690|      0|    if(conn_config->version_max &&
  ------------------
  |  Branch (3690:8): [True: 0, False: 0]
  ------------------
 3691|      0|       (conn_config->version_max != CURL_SSLVERSION_MAX_DEFAULT) &&
  ------------------
  |  | 2404|      0|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2393|      0|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (3691:8): [True: 0, False: 0]
  ------------------
 3692|      0|       (conn_config->version_max != CURL_SSLVERSION_MAX_TLSv1_3)) {
  ------------------
  |  | 2408|      0|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2399|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (3692:8): [True: 0, False: 0]
  ------------------
 3693|      0|      failf(data, "QUIC needs at least TLS version 1.3");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3694|      0|      return CURLE_SSL_CONNECT_ERROR;
 3695|      0|    }
 3696|       |
 3697|      0|    *pmethod = TLS_method();
 3698|      0|    break;
 3699|      0|  default:
  ------------------
  |  Branch (3699:3): [True: 0, False: 3.47k]
  ------------------
 3700|      0|    failf(data, "unsupported transport %d in SSL init", peer->transport);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3701|      0|    return CURLE_SSL_CONNECT_ERROR;
 3702|  3.47k|  }
 3703|       |
 3704|  3.47k|  return *pmethod ? CURLE_OK : CURLE_SSL_CONNECT_ERROR;
  ------------------
  |  Branch (3704:10): [True: 3.47k, False: 0]
  ------------------
 3705|  3.47k|}
openssl.c:ossl_strerror:
  749|    698|{
  750|    698|  size_t len;
  751|    698|  DEBUGASSERT(size);
  ------------------
  |  | 1079|    698|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (751:3): [True: 0, False: 698]
  |  Branch (751:3): [True: 698, False: 0]
  ------------------
  752|    698|  *buf = '\0';
  753|       |
  754|    698|  len = Curl_ossl_version(buf, size);
  755|    698|  DEBUGASSERT(len < (size - 2));
  ------------------
  |  | 1079|    698|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (755:3): [True: 0, False: 698]
  |  Branch (755:3): [True: 698, False: 0]
  ------------------
  756|    698|  if(len < (size - 2)) {
  ------------------
  |  Branch (756:6): [True: 698, False: 0]
  ------------------
  757|    698|    buf += len;
  758|    698|    size -= (len + 2);
  759|    698|    *buf++ = ':';
  760|    698|    *buf++ = ' ';
  761|    698|    *buf = '\0';
  762|    698|  }
  763|       |
  764|       |#ifdef HAVE_BORINGSSL_LIKE
  765|       |  ERR_error_string_n((uint32_t)error, buf, size);
  766|       |#else
  767|    698|  ERR_error_string_n(error, buf, size);
  768|    698|#endif
  769|       |
  770|    698|  if(!*buf) {
  ------------------
  |  Branch (770:6): [True: 0, False: 698]
  ------------------
  771|      0|    const char *msg = error ? "Unknown error" : "No error";
  ------------------
  |  Branch (771:23): [True: 0, False: 0]
  ------------------
  772|      0|    curlx_strcopy(buf, size, msg, strlen(msg));
  773|      0|  }
  774|       |
  775|    698|  return buf;
  776|    698|}
openssl.c:ossl_set_ssl_version_min_max:
 2566|  3.35k|{
 2567|  3.35k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 2568|       |  /* first, TLS min version... */
 2569|  3.35k|  long curl_ssl_version_min = (long)ssl_version_min;
 2570|  3.35k|  long curl_ssl_version_max;
 2571|       |
 2572|       |  /* convert curl min SSL version option to OpenSSL constant */
 2573|       |#if defined(HAVE_BORINGSSL_LIKE) || defined(LIBRESSL_VERSION_NUMBER)
 2574|       |  uint16_t ossl_ssl_version_min = 0;
 2575|       |  uint16_t ossl_ssl_version_max = 0;
 2576|       |#else
 2577|  3.35k|  long ossl_ssl_version_min = 0;
 2578|  3.35k|  long ossl_ssl_version_max = 0;
 2579|  3.35k|#endif
 2580|       |  /* it cannot be default here */
 2581|  3.35k|  DEBUGASSERT(curl_ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1079|  3.35k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2581:3): [True: 0, False: 3.35k]
  |  Branch (2581:3): [True: 3.35k, False: 0]
  ------------------
 2582|  3.35k|  switch(curl_ssl_version_min) {
  ------------------
  |  Branch (2582:10): [True: 3.35k, False: 0]
  ------------------
 2583|      7|  case CURL_SSLVERSION_TLSv1: /* TLS 1.x */
  ------------------
  |  | 2393|      7|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (2583:3): [True: 7, False: 3.35k]
  ------------------
 2584|     16|  case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2396|     16|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (2584:3): [True: 9, False: 3.34k]
  ------------------
 2585|     16|    ossl_ssl_version_min = TLS1_VERSION;
 2586|     16|    break;
 2587|     51|  case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2397|     51|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (2587:3): [True: 51, False: 3.30k]
  ------------------
 2588|     51|    ossl_ssl_version_min = TLS1_1_VERSION;
 2589|     51|    break;
 2590|  3.28k|  case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2398|  3.28k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (2590:3): [True: 3.28k, False: 74]
  ------------------
 2591|  3.28k|    ossl_ssl_version_min = TLS1_2_VERSION;
 2592|  3.28k|    break;
 2593|      7|  case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2399|      7|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (2593:3): [True: 7, False: 3.35k]
  ------------------
 2594|      7|    ossl_ssl_version_min = TLS1_3_VERSION;
 2595|      7|    break;
 2596|  3.35k|  }
 2597|       |
 2598|       |  /* ... then, TLS max version */
 2599|  3.35k|  curl_ssl_version_max = (long)conn_config->version_max;
 2600|       |
 2601|       |  /* convert curl max SSL version option to OpenSSL constant */
 2602|  3.35k|  switch(curl_ssl_version_max) {
 2603|      5|  case CURL_SSLVERSION_MAX_TLSv1_0:
  ------------------
  |  | 2405|      5|#define CURL_SSLVERSION_MAX_TLSv1_0 (CURL_SSLVERSION_TLSv1_0 << 16)
  |  |  ------------------
  |  |  |  | 2396|      5|#define CURL_SSLVERSION_TLSv1_0 4L
  |  |  ------------------
  ------------------
  |  Branch (2603:3): [True: 5, False: 3.35k]
  ------------------
 2604|      5|    ossl_ssl_version_max = TLS1_VERSION;
 2605|      5|    break;
 2606|      8|  case CURL_SSLVERSION_MAX_TLSv1_1:
  ------------------
  |  | 2406|      8|#define CURL_SSLVERSION_MAX_TLSv1_1 (CURL_SSLVERSION_TLSv1_1 << 16)
  |  |  ------------------
  |  |  |  | 2397|      8|#define CURL_SSLVERSION_TLSv1_1 5L
  |  |  ------------------
  ------------------
  |  Branch (2606:3): [True: 8, False: 3.34k]
  ------------------
 2607|      8|    ossl_ssl_version_max = TLS1_1_VERSION;
 2608|      8|    break;
 2609|     59|  case CURL_SSLVERSION_MAX_TLSv1_2:
  ------------------
  |  | 2407|     59|#define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
  |  |  ------------------
  |  |  |  | 2398|     59|#define CURL_SSLVERSION_TLSv1_2 6L
  |  |  ------------------
  ------------------
  |  Branch (2609:3): [True: 59, False: 3.29k]
  ------------------
 2610|     59|    ossl_ssl_version_max = TLS1_2_VERSION;
 2611|     59|    break;
 2612|      7|  case CURL_SSLVERSION_MAX_TLSv1_3:
  ------------------
  |  | 2408|      7|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2399|      7|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (2612:3): [True: 7, False: 3.35k]
  ------------------
 2613|      7|    ossl_ssl_version_max = TLS1_3_VERSION;
 2614|      7|    break;
 2615|  3.27k|  case CURL_SSLVERSION_MAX_NONE:  /* none selected */
  ------------------
  |  | 2403|  3.27k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (2615:3): [True: 3.27k, False: 82]
  ------------------
 2616|  3.27k|  case CURL_SSLVERSION_MAX_DEFAULT:  /* max selected */
  ------------------
  |  | 2404|  3.27k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2393|  3.27k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (2616:3): [True: 2, False: 3.35k]
  ------------------
 2617|  3.27k|  default:
  ------------------
  |  Branch (2617:3): [True: 1, False: 3.35k]
  ------------------
 2618|       |    /* SSL_CTX_set_max_proto_version states that: setting the maximum to 0
 2619|       |       enables protocol versions up to the highest version supported by
 2620|       |       the library */
 2621|  3.27k|    ossl_ssl_version_max = 0;
 2622|  3.27k|    break;
 2623|  3.35k|  }
 2624|       |
 2625|  3.35k|  if(!SSL_CTX_set_min_proto_version(ctx, ossl_ssl_version_min) ||
  ------------------
  |  Branch (2625:6): [True: 0, False: 3.35k]
  ------------------
 2626|  3.35k|     !SSL_CTX_set_max_proto_version(ctx, ossl_ssl_version_max))
  ------------------
  |  Branch (2626:6): [True: 0, False: 3.35k]
  ------------------
 2627|      0|    return CURLE_SSL_CONNECT_ERROR;
 2628|       |
 2629|  3.35k|  return CURLE_OK;
 2630|  3.35k|}
openssl.c:client_cert:
 1431|     33|{
 1432|     33|  char error_buffer[256];
 1433|     33|  bool check_privkey = TRUE;
  ------------------
  |  | 1053|     33|#define TRUE true
  ------------------
 1434|     33|  int file_type = ossl_do_file_type(cert_type);
 1435|       |
 1436|     33|  if(cert_file || cert_blob || (file_type == SSL_FILETYPE_ENGINE) ||
  ------------------
  |  |  817|     15|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1436:6): [True: 18, False: 15]
  |  Branch (1436:19): [True: 0, False: 15]
  |  Branch (1436:32): [True: 0, False: 15]
  ------------------
 1437|     18|     (file_type == SSL_FILETYPE_PROVIDER)) {
  ------------------
  |  |  823|     15|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  |  Branch (1437:6): [True: 0, False: 15]
  ------------------
 1438|     18|    SSL *ssl;
 1439|     18|    X509 *x509;
 1440|     18|    bool pcks12_done = FALSE;
  ------------------
  |  | 1056|     18|#define FALSE false
  ------------------
 1441|     18|    int cert_use_result;
 1442|       |
 1443|     18|    if(key_passwd) {
  ------------------
  |  Branch (1443:8): [True: 1, False: 17]
  ------------------
 1444|       |      /* set the password in the callback userdata */
 1445|      1|      SSL_CTX_set_default_passwd_cb_userdata(ctx, key_passwd);
 1446|       |      /* Set passwd callback: */
 1447|      1|      SSL_CTX_set_default_passwd_cb(ctx, passwd_callback);
 1448|      1|    }
 1449|       |
 1450|     18|    switch(file_type) {
 1451|     15|    case SSL_FILETYPE_PEM:
  ------------------
  |  Branch (1451:5): [True: 15, False: 3]
  ------------------
 1452|       |      /* SSL_CTX_use_certificate_chain_file() only works on PEM files */
 1453|     15|      cert_use_result = cert_blob ?
  ------------------
  |  Branch (1453:25): [True: 0, False: 15]
  ------------------
 1454|      0|        use_certificate_chain_blob(ctx, cert_blob, key_passwd) :
 1455|     15|        SSL_CTX_use_certificate_chain_file(ctx, cert_file);
 1456|     15|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1456:10): [True: 15, False: 0]
  ------------------
 1457|     15|        failf(data,
  ------------------
  |  |   62|     15|#define failf Curl_failf
  ------------------
 1458|     15|              "could not load PEM client certificate from %s, " OSSL_PACKAGE
 1459|     15|              " error %s, "
 1460|     15|              "(no key found, wrong passphrase, or wrong file format?)",
 1461|     15|              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
  ------------------
  |  Branch (1461:16): [True: 0, False: 15]
  ------------------
 1462|     15|              ossl_strerror(ERR_get_error(), error_buffer,
 1463|     15|                            sizeof(error_buffer)));
 1464|     15|        return CURLE_SSL_CERTPROBLEM;
 1465|     15|      }
 1466|      0|      break;
 1467|       |
 1468|      1|    case SSL_FILETYPE_ASN1:
  ------------------
  |  Branch (1468:5): [True: 1, False: 17]
  ------------------
 1469|       |      /* SSL_CTX_use_certificate_file() works with either PEM or ASN1, but
 1470|       |         we use the case above for PEM so this can only be performed with
 1471|       |         ASN1 files. */
 1472|       |
 1473|      1|      cert_use_result = cert_blob ?
  ------------------
  |  Branch (1473:25): [True: 0, False: 1]
  ------------------
 1474|      0|        use_certificate_blob(ctx, cert_blob, file_type, key_passwd) :
 1475|      1|      SSL_CTX_use_certificate_file(ctx, cert_file, file_type);
 1476|      1|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1476:10): [True: 1, False: 0]
  ------------------
 1477|      1|        failf(data,
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1478|      1|              "could not load ASN1 client certificate from %s, " OSSL_PACKAGE
 1479|      1|              " error %s, "
 1480|      1|              "(no key found, wrong passphrase, or wrong file format?)",
 1481|      1|              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
  ------------------
  |  Branch (1481:16): [True: 0, False: 1]
  ------------------
 1482|      1|              ossl_strerror(ERR_get_error(), error_buffer,
 1483|      1|                            sizeof(error_buffer)));
 1484|      1|        return CURLE_SSL_CERTPROBLEM;
 1485|      1|      }
 1486|      0|      break;
 1487|       |
 1488|      0|    case SSL_FILETYPE_ENGINE:
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1488:5): [True: 0, False: 18]
  ------------------
 1489|      0|      if(!cert_file || !engineload(data, ctx, cert_file))
  ------------------
  |  Branch (1489:10): [True: 0, False: 0]
  |  Branch (1489:24): [True: 0, False: 0]
  ------------------
 1490|      0|        return CURLE_SSL_CERTPROBLEM;
 1491|      0|      break;
 1492|       |
 1493|      0|    case SSL_FILETYPE_PROVIDER:
  ------------------
  |  |  823|      0|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  |  Branch (1493:5): [True: 0, False: 18]
  ------------------
 1494|      0|      if(!cert_file || !providerload(data, ctx, cert_file))
  ------------------
  |  Branch (1494:10): [True: 0, False: 0]
  |  Branch (1494:24): [True: 0, False: 0]
  ------------------
 1495|      0|        return CURLE_SSL_CERTPROBLEM;
 1496|      0|      break;
 1497|       |
 1498|      0|    case SSL_FILETYPE_PKCS12:
  ------------------
  |  |  820|      0|#define SSL_FILETYPE_PKCS12 43
  ------------------
  |  Branch (1498:5): [True: 0, False: 18]
  ------------------
 1499|      0|      if(!pkcs12load(data, ctx, cert_blob, cert_file, key_passwd))
  ------------------
  |  Branch (1499:10): [True: 0, False: 0]
  ------------------
 1500|      0|        return CURLE_SSL_CERTPROBLEM;
 1501|      0|      pcks12_done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1502|      0|      break;
 1503|       |
 1504|      2|    default:
  ------------------
  |  Branch (1504:5): [True: 2, False: 16]
  ------------------
 1505|      2|      failf(data, "not supported file type '%s' for certificate", cert_type);
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
 1506|      2|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1507|     18|    }
 1508|       |
 1509|      0|    if(!key_file && !key_blob) {
  ------------------
  |  Branch (1509:8): [True: 0, False: 0]
  |  Branch (1509:21): [True: 0, False: 0]
  ------------------
 1510|      0|      key_file = cert_file;
 1511|      0|      key_blob = cert_blob;
 1512|      0|    }
 1513|      0|    else
 1514|      0|      file_type = ossl_do_file_type(key_type);
 1515|       |
 1516|      0|    switch(file_type) {
 1517|      0|    case SSL_FILETYPE_PEM:
  ------------------
  |  Branch (1517:5): [True: 0, False: 0]
  ------------------
 1518|      0|    case SSL_FILETYPE_ASN1:
  ------------------
  |  Branch (1518:5): [True: 0, False: 0]
  ------------------
 1519|      0|      cert_use_result = key_blob ?
  ------------------
  |  Branch (1519:25): [True: 0, False: 0]
  ------------------
 1520|      0|        use_privatekey_blob(ctx, key_blob, file_type, key_passwd) :
 1521|      0|      SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type);
 1522|      0|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1522:10): [True: 0, False: 0]
  ------------------
 1523|      0|        failf(data, "unable to set private key file: '%s' type %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1524|      0|              key_file ? key_file : "(memory blob)",
  ------------------
  |  Branch (1524:15): [True: 0, False: 0]
  ------------------
 1525|      0|              key_type ? key_type : "PEM");
  ------------------
  |  Branch (1525:15): [True: 0, False: 0]
  ------------------
 1526|      0|        return CURLE_BAD_FUNCTION_ARGUMENT;
 1527|      0|      }
 1528|      0|      break;
 1529|      0|    case SSL_FILETYPE_ENGINE:
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1529:5): [True: 0, False: 0]
  ------------------
 1530|      0|      if(!enginecheck(data, ctx, key_file, key_passwd))
  ------------------
  |  Branch (1530:10): [True: 0, False: 0]
  ------------------
 1531|      0|        return CURLE_SSL_CERTPROBLEM;
 1532|      0|      break;
 1533|       |
 1534|      0|    case SSL_FILETYPE_PROVIDER:
  ------------------
  |  |  823|      0|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  |  Branch (1534:5): [True: 0, False: 0]
  ------------------
 1535|      0|      if(!providercheck(data, ctx, key_file))
  ------------------
  |  Branch (1535:10): [True: 0, False: 0]
  ------------------
 1536|      0|        return CURLE_SSL_CERTPROBLEM;
 1537|      0|      break;
 1538|       |
 1539|      0|    case SSL_FILETYPE_PKCS12:
  ------------------
  |  |  820|      0|#define SSL_FILETYPE_PKCS12 43
  ------------------
  |  Branch (1539:5): [True: 0, False: 0]
  ------------------
 1540|      0|      if(!pcks12_done) {
  ------------------
  |  Branch (1540:10): [True: 0, False: 0]
  ------------------
 1541|      0|        failf(data, "file type P12 for private key not supported");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1542|      0|        return CURLE_SSL_CERTPROBLEM;
 1543|      0|      }
 1544|      0|      break;
 1545|      0|    default:
  ------------------
  |  Branch (1545:5): [True: 0, False: 0]
  ------------------
 1546|      0|      failf(data, "not supported file type for private key");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1547|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1548|      0|    }
 1549|       |
 1550|      0|    ssl = SSL_new(ctx);
 1551|      0|    if(!ssl) {
  ------------------
  |  Branch (1551:8): [True: 0, False: 0]
  ------------------
 1552|      0|      failf(data, "unable to create an SSL structure");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1553|      0|      return CURLE_OUT_OF_MEMORY;
 1554|      0|    }
 1555|       |
 1556|      0|    x509 = SSL_get_certificate(ssl);
 1557|       |
 1558|      0|    if(x509) {
  ------------------
  |  Branch (1558:8): [True: 0, False: 0]
  ------------------
 1559|      0|      EVP_PKEY *pktmp = X509_get_pubkey(x509);
 1560|      0|      EVP_PKEY_copy_parameters(pktmp, SSL_get_privatekey(ssl));
 1561|      0|      EVP_PKEY_free(pktmp);
 1562|      0|    }
 1563|       |
 1564|      0|#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
 1565|      0|    {
 1566|       |      /* If RSA is used, do not check the private key if its flags indicate
 1567|       |       * it does not support it. */
 1568|      0|      EVP_PKEY *priv_key = SSL_get_privatekey(ssl);
 1569|      0|      if(EVP_PKEY_id(priv_key) == EVP_PKEY_RSA) {
  ------------------
  |  Branch (1569:10): [True: 0, False: 0]
  ------------------
 1570|      0|        RSA *rsa = EVP_PKEY_get1_RSA(priv_key);
 1571|      0|        if(RSA_flags(rsa) & RSA_METHOD_FLAG_NO_CHECK)
  ------------------
  |  Branch (1571:12): [True: 0, False: 0]
  ------------------
 1572|      0|          check_privkey = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
 1573|      0|        RSA_free(rsa); /* Decrement reference count */
 1574|      0|      }
 1575|      0|    }
 1576|      0|#endif
 1577|       |
 1578|      0|    SSL_free(ssl);
 1579|       |
 1580|       |    /* If we are using DSA, we can copy the parameters from
 1581|       |     * the private key */
 1582|       |
 1583|      0|    if(check_privkey == TRUE) {
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  |  Branch (1583:8): [True: 0, False: 0]
  ------------------
 1584|       |      /* Now we know that a key and cert have been set against
 1585|       |       * the SSL context */
 1586|      0|      if(!SSL_CTX_check_private_key(ctx)) {
  ------------------
  |  Branch (1586:10): [True: 0, False: 0]
  ------------------
 1587|      0|        failf(data, "Private key does not match the certificate public key");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1588|      0|        return CURLE_SSL_CERTPROBLEM;
 1589|      0|      }
 1590|      0|    }
 1591|      0|  }
 1592|     15|  return CURLE_OK;
 1593|     33|}
openssl.c:ossl_do_file_type:
  826|     33|{
  827|     33|  if(!type || !type[0])
  ------------------
  |  Branch (827:6): [True: 15, False: 18]
  |  Branch (827:15): [True: 1, False: 17]
  ------------------
  828|     16|    return SSL_FILETYPE_PEM;
  829|     17|  if(curl_strequal(type, "PEM"))
  ------------------
  |  Branch (829:6): [True: 0, False: 17]
  ------------------
  830|      0|    return SSL_FILETYPE_PEM;
  831|     17|  if(curl_strequal(type, "DER"))
  ------------------
  |  Branch (831:6): [True: 2, False: 15]
  ------------------
  832|      2|    return SSL_FILETYPE_ASN1;
  833|     15|  if(curl_strequal(type, "PROV"))
  ------------------
  |  Branch (833:6): [True: 0, False: 15]
  ------------------
  834|      0|    return SSL_FILETYPE_PROVIDER;
  ------------------
  |  |  823|      0|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  835|     15|  if(curl_strequal(type, "ENG"))
  ------------------
  |  Branch (835:6): [True: 0, False: 15]
  ------------------
  836|      0|    return SSL_FILETYPE_ENGINE;
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  837|     15|  if(curl_strequal(type, "P12"))
  ------------------
  |  Branch (837:6): [True: 0, False: 15]
  ------------------
  838|      0|    return SSL_FILETYPE_PKCS12;
  ------------------
  |  |  820|      0|#define SSL_FILETYPE_PKCS12 43
  ------------------
  839|     15|  return -1;
  840|     15|}
openssl.c:ossl_set_provider:
 1768|    810|{
 1769|    810|  char name[MAX_PROVIDER_LEN + 1];
 1770|    810|  struct Curl_str prov;
 1771|    810|  const char *propq = NULL;
 1772|       |
 1773|    810|  if(!iname) {
  ------------------
  |  Branch (1773:6): [True: 0, False: 810]
  ------------------
 1774|       |    /* clear and cleanup provider use */
 1775|      0|    ossl_provider_cleanup(data);
 1776|      0|    return CURLE_OK;
 1777|      0|  }
 1778|    810|  if(curlx_str_until(&iname, &prov, MAX_PROVIDER_LEN, ':'))
  ------------------
  |  | 1757|    810|#define MAX_PROVIDER_LEN 128 /* reasonable */
  ------------------
  |  Branch (1778:6): [True: 2, False: 808]
  ------------------
 1779|      2|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1780|       |
 1781|    808|  if(!curlx_str_single(&iname, ':'))
  ------------------
  |  Branch (1781:6): [True: 684, False: 124]
  ------------------
 1782|       |    /* there was a colon, get the propq until the end of string */
 1783|    684|    propq = iname;
 1784|       |
 1785|       |  /* we need the name in a buffer, null-terminated */
 1786|    808|  memcpy(name, curlx_str(&prov), curlx_strlen(&prov));
  ------------------
  |  |   49|    808|#define curlx_str(x)    ((x)->str)
  ------------------
                memcpy(name, curlx_str(&prov), curlx_strlen(&prov));
  ------------------
  |  |   50|    808|#define curlx_strlen(x) ((x)->len)
  ------------------
 1787|    808|  name[curlx_strlen(&prov)] = 0;
  ------------------
  |  |   50|    808|#define curlx_strlen(x) ((x)->len)
  ------------------
 1788|       |
 1789|    808|  if(!data->state.libctx) {
  ------------------
  |  Branch (1789:6): [True: 808, False: 0]
  ------------------
 1790|    808|    OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new();
 1791|    808|    if(!libctx)
  ------------------
  |  Branch (1791:8): [True: 0, False: 808]
  ------------------
 1792|      0|      return CURLE_OUT_OF_MEMORY;
 1793|    808|    if(propq) {
  ------------------
  |  Branch (1793:8): [True: 684, False: 124]
  ------------------
 1794|    684|      data->state.propq = curlx_strdup(propq);
  ------------------
  |  | 1472|    684|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1795|    684|      if(!data->state.propq) {
  ------------------
  |  Branch (1795:10): [True: 0, False: 684]
  ------------------
 1796|      0|        OSSL_LIB_CTX_free(libctx);
 1797|      0|        return CURLE_OUT_OF_MEMORY;
 1798|      0|      }
 1799|    684|    }
 1800|    808|    data->state.libctx = libctx;
 1801|    808|  }
 1802|       |
 1803|    808|#ifndef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
 1804|       |  /* load the configuration file into the library context before checking the
 1805|       |   * provider availability */
 1806|    808|  if(!OSSL_LIB_CTX_load_config(data->state.libctx, NULL)) {
  ------------------
  |  Branch (1806:6): [True: 808, False: 0]
  ------------------
 1807|    808|    infof(data, "Failed to load default openssl config. Proceeding.");
  ------------------
  |  |  143|    808|  do {                               \
  |  |  144|    808|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    808|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 808, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 808]
  |  |  |  |  ------------------
  |  |  |  |  323|    808|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    808|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    808|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 808]
  |  |  ------------------
  ------------------
 1808|    808|  }
 1809|    808|#endif
 1810|       |
 1811|    808|  if(OSSL_PROVIDER_available(data->state.libctx, name)) {
  ------------------
  |  Branch (1811:6): [True: 48, False: 760]
  ------------------
 1812|       |    /* already loaded through the configuration - no action needed */
 1813|     48|    data->state.provider_loaded = TRUE;
  ------------------
  |  | 1053|     48|#define TRUE true
  ------------------
 1814|     48|    return CURLE_OK;
 1815|     48|  }
 1816|       |
 1817|    760|  data->state.provider = OSSL_PROVIDER_try_load(data->state.libctx, name, 1);
 1818|    760|  if(!data->state.provider) {
  ------------------
  |  Branch (1818:6): [True: 92, False: 668]
  ------------------
 1819|     92|    char error_buffer[256];
 1820|     92|    failf(data, "Failed to initialize provider: %s",
  ------------------
  |  |   62|     92|#define failf Curl_failf
  ------------------
 1821|     92|          ossl_strerror(ERR_get_error(), error_buffer, sizeof(error_buffer)));
 1822|     92|    ossl_provider_cleanup(data);
 1823|     92|    return CURLE_SSL_ENGINE_NOTFOUND;
 1824|     92|  }
 1825|       |
 1826|       |  /* load the base provider as well */
 1827|    668|  data->state.baseprov = OSSL_PROVIDER_try_load(data->state.libctx, "base", 1);
 1828|    668|  if(!data->state.baseprov) {
  ------------------
  |  Branch (1828:6): [True: 0, False: 668]
  ------------------
 1829|      0|    ossl_provider_cleanup(data);
 1830|      0|    failf(data, "Failed to load base");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1831|      0|    return CURLE_SSL_ENGINE_NOTFOUND;
 1832|      0|  }
 1833|    668|  else
 1834|    668|    data->state.provider_loaded = TRUE;
  ------------------
  |  | 1053|    668|#define TRUE true
  ------------------
 1835|    668|  return CURLE_OK;
 1836|    668|}
openssl.c:ossl_provider_cleanup:
 1742|  26.3k|{
 1743|  26.3k|  if(data->state.baseprov) {
  ------------------
  |  Branch (1743:6): [True: 668, False: 25.6k]
  ------------------
 1744|    668|    OSSL_PROVIDER_unload(data->state.baseprov);
 1745|    668|    data->state.baseprov = NULL;
 1746|    668|  }
 1747|  26.3k|  if(data->state.provider) {
  ------------------
  |  Branch (1747:6): [True: 668, False: 25.6k]
  ------------------
 1748|    668|    OSSL_PROVIDER_unload(data->state.provider);
 1749|    668|    data->state.provider = NULL;
 1750|    668|  }
 1751|  26.3k|  OSSL_LIB_CTX_free(data->state.libctx);
 1752|  26.3k|  data->state.libctx = NULL;
 1753|  26.3k|  curlx_safefree(data->state.propq);
  ------------------
  |  | 1336|  26.3k|  do {                      \
  |  | 1337|  26.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  26.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  26.3k|    (ptr) = NULL;           \
  |  | 1339|  26.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 26.3k]
  |  |  ------------------
  ------------------
 1754|       |  data->state.provider_loaded = FALSE;
  ------------------
  |  | 1056|  26.3k|#define FALSE false
  ------------------
 1755|  26.3k|}
openssl.c:ossl_init_ssl:
 3616|  2.58k|{
 3617|       |  /* Let's make an SSL structure */
 3618|  2.58k|  if(octx->ssl)
  ------------------
  |  Branch (3618:6): [True: 0, False: 2.58k]
  ------------------
 3619|      0|    SSL_free(octx->ssl);
 3620|  2.58k|  octx->ssl = SSL_new(octx->ssl_ctx);
 3621|  2.58k|  if(!octx->ssl) {
  ------------------
  |  Branch (3621:6): [True: 0, False: 2.58k]
  ------------------
 3622|      0|    failf(data, "SSL: could not create a context (handle)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3623|      0|    return CURLE_OUT_OF_MEMORY;
 3624|      0|  }
 3625|       |
 3626|  2.58k|  SSL_set_app_data(octx->ssl, ssl_user_data);
 3627|       |
 3628|  2.58k|#ifndef OPENSSL_NO_OCSP
 3629|  2.58k|  if(Curl_ssl_cf_get_primary_config(cf)->verifystatus)
  ------------------
  |  Branch (3629:6): [True: 1, False: 2.58k]
  ------------------
 3630|  2.58k|    SSL_set_tlsext_status_type(octx->ssl, TLSEXT_STATUSTYPE_ocsp);
 3631|  2.58k|#endif
 3632|       |
 3633|  2.58k|  SSL_set_connect_state(octx->ssl);
 3634|       |
 3635|  2.58k|  if(peer->sni) {
  ------------------
  |  Branch (3635:6): [True: 1.05k, False: 1.53k]
  ------------------
 3636|  1.05k|    if(!SSL_set_tlsext_host_name(octx->ssl, peer->sni)) {
  ------------------
  |  Branch (3636:8): [True: 1, False: 1.05k]
  ------------------
 3637|      1|      failf(data, "Failed set SNI");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 3638|      1|      return CURLE_SSL_CONNECT_ERROR;
 3639|      1|    }
 3640|  1.05k|  }
 3641|       |
 3642|       |#ifdef HAVE_SSL_SET1_ECH_CONFIG_LIST
 3643|       |  {
 3644|       |    CURLcode result = ossl_init_ech(octx, cf, data, peer);
 3645|       |    if(result)
 3646|       |      return result;
 3647|       |  }
 3648|       |#endif /* HAVE_SSL_SET1_ECH_CONFIG_LIST */
 3649|       |
 3650|  2.58k|  return ossl_init_session_and_alpns(octx, cf, data, peer,
 3651|  2.58k|                                     alpns_requested, sess_reuse_cb);
 3652|  2.58k|}
openssl.c:ossl_init_session_and_alpns:
 3424|  2.58k|{
 3425|  2.58k|  struct ssl_primary_config *conn_cfg = Curl_ssl_cf_get_primary_config(cf);
 3426|  2.58k|  struct alpn_spec alpns;
 3427|  2.58k|  CURLcode result;
 3428|       |
 3429|  2.58k|  Curl_alpn_copy(&alpns, alpns_requested);
 3430|       |
 3431|  2.58k|  octx->reused_session = FALSE;
  ------------------
  |  | 1056|  2.58k|#define FALSE false
  ------------------
 3432|       |
 3433|  2.58k|  if((cf->sockindex == SECONDARYSOCKET) && !(cf->cft->flags & CF_TYPE_PROXY)) {
  ------------------
  |  |  234|  2.58k|#define SECONDARYSOCKET 1
  ------------------
                if((cf->sockindex == SECONDARYSOCKET) && !(cf->cft->flags & CF_TYPE_PROXY)) {
  ------------------
  |  |  205|      0|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (3433:6): [True: 0, False: 2.58k]
  |  Branch (3433:44): [True: 0, False: 0]
  ------------------
 3434|       |    /* FTP is a bitch. On TLS secured transfers, it is a common server
 3435|       |     * option to require the client to use the SAME TLS session as on
 3436|       |     * the control connection or it fails the request. See #22225. */
 3437|      0|    struct Curl_ssl_session *scs =
 3438|      0|      Curl_ssl_get_cf_session(data, cf->cft, FIRSTSOCKET);
  ------------------
  |  |  233|      0|#define FIRSTSOCKET     0
  ------------------
 3439|      0|    if(scs) {
  ------------------
  |  Branch (3439:8): [True: 0, False: 0]
  ------------------
 3440|      0|      if(ossl_apply_session(octx, cf, data, &alpns, sess_reuse_cb, scs))
  ------------------
  |  Branch (3440:10): [True: 0, False: 0]
  ------------------
 3441|      0|        CURL_TRC_CF(data, cf, "applied SSL session from control connection");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3442|      0|    }
 3443|      0|  }
 3444|       |
 3445|  2.58k|  if(!octx->reused_session &&
  ------------------
  |  Branch (3445:6): [True: 2.58k, False: 0]
  ------------------
 3446|  2.58k|     Curl_ssl_scache_use(cf, data) && !conn_cfg->verifystatus) {
  ------------------
  |  Branch (3446:6): [True: 2.58k, False: 1]
  |  Branch (3446:39): [True: 2.58k, False: 1]
  ------------------
 3447|  2.58k|    struct Curl_ssl_session *scs = NULL;
 3448|       |
 3449|  2.58k|    result = Curl_ssl_scache_take(cf, data, peer->scache_key, &scs);
 3450|  2.58k|    if(!result && scs && scs->sdata && scs->sdata_len) {
  ------------------
  |  Branch (3450:8): [True: 2.58k, False: 0]
  |  Branch (3450:19): [True: 0, False: 2.58k]
  |  Branch (3450:26): [True: 0, False: 0]
  |  Branch (3450:40): [True: 0, False: 0]
  ------------------
 3451|      0|      (void)ossl_apply_session(octx, cf, data, &alpns, sess_reuse_cb, scs);
 3452|      0|    }
 3453|  2.58k|    Curl_ssl_scache_return(cf, data, peer->scache_key, scs);
 3454|  2.58k|  }
 3455|       |
 3456|  2.58k|  if(alpns.count) {
  ------------------
  |  Branch (3456:6): [True: 2.57k, False: 9]
  ------------------
 3457|  2.57k|    struct alpn_proto_buf proto;
 3458|  2.57k|    memset(&proto, 0, sizeof(proto));
 3459|  2.57k|    result = Curl_alpn_to_proto_buf(&proto, &alpns);
 3460|  2.57k|    if(result) {
  ------------------
  |  Branch (3460:8): [True: 0, False: 2.57k]
  ------------------
 3461|      0|      failf(data, "Error determining ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3462|      0|      return CURLE_SSL_CONNECT_ERROR;
 3463|      0|    }
 3464|  2.57k|    if(SSL_set_alpn_protos(octx->ssl, proto.data, proto.len)) {
  ------------------
  |  Branch (3464:8): [True: 0, False: 2.57k]
  ------------------
 3465|      0|      failf(data, "Error setting ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3466|      0|      return CURLE_SSL_CONNECT_ERROR;
 3467|      0|    }
 3468|  2.57k|  }
 3469|       |
 3470|  2.58k|  return CURLE_OK;
 3471|  2.58k|}
openssl.c:ossl_init:
 1626|      1|{
 1627|      1|  const uint64_t flags =
 1628|      1|#ifdef OPENSSL_INIT_ENGINE_ALL_BUILTIN
 1629|       |    /* not present in BoringSSL */
 1630|      1|    OPENSSL_INIT_ENGINE_ALL_BUILTIN |
 1631|      1|#endif
 1632|       |#ifdef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
 1633|       |    OPENSSL_INIT_NO_LOAD_CONFIG |
 1634|       |#else
 1635|      1|    OPENSSL_INIT_LOAD_CONFIG |
 1636|      1|#endif
 1637|      1|    0;
 1638|      1|  OPENSSL_init_ssl(flags, NULL);
 1639|       |
 1640|      1|#ifndef HAVE_KEYLOG_UPSTREAM
 1641|      1|  Curl_tls_keylog_open();
 1642|      1|#endif
 1643|       |
 1644|      1|  return 1;
 1645|      1|}
openssl.c:SSL_ERROR_to_str:
  709|      1|{
  710|      1|  switch(err) {
  711|      0|  case SSL_ERROR_NONE:
  ------------------
  |  Branch (711:3): [True: 0, False: 1]
  ------------------
  712|      0|    return "SSL_ERROR_NONE";
  713|      0|  case SSL_ERROR_SSL:
  ------------------
  |  Branch (713:3): [True: 0, False: 1]
  ------------------
  714|      0|    return "SSL_ERROR_SSL";
  715|      0|  case SSL_ERROR_WANT_READ:
  ------------------
  |  Branch (715:3): [True: 0, False: 1]
  ------------------
  716|      0|    return "SSL_ERROR_WANT_READ";
  717|      0|  case SSL_ERROR_WANT_WRITE:
  ------------------
  |  Branch (717:3): [True: 0, False: 1]
  ------------------
  718|      0|    return "SSL_ERROR_WANT_WRITE";
  719|      0|  case SSL_ERROR_WANT_X509_LOOKUP:
  ------------------
  |  Branch (719:3): [True: 0, False: 1]
  ------------------
  720|      0|    return "SSL_ERROR_WANT_X509_LOOKUP";
  721|      0|  case SSL_ERROR_SYSCALL:
  ------------------
  |  Branch (721:3): [True: 0, False: 1]
  ------------------
  722|      0|    return "SSL_ERROR_SYSCALL";
  723|      1|  case SSL_ERROR_ZERO_RETURN:
  ------------------
  |  Branch (723:3): [True: 1, False: 0]
  ------------------
  724|      1|    return "SSL_ERROR_ZERO_RETURN";
  725|      0|  case SSL_ERROR_WANT_CONNECT:
  ------------------
  |  Branch (725:3): [True: 0, False: 1]
  ------------------
  726|      0|    return "SSL_ERROR_WANT_CONNECT";
  727|      0|  case SSL_ERROR_WANT_ACCEPT:
  ------------------
  |  Branch (727:3): [True: 0, False: 1]
  ------------------
  728|      0|    return "SSL_ERROR_WANT_ACCEPT";
  729|      0|#ifdef SSL_ERROR_WANT_ASYNC  /* OpenSSL 1.1.0+, LibreSSL 3.6.0+ */
  730|      0|  case SSL_ERROR_WANT_ASYNC:
  ------------------
  |  Branch (730:3): [True: 0, False: 1]
  ------------------
  731|      0|    return "SSL_ERROR_WANT_ASYNC";
  732|      0|#endif
  733|      0|#ifdef SSL_ERROR_WANT_ASYNC_JOB  /* OpenSSL 1.1.0+, LibreSSL 3.6.0+ */
  734|      0|  case SSL_ERROR_WANT_ASYNC_JOB:
  ------------------
  |  Branch (734:3): [True: 0, False: 1]
  ------------------
  735|      0|    return "SSL_ERROR_WANT_ASYNC_JOB";
  736|      0|#endif
  737|      0|#ifdef SSL_ERROR_WANT_CLIENT_HELLO_CB  /* OpenSSL 1.1.1, LibreSSL 3.6.0+ */
  738|      0|  case SSL_ERROR_WANT_CLIENT_HELLO_CB:
  ------------------
  |  Branch (738:3): [True: 0, False: 1]
  ------------------
  739|      0|    return "SSL_ERROR_WANT_CLIENT_HELLO_CB";
  740|      0|#endif
  741|      0|  default:
  ------------------
  |  Branch (741:3): [True: 0, False: 1]
  ------------------
  742|      0|    return "SSL_ERROR unknown";
  743|      1|  }
  744|      1|}
openssl.c:ossl_random:
 5455|  4.11k|{
 5456|  4.11k|  int rc;
 5457|  4.11k|  if(data) {
  ------------------
  |  Branch (5457:6): [True: 4.11k, False: 0]
  ------------------
 5458|  4.11k|    if(ossl_seed(data)) /* Initiate the seed if not already done */
  ------------------
  |  Branch (5458:8): [True: 0, False: 4.11k]
  ------------------
 5459|      0|      return CURLE_FAILED_INIT; /* could not seed for some reason */
 5460|  4.11k|  }
 5461|      0|  else {
 5462|      0|    if(!rand_enough())
  ------------------
  |  Branch (5462:8): [True: 0, False: 0]
  ------------------
 5463|      0|      return CURLE_FAILED_INIT;
 5464|      0|  }
 5465|       |  /* RAND_bytes() returns 1 on success, 0 otherwise. */
 5466|  4.11k|  rc = RAND_bytes(entropy, (ossl_valsize_t)curlx_uztosi(length));
 5467|  4.11k|  return rc == 1 ? CURLE_OK : CURLE_FAILED_INIT;
  ------------------
  |  Branch (5467:10): [True: 4.11k, False: 0]
  ------------------
 5468|  4.11k|}
openssl.c:ossl_cert_status_request:
 5495|    796|{
 5496|    796|#ifndef OPENSSL_NO_OCSP
 5497|    796|  return TRUE;
  ------------------
  |  | 1053|    796|#define TRUE true
  ------------------
 5498|       |#else
 5499|       |  return FALSE;
 5500|       |#endif
 5501|    796|}
openssl.c:ossl_connect:
 4976|  3.94k|{
 4977|  3.94k|  CURLcode result = CURLE_OK;
 4978|  3.94k|  struct ssl_connect_data *connssl = cf->ctx;
 4979|       |
 4980|       |  /* check if the connection has already been established */
 4981|  3.94k|  if(ssl_connection_complete == connssl->state) {
  ------------------
  |  Branch (4981:6): [True: 0, False: 3.94k]
  ------------------
 4982|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 4983|      0|    return CURLE_OK;
 4984|      0|  }
 4985|       |
 4986|  3.94k|  *done = FALSE;
  ------------------
  |  | 1056|  3.94k|#define FALSE false
  ------------------
 4987|  3.94k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  3.94k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4988|       |
 4989|  3.94k|  if(connssl->connecting_state == ssl_connect_1) {
  ------------------
  |  Branch (4989:6): [True: 3.47k, False: 475]
  ------------------
 4990|  3.47k|    if(Curl_ossl_need_httpsrr(data) &&
  ------------------
  |  Branch (4990:8): [True: 0, False: 3.47k]
  ------------------
 4991|      0|       !Curl_conn_dns_resolved_https(data, cf->sockindex,
  ------------------
  |  |   66|      0|#define Curl_conn_dns_resolved_https(a, b, c)   TRUE
  |  |  ------------------
  |  |  |  | 1053|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (4991:8): [Folded, False: 0]
  ------------------
 4992|  3.47k|                                     connssl->peer.peer)) {
 4993|      0|      CURL_TRC_CF(data, cf, "need HTTPS-RR, delaying connect");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4994|      0|      return CURLE_OK;
 4995|      0|    }
 4996|  3.47k|    CURL_TRC_CF(data, cf, "ossl_connect, step1");
  ------------------
  |  |  153|  3.47k|  do {                                          \
  |  |  154|  3.47k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.47k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.94k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.47k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.94k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.47k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.47k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.47k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.47k]
  |  |  ------------------
  ------------------
 4997|  3.47k|    result = ossl_connect_step1(cf, data);
 4998|  3.47k|    if(result)
  ------------------
  |  Branch (4998:8): [True: 885, False: 2.58k]
  ------------------
 4999|    885|      goto out;
 5000|  3.47k|  }
 5001|       |
 5002|  3.06k|  if(connssl->connecting_state == ssl_connect_2) {
  ------------------
  |  Branch (5002:6): [True: 3.06k, False: 0]
  ------------------
 5003|  3.06k|    CURL_TRC_CF(data, cf, "ossl_connect, step2");
  ------------------
  |  |  153|  3.06k|  do {                                          \
  |  |  154|  3.06k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.06k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.12k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.06k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.12k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.06k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.06k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.06k]
  |  |  ------------------
  ------------------
 5004|  3.06k|#ifdef HAVE_OPENSSL_EARLYDATA
 5005|  3.06k|    if(connssl->earlydata_state == ssl_earlydata_await) {
  ------------------
  |  Branch (5005:8): [True: 0, False: 3.06k]
  ------------------
 5006|      0|      goto out;
 5007|      0|    }
 5008|  3.06k|    else if(connssl->earlydata_state == ssl_earlydata_sending) {
  ------------------
  |  Branch (5008:13): [True: 0, False: 3.06k]
  ------------------
 5009|      0|      result = ossl_send_earlydata(cf, data);
 5010|      0|      if(result)
  ------------------
  |  Branch (5010:10): [True: 0, False: 0]
  ------------------
 5011|      0|        goto out;
 5012|      0|      connssl->earlydata_state = ssl_earlydata_sent;
 5013|      0|    }
 5014|  3.06k|#endif
 5015|  3.06k|    DEBUGASSERT((connssl->earlydata_state == ssl_earlydata_none) ||
  ------------------
  |  | 1079|  3.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5015:5): [True: 3.06k, False: 0]
  |  Branch (5015:5): [True: 0, False: 0]
  |  Branch (5015:5): [True: 3.06k, False: 0]
  |  Branch (5015:5): [True: 0, False: 0]
  ------------------
 5016|  3.06k|                (connssl->earlydata_state == ssl_earlydata_sent));
 5017|       |
 5018|  3.06k|    result = ossl_connect_step2(cf, data);
 5019|  3.06k|    if(result)
  ------------------
  |  Branch (5019:8): [True: 3.06k, False: 0]
  ------------------
 5020|  3.06k|      goto out;
 5021|  3.06k|  }
 5022|       |
 5023|      0|  if(connssl->connecting_state == ssl_connect_3) {
  ------------------
  |  Branch (5023:6): [True: 0, False: 0]
  ------------------
 5024|      0|    CURL_TRC_CF(data, cf, "ossl_connect, step3");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5025|      0|    result = ossl_connect_step3(cf, data);
 5026|      0|    if(result)
  ------------------
  |  Branch (5026:8): [True: 0, False: 0]
  ------------------
 5027|      0|      goto out;
 5028|      0|    connssl->connecting_state = ssl_connect_done;
 5029|      0|#ifdef HAVE_OPENSSL_EARLYDATA
 5030|      0|    if(connssl->earlydata_state > ssl_earlydata_none) {
  ------------------
  |  Branch (5030:8): [True: 0, False: 0]
  ------------------
 5031|      0|      struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 5032|       |      /* We should be in this state by now */
 5033|      0|      DEBUGASSERT(connssl->earlydata_state == ssl_earlydata_sent);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5033:7): [True: 0, False: 0]
  |  Branch (5033:7): [True: 0, False: 0]
  ------------------
 5034|      0|      connssl->earlydata_state =
 5035|      0|        (SSL_get_early_data_status(octx->ssl) == SSL_EARLY_DATA_ACCEPTED) ?
  ------------------
  |  Branch (5035:9): [True: 0, False: 0]
  ------------------
 5036|      0|        ssl_earlydata_accepted : ssl_earlydata_rejected;
 5037|      0|    }
 5038|      0|#endif
 5039|      0|  }
 5040|       |
 5041|      0|  if(connssl->connecting_state == ssl_connect_done) {
  ------------------
  |  Branch (5041:6): [True: 0, False: 0]
  ------------------
 5042|      0|    CURL_TRC_CF(data, cf, "ossl_connect, done");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5043|      0|    connssl->state = ssl_connection_complete;
 5044|      0|  }
 5045|       |
 5046|  3.94k|out:
 5047|  3.94k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (5047:6): [True: 484, False: 3.46k]
  ------------------
 5048|    484|    *done = FALSE;
  ------------------
  |  | 1056|    484|#define FALSE false
  ------------------
 5049|    484|    return CURLE_OK;
 5050|    484|  }
 5051|  3.46k|  *done = ((connssl->state == ssl_connection_complete) ||
  ------------------
  |  Branch (5051:12): [True: 0, False: 3.46k]
  ------------------
 5052|  3.46k|           (connssl->state == ssl_connection_deferred));
  ------------------
  |  Branch (5052:12): [True: 0, False: 3.46k]
  ------------------
 5053|  3.46k|  return result;
 5054|  3.94k|}
openssl.c:ossl_connect_step1:
 4031|  3.47k|{
 4032|  3.47k|  struct ssl_connect_data *connssl = cf->ctx;
 4033|  3.47k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4034|  3.47k|  BIO *bio;
 4035|  3.47k|  CURLcode result;
 4036|       |
 4037|  3.47k|  DEBUGASSERT(connssl->connecting_state == ssl_connect_1);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4037:3): [True: 0, False: 3.47k]
  |  Branch (4037:3): [True: 3.47k, False: 0]
  ------------------
 4038|  3.47k|  DEBUGASSERT(octx);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4038:3): [True: 0, False: 3.47k]
  |  Branch (4038:3): [True: 3.47k, False: 0]
  ------------------
 4039|  3.47k|  DEBUGASSERT(connssl->peer.origin);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4039:3): [True: 0, False: 3.47k]
  |  Branch (4039:3): [True: 3.47k, False: 0]
  ------------------
 4040|       |
 4041|  3.47k|  result = Curl_ossl_ctx_init(octx, cf, data, &connssl->peer,
 4042|  3.47k|                              connssl->alpn, NULL, NULL,
 4043|  3.47k|                              ossl_new_session_cb, cf,
 4044|  3.47k|                              ossl_on_session_reuse);
 4045|  3.47k|  if(result)
  ------------------
  |  Branch (4045:6): [True: 885, False: 2.58k]
  ------------------
 4046|    885|    return result;
 4047|       |
 4048|  2.58k|  octx->bio_method = ossl_bio_cf_method_create();
 4049|  2.58k|  if(!octx->bio_method)
  ------------------
  |  Branch (4049:6): [True: 0, False: 2.58k]
  ------------------
 4050|      0|    return CURLE_OUT_OF_MEMORY;
 4051|  2.58k|  bio = BIO_new(octx->bio_method);
 4052|  2.58k|  if(!bio)
  ------------------
  |  Branch (4052:6): [True: 0, False: 2.58k]
  ------------------
 4053|      0|    return CURLE_OUT_OF_MEMORY;
 4054|       |
 4055|  2.58k|  BIO_set_data(bio, cf);
 4056|  2.58k|#ifdef HAVE_SSL_SET0_WBIO
 4057|       |  /* with OpenSSL v1.1.1 we get an alternative to SSL_set_bio() that works
 4058|       |   * without backward compat quirks. Every call takes one reference, so we
 4059|       |   * up it and pass. SSL* then owns and frees it.
 4060|       |   * We check on the function in configure, since LibreSSL and friends
 4061|       |   * each have their own versions to add support for this. */
 4062|  2.58k|  BIO_up_ref(bio);
 4063|  2.58k|  SSL_set0_rbio(octx->ssl, bio);
 4064|  2.58k|  SSL_set0_wbio(octx->ssl, bio);
 4065|       |#else
 4066|       |  SSL_set_bio(octx->ssl, bio, bio);
 4067|       |#endif
 4068|       |
 4069|  2.58k|  if(connssl->alpn && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (4069:6): [True: 2.57k, False: 9]
  |  Branch (4069:23): [True: 2.57k, False: 0]
  ------------------
 4070|  2.57k|    struct alpn_proto_buf proto;
 4071|  2.57k|    memset(&proto, 0, sizeof(proto));
 4072|  2.57k|    Curl_alpn_to_proto_str(&proto, connssl->alpn);
 4073|  2.57k|    infof(data, VTLS_INFOF_ALPN_OFFER_1STR, proto.data);
  ------------------
  |  |  143|  2.57k|  do {                               \
  |  |  144|  2.57k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  2.57k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 2.57k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.57k]
  |  |  |  |  ------------------
  |  |  |  |  323|  2.57k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.57k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.57k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.57k]
  |  |  ------------------
  ------------------
 4074|  2.57k|  }
 4075|       |
 4076|  2.58k|  connssl->connecting_state = ssl_connect_2;
 4077|  2.58k|  return CURLE_OK;
 4078|  2.58k|}
openssl.c:ossl_bio_cf_method_create:
  642|  2.58k|{
  643|  2.58k|  BIO_METHOD *m = BIO_meth_new(BIO_TYPE_MEM, "OpenSSL CF BIO");
  644|  2.58k|  if(m) {
  ------------------
  |  Branch (644:6): [True: 2.58k, False: 0]
  ------------------
  645|  2.58k|    BIO_meth_set_write(m, &ossl_bio_cf_out_write);
  646|  2.58k|    BIO_meth_set_read(m, &ossl_bio_cf_in_read);
  647|  2.58k|    BIO_meth_set_ctrl(m, &ossl_bio_cf_ctrl);
  648|  2.58k|    BIO_meth_set_create(m, &ossl_bio_cf_create);
  649|  2.58k|    BIO_meth_set_destroy(m, &ossl_bio_cf_destroy);
  650|  2.58k|  }
  651|  2.58k|  return m;
  652|  2.58k|}
openssl.c:ossl_bio_cf_out_write:
  568|  4.79k|{
  569|  4.79k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  570|  4.79k|  struct ssl_connect_data *connssl = cf->ctx;
  571|  4.79k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  572|  4.79k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  684|  4.79k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  221|  4.79k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (684:30): [True: 4.79k, False: 0]
  |  |  ------------------
  ------------------
  573|  4.79k|  size_t nwritten;
  574|  4.79k|  CURLcode result;
  575|       |
  576|  4.79k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  4.79k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:3): [True: 0, False: 4.79k]
  |  Branch (576:3): [True: 4.79k, False: 0]
  ------------------
  577|  4.79k|  if(blen < 0)
  ------------------
  |  Branch (577:6): [True: 0, False: 4.79k]
  ------------------
  578|      0|    return 0;
  579|       |
  580|  4.79k|  result = Curl_conn_cf_send(cf->next, data,
  581|  4.79k|                             (const uint8_t *)buf, (size_t)blen, FALSE,
  ------------------
  |  | 1056|  4.79k|#define FALSE false
  ------------------
  582|  4.79k|                             &nwritten);
  583|  4.79k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_out_write(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  4.79k|  do {                                          \
  |  |  154|  4.79k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  4.79k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  9.59k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 4.79k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 4.79k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  9.59k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  4.79k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  4.79k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.79k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.79k]
  |  |  ------------------
  ------------------
  584|  4.79k|              blen, (int)result, nwritten);
  585|  4.79k|  BIO_clear_retry_flags(bio);
  586|  4.79k|  octx->io_result = result;
  587|  4.79k|  if(result) {
  ------------------
  |  Branch (587:6): [True: 0, False: 4.79k]
  ------------------
  588|      0|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (588:8): [True: 0, False: 0]
  ------------------
  589|      0|      BIO_set_retry_write(bio);
  590|      0|    return -1;
  591|      0|  }
  592|  4.79k|  return (int)nwritten;
  593|  4.79k|}
openssl.c:ossl_bio_cf_in_read:
  596|  3.31k|{
  597|  3.31k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  598|  3.31k|  struct ssl_connect_data *connssl = cf->ctx;
  599|  3.31k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  600|  3.31k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  684|  3.31k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  221|  3.31k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (684:30): [True: 3.31k, False: 0]
  |  |  ------------------
  ------------------
  601|  3.31k|  size_t nread;
  602|  3.31k|  CURLcode result, r2;
  603|       |
  604|  3.31k|  DEBUGASSERT(data);
  ------------------
  |  | 1079|  3.31k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (604:3): [True: 0, False: 3.31k]
  |  Branch (604:3): [True: 3.31k, False: 0]
  ------------------
  605|       |  /* OpenSSL catches this case, so should we. */
  606|  3.31k|  if(!buf)
  ------------------
  |  Branch (606:6): [True: 0, False: 3.31k]
  ------------------
  607|      0|    return 0;
  608|  3.31k|  if(blen < 0)
  ------------------
  |  Branch (608:6): [True: 0, False: 3.31k]
  ------------------
  609|      0|    return 0;
  610|       |
  611|  3.31k|  result = Curl_conn_cf_recv(cf->next, data, buf, (size_t)blen, &nread);
  612|  3.31k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_in_read(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  3.31k|  do {                                          \
  |  |  154|  3.31k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.31k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.31k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.62k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.31k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.31k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  613|  3.31k|              blen, (int)result, nread);
  614|  3.31k|  BIO_clear_retry_flags(bio);
  615|  3.31k|  octx->io_result = result;
  616|  3.31k|  if(result) {
  ------------------
  |  Branch (616:6): [True: 496, False: 2.81k]
  ------------------
  617|    496|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (617:8): [True: 496, False: 0]
  ------------------
  618|    496|      BIO_set_retry_read(bio);
  619|    496|  }
  620|  2.81k|  else {
  621|       |    /* feeding data to OpenSSL means SSL_read() might succeed */
  622|  2.81k|    connssl->input_pending = TRUE;
  ------------------
  |  | 1053|  2.81k|#define TRUE true
  ------------------
  623|  2.81k|    if(nread == 0)
  ------------------
  |  Branch (623:8): [True: 2.05k, False: 759]
  ------------------
  624|  2.05k|      connssl->peer_closed = TRUE;
  ------------------
  |  | 1053|  2.05k|#define TRUE true
  ------------------
  625|  2.81k|  }
  626|       |
  627|       |  /* Before returning server replies to the SSL instance, we need
  628|       |   * to have setup the x509 store or verification fails. */
  629|  3.31k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (629:6): [True: 2.48k, False: 830]
  ------------------
  630|  2.48k|    r2 = Curl_ssl_setup_x509_store(cf, data, octx);
  631|  2.48k|    if(r2) {
  ------------------
  |  Branch (631:8): [True: 1.99k, False: 484]
  ------------------
  632|  1.99k|      BIO_clear_retry_flags(bio);
  633|  1.99k|      octx->io_result = r2;
  634|  1.99k|      return -1;
  635|  1.99k|    }
  636|    484|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1053|    484|#define TRUE true
  ------------------
  637|    484|  }
  638|  1.31k|  return result ? -1 : (int)nread;
  ------------------
  |  Branch (638:10): [True: 484, False: 830]
  ------------------
  639|  3.31k|}
openssl.c:ossl_bio_cf_ctrl:
  534|  12.2k|{
  535|  12.2k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  536|  12.2k|  long ret = 1;
  537|       |
  538|  12.2k|  (void)cf;
  539|  12.2k|  (void)ptr;
  540|  12.2k|  switch(cmd) {
  541|      0|  case BIO_CTRL_GET_CLOSE:
  ------------------
  |  Branch (541:3): [True: 0, False: 12.2k]
  ------------------
  542|      0|    ret = (long)BIO_get_shutdown(bio);
  543|      0|    break;
  544|      0|  case BIO_CTRL_SET_CLOSE:
  ------------------
  |  Branch (544:3): [True: 0, False: 12.2k]
  ------------------
  545|      0|    BIO_set_shutdown(bio, (int)num);
  546|      0|    break;
  547|  4.79k|  case BIO_CTRL_FLUSH:
  ------------------
  |  Branch (547:3): [True: 4.79k, False: 7.41k]
  ------------------
  548|       |    /* we do no delayed writes, but if we ever would, this
  549|       |     * needs to trigger it. */
  550|  4.79k|    ret = 1;
  551|  4.79k|    break;
  552|      0|  case BIO_CTRL_DUP:
  ------------------
  |  Branch (552:3): [True: 0, False: 12.2k]
  ------------------
  553|      0|    ret = 1;
  554|      0|    break;
  555|  2.24k|  case BIO_CTRL_EOF: {
  ------------------
  |  Branch (555:3): [True: 2.24k, False: 9.96k]
  ------------------
  556|       |    /* EOF has been reached on input? */
  557|  2.24k|    struct ssl_connect_data *connssl = cf->ctx;
  558|  2.24k|    return connssl->peer_closed;
  559|      0|  }
  560|  5.17k|  default:
  ------------------
  |  Branch (560:3): [True: 5.17k, False: 7.03k]
  ------------------
  561|  5.17k|    ret = 0;
  562|  5.17k|    break;
  563|  12.2k|  }
  564|  9.96k|  return ret;
  565|  12.2k|}
openssl.c:ossl_bio_cf_create:
  519|  2.58k|{
  520|  2.58k|  BIO_set_shutdown(bio, 1);
  521|  2.58k|  BIO_set_init(bio, 1);
  522|       |  BIO_set_data(bio, NULL);
  523|  2.58k|  return 1;
  524|  2.58k|}
openssl.c:ossl_bio_cf_destroy:
  527|  2.58k|{
  528|  2.58k|  if(!bio)
  ------------------
  |  Branch (528:6): [True: 0, False: 2.58k]
  ------------------
  529|      0|    return 0;
  530|  2.58k|  return 1;
  531|  2.58k|}
openssl.c:ossl_connect_step2:
 4147|  3.06k|{
 4148|  3.06k|  int err;
 4149|  3.06k|  struct ssl_connect_data *connssl = cf->ctx;
 4150|  3.06k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4151|  3.06k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 4152|  3.06k|  DEBUGASSERT(connssl->connecting_state == ssl_connect_2);
  ------------------
  |  | 1079|  3.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4152:3): [True: 0, False: 3.06k]
  |  Branch (4152:3): [True: 3.06k, False: 0]
  ------------------
 4153|  3.06k|  DEBUGASSERT(octx);
  ------------------
  |  | 1079|  3.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4153:3): [True: 0, False: 3.06k]
  |  Branch (4153:3): [True: 3.06k, False: 0]
  ------------------
 4154|       |
 4155|  3.06k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  3.06k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4156|  3.06k|  ERR_clear_error();
 4157|       |
 4158|  3.06k|  err = SSL_connect(octx->ssl);
 4159|       |
 4160|  3.06k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (4160:6): [True: 2.10k, False: 959]
  ------------------
 4161|       |    /* After having send off the ClientHello, we prepare the x509
 4162|       |     * store to verify the coming certificate from the server */
 4163|  2.10k|    CURLcode result = Curl_ssl_setup_x509_store(cf, data, octx);
 4164|  2.10k|    if(result)
  ------------------
  |  Branch (4164:8): [True: 2.09k, False: 3]
  ------------------
 4165|  2.09k|      return result;
 4166|      3|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1053|      3|#define TRUE true
  ------------------
 4167|      3|  }
 4168|       |
 4169|       |#if !defined(HAVE_KEYLOG_UPSTREAM) && !defined(HAVE_KEYLOG_CALLBACK)
 4170|       |  /* If key logging is enabled, wait for the handshake to complete and then
 4171|       |   * proceed with logging secrets (for TLS 1.2 or older).
 4172|       |   */
 4173|       |  if(Curl_tls_keylog_enabled() && !octx->keylog_done)
 4174|       |    ossl_log_tls12_secret(octx->ssl, &octx->keylog_done);
 4175|       |#endif
 4176|       |
 4177|       |  /* 1  is fine
 4178|       |     0  is "not successful but was shut down controlled"
 4179|       |     <0 is "handshake was not successful, because a fatal error occurred" */
 4180|    962|  if(err != 1) {
  ------------------
  |  Branch (4180:6): [True: 962, False: 0]
  ------------------
 4181|    962|    int detail = SSL_get_error(octx->ssl, err);
 4182|    962|    CURL_TRC_CF(data, cf, "SSL_connect() -> err=%d, detail=%d", err, detail);
  ------------------
  |  |  153|    962|  do {                                          \
  |  |  154|    962|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    962|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  1.92k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 962, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 962]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  1.92k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    962|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    962|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    962|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 962]
  |  |  ------------------
  ------------------
 4183|       |
 4184|    962|    if(detail == SSL_ERROR_WANT_READ) {
  ------------------
  |  Branch (4184:8): [True: 484, False: 478]
  ------------------
 4185|    484|      CURL_TRC_CF(data, cf, "SSL_connect() -> want recv");
  ------------------
  |  |  153|    484|  do {                                          \
  |  |  154|    484|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    484|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    968|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 484, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 484]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    968|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    484|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    484|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    484|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 484]
  |  |  ------------------
  ------------------
 4186|    484|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|    484|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 4187|    484|      return CURLE_AGAIN;
 4188|    484|    }
 4189|    478|    if(detail == SSL_ERROR_WANT_WRITE) {
  ------------------
  |  Branch (4189:8): [True: 0, False: 478]
  ------------------
 4190|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want send");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4191|      0|      connssl->io_need = CURL_SSL_IO_NEED_SEND;
  ------------------
  |  |  107|      0|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
 4192|      0|      return CURLE_AGAIN;
 4193|      0|    }
 4194|    478|#ifdef SSL_ERROR_WANT_ASYNC
 4195|    478|    if(detail == SSL_ERROR_WANT_ASYNC) {
  ------------------
  |  Branch (4195:8): [True: 0, False: 478]
  ------------------
 4196|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want async");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4197|      0|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|      0|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 4198|      0|      return CURLE_AGAIN;
 4199|      0|    }
 4200|    478|#endif
 4201|    478|#ifdef SSL_ERROR_WANT_RETRY_VERIFY
 4202|    478|    if(detail == SSL_ERROR_WANT_RETRY_VERIFY) {
  ------------------
  |  Branch (4202:8): [True: 0, False: 478]
  ------------------
 4203|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want retry_verify");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4204|      0|      Curl_xfer_pause_recv(data, TRUE);
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 4205|      0|      return CURLE_AGAIN;
 4206|      0|    }
 4207|    478|#endif
 4208|    478|    else {
 4209|       |      /* untreated error */
 4210|    478|      sslerr_t errdetail;
 4211|    478|      char error_buffer[256] = "";
 4212|    478|      CURLcode result;
 4213|    478|      long lerr;
 4214|    478|      int lib;
 4215|    478|      int reason;
 4216|       |
 4217|       |      /* the connection failed, we are not waiting for anything else. */
 4218|    478|      connssl->connecting_state = ssl_connect_2;
 4219|       |
 4220|       |      /* Get the earliest error code from the thread's error queue and remove
 4221|       |         the entry. */
 4222|    478|      errdetail = ERR_get_error();
 4223|       |
 4224|       |      /* Extract which lib and reason */
 4225|    478|      lib = ERR_GET_LIB(errdetail);
 4226|    478|      reason = ERR_GET_REASON(errdetail);
 4227|       |
 4228|    478|      if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4228:10): [True: 477, False: 1]
  ------------------
 4229|    477|         ((reason == SSL_R_CERTIFICATE_VERIFY_FAILED)
  ------------------
  |  Branch (4229:11): [True: 0, False: 477]
  ------------------
 4230|       |/* Missing from OpenSSL 4+ OPENSSL_NO_DEPRECATED_3_0 builds */
 4231|    477|#ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
 4232|    477|          || (reason == SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED)
  ------------------
  |  Branch (4232:14): [True: 1, False: 476]
  ------------------
 4233|    477|#endif
 4234|    477|         )) {
 4235|      1|        result = CURLE_PEER_FAILED_VERIFICATION;
 4236|       |
 4237|      1|        lerr = SSL_get_verify_result(octx->ssl);
 4238|      1|        if(lerr != X509_V_OK) {
  ------------------
  |  Branch (4238:12): [True: 0, False: 1]
  ------------------
 4239|      0|          ssl_config->certverifyresult = lerr;
 4240|      0|          failf(data, "SSL certificate problem: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4241|      0|                X509_verify_cert_error_string(lerr));
 4242|      0|        }
 4243|      1|        else
 4244|      1|          failf(data, "%s", "SSL certificate verification failed");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 4245|      1|      }
 4246|    477|#ifdef SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED
 4247|       |      /* SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED is only available on
 4248|       |         OpenSSL version above v1.1.1, not AWS-LC, BoringSSL, or LibreSSL */
 4249|    477|      else if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4249:15): [True: 476, False: 1]
  ------------------
 4250|    476|              (reason == SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED)) {
  ------------------
  |  Branch (4250:15): [True: 1, False: 475]
  ------------------
 4251|       |        /* If client certificate is required, communicate the
 4252|       |           error to client */
 4253|      1|        result = CURLE_SSL_CLIENTCERT;
 4254|      1|        failf(data, "TLS cert problem: %s",
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 4255|      1|              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4256|      1|      }
 4257|    476|#endif
 4258|       |#ifdef HAVE_SSL_SET1_ECH_CONFIG_LIST
 4259|       |      else if((lib == ERR_LIB_SSL) &&
 4260|       |#ifndef HAVE_BORINGSSL_LIKE
 4261|       |              (reason == SSL_R_ECH_REQUIRED)) {
 4262|       |#else
 4263|       |              (reason == SSL_R_ECH_REJECTED)) {
 4264|       |#endif /* HAVE_BORINGSSL_LIKE */
 4265|       |
 4266|       |        /* trace retry_configs if we got some */
 4267|       |        ossl_trace_ech_retry_configs(data, octx->ssl, reason);
 4268|       |
 4269|       |        result = CURLE_ECH_REQUIRED;
 4270|       |        failf(data, "ECH required: %s",
 4271|       |              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4272|       |      }
 4273|       |#endif
 4274|    476|      else {
 4275|    476|        result = CURLE_SSL_CONNECT_ERROR;
 4276|    476|        failf(data, "TLS connect error: %s",
  ------------------
  |  |   62|    476|#define failf Curl_failf
  ------------------
 4277|    476|              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4278|    476|      }
 4279|       |
 4280|       |      /* detail is already set to the SSL error above */
 4281|       |
 4282|       |      /* If we e.g. use SSLv2 request-method and the server does not like us
 4283|       |       * (RST connection, etc.), OpenSSL gives no explanation whatsoever and
 4284|       |       * the SO_ERROR is also lost.
 4285|       |       */
 4286|    478|      if(result == CURLE_SSL_CONNECT_ERROR && errdetail == 0) {
  ------------------
  |  Branch (4286:10): [True: 476, False: 2]
  |  Branch (4286:47): [True: 1, False: 475]
  ------------------
 4287|      1|        char extramsg[80] = "";
 4288|      1|        int sockerr = SOCKERRNO;
  ------------------
  |  | 1093|      1|#define SOCKERRNO         errno
  ------------------
 4289|       |
 4290|      1|        if(sockerr && detail == SSL_ERROR_SYSCALL)
  ------------------
  |  Branch (4290:12): [True: 0, False: 1]
  |  Branch (4290:23): [True: 0, False: 0]
  ------------------
 4291|      0|          curlx_strerror(sockerr, extramsg, sizeof(extramsg));
 4292|      1|        failf(data, OSSL_PACKAGE " SSL_connect: %s in connection to %s:%d ",
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
                      failf(data, OSSL_PACKAGE " SSL_connect: %s in connection to %s:%d ",
  ------------------
  |  |  163|      1|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 4293|      1|              extramsg[0] ? extramsg : SSL_ERROR_to_str(detail),
  ------------------
  |  Branch (4293:15): [True: 0, False: 1]
  ------------------
 4294|      1|              connssl->peer.origin->hostname, connssl->peer.origin->port);
 4295|      1|      }
 4296|       |
 4297|    478|      return result;
 4298|    478|    }
 4299|    478|  }
 4300|      0|  else {
 4301|       |    /* we connected fine, we are not waiting for anything else. */
 4302|      0|    connssl->connecting_state = ssl_connect_3;
 4303|      0|    Curl_ossl_report_handshake(data, octx);
 4304|       |
 4305|       |#if defined(HAVE_SSL_SET1_ECH_CONFIG_LIST) && !defined(HAVE_BORINGSSL_LIKE)
 4306|       |    if(CURLECH_ENABLED(data)) {
 4307|       |      char *inner = NULL, *outer = NULL;
 4308|       |      int rv;
 4309|       |      VERBOSE(const char *status);
 4310|       |
 4311|       |      rv = SSL_ech_get1_status(octx->ssl, &inner, &outer);
 4312|       |      switch(rv) {
 4313|       |      case SSL_ECH_STATUS_SUCCESS:
 4314|       |        VERBOSE(status = "succeeded");
 4315|       |        break;
 4316|       |      case SSL_ECH_STATUS_GREASE_ECH:
 4317|       |        VERBOSE(status = "sent GREASE, got retry-configs");
 4318|       |        break;
 4319|       |      case SSL_ECH_STATUS_GREASE:
 4320|       |        VERBOSE(status = "sent GREASE");
 4321|       |        break;
 4322|       |      case SSL_ECH_STATUS_NOT_TRIED:
 4323|       |        VERBOSE(status = "not attempted");
 4324|       |        break;
 4325|       |      case SSL_ECH_STATUS_NOT_CONFIGURED:
 4326|       |        VERBOSE(status = "not configured");
 4327|       |        break;
 4328|       |      case SSL_ECH_STATUS_BACKEND:
 4329|       |        VERBOSE(status = "backend (unexpected)");
 4330|       |        break;
 4331|       |      case SSL_ECH_STATUS_FAILED:
 4332|       |        VERBOSE(status = "failed");
 4333|       |        break;
 4334|       |      case SSL_ECH_STATUS_BAD_CALL:
 4335|       |        VERBOSE(status = "bad call (unexpected)");
 4336|       |        break;
 4337|       |      case SSL_ECH_STATUS_BAD_NAME: {
 4338|       |        struct ssl_primary_config *conn_config =
 4339|       |          Curl_ssl_cf_get_primary_config(cf);
 4340|       |        if(!conn_config->verifypeer && !conn_config->verifyhost &&
 4341|       |           inner && !strcmp(inner, connssl->peer.origin->hostname)) {
 4342|       |          VERBOSE(status = "bad name (tolerated without peer verification)");
 4343|       |          rv = SSL_ECH_STATUS_SUCCESS;
 4344|       |        }
 4345|       |        else {
 4346|       |          VERBOSE(status = "bad name (unexpected)");
 4347|       |        }
 4348|       |        break;
 4349|       |      }
 4350|       |      default:
 4351|       |        VERBOSE(status = "unexpected status");
 4352|       |        infof(data, "ECH: unexpected status %d", rv);
 4353|       |      }
 4354|       |      infof(data, "ECH: result: status is %s, inner is %s, outer is %s",
 4355|       |            (status ? status : "NULL"),
 4356|       |            (inner ? inner : "NULL"),
 4357|       |            (outer ? outer : "NULL"));
 4358|       |      OPENSSL_free(inner);
 4359|       |      OPENSSL_free(outer);
 4360|       |      if(rv == SSL_ECH_STATUS_GREASE_ECH) {
 4361|       |        /* trace retry_configs if we got some */
 4362|       |        ossl_trace_ech_retry_configs(data, octx->ssl, 0);
 4363|       |      }
 4364|       |      if(rv != SSL_ECH_STATUS_SUCCESS && (data->set.tls_ech == CURLECH_HARD)) {
 4365|       |        infof(data, "ECH: ech-hard failed");
 4366|       |        return CURLE_SSL_CONNECT_ERROR;
 4367|       |      }
 4368|       |    }
 4369|       |    else {
 4370|       |      infof(data, "ECH: result: status is not attempted");
 4371|       |    }
 4372|       |#endif /* HAVE_SSL_SET1_ECH_CONFIG_LIST && !HAVE_BORINGSSL_LIKE */
 4373|       |
 4374|       |    /* Sets data and len to negotiated protocol, len is 0 if no protocol was
 4375|       |     * negotiated
 4376|       |     */
 4377|      0|    if(connssl->alpn) {
  ------------------
  |  Branch (4377:8): [True: 0, False: 0]
  ------------------
 4378|      0|      const unsigned char *neg_protocol;
 4379|      0|      unsigned int len;
 4380|      0|      SSL_get0_alpn_selected(octx->ssl, &neg_protocol, &len);
 4381|       |
 4382|      0|      return Curl_alpn_set_negotiated(cf, data, connssl, neg_protocol, len);
 4383|      0|    }
 4384|       |
 4385|      0|    return CURLE_OK;
 4386|      0|  }
 4387|    962|}
openssl.c:ossl_close:
 1961|  3.47k|{
 1962|  3.47k|  struct ssl_connect_data *connssl = cf->ctx;
 1963|  3.47k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 1964|       |
 1965|  3.47k|  (void)data;
 1966|  3.47k|  DEBUGASSERT(octx);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1966:3): [True: 0, False: 3.47k]
  |  Branch (1966:3): [True: 3.47k, False: 0]
  ------------------
 1967|       |
 1968|  3.47k|  connssl->input_pending = FALSE;
  ------------------
  |  | 1056|  3.47k|#define FALSE false
  ------------------
 1969|  3.47k|  if(octx->ssl) {
  ------------------
  |  Branch (1969:6): [True: 2.58k, False: 891]
  ------------------
 1970|  2.58k|    SSL_free(octx->ssl);
 1971|  2.58k|    octx->ssl = NULL;
 1972|  2.58k|  }
 1973|  3.47k|  if(octx->ssl_ctx) {
  ------------------
  |  Branch (1973:6): [True: 3.35k, False: 120]
  ------------------
 1974|  3.35k|    SSL_CTX_free(octx->ssl_ctx);
 1975|  3.35k|    octx->ssl_ctx = NULL;
 1976|  3.35k|    octx->x509_store_setup = FALSE;
  ------------------
  |  | 1056|  3.35k|#define FALSE false
  ------------------
 1977|  3.35k|  }
 1978|  3.47k|  if(octx->bio_method) {
  ------------------
  |  Branch (1978:6): [True: 2.58k, False: 892]
  ------------------
 1979|  2.58k|    ossl_bio_cf_method_free(octx->bio_method);
 1980|       |    octx->bio_method = NULL;
 1981|  2.58k|  }
 1982|  3.47k|}
openssl.c:ossl_bio_cf_method_free:
  655|  2.58k|{
  656|  2.58k|  if(m)
  ------------------
  |  Branch (656:6): [True: 2.58k, False: 0]
  ------------------
  657|  2.58k|    BIO_meth_free(m);
  658|  2.58k|}
openssl.c:ossl_close_all:
 1989|  26.2k|{
 1990|       |#ifdef USE_OPENSSL_ENGINE
 1991|       |  if(data->state.engine) {
 1992|       |    ENGINE_finish(data->state.engine);
 1993|       |    ENGINE_free(data->state.engine);
 1994|       |    data->state.engine = NULL;
 1995|       |  }
 1996|       |#else
 1997|  26.2k|  (void)data;
 1998|  26.2k|#endif
 1999|  26.2k|#ifdef OPENSSL_HAS_PROVIDERS
 2000|  26.2k|  ossl_provider_cleanup(data);
 2001|  26.2k|#endif
 2002|  26.2k|}
openssl.c:ossl_set_engine:
 1658|    810|{
 1659|       |#ifdef USE_OPENSSL_ENGINE
 1660|       |  CURLcode result = CURLE_SSL_ENGINE_NOTFOUND;
 1661|       |  ENGINE *e = ENGINE_by_id(name);
 1662|       |
 1663|       |  if(e) {
 1664|       |
 1665|       |    if(data->state.engine) {
 1666|       |      ENGINE_finish(data->state.engine);
 1667|       |      ENGINE_free(data->state.engine);
 1668|       |      data->state.engine = NULL;
 1669|       |    }
 1670|       |    if(!ENGINE_init(e)) {
 1671|       |      char buf[256];
 1672|       |
 1673|       |      ENGINE_free(e);
 1674|       |      failf(data, "Failed to initialize SSL Engine '%s': %s",
 1675|       |            name, ossl_strerror(ERR_get_error(), buf, sizeof(buf)));
 1676|       |      result = CURLE_SSL_ENGINE_INITFAILED;
 1677|       |      e = NULL;
 1678|       |    }
 1679|       |    else {
 1680|       |      result = CURLE_OK;
 1681|       |    }
 1682|       |    data->state.engine = e;
 1683|       |    return result;
 1684|       |  }
 1685|       |#endif
 1686|    810|#ifdef OPENSSL_HAS_PROVIDERS
 1687|    810|  return ossl_set_provider(data, name);
 1688|       |#else
 1689|       |  (void)name;
 1690|       |  failf(data, "OpenSSL engine not found");
 1691|       |  return CURLE_SSL_ENGINE_NOTFOUND;
 1692|       |#endif
 1693|    810|}
openssl.c:ossl_set_engine_default:
 1698|      4|{
 1699|       |#ifdef USE_OPENSSL_ENGINE
 1700|       |  if(data->state.engine) {
 1701|       |    if(ENGINE_set_default(data->state.engine, ENGINE_METHOD_ALL) > 0) {
 1702|       |      infof(data, "set default crypto engine '%s'",
 1703|       |            ENGINE_get_id(data->state.engine));
 1704|       |    }
 1705|       |    else {
 1706|       |      failf(data, "set default crypto engine '%s' failed",
 1707|       |            ENGINE_get_id(data->state.engine));
 1708|       |      return CURLE_SSL_ENGINE_SETFAILED;
 1709|       |    }
 1710|       |  }
 1711|       |#else
 1712|      4|  (void)data;
 1713|      4|#endif
 1714|      4|  return CURLE_OK;
 1715|      4|}

Curl_ssl_backend:
  131|  13.0k|{
  132|  13.0k|#ifdef USE_SSL
  133|  13.0k|  multissl_setup(NULL);
  134|  13.0k|  return Curl_ssl->info.id;
  135|       |#else
  136|       |  return CURLSSLBACKEND_NONE;
  137|       |#endif
  138|  13.0k|}
Curl_ssl_init:
  152|      1|{
  153|       |  /* make sure this is only done once */
  154|      1|  if(init_ssl)
  ------------------
  |  Branch (154:6): [True: 0, False: 1]
  ------------------
  155|      0|    return 1;
  156|      1|  init_ssl = TRUE; /* never again */
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
  157|       |
  158|      1|  if(Curl_ssl->init)
  ------------------
  |  Branch (158:6): [True: 1, False: 0]
  ------------------
  159|      1|    return Curl_ssl->init();
  160|      0|  return 1;
  161|      1|}
Curl_ssl_close_all:
  227|  26.2k|{
  228|  26.2k|  if(Curl_ssl->close_all)
  ------------------
  |  Branch (228:6): [True: 26.2k, False: 0]
  ------------------
  229|  26.2k|    Curl_ssl->close_all(data);
  230|  26.2k|}
Curl_ssl_adjust_pollset:
  235|    484|{
  236|    484|  struct ssl_connect_data *connssl = cf->ctx;
  237|       |
  238|    484|  if(connssl->io_need) {
  ------------------
  |  Branch (238:6): [True: 484, False: 0]
  ------------------
  239|    484|    curl_socket_t sock = Curl_conn_cf_get_socket(cf->next, data);
  240|    484|    CURLcode result = CURLE_OK;
  241|    484|    if(sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    484|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (241:8): [True: 484, False: 0]
  ------------------
  242|    484|      if(connssl->io_need & CURL_SSL_IO_NEED_SEND) {
  ------------------
  |  |  107|    484|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
  |  Branch (242:10): [True: 0, False: 484]
  ------------------
  243|      0|        result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  172|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  244|      0|        CURL_TRC_CF(data, cf, "adjust_pollset, POLLOUT fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  245|      0|                    sock);
  246|      0|      }
  247|    484|      else {
  248|    484|        result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  170|    484|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|    484|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|    484|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
  249|    484|        CURL_TRC_CF(data, cf, "adjust_pollset, POLLIN fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|    484|  do {                                          \
  |  |  154|    484|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|    484|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    968|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 484, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 484]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    968|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    484|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    484|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    484|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 484]
  |  |  ------------------
  ------------------
  250|    484|                    sock);
  251|    484|      }
  252|    484|    }
  253|    484|    return result;
  254|    484|  }
  255|      0|  return CURLE_OK;
  256|    484|}
Curl_ssl_set_engine:
  261|    810|{
  262|    810|  if(Curl_ssl->set_engine)
  ------------------
  |  Branch (262:6): [True: 810, False: 0]
  ------------------
  263|    810|    return Curl_ssl->set_engine(data, engine);
  264|      0|  return CURLE_NOT_BUILT_IN;
  265|    810|}
Curl_ssl_set_engine_default:
  270|      4|{
  271|      4|  if(Curl_ssl->set_engine_default)
  ------------------
  |  Branch (271:6): [True: 4, False: 0]
  ------------------
  272|      4|    return Curl_ssl->set_engine_default(data);
  273|      0|  return CURLE_NOT_BUILT_IN;
  274|      4|}
Curl_ssl_free_certinfo:
  296|  60.8k|{
  297|  60.8k|  struct curl_certinfo *ci = &data->info.certs;
  298|       |
  299|  60.8k|  if(ci->num_of_certs) {
  ------------------
  |  Branch (299:6): [True: 0, False: 60.8k]
  ------------------
  300|       |    /* free all individual lists used */
  301|      0|    int i;
  302|      0|    for(i = 0; i < ci->num_of_certs; i++) {
  ------------------
  |  Branch (302:16): [True: 0, False: 0]
  ------------------
  303|      0|      curl_slist_free_all(ci->certinfo[i]);
  304|      0|      ci->certinfo[i] = NULL;
  305|      0|    }
  306|       |
  307|       |    curlx_safefree(ci->certinfo); /* free the actual array too */
  ------------------
  |  | 1336|      0|  do {                      \
  |  | 1337|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|      0|    (ptr) = NULL;           \
  |  | 1339|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  308|      0|    ci->num_of_certs = 0;
  309|      0|  }
  310|  60.8k|}
Curl_ssl_random:
  368|  4.11k|{
  369|  4.11k|  DEBUGASSERT(length == sizeof(int));
  ------------------
  |  | 1079|  4.11k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (369:3): [True: 0, False: 4.11k]
  |  Branch (369:3): [True: 4.11k, False: 0]
  ------------------
  370|  4.11k|  if(Curl_ssl->random)
  ------------------
  |  Branch (370:6): [True: 4.11k, False: 0]
  ------------------
  371|  4.11k|    return Curl_ssl->random(data, buffer, length);
  372|      0|  else
  373|      0|    return CURLE_NOT_BUILT_IN;
  374|  4.11k|}
Curl_ssl_cert_status_request:
  586|    796|{
  587|    796|  if(Curl_ssl->cert_status_request)
  ------------------
  |  Branch (587:6): [True: 796, False: 0]
  ------------------
  588|    796|    return Curl_ssl->cert_status_request();
  589|      0|  return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  590|    796|}
Curl_ssl_peer_cleanup:
  868|  3.48k|{
  869|  3.48k|  Curl_peer_unlink(&peer->origin);
  870|  3.48k|  Curl_peer_unlink(&peer->peer);
  871|  3.48k|  curlx_safefree(peer->sni);
  ------------------
  |  | 1336|  3.48k|  do {                      \
  |  | 1337|  3.48k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  3.48k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  3.48k|    (ptr) = NULL;           \
  |  | 1339|  3.48k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 3.48k]
  |  |  ------------------
  ------------------
  872|  3.48k|  curlx_safefree(peer->scache_key);
  ------------------
  |  | 1336|  3.48k|  do {                      \
  |  | 1337|  3.48k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  3.48k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  3.48k|    (ptr) = NULL;           \
  |  | 1339|  3.48k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 3.48k]
  |  |  ------------------
  ------------------
  873|  3.48k|  peer->transport = TRNSPRT_NONE;
  ------------------
  |  |  236|  3.48k|#define TRNSPRT_NONE 0
  ------------------
  874|  3.48k|  peer->type = CURL_SSL_PEER_DNS;
  875|  3.48k|}
Curl_ssl_peer_init:
  902|  3.47k|{
  903|  3.47k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  904|       |
  905|       |  /* We expect a clean struct, e.g. called only ONCE */
  906|  3.47k|  if(!ssl_peer || !origin) {
  ------------------
  |  Branch (906:6): [True: 0, False: 3.47k]
  |  Branch (906:19): [True: 0, False: 3.47k]
  ------------------
  907|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (907:5): [Folded, False: 0]
  |  Branch (907:5): [Folded, False: 0]
  ------------------
  908|      0|    return CURLE_FAILED_INIT;
  909|      0|  }
  910|  3.47k|  DEBUGASSERT(!ssl_peer->origin);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (910:3): [True: 0, False: 3.47k]
  |  Branch (910:3): [True: 3.47k, False: 0]
  ------------------
  911|  3.47k|  DEBUGASSERT(!ssl_peer->peer);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (911:3): [True: 0, False: 3.47k]
  |  Branch (911:3): [True: 3.47k, False: 0]
  ------------------
  912|  3.47k|  DEBUGASSERT(!ssl_peer->sni);
  ------------------
  |  | 1079|  3.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (912:3): [True: 0, False: 3.47k]
  |  Branch (912:3): [True: 3.47k, False: 0]
  ------------------
  913|  3.47k|  ssl_peer->transport = transport;
  914|       |
  915|  3.47k|  Curl_peer_link(&ssl_peer->origin, origin);
  916|  3.47k|  Curl_peer_link(&ssl_peer->peer, peer);
  917|  3.47k|  ssl_peer->type = get_peer_type(origin->hostname);
  918|  3.47k|  if(ssl_peer->type == CURL_SSL_PEER_DNS) {
  ------------------
  |  Branch (918:6): [True: 1.57k, False: 1.90k]
  ------------------
  919|       |    /* not an IP address, normalize according to RCC 6066 ch. 3,
  920|       |     * max len of SNI is 2^16-1, no trailing dot */
  921|  1.57k|    size_t len = strlen(origin->hostname);
  922|  1.57k|    if(len && (origin->hostname[len - 1] == '.'))
  ------------------
  |  Branch (922:8): [True: 1.57k, False: 0]
  |  Branch (922:15): [True: 19, False: 1.55k]
  ------------------
  923|     19|      len--;
  924|  1.57k|    if(len < USHRT_MAX) {
  ------------------
  |  Branch (924:8): [True: 1.57k, False: 0]
  ------------------
  925|  1.57k|      ssl_peer->sni = curlx_calloc(1, len + 1);
  ------------------
  |  | 1475|  1.57k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  926|  1.57k|      if(!ssl_peer->sni)
  ------------------
  |  Branch (926:10): [True: 0, False: 1.57k]
  ------------------
  927|      0|        goto out;
  928|  1.57k|      Curl_strntolower(ssl_peer->sni, origin->hostname, len);
  929|  1.57k|      ssl_peer->sni[len] = 0;
  930|  1.57k|    }
  931|  1.57k|  }
  932|       |
  933|  3.47k|  result = Curl_ssl_peer_key_make(ssl_peer, sslc, tls_id,
  934|  3.47k|                                  &ssl_peer->scache_key);
  935|       |
  936|  3.47k|out:
  937|  3.47k|  if(result)
  ------------------
  |  Branch (937:6): [True: 5, False: 3.47k]
  ------------------
  938|      5|    Curl_ssl_peer_cleanup(ssl_peer);
  939|  3.47k|  return result;
  940|  3.47k|}
Curl_cf_ssl_insert_after:
 1414|  3.04k|{
 1415|  3.04k|  struct Curl_cfilter *cf;
 1416|  3.04k|  CURLcode result;
 1417|       |
 1418|  3.04k|  result = cf_ssl_create(&cf, data, cf_at->conn);
 1419|  3.04k|  if(!result)
  ------------------
  |  Branch (1419:6): [True: 3.04k, False: 0]
  ------------------
 1420|  3.04k|    result = cf_ssl_peer_init(cf, origin, peer, &cf_at->conn->ssl_config);
 1421|  3.04k|  if(!result) {
  ------------------
  |  Branch (1421:6): [True: 3.03k, False: 5]
  ------------------
 1422|  3.03k|    Curl_conn_cf_insert_after(cf_at, cf);
 1423|       |#if defined(USE_HTTPSRR) && defined(USE_ECH)
 1424|       |    /* When using ECH, kick off the HTTPS-RR resolve */
 1425|       |    if((origin->scheme->family == CURLPROTO_HTTP) &&
 1426|       |       CURLECH_ENABLED(data) &&
 1427|       |       Curl_ssl_supports(data, SSLSUPP_ECH) &&
 1428|       |       (data->set.tls_ech != CURLECH_GREASE) &&
 1429|       |       !data->set.str[STRING_ECH_CONFIG]) {
 1430|       |      result = Curl_conn_dns_add_https_resolve(data, cf->conn, cf->sockindex,
 1431|       |                                               origin);
 1432|       |    }
 1433|       |#endif /* USE_HTTPSRR && USE_ECH */
 1434|  3.03k|  }
 1435|      5|  else if(cf)
  ------------------
  |  Branch (1435:11): [True: 5, False: 0]
  ------------------
 1436|      5|    Curl_conn_cf_discard_chain(&cf, data);
 1437|  3.04k|  return result;
 1438|  3.04k|}
Curl_cf_ssl_proxy_insert_after:
 1478|    434|{
 1479|    434|  struct Curl_cfilter *cf;
 1480|    434|  CURLcode result;
 1481|       |
 1482|    434|  result = cf_ssl_proxy_create(&cf, data, cf_at->conn);
 1483|    434|  if(!result)
  ------------------
  |  Branch (1483:6): [True: 434, False: 0]
  ------------------
 1484|    434|    result = cf_ssl_peer_init(cf, peer, NULL, &cf_at->conn->proxy_ssl_config);
 1485|    434|  if(!result)
  ------------------
  |  Branch (1485:6): [True: 434, False: 0]
  ------------------
 1486|    434|    Curl_conn_cf_insert_after(cf_at, cf);
 1487|      0|  else if(cf)
  ------------------
  |  Branch (1487:11): [True: 0, False: 0]
  ------------------
 1488|      0|    Curl_conn_cf_discard_chain(&cf, data);
 1489|    434|  return result;
 1490|    434|}
Curl_ssl_supports:
 1495|  15.8k|{
 1496|  15.8k|  (void)data;
 1497|  15.8k|  return (Curl_ssl->supports & ssl_option);
 1498|  15.8k|}
Curl_ssl_cf_is_proxy:
 1580|  54.5k|{
 1581|  54.5k|  return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  203|  54.5k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  205|  54.5k|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (1581:10): [True: 54.5k, False: 0]
  |  Branch (1581:44): [True: 6.90k, False: 47.6k]
  ------------------
 1582|  54.5k|}
Curl_ssl_cf_get_config:
 1586|  22.8k|{
 1587|       |#ifdef CURL_DISABLE_PROXY
 1588|       |  (void)cf;
 1589|       |  return &data->set.ssl;
 1590|       |#else
 1591|  22.8k|  return Curl_ssl_cf_is_proxy(cf) ? &data->set.proxy_ssl : &data->set.ssl;
  ------------------
  |  Branch (1591:10): [True: 3.01k, False: 19.7k]
  ------------------
 1592|  22.8k|#endif
 1593|  22.8k|}
Curl_ssl_cf_get_primary_config:
 1597|  31.7k|{
 1598|       |#ifdef CURL_DISABLE_PROXY
 1599|       |  return &cf->conn->ssl_config;
 1600|       |#else
 1601|  31.7k|  return Curl_ssl_cf_is_proxy(cf) ?
  ------------------
  |  Branch (1601:10): [True: 3.88k, False: 27.8k]
  ------------------
 1602|  27.8k|    &cf->conn->proxy_ssl_config : &cf->conn->ssl_config;
 1603|  31.7k|#endif
 1604|  31.7k|}
Curl_alpn_to_proto_buf:
 1608|  2.57k|{
 1609|  2.57k|  size_t i, len;
 1610|  2.57k|  int off = 0;
 1611|  2.57k|  unsigned char blen;
 1612|       |
 1613|  2.57k|  memset(buf, 0, sizeof(*buf));
 1614|  7.30k|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1614:14): [True: 7.30k, False: 0]
  |  Branch (1614:22): [True: 4.72k, False: 2.57k]
  ------------------
 1615|  4.72k|    len = strlen(spec->entries[i]);
 1616|  4.72k|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|  4.72k|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1616:8): [True: 0, False: 4.72k]
  ------------------
 1617|      0|      return CURLE_FAILED_INIT;
 1618|  4.72k|    blen = (unsigned char)len;
 1619|  4.72k|    if(off + blen + 1 >= (int)sizeof(buf->data))
  ------------------
  |  Branch (1619:8): [True: 0, False: 4.72k]
  ------------------
 1620|      0|      return CURLE_FAILED_INIT;
 1621|  4.72k|    buf->data[off++] = blen;
 1622|  4.72k|    memcpy(buf->data + off, spec->entries[i], blen);
 1623|  4.72k|    off += blen;
 1624|  4.72k|  }
 1625|  2.57k|  buf->len = off;
 1626|  2.57k|  return CURLE_OK;
 1627|  2.57k|}
Curl_alpn_to_proto_str:
 1631|  2.57k|{
 1632|  2.57k|  size_t i, len;
 1633|  2.57k|  size_t off = 0;
 1634|       |
 1635|  2.57k|  memset(buf, 0, sizeof(*buf));
 1636|  7.30k|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1636:14): [True: 7.30k, False: 0]
  |  Branch (1636:22): [True: 4.72k, False: 2.57k]
  ------------------
 1637|  4.72k|    len = strlen(spec->entries[i]);
 1638|  4.72k|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|  4.72k|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1638:8): [True: 0, False: 4.72k]
  ------------------
 1639|      0|      return CURLE_FAILED_INIT;
 1640|  4.72k|    if(off + len + 2 >= sizeof(buf->data))
  ------------------
  |  Branch (1640:8): [True: 0, False: 4.72k]
  ------------------
 1641|      0|      return CURLE_FAILED_INIT;
 1642|  4.72k|    if(off)
  ------------------
  |  Branch (1642:8): [True: 2.14k, False: 2.57k]
  ------------------
 1643|  2.14k|      buf->data[off++] = ',';
 1644|  4.72k|    memcpy(buf->data + off, spec->entries[i], len);
 1645|  4.72k|    off += len;
 1646|  4.72k|  }
 1647|  2.57k|  buf->data[off] = '\0';
 1648|  2.57k|  buf->len = (int)off;
 1649|  2.57k|  return CURLE_OK;
 1650|  2.57k|}
Curl_alpn_copy:
 1675|  2.58k|{
 1676|  2.58k|  if(src)
  ------------------
  |  Branch (1676:6): [True: 2.57k, False: 9]
  ------------------
 1677|  2.57k|    memcpy(dest, src, sizeof(*dest));
 1678|      9|  else
 1679|      9|    memset(dest, 0, sizeof(*dest));
 1680|  2.58k|}
vtls.c:multissl_setup:
  779|  13.0k|{
  780|  13.0k|  int i;
  781|  13.0k|  char *env;
  782|       |
  783|  13.0k|  if(Curl_ssl != &Curl_ssl_multi)
  ------------------
  |  Branch (783:6): [True: 13.0k, False: 0]
  ------------------
  784|  13.0k|    return 1;
  785|       |
  786|      0|  if(backend) {
  ------------------
  |  Branch (786:6): [True: 0, False: 0]
  ------------------
  787|      0|    Curl_ssl = backend;
  788|      0|    return 0;
  789|      0|  }
  790|       |
  791|      0|  if(!available_backends[0])
  ------------------
  |  Branch (791:6): [True: 0, False: 0]
  ------------------
  792|      0|    return 1;
  793|       |
  794|      0|  env = curl_getenv("CURL_SSL_BACKEND");
  795|      0|  if(env) {
  ------------------
  |  Branch (795:6): [True: 0, False: 0]
  ------------------
  796|      0|    for(i = 0; available_backends[i]; i++) {
  ------------------
  |  Branch (796:16): [True: 0, False: 0]
  ------------------
  797|      0|      if(curl_strequal(env, available_backends[i]->info.name)) {
  ------------------
  |  Branch (797:10): [True: 0, False: 0]
  ------------------
  798|      0|        Curl_ssl = available_backends[i];
  799|      0|        curlx_free(env);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  800|      0|        return 0;
  801|      0|      }
  802|      0|    }
  803|      0|  }
  804|       |
  805|       |#ifdef CURL_DEFAULT_SSL_BACKEND
  806|       |  for(i = 0; available_backends[i]; i++) {
  807|       |    if(curl_strequal(CURL_DEFAULT_SSL_BACKEND,
  808|       |                     available_backends[i]->info.name)) {
  809|       |      Curl_ssl = available_backends[i];
  810|       |      curlx_free(env);
  811|       |      return 0;
  812|       |    }
  813|       |  }
  814|       |#endif
  815|       |
  816|       |  /* Fall back to first available backend */
  817|      0|  Curl_ssl = available_backends[0];
  818|      0|  curlx_free(env);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  819|      0|  return 0;
  820|      0|}
vtls.c:get_peer_type:
  878|  3.47k|{
  879|  3.47k|  if(hostname && hostname[0]) {
  ------------------
  |  Branch (879:6): [True: 3.47k, False: 0]
  |  Branch (879:18): [True: 3.47k, False: 0]
  ------------------
  880|  3.47k|#ifdef USE_IPV6
  881|  3.47k|    struct in6_addr addr;
  882|       |#else
  883|       |    struct in_addr addr;
  884|       |#endif
  885|  3.47k|    if(curlx_inet_pton(AF_INET, hostname, &addr))
  ------------------
  |  Branch (885:8): [True: 1.81k, False: 1.65k]
  ------------------
  886|  1.81k|      return CURL_SSL_PEER_IPV4;
  887|  1.65k|#ifdef USE_IPV6
  888|  1.65k|    else if(curlx_inet_pton(AF_INET6, hostname, &addr)) {
  ------------------
  |  Branch (888:13): [True: 86, False: 1.57k]
  ------------------
  889|     86|      return CURL_SSL_PEER_IPV6;
  890|     86|    }
  891|  3.47k|#endif
  892|  3.47k|  }
  893|  1.57k|  return CURL_SSL_PEER_DNS;
  894|  3.47k|}
vtls.c:ssl_cf_destroy:
  943|  3.47k|{
  944|  3.47k|  struct ssl_connect_data *connssl = cf->ctx;
  945|  3.47k|  if(connssl) {
  ------------------
  |  Branch (945:6): [True: 3.47k, False: 0]
  ------------------
  946|  3.47k|    connssl->ssl_impl->close(cf, data);
  947|  3.47k|    connssl->state = ssl_connection_none;
  948|  3.47k|    connssl->connecting_state = ssl_connect_1;
  949|  3.47k|    connssl->prefs_checked = FALSE;
  ------------------
  |  | 1056|  3.47k|#define FALSE false
  ------------------
  950|  3.47k|    Curl_ssl_peer_cleanup(&connssl->peer);
  951|  3.47k|    Curl_ssl_session_destroy(connssl->session);
  952|  3.47k|    cf_ctx_free(connssl);
  953|  3.47k|    cf->ctx = NULL;
  954|  3.47k|  }
  955|       |  cf->connected = FALSE;
  ------------------
  |  | 1056|  3.47k|#define FALSE false
  ------------------
  956|  3.47k|}
vtls.c:cf_ctx_free:
  209|  3.47k|{
  210|  3.47k|  if(ctx) {
  ------------------
  |  Branch (210:6): [True: 3.47k, False: 0]
  ------------------
  211|  3.47k|    curlx_safefree(ctx->negotiated.alpn);
  ------------------
  |  | 1336|  3.47k|  do {                      \
  |  | 1337|  3.47k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  3.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  3.47k|    (ptr) = NULL;           \
  |  | 1339|  3.47k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 3.47k]
  |  |  ------------------
  ------------------
  212|  3.47k|    Curl_bufq_free(&ctx->earlydata);
  213|  3.47k|    curlx_free(ctx->backend);
  ------------------
  |  | 1478|  3.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  214|  3.47k|    curlx_free(ctx);
  ------------------
  |  | 1478|  3.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  215|  3.47k|  }
  216|  3.47k|}
vtls.c:ssl_cf_connect:
  961|  3.94k|{
  962|  3.94k|  struct ssl_connect_data *connssl = cf->ctx;
  963|  3.94k|  struct cf_call_data save;
  964|  3.94k|  CURLcode result;
  965|       |
  966|  3.94k|  if(cf->connected && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (966:6): [True: 0, False: 3.94k]
  |  Branch (966:23): [True: 0, False: 0]
  ------------------
  967|      0|    *done = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
  968|      0|    return CURLE_OK;
  969|      0|  }
  970|       |
  971|  3.94k|  if(!cf->next || !connssl->peer.origin) {
  ------------------
  |  Branch (971:6): [True: 0, False: 3.94k]
  |  Branch (971:19): [True: 0, False: 3.94k]
  ------------------
  972|      0|    *done = FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  973|      0|    return CURLE_FAILED_INIT;
  974|      0|  }
  975|       |
  976|  3.94k|  if(!cf->next->connected) {
  ------------------
  |  Branch (976:6): [True: 0, False: 3.94k]
  ------------------
  977|      0|    result = cf->next->cft->do_connect(cf->next, data, done);
  978|      0|    if(result || !*done)
  ------------------
  |  Branch (978:8): [True: 0, False: 0]
  |  Branch (978:18): [True: 0, False: 0]
  ------------------
  979|      0|      return result;
  980|      0|  }
  981|       |
  982|  3.94k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  655|  3.94k|  do { \
  |  |  656|  3.94k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  221|  3.94k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  657|  3.94k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1079|  3.94k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  658|  3.94k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  221|  3.94k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  659|  3.94k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  221|  3.94k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  864|  3.94k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  660|  3.94k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (660:11): [Folded, False: 3.94k]
  |  |  ------------------
  ------------------
  |  Branch (982:3): [True: 3.94k, False: 0]
  |  Branch (982:3): [True: 0, False: 0]
  |  Branch (982:3): [True: 3.94k, False: 0]
  |  Branch (982:3): [True: 0, False: 0]
  ------------------
  983|  3.94k|  CURL_TRC_CF(data, cf, "cf_connect()");
  ------------------
  |  |  153|  3.94k|  do {                                          \
  |  |  154|  3.94k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.94k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.89k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.94k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.94k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.89k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.94k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.94k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.94k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.94k]
  |  |  ------------------
  ------------------
  984|  3.94k|  DEBUGASSERT(connssl);
  ------------------
  |  | 1079|  3.94k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (984:3): [True: 0, False: 3.94k]
  |  Branch (984:3): [True: 3.94k, False: 0]
  ------------------
  985|       |
  986|  3.94k|  *done = FALSE;
  ------------------
  |  | 1056|  3.94k|#define FALSE false
  ------------------
  987|       |
  988|  3.94k|  if(!connssl->prefs_checked) {
  ------------------
  |  Branch (988:6): [True: 3.47k, False: 475]
  ------------------
  989|  3.47k|    if(!ssl_prefs_check(data)) {
  ------------------
  |  Branch (989:8): [True: 2, False: 3.47k]
  ------------------
  990|      2|      result = CURLE_SSL_CONNECT_ERROR;
  991|      2|      goto out;
  992|      2|    }
  993|  3.47k|    connssl->prefs_checked = TRUE;
  ------------------
  |  | 1053|  3.47k|#define TRUE true
  ------------------
  994|  3.47k|  }
  995|       |
  996|  3.94k|  result = connssl->ssl_impl->do_connect(cf, data, done);
  997|       |
  998|  3.94k|  if(!result && *done) {
  ------------------
  |  Branch (998:6): [True: 484, False: 3.46k]
  |  Branch (998:17): [True: 0, False: 484]
  ------------------
  999|      0|    cf->connected = TRUE;
  ------------------
  |  | 1053|      0|#define TRUE true
  ------------------
 1000|      0|    if(connssl->state == ssl_connection_complete) {
  ------------------
  |  Branch (1000:8): [True: 0, False: 0]
  ------------------
 1001|      0|      connssl->handshake_done = *Curl_pgrs_now(data);
 1002|      0|    }
 1003|      0|    if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (1003:8): [True: 0, False: 0]
  ------------------
 1004|      0|      infof(data, "SSLKEYLOGFILE set, all TLS secrets are logged to '%s'",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1005|      0|            Curl_tls_keylog_file_name());
 1006|       |#ifdef LIBRESSL_VERSION_NUMBER
 1007|       |      infof(data, "Note LibreSSL only supports SSLKEYLOGFILE for TLS <= 1.2");
 1008|       |#endif
 1009|      0|    }
 1010|       |    /* Connection can be deferred when sending early data */
 1011|      0|    DEBUGASSERT(connssl->state == ssl_connection_complete ||
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1011:5): [True: 0, False: 0]
  |  Branch (1011:5): [True: 0, False: 0]
  |  Branch (1011:5): [True: 0, False: 0]
  |  Branch (1011:5): [True: 0, False: 0]
  ------------------
 1012|      0|                connssl->state == ssl_connection_deferred);
 1013|      0|    DEBUGASSERT(connssl->state != ssl_connection_deferred ||
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1013:5): [True: 0, False: 0]
  |  Branch (1013:5): [True: 0, False: 0]
  |  Branch (1013:5): [True: 0, False: 0]
  |  Branch (1013:5): [True: 0, False: 0]
  ------------------
 1014|      0|                connssl->earlydata_state > ssl_earlydata_none);
 1015|      0|  }
 1016|  3.94k|out:
 1017|  3.94k|  CURL_TRC_CF(data, cf, "cf_connect() -> %d, done=%d", (int)result, *done);
  ------------------
  |  |  153|  3.94k|  do {                                          \
  |  |  154|  3.94k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.94k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.89k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.94k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.94k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.89k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.94k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.94k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.94k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.94k]
  |  |  ------------------
  ------------------
 1018|  3.94k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  663|  3.94k|  do { \
  |  |  664|  3.94k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1079|  3.94k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  665|  3.94k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1079|  3.94k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  666|  3.94k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  221|  3.94k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  667|  3.94k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (667:11): [Folded, False: 3.94k]
  |  |  ------------------
  ------------------
  |  Branch (1018:3): [True: 0, False: 3.94k]
  |  Branch (1018:3): [True: 3.94k, False: 0]
  |  Branch (1018:3): [True: 3.94k, False: 0]
  |  Branch (1018:3): [True: 0, False: 0]
  |  Branch (1018:3): [True: 3.94k, False: 0]
  |  Branch (1018:3): [True: 0, False: 0]
  ------------------
 1019|  3.94k|  return result;
 1020|  3.94k|}
vtls.c:ssl_prefs_check:
  164|  3.47k|{
  165|       |  /* check for CURLOPT_SSLVERSION invalid parameter value */
  166|  3.47k|  const unsigned char sslver = data->set.ssl.primary.version;
  167|  3.47k|  if(sslver >= CURL_SSLVERSION_LAST) {
  ------------------
  |  | 2401|  3.47k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (167:6): [True: 0, False: 3.47k]
  ------------------
  168|      0|    failf(data, "Unrecognized parameter value passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  169|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  170|      0|  }
  171|       |
  172|  3.47k|  switch(data->set.ssl.primary.version_max) {
  173|  3.39k|  case CURL_SSLVERSION_MAX_NONE:
  ------------------
  |  | 2403|  3.39k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (173:3): [True: 3.39k, False: 80]
  ------------------
  174|  3.39k|  case CURL_SSLVERSION_MAX_DEFAULT:
  ------------------
  |  | 2404|  3.39k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2393|  3.39k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (174:3): [True: 2, False: 3.47k]
  ------------------
  175|  3.39k|    break;
  176|       |
  177|     78|  default:
  ------------------
  |  Branch (177:3): [True: 78, False: 3.39k]
  ------------------
  178|     78|    if((data->set.ssl.primary.version_max >> 16) < sslver) {
  ------------------
  |  Branch (178:8): [True: 2, False: 76]
  ------------------
  179|      2|      failf(data, "CURL_SSLVERSION_MAX incompatible with CURL_SSLVERSION");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  180|      2|      return FALSE;
  ------------------
  |  | 1056|      2|#define FALSE false
  ------------------
  181|      2|    }
  182|  3.47k|  }
  183|       |
  184|  3.47k|  return TRUE;
  ------------------
  |  | 1053|  3.47k|#define TRUE true
  ------------------
  185|  3.47k|}
vtls.c:ssl_cf_adjust_pollset:
 1217|    484|{
 1218|    484|  struct ssl_connect_data *connssl = cf->ctx;
 1219|    484|  struct cf_call_data save;
 1220|    484|  CURLcode result;
 1221|       |
 1222|    484|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  655|    484|  do { \
  |  |  656|    484|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  221|    484|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  657|    484|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1079|    484|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  658|    484|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  221|    484|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  659|    484|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  221|    484|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  864|    484|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  660|    484|  } while(0)
  |  |  ------------------
  |  |  |  Branch (660:11): [Folded, False: 484]
  |  |  ------------------
  ------------------
  |  Branch (1222:3): [True: 484, False: 0]
  |  Branch (1222:3): [True: 0, False: 0]
  |  Branch (1222:3): [True: 484, False: 0]
  |  Branch (1222:3): [True: 0, False: 0]
  ------------------
 1223|    484|  result = connssl->ssl_impl->adjust_pollset(cf, data, ps);
 1224|    484|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  663|    484|  do { \
  |  |  664|    484|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1079|    484|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  665|    484|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1079|    484|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  666|    484|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  221|    484|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  667|    484|  } while(0)
  |  |  ------------------
  |  |  |  Branch (667:11): [Folded, False: 484]
  |  |  ------------------
  ------------------
  |  Branch (1224:3): [True: 0, False: 484]
  |  Branch (1224:3): [True: 484, False: 0]
  |  Branch (1224:3): [True: 484, False: 0]
  |  Branch (1224:3): [True: 0, False: 0]
  |  Branch (1224:3): [True: 484, False: 0]
  |  Branch (1224:3): [True: 0, False: 0]
  ------------------
 1225|    484|  return result;
 1226|    484|}
vtls.c:ssl_cf_cntrl:
 1273|      5|{
 1274|      5|  struct ssl_connect_data *connssl = cf->ctx;
 1275|       |
 1276|      5|  (void)arg1;
 1277|      5|  (void)arg2;
 1278|      5|  (void)data;
 1279|      5|  switch(event) {
  ------------------
  |  Branch (1279:10): [True: 0, False: 5]
  ------------------
 1280|      0|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  121|      0|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (1280:3): [True: 0, False: 5]
  ------------------
 1281|      0|    if(connssl->negotiated.alpn && !cf->sockindex) {
  ------------------
  |  Branch (1281:8): [True: 0, False: 0]
  |  Branch (1281:36): [True: 0, False: 0]
  ------------------
 1282|      0|      if(!strcmp("http/1.1", connssl->negotiated.alpn))
  ------------------
  |  Branch (1282:10): [True: 0, False: 0]
  ------------------
 1283|      0|        cf->conn->httpversion_seen = 11;
 1284|      0|      else if(!strcmp("h2", connssl->negotiated.alpn))
  ------------------
  |  Branch (1284:15): [True: 0, False: 0]
  ------------------
 1285|      0|        cf->conn->httpversion_seen = 20;
 1286|      0|      else if(!strcmp("h3", connssl->negotiated.alpn))
  ------------------
  |  Branch (1286:15): [True: 0, False: 0]
  ------------------
 1287|      0|        cf->conn->httpversion_seen = 30;
 1288|      0|    }
 1289|      0|    break;
 1290|      5|  }
 1291|      5|  return CURLE_OK;
 1292|      5|}
vtls.c:ssl_cf_query:
 1231|  7.41k|{
 1232|  7.41k|  struct ssl_connect_data *connssl = cf->ctx;
 1233|       |
 1234|  7.41k|  switch(query) {
 1235|  3.46k|  case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  165|  3.46k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (1235:3): [True: 3.46k, False: 3.95k]
  ------------------
 1236|  3.46k|    struct curltime *when = pres2;
 1237|  3.46k|    if(cf->connected && !Curl_ssl_cf_is_proxy(cf))
  ------------------
  |  Branch (1237:8): [True: 0, False: 3.46k]
  |  Branch (1237:25): [True: 0, False: 0]
  ------------------
 1238|      0|      *when = connssl->handshake_done;
 1239|  3.46k|    return CURLE_OK;
 1240|      0|  }
 1241|      0|  case CF_QUERY_SSL_INFO:
  ------------------
  |  |  174|      0|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1241:3): [True: 0, False: 7.41k]
  ------------------
 1242|      0|  case CF_QUERY_SSL_CTX_INFO:
  ------------------
  |  |  175|      0|#define CF_QUERY_SSL_CTX_INFO      13  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1242:3): [True: 0, False: 7.41k]
  ------------------
 1243|      0|    if(!Curl_ssl_cf_is_proxy(cf)) {
  ------------------
  |  Branch (1243:8): [True: 0, False: 0]
  ------------------
 1244|      0|      struct curl_tlssessioninfo *info = pres2;
 1245|      0|      struct cf_call_data save;
 1246|      0|      CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  655|      0|  do { \
  |  |  656|      0|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  221|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  657|      0|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  658|      0|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  221|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  659|      0|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  221|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  864|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  660|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (660:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1246:7): [True: 0, False: 0]
  |  Branch (1246:7): [True: 0, False: 0]
  |  Branch (1246:7): [True: 0, False: 0]
  |  Branch (1246:7): [True: 0, False: 0]
  ------------------
 1247|      0|      info->backend = Curl_ssl_backend();
 1248|      0|      info->internals = connssl->ssl_impl->get_internals(
 1249|      0|        cf->ctx, (query == CF_QUERY_SSL_INFO) ?
  ------------------
  |  |  174|      0|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1249:18): [True: 0, False: 0]
  ------------------
 1250|      0|        CURLINFO_TLS_SSL_PTR : CURLINFO_TLS_SESSION);
 1251|      0|      CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  663|      0|  do { \
  |  |  664|      0|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  665|      0|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  666|      0|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  221|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  667|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (667:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1251:7): [True: 0, False: 0]
  |  Branch (1251:7): [True: 0, False: 0]
  |  Branch (1251:7): [True: 0, False: 0]
  |  Branch (1251:7): [True: 0, False: 0]
  |  Branch (1251:7): [True: 0, False: 0]
  |  Branch (1251:7): [True: 0, False: 0]
  ------------------
 1252|      0|      return CURLE_OK;
 1253|      0|    }
 1254|      0|    break;
 1255|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  177|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1255:3): [True: 0, False: 7.41k]
  ------------------
 1256|      0|    const char **palpn = pres2;
 1257|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1257:5): [True: 0, False: 0]
  |  Branch (1257:5): [True: 0, False: 0]
  ------------------
 1258|      0|    *palpn = connssl->negotiated.alpn;
 1259|      0|    CURL_TRC_CF(data, cf, "query ALPN: returning '%s'", *palpn);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1260|      0|    return CURLE_OK;
 1261|      0|  }
 1262|  3.95k|  default:
  ------------------
  |  Branch (1262:3): [True: 3.95k, False: 3.46k]
  ------------------
 1263|  3.95k|    break;
 1264|  7.41k|  }
 1265|  3.95k|  return cf->next ?
  ------------------
  |  Branch (1265:10): [True: 3.95k, False: 0]
  ------------------
 1266|  3.95k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1267|  3.95k|    CURLE_UNKNOWN_OPTION;
 1268|  7.41k|}
vtls.c:cf_ssl_create:
 1346|  3.04k|{
 1347|  3.04k|  struct Curl_cfilter *cf = NULL;
 1348|  3.04k|  struct ssl_connect_data *ctx;
 1349|  3.04k|  CURLcode result;
 1350|       |
 1351|  3.04k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1079|  3.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1351:3): [True: 0, False: 3.04k]
  |  Branch (1351:3): [True: 3.04k, False: 0]
  ------------------
 1352|       |
 1353|       |#ifdef CURL_DISABLE_HTTP
 1354|       |  (void)conn;
 1355|       |  /* We only support ALPN for HTTP so far. */
 1356|       |  DEBUGASSERT(!conn->bits.tls_enable_alpn);
 1357|       |  ctx = cf_ctx_new(data, NULL);
 1358|       |#else
 1359|  3.04k|  ctx = cf_ctx_new(data, alpn_get_spec(data->state.http_neg.wanted,
 1360|  3.04k|                                       data->state.http_neg.preferred,
 1361|  3.04k|                                       (bool)data->state.http_neg.only_10,
 1362|  3.04k|                                       (bool)conn->bits.tls_enable_alpn));
 1363|  3.04k|#endif
 1364|  3.04k|  if(!ctx) {
  ------------------
  |  Branch (1364:6): [True: 0, False: 3.04k]
  ------------------
 1365|      0|    result = CURLE_OUT_OF_MEMORY;
 1366|      0|    goto out;
 1367|      0|  }
 1368|       |
 1369|  3.04k|  result = Curl_cf_create(&cf, &Curl_cft_ssl, ctx);
 1370|       |
 1371|  3.04k|out:
 1372|  3.04k|  if(result)
  ------------------
  |  Branch (1372:6): [True: 0, False: 3.04k]
  ------------------
 1373|      0|    cf_ctx_free(ctx);
 1374|  3.04k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1374:10): [True: 0, False: 3.04k]
  ------------------
 1375|  3.04k|  return result;
 1376|  3.04k|}
vtls.c:cf_ctx_new:
  189|  3.47k|{
  190|  3.47k|  struct ssl_connect_data *ctx;
  191|       |
  192|  3.47k|  (void)data;
  193|  3.47k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1475|  3.47k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  194|  3.47k|  if(!ctx)
  ------------------
  |  Branch (194:6): [True: 0, False: 3.47k]
  ------------------
  195|      0|    return NULL;
  196|       |
  197|  3.47k|  ctx->ssl_impl = Curl_ssl;
  198|  3.47k|  ctx->alpn = alpn;
  199|  3.47k|  Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  110|  3.47k|#define CURL_SSL_EARLY_MAX      (64 * 1024)
  ------------------
                Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  115|  3.47k|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  200|  3.47k|  ctx->backend = curlx_calloc(1, ctx->ssl_impl->sizeof_ssl_backend_data);
  ------------------
  |  | 1475|  3.47k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  201|  3.47k|  if(!ctx->backend) {
  ------------------
  |  Branch (201:6): [True: 0, False: 3.47k]
  ------------------
  202|      0|    curlx_free(ctx);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  203|      0|    return NULL;
  204|      0|  }
  205|  3.47k|  return ctx;
  206|  3.47k|}
vtls.c:alpn_get_spec:
  102|  3.47k|{
  103|  3.47k|  if(!use_alpn)
  ------------------
  |  Branch (103:6): [True: 9, False: 3.46k]
  ------------------
  104|      9|    return NULL;
  105|       |  /* If HTTP/1.0 is the wanted protocol then use ALPN http/1.0 and http/1.1.
  106|       |     This is for compatibility reasons since some HTTP/1.0 servers with old
  107|       |     ALPN implementations understand ALPN http/1.1 but not http/1.0. */
  108|  3.46k|  if(only_http_10 && (wanted & CURL_HTTP_V1x))
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (108:6): [True: 1, False: 3.46k]
  |  Branch (108:22): [True: 1, False: 0]
  ------------------
  109|      1|    return &ALPN_SPEC_H10_H11;
  110|  3.46k|#ifdef USE_HTTP2
  111|  3.46k|  if(wanted & CURL_HTTP_V2x) {
  ------------------
  |  |   41|  3.46k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (111:6): [True: 3.03k, False: 428]
  ------------------
  112|  3.03k|    if(wanted & CURL_HTTP_V1x)
  ------------------
  |  |   40|  3.03k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (112:8): [True: 3.03k, False: 2]
  ------------------
  113|  3.03k|      return (preferred == CURL_HTTP_V1x) ?
  ------------------
  |  |   40|  3.03k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (113:14): [True: 0, False: 3.03k]
  ------------------
  114|  3.03k|        &ALPN_SPEC_H11_H2 : &ALPN_SPEC_H2_H11;
  115|      2|    return &ALPN_SPEC_H2;
  116|  3.03k|  }
  117|       |#else
  118|       |  (void)wanted;
  119|       |  (void)preferred;
  120|       |#endif
  121|    428|  return &ALPN_SPEC_H11;
  122|  3.46k|}
vtls.c:cf_ssl_peer_init:
 1382|  3.47k|{
 1383|  3.47k|  struct ssl_connect_data *connssl = cf->ctx;
 1384|  3.47k|  char tls_id[80];
 1385|  3.47k|  connssl->ssl_impl->version(tls_id, sizeof(tls_id) - 1);
 1386|  3.47k|  return Curl_ssl_peer_init(&connssl->peer, origin, peer, sslc,
 1387|  3.47k|                            tls_id, TRNSPRT_TCP);
  ------------------
  |  |  237|  3.47k|#define TRNSPRT_TCP  3
  ------------------
 1388|  3.47k|}
vtls.c:cf_ssl_proxy_create:
 1445|    434|{
 1446|    434|  struct Curl_cfilter *cf = NULL;
 1447|    434|  struct ssl_connect_data *ctx;
 1448|    434|  CURLcode result;
 1449|       |  /* ALPN is default, but if user explicitly disables it, obey */
 1450|    434|  bool use_alpn = (bool)data->set.ssl_enable_alpn;
 1451|    434|  http_majors wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|    434|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1452|       |
 1453|    434|  (void)conn;
 1454|    434|#ifdef USE_HTTP2
 1455|    434|  if(conn->http_proxy.proxytype == CURLPROXY_HTTPS2) {
  ------------------
  |  |  796|    434|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (1455:6): [True: 1, False: 433]
  ------------------
 1456|      1|    use_alpn = TRUE;
  ------------------
  |  | 1053|      1|#define TRUE true
  ------------------
 1457|      1|    wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|      1|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1458|      1|  }
 1459|    434|#endif
 1460|       |
 1461|    434|  ctx = cf_ctx_new(data, alpn_get_spec(wanted, 0, FALSE, use_alpn));
  ------------------
  |  | 1056|    434|#define FALSE false
  ------------------
 1462|    434|  if(!ctx) {
  ------------------
  |  Branch (1462:6): [True: 0, False: 434]
  ------------------
 1463|      0|    result = CURLE_OUT_OF_MEMORY;
 1464|      0|    goto out;
 1465|      0|  }
 1466|    434|  result = Curl_cf_create(&cf, &Curl_cft_ssl_proxy, ctx);
 1467|       |
 1468|    434|out:
 1469|    434|  if(result)
  ------------------
  |  Branch (1469:6): [True: 0, False: 434]
  ------------------
 1470|      0|    cf_ctx_free(ctx);
 1471|    434|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1471:10): [True: 0, False: 434]
  ------------------
 1472|    434|  return result;
 1473|    434|}

Curl_ssl_config_init:
  101|  52.5k|{
  102|       |  /*
  103|       |   * libcurl 7.10 introduced SSL verification *by default*! This needs to be
  104|       |   * switched off unless wanted.
  105|       |   */
  106|  52.5k|  sslc->verifypeer = TRUE;
  ------------------
  |  | 1053|  52.5k|#define TRUE true
  ------------------
  107|  52.5k|  sslc->verifyhost = TRUE;
  ------------------
  |  | 1053|  52.5k|#define TRUE true
  ------------------
  108|       |  sslc->cache_session = TRUE; /* caching by default */
  ------------------
  |  | 1053|  52.5k|#define TRUE true
  ------------------
  109|  52.5k|}
Curl_ssl_config_cleanup:
  112|  67.2k|{
  113|  67.2k|  if(sslc->deep_copy) {
  ------------------
  |  Branch (113:6): [True: 12.5k, False: 54.7k]
  ------------------
  114|  12.5k|    curlx_safefree(sslc->CApath);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  115|  12.5k|    curlx_safefree(sslc->CAfile);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  116|  12.5k|    curlx_safefree(sslc->issuercert);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  117|  12.5k|    curlx_safefree(sslc->clientcert);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  118|  12.5k|    curlx_safefree(sslc->cipher_list);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  119|  12.5k|    curlx_safefree(sslc->cipher_list13);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  120|  12.5k|    curlx_safefree(sslc->pinned_key);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  121|  12.5k|    curlx_safefree(sslc->cert_blob);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  122|  12.5k|    curlx_safefree(sslc->ca_info_blob);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  123|  12.5k|    curlx_safefree(sslc->issuercert_blob);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  124|  12.5k|    curlx_safefree(sslc->key_blob);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  125|  12.5k|    curlx_safefree(sslc->curves);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  126|  12.5k|    curlx_safefree(sslc->signature_algorithms);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  127|  12.5k|    curlx_safefree(sslc->CRLfile);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  128|  12.5k|    curlx_safefree(sslc->cert_type);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  129|  12.5k|    curlx_safefree(sslc->key);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  130|  12.5k|    curlx_safefree(sslc->key_type);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  131|  12.5k|    curlx_safefree(sslc->key_passwd);
  ------------------
  |  | 1336|  12.5k|  do {                      \
  |  | 1337|  12.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|  12.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|  12.5k|    (ptr) = NULL;           \
  |  | 1339|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  132|       |    sslc->deep_copy = FALSE;
  ------------------
  |  | 1056|  12.5k|#define FALSE false
  ------------------
  133|  12.5k|  }
  134|  67.2k|}
Curl_ssl_easy_config_complete:
  241|  6.50k|{
  242|  6.50k|  struct ssl_config_data *sslc = &data->set.ssl;
  243|  6.50k|#if defined(CURL_CA_PATH) || defined(CURL_CA_BUNDLE)
  244|  6.50k|  struct UserDefined *set = &data->set;
  245|  6.50k|  CURLcode result;
  246|  6.50k|#endif
  247|       |
  248|  6.50k|  ssl_easy_config_compl_options(origin, data->state.initial_origin, sslc);
  249|       |
  250|  6.50k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (250:6): [True: 6.50k, False: 0]
  ------------------
  251|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  252|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  253|       |      sslc->native_ca_store = TRUE;
  254|       |#endif
  255|  6.50k|#ifdef CURL_CA_PATH
  256|  6.50k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (256:8): [True: 5.77k, False: 725]
  |  Branch (256:32): [True: 5.77k, False: 0]
  ------------------
  257|  5.77k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH], CURL_CA_PATH);
  ------------------
  |  |   32|  5.77k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  258|  5.77k|      if(result)
  ------------------
  |  Branch (258:10): [True: 0, False: 5.77k]
  ------------------
  259|      0|        return result;
  260|  5.77k|    }
  261|  6.50k|#endif
  262|  6.50k|#ifdef CURL_CA_BUNDLE
  263|  6.50k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (263:8): [True: 5.72k, False: 776]
  |  Branch (263:32): [True: 5.72k, False: 0]
  ------------------
  264|  5.72k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE], CURL_CA_BUNDLE);
  ------------------
  |  |   26|  5.72k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  265|  5.72k|      if(result)
  ------------------
  |  Branch (265:10): [True: 0, False: 5.72k]
  ------------------
  266|      0|        return result;
  267|  5.72k|    }
  268|  6.50k|#endif
  269|  6.50k|  }
  270|  6.50k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE];
  271|  6.50k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE];
  272|  6.50k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH];
  273|  6.50k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST];
  274|  6.50k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST];
  275|  6.50k|  sslc->primary.signature_algorithms =
  276|  6.50k|    data->set.str[STRING_SSL_SIGNATURE_ALGORITHMS];
  277|  6.50k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO];
  278|  6.50k|  sslc->primary.curves = data->set.str[STRING_SSL_EC_CURVES];
  279|       |  /* Maybe these should not be used for another origin. But for
  280|       |   * backwards compatibility, keep them in. */
  281|  6.50k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT];
  282|  6.50k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT];
  283|       |
  284|  6.50k|  if(Curl_peer_equal(data->state.initial_origin, origin)) {
  ------------------
  |  Branch (284:6): [True: 6.50k, False: 0]
  ------------------
  285|  6.50k|    sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY];
  286|  6.50k|    sslc->primary.cert_blob = data->set.blobs[BLOB_CERT];
  287|  6.50k|    sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE];
  288|  6.50k|    sslc->primary.key = data->set.str[STRING_KEY];
  289|  6.50k|    sslc->primary.key_type = data->set.str[STRING_KEY_TYPE];
  290|  6.50k|    sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD];
  291|  6.50k|    sslc->primary.clientcert = data->set.str[STRING_CERT];
  292|  6.50k|    sslc->primary.key_blob = data->set.blobs[BLOB_KEY];
  293|  6.50k|  }
  294|      0|  else {
  295|      0|    sslc->primary.pinned_key = NULL;
  296|      0|    sslc->primary.cert_blob = NULL;
  297|      0|    sslc->primary.cert_type = NULL;
  298|      0|    sslc->primary.key = NULL;
  299|      0|    sslc->primary.key_type = NULL;
  300|      0|    sslc->primary.key_passwd = NULL;
  301|      0|    sslc->primary.clientcert = NULL;
  302|      0|    sslc->primary.key_blob = NULL;
  303|      0|  }
  304|       |
  305|  6.50k|#ifndef CURL_DISABLE_PROXY
  306|  6.50k|  sslc = &data->set.proxy_ssl;
  307|       |  /* no initial origin for proxy, it is not changed for redirects */
  308|  6.50k|  ssl_easy_config_compl_options(NULL, NULL, sslc);
  309|       |
  310|  6.50k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (310:6): [True: 6.50k, False: 0]
  ------------------
  311|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  312|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  313|       |      sslc->native_ca_store = TRUE;
  314|       |#endif
  315|  6.50k|#ifdef CURL_CA_PATH
  316|  6.50k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH_PROXY]) {
  ------------------
  |  Branch (316:8): [True: 6.49k, False: 5]
  |  Branch (316:32): [True: 6.47k, False: 27]
  ------------------
  317|  6.47k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY],
  318|  6.47k|                              CURL_CA_PATH);
  ------------------
  |  |   32|  6.47k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  319|  6.47k|      if(result)
  ------------------
  |  Branch (319:10): [True: 0, False: 6.47k]
  ------------------
  320|      0|        return result;
  321|  6.47k|    }
  322|  6.50k|#endif
  323|  6.50k|#ifdef CURL_CA_BUNDLE
  324|  6.50k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE_PROXY]) {
  ------------------
  |  Branch (324:8): [True: 6.50k, False: 1]
  |  Branch (324:32): [True: 6.47k, False: 27]
  ------------------
  325|  6.47k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY],
  326|  6.47k|                              CURL_CA_BUNDLE);
  ------------------
  |  |   26|  6.47k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  327|  6.47k|      if(result)
  ------------------
  |  Branch (327:10): [True: 0, False: 6.47k]
  ------------------
  328|      0|        return result;
  329|  6.47k|    }
  330|  6.50k|#endif
  331|  6.50k|  }
  332|  6.50k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE_PROXY];
  333|  6.50k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH_PROXY];
  334|  6.50k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST_PROXY];
  335|  6.50k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST_PROXY];
  336|  6.50k|  sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY];
  337|  6.50k|  sslc->primary.cert_blob = data->set.blobs[BLOB_CERT_PROXY];
  338|  6.50k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO_PROXY];
  339|  6.50k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT_PROXY];
  340|  6.50k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT_PROXY];
  341|  6.50k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY];
  342|  6.50k|  sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE_PROXY];
  343|  6.50k|  sslc->primary.key = data->set.str[STRING_KEY_PROXY];
  344|  6.50k|  sslc->primary.key_type = data->set.str[STRING_KEY_TYPE_PROXY];
  345|  6.50k|  sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD_PROXY];
  346|  6.50k|  sslc->primary.clientcert = data->set.str[STRING_CERT_PROXY];
  347|  6.50k|  sslc->primary.key_blob = data->set.blobs[BLOB_KEY_PROXY];
  348|  6.50k|#endif /* CURL_DISABLE_PROXY */
  349|       |
  350|  6.50k|  return CURLE_OK;
  351|  6.50k|}
Curl_ssl_conn_config_init:
  355|  6.25k|{
  356|       |  /* Clone "primary" SSL configurations from the easy handle to
  357|       |   * the connection. They are used for connection cache matching and
  358|       |   * probably outlive the easy handle */
  359|  6.25k|  if(!clone_ssl_primary_config(&data->set.ssl.primary, &conn->ssl_config))
  ------------------
  |  Branch (359:6): [True: 0, False: 6.25k]
  ------------------
  360|      0|    return CURLE_OUT_OF_MEMORY;
  361|  6.25k|#ifndef CURL_DISABLE_PROXY
  362|  6.25k|  if(!clone_ssl_primary_config(&data->set.proxy_ssl.primary,
  ------------------
  |  Branch (362:6): [True: 0, False: 6.25k]
  ------------------
  363|  6.25k|                               &conn->proxy_ssl_config))
  364|      0|    return CURLE_OUT_OF_MEMORY;
  365|  6.25k|#endif
  366|  6.25k|  return CURLE_OK;
  367|  6.25k|}
Curl_ssl_conn_config_cleanup:
  370|  7.37k|{
  371|  7.37k|  Curl_ssl_config_cleanup(&conn->ssl_config);
  372|  7.37k|#ifndef CURL_DISABLE_PROXY
  373|  7.37k|  Curl_ssl_config_cleanup(&conn->proxy_ssl_config);
  374|  7.37k|#endif
  375|  7.37k|}
Curl_ssl_conn_config_update:
  378|  2.45k|{
  379|       |  /* May be called on an easy that has no connection yet */
  380|  2.45k|  if(data->conn) {
  ------------------
  |  Branch (380:6): [True: 0, False: 2.45k]
  ------------------
  381|      0|    struct ssl_primary_config *src, *dest;
  382|      0|#ifndef CURL_DISABLE_PROXY
  383|      0|    src = for_proxy ? &data->set.proxy_ssl.primary : &data->set.ssl.primary;
  ------------------
  |  Branch (383:11): [True: 0, False: 0]
  ------------------
  384|      0|    dest = for_proxy ? &data->conn->proxy_ssl_config : &data->conn->ssl_config;
  ------------------
  |  Branch (384:12): [True: 0, False: 0]
  ------------------
  385|       |#else
  386|       |    (void)for_proxy;
  387|       |    src = &data->set.ssl.primary;
  388|       |    dest = &data->conn->ssl_config;
  389|       |#endif
  390|      0|    dest->verifyhost = src->verifyhost;
  391|      0|    dest->verifypeer = src->verifypeer;
  392|      0|    dest->verifystatus = src->verifystatus;
  393|      0|  }
  394|  2.45k|}
vtls_config.c:ssl_easy_config_compl_options:
  223|  13.0k|{
  224|  13.0k|  uint8_t options = sslc->primary.ssl_options;
  225|       |  /* If set via CURLOPT_(PROXY_)SSL_OPTIONS, we definitely use it.
  226|       |   * If not, we switch it on for supported backends if no custom
  227|       |   * CA settings exist. */
  228|  13.0k|  sslc->native_ca_store = !!(options & CURLSSLOPT_NATIVE_CA);
  ------------------
  |  |  965|  13.0k|#define CURLSSLOPT_NATIVE_CA (1L << 4)
  ------------------
  229|  13.0k|  sslc->enable_beast = !!(options & CURLSSLOPT_ALLOW_BEAST);
  ------------------
  |  |  948|  13.0k|#define CURLSSLOPT_ALLOW_BEAST (1L << 0)
  ------------------
  230|  13.0k|  sslc->no_partialchain = !!(options & CURLSSLOPT_NO_PARTIALCHAIN);
  ------------------
  |  |  956|  13.0k|#define CURLSSLOPT_NO_PARTIALCHAIN (1L << 2)
  ------------------
  231|  13.0k|  sslc->no_revoke = !!(options & CURLSSLOPT_NO_REVOKE);
  ------------------
  |  |  952|  13.0k|#define CURLSSLOPT_NO_REVOKE (1L << 1)
  ------------------
  232|  13.0k|  sslc->revoke_best_effort = !!(options & CURLSSLOPT_REVOKE_BEST_EFFORT);
  ------------------
  |  |  961|  13.0k|#define CURLSSLOPT_REVOKE_BEST_EFFORT (1L << 3)
  ------------------
  233|  13.0k|  sslc->earlydata = !!(options & CURLSSLOPT_EARLYDATA);
  ------------------
  |  |  972|  13.0k|#define CURLSSLOPT_EARLYDATA (1L << 6)
  ------------------
  234|       |
  235|  13.0k|  sslc->auto_client_cert = Curl_peer_equal(origin, initial_origin) &&
  ------------------
  |  Branch (235:28): [True: 13.0k, False: 0]
  ------------------
  236|  13.0k|                           !!(options & CURLSSLOPT_AUTO_CLIENT_CERT);
  ------------------
  |  |  969|  13.0k|#define CURLSSLOPT_AUTO_CLIENT_CERT (1L << 5)
  ------------------
  |  Branch (236:28): [True: 4, False: 13.0k]
  ------------------
  237|  13.0k|}
vtls_config.c:clone_ssl_primary_config:
  187|  12.5k|{
  188|  12.5k|  DEBUGASSERT(!dest->deep_copy);
  ------------------
  |  | 1079|  12.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (188:3): [True: 0, False: 12.5k]
  |  Branch (188:3): [True: 12.5k, False: 0]
  ------------------
  189|  12.5k|  dest->deep_copy = TRUE;
  ------------------
  |  | 1053|  12.5k|#define TRUE true
  ------------------
  190|  12.5k|  dest->version = source->version;
  191|  12.5k|  dest->version_max = source->version_max;
  192|  12.5k|  dest->verifypeer = source->verifypeer;
  193|  12.5k|  dest->verifyhost = source->verifyhost;
  194|  12.5k|  dest->verifystatus = source->verifystatus;
  195|  12.5k|  dest->cache_session = source->cache_session;
  196|  12.5k|  dest->ssl_options = source->ssl_options;
  197|       |
  198|  12.5k|  CLONE_BLOB(cert_blob);
  ------------------
  |  |   62|  12.5k|  do {                                   \
  |  |   63|  12.5k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (63:8): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |   64|  12.5k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   65|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (65:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  199|  12.5k|  CLONE_BLOB(ca_info_blob);
  ------------------
  |  |   62|  12.5k|  do {                                   \
  |  |   63|  12.5k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (63:8): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |   64|  12.5k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   65|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (65:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  200|  12.5k|  CLONE_BLOB(issuercert_blob);
  ------------------
  |  |   62|  12.5k|  do {                                   \
  |  |   63|  12.5k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (63:8): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |   64|  12.5k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   65|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (65:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  201|  12.5k|  CLONE_STRING(CApath);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 12.5k, False: 0]
  |  |  ------------------
  |  |   53|  12.5k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|  12.5k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|  12.5k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |   55|  12.5k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|  12.5k|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  202|  12.5k|  CLONE_STRING(CAfile);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 12.5k, False: 0]
  |  |  ------------------
  |  |   53|  12.5k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|  12.5k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|  12.5k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |   55|  12.5k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|  12.5k|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  203|  12.5k|  CLONE_STRING(issuercert);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 6, False: 12.5k]
  |  |  ------------------
  |  |   53|      6|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|      6|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      6|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 6]
  |  |  ------------------
  |  |   55|      6|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      6|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  204|  12.5k|  CLONE_STRING(cipher_list);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 858, False: 11.6k]
  |  |  ------------------
  |  |   53|    858|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|    858|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|    858|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 858]
  |  |  ------------------
  |  |   55|    858|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|    858|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  205|  12.5k|  CLONE_STRING(cipher_list13);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 142, False: 12.3k]
  |  |  ------------------
  |  |   53|    142|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|    142|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|    142|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 142]
  |  |  ------------------
  |  |   55|    142|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|    142|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  206|  12.5k|  CLONE_STRING(pinned_key);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 17, False: 12.4k]
  |  |  ------------------
  |  |   53|     17|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|     17|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|     17|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 17]
  |  |  ------------------
  |  |   55|     17|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|     17|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  207|  12.5k|  CLONE_STRING(curves);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 679, False: 11.8k]
  |  |  ------------------
  |  |   53|    679|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|    679|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|    679|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 679]
  |  |  ------------------
  |  |   55|    679|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|    679|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  208|  12.5k|  CLONE_STRING(signature_algorithms);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  209|  12.5k|  CLONE_STRING(CRLfile);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 6.25k, False: 6.25k]
  |  |  ------------------
  |  |   53|  6.25k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|  6.25k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|  6.25k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 6.25k]
  |  |  ------------------
  |  |   55|  6.25k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|  6.25k|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  210|       |  /* SSL credentials: client certificate */
  211|  12.5k|  CLONE_STRING(clientcert);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 104, False: 12.4k]
  |  |  ------------------
  |  |   53|    104|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|    104|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|    104|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 104]
  |  |  ------------------
  |  |   55|    104|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|    104|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  212|  12.5k|  CLONE_STRING(cert_type);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 20, False: 12.4k]
  |  |  ------------------
  |  |   53|     20|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|     20|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|     20|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 20]
  |  |  ------------------
  |  |   55|     20|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|     20|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  213|  12.5k|  CLONE_STRING(key);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 17, False: 12.4k]
  |  |  ------------------
  |  |   53|     17|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|     17|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|     17|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 17]
  |  |  ------------------
  |  |   55|     17|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|     17|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  214|  12.5k|  CLONE_STRING(key_type);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 21, False: 12.4k]
  |  |  ------------------
  |  |   53|     21|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|     21|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|     21|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 21]
  |  |  ------------------
  |  |   55|     21|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|     21|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  215|  12.5k|  CLONE_STRING(key_passwd);
  ------------------
  |  |   51|  12.5k|  do {                                       \
  |  |   52|  12.5k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 14, False: 12.4k]
  |  |  ------------------
  |  |   53|     14|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1472|     14|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|     14|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 14]
  |  |  ------------------
  |  |   55|     14|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   56|     14|    }                                        \
  |  |   57|  12.5k|    else                                     \
  |  |   58|  12.5k|      dest->var = NULL;                      \
  |  |   59|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  216|  12.5k|  CLONE_BLOB(key_blob);
  ------------------
  |  |   62|  12.5k|  do {                                   \
  |  |   63|  12.5k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (63:8): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |   64|  12.5k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1056|      0|#define FALSE false
  |  |  ------------------
  |  |   65|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (65:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  217|  12.5k|  return TRUE;
  ------------------
  |  | 1053|  12.5k|#define TRUE true
  ------------------
  218|  12.5k|}
vtls_config.c:blobdup:
   68|  50.0k|{
   69|  50.0k|  DEBUGASSERT(dest);
  ------------------
  |  | 1079|  50.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (69:3): [True: 0, False: 50.0k]
  |  Branch (69:3): [True: 50.0k, False: 0]
  ------------------
   70|  50.0k|  DEBUGASSERT(!*dest);
  ------------------
  |  | 1079|  50.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (70:3): [True: 0, False: 50.0k]
  |  Branch (70:3): [True: 50.0k, False: 0]
  ------------------
   71|  50.0k|  if(src) {
  ------------------
  |  Branch (71:6): [True: 0, False: 50.0k]
  ------------------
   72|       |    /* only if there is data to dupe! */
   73|      0|    struct curl_blob *d;
   74|      0|    d = curlx_malloc(sizeof(struct curl_blob) + src->len);
  ------------------
  |  | 1473|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   75|      0|    if(!d)
  ------------------
  |  Branch (75:8): [True: 0, False: 0]
  ------------------
   76|      0|      return CURLE_OUT_OF_MEMORY;
   77|      0|    d->len = src->len;
   78|       |    /* Always duplicate because the connection may survive longer than the
   79|       |       handle that passed in the blob. */
   80|      0|    d->flags = CURL_BLOB_COPY;
  ------------------
  |  |   31|      0|#define CURL_BLOB_COPY   1 /* tell libcurl to copy the data */
  ------------------
   81|      0|    d->data = (void *)((char *)d + sizeof(struct curl_blob));
   82|      0|    memcpy(d->data, src->data, src->len);
   83|      0|    *dest = d;
   84|      0|  }
   85|  50.0k|  return CURLE_OK;
   86|  50.0k|}

Curl_ssl_peer_key_make:
  350|  3.47k|{
  351|  3.47k|  return ssl_peer_key_build(sslc, peer, tls_id, ppeer_key);
  352|  3.47k|}
Curl_ssl_session_destroy:
  444|  6.06k|{
  445|  6.06k|  if(s) {
  ------------------
  |  Branch (445:6): [True: 0, False: 6.06k]
  ------------------
  446|       |    /* if in the list, the list destructor takes care of it */
  447|      0|    if(Curl_node_llist(&s->list))
  ------------------
  |  Branch (447:8): [True: 0, False: 0]
  ------------------
  448|      0|      Curl_node_remove(&s->list);
  449|      0|    else {
  450|       |      cf_ssl_scache_session_ldestroy(NULL, s);
  451|      0|    }
  452|      0|  }
  453|  6.06k|}
Curl_ssl_scache_create:
  627|  11.7k|{
  628|  11.7k|  struct Curl_ssl_scache *scache;
  629|  11.7k|  struct Curl_ssl_scache_peer *peers;
  630|  11.7k|  size_t i;
  631|       |
  632|  11.7k|  *pscache = NULL;
  633|  11.7k|  peers = curlx_calloc(max_peers, sizeof(*peers));
  ------------------
  |  | 1475|  11.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  634|  11.7k|  if(!peers)
  ------------------
  |  Branch (634:6): [True: 0, False: 11.7k]
  ------------------
  635|      0|    return CURLE_OUT_OF_MEMORY;
  636|       |
  637|  11.7k|  scache = curlx_calloc(1, sizeof(*scache));
  ------------------
  |  | 1475|  11.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  638|  11.7k|  if(!scache) {
  ------------------
  |  Branch (638:6): [True: 0, False: 11.7k]
  ------------------
  639|      0|    curlx_free(peers);
  ------------------
  |  | 1478|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  640|      0|    return CURLE_OUT_OF_MEMORY;
  641|      0|  }
  642|       |
  643|  11.7k|  scache->magic = CURL_SCACHE_MAGIC;
  ------------------
  |  |   62|  11.7k|#define CURL_SCACHE_MAGIC 0x000e1551
  ------------------
  644|  11.7k|  scache->default_lifetime_secs = (24 * 60 * 60); /* 1 day */
  645|  11.7k|  scache->peer_count = max_peers;
  646|  11.7k|  scache->peers = peers;
  647|  11.7k|  scache->age = 1;
  648|   306k|  for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (648:14): [True: 294k, False: 11.7k]
  ------------------
  649|   294k|    scache->peers[i].max_sessions = max_sessions_per_peer;
  650|   294k|    Curl_llist_init(&scache->peers[i].sessions,
  651|   294k|                    cf_ssl_scache_session_ldestroy);
  652|   294k|  }
  653|  11.7k|#ifdef USE_MUTEX
  654|       |  Curl_mutex_init(&scache->mutex);
  ------------------
  |  |   36|  11.7k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  655|  11.7k|#endif
  656|  11.7k|  *pscache = scache;
  657|  11.7k|  return CURLE_OK;
  658|  11.7k|}
Curl_ssl_scache_destroy:
  661|  11.7k|{
  662|  11.7k|  if(GOOD_SCACHE(scache)) {
  ------------------
  |  |   64|  11.7k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   62|  11.7k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (64:25): [True: 11.7k, False: 0]
  |  |  |  Branch (64:32): [True: 11.7k, False: 0]
  |  |  ------------------
  ------------------
  663|  11.7k|    size_t i;
  664|  11.7k|    scache->magic = 0;
  665|   306k|    for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (665:16): [True: 294k, False: 11.7k]
  ------------------
  666|   294k|      cf_ssl_scache_clear_peer(&scache->peers[i]);
  667|   294k|    }
  668|  11.7k|    curlx_free(scache->peers);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  669|  11.7k|#ifdef USE_MUTEX
  670|  11.7k|    Curl_mutex_destroy(&scache->mutex);
  ------------------
  |  |   39|  11.7k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  671|  11.7k|#endif
  672|  11.7k|    curlx_free(scache);
  ------------------
  |  | 1478|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  673|  11.7k|  }
  674|  11.7k|}
Curl_ssl_scache_use:
  677|  2.58k|{
  678|  2.58k|  if(cf_ssl_scache_get(data)) {
  ------------------
  |  Branch (678:6): [True: 2.58k, False: 0]
  ------------------
  679|  2.58k|    struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
  680|  2.58k|    return ssl_config ? ssl_config->primary.cache_session : FALSE;
  ------------------
  |  | 1056|  2.58k|#define FALSE false
  ------------------
  |  Branch (680:12): [True: 2.58k, False: 0]
  ------------------
  681|  2.58k|  }
  682|      0|  return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  683|  2.58k|}
Curl_ssl_scache_lock:
  687|  2.58k|{
  688|  2.58k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  689|  2.58k|  if(scache) {
  ------------------
  |  Branch (689:6): [True: 2.58k, False: 0]
  ------------------
  690|  2.58k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  2.58k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 2.58k]
  |  |  ------------------
  |  |   86|  2.58k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (86:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  691|      0|      Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION,
  692|      0|                      CURL_LOCK_ACCESS_SINGLE);
  693|  2.58k|#ifdef USE_MUTEX
  694|  2.58k|    Curl_mutex_acquire(&scache->mutex);
  ------------------
  |  |   37|  2.58k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  695|  2.58k|    scache->locking_thread = Curl_thread_get_current_id();
  696|  2.58k|    DEBUGASSERT(!scache->is_locked);
  ------------------
  |  | 1079|  2.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (696:5): [True: 0, False: 2.58k]
  |  Branch (696:5): [True: 2.58k, False: 0]
  ------------------
  697|  2.58k|    scache->is_locked = TRUE;
  ------------------
  |  | 1053|  2.58k|#define TRUE true
  ------------------
  698|  2.58k|    Curl_mutex_release(&scache->mutex);
  ------------------
  |  |   38|  2.58k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  699|       |#else
  700|       |    DEBUGASSERT(!scache->is_locked);
  701|       |    scache->is_locked = TRUE;
  702|       |#endif
  703|  2.58k|  }
  704|  2.58k|}
Curl_ssl_scache_unlock:
  708|  2.58k|{
  709|  2.58k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  710|  2.58k|  if(scache) {
  ------------------
  |  Branch (710:6): [True: 2.58k, False: 0]
  ------------------
  711|  2.58k|#ifdef USE_MUTEX
  712|  2.58k|    Curl_mutex_acquire(&scache->mutex);
  ------------------
  |  |   37|  2.58k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  713|  2.58k|    scache->locking_thread = 0;
  714|  2.58k|    DEBUGASSERT(scache->is_locked);
  ------------------
  |  | 1079|  2.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (714:5): [True: 0, False: 2.58k]
  |  Branch (714:5): [True: 2.58k, False: 0]
  ------------------
  715|  2.58k|    scache->is_locked = FALSE;
  ------------------
  |  | 1056|  2.58k|#define FALSE false
  ------------------
  716|  2.58k|    Curl_mutex_release(&scache->mutex);
  ------------------
  |  |   38|  2.58k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  717|       |#else
  718|       |    DEBUGASSERT(scache->is_locked);
  719|       |    scache->is_locked = FALSE;
  720|       |#endif
  721|  2.58k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  2.58k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 2.58k]
  |  |  ------------------
  |  |   86|  2.58k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (86:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  722|      0|      Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
  723|  2.58k|  }
  724|  2.58k|}
Curl_ssl_scache_is_locked_by_current_thread:
  727|  24.9k|{
  728|  24.9k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  729|  24.9k|  bool locked = FALSE;
  ------------------
  |  | 1056|  24.9k|#define FALSE false
  ------------------
  730|  24.9k|  if(!scache)
  ------------------
  |  Branch (730:6): [True: 0, False: 24.9k]
  ------------------
  731|      0|    return FALSE;
  ------------------
  |  | 1056|      0|#define FALSE false
  ------------------
  732|  24.9k|#ifdef USE_MUTEX
  733|  24.9k|  Curl_mutex_acquire(&scache->mutex);
  ------------------
  |  |   37|  24.9k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  734|  24.9k|  locked = scache->is_locked && Curl_thread_is_current(scache->locking_thread);
  ------------------
  |  Branch (734:12): [True: 0, False: 24.9k]
  |  Branch (734:33): [True: 0, False: 0]
  ------------------
  735|  24.9k|  Curl_mutex_release(&scache->mutex);
  ------------------
  |  |   38|  24.9k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  736|       |#else
  737|       |  locked = (bool)scache->is_locked;
  738|       |#endif
  739|  24.9k|  return locked;
  740|  24.9k|}
Curl_ssl_scache_return:
 1001|  2.58k|{
 1002|       |  /* See RFC 8446 C.4:
 1003|       |   * "Clients SHOULD NOT reuse a ticket for multiple connections." */
 1004|  2.58k|  if(s && s->ietf_tls_id < 0x304)
  ------------------
  |  Branch (1004:6): [True: 0, False: 2.58k]
  |  Branch (1004:11): [True: 0, False: 0]
  ------------------
 1005|      0|    (void)Curl_ssl_scache_put(cf, data, ssl_peer_key, s);
 1006|  2.58k|  else
 1007|  2.58k|    Curl_ssl_session_destroy(s);
 1008|  2.58k|}
Curl_ssl_scache_take:
 1014|  2.58k|{
 1015|  2.58k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
 1016|  2.58k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 1017|  2.58k|  struct Curl_ssl_scache_peer *peer = NULL;
 1018|  2.58k|  struct Curl_llist_node *n;
 1019|  2.58k|  struct Curl_ssl_session *s = NULL;
 1020|  2.58k|  CURLcode result;
 1021|       |
 1022|  2.58k|  *ps = NULL;
 1023|  2.58k|  if(!scache)
  ------------------
  |  Branch (1023:6): [True: 0, False: 2.58k]
  ------------------
 1024|      0|    return CURLE_OK;
 1025|       |
 1026|  2.58k|  Curl_ssl_scache_lock(data);
 1027|  2.58k|  result = cf_ssl_find_peer_by_key(data, scache, ssl_peer_key, conn_config,
 1028|  2.58k|                                   &peer);
 1029|  2.58k|  if(!result && peer) {
  ------------------
  |  Branch (1029:6): [True: 2.58k, False: 0]
  |  Branch (1029:17): [True: 0, False: 2.58k]
  ------------------
 1030|      0|    cf_scache_peer_remove_expired(peer, (curl_off_t)time(NULL));
 1031|      0|    n = Curl_llist_head(&peer->sessions);
 1032|      0|    if(n) {
  ------------------
  |  Branch (1032:8): [True: 0, False: 0]
  ------------------
 1033|      0|      s = Curl_node_take_elem(n);
 1034|      0|      (scache->age)++;            /* increase general age */
 1035|      0|      peer->age = scache->age; /* set this as used in this age */
 1036|      0|    }
 1037|      0|  }
 1038|  2.58k|  if(s) {
  ------------------
  |  Branch (1038:6): [True: 0, False: 2.58k]
  ------------------
 1039|      0|    *ps = s;
 1040|      0|    CURL_TRC_SSLS(data, "took session for %s [proto=0x%x, "
  ------------------
  |  |  194|      0|  do {                                                    \
  |  |  195|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|      0|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (196:27): [True: 0, False: 0]
  |  |  ------------------
  |  |  197|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1041|      0|                  "alpn=%s, earlydata=%zu, quic_tp=%s], %zu sessions remain",
 1042|      0|                  ssl_peer_key, (unsigned int)s->ietf_tls_id, s->alpn,
 1043|      0|                  s->earlydata_max, s->quic_tp ? "yes" : "no",
 1044|      0|                  Curl_llist_count(&peer->sessions));
 1045|      0|  }
 1046|  2.58k|  else {
 1047|  2.58k|    CURL_TRC_SSLS(data, "no cached session for %s", ssl_peer_key);
  ------------------
  |  |  194|  2.58k|  do {                                                    \
  |  |  195|  2.58k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|  2.58k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  5.16k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2.58k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  5.16k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  2.58k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  2.58k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  2.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 2.58k]
  |  |  ------------------
  ------------------
 1048|  2.58k|  }
 1049|  2.58k|  Curl_ssl_scache_unlock(data);
 1050|  2.58k|  return result;
 1051|  2.58k|}
vtls_scache.c:ssl_peer_key_build:
  232|  3.47k|{
  233|  3.47k|  struct dynbuf buf;
  234|  3.47k|  size_t key_len;
  235|  3.47k|  bool is_local = FALSE;
  ------------------
  |  | 1056|  3.47k|#define FALSE false
  ------------------
  236|  3.47k|  CURLcode result;
  237|       |
  238|  3.47k|  *ppeer_key = NULL;
  239|  3.47k|  curlx_dyn_init(&buf, 10 * 1024);
  240|       |
  241|  3.47k|  result = curlx_dyn_addf(&buf, "%s:%d",
  242|  3.47k|                          peer->origin->hostname, peer->origin->port);
  243|  3.47k|  if(result)
  ------------------
  |  Branch (243:6): [True: 0, False: 3.47k]
  ------------------
  244|      0|    goto out;
  245|  3.47k|  result = ssl_peer_key_add_transport(&buf, peer->transport);
  246|  3.47k|  if(result)
  ------------------
  |  Branch (246:6): [True: 0, False: 3.47k]
  ------------------
  247|      0|    goto out;
  248|  3.47k|  result = ssl_peer_key_add_vrfy(&buf, ssl, peer);
  249|  3.47k|  if(result)
  ------------------
  |  Branch (249:6): [True: 0, False: 3.47k]
  ------------------
  250|      0|    goto out;
  251|  3.47k|  if(ssl->version || ssl->version_max) {
  ------------------
  |  Branch (251:6): [True: 3.47k, False: 0]
  |  Branch (251:22): [True: 0, False: 0]
  ------------------
  252|  3.47k|    result = curlx_dyn_addf(&buf, ":TLSVER-%d-%u", ssl->version,
  253|  3.47k|                            (ssl->version_max >> 16));
  254|  3.47k|    if(result)
  ------------------
  |  Branch (254:8): [True: 0, False: 3.47k]
  ------------------
  255|      0|      goto out;
  256|  3.47k|  }
  257|  3.47k|  if(ssl->ssl_options) {
  ------------------
  |  Branch (257:6): [True: 4, False: 3.47k]
  ------------------
  258|      4|    result = curlx_dyn_addf(&buf, ":TLSOPT-%x", ssl->ssl_options);
  259|      4|    if(result)
  ------------------
  |  Branch (259:8): [True: 0, False: 4]
  ------------------
  260|      0|      goto out;
  261|      4|  }
  262|  3.47k|  if(ssl->cipher_list) {
  ------------------
  |  Branch (262:6): [True: 856, False: 2.62k]
  ------------------
  263|    856|    result = curlx_dyn_addf(&buf, ":CIPHER-%s", ssl->cipher_list);
  264|    856|    if(result)
  ------------------
  |  Branch (264:8): [True: 0, False: 856]
  ------------------
  265|      0|      goto out;
  266|    856|  }
  267|  3.47k|  if(ssl->cipher_list13) {
  ------------------
  |  Branch (267:6): [True: 136, False: 3.34k]
  ------------------
  268|    136|    result = curlx_dyn_addf(&buf, ":CIPHER13-%s", ssl->cipher_list13);
  269|    136|    if(result)
  ------------------
  |  Branch (269:8): [True: 0, False: 136]
  ------------------
  270|      0|      goto out;
  271|    136|  }
  272|  3.47k|  if(ssl->curves) {
  ------------------
  |  Branch (272:6): [True: 672, False: 2.80k]
  ------------------
  273|    672|    result = curlx_dyn_addf(&buf, ":CURVES-%s", ssl->curves);
  274|    672|    if(result)
  ------------------
  |  Branch (274:8): [True: 0, False: 672]
  ------------------
  275|      0|      goto out;
  276|    672|  }
  277|  3.47k|  if(ssl->signature_algorithms) {
  ------------------
  |  Branch (277:6): [True: 0, False: 3.47k]
  ------------------
  278|      0|    result = curlx_dyn_addf(&buf, ":SIGALGS-%s",
  279|      0|                            ssl->signature_algorithms);
  280|      0|    if(result)
  ------------------
  |  Branch (280:8): [True: 0, False: 0]
  ------------------
  281|      0|      goto out;
  282|      0|  }
  283|  3.47k|  if(ssl->verifypeer) {
  ------------------
  |  Branch (283:6): [True: 3.41k, False: 58]
  ------------------
  284|  3.41k|    result = cf_ssl_peer_key_add_path(&buf, "CA", ssl->CAfile, &is_local);
  285|  3.41k|    if(result)
  ------------------
  |  Branch (285:8): [True: 0, False: 3.41k]
  ------------------
  286|      0|      goto out;
  287|  3.41k|    result = cf_ssl_peer_key_add_path(&buf, "CApath", ssl->CApath, &is_local);
  288|  3.41k|    if(result)
  ------------------
  |  Branch (288:8): [True: 1, False: 3.41k]
  ------------------
  289|      1|      goto out;
  290|  3.41k|    result = cf_ssl_peer_key_add_path(&buf, "CRL", ssl->CRLfile, &is_local);
  291|  3.41k|    if(result)
  ------------------
  |  Branch (291:8): [True: 1, False: 3.41k]
  ------------------
  292|      1|      goto out;
  293|  3.41k|    result = cf_ssl_peer_key_add_path(&buf, "Issuer", ssl->issuercert,
  294|  3.41k|                                      &is_local);
  295|  3.41k|    if(result)
  ------------------
  |  Branch (295:8): [True: 0, False: 3.41k]
  ------------------
  296|      0|      goto out;
  297|  3.41k|    if(ssl->ca_info_blob) {
  ------------------
  |  Branch (297:8): [True: 0, False: 3.41k]
  ------------------
  298|      0|      result = cf_ssl_peer_key_add_hash(&buf, "CAInfoBlob", ssl->ca_info_blob);
  299|      0|      if(result)
  ------------------
  |  Branch (299:10): [True: 0, False: 0]
  ------------------
  300|      0|        goto out;
  301|      0|    }
  302|  3.41k|    if(ssl->issuercert_blob) {
  ------------------
  |  Branch (302:8): [True: 0, False: 3.41k]
  ------------------
  303|      0|      result = cf_ssl_peer_key_add_hash(&buf, "IssuerBlob",
  304|      0|                                        ssl->issuercert_blob);
  305|      0|      if(result)
  ------------------
  |  Branch (305:10): [True: 0, False: 0]
  ------------------
  306|      0|        goto out;
  307|      0|    }
  308|  3.41k|  }
  309|  3.47k|  if(ssl->cert_blob) {
  ------------------
  |  Branch (309:6): [True: 0, False: 3.47k]
  ------------------
  310|      0|    result = cf_ssl_peer_key_add_hash(&buf, "CertBlob", ssl->cert_blob);
  311|      0|    if(result)
  ------------------
  |  Branch (311:8): [True: 0, False: 0]
  ------------------
  312|      0|      goto out;
  313|      0|  }
  314|  3.47k|  if(ssl->pinned_key && ssl->pinned_key[0]) {
  ------------------
  |  Branch (314:6): [True: 7, False: 3.46k]
  |  Branch (314:25): [True: 4, False: 3]
  ------------------
  315|      4|    result = curlx_dyn_addf(&buf, ":Pinned-%s", ssl->pinned_key);
  316|      4|    if(result)
  ------------------
  |  Branch (316:8): [True: 0, False: 4]
  ------------------
  317|      0|      goto out;
  318|      4|  }
  319|       |
  320|  3.47k|  result = cf_ssl_peer_key_add_mtls(&buf, ssl, &is_local);
  321|  3.47k|  if(result)
  ------------------
  |  Branch (321:6): [True: 1, False: 3.47k]
  ------------------
  322|      1|    goto out;
  323|       |
  324|  3.47k|  if(!tls_id || !tls_id[0]) {
  ------------------
  |  Branch (324:6): [True: 0, False: 3.47k]
  |  Branch (324:17): [True: 0, False: 3.47k]
  ------------------
  325|      0|    result = CURLE_FAILED_INIT;
  326|      0|    goto out;
  327|      0|  }
  328|  3.47k|  result = curlx_dyn_addf(&buf, ":IMPL-%s", tls_id);
  329|  3.47k|  if(result)
  ------------------
  |  Branch (329:6): [True: 1, False: 3.47k]
  ------------------
  330|      1|    goto out;
  331|       |
  332|  3.47k|  result = curlx_dyn_addf(&buf, is_local ?
  ------------------
  |  Branch (332:33): [True: 223, False: 3.25k]
  ------------------
  333|  3.25k|                          CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  168|    223|#define CURL_SSLS_LOCAL_SUFFIX     ":L"
  ------------------
                                        CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  169|  3.25k|#define CURL_SSLS_GLOBAL_SUFFIX    ":G"
  ------------------
  334|  3.47k|  if(result)
  ------------------
  |  Branch (334:6): [True: 1, False: 3.47k]
  ------------------
  335|      1|    goto out;
  336|       |
  337|  3.47k|  *ppeer_key = curlx_dyn_take(&buf, &key_len);
  338|       |  /* we added printable char, and dynbuf always null-terminates, no need
  339|       |   * to track length */
  340|       |
  341|  3.47k|out:
  342|  3.47k|  curlx_dyn_free(&buf);
  343|  3.47k|  return result;
  344|  3.47k|}
vtls_scache.c:ssl_peer_key_add_transport:
  181|  3.47k|{
  182|  3.47k|  switch(transport) {
  183|  3.47k|  case TRNSPRT_TCP:
  ------------------
  |  |  237|  3.47k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (183:3): [True: 3.47k, False: 0]
  ------------------
  184|  3.47k|    return CURLE_OK;
  185|      0|  case TRNSPRT_UDP:
  ------------------
  |  |  238|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (185:3): [True: 0, False: 3.47k]
  ------------------
  186|      0|    return curlx_dyn_add(buf, ":UDP");
  187|      0|  case TRNSPRT_QUIC:
  ------------------
  |  |  239|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (187:3): [True: 0, False: 3.47k]
  ------------------
  188|      0|    return curlx_dyn_add(buf, ":QUIC");
  189|      0|  case TRNSPRT_UNIX:
  ------------------
  |  |  240|      0|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (189:3): [True: 0, False: 3.47k]
  ------------------
  190|      0|    return curlx_dyn_add(buf, ":UNIX");
  191|      0|  default:
  ------------------
  |  Branch (191:3): [True: 0, False: 3.47k]
  ------------------
  192|      0|    return curlx_dyn_addf(buf, ":TRNSPRT-%d", transport);
  193|  3.47k|  }
  194|  3.47k|}
vtls_scache.c:ssl_peer_key_add_vrfy:
  199|  3.47k|{
  200|  3.47k|  CURLcode result;
  201|       |
  202|  3.47k|  if(!ssl->verifypeer) {
  ------------------
  |  Branch (202:6): [True: 58, False: 3.41k]
  ------------------
  203|     58|    result = curlx_dyn_add(buf, ":NO-VRFY-PEER");
  204|     58|    if(result)
  ------------------
  |  Branch (204:8): [True: 0, False: 58]
  ------------------
  205|      0|      return result;
  206|     58|  }
  207|  3.47k|  if(!ssl->verifyhost) {
  ------------------
  |  Branch (207:6): [True: 1, False: 3.47k]
  ------------------
  208|      1|    result = curlx_dyn_add(buf, ":NO-VRFY-HOST");
  209|      1|    if(result)
  ------------------
  |  Branch (209:8): [True: 0, False: 1]
  ------------------
  210|      0|      return result;
  211|      1|  }
  212|  3.47k|  if(ssl->verifystatus) {
  ------------------
  |  Branch (212:6): [True: 1, False: 3.47k]
  ------------------
  213|      1|    result = curlx_dyn_add(buf, ":VRFY-STATUS");
  214|      1|    if(result)
  ------------------
  |  Branch (214:8): [True: 0, False: 1]
  ------------------
  215|      0|      return result;
  216|      1|  }
  217|  3.47k|  if((!ssl->verifypeer || !ssl->verifyhost) &&
  ------------------
  |  Branch (217:7): [True: 58, False: 3.41k]
  |  Branch (217:27): [True: 1, False: 3.41k]
  ------------------
  218|     59|     peer->peer && !Curl_peer_equal(peer->origin, peer->peer)) {
  ------------------
  |  Branch (218:6): [True: 58, False: 1]
  |  Branch (218:20): [True: 58, False: 0]
  ------------------
  219|     58|    result = curlx_dyn_addf(buf, ":CHOST-%s:CPORT-%u",
  220|     58|                            peer->peer->hostname,
  221|     58|                            peer->peer->port);
  222|     58|    if(result)
  ------------------
  |  Branch (222:8): [True: 0, False: 58]
  ------------------
  223|      0|      return result;
  224|     58|  }
  225|  3.47k|  return CURLE_OK;
  226|  3.47k|}
vtls_scache.c:cf_ssl_peer_key_add_path:
   70|  13.6k|{
   71|  13.6k|  if(path && path[0]) {
  ------------------
  |  Branch (71:6): [True: 9.84k, False: 3.84k]
  |  Branch (71:14): [True: 9.70k, False: 144]
  ------------------
   72|       |    /* We try to add absolute paths, so that the session key can stay valid
   73|       |     * when used in another process with different CWD. When a path does not
   74|       |     * exist, this does not work. Then, we add the path as is. */
   75|       |#ifdef _WIN32
   76|       |    char *abspath = _fullpath(NULL, path, 0);
   77|       |    if(abspath) {
   78|       |      CURLcode result = curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   79|       |      /* !checksrc! disable BANNEDFUNC 1 */
   80|       |      free(abspath); /* allocated by CRT, use system free() */
   81|       |      return result;
   82|       |    }
   83|       |    *is_local = TRUE;
   84|       |#elif defined(HAVE_REALPATH)
   85|  9.70k|    if(path[0] != '/') {
  ------------------
  |  Branch (85:8): [True: 245, False: 9.46k]
  ------------------
   86|    245|      char *abspath = realpath(path, NULL);
   87|    245|      if(abspath) {
  ------------------
  |  Branch (87:10): [True: 16, False: 229]
  ------------------
   88|     16|        CURLcode result = curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   89|       |        /* !checksrc! disable BANNEDFUNC 1 */
   90|     16|        free(abspath); /* allocated by libc, free without memdebug */
   91|     16|        return result;
   92|     16|      }
   93|    229|      *is_local = TRUE;
  ------------------
  |  | 1053|    229|#define TRUE true
  ------------------
   94|    229|    }
   95|  9.68k|#endif
   96|  9.68k|    return curlx_dyn_addf(buf, ":%s-%s", name, path);
   97|  9.70k|  }
   98|  3.98k|  return CURLE_OK;
   99|  13.6k|}
vtls_scache.c:cf_ssl_peer_key_add_mtls:
  129|  3.47k|{
  130|  3.47k|  CURLcode result = CURLE_OK;
  131|  3.47k|  if(ssl->clientcert && ssl->clientcert[0]) {
  ------------------
  |  Branch (131:6): [True: 18, False: 3.45k]
  |  Branch (131:25): [True: 11, False: 7]
  ------------------
  132|     11|    result = cf_ssl_peer_key_add_path(buf, "CCERT", ssl->clientcert, is_local);
  133|     11|    if(result)
  ------------------
  |  Branch (133:8): [True: 0, False: 11]
  ------------------
  134|      0|      goto out;
  135|     11|  }
  136|  3.47k|  if(ssl->key && ssl->key[0]) {
  ------------------
  |  Branch (136:6): [True: 12, False: 3.46k]
  |  Branch (136:18): [True: 10, False: 2]
  ------------------
  137|     10|    result = cf_ssl_peer_key_add_path(buf, "KEY", ssl->key, is_local);
  138|     10|    if(result)
  ------------------
  |  Branch (138:8): [True: 0, False: 10]
  ------------------
  139|      0|      goto out;
  140|     10|  }
  141|  3.47k|  if(ssl->key_blob) {
  ------------------
  |  Branch (141:6): [True: 0, False: 3.47k]
  ------------------
  142|      0|    result = cf_ssl_peer_key_add_hash(buf, "KEYBlob", ssl->key_blob);
  143|      0|    if(result)
  ------------------
  |  Branch (143:8): [True: 0, False: 0]
  ------------------
  144|      0|      goto out;
  145|      0|  }
  146|  3.47k|  if(ssl->cert_type && ssl->cert_type[0]) {
  ------------------
  |  Branch (146:6): [True: 18, False: 3.45k]
  |  Branch (146:24): [True: 17, False: 1]
  ------------------
  147|     17|    size_t i;
  148|     17|    result = curlx_dyn_add(buf, ":CT-");
  149|    501|    for(i = 0; !result && ssl->cert_type[i]; i++) {
  ------------------
  |  Branch (149:16): [True: 501, False: 0]
  |  Branch (149:27): [True: 484, False: 17]
  ------------------
  150|    484|      char c = Curl_raw_toupper(ssl->cert_type[i]);
  151|    484|      result = curlx_dyn_addn(buf, &c, 1);
  152|    484|    }
  153|     17|    if(result)
  ------------------
  |  Branch (153:8): [True: 0, False: 17]
  ------------------
  154|      0|      goto out;
  155|     17|  }
  156|  3.47k|  if(ssl->key_type && ssl->key_type[0]) {
  ------------------
  |  Branch (156:6): [True: 19, False: 3.45k]
  |  Branch (156:23): [True: 17, False: 2]
  ------------------
  157|     17|    size_t i;
  158|     17|    result = curlx_dyn_add(buf, ":KT-");
  159|  11.1k|    for(i = 0; !result && ssl->key_type[i]; i++) {
  ------------------
  |  Branch (159:16): [True: 11.1k, False: 1]
  |  Branch (159:27): [True: 11.1k, False: 16]
  ------------------
  160|  11.1k|      char c = Curl_raw_toupper(ssl->key_type[i]);
  161|  11.1k|      result = curlx_dyn_addn(buf, &c, 1);
  162|  11.1k|    }
  163|     17|  }
  164|  3.47k|out:
  165|  3.47k|  return result;
  166|  3.47k|}
vtls_scache.c:cf_ssl_scache_clear_peer:
  504|   294k|{
  505|   294k|  Curl_llist_destroy(&peer->sessions, NULL);
  506|   294k|  if(peer->sobj) {
  ------------------
  |  Branch (506:6): [True: 0, False: 294k]
  ------------------
  507|      0|    DEBUGASSERT(peer->sobj_free);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (507:5): [True: 0, False: 0]
  |  Branch (507:5): [True: 0, False: 0]
  ------------------
  508|      0|    if(peer->sobj_free)
  ------------------
  |  Branch (508:8): [True: 0, False: 0]
  ------------------
  509|      0|      peer->sobj_free(peer->sobj);
  510|      0|    peer->sobj = NULL;
  511|      0|  }
  512|   294k|  peer->sobj_free = NULL;
  513|   294k|  curlx_safefree(peer->clientcert);
  ------------------
  |  | 1336|   294k|  do {                      \
  |  | 1337|   294k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|   294k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|   294k|    (ptr) = NULL;           \
  |  | 1339|   294k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 294k]
  |  |  ------------------
  ------------------
  514|   294k|  curlx_safefree(peer->key_passwd);
  ------------------
  |  | 1336|   294k|  do {                      \
  |  | 1337|   294k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|   294k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|   294k|    (ptr) = NULL;           \
  |  | 1339|   294k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 294k]
  |  |  ------------------
  ------------------
  515|   294k|  curlx_safefree(peer->ssl_peer_key);
  ------------------
  |  | 1336|   294k|  do {                      \
  |  | 1337|   294k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1478|   294k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1338|   294k|    (ptr) = NULL;           \
  |  | 1339|   294k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1339:11): [Folded, False: 294k]
  |  |  ------------------
  ------------------
  516|   294k|  peer->age = 0;
  517|       |  peer->hmac_set = FALSE;
  ------------------
  |  | 1056|   294k|#define FALSE false
  ------------------
  518|   294k|}
vtls_scache.c:cf_ssl_scache_get:
  368|  35.3k|{
  369|  35.3k|  struct Curl_ssl_scache *scache = NULL;
  370|       |  /* If a share is present, its ssl_scache has preference over the multi */
  371|  35.3k|  if(data->share && data->share->ssl_scache)
  ------------------
  |  Branch (371:6): [True: 0, False: 35.3k]
  |  Branch (371:21): [True: 0, False: 0]
  ------------------
  372|      0|    scache = data->share->ssl_scache;
  373|  35.3k|  else if(data->multi && data->multi->ssl_scache)
  ------------------
  |  Branch (373:11): [True: 35.3k, False: 0]
  |  Branch (373:26): [True: 35.3k, False: 0]
  ------------------
  374|  35.3k|    scache = data->multi->ssl_scache;
  375|  35.3k|  if(scache && !GOOD_SCACHE(scache)) {
  ------------------
  |  |   64|  35.3k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   62|  35.3k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (64:25): [True: 35.3k, False: 0]
  |  |  |  Branch (64:32): [True: 35.3k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (375:6): [True: 35.3k, False: 0]
  ------------------
  376|      0|    failf(data, "transfer would use an invalid scache at %p, denied",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  377|      0|          (void *)scache);
  378|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1079|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (378:5): [Folded, False: 0]
  |  Branch (378:5): [Folded, False: 0]
  ------------------
  379|      0|    return NULL;
  380|      0|  }
  381|  35.3k|  return scache;
  382|  35.3k|}
vtls_scache.c:cf_ssl_find_peer_by_key:
  762|  2.58k|{
  763|  2.58k|  size_t i, peer_key_len = 0;
  764|  2.58k|  CURLcode result = CURLE_OK;
  765|       |
  766|  2.58k|  *ppeer = NULL;
  767|  2.58k|  if(!GOOD_SCACHE(scache)) {
  ------------------
  |  |   64|  2.58k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   62|  2.58k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (64:25): [True: 2.58k, False: 0]
  |  |  |  Branch (64:32): [True: 2.58k, False: 0]
  |  |  ------------------
  ------------------
  768|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  769|      0|  }
  770|       |
  771|  2.58k|  CURL_TRC_SSLS(data, "find peer slot for %s among %zu slots",
  ------------------
  |  |  194|  2.58k|  do {                                                    \
  |  |  195|  2.58k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|  2.58k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  5.16k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2.58k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  5.16k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  2.58k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  2.58k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  2.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 2.58k]
  |  |  ------------------
  ------------------
  772|  2.58k|                ssl_peer_key, scache->peer_count);
  773|       |
  774|       |  /* check for entries with known peer_key */
  775|  67.1k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (775:14): [True: 67.1k, False: 0]
  |  Branch (775:24): [True: 64.5k, False: 2.58k]
  ------------------
  776|  64.5k|    if(scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (776:8): [True: 0, False: 64.5k]
  ------------------
  777|      0|       curl_strequal(ssl_peer_key, scache->peers[i].ssl_peer_key) &&
  ------------------
  |  Branch (777:8): [True: 0, False: 0]
  ------------------
  778|      0|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (778:8): [True: 0, False: 0]
  ------------------
  779|       |      /* yes, we have a cached session for this! */
  780|      0|      *ppeer = &scache->peers[i];
  781|      0|      goto out;
  782|      0|    }
  783|  64.5k|  }
  784|       |  /* check for entries with HMAC set but no known peer_key */
  785|  67.1k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (785:14): [True: 67.1k, False: 0]
  |  Branch (785:24): [True: 64.5k, False: 2.58k]
  ------------------
  786|  64.5k|    if(!scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (786:8): [True: 64.5k, False: 0]
  ------------------
  787|  64.5k|       scache->peers[i].hmac_set &&
  ------------------
  |  Branch (787:8): [True: 0, False: 64.5k]
  ------------------
  788|      0|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (788:8): [True: 0, False: 0]
  ------------------
  789|       |      /* possible entry with unknown peer_key, check hmac */
  790|      0|      unsigned char my_hmac[CURL_SHA256_DIGEST_LENGTH];
  791|      0|      if(!peer_key_len) /* we are lazy */
  ------------------
  |  Branch (791:10): [True: 0, False: 0]
  ------------------
  792|      0|        peer_key_len = strlen(ssl_peer_key);
  793|      0|      result = Curl_hmacit(&Curl_HMAC_SHA256,
  794|      0|                           scache->peers[i].key_salt,
  795|      0|                           sizeof(scache->peers[i].key_salt),
  796|      0|                           (const unsigned char *)ssl_peer_key,
  797|      0|                           peer_key_len,
  798|      0|                           my_hmac);
  799|      0|      if(result)
  ------------------
  |  Branch (799:10): [True: 0, False: 0]
  ------------------
  800|      0|        goto out;
  801|      0|      if(!memcmp(scache->peers[i].key_hmac, my_hmac, sizeof(my_hmac))) {
  ------------------
  |  Branch (801:10): [True: 0, False: 0]
  ------------------
  802|       |        /* remember peer_key for future lookups */
  803|      0|        CURL_TRC_SSLS(data, "peer entry %zu key recovered: %s",
  ------------------
  |  |  194|      0|  do {                                                    \
  |  |  195|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|      0|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  804|      0|                      i, ssl_peer_key);
  805|      0|        scache->peers[i].ssl_peer_key = curlx_strdup(ssl_peer_key);
  ------------------
  |  | 1472|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  806|      0|        if(!scache->peers[i].ssl_peer_key) {
  ------------------
  |  Branch (806:12): [True: 0, False: 0]
  ------------------
  807|      0|          result = CURLE_OUT_OF_MEMORY;
  808|      0|          goto out;
  809|      0|        }
  810|      0|        cf_ssl_cache_peer_update(&scache->peers[i]);
  811|      0|        *ppeer = &scache->peers[i];
  812|      0|        goto out;
  813|      0|      }
  814|      0|    }
  815|  64.5k|  }
  816|  2.58k|  CURL_TRC_SSLS(data, "peer not found for %s", ssl_peer_key);
  ------------------
  |  |  194|  2.58k|  do {                                                    \
  |  |  195|  2.58k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|  2.58k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  5.16k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2.58k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  5.16k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  2.58k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  2.58k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  2.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 2.58k]
  |  |  ------------------
  ------------------
  817|  2.58k|out:
  818|  2.58k|  return result;
  819|  2.58k|}

freea:
  107|    246|{
  108|       |  /* Check argument.  */
  109|    246|  uintptr_t u = (uintptr_t) p;
  110|    246|  if (u & (sa_alignment_max - 1))
  ------------------
  |  Branch (110:7): [True: 0, False: 246]
  ------------------
  111|      0|    {
  112|       |      /* p was not the result of a malloca() call.  Invalid argument.  */
  113|      0|      abort ();
  114|      0|    }
  115|       |  /* Determine whether p was a non-NULL pointer returned by mmalloca().  */
  116|    246|  if (u & sa_alignment_max)
  ------------------
  |  Branch (116:7): [True: 0, False: 246]
  ------------------
  117|      0|    {
  118|      0|      char *cp = p;
  119|      0|      small_t *sp = p;
  120|       |# if defined __CHERI_PURE_CAPABILITY__
  121|       |      void *mem = (void *) sp[-1];
  122|       |# else
  123|      0|      void *mem = cp - sp[-1];
  124|      0|# endif
  125|      0|      free (mem);
  126|      0|    }
  127|    246|}

idn2_lookup_ul:
  656|    246|{
  657|    246|  uint8_t *utf8src = NULL;
  658|    246|  int rc;
  659|       |
  660|    246|  if (src)
  ------------------
  |  Branch (660:7): [True: 246, False: 0]
  ------------------
  661|    246|    {
  662|    246|      const char *encoding = locale_charset ();
  663|       |
  664|    246|      utf8src = u8_strconv_from_encoding (src, encoding, iconveh_error);
  665|       |
  666|    246|      if (!utf8src)
  ------------------
  |  Branch (666:11): [True: 246, False: 0]
  ------------------
  667|    246|	{
  668|    246|	  if (errno == ENOMEM)
  ------------------
  |  Branch (668:8): [True: 0, False: 246]
  ------------------
  669|      0|	    return IDN2_MALLOC;
  670|    246|	  return IDN2_ICONV_FAIL;
  671|    246|	}
  672|    246|    }
  673|       |
  674|      0|  rc = idn2_lookup_u8 (utf8src, (uint8_t **) lookupname,
  675|      0|		       flags | IDN2_NFC_INPUT);
  676|       |
  677|      0|  free (utf8src);
  678|       |
  679|      0|  return rc;
  680|    246|}

idn2_check_version:
   62|    123|{
   63|    123|  if (!req_version || strverscmp (req_version, IDN2_VERSION) <= 0)
  ------------------
  |  |  119|    123|# define IDN2_VERSION "2.3.8"
  ------------------
  |  Branch (63:7): [True: 0, False: 123]
  |  Branch (63:23): [True: 123, False: 0]
  ------------------
   64|    123|    return IDN2_VERSION;
  ------------------
  |  |  119|    123|# define IDN2_VERSION "2.3.8"
  ------------------
   65|       |
   66|      0|  return NULL;
   67|    123|}

c_tolower:
  338|  8.36k|{
  339|  8.36k|  switch (c)
  340|  8.36k|    {
  341|  5.90k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|  1.23k|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|    738|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 738, False: 7.62k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 8.36k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 8.36k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 8.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.23k|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 8.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 492, False: 7.87k]
  |  |  |  |  ------------------
  |  |  |  |  123|  1.72k|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 8.36k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 8.36k]
  |  |  |  |  |  Branch (123:36): [True: 492, False: 7.87k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 8.36k]
  |  |  |  |  ------------------
  |  |  |  |  124|  2.70k|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 8.36k]
  |  |  |  |  |  Branch (124:20): [True: 492, False: 7.87k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 8.36k]
  |  |  |  |  |  Branch (124:52): [True: 492, False: 7.87k]
  |  |  |  |  ------------------
  |  |  |  |  125|  3.19k|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 8.36k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 8.36k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 8.36k]
  |  |  |  |  |  Branch (125:52): [True: 492, False: 7.87k]
  |  |  |  |  ------------------
  |  |  |  |  126|  5.90k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 492, False: 7.87k]
  |  |  |  |  |  Branch (126:20): [True: 1.47k, False: 6.88k]
  |  |  |  |  |  Branch (126:36): [True: 738, False: 7.62k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 8.36k]
  |  |  |  |  ------------------
  |  |  |  |  127|  5.90k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 8.36k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 8.36k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 8.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  342|  5.90k|      return c - 'A' + 'a';
  343|  2.46k|    default:
  ------------------
  |  Branch (343:5): [True: 2.46k, False: 5.90k]
  ------------------
  344|  2.46k|      return c;
  345|  8.36k|    }
  346|  8.36k|}
c_isupper:
  313|  1.96k|{
  314|  1.96k|  switch (c)
  315|  1.96k|    {
  316|  1.23k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|    246|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 0, False: 1.96k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 1.96k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 1.96k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 1.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|    246|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 1.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 246, False: 1.72k]
  |  |  |  |  ------------------
  |  |  |  |  123|    246|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 1.96k]
  |  |  |  |  ------------------
  |  |  |  |  124|    246|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (124:20): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 1.96k]
  |  |  |  |  ------------------
  |  |  |  |  125|    246|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 1.96k]
  |  |  |  |  ------------------
  |  |  |  |  126|  1.23k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (126:20): [True: 246, False: 1.72k]
  |  |  |  |  |  Branch (126:36): [True: 738, False: 1.23k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 1.96k]
  |  |  |  |  ------------------
  |  |  |  |  127|  1.23k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 1.96k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 1.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  317|  1.23k|      return true;
  318|    738|    default:
  ------------------
  |  Branch (318:5): [True: 738, False: 1.23k]
  ------------------
  319|       |      return false;
  320|  1.96k|    }
  321|  1.96k|}

c_strcasecmp:
   28|    492|{
   29|    492|  register const unsigned char *p1 = (const unsigned char *) s1;
   30|    492|  register const unsigned char *p2 = (const unsigned char *) s2;
   31|    492|  unsigned char c1, c2;
   32|       |
   33|    492|  if (p1 == p2)
  ------------------
  |  Branch (33:7): [True: 0, False: 492]
  ------------------
   34|      0|    return 0;
   35|       |
   36|    492|  do
   37|  4.18k|    {
   38|  4.18k|      c1 = c_tolower (*p1);
   39|  4.18k|      c2 = c_tolower (*p2);
   40|       |
   41|  4.18k|      if (c1 == '\0')
  ------------------
  |  Branch (41:11): [True: 246, False: 3.93k]
  ------------------
   42|    246|        break;
   43|       |
   44|  3.93k|      ++p1;
   45|  3.93k|      ++p2;
   46|  3.93k|    }
   47|  3.93k|  while (c1 == c2);
  ------------------
  |  Branch (47:10): [True: 3.69k, False: 246]
  ------------------
   48|       |
   49|    492|  if (UCHAR_MAX <= INT_MAX)
  ------------------
  |  Branch (49:7): [True: 492, Folded]
  ------------------
   50|    492|    return c1 - c2;
   51|      0|  else
   52|       |    /* On machines where 'char' and 'int' are types of the same size, the
   53|       |       difference of two 'unsigned char' values - including the sign bit -
   54|       |       doesn't fit in an 'int'.  */
   55|      0|    return _GL_CMP (c1, c2);
  ------------------
  |  | 1797|      0|#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
  ------------------
   56|    492|}

u8-conv-from-enc.c:strcaseeq0:
  166|    246|{
  167|    246|  if (CASEEQ (s1[0], s20))
  ------------------
  |  |   40|    246|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 0, False: 246]
  |  |  |  Branch (40:7): [True: 246, False: 0]
  |  |  ------------------
  ------------------
  168|      0|    {
  169|      0|      if (s20 == 0)
  ------------------
  |  Branch (169:11): [True: 0, False: 0]
  ------------------
  170|      0|        return 1;
  171|      0|      else
  172|      0|        return strcaseeq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28);
  173|      0|    }
  174|    246|  else
  175|    246|    return 0;
  176|    246|}
striconveh.c:strcaseeq0:
  166|    492|{
  167|    492|  if (CASEEQ (s1[0], s20))
  ------------------
  |  |   40|    492|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 246, False: 246]
  |  |  |  Branch (40:7): [True: 492, False: 0]
  |  |  ------------------
  ------------------
  168|    246|    {
  169|    246|      if (s20 == 0)
  ------------------
  |  Branch (169:11): [True: 0, False: 246]
  ------------------
  170|      0|        return 1;
  171|    246|      else
  172|    246|        return strcaseeq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28);
  173|    246|    }
  174|    246|  else
  175|    246|    return 0;
  176|    492|}
striconveh.c:strcaseeq1:
  152|    246|{
  153|    246|  if (CASEEQ (s1[1], s21))
  ------------------
  |  |   40|    246|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 246, False: 0]
  |  |  |  Branch (40:7): [True: 246, False: 0]
  |  |  ------------------
  ------------------
  154|    246|    {
  155|    246|      if (s21 == 0)
  ------------------
  |  Branch (155:11): [True: 0, False: 246]
  ------------------
  156|      0|        return 1;
  157|    246|      else
  158|    246|        return strcaseeq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28);
  159|    246|    }
  160|      0|  else
  161|      0|    return 0;
  162|    246|}
striconveh.c:strcaseeq2:
  138|    246|{
  139|    246|  if (CASEEQ (s1[2], s22))
  ------------------
  |  |   40|    246|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 246, False: 0]
  |  |  |  Branch (40:7): [True: 246, False: 0]
  |  |  ------------------
  ------------------
  140|    246|    {
  141|    246|      if (s22 == 0)
  ------------------
  |  Branch (141:11): [True: 0, False: 246]
  ------------------
  142|      0|        return 1;
  143|    246|      else
  144|    246|        return strcaseeq3 (s1, s2, s23, s24, s25, s26, s27, s28);
  145|    246|    }
  146|      0|  else
  147|      0|    return 0;
  148|    246|}
striconveh.c:strcaseeq3:
  124|    246|{
  125|    246|  if (CASEEQ (s1[3], s23))
  ------------------
  |  |   40|    246|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 246, False: 0]
  |  |  |  Branch (40:7): [True: 0, False: 246]
  |  |  ------------------
  ------------------
  126|    246|    {
  127|    246|      if (s23 == 0)
  ------------------
  |  Branch (127:11): [True: 0, False: 246]
  ------------------
  128|      0|        return 1;
  129|    246|      else
  130|    246|        return strcaseeq4 (s1, s2, s24, s25, s26, s27, s28);
  131|    246|    }
  132|      0|  else
  133|      0|    return 0;
  134|    246|}
striconveh.c:strcaseeq4:
  110|    246|{
  111|    246|  if (CASEEQ (s1[4], s24))
  ------------------
  |  |   40|    246|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 246, False: 0]
  |  |  |  Branch (40:7): [True: 0, False: 246]
  |  |  ------------------
  ------------------
  112|    246|    {
  113|    246|      if (s24 == 0)
  ------------------
  |  Branch (113:11): [True: 0, False: 246]
  ------------------
  114|      0|        return 1;
  115|    246|      else
  116|    246|        return strcaseeq5 (s1, s2, s25, s26, s27, s28);
  117|    246|    }
  118|      0|  else
  119|      0|    return 0;
  120|    246|}
striconveh.c:strcaseeq5:
   96|    246|{
   97|    246|  if (CASEEQ (s1[5], s25))
  ------------------
  |  |   40|    246|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 0, False: 246]
  |  |  |  Branch (40:7): [True: 0, False: 246]
  |  |  ------------------
  ------------------
   98|      0|    {
   99|      0|      if (s25 == 0)
  ------------------
  |  Branch (99:11): [True: 0, False: 0]
  ------------------
  100|      0|        return 1;
  101|      0|      else
  102|      0|        return strcaseeq6 (s1, s2, s26, s27, s28);
  103|      0|    }
  104|    246|  else
  105|    246|    return 0;
  106|    246|}

locale_charset:
  832|    246|{
  833|    246|  const char *codeset;
  834|       |
  835|       |  /* This function must be multithread-safe.  To achieve this without using
  836|       |     thread-local storage, we use a simple strcpy or memcpy to fill this static
  837|       |     buffer.  Filling it through, for example, strcpy + strcat would not be
  838|       |     guaranteed to leave the buffer's contents intact if another thread is
  839|       |     currently accessing it.  If necessary, the contents is first assembled in
  840|       |     a stack-allocated buffer.  */
  841|       |
  842|    246|#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2
  843|       |
  844|    246|# if HAVE_LANGINFO_CODESET
  845|       |
  846|       |  /* Most systems support nl_langinfo (CODESET) nowadays.  */
  847|    246|  codeset = nl_langinfo (CODESET);
  848|       |
  849|       |#  ifdef __CYGWIN__
  850|       |  /* Cygwin < 1.7 does not have locales.  nl_langinfo (CODESET) always
  851|       |     returns "US-ASCII".  Return the suffix of the locale name from the
  852|       |     environment variables (if present) or the codepage as a number.  */
  853|       |  if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
  854|       |    {
  855|       |      const char *locale;
  856|       |      static char resultbuf[2 + 10 + 1];
  857|       |
  858|       |      locale = getenv ("LC_ALL");
  859|       |      if (locale == NULL || locale[0] == '\0')
  860|       |        {
  861|       |          locale = getenv ("LC_CTYPE");
  862|       |          if (locale == NULL || locale[0] == '\0')
  863|       |            locale = getenv ("LANG");
  864|       |        }
  865|       |      if (locale != NULL && locale[0] != '\0')
  866|       |        {
  867|       |          /* If the locale name contains an encoding after the dot, return
  868|       |             it.  */
  869|       |          const char *dot = strchr (locale, '.');
  870|       |
  871|       |          if (dot != NULL)
  872|       |            {
  873|       |              const char *modifier;
  874|       |
  875|       |              dot++;
  876|       |              /* Look for the possible @... trailer and remove it, if any.  */
  877|       |              modifier = strchr (dot, '@');
  878|       |              if (modifier == NULL)
  879|       |                return dot;
  880|       |              if (modifier - dot < sizeof (resultbuf))
  881|       |                {
  882|       |                  /* This way of filling resultbuf is multithread-safe.  */
  883|       |                  memcpy (resultbuf, dot, modifier - dot);
  884|       |                  resultbuf [modifier - dot] = '\0';
  885|       |                  return resultbuf;
  886|       |                }
  887|       |            }
  888|       |        }
  889|       |
  890|       |      /* The Windows API has a function returning the locale's codepage as a
  891|       |         number: GetACP().  This encoding is used by Cygwin, unless the user
  892|       |         has set the environment variable CYGWIN=codepage:oem (which very few
  893|       |         people do).
  894|       |         Output directed to console windows needs to be converted (to
  895|       |         GetOEMCP() if the console is using a raster font, or to
  896|       |         GetConsoleOutputCP() if it is using a TrueType font).  Cygwin does
  897|       |         this conversion transparently (see winsup/cygwin/fhandler_console.cc),
  898|       |         converting to GetConsoleOutputCP().  This leads to correct results,
  899|       |         except when SetConsoleOutputCP has been called and a raster font is
  900|       |         in use.  */
  901|       |      {
  902|       |        char buf[2 + 10 + 1];
  903|       |
  904|       |        sprintf (buf, "CP%u", GetACP ());
  905|       |        strcpy (resultbuf, buf);
  906|       |        codeset = resultbuf;
  907|       |      }
  908|       |    }
  909|       |#  endif
  910|       |
  911|    246|  if (codeset == NULL)
  ------------------
  |  Branch (911:7): [True: 0, False: 246]
  ------------------
  912|       |    /* The canonical name cannot be determined.  */
  913|      0|    codeset = "";
  914|       |
  915|       |# elif defined WINDOWS_NATIVE
  916|       |
  917|       |  char buf[2 + 10 + 1];
  918|       |  static char resultbuf[2 + 10 + 1];
  919|       |
  920|       |  /* The Windows API has a function returning the locale's codepage as
  921|       |     a number, but the value doesn't change according to what the
  922|       |     'setlocale' call specified.  So we use it as a last resort, in
  923|       |     case the string returned by 'setlocale' doesn't specify the
  924|       |     codepage.  */
  925|       |  char *current_locale = setlocale (LC_CTYPE, NULL);
  926|       |  char *pdot = strrchr (current_locale, '.');
  927|       |
  928|       |  if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf))
  929|       |    sprintf (buf, "CP%s", pdot + 1);
  930|       |  else
  931|       |    {
  932|       |      /* The Windows API has a function returning the locale's codepage as a
  933|       |         number: GetACP().
  934|       |         When the output goes to a console window, it needs to be provided in
  935|       |         GetOEMCP() encoding if the console is using a raster font, or in
  936|       |         GetConsoleOutputCP() encoding if it is using a TrueType font.
  937|       |         But in GUI programs and for output sent to files and pipes, GetACP()
  938|       |         encoding is the best bet.  */
  939|       |      sprintf (buf, "CP%u", GetACP ());
  940|       |    }
  941|       |  /* For a locale name such as "French_France.65001", in Windows 10,
  942|       |     setlocale now returns "French_France.utf8" instead, or in the UTF-8
  943|       |     environment (with modern system settings) "fr_FR.UTF-8".  */
  944|       |  if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0
  945|       |      || strcmp (buf + 2, "UTF-8") == 0)
  946|       |    codeset = "UTF-8";
  947|       |  else
  948|       |    {
  949|       |      strcpy (resultbuf, buf);
  950|       |      codeset = resultbuf;
  951|       |    }
  952|       |
  953|       |# elif defined OS2
  954|       |
  955|       |  const char *locale;
  956|       |  static char resultbuf[2 + 10 + 1];
  957|       |  ULONG cp[3];
  958|       |  ULONG cplen;
  959|       |
  960|       |  codeset = NULL;
  961|       |
  962|       |  /* Allow user to override the codeset, as set in the operating system,
  963|       |     with standard language environment variables.  */
  964|       |  locale = getenv ("LC_ALL");
  965|       |  if (locale == NULL || locale[0] == '\0')
  966|       |    {
  967|       |      locale = getenv ("LC_CTYPE");
  968|       |      if (locale == NULL || locale[0] == '\0')
  969|       |        locale = getenv ("LANG");
  970|       |    }
  971|       |  if (locale != NULL && locale[0] != '\0')
  972|       |    {
  973|       |      /* If the locale name contains an encoding after the dot, return it.  */
  974|       |      const char *dot = strchr (locale, '.');
  975|       |
  976|       |      if (dot != NULL)
  977|       |        {
  978|       |          const char *modifier;
  979|       |
  980|       |          dot++;
  981|       |          /* Look for the possible @... trailer and remove it, if any.  */
  982|       |          modifier = strchr (dot, '@');
  983|       |          if (modifier == NULL)
  984|       |            return dot;
  985|       |          if (modifier - dot < sizeof (resultbuf))
  986|       |            {
  987|       |              /* This way of filling resultbuf is multithread-safe.  */
  988|       |              memcpy (resultbuf, dot, modifier - dot);
  989|       |              resultbuf [modifier - dot] = '\0';
  990|       |              return resultbuf;
  991|       |            }
  992|       |        }
  993|       |
  994|       |      /* For the POSIX locale, don't use the system's codepage.  */
  995|       |      if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0)
  996|       |        codeset = "";
  997|       |    }
  998|       |
  999|       |  if (codeset == NULL)
 1000|       |    {
 1001|       |      /* OS/2 has a function returning the locale's codepage as a number.  */
 1002|       |      if (DosQueryCp (sizeof (cp), cp, &cplen))
 1003|       |        codeset = "";
 1004|       |      else
 1005|       |        {
 1006|       |          char buf[2 + 10 + 1];
 1007|       |
 1008|       |          sprintf (buf, "CP%u", cp[0]);
 1009|       |          strcpy (resultbuf, buf);
 1010|       |          codeset = resultbuf;
 1011|       |        }
 1012|       |    }
 1013|       |
 1014|       |# else
 1015|       |
 1016|       |#  error "Add code for other platforms here."
 1017|       |
 1018|       |# endif
 1019|       |
 1020|       |  /* Resolve alias.  */
 1021|    246|  {
 1022|       |# ifdef alias_table_defined
 1023|       |    /* On some platforms, UTF-8 locales are the most frequently used ones.
 1024|       |       Speed up the common case and slow down the less common cases by
 1025|       |       testing for this case first.  */
 1026|       |#  if defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined __sun || defined __CYGWIN__
 1027|       |    if (strcmp (codeset, "UTF-8") == 0)
 1028|       |      goto done_table_lookup;
 1029|       |    else
 1030|       |#  endif
 1031|       |      {
 1032|       |        const struct table_entry * const table = alias_table;
 1033|       |        size_t const table_size =
 1034|       |          sizeof (alias_table) / sizeof (struct table_entry);
 1035|       |        /* The table is sorted.  Perform a binary search.  */
 1036|       |        size_t hi = table_size;
 1037|       |        size_t lo = 0;
 1038|       |        while (lo < hi)
 1039|       |          {
 1040|       |            /* Invariant:
 1041|       |               for i < lo, strcmp (table[i].alias, codeset) < 0,
 1042|       |               for i >= hi, strcmp (table[i].alias, codeset) > 0.  */
 1043|       |            size_t mid = (hi + lo) >> 1; /* >= lo, < hi */
 1044|       |            int cmp = strcmp (table[mid].alias, codeset);
 1045|       |            if (cmp < 0)
 1046|       |              lo = mid + 1;
 1047|       |            else if (cmp > 0)
 1048|       |              hi = mid;
 1049|       |            else
 1050|       |              {
 1051|       |                /* Found an i with
 1052|       |                     strcmp (table[i].alias, codeset) == 0.  */
 1053|       |                codeset = table[mid].canonical;
 1054|       |                goto done_table_lookup;
 1055|       |              }
 1056|       |          }
 1057|       |      }
 1058|       |    if (0)
 1059|       |      done_table_lookup: {}
 1060|       |    else
 1061|       |# endif
 1062|    246|      {
 1063|       |        /* Did not find it in the table.  */
 1064|       |        /* On Mac OS X, all modern locales use the UTF-8 encoding.
 1065|       |           BeOS and Haiku have a single locale, and it has UTF-8 encoding.  */
 1066|       |# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__
 1067|       |        codeset = "UTF-8";
 1068|       |# else
 1069|       |        /* Don't return an empty string.  GNU libc and GNU libiconv interpret
 1070|       |           the empty string as denoting "the locale's character encoding",
 1071|       |           thus GNU libiconv would call this function a second time.  */
 1072|    246|        if (codeset[0] == '\0')
  ------------------
  |  Branch (1072:13): [True: 0, False: 246]
  ------------------
 1073|      0|          codeset = "ASCII";
 1074|    246|# endif
 1075|    246|      }
 1076|    246|  }
 1077|       |
 1078|       |#else
 1079|       |
 1080|       |  /* On old systems which lack it, use setlocale or getenv.  */
 1081|       |  const char *locale = NULL;
 1082|       |
 1083|       |  /* But most old systems don't have a complete set of locales.  Some
 1084|       |     (like DJGPP) have only the C locale.  Therefore we don't use setlocale
 1085|       |     here; it would return "C" when it doesn't support the locale name the
 1086|       |     user has set.  */
 1087|       |# if 0
 1088|       |  locale = setlocale (LC_CTYPE, NULL);
 1089|       |# endif
 1090|       |  if (locale == NULL || locale[0] == '\0')
 1091|       |    {
 1092|       |      locale = getenv ("LC_ALL");
 1093|       |      if (locale == NULL || locale[0] == '\0')
 1094|       |        {
 1095|       |          locale = getenv ("LC_CTYPE");
 1096|       |          if (locale == NULL || locale[0] == '\0')
 1097|       |            locale = getenv ("LANG");
 1098|       |            if (locale == NULL)
 1099|       |              locale = "";
 1100|       |        }
 1101|       |    }
 1102|       |
 1103|       |  /* Map locale name to canonical encoding name.  */
 1104|       |  {
 1105|       |# ifdef locale_table_defined
 1106|       |    const struct table_entry * const table = locale_table;
 1107|       |    size_t const table_size =
 1108|       |      sizeof (locale_table) / sizeof (struct table_entry);
 1109|       |    /* The table is sorted.  Perform a binary search.  */
 1110|       |    size_t hi = table_size;
 1111|       |    size_t lo = 0;
 1112|       |    while (lo < hi)
 1113|       |      {
 1114|       |        /* Invariant:
 1115|       |           for i < lo, strcmp (table[i].locale, locale) < 0,
 1116|       |           for i >= hi, strcmp (table[i].locale, locale) > 0.  */
 1117|       |        size_t mid = (hi + lo) >> 1; /* >= lo, < hi */
 1118|       |        int cmp = strcmp (table[mid].locale, locale);
 1119|       |        if (cmp < 0)
 1120|       |          lo = mid + 1;
 1121|       |        else if (cmp > 0)
 1122|       |          hi = mid;
 1123|       |        else
 1124|       |          {
 1125|       |            /* Found an i with
 1126|       |                 strcmp (table[i].locale, locale) == 0.  */
 1127|       |            codeset = table[mid].canonical;
 1128|       |            goto done_table_lookup;
 1129|       |          }
 1130|       |      }
 1131|       |    if (0)
 1132|       |      done_table_lookup: ;
 1133|       |    else
 1134|       |# endif
 1135|       |      {
 1136|       |        /* Did not find it in the table.  */
 1137|       |        /* On Mac OS X, all modern locales use the UTF-8 encoding.
 1138|       |           BeOS and Haiku have a single locale, and it has UTF-8 encoding.  */
 1139|       |# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__
 1140|       |        codeset = "UTF-8";
 1141|       |# else
 1142|       |        /* The canonical name cannot be determined.  */
 1143|       |        /* Don't return an empty string.  GNU libc and GNU libiconv interpret
 1144|       |           the empty string as denoting "the locale's character encoding",
 1145|       |           thus GNU libiconv would call this function a second time.  */
 1146|       |        codeset = "ASCII";
 1147|       |# endif
 1148|       |      }
 1149|       |  }
 1150|       |
 1151|       |#endif
 1152|       |
 1153|       |#ifdef DARWIN7
 1154|       |  /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
 1155|       |     (the default codeset) does not work when MB_CUR_MAX is 1.  */
 1156|       |  if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1)
 1157|       |    codeset = "ASCII";
 1158|       |#endif
 1159|       |
 1160|    246|  return codeset;
 1161|    246|}

iconveh_open:
   48|    246|{
   49|    246|  iconv_t cd;
   50|    246|  iconv_t cd1;
   51|    246|  iconv_t cd2;
   52|       |
   53|    246|  cd = iconv_open (to_codeset, from_codeset);
   54|       |
   55|    246|  if (STRCASEEQ (from_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0))
  ------------------
  |  |  179|    246|  strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
  |  |  ------------------
  |  |  |  Branch (179:3): [True: 0, False: 246]
  |  |  ------------------
  ------------------
   56|      0|    cd1 = (iconv_t)(-1);
   57|    246|  else
   58|    246|    {
   59|    246|      cd1 = iconv_open ("UTF-8", from_codeset);
   60|    246|      if (cd1 == (iconv_t)(-1))
  ------------------
  |  Branch (60:11): [True: 0, False: 246]
  ------------------
   61|      0|        {
   62|      0|          int saved_errno = errno;
   63|      0|          if (cd != (iconv_t)(-1))
  ------------------
  |  Branch (63:15): [True: 0, False: 0]
  ------------------
   64|      0|            iconv_close (cd);
   65|      0|          errno = saved_errno;
   66|      0|          return -1;
   67|      0|        }
   68|    246|    }
   69|       |
   70|    246|  if (STRCASEEQ (to_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0)
  ------------------
  |  |  179|    492|  strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
  |  |  ------------------
  |  |  |  Branch (179:3): [True: 0, False: 246]
  |  |  ------------------
  ------------------
   71|    246|# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
   72|    246|      && !defined __UCLIBC__) \
   73|    246|     || _LIBICONV_VERSION >= 0x0105 \
   74|    246|     || defined ICONV_SET_TRANSLITERATE
   75|    246|      || c_strcasecmp (to_codeset, "UTF-8//TRANSLIT") == 0
  ------------------
  |  Branch (75:10): [True: 246, False: 0]
  ------------------
   76|    246|# endif
   77|    246|     )
   78|    246|    cd2 = (iconv_t)(-1);
   79|      0|  else
   80|      0|    {
   81|      0|      cd2 = iconv_open (to_codeset, "UTF-8");
   82|      0|      if (cd2 == (iconv_t)(-1))
  ------------------
  |  Branch (82:11): [True: 0, False: 0]
  ------------------
   83|      0|        {
   84|      0|          int saved_errno = errno;
   85|      0|          if (cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (85:15): [True: 0, False: 0]
  ------------------
   86|      0|            iconv_close (cd1);
   87|      0|          if (cd != (iconv_t)(-1))
  ------------------
  |  Branch (87:15): [True: 0, False: 0]
  ------------------
   88|      0|            iconv_close (cd);
   89|      0|          errno = saved_errno;
   90|      0|          return -1;
   91|      0|        }
   92|      0|    }
   93|       |
   94|    246|  cdp->cd = cd;
   95|    246|  cdp->cd1 = cd1;
   96|    246|  cdp->cd2 = cd2;
   97|    246|  return 0;
   98|    246|}
iconveh_close:
  102|    246|{
  103|    246|  if (cd->cd2 != (iconv_t)(-1) && iconv_close (cd->cd2) < 0)
  ------------------
  |  Branch (103:7): [True: 0, False: 246]
  |  Branch (103:35): [True: 0, False: 0]
  ------------------
  104|      0|    {
  105|       |      /* Return -1, but preserve the errno from iconv_close.  */
  106|      0|      int saved_errno = errno;
  107|      0|      if (cd->cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (107:11): [True: 0, False: 0]
  ------------------
  108|      0|        iconv_close (cd->cd1);
  109|      0|      if (cd->cd != (iconv_t)(-1))
  ------------------
  |  Branch (109:11): [True: 0, False: 0]
  ------------------
  110|      0|        iconv_close (cd->cd);
  111|      0|      errno = saved_errno;
  112|      0|      return -1;
  113|      0|    }
  114|    246|  if (cd->cd1 != (iconv_t)(-1) && iconv_close (cd->cd1) < 0)
  ------------------
  |  Branch (114:7): [True: 246, False: 0]
  |  Branch (114:35): [True: 0, False: 246]
  ------------------
  115|      0|    {
  116|       |      /* Return -1, but preserve the errno from iconv_close.  */
  117|      0|      int saved_errno = errno;
  118|      0|      if (cd->cd != (iconv_t)(-1))
  ------------------
  |  Branch (118:11): [True: 0, False: 0]
  ------------------
  119|      0|        iconv_close (cd->cd);
  120|      0|      errno = saved_errno;
  121|      0|      return -1;
  122|      0|    }
  123|    246|  if (cd->cd != (iconv_t)(-1) && iconv_close (cd->cd) < 0)
  ------------------
  |  Branch (123:7): [True: 246, False: 0]
  |  Branch (123:34): [True: 0, False: 246]
  ------------------
  124|      0|    return -1;
  125|    246|  return 0;
  126|    246|}
mem_cd_iconveh:
 1055|    246|{
 1056|    246|  return mem_cd_iconveh_internal (src, srclen, cd->cd, cd->cd1, cd->cd2,
 1057|    246|                                  handler, 0, offsets, resultp, lengthp);
 1058|    246|}
mem_iconveh:
 1095|    246|{
 1096|    246|  if (srclen == 0)
  ------------------
  |  Branch (1096:7): [True: 0, False: 246]
  ------------------
 1097|      0|    {
 1098|       |      /* Nothing to convert.  */
 1099|      0|      *lengthp = 0;
 1100|      0|      return 0;
 1101|      0|    }
 1102|    246|  else if (offsets == NULL && c_strcasecmp (from_codeset, to_codeset) == 0)
  ------------------
  |  Branch (1102:12): [True: 246, False: 0]
  |  Branch (1102:31): [True: 0, False: 246]
  ------------------
 1103|      0|    {
 1104|      0|      char *result;
 1105|       |
 1106|      0|      if (*resultp != NULL && *lengthp >= srclen)
  ------------------
  |  Branch (1106:11): [True: 0, False: 0]
  |  Branch (1106:31): [True: 0, False: 0]
  ------------------
 1107|      0|        result = *resultp;
 1108|      0|      else
 1109|      0|        {
 1110|      0|          result = (char *) malloc (srclen);
 1111|      0|          if (result == NULL)
  ------------------
  |  Branch (1111:15): [True: 0, False: 0]
  ------------------
 1112|      0|            {
 1113|      0|              errno = ENOMEM;
 1114|      0|              return -1;
 1115|      0|            }
 1116|      0|        }
 1117|      0|      memcpy (result, src, srclen);
 1118|      0|      *resultp = result;
 1119|      0|      *lengthp = srclen;
 1120|      0|      return 0;
 1121|      0|    }
 1122|    246|  else
 1123|    246|    {
 1124|    246|#if HAVE_ICONV
 1125|    246|      iconveh_t cd;
 1126|    246|      char *result;
 1127|    246|      size_t length;
 1128|    246|      int retval;
 1129|       |
 1130|    246|      if (iconveh_open (to_codeset, from_codeset, &cd) < 0)
  ------------------
  |  Branch (1130:11): [True: 0, False: 246]
  ------------------
 1131|      0|        return -1;
 1132|       |
 1133|    246|      result = *resultp;
 1134|    246|      length = *lengthp;
 1135|    246|      retval = mem_cd_iconveh (src, srclen, &cd, handler, offsets,
 1136|    246|                               &result, &length);
 1137|       |
 1138|    246|      if (retval < 0)
  ------------------
  |  Branch (1138:11): [True: 246, False: 0]
  ------------------
 1139|    246|        {
 1140|       |          /* Close cd, but preserve the errno from str_cd_iconv.  */
 1141|    246|          int saved_errno = errno;
 1142|    246|          iconveh_close (&cd);
 1143|    246|          errno = saved_errno;
 1144|    246|        }
 1145|      0|      else
 1146|      0|        {
 1147|      0|          if (iconveh_close (&cd) < 0)
  ------------------
  |  Branch (1147:15): [True: 0, False: 0]
  ------------------
 1148|      0|            {
 1149|      0|              if (result != *resultp)
  ------------------
  |  Branch (1149:19): [True: 0, False: 0]
  ------------------
 1150|      0|                free (result);
 1151|      0|              return -1;
 1152|      0|            }
 1153|      0|          *resultp = result;
 1154|      0|          *lengthp = length;
 1155|      0|        }
 1156|    246|      return retval;
 1157|       |#else
 1158|       |      /* This is a different error code than if iconv_open existed but didn't
 1159|       |         support from_codeset and to_codeset, so that the caller can emit
 1160|       |         an error message such as
 1161|       |           "iconv() is not supported. Installing GNU libiconv and
 1162|       |            then reinstalling this package would fix this."  */
 1163|       |      errno = ENOSYS;
 1164|       |      return -1;
 1165|       |#endif
 1166|    246|    }
 1167|    246|}
striconveh.c:mem_cd_iconveh_internal:
  347|    246|{
  348|       |  /* When a conversion error occurs, we cannot start using CD1 and CD2 at
  349|       |     this point: FROM_CODESET may be a stateful encoding like ISO-2022-KR.
  350|       |     Instead, we have to start afresh from the beginning of SRC.  */
  351|       |  /* Use a temporary buffer, so that for small strings, a single malloc()
  352|       |     call will be sufficient.  */
  353|    246|# define tmpbufsize 4096
  354|       |  /* The alignment is needed when converting e.g. to glibc's WCHAR_T or
  355|       |     libiconv's UCS-4-INTERNAL encoding.  */
  356|    246|  union { unsigned int align; char buf[tmpbufsize]; } tmp;
  357|    246|# define tmpbuf tmp.buf
  358|       |
  359|    246|  char *initial_result;
  360|    246|  char *result;
  361|    246|  size_t allocated;
  362|    246|  size_t length;
  363|    246|  size_t last_length = (size_t)(-1); /* only needed if offsets != NULL */
  364|       |
  365|    246|  if (*resultp != NULL && *lengthp >= sizeof (tmpbuf))
  ------------------
  |  |  357|      0|# define tmpbuf tmp.buf
  ------------------
  |  Branch (365:7): [True: 0, False: 246]
  |  Branch (365:27): [True: 0, False: 0]
  ------------------
  366|      0|    {
  367|      0|      initial_result = *resultp;
  368|      0|      allocated = *lengthp;
  369|      0|    }
  370|    246|  else
  371|    246|    {
  372|    246|      initial_result = tmpbuf;
  ------------------
  |  |  357|    246|# define tmpbuf tmp.buf
  ------------------
  373|    246|      allocated = sizeof (tmpbuf);
  ------------------
  |  |  357|    246|# define tmpbuf tmp.buf
  ------------------
  374|    246|    }
  375|    246|  result = initial_result;
  376|       |
  377|       |  /* Test whether a direct conversion is possible at all.  */
  378|    246|  if (cd == (iconv_t)(-1))
  ------------------
  |  Branch (378:7): [True: 0, False: 246]
  ------------------
  379|      0|    goto indirectly;
  380|       |
  381|    246|  if (offsets != NULL)
  ------------------
  |  Branch (381:7): [True: 0, False: 246]
  ------------------
  382|      0|    {
  383|      0|      size_t i;
  384|       |
  385|      0|      for (i = 0; i < srclen; i++)
  ------------------
  |  Branch (385:19): [True: 0, False: 0]
  ------------------
  386|      0|        offsets[i] = (size_t)(-1);
  387|       |
  388|      0|      last_length = (size_t)(-1);
  389|      0|    }
  390|    246|  length = 0;
  391|       |
  392|       |  /* First, try a direct conversion, and see whether a conversion error
  393|       |     occurs at all.  */
  394|    246|  {
  395|    246|    const char *inptr = src;
  396|    246|    size_t insize = srclen;
  397|       |
  398|       |    /* Set to the initial state.  */
  399|    246|    iconv (cd, NULL, NULL, NULL, NULL);
  400|       |
  401|    264|    while (insize > 0)
  ------------------
  |  Branch (401:12): [True: 264, False: 0]
  ------------------
  402|    264|      {
  403|    264|        char *outptr = result + length;
  404|    264|        size_t outsize = allocated - extra_alloc - length;
  405|    264|        bool incremented;
  406|    264|        size_t res;
  407|    264|        bool grow;
  408|       |
  409|    264|        if (offsets != NULL)
  ------------------
  |  Branch (409:13): [True: 0, False: 264]
  ------------------
  410|      0|          {
  411|      0|            if (length != last_length) /* ensure that offset[] be increasing */
  ------------------
  |  Branch (411:17): [True: 0, False: 0]
  ------------------
  412|      0|              {
  413|      0|                offsets[inptr - src] = length;
  414|      0|                last_length = length;
  415|      0|              }
  416|      0|            res = iconv_carefully_1 (cd,
  417|      0|                                     &inptr, &insize,
  418|      0|                                     &outptr, &outsize,
  419|      0|                                     &incremented);
  420|      0|          }
  421|    264|        else
  422|       |          /* Use iconv_carefully instead of iconv here, because:
  423|       |             - If TO_CODESET is UTF-8, we can do the error handling in this
  424|       |               loop, no need for a second loop,
  425|       |             - With iconv() implementations other than GNU libiconv and GNU
  426|       |               libc, if we use iconv() in a big swoop, checking for an E2BIG
  427|       |               return, we lose the number of irreversible conversions.  */
  428|    264|          res = iconv_carefully (cd,
  ------------------
  |  |  201|    264|     (*(incremented) = false, \
  |  |  202|    264|      iconv (cd, (ICONV_CONST char **) (inbuf), inbytesleft, outbuf, outbytesleft))
  ------------------
  429|    264|                                 &inptr, &insize,
  430|    264|                                 &outptr, &outsize,
  431|    264|                                 &incremented);
  432|       |
  433|    264|        length = outptr - result;
  434|    264|        grow = (length + extra_alloc > allocated / 2);
  435|    264|        if (res == (size_t)(-1))
  ------------------
  |  Branch (435:13): [True: 264, False: 0]
  ------------------
  436|    264|          {
  437|    264|            if (errno == E2BIG)
  ------------------
  |  Branch (437:17): [True: 18, False: 246]
  ------------------
  438|     18|              grow = true;
  439|    246|            else if (errno == EINVAL)
  ------------------
  |  Branch (439:22): [True: 0, False: 246]
  ------------------
  440|      0|              break;
  441|    246|            else if (errno == EILSEQ && handler != iconveh_error)
  ------------------
  |  Branch (441:22): [True: 246, False: 0]
  |  Branch (441:41): [True: 0, False: 246]
  ------------------
  442|      0|              {
  443|      0|                if (cd2 == (iconv_t)(-1))
  ------------------
  |  Branch (443:21): [True: 0, False: 0]
  ------------------
  444|      0|                  {
  445|       |                    /* TO_CODESET is UTF-8.  */
  446|       |                    /* Error handling can produce up to 1 or 3 bytes of
  447|       |                       output.  */
  448|      0|                    size_t extra_need =
  449|      0|                      (handler == iconveh_replacement_character ? 3 : 1);
  ------------------
  |  Branch (449:24): [True: 0, False: 0]
  ------------------
  450|      0|                    if (length + extra_need + extra_alloc > allocated)
  ------------------
  |  Branch (450:25): [True: 0, False: 0]
  ------------------
  451|      0|                      {
  452|      0|                        char *memory;
  453|       |
  454|      0|                        allocated = 2 * allocated;
  455|      0|                        if (length + extra_need + extra_alloc > allocated)
  ------------------
  |  Branch (455:29): [True: 0, False: 0]
  ------------------
  456|      0|                          allocated = 2 * allocated;
  457|      0|                        if (length + extra_need + extra_alloc > allocated)
  ------------------
  |  Branch (457:29): [True: 0, False: 0]
  ------------------
  458|      0|                          abort ();
  459|      0|                        if (result == initial_result)
  ------------------
  |  Branch (459:29): [True: 0, False: 0]
  ------------------
  460|      0|                          memory = (char *) malloc (allocated);
  461|      0|                        else
  462|      0|                          memory = (char *) realloc (result, allocated);
  463|      0|                        if (memory == NULL)
  ------------------
  |  Branch (463:29): [True: 0, False: 0]
  ------------------
  464|      0|                          {
  465|      0|                            if (result != initial_result)
  ------------------
  |  Branch (465:33): [True: 0, False: 0]
  ------------------
  466|      0|                              free (result);
  467|      0|                            errno = ENOMEM;
  468|      0|                            return -1;
  469|      0|                          }
  470|      0|                        if (result == initial_result)
  ------------------
  |  Branch (470:29): [True: 0, False: 0]
  ------------------
  471|      0|                          memcpy (memory, initial_result, length);
  472|      0|                        result = memory;
  473|      0|                        grow = false;
  474|      0|                      }
  475|       |                    /* The input is invalid in FROM_CODESET.  Eat up one byte
  476|       |                       and emit a replacement character or a question mark.  */
  477|      0|                    if (!incremented)
  ------------------
  |  Branch (477:25): [True: 0, False: 0]
  ------------------
  478|      0|                      {
  479|      0|                        if (insize == 0)
  ------------------
  |  Branch (479:29): [True: 0, False: 0]
  ------------------
  480|      0|                          abort ();
  481|      0|                        inptr++;
  482|      0|                        insize--;
  483|      0|                      }
  484|      0|                    if (handler == iconveh_replacement_character)
  ------------------
  |  Branch (484:25): [True: 0, False: 0]
  ------------------
  485|      0|                      {
  486|       |                        /* U+FFFD in UTF-8 encoding.  */
  487|      0|                        result[length+0] = '\357';
  488|      0|                        result[length+1] = '\277';
  489|      0|                        result[length+2] = '\275';
  490|      0|                        length += 3;
  491|      0|                      }
  492|      0|                    else
  493|      0|                      {
  494|      0|                        result[length] = '?';
  495|      0|                        length++;
  496|      0|                      }
  497|      0|                  }
  498|      0|                else
  499|      0|                  goto indirectly;
  500|      0|              }
  501|    246|            else
  502|    246|              {
  503|    246|                if (result != initial_result)
  ------------------
  |  Branch (503:21): [True: 10, False: 236]
  ------------------
  504|     10|                  free (result);
  505|    246|                return -1;
  506|    246|              }
  507|    264|          }
  508|     18|        if (insize == 0)
  ------------------
  |  Branch (508:13): [True: 0, False: 18]
  ------------------
  509|      0|          break;
  510|     18|        if (grow)
  ------------------
  |  Branch (510:13): [True: 18, False: 0]
  ------------------
  511|     18|          {
  512|     18|            char *memory;
  513|       |
  514|     18|            allocated = 2 * allocated;
  515|     18|            if (result == initial_result)
  ------------------
  |  Branch (515:17): [True: 10, False: 8]
  ------------------
  516|     10|              memory = (char *) malloc (allocated);
  517|      8|            else
  518|      8|              memory = (char *) realloc (result, allocated);
  519|     18|            if (memory == NULL)
  ------------------
  |  Branch (519:17): [True: 0, False: 18]
  ------------------
  520|      0|              {
  521|      0|                if (result != initial_result)
  ------------------
  |  Branch (521:21): [True: 0, False: 0]
  ------------------
  522|      0|                  free (result);
  523|      0|                errno = ENOMEM;
  524|      0|                return -1;
  525|      0|              }
  526|     18|            if (result == initial_result)
  ------------------
  |  Branch (526:17): [True: 10, False: 8]
  ------------------
  527|     10|              memcpy (memory, initial_result, length);
  528|     18|            result = memory;
  529|     18|          }
  530|     18|      }
  531|    246|  }
  532|       |
  533|       |  /* Now get the conversion state back to the initial state.
  534|       |     But avoid glibc-2.1 bug and Solaris 2.7 bug.  */
  535|      0|#if defined _LIBICONV_VERSION \
  536|      0|    || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
  537|      0|         || defined __sun)
  538|      0|  for (;;)
  539|      0|    {
  540|      0|      char *outptr = result + length;
  541|      0|      size_t outsize = allocated - extra_alloc - length;
  542|      0|      size_t res;
  543|       |
  544|      0|      res = iconv (cd, NULL, NULL, &outptr, &outsize);
  545|      0|      length = outptr - result;
  546|      0|      if (res == (size_t)(-1))
  ------------------
  |  Branch (546:11): [True: 0, False: 0]
  ------------------
  547|      0|        {
  548|      0|          if (errno == E2BIG)
  ------------------
  |  Branch (548:15): [True: 0, False: 0]
  ------------------
  549|      0|            {
  550|      0|              char *memory;
  551|       |
  552|      0|              allocated = 2 * allocated;
  553|      0|              if (result == initial_result)
  ------------------
  |  Branch (553:19): [True: 0, False: 0]
  ------------------
  554|      0|                memory = (char *) malloc (allocated);
  555|      0|              else
  556|      0|                memory = (char *) realloc (result, allocated);
  557|      0|              if (memory == NULL)
  ------------------
  |  Branch (557:19): [True: 0, False: 0]
  ------------------
  558|      0|                {
  559|      0|                  if (result != initial_result)
  ------------------
  |  Branch (559:23): [True: 0, False: 0]
  ------------------
  560|      0|                    free (result);
  561|      0|                  errno = ENOMEM;
  562|      0|                  return -1;
  563|      0|                }
  564|      0|              if (result == initial_result)
  ------------------
  |  Branch (564:19): [True: 0, False: 0]
  ------------------
  565|      0|                memcpy (memory, initial_result, length);
  566|      0|              result = memory;
  567|      0|            }
  568|      0|          else
  569|      0|            {
  570|      0|              if (result != initial_result)
  ------------------
  |  Branch (570:19): [True: 0, False: 0]
  ------------------
  571|      0|                free (result);
  572|      0|              return -1;
  573|      0|            }
  574|      0|        }
  575|      0|      else
  576|      0|        break;
  577|      0|    }
  578|      0|#endif
  579|       |
  580|       |  /* The direct conversion succeeded.  */
  581|      0|  goto done;
  582|       |
  583|      0| indirectly:
  584|       |  /* The direct conversion failed.
  585|       |     Use a conversion through UTF-8.  */
  586|      0|  if (offsets != NULL)
  ------------------
  |  Branch (586:7): [True: 0, False: 0]
  ------------------
  587|      0|    {
  588|      0|      size_t i;
  589|       |
  590|      0|      for (i = 0; i < srclen; i++)
  ------------------
  |  Branch (590:19): [True: 0, False: 0]
  ------------------
  591|      0|        offsets[i] = (size_t)(-1);
  592|       |
  593|      0|      last_length = (size_t)(-1);
  594|      0|    }
  595|      0|  length = 0;
  596|      0|  {
  597|      0|    const bool slowly = (offsets != NULL || handler == iconveh_error);
  ------------------
  |  Branch (597:26): [True: 0, False: 0]
  |  Branch (597:45): [True: 0, False: 0]
  ------------------
  598|      0|# define utf8bufsize 4096 /* may also be smaller or larger than tmpbufsize */
  599|      0|    char utf8buf[utf8bufsize + 3];
  600|      0|    size_t utf8len = 0;
  601|      0|    const char *in1ptr = src;
  602|      0|    size_t in1size = srclen;
  603|      0|    bool do_final_flush1 = true;
  604|      0|    bool do_final_flush2 = true;
  605|       |
  606|       |    /* Set to the initial state.  */
  607|      0|    if (cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (607:9): [True: 0, False: 0]
  ------------------
  608|      0|      iconv (cd1, NULL, NULL, NULL, NULL);
  609|      0|    if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (609:9): [True: 0, False: 0]
  ------------------
  610|      0|      iconv (cd2, NULL, NULL, NULL, NULL);
  611|       |
  612|      0|    while (in1size > 0 || do_final_flush1 || utf8len > 0 || do_final_flush2)
  ------------------
  |  Branch (612:12): [True: 0, False: 0]
  |  Branch (612:27): [True: 0, False: 0]
  |  Branch (612:46): [True: 0, False: 0]
  |  Branch (612:61): [True: 0, False: 0]
  ------------------
  613|      0|      {
  614|      0|        char *out1ptr = utf8buf + utf8len;
  615|      0|        size_t out1size = utf8bufsize - utf8len;
  ------------------
  |  |  598|      0|# define utf8bufsize 4096 /* may also be smaller or larger than tmpbufsize */
  ------------------
  616|      0|        bool incremented1;
  617|      0|        size_t res1;
  618|      0|        int errno1;
  619|       |
  620|       |        /* Conversion step 1: from FROM_CODESET to UTF-8.  */
  621|      0|        if (in1size > 0)
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  ------------------
  622|      0|          {
  623|      0|            if (offsets != NULL
  ------------------
  |  Branch (623:17): [True: 0, False: 0]
  ------------------
  624|      0|                && length != last_length) /* ensure that offset[] be increasing */
  ------------------
  |  Branch (624:20): [True: 0, False: 0]
  ------------------
  625|      0|              {
  626|      0|                offsets[in1ptr - src] = length;
  627|      0|                last_length = length;
  628|      0|              }
  629|      0|            if (cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (629:17): [True: 0, False: 0]
  ------------------
  630|      0|              {
  631|      0|                if (slowly)
  ------------------
  |  Branch (631:21): [True: 0, False: 0]
  ------------------
  632|      0|                  res1 = iconv_carefully_1 (cd1,
  633|      0|                                            &in1ptr, &in1size,
  634|      0|                                            &out1ptr, &out1size,
  635|      0|                                            &incremented1);
  636|      0|                else
  637|      0|                  res1 = iconv_carefully (cd1,
  ------------------
  |  |  201|      0|     (*(incremented) = false, \
  |  |  202|      0|      iconv (cd, (ICONV_CONST char **) (inbuf), inbytesleft, outbuf, outbytesleft))
  ------------------
  638|      0|                                          &in1ptr, &in1size,
  639|      0|                                          &out1ptr, &out1size,
  640|      0|                                          &incremented1);
  641|      0|              }
  642|      0|            else
  643|      0|              {
  644|       |                /* FROM_CODESET is UTF-8.  */
  645|      0|                res1 = utf8conv_carefully (slowly,
  646|      0|                                           &in1ptr, &in1size,
  647|      0|                                           &out1ptr, &out1size,
  648|      0|                                           &incremented1);
  649|      0|              }
  650|      0|          }
  651|      0|        else if (do_final_flush1)
  ------------------
  |  Branch (651:18): [True: 0, False: 0]
  ------------------
  652|      0|          {
  653|       |            /* Now get the conversion state of CD1 back to the initial state.
  654|       |               But avoid glibc-2.1 bug and Solaris 2.7 bug.  */
  655|      0|# if defined _LIBICONV_VERSION \
  656|      0|     || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
  657|      0|          || defined __sun)
  658|      0|            if (cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (658:17): [True: 0, False: 0]
  ------------------
  659|      0|              res1 = iconv (cd1, NULL, NULL, &out1ptr, &out1size);
  660|      0|            else
  661|      0|# endif
  662|      0|              res1 = 0;
  663|      0|            do_final_flush1 = false;
  664|      0|            incremented1 = true;
  665|      0|          }
  666|      0|        else
  667|      0|          {
  668|      0|            res1 = 0;
  669|      0|            incremented1 = true;
  670|      0|          }
  671|      0|        if (res1 == (size_t)(-1)
  ------------------
  |  Branch (671:13): [True: 0, False: 0]
  ------------------
  672|      0|            && !(errno == E2BIG || errno == EINVAL || errno == EILSEQ))
  ------------------
  |  Branch (672:18): [True: 0, False: 0]
  |  Branch (672:36): [True: 0, False: 0]
  |  Branch (672:55): [True: 0, False: 0]
  ------------------
  673|      0|          {
  674|      0|            if (result != initial_result)
  ------------------
  |  Branch (674:17): [True: 0, False: 0]
  ------------------
  675|      0|              free (result);
  676|      0|            return -1;
  677|      0|          }
  678|      0|        if (res1 == (size_t)(-1)
  ------------------
  |  Branch (678:13): [True: 0, False: 0]
  ------------------
  679|      0|            && errno == EILSEQ && handler != iconveh_error)
  ------------------
  |  Branch (679:16): [True: 0, False: 0]
  |  Branch (679:35): [True: 0, False: 0]
  ------------------
  680|      0|          {
  681|       |            /* The input is invalid in FROM_CODESET.  Eat up one byte and
  682|       |               emit a U+FFFD character or a question mark.  Room for this
  683|       |               character was allocated at the end of utf8buf.  */
  684|      0|            if (!incremented1)
  ------------------
  |  Branch (684:17): [True: 0, False: 0]
  ------------------
  685|      0|              {
  686|      0|                if (in1size == 0)
  ------------------
  |  Branch (686:21): [True: 0, False: 0]
  ------------------
  687|      0|                  abort ();
  688|      0|                in1ptr++;
  689|      0|                in1size--;
  690|      0|              }
  691|      0|            if (handler == iconveh_replacement_character)
  ------------------
  |  Branch (691:17): [True: 0, False: 0]
  ------------------
  692|      0|              {
  693|       |                /* U+FFFD in UTF-8 encoding.  */
  694|      0|                out1ptr[0] = '\357';
  695|      0|                out1ptr[1] = '\277';
  696|      0|                out1ptr[2] = '\275';
  697|      0|                out1ptr += 3;
  698|      0|              }
  699|      0|            else
  700|      0|              *out1ptr++ = '?';
  701|      0|            res1 = 0;
  702|      0|          }
  703|      0|        errno1 = errno;
  704|      0|        utf8len = out1ptr - utf8buf;
  705|       |
  706|      0|        if (offsets != NULL
  ------------------
  |  Branch (706:13): [True: 0, False: 0]
  ------------------
  707|      0|            || in1size == 0
  ------------------
  |  Branch (707:16): [True: 0, False: 0]
  ------------------
  708|      0|            || utf8len > utf8bufsize / 2
  ------------------
  |  |  598|      0|# define utf8bufsize 4096 /* may also be smaller or larger than tmpbufsize */
  ------------------
  |  Branch (708:16): [True: 0, False: 0]
  ------------------
  709|      0|            || (res1 == (size_t)(-1) && errno1 == E2BIG))
  ------------------
  |  Branch (709:17): [True: 0, False: 0]
  |  Branch (709:41): [True: 0, False: 0]
  ------------------
  710|      0|          {
  711|       |            /* Conversion step 2: from UTF-8 to TO_CODESET.  */
  712|      0|            const char *in2ptr = utf8buf;
  713|      0|            size_t in2size = utf8len;
  714|       |
  715|      0|            while (in2size > 0
  ------------------
  |  Branch (715:20): [True: 0, False: 0]
  ------------------
  716|      0|                   || (in1size == 0 && !do_final_flush1 && do_final_flush2))
  ------------------
  |  Branch (716:24): [True: 0, False: 0]
  |  Branch (716:40): [True: 0, False: 0]
  |  Branch (716:60): [True: 0, False: 0]
  ------------------
  717|      0|              {
  718|      0|                char *out2ptr = result + length;
  719|      0|                size_t out2size = allocated - extra_alloc - length;
  720|      0|                bool incremented2;
  721|      0|                size_t res2;
  722|      0|                bool grow;
  723|       |
  724|      0|                if (in2size > 0)
  ------------------
  |  Branch (724:21): [True: 0, False: 0]
  ------------------
  725|      0|                  {
  726|      0|                    if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (726:25): [True: 0, False: 0]
  ------------------
  727|      0|                      res2 = iconv_carefully (cd2,
  ------------------
  |  |  201|      0|     (*(incremented) = false, \
  |  |  202|      0|      iconv (cd, (ICONV_CONST char **) (inbuf), inbytesleft, outbuf, outbytesleft))
  ------------------
  728|      0|                                              &in2ptr, &in2size,
  729|      0|                                              &out2ptr, &out2size,
  730|      0|                                              &incremented2);
  731|      0|                    else
  732|       |                      /* TO_CODESET is UTF-8.  */
  733|      0|                      res2 = utf8conv_carefully (false,
  734|      0|                                                 &in2ptr, &in2size,
  735|      0|                                                 &out2ptr, &out2size,
  736|      0|                                                 &incremented2);
  737|      0|                  }
  738|      0|                else /* in1size == 0 && !do_final_flush1
  739|       |                        && in2size == 0 && do_final_flush2 */
  740|      0|                  {
  741|       |                    /* Now get the conversion state of CD1 back to the initial
  742|       |                       state.  But avoid glibc-2.1 bug and Solaris 2.7 bug.  */
  743|      0|# if defined _LIBICONV_VERSION \
  744|      0|     || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
  745|      0|          || defined __sun)
  746|      0|                    if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (746:25): [True: 0, False: 0]
  ------------------
  747|      0|                      res2 = iconv (cd2, NULL, NULL, &out2ptr, &out2size);
  748|      0|                    else
  749|      0|# endif
  750|      0|                      res2 = 0;
  751|      0|                    do_final_flush2 = false;
  752|      0|                    incremented2 = true;
  753|      0|                  }
  754|       |
  755|      0|                length = out2ptr - result;
  756|      0|                grow = (length + extra_alloc > allocated / 2);
  757|      0|                if (res2 == (size_t)(-1))
  ------------------
  |  Branch (757:21): [True: 0, False: 0]
  ------------------
  758|      0|                  {
  759|      0|                    if (errno == E2BIG)
  ------------------
  |  Branch (759:25): [True: 0, False: 0]
  ------------------
  760|      0|                      grow = true;
  761|      0|                    else if (errno == EINVAL)
  ------------------
  |  Branch (761:30): [True: 0, False: 0]
  ------------------
  762|      0|                      break;
  763|      0|                    else if (errno == EILSEQ && handler != iconveh_error)
  ------------------
  |  Branch (763:30): [True: 0, False: 0]
  |  Branch (763:49): [True: 0, False: 0]
  ------------------
  764|      0|                      {
  765|       |                        /* Error handling can produce up to 10 bytes of UTF-8
  766|       |                           output.  But TO_CODESET may be UCS-2, UTF-16 or
  767|       |                           UCS-4, so use CD2 here as well.  */
  768|      0|                        char scratchbuf[10];
  769|      0|                        size_t scratchlen;
  770|      0|                        ucs4_t uc;
  771|      0|                        const char *inptr;
  772|      0|                        size_t insize;
  773|      0|                        size_t res;
  774|       |
  775|      0|                        if (incremented2)
  ------------------
  |  Branch (775:29): [True: 0, False: 0]
  ------------------
  776|      0|                          {
  777|      0|                            if (u8_prev (&uc, (const uint8_t *) in2ptr,
  ------------------
  |  Branch (777:33): [True: 0, False: 0]
  ------------------
  778|      0|                                         (const uint8_t *) utf8buf)
  779|      0|                                == NULL)
  780|      0|                              abort ();
  781|      0|                          }
  782|      0|                        else
  783|      0|                          {
  784|      0|                            int n;
  785|      0|                            if (in2size == 0)
  ------------------
  |  Branch (785:33): [True: 0, False: 0]
  ------------------
  786|      0|                              abort ();
  787|      0|                            n = u8_mbtouc_unsafe (&uc, (const uint8_t *) in2ptr,
  788|      0|                                                  in2size);
  789|      0|                            in2ptr += n;
  790|      0|                            in2size -= n;
  791|      0|                          }
  792|       |
  793|      0|                        if (handler == iconveh_escape_sequence)
  ------------------
  |  Branch (793:29): [True: 0, False: 0]
  ------------------
  794|      0|                          {
  795|      0|                            static char const hex[16] = "0123456789ABCDEF";
  796|      0|                            scratchlen = 0;
  797|      0|                            scratchbuf[scratchlen++] = '\\';
  798|      0|                            if (uc < 0x10000)
  ------------------
  |  Branch (798:33): [True: 0, False: 0]
  ------------------
  799|      0|                              scratchbuf[scratchlen++] = 'u';
  800|      0|                            else
  801|      0|                              {
  802|      0|                                scratchbuf[scratchlen++] = 'U';
  803|      0|                                scratchbuf[scratchlen++] = hex[(uc>>28) & 15];
  804|      0|                                scratchbuf[scratchlen++] = hex[(uc>>24) & 15];
  805|      0|                                scratchbuf[scratchlen++] = hex[(uc>>20) & 15];
  806|      0|                                scratchbuf[scratchlen++] = hex[(uc>>16) & 15];
  807|      0|                              }
  808|      0|                            scratchbuf[scratchlen++] = hex[(uc>>12) & 15];
  809|      0|                            scratchbuf[scratchlen++] = hex[(uc>>8) & 15];
  810|      0|                            scratchbuf[scratchlen++] = hex[(uc>>4) & 15];
  811|      0|                            scratchbuf[scratchlen++] = hex[uc & 15];
  812|      0|                          }
  813|      0|                        else if (handler == iconveh_replacement_character)
  ------------------
  |  Branch (813:34): [True: 0, False: 0]
  ------------------
  814|      0|                          {
  815|       |                            /* U+FFFD in UTF-8 encoding.  */
  816|      0|                            scratchbuf[0] = '\357';
  817|      0|                            scratchbuf[1] = '\277';
  818|      0|                            scratchbuf[2] = '\275';
  819|      0|                            scratchlen = 3;
  820|      0|                          }
  821|      0|                        else
  822|      0|                          {
  823|      0|                            scratchbuf[0] = '?';
  824|      0|                            scratchlen = 1;
  825|      0|                          }
  826|       |
  827|      0|                        inptr = scratchbuf;
  828|      0|                        insize = scratchlen;
  829|      0|                        if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (829:29): [True: 0, False: 0]
  ------------------
  830|      0|                          {
  831|      0|                            char *out2ptr_try = out2ptr;
  832|      0|                            size_t out2size_try = out2size;
  833|      0|                            res = iconv (cd2,
  834|      0|                                         (ICONV_CONST char **) &inptr, &insize,
  835|      0|                                         &out2ptr_try, &out2size_try);
  836|      0|                            if (handler == iconveh_replacement_character
  ------------------
  |  Branch (836:33): [True: 0, False: 0]
  ------------------
  837|      0|                                && (res == (size_t)(-1)
  ------------------
  |  Branch (837:36): [True: 0, False: 0]
  |  Branch (837:37): [True: 0, False: 0]
  ------------------
  838|      0|                                    ? errno == EILSEQ
  839|       |                                    /* FreeBSD iconv(), NetBSD iconv(), and
  840|       |                                       Solaris 11 iconv() insert a '?' if they
  841|       |                                       cannot convert.  This is what we want.
  842|       |                                       But IRIX iconv() inserts a NUL byte if it
  843|       |                                       cannot convert.
  844|       |                                       And musl libc iconv() inserts a '*' if it
  845|       |                                       cannot convert.  */
  846|      0|                                    : (res > 0
  ------------------
  |  Branch (846:40): [True: 0, False: 0]
  ------------------
  847|      0|                                       && !(out2ptr_try - out2ptr == 1
  ------------------
  |  Branch (847:45): [True: 0, False: 0]
  ------------------
  848|      0|                                            && *out2ptr == '?'))))
  ------------------
  |  Branch (848:48): [True: 0, False: 0]
  ------------------
  849|      0|                              {
  850|       |                                /* The iconv() call failed.
  851|       |                                   U+FFFD can't be converted to TO_CODESET.
  852|       |                                   Use '?' instead.  */
  853|      0|                                scratchbuf[0] = '?';
  854|      0|                                scratchlen = 1;
  855|      0|                                inptr = scratchbuf;
  856|      0|                                insize = scratchlen;
  857|      0|                                res = iconv (cd2,
  858|      0|                                             (ICONV_CONST char **) &inptr, &insize,
  859|      0|                                             &out2ptr, &out2size);
  860|      0|                              }
  861|      0|                            else
  862|      0|                              {
  863|       |                                /* Accept the results of the iconv() call.  */
  864|      0|                                out2ptr = out2ptr_try;
  865|      0|                                out2size = out2size_try;
  866|      0|                                res = 0;
  867|      0|                              }
  868|      0|                          }
  869|      0|                        else
  870|      0|                          {
  871|       |                            /* TO_CODESET is UTF-8.  */
  872|      0|                            if (out2size >= insize)
  ------------------
  |  Branch (872:33): [True: 0, False: 0]
  ------------------
  873|      0|                              {
  874|      0|                                memcpy (out2ptr, inptr, insize);
  875|      0|                                out2ptr += insize;
  876|      0|                                out2size -= insize;
  877|      0|                                inptr += insize;
  878|      0|                                insize = 0;
  879|      0|                                res = 0;
  880|      0|                              }
  881|      0|                            else
  882|      0|                              {
  883|      0|                                errno = E2BIG;
  884|      0|                                res = (size_t)(-1);
  885|      0|                              }
  886|      0|                          }
  887|      0|                        length = out2ptr - result;
  888|      0|                        if (res == (size_t)(-1) && errno == E2BIG)
  ------------------
  |  Branch (888:29): [True: 0, False: 0]
  |  Branch (888:52): [True: 0, False: 0]
  ------------------
  889|      0|                          {
  890|      0|                            char *memory;
  891|       |
  892|      0|                            allocated = 2 * allocated;
  893|      0|                            if (length + 1 + extra_alloc > allocated)
  ------------------
  |  Branch (893:33): [True: 0, False: 0]
  ------------------
  894|      0|                              abort ();
  895|      0|                            if (result == initial_result)
  ------------------
  |  Branch (895:33): [True: 0, False: 0]
  ------------------
  896|      0|                              memory = (char *) malloc (allocated);
  897|      0|                            else
  898|      0|                              memory = (char *) realloc (result, allocated);
  899|      0|                            if (memory == NULL)
  ------------------
  |  Branch (899:33): [True: 0, False: 0]
  ------------------
  900|      0|                              {
  901|      0|                                if (result != initial_result)
  ------------------
  |  Branch (901:37): [True: 0, False: 0]
  ------------------
  902|      0|                                  free (result);
  903|      0|                                errno = ENOMEM;
  904|      0|                                return -1;
  905|      0|                              }
  906|      0|                            if (result == initial_result)
  ------------------
  |  Branch (906:33): [True: 0, False: 0]
  ------------------
  907|      0|                              memcpy (memory, initial_result, length);
  908|      0|                            result = memory;
  909|      0|                            grow = false;
  910|       |
  911|      0|                            out2ptr = result + length;
  912|      0|                            out2size = allocated - extra_alloc - length;
  913|      0|                            if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (913:33): [True: 0, False: 0]
  ------------------
  914|      0|                              res = iconv (cd2,
  915|      0|                                           (ICONV_CONST char **) &inptr,
  916|      0|                                           &insize,
  917|      0|                                           &out2ptr, &out2size);
  918|      0|                            else
  919|      0|                              {
  920|       |                                /* TO_CODESET is UTF-8.  */
  921|      0|                                if (!(out2size >= insize))
  ------------------
  |  Branch (921:37): [True: 0, False: 0]
  ------------------
  922|      0|                                  abort ();
  923|      0|                                memcpy (out2ptr, inptr, insize);
  924|      0|                                out2ptr += insize;
  925|      0|                                out2size -= insize;
  926|      0|                                inptr += insize;
  927|      0|                                insize = 0;
  928|      0|                                res = 0;
  929|      0|                              }
  930|      0|                            length = out2ptr - result;
  931|      0|                          }
  932|       |# if !(defined _LIBICONV_VERSION && !(_LIBICONV_VERSION == 0x10b && defined __APPLE__)) \
  933|       |     && !(defined __GLIBC__ && !defined __UCLIBC__)
  934|       |                        /* IRIX iconv() inserts a NUL byte if it cannot convert.
  935|       |                           FreeBSD iconv(), NetBSD iconv(), and Solaris 11
  936|       |                           iconv() insert a '?' if they cannot convert.
  937|       |                           musl libc iconv() inserts a '*' if it cannot convert.
  938|       |                           Only GNU libiconv (excluding the bastard Apple iconv)
  939|       |                           and GNU libc are known to prefer to fail rather than
  940|       |                           doing a lossy conversion.  */
  941|       |                        if (res != (size_t)(-1) && res > 0)
  942|       |                          {
  943|       |                            errno = EILSEQ;
  944|       |                            res = (size_t)(-1);
  945|       |                          }
  946|       |# endif
  947|      0|                        if (res == (size_t)(-1))
  ------------------
  |  Branch (947:29): [True: 0, False: 0]
  ------------------
  948|      0|                          {
  949|       |                            /* Failure converting the ASCII replacement.  */
  950|      0|                            if (result != initial_result)
  ------------------
  |  Branch (950:33): [True: 0, False: 0]
  ------------------
  951|      0|                              free (result);
  952|      0|                            return -1;
  953|      0|                          }
  954|      0|                      }
  955|      0|                    else
  956|      0|                      {
  957|      0|                        if (result != initial_result)
  ------------------
  |  Branch (957:29): [True: 0, False: 0]
  ------------------
  958|      0|                          free (result);
  959|      0|                        return -1;
  960|      0|                      }
  961|      0|                  }
  962|      0|                if (!(in2size > 0
  ------------------
  |  Branch (962:23): [True: 0, False: 0]
  ------------------
  963|      0|                      || (in1size == 0 && !do_final_flush1 && do_final_flush2)))
  ------------------
  |  Branch (963:27): [True: 0, False: 0]
  |  Branch (963:43): [True: 0, False: 0]
  |  Branch (963:63): [True: 0, False: 0]
  ------------------
  964|      0|                  break;
  965|      0|                if (grow)
  ------------------
  |  Branch (965:21): [True: 0, False: 0]
  ------------------
  966|      0|                  {
  967|      0|                    char *memory;
  968|       |
  969|      0|                    allocated = 2 * allocated;
  970|      0|                    if (result == initial_result)
  ------------------
  |  Branch (970:25): [True: 0, False: 0]
  ------------------
  971|      0|                      memory = (char *) malloc (allocated);
  972|      0|                    else
  973|      0|                      memory = (char *) realloc (result, allocated);
  974|      0|                    if (memory == NULL)
  ------------------
  |  Branch (974:25): [True: 0, False: 0]
  ------------------
  975|      0|                      {
  976|      0|                        if (result != initial_result)
  ------------------
  |  Branch (976:29): [True: 0, False: 0]
  ------------------
  977|      0|                          free (result);
  978|      0|                        errno = ENOMEM;
  979|      0|                        return -1;
  980|      0|                      }
  981|      0|                    if (result == initial_result)
  ------------------
  |  Branch (981:25): [True: 0, False: 0]
  ------------------
  982|      0|                      memcpy (memory, initial_result, length);
  983|      0|                    result = memory;
  984|      0|                  }
  985|      0|              }
  986|       |
  987|       |            /* Move the remaining bytes to the beginning of utf8buf.  */
  988|      0|            if (in2size > 0)
  ------------------
  |  Branch (988:17): [True: 0, False: 0]
  ------------------
  989|      0|              memmove (utf8buf, in2ptr, in2size);
  990|      0|            utf8len = in2size;
  991|      0|          }
  992|       |
  993|      0|        if (res1 == (size_t)(-1))
  ------------------
  |  Branch (993:13): [True: 0, False: 0]
  ------------------
  994|      0|          {
  995|      0|            if (errno1 == EINVAL)
  ------------------
  |  Branch (995:17): [True: 0, False: 0]
  ------------------
  996|      0|              in1size = 0;
  997|      0|            else if (errno1 == EILSEQ)
  ------------------
  |  Branch (997:22): [True: 0, False: 0]
  ------------------
  998|      0|              {
  999|      0|                if (result != initial_result)
  ------------------
  |  Branch (999:21): [True: 0, False: 0]
  ------------------
 1000|      0|                  free (result);
 1001|      0|                errno = errno1;
 1002|      0|                return -1;
 1003|      0|              }
 1004|      0|          }
 1005|      0|      }
 1006|      0|# undef utf8bufsize
 1007|      0|  }
 1008|       |
 1009|      0| done:
 1010|       |  /* Now the final memory allocation.  */
 1011|      0|  if (result == tmpbuf)
  ------------------
  |  |  357|      0|# define tmpbuf tmp.buf
  ------------------
  |  Branch (1011:7): [True: 0, False: 0]
  ------------------
 1012|      0|    {
 1013|      0|      size_t memsize = length + extra_alloc;
 1014|       |
 1015|      0|      if (*resultp != NULL && *lengthp >= memsize)
  ------------------
  |  Branch (1015:11): [True: 0, False: 0]
  |  Branch (1015:31): [True: 0, False: 0]
  ------------------
 1016|      0|        result = *resultp;
 1017|      0|      else
 1018|      0|        {
 1019|      0|          char *memory;
 1020|       |
 1021|      0|          memory = (char *) malloc (memsize > 0 ? memsize : 1);
  ------------------
  |  Branch (1021:37): [True: 0, False: 0]
  ------------------
 1022|      0|          if (memory != NULL)
  ------------------
  |  Branch (1022:15): [True: 0, False: 0]
  ------------------
 1023|      0|            result = memory;
 1024|      0|          else
 1025|      0|            {
 1026|      0|              errno = ENOMEM;
 1027|      0|              return -1;
 1028|      0|            }
 1029|      0|        }
 1030|      0|      memcpy (result, tmpbuf, length);
  ------------------
  |  |  357|      0|# define tmpbuf tmp.buf
  ------------------
 1031|      0|    }
 1032|      0|  else if (result != *resultp && length + extra_alloc < allocated)
  ------------------
  |  Branch (1032:12): [True: 0, False: 0]
  |  Branch (1032:34): [True: 0, False: 0]
  ------------------
 1033|      0|    {
 1034|       |      /* Shrink the allocated memory if possible.  */
 1035|      0|      size_t memsize = length + extra_alloc;
 1036|      0|      char *memory;
 1037|       |
 1038|      0|      memory = (char *) realloc (result, memsize > 0 ? memsize : 1);
  ------------------
  |  Branch (1038:42): [True: 0, False: 0]
  ------------------
 1039|      0|      if (memory != NULL)
  ------------------
  |  Branch (1039:11): [True: 0, False: 0]
  ------------------
 1040|      0|        result = memory;
 1041|      0|    }
 1042|      0|  *resultp = result;
 1043|      0|  *lengthp = length;
 1044|      0|  return 0;
 1045|      0|# undef tmpbuf
 1046|      0|# undef tmpbufsize
 1047|      0|}

mem_iconveha:
  214|    246|{
  215|    246|  if (srclen == 0)
  ------------------
  |  Branch (215:7): [True: 0, False: 246]
  ------------------
  216|      0|    {
  217|       |      /* Nothing to convert.  */
  218|      0|      *lengthp = 0;
  219|      0|      return 0;
  220|      0|    }
  221|       |
  222|       |  /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5 or Citrus/FreeBSD/macOS
  223|       |     iconv, we want to use transliteration.  */
  224|    246|#if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
  225|    246|     && !defined __UCLIBC__) \
  226|    246|    || _LIBICONV_VERSION >= 0x0105 \
  227|    246|    || defined ICONV_SET_TRANSLITERATE
  228|    246|  if (transliterate)
  ------------------
  |  Branch (228:7): [True: 246, False: 0]
  ------------------
  229|    246|    {
  230|    246|      int retval;
  231|    246|      size_t len = strlen (to_codeset);
  232|    246|      char *to_codeset_suffixed = (char *) malloca (len + 10 + 1);
  ------------------
  |  |   86|    246|    ((N) < 4032 - (2 * sa_alignment_max - 1)                                   \
  |  |  ------------------
  |  |  |  Branch (86:6): [True: 246, False: 0]
  |  |  ------------------
  |  |   87|    246|     ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max - 1) \
  |  |   88|    246|                  + (2 * sa_alignment_max - 1))                                \
  |  |   89|    246|                 & ~(uintptr_t)(2 * sa_alignment_max - 1))                     \
  |  |   90|    246|     : mmalloca (N))
  ------------------
  233|    246|      if (to_codeset_suffixed == NULL)
  ------------------
  |  Branch (233:11): [True: 0, False: 246]
  ------------------
  234|      0|        {
  235|      0|          errno = ENOMEM;
  236|      0|          return -1;
  237|      0|        }
  238|    246|      memcpy (to_codeset_suffixed, to_codeset, len);
  239|    246|      memcpy (to_codeset_suffixed + len, "//TRANSLIT", 10 + 1);
  240|       |
  241|    246|      retval = mem_iconveha_notranslit (src, srclen,
  242|    246|                                        from_codeset, to_codeset_suffixed,
  243|    246|                                        handler, offsets, resultp, lengthp);
  244|       |
  245|    246|      freea (to_codeset_suffixed);
  246|       |
  247|    246|      return retval;
  248|    246|    }
  249|      0|  else
  250|      0|#endif
  251|      0|    return mem_iconveha_notranslit (src, srclen,
  252|      0|                                    from_codeset, to_codeset,
  253|      0|                                    handler, offsets, resultp, lengthp);
  254|    246|}
striconveha.c:mem_iconveha_notranslit:
  151|    246|{
  152|    246|  int retval = mem_iconveh (src, srclen, from_codeset, to_codeset, handler,
  153|    246|                            offsets, resultp, lengthp);
  154|    246|  if (retval >= 0 || errno != EINVAL)
  ------------------
  |  Branch (154:7): [True: 0, False: 246]
  |  Branch (154:22): [True: 246, False: 0]
  ------------------
  155|    246|    return retval;
  156|      0|  else
  157|      0|    {
  158|      0|      struct autodetect_alias *alias;
  159|       |
  160|       |      /* Unsupported from_codeset or to_codeset. Check whether the caller
  161|       |         requested autodetection.  */
  162|      0|      for (alias = autodetect_list; alias != NULL; alias = alias->next)
  ------------------
  |  Branch (162:37): [True: 0, False: 0]
  ------------------
  163|      0|        if (strcmp (from_codeset, alias->name) == 0)
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|          {
  165|      0|            const char * const *encodings;
  166|       |
  167|      0|            if (handler != iconveh_error)
  ------------------
  |  Branch (167:17): [True: 0, False: 0]
  ------------------
  168|      0|              {
  169|       |                /* First try all encodings without any forgiving.  */
  170|      0|                encodings = alias->encodings_to_try;
  171|      0|                do
  172|      0|                  {
  173|      0|                    retval = mem_iconveha_notranslit (src, srclen,
  174|      0|                                                      *encodings, to_codeset,
  175|      0|                                                      iconveh_error, offsets,
  176|      0|                                                      resultp, lengthp);
  177|      0|                    if (!(retval < 0 && errno == EILSEQ))
  ------------------
  |  Branch (177:27): [True: 0, False: 0]
  |  Branch (177:41): [True: 0, False: 0]
  ------------------
  178|      0|                      return retval;
  179|      0|                    encodings++;
  180|      0|                  }
  181|      0|                while (*encodings != NULL);
  ------------------
  |  Branch (181:24): [True: 0, False: 0]
  ------------------
  182|      0|              }
  183|       |
  184|      0|            encodings = alias->encodings_to_try;
  185|      0|            do
  186|      0|              {
  187|      0|                retval = mem_iconveha_notranslit (src, srclen,
  188|      0|                                                  *encodings, to_codeset,
  189|      0|                                                  handler, offsets,
  190|      0|                                                  resultp, lengthp);
  191|      0|                if (!(retval < 0 && errno == EILSEQ))
  ------------------
  |  Branch (191:23): [True: 0, False: 0]
  |  Branch (191:37): [True: 0, False: 0]
  ------------------
  192|      0|                  return retval;
  193|      0|                encodings++;
  194|      0|              }
  195|      0|            while (*encodings != NULL);
  ------------------
  |  Branch (195:20): [True: 0, False: 0]
  ------------------
  196|       |
  197|       |            /* Return the last call's result.  */
  198|      0|            return -1;
  199|      0|          }
  200|       |
  201|       |      /* It wasn't an autodetection name.  */
  202|      0|      errno = EINVAL;
  203|      0|      return -1;
  204|      0|    }
  205|    246|}

u8_strconv_from_encoding:
   21|    246|{
   22|    246|  UNIT *result;
  ------------------
  |  |   31|    246|#define UNIT uint8_t
  ------------------
   23|    246|  size_t length;
   24|       |
   25|    246|  result =
   26|    246|    U_CONV_FROM_ENCODING (fromcode, handler,
  ------------------
  |  |   32|    246|#define U_CONV_FROM_ENCODING u8_conv_from_encoding
  ------------------
   27|    246|                          string, strlen (string) + 1, NULL,
   28|    246|                          NULL, &length);
   29|    246|  if (result == NULL)
  ------------------
  |  Branch (29:7): [True: 246, False: 0]
  ------------------
   30|    246|    return NULL;
   31|       |  /* Verify the result has exactly one NUL unit, at the end.  */
   32|      0|  if (!(length > 0 && result[length-1] == 0
  ------------------
  |  Branch (32:9): [True: 0, False: 0]
  |  Branch (32:23): [True: 0, False: 0]
  ------------------
   33|      0|        && U_STRLEN (result) == length-1))
  ------------------
  |  |   33|      0|#define U_STRLEN u8_strlen
  ------------------
  |  Branch (33:12): [True: 0, False: 0]
  ------------------
   34|      0|    {
   35|      0|      free (result);
   36|      0|      errno = EILSEQ;
   37|      0|      return NULL;
   38|      0|    }
   39|      0|  return result;
   40|      0|}

u8_conv_from_encoding:
   38|    246|{
   39|    246|  if (STRCASEEQ (fromcode, "UTF-8", 'U','T','F','-','8',0,0,0,0))
  ------------------
  |  |  179|    246|  strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
  |  |  ------------------
  |  |  |  Branch (179:3): [True: 0, False: 246]
  |  |  ------------------
  ------------------
   40|      0|    {
   41|       |      /* Conversion from UTF-8 to UTF-8.  No need to go through iconv().  */
   42|      0|      uint8_t *result;
   43|       |
   44|      0|      if (u8_check ((const uint8_t *) src, srclen))
  ------------------
  |  Branch (44:11): [True: 0, False: 0]
  ------------------
   45|      0|        {
   46|      0|          errno = EILSEQ;
   47|      0|          return NULL;
   48|      0|        }
   49|       |
   50|      0|      if (offsets != NULL)
  ------------------
  |  Branch (50:11): [True: 0, False: 0]
  ------------------
   51|      0|        {
   52|      0|          size_t i;
   53|       |
   54|      0|          for (i = 0; i < srclen; )
  ------------------
  |  Branch (54:23): [True: 0, False: 0]
  ------------------
   55|      0|            {
   56|      0|              int count = u8_mblen ((const uint8_t *) src + i, srclen - i);
   57|       |              /* We can rely on count > 0 because of the previous u8_check.  */
   58|      0|              if (count <= 0)
  ------------------
  |  Branch (58:19): [True: 0, False: 0]
  ------------------
   59|      0|                abort ();
   60|      0|              offsets[i] = i;
   61|      0|              i++;
   62|      0|              while (--count > 0)
  ------------------
  |  Branch (62:22): [True: 0, False: 0]
  ------------------
   63|      0|                offsets[i++] = (size_t)(-1);
   64|      0|            }
   65|      0|        }
   66|       |
   67|       |      /* Memory allocation.  */
   68|      0|      if (resultbuf != NULL && *lengthp >= srclen)
  ------------------
  |  Branch (68:11): [True: 0, False: 0]
  |  Branch (68:32): [True: 0, False: 0]
  ------------------
   69|      0|        result = resultbuf;
   70|      0|      else
   71|      0|        {
   72|      0|          result = (uint8_t *) malloc (srclen > 0 ? srclen : 1);
  ------------------
  |  Branch (72:40): [True: 0, False: 0]
  ------------------
   73|      0|          if (result == NULL)
  ------------------
  |  Branch (73:15): [True: 0, False: 0]
  ------------------
   74|      0|            {
   75|      0|              errno = ENOMEM;
   76|      0|              return NULL;
   77|      0|            }
   78|      0|        }
   79|       |
   80|      0|      if (srclen > 0)
  ------------------
  |  Branch (80:11): [True: 0, False: 0]
  ------------------
   81|      0|        memcpy ((char *) result, src, srclen);
   82|      0|      *lengthp = srclen;
   83|      0|      return result;
   84|      0|    }
   85|    246|  else
   86|    246|    {
   87|    246|      char *result = (char *) resultbuf;
   88|    246|      size_t length = *lengthp;
   89|       |
   90|    246|      if (mem_iconveha (src, srclen, fromcode, "UTF-8", true, handler,
  ------------------
  |  Branch (90:11): [True: 246, False: 0]
  ------------------
   91|    246|                        offsets, &result, &length) < 0)
   92|    246|        return NULL;
   93|       |
   94|      0|      if (result == NULL) /* when (resultbuf == NULL && length == 0)  */
  ------------------
  |  Branch (94:11): [True: 0, False: 0]
  ------------------
   95|      0|        {
   96|      0|          result = (char *) malloc (1);
   97|      0|          if (result == NULL)
  ------------------
  |  Branch (97:15): [True: 0, False: 0]
  ------------------
   98|      0|            {
   99|      0|              errno = ENOMEM;
  100|      0|              return NULL;
  101|      0|            }
  102|      0|        }
  103|      0|      *lengthp = length;
  104|      0|      return (uint8_t *) result;
  105|      0|    }
  106|    246|}

CRYPTO_malloc_array:
   19|   667k|{
   20|   667k|    size_t bytes;
   21|       |
   22|   667k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|   667k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 667k]
  |  |  ------------------
  ------------------
   23|      0|        return NULL;
   24|       |
   25|   667k|    return CRYPTO_malloc(bytes, file, line);
   26|   667k|}
CRYPTO_calloc:
   29|  26.3M|{
   30|  26.3M|    size_t bytes;
   31|       |
   32|  26.3M|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|  26.3M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 26.3M]
  |  |  ------------------
  ------------------
   33|      0|        return NULL;
   34|       |
   35|  26.3M|    return CRYPTO_zalloc(bytes, file, line);
   36|  26.3M|}
CRYPTO_aligned_alloc_array:
   40|  22.5k|{
   41|  22.5k|    size_t bytes;
   42|       |
   43|  22.5k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line))) {
  ------------------
  |  |   23|  22.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 22.5k]
  |  |  ------------------
  ------------------
   44|      0|        *freeptr = NULL;
   45|       |
   46|      0|        return NULL;
   47|      0|    }
   48|       |
   49|  22.5k|    return CRYPTO_aligned_alloc(bytes, align, freeptr, file, line);
   50|  22.5k|}
CRYPTO_realloc_array:
   54|   653k|{
   55|   653k|    size_t bytes;
   56|       |
   57|   653k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|   653k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 653k]
  |  |  ------------------
  ------------------
   58|      0|        return NULL;
   59|       |
   60|   653k|    return CRYPTO_realloc(addr, bytes, file, line);
   61|   653k|}
CRYPTO_secure_calloc:
   87|  11.5k|{
   88|  11.5k|    size_t bytes;
   89|       |
   90|  11.5k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|  11.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.5k]
  |  |  ------------------
  ------------------
   91|      0|        return NULL;
   92|       |
   93|  11.5k|    return CRYPTO_secure_zalloc(bytes, file, line);
   94|  11.5k|}

ossl_i2c_ASN1_BIT_STRING:
   43|  1.76M|{
   44|  1.76M|    int ret = 0, bits = 0, len;
   45|  1.76M|    unsigned char *p, *d;
   46|       |
   47|  1.76M|    if (a == NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 1.76M]
  ------------------
   48|      0|        goto err;
   49|       |
   50|  1.76M|    len = a->length;
   51|       |
   52|  1.76M|    if (len > INT_MAX - 1)
  ------------------
  |  Branch (52:9): [True: 0, False: 1.76M]
  ------------------
   53|      0|        goto err;
   54|       |
   55|  1.76M|    if ((len > 0) && (a->flags & ASN1_STRING_FLAG_BITS_LEFT))
  ------------------
  |  |   23|  1.76M|#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
  ------------------
  |  Branch (55:9): [True: 1.76M, False: 0]
  |  Branch (55:22): [True: 1.76M, False: 0]
  ------------------
   56|  1.76M|        bits = (int)a->flags & 0x07;
   57|       |
   58|  1.76M|    if (pp == NULL)
  ------------------
  |  Branch (58:9): [True: 1.32M, False: 441k]
  ------------------
   59|  1.32M|        goto done;
   60|       |
   61|   441k|    p = *pp;
   62|       |
   63|   441k|    *(p++) = (unsigned char)bits;
   64|   441k|    d = a->data;
   65|   441k|    if (len > 0) {
  ------------------
  |  Branch (65:9): [True: 441k, False: 0]
  ------------------
   66|   441k|        memcpy(p, d, len);
   67|   441k|        p += len;
   68|   441k|        p[-1] &= (0xff << bits);
   69|   441k|    }
   70|   441k|    *pp = p;
   71|       |
   72|  1.76M|done:
   73|  1.76M|    ret = len + 1;
   74|       |
   75|  1.76M|err:
   76|  1.76M|    return ret;
   77|  1.76M|}
ossl_c2i_ASN1_BIT_STRING:
   81|  2.45M|{
   82|  2.45M|    ASN1_BIT_STRING *ret = NULL;
   83|  2.45M|    const unsigned char *p;
   84|  2.45M|    unsigned char *s;
   85|  2.45M|    int i = 0;
   86|       |
   87|  2.45M|    if (len < 1) {
  ------------------
  |  Branch (87:9): [True: 0, False: 2.45M]
  ------------------
   88|      0|        i = ASN1_R_STRING_TOO_SHORT;
  ------------------
  |  |  114|      0|#define ASN1_R_STRING_TOO_SHORT 152
  ------------------
   89|      0|        goto err;
   90|      0|    }
   91|       |
   92|  2.45M|    if (len > INT_MAX) {
  ------------------
  |  Branch (92:9): [True: 0, False: 2.45M]
  ------------------
   93|      0|        i = ASN1_R_STRING_TOO_LONG;
  ------------------
  |  |  113|      0|#define ASN1_R_STRING_TOO_LONG 151
  ------------------
   94|      0|        goto err;
   95|      0|    }
   96|       |
   97|  2.45M|    if ((a == NULL) || ((*a) == NULL)) {
  ------------------
  |  Branch (97:9): [True: 0, False: 2.45M]
  |  Branch (97:24): [True: 940k, False: 1.51M]
  ------------------
   98|   940k|        if ((ret = ASN1_BIT_STRING_new()) == NULL)
  ------------------
  |  Branch (98:13): [True: 0, False: 940k]
  ------------------
   99|      0|            return NULL;
  100|   940k|    } else
  101|  1.51M|        ret = (*a);
  102|       |
  103|  2.45M|    p = *pp;
  104|  2.45M|    i = *(p++);
  105|  2.45M|    if (i > 7) {
  ------------------
  |  Branch (105:9): [True: 0, False: 2.45M]
  ------------------
  106|      0|        i = ASN1_R_INVALID_BIT_STRING_BITS_LEFT;
  ------------------
  |  |   70|      0|#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220
  ------------------
  107|      0|        goto err;
  108|      0|    }
  109|       |    /*
  110|       |     * We do this to preserve the settings.  If we modify the settings, via
  111|       |     * the _set_bit function, we will recalculate on output
  112|       |     */
  113|  2.45M|    ossl_asn1_string_set_bits_left(ret, i);
  114|       |
  115|  2.45M|    if (len-- > 1) { /* using one because of the bits left byte */
  ------------------
  |  Branch (115:9): [True: 2.45M, False: 0]
  ------------------
  116|  2.45M|        s = OPENSSL_malloc((int)len);
  ------------------
  |  |  107|  2.45M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|  2.45M|        if (s == NULL) {
  ------------------
  |  Branch (117:13): [True: 0, False: 2.45M]
  ------------------
  118|      0|            goto err;
  119|      0|        }
  120|  2.45M|        memcpy(s, p, (int)len);
  121|  2.45M|        s[len - 1] &= (0xff << i);
  122|  2.45M|        p += len;
  123|  2.45M|    } else
  124|      0|        s = NULL;
  125|       |
  126|  2.45M|    ASN1_STRING_set0(ret, s, (int)len);
  127|  2.45M|    ret->type = V_ASN1_BIT_STRING;
  ------------------
  |  |   67|  2.45M|#define V_ASN1_BIT_STRING 3
  ------------------
  128|  2.45M|    if (a != NULL)
  ------------------
  |  Branch (128:9): [True: 2.45M, False: 0]
  ------------------
  129|  2.45M|        (*a) = ret;
  130|  2.45M|    *pp = p;
  131|  2.45M|    return ret;
  132|      0|err:
  133|      0|    if (i != 0)
  ------------------
  |  Branch (133:9): [True: 0, False: 0]
  ------------------
  134|      0|        ERR_raise(ERR_LIB_ASN1, i);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  135|      0|    if ((a == NULL) || (*a != ret))
  ------------------
  |  Branch (135:9): [True: 0, False: 0]
  |  Branch (135:24): [True: 0, False: 0]
  ------------------
  136|      0|        ASN1_BIT_STRING_free(ret);
  137|       |    return NULL;
  138|  2.45M|}

asn1_d2i_read_bio:
  110|  1.00M|{
  111|  1.00M|    BUF_MEM *b;
  112|  1.00M|    unsigned char *p;
  113|  1.00M|    size_t want = HEADER_SIZE;
  ------------------
  |  |  107|  1.00M|#define HEADER_SIZE 2
  ------------------
  114|  1.00M|    uint32_t eos = 0;
  115|  1.00M|    size_t off = 0;
  116|  1.00M|    size_t len = 0;
  117|  1.00M|    size_t diff;
  118|       |
  119|  1.00M|    const unsigned char *q;
  120|  1.00M|    long slen;
  121|  1.00M|    int inf, tag, xclass;
  122|       |
  123|  1.00M|    b = BUF_MEM_new();
  124|  1.00M|    if (b == NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 1.00M]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return -1;
  127|      0|    }
  128|       |
  129|  1.00M|    ERR_set_mark();
  130|  1.69M|    for (;;) {
  131|  1.69M|        diff = len - off;
  132|  1.69M|        if (want >= diff) {
  ------------------
  |  Branch (132:13): [True: 1.69M, False: 0]
  ------------------
  133|  1.69M|            int i;
  134|       |
  135|  1.69M|            want -= diff;
  136|       |
  137|  1.69M|            if (len + want < len || !BUF_MEM_grow_clean(b, len + want)) {
  ------------------
  |  Branch (137:17): [True: 0, False: 1.69M]
  |  Branch (137:37): [True: 0, False: 1.69M]
  ------------------
  138|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  139|      0|                goto err;
  140|      0|            }
  141|  1.69M|            i = BIO_read(in, &(b->data[len]), (int)want);
  142|       |
  143|  1.69M|            if (i <= 0) {
  ------------------
  |  Branch (143:17): [True: 0, False: 1.69M]
  ------------------
  144|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  145|      0|                goto err;
  146|      0|            }
  147|       |
  148|  1.69M|            if (i > 0) {
  ------------------
  |  Branch (148:17): [True: 1.69M, False: 0]
  ------------------
  149|  1.69M|                if (len + i < len) {
  ------------------
  |  Branch (149:21): [True: 0, False: 1.69M]
  ------------------
  150|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|      0|                    goto err;
  152|      0|                }
  153|  1.69M|                len += i;
  154|  1.69M|                if ((size_t)i < want)
  ------------------
  |  Branch (154:21): [True: 0, False: 1.69M]
  ------------------
  155|      0|                    continue;
  156|  1.69M|            }
  157|  1.69M|        }
  158|       |        /* else data already loaded */
  159|       |
  160|       |        /* make sure there is enough data for a complete header */
  161|  1.69M|        p = (unsigned char *)&(b->data[off]);
  162|  1.69M|        q = p;
  163|  1.69M|        diff = len - off;
  164|  1.69M|        if (diff < 2) {
  ------------------
  |  Branch (164:13): [True: 0, False: 1.69M]
  ------------------
  165|       |            /* Failed sanity check */
  166|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  167|      0|            goto err;
  168|      0|        }
  169|       |
  170|  1.69M|        diff--;
  171|  1.69M|        if ((*(q++) & V_ASN1_PRIMITIVE_TAG) == V_ASN1_PRIMITIVE_TAG) {
  ------------------
  |  |   55|  1.69M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
                      if ((*(q++) & V_ASN1_PRIMITIVE_TAG) == V_ASN1_PRIMITIVE_TAG) {
  ------------------
  |  |   55|  1.69M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  |  Branch (171:13): [True: 0, False: 1.69M]
  ------------------
  172|      0|            unsigned int i = 0;
  173|       |            /* Multi-byte tag.  See if we have the whole thing yet */
  174|      0|            do {
  175|      0|                if (i > 4) {
  ------------------
  |  Branch (175:21): [True: 0, False: 0]
  ------------------
  176|       |                    /* The tag value must fit into int */
  177|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  178|      0|                    goto err;
  179|      0|                }
  180|      0|                ++i;
  181|      0|                diff--;
  182|      0|            } while (diff > 0 && *(q++) & 0x80);
  ------------------
  |  Branch (182:22): [True: 0, False: 0]
  |  Branch (182:34): [True: 0, False: 0]
  ------------------
  183|       |
  184|      0|            if (diff == 0) {
  ------------------
  |  Branch (184:17): [True: 0, False: 0]
  ------------------
  185|       |                /*
  186|       |                 * End of current data, will need at least 1 more byte for
  187|       |                 * length.  2 if the tag is still incomplete
  188|       |                 */
  189|      0|                want = q - p + 2;
  190|      0|                if (*q & 0x80) {
  ------------------
  |  Branch (190:21): [True: 0, False: 0]
  ------------------
  191|      0|                    want++;
  192|      0|                }
  193|      0|                continue;
  194|      0|            }
  195|      0|        }
  196|       |
  197|       |        /* Check the length.  This should also work for indefinite length */
  198|  1.69M|        diff--;
  199|  1.69M|        if (*q & 0x80) {
  ------------------
  |  Branch (199:13): [True: 1.38M, False: 316k]
  ------------------
  200|  1.38M|            unsigned int i = *q & 0x7f;
  201|       |
  202|  1.38M|            if (i > sizeof(long)) {
  ------------------
  |  Branch (202:17): [True: 0, False: 1.38M]
  ------------------
  203|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  204|      0|                goto err;
  205|      0|            }
  206|  1.38M|            if (i > diff) {
  ------------------
  |  Branch (206:17): [True: 690k, False: 690k]
  ------------------
  207|   690k|                want = q - p + i + 1;
  208|   690k|                continue;
  209|   690k|            }
  210|  1.38M|        }
  211|       |
  212|       |        /*
  213|       |         * We have a complete header now, assuming we didn't hit EOF. Parse the
  214|       |         * tag and length
  215|       |         */
  216|  1.00M|        q = p;
  217|  1.00M|        diff = len - off;
  218|  1.00M|        inf = ASN1_get_object(&q, &slen, &tag, &xclass, (int)diff);
  219|  1.00M|        if (inf & 0x80) {
  ------------------
  |  Branch (219:13): [True: 1.00M, False: 0]
  ------------------
  220|  1.00M|            unsigned long e;
  221|       |
  222|  1.00M|            e = ERR_GET_REASON(ERR_peek_last_error());
  223|  1.00M|            if (e != ASN1_R_TOO_LONG)
  ------------------
  |  |  118|  1.00M|#define ASN1_R_TOO_LONG 155
  ------------------
  |  Branch (223:17): [True: 0, False: 1.00M]
  ------------------
  224|      0|                goto err;
  225|  1.00M|            ERR_pop_to_mark();
  226|  1.00M|            ERR_set_mark();
  227|  1.00M|        }
  228|  1.00M|        off += q - p; /* end of data */
  229|       |
  230|  1.00M|        if (inf & 1) {
  ------------------
  |  Branch (230:13): [True: 0, False: 1.00M]
  ------------------
  231|       |            /* no data body so go round again */
  232|      0|            if (eos == UINT32_MAX) {
  ------------------
  |  Branch (232:17): [True: 0, False: 0]
  ------------------
  233|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  234|      0|                goto err;
  235|      0|            }
  236|      0|            eos++;
  237|      0|            want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 2
  ------------------
  238|  1.00M|        } else if (eos && (slen == 0) && (tag == V_ASN1_EOC)) {
  ------------------
  |  |   64|      0|#define V_ASN1_EOC 0
  ------------------
  |  Branch (238:20): [True: 0, False: 1.00M]
  |  Branch (238:27): [True: 0, False: 0]
  |  Branch (238:42): [True: 0, False: 0]
  ------------------
  239|       |            /* eos value, so go back and read another header */
  240|      0|            eos--;
  241|      0|            if (eos == 0)
  ------------------
  |  Branch (241:17): [True: 0, False: 0]
  ------------------
  242|      0|                break;
  243|      0|            else
  244|      0|                want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 2
  ------------------
  245|  1.00M|        } else {
  246|       |            /* suck in slen bytes of data */
  247|  1.00M|            want = slen;
  248|  1.00M|            if (want > (len - off)) {
  ------------------
  |  Branch (248:17): [True: 1.00M, False: 0]
  ------------------
  249|  1.00M|                size_t chunk_max = ASN1_CHUNK_INITIAL_SIZE;
  ------------------
  |  |  108|  1.00M|#define ASN1_CHUNK_INITIAL_SIZE (16 * 1024)
  ------------------
  250|       |
  251|  1.00M|                want -= (len - off);
  252|  1.00M|                if (want > INT_MAX /* BIO_read takes an int length */ || len + want < len) {
  ------------------
  |  Branch (252:21): [True: 0, False: 1.00M]
  |  Branch (252:74): [True: 0, False: 1.00M]
  ------------------
  253|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  254|      0|                    goto err;
  255|      0|                }
  256|  2.01M|                while (want > 0) {
  ------------------
  |  Branch (256:24): [True: 1.00M, False: 1.00M]
  ------------------
  257|       |                    /*
  258|       |                     * Read content in chunks of increasing size
  259|       |                     * so we can return an error for EOF without
  260|       |                     * having to allocate the entire content length
  261|       |                     * in one go.
  262|       |                     */
  263|  1.00M|                    size_t chunk = want > chunk_max ? chunk_max : want;
  ------------------
  |  Branch (263:36): [True: 0, False: 1.00M]
  ------------------
  264|  1.00M|                    int i;
  265|       |
  266|  1.00M|                    if (!BUF_MEM_grow_clean(b, len + chunk)) {
  ------------------
  |  Branch (266:25): [True: 0, False: 1.00M]
  ------------------
  267|      0|                        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  268|      0|                        goto err;
  269|      0|                    }
  270|  1.00M|                    want -= chunk;
  271|  2.01M|                    while (chunk > 0) {
  ------------------
  |  Branch (271:28): [True: 1.00M, False: 1.00M]
  ------------------
  272|  1.00M|                        i = BIO_read(in, &(b->data[len]), (int)chunk);
  273|  1.00M|                        if (i <= 0) {
  ------------------
  |  Branch (273:29): [True: 0, False: 1.00M]
  ------------------
  274|      0|                            ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  275|      0|                            goto err;
  276|      0|                        }
  277|       |                        /*
  278|       |                         * This can't overflow because |len+want| didn't
  279|       |                         * overflow.
  280|       |                         */
  281|  1.00M|                        len += i;
  282|  1.00M|                        chunk -= i;
  283|  1.00M|                    }
  284|  1.00M|                    if (chunk_max < INT_MAX / 2)
  ------------------
  |  Branch (284:25): [True: 1.00M, False: 0]
  ------------------
  285|  1.00M|                        chunk_max *= 2;
  286|  1.00M|                }
  287|  1.00M|            }
  288|  1.00M|            if (off + slen < off) {
  ------------------
  |  Branch (288:17): [True: 0, False: 1.00M]
  ------------------
  289|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  290|      0|                goto err;
  291|      0|            }
  292|  1.00M|            off += slen;
  293|  1.00M|            if (eos == 0) {
  ------------------
  |  Branch (293:17): [True: 1.00M, False: 0]
  ------------------
  294|  1.00M|                break;
  295|  1.00M|            } else
  296|      0|                want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 2
  ------------------
  297|  1.00M|        }
  298|  1.00M|    }
  299|       |
  300|  1.00M|    if (off > INT_MAX) {
  ------------------
  |  Branch (300:9): [True: 0, False: 1.00M]
  ------------------
  301|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  302|      0|        goto err;
  303|      0|    }
  304|       |
  305|  1.00M|    *pb = b;
  306|  1.00M|    ERR_clear_last_mark();
  307|  1.00M|    return (int)off;
  308|      0|err:
  309|      0|    ERR_clear_last_mark();
  310|      0|    BUF_MEM_free(b);
  311|      0|    return -1;
  312|  1.00M|}

ossl_asn1_item_digest_ex:
   53|   441k|{
   54|   441k|    int i, ret = 0;
   55|   441k|    unsigned char *str = NULL;
   56|   441k|    EVP_MD *fetched_md = (EVP_MD *)md;
   57|       |
   58|   441k|    i = ASN1_item_i2d(asn, &str, it);
   59|   441k|    if (i < 0 || str == NULL)
  ------------------
  |  Branch (59:9): [True: 0, False: 441k]
  |  Branch (59:18): [True: 0, False: 441k]
  ------------------
   60|      0|        return 0;
   61|       |
   62|   441k|    if (EVP_MD_get0_provider(md) == NULL)
  ------------------
  |  Branch (62:9): [True: 441k, False: 0]
  ------------------
   63|   441k|        fetched_md = EVP_MD_fetch(libctx, EVP_MD_get0_name(md), propq);
   64|   441k|    if (fetched_md == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 441k]
  ------------------
   65|      0|        goto err;
   66|       |
   67|   441k|    ret = EVP_Digest(str, i, data, len, fetched_md, NULL);
   68|   441k|err:
   69|   441k|    OPENSSL_free(str);
  ------------------
  |  |  132|   441k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   70|   441k|    if (fetched_md != md)
  ------------------
  |  Branch (70:9): [True: 441k, False: 0]
  ------------------
   71|   441k|        EVP_MD_free(fetched_md);
   72|   441k|    return ret;
   73|   441k|}

ossl_c2i_ASN1_INTEGER:
  301|  1.01M|{
  302|  1.01M|    ASN1_INTEGER *ret = NULL;
  303|  1.01M|    size_t r;
  304|  1.01M|    int neg;
  305|       |
  306|  1.01M|    r = c2i_ibuf(NULL, NULL, *pp, len);
  307|       |
  308|  1.01M|    if (r == 0)
  ------------------
  |  Branch (308:9): [True: 0, False: 1.01M]
  ------------------
  309|      0|        return NULL;
  310|       |
  311|  1.01M|    if ((a == NULL) || ((*a) == NULL)) {
  ------------------
  |  Branch (311:9): [True: 0, False: 1.01M]
  |  Branch (311:24): [True: 510k, False: 503k]
  ------------------
  312|   510k|        ret = ASN1_INTEGER_new();
  313|   510k|        if (ret == NULL)
  ------------------
  |  Branch (313:13): [True: 0, False: 510k]
  ------------------
  314|      0|            return NULL;
  315|   510k|        ret->type = V_ASN1_INTEGER;
  ------------------
  |  |   66|   510k|#define V_ASN1_INTEGER 2
  ------------------
  316|   510k|    } else
  317|   503k|        ret = *a;
  318|       |
  319|  1.01M|    if (r > INT_MAX || ASN1_STRING_set(ret, NULL, (int)r) == 0) {
  ------------------
  |  Branch (319:9): [True: 0, False: 1.01M]
  |  Branch (319:24): [True: 0, False: 1.01M]
  ------------------
  320|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  321|      0|        goto err;
  322|      0|    }
  323|       |
  324|  1.01M|    c2i_ibuf(ret->data, &neg, *pp, len);
  325|       |
  326|  1.01M|    if (neg != 0)
  ------------------
  |  Branch (326:9): [True: 0, False: 1.01M]
  ------------------
  327|      0|        ret->type |= V_ASN1_NEG;
  ------------------
  |  |   99|      0|#define V_ASN1_NEG 0x100
  ------------------
  328|  1.01M|    else
  329|  1.01M|        ret->type &= ~V_ASN1_NEG;
  ------------------
  |  |   99|  1.01M|#define V_ASN1_NEG 0x100
  ------------------
  330|       |
  331|  1.01M|    *pp += len;
  332|  1.01M|    if (a != NULL)
  ------------------
  |  Branch (332:9): [True: 1.01M, False: 0]
  ------------------
  333|  1.01M|        (*a) = ret;
  334|  1.01M|    return ret;
  335|      0|err:
  336|      0|    if (a == NULL || *a != ret)
  ------------------
  |  Branch (336:9): [True: 0, False: 0]
  |  Branch (336:22): [True: 0, False: 0]
  ------------------
  337|      0|        ASN1_INTEGER_free(ret);
  338|       |    return NULL;
  339|  1.01M|}
ASN1_INTEGER_get_int64:
  539|   448k|{
  540|   448k|    return asn1_string_get_int64(pr, a, V_ASN1_INTEGER);
  ------------------
  |  |   66|   448k|#define V_ASN1_INTEGER 2
  ------------------
  541|   448k|}
ASN1_INTEGER_get:
  564|   448k|{
  565|   448k|    int i;
  566|   448k|    int64_t r;
  567|   448k|    if (a == NULL)
  ------------------
  |  Branch (567:9): [True: 0, False: 448k]
  ------------------
  568|      0|        return 0;
  569|   448k|    i = ASN1_INTEGER_get_int64(&r, a);
  570|   448k|    if (i == 0)
  ------------------
  |  Branch (570:9): [True: 0, False: 448k]
  ------------------
  571|      0|        return -1;
  572|   448k|    if (r > LONG_MAX || r < LONG_MIN)
  ------------------
  |  Branch (572:9): [True: 0, False: 448k]
  |  Branch (572:25): [True: 0, False: 448k]
  ------------------
  573|      0|        return -1;
  574|   448k|    return (long)r;
  575|   448k|}
a_int.c:twos_complement:
   78|   453k|{
   79|   453k|    unsigned int carry = pad & 1;
   80|       |
   81|       |    /* Begin at the end of the encoding */
   82|   453k|    if (len != 0) {
  ------------------
  |  Branch (82:9): [True: 453k, False: 0]
  ------------------
   83|       |        /*
   84|       |         * if len == 0 then src/dst could be NULL, and this would be undefined
   85|       |         * behaviour.
   86|       |         */
   87|   453k|        dst += len;
   88|   453k|        src += len;
   89|   453k|    }
   90|       |    /* two's complement value: ~value + 1 */
   91|  7.01M|    while (len-- != 0) {
  ------------------
  |  Branch (91:12): [True: 6.56M, False: 453k]
  ------------------
   92|  6.56M|        *(--dst) = (unsigned char)(carry += *(--src) ^ pad);
   93|  6.56M|        carry >>= 8;
   94|  6.56M|    }
   95|   453k|}
a_int.c:c2i_ibuf:
  156|  2.02M|{
  157|  2.02M|    int neg, pad;
  158|       |    /* Zero content length is illegal */
  159|  2.02M|    if (plen == 0) {
  ------------------
  |  Branch (159:9): [True: 0, False: 2.02M]
  ------------------
  160|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|        return 0;
  162|      0|    }
  163|  2.02M|    neg = p[0] & 0x80;
  164|  2.02M|    if (pneg)
  ------------------
  |  Branch (164:9): [True: 1.01M, False: 1.01M]
  ------------------
  165|  1.01M|        *pneg = neg;
  166|       |    /* Handle common case where length is 1 octet separately */
  167|  2.02M|    if (plen == 1) {
  ------------------
  |  Branch (167:9): [True: 1.12M, False: 906k]
  ------------------
  168|  1.12M|        if (b != NULL) {
  ------------------
  |  Branch (168:13): [True: 560k, False: 560k]
  ------------------
  169|   560k|            if (neg)
  ------------------
  |  Branch (169:17): [True: 0, False: 560k]
  ------------------
  170|      0|                b[0] = (p[0] ^ 0xFF) + 1;
  171|   560k|            else
  172|   560k|                b[0] = p[0];
  173|   560k|        }
  174|  1.12M|        return 1;
  175|  1.12M|    }
  176|       |
  177|   906k|    pad = 0;
  178|   906k|    if (p[0] == 0) {
  ------------------
  |  Branch (178:9): [True: 74.8k, False: 832k]
  ------------------
  179|  74.8k|        pad = 1;
  180|   832k|    } else if (p[0] == 0xFF) {
  ------------------
  |  Branch (180:16): [True: 0, False: 832k]
  ------------------
  181|      0|        size_t i;
  182|       |
  183|       |        /*
  184|       |         * Special case [of "one less minimal negative" for given length]:
  185|       |         * if any other bytes non zero it was padded, otherwise not.
  186|       |         */
  187|      0|        for (pad = 0, i = 1; i < plen; i++)
  ------------------
  |  Branch (187:30): [True: 0, False: 0]
  ------------------
  188|      0|            pad |= p[i];
  189|      0|        pad = pad != 0 ? 1 : 0;
  ------------------
  |  Branch (189:15): [True: 0, False: 0]
  ------------------
  190|      0|    }
  191|       |    /* reject illegal padding: first two octets MSB can't match */
  192|   906k|    if (pad && (neg == (p[1] & 0x80))) {
  ------------------
  |  Branch (192:9): [True: 74.8k, False: 832k]
  |  Branch (192:16): [True: 0, False: 74.8k]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_PADDING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        return 0;
  195|      0|    }
  196|       |
  197|       |    /* skip over pad */
  198|   906k|    p += pad;
  199|   906k|    plen -= pad;
  200|       |
  201|   906k|    if (b != NULL)
  ------------------
  |  Branch (201:9): [True: 453k, False: 453k]
  ------------------
  202|   453k|        twos_complement(b, p, plen, neg ? 0xffU : 0);
  ------------------
  |  Branch (202:37): [True: 0, False: 453k]
  ------------------
  203|       |
  204|   906k|    return plen;
  205|   906k|}
a_int.c:asn1_string_get_int64:
  342|   448k|{
  343|   448k|    if (a == NULL) {
  ------------------
  |  Branch (343:9): [True: 0, False: 448k]
  ------------------
  344|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  345|      0|        return 0;
  346|      0|    }
  347|   448k|    if ((a->type & ~V_ASN1_NEG) != itype) {
  ------------------
  |  |   99|   448k|#define V_ASN1_NEG 0x100
  ------------------
  |  Branch (347:9): [True: 0, False: 448k]
  ------------------
  348|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_WRONG_INTEGER_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|        return 0;
  350|      0|    }
  351|   448k|    return asn1_get_int64(pr, a->data, a->length, a->type & V_ASN1_NEG);
  ------------------
  |  |   99|   448k|#define V_ASN1_NEG 0x100
  ------------------
  352|   448k|}
a_int.c:asn1_get_int64:
  266|   448k|{
  267|   448k|    uint64_t r;
  268|   448k|    if (asn1_get_uint64(&r, b, blen) == 0)
  ------------------
  |  Branch (268:9): [True: 0, False: 448k]
  ------------------
  269|      0|        return 0;
  270|   448k|    if (neg) {
  ------------------
  |  Branch (270:9): [True: 0, False: 448k]
  ------------------
  271|      0|        if (r <= INT64_MAX) {
  ------------------
  |  Branch (271:13): [True: 0, False: 0]
  ------------------
  272|       |            /*
  273|       |             * Most significant bit is guaranteed to be clear, negation
  274|       |             * is guaranteed to be meaningful in platform-neutral sense.
  275|       |             */
  276|      0|            *pr = -(int64_t)r;
  277|      0|        } else if (r == ABS_INT64_MIN) {
  ------------------
  |  |  261|      0|#define ABS_INT64_MIN ((uint64_t)INT64_MAX + (-(INT64_MIN + INT64_MAX)))
  ------------------
  |  Branch (277:20): [True: 0, False: 0]
  ------------------
  278|       |            /*
  279|       |             * This never happens if INT64_MAX == ABS_INT64_MIN, e.g.
  280|       |             * on ones'-complement system.
  281|       |             */
  282|      0|            *pr = (int64_t)(0 - r);
  283|      0|        } else {
  284|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|            return 0;
  286|      0|        }
  287|   448k|    } else {
  288|   448k|        if (r <= INT64_MAX) {
  ------------------
  |  Branch (288:13): [True: 448k, False: 0]
  ------------------
  289|   448k|            *pr = (int64_t)r;
  290|   448k|        } else {
  291|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  292|      0|            return 0;
  293|      0|        }
  294|   448k|    }
  295|   448k|    return 1;
  296|   448k|}
a_int.c:asn1_get_uint64:
  223|   448k|{
  224|   448k|    size_t i;
  225|   448k|    uint64_t r;
  226|       |
  227|   448k|    if (blen > sizeof(*pr)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 448k]
  ------------------
  228|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  229|      0|        return 0;
  230|      0|    }
  231|   448k|    if (b == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 448k]
  ------------------
  232|      0|        return 0;
  233|   896k|    for (r = 0, i = 0; i < blen; i++) {
  ------------------
  |  Branch (233:24): [True: 448k, False: 448k]
  ------------------
  234|   448k|        r <<= 8;
  235|   448k|        r |= b[i];
  236|   448k|    }
  237|   448k|    *pr = r;
  238|   448k|    return 1;
  239|   448k|}

ASN1_mbstring_copy:
   40|  3.56M|{
   41|  3.56M|    return ASN1_mbstring_ncopy(out, in, len, inform, mask, 0, 0);
   42|  3.56M|}
ASN1_mbstring_ncopy:
   47|  3.56M|{
   48|  3.56M|    int str_type;
   49|  3.56M|    int ret;
   50|  3.56M|    char free_out;
   51|  3.56M|    int outform, outlen = 0;
   52|  3.56M|    ASN1_STRING *dest;
   53|  3.56M|    unsigned char *p;
   54|  3.56M|    int nchar;
   55|  3.56M|    int (*cpyfunc)(unsigned long, void *) = NULL;
   56|  3.56M|    if (len == -1) {
  ------------------
  |  Branch (56:9): [True: 0, False: 3.56M]
  ------------------
   57|      0|        size_t len_s = strlen((const char *)in);
   58|       |
   59|      0|        if (len_s >= INT_MAX) {
  ------------------
  |  Branch (59:13): [True: 0, False: 0]
  ------------------
   60|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   61|      0|            return -1;
   62|      0|        }
   63|      0|        len = (int)len_s;
   64|      0|    }
   65|  3.56M|    if (!mask)
  ------------------
  |  Branch (65:9): [True: 0, False: 3.56M]
  ------------------
   66|      0|        mask = DIRSTRING_TYPE;
  ------------------
  |  |  192|      0|    (B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
  |  |  ------------------
  |  |  |  |  105|      0|#define B_ASN1_PRINTABLESTRING 0x0002
  |  |  ------------------
  |  |                   (B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
  |  |  ------------------
  |  |  |  |  106|      0|#define B_ASN1_T61STRING 0x0004
  |  |  ------------------
  |  |                   (B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
  |  |  ------------------
  |  |  |  |  117|      0|#define B_ASN1_BMPSTRING 0x0800
  |  |  ------------------
  |  |                   (B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
  |  |  ------------------
  |  |  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  |  |  ------------------
  ------------------
   67|  3.56M|    if (len < 0) {
  ------------------
  |  Branch (67:9): [True: 0, False: 3.56M]
  ------------------
   68|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   69|      0|        return -1;
   70|      0|    }
   71|       |
   72|       |    /* First do a string check and work out the number of characters */
   73|  3.56M|    switch (inform) {
   74|       |
   75|      0|    case MBSTRING_BMP:
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (75:5): [True: 0, False: 3.56M]
  ------------------
   76|      0|        if (len & 1) {
  ------------------
  |  Branch (76:13): [True: 0, False: 0]
  ------------------
   77|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_BMPSTRING_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   78|      0|            return -1;
   79|      0|        }
   80|      0|        nchar = len >> 1;
   81|      0|        break;
   82|       |
   83|      0|    case MBSTRING_UNIV:
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (83:5): [True: 0, False: 3.56M]
  ------------------
   84|      0|        if (len & 3) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UNIVERSALSTRING_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   86|      0|            return -1;
   87|      0|        }
   88|      0|        nchar = len >> 2;
   89|      0|        break;
   90|       |
   91|   972k|    case MBSTRING_UTF8:
  ------------------
  |  |  125|   972k|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|   972k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (91:5): [True: 972k, False: 2.59M]
  ------------------
   92|   972k|        nchar = 0;
   93|       |        /* This counts the characters and does utf8 syntax checking */
   94|   972k|        ret = traverse_string(in, len, MBSTRING_UTF8, in_utf8, &nchar);
  ------------------
  |  |  125|   972k|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|   972k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
   95|   972k|        if (ret < 0) {
  ------------------
  |  Branch (95:13): [True: 0, False: 972k]
  ------------------
   96|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UTF8STRING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   97|      0|            return -1;
   98|      0|        }
   99|   972k|        break;
  100|       |
  101|  2.59M|    case MBSTRING_ASC:
  ------------------
  |  |  126|  2.59M|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|  2.59M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (101:5): [True: 2.59M, False: 972k]
  ------------------
  102|  2.59M|        nchar = len;
  103|  2.59M|        break;
  104|       |
  105|      0|    default:
  ------------------
  |  Branch (105:5): [True: 0, False: 3.56M]
  ------------------
  106|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_UNKNOWN_FORMAT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  107|      0|        return -1;
  108|  3.56M|    }
  109|       |
  110|  3.56M|    if ((minsize > 0) && (nchar < minsize)) {
  ------------------
  |  Branch (110:9): [True: 0, False: 3.56M]
  |  Branch (110:26): [True: 0, False: 0]
  ------------------
  111|      0|        ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |   66|      0|#define ERR_LIB_ASN1 13
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |  114|      0|#define ASN1_R_STRING_TOO_SHORT 152
  ------------------
  112|      0|            "minsize=%ld", minsize);
  113|      0|        return -1;
  114|      0|    }
  115|       |
  116|  3.56M|    if ((maxsize > 0) && (nchar > maxsize)) {
  ------------------
  |  Branch (116:9): [True: 0, False: 3.56M]
  |  Branch (116:26): [True: 0, False: 0]
  ------------------
  117|      0|        ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |   66|      0|#define ERR_LIB_ASN1 13
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |  113|      0|#define ASN1_R_STRING_TOO_LONG 151
  ------------------
  118|      0|            "maxsize=%ld", maxsize);
  119|      0|        return -1;
  120|      0|    }
  121|       |
  122|       |    /* Now work out minimal type (if any) */
  123|  3.56M|    if (traverse_string(in, len, inform, type_str, &mask) < 0) {
  ------------------
  |  Branch (123:9): [True: 0, False: 3.56M]
  ------------------
  124|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_CHARACTERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  125|      0|        return -1;
  126|      0|    }
  127|       |
  128|       |    /*
  129|       |     * Now work out output format and string type.
  130|       |     * These checks should be in sync with the checks in type_str.
  131|       |     */
  132|  3.56M|    outform = MBSTRING_ASC;
  ------------------
  |  |  126|  3.56M|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|  3.56M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  133|  3.56M|    if (mask & B_ASN1_NUMERICSTRING)
  ------------------
  |  |  104|  3.56M|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  |  Branch (133:9): [True: 0, False: 3.56M]
  ------------------
  134|      0|        str_type = V_ASN1_NUMERICSTRING;
  ------------------
  |  |   78|      0|#define V_ASN1_NUMERICSTRING 18
  ------------------
  135|  3.56M|    else if (mask & B_ASN1_PRINTABLESTRING)
  ------------------
  |  |  105|  3.56M|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  |  Branch (135:14): [True: 0, False: 3.56M]
  ------------------
  136|      0|        str_type = V_ASN1_PRINTABLESTRING;
  ------------------
  |  |   79|      0|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  137|  3.56M|    else if (mask & B_ASN1_IA5STRING)
  ------------------
  |  |  109|  3.56M|#define B_ASN1_IA5STRING 0x0010
  ------------------
  |  Branch (137:14): [True: 0, False: 3.56M]
  ------------------
  138|      0|        str_type = V_ASN1_IA5STRING;
  ------------------
  |  |   83|      0|#define V_ASN1_IA5STRING 22
  ------------------
  139|  3.56M|    else if (mask & B_ASN1_T61STRING)
  ------------------
  |  |  106|  3.56M|#define B_ASN1_T61STRING 0x0004
  ------------------
  |  Branch (139:14): [True: 0, False: 3.56M]
  ------------------
  140|      0|        str_type = V_ASN1_T61STRING;
  ------------------
  |  |   80|      0|#define V_ASN1_T61STRING 20
  ------------------
  141|  3.56M|    else if (mask & B_ASN1_BMPSTRING) {
  ------------------
  |  |  117|  3.56M|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  |  Branch (141:14): [True: 0, False: 3.56M]
  ------------------
  142|      0|        str_type = V_ASN1_BMPSTRING;
  ------------------
  |  |   91|      0|#define V_ASN1_BMPSTRING 30
  ------------------
  143|      0|        outform = MBSTRING_BMP;
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  144|  3.56M|    } else if (mask & B_ASN1_UNIVERSALSTRING) {
  ------------------
  |  |  114|  3.56M|#define B_ASN1_UNIVERSALSTRING 0x0100
  ------------------
  |  Branch (144:16): [True: 0, False: 3.56M]
  ------------------
  145|      0|        str_type = V_ASN1_UNIVERSALSTRING;
  ------------------
  |  |   90|      0|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  146|      0|        outform = MBSTRING_UNIV;
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  147|  3.56M|    } else {
  148|  3.56M|        str_type = V_ASN1_UTF8STRING;
  ------------------
  |  |   75|  3.56M|#define V_ASN1_UTF8STRING 12
  ------------------
  149|  3.56M|        outform = MBSTRING_UTF8;
  ------------------
  |  |  125|  3.56M|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|  3.56M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  150|  3.56M|    }
  151|  3.56M|    if (!out)
  ------------------
  |  Branch (151:9): [True: 0, False: 3.56M]
  ------------------
  152|      0|        return str_type;
  153|  3.56M|    if (*out) {
  ------------------
  |  Branch (153:9): [True: 3.56M, False: 0]
  ------------------
  154|  3.56M|        free_out = 0;
  155|  3.56M|        dest = *out;
  156|  3.56M|        ASN1_STRING_set0(dest, NULL, 0);
  157|  3.56M|        dest->type = str_type;
  158|  3.56M|    } else {
  159|      0|        free_out = 1;
  160|      0|        dest = ASN1_STRING_type_new(str_type);
  161|      0|        if (dest == NULL) {
  ------------------
  |  Branch (161:13): [True: 0, False: 0]
  ------------------
  162|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  163|      0|            return -1;
  164|      0|        }
  165|      0|        *out = dest;
  166|      0|    }
  167|       |    /* If both the same type just copy across */
  168|  3.56M|    if (inform == outform) {
  ------------------
  |  Branch (168:9): [True: 972k, False: 2.59M]
  ------------------
  169|   972k|        if (!ASN1_STRING_set(dest, in, len)) {
  ------------------
  |  Branch (169:13): [True: 0, False: 972k]
  ------------------
  170|      0|            if (free_out) {
  ------------------
  |  Branch (170:17): [True: 0, False: 0]
  ------------------
  171|      0|                ASN1_STRING_free(dest);
  172|      0|                *out = NULL;
  173|      0|            }
  174|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  175|      0|            return -1;
  176|      0|        }
  177|   972k|        return str_type;
  178|   972k|    }
  179|       |
  180|       |    /* Work out how much space the destination will need */
  181|  2.59M|    switch (outform) {
  ------------------
  |  Branch (181:13): [True: 2.59M, False: 0]
  ------------------
  182|      0|    case MBSTRING_ASC:
  ------------------
  |  |  126|      0|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (182:5): [True: 0, False: 2.59M]
  ------------------
  183|      0|        outlen = nchar;
  184|      0|        cpyfunc = cpy_asc;
  185|      0|        break;
  186|       |
  187|      0|    case MBSTRING_BMP:
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (187:5): [True: 0, False: 2.59M]
  ------------------
  188|      0|        if (nchar > INT_MAX / 2) {
  ------------------
  |  Branch (188:13): [True: 0, False: 0]
  ------------------
  189|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  190|      0|            if (free_out) {
  ------------------
  |  Branch (190:17): [True: 0, False: 0]
  ------------------
  191|      0|                ASN1_STRING_free(dest);
  192|      0|                *out = NULL;
  193|      0|            }
  194|      0|            return -1;
  195|      0|        }
  196|      0|        outlen = nchar << 1;
  197|      0|        cpyfunc = cpy_bmp;
  198|      0|        break;
  199|       |
  200|      0|    case MBSTRING_UNIV:
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (200:5): [True: 0, False: 2.59M]
  ------------------
  201|      0|        if (nchar > INT_MAX / 4) {
  ------------------
  |  Branch (201:13): [True: 0, False: 0]
  ------------------
  202|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  203|      0|            if (free_out) {
  ------------------
  |  Branch (203:17): [True: 0, False: 0]
  ------------------
  204|      0|                ASN1_STRING_free(dest);
  205|      0|                *out = NULL;
  206|      0|            }
  207|      0|            return -1;
  208|      0|        }
  209|      0|        outlen = nchar << 2;
  210|      0|        cpyfunc = cpy_univ;
  211|      0|        break;
  212|       |
  213|  2.59M|    case MBSTRING_UTF8:
  ------------------
  |  |  125|  2.59M|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|  2.59M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (213:5): [True: 2.59M, False: 0]
  ------------------
  214|  2.59M|        outlen = 0;
  215|  2.59M|        ret = traverse_string(in, len, inform, out_utf8, &outlen);
  216|  2.59M|        if (ret < 0) { /* error already raised in out_utf8() */
  ------------------
  |  Branch (216:13): [True: 0, False: 2.59M]
  ------------------
  217|      0|            if (free_out) {
  ------------------
  |  Branch (217:17): [True: 0, False: 0]
  ------------------
  218|      0|                ASN1_STRING_free(dest);
  219|      0|                *out = NULL;
  220|      0|            }
  221|      0|            return -1;
  222|      0|        }
  223|  2.59M|        cpyfunc = cpy_utf8;
  224|  2.59M|        break;
  225|  2.59M|    }
  226|  2.59M|    if ((p = OPENSSL_malloc(outlen + 1)) == NULL) {
  ------------------
  |  |  107|  2.59M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (226:9): [True: 0, False: 2.59M]
  ------------------
  227|      0|        if (free_out) {
  ------------------
  |  Branch (227:13): [True: 0, False: 0]
  ------------------
  228|      0|            ASN1_STRING_free(dest);
  229|      0|            *out = NULL;
  230|      0|        }
  231|      0|        return -1;
  232|      0|    }
  233|  2.59M|    dest->length = outlen;
  234|  2.59M|    dest->data = p;
  235|  2.59M|    p[outlen] = 0;
  236|  2.59M|    traverse_string(in, len, inform, cpyfunc, &p);
  237|  2.59M|    return str_type;
  238|  2.59M|}
a_mbstr.c:traverse_string:
  248|  9.73M|{
  249|  9.73M|    unsigned long value;
  250|  9.73M|    int ret;
  251|   157M|    while (len) {
  ------------------
  |  Branch (251:12): [True: 147M, False: 9.73M]
  ------------------
  252|   147M|        if (inform == MBSTRING_ASC) {
  ------------------
  |  |  126|   147M|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|   147M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (252:13): [True: 105M, False: 41.9M]
  ------------------
  253|   105M|            value = *p++;
  254|   105M|            len--;
  255|   105M|        } else if (inform == MBSTRING_BMP) {
  ------------------
  |  |  127|  41.9M|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|  41.9M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (255:20): [True: 0, False: 41.9M]
  ------------------
  256|      0|            value = *p++ << 8;
  257|      0|            value |= *p++;
  258|      0|            len -= 2;
  259|  41.9M|        } else if (inform == MBSTRING_UNIV) {
  ------------------
  |  |  128|  41.9M|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|  41.9M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (259:20): [True: 0, False: 41.9M]
  ------------------
  260|      0|            value = ((unsigned long)*p++) << 24;
  261|      0|            value |= ((unsigned long)*p++) << 16;
  262|      0|            value |= *p++ << 8;
  263|      0|            value |= *p++;
  264|      0|            len -= 4;
  265|  41.9M|        } else {
  266|  41.9M|            ret = UTF8_getc(p, len, &value);
  267|  41.9M|            if (ret < 0)
  ------------------
  |  Branch (267:17): [True: 0, False: 41.9M]
  ------------------
  268|      0|                return -1;
  269|  41.9M|            len -= ret;
  270|  41.9M|            p += ret;
  271|  41.9M|        }
  272|   147M|        if (rfunc) {
  ------------------
  |  Branch (272:13): [True: 147M, False: 0]
  ------------------
  273|   147M|            ret = rfunc(value, arg);
  274|   147M|            if (ret <= 0)
  ------------------
  |  Branch (274:17): [True: 0, False: 147M]
  ------------------
  275|      0|                return ret;
  276|   147M|        }
  277|   147M|    }
  278|  9.73M|    return 1;
  279|  9.73M|}
a_mbstr.c:in_utf8:
  286|  20.9M|{
  287|  20.9M|    int *nchar;
  288|       |
  289|  20.9M|    if (!is_unicode_valid(value))
  ------------------
  |  Branch (289:9): [True: 0, False: 20.9M]
  ------------------
  290|      0|        return -2;
  291|  20.9M|    nchar = arg;
  292|  20.9M|    (*nchar)++;
  293|  20.9M|    return 1;
  294|  20.9M|}
a_mbstr.c:out_utf8:
  299|  35.2M|{
  300|  35.2M|    int *outlen, len;
  301|       |
  302|  35.2M|    len = UTF8_putc(NULL, -1, value);
  303|  35.2M|    if (len <= 0) {
  ------------------
  |  Branch (303:9): [True: 0, False: 35.2M]
  ------------------
  304|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UTF8STRING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  305|      0|        return len;
  306|      0|    }
  307|  35.2M|    outlen = arg;
  308|  35.2M|    if (*outlen > INT_MAX - len) {
  ------------------
  |  Branch (308:9): [True: 0, False: 35.2M]
  ------------------
  309|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|        return -1;
  311|      0|    }
  312|  35.2M|    *outlen += len;
  313|  35.2M|    return 1;
  314|  35.2M|}
a_mbstr.c:type_str:
  322|  56.2M|{
  323|  56.2M|    unsigned long usable_types = *((unsigned long *)arg);
  324|  56.2M|    unsigned long types = usable_types;
  325|  56.2M|    const int native = value > INT_MAX ? INT_MAX : ossl_fromascii(value);
  ------------------
  |  |   57|   112M|#define ossl_fromascii(c) (c)
  ------------------
  |  Branch (325:24): [True: 0, False: 56.2M]
  ------------------
  326|       |
  327|       |    /*
  328|       |     * Clear out all the types which are not checked later. If any of those
  329|       |     * is present in the mask, then the UTF8 type will be added and checked
  330|       |     * below.
  331|       |     */
  332|  56.2M|    types &= B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING
  ------------------
  |  |  104|  56.2M|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
                  types &= B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING
  ------------------
  |  |  105|  56.2M|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  333|  56.2M|        | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  109|  56.2M|#define B_ASN1_IA5STRING 0x0010
  ------------------
                      | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  106|  56.2M|#define B_ASN1_T61STRING 0x0004
  ------------------
                      | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  117|  56.2M|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  334|  56.2M|        | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING;
  ------------------
  |  |  114|  56.2M|#define B_ASN1_UNIVERSALSTRING 0x0100
  ------------------
                      | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING;
  ------------------
  |  |  119|  56.2M|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  335|       |
  336|       |    /*
  337|       |     * If any other types were in the input mask, they're effectively treated
  338|       |     * as UTF8
  339|       |     */
  340|  56.2M|    if (types != usable_types)
  ------------------
  |  Branch (340:9): [True: 0, False: 56.2M]
  ------------------
  341|      0|        types |= B_ASN1_UTF8STRING;
  ------------------
  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  342|       |
  343|       |    /*
  344|       |     * These checks should be in sync with ASN1_mbstring_ncopy.
  345|       |     */
  346|  56.2M|    if ((types & B_ASN1_NUMERICSTRING) && !(ossl_isdigit(native) || native == ' '))
  ------------------
  |  |  104|  56.2M|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  |  Branch (346:9): [True: 0, False: 56.2M]
  |  Branch (346:45): [True: 0, False: 0]
  |  Branch (346:69): [True: 0, False: 0]
  ------------------
  347|      0|        types &= ~B_ASN1_NUMERICSTRING;
  ------------------
  |  |  104|      0|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  348|  56.2M|    if ((types & B_ASN1_PRINTABLESTRING) && !ossl_isasn1print(native))
  ------------------
  |  |  105|  56.2M|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
                  if ((types & B_ASN1_PRINTABLESTRING) && !ossl_isasn1print(native))
  ------------------
  |  |   85|      0|#define ossl_isasn1print(c) (ossl_ctype_check((c), CTYPE_MASK_asn1print))
  |  |  ------------------
  |  |  |  |   38|      0|#define CTYPE_MASK_asn1print 0x800
  |  |  ------------------
  ------------------
  |  Branch (348:9): [True: 0, False: 56.2M]
  |  Branch (348:45): [True: 0, False: 0]
  ------------------
  349|      0|        types &= ~B_ASN1_PRINTABLESTRING;
  ------------------
  |  |  105|      0|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  350|  56.2M|    if ((types & B_ASN1_IA5STRING) && !ossl_isascii(native))
  ------------------
  |  |  109|  56.2M|#define B_ASN1_IA5STRING 0x0010
  ------------------
                  if ((types & B_ASN1_IA5STRING) && !ossl_isascii(native))
  ------------------
  |  |   75|      0|#define ossl_isascii(c) (((c) & ~127) == 0)
  ------------------
  |  Branch (350:9): [True: 0, False: 56.2M]
  |  Branch (350:39): [True: 0, False: 0]
  ------------------
  351|      0|        types &= ~B_ASN1_IA5STRING;
  ------------------
  |  |  109|      0|#define B_ASN1_IA5STRING 0x0010
  ------------------
  352|  56.2M|    if ((types & B_ASN1_T61STRING) && (value > 0xff))
  ------------------
  |  |  106|  56.2M|#define B_ASN1_T61STRING 0x0004
  ------------------
  |  Branch (352:9): [True: 0, False: 56.2M]
  |  Branch (352:39): [True: 0, False: 0]
  ------------------
  353|      0|        types &= ~B_ASN1_T61STRING;
  ------------------
  |  |  106|      0|#define B_ASN1_T61STRING 0x0004
  ------------------
  354|  56.2M|    if ((types & B_ASN1_BMPSTRING) && (value > 0xffff))
  ------------------
  |  |  117|  56.2M|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  |  Branch (354:9): [True: 0, False: 56.2M]
  |  Branch (354:39): [True: 0, False: 0]
  ------------------
  355|      0|        types &= ~B_ASN1_BMPSTRING;
  ------------------
  |  |  117|      0|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  356|  56.2M|    if ((types & B_ASN1_UTF8STRING) && !is_unicode_valid(value))
  ------------------
  |  |  119|  56.2M|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  |  Branch (356:9): [True: 56.2M, False: 0]
  |  Branch (356:40): [True: 0, False: 56.2M]
  ------------------
  357|      0|        types &= ~B_ASN1_UTF8STRING;
  ------------------
  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  358|  56.2M|    if (!types)
  ------------------
  |  Branch (358:9): [True: 0, False: 56.2M]
  ------------------
  359|      0|        return -1;
  360|  56.2M|    *((unsigned long *)arg) = types;
  361|  56.2M|    return 1;
  362|  56.2M|}
a_mbstr.c:cpy_utf8:
  407|  35.2M|{
  408|  35.2M|    unsigned char **p;
  409|  35.2M|    int ret;
  410|  35.2M|    p = arg;
  411|       |    /* We already know there is enough room so pass 0xff as the length */
  412|  35.2M|    ret = UTF8_putc(*p, 0xff, value);
  413|  35.2M|    if (ret < 0)
  ------------------
  |  Branch (413:9): [True: 0, False: 35.2M]
  ------------------
  414|      0|        return ret;
  415|  35.2M|    *p += ret;
  416|  35.2M|    return 1;
  417|  35.2M|}

a2d_ASN1_OBJECT:
   52|  20.1k|{
   53|  20.1k|    int i, first, len = 0, use_bn;
   54|  20.1k|    char c;
   55|  20.1k|    char ftmp[24], *tmp = ftmp;
   56|  20.1k|    int tmpsize = sizeof(ftmp);
   57|  20.1k|    const char *p;
   58|  20.1k|    unsigned long l;
   59|  20.1k|    BIGNUM *bl = NULL;
   60|       |
   61|  20.1k|    if (num == 0) {
  ------------------
  |  Branch (61:9): [True: 0, False: 20.1k]
  ------------------
   62|      0|        return 0;
   63|  20.1k|    } else if (num == -1) {
  ------------------
  |  Branch (63:16): [True: 20.1k, False: 0]
  ------------------
   64|  20.1k|        size_t num_s = strlen(buf);
   65|       |
   66|  20.1k|        if (num_s >= INT_MAX) {
  ------------------
  |  Branch (66:13): [True: 0, False: 20.1k]
  ------------------
   67|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_LENGTH_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   68|      0|            goto err;
   69|      0|        }
   70|  20.1k|        num = (int)num_s;
   71|  20.1k|    }
   72|       |
   73|  20.1k|    p = buf;
   74|  20.1k|    c = *(p++);
   75|  20.1k|    num--;
   76|  20.1k|    if ((c >= '0') && (c <= '2')) {
  ------------------
  |  Branch (76:9): [True: 20.1k, False: 0]
  |  Branch (76:23): [True: 20.1k, False: 0]
  ------------------
   77|  20.1k|        first = c - '0';
   78|  20.1k|    } else {
   79|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_FIRST_NUM_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   80|      0|        goto err;
   81|      0|    }
   82|       |
   83|  20.1k|    if (num <= 0) {
  ------------------
  |  Branch (83:9): [True: 0, False: 20.1k]
  ------------------
   84|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_SECOND_NUMBER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   85|      0|        goto err;
   86|      0|    }
   87|  20.1k|    c = *(p++);
   88|  20.1k|    num--;
   89|   181k|    for (;;) {
   90|   181k|        if (num <= 0)
  ------------------
  |  Branch (90:13): [True: 20.1k, False: 161k]
  ------------------
   91|  20.1k|            break;
   92|   161k|        if ((c != '.') && (c != ' ')) {
  ------------------
  |  Branch (92:13): [True: 0, False: 161k]
  |  Branch (92:27): [True: 0, False: 0]
  ------------------
   93|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_SEPARATOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   94|      0|            goto err;
   95|      0|        }
   96|   161k|        l = 0;
   97|   161k|        use_bn = 0;
   98|   443k|        for (;;) {
   99|   443k|            if (num <= 0)
  ------------------
  |  Branch (99:17): [True: 20.1k, False: 422k]
  ------------------
  100|  20.1k|                break;
  101|   422k|            num--;
  102|   422k|            c = *(p++);
  103|   422k|            if ((c == ' ') || (c == '.'))
  ------------------
  |  Branch (103:17): [True: 0, False: 422k]
  |  Branch (103:31): [True: 140k, False: 281k]
  ------------------
  104|   140k|                break;
  105|   281k|            if (!ossl_isdigit(c)) {
  ------------------
  |  Branch (105:17): [True: 0, False: 281k]
  ------------------
  106|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_DIGIT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  107|      0|                goto err;
  108|      0|            }
  109|   281k|            if (!use_bn && l >= ((ULONG_MAX - 80) / 10L)) {
  ------------------
  |  Branch (109:17): [True: 281k, False: 0]
  |  Branch (109:28): [True: 0, False: 281k]
  ------------------
  110|      0|                use_bn = 1;
  111|      0|                if (bl == NULL)
  ------------------
  |  Branch (111:21): [True: 0, False: 0]
  ------------------
  112|      0|                    bl = BN_new();
  113|      0|                if (bl == NULL || !BN_set_word(bl, l))
  ------------------
  |  Branch (113:21): [True: 0, False: 0]
  |  Branch (113:35): [True: 0, False: 0]
  ------------------
  114|      0|                    goto err;
  115|      0|            }
  116|   281k|            if (use_bn) {
  ------------------
  |  Branch (116:17): [True: 0, False: 281k]
  ------------------
  117|      0|                if (!BN_mul_word(bl, 10L)
  ------------------
  |  Branch (117:21): [True: 0, False: 0]
  ------------------
  118|      0|                    || !BN_add_word(bl, c - '0'))
  ------------------
  |  Branch (118:24): [True: 0, False: 0]
  ------------------
  119|      0|                    goto err;
  120|      0|            } else
  121|   281k|                l = l * 10L + (long)(c - '0');
  122|   281k|        }
  123|   161k|        if (len == 0) {
  ------------------
  |  Branch (123:13): [True: 20.1k, False: 140k]
  ------------------
  124|  20.1k|            if ((first < 2) && (l >= 40)) {
  ------------------
  |  Branch (124:17): [True: 0, False: 20.1k]
  |  Branch (124:32): [True: 0, False: 0]
  ------------------
  125|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_SECOND_NUMBER_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|                goto err;
  127|      0|            }
  128|  20.1k|            if (use_bn) {
  ------------------
  |  Branch (128:17): [True: 0, False: 20.1k]
  ------------------
  129|      0|                if (!BN_add_word(bl, first * 40))
  ------------------
  |  Branch (129:21): [True: 0, False: 0]
  ------------------
  130|      0|                    goto err;
  131|      0|            } else
  132|  20.1k|                l += (long)first * 40;
  133|  20.1k|        }
  134|   161k|        i = 0;
  135|   161k|        if (use_bn) {
  ------------------
  |  Branch (135:13): [True: 0, False: 161k]
  ------------------
  136|      0|            int blsize;
  137|      0|            blsize = BN_num_bits(bl);
  138|      0|            blsize = (blsize + 6) / 7;
  139|      0|            if (blsize > tmpsize) {
  ------------------
  |  Branch (139:17): [True: 0, False: 0]
  ------------------
  140|      0|                if (tmp != ftmp)
  ------------------
  |  Branch (140:21): [True: 0, False: 0]
  ------------------
  141|      0|                    OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  142|      0|                tmpsize = blsize + 32;
  143|      0|                tmp = OPENSSL_malloc(tmpsize);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  144|      0|                if (tmp == NULL)
  ------------------
  |  Branch (144:21): [True: 0, False: 0]
  ------------------
  145|      0|                    goto err;
  146|      0|            }
  147|      0|            while (blsize--) {
  ------------------
  |  Branch (147:20): [True: 0, False: 0]
  ------------------
  148|      0|                BN_ULONG t = BN_div_word(bl, 0x80L);
  149|      0|                if (t == (BN_ULONG)-1)
  ------------------
  |  Branch (149:21): [True: 0, False: 0]
  ------------------
  150|      0|                    goto err;
  151|      0|                tmp[i++] = (unsigned char)t;
  152|      0|            }
  153|   161k|        } else {
  154|       |
  155|   181k|            for (;;) {
  156|   181k|                tmp[i++] = (unsigned char)l & 0x7f;
  157|   181k|                l >>= 7L;
  158|   181k|                if (l == 0L)
  ------------------
  |  Branch (158:21): [True: 161k, False: 20.1k]
  ------------------
  159|   161k|                    break;
  160|   181k|            }
  161|   161k|        }
  162|   161k|        if (out != NULL) {
  ------------------
  |  Branch (162:13): [True: 80.5k, False: 80.5k]
  ------------------
  163|  80.5k|            if (len + i > olen) {
  ------------------
  |  Branch (163:17): [True: 0, False: 80.5k]
  ------------------
  164|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  165|      0|                goto err;
  166|      0|            }
  167|  90.6k|            while (--i > 0)
  ------------------
  |  Branch (167:20): [True: 10.0k, False: 80.5k]
  ------------------
  168|  10.0k|                out[len++] = tmp[i] | 0x80;
  169|  80.5k|            out[len++] = tmp[0];
  170|  80.5k|        } else
  171|  80.5k|            len += i;
  172|   161k|    }
  173|  20.1k|    if (tmp != ftmp)
  ------------------
  |  Branch (173:9): [True: 0, False: 20.1k]
  ------------------
  174|      0|        OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  175|  20.1k|    BN_free(bl);
  176|  20.1k|    return len;
  177|      0|err:
  178|      0|    if (tmp != ftmp)
  ------------------
  |  Branch (178:9): [True: 0, False: 0]
  ------------------
  179|      0|        OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  180|      0|    BN_free(bl);
  181|      0|    return 0;
  182|  20.1k|}
d2i_ASN1_OBJECT:
  220|  10.0k|{
  221|  10.0k|    const unsigned char *p;
  222|  10.0k|    long len;
  223|  10.0k|    int tag, xclass;
  224|  10.0k|    int inf, i;
  225|  10.0k|    ASN1_OBJECT *ret = NULL;
  226|  10.0k|    p = *pp;
  227|  10.0k|    inf = ASN1_get_object(&p, &len, &tag, &xclass, length);
  228|  10.0k|    if (inf & 0x80) {
  ------------------
  |  Branch (228:9): [True: 0, False: 10.0k]
  ------------------
  229|      0|        i = ASN1_R_BAD_OBJECT_HEADER;
  ------------------
  |  |   26|      0|#define ASN1_R_BAD_OBJECT_HEADER 102
  ------------------
  230|      0|        goto err;
  231|      0|    }
  232|       |
  233|  10.0k|    if (tag != V_ASN1_OBJECT) {
  ------------------
  |  |   70|  10.0k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (233:9): [True: 0, False: 10.0k]
  ------------------
  234|      0|        i = ASN1_R_EXPECTING_AN_OBJECT;
  ------------------
  |  |   43|      0|#define ASN1_R_EXPECTING_AN_OBJECT 116
  ------------------
  235|      0|        goto err;
  236|      0|    }
  237|  10.0k|    ret = ossl_c2i_ASN1_OBJECT(a, &p, len);
  238|  10.0k|    if (ret)
  ------------------
  |  Branch (238:9): [True: 10.0k, False: 0]
  ------------------
  239|  10.0k|        *pp = p;
  240|  10.0k|    return ret;
  241|      0|err:
  242|      0|    ERR_raise(ERR_LIB_ASN1, i);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  243|       |    return NULL;
  244|  10.0k|}
ossl_c2i_ASN1_OBJECT:
  248|  8.29M|{
  249|  8.29M|    ASN1_OBJECT *ret = NULL, tobj;
  250|  8.29M|    const unsigned char *p;
  251|  8.29M|    unsigned char *data;
  252|  8.29M|    int i, length;
  253|       |
  254|       |    /*
  255|       |     * Sanity check OID encoding. Need at least one content octet. MSB must
  256|       |     * be clear in the last octet. can't have leading 0x80 in subidentifiers,
  257|       |     * see: X.690 8.19.2
  258|       |     */
  259|  8.29M|    if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || p[len - 1] & 0x80) {
  ------------------
  |  Branch (259:9): [True: 0, False: 8.29M]
  |  Branch (259:21): [True: 0, False: 8.29M]
  |  Branch (259:38): [True: 0, False: 8.29M]
  |  Branch (259:52): [True: 0, False: 8.29M]
  |  Branch (259:73): [True: 0, False: 8.29M]
  ------------------
  260|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_OBJECT_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  261|      0|        return NULL;
  262|      0|    }
  263|       |    /* Now 0 < len <= INT_MAX, so the cast is safe. */
  264|  8.29M|    length = (int)len;
  265|       |    /*
  266|       |     * Try to lookup OID in table: these are all valid encodings so if we get
  267|       |     * a match we know the OID is valid.
  268|       |     */
  269|  8.29M|    tobj.nid = NID_undef;
  ------------------
  |  |   18|  8.29M|#define NID_undef                       0
  ------------------
  270|  8.29M|    tobj.data = p;
  271|  8.29M|    tobj.length = length;
  272|  8.29M|    tobj.flags = 0;
  273|  8.29M|    i = OBJ_obj2nid(&tobj);
  274|  8.29M|    if (i != NID_undef) {
  ------------------
  |  |   18|  8.29M|#define NID_undef                       0
  ------------------
  |  Branch (274:9): [True: 8.27M, False: 20.8k]
  ------------------
  275|       |        /*
  276|       |         * Return shared registered OID object: this improves efficiency
  277|       |         * because we don't have to return a dynamically allocated OID
  278|       |         * and NID lookups can use the cached value.
  279|       |         */
  280|  8.27M|        ret = OBJ_nid2obj(i);
  281|  8.27M|        if (a) {
  ------------------
  |  Branch (281:13): [True: 8.26M, False: 10.0k]
  ------------------
  282|  8.26M|            ASN1_OBJECT_free(*a);
  283|  8.26M|            *a = ret;
  284|  8.26M|        }
  285|  8.27M|        *pp += len;
  286|  8.27M|        return ret;
  287|  8.27M|    }
  288|   208k|    for (i = 0; i < length; i++, p++) {
  ------------------
  |  Branch (288:17): [True: 187k, False: 20.8k]
  ------------------
  289|   187k|        if (*p == 0x80 && (!i || !(p[-1] & 0x80))) {
  ------------------
  |  Branch (289:13): [True: 0, False: 187k]
  |  Branch (289:28): [True: 0, False: 0]
  |  Branch (289:34): [True: 0, False: 0]
  ------------------
  290|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_OBJECT_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  291|      0|            return NULL;
  292|      0|        }
  293|   187k|    }
  294|       |
  295|  20.8k|    if ((a == NULL) || ((*a) == NULL) || !((*a)->flags & ASN1_OBJECT_FLAG_DYNAMIC)) {
  ------------------
  |  |  146|  20.8k|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (295:9): [True: 0, False: 20.8k]
  |  Branch (295:24): [True: 0, False: 20.8k]
  |  Branch (295:42): [True: 20.8k, False: 0]
  ------------------
  296|  20.8k|        if ((ret = ossl_asn1_object_new()) == NULL)
  ------------------
  |  Branch (296:13): [True: 0, False: 20.8k]
  ------------------
  297|      0|            return NULL;
  298|  20.8k|    } else {
  299|      0|        ret = (*a);
  300|      0|    }
  301|       |
  302|  20.8k|    p = *pp;
  303|       |    /* detach data from object */
  304|  20.8k|    data = (unsigned char *)ret->data;
  305|  20.8k|    ret->data = NULL;
  306|       |    /* once detached we can change it */
  307|  20.8k|    if ((data == NULL) || (ret->length < length)) {
  ------------------
  |  Branch (307:9): [True: 20.8k, False: 0]
  |  Branch (307:27): [True: 0, False: 0]
  ------------------
  308|  20.8k|        ret->length = 0;
  309|  20.8k|        OPENSSL_free(data);
  ------------------
  |  |  132|  20.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  310|  20.8k|        data = OPENSSL_malloc(length);
  ------------------
  |  |  107|  20.8k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  311|  20.8k|        if (data == NULL)
  ------------------
  |  Branch (311:13): [True: 0, False: 20.8k]
  ------------------
  312|      0|            goto err;
  313|  20.8k|        ret->flags |= ASN1_OBJECT_FLAG_DYNAMIC_DATA;
  ------------------
  |  |  149|  20.8k|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
  314|  20.8k|    }
  315|  20.8k|    memcpy(data, p, length);
  316|       |    /* If there are dynamic strings, free them here, and clear the flag */
  317|  20.8k|    if ((ret->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) != 0) {
  ------------------
  |  |  148|  20.8k|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
  |  Branch (317:9): [True: 0, False: 20.8k]
  ------------------
  318|      0|        OPENSSL_free((char *)ret->sn);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  319|      0|        OPENSSL_free((char *)ret->ln);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  320|      0|        ret->flags &= ~ASN1_OBJECT_FLAG_DYNAMIC_STRINGS;
  ------------------
  |  |  148|      0|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
  321|      0|    }
  322|       |    /* reattach data to object, after which it remains const */
  323|  20.8k|    ret->data = data;
  324|  20.8k|    ret->length = length;
  325|  20.8k|    ret->sn = NULL;
  326|  20.8k|    ret->ln = NULL;
  327|       |    /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */
  328|  20.8k|    p += length;
  329|       |
  330|  20.8k|    if (a != NULL)
  ------------------
  |  Branch (330:9): [True: 20.8k, False: 0]
  ------------------
  331|  20.8k|        (*a) = ret;
  332|  20.8k|    *pp = p;
  333|  20.8k|    return ret;
  334|      0|err:
  335|      0|    ERR_raise(ERR_LIB_ASN1, i);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  336|      0|    if ((a == NULL) || (*a != ret))
  ------------------
  |  Branch (336:9): [True: 0, False: 0]
  |  Branch (336:24): [True: 0, False: 0]
  ------------------
  337|      0|        ASN1_OBJECT_free(ret);
  338|       |    return NULL;
  339|  20.8k|}
ossl_asn1_object_new:
  349|  20.8k|{
  350|  20.8k|    ASN1_OBJECT *ret;
  351|       |
  352|  20.8k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  20.8k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  353|  20.8k|    if (ret == NULL)
  ------------------
  |  Branch (353:9): [True: 0, False: 20.8k]
  ------------------
  354|      0|        return NULL;
  355|  20.8k|    ret->flags = ASN1_OBJECT_FLAG_DYNAMIC;
  ------------------
  |  |  146|  20.8k|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  356|  20.8k|    return ret;
  357|  20.8k|}
ASN1_OBJECT_free:
  360|  20.4M|{
  361|  20.4M|    if (a == NULL)
  ------------------
  |  Branch (361:9): [True: 486k, False: 19.9M]
  ------------------
  362|   486k|        return;
  363|  19.9M|    if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) {
  ------------------
  |  |  148|  19.9M|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
  |  Branch (363:9): [True: 0, False: 19.9M]
  ------------------
  364|      0|#ifndef CONST_STRICT
  365|       |        /*
  366|       |         * Disable purely for compile-time strict const checking.  Doing this
  367|       |         * on a "real" compile will cause memory leaks
  368|       |         */
  369|      0|        OPENSSL_free((void *)a->sn);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|      0|        OPENSSL_free((void *)a->ln);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  371|      0|#endif
  372|      0|        a->sn = a->ln = NULL;
  373|      0|    }
  374|  19.9M|    if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) {
  ------------------
  |  |  149|  19.9M|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
  |  Branch (374:9): [True: 20.8k, False: 19.9M]
  ------------------
  375|  20.8k|        OPENSSL_free((void *)a->data);
  ------------------
  |  |  132|  20.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  376|  20.8k|        a->data = NULL;
  377|  20.8k|        a->length = 0;
  378|  20.8k|    }
  379|  19.9M|    if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC)
  ------------------
  |  |  146|  19.9M|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (379:9): [True: 20.8k, False: 19.9M]
  ------------------
  380|  20.8k|        OPENSSL_free(a);
  ------------------
  |  |  132|  20.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  381|  19.9M|}

ASN1_STRING_to_UTF8:
  602|  3.56M|{
  603|  3.56M|    ASN1_STRING stmp, *str = &stmp;
  604|  3.56M|    int mbflag, type, ret;
  605|  3.56M|    if (!in)
  ------------------
  |  Branch (605:9): [True: 0, False: 3.56M]
  ------------------
  606|      0|        return -1;
  607|  3.56M|    type = in->type;
  608|  3.56M|    if ((type < 0) || (type > 30))
  ------------------
  |  Branch (608:9): [True: 0, False: 3.56M]
  |  Branch (608:23): [True: 0, False: 3.56M]
  ------------------
  609|      0|        return -1;
  610|  3.56M|    mbflag = tag2nbyte[type];
  611|  3.56M|    if (mbflag == -1)
  ------------------
  |  Branch (611:9): [True: 0, False: 3.56M]
  ------------------
  612|      0|        return -1;
  613|  3.56M|    mbflag |= MBSTRING_FLAG;
  ------------------
  |  |  124|  3.56M|#define MBSTRING_FLAG 0x1000
  ------------------
  614|  3.56M|    stmp.data = NULL;
  615|  3.56M|    stmp.length = 0;
  616|  3.56M|    stmp.flags = 0;
  617|  3.56M|    ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag,
  618|  3.56M|        B_ASN1_UTF8STRING);
  ------------------
  |  |  119|  3.56M|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  619|  3.56M|    if (ret < 0)
  ------------------
  |  Branch (619:9): [True: 0, False: 3.56M]
  ------------------
  620|      0|        return ret;
  621|  3.56M|    *out = stmp.data;
  622|  3.56M|    return stmp.length;
  623|  3.56M|}

ASN1_TYPE_set:
   27|  2.19M|{
   28|  2.19M|    if (a->type != V_ASN1_BOOLEAN
  ------------------
  |  |   65|  4.38M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (28:9): [True: 2.19M, False: 0]
  ------------------
   29|  2.19M|        && a->type != V_ASN1_NULL
  ------------------
  |  |   69|  4.38M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (29:12): [True: 2.19M, False: 0]
  ------------------
   30|  2.19M|        && a->value.ptr != NULL) {
  ------------------
  |  Branch (30:12): [True: 0, False: 2.19M]
  ------------------
   31|      0|        ASN1_TYPE **tmp_a = &a;
   32|      0|        ossl_asn1_primitive_free((ASN1_VALUE **)tmp_a, NULL, 0);
   33|      0|    }
   34|  2.19M|    a->type = type;
   35|  2.19M|    if (type == V_ASN1_BOOLEAN)
  ------------------
  |  |   65|  2.19M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (35:9): [True: 0, False: 2.19M]
  ------------------
   36|      0|        a->value.boolean = value ? 0xff : 0;
  ------------------
  |  Branch (36:28): [True: 0, False: 0]
  ------------------
   37|  2.19M|    else
   38|  2.19M|        a->value.ptr = value;
   39|  2.19M|}

UTF8_getc:
   29|  41.9M|{
   30|  41.9M|    const unsigned char *p;
   31|  41.9M|    unsigned long value;
   32|  41.9M|    int ret;
   33|  41.9M|    if (len <= 0)
  ------------------
  |  Branch (33:9): [True: 0, False: 41.9M]
  ------------------
   34|      0|        return 0;
   35|  41.9M|    p = str;
   36|       |
   37|       |    /* Check syntax and work out the encoded value (if correct) */
   38|  41.9M|    if ((*p & 0x80) == 0) {
  ------------------
  |  Branch (38:9): [True: 41.8M, False: 133k]
  ------------------
   39|  41.8M|        value = *p++ & 0x7f;
   40|  41.8M|        ret = 1;
   41|  41.8M|    } else if ((*p & 0xe0) == 0xc0) {
  ------------------
  |  Branch (41:16): [True: 133k, False: 0]
  ------------------
   42|   133k|        if (len < 2)
  ------------------
  |  Branch (42:13): [True: 0, False: 133k]
  ------------------
   43|      0|            return -1;
   44|   133k|        if ((p[1] & 0xc0) != 0x80)
  ------------------
  |  Branch (44:13): [True: 0, False: 133k]
  ------------------
   45|      0|            return -3;
   46|   133k|        value = (*p++ & 0x1f) << 6;
   47|   133k|        value |= *p++ & 0x3f;
   48|   133k|        if (value < 0x80)
  ------------------
  |  Branch (48:13): [True: 0, False: 133k]
  ------------------
   49|      0|            return -4;
   50|   133k|        ret = 2;
   51|   133k|    } else if ((*p & 0xf0) == 0xe0) {
  ------------------
  |  Branch (51:16): [True: 0, False: 0]
  ------------------
   52|      0|        if (len < 3)
  ------------------
  |  Branch (52:13): [True: 0, False: 0]
  ------------------
   53|      0|            return -1;
   54|      0|        if (((p[1] & 0xc0) != 0x80)
  ------------------
  |  Branch (54:13): [True: 0, False: 0]
  ------------------
   55|      0|            || ((p[2] & 0xc0) != 0x80))
  ------------------
  |  Branch (55:16): [True: 0, False: 0]
  ------------------
   56|      0|            return -3;
   57|      0|        value = (*p++ & 0xf) << 12;
   58|      0|        value |= (*p++ & 0x3f) << 6;
   59|      0|        value |= *p++ & 0x3f;
   60|      0|        if (value < 0x800)
  ------------------
  |  Branch (60:13): [True: 0, False: 0]
  ------------------
   61|      0|            return -4;
   62|      0|        if (is_unicode_surrogate(value))
  ------------------
  |  Branch (62:13): [True: 0, False: 0]
  ------------------
   63|      0|            return -2;
   64|      0|        ret = 3;
   65|      0|    } else if ((*p & 0xf8) == 0xf0) {
  ------------------
  |  Branch (65:16): [True: 0, False: 0]
  ------------------
   66|      0|        if (len < 4)
  ------------------
  |  Branch (66:13): [True: 0, False: 0]
  ------------------
   67|      0|            return -1;
   68|      0|        if (((p[1] & 0xc0) != 0x80)
  ------------------
  |  Branch (68:13): [True: 0, False: 0]
  ------------------
   69|      0|            || ((p[2] & 0xc0) != 0x80)
  ------------------
  |  Branch (69:16): [True: 0, False: 0]
  ------------------
   70|      0|            || ((p[3] & 0xc0) != 0x80))
  ------------------
  |  Branch (70:16): [True: 0, False: 0]
  ------------------
   71|      0|            return -3;
   72|      0|        value = ((unsigned long)(*p++ & 0x7)) << 18;
   73|      0|        value |= (*p++ & 0x3f) << 12;
   74|      0|        value |= (*p++ & 0x3f) << 6;
   75|      0|        value |= *p++ & 0x3f;
   76|      0|        if (value < 0x10000 || value >= UNICODE_LIMIT)
  ------------------
  |  Branch (76:13): [True: 0, False: 0]
  |  Branch (76:32): [True: 0, False: 0]
  ------------------
   77|      0|            return -4;
   78|      0|        ret = 4;
   79|      0|    } else
   80|      0|        return -2;
   81|  41.9M|    *val = value;
   82|  41.9M|    return ret;
   83|  41.9M|}
UTF8_putc:
   94|  70.4M|{
   95|  70.4M|    if (!str)
  ------------------
  |  Branch (95:9): [True: 35.2M, False: 35.2M]
  ------------------
   96|  35.2M|        len = 4; /* Maximum we will need */
   97|  35.2M|    else if (len <= 0)
  ------------------
  |  Branch (97:14): [True: 0, False: 35.2M]
  ------------------
   98|      0|        return -1;
   99|  70.4M|    if (value < 0x80) {
  ------------------
  |  Branch (99:9): [True: 70.4M, False: 0]
  ------------------
  100|  70.4M|        if (str)
  ------------------
  |  Branch (100:13): [True: 35.2M, False: 35.2M]
  ------------------
  101|  35.2M|            *str = (unsigned char)value;
  102|  70.4M|        return 1;
  103|  70.4M|    }
  104|      0|    if (value < 0x800) {
  ------------------
  |  Branch (104:9): [True: 0, False: 0]
  ------------------
  105|      0|        if (len < 2)
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|      0|            return -1;
  107|      0|        if (str) {
  ------------------
  |  Branch (107:13): [True: 0, False: 0]
  ------------------
  108|      0|            *str++ = (unsigned char)(((value >> 6) & 0x1f) | 0xc0);
  109|      0|            *str = (unsigned char)((value & 0x3f) | 0x80);
  110|      0|        }
  111|      0|        return 2;
  112|      0|    }
  113|      0|    if (value < 0x10000) {
  ------------------
  |  Branch (113:9): [True: 0, False: 0]
  ------------------
  114|      0|        if (is_unicode_surrogate(value))
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            return -2;
  116|      0|        if (len < 3)
  ------------------
  |  Branch (116:13): [True: 0, False: 0]
  ------------------
  117|      0|            return -1;
  118|      0|        if (str) {
  ------------------
  |  Branch (118:13): [True: 0, False: 0]
  ------------------
  119|      0|            *str++ = (unsigned char)(((value >> 12) & 0xf) | 0xe0);
  120|      0|            *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
  121|      0|            *str = (unsigned char)((value & 0x3f) | 0x80);
  122|      0|        }
  123|      0|        return 3;
  124|      0|    }
  125|      0|    if (value < UNICODE_LIMIT) {
  ------------------
  |  Branch (125:9): [True: 0, False: 0]
  ------------------
  126|      0|        if (len < 4)
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  ------------------
  127|      0|            return -1;
  128|      0|        if (str) {
  ------------------
  |  Branch (128:13): [True: 0, False: 0]
  ------------------
  129|      0|            *str++ = (unsigned char)(((value >> 18) & 0x7) | 0xf0);
  130|      0|            *str++ = (unsigned char)(((value >> 12) & 0x3f) | 0x80);
  131|      0|            *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
  132|      0|            *str = (unsigned char)((value & 0x3f) | 0x80);
  133|      0|        }
  134|      0|        return 4;
  135|      0|    }
  136|      0|    return -2;
  137|      0|}

evp_pkey_asn1_get_count:
   34|  2.38M|{
   35|  2.38M|    int num = OSSL_NELEM(standard_methods);
  ------------------
  |  |   14|  2.38M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   36|  2.38M|    return num;
   37|  2.38M|}
evp_pkey_asn1_get0:
   40|  33.3M|{
   41|  33.3M|    int num = OSSL_NELEM(standard_methods);
  ------------------
  |  |   14|  33.3M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   42|       |
   43|  33.3M|    if (idx < 0 || idx >= num)
  ------------------
  |  Branch (43:9): [True: 0, False: 33.3M]
  |  Branch (43:20): [True: 0, False: 33.3M]
  ------------------
   44|      0|        return NULL;
   45|       |
   46|  33.3M|    return standard_methods[idx];
   47|  33.3M|}
evp_pkey_asn1_find:
   67|  1.31M|{
   68|  1.31M|    const EVP_PKEY_ASN1_METHOD *t;
   69|       |
   70|  1.31M|    for (;;) {
   71|  1.31M|        t = pkey_asn1_find(type);
   72|  1.31M|        if (!t || !(t->pkey_flags & ASN1_PKEY_ALIAS))
  ------------------
  |  | 1501|  1.19M|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (72:13): [True: 115k, False: 1.19M]
  |  Branch (72:19): [True: 1.19M, False: 0]
  ------------------
   73|  1.31M|            break;
   74|      0|        type = t->pkey_base_id;
   75|      0|    }
   76|  1.31M|    return t;
   77|  1.31M|}
evp_pkey_asn1_find_str:
   80|  2.37M|{
   81|  2.37M|    int i;
   82|  2.37M|    const EVP_PKEY_ASN1_METHOD *ameth = NULL;
   83|       |
   84|  2.37M|    if (len == -1)
  ------------------
  |  Branch (84:9): [True: 0, False: 2.37M]
  ------------------
   85|      0|        len = (int)strlen(str);
   86|  34.6M|    for (i = evp_pkey_asn1_get_count(); i-- > 0;) {
  ------------------
  |  Branch (86:41): [True: 33.3M, False: 1.36M]
  ------------------
   87|  33.3M|        ameth = evp_pkey_asn1_get0(i);
   88|  33.3M|        if (ameth->pkey_flags & ASN1_PKEY_ALIAS)
  ------------------
  |  | 1501|  33.3M|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (88:13): [True: 10.5M, False: 22.7M]
  ------------------
   89|  10.5M|            continue;
   90|  22.7M|        if ((int)strlen(ameth->pem_str) == len
  ------------------
  |  Branch (90:13): [True: 1.70M, False: 21.0M]
  ------------------
   91|  1.70M|            && OPENSSL_strncasecmp(ameth->pem_str, str, len) == 0)
  ------------------
  |  Branch (91:16): [True: 1.01M, False: 685k]
  ------------------
   92|  1.01M|            return ameth;
   93|  22.7M|    }
   94|  1.36M|    return NULL;
   95|  2.37M|}
evp_pkey_asn1_get0_info:
  101|  10.6k|{
  102|  10.6k|    if (!ameth)
  ------------------
  |  Branch (102:9): [True: 0, False: 10.6k]
  ------------------
  103|      0|        return 0;
  104|  10.6k|    if (ppkey_id)
  ------------------
  |  Branch (104:9): [True: 10.6k, False: 0]
  ------------------
  105|  10.6k|        *ppkey_id = ameth->pkey_id;
  106|  10.6k|    if (ppkey_base_id)
  ------------------
  |  Branch (106:9): [True: 10.6k, False: 0]
  ------------------
  107|  10.6k|        *ppkey_base_id = ameth->pkey_base_id;
  108|  10.6k|    if (ppkey_flags)
  ------------------
  |  Branch (108:9): [True: 10.6k, False: 0]
  ------------------
  109|  10.6k|        *ppkey_flags = ameth->pkey_flags;
  110|  10.6k|    if (pinfo)
  ------------------
  |  Branch (110:9): [True: 0, False: 10.6k]
  ------------------
  111|      0|        *pinfo = ameth->info;
  112|  10.6k|    if (ppem_str)
  ------------------
  |  Branch (112:9): [True: 10.6k, False: 0]
  ------------------
  113|  10.6k|        *ppem_str = ameth->pem_str;
  114|  10.6k|    return 1;
  115|  10.6k|}
ameth_lib.c:pkey_asn1_find:
   50|  1.31M|{
   51|  1.31M|    EVP_PKEY_ASN1_METHOD tmp;
   52|  1.31M|    const EVP_PKEY_ASN1_METHOD *t = &tmp, **ret;
   53|       |
   54|  1.31M|    tmp.pkey_id = type;
   55|  1.31M|    ret = OBJ_bsearch_ameth(&t, standard_methods, OSSL_NELEM(standard_methods));
  ------------------
  |  |   14|  1.31M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   56|  1.31M|    if (ret == NULL || *ret == NULL)
  ------------------
  |  Branch (56:9): [True: 115k, False: 1.19M]
  |  Branch (56:24): [True: 0, False: 1.19M]
  ------------------
   57|   115k|        return NULL;
   58|  1.19M|    return *ret;
   59|  1.31M|}
ameth_lib.c:ameth_cmp:
   26|  3.75M|{
   27|  3.75M|    return ((*a)->pkey_id - (*b)->pkey_id);
   28|  3.75M|}

ossl_err_load_ASN1_strings:
  210|      1|{
  211|      1|#ifndef OPENSSL_NO_ERR
  212|      1|    if (ERR_reason_error_string(ASN1_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (212:9): [True: 1, False: 0]
  ------------------
  213|      1|        ERR_load_strings_const(ASN1_str_reasons);
  214|      1|#endif
  215|      1|    return 1;
  216|      1|}

ASN1_get_object:
   48|  41.4M|{
   49|  41.4M|    int i, ret;
   50|  41.4M|    long len;
   51|  41.4M|    const unsigned char *p = *pp;
   52|  41.4M|    int tag, xclass, inf;
   53|  41.4M|    long max = omax;
   54|       |
   55|  41.4M|    if (omax <= 0) {
  ------------------
  |  Branch (55:9): [True: 0, False: 41.4M]
  ------------------
   56|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   57|      0|        return 0x80;
   58|      0|    }
   59|  41.4M|    ret = (*p & V_ASN1_CONSTRUCTED);
  ------------------
  |  |   54|  41.4M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
   60|  41.4M|    xclass = (*p & V_ASN1_PRIVATE);
  ------------------
  |  |   52|  41.4M|#define V_ASN1_PRIVATE 0xc0
  ------------------
   61|  41.4M|    i = *p & V_ASN1_PRIMITIVE_TAG;
  ------------------
  |  |   55|  41.4M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
   62|  41.4M|    if (i == V_ASN1_PRIMITIVE_TAG) { /* high-tag */
  ------------------
  |  |   55|  41.4M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  |  Branch (62:9): [True: 0, False: 41.4M]
  ------------------
   63|      0|        p++;
   64|      0|        if (--max == 0)
  ------------------
  |  Branch (64:13): [True: 0, False: 0]
  ------------------
   65|      0|            goto err;
   66|      0|        len = 0;
   67|      0|        while (*p & 0x80) {
  ------------------
  |  Branch (67:16): [True: 0, False: 0]
  ------------------
   68|      0|            len <<= 7L;
   69|      0|            len |= *(p++) & 0x7f;
   70|      0|            if (--max == 0)
  ------------------
  |  Branch (70:17): [True: 0, False: 0]
  ------------------
   71|      0|                goto err;
   72|      0|            if (len > (INT_MAX >> 7L))
  ------------------
  |  Branch (72:17): [True: 0, False: 0]
  ------------------
   73|      0|                goto err;
   74|      0|        }
   75|      0|        len <<= 7L;
   76|      0|        len |= *(p++) & 0x7f;
   77|      0|        tag = (int)len;
   78|      0|        if (--max == 0)
  ------------------
  |  Branch (78:13): [True: 0, False: 0]
  ------------------
   79|      0|            goto err;
   80|  41.4M|    } else {
   81|  41.4M|        tag = i;
   82|  41.4M|        p++;
   83|  41.4M|        if (--max == 0)
  ------------------
  |  Branch (83:13): [True: 0, False: 41.4M]
  ------------------
   84|      0|            goto err;
   85|  41.4M|    }
   86|  41.4M|    *ptag = tag;
   87|  41.4M|    *pclass = xclass;
   88|  41.4M|    if (!asn1_get_length(&p, &inf, plength, max))
  ------------------
  |  Branch (88:9): [True: 0, False: 41.4M]
  ------------------
   89|      0|        goto err;
   90|       |
   91|  41.4M|    if (inf && !(ret & V_ASN1_CONSTRUCTED))
  ------------------
  |  |   54|      0|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (91:9): [True: 0, False: 41.4M]
  |  Branch (91:16): [True: 0, False: 0]
  ------------------
   92|      0|        goto err;
   93|       |
   94|  41.4M|    if (*plength > (omax - (p - *pp))) {
  ------------------
  |  Branch (94:9): [True: 1.00M, False: 40.4M]
  ------------------
   95|  1.00M|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|  1.00M|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  1.00M|    (ERR_new(),                                                  \
  |  |  |  |  360|  1.00M|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  1.00M|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  1.00M|        ERR_set_error)
  |  |  ------------------
  ------------------
   96|       |        /*
   97|       |         * Set this so that even if things are not long enough the values are
   98|       |         * set correctly
   99|       |         */
  100|  1.00M|        ret |= 0x80;
  101|  1.00M|    }
  102|  41.4M|    *pp = p;
  103|  41.4M|    return ret | inf;
  104|      0|err:
  105|       |    ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  106|      0|    return 0x80;
  107|  41.4M|}
ASN1_put_object:
  162|  16.3M|{
  163|  16.3M|    unsigned char *p = *pp;
  164|  16.3M|    int i, ttag;
  165|       |
  166|  16.3M|    i = (constructed) ? V_ASN1_CONSTRUCTED : 0;
  ------------------
  |  |   54|  8.01M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (166:9): [True: 8.01M, False: 8.32M]
  ------------------
  167|  16.3M|    i |= (xclass & V_ASN1_PRIVATE);
  ------------------
  |  |   52|  16.3M|#define V_ASN1_PRIVATE 0xc0
  ------------------
  168|  16.3M|    if (tag < 31) {
  ------------------
  |  Branch (168:9): [True: 16.3M, False: 0]
  ------------------
  169|  16.3M|        *(p++) = i | (tag & V_ASN1_PRIMITIVE_TAG);
  ------------------
  |  |   55|  16.3M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  170|  16.3M|    } else {
  171|      0|        *(p++) = i | V_ASN1_PRIMITIVE_TAG;
  ------------------
  |  |   55|      0|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  172|      0|        for (i = 0, ttag = tag; ttag > 0; i++)
  ------------------
  |  Branch (172:33): [True: 0, False: 0]
  ------------------
  173|      0|            ttag >>= 7;
  174|      0|        ttag = i;
  175|      0|        while (i-- > 0) {
  ------------------
  |  Branch (175:16): [True: 0, False: 0]
  ------------------
  176|      0|            p[i] = tag & 0x7f;
  177|      0|            if (i != (ttag - 1))
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      0|                p[i] |= 0x80;
  179|      0|            tag >>= 7;
  180|      0|        }
  181|      0|        p += ttag;
  182|      0|    }
  183|  16.3M|    if (constructed == 2)
  ------------------
  |  Branch (183:9): [True: 0, False: 16.3M]
  ------------------
  184|      0|        *(p++) = 0x80;
  185|  16.3M|    else
  186|  16.3M|        asn1_put_length(&p, length);
  187|  16.3M|    *pp = p;
  188|  16.3M|}
ASN1_object_size:
  223|  52.8M|{
  224|  52.8M|    int ret = 1;
  225|       |
  226|  52.8M|    if (length < 0)
  ------------------
  |  Branch (226:9): [True: 0, False: 52.8M]
  ------------------
  227|      0|        return -1;
  228|  52.8M|    if (tag >= 31) {
  ------------------
  |  Branch (228:9): [True: 0, False: 52.8M]
  ------------------
  229|      0|        while (tag > 0) {
  ------------------
  |  Branch (229:16): [True: 0, False: 0]
  ------------------
  230|      0|            tag >>= 7;
  231|      0|            ret++;
  232|      0|        }
  233|      0|    }
  234|  52.8M|    if (constructed == 2) {
  ------------------
  |  Branch (234:9): [True: 0, False: 52.8M]
  ------------------
  235|      0|        ret += 3;
  236|  52.8M|    } else {
  237|  52.8M|        ret++;
  238|  52.8M|        if (length > 127) {
  ------------------
  |  Branch (238:13): [True: 1.79M, False: 51.0M]
  ------------------
  239|  1.79M|            int tmplen = length;
  240|  5.35M|            while (tmplen > 0) {
  ------------------
  |  Branch (240:20): [True: 3.56M, False: 1.79M]
  ------------------
  241|  3.56M|                tmplen >>= 8;
  242|  3.56M|                ret++;
  243|  3.56M|            }
  244|  1.79M|        }
  245|  52.8M|    }
  246|  52.8M|    if (ret >= INT_MAX - length)
  ------------------
  |  Branch (246:9): [True: 0, False: 52.8M]
  ------------------
  247|      0|        return -1;
  248|  52.8M|    return ret + length;
  249|  52.8M|}
ossl_asn1_string_set_bits_left:
  252|  2.45M|{
  253|  2.45M|    str->flags &= ~0x07;
  254|  2.45M|    str->flags |= ASN1_STRING_FLAG_BITS_LEFT | (num & 0x07);
  ------------------
  |  |   23|  2.45M|#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
  ------------------
  255|  2.45M|}
ASN1_STRING_set:
  287|  8.86M|{
  288|  8.86M|    unsigned char *c;
  289|  8.86M|    const char *data = _data;
  290|  8.86M|    size_t len;
  291|       |
  292|  8.86M|    if (len_in < 0) {
  ------------------
  |  Branch (292:9): [True: 0, False: 8.86M]
  ------------------
  293|      0|        if (data == NULL)
  ------------------
  |  Branch (293:13): [True: 0, False: 0]
  ------------------
  294|      0|            return 0;
  295|      0|        len = strlen(data);
  296|  8.86M|    } else {
  297|  8.86M|        len = (size_t)len_in;
  298|  8.86M|    }
  299|       |    /*
  300|       |     * Verify that the length fits within an integer for assignment to
  301|       |     * str->length below.  The additional 1 is subtracted to allow for the
  302|       |     * '\0' terminator even though this isn't strictly necessary.
  303|       |     */
  304|  8.86M|    if (len > INT_MAX - 1) {
  ------------------
  |  Branch (304:9): [True: 0, False: 8.86M]
  ------------------
  305|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  306|      0|        return 0;
  307|      0|    }
  308|  8.86M|    if ((size_t)str->length <= len || str->data == NULL) {
  ------------------
  |  Branch (308:9): [True: 8.86M, False: 0]
  |  Branch (308:39): [True: 0, False: 0]
  ------------------
  309|  8.86M|        c = str->data;
  310|  8.86M|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  311|       |        /* No NUL terminator in fuzzing builds */
  312|  8.86M|        str->data = OPENSSL_realloc(c, len != 0 ? len : 1);
  ------------------
  |  |  121|  17.7M|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (121:26): [True: 8.86M, False: 0]
  |  |  ------------------
  ------------------
  313|       |#else
  314|       |        str->data = OPENSSL_realloc(c, len + 1);
  315|       |#endif
  316|  8.86M|        if (str->data == NULL) {
  ------------------
  |  Branch (316:13): [True: 0, False: 8.86M]
  ------------------
  317|      0|            str->data = c;
  318|      0|            return 0;
  319|      0|        }
  320|  8.86M|    }
  321|  8.86M|    str->length = (int)len;
  322|  8.86M|    if (data != NULL) {
  ------------------
  |  Branch (322:9): [True: 7.85M, False: 1.01M]
  ------------------
  323|  7.85M|        memcpy(str->data, data, len);
  324|  7.85M|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  325|       |        /* Set the unused byte to something non NUL and printable. */
  326|  7.85M|        if (len == 0)
  ------------------
  |  Branch (326:13): [True: 0, False: 7.85M]
  ------------------
  327|      0|            str->data[len] = '~';
  328|       |#else
  329|       |        /*
  330|       |         * Add a NUL terminator. This should not be necessary - but we add it as
  331|       |         * a safety precaution
  332|       |         */
  333|       |        str->data[len] = '\0';
  334|       |#endif
  335|  7.85M|    }
  336|  8.86M|    return 1;
  337|  8.86M|}
ASN1_STRING_set0:
  340|  6.01M|{
  341|  6.01M|    OPENSSL_free(str->data);
  ------------------
  |  |  132|  6.01M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  342|  6.01M|    str->data = data;
  343|  6.01M|    str->length = len;
  344|  6.01M|}
ASN1_STRING_type_new:
  352|  11.1M|{
  353|  11.1M|    ASN1_STRING *ret;
  354|       |
  355|  11.1M|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  11.1M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|  11.1M|    if (ret == NULL)
  ------------------
  |  Branch (356:9): [True: 0, False: 11.1M]
  ------------------
  357|      0|        return NULL;
  358|  11.1M|    ret->type = type;
  359|  11.1M|    return ret;
  360|  11.1M|}
ossl_asn1_string_embed_free:
  363|  13.9M|{
  364|  13.9M|    if (a == NULL)
  ------------------
  |  Branch (364:9): [True: 0, False: 13.9M]
  ------------------
  365|      0|        return;
  366|  13.9M|    if (!(a->flags & ASN1_STRING_FLAG_NDEF))
  ------------------
  |  |   29|  13.9M|#define ASN1_STRING_FLAG_NDEF 0x010
  ------------------
  |  Branch (366:9): [True: 13.9M, False: 0]
  ------------------
  367|  13.9M|        OPENSSL_free(a->data);
  ------------------
  |  |  132|  13.9M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  368|  13.9M|    if (embed == 0)
  ------------------
  |  Branch (368:9): [True: 11.1M, False: 2.72M]
  ------------------
  369|  11.1M|        OPENSSL_free(a);
  ------------------
  |  |  132|  11.1M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|  13.9M|}
ASN1_STRING_free:
  373|  3.89M|{
  374|  3.89M|    if (a == NULL)
  ------------------
  |  Branch (374:9): [True: 2.01M, False: 1.88M]
  ------------------
  375|  2.01M|        return;
  376|  1.88M|    ossl_asn1_string_embed_free(a, a->flags & ASN1_STRING_FLAG_EMBED);
  ------------------
  |  |   44|  1.88M|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  377|  1.88M|}
ASN1_STRING_length:
  406|  1.45M|{
  407|  1.45M|    return x->length;
  408|  1.45M|}
ASN1_STRING_get0_data:
  423|  1.45M|{
  424|  1.45M|    return x->data;
  425|  1.45M|}
asn1_lib.c:asn1_get_length:
  118|  41.4M|{
  119|  41.4M|    const unsigned char *p = *pp;
  120|  41.4M|    unsigned long ret = 0;
  121|  41.4M|    int i;
  122|       |
  123|  41.4M|    if (max-- < 1)
  ------------------
  |  Branch (123:9): [True: 0, False: 41.4M]
  ------------------
  124|      0|        return 0;
  125|  41.4M|    if (*p == 0x80) {
  ------------------
  |  Branch (125:9): [True: 0, False: 41.4M]
  ------------------
  126|      0|        *inf = 1;
  127|      0|        p++;
  128|  41.4M|    } else {
  129|  41.4M|        *inf = 0;
  130|  41.4M|        i = *p & 0x7f;
  131|  41.4M|        if (*p++ & 0x80) {
  ------------------
  |  Branch (131:13): [True: 5.14M, False: 36.2M]
  ------------------
  132|  5.14M|            if (max < i)
  ------------------
  |  Branch (132:17): [True: 0, False: 5.14M]
  ------------------
  133|      0|                return 0;
  134|       |            /* Skip leading zeroes */
  135|  5.14M|            while (i > 0 && *p == 0) {
  ------------------
  |  Branch (135:20): [True: 5.14M, False: 0]
  |  Branch (135:29): [True: 0, False: 5.14M]
  ------------------
  136|      0|                p++;
  137|      0|                i--;
  138|      0|            }
  139|  5.14M|            if (i > (int)sizeof(long))
  ------------------
  |  Branch (139:17): [True: 0, False: 5.14M]
  ------------------
  140|      0|                return 0;
  141|  15.1M|            while (i > 0) {
  ------------------
  |  Branch (141:20): [True: 9.96M, False: 5.14M]
  ------------------
  142|  9.96M|                ret <<= 8;
  143|  9.96M|                ret |= *p++;
  144|  9.96M|                i--;
  145|  9.96M|            }
  146|  5.14M|            if (ret > LONG_MAX)
  ------------------
  |  Branch (146:17): [True: 0, False: 5.14M]
  ------------------
  147|      0|                return 0;
  148|  36.2M|        } else {
  149|  36.2M|            ret = i;
  150|  36.2M|        }
  151|  41.4M|    }
  152|  41.4M|    *pp = p;
  153|  41.4M|    *rl = (long)ret;
  154|  41.4M|    return 1;
  155|  41.4M|}
asn1_lib.c:asn1_put_length:
  201|  16.3M|{
  202|  16.3M|    unsigned char *p = *pp;
  203|  16.3M|    int i, len;
  204|       |
  205|  16.3M|    if (length <= 127) {
  ------------------
  |  Branch (205:9): [True: 15.6M, False: 743k]
  ------------------
  206|  15.6M|        *(p++) = (unsigned char)length;
  207|  15.6M|    } else {
  208|   743k|        len = length;
  209|  2.22M|        for (i = 0; len > 0; i++)
  ------------------
  |  Branch (209:21): [True: 1.48M, False: 743k]
  ------------------
  210|  1.48M|            len >>= 8;
  211|   743k|        *(p++) = i | 0x80;
  212|   743k|        len = i;
  213|  2.22M|        while (i-- > 0) {
  ------------------
  |  Branch (213:16): [True: 1.48M, False: 743k]
  ------------------
  214|  1.48M|            p[i] = length & 0xff;
  215|  1.48M|            length >>= 8;
  216|  1.48M|        }
  217|   743k|        p += len;
  218|   743k|    }
  219|  16.3M|    *pp = p;
  220|  16.3M|}

ASN1_tag2bit:
  106|  8.14M|{
  107|  8.14M|    if ((tag < 0) || (tag > 30))
  ------------------
  |  Branch (107:9): [True: 0, False: 8.14M]
  |  Branch (107:22): [True: 0, False: 8.14M]
  ------------------
  108|      0|        return 0;
  109|  8.14M|    return tag2bit[tag];
  110|  8.14M|}
ASN1_item_ex_d2i:
  153|  1.01M|{
  154|  1.01M|    return asn1_item_ex_d2i_intern(pval, in, len, it, tag, aclass, opt, ctx,
  155|  1.01M|        NULL, NULL);
  156|  1.01M|}
ASN1_item_d2i_ex:
  162|  3.30M|{
  163|  3.30M|    ASN1_TLC c;
  164|  3.30M|    ASN1_VALUE *ptmpval = NULL;
  165|       |
  166|  3.30M|    if (pval == NULL)
  ------------------
  |  Branch (166:9): [True: 1.79M, False: 1.51M]
  ------------------
  167|  1.79M|        pval = &ptmpval;
  168|  3.30M|    asn1_tlc_clear_nc(&c);
  ------------------
  |  |  121|  3.30M|    do {                     \
  |  |  122|  3.30M|        (c)->valid = 0;      \
  |  |  123|  3.30M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (123:14): [Folded, False: 3.30M]
  |  |  ------------------
  ------------------
  169|  3.30M|    if (asn1_item_ex_d2i_intern(pval, in, len, it, -1, 0, 0, &c, libctx,
  ------------------
  |  Branch (169:9): [True: 3.30M, False: 0]
  ------------------
  170|  3.30M|            propq)
  171|  3.30M|        > 0)
  172|  3.30M|        return *pval;
  173|      0|    return NULL;
  174|  3.30M|}
ASN1_item_d2i:
  179|  2.80M|{
  180|  2.80M|    return ASN1_item_d2i_ex(pval, in, len, it, NULL, NULL);
  181|  2.80M|}
asn1_item_embed_d2i:
  193|  42.9M|{
  194|  42.9M|    const ASN1_TEMPLATE *tt, *errtt = NULL;
  195|  42.9M|    const ASN1_EXTERN_FUNCS *ef;
  196|  42.9M|    const ASN1_AUX *aux;
  197|  42.9M|    ASN1_aux_cb *asn1_cb;
  198|  42.9M|    const unsigned char *p = NULL, *q;
  199|  42.9M|    unsigned char oclass;
  200|  42.9M|    char seq_eoc, seq_nolen, cst, isopt;
  201|  42.9M|    long tmplen;
  202|  42.9M|    int i;
  203|  42.9M|    int otag;
  204|  42.9M|    int ret = 0;
  205|  42.9M|    ASN1_VALUE **pchptr;
  206|       |
  207|  42.9M|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 42.9M]
  |  Branch (207:25): [True: 0, False: 42.9M]
  ------------------
  208|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  209|      0|        return 0;
  210|      0|    }
  211|  42.9M|    if (len <= 0) {
  ------------------
  |  Branch (211:9): [True: 0, False: 42.9M]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return 0;
  214|      0|    }
  215|  42.9M|    aux = it->funcs;
  216|  42.9M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (216:9): [True: 4.09M, False: 38.8M]
  |  Branch (216:16): [True: 1.57M, False: 2.52M]
  ------------------
  217|  1.57M|        asn1_cb = aux->asn1_cb;
  218|  41.3M|    else
  219|  41.3M|        asn1_cb = 0;
  220|       |
  221|  42.9M|    if (++depth > ASN1_MAX_CONSTRUCTED_NEST) {
  ------------------
  |  |   27|  42.9M|#define ASN1_MAX_CONSTRUCTED_NEST 30
  ------------------
  |  Branch (221:9): [True: 0, False: 42.9M]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_NESTED_TOO_DEEP);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        goto err;
  224|      0|    }
  225|       |
  226|  42.9M|    switch (it->itype) {
  227|  24.3M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  24.3M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (227:5): [True: 24.3M, False: 18.5M]
  ------------------
  228|  24.3M|        if (it->templates) {
  ------------------
  |  Branch (228:13): [True: 4.61M, False: 19.7M]
  ------------------
  229|       |            /*
  230|       |             * tagging or OPTIONAL is currently illegal on an item template
  231|       |             * because the flags can't get passed down. In practice this
  232|       |             * isn't a problem: we include the relevant flags from the item
  233|       |             * template in the template itself.
  234|       |             */
  235|  4.61M|            if ((tag != -1) || opt) {
  ------------------
  |  Branch (235:17): [True: 0, False: 4.61M]
  |  Branch (235:32): [True: 0, False: 4.61M]
  ------------------
  236|      0|                ERR_raise(ERR_LIB_ASN1,
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  237|      0|                    ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE);
  238|      0|                goto err;
  239|      0|            }
  240|  4.61M|            return asn1_template_ex_d2i(pval, in, len, it->templates, opt, ctx,
  241|  4.61M|                depth, libctx, propq);
  242|  4.61M|        }
  243|  19.7M|        return asn1_d2i_ex_primitive(pval, in, len, it,
  244|  19.7M|            tag, aclass, opt, ctx);
  245|       |
  246|  4.57M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  4.57M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (246:5): [True: 4.57M, False: 38.3M]
  ------------------
  247|       |        /*
  248|       |         * It never makes sense for multi-strings to have implicit tagging, so
  249|       |         * if tag != -1, then this looks like an error in the template.
  250|       |         */
  251|  4.57M|        if (tag != -1) {
  ------------------
  |  Branch (251:13): [True: 0, False: 4.57M]
  ------------------
  252|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|            goto err;
  254|      0|        }
  255|       |
  256|  4.57M|        p = *in;
  257|       |        /* Just read in tag and class */
  258|  4.57M|        ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL,
  259|  4.57M|            &p, len, -1, 0, 1, ctx);
  260|  4.57M|        if (!ret) {
  ------------------
  |  Branch (260:13): [True: 0, False: 4.57M]
  ------------------
  261|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  262|      0|            goto err;
  263|      0|        }
  264|       |
  265|       |        /* Must be UNIVERSAL class */
  266|  4.57M|        if (oclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|  4.57M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (266:13): [True: 0, False: 4.57M]
  ------------------
  267|       |            /* If OPTIONAL, assume this is OK */
  268|      0|            if (opt)
  ------------------
  |  Branch (268:17): [True: 0, False: 0]
  ------------------
  269|      0|                return -1;
  270|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MSTRING_NOT_UNIVERSAL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|            goto err;
  272|      0|        }
  273|       |
  274|       |        /* Check tag matches bit map */
  275|  4.57M|        if (!(ASN1_tag2bit(otag) & it->utype)) {
  ------------------
  |  Branch (275:13): [True: 0, False: 4.57M]
  ------------------
  276|       |            /* If OPTIONAL, assume this is OK */
  277|      0|            if (opt)
  ------------------
  |  Branch (277:17): [True: 0, False: 0]
  ------------------
  278|      0|                return -1;
  279|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MSTRING_WRONG_TAG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  280|      0|            goto err;
  281|      0|        }
  282|  4.57M|        return asn1_d2i_ex_primitive(pval, in, len, it, otag, 0, 0, ctx);
  283|       |
  284|  2.01M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  2.01M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (284:5): [True: 2.01M, False: 40.9M]
  ------------------
  285|       |        /* Use new style d2i */
  286|  2.01M|        ef = it->funcs;
  287|  2.01M|        if (ef->asn1_ex_d2i_ex != NULL)
  ------------------
  |  Branch (287:13): [True: 1.00M, False: 1.01M]
  ------------------
  288|  1.00M|            return ef->asn1_ex_d2i_ex(pval, in, len, it, tag, aclass, opt, ctx,
  289|  1.00M|                libctx, propq);
  290|  1.01M|        return ef->asn1_ex_d2i(pval, in, len, it, tag, aclass, opt, ctx);
  291|       |
  292|   109k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|   109k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (292:5): [True: 109k, False: 42.8M]
  ------------------
  293|       |        /*
  294|       |         * It never makes sense for CHOICE types to have implicit tagging, so
  295|       |         * if tag != -1, then this looks like an error in the template.
  296|       |         */
  297|   109k|        if (tag != -1) {
  ------------------
  |  Branch (297:13): [True: 0, False: 109k]
  ------------------
  298|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|            goto err;
  300|      0|        }
  301|       |
  302|   109k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|  47.3k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (302:13): [True: 47.3k, False: 61.9k]
  |  Branch (302:24): [True: 0, False: 47.3k]
  ------------------
  303|      0|            goto auxerr;
  304|   109k|        if (*pval) {
  ------------------
  |  Branch (304:13): [True: 0, False: 109k]
  ------------------
  305|       |            /* Free up and zero CHOICE value if initialised */
  306|      0|            i = ossl_asn1_get_choice_selector(pval, it);
  307|      0|            if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (307:17): [True: 0, False: 0]
  |  Branch (307:29): [True: 0, False: 0]
  ------------------
  308|      0|                tt = it->templates + i;
  309|      0|                pchptr = ossl_asn1_get_field_ptr(pval, tt);
  310|      0|                ossl_asn1_template_free(pchptr, tt);
  311|      0|                ossl_asn1_set_choice_selector(pval, -1, it);
  312|      0|            }
  313|   109k|        } else if (!ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (313:20): [True: 0, False: 109k]
  ------------------
  314|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  315|      0|            goto err;
  316|      0|        }
  317|       |        /* CHOICE type, try each possibility in turn */
  318|   109k|        p = *in;
  319|   419k|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (319:41): [True: 419k, False: 0]
  ------------------
  320|   419k|            pchptr = ossl_asn1_get_field_ptr(pval, tt);
  321|       |            /*
  322|       |             * We mark field as OPTIONAL so its absence can be recognised.
  323|       |             */
  324|   419k|            ret = asn1_template_ex_d2i(pchptr, &p, len, tt, 1, ctx, depth,
  325|   419k|                libctx, propq);
  326|       |            /* If field not present, try the next one */
  327|   419k|            if (ret == -1)
  ------------------
  |  Branch (327:17): [True: 309k, False: 109k]
  ------------------
  328|   309k|                continue;
  329|       |            /* If positive return, read OK, break loop */
  330|   109k|            if (ret > 0)
  ------------------
  |  Branch (330:17): [True: 109k, False: 0]
  ------------------
  331|   109k|                break;
  332|       |            /*
  333|       |             * Must be an ASN1 parsing error.
  334|       |             * Free up any partial choice value
  335|       |             */
  336|      0|            ossl_asn1_template_free(pchptr, tt);
  337|      0|            errtt = tt;
  338|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  339|      0|            goto err;
  340|   109k|        }
  341|       |
  342|       |        /* Did we fall off the end without reading anything? */
  343|   109k|        if (i == it->tcount) {
  ------------------
  |  Branch (343:13): [True: 0, False: 109k]
  ------------------
  344|       |            /* If OPTIONAL, this is OK */
  345|      0|            if (opt) {
  ------------------
  |  Branch (345:17): [True: 0, False: 0]
  ------------------
  346|       |                /* Free and zero it */
  347|      0|                ASN1_item_ex_free(pval, it);
  348|      0|                return -1;
  349|      0|            }
  350|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_NO_MATCHING_CHOICE_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|            goto err;
  352|      0|        }
  353|       |
  354|   109k|        ossl_asn1_set_choice_selector(pval, i, it);
  355|       |
  356|   109k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|  47.3k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (356:13): [True: 47.3k, False: 61.9k]
  |  Branch (356:24): [True: 0, False: 47.3k]
  ------------------
  357|      0|            goto auxerr;
  358|   109k|        *in = p;
  359|   109k|        return 1;
  360|       |
  361|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (361:5): [True: 0, False: 42.9M]
  ------------------
  362|  11.8M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  11.8M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (362:5): [True: 11.8M, False: 31.0M]
  ------------------
  363|  11.8M|        p = *in;
  364|  11.8M|        tmplen = len;
  365|       |
  366|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  367|  11.8M|        if (tag == -1) {
  ------------------
  |  Branch (367:13): [True: 11.7M, False: 109k]
  ------------------
  368|  11.7M|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  11.7M|#define V_ASN1_SEQUENCE 16
  ------------------
  369|  11.7M|            aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  11.7M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  370|  11.7M|        }
  371|       |        /* Get SEQUENCE length and update len, p */
  372|  11.8M|        ret = asn1_check_tlen(&len, NULL, NULL, &seq_eoc, &cst,
  373|  11.8M|            &p, len, tag, aclass, opt, ctx);
  374|  11.8M|        if (!ret) {
  ------------------
  |  Branch (374:13): [True: 0, False: 11.8M]
  ------------------
  375|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  376|      0|            goto err;
  377|  11.8M|        } else if (ret == -1)
  ------------------
  |  Branch (377:20): [True: 109k, False: 11.7M]
  ------------------
  378|   109k|            return -1;
  379|  11.7M|        if (aux && (aux->flags & ASN1_AFLG_BROKEN)) {
  ------------------
  |  |  725|  1.34M|#define ASN1_AFLG_BROKEN 4
  ------------------
  |  Branch (379:13): [True: 1.34M, False: 10.3M]
  |  Branch (379:20): [True: 0, False: 1.34M]
  ------------------
  380|      0|            len = tmplen - (long)(p - *in);
  381|      0|            seq_nolen = 1;
  382|      0|        }
  383|       |        /* If indefinite we don't do a length check */
  384|  11.7M|        else
  385|  11.7M|            seq_nolen = seq_eoc;
  386|  11.7M|        if (!cst) {
  ------------------
  |  Branch (386:13): [True: 0, False: 11.7M]
  ------------------
  387|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_SEQUENCE_NOT_CONSTRUCTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  388|      0|            goto err;
  389|      0|        }
  390|       |
  391|  11.7M|        if (*pval == NULL
  ------------------
  |  Branch (391:13): [True: 6.71M, False: 5.03M]
  ------------------
  392|  6.71M|            && !ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (392:16): [True: 0, False: 6.71M]
  ------------------
  393|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  394|      0|            goto err;
  395|      0|        }
  396|       |
  397|  11.7M|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|   844k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (397:13): [True: 844k, False: 10.9M]
  |  Branch (397:24): [True: 0, False: 844k]
  ------------------
  398|      0|            goto auxerr;
  399|       |
  400|       |        /* Free up and zero any ADB found */
  401|  41.6M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (401:41): [True: 29.8M, False: 11.7M]
  ------------------
  402|  29.8M|            if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|  29.8M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (402:17): [True: 0, False: 29.8M]
  ------------------
  403|      0|                const ASN1_TEMPLATE *seqtt;
  404|      0|                ASN1_VALUE **pseqval;
  405|      0|                seqtt = ossl_asn1_do_adb(*pval, tt, 0);
  406|      0|                if (seqtt == NULL)
  ------------------
  |  Branch (406:21): [True: 0, False: 0]
  ------------------
  407|      0|                    continue;
  408|      0|                pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  409|      0|                ossl_asn1_template_free(pseqval, seqtt);
  410|      0|            }
  411|  29.8M|        }
  412|       |
  413|       |        /* Get each field entry */
  414|  40.5M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (414:41): [True: 29.7M, False: 10.8M]
  ------------------
  415|  29.7M|            const ASN1_TEMPLATE *seqtt;
  416|  29.7M|            ASN1_VALUE **pseqval;
  417|  29.7M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  418|  29.7M|            if (seqtt == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 29.7M]
  ------------------
  419|      0|                goto err;
  420|  29.7M|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  421|       |            /* Have we ran out of data? */
  422|  29.7M|            if (!len)
  ------------------
  |  Branch (422:17): [True: 904k, False: 28.8M]
  ------------------
  423|   904k|                break;
  424|  28.8M|            q = p;
  425|  28.8M|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (425:17): [True: 0, False: 28.8M]
  ------------------
  426|      0|                if (!seq_eoc) {
  ------------------
  |  Branch (426:21): [True: 0, False: 0]
  ------------------
  427|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_UNEXPECTED_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  428|      0|                    goto err;
  429|      0|                }
  430|      0|                len -= (long)(p - q);
  431|      0|                seq_eoc = 0;
  432|      0|                break;
  433|      0|            }
  434|       |            /*
  435|       |             * This determines the OPTIONAL flag value. The field cannot be
  436|       |             * omitted if it is the last of a SEQUENCE and there is still
  437|       |             * data to be read. This isn't strictly necessary but it
  438|       |             * increases efficiency in some cases.
  439|       |             */
  440|  28.8M|            if (i == (it->tcount - 1))
  ------------------
  |  Branch (440:17): [True: 10.8M, False: 17.9M]
  ------------------
  441|  10.8M|                isopt = 0;
  442|  17.9M|            else
  443|  17.9M|                isopt = (char)(seqtt->flags & ASN1_TFLG_OPTIONAL);
  ------------------
  |  |  512|  17.9M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  444|       |            /*
  445|       |             * attempt to read in field, allowing each to be OPTIONAL
  446|       |             */
  447|       |
  448|  28.8M|            ret = asn1_template_ex_d2i(pseqval, &p, len, seqtt, isopt, ctx,
  449|  28.8M|                depth, libctx, propq);
  450|  28.8M|            if (!ret) {
  ------------------
  |  Branch (450:17): [True: 0, False: 28.8M]
  ------------------
  451|      0|                errtt = seqtt;
  452|      0|                goto err;
  453|  28.8M|            } else if (ret == -1) {
  ------------------
  |  Branch (453:24): [True: 1.72M, False: 27.1M]
  ------------------
  454|       |                /*
  455|       |                 * OPTIONAL component absent. Free and zero the field.
  456|       |                 */
  457|  1.72M|                ossl_asn1_template_free(pseqval, seqtt);
  458|  1.72M|                continue;
  459|  1.72M|            }
  460|       |            /* Update length */
  461|  27.1M|            len -= (long)(p - q);
  462|  27.1M|        }
  463|       |
  464|       |        /* Check for EOC if expecting one */
  465|  11.7M|        if (seq_eoc && !asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (465:13): [True: 0, False: 11.7M]
  |  Branch (465:24): [True: 0, False: 0]
  ------------------
  466|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|      0|            goto err;
  468|      0|        }
  469|       |        /* Check all data read */
  470|  11.7M|        if (!seq_nolen && len) {
  ------------------
  |  Branch (470:13): [True: 11.7M, False: 0]
  |  Branch (470:27): [True: 0, False: 11.7M]
  ------------------
  471|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_SEQUENCE_LENGTH_MISMATCH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  472|      0|            goto err;
  473|      0|        }
  474|       |
  475|       |        /*
  476|       |         * If we get here we've got no more data in the SEQUENCE, however we
  477|       |         * may not have read all fields so check all remaining are OPTIONAL
  478|       |         * and clear any that are.
  479|       |         */
  480|  12.7M|        for (; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (480:16): [True: 1.05M, False: 11.7M]
  ------------------
  481|  1.05M|            const ASN1_TEMPLATE *seqtt;
  482|  1.05M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  483|  1.05M|            if (seqtt == NULL)
  ------------------
  |  Branch (483:17): [True: 0, False: 1.05M]
  ------------------
  484|      0|                goto err;
  485|  1.05M|            if (seqtt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|  1.05M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (485:17): [True: 1.05M, False: 0]
  ------------------
  486|  1.05M|                ASN1_VALUE **pseqval;
  487|  1.05M|                pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  488|  1.05M|                ossl_asn1_template_free(pseqval, seqtt);
  489|  1.05M|            } else {
  490|      0|                errtt = seqtt;
  491|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_FIELD_MISSING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  492|      0|                goto err;
  493|      0|            }
  494|  1.05M|        }
  495|       |        /* Save encoding */
  496|  11.7M|        if (!ossl_asn1_enc_save(pval, *in, (long)(p - *in), it))
  ------------------
  |  Branch (496:13): [True: 0, False: 11.7M]
  ------------------
  497|      0|            goto auxerr;
  498|  11.7M|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|   844k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (498:13): [True: 844k, False: 10.9M]
  |  Branch (498:24): [True: 0, False: 844k]
  ------------------
  499|      0|            goto auxerr;
  500|  11.7M|        *in = p;
  501|  11.7M|        return 1;
  502|       |
  503|      0|    default:
  ------------------
  |  Branch (503:5): [True: 0, False: 42.9M]
  ------------------
  504|      0|        return 0;
  505|  42.9M|    }
  506|      0|auxerr:
  507|      0|    ERR_raise(ERR_LIB_ASN1, ASN1_R_AUX_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  508|      0|err:
  509|      0|    if (errtt)
  ------------------
  |  Branch (509:9): [True: 0, False: 0]
  ------------------
  510|      0|        ERR_add_error_data(4, "Field=", errtt->field_name,
  511|      0|            ", Type=", it->sname);
  512|      0|    else
  513|      0|        ERR_add_error_data(2, "Type=", it->sname);
  514|      0|    return 0;
  515|      0|}
tasn_dec.c:asn1_item_ex_d2i_intern:
  136|  4.31M|{
  137|  4.31M|    int rv;
  138|       |
  139|  4.31M|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (139:9): [True: 0, False: 4.31M]
  |  Branch (139:25): [True: 0, False: 4.31M]
  ------------------
  140|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  141|      0|        return 0;
  142|      0|    }
  143|  4.31M|    rv = asn1_item_embed_d2i(pval, in, len, it, tag, aclass, opt, ctx, 0,
  144|  4.31M|        libctx, propq);
  145|  4.31M|    if (rv <= 0)
  ------------------
  |  Branch (145:9): [True: 0, False: 4.31M]
  ------------------
  146|      0|        ASN1_item_ex_free(pval, it);
  147|  4.31M|    return rv;
  148|  4.31M|}
tasn_dec.c:asn1_template_ex_d2i:
  527|  33.8M|{
  528|  33.8M|    int flags, aclass;
  529|  33.8M|    int ret;
  530|  33.8M|    long len;
  531|  33.8M|    const unsigned char *p, *q;
  532|  33.8M|    char exp_eoc;
  533|  33.8M|    if (!val)
  ------------------
  |  Branch (533:9): [True: 0, False: 33.8M]
  ------------------
  534|      0|        return 0;
  535|  33.8M|    flags = tt->flags;
  536|  33.8M|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  33.8M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  537|       |
  538|  33.8M|    p = *in;
  539|       |
  540|       |    /* Check if EXPLICIT tag expected */
  541|  33.8M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  33.8M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (541:9): [True: 1.10M, False: 32.7M]
  ------------------
  542|  1.10M|        char cst;
  543|       |        /*
  544|       |         * Need to work out amount of data available to the inner content and
  545|       |         * where it starts: so read in EXPLICIT header to get the info.
  546|       |         */
  547|  1.10M|        ret = asn1_check_tlen(&len, NULL, NULL, &exp_eoc, &cst,
  548|  1.10M|            &p, inlen, tt->tag, aclass, opt, ctx);
  549|  1.10M|        q = p;
  550|  1.10M|        if (!ret) {
  ------------------
  |  Branch (550:13): [True: 0, False: 1.10M]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            return 0;
  553|  1.10M|        } else if (ret == -1)
  ------------------
  |  Branch (553:20): [True: 47.3k, False: 1.05M]
  ------------------
  554|  47.3k|            return -1;
  555|  1.05M|        if (!cst) {
  ------------------
  |  Branch (555:13): [True: 0, False: 1.05M]
  ------------------
  556|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  557|      0|            return 0;
  558|      0|        }
  559|       |        /* We've found the field so it can't be OPTIONAL now */
  560|  1.05M|        ret = asn1_template_noexp_d2i(val, &p, len, tt, 0, ctx, depth, libctx,
  561|  1.05M|            propq);
  562|  1.05M|        if (!ret) {
  ------------------
  |  Branch (562:13): [True: 0, False: 1.05M]
  ------------------
  563|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|            return 0;
  565|      0|        }
  566|       |        /* We read the field in OK so update length */
  567|  1.05M|        len -= (long)(p - q);
  568|  1.05M|        if (exp_eoc) {
  ------------------
  |  Branch (568:13): [True: 0, False: 1.05M]
  ------------------
  569|       |            /* If NDEF we must have an EOC here */
  570|      0|            if (!asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (570:17): [True: 0, False: 0]
  ------------------
  571|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  572|      0|                goto err;
  573|      0|            }
  574|  1.05M|        } else {
  575|       |            /*
  576|       |             * Otherwise we must hit the EXPLICIT tag end or its an error
  577|       |             */
  578|  1.05M|            if (len) {
  ------------------
  |  Branch (578:17): [True: 0, False: 1.05M]
  ------------------
  579|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_EXPLICIT_LENGTH_MISMATCH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  580|      0|                goto err;
  581|      0|            }
  582|  1.05M|        }
  583|  1.05M|    } else
  584|  32.7M|        return asn1_template_noexp_d2i(val, in, inlen, tt, opt, ctx, depth,
  585|  32.7M|            libctx, propq);
  586|       |
  587|  1.05M|    *in = p;
  588|  1.05M|    return 1;
  589|       |
  590|      0|err:
  591|      0|    return 0;
  592|  33.8M|}
tasn_dec.c:asn1_template_noexp_d2i:
  599|  33.8M|{
  600|  33.8M|    int flags, aclass;
  601|  33.8M|    int ret;
  602|  33.8M|    ASN1_VALUE *tval;
  603|  33.8M|    const unsigned char *p, *q;
  604|  33.8M|    if (!val)
  ------------------
  |  Branch (604:9): [True: 0, False: 33.8M]
  ------------------
  605|      0|        return 0;
  606|  33.8M|    flags = tt->flags;
  607|  33.8M|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  33.8M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  608|       |
  609|  33.8M|    p = *in;
  610|       |
  611|       |    /*
  612|       |     * If field is embedded then val needs fixing so it is a pointer to
  613|       |     * a pointer to a field.
  614|       |     */
  615|  33.8M|    if (tt->flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  33.8M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (615:9): [True: 4.73M, False: 29.0M]
  ------------------
  616|  4.73M|        tval = (ASN1_VALUE *)val;
  617|  4.73M|        val = &tval;
  618|  4.73M|    }
  619|       |
  620|  33.8M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  33.8M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (620:9): [True: 5.16M, False: 28.6M]
  ------------------
  621|       |        /* SET OF, SEQUENCE OF */
  622|  5.16M|        int sktag, skaclass;
  623|  5.16M|        char sk_eoc;
  624|       |        /* First work out expected inner tag value */
  625|  5.16M|        if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|  5.16M|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (625:13): [True: 47.3k, False: 5.12M]
  ------------------
  626|  47.3k|            sktag = tt->tag;
  627|  47.3k|            skaclass = aclass;
  628|  5.12M|        } else {
  629|  5.12M|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  5.12M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  630|  5.12M|            if (flags & ASN1_TFLG_SET_OF)
  ------------------
  |  |  515|  5.12M|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (630:17): [True: 3.56M, False: 1.55M]
  ------------------
  631|  3.56M|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  3.56M|#define V_ASN1_SET 17
  ------------------
  632|  1.55M|            else
  633|  1.55M|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  1.55M|#define V_ASN1_SEQUENCE 16
  ------------------
  634|  5.12M|        }
  635|       |        /* Get the tag */
  636|  5.16M|        ret = asn1_check_tlen(&len, NULL, NULL, &sk_eoc, NULL,
  637|  5.16M|            &p, len, sktag, skaclass, opt, ctx);
  638|  5.16M|        if (!ret) {
  ------------------
  |  Branch (638:13): [True: 0, False: 5.16M]
  ------------------
  639|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  640|      0|            return 0;
  641|  5.16M|        } else if (ret == -1)
  ------------------
  |  Branch (641:20): [True: 0, False: 5.16M]
  ------------------
  642|      0|            return -1;
  643|  5.16M|        if (*val == NULL)
  ------------------
  |  Branch (643:13): [True: 5.16M, False: 0]
  ------------------
  644|  5.16M|            *val = (ASN1_VALUE *)sk_ASN1_VALUE_new_null();
  ------------------
  |  |  890|  5.16M|#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_ASN1_VALUE_freefunc_thunk))
  ------------------
  645|      0|        else {
  646|       |            /*
  647|       |             * We've got a valid STACK: free up any items present
  648|       |             */
  649|      0|            STACK_OF(ASN1_VALUE) *sktmp = (STACK_OF(ASN1_VALUE) *)*val;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  650|      0|            ASN1_VALUE *vtmp;
  651|      0|            while (sk_ASN1_VALUE_num(sktmp) > 0) {
  ------------------
  |  |  887|      0|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (651:20): [True: 0, False: 0]
  ------------------
  652|      0|                vtmp = sk_ASN1_VALUE_pop(sktmp);
  ------------------
  |  |  899|      0|#define sk_ASN1_VALUE_pop(sk) ((ASN1_VALUE *)OPENSSL_sk_pop(ossl_check_ASN1_VALUE_sk_type(sk)))
  ------------------
  653|      0|                ASN1_item_ex_free(&vtmp, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  654|      0|            }
  655|      0|        }
  656|       |
  657|  5.16M|        if (*val == NULL) {
  ------------------
  |  Branch (657:13): [True: 0, False: 5.16M]
  ------------------
  658|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  659|      0|            goto err;
  660|      0|        }
  661|       |
  662|       |        /* Read as many items as we can */
  663|  14.1M|        while (len > 0) {
  ------------------
  |  Branch (663:16): [True: 8.95M, False: 5.16M]
  ------------------
  664|  8.95M|            ASN1_VALUE *skfield;
  665|  8.95M|            q = p;
  666|       |            /* See if EOC found */
  667|  8.95M|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (667:17): [True: 0, False: 8.95M]
  ------------------
  668|      0|                if (!sk_eoc) {
  ------------------
  |  Branch (668:21): [True: 0, False: 0]
  ------------------
  669|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_UNEXPECTED_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  670|      0|                    goto err;
  671|      0|                }
  672|      0|                len -= (long)(p - q);
  673|      0|                sk_eoc = 0;
  674|      0|                break;
  675|      0|            }
  676|  8.95M|            skfield = NULL;
  677|  8.95M|            if (asn1_item_embed_d2i(&skfield, &p, len,
  ------------------
  |  Branch (677:17): [True: 0, False: 8.95M]
  ------------------
  678|  8.95M|                    ASN1_ITEM_ptr(tt->item), -1, 0, 0, ctx,
  ------------------
  |  |  394|  8.95M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  679|  8.95M|                    depth, libctx, propq)
  680|  8.95M|                <= 0) {
  681|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  682|       |                /* |skfield| may be partially allocated despite failure. */
  683|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  684|      0|                goto err;
  685|      0|            }
  686|  8.95M|            len -= (long)(p - q);
  687|  8.95M|            if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val, skfield)) {
  ------------------
  |  |  897|  8.95M|#define sk_ASN1_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
  ------------------
  |  Branch (687:17): [True: 0, False: 8.95M]
  ------------------
  688|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  689|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  690|      0|                goto err;
  691|      0|            }
  692|  8.95M|        }
  693|  5.16M|        if (sk_eoc) {
  ------------------
  |  Branch (693:13): [True: 0, False: 5.16M]
  ------------------
  694|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  695|      0|            goto err;
  696|      0|        }
  697|  28.6M|    } else if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|  28.6M|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (697:16): [True: 1.42M, False: 27.2M]
  ------------------
  698|       |        /* IMPLICIT tagging */
  699|  1.42M|        ret = asn1_item_embed_d2i(val, &p, len,
  700|  1.42M|            ASN1_ITEM_ptr(tt->item), tt->tag, aclass, opt,
  ------------------
  |  |  394|  1.42M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  701|  1.42M|            ctx, depth, libctx, propq);
  702|  1.42M|        if (!ret) {
  ------------------
  |  Branch (702:13): [True: 0, False: 1.42M]
  ------------------
  703|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  704|      0|            goto err;
  705|  1.42M|        } else if (ret == -1)
  ------------------
  |  Branch (705:20): [True: 1.26M, False: 156k]
  ------------------
  706|  1.26M|            return -1;
  707|  27.2M|    } else {
  708|       |        /* Nothing special */
  709|  27.2M|        ret = asn1_item_embed_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  27.2M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  710|  27.2M|            -1, 0, opt, ctx, depth, libctx, propq);
  711|  27.2M|        if (!ret) {
  ------------------
  |  Branch (711:13): [True: 0, False: 27.2M]
  ------------------
  712|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  713|      0|            goto err;
  714|  27.2M|        } else if (ret == -1)
  ------------------
  |  Branch (714:20): [True: 719k, False: 26.5M]
  ------------------
  715|   719k|            return -1;
  716|  27.2M|    }
  717|       |
  718|  31.8M|    *in = p;
  719|  31.8M|    return 1;
  720|       |
  721|      0|err:
  722|      0|    return 0;
  723|  33.8M|}
tasn_dec.c:asn1_d2i_ex_primitive:
  729|  24.3M|{
  730|  24.3M|    int ret = 0, utype;
  731|  24.3M|    long plen;
  732|  24.3M|    char cst, inf, free_cont = 0;
  733|  24.3M|    const unsigned char *p;
  734|  24.3M|    BUF_MEM buf = { 0, NULL, 0, 0 };
  735|  24.3M|    const unsigned char *cont = NULL;
  736|  24.3M|    long len;
  737|       |
  738|  24.3M|    if (pval == NULL) {
  ------------------
  |  Branch (738:9): [True: 0, False: 24.3M]
  ------------------
  739|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_NULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  740|      0|        return 0; /* Should never happen */
  741|      0|    }
  742|       |
  743|  24.3M|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  24.3M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (743:9): [True: 4.57M, False: 19.7M]
  ------------------
  744|  4.57M|        utype = tag;
  745|  4.57M|        tag = -1;
  746|  4.57M|    } else
  747|  19.7M|        utype = it->utype;
  748|       |
  749|  24.3M|    if (utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  24.3M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (749:9): [True: 2.19M, False: 22.1M]
  ------------------
  750|       |        /* If type is ANY need to figure out type from tag */
  751|  2.19M|        unsigned char oclass;
  752|  2.19M|        if (tag >= 0) {
  ------------------
  |  Branch (752:13): [True: 0, False: 2.19M]
  ------------------
  753|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_TAGGED_ANY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  754|      0|            return 0;
  755|      0|        }
  756|  2.19M|        if (opt) {
  ------------------
  |  Branch (756:13): [True: 0, False: 2.19M]
  ------------------
  757|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_OPTIONAL_ANY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  758|      0|            return 0;
  759|      0|        }
  760|  2.19M|        p = *in;
  761|  2.19M|        ret = asn1_check_tlen(NULL, &utype, &oclass, NULL, NULL,
  762|  2.19M|            &p, inlen, -1, 0, 0, ctx);
  763|  2.19M|        if (!ret) {
  ------------------
  |  Branch (763:13): [True: 0, False: 2.19M]
  ------------------
  764|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  765|      0|            return 0;
  766|      0|        }
  767|  2.19M|        if (oclass != V_ASN1_UNIVERSAL)
  ------------------
  |  |   49|  2.19M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (767:13): [True: 0, False: 2.19M]
  ------------------
  768|      0|            utype = V_ASN1_OTHER;
  ------------------
  |  |   59|      0|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  769|  2.19M|    }
  770|  24.3M|    if (tag == -1) {
  ------------------
  |  Branch (770:9): [True: 23.0M, False: 1.31M]
  ------------------
  771|  23.0M|        tag = utype;
  772|  23.0M|        aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  23.0M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  773|  23.0M|    }
  774|  24.3M|    p = *in;
  775|       |    /* Check header */
  776|  24.3M|    ret = asn1_check_tlen(&plen, NULL, NULL, &inf, &cst,
  777|  24.3M|        &p, inlen, tag, aclass, opt, ctx);
  778|  24.3M|    if (!ret) {
  ------------------
  |  Branch (778:9): [True: 0, False: 24.3M]
  ------------------
  779|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  780|      0|        return 0;
  781|  24.3M|    } else if (ret == -1)
  ------------------
  |  Branch (781:16): [True: 1.87M, False: 22.4M]
  ------------------
  782|  1.87M|        return -1;
  783|  22.4M|    ret = 0;
  784|       |    /* SEQUENCE, SET and "OTHER" are left in encoded form */
  785|  22.4M|    if ((utype == V_ASN1_SEQUENCE)
  ------------------
  |  |   76|  22.4M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (785:9): [True: 0, False: 22.4M]
  ------------------
  786|  22.4M|        || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   77|  22.4M|#define V_ASN1_SET 17
  ------------------
                      || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   59|  22.4M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (786:12): [True: 0, False: 22.4M]
  |  Branch (786:37): [True: 0, False: 22.4M]
  ------------------
  787|       |        /*
  788|       |         * Clear context cache for type OTHER because the auto clear when we
  789|       |         * have a exact match won't work
  790|       |         */
  791|      0|        if (utype == V_ASN1_OTHER) {
  ------------------
  |  |   59|      0|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (791:13): [True: 0, False: 0]
  ------------------
  792|      0|            asn1_tlc_clear(ctx);
  ------------------
  |  |  115|      0|    do {                    \
  |  |  116|      0|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|            (c)->valid = 0; \
  |  |  118|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  793|      0|        }
  794|       |        /* SEQUENCE and SET must be constructed */
  795|      0|        else if (!cst) {
  ------------------
  |  Branch (795:18): [True: 0, False: 0]
  ------------------
  796|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TYPE_NOT_CONSTRUCTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  797|      0|            return 0;
  798|      0|        }
  799|       |
  800|      0|        cont = *in;
  801|       |        /* If indefinite length constructed find the real end */
  802|      0|        if (inf) {
  ------------------
  |  Branch (802:13): [True: 0, False: 0]
  ------------------
  803|      0|            if (!asn1_find_end(&p, plen, inf))
  ------------------
  |  Branch (803:17): [True: 0, False: 0]
  ------------------
  804|      0|                goto err;
  805|      0|            len = (long)(p - cont);
  806|      0|        } else {
  807|      0|            len = (long)(p - cont) + plen;
  808|      0|            p += plen;
  809|      0|        }
  810|  22.4M|    } else if (cst) {
  ------------------
  |  Branch (810:16): [True: 0, False: 22.4M]
  ------------------
  811|      0|        if (utype == V_ASN1_NULL || utype == V_ASN1_BOOLEAN
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
                      if (utype == V_ASN1_NULL || utype == V_ASN1_BOOLEAN
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (811:13): [True: 0, False: 0]
  |  Branch (811:37): [True: 0, False: 0]
  ------------------
  812|      0|            || utype == V_ASN1_OBJECT || utype == V_ASN1_INTEGER
  ------------------
  |  |   70|      0|#define V_ASN1_OBJECT 6
  ------------------
                          || utype == V_ASN1_OBJECT || utype == V_ASN1_INTEGER
  ------------------
  |  |   66|      0|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (812:16): [True: 0, False: 0]
  |  Branch (812:42): [True: 0, False: 0]
  ------------------
  813|      0|            || utype == V_ASN1_ENUMERATED) {
  ------------------
  |  |   74|      0|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (813:16): [True: 0, False: 0]
  ------------------
  814|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TYPE_NOT_PRIMITIVE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  815|      0|            return 0;
  816|      0|        }
  817|       |
  818|       |        /* Free any returned 'buf' content */
  819|      0|        free_cont = 1;
  820|       |        /*
  821|       |         * Should really check the internal tags are correct but some things
  822|       |         * may get this wrong. The relevant specs say that constructed string
  823|       |         * types should be OCTET STRINGs internally irrespective of the type.
  824|       |         * So instead just check for UNIVERSAL class and ignore the tag.
  825|       |         */
  826|      0|        if (!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL, 0)) {
  ------------------
  |  |   49|      0|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (826:13): [True: 0, False: 0]
  ------------------
  827|      0|            goto err;
  828|      0|        }
  829|      0|        len = (long)buf.length;
  830|       |        /* Append a final null to string */
  831|      0|        if (!BUF_MEM_grow_clean(&buf, len + 1)) {
  ------------------
  |  Branch (831:13): [True: 0, False: 0]
  ------------------
  832|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  833|      0|            goto err;
  834|      0|        }
  835|      0|        buf.data[len] = 0;
  836|      0|        cont = (const unsigned char *)buf.data;
  837|  22.4M|    } else {
  838|  22.4M|        cont = p;
  839|  22.4M|        len = plen;
  840|  22.4M|        p += plen;
  841|  22.4M|    }
  842|       |
  843|       |    /* We now have content length and type: translate into a structure */
  844|       |    /* asn1_ex_c2i may reuse allocated buffer, and so sets free_cont to 0 */
  845|  22.4M|    if (!asn1_ex_c2i(pval, cont, len, utype, &free_cont, it))
  ------------------
  |  Branch (845:9): [True: 0, False: 22.4M]
  ------------------
  846|      0|        goto err;
  847|       |
  848|  22.4M|    *in = p;
  849|  22.4M|    ret = 1;
  850|  22.4M|err:
  851|  22.4M|    if (free_cont)
  ------------------
  |  Branch (851:9): [True: 0, False: 22.4M]
  ------------------
  852|      0|        OPENSSL_free(buf.data);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  853|  22.4M|    return ret;
  854|  22.4M|}
tasn_dec.c:asn1_ex_c2i:
  860|  22.4M|{
  861|  22.4M|    ASN1_VALUE **opval = NULL;
  862|  22.4M|    ASN1_STRING *stmp;
  863|  22.4M|    ASN1_TYPE *typ = NULL;
  864|  22.4M|    int ret = 0;
  865|  22.4M|    int ilen = (int)len;
  866|  22.4M|    const ASN1_PRIMITIVE_FUNCS *pf;
  867|  22.4M|    ASN1_INTEGER **tint;
  868|  22.4M|    pf = it->funcs;
  869|       |
  870|  22.4M|    if (pf && pf->prim_c2i) {
  ------------------
  |  Branch (870:9): [True: 682k, False: 21.7M]
  |  Branch (870:15): [True: 682k, False: 0]
  ------------------
  871|   682k|        if (len == (long)ilen)
  ------------------
  |  Branch (871:13): [True: 682k, False: 0]
  ------------------
  872|   682k|            return pf->prim_c2i(pval, cont, ilen, utype, free_cont, it);
  873|   682k|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  874|      0|        return 0;
  875|   682k|    }
  876|       |    /* If ANY type clear type and set pointer to internal value */
  877|  21.7M|    if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  21.7M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (877:9): [True: 2.19M, False: 19.5M]
  ------------------
  878|  2.19M|        if (*pval == NULL) {
  ------------------
  |  Branch (878:13): [True: 2.19M, False: 0]
  ------------------
  879|  2.19M|            typ = ASN1_TYPE_new();
  880|  2.19M|            if (typ == NULL)
  ------------------
  |  Branch (880:17): [True: 0, False: 2.19M]
  ------------------
  881|      0|                goto err;
  882|  2.19M|            *pval = (ASN1_VALUE *)typ;
  883|  2.19M|        } else
  884|      0|            typ = (ASN1_TYPE *)*pval;
  885|       |
  886|  2.19M|        if (utype != typ->type)
  ------------------
  |  Branch (886:13): [True: 2.19M, False: 0]
  ------------------
  887|  2.19M|            ASN1_TYPE_set(typ, utype, NULL);
  888|  2.19M|        opval = pval;
  889|  2.19M|        pval = &typ->value.asn1_value;
  890|  2.19M|    }
  891|  21.7M|    switch (utype) {
  892|  8.28M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  8.28M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (892:5): [True: 8.28M, False: 13.4M]
  ------------------
  893|  8.28M|        if (len != (long)ilen
  ------------------
  |  Branch (893:13): [True: 0, False: 8.28M]
  ------------------
  894|  8.28M|            || !ossl_c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, ilen))
  ------------------
  |  Branch (894:16): [True: 0, False: 8.28M]
  ------------------
  895|      0|            goto err;
  896|  8.28M|        break;
  897|       |
  898|  8.28M|    case V_ASN1_NULL:
  ------------------
  |  |   69|  1.70M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (898:5): [True: 1.70M, False: 20.0M]
  ------------------
  899|  1.70M|        if (len) {
  ------------------
  |  Branch (899:13): [True: 0, False: 1.70M]
  ------------------
  900|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_NULL_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  901|      0|            goto err;
  902|      0|        }
  903|  1.70M|        *pval = (ASN1_VALUE *)1;
  904|  1.70M|        break;
  905|       |
  906|  1.43M|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|  1.43M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (906:5): [True: 1.43M, False: 20.3M]
  ------------------
  907|  1.43M|        if (len != 1) {
  ------------------
  |  Branch (907:13): [True: 0, False: 1.43M]
  ------------------
  908|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  909|      0|            goto err;
  910|  1.43M|        } else {
  911|  1.43M|            ASN1_BOOLEAN *tbool;
  912|  1.43M|            tbool = (ASN1_BOOLEAN *)pval;
  913|  1.43M|            *tbool = *cont;
  914|  1.43M|        }
  915|  1.43M|        break;
  916|       |
  917|  2.45M|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|  2.45M|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (917:5): [True: 2.45M, False: 19.3M]
  ------------------
  918|  2.45M|        if (!ossl_c2i_ASN1_BIT_STRING((ASN1_BIT_STRING **)pval, &cont, len))
  ------------------
  |  Branch (918:13): [True: 0, False: 2.45M]
  ------------------
  919|      0|            goto err;
  920|  2.45M|        break;
  921|       |
  922|  2.45M|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|  1.01M|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (922:5): [True: 1.01M, False: 20.7M]
  ------------------
  923|  1.01M|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|  1.01M|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (923:5): [True: 0, False: 21.7M]
  ------------------
  924|  1.01M|        tint = (ASN1_INTEGER **)pval;
  925|  1.01M|        if (!ossl_c2i_ASN1_INTEGER(tint, &cont, len))
  ------------------
  |  Branch (925:13): [True: 0, False: 1.01M]
  ------------------
  926|      0|            goto err;
  927|       |        /* Fixup type to match the expected form */
  928|  1.01M|        (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG);
  ------------------
  |  |   99|  1.01M|#define V_ASN1_NEG 0x100
  ------------------
  929|  1.01M|        break;
  930|       |
  931|  2.24M|    case V_ASN1_OCTET_STRING:
  ------------------
  |  |   68|  2.24M|#define V_ASN1_OCTET_STRING 4
  ------------------
  |  Branch (931:5): [True: 2.24M, False: 19.5M]
  ------------------
  932|  2.24M|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|  2.24M|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (932:5): [True: 0, False: 21.7M]
  ------------------
  933|  4.83M|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|  4.83M|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (933:5): [True: 2.58M, False: 19.1M]
  ------------------
  934|  4.83M|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|  4.83M|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (934:5): [True: 0, False: 21.7M]
  ------------------
  935|  4.83M|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|  4.83M|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (935:5): [True: 0, False: 21.7M]
  ------------------
  936|  4.90M|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|  4.90M|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (936:5): [True: 66.6k, False: 21.7M]
  ------------------
  937|  5.90M|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|  5.90M|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (937:5): [True: 998k, False: 20.7M]
  ------------------
  938|  5.91M|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|  5.91M|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (938:5): [True: 8.32k, False: 21.7M]
  ------------------
  939|  5.91M|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|  5.91M|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (939:5): [True: 0, False: 21.7M]
  ------------------
  940|  5.91M|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|  5.91M|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (940:5): [True: 0, False: 21.7M]
  ------------------
  941|  5.91M|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|  5.91M|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (941:5): [True: 0, False: 21.7M]
  ------------------
  942|  5.91M|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|  5.91M|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (942:5): [True: 0, False: 21.7M]
  ------------------
  943|  5.91M|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|  5.91M|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (943:5): [True: 0, False: 21.7M]
  ------------------
  944|  6.88M|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|  6.88M|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (944:5): [True: 972k, False: 20.8M]
  ------------------
  945|  6.88M|    case V_ASN1_OTHER:
  ------------------
  |  |   59|  6.88M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (945:5): [True: 0, False: 21.7M]
  ------------------
  946|  6.88M|    case V_ASN1_SET:
  ------------------
  |  |   77|  6.88M|#define V_ASN1_SET 17
  ------------------
  |  Branch (946:5): [True: 0, False: 21.7M]
  ------------------
  947|  6.88M|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|  6.88M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (947:5): [True: 0, False: 21.7M]
  ------------------
  948|  6.88M|    default:
  ------------------
  |  Branch (948:5): [True: 0, False: 21.7M]
  ------------------
  949|  6.88M|        if (len != (long)ilen) {
  ------------------
  |  Branch (949:13): [True: 0, False: 6.88M]
  ------------------
  950|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  951|      0|            goto err;
  952|      0|        }
  953|  6.88M|        if (utype == V_ASN1_BMPSTRING && (len & 1)) {
  ------------------
  |  |   91|  13.7M|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (953:13): [True: 0, False: 6.88M]
  |  Branch (953:42): [True: 0, False: 0]
  ------------------
  954|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  955|      0|            goto err;
  956|      0|        }
  957|  6.88M|        if (utype == V_ASN1_UNIVERSALSTRING && (len & 3)) {
  ------------------
  |  |   90|  13.7M|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (957:13): [True: 0, False: 6.88M]
  |  Branch (957:48): [True: 0, False: 0]
  ------------------
  958|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  959|      0|            goto err;
  960|      0|        }
  961|  6.88M|        if (utype == V_ASN1_GENERALIZEDTIME && (len < 15)) {
  ------------------
  |  |   85|  13.7M|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (961:13): [True: 8.32k, False: 6.87M]
  |  Branch (961:48): [True: 0, False: 8.32k]
  ------------------
  962|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  963|      0|            goto err;
  964|      0|        }
  965|  6.88M|        if (utype == V_ASN1_UTCTIME && (len < 13)) {
  ------------------
  |  |   84|  13.7M|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (965:13): [True: 998k, False: 5.88M]
  |  Branch (965:40): [True: 0, False: 998k]
  ------------------
  966|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UTCTIME_IS_TOO_SHORT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  967|      0|            goto err;
  968|      0|        }
  969|       |        /* All based on ASN1_STRING and handled the same */
  970|  6.88M|        if (*pval == NULL) {
  ------------------
  |  Branch (970:13): [True: 594k, False: 6.28M]
  ------------------
  971|   594k|            stmp = ASN1_STRING_type_new(utype);
  972|   594k|            if (stmp == NULL) {
  ------------------
  |  Branch (972:17): [True: 0, False: 594k]
  ------------------
  973|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  974|      0|                goto err;
  975|      0|            }
  976|   594k|            *pval = (ASN1_VALUE *)stmp;
  977|  6.28M|        } else {
  978|  6.28M|            stmp = (ASN1_STRING *)*pval;
  979|  6.28M|            stmp->type = utype;
  980|  6.28M|        }
  981|       |        /* If we've already allocated a buffer use it */
  982|  6.88M|        if (*free_cont) {
  ------------------
  |  Branch (982:13): [True: 0, False: 6.88M]
  ------------------
  983|      0|            ASN1_STRING_set0(stmp, (unsigned char *)cont /* UGLY CAST! */, ilen);
  984|      0|            *free_cont = 0;
  985|  6.88M|        } else {
  986|  6.88M|            if (!ASN1_STRING_set(stmp, cont, ilen)) {
  ------------------
  |  Branch (986:17): [True: 0, False: 6.88M]
  ------------------
  987|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  988|      0|                ASN1_STRING_free(stmp);
  989|      0|                *pval = NULL;
  990|      0|                goto err;
  991|      0|            }
  992|  6.88M|        }
  993|  6.88M|        break;
  994|  21.7M|    }
  995|       |    /* If ASN1_ANY and NULL type fix up value */
  996|  21.7M|    if (typ && (utype == V_ASN1_NULL))
  ------------------
  |  |   69|  2.19M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (996:9): [True: 2.19M, False: 19.5M]
  |  Branch (996:16): [True: 1.70M, False: 486k]
  ------------------
  997|  1.70M|        typ->value.ptr = NULL;
  998|       |
  999|  21.7M|    ret = 1;
 1000|  21.7M|err:
 1001|  21.7M|    if (!ret) {
  ------------------
  |  Branch (1001:9): [True: 0, False: 21.7M]
  ------------------
 1002|      0|        ASN1_TYPE_free(typ);
 1003|      0|        if (opval)
  ------------------
  |  Branch (1003:13): [True: 0, False: 0]
  ------------------
 1004|      0|            *opval = NULL;
 1005|      0|    }
 1006|  21.7M|    return ret;
 1007|  21.7M|}
tasn_dec.c:asn1_check_eoc:
 1163|  37.7M|{
 1164|  37.7M|    const unsigned char *p;
 1165|       |
 1166|  37.7M|    if (len < 2)
  ------------------
  |  Branch (1166:9): [True: 0, False: 37.7M]
  ------------------
 1167|      0|        return 0;
 1168|  37.7M|    p = *in;
 1169|  37.7M|    if (p[0] == '\0' && p[1] == '\0') {
  ------------------
  |  Branch (1169:9): [True: 0, False: 37.7M]
  |  Branch (1169:25): [True: 0, False: 0]
  ------------------
 1170|      0|        *in += 2;
 1171|      0|        return 1;
 1172|      0|    }
 1173|  37.7M|    return 0;
 1174|  37.7M|}
tasn_dec.c:asn1_check_tlen:
 1187|  49.2M|{
 1188|  49.2M|    int i;
 1189|  49.2M|    int ptag, pclass;
 1190|  49.2M|    long plen;
 1191|  49.2M|    const unsigned char *p, *q;
 1192|  49.2M|    p = *in;
 1193|  49.2M|    q = p;
 1194|       |
 1195|  49.2M|    if (len <= 0) {
  ------------------
  |  Branch (1195:9): [True: 0, False: 49.2M]
  ------------------
 1196|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1197|      0|        goto err;
 1198|      0|    }
 1199|  49.2M|    if (ctx != NULL && ctx->valid) {
  ------------------
  |  Branch (1199:9): [True: 49.2M, False: 0]
  |  Branch (1199:24): [True: 8.80M, False: 40.4M]
  ------------------
 1200|  8.80M|        i = ctx->ret;
 1201|  8.80M|        plen = ctx->plen;
 1202|  8.80M|        pclass = ctx->pclass;
 1203|  8.80M|        ptag = ctx->ptag;
 1204|  8.80M|        p += ctx->hdrlen;
 1205|  40.4M|    } else {
 1206|  40.4M|        i = ASN1_get_object(&p, &plen, &ptag, &pclass, len);
 1207|  40.4M|        if (ctx != NULL) {
  ------------------
  |  Branch (1207:13): [True: 40.4M, False: 0]
  ------------------
 1208|  40.4M|            ctx->ret = i;
 1209|  40.4M|            ctx->plen = plen;
 1210|  40.4M|            ctx->pclass = pclass;
 1211|  40.4M|            ctx->ptag = ptag;
 1212|  40.4M|            ctx->hdrlen = (int)(p - q);
 1213|  40.4M|            ctx->valid = 1;
 1214|       |            /*
 1215|       |             * If definite length, and no error, length + header can't exceed
 1216|       |             * total amount of data available.
 1217|       |             */
 1218|  40.4M|            if ((i & 0x81) == 0 && (plen + ctx->hdrlen) > len) {
  ------------------
  |  Branch (1218:17): [True: 40.4M, False: 0]
  |  Branch (1218:36): [True: 0, False: 40.4M]
  ------------------
 1219|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1220|      0|                goto err;
 1221|      0|            }
 1222|  40.4M|        }
 1223|  40.4M|    }
 1224|       |
 1225|  49.2M|    if ((i & 0x80) != 0) {
  ------------------
  |  Branch (1225:9): [True: 0, False: 49.2M]
  ------------------
 1226|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_OBJECT_HEADER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1227|      0|        goto err;
 1228|      0|    }
 1229|  49.2M|    if (exptag >= 0) {
  ------------------
  |  Branch (1229:9): [True: 42.4M, False: 6.76M]
  ------------------
 1230|  42.4M|        if (exptag != ptag || expclass != pclass) {
  ------------------
  |  Branch (1230:13): [True: 2.03M, False: 40.4M]
  |  Branch (1230:31): [True: 0, False: 40.4M]
  ------------------
 1231|       |            /*
 1232|       |             * If type is OPTIONAL, not an error: indicate missing type.
 1233|       |             */
 1234|  2.03M|            if (opt != 0)
  ------------------
  |  Branch (1234:17): [True: 2.03M, False: 0]
  ------------------
 1235|  2.03M|                return -1;
 1236|  2.03M|            ERR_raise(ERR_LIB_ASN1, ASN1_R_WRONG_TAG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1237|      0|            goto err;
 1238|  2.03M|        }
 1239|       |        /*
 1240|       |         * We have a tag and class match: assume we are going to do something
 1241|       |         * with it
 1242|       |         */
 1243|  40.4M|        asn1_tlc_clear(ctx);
  ------------------
  |  |  115|  40.4M|    do {                    \
  |  |  116|  40.4M|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 40.4M, False: 0]
  |  |  ------------------
  |  |  117|  40.4M|            (c)->valid = 0; \
  |  |  118|  40.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 40.4M]
  |  |  ------------------
  ------------------
 1244|  40.4M|    }
 1245|       |
 1246|  47.1M|    if ((i & 1) != 0)
  ------------------
  |  Branch (1246:9): [True: 0, False: 47.1M]
  ------------------
 1247|      0|        plen = len - (long)(p - q);
 1248|       |
 1249|  47.1M|    if (inf != NULL)
  ------------------
  |  Branch (1249:9): [True: 40.4M, False: 6.76M]
  ------------------
 1250|  40.4M|        *inf = i & 1;
 1251|       |
 1252|  47.1M|    if (cst != NULL)
  ------------------
  |  Branch (1252:9): [True: 35.2M, False: 11.9M]
  ------------------
 1253|  35.2M|        *cst = i & V_ASN1_CONSTRUCTED;
  ------------------
  |  |   54|  35.2M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
 1254|       |
 1255|  47.1M|    if (olen != NULL)
  ------------------
  |  Branch (1255:9): [True: 40.4M, False: 6.76M]
  ------------------
 1256|  40.4M|        *olen = plen;
 1257|       |
 1258|  47.1M|    if (oclass != NULL)
  ------------------
  |  Branch (1258:9): [True: 6.76M, False: 40.4M]
  ------------------
 1259|  6.76M|        *oclass = pclass;
 1260|       |
 1261|  47.1M|    if (otag != NULL)
  ------------------
  |  Branch (1261:9): [True: 6.76M, False: 40.4M]
  ------------------
 1262|  6.76M|        *otag = ptag;
 1263|       |
 1264|  47.1M|    *in = p;
 1265|  47.1M|    return 1;
 1266|       |
 1267|      0|err:
 1268|       |    asn1_tlc_clear(ctx);
  ------------------
  |  |  115|      0|    do {                    \
  |  |  116|      0|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|            (c)->valid = 0; \
  |  |  118|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1269|      0|    return 0;
 1270|  49.2M|}

ASN1_item_i2d:
   44|   441k|{
   45|   441k|    return asn1_item_flags_i2d(val, out, it, 0);
   46|   441k|}
ASN1_item_ex_i2d:
   83|  54.7M|{
   84|  54.7M|    const ASN1_TEMPLATE *tt = NULL;
   85|  54.7M|    int i, seqcontlen, seqlen, ndef = 1;
   86|  54.7M|    const ASN1_EXTERN_FUNCS *ef;
   87|  54.7M|    const ASN1_AUX *aux = it->funcs;
   88|  54.7M|    ASN1_aux_const_cb *asn1_cb = NULL;
   89|       |
   90|  54.7M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  54.7M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (90:9): [True: 28.5M, False: 26.2M]
  |  Branch (90:48): [True: 0, False: 28.5M]
  ------------------
   91|      0|        return 0;
   92|       |
   93|  54.7M|    if (aux != NULL) {
  ------------------
  |  Branch (93:9): [True: 2.20M, False: 52.5M]
  ------------------
   94|  2.20M|        asn1_cb = ((aux->flags & ASN1_AFLG_CONST_CB) != 0) ? aux->asn1_const_cb
  ------------------
  |  |  727|  2.20M|#define ASN1_AFLG_CONST_CB 8
  ------------------
  |  Branch (94:19): [True: 0, False: 2.20M]
  ------------------
   95|  2.20M|                                                           : (ASN1_aux_const_cb *)aux->asn1_cb; /* backward compatibility */
   96|  2.20M|    }
   97|       |
   98|  54.7M|    switch (it->itype) {
   99|       |
  100|  26.2M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  26.2M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (100:5): [True: 26.2M, False: 28.5M]
  ------------------
  101|  26.2M|        if (it->templates)
  ------------------
  |  Branch (101:13): [True: 7.13M, False: 19.1M]
  ------------------
  102|  7.13M|            return asn1_template_ex_i2d(pval, out, it->templates,
  103|  7.13M|                tag, aclass);
  104|  19.1M|        return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
  105|       |
  106|  14.2M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  14.2M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (106:5): [True: 14.2M, False: 40.4M]
  ------------------
  107|       |        /*
  108|       |         * It never makes sense for multi-strings to have implicit tagging, so
  109|       |         * if tag != -1, then this looks like an error in the template.
  110|       |         */
  111|  14.2M|        if (tag != -1) {
  ------------------
  |  Branch (111:13): [True: 0, False: 14.2M]
  ------------------
  112|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|            return -1;
  114|      0|        }
  115|  14.2M|        return asn1_i2d_ex_primitive(pval, out, it, -1, aclass);
  116|       |
  117|      0|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|      0|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (117:5): [True: 0, False: 54.7M]
  ------------------
  118|       |        /*
  119|       |         * It never makes sense for CHOICE types to have implicit tagging, so
  120|       |         * if tag != -1, then this looks like an error in the template.
  121|       |         */
  122|      0|        if (tag != -1) {
  ------------------
  |  Branch (122:13): [True: 0, False: 0]
  ------------------
  123|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|            return -1;
  125|      0|        }
  126|      0|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
  ------------------
  |  |  737|      0|#define ASN1_OP_I2D_PRE 6
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  |  Branch (126:24): [True: 0, False: 0]
  ------------------
  127|      0|            return 0;
  128|      0|        i = ossl_asn1_get_choice_selector_const(pval, it);
  129|      0|        if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (129:13): [True: 0, False: 0]
  |  Branch (129:25): [True: 0, False: 0]
  ------------------
  130|      0|            const ASN1_VALUE **pchval;
  131|      0|            const ASN1_TEMPLATE *chtt;
  132|      0|            chtt = it->templates + i;
  133|      0|            pchval = ossl_asn1_get_const_field_ptr(pval, chtt);
  134|      0|            return asn1_template_ex_i2d(pchval, out, chtt, -1, aclass);
  135|      0|        }
  136|       |        /* Fixme: error condition if selector out of range */
  137|      0|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL))
  ------------------
  |  |  738|      0|#define ASN1_OP_I2D_POST 7
  ------------------
  |  Branch (137:13): [True: 0, False: 0]
  |  Branch (137:24): [True: 0, False: 0]
  ------------------
  138|      0|            return 0;
  139|      0|        break;
  140|       |
  141|      0|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|      0|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (141:5): [True: 0, False: 54.7M]
  ------------------
  142|       |        /* If new style i2d it does all the work */
  143|      0|        ef = it->funcs;
  144|      0|        return ef->asn1_ex_i2d(pval, out, it, tag, aclass);
  145|       |
  146|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (146:5): [True: 0, False: 54.7M]
  ------------------
  147|       |        /* Use indefinite length constructed if requested */
  148|      0|        if (aclass & ASN1_TFLG_NDEF)
  ------------------
  |  |  583|      0|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (148:13): [True: 0, False: 0]
  ------------------
  149|      0|            ndef = 2;
  150|       |        /* fall through */
  151|       |
  152|  14.2M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  14.2M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (152:5): [True: 14.2M, False: 40.5M]
  ------------------
  153|  14.2M|        i = ossl_asn1_enc_restore(&seqcontlen, out, pval, it);
  154|       |        /* An error occurred */
  155|  14.2M|        if (i < 0)
  ------------------
  |  Branch (155:13): [True: 0, False: 14.2M]
  ------------------
  156|      0|            return 0;
  157|       |        /* We have a valid cached encoding... */
  158|  14.2M|        if (i > 0)
  ------------------
  |  Branch (158:13): [True: 1.32M, False: 12.9M]
  ------------------
  159|  1.32M|            return seqcontlen;
  160|       |        /* Otherwise carry on */
  161|  12.9M|        seqcontlen = 0;
  162|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  163|  12.9M|        if (tag == -1) {
  ------------------
  |  Branch (163:13): [True: 12.9M, False: 0]
  ------------------
  164|  12.9M|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  12.9M|#define V_ASN1_SEQUENCE 16
  ------------------
  165|       |            /* Retain any other flags in aclass */
  166|  12.9M|            aclass = (aclass & ~ASN1_TFLG_TAG_CLASS)
  ------------------
  |  |  564|  12.9M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  167|  12.9M|                | V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  12.9M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  168|  12.9M|        }
  169|  12.9M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
  ------------------
  |  |  737|   882k|#define ASN1_OP_I2D_PRE 6
  ------------------
  |  Branch (169:13): [True: 882k, False: 12.0M]
  |  Branch (169:24): [True: 0, False: 882k]
  ------------------
  170|      0|            return 0;
  171|       |        /* First work out sequence content length */
  172|  39.6M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (172:41): [True: 26.7M, False: 12.9M]
  ------------------
  173|  26.7M|            const ASN1_TEMPLATE *seqtt;
  174|  26.7M|            const ASN1_VALUE **pseqval;
  175|  26.7M|            int tmplen;
  176|  26.7M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  177|  26.7M|            if (!seqtt)
  ------------------
  |  Branch (177:17): [True: 0, False: 26.7M]
  ------------------
  178|      0|                return 0;
  179|  26.7M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  180|  26.7M|            tmplen = asn1_template_ex_i2d(pseqval, NULL, seqtt, -1, aclass);
  181|  26.7M|            if (tmplen == -1 || (tmplen > INT_MAX - seqcontlen))
  ------------------
  |  Branch (181:17): [True: 0, False: 26.7M]
  |  Branch (181:33): [True: 0, False: 26.7M]
  ------------------
  182|      0|                return -1;
  183|  26.7M|            seqcontlen += tmplen;
  184|  26.7M|        }
  185|       |
  186|  12.9M|        seqlen = ASN1_object_size(ndef, seqcontlen, tag);
  187|  12.9M|        if (!out || seqlen == -1)
  ------------------
  |  Branch (187:13): [True: 8.46M, False: 4.45M]
  |  Branch (187:21): [True: 0, False: 4.45M]
  ------------------
  188|  8.46M|            return seqlen;
  189|       |        /* Output SEQUENCE header */
  190|  4.45M|        ASN1_put_object(out, ndef, seqcontlen, tag, aclass);
  191|  13.7M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (191:41): [True: 9.34M, False: 4.45M]
  ------------------
  192|  9.34M|            const ASN1_TEMPLATE *seqtt;
  193|  9.34M|            const ASN1_VALUE **pseqval;
  194|  9.34M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  195|  9.34M|            if (!seqtt)
  ------------------
  |  Branch (195:17): [True: 0, False: 9.34M]
  ------------------
  196|      0|                return 0;
  197|  9.34M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  198|       |            /* FIXME: check for errors in enhanced version */
  199|  9.34M|            asn1_template_ex_i2d(pseqval, out, seqtt, -1, aclass);
  200|  9.34M|        }
  201|  4.45M|        if (ndef == 2)
  ------------------
  |  Branch (201:13): [True: 0, False: 4.45M]
  ------------------
  202|      0|            ASN1_put_eoc(out);
  203|  4.45M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL))
  ------------------
  |  |  738|   441k|#define ASN1_OP_I2D_POST 7
  ------------------
  |  Branch (203:13): [True: 441k, False: 4.00M]
  |  Branch (203:24): [True: 0, False: 441k]
  ------------------
  204|      0|            return 0;
  205|  4.45M|        return seqlen;
  206|       |
  207|      0|    default:
  ------------------
  |  Branch (207:5): [True: 0, False: 54.7M]
  ------------------
  208|      0|        return 0;
  209|  54.7M|    }
  210|      0|    return 0;
  211|  54.7M|}
tasn_enc.c:asn1_item_flags_i2d:
   57|   441k|{
   58|   441k|    if (out != NULL && *out == NULL) {
  ------------------
  |  Branch (58:9): [True: 441k, False: 0]
  |  Branch (58:24): [True: 441k, False: 0]
  ------------------
   59|   441k|        unsigned char *p, *buf;
   60|   441k|        int len;
   61|       |
   62|   441k|        len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags);
   63|   441k|        if (len <= 0)
  ------------------
  |  Branch (63:13): [True: 0, False: 441k]
  ------------------
   64|      0|            return len;
   65|   441k|        if ((buf = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  107|   441k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (65:13): [True: 0, False: 441k]
  ------------------
   66|      0|            return -1;
   67|   441k|        p = buf;
   68|   441k|        ASN1_item_ex_i2d(&val, &p, it, -1, flags);
   69|   441k|        *out = buf;
   70|   441k|        return len;
   71|   441k|    }
   72|       |
   73|      0|    return ASN1_item_ex_i2d(&val, out, it, -1, flags);
   74|   441k|}
tasn_enc.c:asn1_template_ex_i2d:
  215|  43.1M|{
  216|  43.1M|    const int flags = tt->flags;
  217|  43.1M|    int i, ret, ttag, tclass, ndef, len;
  218|  43.1M|    const ASN1_VALUE *tval;
  219|       |
  220|       |    /*
  221|       |     * If field is embedded then val needs fixing so it is a pointer to
  222|       |     * a pointer to a field.
  223|       |     */
  224|  43.1M|    if (flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  43.1M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (224:9): [True: 3.97M, False: 39.2M]
  ------------------
  225|  3.97M|        tval = (ASN1_VALUE *)pval;
  226|  3.97M|        pval = &tval;
  227|  3.97M|    }
  228|       |    /*
  229|       |     * Work out tag and class to use: tagging may come either from the
  230|       |     * template or the arguments, not both because this would create
  231|       |     * ambiguity. Additionally the iclass argument may contain some
  232|       |     * additional flags which should be noted and passed down to other
  233|       |     * levels.
  234|       |     */
  235|  43.1M|    if (flags & ASN1_TFLG_TAG_MASK) {
  ------------------
  |  |  541|  43.1M|#define ASN1_TFLG_TAG_MASK (0x3 << 3)
  ------------------
  |  Branch (235:9): [True: 0, False: 43.1M]
  ------------------
  236|       |        /* Error if argument and template tagging */
  237|      0|        if (tag != -1)
  ------------------
  |  Branch (237:13): [True: 0, False: 0]
  ------------------
  238|       |            /* FIXME: error code here */
  239|      0|            return -1;
  240|       |        /* Get tagging from template */
  241|      0|        ttag = tt->tag;
  242|      0|        tclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|      0|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  243|  43.1M|    } else if (tag != -1) {
  ------------------
  |  Branch (243:16): [True: 0, False: 43.1M]
  ------------------
  244|       |        /* No template tagging, get from arguments */
  245|      0|        ttag = tag;
  246|      0|        tclass = iclass & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|      0|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  247|  43.1M|    } else {
  248|  43.1M|        ttag = -1;
  249|  43.1M|        tclass = 0;
  250|  43.1M|    }
  251|       |    /*
  252|       |     * Remove any class mask from iflag.
  253|       |     */
  254|  43.1M|    iclass &= ~ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  43.1M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  255|       |
  256|       |    /*
  257|       |     * At this point 'ttag' contains the outer tag to use, 'tclass' is the
  258|       |     * class and iclass is any flags passed to this function.
  259|       |     */
  260|       |
  261|       |    /* if template and arguments require ndef, use it */
  262|  43.1M|    if ((flags & ASN1_TFLG_NDEF) && (iclass & ASN1_TFLG_NDEF))
  ------------------
  |  |  583|  43.1M|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
                  if ((flags & ASN1_TFLG_NDEF) && (iclass & ASN1_TFLG_NDEF))
  ------------------
  |  |  583|      0|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (262:9): [True: 0, False: 43.1M]
  |  Branch (262:37): [True: 0, False: 0]
  ------------------
  263|      0|        ndef = 2;
  264|  43.1M|    else
  265|  43.1M|        ndef = 1;
  266|       |
  267|  43.1M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  43.1M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (267:9): [True: 7.13M, False: 36.0M]
  ------------------
  268|       |        /* SET OF, SEQUENCE OF */
  269|  7.13M|        STACK_OF(const_ASN1_VALUE) *sk = (STACK_OF(const_ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  7.13M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  270|  7.13M|        int isset, sktag, skaclass;
  271|  7.13M|        int skcontlen, sklen;
  272|  7.13M|        const ASN1_VALUE *skitem;
  273|       |
  274|  7.13M|        if (*pval == NULL)
  ------------------
  |  Branch (274:13): [True: 0, False: 7.13M]
  ------------------
  275|      0|            return 0;
  276|       |
  277|  7.13M|        if (flags & ASN1_TFLG_SET_OF) {
  ------------------
  |  |  515|  7.13M|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (277:13): [True: 7.13M, False: 0]
  ------------------
  278|  7.13M|            isset = 1;
  279|       |            /* 2 means we reorder */
  280|  7.13M|            if (flags & ASN1_TFLG_SEQUENCE_OF)
  ------------------
  |  |  518|  7.13M|#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
  ------------------
  |  Branch (280:17): [True: 0, False: 7.13M]
  ------------------
  281|      0|                isset = 2;
  282|  7.13M|        } else
  283|      0|            isset = 0;
  284|       |
  285|       |        /*
  286|       |         * Work out inner tag value: if EXPLICIT or no tagging use underlying
  287|       |         * type.
  288|       |         */
  289|  7.13M|        if ((ttag != -1) && !(flags & ASN1_TFLG_EXPTAG)) {
  ------------------
  |  |  539|      0|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (289:13): [True: 0, False: 7.13M]
  |  Branch (289:29): [True: 0, False: 0]
  ------------------
  290|      0|            sktag = ttag;
  291|      0|            skaclass = tclass;
  292|  7.13M|        } else {
  293|  7.13M|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  7.13M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  294|  7.13M|            if (isset)
  ------------------
  |  Branch (294:17): [True: 7.13M, False: 0]
  ------------------
  295|  7.13M|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  7.13M|#define V_ASN1_SET 17
  ------------------
  296|      0|            else
  297|      0|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  298|  7.13M|        }
  299|       |
  300|       |        /* Determine total length of items */
  301|  7.13M|        skcontlen = 0;
  302|  14.2M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (302:21): [True: 7.13M, False: 7.13M]
  ------------------
  303|  7.13M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  304|  7.13M|            len = ASN1_item_ex_i2d(&skitem, NULL, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  7.13M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  305|  7.13M|                -1, iclass);
  306|  7.13M|            if (len == -1 || (skcontlen > INT_MAX - len))
  ------------------
  |  Branch (306:17): [True: 0, False: 7.13M]
  |  Branch (306:30): [True: 0, False: 7.13M]
  ------------------
  307|      0|                return -1;
  308|  7.13M|            if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|      0|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (308:17): [True: 0, False: 7.13M]
  |  Branch (308:29): [True: 0, False: 0]
  ------------------
  309|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|                return -1;
  311|      0|            }
  312|  7.13M|            skcontlen += len;
  313|  7.13M|        }
  314|  7.13M|        sklen = ASN1_object_size(ndef, skcontlen, sktag);
  315|  7.13M|        if (sklen == -1)
  ------------------
  |  Branch (315:13): [True: 0, False: 7.13M]
  ------------------
  316|      0|            return -1;
  317|       |        /* If EXPLICIT need length of surrounding tag */
  318|  7.13M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  7.13M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (318:13): [True: 0, False: 7.13M]
  ------------------
  319|      0|            ret = ASN1_object_size(ndef, sklen, ttag);
  320|  7.13M|        else
  321|  7.13M|            ret = sklen;
  322|       |
  323|  7.13M|        if (!out || ret == -1)
  ------------------
  |  Branch (323:13): [True: 3.56M, False: 3.56M]
  |  Branch (323:21): [True: 0, False: 3.56M]
  ------------------
  324|  3.56M|            return ret;
  325|       |
  326|       |        /* Now encode this lot... */
  327|       |        /* EXPLICIT tag */
  328|  3.56M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  3.56M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (328:13): [True: 0, False: 3.56M]
  ------------------
  329|      0|            ASN1_put_object(out, ndef, sklen, ttag, tclass);
  330|       |        /* SET or SEQUENCE and IMPLICIT tag */
  331|  3.56M|        ASN1_put_object(out, ndef, skcontlen, sktag, skaclass);
  332|       |        /* And the stuff itself */
  333|  3.56M|        asn1_set_seq_out(sk, out, skcontlen, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  3.56M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  334|  3.56M|            isset, iclass);
  335|  3.56M|        if (ndef == 2) {
  ------------------
  |  Branch (335:13): [True: 0, False: 3.56M]
  ------------------
  336|      0|            ASN1_put_eoc(out);
  337|      0|            if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|      0|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (337:17): [True: 0, False: 0]
  ------------------
  338|      0|                ASN1_put_eoc(out);
  339|      0|        }
  340|       |
  341|  3.56M|        return ret;
  342|  7.13M|    }
  343|       |
  344|  36.0M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  36.0M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (344:9): [True: 0, False: 36.0M]
  ------------------
  345|       |        /* EXPLICIT tagging */
  346|       |        /* Find length of tagged item */
  347|      0|        i = ASN1_item_ex_i2d(pval, NULL, ASN1_ITEM_ptr(tt->item), -1, iclass);
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  348|      0|        if (i == 0) {
  ------------------
  |  Branch (348:13): [True: 0, False: 0]
  ------------------
  349|      0|            if ((tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|      0|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (349:17): [True: 0, False: 0]
  ------------------
  350|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|                return -1;
  352|      0|            }
  353|      0|            return 0;
  354|      0|        }
  355|       |        /* Find length of EXPLICIT tag */
  356|      0|        ret = ASN1_object_size(ndef, i, ttag);
  357|      0|        if (out && ret != -1) {
  ------------------
  |  Branch (357:13): [True: 0, False: 0]
  |  Branch (357:20): [True: 0, False: 0]
  ------------------
  358|       |            /* Output tag and item */
  359|      0|            ASN1_put_object(out, ndef, i, ttag, tclass);
  360|      0|            ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item), -1, iclass);
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  361|      0|            if (ndef == 2)
  ------------------
  |  Branch (361:17): [True: 0, False: 0]
  ------------------
  362|      0|                ASN1_put_eoc(out);
  363|      0|        }
  364|      0|        return ret;
  365|      0|    }
  366|       |
  367|       |    /* Either normal or IMPLICIT tagging: combine class and flags */
  368|  36.0M|    len = ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  36.0M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  369|  36.0M|        ttag, tclass | iclass);
  370|  36.0M|    if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|   568k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (370:9): [True: 568k, False: 35.4M]
  |  Branch (370:21): [True: 0, False: 568k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        return -1;
  373|      0|    }
  374|  36.0M|    return len;
  375|  36.0M|}
tasn_enc.c:asn1_set_seq_out:
  402|  3.56M|{
  403|  3.56M|    int i, ret = 0;
  404|  3.56M|    const ASN1_VALUE *skitem;
  405|  3.56M|    unsigned char *tmpdat = NULL, *p = NULL;
  406|  3.56M|    DER_ENC *derlst = NULL, *tder;
  407|       |
  408|  3.56M|    if (do_sort) {
  ------------------
  |  Branch (408:9): [True: 3.56M, False: 0]
  ------------------
  409|       |        /* Don't need to sort less than 2 items */
  410|  3.56M|        if (sk_const_ASN1_VALUE_num(sk) < 2)
  ------------------
  |  Branch (410:13): [True: 3.56M, False: 0]
  ------------------
  411|  3.56M|            do_sort = 0;
  412|      0|        else {
  413|      0|            derlst = OPENSSL_malloc(sk_const_ASN1_VALUE_num(sk)
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  414|      0|                * sizeof(*derlst));
  415|      0|            if (derlst == NULL)
  ------------------
  |  Branch (415:17): [True: 0, False: 0]
  ------------------
  416|      0|                return 0;
  417|      0|            tmpdat = OPENSSL_malloc(skcontlen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  418|      0|            if (tmpdat == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|                goto err;
  420|      0|        }
  421|  3.56M|    }
  422|       |    /* If not sorting just output each item */
  423|  3.56M|    if (!do_sort) {
  ------------------
  |  Branch (423:9): [True: 3.56M, False: 0]
  ------------------
  424|  7.13M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (424:21): [True: 3.56M, False: 3.56M]
  ------------------
  425|  3.56M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  426|  3.56M|            ASN1_item_ex_i2d(&skitem, out, item, -1, iclass);
  427|  3.56M|        }
  428|  3.56M|        return 1;
  429|  3.56M|    }
  430|      0|    p = tmpdat;
  431|       |
  432|       |    /* Doing sort: build up a list of each member's DER encoding */
  433|      0|    for (i = 0, tder = derlst; i < sk_const_ASN1_VALUE_num(sk); i++, tder++) {
  ------------------
  |  Branch (433:32): [True: 0, False: 0]
  ------------------
  434|      0|        skitem = sk_const_ASN1_VALUE_value(sk, i);
  435|      0|        tder->data = p;
  436|      0|        tder->length = ASN1_item_ex_i2d(&skitem, &p, item, -1, iclass);
  437|      0|        tder->field = skitem;
  438|      0|    }
  439|       |
  440|       |    /* Now sort them */
  441|      0|    qsort(derlst, sk_const_ASN1_VALUE_num(sk), sizeof(*derlst), der_cmp);
  442|       |    /* Output sorted DER encoding */
  443|      0|    p = *out;
  444|      0|    for (i = 0, tder = derlst; i < sk_const_ASN1_VALUE_num(sk); i++, tder++) {
  ------------------
  |  Branch (444:32): [True: 0, False: 0]
  ------------------
  445|      0|        memcpy(p, tder->data, tder->length);
  446|      0|        p += tder->length;
  447|      0|    }
  448|      0|    *out = p;
  449|       |    /* If do_sort is 2 then reorder the STACK */
  450|      0|    if (do_sort == 2) {
  ------------------
  |  Branch (450:9): [True: 0, False: 0]
  ------------------
  451|      0|        for (i = 0, tder = derlst; i < sk_const_ASN1_VALUE_num(sk); i++, tder++)
  ------------------
  |  Branch (451:36): [True: 0, False: 0]
  ------------------
  452|      0|            (void)sk_const_ASN1_VALUE_set(sk, i, tder->field);
  453|      0|    }
  454|      0|    ret = 1;
  455|      0|err:
  456|      0|    OPENSSL_free(derlst);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  457|      0|    OPENSSL_free(tmpdat);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  458|      0|    return ret;
  459|      0|}
tasn_enc.c:asn1_i2d_ex_primitive:
  463|  33.3M|{
  464|  33.3M|    int len;
  465|  33.3M|    int utype;
  466|  33.3M|    int usetag;
  467|  33.3M|    int ndef = 0;
  468|       |
  469|  33.3M|    utype = it->utype;
  470|       |
  471|       |    /*
  472|       |     * Get length of content octets and maybe find out the underlying type.
  473|       |     */
  474|       |
  475|  33.3M|    len = asn1_ex_i2c(pval, NULL, &utype, it);
  476|       |
  477|       |    /*
  478|       |     * If SEQUENCE, SET or OTHER then header is included in pseudo content
  479|       |     * octets so don't include tag+length. We need to check here because the
  480|       |     * call to asn1_ex_i2c() could change utype.
  481|       |     */
  482|  33.3M|    if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   76|  33.3M|#define V_ASN1_SEQUENCE 16
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   77|  33.3M|#define V_ASN1_SET 17
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   59|  33.3M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (482:9): [True: 0, False: 33.3M]
  |  Branch (482:39): [True: 0, False: 33.3M]
  |  Branch (482:64): [True: 0, False: 33.3M]
  ------------------
  483|      0|        usetag = 0;
  484|  33.3M|    else
  485|  33.3M|        usetag = 1;
  486|       |
  487|       |    /* -1 means omit type */
  488|       |
  489|  33.3M|    if (len == -1)
  ------------------
  |  Branch (489:9): [True: 568k, False: 32.8M]
  ------------------
  490|   568k|        return 0;
  491|       |
  492|       |    /* -2 return is special meaning use ndef */
  493|  32.8M|    if (len == -2) {
  ------------------
  |  Branch (493:9): [True: 0, False: 32.8M]
  ------------------
  494|      0|        ndef = 2;
  495|      0|        len = 0;
  496|      0|    }
  497|       |
  498|       |    /* If not implicitly tagged get tag from underlying type */
  499|  32.8M|    if (tag == -1)
  ------------------
  |  Branch (499:9): [True: 32.8M, False: 0]
  ------------------
  500|  32.8M|        tag = utype;
  501|       |
  502|       |    /* Output tag+length followed by content octets */
  503|  32.8M|    if (out) {
  ------------------
  |  Branch (503:9): [True: 8.31M, False: 24.5M]
  ------------------
  504|  8.31M|        if (usetag)
  ------------------
  |  Branch (504:13): [True: 8.31M, False: 0]
  ------------------
  505|  8.31M|            ASN1_put_object(out, ndef, len, tag, aclass);
  506|  8.31M|        asn1_ex_i2c(pval, *out, &utype, it);
  507|  8.31M|        if (ndef)
  ------------------
  |  Branch (507:13): [True: 0, False: 8.31M]
  ------------------
  508|      0|            ASN1_put_eoc(out);
  509|  8.31M|        else
  510|  8.31M|            *out += len;
  511|  8.31M|    }
  512|       |
  513|  32.8M|    if (usetag)
  ------------------
  |  Branch (513:9): [True: 32.8M, False: 0]
  ------------------
  514|  32.8M|        return ASN1_object_size(ndef, len, tag);
  515|      0|    return len;
  516|  32.8M|}
tasn_enc.c:asn1_ex_i2c:
  522|  41.7M|{
  523|  41.7M|    ASN1_BOOLEAN *tbool = NULL;
  524|  41.7M|    ASN1_STRING *strtmp;
  525|  41.7M|    ASN1_OBJECT *otmp;
  526|  41.7M|    int utype;
  527|  41.7M|    const unsigned char *cont;
  528|  41.7M|    unsigned char c;
  529|  41.7M|    int len;
  530|  41.7M|    const ASN1_PRIMITIVE_FUNCS *pf;
  531|  41.7M|    pf = it->funcs;
  532|  41.7M|    if (pf && pf->prim_i2c)
  ------------------
  |  Branch (532:9): [True: 0, False: 41.7M]
  |  Branch (532:15): [True: 0, False: 0]
  ------------------
  533|      0|        return pf->prim_i2c(pval, cout, putype, it);
  534|       |
  535|       |    /* Should type be omitted? */
  536|  41.7M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE)
  ------------------
  |  |   82|  41.7M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (536:9): [True: 17.8M, False: 23.8M]
  ------------------
  537|  41.7M|        || (it->utype != V_ASN1_BOOLEAN)) {
  ------------------
  |  |   65|  23.8M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (537:12): [True: 23.8M, False: 0]
  ------------------
  538|  41.7M|        if (*pval == NULL)
  ------------------
  |  Branch (538:13): [True: 568k, False: 41.1M]
  ------------------
  539|   568k|            return -1;
  540|  41.7M|    }
  541|       |
  542|  41.1M|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  41.1M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (542:9): [True: 17.8M, False: 23.3M]
  ------------------
  543|       |        /* If MSTRING type set the underlying type */
  544|  17.8M|        strtmp = (ASN1_STRING *)*pval;
  545|  17.8M|        utype = strtmp->type;
  546|  17.8M|        *putype = utype;
  547|  23.3M|    } else if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  23.3M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (547:16): [True: 1.49M, False: 21.8M]
  ------------------
  548|       |        /* If ANY set type and pointer to value */
  549|  1.49M|        ASN1_TYPE *typ;
  550|  1.49M|        typ = (ASN1_TYPE *)*pval;
  551|  1.49M|        utype = typ->type;
  552|  1.49M|        *putype = utype;
  553|  1.49M|        pval = (const ASN1_VALUE **)&typ->value.asn1_value; /* actually is const */
  554|  1.49M|    } else
  555|  21.8M|        utype = *putype;
  556|       |
  557|  41.1M|    switch (utype) {
  558|  20.0M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  20.0M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (558:5): [True: 20.0M, False: 21.1M]
  ------------------
  559|  20.0M|        otmp = (ASN1_OBJECT *)*pval;
  560|  20.0M|        cont = otmp->data;
  561|  20.0M|        len = otmp->length;
  562|  20.0M|        if (cont == NULL || len == 0)
  ------------------
  |  Branch (562:13): [True: 0, False: 20.0M]
  |  Branch (562:29): [True: 0, False: 20.0M]
  ------------------
  563|      0|            return -1;
  564|  20.0M|        break;
  565|       |
  566|  20.0M|    case V_ASN1_UNDEF:
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
  |  Branch (566:5): [True: 0, False: 41.1M]
  ------------------
  567|      0|        return -2;
  568|       |
  569|  1.49M|    case V_ASN1_NULL:
  ------------------
  |  |   69|  1.49M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (569:5): [True: 1.49M, False: 39.6M]
  ------------------
  570|  1.49M|        cont = NULL;
  571|  1.49M|        len = 0;
  572|  1.49M|        break;
  573|       |
  574|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (574:5): [True: 0, False: 41.1M]
  ------------------
  575|      0|        tbool = (ASN1_BOOLEAN *)pval;
  576|      0|        if (*tbool == -1)
  ------------------
  |  Branch (576:13): [True: 0, False: 0]
  ------------------
  577|      0|            return -1;
  578|      0|        if (it->utype != V_ASN1_ANY) {
  ------------------
  |  |   60|      0|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (578:13): [True: 0, False: 0]
  ------------------
  579|       |            /*
  580|       |             * Default handling if value == size field then omit
  581|       |             */
  582|      0|            if (*tbool && (it->size > 0))
  ------------------
  |  Branch (582:17): [True: 0, False: 0]
  |  Branch (582:27): [True: 0, False: 0]
  ------------------
  583|      0|                return -1;
  584|      0|            if (!*tbool && !it->size)
  ------------------
  |  Branch (584:17): [True: 0, False: 0]
  |  Branch (584:28): [True: 0, False: 0]
  ------------------
  585|      0|                return -1;
  586|      0|        }
  587|      0|        c = (unsigned char)*tbool;
  588|      0|        cont = &c;
  589|      0|        len = 1;
  590|      0|        break;
  591|       |
  592|  1.76M|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|  1.76M|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (592:5): [True: 1.76M, False: 39.3M]
  ------------------
  593|  1.76M|        return ossl_i2c_ASN1_BIT_STRING((const ASN1_BIT_STRING *)*pval,
  594|  1.76M|            cout ? &cout : NULL);
  ------------------
  |  Branch (594:13): [True: 441k, False: 1.32M]
  ------------------
  595|       |
  596|      0|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|      0|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (596:5): [True: 0, False: 41.1M]
  ------------------
  597|      0|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|      0|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (597:5): [True: 0, False: 41.1M]
  ------------------
  598|       |        /*
  599|       |         * These are all have the same content format as ASN1_INTEGER
  600|       |         */
  601|      0|        return ossl_i2c_ASN1_INTEGER((ASN1_INTEGER *)*pval, cout ? &cout : NULL);
  ------------------
  |  Branch (601:61): [True: 0, False: 0]
  ------------------
  602|       |
  603|      0|    case V_ASN1_OCTET_STRING:
  ------------------
  |  |   68|      0|#define V_ASN1_OCTET_STRING 4
  ------------------
  |  Branch (603:5): [True: 0, False: 41.1M]
  ------------------
  604|      0|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|      0|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (604:5): [True: 0, False: 41.1M]
  ------------------
  605|      0|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|      0|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (605:5): [True: 0, False: 41.1M]
  ------------------
  606|      0|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|      0|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (606:5): [True: 0, False: 41.1M]
  ------------------
  607|      0|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|      0|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (607:5): [True: 0, False: 41.1M]
  ------------------
  608|      0|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|      0|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (608:5): [True: 0, False: 41.1M]
  ------------------
  609|      0|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|      0|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (609:5): [True: 0, False: 41.1M]
  ------------------
  610|      0|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|      0|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (610:5): [True: 0, False: 41.1M]
  ------------------
  611|      0|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|      0|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (611:5): [True: 0, False: 41.1M]
  ------------------
  612|      0|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|      0|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (612:5): [True: 0, False: 41.1M]
  ------------------
  613|      0|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|      0|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (613:5): [True: 0, False: 41.1M]
  ------------------
  614|      0|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|      0|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (614:5): [True: 0, False: 41.1M]
  ------------------
  615|      0|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|      0|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (615:5): [True: 0, False: 41.1M]
  ------------------
  616|  17.8M|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|  17.8M|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (616:5): [True: 17.8M, False: 23.3M]
  ------------------
  617|  17.8M|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|  17.8M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (617:5): [True: 0, False: 41.1M]
  ------------------
  618|  17.8M|    case V_ASN1_SET:
  ------------------
  |  |   77|  17.8M|#define V_ASN1_SET 17
  ------------------
  |  Branch (618:5): [True: 0, False: 41.1M]
  ------------------
  619|  17.8M|    default:
  ------------------
  |  Branch (619:5): [True: 0, False: 41.1M]
  ------------------
  620|       |        /* All based on ASN1_STRING and handled the same */
  621|  17.8M|        strtmp = (ASN1_STRING *)*pval;
  622|       |        /* Special handling for NDEF */
  623|  17.8M|        if ((it->size == ASN1_TFLG_NDEF)
  ------------------
  |  |  583|  17.8M|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (623:13): [True: 0, False: 17.8M]
  ------------------
  624|      0|            && (strtmp->flags & ASN1_STRING_FLAG_NDEF)) {
  ------------------
  |  |   29|      0|#define ASN1_STRING_FLAG_NDEF 0x010
  ------------------
  |  Branch (624:16): [True: 0, False: 0]
  ------------------
  625|      0|            if (cout) {
  ------------------
  |  Branch (625:17): [True: 0, False: 0]
  ------------------
  626|      0|                strtmp->data = cout;
  627|      0|                strtmp->length = 0;
  628|      0|            }
  629|       |            /* Special return code */
  630|      0|            return -2;
  631|      0|        }
  632|  17.8M|        cont = strtmp->data;
  633|  17.8M|        len = strtmp->length;
  634|       |
  635|  17.8M|        break;
  636|  41.1M|    }
  637|  39.3M|    if (cout && len)
  ------------------
  |  Branch (637:9): [True: 7.87M, False: 31.5M]
  |  Branch (637:17): [True: 7.57M, False: 298k]
  ------------------
  638|  7.57M|        memcpy(cout, cont, len);
  639|  39.3M|    return len;
  640|  41.1M|}

ASN1_item_free:
   19|  20.9M|{
   20|  20.9M|    ossl_asn1_item_embed_free(&val, it, 0);
   21|  20.9M|}
ossl_asn1_item_embed_free:
   29|  59.1M|{
   30|  59.1M|    const ASN1_TEMPLATE *tt = NULL, *seqtt;
   31|  59.1M|    const ASN1_EXTERN_FUNCS *ef;
   32|  59.1M|    const ASN1_AUX *aux = it->funcs;
   33|  59.1M|    ASN1_aux_cb *asn1_cb;
   34|  59.1M|    int i;
   35|       |
   36|  59.1M|    if (pval == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 59.1M]
  ------------------
   37|      0|        return;
   38|  59.1M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  59.1M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (38:9): [True: 32.9M, False: 26.1M]
  |  Branch (38:48): [True: 8.25M, False: 24.7M]
  ------------------
   39|  8.25M|        return;
   40|  50.9M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (40:9): [True: 3.57M, False: 47.3M]
  |  Branch (40:16): [True: 1.05M, False: 2.52M]
  ------------------
   41|  1.05M|        asn1_cb = aux->asn1_cb;
   42|  49.8M|    else
   43|  49.8M|        asn1_cb = 0;
   44|       |
   45|  50.9M|    switch (it->itype) {
  ------------------
  |  Branch (45:13): [True: 50.9M, False: 0]
  ------------------
   46|       |
   47|  26.1M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  26.1M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (47:5): [True: 26.1M, False: 24.7M]
  ------------------
   48|  26.1M|        if (it->templates)
  ------------------
  |  Branch (48:13): [True: 2.01M, False: 24.1M]
  ------------------
   49|  2.01M|            ossl_asn1_template_free(pval, it->templates);
   50|  24.1M|        else
   51|  24.1M|            ossl_asn1_primitive_free(pval, it, embed);
   52|  26.1M|        break;
   53|       |
   54|  8.14M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  8.14M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (54:5): [True: 8.14M, False: 42.7M]
  ------------------
   55|  8.14M|        ossl_asn1_primitive_free(pval, it, embed);
   56|  8.14M|        break;
   57|       |
   58|   109k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|   109k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (58:5): [True: 109k, False: 50.7M]
  ------------------
   59|   109k|        if (asn1_cb) {
  ------------------
  |  Branch (59:13): [True: 47.3k, False: 61.9k]
  ------------------
   60|  47.3k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|  47.3k|#define ASN1_OP_FREE_PRE 2
  ------------------
   61|  47.3k|            if (i == 2)
  ------------------
  |  Branch (61:17): [True: 0, False: 47.3k]
  ------------------
   62|      0|                return;
   63|  47.3k|        }
   64|   109k|        i = ossl_asn1_get_choice_selector(pval, it);
   65|   109k|        if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (65:13): [True: 109k, False: 0]
  |  Branch (65:25): [True: 109k, False: 0]
  ------------------
   66|   109k|            ASN1_VALUE **pchval;
   67|       |
   68|   109k|            tt = it->templates + i;
   69|   109k|            pchval = ossl_asn1_get_field_ptr(pval, tt);
   70|   109k|            ossl_asn1_template_free(pchval, tt);
   71|   109k|        }
   72|   109k|        if (asn1_cb)
  ------------------
  |  Branch (72:13): [True: 47.3k, False: 61.9k]
  ------------------
   73|  47.3k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|  47.3k|#define ASN1_OP_FREE_POST 3
  ------------------
   74|   109k|        if (embed == 0) {
  ------------------
  |  Branch (74:13): [True: 109k, False: 0]
  ------------------
   75|   109k|            OPENSSL_free(*pval);
  ------------------
  |  |  132|   109k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|   109k|            *pval = NULL;
   77|   109k|        }
   78|   109k|        break;
   79|       |
   80|  2.01M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  2.01M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (80:5): [True: 2.01M, False: 48.8M]
  ------------------
   81|  2.01M|        ef = it->funcs;
   82|  2.01M|        if (ef && ef->asn1_ex_free)
  ------------------
  |  Branch (82:13): [True: 2.01M, False: 0]
  |  Branch (82:19): [True: 2.01M, False: 0]
  ------------------
   83|  2.01M|            ef->asn1_ex_free(pval, it);
   84|  2.01M|        break;
   85|       |
   86|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (86:5): [True: 0, False: 50.9M]
  ------------------
   87|  14.4M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  14.4M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (87:5): [True: 14.4M, False: 36.4M]
  ------------------
   88|  14.4M|        if (ossl_asn1_do_lock(pval, -1, it) != 0) {
  ------------------
  |  Branch (88:13): [True: 503k, False: 13.9M]
  ------------------
   89|       |            /* if error or ref-counter > 0 */
   90|   503k|            OPENSSL_assert(embed == 0);
  ------------------
  |  |  477|   503k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (477:12): [True: 503k, False: 0]
  |  |  ------------------
  ------------------
   91|   503k|            *pval = NULL;
   92|   503k|            return;
   93|   503k|        }
   94|  13.9M|        if (asn1_cb) {
  ------------------
  |  Branch (94:13): [True: 503k, False: 13.4M]
  ------------------
   95|   503k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|   503k|#define ASN1_OP_FREE_PRE 2
  ------------------
   96|   503k|            if (i == 2)
  ------------------
  |  Branch (96:17): [True: 0, False: 503k]
  ------------------
   97|      0|                return;
   98|   503k|        }
   99|  13.9M|        ossl_asn1_enc_free(pval, it);
  100|       |        /*
  101|       |         * If we free up as normal we will invalidate any ANY DEFINED BY
  102|       |         * field and we won't be able to determine the type of the field it
  103|       |         * defines. So free up in reverse order.
  104|       |         */
  105|  13.9M|        tt = it->templates + it->tcount;
  106|  48.2M|        for (i = 0; i < it->tcount; i++) {
  ------------------
  |  Branch (106:21): [True: 34.3M, False: 13.9M]
  ------------------
  107|  34.3M|            ASN1_VALUE **pseqval;
  108|       |
  109|  34.3M|            tt--;
  110|  34.3M|            seqtt = ossl_asn1_do_adb(*pval, tt, 0);
  111|  34.3M|            if (!seqtt)
  ------------------
  |  Branch (111:17): [True: 0, False: 34.3M]
  ------------------
  112|      0|                continue;
  113|  34.3M|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  114|  34.3M|            ossl_asn1_template_free(pseqval, seqtt);
  115|  34.3M|        }
  116|  13.9M|        if (asn1_cb)
  ------------------
  |  Branch (116:13): [True: 503k, False: 13.4M]
  ------------------
  117|   503k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|   503k|#define ASN1_OP_FREE_POST 3
  ------------------
  118|  13.9M|        if (embed == 0) {
  ------------------
  |  Branch (118:13): [True: 11.9M, False: 2.01M]
  ------------------
  119|  11.9M|            OPENSSL_free(*pval);
  ------------------
  |  |  132|  11.9M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|       |            *pval = NULL;
  121|  11.9M|        }
  122|  13.9M|        break;
  123|  50.9M|    }
  124|  50.9M|}
ossl_asn1_template_free:
  127|  39.2M|{
  128|  39.2M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  39.2M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  129|  39.2M|    ASN1_VALUE *tval;
  130|  39.2M|    if (embed) {
  ------------------
  |  Branch (130:9): [True: 4.73M, False: 34.4M]
  ------------------
  131|  4.73M|        tval = (ASN1_VALUE *)pval;
  132|  4.73M|        pval = &tval;
  133|  4.73M|    }
  134|  39.2M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  39.2M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (134:9): [True: 2.85M, False: 36.3M]
  ------------------
  135|  2.85M|        STACK_OF(ASN1_VALUE) *sk = (STACK_OF(ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  2.85M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  136|  2.85M|        int i;
  137|       |
  138|  4.67M|        for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  |  887|  4.67M|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (138:21): [True: 1.82M, False: 2.85M]
  ------------------
  139|  1.82M|            ASN1_VALUE *vtmp = sk_ASN1_VALUE_value(sk, i);
  ------------------
  |  |  888|  1.82M|#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
  ------------------
  140|       |
  141|  1.82M|            ossl_asn1_item_embed_free(&vtmp, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  394|  1.82M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  142|  1.82M|        }
  143|  2.85M|        sk_ASN1_VALUE_free(sk);
  ------------------
  |  |  893|  2.85M|#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
  ------------------
  144|  2.85M|        *pval = NULL;
  145|  36.3M|    } else {
  146|  36.3M|        ossl_asn1_item_embed_free(pval, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  394|  36.3M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  147|  36.3M|    }
  148|  39.2M|}
ossl_asn1_primitive_free:
  151|  34.4M|{
  152|  34.4M|    int utype;
  153|       |
  154|       |    /* Special case: if 'it' is a primitive with a free_func, use that. */
  155|  34.4M|    if (it) {
  ------------------
  |  Branch (155:9): [True: 32.2M, False: 2.19M]
  ------------------
  156|  32.2M|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  157|       |
  158|  32.2M|        if (embed) {
  ------------------
  |  Branch (158:13): [True: 2.72M, False: 29.5M]
  ------------------
  159|  2.72M|            if (pf && pf->prim_clear) {
  ------------------
  |  Branch (159:17): [True: 0, False: 2.72M]
  |  Branch (159:23): [True: 0, False: 0]
  ------------------
  160|      0|                pf->prim_clear(pval, it);
  161|      0|                return;
  162|      0|            }
  163|  29.5M|        } else if (pf && pf->prim_free) {
  ------------------
  |  Branch (163:20): [True: 0, False: 29.5M]
  |  Branch (163:26): [True: 0, False: 0]
  ------------------
  164|      0|            pf->prim_free(pval, it);
  165|      0|            return;
  166|      0|        }
  167|  32.2M|    }
  168|       |
  169|       |    /* Special case: if 'it' is NULL, free contents of ASN1_TYPE */
  170|  34.4M|    if (!it) {
  ------------------
  |  Branch (170:9): [True: 2.19M, False: 32.2M]
  ------------------
  171|  2.19M|        ASN1_TYPE *typ = (ASN1_TYPE *)*pval;
  172|       |
  173|  2.19M|        utype = typ->type;
  174|  2.19M|        pval = &typ->value.asn1_value;
  175|  2.19M|        if (*pval == NULL)
  ------------------
  |  Branch (175:13): [True: 1.70M, False: 486k]
  ------------------
  176|  1.70M|            return;
  177|  32.2M|    } else if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  32.2M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (177:16): [True: 8.14M, False: 24.1M]
  ------------------
  178|  8.14M|        utype = -1;
  179|  8.14M|        if (*pval == NULL)
  ------------------
  |  Branch (179:13): [True: 0, False: 8.14M]
  ------------------
  180|      0|            return;
  181|  24.1M|    } else {
  182|  24.1M|        utype = it->utype;
  183|  24.1M|        if ((utype != V_ASN1_BOOLEAN) && *pval == NULL)
  ------------------
  |  |   65|  24.1M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (183:13): [True: 21.2M, False: 2.87M]
  |  Branch (183:42): [True: 3.82M, False: 17.4M]
  ------------------
  184|  3.82M|            return;
  185|  24.1M|    }
  186|       |
  187|  28.9M|    switch (utype) {
  188|  11.8M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  11.8M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (188:5): [True: 11.8M, False: 17.1M]
  ------------------
  189|  11.8M|        ASN1_OBJECT_free((ASN1_OBJECT *)*pval);
  190|  11.8M|        break;
  191|       |
  192|  2.87M|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|  2.87M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (192:5): [True: 2.87M, False: 26.0M]
  ------------------
  193|  2.87M|        if (it)
  ------------------
  |  Branch (193:13): [True: 2.87M, False: 0]
  ------------------
  194|  2.87M|            *(ASN1_BOOLEAN *)pval = it->size;
  195|      0|        else
  196|      0|            *(ASN1_BOOLEAN *)pval = -1;
  197|  2.87M|        return;
  198|       |
  199|      0|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (199:5): [True: 0, False: 28.9M]
  ------------------
  200|      0|        break;
  201|       |
  202|  2.19M|    case V_ASN1_ANY:
  ------------------
  |  |   60|  2.19M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (202:5): [True: 2.19M, False: 26.7M]
  ------------------
  203|  2.19M|        ossl_asn1_primitive_free(pval, NULL, 0);
  204|  2.19M|        OPENSSL_free(*pval);
  ------------------
  |  |  132|  2.19M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|  2.19M|        break;
  206|       |
  207|  12.0M|    default:
  ------------------
  |  Branch (207:5): [True: 12.0M, False: 16.9M]
  ------------------
  208|  12.0M|        ossl_asn1_string_embed_free((ASN1_STRING *)*pval, embed);
  209|  12.0M|        break;
  210|  28.9M|    }
  211|  26.0M|    *pval = NULL;
  212|  26.0M|}

ASN1_item_new:
   30|  6.76M|{
   31|  6.76M|    ASN1_VALUE *ret = NULL;
   32|  6.76M|    if (ASN1_item_ex_new(&ret, it) > 0)
  ------------------
  |  Branch (32:9): [True: 6.76M, False: 0]
  ------------------
   33|  6.76M|        return ret;
   34|      0|    return NULL;
   35|  6.76M|}
ASN1_item_new_ex:
   39|   503k|{
   40|   503k|    ASN1_VALUE *ret = NULL;
   41|   503k|    if (asn1_item_embed_new(&ret, it, 0, libctx, propq) > 0)
  ------------------
  |  Branch (41:9): [True: 503k, False: 0]
  ------------------
   42|   503k|        return ret;
   43|      0|    return NULL;
   44|   503k|}
ossl_asn1_item_ex_new_intern:
   50|  6.82M|{
   51|  6.82M|    return asn1_item_embed_new(pval, it, 0, libctx, propq);
   52|  6.82M|}
ASN1_item_ex_new:
   55|  6.76M|{
   56|  6.76M|    return asn1_item_embed_new(pval, it, 0, NULL, NULL);
   57|  6.76M|}
tasn_new.c:asn1_item_embed_new:
   61|  39.8M|{
   62|  39.8M|    const ASN1_TEMPLATE *tt = NULL;
   63|  39.8M|    const ASN1_EXTERN_FUNCS *ef;
   64|  39.8M|    const ASN1_AUX *aux = it->funcs;
   65|  39.8M|    ASN1_aux_cb *asn1_cb;
   66|  39.8M|    ASN1_VALUE **pseqval;
   67|  39.8M|    int i;
   68|  39.8M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (68:9): [True: 2.90M, False: 36.9M]
  |  Branch (68:16): [True: 891k, False: 2.01M]
  ------------------
   69|   891k|        asn1_cb = aux->asn1_cb;
   70|  38.9M|    else
   71|  38.9M|        asn1_cb = 0;
   72|       |
   73|  39.8M|    switch (it->itype) {
  ------------------
  |  Branch (73:13): [True: 39.8M, False: 0]
  ------------------
   74|       |
   75|  1.51M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  1.51M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (75:5): [True: 1.51M, False: 38.3M]
  ------------------
   76|  1.51M|        ef = it->funcs;
   77|  1.51M|        if (ef != NULL) {
  ------------------
  |  Branch (77:13): [True: 1.51M, False: 0]
  ------------------
   78|  1.51M|            if (ef->asn1_ex_new_ex != NULL) {
  ------------------
  |  Branch (78:17): [True: 503k, False: 1.00M]
  ------------------
   79|   503k|                if (!ef->asn1_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (79:21): [True: 0, False: 503k]
  ------------------
   80|      0|                    goto asn1err;
   81|  1.00M|            } else if (ef->asn1_ex_new != NULL) {
  ------------------
  |  Branch (81:24): [True: 1.00M, False: 0]
  ------------------
   82|  1.00M|                if (!ef->asn1_ex_new(pval, it))
  ------------------
  |  Branch (82:21): [True: 0, False: 1.00M]
  ------------------
   83|      0|                    goto asn1err;
   84|  1.00M|            }
   85|  1.51M|        }
   86|  1.51M|        break;
   87|       |
   88|  16.2M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  16.2M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (88:5): [True: 16.2M, False: 23.5M]
  ------------------
   89|  16.2M|        if (it->templates) {
  ------------------
  |  Branch (89:13): [True: 0, False: 16.2M]
  ------------------
   90|      0|            if (!asn1_template_new(pval, it->templates, libctx, propq))
  ------------------
  |  Branch (90:17): [True: 0, False: 0]
  ------------------
   91|      0|                goto asn1err;
   92|  16.2M|        } else if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (92:20): [True: 0, False: 16.2M]
  ------------------
   93|      0|            goto asn1err;
   94|  16.2M|        break;
   95|       |
   96|  16.2M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  8.14M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (96:5): [True: 8.14M, False: 31.7M]
  ------------------
   97|  8.14M|        if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (97:13): [True: 0, False: 8.14M]
  ------------------
   98|      0|            goto asn1err;
   99|  8.14M|        break;
  100|       |
  101|  8.14M|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|   109k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (101:5): [True: 109k, False: 39.7M]
  ------------------
  102|   109k|        if (asn1_cb) {
  ------------------
  |  Branch (102:13): [True: 47.3k, False: 61.9k]
  ------------------
  103|  47.3k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|  47.3k|#define ASN1_OP_NEW_PRE 0
  ------------------
  104|  47.3k|            if (!i)
  ------------------
  |  Branch (104:17): [True: 0, False: 47.3k]
  ------------------
  105|      0|                goto auxerr;
  106|  47.3k|            if (i == 2) {
  ------------------
  |  Branch (106:17): [True: 0, False: 47.3k]
  ------------------
  107|      0|                return 1;
  108|      0|            }
  109|  47.3k|        }
  110|   109k|        if (embed) {
  ------------------
  |  Branch (110:13): [True: 0, False: 109k]
  ------------------
  111|      0|            memset(*pval, 0, it->size);
  112|   109k|        } else {
  113|   109k|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  109|   109k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  114|   109k|            if (*pval == NULL)
  ------------------
  |  Branch (114:17): [True: 0, False: 109k]
  ------------------
  115|      0|                return 0;
  116|   109k|        }
  117|   109k|        ossl_asn1_set_choice_selector(pval, -1, it);
  118|   109k|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|  47.3k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (118:13): [True: 47.3k, False: 61.9k]
  |  Branch (118:24): [True: 0, False: 47.3k]
  ------------------
  119|      0|            goto auxerr2;
  120|   109k|        break;
  121|       |
  122|   109k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (122:5): [True: 0, False: 39.8M]
  ------------------
  123|  13.8M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  13.8M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (123:5): [True: 13.8M, False: 26.0M]
  ------------------
  124|  13.8M|        if (asn1_cb) {
  ------------------
  |  Branch (124:13): [True: 844k, False: 12.9M]
  ------------------
  125|   844k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|   844k|#define ASN1_OP_NEW_PRE 0
  ------------------
  126|   844k|            if (!i)
  ------------------
  |  Branch (126:17): [True: 0, False: 844k]
  ------------------
  127|      0|                goto auxerr;
  128|   844k|            if (i == 2) {
  ------------------
  |  Branch (128:17): [True: 341k, False: 503k]
  ------------------
  129|   341k|                return 1;
  130|   341k|            }
  131|   844k|        }
  132|  13.4M|        if (embed) {
  ------------------
  |  Branch (132:13): [True: 2.01M, False: 11.4M]
  ------------------
  133|  2.01M|            memset(*pval, 0, it->size);
  134|  11.4M|        } else {
  135|  11.4M|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  109|  11.4M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  136|  11.4M|            if (*pval == NULL)
  ------------------
  |  Branch (136:17): [True: 0, False: 11.4M]
  ------------------
  137|      0|                return 0;
  138|  11.4M|        }
  139|       |        /* 0 : init. lock */
  140|  13.4M|        if (ossl_asn1_do_lock(pval, 0, it) < 0) {
  ------------------
  |  Branch (140:13): [True: 0, False: 13.4M]
  ------------------
  141|      0|            if (!embed) {
  ------------------
  |  Branch (141:17): [True: 0, False: 0]
  ------------------
  142|      0|                OPENSSL_free(*pval);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  143|      0|                *pval = NULL;
  144|      0|            }
  145|      0|            goto asn1err;
  146|      0|        }
  147|  13.4M|        ossl_asn1_enc_init(pval, it);
  148|  46.7M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (148:41): [True: 33.3M, False: 13.4M]
  ------------------
  149|  33.3M|            pseqval = ossl_asn1_get_field_ptr(pval, tt);
  150|  33.3M|            if (!asn1_template_new(pseqval, tt, libctx, propq))
  ------------------
  |  Branch (150:17): [True: 0, False: 33.3M]
  ------------------
  151|      0|                goto asn1err2;
  152|  33.3M|        }
  153|  13.4M|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|   503k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (153:13): [True: 503k, False: 12.9M]
  |  Branch (153:24): [True: 0, False: 503k]
  ------------------
  154|      0|            goto auxerr2;
  155|  13.4M|        break;
  156|  39.8M|    }
  157|  39.5M|    return 1;
  158|       |
  159|      0|asn1err2:
  160|      0|    ossl_asn1_item_embed_free(pval, it, embed);
  161|      0|asn1err:
  162|      0|    ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  163|      0|    return 0;
  164|       |
  165|      0|auxerr2:
  166|      0|    ossl_asn1_item_embed_free(pval, it, embed);
  167|      0|auxerr:
  168|       |    ERR_raise(ERR_LIB_ASN1, ASN1_R_AUX_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  169|      0|    return 0;
  170|      0|}
tasn_new.c:asn1_template_new:
  207|  33.3M|{
  208|  33.3M|    const ASN1_ITEM *it = ASN1_ITEM_ptr(tt->item);
  ------------------
  |  |  394|  33.3M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  209|  33.3M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  33.3M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  210|  33.3M|    ASN1_VALUE *tval;
  211|  33.3M|    int ret;
  212|  33.3M|    if (embed) {
  ------------------
  |  Branch (212:9): [True: 4.73M, False: 28.5M]
  ------------------
  213|  4.73M|        tval = (ASN1_VALUE *)pval;
  214|  4.73M|        pval = &tval;
  215|  4.73M|    }
  216|  33.3M|    if (tt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|  33.3M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (216:9): [True: 7.56M, False: 25.7M]
  ------------------
  217|  7.56M|        asn1_template_clear(pval, tt);
  218|  7.56M|        return 1;
  219|  7.56M|    }
  220|       |    /* If ANY DEFINED BY nothing to do */
  221|       |
  222|  25.7M|    if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|  25.7M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (222:9): [True: 0, False: 25.7M]
  ------------------
  223|      0|        *pval = NULL;
  224|      0|        return 1;
  225|      0|    }
  226|       |    /* If SET OF or SEQUENCE OF, its a STACK */
  227|  25.7M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  25.7M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (227:9): [True: 0, False: 25.7M]
  ------------------
  228|      0|        STACK_OF(ASN1_VALUE) *skval;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  229|      0|        skval = sk_ASN1_VALUE_new_null();
  ------------------
  |  |  890|      0|#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_ASN1_VALUE_freefunc_thunk))
  ------------------
  230|      0|        if (!skval) {
  ------------------
  |  Branch (230:13): [True: 0, False: 0]
  ------------------
  231|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  232|      0|            ret = 0;
  233|      0|            goto done;
  234|      0|        }
  235|      0|        *pval = (ASN1_VALUE *)skval;
  236|      0|        ret = 1;
  237|      0|        goto done;
  238|      0|    }
  239|       |    /* Otherwise pass it back to the item routine */
  240|  25.7M|    ret = asn1_item_embed_new(pval, it, embed, libctx, propq);
  241|  25.7M|done:
  242|  25.7M|    return ret;
  243|  25.7M|}
tasn_new.c:asn1_template_clear:
  246|  7.56M|{
  247|       |    /* If ADB or STACK just NULL the field */
  248|  7.56M|    if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  572|  7.56M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
                  if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  528|  7.56M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (248:9): [True: 649k, False: 6.91M]
  ------------------
  249|   649k|        *pval = NULL;
  250|  6.91M|    else
  251|  6.91M|        asn1_item_clear(pval, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|  6.91M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  252|  7.56M|}
tasn_new.c:asn1_item_clear:
  173|  6.91M|{
  174|  6.91M|    const ASN1_EXTERN_FUNCS *ef;
  175|       |
  176|  6.91M|    switch (it->itype) {
  ------------------
  |  Branch (176:13): [True: 6.91M, False: 0]
  ------------------
  177|       |
  178|      0|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|      0|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (178:5): [True: 0, False: 6.91M]
  ------------------
  179|      0|        ef = it->funcs;
  180|      0|        if (ef && ef->asn1_ex_clear)
  ------------------
  |  Branch (180:13): [True: 0, False: 0]
  |  Branch (180:19): [True: 0, False: 0]
  ------------------
  181|      0|            ef->asn1_ex_clear(pval, it);
  182|      0|        else
  183|      0|            *pval = NULL;
  184|      0|        break;
  185|       |
  186|  6.86M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  6.86M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (186:5): [True: 6.86M, False: 47.3k]
  ------------------
  187|  6.86M|        if (it->templates)
  ------------------
  |  Branch (187:13): [True: 0, False: 6.86M]
  ------------------
  188|      0|            asn1_template_clear(pval, it->templates);
  189|  6.86M|        else
  190|  6.86M|            asn1_primitive_clear(pval, it);
  191|  6.86M|        break;
  192|       |
  193|      0|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|      0|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (193:5): [True: 0, False: 6.91M]
  ------------------
  194|      0|        asn1_primitive_clear(pval, it);
  195|      0|        break;
  196|       |
  197|  47.3k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  47.3k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (197:5): [True: 47.3k, False: 6.86M]
  ------------------
  198|  47.3k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  47.3k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (198:5): [True: 0, False: 6.91M]
  ------------------
  199|  47.3k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|  47.3k|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (199:5): [True: 0, False: 6.91M]
  ------------------
  200|       |        *pval = NULL;
  201|  47.3k|        break;
  202|  6.91M|    }
  203|  6.91M|}
tasn_new.c:asn1_primitive_clear:
  326|  6.86M|{
  327|  6.86M|    int utype;
  328|  6.86M|    if (it && it->funcs) {
  ------------------
  |  Branch (328:9): [True: 6.86M, False: 0]
  |  Branch (328:15): [True: 0, False: 6.86M]
  ------------------
  329|      0|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  330|      0|        if (pf->prim_clear)
  ------------------
  |  Branch (330:13): [True: 0, False: 0]
  ------------------
  331|      0|            pf->prim_clear(pval, it);
  332|      0|        else
  333|      0|            *pval = NULL;
  334|      0|        return;
  335|      0|    }
  336|  6.86M|    if (!it || (it->itype == ASN1_ITYPE_MSTRING))
  ------------------
  |  |   87|  6.86M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (336:9): [True: 0, False: 6.86M]
  |  Branch (336:16): [True: 0, False: 6.86M]
  ------------------
  337|      0|        utype = -1;
  338|  6.86M|    else
  339|  6.86M|        utype = it->utype;
  340|  6.86M|    if (utype == V_ASN1_BOOLEAN)
  ------------------
  |  |   65|  6.86M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (340:9): [True: 2.15M, False: 4.71M]
  ------------------
  341|  2.15M|        *(ASN1_BOOLEAN *)pval = it->size;
  342|  4.71M|    else
  343|  4.71M|        *pval = NULL;
  344|  6.86M|}
tasn_new.c:asn1_primitive_new:
  261|  24.4M|{
  262|  24.4M|    ASN1_TYPE *typ;
  263|  24.4M|    ASN1_STRING *str;
  264|  24.4M|    int utype;
  265|       |
  266|  24.4M|    if (!it)
  ------------------
  |  Branch (266:9): [True: 0, False: 24.4M]
  ------------------
  267|      0|        return 0;
  268|       |
  269|  24.4M|    if (it->funcs) {
  ------------------
  |  Branch (269:9): [True: 0, False: 24.4M]
  ------------------
  270|      0|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  271|      0|        if (embed) {
  ------------------
  |  Branch (271:13): [True: 0, False: 0]
  ------------------
  272|      0|            if (pf->prim_clear) {
  ------------------
  |  Branch (272:17): [True: 0, False: 0]
  ------------------
  273|      0|                pf->prim_clear(pval, it);
  274|      0|                return 1;
  275|      0|            }
  276|      0|        } else if (pf->prim_new) {
  ------------------
  |  Branch (276:20): [True: 0, False: 0]
  ------------------
  277|      0|            return pf->prim_new(pval, it);
  278|      0|        }
  279|      0|    }
  280|       |
  281|  24.4M|    if (it->itype == ASN1_ITYPE_MSTRING)
  ------------------
  |  |   87|  24.4M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (281:9): [True: 8.14M, False: 16.2M]
  ------------------
  282|  8.14M|        utype = -1;
  283|  16.2M|    else
  284|  16.2M|        utype = it->utype;
  285|  24.4M|    switch (utype) {
  286|  11.3M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  11.3M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (286:5): [True: 11.3M, False: 13.0M]
  ------------------
  287|  11.3M|        *pval = (ASN1_VALUE *)OBJ_nid2obj(NID_undef);
  ------------------
  |  |   18|  11.3M|#define NID_undef                       0
  ------------------
  288|  11.3M|        return 1;
  289|       |
  290|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (290:5): [True: 0, False: 24.4M]
  ------------------
  291|      0|        *(ASN1_BOOLEAN *)pval = it->size;
  292|      0|        return 1;
  293|       |
  294|      0|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (294:5): [True: 0, False: 24.4M]
  ------------------
  295|      0|        *pval = (ASN1_VALUE *)1;
  296|      0|        return 1;
  297|       |
  298|  2.19M|    case V_ASN1_ANY:
  ------------------
  |  |   60|  2.19M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (298:5): [True: 2.19M, False: 22.2M]
  ------------------
  299|  2.19M|        if ((typ = OPENSSL_malloc(sizeof(*typ))) == NULL)
  ------------------
  |  |  107|  2.19M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (299:13): [True: 0, False: 2.19M]
  ------------------
  300|      0|            return 0;
  301|  2.19M|        typ->value.ptr = NULL;
  302|  2.19M|        typ->type = -1;
  303|  2.19M|        *pval = (ASN1_VALUE *)typ;
  304|  2.19M|        break;
  305|       |
  306|  10.8M|    default:
  ------------------
  |  Branch (306:5): [True: 10.8M, False: 13.5M]
  ------------------
  307|  10.8M|        if (embed) {
  ------------------
  |  Branch (307:13): [True: 2.72M, False: 8.14M]
  ------------------
  308|  2.72M|            str = *(ASN1_STRING **)pval;
  309|  2.72M|            memset(str, 0, sizeof(*str));
  310|  2.72M|            str->type = utype;
  311|  2.72M|            str->flags = ASN1_STRING_FLAG_EMBED;
  ------------------
  |  |   44|  2.72M|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  312|  8.14M|        } else {
  313|  8.14M|            str = ASN1_STRING_type_new(utype);
  314|  8.14M|            *pval = (ASN1_VALUE *)str;
  315|  8.14M|        }
  316|  10.8M|        if (it->itype == ASN1_ITYPE_MSTRING && str)
  ------------------
  |  |   87|  21.7M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (316:13): [True: 8.14M, False: 2.72M]
  |  Branch (316:48): [True: 8.14M, False: 0]
  ------------------
  317|  8.14M|            str->flags |= ASN1_STRING_FLAG_MSTRING;
  ------------------
  |  |   42|  8.14M|#define ASN1_STRING_FLAG_MSTRING 0x040
  ------------------
  318|  10.8M|        break;
  319|  24.4M|    }
  320|  13.0M|    if (*pval)
  ------------------
  |  Branch (320:9): [True: 13.0M, False: 0]
  ------------------
  321|  13.0M|        return 1;
  322|      0|    return 0;
  323|  13.0M|}

ASN1_OCTET_STRING_free:
   26|  2.45M|    {                                                          \
   27|  2.45M|        ASN1_STRING_free(x);                                   \
   28|  2.45M|    }
ASN1_INTEGER_new:
   22|   510k|    {                                                          \
   23|   510k|        return ASN1_STRING_type_new(V_##sname);                \
  ------------------
  |  |   66|   510k|#define V_ASN1_INTEGER 2
  ------------------
   24|   510k|    }                                                          \
ASN1_BIT_STRING_new:
   22|  1.94M|    {                                                          \
   23|  1.94M|        return ASN1_STRING_type_new(V_##sname);                \
  ------------------
  |  |   67|  1.94M|#define V_ASN1_BIT_STRING 3
  ------------------
   24|  1.94M|    }                                                          \
ASN1_BIT_STRING_free:
   26|  1.44M|    {                                                          \
   27|  1.44M|        ASN1_STRING_free(x);                                   \
   28|  1.44M|    }

ossl_asn1_get_choice_selector:
   30|   109k|{
   31|   109k|    int *sel = offset2ptr(*pval, it->utype);
  ------------------
  |  |   23|   109k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   32|       |
   33|   109k|    return *sel;
   34|   109k|}
ossl_asn1_set_choice_selector:
   50|   218k|{
   51|   218k|    int *sel, ret;
   52|       |
   53|   218k|    sel = offset2ptr(*pval, it->utype);
  ------------------
  |  |   23|   218k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   54|   218k|    ret = *sel;
   55|   218k|    *sel = value;
   56|   218k|    return ret;
   57|   218k|}
ossl_asn1_do_lock:
   69|  27.9M|{
   70|  27.9M|    const ASN1_AUX *aux;
   71|  27.9M|    CRYPTO_RWLOCK **lock;
   72|  27.9M|    CRYPTO_REF_COUNT *refcnt;
   73|  27.9M|    int ret = -1;
   74|       |
   75|  27.9M|    if ((it->itype != ASN1_ITYPE_SEQUENCE)
  ------------------
  |  |   83|  27.9M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (75:9): [True: 0, False: 27.9M]
  ------------------
   76|      0|        && (it->itype != ASN1_ITYPE_NDEF_SEQUENCE))
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (76:12): [True: 0, False: 0]
  ------------------
   77|      0|        return 0;
   78|  27.9M|    aux = it->funcs;
   79|  27.9M|    if (aux == NULL || (aux->flags & ASN1_AFLG_REFCOUNT) == 0)
  ------------------
  |  |  721|  2.51M|#define ASN1_AFLG_REFCOUNT 1
  ------------------
  |  Branch (79:9): [True: 25.4M, False: 2.51M]
  |  Branch (79:24): [True: 1.00M, False: 1.51M]
  ------------------
   80|  26.4M|        return 0;
   81|  1.51M|    lock = offset2ptr(*pval, aux->ref_lock);
  ------------------
  |  |   23|  1.51M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   82|  1.51M|    refcnt = offset2ptr(*pval, aux->ref_offset);
  ------------------
  |  |   23|  1.51M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   83|       |
   84|  1.51M|    switch (op) {
  ------------------
  |  Branch (84:13): [True: 1.51M, False: 0]
  ------------------
   85|   503k|    case 0:
  ------------------
  |  Branch (85:5): [True: 503k, False: 1.00M]
  ------------------
   86|   503k|        if (!CRYPTO_NEW_REF(refcnt, 1))
  ------------------
  |  Branch (86:13): [True: 0, False: 503k]
  ------------------
   87|      0|            return -1;
   88|   503k|        *lock = CRYPTO_THREAD_lock_new();
   89|   503k|        if (*lock == NULL) {
  ------------------
  |  Branch (89:13): [True: 0, False: 503k]
  ------------------
   90|      0|            CRYPTO_FREE_REF(refcnt);
   91|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   92|      0|            return -1;
   93|      0|        }
   94|   503k|        ret = 1;
   95|   503k|        break;
   96|      0|    case 1:
  ------------------
  |  Branch (96:5): [True: 0, False: 1.51M]
  ------------------
   97|      0|        if (!CRYPTO_UP_REF(refcnt, &ret))
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return -1;
   99|      0|        break;
  100|  1.00M|    case -1:
  ------------------
  |  Branch (100:5): [True: 1.00M, False: 503k]
  ------------------
  101|  1.00M|        if (!CRYPTO_DOWN_REF(refcnt, &ret))
  ------------------
  |  Branch (101:13): [True: 0, False: 1.00M]
  ------------------
  102|      0|            return -1; /* failed */
  103|  1.00M|        REF_PRINT_EX(it->sname, ret, (void *)it);
  ------------------
  |  |  299|  1.00M|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  ------------------
  |  |  |  |  295|  1.00M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  1.00M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  104|  1.00M|        REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|  1.00M|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 1.00M]
  |  |  ------------------
  ------------------
  105|  1.00M|        if (ret == 0) {
  ------------------
  |  Branch (105:13): [True: 503k, False: 503k]
  ------------------
  106|   503k|            CRYPTO_THREAD_lock_free(*lock);
  107|   503k|            *lock = NULL;
  108|   503k|            CRYPTO_FREE_REF(refcnt);
  109|   503k|        }
  110|  1.00M|        break;
  111|  1.51M|    }
  112|       |
  113|  1.51M|    return ret;
  114|  1.51M|}
ossl_asn1_enc_init:
  142|  13.4M|{
  143|  13.4M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  144|       |
  145|  13.4M|    if (enc != NULL) {
  ------------------
  |  Branch (145:9): [True: 503k, False: 12.9M]
  ------------------
  146|       |        enc->enc = NULL;
  147|   503k|        enc->len = 0;
  148|   503k|        enc->modified = 1;
  149|   503k|    }
  150|  13.4M|}
ossl_asn1_enc_free:
  153|  13.9M|{
  154|  13.9M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  155|       |
  156|  13.9M|    if (enc != NULL) {
  ------------------
  |  Branch (156:9): [True: 503k, False: 13.4M]
  ------------------
  157|   503k|        OPENSSL_free(enc->enc);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  158|       |        enc->enc = NULL;
  159|   503k|        enc->len = 0;
  160|   503k|        enc->modified = 1;
  161|   503k|    }
  162|  13.9M|}
ossl_asn1_enc_save:
  166|  11.7M|{
  167|  11.7M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  168|       |
  169|  11.7M|    if (enc == NULL)
  ------------------
  |  Branch (169:9): [True: 11.2M, False: 503k]
  ------------------
  170|  11.2M|        return 1;
  171|       |
  172|   503k|    OPENSSL_free(enc->enc);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  173|   503k|    if (inlen <= 0) {
  ------------------
  |  Branch (173:9): [True: 0, False: 503k]
  ------------------
  174|      0|        enc->enc = NULL;
  175|      0|        return 0;
  176|      0|    }
  177|   503k|    if ((enc->enc = OPENSSL_malloc(inlen)) == NULL)
  ------------------
  |  |  107|   503k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (177:9): [True: 0, False: 503k]
  ------------------
  178|      0|        return 0;
  179|   503k|    memcpy(enc->enc, in, inlen);
  180|   503k|    enc->len = inlen;
  181|   503k|    enc->modified = 0;
  182|       |
  183|   503k|    return 1;
  184|   503k|}
ossl_asn1_enc_restore:
  188|  14.2M|{
  189|  14.2M|    const ASN1_ENCODING *enc = asn1_get_const_enc_ptr(pval, it);
  190|       |
  191|  14.2M|    if (enc == NULL || enc->modified)
  ------------------
  |  Branch (191:9): [True: 12.9M, False: 1.32M]
  |  Branch (191:24): [True: 0, False: 1.32M]
  ------------------
  192|  12.9M|        return 0;
  193|  1.32M|    if (out) {
  ------------------
  |  Branch (193:9): [True: 441k, False: 882k]
  ------------------
  194|   441k|        memcpy(*out, enc->enc, enc->len);
  195|   441k|        *out += enc->len;
  196|   441k|    }
  197|  1.32M|    if (len != NULL)
  ------------------
  |  Branch (197:9): [True: 1.32M, False: 0]
  ------------------
  198|  1.32M|        *len = enc->len;
  199|  1.32M|    return 1;
  200|  14.2M|}
ossl_asn1_get_field_ptr:
  204|  98.9M|{
  205|  98.9M|    ASN1_VALUE **pvaltmp = offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  98.9M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  206|       |
  207|       |    /*
  208|       |     * NOTE for BOOLEAN types the field is just a plain int so we can't
  209|       |     * return int **, so settle for (int *).
  210|       |     */
  211|  98.9M|    return pvaltmp;
  212|  98.9M|}
ossl_asn1_get_const_field_ptr:
  217|  36.0M|{
  218|  36.0M|    return offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  36.0M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  219|  36.0M|}
ossl_asn1_do_adb:
  229|   101M|{
  230|   101M|    const ASN1_ADB *adb;
  231|   101M|    const ASN1_ADB_TABLE *atbl;
  232|   101M|    long selector;
  233|   101M|    const ASN1_VALUE **sfld;
  234|   101M|    int i;
  235|       |
  236|   101M|    if ((tt->flags & ASN1_TFLG_ADB_MASK) == 0)
  ------------------
  |  |  572|   101M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (236:9): [True: 101M, False: 0]
  ------------------
  237|   101M|        return tt;
  238|       |
  239|       |    /* Else ANY DEFINED BY ... get the table */
  240|      0|    adb = ASN1_ADB_ptr(tt->item);
  ------------------
  |  |   91|      0|#define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)((iptr)()))
  ------------------
  241|       |
  242|       |    /* Get the selector field */
  243|      0|    sfld = offset2ptr(val, adb->offset);
  ------------------
  |  |   23|      0|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  244|       |
  245|       |    /* Check if NULL */
  246|      0|    if (*sfld == NULL) {
  ------------------
  |  Branch (246:9): [True: 0, False: 0]
  ------------------
  247|      0|        if (adb->null_tt == NULL)
  ------------------
  |  Branch (247:13): [True: 0, False: 0]
  ------------------
  248|      0|            goto err;
  249|      0|        return adb->null_tt;
  250|      0|    }
  251|       |
  252|       |    /*
  253|       |     * Convert type to a long: NB: don't check for NID_undef here because it
  254|       |     * might be a legitimate value in the table
  255|       |     */
  256|      0|    if ((tt->flags & ASN1_TFLG_ADB_OID) != 0)
  ------------------
  |  |  574|      0|#define ASN1_TFLG_ADB_OID (0x1 << 8)
  ------------------
  |  Branch (256:9): [True: 0, False: 0]
  ------------------
  257|      0|        selector = OBJ_obj2nid((ASN1_OBJECT *)*sfld);
  258|      0|    else
  259|      0|        selector = ASN1_INTEGER_get((ASN1_INTEGER *)*sfld);
  260|       |
  261|       |    /* Let application callback translate value */
  262|      0|    if (adb->adb_cb != NULL && adb->adb_cb(&selector) == 0) {
  ------------------
  |  Branch (262:9): [True: 0, False: 0]
  |  Branch (262:32): [True: 0, False: 0]
  ------------------
  263|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  264|      0|        return NULL;
  265|      0|    }
  266|       |
  267|       |    /*
  268|       |     * Try to find matching entry in table Maybe should check application
  269|       |     * types first to allow application override? Might also be useful to
  270|       |     * have a flag which indicates table is sorted and we can do a binary
  271|       |     * search. For now stick to a linear search.
  272|       |     */
  273|       |
  274|      0|    for (atbl = adb->tbl, i = 0; i < adb->tblcount; i++, atbl++)
  ------------------
  |  Branch (274:34): [True: 0, False: 0]
  ------------------
  275|      0|        if (atbl->value == selector)
  ------------------
  |  Branch (275:13): [True: 0, False: 0]
  ------------------
  276|      0|            return &atbl->tt;
  277|       |
  278|       |    /* FIXME: need to search application table too */
  279|       |
  280|       |    /* No match, return default type */
  281|      0|    if (!adb->default_tt)
  ------------------
  |  Branch (281:9): [True: 0, False: 0]
  ------------------
  282|      0|        goto err;
  283|      0|    return adb->default_tt;
  284|       |
  285|      0|err:
  286|       |    /* FIXME: should log the value or OID of unsupported type */
  287|      0|    if (nullerr)
  ------------------
  |  Branch (287:9): [True: 0, False: 0]
  ------------------
  288|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|       |    return NULL;
  290|      0|}
tasn_utl.c:asn1_get_enc_ptr:
  117|  39.1M|{
  118|  39.1M|    const ASN1_AUX *aux;
  119|       |
  120|  39.1M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 39.1M]
  |  Branch (120:25): [True: 0, False: 39.1M]
  ------------------
  121|      0|        return NULL;
  122|  39.1M|    aux = it->funcs;
  123|  39.1M|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|  3.36M|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (123:9): [True: 35.8M, False: 3.36M]
  |  Branch (123:24): [True: 1.85M, False: 1.51M]
  ------------------
  124|  37.6M|        return NULL;
  125|  1.51M|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|  1.51M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  126|  39.1M|}
tasn_utl.c:asn1_get_const_enc_ptr:
  130|  14.2M|{
  131|  14.2M|    const ASN1_AUX *aux;
  132|       |
  133|  14.2M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 14.2M]
  |  Branch (133:25): [True: 0, False: 14.2M]
  ------------------
  134|      0|        return NULL;
  135|  14.2M|    aux = it->funcs;
  136|  14.2M|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|  2.20M|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (136:9): [True: 12.0M, False: 2.20M]
  |  Branch (136:24): [True: 882k, False: 1.32M]
  ------------------
  137|  12.9M|        return NULL;
  138|  1.32M|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|  1.32M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  139|  14.2M|}

X509_ALGOR_get0:
   73|  1.16M|{
   74|  1.16M|    if (paobj)
  ------------------
  |  Branch (74:9): [True: 844k, False: 324k]
  ------------------
   75|   844k|        *paobj = algor->algorithm;
   76|  1.16M|    if (pptype) {
  ------------------
  |  Branch (76:9): [True: 665k, False: 503k]
  ------------------
   77|   665k|        if (algor->parameter == NULL) {
  ------------------
  |  Branch (77:13): [True: 0, False: 665k]
  ------------------
   78|      0|            *pptype = V_ASN1_UNDEF;
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
   79|      0|            return;
   80|      0|        } else
   81|   665k|            *pptype = algor->parameter->type;
   82|   665k|        if (ppval)
  ------------------
  |  Branch (82:13): [True: 665k, False: 0]
  ------------------
   83|   665k|            *ppval = algor->parameter->value.ptr;
   84|   665k|    }
   85|  1.16M|}

BIGNUM_it:
   57|   682k|ASN1_ITEM_start(BIGNUM)
  ------------------
  |  |   97|   682k|    {                                  \
  |  |   98|   682k|        static const ASN1_ITEM local_it = {
  ------------------
   58|   682k|    ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|   682k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
   59|   682k|    V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" ASN1_ITEM_end(BIGNUM)
  ------------------
  |  |   66|   682k|#define V_ASN1_INTEGER 2
  ------------------
                  V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" ASN1_ITEM_end(BIGNUM)
  ------------------
  |  |  104|   682k|    }                         \
  |  |  105|   682k|    ;                         \
  |  |  106|   682k|    return &local_it;         \
  |  |  107|   682k|    }
  ------------------
x_bignum.c:bn_new:
   65|   682k|{
   66|   682k|    *pval = (ASN1_VALUE *)BN_new();
   67|   682k|    if (*pval != NULL)
  ------------------
  |  Branch (67:9): [True: 682k, False: 0]
  ------------------
   68|   682k|        return 1;
   69|      0|    else
   70|      0|        return 0;
   71|   682k|}
x_bignum.c:bn_c2i:
  116|   682k|{
  117|   682k|    int allocated = 0;
  118|   682k|    BIGNUM *bn;
  119|       |
  120|       |    /* Reject encodings that imply a negative number. */
  121|   682k|    if (len == 0 || (*cont & 0x80) != 0) {
  ------------------
  |  Branch (121:9): [True: 0, False: 682k]
  |  Branch (121:21): [True: 0, False: 682k]
  ------------------
  122|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_VALUE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  123|      0|        return 0;
  124|      0|    }
  125|       |
  126|   682k|    if (*pval == NULL && (allocated = bn_new(pval, it)) == 0)
  ------------------
  |  Branch (126:9): [True: 682k, False: 0]
  |  Branch (126:26): [True: 0, False: 682k]
  ------------------
  127|      0|        return 0;
  128|   682k|    bn = (BIGNUM *)*pval;
  129|   682k|    if (!BN_bin2bn(cont, len, bn)) {
  ------------------
  |  Branch (129:9): [True: 0, False: 682k]
  ------------------
  130|      0|        if (allocated != 0)
  ------------------
  |  Branch (130:13): [True: 0, False: 0]
  ------------------
  131|      0|            bn_free(pval, it);
  132|      0|        return 0;
  133|      0|    }
  134|   682k|    return 1;
  135|   682k|}

X509_INFO_new:
   17|   503k|{
   18|   503k|    X509_INFO *ret;
   19|       |
   20|   503k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   21|   503k|    if (ret == NULL)
  ------------------
  |  Branch (21:9): [True: 0, False: 503k]
  ------------------
   22|      0|        return NULL;
   23|       |
   24|   503k|    return ret;
   25|   503k|}
X509_INFO_free:
   28|   507k|{
   29|   507k|    if (x == NULL)
  ------------------
  |  Branch (29:9): [True: 4.16k, False: 503k]
  ------------------
   30|  4.16k|        return;
   31|       |
   32|   503k|    X509_free(x->x509);
   33|   503k|    X509_CRL_free(x->crl);
   34|   503k|    X509_PKEY_free(x->x_pkey);
   35|   503k|    OPENSSL_free(x->enc_data);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|   503k|    OPENSSL_free(x);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   37|   503k|}

X509_PKEY_free:
   36|   503k|{
   37|   503k|    if (x == NULL)
  ------------------
  |  Branch (37:9): [True: 503k, False: 0]
  ------------------
   38|   503k|        return;
   39|       |
   40|      0|    X509_ALGOR_free(x->enc_algor);
   41|      0|    ASN1_OCTET_STRING_free(x->enc_pkey);
   42|      0|    EVP_PKEY_free(x->dec_pkey);
   43|      0|    if (x->key_free)
  ------------------
  |  Branch (43:9): [True: 0, False: 0]
  ------------------
   44|      0|        OPENSSL_free(x->key_data);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|      0|    OPENSSL_free(x);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   46|      0|}

ossl_encode_der_length:
   40|   488k|{
   41|   488k|    if (cont_len > 0xffff)
  ------------------
  |  Branch (41:9): [True: 0, False: 488k]
  ------------------
   42|      0|        return 0; /* Too large for supported length encodings */
   43|       |
   44|   488k|    if (cont_len > 0xff) {
  ------------------
  |  Branch (44:9): [True: 0, False: 488k]
  ------------------
   45|      0|        if (!WPACKET_put_bytes_u8(pkt, 0x82)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (45:13): [True: 0, False: 0]
  ------------------
   46|      0|            || !WPACKET_put_bytes_u16(pkt, cont_len))
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (46:16): [True: 0, False: 0]
  ------------------
   47|      0|            return 0;
   48|   488k|    } else {
   49|   488k|        if (cont_len > 0x7f
  ------------------
  |  Branch (49:13): [True: 4.21k, False: 483k]
  ------------------
   50|  4.21k|            && !WPACKET_put_bytes_u8(pkt, 0x81))
  ------------------
  |  |  909|  4.21k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (50:16): [True: 0, False: 4.21k]
  ------------------
   51|      0|            return 0;
   52|   488k|        if (!WPACKET_put_bytes_u8(pkt, cont_len))
  ------------------
  |  |  909|   488k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (52:13): [True: 0, False: 488k]
  ------------------
   53|      0|            return 0;
   54|   488k|    }
   55|       |
   56|   488k|    return 1;
   57|   488k|}
ossl_encode_der_integer:
   67|   325k|{
   68|   325k|    unsigned char *bnbytes;
   69|   325k|    size_t cont_len;
   70|       |
   71|   325k|    if (BN_is_negative(n))
  ------------------
  |  Branch (71:9): [True: 0, False: 325k]
  ------------------
   72|      0|        return 0;
   73|       |
   74|       |    /*
   75|       |     * Calculate the ASN.1 INTEGER DER content length for n.
   76|       |     * This is the number of whole bytes required to represent n (i.e. rounded
   77|       |     * down), plus one.
   78|       |     * If n is zero then the content is a single zero byte (length = 1).
   79|       |     * If the number of bits of n is a multiple of 8 then an extra zero padding
   80|       |     * byte is included to ensure that the value is still treated as positive
   81|       |     * in the INTEGER two's complement representation.
   82|       |     */
   83|   325k|    cont_len = BN_num_bits(n) / 8 + 1;
   84|       |
   85|   325k|    if (!WPACKET_start_sub_packet(pkt)
  ------------------
  |  Branch (85:9): [True: 0, False: 325k]
  ------------------
   86|   325k|        || !WPACKET_put_bytes_u8(pkt, ID_INTEGER)
  ------------------
  |  |  909|   650k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (86:12): [True: 0, False: 325k]
  ------------------
   87|   325k|        || !ossl_encode_der_length(pkt, cont_len)
  ------------------
  |  Branch (87:12): [True: 0, False: 325k]
  ------------------
   88|   325k|        || !WPACKET_allocate_bytes(pkt, cont_len, &bnbytes)
  ------------------
  |  Branch (88:12): [True: 0, False: 325k]
  ------------------
   89|   325k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (89:12): [True: 0, False: 325k]
  ------------------
   90|      0|        return 0;
   91|       |
   92|   325k|    if (bnbytes != NULL
  ------------------
  |  Branch (92:9): [True: 0, False: 325k]
  ------------------
   93|      0|        && BN_bn2binpad(n, bnbytes, (int)cont_len) != (int)cont_len)
  ------------------
  |  Branch (93:12): [True: 0, False: 0]
  ------------------
   94|      0|        return 0;
   95|       |
   96|   325k|    return 1;
   97|   325k|}
ossl_encode_der_dsa_sig:
  107|   162k|{
  108|   162k|    WPACKET tmppkt, *dummypkt;
  109|   162k|    size_t cont_len;
  110|   162k|    int isnull = WPACKET_is_null_buf(pkt);
  111|       |
  112|   162k|    if (!WPACKET_start_sub_packet(pkt))
  ------------------
  |  Branch (112:9): [True: 0, False: 162k]
  ------------------
  113|      0|        return 0;
  114|       |
  115|   162k|    if (!isnull) {
  ------------------
  |  Branch (115:9): [True: 0, False: 162k]
  ------------------
  116|      0|        if (!WPACKET_init_null(&tmppkt, 0))
  ------------------
  |  Branch (116:13): [True: 0, False: 0]
  ------------------
  117|      0|            return 0;
  118|      0|        dummypkt = &tmppkt;
  119|   162k|    } else {
  120|       |        /* If the input packet has a NULL buffer, we don't need a dummy packet */
  121|   162k|        dummypkt = pkt;
  122|   162k|    }
  123|       |
  124|       |    /* Calculate the content length */
  125|   162k|    if (!ossl_encode_der_integer(dummypkt, r)
  ------------------
  |  Branch (125:9): [True: 0, False: 162k]
  ------------------
  126|   162k|        || !ossl_encode_der_integer(dummypkt, s)
  ------------------
  |  Branch (126:12): [True: 0, False: 162k]
  ------------------
  127|   162k|        || !WPACKET_get_length(dummypkt, &cont_len)
  ------------------
  |  Branch (127:12): [True: 0, False: 162k]
  ------------------
  128|   162k|        || (!isnull && !WPACKET_finish(dummypkt))) {
  ------------------
  |  Branch (128:13): [True: 0, False: 162k]
  |  Branch (128:24): [True: 0, False: 0]
  ------------------
  129|      0|        if (!isnull)
  ------------------
  |  Branch (129:13): [True: 0, False: 0]
  ------------------
  130|      0|            WPACKET_cleanup(dummypkt);
  131|      0|        return 0;
  132|      0|    }
  133|       |
  134|       |    /* Add the tag and length bytes */
  135|   162k|    if (!WPACKET_put_bytes_u8(pkt, ID_SEQUENCE)
  ------------------
  |  |  909|   325k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (135:9): [True: 0, False: 162k]
  ------------------
  136|   162k|        || !ossl_encode_der_length(pkt, cont_len)
  ------------------
  |  Branch (136:12): [True: 0, False: 162k]
  ------------------
  137|       |        /*
  138|       |         * Really encode the integers. We already wrote to the main pkt
  139|       |         * if it had a NULL buffer, so don't do it again
  140|       |         */
  141|   162k|        || (!isnull && !ossl_encode_der_integer(pkt, r))
  ------------------
  |  Branch (141:13): [True: 0, False: 162k]
  |  Branch (141:24): [True: 0, False: 0]
  ------------------
  142|   162k|        || (!isnull && !ossl_encode_der_integer(pkt, s))
  ------------------
  |  Branch (142:13): [True: 0, False: 162k]
  |  Branch (142:24): [True: 0, False: 0]
  ------------------
  143|   162k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (143:12): [True: 0, False: 162k]
  ------------------
  144|      0|        return 0;
  145|       |
  146|   162k|    return 1;
  147|   162k|}

ossl_err_load_ASYNC_strings:
   31|      1|{
   32|      1|#ifndef OPENSSL_NO_ERR
   33|      1|    if (ERR_reason_error_string(ASYNC_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (33:9): [True: 1, False: 0]
  ------------------
   34|      1|        ERR_load_strings_const(ASYNC_str_reasons);
   35|      1|#endif
   36|      1|    return 1;
   37|      1|}

ASYNC_WAIT_CTX_free:
   21|  2.58k|{
   22|  2.58k|    struct fd_lookup_st *curr;
   23|  2.58k|    struct fd_lookup_st *next;
   24|       |
   25|  2.58k|    if (ctx == NULL)
  ------------------
  |  Branch (25:9): [True: 2.58k, False: 0]
  ------------------
   26|  2.58k|        return;
   27|       |
   28|      0|    curr = ctx->fds;
   29|      0|    while (curr != NULL) {
  ------------------
  |  Branch (29:12): [True: 0, False: 0]
  ------------------
   30|      0|        if (!curr->del) {
  ------------------
  |  Branch (30:13): [True: 0, False: 0]
  ------------------
   31|       |            /* Only try and cleanup if it hasn't been marked deleted */
   32|      0|            if (curr->cleanup != NULL)
  ------------------
  |  Branch (32:17): [True: 0, False: 0]
  ------------------
   33|      0|                curr->cleanup(ctx, curr->key, curr->fd, curr->custom_data);
   34|      0|        }
   35|       |        /* Always free the fd_lookup_st */
   36|      0|        next = curr->next;
   37|      0|        OPENSSL_free(curr);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|      0|        curr = next;
   39|      0|    }
   40|       |
   41|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   42|      0|}

BIO_f_buffer:
   41|  2.58k|{
   42|  2.58k|    return &methods_buffer;
   43|  2.58k|}
bf_buff.c:buffer_write:
  159|  4.79k|{
  160|  4.79k|    int i, num = 0;
  161|  4.79k|    BIO_F_BUFFER_CTX *ctx;
  162|       |
  163|  4.79k|    if ((in == NULL) || (inl <= 0))
  ------------------
  |  Branch (163:9): [True: 0, False: 4.79k]
  |  Branch (163:25): [True: 0, False: 4.79k]
  ------------------
  164|      0|        return 0;
  165|  4.79k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  166|  4.79k|    if ((ctx == NULL) || (b->next_bio == NULL))
  ------------------
  |  Branch (166:9): [True: 0, False: 4.79k]
  |  Branch (166:26): [True: 0, False: 4.79k]
  ------------------
  167|      0|        return 0;
  168|       |
  169|  4.79k|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  4.79k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  4.79k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  4.79k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  4.79k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  4.79k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  4.79k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  170|  4.79k|start:
  171|  4.79k|    i = ctx->obuf_size - (ctx->obuf_len + ctx->obuf_off);
  172|       |    /* add to buffer and return */
  173|  4.79k|    if (i >= inl) {
  ------------------
  |  Branch (173:9): [True: 4.79k, False: 0]
  ------------------
  174|  4.79k|        memcpy(&(ctx->obuf[ctx->obuf_off + ctx->obuf_len]), in, inl);
  175|  4.79k|        ctx->obuf_len += inl;
  176|  4.79k|        return (num + inl);
  177|  4.79k|    }
  178|       |    /* else */
  179|       |    /* stuff already in buffer, so add to it first, then flush */
  180|      0|    if (ctx->obuf_len != 0) {
  ------------------
  |  Branch (180:9): [True: 0, False: 0]
  ------------------
  181|      0|        if (i > 0) { /* lets fill it up if we can */
  ------------------
  |  Branch (181:13): [True: 0, False: 0]
  ------------------
  182|      0|            memcpy(&(ctx->obuf[ctx->obuf_off + ctx->obuf_len]), in, i);
  183|      0|            in += i;
  184|      0|            inl -= i;
  185|      0|            num += i;
  186|      0|            ctx->obuf_len += i;
  187|      0|        }
  188|       |        /* we now have a full buffer needing flushing */
  189|      0|        for (;;) {
  190|      0|            i = BIO_write(b->next_bio, &(ctx->obuf[ctx->obuf_off]),
  191|      0|                ctx->obuf_len);
  192|      0|            if (i <= 0) {
  ------------------
  |  Branch (192:17): [True: 0, False: 0]
  ------------------
  193|      0|                BIO_copy_next_retry(b);
  194|       |
  195|      0|                if (i < 0)
  ------------------
  |  Branch (195:21): [True: 0, False: 0]
  ------------------
  196|      0|                    return ((num > 0) ? num : i);
  ------------------
  |  Branch (196:29): [True: 0, False: 0]
  ------------------
  197|      0|                if (i == 0)
  ------------------
  |  Branch (197:21): [True: 0, False: 0]
  ------------------
  198|      0|                    return num;
  199|      0|            }
  200|      0|            ctx->obuf_off += i;
  201|      0|            ctx->obuf_len -= i;
  202|      0|            if (ctx->obuf_len == 0)
  ------------------
  |  Branch (202:17): [True: 0, False: 0]
  ------------------
  203|      0|                break;
  204|      0|        }
  205|      0|    }
  206|       |    /*
  207|       |     * we only get here if the buffer has been flushed and we still have
  208|       |     * stuff to write
  209|       |     */
  210|      0|    ctx->obuf_off = 0;
  211|       |
  212|       |    /* we now have inl bytes to write */
  213|      0|    while (inl >= ctx->obuf_size) {
  ------------------
  |  Branch (213:12): [True: 0, False: 0]
  ------------------
  214|      0|        i = BIO_write(b->next_bio, in, inl);
  215|      0|        if (i <= 0) {
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|            BIO_copy_next_retry(b);
  217|      0|            if (i < 0)
  ------------------
  |  Branch (217:17): [True: 0, False: 0]
  ------------------
  218|      0|                return ((num > 0) ? num : i);
  ------------------
  |  Branch (218:25): [True: 0, False: 0]
  ------------------
  219|      0|            if (i == 0)
  ------------------
  |  Branch (219:17): [True: 0, False: 0]
  ------------------
  220|      0|                return num;
  221|      0|        }
  222|      0|        num += i;
  223|      0|        in += i;
  224|      0|        inl -= i;
  225|      0|        if (inl == 0)
  ------------------
  |  Branch (225:13): [True: 0, False: 0]
  ------------------
  226|      0|            return num;
  227|      0|    }
  228|       |
  229|       |    /*
  230|       |     * copy the rest into the buffer since we have only a small amount left
  231|       |     */
  232|      0|    goto start;
  233|      0|}
bf_buff.c:buffer_ctrl:
  236|  12.5k|{
  237|  12.5k|    BIO *dbio;
  238|  12.5k|    BIO_F_BUFFER_CTX *ctx;
  239|  12.5k|    long ret = 1;
  240|  12.5k|    char *p1, *p2;
  241|  12.5k|    int r, i, *ip;
  242|  12.5k|    int ibs, obs;
  243|       |
  244|  12.5k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  245|       |
  246|  12.5k|    switch (cmd) {
  247|      0|    case BIO_CTRL_RESET:
  ------------------
  |  |   90|      0|#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
  ------------------
  |  Branch (247:5): [True: 0, False: 12.5k]
  ------------------
  248|      0|        ctx->ibuf_off = 0;
  249|      0|        ctx->ibuf_len = 0;
  250|      0|        ctx->obuf_off = 0;
  251|      0|        ctx->obuf_len = 0;
  252|      0|        if (b->next_bio == NULL)
  ------------------
  |  Branch (252:13): [True: 0, False: 0]
  ------------------
  253|      0|            return 0;
  254|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  255|      0|        break;
  256|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (256:5): [True: 0, False: 12.5k]
  ------------------
  257|      0|        if (ctx->ibuf_len > 0)
  ------------------
  |  Branch (257:13): [True: 0, False: 0]
  ------------------
  258|      0|            return 0;
  259|       |        /*
  260|       |         * If there is no next BIO, BIO_read() returns 0, which means EOF,
  261|       |         * BIO_eof() should return 1 in this case.
  262|       |         */
  263|      0|        if (b->next_bio == NULL)
  ------------------
  |  Branch (263:13): [True: 0, False: 0]
  ------------------
  264|      0|            return 1;
  265|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  266|      0|        break;
  267|      0|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (267:5): [True: 0, False: 12.5k]
  ------------------
  268|      0|        ret = (long)ctx->obuf_len;
  269|      0|        break;
  270|      0|    case BIO_C_GET_BUFF_NUM_LINES:
  ------------------
  |  |  459|      0|#define BIO_C_GET_BUFF_NUM_LINES 116
  ------------------
  |  Branch (270:5): [True: 0, False: 12.5k]
  ------------------
  271|      0|        ret = 0;
  272|      0|        p1 = ctx->ibuf;
  273|      0|        for (i = 0; i < ctx->ibuf_len; i++) {
  ------------------
  |  Branch (273:21): [True: 0, False: 0]
  ------------------
  274|      0|            if (p1[ctx->ibuf_off + i] == '\n')
  ------------------
  |  Branch (274:17): [True: 0, False: 0]
  ------------------
  275|      0|                ret++;
  276|      0|        }
  277|      0|        break;
  278|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (278:5): [True: 0, False: 12.5k]
  ------------------
  279|      0|        ret = (long)ctx->obuf_len;
  280|      0|        if (ret == 0) {
  ------------------
  |  Branch (280:13): [True: 0, False: 0]
  ------------------
  281|      0|            if (b->next_bio == NULL)
  ------------------
  |  Branch (281:17): [True: 0, False: 0]
  ------------------
  282|      0|                return 0;
  283|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  284|      0|        }
  285|      0|        break;
  286|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (286:5): [True: 0, False: 12.5k]
  ------------------
  287|      0|        ret = (long)ctx->ibuf_len;
  288|      0|        if (ret == 0) {
  ------------------
  |  Branch (288:13): [True: 0, False: 0]
  ------------------
  289|      0|            if (b->next_bio == NULL)
  ------------------
  |  Branch (289:17): [True: 0, False: 0]
  ------------------
  290|      0|                return 0;
  291|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  292|      0|        }
  293|      0|        break;
  294|      0|    case BIO_C_SET_BUFF_READ_DATA:
  ------------------
  |  |  465|      0|#define BIO_C_SET_BUFF_READ_DATA 122 /* data to read first */
  ------------------
  |  Branch (294:5): [True: 0, False: 12.5k]
  ------------------
  295|      0|        if (num > ctx->ibuf_size) {
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  ------------------
  296|      0|            if (num <= 0)
  ------------------
  |  Branch (296:17): [True: 0, False: 0]
  ------------------
  297|      0|                return 0;
  298|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  299|      0|            if (p1 == NULL)
  ------------------
  |  Branch (299:17): [True: 0, False: 0]
  ------------------
  300|      0|                return 0;
  301|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  302|      0|            ctx->ibuf = p1;
  303|      0|        }
  304|      0|        ctx->ibuf_off = 0;
  305|      0|        ctx->ibuf_len = (int)num;
  306|      0|        memcpy(ctx->ibuf, ptr, (int)num);
  307|      0|        ret = 1;
  308|      0|        break;
  309|  2.58k|    case BIO_C_SET_BUFF_SIZE:
  ------------------
  |  |  460|  2.58k|#define BIO_C_SET_BUFF_SIZE 117
  ------------------
  |  Branch (309:5): [True: 2.58k, False: 9.96k]
  ------------------
  310|  2.58k|        if (ptr != NULL) {
  ------------------
  |  Branch (310:13): [True: 2.58k, False: 0]
  ------------------
  311|  2.58k|            ip = (int *)ptr;
  312|  2.58k|            if (*ip == 0) {
  ------------------
  |  Branch (312:17): [True: 2.58k, False: 0]
  ------------------
  313|  2.58k|                ibs = (int)num;
  314|  2.58k|                obs = ctx->obuf_size;
  315|  2.58k|            } else { /* if (*ip == 1) */
  316|       |
  317|      0|                ibs = ctx->ibuf_size;
  318|      0|                obs = (int)num;
  319|      0|            }
  320|  2.58k|        } else {
  321|      0|            ibs = (int)num;
  322|      0|            obs = (int)num;
  323|      0|        }
  324|  2.58k|        p1 = ctx->ibuf;
  325|  2.58k|        p2 = ctx->obuf;
  326|  2.58k|        if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) {
  ------------------
  |  |   23|  2.58k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (326:13): [True: 0, False: 2.58k]
  |  Branch (326:44): [True: 0, False: 0]
  ------------------
  327|      0|            if (num <= 0)
  ------------------
  |  Branch (327:17): [True: 0, False: 0]
  ------------------
  328|      0|                return 0;
  329|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  330|      0|            if (p1 == NULL)
  ------------------
  |  Branch (330:17): [True: 0, False: 0]
  ------------------
  331|      0|                return 0;
  332|      0|        }
  333|  2.58k|        if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) {
  ------------------
  |  |   23|  2.58k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (333:13): [True: 0, False: 2.58k]
  |  Branch (333:44): [True: 0, False: 0]
  ------------------
  334|      0|            p2 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  335|      0|            if (p2 == NULL) {
  ------------------
  |  Branch (335:17): [True: 0, False: 0]
  ------------------
  336|      0|                if (p1 != ctx->ibuf)
  ------------------
  |  Branch (336:21): [True: 0, False: 0]
  ------------------
  337|      0|                    OPENSSL_free(p1);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  338|      0|                return 0;
  339|      0|            }
  340|      0|        }
  341|  2.58k|        if (ctx->ibuf != p1) {
  ------------------
  |  Branch (341:13): [True: 0, False: 2.58k]
  ------------------
  342|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  343|      0|            ctx->ibuf = p1;
  344|      0|            ctx->ibuf_off = 0;
  345|      0|            ctx->ibuf_len = 0;
  346|      0|            ctx->ibuf_size = ibs;
  347|      0|        }
  348|  2.58k|        if (ctx->obuf != p2) {
  ------------------
  |  Branch (348:13): [True: 0, False: 2.58k]
  ------------------
  349|      0|            OPENSSL_free(ctx->obuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  350|      0|            ctx->obuf = p2;
  351|      0|            ctx->obuf_off = 0;
  352|      0|            ctx->obuf_len = 0;
  353|      0|            ctx->obuf_size = obs;
  354|      0|        }
  355|  2.58k|        break;
  356|      0|    case BIO_C_DO_STATE_MACHINE:
  ------------------
  |  |  444|      0|#define BIO_C_DO_STATE_MACHINE 101
  ------------------
  |  Branch (356:5): [True: 0, False: 12.5k]
  ------------------
  357|      0|        if (b->next_bio == NULL)
  ------------------
  |  Branch (357:13): [True: 0, False: 0]
  ------------------
  358|      0|            return 0;
  359|      0|        BIO_clear_retry_flags(b);
  ------------------
  |  |  272|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  360|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  361|      0|        BIO_copy_next_retry(b);
  362|      0|        break;
  363|       |
  364|  4.79k|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|  4.79k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (364:5): [True: 4.79k, False: 7.75k]
  ------------------
  365|  4.79k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (365:13): [True: 0, False: 4.79k]
  ------------------
  366|      0|            return 0;
  367|  4.79k|        if (ctx->obuf_len <= 0) {
  ------------------
  |  Branch (367:13): [True: 0, False: 4.79k]
  ------------------
  368|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  369|      0|            BIO_copy_next_retry(b);
  370|      0|            break;
  371|      0|        }
  372|       |
  373|  9.59k|        for (;;) {
  374|  9.59k|            BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  9.59k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  9.59k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  9.59k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  9.59k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  9.59k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  9.59k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  375|  9.59k|            if (ctx->obuf_len > 0) {
  ------------------
  |  Branch (375:17): [True: 4.79k, False: 4.79k]
  ------------------
  376|  4.79k|                r = BIO_write(b->next_bio,
  377|  4.79k|                    &(ctx->obuf[ctx->obuf_off]), ctx->obuf_len);
  378|  4.79k|                BIO_copy_next_retry(b);
  379|  4.79k|                if (r <= 0)
  ------------------
  |  Branch (379:21): [True: 0, False: 4.79k]
  ------------------
  380|      0|                    return (long)r;
  381|  4.79k|                ctx->obuf_off += r;
  382|  4.79k|                ctx->obuf_len -= r;
  383|  4.79k|            } else {
  384|  4.79k|                ctx->obuf_len = 0;
  385|  4.79k|                ctx->obuf_off = 0;
  386|  4.79k|                break;
  387|  4.79k|            }
  388|  9.59k|        }
  389|  4.79k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  390|  4.79k|        BIO_copy_next_retry(b);
  391|  4.79k|        break;
  392|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (392:5): [True: 0, False: 12.5k]
  ------------------
  393|      0|        dbio = (BIO *)ptr;
  394|      0|        if (BIO_set_read_buffer_size(dbio, ctx->ibuf_size) <= 0 || BIO_set_write_buffer_size(dbio, ctx->obuf_size) <= 0)
  ------------------
  |  |  635|      0|#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
  |  |  ------------------
  |  |  |  |  460|      0|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
                      if (BIO_set_read_buffer_size(dbio, ctx->ibuf_size) <= 0 || BIO_set_write_buffer_size(dbio, ctx->obuf_size) <= 0)
  ------------------
  |  |  636|      0|#define BIO_set_write_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 1)
  |  |  ------------------
  |  |  |  |  460|      0|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
  |  Branch (394:13): [True: 0, False: 0]
  |  Branch (394:68): [True: 0, False: 0]
  ------------------
  395|      0|            ret = 0;
  396|      0|        break;
  397|      0|    case BIO_CTRL_PEEK:
  ------------------
  |  |  106|      0|#define BIO_CTRL_PEEK 29 /* BIO_f_buffer special */
  ------------------
  |  Branch (397:5): [True: 0, False: 12.5k]
  ------------------
  398|       |        /* Ensure there's stuff in the input buffer */
  399|      0|        {
  400|      0|            char fake_buf[1];
  401|      0|            (void)buffer_read(b, fake_buf, 0);
  402|      0|        }
  403|      0|        if (num > ctx->ibuf_len)
  ------------------
  |  Branch (403:13): [True: 0, False: 0]
  ------------------
  404|      0|            num = ctx->ibuf_len;
  405|      0|        memcpy(ptr, &(ctx->ibuf[ctx->ibuf_off]), num);
  406|      0|        ret = num;
  407|      0|        break;
  408|  5.17k|    default:
  ------------------
  |  Branch (408:5): [True: 5.17k, False: 7.38k]
  ------------------
  409|  5.17k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (409:13): [True: 0, False: 5.17k]
  ------------------
  410|      0|            return 0;
  411|  5.17k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  412|  5.17k|        break;
  413|  12.5k|    }
  414|  12.5k|    return ret;
  415|  12.5k|}
bf_buff.c:buffer_new:
   46|  2.58k|{
   47|  2.58k|    BIO_F_BUFFER_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  2.58k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|       |
   49|  2.58k|    if (ctx == NULL)
  ------------------
  |  Branch (49:9): [True: 0, False: 2.58k]
  ------------------
   50|      0|        return 0;
   51|  2.58k|    ctx->ibuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  2.58k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   52|  2.58k|    ctx->ibuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  107|  2.58k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   53|  2.58k|    if (ctx->ibuf == NULL) {
  ------------------
  |  Branch (53:9): [True: 0, False: 2.58k]
  ------------------
   54|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|      0|        return 0;
   56|      0|    }
   57|  2.58k|    ctx->obuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  2.58k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   58|  2.58k|    ctx->obuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  107|  2.58k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|  2.58k|    if (ctx->obuf == NULL) {
  ------------------
  |  Branch (59:9): [True: 0, False: 2.58k]
  ------------------
   60|      0|        OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      0|        return 0;
   63|      0|    }
   64|       |
   65|  2.58k|    bi->init = 1;
   66|  2.58k|    bi->ptr = (char *)ctx;
   67|  2.58k|    bi->flags = 0;
   68|  2.58k|    return 1;
   69|  2.58k|}
bf_buff.c:buffer_free:
   72|  2.58k|{
   73|  2.58k|    BIO_F_BUFFER_CTX *b;
   74|       |
   75|  2.58k|    if (a == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 2.58k]
  ------------------
   76|      0|        return 0;
   77|  2.58k|    b = (BIO_F_BUFFER_CTX *)a->ptr;
   78|  2.58k|    OPENSSL_free(b->ibuf);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|  2.58k|    OPENSSL_free(b->obuf);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|  2.58k|    OPENSSL_free(a->ptr);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|       |    a->ptr = NULL;
   82|  2.58k|    a->init = 0;
   83|  2.58k|    a->flags = 0;
   84|  2.58k|    return 1;
   85|  2.58k|}

ossl_err_load_BIO_strings:
   93|      1|{
   94|      1|#ifndef OPENSSL_NO_ERR
   95|      1|    if (ERR_reason_error_string(BIO_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (95:9): [True: 1, False: 0]
  ------------------
   96|      1|        ERR_load_strings_const(BIO_str_reasons);
   97|      1|#endif
   98|      1|    return 1;
   99|      1|}

BIO_new_ex:
   82|  3.05M|{
   83|  3.05M|    BIO *bio = OPENSSL_zalloc(sizeof(*bio));
  ------------------
  |  |  109|  3.05M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|       |
   85|  3.05M|    if (bio == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 3.05M]
  ------------------
   86|      0|        return NULL;
   87|       |
   88|  3.05M|    bio->libctx = libctx;
   89|  3.05M|    bio->method = method;
   90|  3.05M|    bio->shutdown = 1;
   91|       |
   92|  3.05M|    if (!CRYPTO_NEW_REF(&bio->references, 1))
  ------------------
  |  Branch (92:9): [True: 0, False: 3.05M]
  ------------------
   93|      0|        goto err;
   94|       |
   95|  3.05M|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data))
  ------------------
  |  |  263|  3.05M|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  |  Branch (95:9): [True: 0, False: 3.05M]
  ------------------
   96|      0|        goto err;
   97|       |
   98|  3.05M|    if (method->create != NULL && !method->create(bio)) {
  ------------------
  |  Branch (98:9): [True: 3.05M, False: 0]
  |  Branch (98:35): [True: 0, False: 3.05M]
  ------------------
   99|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_INIT_FAIL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data);
  ------------------
  |  |  263|      0|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  101|      0|        goto err;
  102|      0|    }
  103|  3.05M|    if (method->create == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 3.05M]
  ------------------
  104|      0|        bio->init = 1;
  105|       |
  106|  3.05M|    return bio;
  107|       |
  108|      0|err:
  109|      0|    CRYPTO_FREE_REF(&bio->references);
  110|      0|    OPENSSL_free(bio);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|       |    return NULL;
  112|  3.05M|}
BIO_new:
  115|  3.05M|{
  116|       |    return BIO_new_ex(NULL, method);
  117|  3.05M|}
BIO_free:
  120|  5.15M|{
  121|  5.15M|    int ret;
  122|       |
  123|  5.15M|    if (a == NULL)
  ------------------
  |  Branch (123:9): [True: 1.06M, False: 4.09M]
  ------------------
  124|  1.06M|        return 0;
  125|       |
  126|  4.09M|    if (CRYPTO_DOWN_REF(&a->references, &ret) <= 0)
  ------------------
  |  Branch (126:9): [True: 0, False: 4.09M]
  ------------------
  127|      0|        return 0;
  128|       |
  129|  4.09M|    REF_PRINT_COUNT("BIO", ret, a);
  ------------------
  |  |  301|  4.09M|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  4.09M|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  4.09M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  4.09M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  130|  4.09M|    if (ret > 0)
  ------------------
  |  Branch (130:9): [True: 1.03M, False: 3.05M]
  ------------------
  131|  1.03M|        return 1;
  132|  3.05M|    REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|  3.05M|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 3.05M]
  |  |  ------------------
  ------------------
  133|       |
  134|  3.05M|    if (HAS_CALLBACK(a)) {
  ------------------
  |  |   26|  3.05M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 3.05M]
  |  |  |  Branch (26:51): [True: 0, False: 3.05M]
  |  |  ------------------
  ------------------
  135|      0|        ret = (int)bio_call_callback(a, BIO_CB_FREE, NULL, 0, 0, 0L, 1L, NULL);
  ------------------
  |  |  300|      0|#define BIO_CB_FREE 0x01
  ------------------
  136|      0|        if (ret <= 0)
  ------------------
  |  Branch (136:13): [True: 0, False: 0]
  ------------------
  137|      0|            return 0;
  138|      0|    }
  139|       |
  140|  3.05M|    if ((a->method != NULL) && (a->method->destroy != NULL))
  ------------------
  |  Branch (140:9): [True: 3.05M, False: 0]
  |  Branch (140:32): [True: 3.05M, False: 0]
  ------------------
  141|  3.05M|        a->method->destroy(a);
  142|       |
  143|  3.05M|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
  ------------------
  |  |  263|  3.05M|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  144|       |
  145|  3.05M|    CRYPTO_FREE_REF(&a->references);
  146|       |
  147|  3.05M|    OPENSSL_free(a);
  ------------------
  |  |  132|  3.05M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|       |
  149|  3.05M|    return 1;
  150|  3.05M|}
BIO_set_data:
  153|  1.01M|{
  154|  1.01M|    a->ptr = ptr;
  155|  1.01M|}
BIO_get_data:
  158|  3.73M|{
  159|  3.73M|    return a->ptr;
  160|  3.73M|}
BIO_set_init:
  163|  2.01M|{
  164|  2.01M|    a->init = init;
  165|  2.01M|}
BIO_set_shutdown:
  173|  2.58k|{
  174|  2.58k|    a->shutdown = shut;
  175|  2.58k|}
BIO_up_ref:
  188|  1.03M|{
  189|  1.03M|    int i;
  190|       |
  191|  1.03M|    if (CRYPTO_UP_REF(&a->references, &i) <= 0)
  ------------------
  |  Branch (191:9): [True: 0, False: 1.03M]
  ------------------
  192|      0|        return 0;
  193|       |
  194|  1.03M|    REF_PRINT_COUNT("BIO", i, a);
  ------------------
  |  |  301|  1.03M|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  1.03M|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  1.03M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  1.03M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|  1.03M|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|  1.03M|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 1.03M]
  |  |  ------------------
  ------------------
  196|  1.03M|    return i > 1;
  197|  1.03M|}
BIO_clear_flags:
  200|  14.7M|{
  201|  14.7M|    b->flags &= ~flags;
  202|  14.7M|}
BIO_test_flags:
  205|  12.6k|{
  206|  12.6k|    return (b->flags & flags);
  207|  12.6k|}
BIO_set_flags:
  210|  10.0k|{
  211|  10.0k|    b->flags |= flags;
  212|  10.0k|}
BIO_read:
  318|  3.21M|{
  319|  3.21M|    size_t readbytes;
  320|  3.21M|    int ret;
  321|       |
  322|  3.21M|    if (dlen < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 3.21M]
  ------------------
  323|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  324|      0|        return -1;
  325|      0|    }
  326|       |
  327|  3.21M|    ret = bio_read_intern(b, data, (size_t)dlen, &readbytes);
  328|       |
  329|  3.21M|    if (ret > 0) {
  ------------------
  |  Branch (329:9): [True: 3.20M, False: 2.56k]
  ------------------
  330|       |        /* *readbytes should always be <= dlen */
  331|  3.20M|        ret = (int)readbytes;
  332|  3.20M|    }
  333|       |
  334|  3.21M|    return ret;
  335|  3.21M|}
BIO_read_ex:
  338|  2.70M|{
  339|  2.70M|    return bio_read_intern(b, data, dlen, readbytes) > 0;
  340|  2.70M|}
BIO_write:
  385|  12.1k|{
  386|  12.1k|    size_t written;
  387|  12.1k|    int ret;
  388|       |
  389|  12.1k|    if (dlen <= 0)
  ------------------
  |  Branch (389:9): [True: 0, False: 12.1k]
  ------------------
  390|      0|        return 0;
  391|       |
  392|  12.1k|    ret = bio_write_intern(b, data, (size_t)dlen, &written);
  393|       |
  394|  12.1k|    if (ret > 0) {
  ------------------
  |  Branch (394:9): [True: 12.1k, False: 0]
  ------------------
  395|       |        /* written should always be <= dlen */
  396|  12.1k|        ret = (int)written;
  397|  12.1k|    }
  398|       |
  399|  12.1k|    return ret;
  400|  12.1k|}
BIO_write_ex:
  403|     53|{
  404|     53|    return bio_write_intern(b, data, dlen, written) > 0
  ------------------
  |  Branch (404:12): [True: 53, False: 0]
  ------------------
  405|      0|        || (b != NULL && dlen == 0); /* order is important for *written */
  ------------------
  |  Branch (405:13): [True: 0, False: 0]
  |  Branch (405:26): [True: 0, False: 0]
  ------------------
  406|     53|}
BIO_puts:
  513|  11.4M|{
  514|  11.4M|    int ret;
  515|  11.4M|    size_t written = 0;
  516|       |
  517|  11.4M|    if (b == NULL) {
  ------------------
  |  Branch (517:9): [True: 0, False: 11.4M]
  ------------------
  518|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  519|      0|        return -1;
  520|      0|    }
  521|  11.4M|    if (b->method == NULL || b->method->bputs == NULL) {
  ------------------
  |  Branch (521:9): [True: 0, False: 11.4M]
  |  Branch (521:30): [True: 0, False: 11.4M]
  ------------------
  522|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  523|      0|        return -2;
  524|      0|    }
  525|       |
  526|  11.4M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  11.4M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 11.4M]
  |  |  |  Branch (26:51): [True: 0, False: 11.4M]
  |  |  ------------------
  ------------------
  527|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS, buf, 0, 0, 0L, 1L, NULL);
  ------------------
  |  |  303|      0|#define BIO_CB_PUTS 0x04
  ------------------
  528|      0|        if (ret <= 0)
  ------------------
  |  Branch (528:13): [True: 0, False: 0]
  ------------------
  529|      0|            return ret;
  530|      0|    }
  531|       |
  532|  11.4M|    if (!b->init) {
  ------------------
  |  Branch (532:9): [True: 0, False: 11.4M]
  ------------------
  533|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  534|      0|        return -1;
  535|      0|    }
  536|       |
  537|  11.4M|    ret = b->method->bputs(b, buf);
  538|       |
  539|  11.4M|    if (ret > 0) {
  ------------------
  |  Branch (539:9): [True: 11.4M, False: 0]
  ------------------
  540|  11.4M|        b->num_write += (uint64_t)ret;
  541|  11.4M|        written = ret;
  542|  11.4M|        ret = 1;
  543|  11.4M|    }
  544|       |
  545|  11.4M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  11.4M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 11.4M]
  |  |  |  Branch (26:51): [True: 0, False: 11.4M]
  |  |  ------------------
  ------------------
  546|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  303|      0|#define BIO_CB_PUTS 0x04
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  547|      0|            0L, ret, &written);
  548|       |
  549|  11.4M|    if (ret > 0) {
  ------------------
  |  Branch (549:9): [True: 11.4M, False: 0]
  ------------------
  550|  11.4M|        if (written > INT_MAX) {
  ------------------
  |  Branch (550:13): [True: 0, False: 11.4M]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_LENGTH_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            ret = -1;
  553|  11.4M|        } else {
  554|  11.4M|            ret = (int)written;
  555|  11.4M|        }
  556|  11.4M|    }
  557|       |
  558|  11.4M|    return ret;
  559|  11.4M|}
BIO_gets:
  562|  12.4M|{
  563|  12.4M|    int ret;
  564|  12.4M|    size_t readbytes = 0;
  565|       |
  566|  12.4M|    if (b == NULL) {
  ------------------
  |  Branch (566:9): [True: 0, False: 12.4M]
  ------------------
  567|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  568|      0|        return -1;
  569|      0|    }
  570|  12.4M|    if (b->method == NULL || b->method->bgets == NULL) {
  ------------------
  |  Branch (570:9): [True: 0, False: 12.4M]
  |  Branch (570:30): [True: 0, False: 12.4M]
  ------------------
  571|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  572|      0|        return -2;
  573|      0|    }
  574|       |
  575|  12.4M|    if (size < 0) {
  ------------------
  |  Branch (575:9): [True: 0, False: 12.4M]
  ------------------
  576|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  577|      0|        return -1;
  578|      0|    }
  579|       |
  580|  12.4M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  12.4M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 12.4M]
  |  |  |  Branch (26:51): [True: 0, False: 12.4M]
  |  |  ------------------
  ------------------
  581|      0|        ret = (int)bio_call_callback(b, BIO_CB_GETS, buf, size, 0, 0L, 1, NULL);
  ------------------
  |  |  304|      0|#define BIO_CB_GETS 0x05
  ------------------
  582|      0|        if (ret <= 0)
  ------------------
  |  Branch (582:13): [True: 0, False: 0]
  ------------------
  583|      0|            return ret;
  584|      0|    }
  585|       |
  586|  12.4M|    if (!b->init) {
  ------------------
  |  Branch (586:9): [True: 0, False: 12.4M]
  ------------------
  587|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  588|      0|        return -1;
  589|      0|    }
  590|       |
  591|  12.4M|    ret = b->method->bgets(b, buf, size);
  592|       |
  593|  12.4M|    if (ret > 0) {
  ------------------
  |  Branch (593:9): [True: 12.4M, False: 7.92k]
  ------------------
  594|  12.4M|        readbytes = ret;
  595|  12.4M|        ret = 1;
  596|  12.4M|    }
  597|       |
  598|  12.4M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  12.4M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 12.4M]
  |  |  |  Branch (26:51): [True: 0, False: 12.4M]
  |  |  ------------------
  ------------------
  599|      0|        ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size,
  ------------------
  |  |  304|      0|#define BIO_CB_GETS 0x05
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  600|      0|            0, 0L, ret, &readbytes);
  601|       |
  602|  12.4M|    if (ret > 0) {
  ------------------
  |  Branch (602:9): [True: 12.4M, False: 7.92k]
  ------------------
  603|       |        /* Shouldn't happen */
  604|  12.4M|        if (readbytes > (size_t)size)
  ------------------
  |  Branch (604:13): [True: 0, False: 12.4M]
  ------------------
  605|      0|            ret = -1;
  606|  12.4M|        else
  607|  12.4M|            ret = (int)readbytes;
  608|  12.4M|    }
  609|       |
  610|  12.4M|    return ret;
  611|  12.4M|}
BIO_int_ctrl:
  657|  2.58k|{
  658|  2.58k|    int i;
  659|       |
  660|  2.58k|    i = iarg;
  661|  2.58k|    return BIO_ctrl(b, cmd, larg, (char *)&i);
  662|  2.58k|}
BIO_ctrl:
  675|  5.06M|{
  676|  5.06M|    long ret;
  677|       |
  678|  5.06M|    if (b == NULL)
  ------------------
  |  Branch (678:9): [True: 0, False: 5.06M]
  ------------------
  679|      0|        return -1;
  680|  5.06M|    if (b->method == NULL || b->method->ctrl == NULL) {
  ------------------
  |  Branch (680:9): [True: 0, False: 5.06M]
  |  Branch (680:30): [True: 0, False: 5.06M]
  ------------------
  681|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  682|      0|        return -2;
  683|      0|    }
  684|       |
  685|  5.06M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  5.06M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 5.06M]
  |  |  |  Branch (26:51): [True: 0, False: 5.06M]
  |  |  ------------------
  ------------------
  686|      0|        ret = bio_call_callback(b, BIO_CB_CTRL, parg, 0, cmd, larg, 1L, NULL);
  ------------------
  |  |  305|      0|#define BIO_CB_CTRL 0x06
  ------------------
  687|      0|        if (ret <= 0)
  ------------------
  |  Branch (687:13): [True: 0, False: 0]
  ------------------
  688|      0|            return ret;
  689|      0|    }
  690|       |
  691|  5.06M|    ret = b->method->ctrl(b, cmd, larg, parg);
  692|       |
  693|  5.06M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  5.06M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 5.06M]
  |  |  |  Branch (26:51): [True: 0, False: 5.06M]
  |  |  ------------------
  ------------------
  694|      0|        ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, cmd,
  ------------------
  |  |  305|      0|#define BIO_CB_CTRL 0x06
  ------------------
                      ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, cmd,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  695|      0|            larg, ret, NULL);
  696|       |
  697|  5.06M|    return ret;
  698|  5.06M|}
BIO_eof:
  701|  2.16k|{
  702|  2.16k|    if ((b->flags & BIO_FLAGS_AUTO_EOF) != 0)
  ------------------
  |  |   49|  2.16k|#define BIO_FLAGS_AUTO_EOF 0x80
  ------------------
  |  Branch (702:9): [True: 0, False: 2.16k]
  ------------------
  703|      0|        return 1;
  704|  2.16k|    return (int)BIO_ctrl(b, BIO_CTRL_EOF, 0, NULL);
  ------------------
  |  |   91|  2.16k|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  705|  2.16k|}
BIO_push:
  768|  2.58k|{
  769|  2.58k|    BIO *lb;
  770|       |
  771|  2.58k|    if (b == NULL)
  ------------------
  |  Branch (771:9): [True: 0, False: 2.58k]
  ------------------
  772|      0|        return bio;
  773|  2.58k|    lb = b;
  774|  2.58k|    while (lb->next_bio != NULL)
  ------------------
  |  Branch (774:12): [True: 0, False: 2.58k]
  ------------------
  775|      0|        lb = lb->next_bio;
  776|  2.58k|    lb->next_bio = bio;
  777|  2.58k|    if (bio != NULL)
  ------------------
  |  Branch (777:9): [True: 2.58k, False: 0]
  ------------------
  778|  2.58k|        bio->prev_bio = lb;
  779|       |    /* called to do internal processing */
  780|  2.58k|    BIO_ctrl(b, BIO_CTRL_PUSH, 0, lb);
  ------------------
  |  |   95|  2.58k|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  781|  2.58k|    return b;
  782|  2.58k|}
BIO_pop:
  786|  2.58k|{
  787|  2.58k|    BIO *ret;
  788|       |
  789|  2.58k|    if (b == NULL)
  ------------------
  |  Branch (789:9): [True: 0, False: 2.58k]
  ------------------
  790|      0|        return NULL;
  791|  2.58k|    ret = b->next_bio;
  792|       |
  793|  2.58k|    BIO_ctrl(b, BIO_CTRL_POP, 0, b);
  ------------------
  |  |   96|  2.58k|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  794|       |
  795|  2.58k|    if (b->prev_bio != NULL)
  ------------------
  |  Branch (795:9): [True: 0, False: 2.58k]
  ------------------
  796|      0|        b->prev_bio->next_bio = b->next_bio;
  797|  2.58k|    if (b->next_bio != NULL)
  ------------------
  |  Branch (797:9): [True: 2.58k, False: 0]
  ------------------
  798|  2.58k|        b->next_bio->prev_bio = b->prev_bio;
  799|       |
  800|  2.58k|    b->next_bio = NULL;
  801|       |    b->prev_bio = NULL;
  802|  2.58k|    return ret;
  803|  2.58k|}
BIO_free_all:
  871|  51.7k|{
  872|  51.7k|    BIO *b;
  873|  51.7k|    int ref;
  874|       |
  875|  54.2k|    while (bio != NULL) {
  ------------------
  |  Branch (875:12): [True: 20.6k, False: 33.6k]
  ------------------
  876|  20.6k|        b = bio;
  877|  20.6k|        CRYPTO_GET_REF(&b->references, &ref);
  878|  20.6k|        bio = bio->next_bio;
  879|  20.6k|        BIO_free(b);
  880|       |        /* Since ref count > 1, don't free anyone else. */
  881|  20.6k|        if (ref > 1)
  ------------------
  |  Branch (881:13): [True: 18.0k, False: 2.58k]
  ------------------
  882|  18.0k|            break;
  883|  20.6k|    }
  884|  51.7k|}
BIO_copy_next_retry:
  933|  9.59k|{
  934|  9.59k|    BIO_set_flags(b, BIO_get_retry_flags(b->next_bio));
  ------------------
  |  |  274|  9.59k|    BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  9.59k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  9.59k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  9.59k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  9.59k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  9.59k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  935|  9.59k|    b->retry_reason = b->next_bio->retry_reason;
  936|  9.59k|}
bio_lib.c:bio_read_intern:
  272|  5.91M|{
  273|  5.91M|    int ret;
  274|       |
  275|  5.91M|    if (b == NULL) {
  ------------------
  |  Branch (275:9): [True: 0, False: 5.91M]
  ------------------
  276|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  277|      0|        return -1;
  278|      0|    }
  279|  5.91M|    if (b->method == NULL || b->method->bread == NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 5.91M]
  |  Branch (279:30): [True: 0, False: 5.91M]
  ------------------
  280|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        return -2;
  282|      0|    }
  283|       |
  284|  5.91M|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|  11.8M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 5.91M]
  |  |  |  Branch (26:51): [True: 0, False: 5.91M]
  |  |  ------------------
  ------------------
                  if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |  301|      0|#define BIO_CB_READ 0x02
  ------------------
  |  Branch (284:28): [True: 0, False: 0]
  ------------------
  285|      0|        return ret;
  286|       |
  287|  5.91M|    if (!b->init) {
  ------------------
  |  Branch (287:9): [True: 0, False: 5.91M]
  ------------------
  288|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|      0|        return -1;
  290|      0|    }
  291|       |
  292|  5.91M|    ret = b->method->bread(b, data, dlen, readbytes);
  293|       |
  294|  5.91M|    if (ret > 0)
  ------------------
  |  Branch (294:9): [True: 5.91M, False: 2.56k]
  ------------------
  295|  5.91M|        b->num_read += (uint64_t)*readbytes;
  296|       |
  297|       |    /*
  298|       |     * If method->bread() returned 0 when dlen>0, it can be either EOF or
  299|       |     * an error, and we should distinguish them
  300|       |     */
  301|  5.91M|    if (ret == 0 && dlen > 0 && BIO_eof(b) == 0)
  ------------------
  |  Branch (301:9): [True: 82, False: 5.91M]
  |  Branch (301:21): [True: 82, False: 0]
  |  Branch (301:33): [True: 0, False: 82]
  ------------------
  302|      0|        ret = -1;
  303|       |
  304|  5.91M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  5.91M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 5.91M]
  |  |  |  Branch (26:51): [True: 0, False: 5.91M]
  |  |  ------------------
  ------------------
  305|      0|        ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  301|      0|#define BIO_CB_READ 0x02
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  306|      0|            dlen, 0, 0L, ret, readbytes);
  307|       |
  308|       |    /* Shouldn't happen */
  309|  5.91M|    if (ret > 0 && *readbytes > dlen) {
  ------------------
  |  Branch (309:9): [True: 5.91M, False: 2.56k]
  |  Branch (309:20): [True: 0, False: 5.91M]
  ------------------
  310|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  311|      0|        return -1;
  312|      0|    }
  313|       |
  314|  5.91M|    return ret;
  315|  5.91M|}
bio_lib.c:bio_write_intern:
  344|  12.2k|{
  345|  12.2k|    size_t local_written;
  346|  12.2k|    int ret;
  347|       |
  348|  12.2k|    if (written != NULL)
  ------------------
  |  Branch (348:9): [True: 12.2k, False: 0]
  ------------------
  349|  12.2k|        *written = 0;
  350|       |    /*
  351|       |     * b == NULL is not an error but just means that zero bytes are written.
  352|       |     * Do not raise an error here.
  353|       |     */
  354|  12.2k|    if (b == NULL)
  ------------------
  |  Branch (354:9): [True: 0, False: 12.2k]
  ------------------
  355|      0|        return 0;
  356|       |
  357|  12.2k|    if (b->method == NULL || b->method->bwrite == NULL) {
  ------------------
  |  Branch (357:9): [True: 0, False: 12.2k]
  |  Branch (357:30): [True: 0, False: 12.2k]
  ------------------
  358|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  359|      0|        return -2;
  360|      0|    }
  361|       |
  362|  12.2k|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|  24.4k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 12.2k]
  |  |  |  Branch (26:51): [True: 0, False: 12.2k]
  |  |  ------------------
  ------------------
                  if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |  302|      0|#define BIO_CB_WRITE 0x03
  ------------------
  |  Branch (362:28): [True: 0, False: 0]
  ------------------
  363|      0|        return ret;
  364|       |
  365|  12.2k|    if (!b->init) {
  ------------------
  |  Branch (365:9): [True: 0, False: 12.2k]
  ------------------
  366|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  367|      0|        return -1;
  368|      0|    }
  369|       |
  370|  12.2k|    ret = b->method->bwrite(b, data, dlen, &local_written);
  371|       |
  372|  12.2k|    if (ret > 0)
  ------------------
  |  Branch (372:9): [True: 12.2k, False: 0]
  ------------------
  373|  12.2k|        b->num_write += (uint64_t)local_written;
  374|       |
  375|  12.2k|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  12.2k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 12.2k]
  |  |  |  Branch (26:51): [True: 0, False: 12.2k]
  |  |  ------------------
  ------------------
  376|      0|        ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, data,
  ------------------
  |  |  302|      0|#define BIO_CB_WRITE 0x03
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, data,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  377|      0|            dlen, 0, 0L, ret, &local_written);
  378|       |
  379|  12.2k|    if (written != NULL)
  ------------------
  |  Branch (379:9): [True: 12.2k, False: 0]
  ------------------
  380|  12.2k|        *written = local_written;
  381|  12.2k|    return ret;
  382|  12.2k|}

BIO_meth_new:
   38|  4.06k|{
   39|  4.06k|    BIO_METHOD *biom = OPENSSL_zalloc(sizeof(BIO_METHOD));
  ------------------
  |  |  109|  4.06k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|       |
   41|  4.06k|    if (biom == NULL
  ------------------
  |  Branch (41:9): [True: 0, False: 4.06k]
  ------------------
   42|  4.06k|        || (biom->name = OPENSSL_strdup(name)) == NULL) {
  ------------------
  |  |  136|  4.06k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (42:12): [True: 0, False: 4.06k]
  ------------------
   43|      0|        OPENSSL_free(biom);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|  4.06k|    biom->type = type;
   47|  4.06k|    return biom;
   48|  4.06k|}
BIO_meth_free:
   51|  4.06k|{
   52|  4.06k|    if (biom != NULL) {
  ------------------
  |  Branch (52:9): [True: 4.06k, False: 0]
  ------------------
   53|  4.06k|        OPENSSL_free(biom->name);
  ------------------
  |  |  132|  4.06k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|  4.06k|        OPENSSL_free(biom);
  ------------------
  |  |  132|  4.06k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|  4.06k|    }
   56|  4.06k|}
bwrite_conv:
   73|  12.2k|{
   74|  12.2k|    int ret;
   75|       |
   76|  12.2k|    if (datal > INT_MAX)
  ------------------
  |  Branch (76:9): [True: 0, False: 12.2k]
  ------------------
   77|      0|        datal = INT_MAX;
   78|       |
   79|  12.2k|    ret = bio->method->bwrite_old(bio, data, (int)datal);
   80|       |
   81|  12.2k|    if (ret <= 0) {
  ------------------
  |  Branch (81:9): [True: 0, False: 12.2k]
  ------------------
   82|      0|        *written = 0;
   83|      0|        return ret;
   84|      0|    }
   85|       |
   86|  12.2k|    *written = (size_t)ret;
   87|       |
   88|  12.2k|    return 1;
   89|  12.2k|}
BIO_meth_set_write:
   93|  2.58k|{
   94|  2.58k|    biom->bwrite_old = bwrite;
   95|  2.58k|    biom->bwrite = bwrite_conv;
   96|  2.58k|    return 1;
   97|  2.58k|}
BIO_meth_set_write_ex:
  101|  1.47k|{
  102|       |    biom->bwrite_old = NULL;
  103|  1.47k|    biom->bwrite = bwrite;
  104|  1.47k|    return 1;
  105|  1.47k|}
bread_conv:
  121|  3.21M|{
  122|  3.21M|    int ret;
  123|       |
  124|  3.21M|    if (datal == 0) {
  ------------------
  |  Branch (124:9): [True: 0, False: 3.21M]
  ------------------
  125|      0|        *readbytes = 0;
  126|      0|        return 1;
  127|      0|    }
  128|       |
  129|  3.21M|    if (datal > INT_MAX)
  ------------------
  |  Branch (129:9): [True: 0, False: 3.21M]
  ------------------
  130|      0|        datal = INT_MAX;
  131|       |
  132|  3.21M|    ret = bio->method->bread_old(bio, data, (int)datal);
  133|       |
  134|  3.21M|    bio->flags &= ~BIO_FLAGS_AUTO_EOF;
  ------------------
  |  |   49|  3.21M|#define BIO_FLAGS_AUTO_EOF 0x80
  ------------------
  135|  3.21M|    if (ret == 0) {
  ------------------
  |  Branch (135:9): [True: 82, False: 3.21M]
  ------------------
  136|     82|        if (BIO_ctrl(bio, BIO_CTRL_EOF, 0, NULL) == 0)
  ------------------
  |  |   91|     82|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (136:13): [True: 0, False: 82]
  ------------------
  137|      0|            bio->flags |= BIO_FLAGS_AUTO_EOF;
  ------------------
  |  |   49|      0|#define BIO_FLAGS_AUTO_EOF 0x80
  ------------------
  138|     82|        *readbytes = 0;
  139|     82|        return 0;
  140|     82|    }
  141|       |
  142|  3.21M|    if (ret < 0) {
  ------------------
  |  Branch (142:9): [True: 2.48k, False: 3.20M]
  ------------------
  143|  2.48k|        *readbytes = 0;
  144|  2.48k|        return ret;
  145|  2.48k|    }
  146|       |
  147|  3.20M|    *readbytes = (size_t)ret;
  148|       |
  149|  3.20M|    return 1;
  150|  3.21M|}
BIO_meth_set_read:
  154|  2.58k|{
  155|  2.58k|    biom->bread_old = bread;
  156|  2.58k|    biom->bread = bread_conv;
  157|  2.58k|    return 1;
  158|  2.58k|}
BIO_meth_set_read_ex:
  162|  1.47k|{
  163|       |    biom->bread_old = NULL;
  164|  1.47k|    biom->bread = bread;
  165|  1.47k|    return 1;
  166|  1.47k|}
BIO_meth_set_puts:
  177|  1.47k|{
  178|  1.47k|    biom->bputs = bputs;
  179|  1.47k|    return 1;
  180|  1.47k|}
BIO_meth_set_gets:
  191|  1.47k|{
  192|  1.47k|    biom->bgets = bgets;
  193|  1.47k|    return 1;
  194|  1.47k|}
BIO_meth_set_ctrl:
  205|  4.06k|{
  206|  4.06k|    biom->ctrl = ctrl;
  207|  4.06k|    return 1;
  208|  4.06k|}
BIO_meth_set_create:
  218|  4.06k|{
  219|  4.06k|    biom->create = create;
  220|  4.06k|    return 1;
  221|  4.06k|}
BIO_meth_set_destroy:
  231|  4.06k|{
  232|  4.06k|    biom->destroy = destroy;
  233|  4.06k|    return 1;
  234|  4.06k|}

BIO_snprintf:
  142|   970k|{
  143|   970k|    va_list args;
  144|   970k|    int ret;
  145|       |
  146|   970k|    va_start(args, format);
  147|       |
  148|       |#if defined(_MSC_VER) && _MSC_VER < 1900
  149|       |    ret = _vsnprintf_s(buf, n, _TRUNCATE, format, args);
  150|       |#else
  151|   970k|    ret = vsnprintf(buf, n, format, args);
  152|   970k|    if ((size_t)ret >= n)
  ------------------
  |  Branch (152:9): [True: 0, False: 970k]
  ------------------
  153|      0|        ret = -1;
  154|   970k|#endif
  155|   970k|    va_end(args);
  156|       |
  157|   970k|    return ret;
  158|   970k|}
BIO_vsnprintf:
  161|   101k|{
  162|   101k|    int ret;
  163|       |
  164|       |#if defined(_MSC_VER) && _MSC_VER < 1900
  165|       |    ret = _vsnprintf_s(buf, n, _TRUNCATE, format, args);
  166|       |#else
  167|   101k|    ret = vsnprintf(buf, n, format, args);
  168|   101k|    if ((size_t)ret >= n)
  ------------------
  |  Branch (168:9): [True: 1.52k, False: 100k]
  ------------------
  169|  1.52k|        ret = -1;
  170|   101k|#endif
  171|   101k|    return ret;
  172|   101k|}

ossl_bio_core_globals_free:
   26|    808|{
   27|    808|    OPENSSL_free(vbcg);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   28|    808|}
ossl_bio_core_globals_new:
   31|    809|{
   32|    809|    return OPENSSL_zalloc(sizeof(BIO_CORE_GLOBALS));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|    809|}

BIO_new_file:
   58|  5.33k|{
   59|  5.33k|    BIO *ret;
   60|  5.33k|    FILE *file;
   61|  5.33k|    int fp_flags = BIO_CLOSE;
  ------------------
  |  |   85|  5.33k|#define BIO_CLOSE 0x01
  ------------------
   62|       |
   63|  5.33k|    if (strchr(mode, 'b') == NULL)
  ------------------
  |  Branch (63:9): [True: 4.52k, False: 809]
  ------------------
   64|  4.52k|        fp_flags |= BIO_FP_TEXT;
  ------------------
  |  |  220|  4.52k|#define BIO_FP_TEXT 0x10
  ------------------
   65|       |
   66|  5.33k|    if (filename == NULL) {
  ------------------
  |  Branch (66:9): [True: 0, False: 5.33k]
  ------------------
   67|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   68|      0|        return NULL;
   69|      0|    }
   70|       |
   71|  5.33k|    file = openssl_fopen(filename, mode);
   72|  5.33k|    if (file == NULL) {
  ------------------
  |  Branch (72:9): [True: 1.14k, False: 4.18k]
  ------------------
   73|  1.14k|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|  1.14k|    (ERR_new(),                                                  \
  |  |  360|  1.14k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  1.14k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  1.14k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|  1.14k|#define ERR_LIB_SYS 2
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|  1.14k|#define get_last_sys_error() errno
  ------------------
   74|  1.14k|            "calling fopen(%s, %s)",
   75|  1.14k|            filename, mode);
   76|  1.14k|        if (errno == ENOENT
  ------------------
  |  Branch (76:13): [True: 1.13k, False: 5]
  ------------------
   77|      5|#ifdef ENXIO
   78|  1.14k|            || errno == ENXIO
  ------------------
  |  Branch (78:16): [True: 0, False: 5]
  ------------------
   79|  1.14k|#endif
   80|  1.14k|        )
   81|  1.14k|            ERR_raise(ERR_LIB_BIO, BIO_R_NO_SUCH_FILE);
  ------------------
  |  |  357|  1.13k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  1.13k|    (ERR_new(),                                                  \
  |  |  |  |  360|  1.13k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  1.13k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  1.13k|        ERR_set_error)
  |  |  ------------------
  ------------------
   82|      5|        else
   83|  1.14k|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  357|      5|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      5|    (ERR_new(),                                                  \
  |  |  |  |  360|      5|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      5|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      5|        ERR_set_error)
  |  |  ------------------
  ------------------
   84|  1.14k|        return NULL;
   85|  1.14k|    }
   86|  4.18k|    if ((ret = BIO_new(BIO_s_file())) == NULL) {
  ------------------
  |  Branch (86:9): [True: 0, False: 4.18k]
  ------------------
   87|      0|        fclose(file);
   88|      0|        return NULL;
   89|      0|    }
   90|       |
   91|       |    /* we did fopen -> we disengage UPLINK */
   92|  4.18k|    BIO_clear_flags(ret, BIO_FLAGS_UPLINK_INTERNAL);
  ------------------
  |  |   18|  4.18k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
   93|  4.18k|    BIO_set_fp(ret, file, fp_flags);
  ------------------
  |  |  578|  4.18k|#define BIO_set_fp(b, fp, c) BIO_ctrl(b, BIO_C_SET_FILE_PTR, c, (char *)(fp))
  |  |  ------------------
  |  |  |  |  449|  4.18k|#define BIO_C_SET_FILE_PTR 106
  |  |  ------------------
  ------------------
   94|  4.18k|    return ret;
   95|  4.18k|}
BIO_s_file:
  111|  7.93k|{
  112|  7.93k|    return &methods_filep;
  113|  7.93k|}
bss_file.c:file_gets:
  378|  12.4M|{
  379|  12.4M|    int ret = 0;
  380|       |
  381|  12.4M|    buf[0] = '\0';
  382|  12.4M|    if (bp->flags & BIO_FLAGS_UPLINK_INTERNAL) {
  ------------------
  |  |   18|  12.4M|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (382:9): [True: 0, False: 12.4M]
  ------------------
  383|      0|        if (!UP_fgets(buf, size, bp->ptr))
  ------------------
  |  |  152|      0|#define UP_fgets fgets
  ------------------
  |  Branch (383:13): [True: 0, False: 0]
  ------------------
  384|      0|            goto err;
  385|  12.4M|    } else {
  386|  12.4M|        if (!fgets(buf, size, (FILE *)bp->ptr))
  ------------------
  |  Branch (386:13): [True: 7.92k, False: 12.4M]
  ------------------
  387|  7.92k|            goto err;
  388|  12.4M|    }
  389|  12.4M|    if (buf[0] != '\0')
  ------------------
  |  Branch (389:9): [True: 12.4M, False: 0]
  ------------------
  390|  12.4M|        ret = (int)strlen(buf);
  391|  12.4M|err:
  392|  12.4M|    return ret;
  393|  12.4M|}
bss_file.c:file_ctrl:
  186|  7.93k|{
  187|  7.93k|    long ret = 1;
  188|  7.93k|    FILE *fp = (FILE *)b->ptr;
  189|  7.93k|    FILE **fpp;
  190|  7.93k|    char p[4];
  191|  7.93k|    int st;
  192|       |
  193|  7.93k|    switch (cmd) {
  194|      0|    case BIO_C_FILE_SEEK:
  ------------------
  |  |  471|      0|#define BIO_C_FILE_SEEK 128
  ------------------
  |  Branch (194:5): [True: 0, False: 7.93k]
  ------------------
  195|      0|    case BIO_CTRL_RESET:
  ------------------
  |  |   90|      0|#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
  ------------------
  |  Branch (195:5): [True: 0, False: 7.93k]
  ------------------
  196|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (196:13): [True: 0, False: 0]
  ------------------
  197|      0|            ret = (long)UP_fseek(b->ptr, num, 0);
  ------------------
  |  |  160|      0|#define UP_fseek fseek
  ------------------
  198|      0|        else
  199|      0|            ret = (long)fseek(fp, num, 0);
  200|      0|        break;
  201|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (201:5): [True: 0, False: 7.93k]
  ------------------
  202|       |        /*
  203|       |         * NOTE feof returns 0 if we're not in an eof condition
  204|       |         * and a non-zero value if we are (i.e. any non-zero value
  205|       |         * so we map the 0:non-0 return value here to 0:1 with a
  206|       |         * double negation
  207|       |         */
  208|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (208:13): [True: 0, False: 0]
  ------------------
  209|      0|            ret = !!(long)UP_feof(fp);
  ------------------
  |  |  156|      0|#define UP_feof feof
  ------------------
  210|      0|        else
  211|      0|            ret = !!(long)feof(fp);
  212|       |#if defined(OPENSSL_SYS_WINDOWS)
  213|       |        /*
  214|       |         * Windows gives us an extra issue to contend with.
  215|       |         * In windows feof may return 0 if it is passed an invalid
  216|       |         * stream.  In this event, feof sets errno to EINVAL.
  217|       |         * Check for that here, and set ret to -EINVAL if its the case.
  218|       |         */
  219|       |        if (ret == 0 && errno == EINVAL)
  220|       |            ret = -EINVAL;
  221|       |#endif
  222|      0|        break;
  223|      0|    case BIO_C_FILE_TELL:
  ------------------
  |  |  477|      0|#define BIO_C_FILE_TELL 133
  ------------------
  |  Branch (223:5): [True: 0, False: 7.93k]
  ------------------
  224|      0|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (224:5): [True: 0, False: 7.93k]
  ------------------
  225|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (225:13): [True: 0, False: 0]
  ------------------
  226|      0|            ret = UP_ftell(b->ptr);
  ------------------
  |  |  161|      0|#define UP_ftell ftell
  ------------------
  227|      0|        else {
  228|       |#if defined(OPENSSL_SYS_WINDOWS)
  229|       |            /*
  230|       |             * On Windows, for non-seekable files (stdin), ftell() is undefined.
  231|       |             */
  232|       |            if (GetFileType((HANDLE)_get_osfhandle(_fileno(fp))) != FILE_TYPE_DISK)
  233|       |                ret = -1;
  234|       |            else
  235|       |                ret = ftell(fp);
  236|       |#else
  237|      0|            ret = ftell(fp);
  238|      0|#endif
  239|      0|        }
  240|      0|        break;
  241|  4.18k|    case BIO_C_SET_FILE_PTR:
  ------------------
  |  |  449|  4.18k|#define BIO_C_SET_FILE_PTR 106
  ------------------
  |  Branch (241:5): [True: 4.18k, False: 3.74k]
  ------------------
  242|  4.18k|        file_free(b);
  243|  4.18k|        b->shutdown = (int)num & BIO_CLOSE;
  ------------------
  |  |   85|  4.18k|#define BIO_CLOSE 0x01
  ------------------
  244|  4.18k|        b->ptr = ptr;
  245|  4.18k|        b->init = 1;
  246|       |#if BIO_FLAGS_UPLINK_INTERNAL != 0
  247|       |#if defined(__MINGW32__) && defined(__MSVCRT__) && !defined(_IOB_ENTRIES)
  248|       |#define _IOB_ENTRIES 20
  249|       |#endif
  250|       |        /* Safety net to catch purely internal BIO_set_fp calls */
  251|       |#if (defined(_MSC_VER) && _MSC_VER >= 1900) || defined(__BORLANDC__)
  252|       |        if (ptr == stdin || ptr == stdout || ptr == stderr)
  253|       |            BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  254|       |#elif defined(_IOB_ENTRIES)
  255|       |        if ((size_t)ptr >= (size_t)stdin && (size_t)ptr < (size_t)(stdin + _IOB_ENTRIES))
  256|       |            BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  257|       |#endif
  258|       |#endif
  259|       |#ifdef UP_fsetmod
  260|       |        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  261|       |            UP_fsetmod(b->ptr, (char)((num & BIO_FP_TEXT) ? 't' : 'b'));
  262|       |        else
  263|       |#endif
  264|  4.18k|        {
  265|       |#if defined(OPENSSL_SYS_WINDOWS)
  266|       |            int fd = _fileno((FILE *)ptr);
  267|       |            if (num & BIO_FP_TEXT)
  268|       |                _setmode(fd, _O_TEXT);
  269|       |            else
  270|       |                _setmode(fd, _O_BINARY);
  271|       |#elif defined(OPENSSL_SYS_MSDOS)
  272|       |            int fd = fileno((FILE *)ptr);
  273|       |            /* Set correct text/binary mode */
  274|       |            if (num & BIO_FP_TEXT)
  275|       |                _setmode(fd, _O_TEXT);
  276|       |            /* Dangerous to set stdin/stdout to raw (unless redirected) */
  277|       |            else {
  278|       |                if (fd == STDIN_FILENO || fd == STDOUT_FILENO) {
  279|       |                    if (isatty(fd) <= 0)
  280|       |                        _setmode(fd, _O_BINARY);
  281|       |                } else
  282|       |                    _setmode(fd, _O_BINARY);
  283|       |            }
  284|       |#elif defined(OPENSSL_SYS_WIN32_CYGWIN)
  285|       |            int fd = fileno((FILE *)ptr);
  286|       |            if (!(num & BIO_FP_TEXT))
  287|       |                setmode(fd, O_BINARY);
  288|       |#endif
  289|  4.18k|        }
  290|  4.18k|        break;
  291|  3.74k|    case BIO_C_SET_FILENAME:
  ------------------
  |  |  451|  3.74k|#define BIO_C_SET_FILENAME 108
  ------------------
  |  Branch (291:5): [True: 3.74k, False: 4.18k]
  ------------------
  292|  3.74k|        file_free(b);
  293|  3.74k|        b->shutdown = (int)num & BIO_CLOSE;
  ------------------
  |  |   85|  3.74k|#define BIO_CLOSE 0x01
  ------------------
  294|  3.74k|        if (num & BIO_FP_APPEND) {
  ------------------
  |  |  219|  3.74k|#define BIO_FP_APPEND 0x08
  ------------------
  |  Branch (294:13): [True: 0, False: 3.74k]
  ------------------
  295|      0|            if (num & BIO_FP_READ)
  ------------------
  |  |  217|      0|#define BIO_FP_READ 0x02
  ------------------
  |  Branch (295:17): [True: 0, False: 0]
  ------------------
  296|      0|                OPENSSL_strlcpy(p, "a+", sizeof(p));
  297|      0|            else
  298|      0|                OPENSSL_strlcpy(p, "a", sizeof(p));
  299|  3.74k|        } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
  ------------------
  |  |  217|  3.74k|#define BIO_FP_READ 0x02
  ------------------
                      } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
  ------------------
  |  |  218|  3.74k|#define BIO_FP_WRITE 0x04
  ------------------
  |  Branch (299:20): [True: 3.74k, False: 0]
  |  Branch (299:43): [True: 0, False: 3.74k]
  ------------------
  300|      0|            OPENSSL_strlcpy(p, "r+", sizeof(p));
  301|  3.74k|        else if (num & BIO_FP_WRITE)
  ------------------
  |  |  218|  3.74k|#define BIO_FP_WRITE 0x04
  ------------------
  |  Branch (301:18): [True: 0, False: 3.74k]
  ------------------
  302|      0|            OPENSSL_strlcpy(p, "w", sizeof(p));
  303|  3.74k|        else if (num & BIO_FP_READ)
  ------------------
  |  |  217|  3.74k|#define BIO_FP_READ 0x02
  ------------------
  |  Branch (303:18): [True: 3.74k, False: 0]
  ------------------
  304|  3.74k|            OPENSSL_strlcpy(p, "r", sizeof(p));
  305|      0|        else {
  306|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_BAD_FOPEN_MODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  307|      0|            ret = 0;
  308|      0|            break;
  309|      0|        }
  310|       |#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
  311|       |        if (!(num & BIO_FP_TEXT))
  312|       |            OPENSSL_strlcat(p, "b", sizeof(p));
  313|       |        else
  314|       |            OPENSSL_strlcat(p, "t", sizeof(p));
  315|       |#elif defined(OPENSSL_SYS_WIN32_CYGWIN)
  316|       |        if (!(num & BIO_FP_TEXT))
  317|       |            OPENSSL_strlcat(p, "b", sizeof(p));
  318|       |#endif
  319|  3.74k|        if (ptr == NULL) {
  ------------------
  |  Branch (319:13): [True: 0, False: 3.74k]
  ------------------
  320|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  321|      0|            ret = 0;
  322|      0|            break;
  323|      0|        }
  324|  3.74k|        fp = openssl_fopen(ptr, p);
  325|  3.74k|        if (fp == NULL) {
  ------------------
  |  Branch (325:13): [True: 15, False: 3.73k]
  ------------------
  326|     15|            ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|     15|    (ERR_new(),                                                  \
  |  |  360|     15|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     15|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     15|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|     15|#define ERR_LIB_SYS 2
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|     15|#define get_last_sys_error() errno
  ------------------
  327|     15|                "calling fopen(%s, %s)",
  328|     15|                (const char *)ptr, p);
  329|     15|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  357|     15|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     15|    (ERR_new(),                                                  \
  |  |  |  |  360|     15|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     15|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     15|        ERR_set_error)
  |  |  ------------------
  ------------------
  330|     15|            ret = 0;
  331|     15|            break;
  332|     15|        }
  333|  3.73k|        b->ptr = fp;
  334|  3.73k|        b->init = 1;
  335|       |        /* we did fopen -> we disengage UPLINK */
  336|  3.73k|        BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  ------------------
  |  |   18|  3.73k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  337|  3.73k|        break;
  338|      0|    case BIO_C_GET_FILE_PTR:
  ------------------
  |  |  450|      0|#define BIO_C_GET_FILE_PTR 107
  ------------------
  |  Branch (338:5): [True: 0, False: 7.93k]
  ------------------
  339|       |        /* the ptr parameter is actually a FILE ** in this case. */
  340|      0|        if (ptr != NULL) {
  ------------------
  |  Branch (340:13): [True: 0, False: 0]
  ------------------
  341|      0|            fpp = (FILE **)ptr;
  342|      0|            *fpp = (FILE *)b->ptr;
  343|      0|        }
  344|      0|        break;
  345|      0|    case BIO_CTRL_GET_CLOSE:
  ------------------
  |  |   97|      0|#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
  ------------------
  |  Branch (345:5): [True: 0, False: 7.93k]
  ------------------
  346|      0|        ret = (long)b->shutdown;
  347|      0|        break;
  348|      0|    case BIO_CTRL_SET_CLOSE:
  ------------------
  |  |   98|      0|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  ------------------
  |  Branch (348:5): [True: 0, False: 7.93k]
  ------------------
  349|      0|        b->shutdown = (int)num;
  350|      0|        break;
  351|      0|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|      0|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (351:5): [True: 0, False: 7.93k]
  ------------------
  352|      0|        st = b->flags & BIO_FLAGS_UPLINK_INTERNAL
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (352:14): [True: 0, False: 0]
  ------------------
  353|      0|            ? UP_fflush(b->ptr)
  ------------------
  |  |  162|      0|#define UP_fflush fflush
  ------------------
  354|      0|            : fflush((FILE *)b->ptr);
  355|      0|        if (st == EOF) {
  ------------------
  |  Branch (355:13): [True: 0, False: 0]
  ------------------
  356|      0|            ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
  357|      0|                "calling fflush()");
  358|      0|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  359|      0|            ret = 0;
  360|      0|        }
  361|      0|        break;
  362|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (362:5): [True: 0, False: 7.93k]
  ------------------
  363|      0|        ret = 1;
  364|      0|        break;
  365|       |
  366|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (366:5): [True: 0, False: 7.93k]
  ------------------
  367|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (367:5): [True: 0, False: 7.93k]
  ------------------
  368|      0|    case BIO_CTRL_PUSH:
  ------------------
  |  |   95|      0|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  |  Branch (368:5): [True: 0, False: 7.93k]
  ------------------
  369|      0|    case BIO_CTRL_POP:
  ------------------
  |  |   96|      0|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  |  Branch (369:5): [True: 0, False: 7.93k]
  ------------------
  370|      0|    default:
  ------------------
  |  Branch (370:5): [True: 0, False: 7.93k]
  ------------------
  371|      0|        ret = 0;
  372|      0|        break;
  373|  7.93k|    }
  374|  7.93k|    return ret;
  375|  7.93k|}
bss_file.c:file_new:
  116|  7.93k|{
  117|  7.93k|    bi->init = 0;
  118|  7.93k|    bi->num = 0;
  119|  7.93k|    bi->ptr = NULL;
  120|  7.93k|    bi->flags = BIO_FLAGS_UPLINK_INTERNAL; /* default to UPLINK */
  ------------------
  |  |   18|  7.93k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  121|  7.93k|    return 1;
  122|  7.93k|}
bss_file.c:file_free:
  125|  15.8k|{
  126|  15.8k|    if (a == NULL)
  ------------------
  |  Branch (126:9): [True: 0, False: 15.8k]
  ------------------
  127|      0|        return 0;
  128|  15.8k|    if (a->shutdown) {
  ------------------
  |  Branch (128:9): [True: 15.8k, False: 0]
  ------------------
  129|  15.8k|        if ((a->init) && (a->ptr != NULL)) {
  ------------------
  |  Branch (129:13): [True: 7.92k, False: 7.95k]
  |  Branch (129:26): [True: 7.92k, False: 0]
  ------------------
  130|  7.92k|            if (a->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|  7.92k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (130:17): [True: 0, False: 7.92k]
  ------------------
  131|      0|                UP_fclose(a->ptr);
  ------------------
  |  |  157|      0|#define UP_fclose fclose
  ------------------
  132|  7.92k|            else
  133|  7.92k|                fclose(a->ptr);
  134|  7.92k|            a->ptr = NULL;
  135|  7.92k|            a->flags = BIO_FLAGS_UPLINK_INTERNAL;
  ------------------
  |  |   18|  7.92k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  136|  7.92k|        }
  137|  15.8k|        a->init = 0;
  138|  15.8k|    }
  139|  15.8k|    return 1;
  140|  15.8k|}

BIO_s_mem:
   73|  1.52M|{
   74|  1.52M|    return &mem_method;
   75|  1.52M|}
BIO_new_mem_buf:
   83|  1.00M|{
   84|  1.00M|    BIO *ret;
   85|  1.00M|    BUF_MEM *b;
   86|  1.00M|    BIO_BUF_MEM *bb;
   87|  1.00M|    size_t sz;
   88|       |
   89|  1.00M|    if (buf == NULL) {
  ------------------
  |  Branch (89:9): [True: 0, False: 1.00M]
  ------------------
   90|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   91|      0|        return NULL;
   92|      0|    }
   93|  1.00M|    sz = (len < 0) ? strlen(buf) : (size_t)len;
  ------------------
  |  Branch (93:10): [True: 0, False: 1.00M]
  ------------------
   94|  1.00M|    if ((ret = BIO_new(BIO_s_mem())) == NULL)
  ------------------
  |  Branch (94:9): [True: 0, False: 1.00M]
  ------------------
   95|      0|        return NULL;
   96|  1.00M|    bb = (BIO_BUF_MEM *)ret->ptr;
   97|  1.00M|    b = bb->buf;
   98|       |    /* Cast away const and trust in the MEM_RDONLY flag. */
   99|  1.00M|    b->data = (void *)buf;
  100|  1.00M|    b->length = sz;
  101|  1.00M|    b->max = sz;
  102|  1.00M|    *bb->readp = *bb->buf;
  103|  1.00M|    ret->flags |= BIO_FLAGS_MEM_RDONLY;
  ------------------
  |  |  250|  1.00M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  104|       |    /* Since this is static data retrying won't help */
  105|  1.00M|    ret->num = 0;
  106|  1.00M|    return ret;
  107|  1.00M|}
bss_mem.c:mem_write:
  216|  11.4M|{
  217|  11.4M|    int ret = -1;
  218|  11.4M|    size_t blen;
  219|  11.4M|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  220|       |
  221|  11.4M|    if (b->flags & BIO_FLAGS_MEM_RDONLY) {
  ------------------
  |  |  250|  11.4M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (221:9): [True: 0, False: 11.4M]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_WRITE_TO_READ_ONLY_BIO);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        goto end;
  224|      0|    }
  225|  11.4M|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  11.4M|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  11.4M|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  11.4M|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  11.4M|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  11.4M|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  11.4M|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  226|  11.4M|    if (inl <= 0)
  ------------------
  |  Branch (226:9): [True: 0, False: 11.4M]
  ------------------
  227|      0|        return 0;
  228|  11.4M|    if (in == NULL) {
  ------------------
  |  Branch (228:9): [True: 0, False: 11.4M]
  ------------------
  229|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  230|      0|        goto end;
  231|      0|    }
  232|  11.4M|    blen = bbm->readp->length;
  233|  11.4M|    mem_buf_sync(b);
  234|  11.4M|    if (BUF_MEM_grow_clean(bbm->buf, blen + inl) == 0)
  ------------------
  |  Branch (234:9): [True: 0, False: 11.4M]
  ------------------
  235|      0|        goto end;
  236|  11.4M|    memcpy(bbm->buf->data + blen, in, inl);
  237|  11.4M|    *bbm->readp = *bbm->buf;
  238|  11.4M|    ret = inl;
  239|  11.4M|end:
  240|  11.4M|    return ret;
  241|  11.4M|}
bss_mem.c:mem_buf_sync:
  179|  11.9M|{
  180|  11.9M|    if (b != NULL && b->init != 0 && b->ptr != NULL) {
  ------------------
  |  Branch (180:9): [True: 11.9M, False: 0]
  |  Branch (180:22): [True: 11.9M, False: 0]
  |  Branch (180:38): [True: 11.9M, False: 0]
  ------------------
  181|  11.9M|        BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  182|       |
  183|  11.9M|        if (bbm->readp->data != bbm->buf->data) {
  ------------------
  |  Branch (183:13): [True: 0, False: 11.9M]
  ------------------
  184|      0|            memmove(bbm->buf->data, bbm->readp->data, bbm->readp->length);
  185|      0|            bbm->buf->length = bbm->readp->length;
  186|      0|            bbm->readp->data = bbm->buf->data;
  187|      0|        }
  188|  11.9M|    }
  189|  11.9M|    return 0;
  190|  11.9M|}
bss_mem.c:mem_read:
  193|  3.20M|{
  194|  3.20M|    int ret = -1;
  195|  3.20M|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  196|  3.20M|    BUF_MEM *bm = bbm->readp;
  197|       |
  198|  3.20M|    if (b->flags & BIO_FLAGS_MEM_RDONLY)
  ------------------
  |  |  250|  3.20M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (198:9): [True: 2.70M, False: 503k]
  ------------------
  199|  2.70M|        bm = bbm->buf;
  200|  3.20M|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  3.20M|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  3.20M|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  3.20M|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  3.20M|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  3.20M|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  3.20M|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  201|  3.20M|    ret = (outl >= 0 && (size_t)outl > bm->length) ? (int)bm->length : outl;
  ------------------
  |  Branch (201:12): [True: 3.20M, False: 0]
  |  Branch (201:25): [True: 0, False: 3.20M]
  ------------------
  202|  3.20M|    if ((out != NULL) && (ret > 0)) {
  ------------------
  |  Branch (202:9): [True: 3.20M, False: 0]
  |  Branch (202:26): [True: 3.20M, False: 0]
  ------------------
  203|  3.20M|        memcpy(out, bm->data, ret);
  204|  3.20M|        bm->length -= ret;
  205|  3.20M|        bm->max -= ret;
  206|  3.20M|        bm->data += ret;
  207|  3.20M|    } else if (bm->length == 0) {
  ------------------
  |  Branch (207:16): [True: 0, False: 0]
  ------------------
  208|      0|        ret = b->num;
  209|      0|        if (ret != 0)
  ------------------
  |  Branch (209:13): [True: 0, False: 0]
  ------------------
  210|      0|            BIO_set_retry_read(b);
  ------------------
  |  |  266|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  211|      0|    }
  212|  3.20M|    return ret;
  213|  3.20M|}
bss_mem.c:mem_puts:
  387|  11.4M|{
  388|  11.4M|    int ret;
  389|  11.4M|    size_t n = strlen(str);
  390|       |
  391|  11.4M|    if (n > INT_MAX)
  ------------------
  |  Branch (391:9): [True: 0, False: 11.4M]
  ------------------
  392|      0|        return -1;
  393|  11.4M|    ret = mem_write(bp, str, (int)n);
  394|       |    /* memory semantics is that it will always work */
  395|  11.4M|    return ret;
  396|  11.4M|}
bss_mem.c:mem_ctrl:
  244|  5.03M|{
  245|  5.03M|    long ret = 1;
  246|  5.03M|    char **pptr;
  247|  5.03M|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  248|  5.03M|    BUF_MEM *bm, *bo; /* bio_mem, bio_other */
  249|  5.03M|    ossl_ssize_t off, remain;
  250|       |
  251|  5.03M|    if (b->flags & BIO_FLAGS_MEM_RDONLY) {
  ------------------
  |  |  250|  5.03M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (251:9): [True: 4.02M, False: 1.00M]
  ------------------
  252|  4.02M|        bm = bbm->buf;
  253|  4.02M|        bo = bbm->readp;
  254|  4.02M|    } else {
  255|  1.00M|        bm = bbm->readp;
  256|  1.00M|        bo = bbm->buf;
  257|  1.00M|    }
  258|  5.03M|    off = (bm->data == bo->data) ? 0 : bm->data - bo->data;
  ------------------
  |  Branch (258:11): [True: 4.53M, False: 503k]
  ------------------
  259|  5.03M|    remain = bm->length;
  260|       |
  261|  5.03M|    switch (cmd) {
  262|      0|    case BIO_CTRL_RESET:
  ------------------
  |  |   90|      0|#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
  ------------------
  |  Branch (262:5): [True: 0, False: 5.03M]
  ------------------
  263|      0|        bm = bbm->buf;
  264|      0|        if (bm->data != NULL) {
  ------------------
  |  Branch (264:13): [True: 0, False: 0]
  ------------------
  265|      0|            if (!(b->flags & BIO_FLAGS_MEM_RDONLY)) {
  ------------------
  |  |  250|      0|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (265:17): [True: 0, False: 0]
  ------------------
  266|      0|                if (!(b->flags & BIO_FLAGS_NONCLEAR_RST)) {
  ------------------
  |  |  251|      0|#define BIO_FLAGS_NONCLEAR_RST 0x400
  ------------------
  |  Branch (266:21): [True: 0, False: 0]
  ------------------
  267|      0|                    memset(bm->data, 0, bm->max);
  268|      0|                    bm->length = 0;
  269|      0|                }
  270|      0|                *bbm->readp = *bbm->buf;
  271|      0|            } else {
  272|       |                /* For read only case just reset to the start again */
  273|      0|                *bbm->buf = *bbm->readp;
  274|      0|            }
  275|      0|        }
  276|      0|        break;
  277|  1.00M|    case BIO_C_FILE_SEEK:
  ------------------
  |  |  471|  1.00M|#define BIO_C_FILE_SEEK 128
  ------------------
  |  Branch (277:5): [True: 1.00M, False: 4.02M]
  ------------------
  278|  1.00M|        if (num < 0 || num > off + remain)
  ------------------
  |  Branch (278:13): [True: 0, False: 1.00M]
  |  Branch (278:24): [True: 0, False: 1.00M]
  ------------------
  279|      0|            return -1; /* Can't see outside of the current buffer */
  280|       |
  281|  1.00M|        bm->data = (num != 0) ? bo->data + num : bo->data;
  ------------------
  |  Branch (281:20): [True: 0, False: 1.00M]
  ------------------
  282|  1.00M|        bm->length = bo->length - num;
  283|  1.00M|        bm->max = bo->max - num;
  284|  1.00M|        off = (ossl_ssize_t)num;
  285|       |        /* FALLTHRU */
  286|  3.52M|    case BIO_C_FILE_TELL:
  ------------------
  |  |  477|  3.52M|#define BIO_C_FILE_TELL 133
  ------------------
  |  Branch (286:5): [True: 2.51M, False: 2.51M]
  ------------------
  287|  3.52M|        ret = (long)off;
  288|  3.52M|        if (off > LONG_MAX)
  ------------------
  |  Branch (288:13): [True: 0, False: 3.52M]
  ------------------
  289|      0|            ret = -1;
  290|  3.52M|        break;
  291|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (291:5): [True: 0, False: 5.03M]
  ------------------
  292|      0|        if (b->num == 0 || (b->flags & BIO_FLAGS_MEM_LEGACY_EOF) != 0)
  ------------------
  |  |   55|      0|#define BIO_FLAGS_MEM_LEGACY_EOF 0x1000
  ------------------
  |  Branch (292:13): [True: 0, False: 0]
  |  Branch (292:28): [True: 0, False: 0]
  ------------------
  293|      0|            ret = (long)(bm->length == 0);
  294|      0|        else
  295|      0|            ret = 0;
  296|      0|        break;
  297|      0|    case BIO_C_SET_BUF_MEM_EOF_RETURN:
  ------------------
  |  |  473|      0|#define BIO_C_SET_BUF_MEM_EOF_RETURN 130 /* return end of input \
  ------------------
  |  Branch (297:5): [True: 0, False: 5.03M]
  ------------------
  298|      0|        b->num = (int)num;
  299|      0|        b->flags &= ~BIO_FLAGS_MEM_LEGACY_EOF;
  ------------------
  |  |   55|      0|#define BIO_FLAGS_MEM_LEGACY_EOF 0x1000
  ------------------
  300|      0|        break;
  301|  1.00M|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|  1.00M|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (301:5): [True: 1.00M, False: 4.02M]
  ------------------
  302|  1.00M|        ret = (long)bm->length;
  303|  1.00M|        if (ptr != NULL) {
  ------------------
  |  Branch (303:13): [True: 503k, False: 503k]
  ------------------
  304|   503k|            pptr = (char **)ptr;
  305|   503k|            *pptr = (char *)(bm->data);
  306|   503k|        }
  307|  1.00M|        break;
  308|      0|    case BIO_C_SET_BUF_MEM:
  ------------------
  |  |  457|      0|#define BIO_C_SET_BUF_MEM 114
  ------------------
  |  Branch (308:5): [True: 0, False: 5.03M]
  ------------------
  309|      0|        mem_buf_free(b);
  310|      0|        b->shutdown = (int)num;
  311|      0|        bbm->buf = ptr;
  312|      0|        *bbm->readp = *bbm->buf;
  313|      0|        break;
  314|   503k|    case BIO_C_GET_BUF_MEM_PTR:
  ------------------
  |  |  458|   503k|#define BIO_C_GET_BUF_MEM_PTR 115
  ------------------
  |  Branch (314:5): [True: 503k, False: 4.53M]
  ------------------
  315|   503k|        if (ptr != NULL) {
  ------------------
  |  Branch (315:13): [True: 503k, False: 0]
  ------------------
  316|   503k|            if (!(b->flags & BIO_FLAGS_MEM_RDONLY))
  ------------------
  |  |  250|   503k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (316:17): [True: 503k, False: 0]
  ------------------
  317|   503k|                mem_buf_sync(b);
  318|   503k|            bm = bbm->buf;
  319|   503k|            pptr = (char **)ptr;
  320|   503k|            *pptr = (char *)bm;
  321|   503k|        }
  322|   503k|        break;
  323|      0|    case BIO_CTRL_GET_CLOSE:
  ------------------
  |  |   97|      0|#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
  ------------------
  |  Branch (323:5): [True: 0, False: 5.03M]
  ------------------
  324|      0|        ret = (long)b->shutdown;
  325|      0|        break;
  326|  2.58k|    case BIO_CTRL_SET_CLOSE:
  ------------------
  |  |   98|  2.58k|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  ------------------
  |  Branch (326:5): [True: 2.58k, False: 5.03M]
  ------------------
  327|  2.58k|        b->shutdown = (int)num;
  328|  2.58k|        break;
  329|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (329:5): [True: 0, False: 5.03M]
  ------------------
  330|      0|        ret = 0L;
  331|      0|        break;
  332|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (332:5): [True: 0, False: 5.03M]
  ------------------
  333|      0|        ret = (long)bm->length;
  334|      0|        break;
  335|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (335:5): [True: 0, False: 5.03M]
  ------------------
  336|      0|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|      0|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (336:5): [True: 0, False: 5.03M]
  ------------------
  337|      0|        ret = 1;
  338|      0|        break;
  339|      0|    case BIO_CTRL_PUSH:
  ------------------
  |  |   95|      0|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  |  Branch (339:5): [True: 0, False: 5.03M]
  ------------------
  340|      0|    case BIO_CTRL_POP:
  ------------------
  |  |   96|      0|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  |  Branch (340:5): [True: 0, False: 5.03M]
  ------------------
  341|      0|    default:
  ------------------
  |  Branch (341:5): [True: 0, False: 5.03M]
  ------------------
  342|      0|        ret = 0;
  343|      0|        break;
  344|  5.03M|    }
  345|  5.03M|    return ret;
  346|  5.03M|}
bss_mem.c:mem_buf_free:
  159|  2.03M|{
  160|  2.03M|    if (a == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 2.03M]
  ------------------
  161|      0|        return 0;
  162|       |
  163|  2.03M|    if (a->shutdown && a->init && a->ptr != NULL) {
  ------------------
  |  Branch (163:9): [True: 2.03M, False: 0]
  |  Branch (163:24): [True: 2.03M, False: 0]
  |  Branch (163:35): [True: 2.03M, False: 0]
  ------------------
  164|  2.03M|        BIO_BUF_MEM *bb = (BIO_BUF_MEM *)a->ptr;
  165|  2.03M|        BUF_MEM *b = bb->buf;
  166|       |
  167|  2.03M|        if (a->flags & BIO_FLAGS_MEM_RDONLY)
  ------------------
  |  |  250|  2.03M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (167:13): [True: 1.00M, False: 1.03M]
  ------------------
  168|  1.00M|            b->data = NULL;
  169|  2.03M|        BUF_MEM_free(b);
  170|  2.03M|    }
  171|  2.03M|    return 1;
  172|  2.03M|}
bss_mem.c:mem_new:
  134|  2.03M|{
  135|  2.03M|    return mem_init(bi, 0L);
  136|  2.03M|}
bss_mem.c:mem_init:
  110|  2.03M|{
  111|  2.03M|    BIO_BUF_MEM *bb = OPENSSL_zalloc(sizeof(*bb));
  ------------------
  |  |  109|  2.03M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |
  113|  2.03M|    if (bb == NULL)
  ------------------
  |  Branch (113:9): [True: 0, False: 2.03M]
  ------------------
  114|      0|        return 0;
  115|  2.03M|    if ((bb->buf = BUF_MEM_new_ex(flags)) == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 2.03M]
  ------------------
  116|      0|        OPENSSL_free(bb);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|      0|        return 0;
  118|      0|    }
  119|  2.03M|    if ((bb->readp = OPENSSL_zalloc(sizeof(*bb->readp))) == NULL) {
  ------------------
  |  |  109|  2.03M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (119:9): [True: 0, False: 2.03M]
  ------------------
  120|      0|        BUF_MEM_free(bb->buf);
  121|      0|        OPENSSL_free(bb);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  122|      0|        return 0;
  123|      0|    }
  124|  2.03M|    *bb->readp = *bb->buf;
  125|  2.03M|    bi->shutdown = 1;
  126|  2.03M|    bi->init = 1;
  127|  2.03M|    bi->num = -1;
  128|  2.03M|    bi->flags |= BIO_FLAGS_MEM_LEGACY_EOF;
  ------------------
  |  |   55|  2.03M|#define BIO_FLAGS_MEM_LEGACY_EOF 0x1000
  ------------------
  129|  2.03M|    bi->ptr = (char *)bb;
  130|  2.03M|    return 1;
  131|  2.03M|}
bss_mem.c:mem_free:
  144|  2.03M|{
  145|  2.03M|    BIO_BUF_MEM *bb;
  146|       |
  147|  2.03M|    if (a == NULL)
  ------------------
  |  Branch (147:9): [True: 0, False: 2.03M]
  ------------------
  148|      0|        return 0;
  149|       |
  150|  2.03M|    bb = (BIO_BUF_MEM *)a->ptr;
  151|  2.03M|    if (!mem_buf_free(a))
  ------------------
  |  Branch (151:9): [True: 0, False: 2.03M]
  ------------------
  152|      0|        return 0;
  153|  2.03M|    OPENSSL_free(bb->readp);
  ------------------
  |  |  132|  2.03M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|  2.03M|    OPENSSL_free(bb);
  ------------------
  |  |  132|  2.03M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  155|  2.03M|    return 1;
  156|  2.03M|}

ossl_core_bio_up_ref:
   35|  1.00M|{
   36|  1.00M|    int ref = 0;
   37|       |
   38|  1.00M|    return CRYPTO_UP_REF(&cb->ref_cnt, &ref);
   39|  1.00M|}
ossl_core_bio_free:
   42|  2.51M|{
   43|  2.51M|    int ref = 0, res = 1;
   44|       |
   45|  2.51M|    if (cb != NULL) {
  ------------------
  |  Branch (45:9): [True: 2.01M, False: 503k]
  ------------------
   46|  2.01M|        CRYPTO_DOWN_REF(&cb->ref_cnt, &ref);
   47|  2.01M|        if (ref <= 0) {
  ------------------
  |  Branch (47:13): [True: 1.00M, False: 1.00M]
  ------------------
   48|  1.00M|            res = BIO_free(cb->bio);
   49|  1.00M|            CRYPTO_FREE_REF(&cb->ref_cnt);
   50|  1.00M|            OPENSSL_free(cb);
  ------------------
  |  |  132|  1.00M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|  1.00M|        }
   52|  2.01M|    }
   53|  2.51M|    return res;
   54|  2.51M|}
ossl_core_bio_new_from_bio:
   57|  1.00M|{
   58|  1.00M|    OSSL_CORE_BIO *cb = core_bio_new();
   59|       |
   60|  1.00M|    if (cb == NULL || !BIO_up_ref(bio)) {
  ------------------
  |  Branch (60:9): [True: 0, False: 1.00M]
  |  Branch (60:23): [True: 0, False: 1.00M]
  ------------------
   61|      0|        ossl_core_bio_free(cb);
   62|      0|        return NULL;
   63|      0|    }
   64|  1.00M|    cb->bio = bio;
   65|  1.00M|    return cb;
   66|  1.00M|}
ossl_core_bio_read_ex:
   94|  2.70M|{
   95|  2.70M|    return BIO_read_ex(cb->bio, data, dlen, readbytes);
   96|  2.70M|}
ossl_core_bio.c:core_bio_new:
   24|  1.00M|{
   25|  1.00M|    OSSL_CORE_BIO *cb = OPENSSL_malloc(sizeof(*cb));
  ------------------
  |  |  107|  1.00M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|       |
   27|  1.00M|    if (cb == NULL || !CRYPTO_NEW_REF(&cb->ref_cnt, 1)) {
  ------------------
  |  Branch (27:9): [True: 0, False: 1.00M]
  |  Branch (27:23): [True: 0, False: 1.00M]
  ------------------
   28|      0|        OPENSSL_free(cb);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   29|      0|        return NULL;
   30|      0|    }
   31|  1.00M|    return cb;
   32|  1.00M|}

bn_mul_add_words:
  116|  4.05M|{
  117|  4.05M|    BN_ULONG c1 = 0;
  118|       |
  119|  4.05M|    if (num <= 0)
  ------------------
  |  Branch (119:9): [True: 0, False: 4.05M]
  ------------------
  120|      0|        return c1;
  121|       |
  122|  7.09M|    while (num & ~3) {
  ------------------
  |  Branch (122:12): [True: 3.03M, False: 4.05M]
  ------------------
  123|  3.03M|        mul_add(rp[0], ap[0], w, c1);
  ------------------
  |  |   77|  3.03M|    do {                              \
  |  |   78|  3.03M|        register BN_ULONG high, low;  \
  |  |   79|  3.03M|        asm("mulq %3"                 \
  |  |   80|  3.03M|            : "=a"(low), "=d"(high)   \
  |  |   81|  3.03M|            : "a"(word), "m"(a)       \
  |  |   82|  3.03M|            : "cc");                  \
  |  |   83|  3.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|  3.03M|            : "+r"(carry), "+d"(high) \
  |  |   85|  3.03M|            : "a"(low), "g"(0)        \
  |  |   86|  3.03M|            : "cc");                  \
  |  |   87|  3.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|  3.03M|            : "+m"(r), "+d"(high)     \
  |  |   89|  3.03M|            : "r"(carry), "g"(0)      \
  |  |   90|  3.03M|            : "cc");                  \
  |  |   91|  3.03M|        carry = high;                 \
  |  |   92|  3.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 3.03M]
  |  |  ------------------
  ------------------
  124|  3.03M|        mul_add(rp[1], ap[1], w, c1);
  ------------------
  |  |   77|  3.03M|    do {                              \
  |  |   78|  3.03M|        register BN_ULONG high, low;  \
  |  |   79|  3.03M|        asm("mulq %3"                 \
  |  |   80|  3.03M|            : "=a"(low), "=d"(high)   \
  |  |   81|  3.03M|            : "a"(word), "m"(a)       \
  |  |   82|  3.03M|            : "cc");                  \
  |  |   83|  3.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|  3.03M|            : "+r"(carry), "+d"(high) \
  |  |   85|  3.03M|            : "a"(low), "g"(0)        \
  |  |   86|  3.03M|            : "cc");                  \
  |  |   87|  3.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|  3.03M|            : "+m"(r), "+d"(high)     \
  |  |   89|  3.03M|            : "r"(carry), "g"(0)      \
  |  |   90|  3.03M|            : "cc");                  \
  |  |   91|  3.03M|        carry = high;                 \
  |  |   92|  3.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 3.03M]
  |  |  ------------------
  ------------------
  125|  3.03M|        mul_add(rp[2], ap[2], w, c1);
  ------------------
  |  |   77|  3.03M|    do {                              \
  |  |   78|  3.03M|        register BN_ULONG high, low;  \
  |  |   79|  3.03M|        asm("mulq %3"                 \
  |  |   80|  3.03M|            : "=a"(low), "=d"(high)   \
  |  |   81|  3.03M|            : "a"(word), "m"(a)       \
  |  |   82|  3.03M|            : "cc");                  \
  |  |   83|  3.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|  3.03M|            : "+r"(carry), "+d"(high) \
  |  |   85|  3.03M|            : "a"(low), "g"(0)        \
  |  |   86|  3.03M|            : "cc");                  \
  |  |   87|  3.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|  3.03M|            : "+m"(r), "+d"(high)     \
  |  |   89|  3.03M|            : "r"(carry), "g"(0)      \
  |  |   90|  3.03M|            : "cc");                  \
  |  |   91|  3.03M|        carry = high;                 \
  |  |   92|  3.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 3.03M]
  |  |  ------------------
  ------------------
  126|  3.03M|        mul_add(rp[3], ap[3], w, c1);
  ------------------
  |  |   77|  3.03M|    do {                              \
  |  |   78|  3.03M|        register BN_ULONG high, low;  \
  |  |   79|  3.03M|        asm("mulq %3"                 \
  |  |   80|  3.03M|            : "=a"(low), "=d"(high)   \
  |  |   81|  3.03M|            : "a"(word), "m"(a)       \
  |  |   82|  3.03M|            : "cc");                  \
  |  |   83|  3.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|  3.03M|            : "+r"(carry), "+d"(high) \
  |  |   85|  3.03M|            : "a"(low), "g"(0)        \
  |  |   86|  3.03M|            : "cc");                  \
  |  |   87|  3.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|  3.03M|            : "+m"(r), "+d"(high)     \
  |  |   89|  3.03M|            : "r"(carry), "g"(0)      \
  |  |   90|  3.03M|            : "cc");                  \
  |  |   91|  3.03M|        carry = high;                 \
  |  |   92|  3.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 3.03M]
  |  |  ------------------
  ------------------
  127|  3.03M|        ap += 4;
  128|  3.03M|        rp += 4;
  129|  3.03M|        num -= 4;
  130|  3.03M|    }
  131|  4.05M|    if (num) {
  ------------------
  |  Branch (131:9): [True: 3.37M, False: 687k]
  ------------------
  132|  3.37M|        mul_add(rp[0], ap[0], w, c1);
  ------------------
  |  |   77|  3.37M|    do {                              \
  |  |   78|  3.37M|        register BN_ULONG high, low;  \
  |  |   79|  3.37M|        asm("mulq %3"                 \
  |  |   80|  3.37M|            : "=a"(low), "=d"(high)   \
  |  |   81|  3.37M|            : "a"(word), "m"(a)       \
  |  |   82|  3.37M|            : "cc");                  \
  |  |   83|  3.37M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|  3.37M|            : "+r"(carry), "+d"(high) \
  |  |   85|  3.37M|            : "a"(low), "g"(0)        \
  |  |   86|  3.37M|            : "cc");                  \
  |  |   87|  3.37M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|  3.37M|            : "+m"(r), "+d"(high)     \
  |  |   89|  3.37M|            : "r"(carry), "g"(0)      \
  |  |   90|  3.37M|            : "cc");                  \
  |  |   91|  3.37M|        carry = high;                 \
  |  |   92|  3.37M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 3.37M]
  |  |  ------------------
  ------------------
  133|  3.37M|        if (--num == 0)
  ------------------
  |  Branch (133:13): [True: 682k, False: 2.68M]
  ------------------
  134|   682k|            return c1;
  135|  2.68M|        mul_add(rp[1], ap[1], w, c1);
  ------------------
  |  |   77|  2.68M|    do {                              \
  |  |   78|  2.68M|        register BN_ULONG high, low;  \
  |  |   79|  2.68M|        asm("mulq %3"                 \
  |  |   80|  2.68M|            : "=a"(low), "=d"(high)   \
  |  |   81|  2.68M|            : "a"(word), "m"(a)       \
  |  |   82|  2.68M|            : "cc");                  \
  |  |   83|  2.68M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|  2.68M|            : "+r"(carry), "+d"(high) \
  |  |   85|  2.68M|            : "a"(low), "g"(0)        \
  |  |   86|  2.68M|            : "cc");                  \
  |  |   87|  2.68M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|  2.68M|            : "+m"(r), "+d"(high)     \
  |  |   89|  2.68M|            : "r"(carry), "g"(0)      \
  |  |   90|  2.68M|            : "cc");                  \
  |  |   91|  2.68M|        carry = high;                 \
  |  |   92|  2.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 2.68M]
  |  |  ------------------
  ------------------
  136|  2.68M|        if (--num == 0)
  ------------------
  |  Branch (136:13): [True: 2.07M, False: 615k]
  ------------------
  137|  2.07M|            return c1;
  138|   615k|        mul_add(rp[2], ap[2], w, c1);
  ------------------
  |  |   77|   615k|    do {                              \
  |  |   78|   615k|        register BN_ULONG high, low;  \
  |  |   79|   615k|        asm("mulq %3"                 \
  |  |   80|   615k|            : "=a"(low), "=d"(high)   \
  |  |   81|   615k|            : "a"(word), "m"(a)       \
  |  |   82|   615k|            : "cc");                  \
  |  |   83|   615k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   615k|            : "+r"(carry), "+d"(high) \
  |  |   85|   615k|            : "a"(low), "g"(0)        \
  |  |   86|   615k|            : "cc");                  \
  |  |   87|   615k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   615k|            : "+m"(r), "+d"(high)     \
  |  |   89|   615k|            : "r"(carry), "g"(0)      \
  |  |   90|   615k|            : "cc");                  \
  |  |   91|   615k|        carry = high;                 \
  |  |   92|   615k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 615k]
  |  |  ------------------
  ------------------
  139|   615k|        return c1;
  140|  2.68M|    }
  141|       |
  142|   687k|    return c1;
  143|  4.05M|}
bn_mul_words:
  146|  4.34M|{
  147|  4.34M|    BN_ULONG c1 = 0;
  148|       |
  149|  4.34M|    if (num <= 0)
  ------------------
  |  Branch (149:9): [True: 0, False: 4.34M]
  ------------------
  150|      0|        return c1;
  151|       |
  152|  8.25M|    while (num & ~3) {
  ------------------
  |  Branch (152:12): [True: 3.91M, False: 4.34M]
  ------------------
  153|  3.91M|        mul(rp[0], ap[0], w, c1);
  ------------------
  |  |   95|  3.91M|    do {                              \
  |  |   96|  3.91M|        register BN_ULONG high, low;  \
  |  |   97|  3.91M|        asm("mulq %3"                 \
  |  |   98|  3.91M|            : "=a"(low), "=d"(high)   \
  |  |   99|  3.91M|            : "a"(word), "g"(a)       \
  |  |  100|  3.91M|            : "cc");                  \
  |  |  101|  3.91M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  3.91M|            : "+r"(carry), "+d"(high) \
  |  |  103|  3.91M|            : "a"(low), "g"(0)        \
  |  |  104|  3.91M|            : "cc");                  \
  |  |  105|  3.91M|        (r) = carry, carry = high;    \
  |  |  106|  3.91M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 3.91M]
  |  |  ------------------
  ------------------
  154|  3.91M|        mul(rp[1], ap[1], w, c1);
  ------------------
  |  |   95|  3.91M|    do {                              \
  |  |   96|  3.91M|        register BN_ULONG high, low;  \
  |  |   97|  3.91M|        asm("mulq %3"                 \
  |  |   98|  3.91M|            : "=a"(low), "=d"(high)   \
  |  |   99|  3.91M|            : "a"(word), "g"(a)       \
  |  |  100|  3.91M|            : "cc");                  \
  |  |  101|  3.91M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  3.91M|            : "+r"(carry), "+d"(high) \
  |  |  103|  3.91M|            : "a"(low), "g"(0)        \
  |  |  104|  3.91M|            : "cc");                  \
  |  |  105|  3.91M|        (r) = carry, carry = high;    \
  |  |  106|  3.91M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 3.91M]
  |  |  ------------------
  ------------------
  155|  3.91M|        mul(rp[2], ap[2], w, c1);
  ------------------
  |  |   95|  3.91M|    do {                              \
  |  |   96|  3.91M|        register BN_ULONG high, low;  \
  |  |   97|  3.91M|        asm("mulq %3"                 \
  |  |   98|  3.91M|            : "=a"(low), "=d"(high)   \
  |  |   99|  3.91M|            : "a"(word), "g"(a)       \
  |  |  100|  3.91M|            : "cc");                  \
  |  |  101|  3.91M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  3.91M|            : "+r"(carry), "+d"(high) \
  |  |  103|  3.91M|            : "a"(low), "g"(0)        \
  |  |  104|  3.91M|            : "cc");                  \
  |  |  105|  3.91M|        (r) = carry, carry = high;    \
  |  |  106|  3.91M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 3.91M]
  |  |  ------------------
  ------------------
  156|  3.91M|        mul(rp[3], ap[3], w, c1);
  ------------------
  |  |   95|  3.91M|    do {                              \
  |  |   96|  3.91M|        register BN_ULONG high, low;  \
  |  |   97|  3.91M|        asm("mulq %3"                 \
  |  |   98|  3.91M|            : "=a"(low), "=d"(high)   \
  |  |   99|  3.91M|            : "a"(word), "g"(a)       \
  |  |  100|  3.91M|            : "cc");                  \
  |  |  101|  3.91M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  3.91M|            : "+r"(carry), "+d"(high) \
  |  |  103|  3.91M|            : "a"(low), "g"(0)        \
  |  |  104|  3.91M|            : "cc");                  \
  |  |  105|  3.91M|        (r) = carry, carry = high;    \
  |  |  106|  3.91M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 3.91M]
  |  |  ------------------
  ------------------
  157|  3.91M|        ap += 4;
  158|  3.91M|        rp += 4;
  159|  3.91M|        num -= 4;
  160|  3.91M|    }
  161|  4.34M|    if (num) {
  ------------------
  |  Branch (161:9): [True: 4.19M, False: 151k]
  ------------------
  162|  4.19M|        mul(rp[0], ap[0], w, c1);
  ------------------
  |  |   95|  4.19M|    do {                              \
  |  |   96|  4.19M|        register BN_ULONG high, low;  \
  |  |   97|  4.19M|        asm("mulq %3"                 \
  |  |   98|  4.19M|            : "=a"(low), "=d"(high)   \
  |  |   99|  4.19M|            : "a"(word), "g"(a)       \
  |  |  100|  4.19M|            : "cc");                  \
  |  |  101|  4.19M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  4.19M|            : "+r"(carry), "+d"(high) \
  |  |  103|  4.19M|            : "a"(low), "g"(0)        \
  |  |  104|  4.19M|            : "cc");                  \
  |  |  105|  4.19M|        (r) = carry, carry = high;    \
  |  |  106|  4.19M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 4.19M]
  |  |  ------------------
  ------------------
  163|  4.19M|        if (--num == 0)
  ------------------
  |  Branch (163:13): [True: 1.57M, False: 2.62M]
  ------------------
  164|  1.57M|            return c1;
  165|  2.62M|        mul(rp[1], ap[1], w, c1);
  ------------------
  |  |   95|  2.62M|    do {                              \
  |  |   96|  2.62M|        register BN_ULONG high, low;  \
  |  |   97|  2.62M|        asm("mulq %3"                 \
  |  |   98|  2.62M|            : "=a"(low), "=d"(high)   \
  |  |   99|  2.62M|            : "a"(word), "g"(a)       \
  |  |  100|  2.62M|            : "cc");                  \
  |  |  101|  2.62M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  2.62M|            : "+r"(carry), "+d"(high) \
  |  |  103|  2.62M|            : "a"(low), "g"(0)        \
  |  |  104|  2.62M|            : "cc");                  \
  |  |  105|  2.62M|        (r) = carry, carry = high;    \
  |  |  106|  2.62M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 2.62M]
  |  |  ------------------
  ------------------
  166|  2.62M|        if (--num == 0)
  ------------------
  |  Branch (166:13): [True: 2.62M, False: 0]
  ------------------
  167|  2.62M|            return c1;
  168|      0|        mul(rp[2], ap[2], w, c1);
  ------------------
  |  |   95|      0|    do {                              \
  |  |   96|      0|        register BN_ULONG high, low;  \
  |  |   97|      0|        asm("mulq %3"                 \
  |  |   98|      0|            : "=a"(low), "=d"(high)   \
  |  |   99|      0|            : "a"(word), "g"(a)       \
  |  |  100|      0|            : "cc");                  \
  |  |  101|      0|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|      0|            : "+r"(carry), "+d"(high) \
  |  |  103|      0|            : "a"(low), "g"(0)        \
  |  |  104|      0|            : "cc");                  \
  |  |  105|      0|        (r) = carry, carry = high;    \
  |  |  106|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  169|      0|    }
  170|   151k|    return c1;
  171|  4.34M|}
bn_sqr_words:
  174|   599k|{
  175|   599k|    if (n <= 0)
  ------------------
  |  Branch (175:9): [True: 0, False: 599k]
  ------------------
  176|      0|        return;
  177|       |
  178|  1.21M|    while (n & ~3) {
  ------------------
  |  Branch (178:12): [True: 615k, False: 599k]
  ------------------
  179|   615k|        sqr(r[0], r[1], a[0]);
  ------------------
  |  |  109|   615k|    asm("mulq %2"            \
  |  |  110|   615k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   615k|        : "a"(a)             \
  |  |  112|   615k|        : "cc");
  ------------------
  180|   615k|        sqr(r[2], r[3], a[1]);
  ------------------
  |  |  109|   615k|    asm("mulq %2"            \
  |  |  110|   615k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   615k|        : "a"(a)             \
  |  |  112|   615k|        : "cc");
  ------------------
  181|   615k|        sqr(r[4], r[5], a[2]);
  ------------------
  |  |  109|   615k|    asm("mulq %2"            \
  |  |  110|   615k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   615k|        : "a"(a)             \
  |  |  112|   615k|        : "cc");
  ------------------
  182|   615k|        sqr(r[6], r[7], a[3]);
  ------------------
  |  |  109|   615k|    asm("mulq %2"            \
  |  |  110|   615k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   615k|        : "a"(a)             \
  |  |  112|   615k|        : "cc");
  ------------------
  183|   615k|        a += 4;
  184|   615k|        r += 8;
  185|   615k|        n -= 4;
  186|   615k|    }
  187|   599k|    if (n) {
  ------------------
  |  Branch (187:9): [True: 599k, False: 0]
  ------------------
  188|   599k|        sqr(r[0], r[1], a[0]);
  ------------------
  |  |  109|   599k|    asm("mulq %2"            \
  |  |  110|   599k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   599k|        : "a"(a)             \
  |  |  112|   599k|        : "cc");
  ------------------
  189|   599k|        if (--n == 0)
  ------------------
  |  Branch (189:13): [True: 16.7k, False: 582k]
  ------------------
  190|  16.7k|            return;
  191|   582k|        sqr(r[2], r[3], a[1]);
  ------------------
  |  |  109|   582k|    asm("mulq %2"            \
  |  |  110|   582k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   582k|        : "a"(a)             \
  |  |  112|   582k|        : "cc");
  ------------------
  192|   582k|        if (--n == 0)
  ------------------
  |  Branch (192:13): [True: 582k, False: 0]
  ------------------
  193|   582k|            return;
  194|      0|        sqr(r[4], r[5], a[2]);
  ------------------
  |  |  109|      0|    asm("mulq %2"            \
  |  |  110|      0|        : "=a"(r0), "=d"(r1) \
  |  |  111|      0|        : "a"(a)             \
  |  |  112|      0|        : "cc");
  ------------------
  195|      0|    }
  196|   599k|}
bn_div_words:
  199|  3.43M|{
  200|  3.43M|    BN_ULONG ret, waste;
  201|       |
  202|  3.43M|    asm("divq      %4" : "=a"(ret), "=d"(waste)
  203|  3.43M|        : "a"(l), "d"(h), "r"(d)
  204|  3.43M|        : "cc");
  205|       |
  206|  3.43M|    return ret;
  207|  3.43M|}
bn_add_words:
  211|  19.0M|{
  212|  19.0M|    BN_ULONG ret;
  213|  19.0M|    size_t i = 0;
  214|       |
  215|  19.0M|    if (n <= 0)
  ------------------
  |  Branch (215:9): [True: 150k, False: 18.8M]
  ------------------
  216|   150k|        return 0;
  217|       |
  218|  18.8M|    asm volatile("       subq    %0,%0           \n" /* clear carry */
  219|  18.8M|                 "       jmp     1f              \n"
  220|  18.8M|                 ".p2align 4                     \n"
  221|  18.8M|                 "1:     movq    (%4,%2,8),%0    \n"
  222|  18.8M|                 "       adcq    (%5,%2,8),%0    \n"
  223|  18.8M|                 "       movq    %0,(%3,%2,8)    \n"
  224|  18.8M|                 "       lea     1(%2),%2        \n"
  225|  18.8M|                 "       dec     %1              \n"
  226|  18.8M|                 "       jnz     1b              \n"
  227|  18.8M|                 "       sbbq    %0,%0           \n"
  228|  18.8M|        : "=&r"(ret), "+c"(n), "+r"(i)
  229|  18.8M|        : "r"(rp), "r"(ap), "r"(bp)
  230|  18.8M|        : "cc", "memory");
  231|       |
  232|  18.8M|    return ret & 1;
  233|  19.0M|}
bn_sub_words:
  238|  16.7M|{
  239|  16.7M|    BN_ULONG ret;
  240|  16.7M|    size_t i = 0;
  241|       |
  242|  16.7M|    if (n <= 0)
  ------------------
  |  Branch (242:9): [True: 0, False: 16.7M]
  ------------------
  243|      0|        return 0;
  244|       |
  245|  16.7M|    asm volatile("       subq    %0,%0           \n" /* clear borrow */
  246|  16.7M|                 "       jmp     1f              \n"
  247|  16.7M|                 ".p2align 4                     \n"
  248|  16.7M|                 "1:     movq    (%4,%2,8),%0    \n"
  249|  16.7M|                 "       sbbq    (%5,%2,8),%0    \n"
  250|  16.7M|                 "       movq    %0,(%3,%2,8)    \n"
  251|  16.7M|                 "       lea     1(%2),%2        \n"
  252|  16.7M|                 "       dec     %1              \n"
  253|  16.7M|                 "       jnz     1b              \n"
  254|  16.7M|                 "       sbbq    %0,%0           \n"
  255|  16.7M|        : "=&r"(ret), "+c"(n), "+r"(i)
  256|  16.7M|        : "r"(rp), "r"(ap), "r"(bp)
  257|  16.7M|        : "cc", "memory");
  258|       |
  259|  16.7M|    return ret & 1;
  260|  16.7M|}

BN_add:
   15|   372k|{
   16|   372k|    int ret, r_neg, cmp_res;
   17|       |
   18|   372k|    bn_check_top(a);
   19|   372k|    bn_check_top(b);
   20|       |
   21|   372k|    if (a->neg == b->neg) {
  ------------------
  |  Branch (21:9): [True: 576, False: 371k]
  ------------------
   22|    576|        r_neg = a->neg;
   23|    576|        ret = BN_uadd(r, a, b);
   24|   371k|    } else {
   25|   371k|        cmp_res = BN_ucmp(a, b);
   26|   371k|        if (cmp_res > 0) {
  ------------------
  |  Branch (26:13): [True: 0, False: 371k]
  ------------------
   27|      0|            r_neg = a->neg;
   28|      0|            ret = BN_usub(r, a, b);
   29|   371k|        } else if (cmp_res < 0) {
  ------------------
  |  Branch (29:20): [True: 371k, False: 0]
  ------------------
   30|   371k|            r_neg = b->neg;
   31|   371k|            ret = BN_usub(r, b, a);
   32|   371k|        } else {
   33|      0|            r_neg = 0;
   34|      0|            BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
   35|      0|            ret = 1;
   36|      0|        }
   37|   371k|    }
   38|       |
   39|   372k|    r->neg = r_neg;
   40|   372k|    bn_check_top(r);
   41|   372k|    return ret;
   42|   372k|}
BN_sub:
   46|   670k|{
   47|   670k|    int ret, r_neg, cmp_res;
   48|       |
   49|   670k|    bn_check_top(a);
   50|   670k|    bn_check_top(b);
   51|       |
   52|   670k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (52:9): [True: 0, False: 670k]
  ------------------
   53|      0|        r_neg = a->neg;
   54|      0|        ret = BN_uadd(r, a, b);
   55|   670k|    } else {
   56|   670k|        cmp_res = BN_ucmp(a, b);
   57|   670k|        if (cmp_res > 0) {
  ------------------
  |  Branch (57:13): [True: 298k, False: 371k]
  ------------------
   58|   298k|            r_neg = a->neg;
   59|   298k|            ret = BN_usub(r, a, b);
   60|   371k|        } else if (cmp_res < 0) {
  ------------------
  |  Branch (60:20): [True: 371k, False: 0]
  ------------------
   61|   371k|            r_neg = !b->neg;
   62|   371k|            ret = BN_usub(r, b, a);
   63|   371k|        } else {
   64|      0|            r_neg = 0;
   65|      0|            BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
   66|      0|            ret = 1;
   67|      0|        }
   68|   670k|    }
   69|       |
   70|   670k|    r->neg = r_neg;
   71|   670k|    bn_check_top(r);
   72|   670k|    return ret;
   73|   670k|}
BN_uadd:
   77|  14.3M|{
   78|  14.3M|    int max, min, dif;
   79|  14.3M|    const BN_ULONG *ap, *bp;
   80|  14.3M|    BN_ULONG *rp, carry, t1, t2;
   81|       |
   82|  14.3M|    bn_check_top(a);
   83|  14.3M|    bn_check_top(b);
   84|       |
   85|  14.3M|    if (a->top < b->top) {
  ------------------
  |  Branch (85:9): [True: 300k, False: 14.0M]
  ------------------
   86|   300k|        const BIGNUM *tmp;
   87|       |
   88|   300k|        tmp = a;
   89|   300k|        a = b;
   90|   300k|        b = tmp;
   91|   300k|    }
   92|  14.3M|    max = a->top;
   93|  14.3M|    min = b->top;
   94|  14.3M|    dif = max - min;
   95|       |
   96|  14.3M|    if (bn_wexpand(r, max + 1) == NULL)
  ------------------
  |  Branch (96:9): [True: 0, False: 14.3M]
  ------------------
   97|      0|        return 0;
   98|       |
   99|  14.3M|    r->top = max;
  100|       |
  101|  14.3M|    ap = a->d;
  102|  14.3M|    bp = b->d;
  103|  14.3M|    rp = r->d;
  104|       |
  105|  14.3M|    carry = bn_add_words(rp, ap, bp, min);
  106|  14.3M|    rp += min;
  107|  14.3M|    ap += min;
  108|       |
  109|  19.0M|    while (dif) {
  ------------------
  |  Branch (109:12): [True: 4.68M, False: 14.3M]
  ------------------
  110|  4.68M|        dif--;
  111|  4.68M|        t1 = *(ap++);
  112|  4.68M|        t2 = (t1 + carry) & BN_MASK2;
  ------------------
  |  |   77|  4.68M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  113|  4.68M|        *(rp++) = t2;
  114|  4.68M|        carry &= (t2 == 0);
  115|  4.68M|    }
  116|  14.3M|    *rp = carry;
  117|  14.3M|    r->top += (int)carry;
  118|       |
  119|  14.3M|    r->neg = 0;
  120|  14.3M|    bn_check_top(r);
  121|  14.3M|    return 1;
  122|  14.3M|}
BN_usub:
  126|  10.6M|{
  127|  10.6M|    int max, min, dif;
  128|  10.6M|    BN_ULONG t1, t2, borrow, *rp;
  129|  10.6M|    const BN_ULONG *ap, *bp;
  130|       |
  131|  10.6M|    bn_check_top(a);
  132|  10.6M|    bn_check_top(b);
  133|       |
  134|  10.6M|    max = a->top;
  135|  10.6M|    min = b->top;
  136|  10.6M|    dif = max - min;
  137|       |
  138|  10.6M|    if (dif < 0) { /* hmm... should not be happening */
  ------------------
  |  Branch (138:9): [True: 0, False: 10.6M]
  ------------------
  139|      0|        ERR_raise(ERR_LIB_BN, BN_R_ARG2_LT_ARG3);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  140|      0|        return 0;
  141|      0|    }
  142|       |
  143|  10.6M|    if (bn_wexpand(r, max) == NULL)
  ------------------
  |  Branch (143:9): [True: 0, False: 10.6M]
  ------------------
  144|      0|        return 0;
  145|       |
  146|  10.6M|    ap = a->d;
  147|  10.6M|    bp = b->d;
  148|  10.6M|    rp = r->d;
  149|       |
  150|  10.6M|    borrow = bn_sub_words(rp, ap, bp, min);
  151|  10.6M|    ap += min;
  152|  10.6M|    rp += min;
  153|       |
  154|  10.9M|    while (dif) {
  ------------------
  |  Branch (154:12): [True: 227k, False: 10.6M]
  ------------------
  155|   227k|        dif--;
  156|   227k|        t1 = *(ap++);
  157|   227k|        t2 = (t1 - borrow) & BN_MASK2;
  ------------------
  |  |   77|   227k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  158|   227k|        *(rp++) = t2;
  159|   227k|        borrow &= (t1 == 0);
  160|   227k|    }
  161|       |
  162|  10.9M|    while (max && *--rp == 0)
  ------------------
  |  Branch (162:12): [True: 10.7M, False: 150k]
  |  Branch (162:19): [True: 225k, False: 10.5M]
  ------------------
  163|   225k|        max--;
  164|       |
  165|  10.6M|    r->top = max;
  166|  10.6M|    r->neg = 0;
  167|  10.6M|    bn_pollute(r);
  168|       |
  169|  10.6M|    return 1;
  170|  10.6M|}

BN_CTX_new_ex:
  123|   815k|{
  124|   815k|    BN_CTX *ret;
  125|       |
  126|   815k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|   815k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (126:9): [True: 0, False: 815k]
  ------------------
  127|      0|        return NULL;
  128|       |    /* Initialise the structure */
  129|   815k|    BN_POOL_init(&ret->pool);
  130|   815k|    BN_STACK_init(&ret->stack);
  131|   815k|    ret->libctx = ctx;
  132|   815k|    return ret;
  133|   815k|}
BN_CTX_secure_new_ex:
  143|    441|{
  144|    441|    BN_CTX *ret = BN_CTX_new_ex(ctx);
  145|       |
  146|    441|    if (ret != NULL)
  ------------------
  |  Branch (146:9): [True: 441, False: 0]
  ------------------
  147|    441|        ret->flags = BN_FLG_SECURE;
  ------------------
  |  |   68|    441|#define BN_FLG_SECURE 0x08
  ------------------
  148|    441|    return ret;
  149|    441|}
BN_CTX_free:
  159|  2.82M|{
  160|  2.82M|    if (ctx == NULL)
  ------------------
  |  Branch (160:9): [True: 2.01M, False: 815k]
  ------------------
  161|  2.01M|        return;
  162|   815k|#ifndef FIPS_MODULE
  163|   815k|    OSSL_TRACE_BEGIN(BN_CTX)
  ------------------
  |  |  219|   815k|    do {                           \
  |  |  220|   815k|        BIO *trc_out = NULL;       \
  |  |  221|   815k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 815k]
  |  |  ------------------
  ------------------
  164|      0|    {
  165|      0|        BN_POOL_ITEM *pool = ctx->pool.head;
  166|      0|        BIO_printf(trc_out,
  167|      0|            "BN_CTX_free(): stack-size=%d, pool-bignums=%d\n",
  168|      0|            ctx->stack.size, ctx->pool.size);
  169|      0|        BIO_printf(trc_out, "  dmaxs: ");
  170|      0|        while (pool) {
  ------------------
  |  Branch (170:16): [True: 0, False: 0]
  ------------------
  171|      0|            unsigned loop = 0;
  172|      0|            while (loop < BN_CTX_POOL_SIZE)
  ------------------
  |  |   15|      0|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (172:20): [True: 0, False: 0]
  ------------------
  173|      0|                BIO_printf(trc_out, "%02x ", pool->vals[loop++].dmax);
  174|      0|            pool = pool->next;
  175|      0|        }
  176|      0|        BIO_printf(trc_out, "\n");
  177|      0|    }
  178|   815k|    OSSL_TRACE_END(BN_CTX);
  ------------------
  |  |  224|   815k|    }                            \
  |  |  225|   815k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 815k]
  |  |  ------------------
  ------------------
  179|   815k|#endif
  180|   815k|    BN_STACK_finish(&ctx->stack);
  181|   815k|    BN_POOL_finish(&ctx->pool);
  182|   815k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   815k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  183|   815k|}
BN_CTX_start:
  186|  4.16M|{
  187|  4.16M|    CTXDBG("ENTER BN_CTX_start()", ctx);
  ------------------
  |  |  110|  4.16M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  4.16M|    do {                           \
  |  |  |  |  220|  4.16M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  4.16M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  4.16M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  4.16M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  4.16M|    }                            \
  |  |  |  |  225|  4.16M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|       |    /* If we're already overflowing ... */
  189|  4.16M|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (189:9): [True: 0, False: 4.16M]
  |  Branch (189:27): [True: 0, False: 4.16M]
  ------------------
  190|      0|        ctx->err_stack++;
  191|       |    /* (Try to) get a new frame pointer */
  192|  4.16M|    else if (!BN_STACK_push(&ctx->stack, ctx->used)) {
  ------------------
  |  Branch (192:14): [True: 0, False: 4.16M]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        ctx->err_stack++;
  195|      0|    }
  196|       |    CTXDBG("LEAVE BN_CTX_start()", ctx);
  ------------------
  |  |  110|  4.16M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  4.16M|    do {                           \
  |  |  |  |  220|  4.16M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  4.16M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  4.16M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  4.16M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  4.16M|    }                            \
  |  |  |  |  225|  4.16M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|  4.16M|}
BN_CTX_end:
  200|  4.16M|{
  201|  4.16M|    if (ctx == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 4.16M]
  ------------------
  202|      0|        return;
  203|  4.16M|    CTXDBG("ENTER BN_CTX_end()", ctx);
  ------------------
  |  |  110|  4.16M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  4.16M|    do {                           \
  |  |  |  |  220|  4.16M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  4.16M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  4.16M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  4.16M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  4.16M|    }                            \
  |  |  |  |  225|  4.16M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  204|  4.16M|    if (ctx->err_stack)
  ------------------
  |  Branch (204:9): [True: 0, False: 4.16M]
  ------------------
  205|      0|        ctx->err_stack--;
  206|  4.16M|    else {
  207|  4.16M|        unsigned int fp = BN_STACK_pop(&ctx->stack);
  208|       |        /* Does this stack frame have anything to release? */
  209|  4.16M|        if (fp < ctx->used)
  ------------------
  |  Branch (209:13): [True: 3.99M, False: 177k]
  ------------------
  210|  3.99M|            BN_POOL_release(&ctx->pool, ctx->used - fp);
  211|  4.16M|        ctx->used = fp;
  212|       |        /* Unjam "too_many" in case "get" had failed */
  213|  4.16M|        ctx->too_many = 0;
  214|  4.16M|    }
  215|       |    CTXDBG("LEAVE BN_CTX_end()", ctx);
  ------------------
  |  |  110|  4.16M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  4.16M|    do {                           \
  |  |  |  |  220|  4.16M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  4.16M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  4.16M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  4.16M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  4.16M|    }                            \
  |  |  |  |  225|  4.16M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|  4.16M|}
BN_CTX_get:
  219|  12.3M|{
  220|  12.3M|    BIGNUM *ret;
  221|       |
  222|  12.3M|    CTXDBG("ENTER BN_CTX_get()", ctx);
  ------------------
  |  |  110|  12.3M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  12.3M|    do {                           \
  |  |  |  |  220|  12.3M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  12.3M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 12.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  12.3M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  12.3M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  12.3M|    }                            \
  |  |  |  |  225|  12.3M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 12.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|  12.3M|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (223:9): [True: 0, False: 12.3M]
  |  Branch (223:27): [True: 0, False: 12.3M]
  ------------------
  224|      0|        return NULL;
  225|  12.3M|    if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {
  ------------------
  |  Branch (225:9): [True: 0, False: 12.3M]
  ------------------
  226|       |        /*
  227|       |         * Setting too_many prevents repeated "get" attempts from cluttering
  228|       |         * the error stack.
  229|       |         */
  230|      0|        ctx->too_many = 1;
  231|      0|        ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  232|      0|        return NULL;
  233|      0|    }
  234|       |    /* OK, make sure the returned bignum is "zero" */
  235|  12.3M|    BN_zero(ret);
  ------------------
  |  |  201|  12.3M|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  236|       |    /* clear BN_FLG_CONSTTIME if leaked from previous frames */
  237|  12.3M|    ret->flags &= (~BN_FLG_CONSTTIME);
  ------------------
  |  |   67|  12.3M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  238|  12.3M|    ctx->used++;
  239|       |    CTXDBG("LEAVE BN_CTX_get()", ctx);
  ------------------
  |  |  110|  12.3M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  12.3M|    do {                           \
  |  |  |  |  220|  12.3M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  12.3M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 12.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  12.3M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  12.3M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  12.3M|    }                            \
  |  |  |  |  225|  12.3M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 12.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  240|  12.3M|    return ret;
  241|  12.3M|}
ossl_bn_get_libctx:
  244|  1.58k|{
  245|  1.58k|    if (ctx == NULL)
  ------------------
  |  Branch (245:9): [True: 0, False: 1.58k]
  ------------------
  246|      0|        return NULL;
  247|  1.58k|    return ctx->libctx;
  248|  1.58k|}
bn_ctx.c:BN_STACK_init:
  255|   815k|{
  256|       |    st->indexes = NULL;
  257|   815k|    st->depth = st->size = 0;
  258|   815k|}
bn_ctx.c:BN_STACK_finish:
  261|   815k|{
  262|   815k|    OPENSSL_free(st->indexes);
  ------------------
  |  |  132|   815k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  263|       |    st->indexes = NULL;
  264|   815k|}
bn_ctx.c:BN_STACK_push:
  267|  4.16M|{
  268|  4.16M|    if (st->depth == st->size) {
  ------------------
  |  Branch (268:9): [True: 639k, False: 3.53M]
  ------------------
  269|       |        /* Need to expand */
  270|   639k|        unsigned int newsize = st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
  ------------------
  |  |   17|   639k|#define BN_CTX_START_FRAMES 32
  ------------------
  |  Branch (270:32): [True: 0, False: 639k]
  ------------------
  271|   639k|        unsigned int *newitems;
  272|       |
  273|   639k|        if ((newitems = OPENSSL_malloc_array(newsize, sizeof(*newitems))) == NULL)
  ------------------
  |  |  111|   639k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (273:13): [True: 0, False: 639k]
  ------------------
  274|      0|            return 0;
  275|   639k|        if (st->depth)
  ------------------
  |  Branch (275:13): [True: 0, False: 639k]
  ------------------
  276|      0|            memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth);
  277|   639k|        OPENSSL_free(st->indexes);
  ------------------
  |  |  132|   639k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  278|   639k|        st->indexes = newitems;
  279|   639k|        st->size = newsize;
  280|   639k|    }
  281|  4.16M|    st->indexes[(st->depth)++] = idx;
  282|  4.16M|    return 1;
  283|  4.16M|}
bn_ctx.c:BN_STACK_pop:
  286|  4.16M|{
  287|  4.16M|    return st->indexes[--(st->depth)];
  288|  4.16M|}
bn_ctx.c:BN_POOL_init:
  295|   815k|{
  296|       |    p->head = p->current = p->tail = NULL;
  297|   815k|    p->used = p->size = 0;
  298|   815k|}
bn_ctx.c:BN_POOL_finish:
  301|   815k|{
  302|   815k|    unsigned int loop;
  303|   815k|    BIGNUM *bn;
  304|       |
  305|  1.29M|    while (p->head) {
  ------------------
  |  Branch (305:12): [True: 476k, False: 815k]
  ------------------
  306|  8.09M|        for (loop = 0, bn = p->head->vals; loop++ < BN_CTX_POOL_SIZE; bn++)
  ------------------
  |  |   15|  8.09M|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (306:44): [True: 7.62M, False: 476k]
  ------------------
  307|  7.62M|            if (bn->d)
  ------------------
  |  Branch (307:17): [True: 3.90M, False: 3.71M]
  ------------------
  308|  3.90M|                BN_clear_free(bn);
  309|   476k|        p->current = p->head->next;
  310|   476k|        OPENSSL_free(p->head);
  ------------------
  |  |  132|   476k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  311|   476k|        p->head = p->current;
  312|   476k|    }
  313|   815k|}
bn_ctx.c:BN_POOL_get:
  316|  12.3M|{
  317|  12.3M|    BIGNUM *bn;
  318|  12.3M|    unsigned int loop;
  319|       |
  320|       |    /* Full; allocate a new pool item and link it in. */
  321|  12.3M|    if (p->used == p->size) {
  ------------------
  |  Branch (321:9): [True: 476k, False: 11.8M]
  ------------------
  322|   476k|        BN_POOL_ITEM *item;
  323|       |
  324|   476k|        if ((item = OPENSSL_malloc(sizeof(*item))) == NULL)
  ------------------
  |  |  107|   476k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (324:13): [True: 0, False: 476k]
  ------------------
  325|      0|            return NULL;
  326|  8.09M|        for (loop = 0, bn = item->vals; loop++ < BN_CTX_POOL_SIZE; bn++) {
  ------------------
  |  |   15|  8.09M|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (326:41): [True: 7.62M, False: 476k]
  ------------------
  327|  7.62M|            bn_init(bn);
  328|  7.62M|            if ((flag & BN_FLG_SECURE) != 0)
  ------------------
  |  |   68|  7.62M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (328:17): [True: 10.3k, False: 7.61M]
  ------------------
  329|  10.3k|                BN_set_flags(bn, BN_FLG_SECURE);
  ------------------
  |  |   68|  10.3k|#define BN_FLG_SECURE 0x08
  ------------------
  330|  7.62M|        }
  331|   476k|        item->prev = p->tail;
  332|   476k|        item->next = NULL;
  333|       |
  334|   476k|        if (p->head == NULL)
  ------------------
  |  Branch (334:13): [True: 476k, False: 288]
  ------------------
  335|   476k|            p->head = p->current = p->tail = item;
  336|    288|        else {
  337|    288|            p->tail->next = item;
  338|    288|            p->tail = item;
  339|    288|            p->current = item;
  340|    288|        }
  341|   476k|        p->size += BN_CTX_POOL_SIZE;
  ------------------
  |  |   15|   476k|#define BN_CTX_POOL_SIZE 16
  ------------------
  342|   476k|        p->used++;
  343|       |        /* Return the first bignum from the new pool */
  344|   476k|        return item->vals;
  345|   476k|    }
  346|       |
  347|  11.8M|    if (!p->used)
  ------------------
  |  Branch (347:9): [True: 664k, False: 11.2M]
  ------------------
  348|   664k|        p->current = p->head;
  349|  11.2M|    else if ((p->used % BN_CTX_POOL_SIZE) == 0)
  ------------------
  |  |   15|  11.2M|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (349:14): [True: 0, False: 11.2M]
  ------------------
  350|      0|        p->current = p->current->next;
  351|  11.8M|    return p->current->vals + ((p->used++) % BN_CTX_POOL_SIZE);
  ------------------
  |  |   15|  11.8M|#define BN_CTX_POOL_SIZE 16
  ------------------
  352|  12.3M|}
bn_ctx.c:BN_POOL_release:
  355|  3.99M|{
  356|  3.99M|    unsigned int offset = (p->used - 1) % BN_CTX_POOL_SIZE;
  ------------------
  |  |   15|  3.99M|#define BN_CTX_POOL_SIZE 16
  ------------------
  357|       |
  358|  3.99M|    p->used -= num;
  359|  16.3M|    while (num--) {
  ------------------
  |  Branch (359:12): [True: 12.3M, False: 3.99M]
  ------------------
  360|  12.3M|        bn_check_top(p->current->vals + offset);
  361|  12.3M|        if (offset == 0) {
  ------------------
  |  Branch (361:13): [True: 1.14M, False: 11.2M]
  ------------------
  362|  1.14M|            offset = BN_CTX_POOL_SIZE - 1;
  ------------------
  |  |   15|  1.14M|#define BN_CTX_POOL_SIZE 16
  ------------------
  363|  1.14M|            p->current = p->current->prev;
  364|  1.14M|        } else
  365|  11.2M|            offset--;
  366|  12.3M|    }
  367|  3.99M|}

BN_div:
  213|  1.90M|{
  214|  1.90M|    int ret;
  215|       |
  216|  1.90M|    if (BN_is_zero(divisor)) {
  ------------------
  |  Branch (216:9): [True: 0, False: 1.90M]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_BN, BN_R_DIV_BY_ZERO);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        return 0;
  219|      0|    }
  220|       |
  221|       |    /*
  222|       |     * Invalid zero-padding would have particularly bad consequences so don't
  223|       |     * just rely on bn_check_top() here (bn_check_top() works only for
  224|       |     * BN_DEBUG builds)
  225|       |     */
  226|  1.90M|    if (divisor->d[divisor->top - 1] == 0) {
  ------------------
  |  Branch (226:9): [True: 0, False: 1.90M]
  ------------------
  227|      0|        ERR_raise(ERR_LIB_BN, BN_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|        return 0;
  229|      0|    }
  230|       |
  231|  1.90M|    ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
  232|       |
  233|  1.90M|    if (ret) {
  ------------------
  |  Branch (233:9): [True: 1.90M, False: 0]
  ------------------
  234|  1.90M|        if (dv != NULL)
  ------------------
  |  Branch (234:13): [True: 150k, False: 1.75M]
  ------------------
  235|   150k|            bn_correct_top(dv);
  236|  1.90M|        if (rm != NULL)
  ------------------
  |  Branch (236:13): [True: 1.75M, False: 150k]
  ------------------
  237|  1.75M|            bn_correct_top(rm);
  238|  1.90M|    }
  239|       |
  240|  1.90M|    return ret;
  241|  1.90M|}
bn_div_fixed_top:
  268|  1.90M|{
  269|  1.90M|    int norm_shift, i, j, loop;
  270|  1.90M|    BIGNUM *tmp, *snum, *sdiv, *res;
  271|  1.90M|    BN_ULONG *resp, *wnum, *wnumtop;
  272|  1.90M|    BN_ULONG d0, d1;
  273|  1.90M|    int num_n, div_n, num_neg;
  274|       |
  275|  1.90M|    assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0);
  ------------------
  |  Branch (275:5): [True: 0, False: 1.90M]
  |  Branch (275:5): [True: 0, False: 0]
  |  Branch (275:5): [True: 1.90M, False: 0]
  |  Branch (275:5): [True: 1.90M, False: 0]
  ------------------
  276|       |
  277|  1.90M|    bn_check_top(num);
  278|  1.90M|    bn_check_top(divisor);
  279|  1.90M|    bn_check_top(dv);
  280|  1.90M|    bn_check_top(rm);
  281|       |
  282|  1.90M|    BN_CTX_start(ctx);
  283|  1.90M|    res = (dv == NULL) ? BN_CTX_get(ctx) : dv;
  ------------------
  |  Branch (283:11): [True: 1.75M, False: 150k]
  ------------------
  284|  1.90M|    tmp = BN_CTX_get(ctx);
  285|  1.90M|    snum = BN_CTX_get(ctx);
  286|  1.90M|    sdiv = BN_CTX_get(ctx);
  287|  1.90M|    if (sdiv == NULL)
  ------------------
  |  Branch (287:9): [True: 0, False: 1.90M]
  ------------------
  288|      0|        goto err;
  289|       |
  290|       |    /* First we normalise the numbers */
  291|  1.90M|    if (!BN_copy(sdiv, divisor))
  ------------------
  |  Branch (291:9): [True: 0, False: 1.90M]
  ------------------
  292|      0|        goto err;
  293|  1.90M|    norm_shift = bn_left_align(sdiv);
  294|  1.90M|    sdiv->neg = 0;
  295|       |    /*
  296|       |     * Note that bn_lshift_fixed_top's output is always one limb longer
  297|       |     * than input, even when norm_shift is zero. This means that amount of
  298|       |     * inner loop iterations is invariant of dividend value, and that one
  299|       |     * doesn't need to compare dividend and divisor if they were originally
  300|       |     * of the same bit length.
  301|       |     */
  302|  1.90M|    if (!(bn_lshift_fixed_top(snum, num, norm_shift)))
  ------------------
  |  Branch (302:9): [True: 0, False: 1.90M]
  ------------------
  303|      0|        goto err;
  304|       |
  305|  1.90M|    div_n = sdiv->top;
  306|  1.90M|    num_n = snum->top;
  307|       |
  308|  1.90M|    if (num_n <= div_n) {
  ------------------
  |  Branch (308:9): [True: 324k, False: 1.57M]
  ------------------
  309|       |        /* caller didn't pad dividend -> no constant-time guarantee... */
  310|   324k|        if (bn_wexpand(snum, div_n + 1) == NULL)
  ------------------
  |  Branch (310:13): [True: 0, False: 324k]
  ------------------
  311|      0|            goto err;
  312|   324k|        memset(&(snum->d[num_n]), 0, (div_n - num_n + 1) * sizeof(BN_ULONG));
  313|   324k|        snum->top = num_n = div_n + 1;
  314|   324k|    }
  315|       |
  316|  1.90M|    loop = num_n - div_n;
  317|       |    /*
  318|       |     * Lets setup a 'window' into snum This is the part that corresponds to
  319|       |     * the current 'area' being divided
  320|       |     */
  321|  1.90M|    wnum = &(snum->d[loop]);
  322|  1.90M|    wnumtop = &(snum->d[num_n - 1]);
  323|       |
  324|       |    /* Get the top 2 words of sdiv */
  325|  1.90M|    d0 = sdiv->d[div_n - 1];
  326|  1.90M|    d1 = (div_n == 1) ? 0 : sdiv->d[div_n - 2];
  ------------------
  |  Branch (326:10): [True: 451k, False: 1.45M]
  ------------------
  327|       |
  328|       |    /* Setup quotient */
  329|  1.90M|    if (!bn_wexpand(res, loop))
  ------------------
  |  Branch (329:9): [True: 0, False: 1.90M]
  ------------------
  330|      0|        goto err;
  331|  1.90M|    num_neg = num->neg;
  332|  1.90M|    res->neg = (num_neg ^ divisor->neg);
  333|  1.90M|    res->top = loop;
  334|  1.90M|    res->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.90M|#define BN_FLG_FIXED_TOP 0
  ------------------
  335|  1.90M|    resp = &(res->d[loop]);
  336|       |
  337|       |    /* space for temp */
  338|  1.90M|    if (!bn_wexpand(tmp, (div_n + 1)))
  ------------------
  |  Branch (338:9): [True: 0, False: 1.90M]
  ------------------
  339|      0|        goto err;
  340|       |
  341|  5.33M|    for (i = 0; i < loop; i++, wnumtop--) {
  ------------------
  |  Branch (341:17): [True: 3.43M, False: 1.90M]
  ------------------
  342|  3.43M|        BN_ULONG q, l0;
  343|       |        /*
  344|       |         * the first part of the loop uses the top two words of snum and sdiv
  345|       |         * to calculate a BN_ULONG q such that | wnum - sdiv * q | < sdiv
  346|       |         */
  347|       |#if defined(BN_DIV3W)
  348|       |        q = bn_div_3_words(wnumtop, d1, d0);
  349|       |#else
  350|  3.43M|        BN_ULONG n0, n1, rem = 0;
  351|       |
  352|  3.43M|        n0 = wnumtop[0];
  353|  3.43M|        n1 = wnumtop[-1];
  354|  3.43M|        if (n0 == d0)
  ------------------
  |  Branch (354:13): [True: 0, False: 3.43M]
  ------------------
  355|      0|            q = BN_MASK2;
  ------------------
  |  |   77|      0|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  356|  3.43M|        else { /* n0 < d0 */
  357|  3.43M|            BN_ULONG n2 = (wnumtop == wnum) ? 0 : wnumtop[-2];
  ------------------
  |  Branch (357:27): [True: 902k, False: 2.53M]
  ------------------
  358|       |#ifdef BN_LLONG
  359|       |            BN_ULLONG t2;
  360|       |
  361|       |#if defined(BN_LLONG) && defined(BN_DIV2W) && !defined(bn_div_words)
  362|       |            q = (BN_ULONG)(((((BN_ULLONG)n0) << BN_BITS2) | n1) / d0);
  363|       |#else
  364|       |            q = bn_div_words(n0, n1, d0);
  365|       |#endif
  366|       |
  367|       |#ifndef REMAINDER_IS_ALREADY_CALCULATED
  368|       |            /*
  369|       |             * rem doesn't have to be BN_ULLONG. The least we
  370|       |             * know it's less that d0, isn't it?
  371|       |             */
  372|       |            rem = (n1 - q * d0) & BN_MASK2;
  373|       |#endif
  374|       |            t2 = (BN_ULLONG)d1 * q;
  375|       |
  376|       |            for (;;) {
  377|       |                if (t2 <= ((((BN_ULLONG)rem) << BN_BITS2) | n2))
  378|       |                    break;
  379|       |                q--;
  380|       |                rem += d0;
  381|       |                if (rem < d0)
  382|       |                    break; /* don't let rem overflow */
  383|       |                t2 -= d1;
  384|       |            }
  385|       |#else /* !BN_LLONG */
  386|  3.43M|            BN_ULONG t2l, t2h;
  387|       |
  388|  3.43M|            q = bn_div_words(n0, n1, d0);
  389|  3.43M|#ifndef REMAINDER_IS_ALREADY_CALCULATED
  390|  3.43M|            rem = (n1 - q * d0) & BN_MASK2;
  ------------------
  |  |   77|  3.43M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  391|  3.43M|#endif
  392|       |
  393|       |#if defined(BN_UMULT_LOHI)
  394|       |            BN_UMULT_LOHI(t2l, t2h, d1, q);
  395|       |#elif defined(BN_UMULT_HIGH)
  396|       |            t2l = d1 * q;
  397|       |            t2h = BN_UMULT_HIGH(d1, q);
  398|       |#else
  399|  3.43M|            {
  400|  3.43M|                BN_ULONG ql, qh;
  401|  3.43M|                t2l = LBITS(d1);
  ------------------
  |  |  560|  3.43M|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  3.43M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  402|  3.43M|                t2h = HBITS(d1);
  ------------------
  |  |  561|  3.43M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   76|  3.43M|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  3.43M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  403|  3.43M|                ql = LBITS(q);
  ------------------
  |  |  560|  3.43M|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  3.43M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  404|  3.43M|                qh = HBITS(q);
  ------------------
  |  |  561|  3.43M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   76|  3.43M|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  3.43M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  405|  3.43M|                mul64(t2l, t2h, ql, qh); /* t2=(BN_ULLONG)d1*q; */
  ------------------
  |  |  569|  3.43M|    {                                      \
  |  |  570|  3.43M|        BN_ULONG m, m1, lt, ht;            \
  |  |  571|  3.43M|                                           \
  |  |  572|  3.43M|        lt = l;                            \
  |  |  573|  3.43M|        ht = h;                            \
  |  |  574|  3.43M|        m = (bh) * (lt);                   \
  |  |  575|  3.43M|        lt = (bl) * (lt);                  \
  |  |  576|  3.43M|        m1 = (bl) * (ht);                  \
  |  |  577|  3.43M|        ht = (bh) * (ht);                  \
  |  |  578|  3.43M|        m = (m + m1) & BN_MASK2;           \
  |  |  ------------------
  |  |  |  |   77|  3.43M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  579|  3.43M|        ht += L2HBITS((BN_ULONG)(m < m1)); \
  |  |  ------------------
  |  |  |  |  562|  3.43M|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.43M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  3.43M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  580|  3.43M|        ht += HBITS(m);                    \
  |  |  ------------------
  |  |  |  |  561|  3.43M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.43M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|  3.43M|#define BN_MASK2l (0xffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  3.43M|        m1 = L2HBITS(m);                   \
  |  |  ------------------
  |  |  |  |  562|  3.43M|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.43M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  3.43M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  3.43M|        lt = (lt + m1) & BN_MASK2;         \
  |  |  ------------------
  |  |  |  |   77|  3.43M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  583|  3.43M|        ht += (lt < m1);                   \
  |  |  584|  3.43M|        (l) = lt;                          \
  |  |  585|  3.43M|        (h) = ht;                          \
  |  |  586|  3.43M|    }
  ------------------
  406|  3.43M|            }
  407|  3.43M|#endif
  408|       |
  409|  3.43M|            for (;;) {
  410|  3.43M|                if ((t2h < rem) || ((t2h == rem) && (t2l <= n2)))
  ------------------
  |  Branch (410:21): [True: 2.47M, False: 955k]
  |  Branch (410:37): [True: 937k, False: 17.8k]
  |  Branch (410:53): [True: 937k, False: 0]
  ------------------
  411|  3.41M|                    break;
  412|  17.8k|                q--;
  413|  17.8k|                rem += d0;
  414|  17.8k|                if (rem < d0)
  ------------------
  |  Branch (414:21): [True: 17.8k, False: 0]
  ------------------
  415|  17.8k|                    break; /* don't let rem overflow */
  416|      0|                if (t2l < d1)
  ------------------
  |  Branch (416:21): [True: 0, False: 0]
  ------------------
  417|      0|                    t2h--;
  418|      0|                t2l -= d1;
  419|      0|            }
  420|  3.43M|#endif /* !BN_LLONG */
  421|  3.43M|        }
  422|  3.43M|#endif /* !BN_DIV3W */
  423|       |
  424|  3.43M|        l0 = bn_mul_words(tmp->d, sdiv->d, div_n, q);
  425|  3.43M|        tmp->d[div_n] = l0;
  426|  3.43M|        wnum--;
  427|       |        /*
  428|       |         * ignore top values of the bignums just sub the two BN_ULONG arrays
  429|       |         * with bn_sub_words
  430|       |         */
  431|  3.43M|        l0 = bn_sub_words(wnum, wnum, tmp->d, div_n + 1);
  432|  3.43M|        q -= l0;
  433|       |        /*
  434|       |         * Note: As we have considered only the leading two BN_ULONGs in
  435|       |         * the calculation of q, sdiv * q might be greater than wnum (but
  436|       |         * then (q-1) * sdiv is less or equal than wnum)
  437|       |         */
  438|  20.9M|        for (l0 = 0 - l0, j = 0; j < div_n; j++)
  ------------------
  |  Branch (438:34): [True: 17.5M, False: 3.43M]
  ------------------
  439|  17.5M|            tmp->d[j] = sdiv->d[j] & l0;
  440|  3.43M|        l0 = bn_add_words(wnum, wnum, tmp->d, div_n);
  441|  3.43M|        (*wnumtop) += l0;
  442|  3.43M|        assert((*wnumtop) == 0);
  ------------------
  |  Branch (442:9): [True: 0, False: 3.43M]
  |  Branch (442:9): [True: 3.43M, False: 0]
  ------------------
  443|       |
  444|       |        /* store part of the result */
  445|  3.43M|        *--resp = q;
  446|  3.43M|    }
  447|       |    /* snum holds remainder, it's as wide as divisor */
  448|  1.90M|    snum->neg = num_neg;
  449|  1.90M|    snum->top = div_n;
  450|  1.90M|    snum->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.90M|#define BN_FLG_FIXED_TOP 0
  ------------------
  451|       |
  452|  1.90M|    if (rm != NULL && bn_rshift_fixed_top(rm, snum, norm_shift) == 0)
  ------------------
  |  Branch (452:9): [True: 1.75M, False: 150k]
  |  Branch (452:23): [True: 0, False: 1.75M]
  ------------------
  453|      0|        goto err;
  454|       |
  455|  1.90M|    BN_CTX_end(ctx);
  456|  1.90M|    return 1;
  457|      0|err:
  458|      0|    bn_check_top(rm);
  459|      0|    BN_CTX_end(ctx);
  460|      0|    return 0;
  461|  1.90M|}
bn_div.c:bn_left_align:
  142|  1.90M|{
  143|  1.90M|    BN_ULONG *d = num->d, n, m, rmask;
  144|  1.90M|    int top = num->top;
  145|  1.90M|    int rshift = BN_num_bits_word(d[top - 1]), lshift, i;
  146|       |
  147|  1.90M|    lshift = BN_BITS2 - rshift;
  ------------------
  |  |   54|  1.90M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.90M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  148|  1.90M|    rshift %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|  1.90M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.90M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  149|  1.90M|    rmask = (BN_ULONG)0 - rshift; /* rmask = 0 - (rshift != 0) */
  150|  1.90M|    rmask |= rmask >> 8;
  151|       |
  152|  10.9M|    for (i = 0, m = 0; i < top; i++) {
  ------------------
  |  Branch (152:24): [True: 9.08M, False: 1.90M]
  ------------------
  153|  9.08M|        n = d[i];
  154|  9.08M|        d[i] = ((n << lshift) | m) & BN_MASK2;
  ------------------
  |  |   77|  9.08M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  155|  9.08M|        m = (n >> rshift) & rmask;
  156|  9.08M|    }
  157|       |
  158|  1.90M|    return lshift;
  159|  1.90M|}

ossl_err_load_BN_strings:
   50|      1|{
   51|      1|#ifndef OPENSSL_NO_ERR
   52|      1|    if (ERR_reason_error_string(BN_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (52:9): [True: 1, False: 0]
  ------------------
   53|      1|        ERR_load_strings_const(BN_str_reasons);
   54|      1|#endif
   55|      1|    return 1;
   56|      1|}

BN_mod_exp_mont:
  313|    498|{
  314|    498|    int i, j, bits, ret = 0, wstart, wend, window;
  315|    498|    int start = 1;
  316|    498|    BIGNUM *d, *r;
  317|    498|    const BIGNUM *aa;
  318|       |    /* Table of variables obtained from 'ctx' */
  319|    498|    BIGNUM *val[TABLE_SIZE];
  320|    498|    BN_MONT_CTX *mont = NULL;
  321|       |
  322|    498|    bn_check_top(a);
  323|    498|    bn_check_top(p);
  324|    498|    bn_check_top(m);
  325|       |
  326|    498|    if (!BN_is_odd(m)) {
  ------------------
  |  Branch (326:9): [True: 0, False: 498]
  ------------------
  327|      0|        ERR_raise(ERR_LIB_BN, BN_R_CALLED_WITH_EVEN_MODULUS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  328|      0|        return 0;
  329|      0|    }
  330|       |
  331|    498|    if (m->top <= BN_CONSTTIME_SIZE_LIMIT
  ------------------
  |  |   46|    996|#define BN_CONSTTIME_SIZE_LIMIT (INT_MAX / BN_BYTES / 256)
  |  |  ------------------
  |  |  |  |   38|    498|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (331:9): [True: 498, False: 0]
  ------------------
  332|    498|        && (BN_get_flags(p, BN_FLG_CONSTTIME) != 0
  ------------------
  |  |   67|    498|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (332:13): [True: 210, False: 288]
  ------------------
  333|    288|            || BN_get_flags(a, BN_FLG_CONSTTIME) != 0
  ------------------
  |  |   67|    288|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (333:16): [True: 0, False: 288]
  ------------------
  334|    288|            || BN_get_flags(m, BN_FLG_CONSTTIME) != 0)) {
  ------------------
  |  |   67|    288|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (334:16): [True: 0, False: 288]
  ------------------
  335|    210|        return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
  336|    210|    }
  337|       |
  338|    288|    bits = BN_num_bits(p);
  339|    288|    if (bits == 0) {
  ------------------
  |  Branch (339:9): [True: 0, False: 288]
  ------------------
  340|       |        /* x**0 mod 1, or x**0 mod -1 is still zero. */
  341|      0|        if (BN_abs_is_word(m, 1)) {
  ------------------
  |  Branch (341:13): [True: 0, False: 0]
  ------------------
  342|      0|            ret = 1;
  343|      0|            BN_zero(rr);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  344|      0|        } else {
  345|      0|            ret = BN_one(rr);
  ------------------
  |  |  196|      0|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  346|      0|        }
  347|      0|        return ret;
  348|      0|    }
  349|       |
  350|    288|    BN_CTX_start(ctx);
  351|    288|    d = BN_CTX_get(ctx);
  352|    288|    r = BN_CTX_get(ctx);
  353|    288|    val[0] = BN_CTX_get(ctx);
  354|    288|    if (val[0] == NULL)
  ------------------
  |  Branch (354:9): [True: 0, False: 288]
  ------------------
  355|      0|        goto err;
  356|       |
  357|       |    /*
  358|       |     * If this is not done, things will break in the montgomery part
  359|       |     */
  360|       |
  361|    288|    if (in_mont != NULL)
  ------------------
  |  Branch (361:9): [True: 288, False: 0]
  ------------------
  362|    288|        mont = in_mont;
  363|      0|    else {
  364|      0|        if ((mont = BN_MONT_CTX_new()) == NULL)
  ------------------
  |  Branch (364:13): [True: 0, False: 0]
  ------------------
  365|      0|            goto err;
  366|      0|        if (!BN_MONT_CTX_set(mont, m, ctx))
  ------------------
  |  Branch (366:13): [True: 0, False: 0]
  ------------------
  367|      0|            goto err;
  368|      0|    }
  369|       |
  370|    288|    if (a->neg || BN_ucmp(a, m) >= 0) {
  ------------------
  |  Branch (370:9): [True: 0, False: 288]
  |  Branch (370:19): [True: 0, False: 288]
  ------------------
  371|      0|        if (!BN_nnmod(val[0], a, m, ctx))
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  ------------------
  372|      0|            goto err;
  373|      0|        aa = val[0];
  374|      0|    } else
  375|    288|        aa = a;
  376|    288|    if (!bn_to_mont_fixed_top(val[0], aa, mont, ctx))
  ------------------
  |  Branch (376:9): [True: 0, False: 288]
  ------------------
  377|      0|        goto err; /* 1 */
  378|       |
  379|    288|    window = BN_window_bits_for_exponent_size(bits);
  ------------------
  |  |  309|    288|    ((b) > 671 ? 6 : (b) > 239 ? 5          \
  |  |  ------------------
  |  |  |  Branch (309:6): [True: 0, False: 288]
  |  |  |  Branch (309:22): [True: 288, False: 0]
  |  |  ------------------
  |  |  310|    288|            : (b) > 79         ? 4          \
  |  |  ------------------
  |  |  |  Branch (310:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  311|      0|            : (b) > 23         ? 3          \
  |  |  ------------------
  |  |  |  Branch (311:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  312|      0|                               : 1)
  ------------------
  380|    288|    if (window > 1) {
  ------------------
  |  Branch (380:9): [True: 288, False: 0]
  ------------------
  381|    288|        if (!bn_mul_mont_fixed_top(d, val[0], val[0], mont, ctx))
  ------------------
  |  Branch (381:13): [True: 0, False: 288]
  ------------------
  382|      0|            goto err; /* 2 */
  383|    288|        j = 1 << (window - 1);
  384|  4.60k|        for (i = 1; i < j; i++) {
  ------------------
  |  Branch (384:21): [True: 4.32k, False: 288]
  ------------------
  385|  4.32k|            if (((val[i] = BN_CTX_get(ctx)) == NULL) || !bn_mul_mont_fixed_top(val[i], val[i - 1], d, mont, ctx))
  ------------------
  |  Branch (385:17): [True: 0, False: 4.32k]
  |  Branch (385:57): [True: 0, False: 4.32k]
  ------------------
  386|      0|                goto err;
  387|  4.32k|        }
  388|    288|    }
  389|       |
  390|    288|    start = 1; /* This is used to avoid multiplication etc
  391|       |                * when there is only the value '1' in the
  392|       |                * buffer. */
  393|    288|    wstart = bits - 1; /* The top bit of the window */
  394|    288|    wend = 0; /* The bottom bit of the window */
  395|       |
  396|    288|#if 1 /* by Shay Gueron's suggestion */
  397|    288|    j = m->top; /* borrow j */
  398|    288|    if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
  ------------------
  |  |   54|    288|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|    288|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (398:9): [True: 288, False: 0]
  ------------------
  399|    288|        if (bn_wexpand(r, j) == NULL)
  ------------------
  |  Branch (399:13): [True: 0, False: 288]
  ------------------
  400|      0|            goto err;
  401|       |        /* 2^(top*BN_BITS2) - m */
  402|    288|        r->d[0] = (0 - m->d[0]) & BN_MASK2;
  ------------------
  |  |   77|    288|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  403|  1.15k|        for (i = 1; i < j; i++)
  ------------------
  |  Branch (403:21): [True: 864, False: 288]
  ------------------
  404|    864|            r->d[i] = (~m->d[i]) & BN_MASK2;
  ------------------
  |  |   77|  1.15k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  405|    288|        r->top = j;
  406|    288|        r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|    288|#define BN_FLG_FIXED_TOP 0
  ------------------
  407|    288|    } else
  408|      0|#endif
  409|      0|        if (!bn_to_mont_fixed_top(r, BN_value_one(), mont, ctx))
  ------------------
  |  Branch (409:13): [True: 0, False: 0]
  ------------------
  410|      0|        goto err;
  411|  22.1k|    for (;;) {
  412|  22.1k|        int wvalue; /* The 'value' of the window */
  413|       |
  414|  22.1k|        if (BN_is_bit_set(p, wstart) == 0) {
  ------------------
  |  Branch (414:13): [True: 9.21k, False: 12.9k]
  ------------------
  415|  9.21k|            if (!start) {
  ------------------
  |  Branch (415:17): [True: 9.21k, False: 0]
  ------------------
  416|  9.21k|                if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx))
  ------------------
  |  Branch (416:21): [True: 0, False: 9.21k]
  ------------------
  417|      0|                    goto err;
  418|  9.21k|            }
  419|  9.21k|            if (wstart == 0)
  ------------------
  |  Branch (419:17): [True: 0, False: 9.21k]
  ------------------
  420|      0|                break;
  421|  9.21k|            wstart--;
  422|  9.21k|            continue;
  423|  9.21k|        }
  424|       |        /*
  425|       |         * We now have wstart on a 'set' bit, we now need to work out how bit
  426|       |         * a window to do.  To do this we need to scan forward until the last
  427|       |         * set bit before the end of the window
  428|       |         */
  429|  12.9k|        wvalue = 1;
  430|  12.9k|        wend = 0;
  431|  64.5k|        for (i = 1; i < window; i++) {
  ------------------
  |  Branch (431:21): [True: 51.8k, False: 12.6k]
  ------------------
  432|  51.8k|            if (wstart - i < 0)
  ------------------
  |  Branch (432:17): [True: 288, False: 51.5k]
  ------------------
  433|    288|                break;
  434|  51.5k|            if (BN_is_bit_set(p, wstart - i)) {
  ------------------
  |  Branch (434:17): [True: 50.9k, False: 576]
  ------------------
  435|  50.9k|                wvalue <<= (i - wend);
  436|  50.9k|                wvalue |= 1;
  437|  50.9k|                wend = i;
  438|  50.9k|            }
  439|  51.5k|        }
  440|       |
  441|       |        /* wend is the size of the current window */
  442|  12.9k|        j = wend + 1;
  443|       |        /* add the 'bytes above' */
  444|  12.9k|        if (!start)
  ------------------
  |  Branch (444:13): [True: 12.6k, False: 288]
  ------------------
  445|  75.7k|            for (i = 0; i < j; i++) {
  ------------------
  |  Branch (445:25): [True: 63.0k, False: 12.6k]
  ------------------
  446|  63.0k|                if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx))
  ------------------
  |  Branch (446:21): [True: 0, False: 63.0k]
  ------------------
  447|      0|                    goto err;
  448|  63.0k|            }
  449|       |
  450|       |        /* wvalue will be an odd number < 2^window */
  451|  12.9k|        if (!bn_mul_mont_fixed_top(r, r, val[wvalue >> 1], mont, ctx))
  ------------------
  |  Branch (451:13): [True: 0, False: 12.9k]
  ------------------
  452|      0|            goto err;
  453|       |
  454|       |        /* move the 'window' down further */
  455|  12.9k|        wstart -= wend + 1;
  456|  12.9k|        start = 0;
  457|  12.9k|        if (wstart < 0)
  ------------------
  |  Branch (457:13): [True: 288, False: 12.6k]
  ------------------
  458|    288|            break;
  459|  12.9k|    }
  460|       |    /*
  461|       |     * Done with zero-padded intermediate BIGNUMs. Final BN_from_montgomery
  462|       |     * removes padding [if any] and makes return value suitable for public
  463|       |     * API consumer.
  464|       |     */
  465|       |#if defined(SPARC_T4_MONT)
  466|       |    if (OPENSSL_sparcv9cap_P[0] & (SPARCV9_VIS3 | SPARCV9_PREFER_FPU)) {
  467|       |        j = mont->N.top; /* borrow j */
  468|       |        val[0]->d[0] = 1; /* borrow val[0] */
  469|       |        for (i = 1; i < j; i++)
  470|       |            val[0]->d[i] = 0;
  471|       |        val[0]->top = j;
  472|       |        if (!BN_mod_mul_montgomery(rr, r, val[0], mont, ctx))
  473|       |            goto err;
  474|       |    } else
  475|       |#endif
  476|    288|        if (!BN_from_montgomery(rr, r, mont, ctx))
  ------------------
  |  Branch (476:13): [True: 0, False: 288]
  ------------------
  477|      0|        goto err;
  478|    288|    ret = 1;
  479|    288|err:
  480|    288|    if (in_mont == NULL)
  ------------------
  |  Branch (480:9): [True: 0, False: 288]
  ------------------
  481|      0|        BN_MONT_CTX_free(mont);
  482|    288|    BN_CTX_end(ctx);
  483|    288|    bn_check_top(rr);
  484|    288|    return ret;
  485|    288|}
bn_mod_exp_mont_fixed_top:
  606|    210|{
  607|    210|    int i, bits, ret = 0, window, wvalue, wmask, window0;
  608|    210|    int top;
  609|    210|    BN_MONT_CTX *mont = NULL;
  610|       |
  611|    210|    int numPowers;
  612|    210|    unsigned char *powerbufFree = NULL;
  613|    210|    int powerbufLen = 0;
  614|    210|    unsigned char *powerbuf = NULL;
  615|    210|    BIGNUM tmp, am;
  616|       |#if defined(SPARC_T4_MONT)
  617|       |    unsigned int t4 = 0;
  618|       |#endif
  619|       |
  620|    210|    if (!BN_is_odd(m)) {
  ------------------
  |  Branch (620:9): [True: 0, False: 210]
  ------------------
  621|      0|        ERR_raise(ERR_LIB_BN, BN_R_CALLED_WITH_EVEN_MODULUS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  622|      0|        return 0;
  623|      0|    }
  624|       |
  625|    210|    top = m->top;
  626|       |
  627|    210|    if (top > BN_CONSTTIME_SIZE_LIMIT) {
  ------------------
  |  |   46|    210|#define BN_CONSTTIME_SIZE_LIMIT (INT_MAX / BN_BYTES / 256)
  |  |  ------------------
  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (627:9): [True: 0, False: 210]
  ------------------
  628|       |        /* Prevent overflowing the powerbufLen computation below */
  629|      0|        return BN_mod_exp_mont(rr, a, p, m, ctx, in_mont);
  630|      0|    }
  631|       |
  632|       |    /*
  633|       |     * Use all bits stored in |p|, rather than |BN_num_bits|, so we do not leak
  634|       |     * whether the top bits are zero.
  635|       |     */
  636|    210|    bits = p->top * BN_BITS2;
  ------------------
  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  637|    210|    if (bits == 0) {
  ------------------
  |  Branch (637:9): [True: 0, False: 210]
  ------------------
  638|       |        /* x**0 mod 1, or x**0 mod -1 is still zero. */
  639|      0|        if (BN_abs_is_word(m, 1)) {
  ------------------
  |  Branch (639:13): [True: 0, False: 0]
  ------------------
  640|      0|            ret = 1;
  641|      0|            BN_zero(rr);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  642|      0|        } else {
  643|      0|            ret = BN_one(rr);
  ------------------
  |  |  196|      0|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  644|      0|        }
  645|      0|        return ret;
  646|      0|    }
  647|       |
  648|    210|    BN_CTX_start(ctx);
  649|       |
  650|       |    /*
  651|       |     * Allocate a montgomery context if it was not supplied by the caller. If
  652|       |     * this is not done, things will break in the montgomery part.
  653|       |     */
  654|    210|    if (in_mont != NULL)
  ------------------
  |  Branch (654:9): [True: 210, False: 0]
  ------------------
  655|    210|        mont = in_mont;
  656|      0|    else {
  657|      0|        if ((mont = BN_MONT_CTX_new()) == NULL)
  ------------------
  |  Branch (657:13): [True: 0, False: 0]
  ------------------
  658|      0|            goto err;
  659|      0|        if (!BN_MONT_CTX_set(mont, m, ctx))
  ------------------
  |  Branch (659:13): [True: 0, False: 0]
  ------------------
  660|      0|            goto err;
  661|      0|    }
  662|       |
  663|    210|    if (a->neg || BN_ucmp(a, m) >= 0) {
  ------------------
  |  Branch (663:9): [True: 0, False: 210]
  |  Branch (663:19): [True: 0, False: 210]
  ------------------
  664|      0|        BIGNUM *reduced = BN_CTX_get(ctx);
  665|      0|        if (reduced == NULL
  ------------------
  |  Branch (665:13): [True: 0, False: 0]
  ------------------
  666|      0|            || !BN_nnmod(reduced, a, m, ctx)) {
  ------------------
  |  Branch (666:16): [True: 0, False: 0]
  ------------------
  667|      0|            goto err;
  668|      0|        }
  669|      0|        a = reduced;
  670|      0|    }
  671|       |
  672|    210|#ifdef RSAZ_ENABLED
  673|       |    /*
  674|       |     * If the size of the operands allow it, perform the optimized
  675|       |     * RSAZ exponentiation. For further information see
  676|       |     * crypto/bn/rsaz_exp.c and accompanying assembly modules.
  677|       |     */
  678|    210|    if ((16 == a->top) && (16 == p->top) && (BN_num_bits(m) == 1024)
  ------------------
  |  Branch (678:9): [True: 0, False: 210]
  |  Branch (678:27): [True: 0, False: 0]
  |  Branch (678:45): [True: 0, False: 0]
  ------------------
  679|      0|        && rsaz_avx2_eligible()) {
  ------------------
  |  Branch (679:12): [True: 0, False: 0]
  ------------------
  680|      0|        if (NULL == bn_wexpand(rr, 16))
  ------------------
  |  Branch (680:13): [True: 0, False: 0]
  ------------------
  681|      0|            goto err;
  682|      0|        RSAZ_1024_mod_exp_avx2(rr->d, a->d, p->d, m->d, mont->RR.d,
  683|      0|            mont->n0[0]);
  684|      0|        rr->top = 16;
  685|      0|        rr->neg = 0;
  686|      0|        bn_correct_top(rr);
  687|      0|        ret = 1;
  688|      0|        goto err;
  689|    210|    } else if ((8 == a->top) && (8 == p->top) && (BN_num_bits(m) == 512)) {
  ------------------
  |  Branch (689:16): [True: 0, False: 210]
  |  Branch (689:33): [True: 0, False: 0]
  |  Branch (689:50): [True: 0, False: 0]
  ------------------
  690|      0|        if (NULL == bn_wexpand(rr, 8))
  ------------------
  |  Branch (690:13): [True: 0, False: 0]
  ------------------
  691|      0|            goto err;
  692|      0|        RSAZ_512_mod_exp(rr->d, a->d, p->d, m->d, mont->n0[0], mont->RR.d);
  693|      0|        rr->top = 8;
  694|      0|        rr->neg = 0;
  695|      0|        bn_correct_top(rr);
  696|      0|        ret = 1;
  697|      0|        goto err;
  698|      0|    }
  699|    210|#endif
  700|       |
  701|       |    /* Get the window size to use with size of p. */
  702|    210|    window = BN_window_bits_for_ctime_exponent_size(bits);
  ------------------
  |  |  333|    210|    ((b) > 937 ? 6 : (b) > 306 ? 5                \
  |  |  ------------------
  |  |  |  Branch (333:6): [True: 0, False: 210]
  |  |  |  Branch (333:22): [True: 141, False: 69]
  |  |  ------------------
  |  |  334|    210|            : (b) > 89         ? 4                \
  |  |  ------------------
  |  |  |  Branch (334:15): [True: 69, False: 0]
  |  |  ------------------
  |  |  335|     69|            : (b) > 22         ? 3                \
  |  |  ------------------
  |  |  |  Branch (335:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  336|      0|                               : 1)
  ------------------
  703|       |#if defined(SPARC_T4_MONT)
  704|       |    if (window >= 5 && (top & 15) == 0 && top <= 64 && (OPENSSL_sparcv9cap_P[1] & (CFR_MONTMUL | CFR_MONTSQR)) == (CFR_MONTMUL | CFR_MONTSQR) && (t4 = OPENSSL_sparcv9cap_P[0]))
  705|       |        window = 5;
  706|       |    else
  707|       |#endif
  708|    210|#if defined(OPENSSL_BN_ASM_MONT5)
  709|    210|        if (window >= 5 && top <= BN_SOFT_LIMIT) {
  ------------------
  |  |   52|    141|#define BN_SOFT_LIMIT (4096 / BN_BYTES)
  |  |  ------------------
  |  |  |  |   38|    141|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (709:13): [True: 141, False: 69]
  |  Branch (709:28): [True: 141, False: 0]
  ------------------
  710|    141|        window = 5; /* ~5% improvement for RSA2048 sign, and even
  711|       |                     * for RSA4096 */
  712|       |        /* reserve space for mont->N.d[] copy */
  713|    141|        powerbufLen += top * sizeof(mont->N.d[0]);
  714|    141|    }
  715|    210|#endif
  716|    210|    (void)0;
  717|       |
  718|       |    /*
  719|       |     * Allocate a buffer large enough to hold all of the pre-computed powers
  720|       |     * of am, am itself and tmp.
  721|       |     */
  722|    210|    numPowers = 1 << window;
  723|    210|    powerbufLen += sizeof(m->d[0]) * (top * numPowers + ((2 * top) > numPowers ? (2 * top) : numPowers));
  ------------------
  |  Branch (723:58): [True: 210, False: 0]
  ------------------
  724|    210|#ifdef alloca
  725|    210|    if (powerbufLen < 3072)
  ------------------
  |  Branch (725:9): [True: 0, False: 210]
  ------------------
  726|      0|        powerbufFree = alloca(powerbufLen + MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH);
  727|    210|    else
  728|    210|#endif
  729|    210|        if ((powerbufFree = OPENSSL_malloc(powerbufLen + MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH))
  ------------------
  |  |  107|    210|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (729:13): [True: 0, False: 210]
  ------------------
  730|    210|            == NULL)
  731|      0|        goto err;
  732|       |
  733|    210|    powerbuf = MOD_EXP_CTIME_ALIGN(powerbufFree);
  ------------------
  |  |  594|    210|    ((unsigned char *)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((size_t)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
  |  |  ------------------
  |  |  |  |  318|    210|#define MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH (64)
  |  |  ------------------
  |  |                   ((unsigned char *)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((size_t)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
  |  |  ------------------
  |  |  |  |  319|    210|#define MOD_EXP_CTIME_MIN_CACHE_LINE_MASK (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  318|    210|#define MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH (64)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|    210|    memset(powerbuf, 0, powerbufLen);
  735|       |
  736|    210|#ifdef alloca
  737|    210|    if (powerbufLen < 3072)
  ------------------
  |  Branch (737:9): [True: 0, False: 210]
  ------------------
  738|      0|        powerbufFree = NULL;
  739|    210|#endif
  740|       |
  741|       |    /* lay down tmp and am right after powers table */
  742|    210|    tmp.d = (BN_ULONG *)(powerbuf + sizeof(m->d[0]) * top * numPowers);
  743|    210|    am.d = tmp.d + top;
  744|    210|    tmp.top = am.top = 0;
  745|    210|    tmp.dmax = am.dmax = top;
  746|    210|    tmp.neg = am.neg = 0;
  747|    210|    tmp.flags = am.flags = BN_FLG_STATIC_DATA;
  ------------------
  |  |   59|    210|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  748|       |
  749|       |    /* prepare a^0 in Montgomery domain */
  750|    210|#if 1 /* by Shay Gueron's suggestion */
  751|    210|    if (m->d[top - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
  ------------------
  |  |   54|    210|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (751:9): [True: 210, False: 0]
  ------------------
  752|       |        /* 2^(top*BN_BITS2) - m */
  753|    210|        tmp.d[0] = (0 - m->d[0]) & BN_MASK2;
  ------------------
  |  |   77|    210|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  754|  15.3k|        for (i = 1; i < top; i++)
  ------------------
  |  Branch (754:21): [True: 15.1k, False: 210]
  ------------------
  755|  15.1k|            tmp.d[i] = (~m->d[i]) & BN_MASK2;
  ------------------
  |  |   77|  15.1k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  756|    210|        tmp.top = top;
  757|    210|        tmp.flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|    210|#define BN_FLG_FIXED_TOP 0
  ------------------
  758|    210|    } else
  759|      0|#endif
  760|      0|        if (!bn_to_mont_fixed_top(&tmp, BN_value_one(), mont, ctx))
  ------------------
  |  Branch (760:13): [True: 0, False: 0]
  ------------------
  761|      0|        goto err;
  762|       |
  763|       |    /* prepare a^1 in Montgomery domain */
  764|    210|    if (!bn_to_mont_fixed_top(&am, a, mont, ctx))
  ------------------
  |  Branch (764:9): [True: 0, False: 210]
  ------------------
  765|      0|        goto err;
  766|       |
  767|    210|    if (top > BN_SOFT_LIMIT)
  ------------------
  |  |   52|    210|#define BN_SOFT_LIMIT (4096 / BN_BYTES)
  |  |  ------------------
  |  |  |  |   38|    210|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (767:9): [True: 0, False: 210]
  ------------------
  768|      0|        goto fallback;
  769|       |
  770|       |#if defined(SPARC_T4_MONT)
  771|       |    if (t4) {
  772|       |        typedef int (*bn_pwr5_mont_f)(BN_ULONG *tp, const BN_ULONG *np,
  773|       |            const BN_ULONG *n0, const void *table,
  774|       |            int power, int bits);
  775|       |        int bn_pwr5_mont_t4_8(BN_ULONG *tp, const BN_ULONG *np,
  776|       |            const BN_ULONG *n0, const void *table,
  777|       |            int power, int bits);
  778|       |        int bn_pwr5_mont_t4_16(BN_ULONG *tp, const BN_ULONG *np,
  779|       |            const BN_ULONG *n0, const void *table,
  780|       |            int power, int bits);
  781|       |        int bn_pwr5_mont_t4_24(BN_ULONG *tp, const BN_ULONG *np,
  782|       |            const BN_ULONG *n0, const void *table,
  783|       |            int power, int bits);
  784|       |        int bn_pwr5_mont_t4_32(BN_ULONG *tp, const BN_ULONG *np,
  785|       |            const BN_ULONG *n0, const void *table,
  786|       |            int power, int bits);
  787|       |        static const bn_pwr5_mont_f pwr5_funcs[4] = {
  788|       |            bn_pwr5_mont_t4_8, bn_pwr5_mont_t4_16,
  789|       |            bn_pwr5_mont_t4_24, bn_pwr5_mont_t4_32
  790|       |        };
  791|       |        bn_pwr5_mont_f pwr5_worker = pwr5_funcs[top / 16 - 1];
  792|       |
  793|       |        typedef int (*bn_mul_mont_f)(BN_ULONG *rp, const BN_ULONG *ap,
  794|       |            const void *bp, const BN_ULONG *np,
  795|       |            const BN_ULONG *n0);
  796|       |        int bn_mul_mont_t4_8(BN_ULONG *rp, const BN_ULONG *ap, const void *bp,
  797|       |            const BN_ULONG *np, const BN_ULONG *n0);
  798|       |        int bn_mul_mont_t4_16(BN_ULONG *rp, const BN_ULONG *ap,
  799|       |            const void *bp, const BN_ULONG *np,
  800|       |            const BN_ULONG *n0);
  801|       |        int bn_mul_mont_t4_24(BN_ULONG *rp, const BN_ULONG *ap,
  802|       |            const void *bp, const BN_ULONG *np,
  803|       |            const BN_ULONG *n0);
  804|       |        int bn_mul_mont_t4_32(BN_ULONG *rp, const BN_ULONG *ap,
  805|       |            const void *bp, const BN_ULONG *np,
  806|       |            const BN_ULONG *n0);
  807|       |        static const bn_mul_mont_f mul_funcs[4] = {
  808|       |            bn_mul_mont_t4_8, bn_mul_mont_t4_16,
  809|       |            bn_mul_mont_t4_24, bn_mul_mont_t4_32
  810|       |        };
  811|       |        bn_mul_mont_f mul_worker = mul_funcs[top / 16 - 1];
  812|       |
  813|       |        void bn_mul_mont_vis3(BN_ULONG *rp, const BN_ULONG *ap,
  814|       |            const void *bp, const BN_ULONG *np,
  815|       |            const BN_ULONG *n0, int num);
  816|       |        void bn_mul_mont_t4(BN_ULONG *rp, const BN_ULONG *ap,
  817|       |            const void *bp, const BN_ULONG *np,
  818|       |            const BN_ULONG *n0, int num);
  819|       |        void bn_mul_mont_gather5_t4(BN_ULONG *rp, const BN_ULONG *ap,
  820|       |            const void *table, const BN_ULONG *np,
  821|       |            const BN_ULONG *n0, int num, int power);
  822|       |        void bn_flip_n_scatter5_t4(const BN_ULONG *inp, size_t num,
  823|       |            void *table, size_t power);
  824|       |        void bn_gather5_t4(BN_ULONG *out, size_t num,
  825|       |            void *table, size_t power);
  826|       |        void bn_flip_t4(BN_ULONG *dst, BN_ULONG *src, size_t num);
  827|       |
  828|       |        BN_ULONG *np = mont->N.d, *n0 = mont->n0;
  829|       |        int stride = 5 * (6 - (top / 16 - 1)); /* multiple of 5, but less
  830|       |                                                * than 32 */
  831|       |
  832|       |        /*
  833|       |         * BN_to_montgomery can contaminate words above .top [in
  834|       |         * BN_DEBUG build...
  835|       |         */
  836|       |        for (i = am.top; i < top; i++)
  837|       |            am.d[i] = 0;
  838|       |        for (i = tmp.top; i < top; i++)
  839|       |            tmp.d[i] = 0;
  840|       |
  841|       |        bn_flip_n_scatter5_t4(tmp.d, top, powerbuf, 0);
  842|       |        bn_flip_n_scatter5_t4(am.d, top, powerbuf, 1);
  843|       |        if (!(*mul_worker)(tmp.d, am.d, am.d, np, n0) && !(*mul_worker)(tmp.d, am.d, am.d, np, n0))
  844|       |            bn_mul_mont_vis3(tmp.d, am.d, am.d, np, n0, top);
  845|       |        bn_flip_n_scatter5_t4(tmp.d, top, powerbuf, 2);
  846|       |
  847|       |        for (i = 3; i < 32; i++) {
  848|       |            /* Calculate a^i = a^(i-1) * a */
  849|       |            if (!(*mul_worker)(tmp.d, tmp.d, am.d, np, n0) && !(*mul_worker)(tmp.d, tmp.d, am.d, np, n0))
  850|       |                bn_mul_mont_vis3(tmp.d, tmp.d, am.d, np, n0, top);
  851|       |            bn_flip_n_scatter5_t4(tmp.d, top, powerbuf, i);
  852|       |        }
  853|       |
  854|       |        /* switch to 64-bit domain */
  855|       |        np = alloca(top * sizeof(BN_ULONG));
  856|       |        top /= 2;
  857|       |        bn_flip_t4(np, mont->N.d, top);
  858|       |
  859|       |        /*
  860|       |         * The exponent may not have a whole number of fixed-size windows.
  861|       |         * To simplify the main loop, the initial window has between 1 and
  862|       |         * full-window-size bits such that what remains is always a whole
  863|       |         * number of windows
  864|       |         */
  865|       |        window0 = (bits - 1) % 5 + 1;
  866|       |        wmask = (1 << window0) - 1;
  867|       |        bits -= window0;
  868|       |        wvalue = bn_get_bits(p, bits) & wmask;
  869|       |        bn_gather5_t4(tmp.d, top, powerbuf, wvalue);
  870|       |
  871|       |        /*
  872|       |         * Scan the exponent one window at a time starting from the most
  873|       |         * significant bits.
  874|       |         */
  875|       |        while (bits > 0) {
  876|       |            if (bits < stride)
  877|       |                stride = bits;
  878|       |            bits -= stride;
  879|       |            wvalue = bn_get_bits(p, bits);
  880|       |
  881|       |            if ((*pwr5_worker)(tmp.d, np, n0, powerbuf, wvalue, stride))
  882|       |                continue;
  883|       |            /* retry once and fall back */
  884|       |            if ((*pwr5_worker)(tmp.d, np, n0, powerbuf, wvalue, stride))
  885|       |                continue;
  886|       |
  887|       |            bits += stride - 5;
  888|       |            wvalue >>= stride - 5;
  889|       |            wvalue &= 31;
  890|       |            bn_mul_mont_t4(tmp.d, tmp.d, tmp.d, np, n0, top);
  891|       |            bn_mul_mont_t4(tmp.d, tmp.d, tmp.d, np, n0, top);
  892|       |            bn_mul_mont_t4(tmp.d, tmp.d, tmp.d, np, n0, top);
  893|       |            bn_mul_mont_t4(tmp.d, tmp.d, tmp.d, np, n0, top);
  894|       |            bn_mul_mont_t4(tmp.d, tmp.d, tmp.d, np, n0, top);
  895|       |            bn_mul_mont_gather5_t4(tmp.d, tmp.d, powerbuf, np, n0, top,
  896|       |                wvalue);
  897|       |        }
  898|       |
  899|       |        bn_flip_t4(tmp.d, tmp.d, top);
  900|       |        top *= 2;
  901|       |        /* back to 32-bit domain */
  902|       |        tmp.top = top;
  903|       |        bn_correct_top(&tmp);
  904|       |        OPENSSL_cleanse(np, top * sizeof(BN_ULONG));
  905|       |    } else
  906|       |#endif
  907|    210|#if defined(OPENSSL_BN_ASM_MONT5)
  908|    210|        if (window == 5 && top > 1) {
  ------------------
  |  Branch (908:13): [True: 141, False: 69]
  |  Branch (908:28): [True: 141, False: 0]
  ------------------
  909|       |        /*
  910|       |         * This optimization uses ideas from https://eprint.iacr.org/2011/239,
  911|       |         * specifically optimization of cache-timing attack countermeasures,
  912|       |         * pre-computation optimization, and Almost Montgomery Multiplication.
  913|       |         *
  914|       |         * The paper discusses a 4-bit window to optimize 512-bit modular
  915|       |         * exponentiation, used in RSA-1024 with CRT, but RSA-1024 is no longer
  916|       |         * important.
  917|       |         *
  918|       |         * |bn_mul_mont_gather5| and |bn_power5| implement the "almost"
  919|       |         * reduction variant, so the values here may not be fully reduced.
  920|       |         * They are bounded by R (i.e. they fit in |top| words), not |m|.
  921|       |         * Additionally, we pass these "almost" reduced inputs into
  922|       |         * |bn_mul_mont|, which implements the normal reduction variant.
  923|       |         * Given those inputs, |bn_mul_mont| may not give reduced
  924|       |         * output, but it will still produce "almost" reduced output.
  925|       |         */
  926|    141|        void bn_mul_mont_gather5(BN_ULONG *rp, const BN_ULONG *ap,
  927|    141|            const void *table, const BN_ULONG *np,
  928|    141|            const BN_ULONG *n0, int num, int power);
  929|    141|        void bn_scatter5(const BN_ULONG *inp, size_t num,
  930|    141|            void *table, size_t power);
  931|    141|        void bn_gather5(BN_ULONG *out, size_t num, void *table, size_t power);
  932|    141|        void bn_power5(BN_ULONG *rp, const BN_ULONG *ap,
  933|    141|            const void *table, const BN_ULONG *np,
  934|    141|            const BN_ULONG *n0, int num, int power);
  935|    141|        int bn_get_bits5(const BN_ULONG *ap, int off);
  936|       |
  937|    141|        BN_ULONG *n0 = mont->n0, *np;
  938|       |
  939|       |        /*
  940|       |         * BN_to_montgomery can contaminate words above .top [in
  941|       |         * BN_DEBUG build...
  942|       |         */
  943|    141|        for (i = am.top; i < top; i++)
  ------------------
  |  Branch (943:26): [True: 0, False: 141]
  ------------------
  944|      0|            am.d[i] = 0;
  945|    141|        for (i = tmp.top; i < top; i++)
  ------------------
  |  Branch (945:27): [True: 0, False: 141]
  ------------------
  946|      0|            tmp.d[i] = 0;
  947|       |
  948|       |        /*
  949|       |         * copy mont->N.d[] to improve cache locality
  950|       |         */
  951|  13.3k|        for (np = am.d + top, i = 0; i < top; i++)
  ------------------
  |  Branch (951:38): [True: 13.1k, False: 141]
  ------------------
  952|  13.1k|            np[i] = mont->N.d[i];
  953|       |
  954|    141|        bn_scatter5(tmp.d, top, powerbuf, 0);
  955|    141|        bn_scatter5(am.d, am.top, powerbuf, 1);
  956|    141|        bn_mul_mont(tmp.d, am.d, am.d, np, n0, top);
  957|    141|        bn_scatter5(tmp.d, top, powerbuf, 2);
  958|       |
  959|       |#if 0
  960|       |        for (i = 3; i < 32; i++) {
  961|       |            /* Calculate a^i = a^(i-1) * a */
  962|       |            bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1);
  963|       |            bn_scatter5(tmp.d, top, powerbuf, i);
  964|       |        }
  965|       |#else
  966|       |        /* same as above, but uses squaring for 1/2 of operations */
  967|    564|        for (i = 4; i < 32; i *= 2) {
  ------------------
  |  Branch (967:21): [True: 423, False: 141]
  ------------------
  968|    423|            bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
  969|    423|            bn_scatter5(tmp.d, top, powerbuf, i);
  970|    423|        }
  971|    564|        for (i = 3; i < 8; i += 2) {
  ------------------
  |  Branch (971:21): [True: 423, False: 141]
  ------------------
  972|    423|            int j;
  973|    423|            bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1);
  974|    423|            bn_scatter5(tmp.d, top, powerbuf, i);
  975|  1.41k|            for (j = 2 * i; j < 32; j *= 2) {
  ------------------
  |  Branch (975:29): [True: 987, False: 423]
  ------------------
  976|    987|                bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
  977|    987|                bn_scatter5(tmp.d, top, powerbuf, j);
  978|    987|            }
  979|    423|        }
  980|    705|        for (; i < 16; i += 2) {
  ------------------
  |  Branch (980:16): [True: 564, False: 141]
  ------------------
  981|    564|            bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1);
  982|    564|            bn_scatter5(tmp.d, top, powerbuf, i);
  983|    564|            bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
  984|    564|            bn_scatter5(tmp.d, top, powerbuf, 2 * i);
  985|    564|        }
  986|  1.26k|        for (; i < 32; i += 2) {
  ------------------
  |  Branch (986:16): [True: 1.12k, False: 141]
  ------------------
  987|  1.12k|            bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1);
  988|  1.12k|            bn_scatter5(tmp.d, top, powerbuf, i);
  989|  1.12k|        }
  990|    141|#endif
  991|       |        /*
  992|       |         * The exponent may not have a whole number of fixed-size windows.
  993|       |         * To simplify the main loop, the initial window has between 1 and
  994|       |         * full-window-size bits such that what remains is always a whole
  995|       |         * number of windows
  996|       |         */
  997|    141|        window0 = (bits - 1) % 5 + 1;
  998|    141|        wmask = (1 << window0) - 1;
  999|    141|        bits -= window0;
 1000|    141|        wvalue = bn_get_bits(p, bits) & wmask;
 1001|    141|        bn_gather5(tmp.d, top, powerbuf, wvalue);
 1002|       |
 1003|       |        /*
 1004|       |         * Scan the exponent one window at a time starting from the most
 1005|       |         * significant bits.
 1006|       |         */
 1007|    141|        if (top & 7) {
  ------------------
  |  Branch (1007:13): [True: 0, False: 141]
  ------------------
 1008|      0|            while (bits > 0) {
  ------------------
  |  Branch (1008:20): [True: 0, False: 0]
  ------------------
 1009|      0|                bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
 1010|      0|                bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
 1011|      0|                bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
 1012|      0|                bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
 1013|      0|                bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top);
 1014|      0|                bn_mul_mont_gather5(tmp.d, tmp.d, powerbuf, np, n0, top,
 1015|      0|                    bn_get_bits5(p->d, bits -= 5));
 1016|      0|            }
 1017|    141|        } else {
 1018|  11.3k|            while (bits > 0) {
  ------------------
  |  Branch (1018:20): [True: 11.2k, False: 141]
  ------------------
 1019|  11.2k|                bn_power5(tmp.d, tmp.d, powerbuf, np, n0, top,
 1020|  11.2k|                    bn_get_bits5(p->d, bits -= 5));
 1021|  11.2k|            }
 1022|    141|        }
 1023|       |
 1024|    141|        tmp.top = top;
 1025|       |        /*
 1026|       |         * The result is now in |tmp| in Montgomery form, but it may not be
 1027|       |         * fully reduced. This is within bounds for |BN_from_montgomery|
 1028|       |         * (tmp < R <= m*R) so it will, when converting from Montgomery form,
 1029|       |         * produce a fully reduced result.
 1030|       |         *
 1031|       |         * This differs from Figure 2 of the paper, which uses AMM(h, 1) to
 1032|       |         * convert from Montgomery form with unreduced output, followed by an
 1033|       |         * extra reduction step. In the paper's terminology, we replace
 1034|       |         * steps 9 and 10 with MM(h, 1).
 1035|       |         */
 1036|    141|    } else
 1037|     69|#endif
 1038|     69|    {
 1039|     69|    fallback:
 1040|     69|        if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, 0, window))
  ------------------
  |  Branch (1040:13): [True: 0, False: 69]
  ------------------
 1041|      0|            goto err;
 1042|     69|        if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&am, top, powerbuf, 1, window))
  ------------------
  |  Branch (1042:13): [True: 0, False: 69]
  ------------------
 1043|      0|            goto err;
 1044|       |
 1045|       |        /*
 1046|       |         * If the window size is greater than 1, then calculate
 1047|       |         * val[i=2..2^winsize-1]. Powers are computed as a*a^(i-1) (even
 1048|       |         * powers could instead be computed as (a^(i/2))^2 to use the slight
 1049|       |         * performance advantage of sqr over mul).
 1050|       |         */
 1051|     69|        if (window > 1) {
  ------------------
  |  Branch (1051:13): [True: 69, False: 0]
  ------------------
 1052|     69|            if (!bn_mul_mont_fixed_top(&tmp, &am, &am, mont, ctx))
  ------------------
  |  Branch (1052:17): [True: 0, False: 69]
  ------------------
 1053|      0|                goto err;
 1054|     69|            if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, 2,
  ------------------
  |  Branch (1054:17): [True: 0, False: 69]
  ------------------
 1055|     69|                    window))
 1056|      0|                goto err;
 1057|    966|            for (i = 3; i < numPowers; i++) {
  ------------------
  |  Branch (1057:25): [True: 897, False: 69]
  ------------------
 1058|       |                /* Calculate a^i = a^(i-1) * a */
 1059|    897|                if (!bn_mul_mont_fixed_top(&tmp, &am, &tmp, mont, ctx))
  ------------------
  |  Branch (1059:21): [True: 0, False: 897]
  ------------------
 1060|      0|                    goto err;
 1061|    897|                if (!MOD_EXP_CTIME_COPY_TO_PREBUF(&tmp, top, powerbuf, i,
  ------------------
  |  Branch (1061:21): [True: 0, False: 897]
  ------------------
 1062|    897|                        window))
 1063|      0|                    goto err;
 1064|    897|            }
 1065|     69|        }
 1066|       |
 1067|       |        /*
 1068|       |         * The exponent may not have a whole number of fixed-size windows.
 1069|       |         * To simplify the main loop, the initial window has between 1 and
 1070|       |         * full-window-size bits such that what remains is always a whole
 1071|       |         * number of windows
 1072|       |         */
 1073|     69|        window0 = (bits - 1) % window + 1;
 1074|     69|        wmask = (1 << window0) - 1;
 1075|     69|        bits -= window0;
 1076|     69|        wvalue = bn_get_bits(p, bits) & wmask;
 1077|     69|        if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp, top, powerbuf, wvalue,
  ------------------
  |  Branch (1077:13): [True: 0, False: 69]
  ------------------
 1078|     69|                window))
 1079|      0|            goto err;
 1080|       |
 1081|     69|        wmask = (1 << window) - 1;
 1082|       |        /*
 1083|       |         * Scan the exponent one window at a time starting from the most
 1084|       |         * significant bits.
 1085|       |         */
 1086|  4.41k|        while (bits > 0) {
  ------------------
  |  Branch (1086:16): [True: 4.34k, False: 69]
  ------------------
 1087|       |
 1088|       |            /* Square the result window-size times */
 1089|  21.7k|            for (i = 0; i < window; i++)
  ------------------
  |  Branch (1089:25): [True: 17.3k, False: 4.34k]
  ------------------
 1090|  17.3k|                if (!bn_mul_mont_fixed_top(&tmp, &tmp, &tmp, mont, ctx))
  ------------------
  |  Branch (1090:21): [True: 0, False: 17.3k]
  ------------------
 1091|      0|                    goto err;
 1092|       |
 1093|       |            /*
 1094|       |             * Get a window's worth of bits from the exponent
 1095|       |             * This avoids calling BN_is_bit_set for each bit, which
 1096|       |             * is not only slower but also makes each bit vulnerable to
 1097|       |             * EM (and likely other) side-channel attacks like One&Done
 1098|       |             * (for details see "One&Done: A Single-Decryption EM-Based
 1099|       |             *  Attack on OpenSSL's Constant-Time Blinded RSA" by M. Alam,
 1100|       |             *  H. Khan, M. Dey, N. Sinha, R. Callan, A. Zajic, and
 1101|       |             *  M. Prvulovic, in USENIX Security'18)
 1102|       |             */
 1103|  4.34k|            bits -= window;
 1104|  4.34k|            wvalue = bn_get_bits(p, bits) & wmask;
 1105|       |            /*
 1106|       |             * Fetch the appropriate pre-computed value from the pre-buf
 1107|       |             */
 1108|  4.34k|            if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&am, top, powerbuf, wvalue,
  ------------------
  |  Branch (1108:17): [True: 0, False: 4.34k]
  ------------------
 1109|  4.34k|                    window))
 1110|      0|                goto err;
 1111|       |
 1112|       |            /* Multiply the result into the intermediate result */
 1113|  4.34k|            if (!bn_mul_mont_fixed_top(&tmp, &tmp, &am, mont, ctx))
  ------------------
  |  Branch (1113:17): [True: 0, False: 4.34k]
  ------------------
 1114|      0|                goto err;
 1115|  4.34k|        }
 1116|     69|    }
 1117|       |
 1118|       |    /*
 1119|       |     * Done with zero-padded intermediate BIGNUMs. Final BN_from_montgomery
 1120|       |     * removes padding [if any] and makes return value suitable for public
 1121|       |     * API consumer.
 1122|       |     */
 1123|       |#if defined(SPARC_T4_MONT)
 1124|       |    if (OPENSSL_sparcv9cap_P[0] & (SPARCV9_VIS3 | SPARCV9_PREFER_FPU)) {
 1125|       |        am.d[0] = 1; /* borrow am */
 1126|       |        for (i = 1; i < top; i++)
 1127|       |            am.d[i] = 0;
 1128|       |        if (!BN_mod_mul_montgomery(rr, &tmp, &am, mont, ctx))
 1129|       |            goto err;
 1130|       |    } else
 1131|       |#endif
 1132|    210|        if (!bn_from_mont_fixed_top(rr, &tmp, mont, ctx))
  ------------------
  |  Branch (1132:13): [True: 0, False: 210]
  ------------------
 1133|      0|        goto err;
 1134|    210|    ret = 1;
 1135|    210|err:
 1136|    210|    if (in_mont == NULL)
  ------------------
  |  Branch (1136:9): [True: 0, False: 210]
  ------------------
 1137|      0|        BN_MONT_CTX_free(mont);
 1138|    210|    if (powerbuf != NULL) {
  ------------------
  |  Branch (1138:9): [True: 210, False: 0]
  ------------------
 1139|    210|        OPENSSL_cleanse(powerbuf, powerbufLen);
 1140|    210|        OPENSSL_free(powerbufFree);
  ------------------
  |  |  132|    210|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1141|    210|    }
 1142|    210|    BN_CTX_end(ctx);
 1143|    210|    return ret;
 1144|    210|}
BN_mod_exp_mont_consttime:
 1149|    210|{
 1150|    210|    bn_check_top(a);
 1151|    210|    bn_check_top(p);
 1152|    210|    bn_check_top(m);
 1153|    210|    if (!bn_mod_exp_mont_fixed_top(rr, a, p, m, ctx, in_mont))
  ------------------
  |  Branch (1153:9): [True: 0, False: 210]
  ------------------
 1154|      0|        return 0;
 1155|    210|    bn_correct_top(rr);
 1156|    210|    return 1;
 1157|    210|}
bn_exp.c:bn_get_bits:
  488|  4.55k|{
  489|  4.55k|    BN_ULONG ret = 0;
  490|  4.55k|    int wordpos;
  491|       |
  492|  4.55k|    wordpos = bitpos / BN_BITS2;
  ------------------
  |  |   54|  4.55k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.55k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  493|  4.55k|    bitpos %= BN_BITS2;
  ------------------
  |  |   54|  4.55k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.55k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  494|  4.55k|    if (wordpos >= 0 && wordpos < a->top) {
  ------------------
  |  Branch (494:9): [True: 4.55k, False: 0]
  |  Branch (494:25): [True: 4.55k, False: 0]
  ------------------
  495|  4.55k|        ret = a->d[wordpos] & BN_MASK2;
  ------------------
  |  |   77|  4.55k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  496|  4.55k|        if (bitpos) {
  ------------------
  |  Branch (496:13): [True: 4.28k, False: 276]
  ------------------
  497|  4.28k|            ret >>= bitpos;
  498|  4.28k|            if (++wordpos < a->top)
  ------------------
  |  Branch (498:17): [True: 3.10k, False: 1.17k]
  ------------------
  499|  3.10k|                ret |= a->d[wordpos] << (BN_BITS2 - bitpos);
  ------------------
  |  |   54|  3.10k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.10k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  500|  4.28k|        }
  501|  4.55k|    }
  502|       |
  503|  4.55k|    return ret & BN_MASK2;
  ------------------
  |  |   77|  4.55k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  504|  4.55k|}
bn_exp.c:MOD_EXP_CTIME_COPY_TO_PREBUF:
  516|  1.10k|{
  517|  1.10k|    int i, j;
  518|  1.10k|    int width = 1 << window;
  519|  1.10k|    BN_ULONG *table = (BN_ULONG *)buf;
  520|       |
  521|  1.10k|    if (top > b->top)
  ------------------
  |  Branch (521:9): [True: 0, False: 1.10k]
  ------------------
  522|      0|        top = b->top; /* this works because 'buf' is explicitly
  523|       |                       * zeroed */
  524|  36.4k|    for (i = 0, j = idx; i < top; i++, j += width) {
  ------------------
  |  Branch (524:26): [True: 35.3k, False: 1.10k]
  ------------------
  525|  35.3k|        table[j] = b->d[i];
  526|  35.3k|    }
  527|       |
  528|  1.10k|    return 1;
  529|  1.10k|}
bn_exp.c:MOD_EXP_CTIME_COPY_FROM_PREBUF:
  534|  4.41k|{
  535|  4.41k|    int i, j;
  536|  4.41k|    int width = 1 << window;
  537|       |    /*
  538|       |     * We declare table 'volatile' in order to discourage compiler
  539|       |     * from reordering loads from the table. Concern is that if
  540|       |     * reordered in specific manner loads might give away the
  541|       |     * information we are trying to conceal. Some would argue that
  542|       |     * compiler can reorder them anyway, but it can as well be
  543|       |     * argued that doing so would be violation of standard...
  544|       |     */
  545|  4.41k|    volatile BN_ULONG *table = (volatile BN_ULONG *)buf;
  546|       |
  547|  4.41k|    if (bn_wexpand(b, top) == NULL)
  ------------------
  |  Branch (547:9): [True: 0, False: 4.41k]
  ------------------
  548|      0|        return 0;
  549|       |
  550|  4.41k|    if (window <= 3) {
  ------------------
  |  Branch (550:9): [True: 0, False: 4.41k]
  ------------------
  551|      0|        for (i = 0; i < top; i++, table += width) {
  ------------------
  |  Branch (551:21): [True: 0, False: 0]
  ------------------
  552|      0|            BN_ULONG acc = 0;
  553|       |
  554|      0|            for (j = 0; j < width; j++) {
  ------------------
  |  Branch (554:25): [True: 0, False: 0]
  ------------------
  555|      0|                acc |= table[j] & ((BN_ULONG)0 - (constant_time_eq_int(j, idx) & 1));
  556|      0|            }
  557|       |
  558|      0|            b->d[i] = acc;
  559|      0|        }
  560|  4.41k|    } else {
  561|  4.41k|        int xstride = 1 << (window - 2);
  562|  4.41k|        BN_ULONG y0, y1, y2, y3;
  563|       |
  564|  4.41k|        i = idx >> (window - 2); /* equivalent of idx / xstride */
  565|  4.41k|        idx &= xstride - 1; /* equivalent of idx % xstride */
  566|       |
  567|  4.41k|        y0 = (BN_ULONG)0 - (constant_time_eq_int(i, 0) & 1);
  568|  4.41k|        y1 = (BN_ULONG)0 - (constant_time_eq_int(i, 1) & 1);
  569|  4.41k|        y2 = (BN_ULONG)0 - (constant_time_eq_int(i, 2) & 1);
  570|  4.41k|        y3 = (BN_ULONG)0 - (constant_time_eq_int(i, 3) & 1);
  571|       |
  572|   145k|        for (i = 0; i < top; i++, table += width) {
  ------------------
  |  Branch (572:21): [True: 141k, False: 4.41k]
  ------------------
  573|   141k|            BN_ULONG acc = 0;
  574|       |
  575|   706k|            for (j = 0; j < xstride; j++) {
  ------------------
  |  Branch (575:25): [True: 565k, False: 141k]
  ------------------
  576|   565k|                acc |= ((table[j + 0 * xstride] & y0) | (table[j + 1 * xstride] & y1) | (table[j + 2 * xstride] & y2) | (table[j + 3 * xstride] & y3))
  577|   565k|                    & ((BN_ULONG)0 - (constant_time_eq_int(j, idx) & 1));
  578|   565k|            }
  579|       |
  580|   141k|            b->d[i] = acc;
  581|   141k|        }
  582|  4.41k|    }
  583|       |
  584|  4.41k|    b->top = top;
  585|  4.41k|    b->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  4.41k|#define BN_FLG_FIXED_TOP 0
  ------------------
  586|  4.41k|    return 1;
  587|  4.41k|}

int_bn_mod_inverse:
  200|   150k|{
  201|   150k|    BIGNUM *A, *B, *X, *Y, *M, *D, *T, *R = NULL;
  202|   150k|    BIGNUM *ret = NULL;
  203|   150k|    int sign;
  204|       |
  205|       |    /* This is invalid input so we don't worry about constant time here */
  206|   150k|    if (BN_abs_is_word(n, 1) || BN_is_zero(n)) {
  ------------------
  |  Branch (206:9): [True: 0, False: 150k]
  |  Branch (206:33): [True: 0, False: 150k]
  ------------------
  207|      0|        *pnoinv = 1;
  208|      0|        return NULL;
  209|      0|    }
  210|       |
  211|   150k|    *pnoinv = 0;
  212|       |
  213|   150k|    if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|   150k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (213:9): [True: 0, False: 150k]
  ------------------
  214|   150k|        || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
  ------------------
  |  |   67|   150k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (214:12): [True: 0, False: 150k]
  ------------------
  215|      0|        return bn_mod_inverse_no_branch(in, a, n, ctx, pnoinv);
  216|      0|    }
  217|       |
  218|   150k|    bn_check_top(a);
  219|   150k|    bn_check_top(n);
  220|       |
  221|   150k|    BN_CTX_start(ctx);
  222|   150k|    A = BN_CTX_get(ctx);
  223|   150k|    B = BN_CTX_get(ctx);
  224|   150k|    X = BN_CTX_get(ctx);
  225|   150k|    D = BN_CTX_get(ctx);
  226|   150k|    M = BN_CTX_get(ctx);
  227|   150k|    Y = BN_CTX_get(ctx);
  228|   150k|    T = BN_CTX_get(ctx);
  229|   150k|    if (T == NULL)
  ------------------
  |  Branch (229:9): [True: 0, False: 150k]
  ------------------
  230|      0|        goto err;
  231|       |
  232|   150k|    if (in == NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 150k]
  ------------------
  233|      0|        R = BN_new();
  234|   150k|    else
  235|   150k|        R = in;
  236|   150k|    if (R == NULL)
  ------------------
  |  Branch (236:9): [True: 0, False: 150k]
  ------------------
  237|      0|        goto err;
  238|       |
  239|   150k|    if (!BN_one(X))
  ------------------
  |  |  196|   150k|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  |  Branch (239:9): [True: 0, False: 150k]
  ------------------
  240|      0|        goto err;
  241|   150k|    BN_zero(Y);
  ------------------
  |  |  201|   150k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  242|   150k|    if (BN_copy(B, a) == NULL)
  ------------------
  |  Branch (242:9): [True: 0, False: 150k]
  ------------------
  243|      0|        goto err;
  244|   150k|    if (BN_copy(A, n) == NULL)
  ------------------
  |  Branch (244:9): [True: 0, False: 150k]
  ------------------
  245|      0|        goto err;
  246|   150k|    A->neg = 0;
  247|   150k|    if (B->neg || (BN_ucmp(B, A) >= 0)) {
  ------------------
  |  Branch (247:9): [True: 0, False: 150k]
  |  Branch (247:19): [True: 150k, False: 0]
  ------------------
  248|   150k|        if (!BN_nnmod(B, B, A, ctx))
  ------------------
  |  Branch (248:13): [True: 0, False: 150k]
  ------------------
  249|      0|            goto err;
  250|   150k|    }
  251|   150k|    sign = -1;
  252|       |    /*-
  253|       |     * From  B = a mod |n|,  A = |n|  it follows that
  254|       |     *
  255|       |     *      0 <= B < A,
  256|       |     *     -sign*X*a  ==  B   (mod |n|),
  257|       |     *      sign*Y*a  ==  A   (mod |n|).
  258|       |     */
  259|       |
  260|   150k|    if (BN_is_odd(n) && (BN_num_bits(n) <= 2048)) {
  ------------------
  |  Branch (260:9): [True: 150k, False: 0]
  |  Branch (260:25): [True: 150k, False: 0]
  ------------------
  261|       |        /*
  262|       |         * Binary inversion algorithm; requires odd modulus. This is faster
  263|       |         * than the general algorithm if the modulus is sufficiently small
  264|       |         * (about 400 .. 500 bits on 32-bit systems, but much more on 64-bit
  265|       |         * systems)
  266|       |         */
  267|   150k|        int shift;
  268|       |
  269|  9.78M|        while (!BN_is_zero(B)) {
  ------------------
  |  Branch (269:16): [True: 9.63M, False: 150k]
  ------------------
  270|       |            /*-
  271|       |             *      0 < B < |n|,
  272|       |             *      0 < A <= |n|,
  273|       |             * (1) -sign*X*a  ==  B   (mod |n|),
  274|       |             * (2)  sign*Y*a  ==  A   (mod |n|)
  275|       |             */
  276|       |
  277|       |            /*
  278|       |             * Now divide B by the maximum possible power of two in the
  279|       |             * integers, and divide X by the same value mod |n|. When we're
  280|       |             * done, (1) still holds.
  281|       |             */
  282|  9.63M|            shift = 0;
  283|  14.2M|            while (!BN_is_bit_set(B, shift)) { /* note that 0 < B */
  ------------------
  |  Branch (283:20): [True: 4.65M, False: 9.63M]
  ------------------
  284|  4.65M|                shift++;
  285|       |
  286|  4.65M|                if (BN_is_odd(X)) {
  ------------------
  |  Branch (286:21): [True: 2.41M, False: 2.23M]
  ------------------
  287|  2.41M|                    if (!BN_uadd(X, X, n))
  ------------------
  |  Branch (287:25): [True: 0, False: 2.41M]
  ------------------
  288|      0|                        goto err;
  289|  2.41M|                }
  290|       |                /*
  291|       |                 * now X is even, so we can easily divide it by two
  292|       |                 */
  293|  4.65M|                if (!BN_rshift1(X, X))
  ------------------
  |  Branch (293:21): [True: 0, False: 4.65M]
  ------------------
  294|      0|                    goto err;
  295|  4.65M|            }
  296|  9.63M|            if (shift > 0) {
  ------------------
  |  Branch (296:17): [True: 4.65M, False: 4.98M]
  ------------------
  297|  4.65M|                if (!BN_rshift(B, B, shift))
  ------------------
  |  Branch (297:21): [True: 0, False: 4.65M]
  ------------------
  298|      0|                    goto err;
  299|  4.65M|            }
  300|       |
  301|       |            /*
  302|       |             * Same for A and Y.  Afterwards, (2) still holds.
  303|       |             */
  304|  9.63M|            shift = 0;
  305|  14.4M|            while (!BN_is_bit_set(A, shift)) { /* note that 0 < A */
  ------------------
  |  Branch (305:20): [True: 4.83M, False: 9.63M]
  ------------------
  306|  4.83M|                shift++;
  307|       |
  308|  4.83M|                if (BN_is_odd(Y)) {
  ------------------
  |  Branch (308:21): [True: 2.30M, False: 2.53M]
  ------------------
  309|  2.30M|                    if (!BN_uadd(Y, Y, n))
  ------------------
  |  Branch (309:25): [True: 0, False: 2.30M]
  ------------------
  310|      0|                        goto err;
  311|  2.30M|                }
  312|       |                /* now Y is even */
  313|  4.83M|                if (!BN_rshift1(Y, Y))
  ------------------
  |  Branch (313:21): [True: 0, False: 4.83M]
  ------------------
  314|      0|                    goto err;
  315|  4.83M|            }
  316|  9.63M|            if (shift > 0) {
  ------------------
  |  Branch (316:17): [True: 4.83M, False: 4.80M]
  ------------------
  317|  4.83M|                if (!BN_rshift(A, A, shift))
  ------------------
  |  Branch (317:21): [True: 0, False: 4.83M]
  ------------------
  318|      0|                    goto err;
  319|  4.83M|            }
  320|       |
  321|       |            /*-
  322|       |             * We still have (1) and (2).
  323|       |             * Both  A  and  B  are odd.
  324|       |             * The following computations ensure that
  325|       |             *
  326|       |             *     0 <= B < |n|,
  327|       |             *      0 < A < |n|,
  328|       |             * (1) -sign*X*a  ==  B   (mod |n|),
  329|       |             * (2)  sign*Y*a  ==  A   (mod |n|),
  330|       |             *
  331|       |             * and that either  A  or  B  is even in the next iteration.
  332|       |             */
  333|  9.63M|            if (BN_ucmp(B, A) >= 0) {
  ------------------
  |  Branch (333:17): [True: 4.80M, False: 4.83M]
  ------------------
  334|       |                /* -sign*(X + Y)*a == B - A  (mod |n|) */
  335|  4.80M|                if (!BN_uadd(X, X, Y))
  ------------------
  |  Branch (335:21): [True: 0, False: 4.80M]
  ------------------
  336|      0|                    goto err;
  337|       |                /*
  338|       |                 * NB: we could use BN_mod_add_quick(X, X, Y, n), but that
  339|       |                 * actually makes the algorithm slower
  340|       |                 */
  341|  4.80M|                if (!BN_usub(B, B, A))
  ------------------
  |  Branch (341:21): [True: 0, False: 4.80M]
  ------------------
  342|      0|                    goto err;
  343|  4.83M|            } else {
  344|       |                /*  sign*(X + Y)*a == A - B  (mod |n|) */
  345|  4.83M|                if (!BN_uadd(Y, Y, X))
  ------------------
  |  Branch (345:21): [True: 0, False: 4.83M]
  ------------------
  346|      0|                    goto err;
  347|       |                /*
  348|       |                 * as above, BN_mod_add_quick(Y, Y, X, n) would slow things down
  349|       |                 */
  350|  4.83M|                if (!BN_usub(A, A, B))
  ------------------
  |  Branch (350:21): [True: 0, False: 4.83M]
  ------------------
  351|      0|                    goto err;
  352|  4.83M|            }
  353|  9.63M|        }
  354|   150k|    } else {
  355|       |        /* general inversion algorithm */
  356|       |
  357|      0|        while (!BN_is_zero(B)) {
  ------------------
  |  Branch (357:16): [True: 0, False: 0]
  ------------------
  358|      0|            BIGNUM *tmp;
  359|       |
  360|       |            /*-
  361|       |             *      0 < B < A,
  362|       |             * (*) -sign*X*a  ==  B   (mod |n|),
  363|       |             *      sign*Y*a  ==  A   (mod |n|)
  364|       |             */
  365|       |
  366|       |            /* (D, M) := (A/B, A%B) ... */
  367|      0|            if (BN_num_bits(A) == BN_num_bits(B)) {
  ------------------
  |  Branch (367:17): [True: 0, False: 0]
  ------------------
  368|      0|                if (!BN_one(D))
  ------------------
  |  |  196|      0|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  |  Branch (368:21): [True: 0, False: 0]
  ------------------
  369|      0|                    goto err;
  370|      0|                if (!BN_sub(M, A, B))
  ------------------
  |  Branch (370:21): [True: 0, False: 0]
  ------------------
  371|      0|                    goto err;
  372|      0|            } else if (BN_num_bits(A) == BN_num_bits(B) + 1) {
  ------------------
  |  Branch (372:24): [True: 0, False: 0]
  ------------------
  373|       |                /* A/B is 1, 2, or 3 */
  374|      0|                if (!BN_lshift1(T, B))
  ------------------
  |  Branch (374:21): [True: 0, False: 0]
  ------------------
  375|      0|                    goto err;
  376|      0|                if (BN_ucmp(A, T) < 0) {
  ------------------
  |  Branch (376:21): [True: 0, False: 0]
  ------------------
  377|       |                    /* A < 2*B, so D=1 */
  378|      0|                    if (!BN_one(D))
  ------------------
  |  |  196|      0|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  |  Branch (378:25): [True: 0, False: 0]
  ------------------
  379|      0|                        goto err;
  380|      0|                    if (!BN_sub(M, A, B))
  ------------------
  |  Branch (380:25): [True: 0, False: 0]
  ------------------
  381|      0|                        goto err;
  382|      0|                } else {
  383|       |                    /* A >= 2*B, so D=2 or D=3 */
  384|      0|                    if (!BN_sub(M, A, T))
  ------------------
  |  Branch (384:25): [True: 0, False: 0]
  ------------------
  385|      0|                        goto err;
  386|      0|                    if (!BN_add(D, T, B))
  ------------------
  |  Branch (386:25): [True: 0, False: 0]
  ------------------
  387|      0|                        goto err; /* use D (:= 3*B) as temp */
  388|      0|                    if (BN_ucmp(A, D) < 0) {
  ------------------
  |  Branch (388:25): [True: 0, False: 0]
  ------------------
  389|       |                        /* A < 3*B, so D=2 */
  390|      0|                        if (!BN_set_word(D, 2))
  ------------------
  |  Branch (390:29): [True: 0, False: 0]
  ------------------
  391|      0|                            goto err;
  392|       |                        /*
  393|       |                         * M (= A - 2*B) already has the correct value
  394|       |                         */
  395|      0|                    } else {
  396|       |                        /* only D=3 remains */
  397|      0|                        if (!BN_set_word(D, 3))
  ------------------
  |  Branch (397:29): [True: 0, False: 0]
  ------------------
  398|      0|                            goto err;
  399|       |                        /*
  400|       |                         * currently M = A - 2*B, but we need M = A - 3*B
  401|       |                         */
  402|      0|                        if (!BN_sub(M, M, B))
  ------------------
  |  Branch (402:29): [True: 0, False: 0]
  ------------------
  403|      0|                            goto err;
  404|      0|                    }
  405|      0|                }
  406|      0|            } else {
  407|      0|                if (!BN_div(D, M, A, B, ctx))
  ------------------
  |  Branch (407:21): [True: 0, False: 0]
  ------------------
  408|      0|                    goto err;
  409|      0|            }
  410|       |
  411|       |            /*-
  412|       |             * Now
  413|       |             *      A = D*B + M;
  414|       |             * thus we have
  415|       |             * (**)  sign*Y*a  ==  D*B + M   (mod |n|).
  416|       |             */
  417|       |
  418|      0|            tmp = A; /* keep the BIGNUM object, the value does not matter */
  419|       |
  420|       |            /* (A, B) := (B, A mod B) ... */
  421|      0|            A = B;
  422|      0|            B = M;
  423|       |            /* ... so we have  0 <= B < A  again */
  424|       |
  425|       |            /*-
  426|       |             * Since the former  M  is now  B  and the former  B  is now  A,
  427|       |             * (**) translates into
  428|       |             *       sign*Y*a  ==  D*A + B    (mod |n|),
  429|       |             * i.e.
  430|       |             *       sign*Y*a - D*A  ==  B    (mod |n|).
  431|       |             * Similarly, (*) translates into
  432|       |             *      -sign*X*a  ==  A          (mod |n|).
  433|       |             *
  434|       |             * Thus,
  435|       |             *   sign*Y*a + D*sign*X*a  ==  B  (mod |n|),
  436|       |             * i.e.
  437|       |             *        sign*(Y + D*X)*a  ==  B  (mod |n|).
  438|       |             *
  439|       |             * So if we set  (X, Y, sign) := (Y + D*X, X, -sign), we arrive back at
  440|       |             *      -sign*X*a  ==  B   (mod |n|),
  441|       |             *       sign*Y*a  ==  A   (mod |n|).
  442|       |             * Note that  X  and  Y  stay non-negative all the time.
  443|       |             */
  444|       |
  445|       |            /*
  446|       |             * most of the time D is very small, so we can optimize tmp := D*X+Y
  447|       |             */
  448|      0|            if (BN_is_one(D)) {
  ------------------
  |  Branch (448:17): [True: 0, False: 0]
  ------------------
  449|      0|                if (!BN_add(tmp, X, Y))
  ------------------
  |  Branch (449:21): [True: 0, False: 0]
  ------------------
  450|      0|                    goto err;
  451|      0|            } else {
  452|      0|                if (BN_is_word(D, 2)) {
  ------------------
  |  Branch (452:21): [True: 0, False: 0]
  ------------------
  453|      0|                    if (!BN_lshift1(tmp, X))
  ------------------
  |  Branch (453:25): [True: 0, False: 0]
  ------------------
  454|      0|                        goto err;
  455|      0|                } else if (BN_is_word(D, 4)) {
  ------------------
  |  Branch (455:28): [True: 0, False: 0]
  ------------------
  456|      0|                    if (!BN_lshift(tmp, X, 2))
  ------------------
  |  Branch (456:25): [True: 0, False: 0]
  ------------------
  457|      0|                        goto err;
  458|      0|                } else if (D->top == 1) {
  ------------------
  |  Branch (458:28): [True: 0, False: 0]
  ------------------
  459|      0|                    if (!BN_copy(tmp, X))
  ------------------
  |  Branch (459:25): [True: 0, False: 0]
  ------------------
  460|      0|                        goto err;
  461|      0|                    if (!BN_mul_word(tmp, D->d[0]))
  ------------------
  |  Branch (461:25): [True: 0, False: 0]
  ------------------
  462|      0|                        goto err;
  463|      0|                } else {
  464|      0|                    if (!BN_mul(tmp, D, X, ctx))
  ------------------
  |  Branch (464:25): [True: 0, False: 0]
  ------------------
  465|      0|                        goto err;
  466|      0|                }
  467|      0|                if (!BN_add(tmp, tmp, Y))
  ------------------
  |  Branch (467:21): [True: 0, False: 0]
  ------------------
  468|      0|                    goto err;
  469|      0|            }
  470|       |
  471|      0|            M = Y; /* keep the BIGNUM object, the value does not matter */
  472|      0|            Y = X;
  473|      0|            X = tmp;
  474|      0|            sign = -sign;
  475|      0|        }
  476|      0|    }
  477|       |
  478|       |    /*-
  479|       |     * The while loop (Euclid's algorithm) ends when
  480|       |     *      A == gcd(a,n);
  481|       |     * we have
  482|       |     *       sign*Y*a  ==  A  (mod |n|),
  483|       |     * where  Y  is non-negative.
  484|       |     */
  485|       |
  486|   150k|    if (sign < 0) {
  ------------------
  |  Branch (486:9): [True: 150k, False: 0]
  ------------------
  487|   150k|        if (!BN_sub(Y, n, Y))
  ------------------
  |  Branch (487:13): [True: 0, False: 150k]
  ------------------
  488|      0|            goto err;
  489|   150k|    }
  490|       |    /* Now  Y*a  ==  A  (mod |n|).  */
  491|       |
  492|   150k|    if (BN_is_one(A)) {
  ------------------
  |  Branch (492:9): [True: 150k, False: 0]
  ------------------
  493|       |        /* Y*a == 1  (mod |n|) */
  494|   150k|        if (!Y->neg && BN_ucmp(Y, n) < 0) {
  ------------------
  |  Branch (494:13): [True: 498, False: 150k]
  |  Branch (494:24): [True: 498, False: 0]
  ------------------
  495|    498|            if (!BN_copy(R, Y))
  ------------------
  |  Branch (495:17): [True: 0, False: 498]
  ------------------
  496|      0|                goto err;
  497|   150k|        } else {
  498|   150k|            if (!BN_nnmod(R, Y, n, ctx))
  ------------------
  |  Branch (498:17): [True: 0, False: 150k]
  ------------------
  499|      0|                goto err;
  500|   150k|        }
  501|   150k|    } else {
  502|      0|        *pnoinv = 1;
  503|      0|        goto err;
  504|      0|    }
  505|   150k|    ret = R;
  506|   150k|err:
  507|   150k|    if ((ret == NULL) && (in == NULL))
  ------------------
  |  Branch (507:9): [True: 0, False: 150k]
  |  Branch (507:26): [True: 0, False: 0]
  ------------------
  508|      0|        BN_free(R);
  509|   150k|    BN_CTX_end(ctx);
  510|   150k|    bn_check_top(ret);
  511|   150k|    return ret;
  512|   150k|}
BN_mod_inverse:
  517|   150k|{
  518|   150k|    BN_CTX *new_ctx = NULL;
  519|   150k|    BIGNUM *rv;
  520|   150k|    int noinv = 0;
  521|       |
  522|   150k|    if (ctx == NULL) {
  ------------------
  |  Branch (522:9): [True: 0, False: 150k]
  ------------------
  523|      0|        ctx = new_ctx = BN_CTX_new_ex(NULL);
  524|      0|        if (ctx == NULL) {
  ------------------
  |  Branch (524:13): [True: 0, False: 0]
  ------------------
  525|      0|            ERR_raise(ERR_LIB_BN, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  526|      0|            return NULL;
  527|      0|        }
  528|      0|    }
  529|       |
  530|   150k|    rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
  531|   150k|    if (noinv)
  ------------------
  |  Branch (531:9): [True: 0, False: 150k]
  ------------------
  532|       |        ERR_raise(ERR_LIB_BN, BN_R_NO_INVERSE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  533|   150k|    BN_CTX_free(new_ctx);
  534|   150k|    return rv;
  535|   150k|}

bn_get_top:
  138|  1.32k|{
  139|  1.32k|    return a->top;
  140|  1.32k|}
bn_copy_words:
  156|    249|{
  157|    249|    if (in->top > size)
  ------------------
  |  Branch (157:9): [True: 0, False: 249]
  ------------------
  158|      0|        return 0;
  159|       |
  160|    249|    memset(out, 0, sizeof(*out) * size);
  161|    249|    if (in->d != NULL)
  ------------------
  |  Branch (161:9): [True: 249, False: 0]
  ------------------
  162|    249|        memcpy(out, in->d, sizeof(*out) * in->top);
  163|    249|    return 1;
  164|    249|}
bn_get_words:
  167|    664|{
  168|    664|    return a->d;
  169|    664|}
bn_set_words:
  185|    415|{
  186|    415|    if (bn_wexpand(a, num_words) == NULL) {
  ------------------
  |  Branch (186:9): [True: 0, False: 415]
  ------------------
  187|      0|        ERR_raise(ERR_LIB_BN, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  188|      0|        return 0;
  189|      0|    }
  190|       |
  191|    415|    memcpy(a->d, words, sizeof(BN_ULONG) * num_words);
  192|    415|    a->top = num_words;
  193|    415|    bn_correct_top(a);
  194|    415|    return 1;
  195|    415|}

BN_value_one:
   83|   338k|{
   84|   338k|    static const BN_ULONG data_one = 1L;
   85|   338k|    static const BIGNUM const_one = {
   86|   338k|        (BN_ULONG *)&data_one, 1, 1, 0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|   338k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
   87|   338k|    };
   88|       |
   89|   338k|    return &const_one;
   90|   338k|}
BN_num_bits_word:
  102|  5.01M|{
  103|  5.01M|    BN_ULONG x, mask;
  104|  5.01M|    int bits = (l != 0);
  105|       |
  106|  5.01M|#if BN_BITS2 > 32
  107|  5.01M|    x = l >> 32;
  108|  5.01M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  5.01M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  109|  5.01M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  5.01M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  5.01M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  110|  5.01M|    bits += 32 & mask;
  111|  5.01M|    l ^= (x ^ l) & mask;
  112|  5.01M|#endif
  113|       |
  114|  5.01M|    x = l >> 16;
  115|  5.01M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  5.01M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  116|  5.01M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  5.01M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  5.01M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  117|  5.01M|    bits += 16 & mask;
  118|  5.01M|    l ^= (x ^ l) & mask;
  119|       |
  120|  5.01M|    x = l >> 8;
  121|  5.01M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  5.01M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  122|  5.01M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  5.01M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  5.01M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  123|  5.01M|    bits += 8 & mask;
  124|  5.01M|    l ^= (x ^ l) & mask;
  125|       |
  126|  5.01M|    x = l >> 4;
  127|  5.01M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  5.01M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  128|  5.01M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  5.01M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  5.01M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  129|  5.01M|    bits += 4 & mask;
  130|  5.01M|    l ^= (x ^ l) & mask;
  131|       |
  132|  5.01M|    x = l >> 2;
  133|  5.01M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  5.01M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  134|  5.01M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  5.01M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  5.01M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  135|  5.01M|    bits += 2 & mask;
  136|  5.01M|    l ^= (x ^ l) & mask;
  137|       |
  138|  5.01M|    x = l >> 1;
  139|  5.01M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  5.01M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  140|  5.01M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  5.01M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  5.01M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  141|  5.01M|    bits += 1 & mask;
  142|       |
  143|  5.01M|    return bits;
  144|  5.01M|}
BN_num_bits:
  179|  3.10M|{
  180|  3.10M|    int i = a->top - 1;
  181|  3.10M|    bn_check_top(a);
  182|       |
  183|  3.10M|    if (a->flags & BN_FLG_CONSTTIME) {
  ------------------
  |  |   67|  3.10M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (183:9): [True: 1.72k, False: 3.09M]
  ------------------
  184|       |        /*
  185|       |         * We assume that BIGNUMs flagged as CONSTTIME have also been expanded
  186|       |         * so that a->dmax is not leaking secret information.
  187|       |         *
  188|       |         * In other words, it's the caller's responsibility to ensure `a` has
  189|       |         * been preallocated in advance to a public length if we hit this
  190|       |         * branch.
  191|       |         *
  192|       |         */
  193|  1.72k|        return bn_num_bits_consttime(a);
  194|  1.72k|    }
  195|       |
  196|  3.09M|    if (ossl_unlikely(BN_is_zero(a)))
  ------------------
  |  |   23|  3.09M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.09M]
  |  |  ------------------
  ------------------
  197|      0|        return 0;
  198|       |
  199|  3.09M|    return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
  ------------------
  |  |   54|  3.09M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.09M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  200|  3.09M|}
BN_clear_free:
  213|  7.17M|{
  214|  7.17M|    if (a == NULL)
  ------------------
  |  Branch (214:9): [True: 2.22M, False: 4.95M]
  ------------------
  215|  2.22M|        return;
  216|  4.95M|    if (a->d != NULL && !BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  4.60M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (216:9): [True: 4.60M, False: 351k]
  |  Branch (216:25): [True: 4.60M, False: 210]
  ------------------
  217|  4.60M|        bn_free_d(a, 1);
  218|  4.95M|    if (BN_get_flags(a, BN_FLG_MALLOCED)) {
  ------------------
  |  |   58|  4.95M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (218:9): [True: 1.93k, False: 4.95M]
  ------------------
  219|  1.93k|        OPENSSL_cleanse(a, sizeof(*a));
  220|  1.93k|        OPENSSL_free(a);
  ------------------
  |  |  132|  1.93k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  221|  1.93k|    }
  222|  4.95M|}
BN_free:
  225|  5.59M|{
  226|  5.59M|    if (a == NULL)
  ------------------
  |  Branch (226:9): [True: 327k, False: 5.26M]
  ------------------
  227|   327k|        return;
  228|  5.26M|    if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  5.26M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (228:9): [True: 5.26M, False: 630]
  ------------------
  229|  5.26M|        bn_free_d(a, 0);
  230|  5.26M|    if (a->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|  5.26M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (230:9): [True: 5.26M, False: 630]
  ------------------
  231|  5.26M|        OPENSSL_free(a);
  ------------------
  |  |  132|  5.26M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  232|  5.26M|}
bn_init:
  235|  8.82M|{
  236|  8.82M|    static BIGNUM nilbn;
  237|       |
  238|  8.82M|    *a = nilbn;
  239|  8.82M|    bn_check_top(a);
  240|  8.82M|}
BN_new:
  243|  5.26M|{
  244|  5.26M|    BIGNUM *ret;
  245|       |
  246|  5.26M|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|  5.26M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (246:9): [True: 0, False: 5.26M]
  ------------------
  247|      0|        return NULL;
  248|  5.26M|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|  5.26M|#define BN_FLG_MALLOCED 0x01
  ------------------
  249|  5.26M|    bn_check_top(ret);
  250|  5.26M|    return ret;
  251|  5.26M|}
BN_secure_new:
  254|    651|{
  255|    651|    BIGNUM *ret = BN_new();
  256|       |
  257|    651|    if (ret != NULL)
  ------------------
  |  Branch (257:9): [True: 651, False: 0]
  ------------------
  258|    651|        ret->flags |= BN_FLG_SECURE;
  ------------------
  |  |   68|    651|#define BN_FLG_SECURE 0x08
  ------------------
  259|    651|    return ret;
  260|    651|}
bn_expand2:
  299|  12.4M|{
  300|  12.4M|    if (ossl_likely(words > b->dmax)) {
  ------------------
  |  |   22|  12.4M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 12.4M, False: 0]
  |  |  ------------------
  ------------------
  301|  12.4M|        BN_ULONG *a = bn_expand_internal(b, words);
  302|       |
  303|  12.4M|        if (ossl_unlikely(!a))
  ------------------
  |  |   23|  12.4M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.4M]
  |  |  ------------------
  ------------------
  304|      0|            return NULL;
  305|  12.4M|        if (b->d != NULL)
  ------------------
  |  Branch (305:13): [True: 2.59M, False: 9.87M]
  ------------------
  306|  2.59M|            bn_free_d(b, 1);
  307|  12.4M|        b->d = a;
  308|  12.4M|        b->dmax = words;
  309|  12.4M|    }
  310|       |
  311|  12.4M|    return b;
  312|  12.4M|}
BN_dup:
  315|  13.0k|{
  316|  13.0k|    BIGNUM *t;
  317|       |
  318|  13.0k|    if (a == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 13.0k]
  ------------------
  319|      0|        return NULL;
  320|  13.0k|    bn_check_top(a);
  321|       |
  322|  13.0k|    t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
  ------------------
  |  |   68|  13.0k|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (322:9): [True: 0, False: 13.0k]
  ------------------
  323|  13.0k|    if (t == NULL)
  ------------------
  |  Branch (323:9): [True: 0, False: 13.0k]
  ------------------
  324|      0|        return NULL;
  325|  13.0k|    if (!BN_copy(t, a)) {
  ------------------
  |  Branch (325:9): [True: 0, False: 13.0k]
  ------------------
  326|      0|        BN_free(t);
  327|      0|        return NULL;
  328|      0|    }
  329|  13.0k|    bn_check_top(t);
  330|  13.0k|    return t;
  331|  13.0k|}
BN_copy:
  334|  5.73M|{
  335|  5.73M|    int bn_words;
  336|       |
  337|  5.73M|    bn_check_top(b);
  338|       |
  339|  5.73M|    bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top;
  ------------------
  |  |   67|  5.73M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (339:16): [True: 864, False: 5.73M]
  ------------------
  340|       |
  341|  5.73M|    if (ossl_unlikely(a == b))
  ------------------
  |  |   23|  5.73M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 5.73M]
  |  |  ------------------
  ------------------
  342|      0|        return a;
  343|  5.73M|    if (ossl_unlikely(bn_wexpand(a, bn_words) == NULL))
  ------------------
  |  |   23|  5.73M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 5.73M]
  |  |  ------------------
  ------------------
  344|      0|        return NULL;
  345|       |
  346|  5.73M|    if (ossl_likely(b->top > 0))
  ------------------
  |  |   22|  5.73M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 5.56M, False: 175k]
  |  |  ------------------
  ------------------
  347|  5.56M|        memcpy(a->d, b->d, sizeof(b->d[0]) * bn_words);
  348|       |
  349|  5.73M|    a->neg = b->neg;
  350|  5.73M|    a->top = b->top;
  351|  5.73M|    a->flags |= b->flags & BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  5.73M|#define BN_FLG_FIXED_TOP 0
  ------------------
  352|  5.73M|    bn_check_top(a);
  353|  5.73M|    return a;
  354|  5.73M|}
BN_set_word:
  415|   326k|{
  416|   326k|    bn_check_top(a);
  417|   326k|    if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  ------------------
  |  Branch (417:9): [True: 0, False: 326k]
  ------------------
  418|      0|        return 0;
  419|   326k|    a->neg = 0;
  420|   326k|    a->d[0] = w;
  421|   326k|    a->top = (w ? 1 : 0);
  ------------------
  |  Branch (421:15): [True: 326k, False: 0]
  ------------------
  422|   326k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   326k|#define BN_FLG_FIXED_TOP 0
  ------------------
  423|   326k|    bn_check_top(a);
  424|   326k|    return 1;
  425|   326k|}
BN_bin2bn:
  535|  2.45M|{
  536|  2.45M|    return bin2bn(s, len, ret, BIG, UNSIGNED);
  537|  2.45M|}
BN_bn2binpad:
  628|    210|{
  629|    210|    if (tolen < 0)
  ------------------
  |  Branch (629:9): [True: 0, False: 210]
  ------------------
  630|      0|        return -1;
  631|    210|    return bn2binpad(a, to, tolen, BIG, UNSIGNED);
  632|    210|}
BN_bn2bin:
  642|    882|{
  643|    882|    return bn2binpad(a, to, -1, BIG, UNSIGNED);
  644|    882|}
BN_lebin2bn:
  647|    560|{
  648|    560|    return bin2bn(s, len, ret, LITTLE, UNSIGNED);
  649|    560|}
BN_bn2lebinpad:
  657|    280|{
  658|    280|    if (tolen < 0)
  ------------------
  |  Branch (658:9): [True: 0, False: 280]
  ------------------
  659|      0|        return -1;
  660|    280|    return bn2binpad(a, to, tolen, LITTLE, UNSIGNED);
  661|    280|}
BN_ucmp:
  707|  13.2M|{
  708|  13.2M|    int i;
  709|  13.2M|    BN_ULONG t1, t2, *ap, *bp;
  710|       |
  711|  13.2M|    ap = a->d;
  712|  13.2M|    bp = b->d;
  713|       |
  714|  13.2M|    if (BN_get_flags(a, BN_FLG_CONSTTIME)
  ------------------
  |  |   67|  13.2M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (714:9): [True: 76.3k, False: 13.2M]
  ------------------
  715|  76.3k|        && a->top == b->top) {
  ------------------
  |  Branch (715:12): [True: 74.8k, False: 1.44k]
  ------------------
  716|  74.8k|        int res = 0;
  717|       |
  718|   374k|        for (i = 0; i < b->top; i++) {
  ------------------
  |  Branch (718:21): [True: 299k, False: 74.8k]
  ------------------
  719|   299k|            res = constant_time_select_int((int)constant_time_lt_bn(ap[i], bp[i]),
  720|   299k|                -1, res);
  721|   299k|            res = constant_time_select_int((int)constant_time_lt_bn(bp[i], ap[i]),
  722|   299k|                1, res);
  723|   299k|        }
  724|  74.8k|        return res;
  725|  74.8k|    }
  726|       |
  727|  13.2M|    bn_check_top(a);
  728|  13.2M|    bn_check_top(b);
  729|       |
  730|  13.2M|    i = a->top - b->top;
  731|  13.2M|    if (i != 0)
  ------------------
  |  Branch (731:9): [True: 1.27M, False: 11.9M]
  ------------------
  732|  1.27M|        return i;
  733|       |
  734|  14.0M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (734:26): [True: 13.5M, False: 475k]
  ------------------
  735|  13.5M|        t1 = ap[i];
  736|  13.5M|        t2 = bp[i];
  737|  13.5M|        if (t1 != t2)
  ------------------
  |  Branch (737:13): [True: 11.4M, False: 2.07M]
  ------------------
  738|  11.4M|            return ((t1 > t2) ? 1 : -1);
  ------------------
  |  Branch (738:21): [True: 4.87M, False: 6.57M]
  ------------------
  739|  13.5M|    }
  740|   475k|    return 0;
  741|  11.9M|}
BN_cmp:
  744|   837k|{
  745|   837k|    int i;
  746|   837k|    int gt, lt;
  747|   837k|    BN_ULONG t1, t2;
  748|       |
  749|   837k|    if ((a == NULL) || (b == NULL)) {
  ------------------
  |  Branch (749:9): [True: 0, False: 837k]
  |  Branch (749:24): [True: 0, False: 837k]
  ------------------
  750|      0|        if (a != NULL)
  ------------------
  |  Branch (750:13): [True: 0, False: 0]
  ------------------
  751|      0|            return -1;
  752|      0|        else if (b != NULL)
  ------------------
  |  Branch (752:18): [True: 0, False: 0]
  ------------------
  753|      0|            return 1;
  754|      0|        else
  755|      0|            return 0;
  756|      0|    }
  757|       |
  758|   837k|    bn_check_top(a);
  759|   837k|    bn_check_top(b);
  760|       |
  761|   837k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (761:9): [True: 0, False: 837k]
  ------------------
  762|      0|        if (a->neg)
  ------------------
  |  Branch (762:13): [True: 0, False: 0]
  ------------------
  763|      0|            return -1;
  764|      0|        else
  765|      0|            return 1;
  766|      0|    }
  767|   837k|    if (a->neg == 0) {
  ------------------
  |  Branch (767:9): [True: 837k, False: 0]
  ------------------
  768|   837k|        gt = 1;
  769|   837k|        lt = -1;
  770|   837k|    } else {
  771|      0|        gt = -1;
  772|      0|        lt = 1;
  773|      0|    }
  774|       |
  775|   837k|    if (a->top > b->top)
  ------------------
  |  Branch (775:9): [True: 75.1k, False: 762k]
  ------------------
  776|  75.1k|        return gt;
  777|   762k|    if (a->top < b->top)
  ------------------
  |  Branch (777:9): [True: 210, False: 762k]
  ------------------
  778|    210|        return lt;
  779|  4.46M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (779:26): [True: 3.84M, False: 612k]
  ------------------
  780|  3.84M|        t1 = a->d[i];
  781|  3.84M|        t2 = b->d[i];
  782|  3.84M|        if (t1 > t2)
  ------------------
  |  Branch (782:13): [True: 459, False: 3.84M]
  ------------------
  783|    459|            return gt;
  784|  3.84M|        if (t1 < t2)
  ------------------
  |  Branch (784:13): [True: 149k, False: 3.69M]
  ------------------
  785|   149k|            return lt;
  786|  3.84M|    }
  787|   612k|    return 0;
  788|   762k|}
BN_set_bit:
  791|   301k|{
  792|   301k|    int i, j, k;
  793|       |
  794|   301k|    if (n < 0)
  ------------------
  |  Branch (794:9): [True: 0, False: 301k]
  ------------------
  795|      0|        return 0;
  796|       |
  797|   301k|    i = n / BN_BITS2;
  ------------------
  |  |   54|   301k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   301k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  798|   301k|    j = n % BN_BITS2;
  ------------------
  |  |   54|   301k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   301k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  799|   301k|    if (a->top <= i) {
  ------------------
  |  Branch (799:9): [True: 301k, False: 0]
  ------------------
  800|   301k|        if (bn_wexpand(a, i + 1) == NULL)
  ------------------
  |  Branch (800:13): [True: 0, False: 301k]
  ------------------
  801|      0|            return 0;
  802|  2.61M|        for (k = a->top; k < i + 1; k++)
  ------------------
  |  Branch (802:26): [True: 2.31M, False: 301k]
  ------------------
  803|  2.31M|            a->d[k] = 0;
  804|   301k|        a->top = i + 1;
  805|   301k|        a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   301k|#define BN_FLG_FIXED_TOP 0
  ------------------
  806|   301k|    }
  807|       |
  808|   301k|    a->d[i] |= (((BN_ULONG)1) << j);
  809|   301k|    bn_check_top(a);
  810|   301k|    return 1;
  811|   301k|}
BN_is_bit_set:
  832|  28.9M|{
  833|  28.9M|    int i, j;
  834|       |
  835|  28.9M|    bn_check_top(a);
  836|  28.9M|    if (ossl_unlikely(n < 0))
  ------------------
  |  |   23|  28.9M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 28.9M]
  |  |  ------------------
  ------------------
  837|      0|        return 0;
  838|  28.9M|    i = n / BN_BITS2;
  ------------------
  |  |   54|  28.9M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  28.9M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  839|  28.9M|    j = n % BN_BITS2;
  ------------------
  |  |   54|  28.9M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  28.9M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  840|  28.9M|    if (ossl_unlikely(a->top <= i))
  ------------------
  |  |   23|  28.9M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 28.9M]
  |  |  ------------------
  ------------------
  841|      0|        return 0;
  842|  28.9M|    return (int)(((a->d[i]) >> j) & ((BN_ULONG)1));
  843|  28.9M|}
BN_set_negative:
  878|   162k|{
  879|   162k|    if (b && !BN_is_zero(a))
  ------------------
  |  Branch (879:9): [True: 0, False: 162k]
  |  Branch (879:14): [True: 0, False: 0]
  ------------------
  880|      0|        a->neg = 1;
  881|   162k|    else
  882|   162k|        a->neg = 0;
  883|   162k|}
BN_consttime_swap:
  943|   222k|{
  944|   222k|    BN_ULONG t;
  945|   222k|    int i;
  946|       |
  947|   222k|    bn_wcheck_size(a, nwords);
  948|   222k|    bn_wcheck_size(b, nwords);
  949|       |
  950|   222k|    condition = ((~condition & ((condition - 1))) >> (BN_BITS2 - 1)) - 1;
  ------------------
  |  |   54|   222k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   222k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  951|       |
  952|   222k|    t = (a->top ^ b->top) & condition;
  953|   222k|    a->top ^= t;
  954|   222k|    b->top ^= t;
  955|       |
  956|   222k|    t = (a->neg ^ b->neg) & condition;
  957|   222k|    a->neg ^= t;
  958|   222k|    b->neg ^= t;
  959|       |
  960|       |    /*-
  961|       |     * BN_FLG_STATIC_DATA: indicates that data may not be written to. Intention
  962|       |     * is actually to treat it as it's read-only data, and some (if not most)
  963|       |     * of it does reside in read-only segment. In other words observation of
  964|       |     * BN_FLG_STATIC_DATA in BN_consttime_swap should be treated as fatal
  965|       |     * condition. It would either cause SEGV or effectively cause data
  966|       |     * corruption.
  967|       |     *
  968|       |     * BN_FLG_MALLOCED: refers to BN structure itself, and hence must be
  969|       |     * preserved.
  970|       |     *
  971|       |     * BN_FLG_SECURE: must be preserved, because it determines how x->d was
  972|       |     * allocated and hence how to free it.
  973|       |     *
  974|       |     * BN_FLG_CONSTTIME: sufficient to mask and swap
  975|       |     *
  976|       |     * BN_FLG_FIXED_TOP: indicates that we haven't called bn_correct_top() on
  977|       |     * the data, so the d array may be padded with additional 0 values (i.e.
  978|       |     * top could be greater than the minimal value that it could be). We should
  979|       |     * be swapping it
  980|       |     */
  981|       |
  982|   222k|#define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  983|       |
  984|   222k|    t = ((a->flags ^ b->flags) & BN_CONSTTIME_SWAP_FLAGS) & condition;
  ------------------
  |  |  982|   222k|#define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  |  |  ------------------
  |  |  |  |   67|   222k|#define BN_FLG_CONSTTIME 0x04
  |  |  ------------------
  |  |               #define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  |  |  ------------------
  |  |  |  |  213|   222k|#define BN_FLG_FIXED_TOP 0
  |  |  ------------------
  ------------------
  985|   222k|    a->flags ^= t;
  986|   222k|    b->flags ^= t;
  987|       |
  988|       |    /* conditionally swap the data */
  989|  1.11M|    for (i = 0; i < nwords; i++) {
  ------------------
  |  Branch (989:17): [True: 889k, False: 222k]
  ------------------
  990|   889k|        t = (a->d[i] ^ b->d[i]) & condition;
  991|   889k|        a->d[i] ^= t;
  992|   889k|        b->d[i] ^= t;
  993|   889k|    }
  994|   222k|}
BN_security_bits:
 1001|    210|{
 1002|    210|    int secbits, bits;
 1003|    210|    if (L >= 15360)
  ------------------
  |  Branch (1003:9): [True: 0, False: 210]
  ------------------
 1004|      0|        secbits = 256;
 1005|    210|    else if (L >= 7680)
  ------------------
  |  Branch (1005:14): [True: 69, False: 141]
  ------------------
 1006|     69|        secbits = 192;
 1007|    141|    else if (L >= 3072)
  ------------------
  |  Branch (1007:14): [True: 72, False: 69]
  ------------------
 1008|     72|        secbits = 128;
 1009|     69|    else if (L >= 2048)
  ------------------
  |  Branch (1009:14): [True: 69, False: 0]
  ------------------
 1010|     69|        secbits = 112;
 1011|      0|    else if (L >= 1024)
  ------------------
  |  Branch (1011:14): [True: 0, False: 0]
  ------------------
 1012|      0|        secbits = 80;
 1013|      0|    else
 1014|      0|        return 0;
 1015|    210|    if (N == -1)
  ------------------
  |  Branch (1015:9): [True: 0, False: 210]
  ------------------
 1016|      0|        return secbits;
 1017|    210|    bits = N / 2;
 1018|    210|    if (bits < 80)
  ------------------
  |  Branch (1018:9): [True: 0, False: 210]
  ------------------
 1019|      0|        return 0;
 1020|    210|    return bits >= secbits ? secbits : bits;
  ------------------
  |  Branch (1020:12): [True: 210, False: 0]
  ------------------
 1021|    210|}
BN_zero_ex:
 1024|  12.7M|{
 1025|  12.7M|    a->neg = 0;
 1026|  12.7M|    a->top = 0;
 1027|  12.7M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  12.7M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1028|  12.7M|}
BN_abs_is_word:
 1031|   777k|{
 1032|   777k|    return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));
  ------------------
  |  Branch (1032:13): [True: 777k, False: 70]
  |  Branch (1032:30): [True: 476k, False: 301k]
  |  Branch (1032:50): [True: 0, False: 301k]
  |  Branch (1032:62): [True: 0, False: 0]
  ------------------
 1033|   777k|}
BN_is_zero:
 1036|  25.8M|{
 1037|  25.8M|    return a->top == 0;
 1038|  25.8M|}
BN_is_one:
 1041|   626k|{
 1042|   626k|    return BN_abs_is_word(a, 1) && !a->neg;
  ------------------
  |  Branch (1042:12): [True: 476k, False: 150k]
  |  Branch (1042:36): [True: 476k, False: 0]
  ------------------
 1043|   626k|}
BN_is_odd:
 1067|  9.95M|{
 1068|  9.95M|    return (a->top > 0) && (a->d[0] & 1);
  ------------------
  |  Branch (1068:12): [True: 9.95M, False: 0]
  |  Branch (1068:28): [True: 5.18M, False: 4.77M]
  ------------------
 1069|  9.95M|}
BN_is_negative:
 1072|  1.67M|{
 1073|  1.67M|    return (a->neg != 0);
 1074|  1.67M|}
BN_to_montgomery:
 1078|  90.0k|{
 1079|  90.0k|    return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
 1080|  90.0k|}
BN_with_flags:
 1083|    210|{
 1084|    210|    dest->d = b->d;
 1085|    210|    dest->top = b->top;
 1086|    210|    dest->dmax = b->dmax;
 1087|    210|    dest->neg = b->neg;
 1088|    210|    dest->flags = ((dest->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|    210|#define BN_FLG_MALLOCED 0x01
  ------------------
 1089|    210|        | (b->flags & ~BN_FLG_MALLOCED)
  ------------------
  |  |   58|    210|#define BN_FLG_MALLOCED 0x01
  ------------------
 1090|    210|        | BN_FLG_STATIC_DATA | flags);
  ------------------
  |  |   59|    210|#define BN_FLG_STATIC_DATA 0x02
  ------------------
 1091|    210|}
BN_GENCB_free:
 1104|    210|{
 1105|    210|    if (cb == NULL)
  ------------------
  |  Branch (1105:9): [True: 210, False: 0]
  ------------------
 1106|    210|        return;
 1107|      0|    OPENSSL_free(cb);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1108|      0|}
BN_set_flags:
 1111|  13.5k|{
 1112|  13.5k|    b->flags |= n;
 1113|  13.5k|}
BN_get_flags:
 1116|  71.8M|{
 1117|  71.8M|    return b->flags & n;
 1118|  71.8M|}
bn_wexpand:
 1146|  45.4M|{
 1147|  45.4M|    return (words <= a->dmax) ? a : bn_expand2(a, words);
  ------------------
  |  Branch (1147:12): [True: 33.1M, False: 12.3M]
  ------------------
 1148|  45.4M|}
bn_correct_top:
 1173|  18.6M|{
 1174|  18.6M|    BN_ULONG *ftl;
 1175|  18.6M|    int tmp_top = a->top;
 1176|       |
 1177|  18.6M|    if (ossl_likely(tmp_top > 0)) {
  ------------------
  |  |   22|  18.6M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 18.6M, False: 0]
  |  |  ------------------
  ------------------
 1178|  20.6M|        for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
  ------------------
  |  Branch (1178:38): [True: 20.6M, False: 0]
  ------------------
 1179|  20.6M|            ftl--;
 1180|  20.6M|            if (*ftl != 0)
  ------------------
  |  Branch (1180:17): [True: 18.6M, False: 2.00M]
  ------------------
 1181|  18.6M|                break;
 1182|  20.6M|        }
 1183|  18.6M|        a->top = tmp_top;
 1184|  18.6M|    }
 1185|  18.6M|    if (a->top == 0)
  ------------------
  |  Branch (1185:9): [True: 0, False: 18.6M]
  ------------------
 1186|      0|        a->neg = 0;
 1187|  18.6M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  18.6M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1188|  18.6M|    bn_pollute(a);
 1189|  18.6M|}
bn_lib.c:bn_num_bits_consttime:
  154|  1.72k|{
  155|  1.72k|    int j, ret;
  156|  1.72k|    unsigned int mask, past_i;
  157|  1.72k|    int i = a->top - 1;
  158|  1.72k|    bn_check_top(a);
  159|       |
  160|  10.0k|    for (j = 0, past_i = 0, ret = 0; j < a->dmax; j++) {
  ------------------
  |  Branch (160:38): [True: 8.35k, False: 1.72k]
  ------------------
  161|  8.35k|        mask = constant_time_eq_int(i, j); /* 0xff..ff if i==j, 0x0 otherwise */
  162|       |
  163|  8.35k|        ret += BN_BITS2 & (~mask & ~past_i);
  ------------------
  |  |   54|  8.35k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  8.35k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  164|  8.35k|        ret += BN_num_bits_word(a->d[j]) & mask;
  165|       |
  166|  8.35k|        past_i |= mask; /* past_i will become 0xff..ff after i==j */
  167|  8.35k|    }
  168|       |
  169|       |    /*
  170|       |     * if BN_is_zero(a) => i is -1 and ret contains garbage, so we mask the
  171|       |     * final result.
  172|       |     */
  173|  1.72k|    mask = ~(constant_time_eq_int(i, ((int)-1)));
  174|       |
  175|  1.72k|    return ret & mask;
  176|  1.72k|}
bn_lib.c:bn_free_d:
  203|  12.4M|{
  204|  12.4M|    if (BN_get_flags(a, BN_FLG_SECURE))
  ------------------
  |  |   68|  12.4M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (204:9): [True: 11.5k, False: 12.4M]
  ------------------
  205|  11.5k|        OPENSSL_secure_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  150|  11.5k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  206|  12.4M|    else if (clear != 0)
  ------------------
  |  Branch (206:14): [True: 7.18M, False: 5.26M]
  ------------------
  207|  7.18M|        OPENSSL_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  130|  7.18M|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|  5.26M|    else
  209|  5.26M|        OPENSSL_free(a->d);
  ------------------
  |  |  132|  5.26M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  210|  12.4M|}
bn_lib.c:bn_expand_internal:
  265|  12.4M|{
  266|  12.4M|    BN_ULONG *a = NULL;
  267|       |
  268|  12.4M|    if (ossl_unlikely(words > (INT_MAX / (4 * BN_BITS2)))) {
  ------------------
  |  |   23|  12.4M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.4M]
  |  |  ------------------
  ------------------
  269|      0|        ERR_raise(ERR_LIB_BN, BN_R_BIGNUM_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return NULL;
  271|      0|    }
  272|  12.4M|    if (ossl_unlikely(BN_get_flags(b, BN_FLG_STATIC_DATA))) {
  ------------------
  |  |   23|  12.4M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.4M]
  |  |  ------------------
  ------------------
  273|      0|        ERR_raise(ERR_LIB_BN, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  274|      0|        return NULL;
  275|      0|    }
  276|  12.4M|    if (BN_get_flags(b, BN_FLG_SECURE))
  ------------------
  |  |   68|  12.4M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (276:9): [True: 11.5k, False: 12.4M]
  ------------------
  277|  11.5k|        a = OPENSSL_secure_calloc(words, sizeof(*a));
  ------------------
  |  |  146|  11.5k|    CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  278|  12.4M|    else
  279|  12.4M|        a = OPENSSL_calloc(words, sizeof(*a));
  ------------------
  |  |  113|  12.4M|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  280|  12.4M|    if (ossl_unlikely(a == NULL))
  ------------------
  |  |   23|  12.4M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.4M]
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|       |
  283|  12.4M|    assert(b->top <= words);
  ------------------
  |  Branch (283:5): [True: 0, False: 12.4M]
  |  Branch (283:5): [True: 12.4M, False: 0]
  ------------------
  284|  12.4M|    if (b->top > 0)
  ------------------
  |  Branch (284:9): [True: 616k, False: 11.8M]
  ------------------
  285|   616k|        memcpy(a, b->d, sizeof(*a) * b->top);
  286|       |
  287|  12.4M|    return a;
  288|  12.4M|}
bn_lib.c:bin2bn:
  434|  2.45M|{
  435|  2.45M|    int inc;
  436|  2.45M|    const unsigned char *s2;
  437|  2.45M|    int inc2;
  438|  2.45M|    int neg = 0, xor = 0, carry = 0;
  439|  2.45M|    unsigned int i;
  440|  2.45M|    unsigned int n;
  441|  2.45M|    BIGNUM *bn = NULL;
  442|       |
  443|       |    /* Negative length is not acceptable */
  444|  2.45M|    if (len < 0)
  ------------------
  |  Branch (444:9): [True: 0, False: 2.45M]
  ------------------
  445|      0|        return NULL;
  446|       |
  447|  2.45M|    if (ret == NULL)
  ------------------
  |  Branch (447:9): [True: 976k, False: 1.48M]
  ------------------
  448|   976k|        ret = bn = BN_new();
  449|  2.45M|    if (ret == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 2.45M]
  ------------------
  450|      0|        return NULL;
  451|  2.45M|    bn_check_top(ret);
  452|       |
  453|       |    /*
  454|       |     * If the input has no bits, the number is considered zero.
  455|       |     * This makes calls with s==NULL and len==0 safe.
  456|       |     */
  457|  2.45M|    if (len == 0) {
  ------------------
  |  Branch (457:9): [True: 0, False: 2.45M]
  ------------------
  458|      0|        BN_clear(ret);
  459|      0|        return ret;
  460|      0|    }
  461|       |
  462|       |    /*
  463|       |     * The loop that does the work iterates from least to most
  464|       |     * significant BIGNUM chunk, so we adapt parameters to transfer
  465|       |     * input bytes accordingly.
  466|       |     */
  467|  2.45M|    if (endianness == LITTLE) {
  ------------------
  |  Branch (467:9): [True: 560, False: 2.45M]
  ------------------
  468|    560|        s2 = s + len - 1;
  469|    560|        inc2 = -1;
  470|    560|        inc = 1;
  471|  2.45M|    } else {
  472|  2.45M|        s2 = s;
  473|  2.45M|        inc2 = 1;
  474|  2.45M|        inc = -1;
  475|  2.45M|        s += len - 1;
  476|  2.45M|    }
  477|       |
  478|       |    /* Take note of the signedness of the input bytes*/
  479|  2.45M|    if (signedness == SIGNED) {
  ------------------
  |  Branch (479:9): [True: 0, False: 2.45M]
  ------------------
  480|      0|        neg = !!(*s2 & 0x80);
  481|      0|        xor = neg ? 0xff : 0x00;
  ------------------
  |  Branch (481:15): [True: 0, False: 0]
  ------------------
  482|      0|        carry = neg;
  483|      0|    }
  484|       |
  485|       |    /*
  486|       |     * Skip leading sign extensions (the value of |xor|).
  487|       |     * This is the only spot where |s2| and |inc2| are used.
  488|       |     */
  489|  2.86M|    for (; len > 0 && *s2 == xor; s2 += inc2, len--)
  ------------------
  |  Branch (489:12): [True: 2.86M, False: 0]
  |  Branch (489:23): [True: 408k, False: 2.45M]
  ------------------
  490|   408k|        continue;
  491|       |
  492|       |    /*
  493|       |     * If there was a set of 0xff, we backtrack one byte unless the next
  494|       |     * one has a sign bit, as the last 0xff is then part of the actual
  495|       |     * number, rather then a mere sign extension.
  496|       |     */
  497|  2.45M|    if (xor == 0xff) {
  ------------------
  |  Branch (497:9): [True: 0, False: 2.45M]
  ------------------
  498|      0|        if (len == 0 || !(*s2 & 0x80))
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  |  Branch (498:25): [True: 0, False: 0]
  ------------------
  499|      0|            len++;
  500|      0|    }
  501|       |    /* If it was all zeros, we're done */
  502|  2.45M|    if (len == 0) {
  ------------------
  |  Branch (502:9): [True: 0, False: 2.45M]
  ------------------
  503|      0|        ret->top = 0;
  504|      0|        return ret;
  505|      0|    }
  506|  2.45M|    n = ((len - 1) / BN_BYTES) + 1; /* Number of resulting bignum chunks */
  ------------------
  |  |   38|  2.45M|#define BN_BYTES 8
  ------------------
  507|  2.45M|    if (bn_wexpand(ret, (int)n) == NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 2.45M]
  ------------------
  508|      0|        BN_free(bn);
  509|      0|        return NULL;
  510|      0|    }
  511|  2.45M|    ret->top = n;
  512|  2.45M|    ret->neg = neg;
  513|  31.9M|    for (i = 0; n-- > 0; i++) {
  ------------------
  |  Branch (513:17): [True: 29.5M, False: 2.45M]
  ------------------
  514|  29.5M|        BN_ULONG l = 0; /* Accumulator */
  515|  29.5M|        unsigned int m = 0; /* Offset in a bignum chunk, in bits */
  516|       |
  517|   263M|        for (; len > 0 && m < BN_BYTES * 8; len--, s += inc, m += 8) {
  ------------------
  |  |   38|   261M|#define BN_BYTES 8
  ------------------
  |  Branch (517:16): [True: 261M, False: 2.45M]
  |  Branch (517:27): [True: 234M, False: 27.0M]
  ------------------
  518|   234M|            BN_ULONG byte_xored = *s ^ xor;
  519|   234M|            BN_ULONG byte = (byte_xored + carry) & 0xff;
  520|       |
  521|   234M|            carry = byte_xored > byte; /* Implicit 1 or 0 */
  522|   234M|            l |= (byte << m);
  523|   234M|        }
  524|  29.5M|        ret->d[i] = l;
  525|  29.5M|    }
  526|       |    /*
  527|       |     * need to call this due to clear byte at top if avoiding having the top
  528|       |     * bit set (-ve number)
  529|       |     */
  530|  2.45M|    bn_correct_top(ret);
  531|  2.45M|    return ret;
  532|  2.45M|}
bn_lib.c:bn2binpad:
  546|  1.37k|{
  547|  1.37k|    int inc;
  548|  1.37k|    int n, n8;
  549|  1.37k|    int xor = 0, carry = 0, ext = 0;
  550|  1.37k|    size_t i, lasti, j, atop, mask;
  551|  1.37k|    BN_ULONG l;
  552|       |
  553|       |    /*
  554|       |     * In case |a| is fixed-top, BN_num_bits can return bogus length,
  555|       |     * but it's assumed that fixed-top inputs ought to be "nominated"
  556|       |     * even for padded output, so it works out...
  557|       |     */
  558|  1.37k|    n8 = BN_num_bits(a);
  559|  1.37k|    n = (n8 + 7) / 8; /* This is what BN_num_bytes() does */
  560|       |
  561|       |    /* Take note of the signedness of the bignum */
  562|  1.37k|    if (signedness == SIGNED) {
  ------------------
  |  Branch (562:9): [True: 0, False: 1.37k]
  ------------------
  563|      0|        xor = a->neg ? 0xff : 0x00;
  ------------------
  |  Branch (563:15): [True: 0, False: 0]
  ------------------
  564|      0|        carry = a->neg;
  565|       |
  566|       |        /*
  567|       |         * if |n * 8 == n|, then the MSbit is set, otherwise unset.
  568|       |         * We must compensate with one extra byte if that doesn't
  569|       |         * correspond to the signedness of the bignum with regards
  570|       |         * to 2's complement.
  571|       |         */
  572|      0|        ext = (n * 8 == n8)
  ------------------
  |  Branch (572:15): [True: 0, False: 0]
  ------------------
  573|      0|            ? !a->neg /* MSbit set on nonnegative bignum */
  574|      0|            : a->neg; /* MSbit unset on negative bignum */
  575|      0|    }
  576|       |
  577|  1.37k|    if (tolen == -1) {
  ------------------
  |  Branch (577:9): [True: 882, False: 490]
  ------------------
  578|    882|        tolen = n + ext;
  579|    882|    } else if (tolen < n + ext) { /* uncommon/unlike case */
  ------------------
  |  Branch (579:16): [True: 0, False: 490]
  ------------------
  580|      0|        BIGNUM temp = *a;
  581|       |
  582|      0|        bn_correct_top(&temp);
  583|      0|        n8 = BN_num_bits(&temp);
  584|      0|        n = (n8 + 7) / 8; /* This is what BN_num_bytes() does */
  585|      0|        if (tolen < n + ext)
  ------------------
  |  Branch (585:13): [True: 0, False: 0]
  ------------------
  586|      0|            return -1;
  587|      0|    }
  588|       |
  589|       |    /* Swipe through whole available data and don't give away padded zero. */
  590|  1.37k|    atop = a->dmax * BN_BYTES;
  ------------------
  |  |   38|  1.37k|#define BN_BYTES 8
  ------------------
  591|  1.37k|    if (atop == 0) {
  ------------------
  |  Branch (591:9): [True: 0, False: 1.37k]
  ------------------
  592|      0|        if (tolen != 0)
  ------------------
  |  Branch (592:13): [True: 0, False: 0]
  ------------------
  593|      0|            memset(to, '\0', tolen);
  594|      0|        return tolen;
  595|      0|    }
  596|       |
  597|       |    /*
  598|       |     * The loop that does the work iterates from least significant
  599|       |     * to most significant BIGNUM limb, so we adapt parameters to
  600|       |     * transfer output bytes accordingly.
  601|       |     */
  602|  1.37k|    if (endianness == LITTLE) {
  ------------------
  |  Branch (602:9): [True: 280, False: 1.09k]
  ------------------
  603|    280|        inc = 1;
  604|  1.09k|    } else {
  605|  1.09k|        inc = -1;
  606|  1.09k|        to += tolen - 1; /* Move to the last byte, not beyond */
  607|  1.09k|    }
  608|       |
  609|  1.37k|    lasti = atop - 1;
  610|  1.37k|    atop = a->top * BN_BYTES;
  ------------------
  |  |   38|  1.37k|#define BN_BYTES 8
  ------------------
  611|   174k|    for (i = 0, j = 0; j < (size_t)tolen; j++) {
  ------------------
  |  Branch (611:24): [True: 172k, False: 1.37k]
  ------------------
  612|   172k|        unsigned char byte, byte_xored;
  613|       |
  614|   172k|        l = a->d[i / BN_BYTES];
  ------------------
  |  |   38|   172k|#define BN_BYTES 8
  ------------------
  615|   172k|        mask = 0 - ((j - atop) >> (8 * sizeof(i) - 1));
  616|   172k|        byte = (unsigned char)(l >> (8 * (i % BN_BYTES)) & mask);
  ------------------
  |  |   38|   172k|#define BN_BYTES 8
  ------------------
  617|   172k|        byte_xored = byte ^ xor;
  618|   172k|        *to = (unsigned char)(byte_xored + carry);
  619|   172k|        carry = byte_xored > *to; /* Implicit 1 or 0 */
  620|   172k|        to += inc;
  621|   172k|        i += (i - lasti) >> (8 * sizeof(i) - 1); /* stay on last limb */
  622|   172k|    }
  623|       |
  624|  1.37k|    return tolen;
  625|  1.37k|}

bn_lib.c:bn_expand:
  672|   326k|{
  673|   326k|    if (bits > (INT_MAX - BN_BITS2 + 1))
  ------------------
  |  |   54|   326k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   326k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (673:9): [True: 0, False: 326k]
  ------------------
  674|      0|        return NULL;
  675|       |
  676|   326k|    if (((bits + BN_BITS2 - 1) / BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   54|   326k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   326k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                  if (((bits + BN_BITS2 - 1) / BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   54|   326k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   326k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (676:9): [True: 162k, False: 163k]
  ------------------
  677|   162k|        return a;
  678|       |
  679|   163k|    return bn_expand2((a), (bits + BN_BITS2 - 1) / BN_BITS2);
  ------------------
  |  |   54|   163k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   163k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                  return bn_expand2((a), (bits + BN_BITS2 - 1) / BN_BITS2);
  ------------------
  |  |   54|   163k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   163k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  680|   326k|}

BN_nnmod:
   15|  1.60M|{
   16|       |    /*
   17|       |     * like BN_mod, but returns non-negative remainder (i.e., 0 <= r < |m|
   18|       |     * always holds)
   19|       |     */
   20|       |
   21|  1.60M|    if (r == m) {
  ------------------
  |  Branch (21:9): [True: 0, False: 1.60M]
  ------------------
   22|      0|        ERR_raise(ERR_LIB_BN, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   23|      0|        return 0;
   24|      0|    }
   25|       |
   26|  1.60M|    if (!(BN_mod(r, a, m, ctx)))
  ------------------
  |  |  276|  1.60M|#define BN_mod(rem, a, m, ctx) BN_div(NULL, (rem), (a), (m), (ctx))
  ------------------
  |  Branch (26:9): [True: 0, False: 1.60M]
  ------------------
   27|      0|        return 0;
   28|  1.60M|    if (!r->neg)
  ------------------
  |  Branch (28:9): [True: 1.45M, False: 150k]
  ------------------
   29|  1.45M|        return 1;
   30|       |    /* now   -|m| < r < 0,  so we have to set  r := r + |m| */
   31|   150k|    return (m->neg ? BN_sub : BN_add)(r, r, m);
  ------------------
  |  Branch (31:13): [True: 0, False: 150k]
  ------------------
   32|  1.60M|}
bn_mod_add_fixed_top:
   56|  1.09M|{
   57|  1.09M|    size_t i, ai, bi, mtop = m->top;
   58|  1.09M|    BN_ULONG storage[1024 / BN_BITS2];
   59|  1.09M|    BN_ULONG carry, temp, mask, *rp, *tp = storage;
   60|  1.09M|    const BN_ULONG *ap, *bp;
   61|       |
   62|  1.09M|    if (bn_wexpand(r, (int)mtop) == NULL)
  ------------------
  |  Branch (62:9): [True: 0, False: 1.09M]
  ------------------
   63|      0|        return 0;
   64|       |
   65|  1.09M|    if (mtop > OSSL_NELEM(storage)) {
  ------------------
  |  |   14|  1.09M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (65:9): [True: 0, False: 1.09M]
  ------------------
   66|      0|        tp = OPENSSL_malloc_array(mtop, sizeof(BN_ULONG));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|      0|        if (tp == NULL)
  ------------------
  |  Branch (67:13): [True: 0, False: 0]
  ------------------
   68|      0|            return 0;
   69|      0|    }
   70|       |
   71|  1.09M|    ap = a->d != NULL ? a->d : tp;
  ------------------
  |  Branch (71:10): [True: 1.09M, False: 0]
  ------------------
   72|  1.09M|    bp = b->d != NULL ? b->d : tp;
  ------------------
  |  Branch (72:10): [True: 1.09M, False: 0]
  ------------------
   73|       |
   74|  6.71M|    for (i = 0, ai = 0, bi = 0, carry = 0; i < mtop;) {
  ------------------
  |  Branch (74:44): [True: 5.62M, False: 1.09M]
  ------------------
   75|  5.62M|        mask = (BN_ULONG)0 - ((i - a->top) >> (8 * sizeof(i) - 1));
   76|  5.62M|        temp = ((ap[ai] & mask) + carry) & BN_MASK2;
  ------------------
  |  |   77|  5.62M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   77|  5.62M|        carry = (temp < carry);
   78|       |
   79|  5.62M|        mask = (BN_ULONG)0 - ((i - b->top) >> (8 * sizeof(i) - 1));
   80|  5.62M|        tp[i] = ((bp[bi] & mask) + temp) & BN_MASK2;
  ------------------
  |  |   77|  5.62M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   81|  5.62M|        carry += (tp[i] < temp);
   82|       |
   83|  5.62M|        i++;
   84|  5.62M|        ai += (i - a->dmax) >> (8 * sizeof(i) - 1);
   85|  5.62M|        bi += (i - b->dmax) >> (8 * sizeof(i) - 1);
   86|  5.62M|    }
   87|  1.09M|    rp = r->d;
   88|  1.09M|    carry -= bn_sub_words(rp, tp, m->d, (int)mtop);
   89|  6.71M|    for (i = 0; i < mtop; i++) {
  ------------------
  |  Branch (89:17): [True: 5.62M, False: 1.09M]
  ------------------
   90|  5.62M|        rp[i] = (carry & tp[i]) | (~carry & rp[i]);
   91|  5.62M|        ((volatile BN_ULONG *)tp)[i] = 0;
   92|  5.62M|    }
   93|  1.09M|    r->top = (int)mtop;
   94|  1.09M|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.09M|#define BN_FLG_FIXED_TOP 0
  ------------------
   95|  1.09M|    r->neg = 0;
   96|       |
   97|  1.09M|    if (tp != storage)
  ------------------
  |  Branch (97:9): [True: 0, False: 1.09M]
  ------------------
   98|      0|        OPENSSL_free(tp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|       |
  100|  1.09M|    return 1;
  101|  1.09M|}
BN_mod_add_quick:
  105|  1.09M|{
  106|  1.09M|    int ret = bn_mod_add_fixed_top(r, a, b, m);
  107|       |
  108|  1.09M|    if (ret)
  ------------------
  |  Branch (108:9): [True: 1.09M, False: 0]
  ------------------
  109|  1.09M|        bn_correct_top(r);
  110|       |
  111|  1.09M|    return ret;
  112|  1.09M|}
BN_mod_sub_quick:
  192|   443k|{
  193|   443k|    if (r == m) {
  ------------------
  |  Branch (193:9): [True: 0, False: 443k]
  ------------------
  194|      0|        ERR_raise(ERR_LIB_BN, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  195|      0|        return 0;
  196|      0|    }
  197|       |
  198|   443k|    if (!BN_sub(r, a, b))
  ------------------
  |  Branch (198:9): [True: 0, False: 443k]
  ------------------
  199|      0|        return 0;
  200|   443k|    if (r->neg)
  ------------------
  |  Branch (200:9): [True: 221k, False: 221k]
  ------------------
  201|   221k|        return BN_add(r, r, m);
  202|   221k|    return 1;
  203|   443k|}
BN_mod_lshift1_quick:
  256|   148k|{
  257|   148k|    if (!BN_lshift1(r, a))
  ------------------
  |  Branch (257:9): [True: 0, False: 148k]
  ------------------
  258|      0|        return 0;
  259|   148k|    bn_check_top(r);
  260|   148k|    if (BN_cmp(r, m) >= 0)
  ------------------
  |  Branch (260:9): [True: 73.7k, False: 74.3k]
  ------------------
  261|  73.7k|        return BN_sub(r, r, m);
  262|  74.3k|    return 1;
  263|   148k|}
BN_mod_lshift_quick:
  293|  74.3k|{
  294|  74.3k|    if (r != a) {
  ------------------
  |  Branch (294:9): [True: 73.7k, False: 576]
  ------------------
  295|  73.7k|        if (BN_copy(r, a) == NULL)
  ------------------
  |  Branch (295:13): [True: 0, False: 73.7k]
  ------------------
  296|      0|            return 0;
  297|  73.7k|    }
  298|       |
  299|   149k|    while (n > 0) {
  ------------------
  |  Branch (299:12): [True: 75.1k, False: 74.3k]
  ------------------
  300|  75.1k|        int max_shift;
  301|       |
  302|       |        /* 0 < r < m */
  303|  75.1k|        max_shift = BN_num_bits(m) - BN_num_bits(r);
  304|       |        /* max_shift >= 0 */
  305|       |
  306|  75.1k|        if (max_shift < 0) {
  ------------------
  |  Branch (306:13): [True: 0, False: 75.1k]
  ------------------
  307|      0|            ERR_raise(ERR_LIB_BN, BN_R_INPUT_NOT_REDUCED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  308|      0|            return 0;
  309|      0|        }
  310|       |
  311|  75.1k|        if (max_shift > n)
  ------------------
  |  Branch (311:13): [True: 0, False: 75.1k]
  ------------------
  312|      0|            max_shift = n;
  313|       |
  314|  75.1k|        if (max_shift) {
  ------------------
  |  Branch (314:13): [True: 73.7k, False: 1.44k]
  ------------------
  315|  73.7k|            if (!BN_lshift(r, r, max_shift))
  ------------------
  |  Branch (315:17): [True: 0, False: 73.7k]
  ------------------
  316|      0|                return 0;
  317|  73.7k|            n -= max_shift;
  318|  73.7k|        } else {
  319|  1.44k|            if (!BN_lshift1(r, r))
  ------------------
  |  Branch (319:17): [True: 0, False: 1.44k]
  ------------------
  320|      0|                return 0;
  321|  1.44k|            --n;
  322|  1.44k|        }
  323|       |
  324|       |        /* BN_num_bits(r) <= BN_num_bits(m) */
  325|       |
  326|  75.1k|        if (BN_cmp(r, m) >= 0) {
  ------------------
  |  Branch (326:13): [True: 1.44k, False: 73.7k]
  ------------------
  327|  1.44k|            if (!BN_sub(r, r, m))
  ------------------
  |  Branch (327:17): [True: 0, False: 1.44k]
  ------------------
  328|      0|                return 0;
  329|  1.44k|        }
  330|  75.1k|    }
  331|  74.3k|    bn_check_top(r);
  332|       |
  333|  74.3k|    return 1;
  334|  74.3k|}

BN_mod_mul_montgomery:
   27|  1.64M|{
   28|  1.64M|    int ret = bn_mul_mont_fixed_top(r, a, b, mont, ctx);
   29|       |
   30|  1.64M|    bn_correct_top(r);
   31|  1.64M|    bn_check_top(r);
   32|       |
   33|  1.64M|    return ret;
   34|  1.64M|}
bn_mul_mont_fixed_top:
   38|  1.76M|{
   39|  1.76M|    BIGNUM *tmp;
   40|  1.76M|    int ret = 0;
   41|  1.76M|    int num = mont->N.top;
   42|       |
   43|  1.76M|#if defined(OPENSSL_BN_ASM_MONT) && defined(MONT_WORD)
   44|  1.76M|    if (num > 1 && num <= BN_SOFT_LIMIT && a->top == num && b->top == num) {
  ------------------
  |  |   52|  3.52M|#define BN_SOFT_LIMIT (4096 / BN_BYTES)
  |  |  ------------------
  |  |  |  |   38|  1.76M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (44:9): [True: 1.76M, False: 0]
  |  Branch (44:20): [True: 1.76M, False: 0]
  |  Branch (44:44): [True: 1.74M, False: 13.0k]
  |  Branch (44:61): [True: 1.74M, False: 0]
  ------------------
   45|  1.74M|        if (bn_wexpand(r, num) == NULL)
  ------------------
  |  Branch (45:13): [True: 0, False: 1.74M]
  ------------------
   46|      0|            return 0;
   47|  1.74M|        if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) {
  ------------------
  |  Branch (47:13): [True: 1.74M, False: 0]
  ------------------
   48|  1.74M|            r->neg = a->neg ^ b->neg;
   49|  1.74M|            r->top = num;
   50|  1.74M|            r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.74M|#define BN_FLG_FIXED_TOP 0
  ------------------
   51|  1.74M|            return 1;
   52|  1.74M|        }
   53|  1.74M|    }
   54|  13.0k|#endif
   55|       |
   56|  13.0k|    if ((a->top + b->top) > 2 * num)
  ------------------
  |  Branch (56:9): [True: 0, False: 13.0k]
  ------------------
   57|      0|        return 0;
   58|       |
   59|  13.0k|    BN_CTX_start(ctx);
   60|  13.0k|    tmp = BN_CTX_get(ctx);
   61|  13.0k|    if (tmp == NULL)
  ------------------
  |  Branch (61:9): [True: 0, False: 13.0k]
  ------------------
   62|      0|        goto err;
   63|       |
   64|  13.0k|    bn_check_top(tmp);
   65|  13.0k|    if (a == b) {
  ------------------
  |  Branch (65:9): [True: 0, False: 13.0k]
  ------------------
   66|      0|        if (!bn_sqr_fixed_top(tmp, a, ctx))
  ------------------
  |  Branch (66:13): [True: 0, False: 0]
  ------------------
   67|      0|            goto err;
   68|  13.0k|    } else {
   69|  13.0k|        if (!bn_mul_fixed_top(tmp, a, b, ctx))
  ------------------
  |  Branch (69:13): [True: 0, False: 13.0k]
  ------------------
   70|      0|            goto err;
   71|  13.0k|    }
   72|       |    /* reduce from aRR to aR */
   73|  13.0k|#ifdef MONT_WORD
   74|  13.0k|    if (!bn_from_montgomery_word(r, tmp, mont))
  ------------------
  |  Branch (74:9): [True: 0, False: 13.0k]
  ------------------
   75|      0|        goto err;
   76|       |#else
   77|       |    if (!BN_from_montgomery(r, tmp, mont, ctx))
   78|       |        goto err;
   79|       |#endif
   80|  13.0k|    ret = 1;
   81|  13.0k|err:
   82|  13.0k|    BN_CTX_end(ctx);
   83|  13.0k|    return ret;
   84|  13.0k|}
BN_from_montgomery:
  163|  1.44k|{
  164|  1.44k|    int retn;
  165|       |
  166|  1.44k|    retn = bn_from_mont_fixed_top(ret, a, mont, ctx);
  167|  1.44k|    bn_correct_top(ret);
  168|  1.44k|    bn_check_top(ret);
  169|       |
  170|  1.44k|    return retn;
  171|  1.44k|}
bn_from_mont_fixed_top:
  175|  1.65k|{
  176|  1.65k|    int retn = 0;
  177|  1.65k|#ifdef MONT_WORD
  178|  1.65k|    BIGNUM *t;
  179|       |
  180|  1.65k|    BN_CTX_start(ctx);
  181|  1.65k|    if ((t = BN_CTX_get(ctx)) && BN_copy(t, a)) {
  ------------------
  |  Branch (181:9): [True: 1.65k, False: 0]
  |  Branch (181:34): [True: 1.65k, False: 0]
  ------------------
  182|  1.65k|        retn = bn_from_montgomery_word(ret, t, mont);
  183|  1.65k|    }
  184|  1.65k|    BN_CTX_end(ctx);
  185|       |#else /* !MONT_WORD */
  186|       |    BIGNUM *t1, *t2;
  187|       |
  188|       |    BN_CTX_start(ctx);
  189|       |    t1 = BN_CTX_get(ctx);
  190|       |    t2 = BN_CTX_get(ctx);
  191|       |    if (t2 == NULL)
  192|       |        goto err;
  193|       |
  194|       |    if (!BN_copy(t1, a))
  195|       |        goto err;
  196|       |    BN_mask_bits(t1, mont->ri);
  197|       |
  198|       |    if (!BN_mul(t2, t1, &mont->Ni, ctx))
  199|       |        goto err;
  200|       |    BN_mask_bits(t2, mont->ri);
  201|       |
  202|       |    if (!BN_mul(t1, t2, &mont->N, ctx))
  203|       |        goto err;
  204|       |    if (!BN_add(t2, a, t1))
  205|       |        goto err;
  206|       |    if (!BN_rshift(ret, t2, mont->ri))
  207|       |        goto err;
  208|       |
  209|       |    if (BN_ucmp(ret, &(mont->N)) >= 0) {
  210|       |        if (!BN_usub(ret, ret, &(mont->N)))
  211|       |            goto err;
  212|       |    }
  213|       |    retn = 1;
  214|       |    bn_check_top(ret);
  215|       |err:
  216|       |    BN_CTX_end(ctx);
  217|       |#endif /* MONT_WORD */
  218|  1.65k|    return retn;
  219|  1.65k|}
bn_to_mont_fixed_top:
  223|    498|{
  224|    498|    return bn_mul_mont_fixed_top(r, a, &(mont->RR), mont, ctx);
  225|    498|}
BN_MONT_CTX_new:
  228|   351k|{
  229|   351k|    BN_MONT_CTX *ret;
  230|       |
  231|   351k|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  107|   351k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (231:9): [True: 0, False: 351k]
  ------------------
  232|      0|        return NULL;
  233|       |
  234|   351k|    BN_MONT_CTX_init(ret);
  235|   351k|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|   351k|#define BN_FLG_MALLOCED 0x01
  ------------------
  236|   351k|    return ret;
  237|   351k|}
BN_MONT_CTX_init:
  240|   351k|{
  241|   351k|    ctx->ri = 0;
  242|   351k|    bn_init(&ctx->RR);
  243|   351k|    bn_init(&ctx->N);
  244|   351k|    bn_init(&ctx->Ni);
  245|   351k|    ctx->n0[0] = ctx->n0[1] = 0;
  246|   351k|    ctx->flags = 0;
  247|   351k|}
BN_MONT_CTX_free:
  250|  1.56M|{
  251|  1.56M|    if (mont == NULL)
  ------------------
  |  Branch (251:9): [True: 1.21M, False: 351k]
  ------------------
  252|  1.21M|        return;
  253|   351k|    BN_clear_free(&mont->RR);
  254|   351k|    BN_clear_free(&mont->N);
  255|   351k|    BN_clear_free(&mont->Ni);
  256|   351k|    if (mont->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|   351k|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (256:9): [True: 351k, False: 0]
  ------------------
  257|   351k|        OPENSSL_free(mont);
  ------------------
  |  |  132|   351k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|   351k|}
BN_MONT_CTX_set:
  261|   150k|{
  262|   150k|    int i, ret = 0;
  263|   150k|    BIGNUM *Ri, *R;
  264|       |
  265|   150k|    if (BN_is_zero(mod))
  ------------------
  |  Branch (265:9): [True: 0, False: 150k]
  ------------------
  266|      0|        return 0;
  267|       |
  268|   150k|    BN_CTX_start(ctx);
  269|   150k|    if ((Ri = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (269:9): [True: 0, False: 150k]
  ------------------
  270|      0|        goto err;
  271|   150k|    R = &(mont->RR); /* grab RR as a temp */
  272|   150k|    if (!BN_copy(&(mont->N), mod))
  ------------------
  |  Branch (272:9): [True: 0, False: 150k]
  ------------------
  273|      0|        goto err; /* Set N */
  274|   150k|    if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|   150k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (274:9): [True: 0, False: 150k]
  ------------------
  275|      0|        BN_set_flags(&(mont->N), BN_FLG_CONSTTIME);
  ------------------
  |  |   67|      0|#define BN_FLG_CONSTTIME 0x04
  ------------------
  276|   150k|    mont->N.neg = 0;
  277|       |
  278|   150k|#ifdef MONT_WORD
  279|   150k|    {
  280|   150k|        BIGNUM tmod;
  281|   150k|        BN_ULONG buf[2];
  282|       |
  283|   150k|        bn_init(&tmod);
  284|   150k|        tmod.d = buf;
  285|   150k|        tmod.dmax = 2;
  286|   150k|        tmod.neg = 0;
  287|       |
  288|   150k|        if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|   150k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (288:13): [True: 0, False: 150k]
  ------------------
  289|      0|            BN_set_flags(&tmod, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|      0|#define BN_FLG_CONSTTIME 0x04
  ------------------
  290|       |
  291|   150k|        mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|   150k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   150k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                      mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|   150k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   150k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                      mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|   150k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   150k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  292|       |
  293|       |#if defined(OPENSSL_BN_ASM_MONT) && (BN_BITS2 <= 32)
  294|       |        /*
  295|       |         * Only certain BN_BITS2<=32 platforms actually make use of n0[1],
  296|       |         * and we could use the #else case (with a shorter R value) for the
  297|       |         * others.  However, currently only the assembler files do know which
  298|       |         * is which.
  299|       |         */
  300|       |
  301|       |        BN_zero(R);
  302|       |        if (!(BN_set_bit(R, 2 * BN_BITS2)))
  303|       |            goto err;
  304|       |
  305|       |        tmod.top = 0;
  306|       |        if ((buf[0] = mod->d[0]))
  307|       |            tmod.top = 1;
  308|       |        if ((buf[1] = mod->top > 1 ? mod->d[1] : 0))
  309|       |            tmod.top = 2;
  310|       |
  311|       |        if (BN_is_one(&tmod))
  312|       |            BN_zero(Ri);
  313|       |        else if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
  314|       |            goto err;
  315|       |        if (!BN_lshift(Ri, Ri, 2 * BN_BITS2))
  316|       |            goto err; /* R*Ri */
  317|       |        if (!BN_is_zero(Ri)) {
  318|       |            if (!BN_sub_word(Ri, 1))
  319|       |                goto err;
  320|       |        } else { /* if N mod word size == 1 */
  321|       |
  322|       |            if (bn_expand(Ri, (int)sizeof(BN_ULONG) * 2) == NULL)
  323|       |                goto err;
  324|       |            /* Ri-- (mod double word size) */
  325|       |            Ri->neg = 0;
  326|       |            Ri->d[0] = BN_MASK2;
  327|       |            Ri->d[1] = BN_MASK2;
  328|       |            Ri->top = 2;
  329|       |        }
  330|       |        if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
  331|       |            goto err;
  332|       |        /*
  333|       |         * Ni = (R*Ri-1)/N, keep only couple of least significant words:
  334|       |         */
  335|       |        mont->n0[0] = (Ri->top > 0) ? Ri->d[0] : 0;
  336|       |        mont->n0[1] = (Ri->top > 1) ? Ri->d[1] : 0;
  337|       |#else
  338|   150k|        BN_zero(R);
  ------------------
  |  |  201|   150k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  339|   150k|        if (!(BN_set_bit(R, BN_BITS2)))
  ------------------
  |  |   54|   150k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   150k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (339:13): [True: 0, False: 150k]
  ------------------
  340|      0|            goto err; /* R */
  341|       |
  342|   150k|        buf[0] = mod->d[0]; /* tmod = N mod word size */
  343|   150k|        buf[1] = 0;
  344|   150k|        tmod.top = buf[0] != 0 ? 1 : 0;
  ------------------
  |  Branch (344:20): [True: 150k, False: 0]
  ------------------
  345|       |        /* Ri = R^-1 mod N */
  346|   150k|        if (BN_is_one(&tmod))
  ------------------
  |  Branch (346:13): [True: 0, False: 150k]
  ------------------
  347|      0|            BN_zero(Ri);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  348|   150k|        else if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
  ------------------
  |  Branch (348:18): [True: 0, False: 150k]
  ------------------
  349|      0|            goto err;
  350|   150k|        if (!BN_lshift(Ri, Ri, BN_BITS2))
  ------------------
  |  |   54|   150k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   150k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (350:13): [True: 0, False: 150k]
  ------------------
  351|      0|            goto err; /* R*Ri */
  352|   150k|        if (!BN_is_zero(Ri)) {
  ------------------
  |  Branch (352:13): [True: 150k, False: 0]
  ------------------
  353|   150k|            if (!BN_sub_word(Ri, 1))
  ------------------
  |  Branch (353:17): [True: 0, False: 150k]
  ------------------
  354|      0|                goto err;
  355|   150k|        } else { /* if N mod word size == 1 */
  356|       |
  357|      0|            if (!BN_set_word(Ri, BN_MASK2))
  ------------------
  |  |   77|      0|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  |  Branch (357:17): [True: 0, False: 0]
  ------------------
  358|      0|                goto err; /* Ri-- (mod word size) */
  359|      0|        }
  360|   150k|        if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
  ------------------
  |  Branch (360:13): [True: 0, False: 150k]
  ------------------
  361|      0|            goto err;
  362|       |        /*
  363|       |         * Ni = (R*Ri-1)/N, keep only least significant word:
  364|       |         */
  365|   150k|        mont->n0[0] = (Ri->top > 0) ? Ri->d[0] : 0;
  ------------------
  |  Branch (365:23): [True: 150k, False: 0]
  ------------------
  366|   150k|        mont->n0[1] = 0;
  367|   150k|#endif
  368|   150k|    }
  369|       |#else /* !MONT_WORD */
  370|       |    { /* bignum version */
  371|       |        mont->ri = BN_num_bits(&mont->N);
  372|       |        BN_zero(R);
  373|       |        if (!BN_set_bit(R, mont->ri))
  374|       |            goto err; /* R = 2^ri */
  375|       |        /* Ri = R^-1 mod N */
  376|       |        if ((BN_mod_inverse(Ri, R, &mont->N, ctx)) == NULL)
  377|       |            goto err;
  378|       |        if (!BN_lshift(Ri, Ri, mont->ri))
  379|       |            goto err; /* R*Ri */
  380|       |        if (!BN_sub_word(Ri, 1))
  381|       |            goto err;
  382|       |        /*
  383|       |         * Ni = (R*Ri-1) / N
  384|       |         */
  385|       |        if (!BN_div(&(mont->Ni), NULL, Ri, &mont->N, ctx))
  386|       |            goto err;
  387|       |    }
  388|       |#endif
  389|       |
  390|       |    /* setup RR for conversions */
  391|   150k|    BN_zero(&(mont->RR));
  ------------------
  |  |  201|   150k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  392|   150k|    if (!BN_set_bit(&(mont->RR), mont->ri * 2))
  ------------------
  |  Branch (392:9): [True: 0, False: 150k]
  ------------------
  393|      0|        goto err;
  394|   150k|    if (!BN_mod(&(mont->RR), &(mont->RR), &(mont->N), ctx))
  ------------------
  |  |  276|   150k|#define BN_mod(rem, a, m, ctx) BN_div(NULL, (rem), (a), (m), (ctx))
  ------------------
  |  Branch (394:9): [True: 0, False: 150k]
  ------------------
  395|      0|        goto err;
  396|       |
  397|   150k|    for (i = mont->RR.top, ret = mont->N.top; i < ret; i++)
  ------------------
  |  Branch (397:47): [True: 0, False: 150k]
  ------------------
  398|      0|        mont->RR.d[i] = 0;
  399|   150k|    mont->RR.top = ret;
  400|   150k|    mont->RR.flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   150k|#define BN_FLG_FIXED_TOP 0
  ------------------
  401|       |
  402|   150k|    ret = 1;
  403|   150k|err:
  404|   150k|    BN_CTX_end(ctx);
  405|   150k|    return ret;
  406|   150k|}
BN_MONT_CTX_copy:
  409|   175k|{
  410|   175k|    if (to == from)
  ------------------
  |  Branch (410:9): [True: 0, False: 175k]
  ------------------
  411|      0|        return to;
  412|       |
  413|   175k|    if (!BN_copy(&(to->RR), &(from->RR)))
  ------------------
  |  Branch (413:9): [True: 0, False: 175k]
  ------------------
  414|      0|        return NULL;
  415|   175k|    if (!BN_copy(&(to->N), &(from->N)))
  ------------------
  |  Branch (415:9): [True: 0, False: 175k]
  ------------------
  416|      0|        return NULL;
  417|   175k|    if (!BN_copy(&(to->Ni), &(from->Ni)))
  ------------------
  |  Branch (417:9): [True: 0, False: 175k]
  ------------------
  418|      0|        return NULL;
  419|   175k|    to->ri = from->ri;
  420|   175k|    to->n0[0] = from->n0[0];
  421|   175k|    to->n0[1] = from->n0[1];
  422|   175k|    return to;
  423|   175k|}
BN_MONT_CTX_set_locked:
  427|    210|{
  428|    210|    BN_MONT_CTX *ret;
  429|       |
  430|    210|    if (!CRYPTO_THREAD_read_lock(lock))
  ------------------
  |  Branch (430:9): [True: 0, False: 210]
  ------------------
  431|      0|        return NULL;
  432|    210|    ret = *pmont;
  433|    210|    CRYPTO_THREAD_unlock(lock);
  434|    210|    if (ret)
  ------------------
  |  Branch (434:9): [True: 0, False: 210]
  ------------------
  435|      0|        return ret;
  436|       |
  437|       |    /*
  438|       |     * We don't want to serialize globally while doing our lazy-init math in
  439|       |     * BN_MONT_CTX_set. That punishes threads that are doing independent
  440|       |     * things. Instead, punish the case where more than one thread tries to
  441|       |     * lazy-init the same 'pmont', by having each do the lazy-init math work
  442|       |     * independently and only use the one from the thread that wins the race
  443|       |     * (the losers throw away the work they've done).
  444|       |     */
  445|    210|    ret = BN_MONT_CTX_new();
  446|    210|    if (ret == NULL)
  ------------------
  |  Branch (446:9): [True: 0, False: 210]
  ------------------
  447|      0|        return NULL;
  448|    210|    if (!BN_MONT_CTX_set(ret, mod, ctx)) {
  ------------------
  |  Branch (448:9): [True: 0, False: 210]
  ------------------
  449|      0|        BN_MONT_CTX_free(ret);
  450|      0|        return NULL;
  451|      0|    }
  452|       |
  453|       |    /* The locked compare-and-set, after the local work is done. */
  454|    210|    if (!CRYPTO_THREAD_write_lock(lock)) {
  ------------------
  |  Branch (454:9): [True: 0, False: 210]
  ------------------
  455|      0|        BN_MONT_CTX_free(ret);
  456|      0|        return NULL;
  457|      0|    }
  458|       |
  459|    210|    if (*pmont) {
  ------------------
  |  Branch (459:9): [True: 0, False: 210]
  ------------------
  460|      0|        BN_MONT_CTX_free(ret);
  461|      0|        ret = *pmont;
  462|      0|    } else
  463|    210|        *pmont = ret;
  464|    210|    CRYPTO_THREAD_unlock(lock);
  465|    210|    return ret;
  466|    210|}
ossl_bn_mont_ctx_set:
  470|  25.1k|{
  471|  25.1k|    if (BN_copy(&ctx->N, modulus) == NULL)
  ------------------
  |  Branch (471:9): [True: 0, False: 25.1k]
  ------------------
  472|      0|        return 0;
  473|  25.1k|    if (BN_bin2bn(rr, rrlen, &ctx->RR) == NULL)
  ------------------
  |  Branch (473:9): [True: 0, False: 25.1k]
  ------------------
  474|      0|        return 0;
  475|  25.1k|    ctx->ri = ri;
  476|       |#if (BN_BITS2 <= 32) && defined(OPENSSL_BN_ASM_MONT)
  477|       |    ctx->n0[0] = nlo;
  478|       |    ctx->n0[1] = nhi;
  479|       |#elif BN_BITS2 <= 32
  480|       |    ctx->n0[0] = nlo;
  481|       |    ctx->n0[1] = 0;
  482|       |#else
  483|  25.1k|    ctx->n0[0] = ((BN_ULONG)nhi << 32) | nlo;
  484|  25.1k|    ctx->n0[1] = 0;
  485|  25.1k|#endif
  486|       |
  487|  25.1k|    return 1;
  488|  25.1k|}
bn_mont.c:bn_from_montgomery_word:
   88|  14.7k|{
   89|  14.7k|    BIGNUM *n;
   90|  14.7k|    BN_ULONG *ap, *np, *rp, n0, v, carry;
   91|  14.7k|    int nl, max, i;
   92|  14.7k|    unsigned int rtop;
   93|       |
   94|  14.7k|    n = &(mont->N);
   95|  14.7k|    nl = n->top;
   96|  14.7k|    if (nl == 0) {
  ------------------
  |  Branch (96:9): [True: 0, False: 14.7k]
  ------------------
   97|      0|        ret->top = 0;
   98|      0|        return 1;
   99|      0|    }
  100|       |
  101|  14.7k|    max = (2 * nl); /* carry is stored separately */
  102|  14.7k|    if (bn_wexpand(r, max) == NULL)
  ------------------
  |  Branch (102:9): [True: 0, False: 14.7k]
  ------------------
  103|      0|        return 0;
  104|       |
  105|  14.7k|    r->neg ^= n->neg;
  106|  14.7k|    np = n->d;
  107|  14.7k|    rp = r->d;
  108|       |
  109|       |    /* clear the top words of T */
  110|   190k|    for (rtop = r->top, i = 0; i < max; i++) {
  ------------------
  |  Branch (110:32): [True: 175k, False: 14.7k]
  ------------------
  111|   175k|        v = (BN_ULONG)0 - ((i - rtop) >> (8 * sizeof(rtop) - 1));
  112|   175k|        rp[i] &= v;
  113|   175k|    }
  114|       |
  115|  14.7k|    r->top = max;
  116|  14.7k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  14.7k|#define BN_FLG_FIXED_TOP 0
  ------------------
  117|  14.7k|    n0 = mont->n0[0];
  118|       |
  119|       |    /*
  120|       |     * Add multiples of |n| to |r| until R = 2^(nl * BN_BITS2) divides it. On
  121|       |     * input, we had |r| < |n| * R, so now |r| < 2 * |n| * R. Note that |r|
  122|       |     * includes |carry| which is stored separately.
  123|       |     */
  124|   102k|    for (carry = 0, i = 0; i < nl; i++, rp++) {
  ------------------
  |  Branch (124:28): [True: 87.9k, False: 14.7k]
  ------------------
  125|  87.9k|        v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
  ------------------
  |  |   77|  87.9k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  126|  87.9k|        v = (v + carry + rp[nl]) & BN_MASK2;
  ------------------
  |  |   77|  87.9k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  127|  87.9k|        carry |= (v != rp[nl]);
  128|  87.9k|        carry &= (v <= rp[nl]);
  129|  87.9k|        rp[nl] = v;
  130|  87.9k|    }
  131|       |
  132|  14.7k|    if (bn_wexpand(ret, nl) == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 14.7k]
  ------------------
  133|      0|        return 0;
  134|  14.7k|    ret->top = nl;
  135|  14.7k|    ret->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  14.7k|#define BN_FLG_FIXED_TOP 0
  ------------------
  136|  14.7k|    ret->neg = r->neg;
  137|       |
  138|  14.7k|    rp = ret->d;
  139|       |
  140|       |    /*
  141|       |     * Shift |nl| words to divide by R. We have |ap| < 2 * |n|. Note that |ap|
  142|       |     * includes |carry| which is stored separately.
  143|       |     */
  144|  14.7k|    ap = &(r->d[nl]);
  145|       |
  146|  14.7k|    carry -= bn_sub_words(rp, ap, np, nl);
  147|       |    /*
  148|       |     * |carry| is -1 if |ap| - |np| underflowed or zero if it did not. Note
  149|       |     * |carry| cannot be 1. That would imply the subtraction did not fit in
  150|       |     * |nl| words, and we know at most one subtraction is needed.
  151|       |     */
  152|   102k|    for (i = 0; i < nl; i++) {
  ------------------
  |  Branch (152:17): [True: 87.9k, False: 14.7k]
  ------------------
  153|  87.9k|        rp[i] = (carry & ap[i]) | (~carry & rp[i]);
  154|  87.9k|        ap[i] = 0;
  155|  87.9k|    }
  156|       |
  157|  14.7k|    return 1;
  158|  14.7k|}

BN_mul:
  488|   299k|{
  489|   299k|    int ret = bn_mul_fixed_top(r, a, b, ctx);
  490|       |
  491|   299k|    bn_correct_top(r);
  492|   299k|    bn_check_top(r);
  493|       |
  494|   299k|    return ret;
  495|   299k|}
bn_mul_fixed_top:
  498|   312k|{
  499|   312k|    int ret = 0;
  500|   312k|    int top, al, bl;
  501|   312k|    BIGNUM *rr;
  502|   312k|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  503|   312k|    int i;
  504|   312k|    BIGNUM *t = NULL;
  505|   312k|    int j = 0, k;
  506|   312k|#endif
  507|       |
  508|   312k|    bn_check_top(a);
  509|   312k|    bn_check_top(b);
  510|   312k|    bn_check_top(r);
  511|       |
  512|   312k|    al = a->top;
  513|   312k|    bl = b->top;
  514|       |
  515|   312k|    if ((al == 0) || (bl == 0)) {
  ------------------
  |  Branch (515:9): [True: 0, False: 312k]
  |  Branch (515:22): [True: 0, False: 312k]
  ------------------
  516|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  517|      0|        return 1;
  518|      0|    }
  519|   312k|    top = al + bl;
  520|       |
  521|   312k|    BN_CTX_start(ctx);
  522|   312k|    if ((r == a) || (r == b)) {
  ------------------
  |  Branch (522:9): [True: 299k, False: 13.3k]
  |  Branch (522:21): [True: 0, False: 13.3k]
  ------------------
  523|   299k|        if ((rr = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (523:13): [True: 0, False: 299k]
  ------------------
  524|      0|            goto err;
  525|   299k|    } else
  526|  13.3k|        rr = r;
  527|       |
  528|   312k|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  529|   312k|    i = al - bl;
  530|       |
  531|   312k|    if (i == 0) {
  ------------------
  |  Branch (531:9): [True: 299k, False: 13.3k]
  ------------------
  532|       |#if 0
  533|       |        if (al == 4) {
  534|       |            if (bn_wexpand(rr, 8) == NULL)
  535|       |                goto err;
  536|       |            rr->top = 8;
  537|       |            bn_mul_comba4(rr->d, a->d, b->d);
  538|       |            goto end;
  539|       |        }
  540|       |#endif
  541|   299k|        if (al == 8) {
  ------------------
  |  Branch (541:13): [True: 0, False: 299k]
  ------------------
  542|      0|            if (bn_wexpand(rr, 16) == NULL)
  ------------------
  |  Branch (542:17): [True: 0, False: 0]
  ------------------
  543|      0|                goto err;
  544|      0|            rr->top = 16;
  545|      0|            bn_mul_comba8(rr->d, a->d, b->d);
  546|      0|            goto end;
  547|      0|        }
  548|   299k|    }
  549|       |
  550|   312k|    if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL)) {
  ------------------
  |  |  351|   312k|#define BN_MULL_SIZE_NORMAL (16) /* 32 */
  ------------------
                  if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL)) {
  ------------------
  |  |  351|      0|#define BN_MULL_SIZE_NORMAL (16) /* 32 */
  ------------------
  |  Branch (550:9): [True: 0, False: 312k]
  |  Branch (550:40): [True: 0, False: 0]
  ------------------
  551|      0|        if (i >= -1 && i <= 1) {
  ------------------
  |  Branch (551:13): [True: 0, False: 0]
  |  Branch (551:24): [True: 0, False: 0]
  ------------------
  552|       |            /*
  553|       |             * Find out the power of two lower or equal to the longest of the
  554|       |             * two numbers
  555|       |             */
  556|      0|            if (i >= 0) {
  ------------------
  |  Branch (556:17): [True: 0, False: 0]
  ------------------
  557|      0|                j = BN_num_bits_word((BN_ULONG)al);
  558|      0|            }
  559|      0|            if (i == -1) {
  ------------------
  |  Branch (559:17): [True: 0, False: 0]
  ------------------
  560|      0|                j = BN_num_bits_word((BN_ULONG)bl);
  561|      0|            }
  562|      0|            j = 1 << (j - 1);
  563|      0|            assert(j <= al || j <= bl);
  ------------------
  |  Branch (563:13): [True: 0, False: 0]
  |  Branch (563:13): [True: 0, False: 0]
  |  Branch (563:13): [True: 0, False: 0]
  |  Branch (563:13): [True: 0, False: 0]
  ------------------
  564|      0|            k = j + j;
  565|      0|            t = BN_CTX_get(ctx);
  566|      0|            if (t == NULL)
  ------------------
  |  Branch (566:17): [True: 0, False: 0]
  ------------------
  567|      0|                goto err;
  568|      0|            if (al > j || bl > j) {
  ------------------
  |  Branch (568:17): [True: 0, False: 0]
  |  Branch (568:27): [True: 0, False: 0]
  ------------------
  569|      0|                if (bn_wexpand(t, k * 4) == NULL)
  ------------------
  |  Branch (569:21): [True: 0, False: 0]
  ------------------
  570|      0|                    goto err;
  571|      0|                if (bn_wexpand(rr, k * 4) == NULL)
  ------------------
  |  Branch (571:21): [True: 0, False: 0]
  ------------------
  572|      0|                    goto err;
  573|      0|                bn_mul_part_recursive(rr->d, a->d, b->d,
  574|      0|                    j, al - j, bl - j, t->d);
  575|      0|            } else { /* al <= j || bl <= j */
  576|       |
  577|      0|                if (bn_wexpand(t, k * 2) == NULL)
  ------------------
  |  Branch (577:21): [True: 0, False: 0]
  ------------------
  578|      0|                    goto err;
  579|      0|                if (bn_wexpand(rr, k * 2) == NULL)
  ------------------
  |  Branch (579:21): [True: 0, False: 0]
  ------------------
  580|      0|                    goto err;
  581|      0|                bn_mul_recursive(rr->d, a->d, b->d, j, al - j, bl - j, t->d);
  582|      0|            }
  583|      0|            rr->top = top;
  584|      0|            goto end;
  585|      0|        }
  586|      0|    }
  587|   312k|#endif /* OPENSSL_SMALL_FOOTPRINT */
  588|   312k|    if (bn_wexpand(rr, top) == NULL)
  ------------------
  |  Branch (588:9): [True: 0, False: 312k]
  ------------------
  589|      0|        goto err;
  590|   312k|    rr->top = top;
  591|   312k|    bn_mul_normal(rr->d, a->d, al, b->d, bl);
  592|       |
  593|   312k|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  594|   312k|end:
  595|   312k|#endif
  596|   312k|    rr->neg = a->neg ^ b->neg;
  597|   312k|    rr->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   312k|#define BN_FLG_FIXED_TOP 0
  ------------------
  598|   312k|    if (r != rr && BN_copy(r, rr) == NULL)
  ------------------
  |  Branch (598:9): [True: 299k, False: 13.3k]
  |  Branch (598:20): [True: 0, False: 299k]
  ------------------
  599|      0|        goto err;
  600|       |
  601|   312k|    ret = 1;
  602|   312k|err:
  603|   312k|    bn_check_top(r);
  604|   312k|    BN_CTX_end(ctx);
  605|   312k|    return ret;
  606|   312k|}
bn_mul_normal:
  609|   312k|{
  610|   312k|    BN_ULONG *rr;
  611|       |
  612|   312k|    if (na < nb) {
  ------------------
  |  Branch (612:9): [True: 13.0k, False: 299k]
  ------------------
  613|  13.0k|        int itmp;
  614|  13.0k|        BN_ULONG *ltmp;
  615|       |
  616|  13.0k|        itmp = na;
  617|  13.0k|        na = nb;
  618|  13.0k|        nb = itmp;
  619|  13.0k|        ltmp = a;
  620|  13.0k|        a = b;
  621|  13.0k|        b = ltmp;
  622|  13.0k|    }
  623|   312k|    rr = &(r[na]);
  624|   312k|    if (nb <= 0) {
  ------------------
  |  Branch (624:9): [True: 0, False: 312k]
  ------------------
  625|      0|        (void)bn_mul_words(r, a, na, 0);
  626|      0|        return;
  627|      0|    } else
  628|   312k|        rr[0] = bn_mul_words(r, a, na, b[0]);
  629|       |
  630|   620k|    for (;;) {
  631|   620k|        if (--nb <= 0)
  ------------------
  |  Branch (631:13): [True: 21.7k, False: 599k]
  ------------------
  632|  21.7k|            return;
  633|   599k|        rr[1] = bn_mul_add_words(&(r[1]), a, na, b[1]);
  634|   599k|        if (--nb <= 0)
  ------------------
  |  Branch (634:13): [True: 291k, False: 307k]
  ------------------
  635|   291k|            return;
  636|   307k|        rr[2] = bn_mul_add_words(&(r[2]), a, na, b[2]);
  637|   307k|        if (--nb <= 0)
  ------------------
  |  Branch (637:13): [True: 0, False: 307k]
  ------------------
  638|      0|            return;
  639|   307k|        rr[3] = bn_mul_add_words(&(r[3]), a, na, b[3]);
  640|   307k|        if (--nb <= 0)
  ------------------
  |  Branch (640:13): [True: 0, False: 307k]
  ------------------
  641|      0|            return;
  642|   307k|        rr[4] = bn_mul_add_words(&(r[4]), a, na, b[4]);
  643|   307k|        rr += 4;
  644|   307k|        r += 4;
  645|   307k|        b += 4;
  646|   307k|    }
  647|   312k|}

BN_nist_mod_384:
  889|   873k|{
  890|   873k|    int i, top = a->top;
  891|   873k|    int carry = 0;
  892|   873k|    register BN_ULONG *r_d, *a_d = a->d;
  893|   873k|    union {
  894|   873k|        BN_ULONG bn[BN_NIST_384_TOP];
  895|   873k|        unsigned int ui[BN_NIST_384_TOP * sizeof(BN_ULONG) / sizeof(unsigned int)];
  896|   873k|    } buf;
  897|   873k|    BN_ULONG c_d[BN_NIST_384_TOP], *res;
  898|   873k|    bn_addsub_f adjust;
  899|   873k|    static const BIGNUM ossl_bignum_nist_p_384_sqr = {
  900|   873k|        (BN_ULONG *)_nist_p_384_sqr,
  901|   873k|        OSSL_NELEM(_nist_p_384_sqr),
  ------------------
  |  |   14|   873k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  902|   873k|        OSSL_NELEM(_nist_p_384_sqr),
  ------------------
  |  |   14|   873k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  903|   873k|        0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|   873k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  904|   873k|    };
  905|       |
  906|   873k|    field = &ossl_bignum_nist_p_384; /* just to make sure */
  907|       |
  908|   873k|    if (BN_is_negative(a) || BN_ucmp(a, &ossl_bignum_nist_p_384_sqr) >= 0)
  ------------------
  |  Branch (908:9): [True: 0, False: 873k]
  |  Branch (908:30): [True: 0, False: 873k]
  ------------------
  909|      0|        return BN_nnmod(r, a, field, ctx);
  910|       |
  911|   873k|    i = BN_ucmp(field, a);
  912|   873k|    if (i == 0) {
  ------------------
  |  Branch (912:9): [True: 0, False: 873k]
  ------------------
  913|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  914|      0|        return 1;
  915|   873k|    } else if (i > 0)
  ------------------
  |  Branch (915:16): [True: 0, False: 873k]
  ------------------
  916|      0|        return (r == a) ? 1 : (BN_copy(r, a) != NULL);
  ------------------
  |  Branch (916:16): [True: 0, False: 0]
  ------------------
  917|       |
  918|   873k|    if (r != a) {
  ------------------
  |  Branch (918:9): [True: 0, False: 873k]
  ------------------
  919|      0|        if (!bn_wexpand(r, BN_NIST_384_TOP))
  ------------------
  |  |   16|      0|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (919:13): [True: 0, False: 0]
  ------------------
  920|      0|            return 0;
  921|      0|        r_d = r->d;
  922|      0|        nist_cp_bn(r_d, a_d, BN_NIST_384_TOP);
  ------------------
  |  |   16|      0|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  923|      0|    } else
  924|   873k|        r_d = a_d;
  925|       |
  926|   873k|    nist_cp_bn_0(buf.bn, a_d + BN_NIST_384_TOP, top - BN_NIST_384_TOP,
  ------------------
  |  |  265|   873k|    {                                       \
  |  |  266|   873k|        int ii;                             \
  |  |  267|   873k|        const BN_ULONG *src = src_in;       \
  |  |  268|   873k|                                            \
  |  |  269|  6.11M|        for (ii = 0; ii < top; ii++)        \
  |  |  ------------------
  |  |  |  Branch (269:22): [True: 5.24M, False: 873k]
  |  |  ------------------
  |  |  270|  5.24M|            (dst)[ii] = src[ii];            \
  |  |  271|   873k|        for (; ii < max; ii++)              \
  |  |  ------------------
  |  |  |  Branch (271:16): [True: 0, False: 873k]
  |  |  ------------------
  |  |  272|   873k|            (dst)[ii] = 0;                  \
  |  |  273|   873k|    }
  ------------------
  927|   873k|        BN_NIST_384_TOP);
  928|       |
  929|   873k|#if defined(NIST_INT64)
  930|   873k|    {
  931|   873k|        NIST_INT64 acc; /* accumulator */
  ------------------
  |  |  298|   873k|#define NIST_INT64 long long
  ------------------
  932|   873k|        unsigned int *rp = (unsigned int *)r_d;
  933|   873k|        const unsigned int *bp = (const unsigned int *)buf.ui;
  934|       |
  935|   873k|        acc = load_u32(&rp[0]);
  936|   873k|        acc += bp[12 - 12];
  937|   873k|        acc += bp[21 - 12];
  938|   873k|        acc += bp[20 - 12];
  939|   873k|        acc -= bp[23 - 12];
  940|   873k|        store_lo32(&rp[0], acc);
  941|   873k|        acc >>= 32;
  942|       |
  943|   873k|        acc += load_u32(&rp[1]);
  944|   873k|        acc += bp[13 - 12];
  945|   873k|        acc += bp[22 - 12];
  946|   873k|        acc += bp[23 - 12];
  947|   873k|        acc -= bp[12 - 12];
  948|   873k|        acc -= bp[20 - 12];
  949|   873k|        store_lo32(&rp[1], acc);
  950|   873k|        acc >>= 32;
  951|       |
  952|   873k|        acc += load_u32(&rp[2]);
  953|   873k|        acc += bp[14 - 12];
  954|   873k|        acc += bp[23 - 12];
  955|   873k|        acc -= bp[13 - 12];
  956|   873k|        acc -= bp[21 - 12];
  957|   873k|        store_lo32(&rp[2], acc);
  958|   873k|        acc >>= 32;
  959|       |
  960|   873k|        acc += load_u32(&rp[3]);
  961|   873k|        acc += bp[15 - 12];
  962|   873k|        acc += bp[12 - 12];
  963|   873k|        acc += bp[20 - 12];
  964|   873k|        acc += bp[21 - 12];
  965|   873k|        acc -= bp[14 - 12];
  966|   873k|        acc -= bp[22 - 12];
  967|   873k|        acc -= bp[23 - 12];
  968|   873k|        store_lo32(&rp[3], acc);
  969|   873k|        acc >>= 32;
  970|       |
  971|   873k|        acc += load_u32(&rp[4]);
  972|   873k|        acc += bp[21 - 12];
  973|   873k|        acc += bp[21 - 12];
  974|   873k|        acc += bp[16 - 12];
  975|   873k|        acc += bp[13 - 12];
  976|   873k|        acc += bp[12 - 12];
  977|   873k|        acc += bp[20 - 12];
  978|   873k|        acc += bp[22 - 12];
  979|   873k|        acc -= bp[15 - 12];
  980|   873k|        acc -= bp[23 - 12];
  981|   873k|        acc -= bp[23 - 12];
  982|   873k|        store_lo32(&rp[4], acc);
  983|   873k|        acc >>= 32;
  984|       |
  985|   873k|        acc += load_u32(&rp[5]);
  986|   873k|        acc += bp[22 - 12];
  987|   873k|        acc += bp[22 - 12];
  988|   873k|        acc += bp[17 - 12];
  989|   873k|        acc += bp[14 - 12];
  990|   873k|        acc += bp[13 - 12];
  991|   873k|        acc += bp[21 - 12];
  992|   873k|        acc += bp[23 - 12];
  993|   873k|        acc -= bp[16 - 12];
  994|   873k|        store_lo32(&rp[5], acc);
  995|   873k|        acc >>= 32;
  996|       |
  997|   873k|        acc += load_u32(&rp[6]);
  998|   873k|        acc += bp[23 - 12];
  999|   873k|        acc += bp[23 - 12];
 1000|   873k|        acc += bp[18 - 12];
 1001|   873k|        acc += bp[15 - 12];
 1002|   873k|        acc += bp[14 - 12];
 1003|   873k|        acc += bp[22 - 12];
 1004|   873k|        acc -= bp[17 - 12];
 1005|   873k|        store_lo32(&rp[6], acc);
 1006|   873k|        acc >>= 32;
 1007|       |
 1008|   873k|        acc += load_u32(&rp[7]);
 1009|   873k|        acc += bp[19 - 12];
 1010|   873k|        acc += bp[16 - 12];
 1011|   873k|        acc += bp[15 - 12];
 1012|   873k|        acc += bp[23 - 12];
 1013|   873k|        acc -= bp[18 - 12];
 1014|   873k|        store_lo32(&rp[7], acc);
 1015|   873k|        acc >>= 32;
 1016|       |
 1017|   873k|        acc += load_u32(&rp[8]);
 1018|   873k|        acc += bp[20 - 12];
 1019|   873k|        acc += bp[17 - 12];
 1020|   873k|        acc += bp[16 - 12];
 1021|   873k|        acc -= bp[19 - 12];
 1022|   873k|        store_lo32(&rp[8], acc);
 1023|   873k|        acc >>= 32;
 1024|       |
 1025|   873k|        acc += load_u32(&rp[9]);
 1026|   873k|        acc += bp[21 - 12];
 1027|   873k|        acc += bp[18 - 12];
 1028|   873k|        acc += bp[17 - 12];
 1029|   873k|        acc -= bp[20 - 12];
 1030|   873k|        store_lo32(&rp[9], acc);
 1031|   873k|        acc >>= 32;
 1032|       |
 1033|   873k|        acc += load_u32(&rp[10]);
 1034|   873k|        acc += bp[22 - 12];
 1035|   873k|        acc += bp[19 - 12];
 1036|   873k|        acc += bp[18 - 12];
 1037|   873k|        acc -= bp[21 - 12];
 1038|   873k|        store_lo32(&rp[10], acc);
 1039|   873k|        acc >>= 32;
 1040|       |
 1041|   873k|        acc += load_u32(&rp[11]);
 1042|   873k|        acc += bp[23 - 12];
 1043|   873k|        acc += bp[20 - 12];
 1044|   873k|        acc += bp[19 - 12];
 1045|   873k|        acc -= bp[22 - 12];
 1046|   873k|        store_lo32(&rp[11], acc);
 1047|       |
 1048|   873k|        carry = (int)(acc >> 32);
 1049|   873k|    }
 1050|       |#else
 1051|       |    {
 1052|       |        BN_ULONG t_d[BN_NIST_384_TOP];
 1053|       |
 1054|       |        /*
 1055|       |         * S1
 1056|       |         */
 1057|       |        nist_set_256(t_d, buf.bn, 0, 0, 0, 0, 0, 23 - 4, 22 - 4, 21 - 4);
 1058|       |        /* left shift */
 1059|       |        {
 1060|       |            register BN_ULONG *ap, t, c;
 1061|       |            ap = t_d;
 1062|       |            c = 0;
 1063|       |            for (i = 3; i != 0; --i) {
 1064|       |                t = *ap;
 1065|       |                *(ap++) = ((t << 1) | c) & BN_MASK2;
 1066|       |                c = (t & BN_TBIT) ? 1 : 0;
 1067|       |            }
 1068|       |            *ap = c;
 1069|       |        }
 1070|       |        carry = (int)bn_add_words(r_d + (128 / BN_BITS2), r_d + (128 / BN_BITS2),
 1071|       |            t_d, BN_NIST_256_TOP);
 1072|       |        /*
 1073|       |         * S2
 1074|       |         */
 1075|       |        carry += (int)bn_add_words(r_d, r_d, buf.bn, BN_NIST_384_TOP);
 1076|       |        /*
 1077|       |         * S3
 1078|       |         */
 1079|       |        nist_set_384(t_d, buf.bn, 20, 19, 18, 17, 16, 15, 14, 13, 12, 23, 22,
 1080|       |            21);
 1081|       |        carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1082|       |        /*
 1083|       |         * S4
 1084|       |         */
 1085|       |        nist_set_384(t_d, buf.bn, 19, 18, 17, 16, 15, 14, 13, 12, 20, 0, 23,
 1086|       |            0);
 1087|       |        carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1088|       |        /*
 1089|       |         * S5
 1090|       |         */
 1091|       |        nist_set_384(t_d, buf.bn, 0, 0, 0, 0, 23, 22, 21, 20, 0, 0, 0, 0);
 1092|       |        carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1093|       |        /*
 1094|       |         * S6
 1095|       |         */
 1096|       |        nist_set_384(t_d, buf.bn, 0, 0, 0, 0, 0, 0, 23, 22, 21, 0, 0, 20);
 1097|       |        carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1098|       |        /*
 1099|       |         * D1
 1100|       |         */
 1101|       |        nist_set_384(t_d, buf.bn, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12,
 1102|       |            23);
 1103|       |        carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1104|       |        /*
 1105|       |         * D2
 1106|       |         */
 1107|       |        nist_set_384(t_d, buf.bn, 0, 0, 0, 0, 0, 0, 0, 23, 22, 21, 20, 0);
 1108|       |        carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1109|       |        /*
 1110|       |         * D3
 1111|       |         */
 1112|       |        nist_set_384(t_d, buf.bn, 0, 0, 0, 0, 0, 0, 0, 23, 23, 0, 0, 0);
 1113|       |        carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1114|       |    }
 1115|       |#endif
 1116|       |    /* see BN_nist_mod_224 for explanation */
 1117|   873k|    adjust = bn_sub_words;
 1118|   873k|    if (carry > 0)
  ------------------
  |  Branch (1118:9): [True: 586k, False: 287k]
  ------------------
 1119|   586k|        carry = (int)bn_sub_words(r_d, r_d, _nist_p_384[carry - 1],
 1120|   586k|            BN_NIST_384_TOP);
  ------------------
  |  |   16|   586k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   586k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   586k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   586k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   586k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1121|   287k|    else if (carry < 0) {
  ------------------
  |  Branch (1121:14): [True: 12.4k, False: 274k]
  ------------------
 1122|  12.4k|        carry = (int)bn_add_words(r_d, r_d, _nist_p_384[-carry - 1],
 1123|  12.4k|            BN_NIST_384_TOP);
  ------------------
  |  |   16|  12.4k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  12.4k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.4k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  12.4k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.4k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1124|  12.4k|        adjust = carry ? bn_sub_words : bn_add_words;
  ------------------
  |  Branch (1124:18): [True: 12.4k, False: 0]
  ------------------
 1125|  12.4k|    } else
 1126|   274k|        carry = 1;
 1127|       |
 1128|   873k|    res = ((*adjust)(c_d, r_d, _nist_p_384[0], BN_NIST_384_TOP) && carry)
  ------------------
  |  |   16|   873k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   873k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   873k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   873k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   873k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1128:12): [True: 873k, False: 0]
  |  Branch (1128:68): [True: 873k, False: 0]
  ------------------
 1129|   873k|        ? r_d
 1130|   873k|        : c_d;
 1131|   873k|    nist_cp_bn(r_d, res, BN_NIST_384_TOP);
  ------------------
  |  |   16|   873k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   873k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   873k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   873k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   873k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1132|   873k|    r->top = BN_NIST_384_TOP;
  ------------------
  |  |   16|   873k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   873k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   873k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   873k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   873k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1133|   873k|    bn_correct_top(r);
 1134|       |
 1135|   873k|    return 1;
 1136|   873k|}
BN_nist_mod_521:
 1144|  25.1k|{
 1145|  25.1k|    int top = a->top, i;
 1146|  25.1k|    BN_ULONG *r_d, *a_d = a->d, t_d[BN_NIST_521_TOP], val, tmp, *res;
 1147|  25.1k|    static const BIGNUM ossl_bignum_nist_p_521_sqr = {
 1148|  25.1k|        (BN_ULONG *)_nist_p_521_sqr,
 1149|  25.1k|        OSSL_NELEM(_nist_p_521_sqr),
  ------------------
  |  |   14|  25.1k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1150|  25.1k|        OSSL_NELEM(_nist_p_521_sqr),
  ------------------
  |  |   14|  25.1k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1151|  25.1k|        0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|  25.1k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
 1152|  25.1k|    };
 1153|       |
 1154|  25.1k|    field = &ossl_bignum_nist_p_521; /* just to make sure */
 1155|       |
 1156|  25.1k|    if (BN_is_negative(a) || BN_ucmp(a, &ossl_bignum_nist_p_521_sqr) >= 0)
  ------------------
  |  Branch (1156:9): [True: 0, False: 25.1k]
  |  Branch (1156:30): [True: 0, False: 25.1k]
  ------------------
 1157|      0|        return BN_nnmod(r, a, field, ctx);
 1158|       |
 1159|  25.1k|    i = BN_ucmp(field, a);
 1160|  25.1k|    if (i == 0) {
  ------------------
  |  Branch (1160:9): [True: 0, False: 25.1k]
  ------------------
 1161|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
 1162|      0|        return 1;
 1163|  25.1k|    } else if (i > 0)
  ------------------
  |  Branch (1163:16): [True: 0, False: 25.1k]
  ------------------
 1164|      0|        return (r == a) ? 1 : (BN_copy(r, a) != NULL);
  ------------------
  |  Branch (1164:16): [True: 0, False: 0]
  ------------------
 1165|       |
 1166|  25.1k|    if (r != a) {
  ------------------
  |  Branch (1166:9): [True: 0, False: 25.1k]
  ------------------
 1167|      0|        if (!bn_wexpand(r, BN_NIST_521_TOP))
  ------------------
  |  |   17|      0|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1167:13): [True: 0, False: 0]
  ------------------
 1168|      0|            return 0;
 1169|      0|        r_d = r->d;
 1170|      0|        nist_cp_bn(r_d, a_d, BN_NIST_521_TOP);
  ------------------
  |  |   17|      0|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1171|      0|    } else
 1172|  25.1k|        r_d = a_d;
 1173|       |
 1174|       |    /* upper 521 bits, copy ... */
 1175|  25.1k|    nist_cp_bn_0(t_d, a_d + (BN_NIST_521_TOP - 1),
  ------------------
  |  |  265|  25.1k|    {                                       \
  |  |  266|  25.1k|        int ii;                             \
  |  |  267|  25.1k|        const BN_ULONG *src = src_in;       \
  |  |  268|  25.1k|                                            \
  |  |  269|   251k|        for (ii = 0; ii < top; ii++)        \
  |  |  ------------------
  |  |  |  Branch (269:22): [True: 226k, False: 25.1k]
  |  |  ------------------
  |  |  270|   226k|            (dst)[ii] = src[ii];            \
  |  |  271|  25.1k|        for (; ii < max; ii++)              \
  |  |  ------------------
  |  |  |  Branch (271:16): [True: 0, False: 25.1k]
  |  |  ------------------
  |  |  272|  25.1k|            (dst)[ii] = 0;                  \
  |  |  273|  25.1k|    }
  ------------------
 1176|  25.1k|        top - (BN_NIST_521_TOP - 1), BN_NIST_521_TOP);
 1177|       |    /* ... and right shift */
 1178|   226k|    for (val = t_d[0], i = 0; i < BN_NIST_521_TOP - 1; i++) {
  ------------------
  |  |   17|   226k|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   226k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   226k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   226k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   226k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1178:31): [True: 200k, False: 25.1k]
  ------------------
 1179|       |#if 0
 1180|       |        /*
 1181|       |         * MSC ARM compiler [version 2013, presumably even earlier,
 1182|       |         * much earlier] miscompiles this code, but not one in
 1183|       |         * #else section. See RT#3541.
 1184|       |         */
 1185|       |        tmp = val >> BN_NIST_521_RSHIFT;
 1186|       |        val = t_d[i + 1];
 1187|       |        t_d[i] = (tmp | val << BN_NIST_521_LSHIFT) & BN_MASK2;
 1188|       |#else
 1189|   200k|        t_d[i] = (val >> BN_NIST_521_RSHIFT | (tmp = t_d[i + 1]) << BN_NIST_521_LSHIFT) & BN_MASK2;
  ------------------
  |  | 1138|   200k|#define BN_NIST_521_RSHIFT (521 % BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|   200k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   200k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      t_d[i] = (val >> BN_NIST_521_RSHIFT | (tmp = t_d[i + 1]) << BN_NIST_521_LSHIFT) & BN_MASK2;
  ------------------
  |  | 1139|   200k|#define BN_NIST_521_LSHIFT (BN_BITS2 - BN_NIST_521_RSHIFT)
  |  |  ------------------
  |  |  |  |   54|   200k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   200k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_LSHIFT (BN_BITS2 - BN_NIST_521_RSHIFT)
  |  |  ------------------
  |  |  |  | 1138|   200k|#define BN_NIST_521_RSHIFT (521 % BN_BITS2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|   200k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   38|   200k|#define BN_BYTES 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      t_d[i] = (val >> BN_NIST_521_RSHIFT | (tmp = t_d[i + 1]) << BN_NIST_521_LSHIFT) & BN_MASK2;
  ------------------
  |  |   77|   200k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
 1190|   200k|        val = tmp;
 1191|   200k|#endif
 1192|   200k|    }
 1193|  25.1k|    t_d[i] = val >> BN_NIST_521_RSHIFT;
  ------------------
  |  | 1138|  25.1k|#define BN_NIST_521_RSHIFT (521 % BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1194|       |    /* lower 521 bits */
 1195|  25.1k|    r_d[i] &= BN_NIST_521_TOP_MASK;
  ------------------
  |  | 1140|  25.1k|#define BN_NIST_521_TOP_MASK ((BN_ULONG)BN_MASK2 >> BN_NIST_521_LSHIFT)
  |  |  ------------------
  |  |  |  |   77|  25.1k|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP_MASK ((BN_ULONG)BN_MASK2 >> BN_NIST_521_LSHIFT)
  |  |  ------------------
  |  |  |  | 1139|  25.1k|#define BN_NIST_521_LSHIFT (BN_BITS2 - BN_NIST_521_RSHIFT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BN_NIST_521_LSHIFT (BN_BITS2 - BN_NIST_521_RSHIFT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1138|  25.1k|#define BN_NIST_521_RSHIFT (521 % BN_BITS2)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1196|       |
 1197|  25.1k|    bn_add_words(r_d, r_d, t_d, BN_NIST_521_TOP);
  ------------------
  |  |   17|  25.1k|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1198|  25.1k|    res = bn_sub_words(t_d, r_d, _nist_p_521,
  ------------------
  |  Branch (1198:11): [True: 25.1k, False: 0]
  ------------------
 1199|  25.1k|              BN_NIST_521_TOP)
  ------------------
  |  |   17|  25.1k|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1200|  25.1k|        ? r_d
 1201|  25.1k|        : t_d;
 1202|  25.1k|    nist_cp_bn(r_d, res, BN_NIST_521_TOP);
  ------------------
  |  |   17|  25.1k|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1203|  25.1k|    r->top = BN_NIST_521_TOP;
  ------------------
  |  |   17|  25.1k|#define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_521_TOP (521 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  25.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  25.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1204|  25.1k|    bn_correct_top(r);
 1205|       |
 1206|  25.1k|    return 1;
 1207|  25.1k|}
bn_nist.c:nist_cp_bn:
  276|   898k|{
  277|   898k|    int i;
  278|       |
  279|  6.36M|    for (i = 0; i < top; i++)
  ------------------
  |  Branch (279:17): [True: 5.46M, False: 898k]
  ------------------
  280|  5.46M|        dst[i] = src[i];
  281|   898k|}
bn_nist.c:load_u32:
  325|  10.4M|{
  326|  10.4M|    uint32_t tmp;
  327|       |
  328|  10.4M|    memcpy(&tmp, ptr, sizeof(tmp));
  329|  10.4M|    return tmp;
  330|  10.4M|}
bn_nist.c:store_lo32:
  333|  10.4M|{
  334|       |    /* A cast is needed for big-endian system: on a 32-bit BE system
  335|       |     * NIST_INT64 may be defined as well if the compiler supports 64-bit
  336|       |     * long long.  */
  337|  10.4M|    uint32_t tmp = (uint32_t)val;
  338|       |
  339|  10.4M|    memcpy(ptr, &tmp, sizeof(tmp));
  340|  10.4M|}

BN_priv_rand_range_ex:
  218|  1.22k|{
  219|  1.22k|    return bnrand_range(PRIVATE, r, range, strength, ctx);
  220|  1.22k|}
bn_rand.c:bnrand:
   27|  1.30k|{
   28|  1.30k|    unsigned char *buf = NULL;
   29|  1.30k|    int b, ret = 0, bit, bytes, mask;
   30|  1.30k|    OSSL_LIB_CTX *libctx = ossl_bn_get_libctx(ctx);
   31|       |
   32|  1.30k|    if (bits == 0) {
  ------------------
  |  Branch (32:9): [True: 0, False: 1.30k]
  ------------------
   33|      0|        if (top != BN_RAND_TOP_ANY || bottom != BN_RAND_BOTTOM_ANY)
  ------------------
  |  |   80|      0|#define BN_RAND_TOP_ANY -1
  ------------------
                      if (top != BN_RAND_TOP_ANY || bottom != BN_RAND_BOTTOM_ANY)
  ------------------
  |  |   85|      0|#define BN_RAND_BOTTOM_ANY 0
  ------------------
  |  Branch (33:13): [True: 0, False: 0]
  |  Branch (33:39): [True: 0, False: 0]
  ------------------
   34|      0|            goto toosmall;
   35|      0|        BN_zero(rnd);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
   36|      0|        return 1;
   37|      0|    }
   38|  1.30k|    if (bits < 0 || (bits == 1 && top > 0))
  ------------------
  |  Branch (38:9): [True: 0, False: 1.30k]
  |  Branch (38:22): [True: 0, False: 1.30k]
  |  Branch (38:35): [True: 0, False: 0]
  ------------------
   39|      0|        goto toosmall;
   40|       |
   41|  1.30k|    bytes = (bits + 7) / 8;
   42|  1.30k|    bit = (bits - 1) % 8;
   43|  1.30k|    mask = 0xff << (bit + 1);
   44|       |
   45|  1.30k|    buf = OPENSSL_malloc(bytes);
  ------------------
  |  |  107|  1.30k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   46|  1.30k|    if (buf == NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.30k]
  ------------------
   47|      0|        goto err;
   48|       |
   49|       |    /* make a random number and set the top and bottom bits */
   50|  1.30k|    b = flag == NORMAL ? RAND_bytes_ex(libctx, buf, bytes, strength)
  ------------------
  |  Branch (50:9): [True: 0, False: 1.30k]
  ------------------
   51|  1.30k|                       : RAND_priv_bytes_ex(libctx, buf, bytes, strength);
   52|  1.30k|    if (b <= 0)
  ------------------
  |  Branch (52:9): [True: 0, False: 1.30k]
  ------------------
   53|      0|        goto err;
   54|       |
   55|  1.30k|    if (flag == TESTING) {
  ------------------
  |  Branch (55:9): [True: 0, False: 1.30k]
  ------------------
   56|       |        /*
   57|       |         * generate patterns that are more likely to trigger BN library bugs
   58|       |         */
   59|      0|        int i;
   60|      0|        unsigned char c;
   61|       |
   62|      0|        for (i = 0; i < bytes; i++) {
  ------------------
  |  Branch (62:21): [True: 0, False: 0]
  ------------------
   63|      0|            if (RAND_bytes_ex(libctx, &c, 1, strength) <= 0)
  ------------------
  |  Branch (63:17): [True: 0, False: 0]
  ------------------
   64|      0|                goto err;
   65|      0|            if (c >= 128 && i > 0)
  ------------------
  |  Branch (65:17): [True: 0, False: 0]
  |  Branch (65:29): [True: 0, False: 0]
  ------------------
   66|      0|                buf[i] = buf[i - 1];
   67|      0|            else if (c < 42)
  ------------------
  |  Branch (67:22): [True: 0, False: 0]
  ------------------
   68|      0|                buf[i] = 0;
   69|      0|            else if (c < 84)
  ------------------
  |  Branch (69:22): [True: 0, False: 0]
  ------------------
   70|      0|                buf[i] = 255;
   71|      0|        }
   72|      0|    }
   73|       |
   74|  1.30k|    if (top >= 0) {
  ------------------
  |  Branch (74:9): [True: 0, False: 1.30k]
  ------------------
   75|      0|        if (top) {
  ------------------
  |  Branch (75:13): [True: 0, False: 0]
  ------------------
   76|      0|            if (bit == 0) {
  ------------------
  |  Branch (76:17): [True: 0, False: 0]
  ------------------
   77|      0|                buf[0] = 1;
   78|      0|                buf[1] |= 0x80;
   79|      0|            } else {
   80|      0|                buf[0] |= (3 << (bit - 1));
   81|      0|            }
   82|      0|        } else {
   83|      0|            buf[0] |= (1 << bit);
   84|      0|        }
   85|      0|    }
   86|  1.30k|    buf[0] &= ~mask;
   87|  1.30k|    if (bottom) /* set bottom bit if requested */
  ------------------
  |  Branch (87:9): [True: 0, False: 1.30k]
  ------------------
   88|      0|        buf[bytes - 1] |= 1;
   89|  1.30k|    if (!BN_bin2bn(buf, bytes, rnd))
  ------------------
  |  Branch (89:9): [True: 0, False: 1.30k]
  ------------------
   90|      0|        goto err;
   91|  1.30k|    ret = 1;
   92|  1.30k|err:
   93|  1.30k|    OPENSSL_clear_free(buf, bytes);
  ------------------
  |  |  130|  1.30k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|  1.30k|    bn_check_top(rnd);
   95|  1.30k|    return ret;
   96|       |
   97|      0|toosmall:
   98|       |    ERR_raise(ERR_LIB_BN, BN_R_BITS_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   99|      0|    return 0;
  100|  1.30k|}
bn_rand.c:bnrand_range:
  135|  1.22k|{
  136|  1.22k|    int n;
  137|  1.22k|    int count = 100;
  138|       |
  139|  1.22k|    if (r == NULL) {
  ------------------
  |  Branch (139:9): [True: 0, False: 1.22k]
  ------------------
  140|      0|        ERR_raise(ERR_LIB_BN, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  141|      0|        return 0;
  142|      0|    }
  143|       |
  144|  1.22k|    if (range->neg || BN_is_zero(range)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 1.22k]
  |  Branch (144:23): [True: 0, False: 1.22k]
  ------------------
  145|      0|        ERR_raise(ERR_LIB_BN, BN_R_INVALID_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  146|      0|        return 0;
  147|      0|    }
  148|       |
  149|  1.22k|    n = BN_num_bits(range); /* n > 0 */
  150|       |
  151|       |    /* BN_is_bit_set(range, n - 1) always holds */
  152|       |
  153|  1.22k|    if (n == 1)
  ------------------
  |  Branch (153:9): [True: 0, False: 1.22k]
  ------------------
  154|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  155|  1.22k|    else if (!BN_is_bit_set(range, n - 2) && !BN_is_bit_set(range, n - 3)) {
  ------------------
  |  Branch (155:14): [True: 210, False: 1.01k]
  |  Branch (155:46): [True: 210, False: 0]
  ------------------
  156|       |        /*
  157|       |         * range = 100..._2, so 3*range (= 11..._2) is exactly one bit longer
  158|       |         * than range
  159|       |         */
  160|    284|        do {
  161|    284|            if (!bnrand(flag, r, n + 1, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   80|    284|#define BN_RAND_TOP_ANY -1
  ------------------
                          if (!bnrand(flag, r, n + 1, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   85|    284|#define BN_RAND_BOTTOM_ANY 0
  ------------------
  |  Branch (161:17): [True: 0, False: 284]
  ------------------
  162|    284|                    strength, ctx))
  163|      0|                return 0;
  164|       |
  165|       |            /*
  166|       |             * If r < 3*range, use r := r MOD range (which is either r, r -
  167|       |             * range, or r - 2*range). Otherwise, iterate once more. Since
  168|       |             * 3*range = 11..._2, each iteration succeeds with probability >=
  169|       |             * .75.
  170|       |             */
  171|    284|            if (BN_cmp(r, range) >= 0) {
  ------------------
  |  Branch (171:17): [True: 228, False: 56]
  ------------------
  172|    228|                if (!BN_sub(r, r, range))
  ------------------
  |  Branch (172:21): [True: 0, False: 228]
  ------------------
  173|      0|                    return 0;
  174|    228|                if (BN_cmp(r, range) >= 0)
  ------------------
  |  Branch (174:21): [True: 157, False: 71]
  ------------------
  175|    157|                    if (!BN_sub(r, r, range))
  ------------------
  |  Branch (175:25): [True: 0, False: 157]
  ------------------
  176|      0|                        return 0;
  177|    228|            }
  178|       |
  179|    284|            if (!--count) {
  ------------------
  |  Branch (179:17): [True: 0, False: 284]
  ------------------
  180|      0|                ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_ITERATIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  181|      0|                return 0;
  182|      0|            }
  183|       |
  184|    284|        } while (BN_cmp(r, range) >= 0);
  ------------------
  |  Branch (184:18): [True: 74, False: 210]
  ------------------
  185|  1.01k|    } else {
  186|  1.01k|        do {
  187|       |            /* range = 11..._2  or  range = 101..._2 */
  188|  1.01k|            if (!bnrand(flag, r, n, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   80|  1.01k|#define BN_RAND_TOP_ANY -1
  ------------------
                          if (!bnrand(flag, r, n, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   85|  1.01k|#define BN_RAND_BOTTOM_ANY 0
  ------------------
  |  Branch (188:17): [True: 0, False: 1.01k]
  ------------------
  189|  1.01k|                    strength, ctx))
  190|      0|                return 0;
  191|       |
  192|  1.01k|            if (!--count) {
  ------------------
  |  Branch (192:17): [True: 0, False: 1.01k]
  ------------------
  193|      0|                ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_ITERATIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|                return 0;
  195|      0|            }
  196|  1.01k|        } while (BN_cmp(r, range) >= 0);
  ------------------
  |  Branch (196:18): [True: 0, False: 1.01k]
  ------------------
  197|  1.01k|    }
  198|       |
  199|  1.22k|    bn_check_top(r);
  200|  1.22k|    return 1;
  201|  1.22k|}

BN_lshift1:
   15|   149k|{
   16|   149k|    register BN_ULONG *ap, *rp, t, c;
   17|   149k|    int i;
   18|       |
   19|   149k|    bn_check_top(r);
   20|   149k|    bn_check_top(a);
   21|       |
   22|   149k|    if (r != a) {
  ------------------
  |  Branch (22:9): [True: 576, False: 148k]
  ------------------
   23|    576|        r->neg = a->neg;
   24|    576|        if (bn_wexpand(r, a->top + 1) == NULL)
  ------------------
  |  Branch (24:13): [True: 0, False: 576]
  ------------------
   25|      0|            return 0;
   26|    576|        r->top = a->top;
   27|   148k|    } else {
   28|   148k|        if (bn_wexpand(r, a->top + 1) == NULL)
  ------------------
  |  Branch (28:13): [True: 0, False: 148k]
  ------------------
   29|      0|            return 0;
   30|   148k|    }
   31|   149k|    ap = a->d;
   32|   149k|    rp = r->d;
   33|   149k|    c = 0;
   34|   747k|    for (i = 0; i < a->top; i++) {
  ------------------
  |  Branch (34:17): [True: 597k, False: 149k]
  ------------------
   35|   597k|        t = *(ap++);
   36|   597k|        *(rp++) = ((t << 1) | c) & BN_MASK2;
  ------------------
  |  |   77|   597k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   37|   597k|        c = t >> (BN_BITS2 - 1);
  ------------------
  |  |   54|   597k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   597k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
   38|   597k|    }
   39|   149k|    *rp = c;
   40|   149k|    r->top += (int)c;
   41|   149k|    bn_check_top(r);
   42|   149k|    return 1;
   43|   149k|}
BN_rshift1:
   46|  9.48M|{
   47|  9.48M|    BN_ULONG *ap, *rp, t, c;
   48|  9.48M|    int i;
   49|       |
   50|  9.48M|    bn_check_top(r);
   51|  9.48M|    bn_check_top(a);
   52|       |
   53|  9.48M|    if (BN_is_zero(a)) {
  ------------------
  |  Branch (53:9): [True: 0, False: 9.48M]
  ------------------
   54|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
   55|      0|        return 1;
   56|      0|    }
   57|  9.48M|    i = a->top;
   58|  9.48M|    ap = a->d;
   59|  9.48M|    if (a != r) {
  ------------------
  |  Branch (59:9): [True: 0, False: 9.48M]
  ------------------
   60|      0|        if (bn_wexpand(r, i) == NULL)
  ------------------
  |  Branch (60:13): [True: 0, False: 0]
  ------------------
   61|      0|            return 0;
   62|      0|        r->neg = a->neg;
   63|      0|    }
   64|  9.48M|    rp = r->d;
   65|  9.48M|    r->top = i;
   66|  9.48M|    t = ap[--i];
   67|  9.48M|    rp[i] = t >> 1;
   68|  9.48M|    c = t << (BN_BITS2 - 1);
  ------------------
  |  |   54|  9.48M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  9.48M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
   69|  9.48M|    r->top -= (t == 1);
   70|  18.5M|    while (i > 0) {
  ------------------
  |  Branch (70:12): [True: 9.03M, False: 9.48M]
  ------------------
   71|  9.03M|        t = ap[--i];
   72|  9.03M|        rp[i] = ((t >> 1) & BN_MASK2) | c;
  ------------------
  |  |   77|  9.03M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   73|  9.03M|        c = t << (BN_BITS2 - 1);
  ------------------
  |  |   54|  9.03M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  9.03M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
   74|  9.03M|    }
   75|  9.48M|    if (!r->top)
  ------------------
  |  Branch (75:9): [True: 0, False: 9.48M]
  ------------------
   76|      0|        r->neg = 0; /* don't allow negative zero */
   77|  9.48M|    bn_check_top(r);
   78|  9.48M|    return 1;
   79|  9.48M|}
BN_lshift:
   82|   224k|{
   83|   224k|    int ret;
   84|       |
   85|   224k|    if (n < 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 224k]
  ------------------
   86|      0|        ERR_raise(ERR_LIB_BN, BN_R_INVALID_SHIFT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   87|      0|        return 0;
   88|      0|    }
   89|       |
   90|   224k|    ret = bn_lshift_fixed_top(r, a, n);
   91|       |
   92|   224k|    bn_correct_top(r);
   93|   224k|    bn_check_top(r);
   94|       |
   95|   224k|    return ret;
   96|   224k|}
bn_lshift_fixed_top:
  105|  2.12M|{
  106|  2.12M|    int i, nw;
  107|  2.12M|    unsigned int lb, rb;
  108|  2.12M|    BN_ULONG *t, *f;
  109|  2.12M|    BN_ULONG l, m, rmask = 0;
  110|       |
  111|  2.12M|    assert(n >= 0);
  ------------------
  |  Branch (111:5): [True: 0, False: 2.12M]
  |  Branch (111:5): [True: 2.12M, False: 0]
  ------------------
  112|       |
  113|  2.12M|    bn_check_top(r);
  114|  2.12M|    bn_check_top(a);
  115|       |
  116|  2.12M|    nw = n / BN_BITS2;
  ------------------
  |  |   54|  2.12M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.12M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  117|  2.12M|    if (bn_wexpand(r, a->top + nw + 1) == NULL)
  ------------------
  |  Branch (117:9): [True: 0, False: 2.12M]
  ------------------
  118|      0|        return 0;
  119|       |
  120|  2.12M|    if (a->top != 0) {
  ------------------
  |  Branch (120:9): [True: 2.12M, False: 0]
  ------------------
  121|  2.12M|        lb = (unsigned int)n % BN_BITS2;
  ------------------
  |  |   54|  2.12M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.12M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  122|  2.12M|        rb = BN_BITS2 - lb;
  ------------------
  |  |   54|  2.12M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.12M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  123|  2.12M|        rb %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|  2.12M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.12M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  124|  2.12M|        rmask = (BN_ULONG)0 - rb; /* rmask = 0 - (rb != 0) */
  125|  2.12M|        rmask |= rmask >> 8;
  126|  2.12M|        f = &(a->d[0]);
  127|  2.12M|        t = &(r->d[nw]);
  128|  2.12M|        l = f[a->top - 1];
  129|  2.12M|        t[a->top] = (l >> rb) & rmask;
  130|  9.45M|        for (i = a->top - 1; i > 0; i--) {
  ------------------
  |  Branch (130:30): [True: 7.33M, False: 2.12M]
  ------------------
  131|  7.33M|            m = l << lb;
  132|  7.33M|            l = f[i - 1];
  133|  7.33M|            t[i] = (m | ((l >> rb) & rmask)) & BN_MASK2;
  ------------------
  |  |   77|  7.33M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  134|  7.33M|        }
  135|  2.12M|        t[0] = (l << lb) & BN_MASK2;
  ------------------
  |  |   77|  2.12M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  136|  2.12M|    } else {
  137|       |        /* shouldn't happen, but formally required */
  138|      0|        r->d[nw] = 0;
  139|      0|    }
  140|  2.12M|    if (nw != 0)
  ------------------
  |  Branch (140:9): [True: 150k, False: 1.97M]
  ------------------
  141|   150k|        memset(r->d, 0, sizeof(*t) * nw);
  142|       |
  143|  2.12M|    r->neg = a->neg;
  144|  2.12M|    r->top = a->top + nw + 1;
  145|  2.12M|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  2.12M|#define BN_FLG_FIXED_TOP 0
  ------------------
  146|       |
  147|  2.12M|    return 1;
  148|  2.12M|}
BN_rshift:
  151|  9.48M|{
  152|  9.48M|    int ret = 0;
  153|       |
  154|  9.48M|    if (n < 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 9.48M]
  ------------------
  155|      0|        ERR_raise(ERR_LIB_BN, BN_R_INVALID_SHIFT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  156|      0|        return 0;
  157|      0|    }
  158|       |
  159|  9.48M|    bn_check_top(r);
  160|  9.48M|    bn_check_top(a);
  161|       |
  162|  9.48M|    ret = bn_rshift_fixed_top(r, a, n);
  163|       |
  164|  9.48M|    bn_correct_top(r);
  165|  9.48M|    bn_check_top(r);
  166|       |
  167|  9.48M|    return ret;
  168|  9.48M|}
bn_rshift_fixed_top:
  177|  11.2M|{
  178|  11.2M|    int i, top, nw;
  179|  11.2M|    unsigned int lb, rb;
  180|  11.2M|    BN_ULONG *t, *f;
  181|  11.2M|    BN_ULONG l, m, mask;
  182|       |
  183|  11.2M|    assert(n >= 0);
  ------------------
  |  Branch (183:5): [True: 0, False: 11.2M]
  |  Branch (183:5): [True: 11.2M, False: 0]
  ------------------
  184|       |
  185|  11.2M|    nw = n / BN_BITS2;
  ------------------
  |  |   54|  11.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  11.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  186|  11.2M|    if (nw >= a->top) {
  ------------------
  |  Branch (186:9): [True: 0, False: 11.2M]
  ------------------
  187|       |        /* shouldn't happen, but formally required */
  188|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  189|      0|        return 1;
  190|      0|    }
  191|       |
  192|  11.2M|    rb = (unsigned int)n % BN_BITS2;
  ------------------
  |  |   54|  11.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  11.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  193|  11.2M|    lb = BN_BITS2 - rb;
  ------------------
  |  |   54|  11.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  11.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  194|  11.2M|    lb %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|  11.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  11.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  195|  11.2M|    mask = (BN_ULONG)0 - lb; /* mask = 0 - (lb != 0) */
  196|  11.2M|    mask |= mask >> 8;
  197|  11.2M|    top = a->top - nw;
  198|  11.2M|    if (r != a && bn_wexpand(r, top) == NULL)
  ------------------
  |  Branch (198:9): [True: 1.75M, False: 9.48M]
  |  Branch (198:19): [True: 0, False: 1.75M]
  ------------------
  199|      0|        return 0;
  200|       |
  201|  11.2M|    t = &(r->d[0]);
  202|  11.2M|    f = &(a->d[nw]);
  203|  11.2M|    l = f[0];
  204|  18.4M|    for (i = 0; i < top - 1; i++) {
  ------------------
  |  Branch (204:17): [True: 7.17M, False: 11.2M]
  ------------------
  205|  7.17M|        m = f[i + 1];
  206|  7.17M|        t[i] = (l >> rb) | ((m << lb) & mask);
  207|  7.17M|        l = m;
  208|  7.17M|    }
  209|  11.2M|    t[i] = l >> rb;
  210|       |
  211|  11.2M|    r->neg = a->neg;
  212|  11.2M|    r->top = top;
  213|  11.2M|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  11.2M|#define BN_FLG_FIXED_TOP 0
  ------------------
  214|       |
  215|  11.2M|    return 1;
  216|  11.2M|}

BN_sqr:
   18|   599k|{
   19|   599k|    int ret = bn_sqr_fixed_top(r, a, ctx);
   20|       |
   21|   599k|    bn_correct_top(r);
   22|   599k|    bn_check_top(r);
   23|       |
   24|   599k|    return ret;
   25|   599k|}
bn_sqr_fixed_top:
   28|   599k|{
   29|   599k|    int max, al;
   30|   599k|    int ret = 0;
   31|   599k|    BIGNUM *tmp, *rr;
   32|       |
   33|   599k|    bn_check_top(a);
   34|       |
   35|   599k|    al = a->top;
   36|   599k|    if (al <= 0) {
  ------------------
  |  Branch (36:9): [True: 0, False: 599k]
  ------------------
   37|      0|        r->top = 0;
   38|      0|        r->neg = 0;
   39|      0|        return 1;
   40|      0|    }
   41|       |
   42|   599k|    BN_CTX_start(ctx);
   43|   599k|    rr = (a != r) ? r : BN_CTX_get(ctx);
  ------------------
  |  Branch (43:10): [True: 599k, False: 0]
  ------------------
   44|   599k|    tmp = BN_CTX_get(ctx);
   45|   599k|    if (rr == NULL || tmp == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 599k]
  |  Branch (45:23): [True: 0, False: 599k]
  ------------------
   46|      0|        goto err;
   47|       |
   48|   599k|    max = 2 * al; /* Non-zero (from above) */
   49|   599k|    if (bn_wexpand(rr, max) == NULL)
  ------------------
  |  Branch (49:9): [True: 0, False: 599k]
  ------------------
   50|      0|        goto err;
   51|       |
   52|   599k|    if (al == 4) {
  ------------------
  |  Branch (52:9): [True: 0, False: 599k]
  ------------------
   53|       |#ifdef OPENSSL_SMALL_FOOTPRINT
   54|       |        BN_ULONG t[8];
   55|       |        bn_sqr_normal(rr->d, a->d, 4, t);
   56|       |#else
   57|      0|        bn_sqr_comba4(rr->d, a->d);
   58|      0|#endif
   59|   599k|    } else if (al == 8) {
  ------------------
  |  Branch (59:16): [True: 0, False: 599k]
  ------------------
   60|       |#ifdef OPENSSL_SMALL_FOOTPRINT
   61|       |        BN_ULONG t[16];
   62|       |        bn_sqr_normal(rr->d, a->d, 8, t);
   63|       |#else
   64|      0|        bn_sqr_comba8(rr->d, a->d);
   65|      0|#endif
   66|   599k|    } else {
   67|       |#ifdef OPENSSL_SMALL_FOOTPRINT
   68|       |        if (bn_wexpand(tmp, max) == NULL)
   69|       |            goto err;
   70|       |        bn_sqr_normal(rr->d, a->d, al, tmp->d);
   71|       |#else
   72|   599k|        if (al < BN_SQR_RECURSIVE_SIZE_NORMAL) {
  ------------------
  |  |  353|   599k|#define BN_SQR_RECURSIVE_SIZE_NORMAL (16) /* 32 */
  ------------------
  |  Branch (72:13): [True: 599k, False: 0]
  ------------------
   73|   599k|            BN_ULONG t[BN_SQR_RECURSIVE_SIZE_NORMAL * 2];
   74|   599k|            bn_sqr_normal(rr->d, a->d, al, t);
   75|   599k|        } else {
   76|      0|            int j, k;
   77|       |
   78|      0|            j = BN_num_bits_word((BN_ULONG)al);
   79|      0|            j = 1 << (j - 1);
   80|      0|            k = j + j;
   81|      0|            if (al == j) {
  ------------------
  |  Branch (81:17): [True: 0, False: 0]
  ------------------
   82|      0|                if (bn_wexpand(tmp, k * 2) == NULL)
  ------------------
  |  Branch (82:21): [True: 0, False: 0]
  ------------------
   83|      0|                    goto err;
   84|      0|                bn_sqr_recursive(rr->d, a->d, al, tmp->d);
   85|      0|            } else {
   86|      0|                if (bn_wexpand(tmp, max) == NULL)
  ------------------
  |  Branch (86:21): [True: 0, False: 0]
  ------------------
   87|      0|                    goto err;
   88|      0|                bn_sqr_normal(rr->d, a->d, al, tmp->d);
   89|      0|            }
   90|      0|        }
   91|   599k|#endif
   92|   599k|    }
   93|       |
   94|   599k|    rr->neg = 0;
   95|   599k|    rr->top = max;
   96|   599k|    rr->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   599k|#define BN_FLG_FIXED_TOP 0
  ------------------
   97|   599k|    if (r != rr && BN_copy(r, rr) == NULL)
  ------------------
  |  Branch (97:9): [True: 0, False: 599k]
  |  Branch (97:20): [True: 0, False: 0]
  ------------------
   98|      0|        goto err;
   99|       |
  100|   599k|    ret = 1;
  101|   599k|err:
  102|   599k|    bn_check_top(rr);
  103|   599k|    bn_check_top(tmp);
  104|   599k|    BN_CTX_end(ctx);
  105|   599k|    return ret;
  106|   599k|}
bn_sqr_normal:
  110|   599k|{
  111|   599k|    int i, j, max;
  112|   599k|    const BN_ULONG *ap;
  113|   599k|    BN_ULONG *rp;
  114|       |
  115|   599k|    max = n * 2;
  116|   599k|    ap = a;
  117|   599k|    rp = r;
  118|   599k|    rp[0] = rp[max - 1] = 0;
  119|   599k|    rp++;
  120|   599k|    j = n;
  121|       |
  122|   599k|    if (--j > 0) {
  ------------------
  |  Branch (122:9): [True: 599k, False: 0]
  ------------------
  123|   599k|        ap++;
  124|   599k|        rp[j] = bn_mul_words(rp, ap, j, ap[-1]);
  125|   599k|        rp += 2;
  126|   599k|    }
  127|       |
  128|  3.04M|    for (i = n - 2; i > 0; i--) {
  ------------------
  |  Branch (128:21): [True: 2.44M, False: 599k]
  ------------------
  129|  2.44M|        j--;
  130|  2.44M|        ap++;
  131|  2.44M|        rp[j] = bn_mul_add_words(rp, ap, j, ap[-1]);
  132|  2.44M|        rp += 2;
  133|  2.44M|    }
  134|       |
  135|   599k|    bn_add_words(r, r, r, max);
  136|       |
  137|       |    /* There will not be a carry */
  138|       |
  139|   599k|    bn_sqr_words(tmp, a, n);
  140|       |
  141|   599k|    bn_add_words(r, r, tmp, max);
  142|   599k|}

BN_add_word:
   98|   162k|{
   99|   162k|    BN_ULONG l;
  100|   162k|    int i;
  101|       |
  102|   162k|    bn_check_top(a);
  103|   162k|    w &= BN_MASK2;
  ------------------
  |  |   77|   162k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  104|       |
  105|       |    /* degenerate case: w is zero */
  106|   162k|    if (!w)
  ------------------
  |  Branch (106:9): [True: 0, False: 162k]
  ------------------
  107|      0|        return 1;
  108|       |    /* degenerate case: a is zero */
  109|   162k|    if (BN_is_zero(a))
  ------------------
  |  Branch (109:9): [True: 0, False: 162k]
  ------------------
  110|      0|        return BN_set_word(a, w);
  111|       |    /* handle 'a' when negative */
  112|   162k|    if (a->neg) {
  ------------------
  |  Branch (112:9): [True: 0, False: 162k]
  ------------------
  113|      0|        a->neg = 0;
  114|      0|        i = BN_sub_word(a, w);
  115|      0|        if (!BN_is_zero(a))
  ------------------
  |  Branch (115:13): [True: 0, False: 0]
  ------------------
  116|      0|            a->neg = !(a->neg);
  117|      0|        return i;
  118|      0|    }
  119|   325k|    for (i = 0; w != 0 && i < a->top; i++) {
  ------------------
  |  Branch (119:17): [True: 162k, False: 162k]
  |  Branch (119:27): [True: 162k, False: 0]
  ------------------
  120|   162k|        a->d[i] = l = (a->d[i] + w) & BN_MASK2;
  ------------------
  |  |   77|   162k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  121|   162k|        w = (w > l) ? 1 : 0;
  ------------------
  |  Branch (121:13): [True: 0, False: 162k]
  ------------------
  122|   162k|    }
  123|   162k|    if (w && i == a->top) {
  ------------------
  |  Branch (123:9): [True: 0, False: 162k]
  |  Branch (123:14): [True: 0, False: 0]
  ------------------
  124|      0|        if (bn_wexpand(a, a->top + 1) == NULL)
  ------------------
  |  Branch (124:13): [True: 0, False: 0]
  ------------------
  125|      0|            return 0;
  126|      0|        a->top++;
  127|      0|        a->d[i] = w;
  128|      0|    }
  129|   162k|    bn_check_top(a);
  130|   162k|    return 1;
  131|   162k|}
BN_sub_word:
  134|   150k|{
  135|   150k|    int i;
  136|       |
  137|   150k|    bn_check_top(a);
  138|   150k|    w &= BN_MASK2;
  ------------------
  |  |   77|   150k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  139|       |
  140|       |    /* degenerate case: w is zero */
  141|   150k|    if (!w)
  ------------------
  |  Branch (141:9): [True: 0, False: 150k]
  ------------------
  142|      0|        return 1;
  143|       |    /* degenerate case: a is zero */
  144|   150k|    if (BN_is_zero(a)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 150k]
  ------------------
  145|      0|        i = BN_set_word(a, w);
  146|      0|        if (i != 0)
  ------------------
  |  Branch (146:13): [True: 0, False: 0]
  ------------------
  147|      0|            BN_set_negative(a, 1);
  148|      0|        return i;
  149|      0|    }
  150|       |    /* handle 'a' when negative */
  151|   150k|    if (a->neg) {
  ------------------
  |  Branch (151:9): [True: 0, False: 150k]
  ------------------
  152|      0|        a->neg = 0;
  153|      0|        i = BN_add_word(a, w);
  154|      0|        a->neg = 1;
  155|      0|        return i;
  156|      0|    }
  157|       |
  158|   150k|    if ((a->top == 1) && (a->d[0] < w)) {
  ------------------
  |  Branch (158:9): [True: 0, False: 150k]
  |  Branch (158:26): [True: 0, False: 0]
  ------------------
  159|      0|        a->d[0] = w - a->d[0];
  160|      0|        a->neg = 1;
  161|      0|        return 1;
  162|      0|    }
  163|   150k|    i = 0;
  164|   301k|    for (;;) {
  165|   301k|        if (a->d[i] >= w) {
  ------------------
  |  Branch (165:13): [True: 150k, False: 150k]
  ------------------
  166|   150k|            a->d[i] -= w;
  167|   150k|            break;
  168|   150k|        } else {
  169|   150k|            a->d[i] = (a->d[i] - w) & BN_MASK2;
  ------------------
  |  |   77|   150k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  170|   150k|            i++;
  171|   150k|            w = 1;
  172|   150k|        }
  173|   301k|    }
  174|   150k|    if ((a->d[i] == 0) && (i == (a->top - 1)))
  ------------------
  |  Branch (174:9): [True: 498, False: 150k]
  |  Branch (174:27): [True: 498, False: 0]
  ------------------
  175|    498|        a->top--;
  176|   150k|    bn_check_top(a);
  177|   150k|    return 1;
  178|   150k|}

ossl_bsearch:
   18|  13.5M|{
   19|  13.5M|    const char *base_ = base;
   20|  13.5M|    int l, h, i = 0, c = 0;
   21|  13.5M|    const char *p = NULL;
   22|       |
   23|  13.5M|    if (num == 0)
  ------------------
  |  Branch (23:9): [True: 0, False: 13.5M]
  ------------------
   24|      0|        return NULL;
   25|  13.5M|    l = 0;
   26|  13.5M|    h = num;
   27|   104M|    while (l < h) {
  ------------------
  |  Branch (27:12): [True: 103M, False: 543k]
  ------------------
   28|   103M|        i = l + (h - l) / 2;
   29|   103M|        p = &(base_[i * size]);
   30|   103M|        if (cmp_thunk != NULL)
  ------------------
  |  Branch (30:13): [True: 229k, False: 103M]
  ------------------
   31|   229k|            c = cmp_thunk((cmpthunk_fn)cmp, key, (const void *)p);
   32|   103M|        else
   33|   103M|            c = cmp(key, p);
   34|   103M|        if (c < 0)
  ------------------
  |  Branch (34:13): [True: 60.5M, False: 43.1M]
  ------------------
   35|  60.5M|            h = i;
   36|  43.1M|        else if (c > 0)
  ------------------
  |  Branch (36:18): [True: 30.1M, False: 13.0M]
  ------------------
   37|  30.1M|            l = i + 1;
   38|  13.0M|        else
   39|  13.0M|            break;
   40|   103M|    }
   41|  13.5M|    if (c != 0 && !(flags & OSSL_BSEARCH_VALUE_ON_NOMATCH))
  ------------------
  |  |  149|   543k|#define OSSL_BSEARCH_VALUE_ON_NOMATCH 0x01
  ------------------
  |  Branch (41:9): [True: 543k, False: 13.0M]
  |  Branch (41:19): [True: 543k, False: 0]
  ------------------
   42|   543k|        p = NULL;
   43|  13.0M|    else if (c == 0 && (flags & OSSL_BSEARCH_FIRST_VALUE_ON_MATCH)) {
  ------------------
  |  |  150|  13.0M|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  |  Branch (43:14): [True: 13.0M, False: 0]
  |  Branch (43:24): [True: 226k, False: 12.8M]
  ------------------
   44|   226k|        while (i > 0) {
  ------------------
  |  Branch (44:16): [True: 1.67k, False: 224k]
  ------------------
   45|  1.67k|            if (cmp_thunk != NULL) {
  ------------------
  |  Branch (45:17): [True: 1.67k, False: 3]
  ------------------
   46|  1.67k|                if (cmp_thunk((cmpthunk_fn)cmp, key, (const void *)&(base_[(i - 1) * size])))
  ------------------
  |  Branch (46:21): [True: 1.67k, False: 0]
  ------------------
   47|  1.67k|                    break;
   48|  1.67k|            } else {
   49|      3|                if (cmp(key, &(base_[(i - 1) * size])))
  ------------------
  |  Branch (49:21): [True: 3, False: 0]
  ------------------
   50|      3|                    break;
   51|      3|            }
   52|      0|            i--;
   53|      0|        }
   54|   226k|        p = &(base_[i * size]);
   55|   226k|    }
   56|  13.5M|    return p;
   57|  13.5M|}

ossl_err_load_BUF_strings:
   24|      1|{
   25|      1|#ifndef OPENSSL_NO_ERR
   26|      1|    if (ERR_reason_error_string(BUF_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (26:9): [True: 1, False: 0]
  ------------------
   27|      1|        ERR_load_strings_const(BUF_str_reasons);
   28|      1|#endif
   29|      1|    return 1;
   30|      1|}

BUF_MEM_new_ex:
   22|  2.03M|{
   23|  2.03M|    BUF_MEM *ret;
   24|       |
   25|  2.03M|    ret = BUF_MEM_new();
   26|  2.03M|    if (ret != NULL)
  ------------------
  |  Branch (26:9): [True: 2.03M, False: 0]
  ------------------
   27|  2.03M|        ret->flags = flags;
   28|  2.03M|    return ret;
   29|  2.03M|}
BUF_MEM_new:
   32|  5.06M|{
   33|  5.06M|    BUF_MEM *ret;
   34|       |
   35|  5.06M|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  5.06M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|  5.06M|    if (ret == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 5.06M]
  ------------------
   37|      0|        return NULL;
   38|  5.06M|    return ret;
   39|  5.06M|}
BUF_MEM_free:
   42|  4.06M|{
   43|  4.06M|    if (a == NULL)
  ------------------
  |  Branch (43:9): [True: 8.23k, False: 4.06M]
  ------------------
   44|  8.23k|        return;
   45|  4.06M|    if (a->data != NULL) {
  ------------------
  |  Branch (45:9): [True: 1.51M, False: 2.54M]
  ------------------
   46|  1.51M|        if (a->flags & BUF_MEM_FLAG_SECURE)
  ------------------
  |  |   48|  1.51M|#define BUF_MEM_FLAG_SECURE 0x01
  ------------------
  |  Branch (46:13): [True: 0, False: 1.51M]
  ------------------
   47|      0|            OPENSSL_secure_clear_free(a->data, a->max);
  ------------------
  |  |  150|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|  1.51M|        else
   49|  1.51M|            OPENSSL_clear_free(a->data, a->max);
  ------------------
  |  |  130|  1.51M|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   50|  1.51M|    }
   51|  4.06M|    OPENSSL_free(a);
  ------------------
  |  |  132|  4.06M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   52|  4.06M|}
BUF_MEM_grow:
   72|  1.01M|{
   73|  1.01M|    char *ret;
   74|  1.01M|    size_t n;
   75|       |
   76|  1.01M|    if (str->length >= len) {
  ------------------
  |  Branch (76:9): [True: 0, False: 1.01M]
  ------------------
   77|      0|        str->length = len;
   78|      0|        return len;
   79|      0|    }
   80|  1.01M|    if (str->max >= len) {
  ------------------
  |  Branch (80:9): [True: 0, False: 1.01M]
  ------------------
   81|      0|        if (str->data != NULL)
  ------------------
  |  Branch (81:13): [True: 0, False: 0]
  ------------------
   82|      0|            memset(&str->data[str->length], 0, len - str->length);
   83|      0|        str->length = len;
   84|      0|        return len;
   85|      0|    }
   86|       |    /* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
   87|  1.01M|    if (len > LIMIT_BEFORE_EXPANSION) {
  ------------------
  |  |   19|  1.01M|#define LIMIT_BEFORE_EXPANSION 0x5ffffffc
  ------------------
  |  Branch (87:9): [True: 0, False: 1.01M]
  ------------------
   88|      0|        ERR_raise(ERR_LIB_BUF, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   89|      0|        return 0;
   90|      0|    }
   91|  1.01M|    n = (len + 3) / 3 * 4;
   92|  1.01M|    if ((str->flags & BUF_MEM_FLAG_SECURE))
  ------------------
  |  |   48|  1.01M|#define BUF_MEM_FLAG_SECURE 0x01
  ------------------
  |  Branch (92:9): [True: 0, False: 1.01M]
  ------------------
   93|      0|        ret = sec_alloc_realloc(str, n);
   94|  1.01M|    else
   95|  1.01M|        ret = OPENSSL_realloc(str->data, n);
  ------------------
  |  |  121|  1.01M|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   96|  1.01M|    if (ret == NULL) {
  ------------------
  |  Branch (96:9): [True: 0, False: 1.01M]
  ------------------
   97|      0|        len = 0;
   98|  1.01M|    } else {
   99|  1.01M|        str->data = ret;
  100|  1.01M|        str->max = n;
  101|  1.01M|        memset(&str->data[str->length], 0, len - str->length);
  102|  1.01M|        str->length = len;
  103|  1.01M|    }
  104|  1.01M|    return len;
  105|  1.01M|}
BUF_MEM_grow_clean:
  108|  14.1M|{
  109|  14.1M|    char *ret;
  110|  14.1M|    size_t n;
  111|       |
  112|  14.1M|    if (str->length >= len) {
  ------------------
  |  Branch (112:9): [True: 145, False: 14.1M]
  ------------------
  113|    145|        if (str->data != NULL)
  ------------------
  |  Branch (113:13): [True: 145, False: 0]
  ------------------
  114|    145|            memset(&str->data[len], 0, str->length - len);
  115|    145|        str->length = len;
  116|    145|        return len;
  117|    145|    }
  118|  14.1M|    if (str->max >= len) {
  ------------------
  |  Branch (118:9): [True: 8.22M, False: 5.95M]
  ------------------
  119|  8.22M|        memset(&str->data[str->length], 0, len - str->length);
  120|  8.22M|        str->length = len;
  121|  8.22M|        return len;
  122|  8.22M|    }
  123|       |    /* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
  124|  5.95M|    if (len > LIMIT_BEFORE_EXPANSION) {
  ------------------
  |  |   19|  5.95M|#define LIMIT_BEFORE_EXPANSION 0x5ffffffc
  ------------------
  |  Branch (124:9): [True: 0, False: 5.95M]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_BUF, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return 0;
  127|      0|    }
  128|  5.95M|    n = (len + 3) / 3 * 4;
  129|  5.95M|    if ((str->flags & BUF_MEM_FLAG_SECURE))
  ------------------
  |  |   48|  5.95M|#define BUF_MEM_FLAG_SECURE 0x01
  ------------------
  |  Branch (129:9): [True: 0, False: 5.95M]
  ------------------
  130|      0|        ret = sec_alloc_realloc(str, n);
  131|  5.95M|    else
  132|  5.95M|        ret = OPENSSL_clear_realloc(str->data, str->max, n);
  ------------------
  |  |  123|  5.95M|    CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  133|  5.95M|    if (ret == NULL) {
  ------------------
  |  Branch (133:9): [True: 0, False: 5.95M]
  ------------------
  134|      0|        len = 0;
  135|  5.95M|    } else {
  136|  5.95M|        str->data = ret;
  137|  5.95M|        str->max = n;
  138|  5.95M|        memset(&str->data[str->length], 0, len - str->length);
  139|  5.95M|        str->length = len;
  140|  5.95M|    }
  141|  5.95M|    return len;
  142|  5.95M|}

ossl_err_load_CMP_strings:
  199|      1|{
  200|      1|#ifndef OPENSSL_NO_ERR
  201|      1|    if (ERR_reason_error_string(CMP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (201:9): [True: 1, False: 0]
  ------------------
  202|      1|        ERR_load_strings_const(CMP_str_reasons);
  203|      1|#endif
  204|      1|    return 1;
  205|      1|}

ossl_err_load_CMS_strings:
  182|      1|{
  183|      1|#ifndef OPENSSL_NO_ERR
  184|      1|    if (ERR_reason_error_string(CMS_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (184:9): [True: 1, False: 0]
  ------------------
  185|      1|        ERR_load_strings_const(CMS_str_reasons);
  186|      1|#endif
  187|      1|    return 1;
  188|      1|}

COMP_zlib:
  310|    809|{
  311|    809|    COMP_METHOD *meth = NULL;
  312|       |
  313|       |#ifndef OPENSSL_NO_ZLIB
  314|       |    if (RUN_ONCE(&zlib_once, ossl_comp_zlib_init))
  315|       |        meth = &zlib_stateful_method;
  316|       |#endif
  317|       |
  318|    809|    return meth;
  319|    809|}

ossl_err_load_COMP_strings:
   45|      1|{
   46|      1|#ifndef OPENSSL_NO_ERR
   47|      1|    if (ERR_reason_error_string(COMP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (47:9): [True: 1, False: 0]
  ------------------
   48|      1|        ERR_load_strings_const(COMP_str_reasons);
   49|      1|#endif
   50|      1|    return 1;
   51|      1|}

COMP_get_type:
   41|    809|{
   42|    809|    if (meth == NULL)
  ------------------
  |  Branch (42:9): [True: 809, False: 0]
  ------------------
   43|    809|        return NID_undef;
  ------------------
  |  |   18|    809|#define NID_undef                       0
  ------------------
   44|      0|    return meth->type;
   45|    809|}
COMP_CTX_free:
   55|  15.5k|{
   56|  15.5k|    if (ctx == NULL)
  ------------------
  |  Branch (56:9): [True: 15.5k, False: 0]
  ------------------
   57|  15.5k|        return;
   58|      0|    if (ctx->meth->finish != NULL)
  ------------------
  |  Branch (58:9): [True: 0, False: 0]
  ------------------
   59|      0|        ctx->meth->finish(ctx);
   60|       |
   61|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      0|}

ossl_load_builtin_compressions:
   29|    809|{
   30|    809|    STACK_OF(SSL_COMP) *comp_methods = NULL;
  ------------------
  |  |   33|    809|#define STACK_OF(type) struct stack_st_##type
  ------------------
   31|    809|#ifndef OPENSSL_NO_COMP
   32|    809|    SSL_COMP *comp = NULL;
   33|    809|    COMP_METHOD *method = COMP_zlib();
   34|       |
   35|    809|    comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
  ------------------
  |  |   72|    809|#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)), sk_SSL_COMP_cmpfunc_thunk))
  ------------------
   36|       |
   37|    809|    if (COMP_get_type(method) != NID_undef && comp_methods != NULL) {
  ------------------
  |  |   18|  1.61k|#define NID_undef                       0
  ------------------
  |  Branch (37:9): [True: 0, False: 809]
  |  Branch (37:47): [True: 0, False: 0]
  ------------------
   38|      0|        comp = OPENSSL_malloc(sizeof(*comp));
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|      0|        if (comp != NULL) {
  ------------------
  |  Branch (39:13): [True: 0, False: 0]
  ------------------
   40|      0|            comp->method = method;
   41|      0|            comp->id = SSL_COMP_ZLIB_IDX;
  ------------------
  |  |   18|      0|#define SSL_COMP_ZLIB_IDX 1
  ------------------
   42|      0|            comp->name = COMP_get_name(method);
   43|      0|            if (!sk_SSL_COMP_push(comp_methods, comp))
  ------------------
  |  |   80|      0|#define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
  ------------------
  |  Branch (43:17): [True: 0, False: 0]
  ------------------
   44|      0|                OPENSSL_free(comp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|      0|        }
   46|      0|    }
   47|    809|#endif
   48|    809|    return comp_methods;
   49|    809|}
ossl_free_compression_methods_int:
   57|    808|{
   58|    808|    sk_SSL_COMP_pop_free(methods, cmeth_free);
  ------------------
  |  |   84|    808|#define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_freefunc_type(freefunc))
  ------------------
   59|    808|}

_CONF_free_data:
  137|    809|{
  138|    809|    if (conf == NULL)
  ------------------
  |  Branch (138:9): [True: 0, False: 809]
  ------------------
  139|      0|        return;
  140|       |
  141|    809|    OPENSSL_free(conf->includedir);
  ------------------
  |  |  132|    809|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  142|    809|    if (conf->data == NULL)
  ------------------
  |  Branch (142:9): [True: 809, False: 0]
  ------------------
  143|    809|        return;
  144|       |
  145|       |    /* evil thing to make sure the 'OPENSSL_free()' works as expected */
  146|      0|    lh_CONF_VALUE_set_down_load(conf->data, 0);
  ------------------
  |  |   86|      0|#define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
  ------------------
  147|      0|    lh_CONF_VALUE_doall_LH_CONF_VALUE(conf->data, value_free_hash, conf->data);
  148|       |
  149|       |    /*
  150|       |     * We now have only 'section' entries in the hash table. Due to problems
  151|       |     * with
  152|       |     */
  153|       |
  154|      0|    lh_CONF_VALUE_doall(conf->data, value_free_stack_doall);
  ------------------
  |  |   87|      0|#define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn))
  ------------------
  155|      0|    lh_CONF_VALUE_free(conf->data);
  ------------------
  |  |   75|      0|#define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))
  ------------------
  156|      0|}

NCONF_default:
   87|    809|{
   88|    809|    return &default_method;
   89|    809|}
conf_def.c:def_create:
  112|    809|{
  113|    809|    CONF *ret;
  114|       |
  115|    809|    ret = OPENSSL_malloc(sizeof(*ret));
  ------------------
  |  |  107|    809|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  116|    809|    if (ret != NULL)
  ------------------
  |  Branch (116:9): [True: 809, False: 0]
  ------------------
  117|    809|        if (meth->init(ret) == 0) {
  ------------------
  |  Branch (117:13): [True: 0, False: 809]
  ------------------
  118|      0|            OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  119|       |            ret = NULL;
  120|      0|        }
  121|    809|    return ret;
  122|    809|}
conf_def.c:def_init_default:
  125|    809|{
  126|    809|    if (conf == NULL)
  ------------------
  |  Branch (126:9): [True: 0, False: 809]
  ------------------
  127|      0|        return 0;
  128|       |
  129|    809|    memset(conf, 0, sizeof(*conf));
  130|    809|    conf->meth = &default_method;
  131|    809|    conf->meth_data = (void *)CONF_type_default;
  132|       |
  133|    809|    return 1;
  134|    809|}
conf_def.c:def_destroy:
  151|    809|{
  152|    809|    if (def_destroy_data(conf)) {
  ------------------
  |  Branch (152:9): [True: 809, False: 0]
  ------------------
  153|    809|        OPENSSL_free(conf);
  ------------------
  |  |  132|    809|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|    809|        return 1;
  155|    809|    }
  156|      0|    return 0;
  157|    809|}
conf_def.c:def_destroy_data:
  160|    809|{
  161|    809|    if (conf == NULL)
  ------------------
  |  Branch (161:9): [True: 0, False: 809]
  ------------------
  162|      0|        return 0;
  163|    809|    _CONF_free_data(conf);
  164|    809|    return 1;
  165|    809|}
conf_def.c:def_load:
  168|    809|{
  169|    809|    int ret;
  170|    809|    BIO *in = NULL;
  171|       |
  172|       |#ifdef OPENSSL_SYS_VMS
  173|       |    in = BIO_new_file(name, "r");
  174|       |#else
  175|    809|    in = BIO_new_file(name, "rb");
  176|    809|#endif
  177|    809|    if (in == NULL) {
  ------------------
  |  Branch (177:9): [True: 809, False: 0]
  ------------------
  178|    809|        if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE)
  ------------------
  |  |   46|    809|#define BIO_R_NO_SUCH_FILE 128
  ------------------
  |  Branch (178:13): [True: 809, False: 0]
  ------------------
  179|    809|            ERR_raise(ERR_LIB_CONF, CONF_R_NO_SUCH_FILE);
  ------------------
  |  |  357|    809|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|    809|    (ERR_new(),                                                  \
  |  |  |  |  360|    809|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    809|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|    809|        ERR_set_error)
  |  |  ------------------
  ------------------
  180|      0|        else
  181|    809|            ERR_raise(ERR_LIB_CONF, ERR_R_SYS_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  182|    809|        return 0;
  183|    809|    }
  184|       |
  185|      0|    ret = def_load_bio(conf, in, line);
  186|      0|    BIO_free(in);
  187|       |
  188|      0|    return ret;
  189|    809|}

ossl_err_load_CONF_strings:
   68|      1|{
   69|      1|#ifndef OPENSSL_NO_ERR
   70|      1|    if (ERR_reason_error_string(CONF_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (70:9): [True: 1, False: 0]
  ------------------
   71|      1|        ERR_load_strings_const(CONF_str_reasons);
   72|      1|#endif
   73|      1|    return 1;
   74|      1|}

NCONF_new_ex:
  183|    809|{
  184|    809|    CONF *ret;
  185|       |
  186|    809|    if (meth == NULL)
  ------------------
  |  Branch (186:9): [True: 809, False: 0]
  ------------------
  187|    809|        meth = NCONF_default();
  188|       |
  189|    809|    ret = meth->create(meth);
  190|    809|    if (ret == NULL) {
  ------------------
  |  Branch (190:9): [True: 0, False: 809]
  ------------------
  191|      0|        ERR_raise(ERR_LIB_CONF, ERR_R_CONF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  192|      0|        return NULL;
  193|      0|    }
  194|    809|    ret->libctx = libctx;
  195|       |
  196|    809|    return ret;
  197|    809|}
NCONF_free:
  205|    809|{
  206|    809|    if (conf == NULL)
  ------------------
  |  Branch (206:9): [True: 0, False: 809]
  ------------------
  207|      0|        return;
  208|    809|    conf->meth->destroy(conf);
  209|    809|}
NCONF_load:
  252|    809|{
  253|    809|    if (conf == NULL) {
  ------------------
  |  Branch (253:9): [True: 0, False: 809]
  ------------------
  254|      0|        ERR_raise(ERR_LIB_CONF, CONF_R_NO_CONF);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  255|      0|        return 0;
  256|      0|    }
  257|       |
  258|    809|    return conf->meth->load(conf, file, eline);
  259|    809|}

CONF_modules_load_file_ex:
  156|    809|{
  157|    809|    char *file = NULL;
  158|    809|    CONF *conf = NULL;
  159|    809|    int ret = 0, diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
  160|       |
  161|    809|    ERR_set_mark();
  162|       |
  163|    809|    if (filename == NULL) {
  ------------------
  |  Branch (163:9): [True: 809, False: 0]
  ------------------
  164|    809|        file = CONF_get1_default_config_file();
  165|    809|        if (file == NULL)
  ------------------
  |  Branch (165:13): [True: 0, False: 809]
  ------------------
  166|      0|            goto err;
  167|    809|        if (*file == '\0') {
  ------------------
  |  Branch (167:13): [True: 0, False: 809]
  ------------------
  168|       |            /* Do not try to load an empty file name but do not error out */
  169|      0|            ret = 1;
  170|      0|            goto err;
  171|      0|        }
  172|    809|    } else {
  173|      0|        file = (char *)filename;
  174|      0|    }
  175|       |
  176|    809|    conf = NCONF_new_ex(libctx, NULL);
  177|    809|    if (conf == NULL)
  ------------------
  |  Branch (177:9): [True: 0, False: 809]
  ------------------
  178|      0|        goto err;
  179|       |
  180|    809|    if (NCONF_load(conf, file, NULL) <= 0) {
  ------------------
  |  Branch (180:9): [True: 809, False: 0]
  ------------------
  181|    809|        if ((flags & CONF_MFLAGS_IGNORE_MISSING_FILE) && (ERR_GET_REASON(ERR_peek_last_error()) == CONF_R_NO_SUCH_FILE)) {
  ------------------
  |  |  114|    809|#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
  ------------------
                      if ((flags & CONF_MFLAGS_IGNORE_MISSING_FILE) && (ERR_GET_REASON(ERR_peek_last_error()) == CONF_R_NO_SUCH_FILE)) {
  ------------------
  |  |   34|      1|#define CONF_R_NO_SUCH_FILE 114
  ------------------
  |  Branch (181:13): [True: 1, False: 808]
  |  Branch (181:58): [True: 1, False: 0]
  ------------------
  182|      1|            ret = 1;
  183|      1|        }
  184|    809|        goto err;
  185|    809|    }
  186|       |
  187|      0|    ret = CONF_modules_load(conf, appname, flags);
  188|       |    /* CONF_modules_load() might change the diagnostics setting, reread it. */
  189|      0|    diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
  190|       |
  191|    809|err:
  192|    809|    if (filename == NULL)
  ------------------
  |  Branch (192:9): [True: 809, False: 0]
  ------------------
  193|    809|        OPENSSL_free(file);
  ------------------
  |  |  132|    809|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  194|    809|    NCONF_free(conf);
  195|       |
  196|    809|    if ((flags & CONF_MFLAGS_IGNORE_RETURN_CODES) != 0 && !diagnostics)
  ------------------
  |  |  111|    809|#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
  ------------------
  |  Branch (196:9): [True: 1, False: 808]
  |  Branch (196:59): [True: 1, False: 0]
  ------------------
  197|      1|        ret = 1;
  198|       |
  199|    809|    if (ret > 0)
  ------------------
  |  Branch (199:9): [True: 1, False: 808]
  ------------------
  200|      1|        ERR_pop_to_mark();
  201|    808|    else
  202|    808|        ERR_clear_last_mark();
  203|       |
  204|    809|    return ret;
  205|      0|}
CONF_get1_default_config_file:
  646|    809|{
  647|    809|    const char *t;
  648|    809|    char *file, *sep = "";
  649|    809|    size_t size;
  650|       |
  651|    809|    if ((file = ossl_safe_getenv("OPENSSL_CONF")) != NULL)
  ------------------
  |  Branch (651:9): [True: 0, False: 809]
  ------------------
  652|      0|        return OPENSSL_strdup(file);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  653|       |
  654|    809|    t = X509_get_default_cert_area();
  655|       |    /*
  656|       |     * On windows systems with -DOSSL_WINCTX set, if the needed registry
  657|       |     * keys are not yet set, openssl applets will return, due to an inability
  658|       |     * to locate various directories, like the default cert area.  In that
  659|       |     * event, clone an empty string here, so that commands like openssl version
  660|       |     * continue to operate properly without needing to set OPENSSL_CONF.
  661|       |     * Applets like cms will fail gracefully later when they try to parse an
  662|       |     * empty config file
  663|       |     */
  664|    809|    if (t == NULL)
  ------------------
  |  Branch (664:9): [True: 0, False: 809]
  ------------------
  665|      0|        return OPENSSL_strdup("");
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  666|       |
  667|    809|#ifndef OPENSSL_SYS_VMS
  668|    809|    sep = "/";
  669|    809|#endif
  670|    809|    size = strlen(t) + strlen(sep) + strlen(OPENSSL_CONF) + 1;
  ------------------
  |  |   80|    809|#define OPENSSL_CONF "openssl.cnf"
  ------------------
  671|    809|    file = OPENSSL_malloc(size);
  ------------------
  |  |  107|    809|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  672|       |
  673|    809|    if (file == NULL)
  ------------------
  |  Branch (673:9): [True: 0, False: 809]
  ------------------
  674|      0|        return NULL;
  675|    809|    BIO_snprintf(file, size, "%s%s%s", t, sep, OPENSSL_CONF);
  ------------------
  |  |   80|    809|#define OPENSSL_CONF "openssl.cnf"
  ------------------
  676|       |
  677|    809|    return file;
  678|    809|}
CONF_parse_list:
  690|  30.4k|{
  691|  30.4k|    int ret;
  692|  30.4k|    const char *lstart, *tmpend, *p;
  693|       |
  694|  30.4k|    if (list_ == NULL) {
  ------------------
  |  Branch (694:9): [True: 0, False: 30.4k]
  ------------------
  695|      0|        ERR_raise(ERR_LIB_CONF, CONF_R_LIST_CANNOT_BE_NULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  696|      0|        return 0;
  697|      0|    }
  698|       |
  699|  30.4k|    lstart = list_;
  700|  95.6k|    for (;;) {
  701|  95.6k|        if (nospc) {
  ------------------
  |  Branch (701:13): [True: 95.6k, False: 0]
  ------------------
  702|   180k|            while (*lstart && isspace((unsigned char)*lstart))
  ------------------
  |  Branch (702:20): [True: 180k, False: 37]
  |  Branch (702:31): [True: 84.4k, False: 95.6k]
  ------------------
  703|  84.4k|                lstart++;
  704|  95.6k|        }
  705|  95.6k|        p = strchr(lstart, sep);
  706|  95.6k|        if (p == lstart || *lstart == '\0')
  ------------------
  |  Branch (706:13): [True: 6.56k, False: 89.0k]
  |  Branch (706:28): [True: 37, False: 89.0k]
  ------------------
  707|  6.60k|            ret = list_cb(NULL, 0, arg);
  708|  89.0k|        else {
  709|  89.0k|            if (p)
  ------------------
  |  Branch (709:17): [True: 58.6k, False: 30.3k]
  ------------------
  710|  58.6k|                tmpend = p - 1;
  711|  30.3k|            else
  712|  30.3k|                tmpend = lstart + strlen(lstart) - 1;
  713|  89.0k|            if (nospc) {
  ------------------
  |  Branch (713:17): [True: 89.0k, False: 0]
  ------------------
  714|  89.0k|                while (isspace((unsigned char)*tmpend))
  ------------------
  |  Branch (714:24): [True: 61.6k, False: 89.0k]
  ------------------
  715|  61.6k|                    tmpend--;
  716|  89.0k|            }
  717|  89.0k|            ret = list_cb(lstart, (int)(tmpend - lstart + 1), arg);
  718|  89.0k|        }
  719|  95.6k|        if (ret <= 0)
  ------------------
  |  Branch (719:13): [True: 250, False: 95.3k]
  ------------------
  720|    250|            return ret;
  721|  95.3k|        if (p == NULL)
  ------------------
  |  Branch (721:13): [True: 30.2k, False: 65.1k]
  ------------------
  722|  30.2k|            return 1;
  723|  65.1k|        lstart = p + 1;
  724|  65.1k|    }
  725|  30.4k|}

ossl_config_int:
   46|      1|{
   47|      1|    int ret = 0;
   48|      1|#if defined(OPENSSL_INIT_DEBUG) || !defined(OPENSSL_SYS_UEFI)
   49|      1|    const char *filename;
   50|      1|    const char *appname;
   51|      1|    unsigned long flags;
   52|      1|#endif
   53|       |
   54|      1|    if (openssl_configured)
  ------------------
  |  Branch (54:9): [True: 0, False: 1]
  ------------------
   55|      0|        return 1;
   56|       |
   57|      1|#if defined(OPENSSL_INIT_DEBUG) || !defined(OPENSSL_SYS_UEFI)
   58|      1|    filename = settings ? settings->filename : NULL;
  ------------------
  |  Branch (58:16): [True: 0, False: 1]
  ------------------
   59|      1|    appname = settings ? settings->appname : NULL;
  ------------------
  |  Branch (59:15): [True: 0, False: 1]
  ------------------
   60|      1|    flags = settings ? settings->flags : DEFAULT_CONF_MFLAGS;
  ------------------
  |  |   20|      2|    (CONF_MFLAGS_DEFAULT_SECTION | CONF_MFLAGS_IGNORE_MISSING_FILE | CONF_MFLAGS_IGNORE_RETURN_CODES)
  |  |  ------------------
  |  |  |  |  115|      1|#define CONF_MFLAGS_DEFAULT_SECTION 0x20
  |  |  ------------------
  |  |                   (CONF_MFLAGS_DEFAULT_SECTION | CONF_MFLAGS_IGNORE_MISSING_FILE | CONF_MFLAGS_IGNORE_RETURN_CODES)
  |  |  ------------------
  |  |  |  |  114|      1|#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
  |  |  ------------------
  |  |                   (CONF_MFLAGS_DEFAULT_SECTION | CONF_MFLAGS_IGNORE_MISSING_FILE | CONF_MFLAGS_IGNORE_RETURN_CODES)
  |  |  ------------------
  |  |  |  |  111|      1|#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
  |  |  ------------------
  ------------------
  |  Branch (60:13): [True: 0, False: 1]
  ------------------
   61|      1|#endif
   62|       |
   63|       |#ifdef OPENSSL_INIT_DEBUG
   64|       |    fprintf(stderr, "OPENSSL_INIT: ossl_config_int(%s, %s, %lu)\n",
   65|       |        filename, appname, flags);
   66|       |#endif
   67|       |
   68|      1|#ifndef OPENSSL_SYS_UEFI
   69|      1|    ret = CONF_modules_load_file_ex(OSSL_LIB_CTX_get0_global_default(),
   70|      1|        filename, appname, flags);
   71|       |#else
   72|       |    ret = 1;
   73|       |#endif
   74|      1|    openssl_configured = 1;
   75|      1|    return ret;
   76|      1|}

conf_ssl_name_find:
  154|  3.35k|{
  155|  3.35k|    SSL_MODULE *ssl = md != NULL ? CONF_imodule_get_usr_data(md) : NULL;
  ------------------
  |  Branch (155:23): [True: 0, False: 3.35k]
  ------------------
  156|  3.35k|    const struct ssl_conf_name_st *nm;
  157|  3.35k|    size_t i;
  158|       |
  159|  3.35k|    if (ssl == NULL || ssl->names == NULL)
  ------------------
  |  Branch (159:9): [True: 3.35k, False: 0]
  |  Branch (159:24): [True: 0, False: 0]
  ------------------
  160|  3.35k|        return 0;
  161|       |
  162|      0|    for (i = 0, nm = ssl->names; i < ssl->names_count; i++, nm++) {
  ------------------
  |  Branch (162:34): [True: 0, False: 0]
  ------------------
  163|      0|        if (strcmp(nm->name, name) == 0) {
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|            *idx = i;
  165|      0|            return 1;
  166|      0|        }
  167|      0|    }
  168|      0|    return 0;
  169|      0|}

ossl_lib_ctx_write_lock:
   59|  1.28k|{
   60|  1.28k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (60:9): [True: 0, False: 1.28k]
  ------------------
   61|      0|        return 0;
   62|  1.28k|    return CRYPTO_THREAD_write_lock(ctx->lock);
   63|  1.28k|}
ossl_lib_ctx_read_lock:
   66|   193k|{
   67|   193k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (67:9): [True: 0, False: 193k]
  ------------------
   68|      0|        return 0;
   69|   193k|    return CRYPTO_THREAD_read_lock(ctx->lock);
   70|   193k|}
ossl_lib_ctx_unlock:
   73|   194k|{
   74|   194k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (74:9): [True: 0, False: 194k]
  ------------------
   75|      0|        return 0;
   76|   194k|    return CRYPTO_THREAD_unlock(ctx->lock);
   77|   194k|}
ossl_lib_ctx_detach_ssl_conf_imodule:
   99|    808|{
  100|    808|    if (ctx != NULL && md != NULL)
  ------------------
  |  Branch (100:9): [True: 808, False: 0]
  |  Branch (100:24): [True: 0, False: 808]
  ------------------
  101|      0|        return 0;
  102|       |
  103|    808|    if (ctx != NULL && ctx->ssl_imod) {
  ------------------
  |  Branch (103:9): [True: 808, False: 0]
  |  Branch (103:24): [True: 0, False: 808]
  ------------------
  104|      0|        ctx->ssl_imod->libctx = NULL;
  105|      0|        ctx->ssl_imod = NULL;
  106|      0|    }
  107|       |
  108|    808|    if (md != NULL && md->libctx) {
  ------------------
  |  Branch (108:9): [True: 0, False: 808]
  |  Branch (108:23): [True: 0, False: 0]
  ------------------
  109|      0|        md->libctx->ssl_imod = NULL;
  110|      0|        md->libctx = NULL;
  111|      0|    }
  112|       |
  113|    808|    return 1;
  114|    808|}
OSSL_LIB_CTX_new:
  485|    808|{
  486|    808|    OSSL_LIB_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|    808|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  487|       |
  488|    808|    if (ctx != NULL && !context_init(ctx)) {
  ------------------
  |  Branch (488:9): [True: 808, False: 0]
  |  Branch (488:24): [True: 0, False: 808]
  ------------------
  489|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  490|       |        ctx = NULL;
  491|      0|    }
  492|    808|    return ctx;
  493|    808|}
OSSL_LIB_CTX_load_config:
  530|    808|{
  531|       |    return CONF_modules_load_file_ex(ctx, config_file, NULL, 0) > 0;
  532|    808|}
OSSL_LIB_CTX_free:
  536|  26.3k|{
  537|  26.3k|    if (ctx == NULL || ossl_lib_ctx_is_default_nocreate(ctx))
  ------------------
  |  Branch (537:9): [True: 25.5k, False: 808]
  |  Branch (537:24): [True: 0, False: 808]
  ------------------
  538|  25.5k|        return;
  539|       |
  540|    808|#ifndef FIPS_MODULE
  541|    808|    if (ctx->ischild)
  ------------------
  |  Branch (541:9): [True: 0, False: 808]
  ------------------
  542|      0|        ossl_provider_deinit_child(ctx);
  543|    808|#endif
  544|    808|    context_deinit(ctx);
  545|    808|    OPENSSL_free(ctx);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  546|    808|}
OSSL_LIB_CTX_get0_global_default:
  550|  3.35k|{
  551|  3.35k|    if (!RUN_ONCE(&default_context_thread_key_init, default_context_do_thread_key_init))
  ------------------
  |  |  130|  3.35k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3.35k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (551:9): [True: 0, False: 3.35k]
  ------------------
  552|      0|        return NULL;
  553|       |
  554|  3.35k|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|  3.35k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3.35k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (554:9): [True: 0, False: 3.35k]
  ------------------
  555|      0|        return NULL;
  556|       |
  557|  3.35k|    return &default_context_int;
  558|  3.35k|}
OSSL_LIB_CTX_set0_default:
  561|  3.35k|{
  562|  3.35k|    OSSL_LIB_CTX *current_defctx;
  563|       |
  564|  3.35k|    if ((current_defctx = get_default_context()) != NULL) {
  ------------------
  |  Branch (564:9): [True: 3.35k, False: 0]
  ------------------
  565|  3.35k|        if (libctx != NULL)
  ------------------
  |  Branch (565:13): [True: 0, False: 3.35k]
  ------------------
  566|      0|            set_default_context(libctx);
  567|  3.35k|        return current_defctx;
  568|  3.35k|    }
  569|       |
  570|      0|    return NULL;
  571|  3.35k|}
ossl_lib_ctx_get_concrete:
  584|  20.1M|{
  585|  20.1M|#ifndef FIPS_MODULE
  586|  20.1M|    if (ctx == NULL)
  ------------------
  |  Branch (586:9): [True: 13.9M, False: 6.24M]
  ------------------
  587|  13.9M|        return get_default_context();
  588|  6.24M|#endif
  589|  6.24M|    return ctx;
  590|  20.1M|}
ossl_lib_ctx_is_default:
  593|   179k|{
  594|   179k|#ifndef FIPS_MODULE
  595|   179k|    if (ctx == NULL || ctx == get_default_context())
  ------------------
  |  Branch (595:9): [True: 49.7k, False: 130k]
  |  Branch (595:24): [True: 13.8k, False: 116k]
  ------------------
  596|  63.6k|        return 1;
  597|   116k|#endif
  598|   116k|    return 0;
  599|   179k|}
ossl_lib_ctx_is_default_nocreate:
  602|    808|{
  603|    808|#ifndef FIPS_MODULE
  604|    808|    if (ctx == NULL || ctx == check_default_context())
  ------------------
  |  Branch (604:9): [True: 0, False: 808]
  |  Branch (604:24): [True: 0, False: 808]
  ------------------
  605|      0|        return 1;
  606|    808|#endif
  607|    808|    return 0;
  608|    808|}
ossl_lib_ctx_is_global_default:
  611|  62.4k|{
  612|  62.4k|#ifndef FIPS_MODULE
  613|  62.4k|    if (ossl_lib_ctx_get_concrete(ctx) == &default_context_int)
  ------------------
  |  Branch (613:9): [True: 44.1k, False: 18.2k]
  ------------------
  614|  44.1k|        return 1;
  615|  18.2k|#endif
  616|  18.2k|    return 0;
  617|  62.4k|}
ossl_lib_ctx_get_data:
  620|  8.42M|{
  621|  8.42M|    ctx = ossl_lib_ctx_get_concrete(ctx);
  622|  8.42M|    if (ctx == NULL)
  ------------------
  |  Branch (622:9): [True: 0, False: 8.42M]
  ------------------
  623|      0|        return NULL;
  624|       |
  625|  8.42M|    switch (index) {
  626|   118k|    case OSSL_LIB_CTX_PROPERTY_STRING_INDEX:
  ------------------
  |  |   98|   118k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  |  Branch (626:5): [True: 118k, False: 8.31M]
  ------------------
  627|   118k|        return ctx->property_string_data;
  628|  1.40M|    case OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX:
  ------------------
  |  |   95|  1.40M|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
  |  Branch (628:5): [True: 1.40M, False: 7.02M]
  ------------------
  629|  1.40M|        return ctx->evp_method_store;
  630|   113k|    case OSSL_LIB_CTX_PROVIDER_STORE_INDEX:
  ------------------
  |  |   96|   113k|#define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
  ------------------
  |  Branch (630:5): [True: 113k, False: 8.31M]
  ------------------
  631|   113k|        return ctx->provider_store;
  632|  5.99M|    case OSSL_LIB_CTX_NAMEMAP_INDEX:
  ------------------
  |  |   99|  5.99M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  |  Branch (632:5): [True: 5.99M, False: 2.43M]
  ------------------
  633|  5.99M|        return ctx->namemap;
  634|   194k|    case OSSL_LIB_CTX_PROPERTY_DEFN_INDEX:
  ------------------
  |  |   97|   194k|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
  |  Branch (634:5): [True: 194k, False: 8.23M]
  ------------------
  635|   194k|        return ctx->property_defns;
  636|  40.4k|    case OSSL_LIB_CTX_GLOBAL_PROPERTIES:
  ------------------
  |  |  111|  40.4k|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  |  Branch (636:5): [True: 40.4k, False: 8.38M]
  ------------------
  637|  40.4k|        return ctx->global_properties;
  638|  40.7k|    case OSSL_LIB_CTX_DRBG_INDEX:
  ------------------
  |  |  100|  40.7k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
  |  Branch (638:5): [True: 40.7k, False: 8.38M]
  ------------------
  639|  40.7k|        return ctx->drbg;
  640|      0|    case OSSL_LIB_CTX_DRBG_NONCE_INDEX:
  ------------------
  |  |  101|      0|#define OSSL_LIB_CTX_DRBG_NONCE_INDEX 6
  ------------------
  |  Branch (640:5): [True: 0, False: 8.42M]
  ------------------
  641|      0|        return ctx->drbg_nonce;
  642|      0|#ifndef FIPS_MODULE
  643|      0|    case OSSL_LIB_CTX_PROVIDER_CONF_INDEX:
  ------------------
  |  |  113|      0|#define OSSL_LIB_CTX_PROVIDER_CONF_INDEX 16
  ------------------
  |  Branch (643:5): [True: 0, False: 8.42M]
  ------------------
  644|      0|        return ctx->provider_conf;
  645|      0|    case OSSL_LIB_CTX_BIO_CORE_INDEX:
  ------------------
  |  |  114|      0|#define OSSL_LIB_CTX_BIO_CORE_INDEX 17
  ------------------
  |  Branch (645:5): [True: 0, False: 8.42M]
  ------------------
  646|      0|        return ctx->bio_core;
  647|      0|    case OSSL_LIB_CTX_CHILD_PROVIDER_INDEX:
  ------------------
  |  |  115|      0|#define OSSL_LIB_CTX_CHILD_PROVIDER_INDEX 18
  ------------------
  |  Branch (647:5): [True: 0, False: 8.42M]
  ------------------
  648|      0|        return ctx->child_provider;
  649|  1.89k|    case OSSL_LIB_CTX_DECODER_STORE_INDEX:
  ------------------
  |  |  108|  1.89k|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  |  Branch (649:5): [True: 1.89k, False: 8.42M]
  ------------------
  650|  1.89k|        return ctx->decoder_store;
  651|   505k|    case OSSL_LIB_CTX_DECODER_CACHE_INDEX:
  ------------------
  |  |  117|   505k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  |  Branch (651:5): [True: 505k, False: 7.92M]
  ------------------
  652|   505k|        return ctx->decoder_cache;
  653|  1.79k|    case OSSL_LIB_CTX_ENCODER_STORE_INDEX:
  ------------------
  |  |  107|  1.79k|#define OSSL_LIB_CTX_ENCODER_STORE_INDEX 10
  ------------------
  |  Branch (653:5): [True: 1.79k, False: 8.42M]
  ------------------
  654|  1.79k|        return ctx->encoder_store;
  655|  1.79k|    case OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX:
  ------------------
  |  |  112|  1.79k|#define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX 15
  ------------------
  |  Branch (655:5): [True: 1.79k, False: 8.42M]
  ------------------
  656|  1.79k|        return ctx->store_loader_store;
  657|      0|    case OSSL_LIB_CTX_SELF_TEST_CB_INDEX:
  ------------------
  |  |  109|      0|#define OSSL_LIB_CTX_SELF_TEST_CB_INDEX 12
  ------------------
  |  Branch (657:5): [True: 0, False: 8.42M]
  ------------------
  658|      0|        return ctx->self_test_cb;
  659|      0|    case OSSL_LIB_CTX_INDICATOR_CB_INDEX:
  ------------------
  |  |  119|      0|#define OSSL_LIB_CTX_INDICATOR_CB_INDEX 22
  ------------------
  |  Branch (659:5): [True: 0, False: 8.42M]
  ------------------
  660|      0|        return ctx->indicator_cb;
  661|      0|#endif
  662|      0|#ifndef OPENSSL_NO_THREAD_POOL
  663|      0|    case OSSL_LIB_CTX_THREAD_INDEX:
  ------------------
  |  |  116|      0|#define OSSL_LIB_CTX_THREAD_INDEX 19
  ------------------
  |  Branch (663:5): [True: 0, False: 8.42M]
  ------------------
  664|      0|        return ctx->threads;
  665|      0|#endif
  666|       |
  667|       |#ifdef FIPS_MODULE
  668|       |    case OSSL_LIB_CTX_FIPS_PROV_INDEX:
  669|       |        return ctx->fips_prov;
  670|       |#endif
  671|       |
  672|  3.35k|    case OSSL_LIB_CTX_COMP_METHODS:
  ------------------
  |  |  118|  3.35k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
  |  Branch (672:5): [True: 3.35k, False: 8.42M]
  ------------------
  673|  3.35k|        return (void *)&ctx->comp_methods;
  674|       |
  675|  6.71k|    case OSSL_LIB_CTX_SSL_CONF_IMODULE:
  ------------------
  |  |  120|  6.71k|#define OSSL_LIB_CTX_SSL_CONF_IMODULE 23
  ------------------
  |  Branch (675:5): [True: 6.71k, False: 8.42M]
  ------------------
  676|  6.71k|        return (void *)ctx->ssl_imod;
  677|       |
  678|      0|    default:
  ------------------
  |  Branch (678:5): [True: 0, False: 8.42M]
  ------------------
  679|       |        return NULL;
  680|  8.42M|    }
  681|  8.42M|}
OSSL_LIB_CTX_get_data:
  684|  10.0k|{
  685|  10.0k|    return ossl_lib_ctx_get_data(ctx, index);
  686|  10.0k|}
ossl_lib_ctx_get_ex_data_global:
  689|  11.2M|{
  690|  11.2M|    ctx = ossl_lib_ctx_get_concrete(ctx);
  691|  11.2M|    if (ctx == NULL)
  ------------------
  |  Branch (691:9): [True: 0, False: 11.2M]
  ------------------
  692|      0|        return NULL;
  693|  11.2M|    return &ctx->global;
  694|  11.2M|}
ossl_lib_ctx_get_descriptor:
  697|  62.4k|{
  698|       |#ifdef FIPS_MODULE
  699|       |    return "FIPS internal library context";
  700|       |#else
  701|  62.4k|    if (ossl_lib_ctx_is_global_default(libctx))
  ------------------
  |  Branch (701:9): [True: 44.1k, False: 18.2k]
  ------------------
  702|  44.1k|        return "Global default library context";
  703|  18.2k|    if (ossl_lib_ctx_is_default(libctx))
  ------------------
  |  Branch (703:9): [True: 0, False: 18.2k]
  ------------------
  704|      0|        return "Thread-local default library context";
  705|  18.2k|    return "Non-default library context";
  706|  18.2k|#endif
  707|  18.2k|}
OSSL_LIB_CTX_get_conf_diagnostics:
  710|    809|{
  711|    809|    libctx = ossl_lib_ctx_get_concrete(libctx);
  712|    809|    if (libctx == NULL)
  ------------------
  |  Branch (712:9): [True: 0, False: 809]
  ------------------
  713|      0|        return 0;
  714|    809|    return libctx->conf_diagnostics;
  715|    809|}
context.c:context_deinit:
  387|    808|{
  388|    808|    if (ctx == NULL)
  ------------------
  |  Branch (388:9): [True: 0, False: 808]
  ------------------
  389|      0|        return 1;
  390|       |
  391|    808|    ossl_lib_ctx_detach_ssl_conf_imodule(ctx, NULL);
  392|       |
  393|    808|    ossl_ctx_thread_stop(ctx);
  394|       |
  395|    808|    context_deinit_objs(ctx);
  396|       |
  397|    808|    ossl_crypto_cleanup_all_ex_data_int(ctx);
  398|       |
  399|    808|    CRYPTO_THREAD_lock_free(ctx->lock);
  400|       |    ctx->lock = NULL;
  401|    808|    return 1;
  402|    808|}
context.c:context_deinit_objs:
  257|    808|{
  258|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  259|    808|    if (ctx->evp_method_store != NULL) {
  ------------------
  |  Branch (259:9): [True: 808, False: 0]
  ------------------
  260|    808|        ossl_method_store_free(ctx->evp_method_store);
  261|    808|        ctx->evp_method_store = NULL;
  262|    808|    }
  263|       |
  264|       |    /* P2. */
  265|    808|    if (ctx->drbg != NULL) {
  ------------------
  |  Branch (265:9): [True: 808, False: 0]
  ------------------
  266|    808|        ossl_rand_ctx_free(ctx->drbg);
  267|    808|        ctx->drbg = NULL;
  268|    808|    }
  269|       |
  270|    808|#ifndef FIPS_MODULE
  271|       |    /* P2. */
  272|    808|    if (ctx->provider_conf != NULL) {
  ------------------
  |  Branch (272:9): [True: 808, False: 0]
  ------------------
  273|    808|        ossl_prov_conf_ctx_free(ctx->provider_conf);
  274|    808|        ctx->provider_conf = NULL;
  275|    808|    }
  276|       |
  277|       |    /*
  278|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  279|       |     * provider store
  280|       |     */
  281|    808|    if (ctx->decoder_store != NULL) {
  ------------------
  |  Branch (281:9): [True: 808, False: 0]
  ------------------
  282|    808|        ossl_method_store_free(ctx->decoder_store);
  283|    808|        ctx->decoder_store = NULL;
  284|    808|    }
  285|    808|    if (ctx->decoder_cache != NULL) {
  ------------------
  |  Branch (285:9): [True: 808, False: 0]
  ------------------
  286|    808|        ossl_decoder_cache_free(ctx->decoder_cache);
  287|    808|        ctx->decoder_cache = NULL;
  288|    808|    }
  289|       |
  290|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  291|    808|    if (ctx->encoder_store != NULL) {
  ------------------
  |  Branch (291:9): [True: 808, False: 0]
  ------------------
  292|    808|        ossl_method_store_free(ctx->encoder_store);
  293|    808|        ctx->encoder_store = NULL;
  294|    808|    }
  295|       |
  296|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  297|    808|    if (ctx->store_loader_store != NULL) {
  ------------------
  |  Branch (297:9): [True: 808, False: 0]
  ------------------
  298|    808|        ossl_method_store_free(ctx->store_loader_store);
  299|    808|        ctx->store_loader_store = NULL;
  300|    808|    }
  301|    808|#endif
  302|       |
  303|       |    /* P1. Needs to be freed before the child provider data is freed */
  304|    808|    if (ctx->provider_store != NULL) {
  ------------------
  |  Branch (304:9): [True: 808, False: 0]
  ------------------
  305|    808|        ossl_provider_store_free(ctx->provider_store);
  306|    808|        ctx->provider_store = NULL;
  307|    808|    }
  308|       |
  309|       |    /* Default priority. */
  310|    808|    if (ctx->property_string_data != NULL) {
  ------------------
  |  Branch (310:9): [True: 808, False: 0]
  ------------------
  311|    808|        ossl_property_string_data_free(ctx->property_string_data);
  312|    808|        ctx->property_string_data = NULL;
  313|    808|    }
  314|       |
  315|    808|    if (ctx->namemap != NULL) {
  ------------------
  |  Branch (315:9): [True: 808, False: 0]
  ------------------
  316|    808|        ossl_stored_namemap_free(ctx->namemap);
  317|    808|        ctx->namemap = NULL;
  318|    808|    }
  319|       |
  320|    808|    if (ctx->property_defns != NULL) {
  ------------------
  |  Branch (320:9): [True: 808, False: 0]
  ------------------
  321|    808|        ossl_property_defns_free(ctx->property_defns);
  322|    808|        ctx->property_defns = NULL;
  323|    808|    }
  324|       |
  325|    808|    if (ctx->global_properties != NULL) {
  ------------------
  |  Branch (325:9): [True: 808, False: 0]
  ------------------
  326|    808|        ossl_ctx_global_properties_free(ctx->global_properties);
  327|    808|        ctx->global_properties = NULL;
  328|    808|    }
  329|       |
  330|    808|#ifndef FIPS_MODULE
  331|    808|    if (ctx->bio_core != NULL) {
  ------------------
  |  Branch (331:9): [True: 808, False: 0]
  ------------------
  332|    808|        ossl_bio_core_globals_free(ctx->bio_core);
  333|    808|        ctx->bio_core = NULL;
  334|    808|    }
  335|    808|#endif
  336|       |
  337|    808|    if (ctx->drbg_nonce != NULL) {
  ------------------
  |  Branch (337:9): [True: 808, False: 0]
  ------------------
  338|    808|        ossl_prov_drbg_nonce_ctx_free(ctx->drbg_nonce);
  339|    808|        ctx->drbg_nonce = NULL;
  340|    808|    }
  341|       |
  342|    808|#ifndef FIPS_MODULE
  343|    808|    if (ctx->indicator_cb != NULL) {
  ------------------
  |  Branch (343:9): [True: 808, False: 0]
  ------------------
  344|    808|        ossl_indicator_set_callback_free(ctx->indicator_cb);
  345|    808|        ctx->indicator_cb = NULL;
  346|    808|    }
  347|       |
  348|    808|    if (ctx->self_test_cb != NULL) {
  ------------------
  |  Branch (348:9): [True: 808, False: 0]
  ------------------
  349|    808|        ossl_self_test_set_callback_free(ctx->self_test_cb);
  350|    808|        ctx->self_test_cb = NULL;
  351|    808|    }
  352|    808|#endif
  353|       |
  354|       |#ifdef FIPS_MODULE
  355|       |    ossl_thread_event_ctx_free(ctx);
  356|       |
  357|       |    if (ctx->fips_prov != NULL) {
  358|       |        ossl_fips_prov_ossl_ctx_free(ctx->fips_prov);
  359|       |        ctx->fips_prov = NULL;
  360|       |    }
  361|       |#endif
  362|       |
  363|    808|#ifndef OPENSSL_NO_THREAD_POOL
  364|    808|    if (ctx->threads != NULL) {
  ------------------
  |  Branch (364:9): [True: 808, False: 0]
  ------------------
  365|    808|        ossl_threads_ctx_free(ctx->threads);
  366|    808|        ctx->threads = NULL;
  367|    808|    }
  368|    808|#endif
  369|       |
  370|       |    /* Low priority. */
  371|    808|#ifndef FIPS_MODULE
  372|    808|    if (ctx->child_provider != NULL) {
  ------------------
  |  Branch (372:9): [True: 808, False: 0]
  ------------------
  373|    808|        ossl_child_prov_ctx_free(ctx->child_provider);
  374|    808|        ctx->child_provider = NULL;
  375|    808|    }
  376|    808|#endif
  377|       |
  378|    808|#ifndef FIPS_MODULE
  379|    808|    if (ctx->comp_methods != NULL) {
  ------------------
  |  Branch (379:9): [True: 808, False: 0]
  ------------------
  380|    808|        ossl_free_compression_methods_int(ctx->comp_methods);
  381|       |        ctx->comp_methods = NULL;
  382|    808|    }
  383|    808|#endif
  384|    808|}
context.c:context_init:
  119|    809|{
  120|    809|    int exdata_done = 0;
  121|       |
  122|    809|    ctx->lock = CRYPTO_THREAD_lock_new();
  123|    809|    if (ctx->lock == NULL)
  ------------------
  |  Branch (123:9): [True: 0, False: 809]
  ------------------
  124|      0|        goto err;
  125|       |
  126|       |    /* Initialize ex_data. */
  127|    809|    if (!ossl_do_ex_data_init(ctx))
  ------------------
  |  Branch (127:9): [True: 0, False: 809]
  ------------------
  128|      0|        goto err;
  129|    809|    exdata_done = 1;
  130|       |
  131|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  132|    809|    ctx->evp_method_store = ossl_method_store_new(ctx);
  133|    809|    if (ctx->evp_method_store == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 809]
  ------------------
  134|      0|        goto err;
  135|    809|    OSSL_TRACE1(QUERY, "context_init: allocating store %p\n", ctx->evp_method_store);
  ------------------
  |  |  291|    809|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|    809|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  136|       |
  137|    809|#ifndef FIPS_MODULE
  138|       |    /* P2. Must be freed before the provider store is freed */
  139|    809|    ctx->provider_conf = ossl_prov_conf_ctx_new(ctx);
  140|    809|    if (ctx->provider_conf == NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 809]
  ------------------
  141|      0|        goto err;
  142|    809|#endif
  143|       |
  144|       |    /* P2. */
  145|    809|    ctx->drbg = ossl_rand_ctx_new(ctx);
  146|    809|    if (ctx->drbg == NULL)
  ------------------
  |  Branch (146:9): [True: 0, False: 809]
  ------------------
  147|      0|        goto err;
  148|       |
  149|    809|#ifndef FIPS_MODULE
  150|       |    /*
  151|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  152|       |     * provider store
  153|       |     */
  154|    809|    ctx->decoder_store = ossl_method_store_new(ctx);
  155|    809|    if (ctx->decoder_store == NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 809]
  ------------------
  156|      0|        goto err;
  157|    809|    ctx->decoder_cache = ossl_decoder_cache_new(ctx);
  158|    809|    if (ctx->decoder_cache == NULL)
  ------------------
  |  Branch (158:9): [True: 0, False: 809]
  ------------------
  159|      0|        goto err;
  160|       |
  161|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  162|    809|    ctx->encoder_store = ossl_method_store_new(ctx);
  163|    809|    if (ctx->encoder_store == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 809]
  ------------------
  164|      0|        goto err;
  165|       |
  166|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  167|    809|    ctx->store_loader_store = ossl_method_store_new(ctx);
  168|    809|    if (ctx->store_loader_store == NULL)
  ------------------
  |  Branch (168:9): [True: 0, False: 809]
  ------------------
  169|      0|        goto err;
  170|    809|#endif
  171|       |
  172|       |    /* P1. Needs to be freed before the child provider data is freed */
  173|    809|    ctx->provider_store = ossl_provider_store_new(ctx);
  174|    809|    if (ctx->provider_store == NULL)
  ------------------
  |  Branch (174:9): [True: 0, False: 809]
  ------------------
  175|      0|        goto err;
  176|       |
  177|       |    /* Default priority. */
  178|    809|    ctx->property_string_data = ossl_property_string_data_new(ctx);
  179|    809|    if (ctx->property_string_data == NULL)
  ------------------
  |  Branch (179:9): [True: 0, False: 809]
  ------------------
  180|      0|        goto err;
  181|       |
  182|    809|    ctx->namemap = ossl_stored_namemap_new(ctx);
  183|    809|    if (ctx->namemap == NULL)
  ------------------
  |  Branch (183:9): [True: 0, False: 809]
  ------------------
  184|      0|        goto err;
  185|       |
  186|    809|    ctx->property_defns = ossl_property_defns_new(ctx);
  187|    809|    if (ctx->property_defns == NULL)
  ------------------
  |  Branch (187:9): [True: 0, False: 809]
  ------------------
  188|      0|        goto err;
  189|       |
  190|    809|    ctx->global_properties = ossl_ctx_global_properties_new(ctx);
  191|    809|    if (ctx->global_properties == NULL)
  ------------------
  |  Branch (191:9): [True: 0, False: 809]
  ------------------
  192|      0|        goto err;
  193|       |
  194|    809|#ifndef FIPS_MODULE
  195|    809|    ctx->bio_core = ossl_bio_core_globals_new(ctx);
  196|    809|    if (ctx->bio_core == NULL)
  ------------------
  |  Branch (196:9): [True: 0, False: 809]
  ------------------
  197|      0|        goto err;
  198|    809|#endif
  199|       |
  200|    809|    ctx->drbg_nonce = ossl_prov_drbg_nonce_ctx_new(ctx);
  201|    809|    if (ctx->drbg_nonce == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 809]
  ------------------
  202|      0|        goto err;
  203|       |
  204|    809|#ifndef FIPS_MODULE
  205|    809|    ctx->self_test_cb = ossl_self_test_set_callback_new(ctx);
  206|    809|    if (ctx->self_test_cb == NULL)
  ------------------
  |  Branch (206:9): [True: 0, False: 809]
  ------------------
  207|      0|        goto err;
  208|    809|    ctx->indicator_cb = ossl_indicator_set_callback_new(ctx);
  209|    809|    if (ctx->indicator_cb == NULL)
  ------------------
  |  Branch (209:9): [True: 0, False: 809]
  ------------------
  210|      0|        goto err;
  211|    809|#endif
  212|       |
  213|       |#ifdef FIPS_MODULE
  214|       |    if (!ossl_thread_event_ctx_new(ctx))
  215|       |        goto err;
  216|       |
  217|       |    ctx->fips_prov = ossl_fips_prov_ossl_ctx_new(ctx);
  218|       |    if (ctx->fips_prov == NULL)
  219|       |        goto err;
  220|       |#endif
  221|       |
  222|    809|#ifndef OPENSSL_NO_THREAD_POOL
  223|    809|    ctx->threads = ossl_threads_ctx_new(ctx);
  224|    809|    if (ctx->threads == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 809]
  ------------------
  225|      0|        goto err;
  226|    809|#endif
  227|       |
  228|       |    /* Low priority. */
  229|    809|#ifndef FIPS_MODULE
  230|    809|    ctx->child_provider = ossl_child_prov_ctx_new(ctx);
  231|    809|    if (ctx->child_provider == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 809]
  ------------------
  232|      0|        goto err;
  233|    809|#endif
  234|       |
  235|       |    /* Everything depends on properties, so we also pre-initialise that */
  236|    809|    if (!ossl_property_parse_init(ctx))
  ------------------
  |  Branch (236:9): [True: 0, False: 809]
  ------------------
  237|      0|        goto err;
  238|       |
  239|    809|#ifndef FIPS_MODULE
  240|    809|    ctx->comp_methods = ossl_load_builtin_compressions();
  241|    809|#endif
  242|       |
  243|    809|    return 1;
  244|       |
  245|      0|err:
  246|      0|    context_deinit_objs(ctx);
  247|       |
  248|      0|    if (exdata_done)
  ------------------
  |  Branch (248:9): [True: 0, False: 0]
  ------------------
  249|      0|        ossl_crypto_cleanup_all_ex_data_int(ctx);
  250|       |
  251|      0|    CRYPTO_THREAD_lock_free(ctx->lock);
  252|      0|    memset(ctx, '\0', sizeof(*ctx));
  253|      0|    return 0;
  254|    809|}
context.c:default_context_do_thread_key_init:
  414|      1|{
  415|      1|    if (!CRYPTO_THREAD_init_local(&default_context_thread_local, NULL))
  ------------------
  |  Branch (415:9): [True: 0, False: 1]
  ------------------
  416|      0|        return 0;
  417|      1|    return 1;
  418|      1|}
context.c:default_context_do_init:
  421|      1|{
  422|      1|    if (!context_init(&default_context_int))
  ------------------
  |  Branch (422:9): [True: 0, False: 1]
  ------------------
  423|      0|        return 0;
  424|       |
  425|      1|    default_context_inited = 1;
  426|      1|    return 1;
  427|      1|}
context.c:get_default_context:
  458|  14.0M|{
  459|  14.0M|    OSSL_LIB_CTX *current_defctx = get_thread_default_context();
  460|       |
  461|  14.0M|    if (current_defctx == NULL && default_context_inited)
  ------------------
  |  Branch (461:9): [True: 14.0M, False: 0]
  |  Branch (461:35): [True: 14.0M, False: 0]
  ------------------
  462|  14.0M|        current_defctx = &default_context_int;
  463|  14.0M|    return current_defctx;
  464|  14.0M|}
context.c:get_thread_default_context:
  439|  14.0M|{
  440|  14.0M|    if (!RUN_ONCE(&default_context_thread_key_init, default_context_do_thread_key_init))
  ------------------
  |  |  130|  14.0M|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 14.0M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (440:9): [True: 0, False: 14.0M]
  ------------------
  441|      0|        return NULL;
  442|       |
  443|  14.0M|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|  14.0M|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 14.0M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (443:9): [True: 0, False: 14.0M]
  ------------------
  444|      0|        return NULL;
  445|       |
  446|  14.0M|    return CRYPTO_THREAD_get_local(&default_context_thread_local);
  447|  14.0M|}
context.c:check_default_context:
  467|    808|{
  468|    808|    OSSL_LIB_CTX *current_defctx = check_thread_default_context();
  469|       |
  470|    808|    if (current_defctx == NULL && default_context_inited)
  ------------------
  |  Branch (470:9): [True: 808, False: 0]
  |  Branch (470:35): [True: 808, False: 0]
  ------------------
  471|    808|        current_defctx = &default_context_int;
  472|    808|    return current_defctx;
  473|    808|}
context.c:check_thread_default_context:
  450|    808|{
  451|    808|    if (!RUN_ONCE(&default_context_thread_key_init, default_context_do_thread_key_init))
  ------------------
  |  |  130|    808|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 808, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (451:9): [True: 0, False: 808]
  ------------------
  452|      0|        return NULL;
  453|       |
  454|    808|    return CRYPTO_THREAD_get_local(&default_context_thread_local);
  455|    808|}

ossl_algorithm_do_all:
  149|  95.9k|{
  150|  95.9k|    struct algorithm_data_st cbdata = {
  151|  95.9k|        0,
  152|  95.9k|    };
  153|       |
  154|  95.9k|    cbdata.libctx = libctx;
  155|  95.9k|    cbdata.operation_id = operation_id;
  156|  95.9k|    cbdata.pre = pre;
  157|  95.9k|    cbdata.reserve_store = reserve_store;
  158|  95.9k|    cbdata.fn = fn;
  159|  95.9k|    cbdata.unreserve_store = unreserve_store;
  160|  95.9k|    cbdata.post = post;
  161|  95.9k|    cbdata.data = data;
  162|       |
  163|  95.9k|    if (provider == NULL) {
  ------------------
  |  Branch (163:9): [True: 94.7k, False: 1.19k]
  ------------------
  164|  94.7k|        ossl_provider_doall_activated(libctx, algorithm_do_this, &cbdata);
  165|  94.7k|    } else {
  166|  1.19k|        OSSL_LIB_CTX *libctx2 = ossl_provider_libctx(provider);
  167|       |
  168|       |        /*
  169|       |         * If a provider is given, its library context MUST match the library
  170|       |         * context we're passed.  If this turns out not to be true, there is
  171|       |         * a programming error in the functions up the call stack.
  172|       |         */
  173|  1.19k|        if (!ossl_assert(ossl_lib_ctx_get_concrete(libctx)
  ------------------
  |  |   52|  1.19k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.19k|    __FILE__, __LINE__)
  ------------------
  |  Branch (173:13): [True: 0, False: 1.19k]
  ------------------
  174|  1.19k|                == ossl_lib_ctx_get_concrete(libctx2)))
  175|      0|            return;
  176|       |
  177|  1.19k|        cbdata.libctx = libctx2;
  178|  1.19k|        algorithm_do_this(provider, &cbdata);
  179|  1.19k|    }
  180|  95.9k|}
ossl_algorithm_get1_first_name:
  183|   193k|{
  184|   193k|    const char *first_name_end = NULL;
  185|   193k|    size_t first_name_len = 0;
  186|   193k|    char *ret;
  187|       |
  188|   193k|    if (algo->algorithm_names == NULL)
  ------------------
  |  Branch (188:9): [True: 0, False: 193k]
  ------------------
  189|      0|        return NULL;
  190|       |
  191|   193k|    first_name_end = strchr(algo->algorithm_names, ':');
  192|   193k|    if (first_name_end == NULL)
  ------------------
  |  Branch (192:9): [True: 60.3k, False: 133k]
  ------------------
  193|  60.3k|        first_name_len = strlen(algo->algorithm_names);
  194|   133k|    else
  195|   133k|        first_name_len = first_name_end - algo->algorithm_names;
  196|       |
  197|   193k|    ret = OPENSSL_strndup(algo->algorithm_names, first_name_len);
  ------------------
  |  |  138|   193k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  198|   193k|    return ret;
  199|   193k|}
core_algorithm.c:algorithm_do_this:
  103|   159k|{
  104|   159k|    struct algorithm_data_st *data = cbdata;
  105|   159k|    int first_operation = 1;
  106|   159k|    int last_operation = OSSL_OP__HIGHEST;
  ------------------
  |  |  299|   159k|#define OSSL_OP__HIGHEST 22
  ------------------
  107|   159k|    int cur_operation;
  108|   159k|    int ok = 1;
  109|       |
  110|   159k|    if (data->operation_id != 0)
  ------------------
  |  Branch (110:9): [True: 159k, False: 0]
  ------------------
  111|   159k|        first_operation = last_operation = data->operation_id;
  112|       |
  113|   159k|    for (cur_operation = first_operation;
  114|   318k|        cur_operation <= last_operation;
  ------------------
  |  Branch (114:9): [True: 159k, False: 159k]
  ------------------
  115|   159k|        cur_operation++) {
  116|   159k|        int no_store = 0; /* Assume caching is ok */
  117|   159k|        const OSSL_ALGORITHM *map = NULL;
  118|   159k|        int ret = 0;
  119|       |
  120|   159k|        map = ossl_provider_query_operation(provider, cur_operation,
  121|   159k|            &no_store);
  122|   159k|        ret = algorithm_do_map(provider, map, cur_operation, no_store, data);
  123|   159k|        ossl_provider_unquery_operation(provider, cur_operation, map);
  124|       |
  125|   159k|        if (ret < 0)
  ------------------
  |  Branch (125:13): [True: 0, False: 159k]
  ------------------
  126|       |            /* Hard error, bail out immediately! */
  127|      0|            return 0;
  128|       |
  129|       |        /* If post-condition not fulfilled, set general failure */
  130|   159k|        if (!ret)
  ------------------
  |  Branch (130:13): [True: 0, False: 159k]
  ------------------
  131|      0|            ok = 0;
  132|   159k|    }
  133|       |
  134|   159k|    return ok;
  135|   159k|}
core_algorithm.c:algorithm_do_map:
   44|   159k|{
   45|   159k|    struct algorithm_data_st *data = cbdata;
   46|   159k|    int ret = 0;
   47|       |
   48|   159k|    if (!data->reserve_store(no_store, data->data))
  ------------------
  |  Branch (48:9): [True: 0, False: 159k]
  ------------------
   49|       |        /* Error, bail out! */
   50|      0|        return -1;
   51|       |
   52|       |    /* Do we fulfill pre-conditions? */
   53|   159k|    if (data->pre == NULL) {
  ------------------
  |  Branch (53:9): [True: 0, False: 159k]
  ------------------
   54|       |        /* If there is no pre-condition function, assume "yes" */
   55|      0|        ret = 1;
   56|   159k|    } else if (!data->pre(provider, cur_operation, no_store, data->data,
  ------------------
  |  Branch (56:16): [True: 0, False: 159k]
  ------------------
   57|   159k|                   &ret)) {
   58|       |        /* Error, bail out! */
   59|      0|        ret = -1;
   60|      0|        goto end;
   61|      0|    }
   62|       |
   63|       |    /*
   64|       |     * If pre-condition not fulfilled don't add this set of implementations,
   65|       |     * but do continue with the next.  This simply means that another thread
   66|       |     * got to it first.
   67|       |     */
   68|   159k|    if (ret == 0) {
  ------------------
  |  Branch (68:9): [True: 150k, False: 9.32k]
  ------------------
   69|   150k|        ret = 1;
   70|   150k|        goto end;
   71|   150k|    }
   72|       |
   73|  9.32k|    if (map != NULL) {
  ------------------
  |  Branch (73:9): [True: 4.69k, False: 4.62k]
  ------------------
   74|  4.69k|        const OSSL_ALGORITHM *thismap;
   75|       |
   76|   198k|        for (thismap = map; thismap->algorithm_names != NULL; thismap++)
  ------------------
  |  Branch (76:29): [True: 193k, False: 4.69k]
  ------------------
   77|   193k|            data->fn(provider, thismap, no_store, data->data);
   78|  4.69k|    }
   79|       |
   80|       |    /* Do we fulfill post-conditions? */
   81|  9.32k|    if (data->post == NULL) {
  ------------------
  |  Branch (81:9): [True: 0, False: 9.32k]
  ------------------
   82|       |        /* If there is no post-condition function, assume "yes" */
   83|      0|        ret = 1;
   84|  9.32k|    } else if (!data->post(provider, cur_operation, no_store, data->data,
  ------------------
  |  Branch (84:16): [True: 0, False: 9.32k]
  ------------------
   85|  9.32k|                   &ret)) {
   86|       |        /* Error, bail out! */
   87|      0|        ret = -1;
   88|      0|    }
   89|       |
   90|   159k|end:
   91|   159k|    data->unreserve_store(data->data);
   92|       |
   93|   159k|    return ret;
   94|  9.32k|}

ossl_method_construct:
  137|  95.9k|{
  138|  95.9k|    void *method = NULL;
  139|  95.9k|    OSSL_PROVIDER *provider = provider_rw != NULL ? *provider_rw : NULL;
  ------------------
  |  Branch (139:31): [True: 95.9k, False: 0]
  ------------------
  140|  95.9k|    struct construct_data_st cbdata;
  141|       |
  142|       |    /*
  143|       |     * We might be tempted to try to look into the method store without
  144|       |     * constructing to see if we can find our method there already.
  145|       |     * Unfortunately that does not work well if the query contains
  146|       |     * optional properties as newly loaded providers can match them better.
  147|       |     * We trust that ossl_method_construct_precondition() and
  148|       |     * ossl_method_construct_postcondition() make sure that the
  149|       |     * ossl_algorithm_do_all() does very little when methods from
  150|       |     * a provider have already been constructed.
  151|       |     */
  152|       |
  153|  95.9k|    cbdata.store = NULL;
  154|  95.9k|    cbdata.force_store = force_store;
  155|  95.9k|    cbdata.mcm = mcm;
  156|  95.9k|    cbdata.mcm_data = mcm_data;
  157|  95.9k|    ossl_algorithm_do_all(libctx, operation_id, provider,
  158|  95.9k|        ossl_method_construct_precondition,
  159|  95.9k|        ossl_method_construct_reserve_store,
  160|  95.9k|        ossl_method_construct_this,
  161|  95.9k|        ossl_method_construct_unreserve_store,
  162|  95.9k|        ossl_method_construct_postcondition,
  163|  95.9k|        &cbdata);
  164|       |
  165|       |    /* If there is a temporary store, try there first */
  166|  95.9k|    if (cbdata.store != NULL)
  ------------------
  |  Branch (166:9): [True: 0, False: 95.9k]
  ------------------
  167|      0|        method = mcm->get(cbdata.store, (const OSSL_PROVIDER **)provider_rw,
  168|      0|            mcm_data);
  169|       |
  170|       |    /* If no method was found yet, try the global store */
  171|  95.9k|    if (method == NULL)
  ------------------
  |  Branch (171:9): [True: 95.9k, False: 0]
  ------------------
  172|  95.9k|        method = mcm->get(NULL, (const OSSL_PROVIDER **)provider_rw, mcm_data);
  173|       |
  174|  95.9k|    return method;
  175|  95.9k|}
core_fetch.c:ossl_method_construct_precondition:
   63|   159k|{
   64|   159k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|   159k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   159k|    __FILE__, __LINE__)
  ------------------
  |  Branch (64:9): [True: 0, False: 159k]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|       |
   69|       |    /* Assume that no bits are set */
   70|   159k|    *result = 0;
   71|       |
   72|       |    /* No flag bits for temporary stores */
   73|   159k|    if (!is_temporary_method_store(no_store, cbdata)
  ------------------
  |  Branch (73:9): [True: 159k, False: 0]
  ------------------
   74|   159k|        && !ossl_provider_test_operation_bit(provider, operation_id, result))
  ------------------
  |  Branch (74:12): [True: 0, False: 159k]
  ------------------
   75|      0|        return 0;
   76|       |
   77|       |    /*
   78|       |     * The result we get tells if methods have already been constructed.
   79|       |     * However, we want to tell whether construction should happen (true)
   80|       |     * or not (false), which is the opposite of what we got.
   81|       |     */
   82|   159k|    *result = !*result;
   83|       |
   84|   159k|    return 1;
   85|   159k|}
core_fetch.c:is_temporary_method_store:
   29|   328k|{
   30|   328k|    struct construct_data_st *data = cbdata;
   31|       |
   32|   328k|    return no_store && !data->force_store;
  ------------------
  |  Branch (32:12): [True: 0, False: 328k]
  |  Branch (32:24): [True: 0, False: 0]
  ------------------
   33|   328k|}
core_fetch.c:ossl_method_construct_reserve_store:
   36|   159k|{
   37|   159k|    struct construct_data_st *data = cbdata;
   38|       |
   39|   159k|    if (is_temporary_method_store(no_store, data) && data->store == NULL) {
  ------------------
  |  Branch (39:9): [True: 0, False: 159k]
  |  Branch (39:54): [True: 0, False: 0]
  ------------------
   40|       |        /*
   41|       |         * If we have been told not to store the method "permanently", we
   42|       |         * ask for a temporary store, and store the method there.
   43|       |         * The owner of |data->mcm| is completely responsible for managing
   44|       |         * that temporary store.
   45|       |         */
   46|      0|        if ((data->store = data->mcm->get_tmp_store(data->mcm_data)) == NULL)
  ------------------
  |  Branch (46:13): [True: 0, False: 0]
  ------------------
   47|      0|            return 0;
   48|      0|    }
   49|       |
   50|   159k|    return data->mcm->lock_store(data->store, data->mcm_data);
   51|   159k|}
core_fetch.c:ossl_method_construct_this:
  106|   193k|{
  107|   193k|    struct construct_data_st *data = cbdata;
  108|   193k|    void *method = NULL;
  109|       |
  110|   193k|    if ((method = data->mcm->construct(algo, provider, data->mcm_data))
  ------------------
  |  Branch (110:9): [True: 0, False: 193k]
  ------------------
  111|   193k|        == NULL)
  112|      0|        return;
  113|       |
  114|   193k|    OSSL_TRACE2(QUERY,
  ------------------
  |  |  293|   193k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|   193k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  115|   193k|        "ossl_method_construct_this: putting an algo to the store %p with no_store %d\n",
  116|   193k|        (void *)data->store, no_store);
  117|       |    /*
  118|       |     * Note regarding putting the method in stores:
  119|       |     *
  120|       |     * we don't need to care if it actually got in or not here.
  121|       |     * If it didn't get in, it will simply not be available when
  122|       |     * ossl_method_construct() tries to get it from the store.
  123|       |     *
  124|       |     * It is *expected* that the put function increments the refcnt
  125|       |     * of the passed method.
  126|       |     */
  127|   193k|    data->mcm->put(no_store ? data->store : NULL, method, provider, algo->algorithm_names,
  ------------------
  |  Branch (127:20): [True: 0, False: 193k]
  ------------------
  128|   193k|        algo->property_definition, data->mcm_data);
  129|       |
  130|       |    /* refcnt-- because we're dropping the reference */
  131|   193k|    data->mcm->destruct(method, data->mcm_data);
  132|   193k|}
core_fetch.c:ossl_method_construct_unreserve_store:
   54|   159k|{
   55|   159k|    struct construct_data_st *data = cbdata;
   56|       |
   57|   159k|    return data->mcm->unlock_store(data->store, data->mcm_data);
   58|   159k|}
core_fetch.c:ossl_method_construct_postcondition:
   90|  9.32k|{
   91|  9.32k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|  9.32k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  9.32k|    __FILE__, __LINE__)
  ------------------
  |  Branch (91:9): [True: 0, False: 9.32k]
  ------------------
   92|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   93|      0|        return 0;
   94|      0|    }
   95|       |
   96|  9.32k|    *result = 1;
   97|       |
   98|       |    /* No flag bits for temporary stores */
   99|  9.32k|    return is_temporary_method_store(no_store, cbdata)
  ------------------
  |  Branch (99:12): [True: 0, False: 9.32k]
  ------------------
  100|  9.32k|        || ossl_provider_set_operation_bit(provider, operation_id);
  ------------------
  |  Branch (100:12): [True: 9.32k, False: 0]
  ------------------
  101|  9.32k|}

ossl_stored_namemap_new:
   58|    809|{
   59|    809|    OSSL_NAMEMAP *namemap = ossl_namemap_new(libctx);
   60|       |
   61|    809|    if (namemap != NULL)
  ------------------
  |  Branch (61:9): [True: 809, False: 0]
  ------------------
   62|    809|        namemap->stored = 1;
   63|       |
   64|    809|    return namemap;
   65|    809|}
ossl_stored_namemap_free:
   68|    808|{
   69|    808|    OSSL_NAMEMAP *namemap = vnamemap;
   70|       |
   71|    808|    if (namemap != NULL) {
  ------------------
  |  Branch (71:9): [True: 808, False: 0]
  ------------------
   72|       |        /* Pretend it isn't stored, or ossl_namemap_free() will do nothing */
   73|    808|        namemap->stored = 0;
   74|    808|        ossl_namemap_free(namemap);
   75|    808|    }
   76|    808|}
ossl_namemap_empty:
   84|  5.99M|{
   85|       |#ifdef TSAN_REQUIRES_LOCKING
   86|       |    /* No TSAN support */
   87|       |    int rv;
   88|       |
   89|       |    if (namemap == NULL)
   90|       |        return 1;
   91|       |
   92|       |    if (!CRYPTO_THREAD_read_lock(namemap->lock))
   93|       |        return -1;
   94|       |    rv = namemap->max_number == 0;
   95|       |    CRYPTO_THREAD_unlock(namemap->lock);
   96|       |    return rv;
   97|       |#else
   98|       |    /* Have TSAN support */
   99|  5.99M|    return namemap == NULL || tsan_load(&namemap->max_number) == 0;
  ------------------
  |  |   61|  5.99M|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (99:12): [True: 0, False: 5.99M]
  |  Branch (99:31): [True: 709, False: 5.99M]
  ------------------
  100|  5.99M|#endif
  101|  5.99M|}
ossl_namemap_doall_names:
  111|   655k|{
  112|   655k|    int i;
  113|   655k|    NAMES *names;
  114|       |
  115|   655k|    if (namemap == NULL || number <= 0)
  ------------------
  |  Branch (115:9): [True: 0, False: 655k]
  |  Branch (115:28): [True: 0, False: 655k]
  ------------------
  116|      0|        return 0;
  117|       |
  118|       |    /*
  119|       |     * We duplicate the NAMES stack under a read lock. Subsequently we call
  120|       |     * the user function, so that we're not holding the read lock when in user
  121|       |     * code. This could lead to deadlocks.
  122|       |     */
  123|   655k|    if (!CRYPTO_THREAD_read_lock(namemap->lock))
  ------------------
  |  Branch (123:9): [True: 0, False: 655k]
  ------------------
  124|      0|        return 0;
  125|       |
  126|   655k|    names = sk_NAMES_value(namemap->numnames, number - 1);
  127|   655k|    if (names != NULL)
  ------------------
  |  Branch (127:9): [True: 655k, False: 0]
  ------------------
  128|   655k|        names = sk_OPENSSL_STRING_dup(names);
  ------------------
  |  |  278|   655k|#define sk_OPENSSL_STRING_dup(sk) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_STRING_sk_type(sk)))
  ------------------
  129|       |
  130|   655k|    CRYPTO_THREAD_unlock(namemap->lock);
  131|       |
  132|   655k|    if (names == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 655k]
  ------------------
  133|      0|        return 0;
  134|       |
  135|  2.83M|    for (i = 0; i < sk_OPENSSL_STRING_num(names); i++)
  ------------------
  |  |  256|  2.83M|#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
  ------------------
  |  Branch (135:17): [True: 2.17M, False: 655k]
  ------------------
  136|  2.17M|        fn(sk_OPENSSL_STRING_value(names, i), data);
  ------------------
  |  |  257|  2.17M|#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
  ------------------
  137|       |
  138|   655k|    sk_OPENSSL_STRING_free(names);
  ------------------
  |  |  262|   655k|#define sk_OPENSSL_STRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_STRING_sk_type(sk))
  ------------------
  139|   655k|    return i > 0;
  140|   655k|}
ossl_namemap_name2num:
  143|  6.71M|{
  144|  6.71M|    int number = 0;
  145|  6.71M|    HT_VALUE *val;
  146|  6.71M|    NAMENUM_KEY key;
  147|       |
  148|  6.71M|#ifndef FIPS_MODULE
  149|  6.71M|    if (namemap == NULL)
  ------------------
  |  Branch (149:9): [True: 0, False: 6.71M]
  ------------------
  150|      0|        namemap = ossl_namemap_stored(NULL);
  151|  6.71M|#endif
  152|       |
  153|  6.71M|    if (namemap == NULL || name == NULL)
  ------------------
  |  Branch (153:9): [True: 0, False: 6.71M]
  |  Branch (153:28): [True: 2, False: 6.71M]
  ------------------
  154|      2|        return 0;
  155|       |
  156|  6.71M|    HT_INIT_RAW_KEY(&key);
  ------------------
  |  |  130|  6.71M|    do {                               \
  |  |  131|  6.71M|        HT_INIT_KEY((key));            \
  |  |  ------------------
  |  |  |  |  112|  6.71M|    do {                                                                                           \
  |  |  |  |  113|  6.71M|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  |  |  114|  6.71M|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  |  |  115|  6.71M|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  |  |  116|  6.71M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (116:14): [Folded, False: 6.71M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|  6.71M|        (key)->key_header.keysize = 0; \
  |  |  133|  6.71M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (133:14): [Folded, False: 6.71M]
  |  |  ------------------
  ------------------
  157|  6.71M|    HT_COPY_RAW_KEY_CASE(TO_HT_KEY(&key), name, strlen(name));
  ------------------
  |  |  164|  6.71M|    do {                                                                               \
  |  |  165|  6.71M|        size_t tmplen = (size_t)(len);                                                 \
  |  |  166|  6.71M|        if (tmplen > (key)->bufsize - (key)->keysize)                                  \
  |  |  ------------------
  |  |  |  Branch (166:13): [True: 0, False: 6.71M]
  |  |  ------------------
  |  |  167|  6.71M|            tmplen = (key)->bufsize - (key)->keysize;                                  \
  |  |  168|  6.71M|        ossl_ht_strcase((key), (char *)&((key)->keybuf[(key)->keysize]), buf, tmplen); \
  |  |  169|  6.71M|        (key)->keysize += tmplen;                                                      \
  |  |  170|  6.71M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (170:14): [Folded, False: 6.71M]
  |  |  ------------------
  ------------------
  158|       |
  159|  6.71M|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  237|  6.71M|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  160|       |
  161|  6.71M|    if (val != NULL)
  ------------------
  |  Branch (161:9): [True: 6.01M, False: 702k]
  ------------------
  162|       |        /* We store a (small) int directly instead of a pointer to it. */
  163|  6.01M|        number = (int)(intptr_t)val->value;
  164|       |
  165|  6.71M|    return number;
  166|  6.71M|}
ossl_namemap_name2num_n:
  170|   233k|{
  171|   233k|    int number = 0;
  172|   233k|    HT_VALUE *val;
  173|   233k|    NAMENUM_KEY key;
  174|       |
  175|   233k|#ifndef FIPS_MODULE
  176|   233k|    if (namemap == NULL)
  ------------------
  |  Branch (176:9): [True: 0, False: 233k]
  ------------------
  177|      0|        namemap = ossl_namemap_stored(NULL);
  178|   233k|#endif
  179|       |
  180|   233k|    if (namemap == NULL)
  ------------------
  |  Branch (180:9): [True: 0, False: 233k]
  ------------------
  181|      0|        return 0;
  182|       |
  183|   233k|    if (name_len > NAMEMAP_NAME_LEN)
  ------------------
  |  |   19|   233k|#define NAMEMAP_NAME_LEN 64
  ------------------
  |  Branch (183:9): [True: 0, False: 233k]
  ------------------
  184|      0|        name_len = NAMEMAP_NAME_LEN;
  ------------------
  |  |   19|      0|#define NAMEMAP_NAME_LEN 64
  ------------------
  185|       |
  186|   233k|    HT_INIT_RAW_KEY(&key);
  ------------------
  |  |  130|   233k|    do {                               \
  |  |  131|   233k|        HT_INIT_KEY((key));            \
  |  |  ------------------
  |  |  |  |  112|   233k|    do {                                                                                           \
  |  |  |  |  113|   233k|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  |  |  114|   233k|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  |  |  115|   233k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  |  |  116|   233k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (116:14): [Folded, False: 233k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|   233k|        (key)->key_header.keysize = 0; \
  |  |  133|   233k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (133:14): [Folded, False: 233k]
  |  |  ------------------
  ------------------
  187|   233k|    HT_COPY_RAW_KEY_CASE(TO_HT_KEY(&key), name, name_len);
  ------------------
  |  |  164|   233k|    do {                                                                               \
  |  |  165|   233k|        size_t tmplen = (size_t)(len);                                                 \
  |  |  166|   233k|        if (tmplen > (key)->bufsize - (key)->keysize)                                  \
  |  |  ------------------
  |  |  |  Branch (166:13): [True: 0, False: 233k]
  |  |  ------------------
  |  |  167|   233k|            tmplen = (key)->bufsize - (key)->keysize;                                  \
  |  |  168|   233k|        ossl_ht_strcase((key), (char *)&((key)->keybuf[(key)->keysize]), buf, tmplen); \
  |  |  169|   233k|        (key)->keysize += tmplen;                                                      \
  |  |  170|   233k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (170:14): [Folded, False: 233k]
  |  |  ------------------
  ------------------
  188|       |
  189|   233k|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  237|   233k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  190|       |
  191|   233k|    if (val != NULL)
  ------------------
  |  Branch (191:9): [True: 194k, False: 38.1k]
  ------------------
  192|       |        /* We store a (small) int directly instead of a pointer to it. */
  193|   194k|        number = (int)(intptr_t)val->value;
  194|       |
  195|   233k|    return number;
  196|   233k|}
ossl_namemap_add_name:
  296|   460k|{
  297|   460k|    int tmp_number;
  298|       |
  299|   460k|#ifndef FIPS_MODULE
  300|   460k|    if (namemap == NULL)
  ------------------
  |  Branch (300:9): [True: 0, False: 460k]
  ------------------
  301|      0|        namemap = ossl_namemap_stored(NULL);
  302|   460k|#endif
  303|       |
  304|   460k|    if (name == NULL || *name == 0 || namemap == NULL)
  ------------------
  |  Branch (304:9): [True: 0, False: 460k]
  |  Branch (304:25): [True: 0, False: 460k]
  |  Branch (304:39): [True: 0, False: 460k]
  ------------------
  305|      0|        return 0;
  306|       |
  307|   460k|    if (!CRYPTO_THREAD_write_lock(namemap->lock))
  ------------------
  |  Branch (307:9): [True: 0, False: 460k]
  ------------------
  308|      0|        return 0;
  309|   460k|    tmp_number = namemap_add_name(namemap, number, name);
  310|   460k|    CRYPTO_THREAD_unlock(namemap->lock);
  311|   460k|    return tmp_number;
  312|   460k|}
ossl_namemap_add_names:
  316|   193k|{
  317|   193k|    char *tmp, *p, *q, *endp;
  318|       |
  319|       |    /* Check that we have a namemap */
  320|   193k|    if (!ossl_assert(namemap != NULL)) {
  ------------------
  |  |   52|   193k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   193k|    __FILE__, __LINE__)
  ------------------
  |  Branch (320:9): [True: 0, False: 193k]
  ------------------
  321|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  322|      0|        return 0;
  323|      0|    }
  324|       |
  325|   193k|    if ((tmp = OPENSSL_strdup(names)) == NULL)
  ------------------
  |  |  136|   193k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (325:9): [True: 0, False: 193k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|   193k|    if (!CRYPTO_THREAD_write_lock(namemap->lock)) {
  ------------------
  |  Branch (328:9): [True: 0, False: 193k]
  ------------------
  329|      0|        OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  330|      0|        return 0;
  331|      0|    }
  332|       |    /*
  333|       |     * Check that no name is an empty string, and that all names have at
  334|       |     * most one numeric identity together.
  335|       |     */
  336|   641k|    for (p = tmp; *p != '\0'; p = q) {
  ------------------
  |  Branch (336:19): [True: 448k, False: 193k]
  ------------------
  337|   448k|        int this_number;
  338|   448k|        size_t l;
  339|       |
  340|   448k|        if ((q = strchr(p, separator)) == NULL) {
  ------------------
  |  Branch (340:13): [True: 193k, False: 254k]
  ------------------
  341|   193k|            l = strlen(p); /* offset to \0 */
  342|   193k|            q = p + l;
  343|   254k|        } else {
  344|   254k|            l = q - p; /* offset to the next separator */
  345|   254k|            *q++ = '\0';
  346|   254k|        }
  347|       |
  348|   448k|        if (*p == '\0') {
  ------------------
  |  Branch (348:13): [True: 0, False: 448k]
  ------------------
  349|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_BAD_ALGORITHM_NAME);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  350|      0|            number = 0;
  351|      0|            goto end;
  352|      0|        }
  353|       |
  354|   448k|        this_number = ossl_namemap_name2num(namemap, p);
  355|       |
  356|   448k|        if (number == 0) {
  ------------------
  |  Branch (356:13): [True: 316k, False: 131k]
  ------------------
  357|   316k|            number = this_number;
  358|   316k|        } else if (this_number != 0 && this_number != number) {
  ------------------
  |  Branch (358:20): [True: 114k, False: 17.7k]
  |  Branch (358:40): [True: 0, False: 114k]
  ------------------
  359|      0|            ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |   23|      0|#define CRYPTO_R_CONFLICTING_NAMES 118
  ------------------
  360|      0|                "\"%s\" has an existing different identity %d (from \"%s\")",
  361|      0|                p, this_number, names);
  362|      0|            number = 0;
  363|      0|            goto end;
  364|      0|        }
  365|   448k|    }
  366|   193k|    endp = p;
  367|       |
  368|       |    /* Now that we have checked, register all names */
  369|   641k|    for (p = tmp; p < endp; p = q) {
  ------------------
  |  Branch (369:19): [True: 448k, False: 193k]
  ------------------
  370|   448k|        int this_number;
  371|       |
  372|   448k|        q = p + strlen(p) + 1;
  373|       |
  374|   448k|        this_number = namemap_add_name(namemap, number, p);
  375|   448k|        if (number == 0) {
  ------------------
  |  Branch (375:13): [True: 98.6k, False: 349k]
  ------------------
  376|  98.6k|            number = this_number;
  377|   349k|        } else if (this_number != number) {
  ------------------
  |  Branch (377:20): [True: 0, False: 349k]
  ------------------
  378|      0|            ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  379|      0|                "Got number %d when expecting %d",
  380|      0|                this_number, number);
  381|      0|            number = 0;
  382|      0|            goto end;
  383|      0|        }
  384|   448k|    }
  385|       |
  386|   193k|end:
  387|   193k|    CRYPTO_THREAD_unlock(namemap->lock);
  388|   193k|    OPENSSL_free(tmp);
  ------------------
  |  |  132|   193k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|   193k|    return number;
  390|   193k|}
ossl_namemap_stored:
  490|  5.99M|{
  491|  5.99M|#ifndef FIPS_MODULE
  492|  5.99M|    int nms;
  493|  5.99M|#endif
  494|  5.99M|    OSSL_NAMEMAP *namemap = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_NAMEMAP_INDEX);
  ------------------
  |  |   99|  5.99M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  495|       |
  496|  5.99M|    if (namemap == NULL)
  ------------------
  |  Branch (496:9): [True: 0, False: 5.99M]
  ------------------
  497|      0|        return NULL;
  498|       |
  499|  5.99M|#ifndef FIPS_MODULE
  500|  5.99M|    nms = ossl_namemap_empty(namemap);
  501|  5.99M|    if (nms < 0) {
  ------------------
  |  Branch (501:9): [True: 0, False: 5.99M]
  ------------------
  502|       |        /*
  503|       |         * Could not get lock to make the count, so maybe internal objects
  504|       |         * weren't added. This seems safest.
  505|       |         */
  506|      0|        return NULL;
  507|      0|    }
  508|  5.99M|    if (nms == 1) {
  ------------------
  |  Branch (508:9): [True: 709, False: 5.99M]
  ------------------
  509|    709|        int num;
  510|       |
  511|       |        /* Before pilfering, we make sure the legacy database is populated */
  512|    709|        OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  507|    709|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
  513|    709|                | OPENSSL_INIT_ADD_ALL_DIGESTS,
  ------------------
  |  |  508|    709|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  514|    709|            NULL);
  515|       |
  516|    709|        OBJ_NAME_do_all(OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    709|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
  517|    709|            get_legacy_cipher_names, namemap);
  518|    709|        OBJ_NAME_do_all(OBJ_NAME_TYPE_MD_METH,
  ------------------
  |  |   25|    709|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  519|    709|            get_legacy_md_names, namemap);
  520|       |
  521|       |        /*
  522|       |         * Some old providers (<= 3.5) may not have the rsassaPSS alias which
  523|       |         * may cause problems in some cases. We add it manually here
  524|       |         */
  525|    709|        num = ossl_namemap_add_name(namemap, 0, "RSA-PSS");
  526|    709|        if (num != 0) {
  ------------------
  |  Branch (526:13): [True: 709, False: 0]
  ------------------
  527|    709|            ossl_namemap_add_name(namemap, num, "rsassaPss");
  528|       |            /* Add other RSA-PSS aliases as well */
  529|    709|            ossl_namemap_add_name(namemap, num, "RSASSA-PSS");
  530|    709|            ossl_namemap_add_name(namemap, num, "1.2.840.113549.1.1.10");
  531|    709|        }
  532|    709|#ifndef OPENSSL_NO_DEPRECATED_3_6
  533|    709|        {
  534|    709|            int i, end;
  535|       |
  536|       |            /* We also pilfer data from the legacy EVP_PKEY_ASN1_METHODs */
  537|  11.3k|            for (i = 0, end = evp_pkey_asn1_get_count(); i < end; i++)
  ------------------
  |  Branch (537:58): [True: 10.6k, False: 709]
  ------------------
  538|  10.6k|                get_legacy_pkey_meth_names(evp_pkey_asn1_get0(i), namemap);
  539|    709|        }
  540|    709|#endif
  541|    709|    }
  542|  5.99M|#endif
  543|       |
  544|  5.99M|    return namemap;
  545|  5.99M|}
ossl_namemap_new:
  548|    809|{
  549|    809|    OSSL_NAMEMAP *namemap;
  550|    809|    HT_CONFIG htconf = { NULL, NULL, NULL, NAMEMAP_HT_BUCKETS, 1, 1, 0 };
  ------------------
  |  |   17|    809|#define NAMEMAP_HT_BUCKETS 512
  ------------------
  551|       |
  552|    809|    htconf.ctx = libctx;
  553|       |
  554|    809|    if ((namemap = OPENSSL_zalloc(sizeof(*namemap))) == NULL)
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (554:9): [True: 0, False: 809]
  ------------------
  555|      0|        goto err;
  556|       |
  557|    809|    if ((namemap->lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (557:9): [True: 0, False: 809]
  ------------------
  558|      0|        goto err;
  559|       |
  560|    809|    if ((namemap->namenum_ht = ossl_ht_new(&htconf)) == NULL)
  ------------------
  |  Branch (560:9): [True: 0, False: 809]
  ------------------
  561|      0|        goto err;
  562|       |
  563|    809|    if ((namemap->numnames = sk_NAMES_new_null()) == NULL)
  ------------------
  |  Branch (563:9): [True: 0, False: 809]
  ------------------
  564|      0|        goto err;
  565|       |
  566|    809|    return namemap;
  567|       |
  568|      0|err:
  569|      0|    ossl_namemap_free(namemap);
  570|       |    return NULL;
  571|    809|}
ossl_namemap_free:
  574|    808|{
  575|    808|    if (namemap == NULL || namemap->stored)
  ------------------
  |  Branch (575:9): [True: 0, False: 808]
  |  Branch (575:28): [True: 0, False: 808]
  ------------------
  576|      0|        return;
  577|       |
  578|    808|    sk_NAMES_pop_free(namemap->numnames, names_free);
  579|       |
  580|    808|    ossl_ht_free(namemap->namenum_ht);
  581|       |
  582|    808|    CRYPTO_THREAD_lock_free(namemap->lock);
  583|    808|    OPENSSL_free(namemap);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  584|    808|}
core_namemap.c:namemap_add_name:
  263|   908k|{
  264|   908k|    int ret;
  265|   908k|    HT_VALUE val = { 0 };
  266|   908k|    NAMENUM_KEY key;
  267|       |
  268|       |    /* If it already exists, we don't add it */
  269|   908k|    if ((ret = ossl_namemap_name2num(namemap, name)) != 0)
  ------------------
  |  Branch (269:9): [True: 484k, False: 423k]
  ------------------
  270|   484k|        return ret;
  271|       |
  272|   423k|    if ((number = numname_insert(namemap, number, name)) == 0)
  ------------------
  |  Branch (272:9): [True: 0, False: 423k]
  ------------------
  273|      0|        return 0;
  274|       |
  275|       |    /* Using tsan_store alone here is safe since we're under lock */
  276|   423k|    tsan_store(&namemap->max_number, number);
  ------------------
  |  |   62|   423k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  277|       |
  278|   423k|    HT_INIT_RAW_KEY(&key);
  ------------------
  |  |  130|   423k|    do {                               \
  |  |  131|   423k|        HT_INIT_KEY((key));            \
  |  |  ------------------
  |  |  |  |  112|   423k|    do {                                                                                           \
  |  |  |  |  113|   423k|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  |  |  114|   423k|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  |  |  115|   423k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  |  |  116|   423k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (116:14): [Folded, False: 423k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|   423k|        (key)->key_header.keysize = 0; \
  |  |  133|   423k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (133:14): [Folded, False: 423k]
  |  |  ------------------
  ------------------
  279|   423k|    HT_COPY_RAW_KEY_CASE(TO_HT_KEY(&key), name, strlen(name));
  ------------------
  |  |  164|   423k|    do {                                                                               \
  |  |  165|   423k|        size_t tmplen = (size_t)(len);                                                 \
  |  |  166|   423k|        if (tmplen > (key)->bufsize - (key)->keysize)                                  \
  |  |  ------------------
  |  |  |  Branch (166:13): [True: 0, False: 423k]
  |  |  ------------------
  |  |  167|   423k|            tmplen = (key)->bufsize - (key)->keysize;                                  \
  |  |  168|   423k|        ossl_ht_strcase((key), (char *)&((key)->keybuf[(key)->keysize]), buf, tmplen); \
  |  |  169|   423k|        (key)->keysize += tmplen;                                                      \
  |  |  170|   423k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (170:14): [Folded, False: 423k]
  |  |  ------------------
  ------------------
  280|       |
  281|   423k|    val.value = (void *)(intptr_t)number;
  282|   423k|    ret = ossl_ht_insert(namemap->namenum_ht, TO_HT_KEY(&key), &val, NULL);
  ------------------
  |  |  237|   423k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  283|   423k|    if (ret <= 0) {
  ------------------
  |  Branch (283:9): [True: 0, False: 423k]
  ------------------
  284|       |        /*
  285|       |         * We either got an allocation failure (INTERNAL_ERROR), or
  286|       |         * hit too many conflicts in the table (TOO_MANY_NAMES)
  287|       |         */
  288|      0|        ERR_raise(ERR_LIB_CRYPTO, (ret < 0) ? CRYPTO_R_TOO_MANY_NAMES : ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  |  |  |  Branch (357:55): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  289|      0|        return 0;
  290|      0|    }
  291|   423k|    return number;
  292|   423k|}
core_namemap.c:numname_insert:
  222|   423k|{
  223|   423k|    NAMES *names;
  224|   423k|    char *tmpname;
  225|       |
  226|   423k|    if (number > 0) {
  ------------------
  |  Branch (226:9): [True: 240k, False: 183k]
  ------------------
  227|   240k|        names = sk_NAMES_value(namemap->numnames, number - 1);
  228|   240k|        if (!ossl_assert(names != NULL)) {
  ------------------
  |  |   52|   240k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   240k|    __FILE__, __LINE__)
  ------------------
  |  Branch (228:13): [True: 0, False: 240k]
  ------------------
  229|       |            /* cannot happen */
  230|      0|            return 0;
  231|      0|        }
  232|   240k|    } else {
  233|       |        /* a completely new entry */
  234|   183k|        names = sk_OPENSSL_STRING_new_null();
  ------------------
  |  |  259|   183k|#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OPENSSL_STRING_freefunc_thunk))
  ------------------
  235|   183k|        if (names == NULL)
  ------------------
  |  Branch (235:13): [True: 0, False: 183k]
  ------------------
  236|      0|            return 0;
  237|   183k|    }
  238|       |
  239|   423k|    if ((tmpname = OPENSSL_strdup(name)) == NULL)
  ------------------
  |  |  136|   423k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (239:9): [True: 0, False: 423k]
  ------------------
  240|      0|        goto err;
  241|       |
  242|   423k|    if (!sk_OPENSSL_STRING_push(names, tmpname))
  ------------------
  |  |  266|   423k|#define sk_OPENSSL_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
  ------------------
  |  Branch (242:9): [True: 0, False: 423k]
  ------------------
  243|      0|        goto err;
  244|   423k|    tmpname = NULL;
  245|       |
  246|   423k|    if (number <= 0) {
  ------------------
  |  Branch (246:9): [True: 183k, False: 240k]
  ------------------
  247|   183k|        if (!sk_NAMES_push(namemap->numnames, names))
  ------------------
  |  Branch (247:13): [True: 0, False: 183k]
  ------------------
  248|      0|            goto err;
  249|   183k|        number = sk_NAMES_num(namemap->numnames);
  250|   183k|    }
  251|   423k|    return number;
  252|       |
  253|      0|err:
  254|      0|    if (number <= 0)
  ------------------
  |  Branch (254:9): [True: 0, False: 0]
  ------------------
  255|      0|        sk_OPENSSL_STRING_pop_free(names, name_string_free);
  ------------------
  |  |  270|      0|#define sk_OPENSSL_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_freefunc_type(freefunc))
  ------------------
  256|      0|    OPENSSL_free(tmpname);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  257|      0|    return 0;
  258|   423k|}
core_namemap.c:name_string_free:
   46|   422k|{
   47|   422k|    OPENSSL_free(name);
  ------------------
  |  |  132|   422k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|   422k|}
core_namemap.c:get_legacy_cipher_names:
  427|   129k|{
  428|   129k|    const EVP_CIPHER *cipher = (void *)OBJ_NAME_get(on->name, on->type);
  429|       |
  430|   129k|    if (cipher != NULL)
  ------------------
  |  Branch (430:9): [True: 129k, False: 0]
  ------------------
  431|   129k|        get_legacy_evp_names(NID_undef, EVP_CIPHER_get_type(cipher), NULL, arg);
  ------------------
  |  |   18|   129k|#define NID_undef                       0
  ------------------
  432|   129k|}
core_namemap.c:get_legacy_evp_names:
  403|   182k|{
  404|   182k|    int num = 0;
  405|   182k|    ASN1_OBJECT *obj;
  406|       |
  407|   182k|    if (base_nid != NID_undef) {
  ------------------
  |  |   18|   182k|#define NID_undef                       0
  ------------------
  |  Branch (407:9): [True: 2.83k, False: 180k]
  ------------------
  408|  2.83k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(base_nid));
  409|  2.83k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(base_nid));
  410|  2.83k|    }
  411|       |
  412|   182k|    if (nid != NID_undef) {
  ------------------
  |  |   18|   182k|#define NID_undef                       0
  ------------------
  |  Branch (412:9): [True: 148k, False: 34.0k]
  ------------------
  413|   148k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(nid));
  414|   148k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(nid));
  415|   148k|        if ((obj = OBJ_nid2obj(nid)) != NULL) {
  ------------------
  |  Branch (415:13): [True: 148k, False: 0]
  ------------------
  416|   148k|            char txtoid[OSSL_MAX_NAME_SIZE];
  417|       |
  418|   148k|            if (OBJ_obj2txt(txtoid, sizeof(txtoid), obj, 1) > 0)
  ------------------
  |  Branch (418:17): [True: 146k, False: 2.83k]
  ------------------
  419|   146k|                num = ossl_namemap_add_name(arg, num, txtoid);
  420|   148k|        }
  421|   148k|    }
  422|   182k|    if (pem_name != NULL)
  ------------------
  |  Branch (422:9): [True: 7.79k, False: 175k]
  ------------------
  423|  7.79k|        num = ossl_namemap_add_name(arg, num, pem_name);
  424|   182k|}
core_namemap.c:get_legacy_md_names:
  435|  41.8k|{
  436|  41.8k|    const EVP_MD *md = (void *)OBJ_NAME_get(on->name, on->type);
  437|       |
  438|  41.8k|    if (md != NULL)
  ------------------
  |  Branch (438:9): [True: 41.8k, False: 0]
  ------------------
  439|  41.8k|        get_legacy_evp_names(NID_undef, EVP_MD_get_type(md), NULL, arg);
  ------------------
  |  |   18|  41.8k|#define NID_undef                       0
  ------------------
  440|  41.8k|}
core_namemap.c:get_legacy_pkey_meth_names:
  445|  10.6k|{
  446|  10.6k|    int nid = 0, base_nid = 0, flags = 0;
  447|  10.6k|    const char *pem_name = NULL;
  448|       |
  449|  10.6k|    evp_pkey_asn1_get0_info(&nid, &base_nid, &flags, NULL, &pem_name, ameth);
  450|  10.6k|    if (nid != NID_undef) {
  ------------------
  |  |   18|  10.6k|#define NID_undef                       0
  ------------------
  |  Branch (450:9): [True: 10.6k, False: 0]
  ------------------
  451|  10.6k|        if ((flags & ASN1_PKEY_ALIAS) == 0) {
  ------------------
  |  | 1501|  10.6k|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (451:13): [True: 7.09k, False: 3.54k]
  ------------------
  452|  7.09k|            switch (nid) {
  453|    709|            case EVP_PKEY_DHX:
  ------------------
  |  |   72|    709|#define EVP_PKEY_DHX NID_dhpublicnumber
  |  |  ------------------
  |  |  |  | 5526|    709|#define NID_dhpublicnumber              920
  |  |  ------------------
  ------------------
  |  Branch (453:13): [True: 709, False: 6.38k]
  ------------------
  454|       |                /* We know that the name "DHX" is used too */
  455|    709|                get_legacy_evp_names(0, nid, "DHX", arg);
  456|       |                /* FALLTHRU */
  457|  7.09k|            default:
  ------------------
  |  Branch (457:13): [True: 6.38k, False: 709]
  ------------------
  458|  7.09k|                get_legacy_evp_names(0, nid, pem_name, arg);
  459|  7.09k|            }
  460|  7.09k|        } else {
  461|       |            /*
  462|       |             * Treat aliases carefully, some of them are undesirable, or
  463|       |             * should not be treated as such for providers.
  464|       |             */
  465|       |
  466|  3.54k|            switch (nid) {
  467|    709|            case EVP_PKEY_SM2:
  ------------------
  |  |   74|    709|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|    709|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (467:13): [True: 709, False: 2.83k]
  ------------------
  468|       |                /*
  469|       |                 * SM2 is a separate keytype with providers, not an alias for
  470|       |                 * EC.
  471|       |                 */
  472|    709|                get_legacy_evp_names(0, nid, pem_name, arg);
  473|    709|                break;
  474|  2.83k|            default:
  ------------------
  |  Branch (474:13): [True: 2.83k, False: 709]
  ------------------
  475|       |                /* Use the short name of the base nid as the common reference */
  476|  2.83k|                get_legacy_evp_names(base_nid, nid, pem_name, arg);
  477|  3.54k|            }
  478|  3.54k|        }
  479|  10.6k|    }
  480|  10.6k|}
core_namemap.c:names_free:
   51|   182k|{
   52|   182k|    sk_OPENSSL_STRING_pop_free(n, name_string_free);
  ------------------
  |  |  270|   182k|#define sk_OPENSSL_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_freefunc_type(freefunc))
  ------------------
   53|   182k|}

ossl_err_load_CRYPTO_strings:
   83|      1|{
   84|      1|#ifndef OPENSSL_NO_ERR
   85|      1|    if (ERR_reason_error_string(CRYPTO_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (85:9): [True: 1, False: 0]
  ------------------
   86|      1|        ERR_load_strings_const(CRYPTO_str_reasons);
   87|      1|#endif
   88|      1|    return 1;
   89|      1|}

OPENSSL_cpuid_setup:
   95|      3|{
   96|      3|    static int trigger = 0;
   97|      3|    IA32CAP OPENSSL_ia32_cpuid(unsigned int *);
   98|      3|    IA32CAP vec;
   99|      3|    const variant_char *env;
  100|      3|    int index = 2;
  101|       |
  102|      3|    if (trigger)
  ------------------
  |  Branch (102:9): [True: 1, False: 2]
  ------------------
  103|      1|        return;
  104|       |
  105|      2|    trigger = 1;
  106|      2|    if ((env = ossl_getenv("OPENSSL_ia32cap")) != NULL) {
  ------------------
  |  |   45|      2|#define ossl_getenv getenv
  ------------------
  |  Branch (106:9): [True: 0, False: 2]
  ------------------
  107|      0|        int off = (env[0] == '~') ? 1 : 0;
  ------------------
  |  Branch (107:19): [True: 0, False: 0]
  ------------------
  108|       |
  109|      0|        vec = ossl_strtouint64(env + off);
  110|       |
  111|      0|        if (off) {
  ------------------
  |  Branch (111:13): [True: 0, False: 0]
  ------------------
  112|      0|            IA32CAP mask = vec;
  113|      0|            vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P) & ~mask;
  114|      0|            if (mask & (1 << 24)) {
  ------------------
  |  Branch (114:17): [True: 0, False: 0]
  ------------------
  115|       |                /*
  116|       |                 * User disables FXSR bit, mask even other capabilities
  117|       |                 * that operate exclusively on XMM, so we don't have to
  118|       |                 * double-check all the time. We mask PCLMULQDQ, AMD XOP,
  119|       |                 * AES-NI and AVX. Formally speaking we don't have to
  120|       |                 * do it in x86_64 case, but we can safely assume that
  121|       |                 * x86_64 users won't actually flip this flag.
  122|       |                 */
  123|      0|                vec &= ~((IA32CAP)(1 << 1 | 1 << 11 | 1 << 25 | 1 << 28) << 32);
  124|      0|            }
  125|      0|        } else if (env[0] == ':') {
  ------------------
  |  Branch (125:20): [True: 0, False: 0]
  ------------------
  126|      0|            vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P);
  127|      0|        }
  128|       |
  129|       |        /* Processed indexes 0, 1 */
  130|      0|        if ((env = ossl_strchr(env, ':')) != NULL)
  ------------------
  |  Branch (130:13): [True: 0, False: 0]
  ------------------
  131|      0|            env++;
  132|      0|        for (; index < OPENSSL_IA32CAP_P_MAX_INDEXES; index += 2) {
  ------------------
  |  |   37|      0|#define OPENSSL_IA32CAP_P_MAX_INDEXES 10
  ------------------
  |  Branch (132:16): [True: 0, False: 0]
  ------------------
  133|      0|            if ((env != NULL) && (env[0] != '\0')) {
  ------------------
  |  Branch (133:17): [True: 0, False: 0]
  |  Branch (133:34): [True: 0, False: 0]
  ------------------
  134|       |                /* if env[0] == ':' current index is skipped */
  135|      0|                if (env[0] != ':') {
  ------------------
  |  Branch (135:21): [True: 0, False: 0]
  ------------------
  136|      0|                    IA32CAP vecx;
  137|       |
  138|      0|                    off = (env[0] == '~') ? 1 : 0;
  ------------------
  |  Branch (138:27): [True: 0, False: 0]
  ------------------
  139|      0|                    vecx = ossl_strtouint64(env + off);
  140|      0|                    if (off) {
  ------------------
  |  Branch (140:25): [True: 0, False: 0]
  ------------------
  141|      0|                        OPENSSL_ia32cap_P[index] &= ~(unsigned int)vecx;
  142|      0|                        OPENSSL_ia32cap_P[index + 1] &= ~(unsigned int)(vecx >> 32);
  143|      0|                    } else {
  144|      0|                        OPENSSL_ia32cap_P[index] = (unsigned int)vecx;
  145|      0|                        OPENSSL_ia32cap_P[index + 1] = (unsigned int)(vecx >> 32);
  146|      0|                    }
  147|      0|                }
  148|       |                /* skip delimiter */
  149|      0|                if ((env = ossl_strchr(env, ':')) != NULL)
  ------------------
  |  Branch (149:21): [True: 0, False: 0]
  ------------------
  150|      0|                    env++;
  151|      0|            } else { /* zeroize the next two indexes */
  152|      0|                OPENSSL_ia32cap_P[index] = 0;
  153|      0|                OPENSSL_ia32cap_P[index + 1] = 0;
  154|      0|            }
  155|      0|        }
  156|       |
  157|       |        /* If AVX10 is disabled, zero out its detailed cap bits */
  158|      0|        if (!(OPENSSL_ia32cap_P[6] & (1 << 19)))
  ------------------
  |  Branch (158:13): [True: 0, False: 0]
  ------------------
  159|      0|            OPENSSL_ia32cap_P[9] = 0;
  160|      2|    } else {
  161|      2|        vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P);
  162|      2|    }
  163|       |
  164|       |    /*
  165|       |     * |(1<<10) sets a reserved bit to signal that variable
  166|       |     * was initialized already... This is to avoid interference
  167|       |     * with cpuid snippets in ELF .init segment.
  168|       |     */
  169|      2|    OPENSSL_ia32cap_P[0] = (unsigned int)vec | (1 << 10);
  170|      2|    OPENSSL_ia32cap_P[1] = (unsigned int)(vec >> 32);
  171|      2|}

ossl_err_load_CRMF_strings:
   80|      1|{
   81|      1|#ifndef OPENSSL_NO_ERR
   82|      1|    if (ERR_reason_error_string(CRMF_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (82:9): [True: 1, False: 0]
  ------------------
   83|      1|        ERR_load_strings_const(CRMF_str_reasons);
   84|      1|#endif
   85|      1|    return 1;
   86|      1|}

ossl_err_load_CT_strings:
   52|      1|{
   53|      1|#ifndef OPENSSL_NO_ERR
   54|      1|    if (ERR_reason_error_string(CT_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (54:9): [True: 1, False: 0]
  ------------------
   55|      1|        ERR_load_strings_const(CT_str_reasons);
   56|      1|#endif
   57|      1|    return 1;
   58|      1|}

CTLOG_STORE_new_ex:
  101|  3.47k|{
  102|  3.47k|    CTLOG_STORE *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  3.47k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|       |
  104|  3.47k|    if (ret == NULL)
  ------------------
  |  Branch (104:9): [True: 0, False: 3.47k]
  ------------------
  105|      0|        return NULL;
  106|       |
  107|  3.47k|    ret->libctx = libctx;
  108|  3.47k|    if (propq != NULL) {
  ------------------
  |  Branch (108:9): [True: 677, False: 2.79k]
  ------------------
  109|    677|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|    677|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|    677|        if (ret->propq == NULL)
  ------------------
  |  Branch (110:13): [True: 0, False: 677]
  ------------------
  111|      0|            goto err;
  112|    677|    }
  113|       |
  114|  3.47k|    ret->logs = sk_CTLOG_new_null();
  ------------------
  |  |   74|  3.47k|#define sk_CTLOG_new_null() ((STACK_OF(CTLOG) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_CTLOG_freefunc_thunk))
  ------------------
  115|  3.47k|    if (ret->logs == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 3.47k]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_CT, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|       |
  120|  3.47k|    return ret;
  121|      0|err:
  122|      0|    CTLOG_STORE_free(ret);
  123|       |    return NULL;
  124|  3.47k|}
CTLOG_STORE_free:
  132|  3.47k|{
  133|  3.47k|    if (store != NULL) {
  ------------------
  |  Branch (133:9): [True: 3.47k, False: 0]
  ------------------
  134|  3.47k|        OPENSSL_free(store->propq);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  135|  3.47k|        sk_CTLOG_pop_free(store->logs, CTLOG_free);
  ------------------
  |  |   85|  3.47k|#define sk_CTLOG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_freefunc_type(freefunc))
  ------------------
  136|  3.47k|        OPENSSL_free(store);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|  3.47k|    }
  138|  3.47k|}

SCT_LIST_free:
   47|  2.58k|{
   48|  2.58k|    sk_SCT_pop_free(a, SCT_free);
  ------------------
  |  |   59|  2.58k|#define sk_SCT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SCT_sk_type(sk), ossl_check_SCT_freefunc_type(freefunc))
  ------------------
   49|  2.58k|}

ossl_ctype_check:
  253|  71.5M|{
  254|  71.5M|    const int max = sizeof(ctype_char_map) / sizeof(*ctype_char_map);
  255|  71.5M|    const int a = ossl_toascii(c);
  ------------------
  |  |   56|  71.5M|#define ossl_toascii(c) (c)
  ------------------
  256|       |
  257|  71.5M|    return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
  ------------------
  |  Branch (257:12): [True: 71.5M, False: 10.3k]
  |  Branch (257:22): [True: 71.5M, False: 0]
  |  Branch (257:33): [True: 7.14M, False: 64.4M]
  ------------------
  258|  71.5M|}
ossl_isdigit:
  270|   632k|{
  271|   632k|    int a = ossl_toascii(c);
  ------------------
  |  |   56|   632k|#define ossl_toascii(c) (c)
  ------------------
  272|       |
  273|   632k|    return ASCII_IS_DIGIT(a);
  ------------------
  |  |  265|   632k|#define ASCII_IS_DIGIT(c) (c >= 0x30 && c <= 0x39)
  |  |  ------------------
  |  |  |  Branch (265:28): [True: 619k, False: 13.0k]
  |  |  |  Branch (265:41): [True: 600k, False: 18.5k]
  |  |  ------------------
  ------------------
  274|   632k|}
ossl_tolower:
  297|   215M|{
  298|   215M|    int a = ossl_toascii(c);
  ------------------
  |  |   56|   215M|#define ossl_toascii(c) (c)
  ------------------
  299|       |
  300|   215M|    return ASCII_IS_UPPER(a) ? c ^ case_change : c;
  ------------------
  |  |  266|   215M|#define ASCII_IS_UPPER(c) (c >= 0x41 && c <= 0x5A)
  |  |  ------------------
  |  |  |  Branch (266:28): [True: 193M, False: 21.2M]
  |  |  |  Branch (266:41): [True: 83.9M, False: 109M]
  |  |  ------------------
  ------------------
  301|   215M|}

OpenSSL_version:
   75|  4.17k|{
   76|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
   77|       |    /* Cannot really fail but we would return empty strings anyway */
   78|       |    (void)RUN_ONCE(&version_strings_once, version_strings_setup);
   79|       |#endif
   80|       |
   81|  4.17k|    switch (t) {
  ------------------
  |  Branch (81:13): [True: 4.17k, False: 0]
  ------------------
   82|      0|    case OPENSSL_VERSION:
  ------------------
  |  |  184|      0|#define OPENSSL_VERSION 0
  ------------------
  |  Branch (82:5): [True: 0, False: 4.17k]
  ------------------
   83|      0|        return OPENSSL_VERSION_TEXT;
  ------------------
  |  |  110|      0|# define OPENSSL_VERSION_TEXT "OpenSSL 4.0.1 9 Jun 2026"
  ------------------
   84|  4.17k|    case OPENSSL_VERSION_STRING:
  ------------------
  |  |  190|  4.17k|#define OPENSSL_VERSION_STRING 6
  ------------------
  |  Branch (84:5): [True: 4.17k, False: 0]
  ------------------
   85|  4.17k|        return OPENSSL_VERSION_STR;
  ------------------
  |  |   90|  4.17k|# define OPENSSL_VERSION_STR "4.0.1"
  ------------------
   86|      0|    case OPENSSL_FULL_VERSION_STRING:
  ------------------
  |  |  191|      0|#define OPENSSL_FULL_VERSION_STRING 7
  ------------------
  |  Branch (86:5): [True: 0, False: 4.17k]
  ------------------
   87|      0|        return OPENSSL_FULL_VERSION_STR;
  ------------------
  |  |   93|      0|# define OPENSSL_FULL_VERSION_STR "4.0.1"
  ------------------
   88|      0|    case OPENSSL_BUILT_ON:
  ------------------
  |  |  186|      0|#define OPENSSL_BUILT_ON 2
  ------------------
  |  Branch (88:5): [True: 0, False: 4.17k]
  ------------------
   89|      0|        return DATE;
  ------------------
  |  |   14|      0|#define DATE "built on: Thu Jul 30 06:59:32 2026 UTC"
  ------------------
   90|      0|    case OPENSSL_CFLAGS:
  ------------------
  |  |  185|      0|#define OPENSSL_CFLAGS 1
  ------------------
  |  Branch (90:5): [True: 0, False: 4.17k]
  ------------------
   91|      0|        return compiler_flags;
   92|      0|    case OPENSSL_PLATFORM:
  ------------------
  |  |  187|      0|#define OPENSSL_PLATFORM 3
  ------------------
  |  Branch (92:5): [True: 0, False: 4.17k]
  ------------------
   93|      0|        return PLATFORM;
  ------------------
  |  |   13|      0|#define PLATFORM "platform: linux-x86_64-clang"
  ------------------
   94|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
   95|       |    case OPENSSL_DIR:
   96|       |        return openssldir;
   97|       |    case OPENSSL_MODULES_DIR:
   98|       |        return modulesdir;
   99|       |#else
  100|      0|    case OPENSSL_DIR:
  ------------------
  |  |  188|      0|#define OPENSSL_DIR 4
  ------------------
  |  Branch (100:5): [True: 0, False: 4.17k]
  ------------------
  101|      0|#ifdef OPENSSLDIR
  102|      0|        return "OPENSSLDIR: \"" OPENSSLDIR "\"";
  103|       |#else
  104|       |        return "OPENSSLDIR: N/A";
  105|       |#endif
  106|      0|    case OPENSSL_MODULES_DIR:
  ------------------
  |  |  192|      0|#define OPENSSL_MODULES_DIR 8
  ------------------
  |  Branch (106:5): [True: 0, False: 4.17k]
  ------------------
  107|      0|#ifdef MODULESDIR
  108|      0|        return "MODULESDIR: \"" MODULESDIR "\"";
  109|       |#else
  110|       |        return "MODULESDIR: N/A";
  111|       |#endif
  112|      0|#endif
  113|      0|    case OPENSSL_CPU_INFO:
  ------------------
  |  |  193|      0|#define OPENSSL_CPU_INFO 9
  ------------------
  |  Branch (113:5): [True: 0, False: 4.17k]
  ------------------
  114|      0|        if (OPENSSL_info(OPENSSL_INFO_CPU_SETTINGS) != NULL)
  ------------------
  |  |  208|      0|#define OPENSSL_INFO_CPU_SETTINGS 1008
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            return ossl_cpu_info_str;
  116|      0|        else
  117|      0|            return "CPUINFO: N/A";
  118|      0|    case OPENSSL_WINCTX:
  ------------------
  |  |  194|      0|#define OPENSSL_WINCTX 10
  ------------------
  |  Branch (118:5): [True: 0, False: 4.17k]
  ------------------
  119|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
  120|       |        return OSSL_WINCTX_STRING;
  121|       |#else
  122|      0|        return "OSSL_WINCTX: Undefined";
  123|      0|#endif
  124|      0|    case OPENSSL_ENGINES_DIR:
  ------------------
  |  |  189|      0|#define OPENSSL_ENGINES_DIR 5
  ------------------
  |  Branch (124:5): [True: 0, False: 4.17k]
  ------------------
  125|      0|        return "ENGINESDIR: N/A";
  126|  4.17k|    }
  127|      0|    return "not available";
  128|  4.17k|}

ossl_get_modulesdir:
  153|     92|{
  154|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
  155|       |    if (!RUN_ONCE(&defaults_setup_init, do_defaults_setup))
  156|       |        return NULL;
  157|       |    return (const char *)modulesdirptr;
  158|       |#else
  159|     92|    return MODULESDIR;
  160|     92|#endif
  161|     92|}

ossl_dh_params_todata:
   94|    630|{
   95|    630|    const long l = DH_get_length(dh);
   96|       |
   97|    630|    if (!ossl_ffc_params_todata(ossl_dh_get0_params(dh), bld, pp))
  ------------------
  |  Branch (97:9): [True: 0, False: 630]
  ------------------
   98|      0|        return 0;
   99|    630|    if (l > 0
  ------------------
  |  Branch (99:9): [True: 0, False: 630]
  ------------------
  100|      0|        && !ossl_param_build_set_long(bld, privlen, OSSL_PKEY_PARAM_DH_PRIV_LEN, l))
  ------------------
  |  |  381|      0|# define OSSL_PKEY_PARAM_DH_PRIV_LEN "priv_len"
  ------------------
  |  Branch (100:12): [True: 0, False: 0]
  ------------------
  101|      0|        return 0;
  102|    630|    return 1;
  103|    630|}
ossl_dh_key_todata:
  107|    630|{
  108|    630|    const BIGNUM *priv = NULL, *pub = NULL;
  109|       |
  110|    630|    if (dh == NULL)
  ------------------
  |  Branch (110:9): [True: 0, False: 630]
  ------------------
  111|      0|        return 0;
  112|       |
  113|    630|    DH_get0_key(dh, &pub, &priv);
  114|    630|    if (priv != NULL
  ------------------
  |  Branch (114:9): [True: 630, False: 0]
  ------------------
  115|    630|        && include_private
  ------------------
  |  Branch (115:12): [True: 630, False: 0]
  ------------------
  116|    630|        && !ossl_param_build_set_bn(bld, privkey, OSSL_PKEY_PARAM_PRIV_KEY, priv))
  ------------------
  |  |  448|    630|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  |  Branch (116:12): [True: 0, False: 630]
  ------------------
  117|      0|        return 0;
  118|    630|    if (pub != NULL
  ------------------
  |  Branch (118:9): [True: 630, False: 0]
  ------------------
  119|    630|        && !ossl_param_build_set_bn(bld, pubkey, OSSL_PKEY_PARAM_PUB_KEY, pub))
  ------------------
  |  |  450|    630|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  |  Branch (119:12): [True: 0, False: 630]
  ------------------
  120|      0|        return 0;
  121|       |
  122|    630|    return 1;
  123|    630|}

ossl_err_load_DH_strings:
   68|      1|{
   69|      1|#ifndef OPENSSL_NO_ERR
   70|      1|    if (ERR_reason_error_string(DH_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (70:9): [True: 1, False: 0]
  ------------------
   71|      1|        ERR_load_strings_const(DH_str_reasons);
   72|      1|#endif
   73|      1|    return 1;
   74|      1|}

ossl_dh_new_by_nid_ex:
   41|    210|{
   42|    210|    const DH_NAMED_GROUP *group;
   43|       |
   44|    210|    if ((group = ossl_ffc_uid_to_dh_named_group(nid)) != NULL)
  ------------------
  |  Branch (44:9): [True: 210, False: 0]
  ------------------
   45|    210|        return dh_param_init(libctx, group);
   46|       |
   47|    210|    ERR_raise(ERR_LIB_DH, DH_R_INVALID_PARAMETER_NID);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   48|       |    return NULL;
   49|    210|}
DH_get_nid:
   95|    210|{
   96|    210|    if (dh == NULL)
  ------------------
  |  Branch (96:9): [True: 0, False: 210]
  ------------------
   97|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
   98|       |
   99|    210|    return dh->params.nid;
  100|    210|}
dh_group_params.c:dh_param_init:
   28|    210|{
   29|    210|    DH *dh = ossl_dh_new_ex(libctx);
   30|       |
   31|    210|    if (dh == NULL)
  ------------------
  |  Branch (31:9): [True: 0, False: 210]
  ------------------
   32|      0|        return NULL;
   33|       |
   34|    210|    ossl_ffc_named_group_set(&dh->params, group);
   35|    210|    dh->params.nid = ossl_ffc_named_group_get_uid(group);
   36|    210|    dh->dirty_cnt++;
   37|    210|    return dh;
   38|    210|}

DH_get_default_method:
  185|    210|{
  186|    210|    return default_DH_method;
  187|    210|}
DH_generate_key:
  221|    210|{
  222|       |#ifdef FIPS_MODULE
  223|       |    return generate_key(dh);
  224|       |#else
  225|    210|    return dh->meth->generate_key(dh);
  226|    210|#endif
  227|    210|}
ossl_dh_generate_public_key:
  231|    210|{
  232|    210|    int ret = 0;
  233|    210|    BIGNUM *prk = BN_new();
  234|    210|    BN_MONT_CTX *mont = NULL;
  235|       |
  236|    210|    if (prk == NULL)
  ------------------
  |  Branch (236:9): [True: 0, False: 210]
  ------------------
  237|      0|        return 0;
  238|       |
  239|    210|    if (dh->flags & DH_FLAG_CACHE_MONT_P) {
  ------------------
  |  |  108|    210|#define DH_FLAG_CACHE_MONT_P 0x01
  ------------------
  |  Branch (239:9): [True: 210, False: 0]
  ------------------
  240|       |        /*
  241|       |         * We take the input DH as const, but we lie, because in some cases we
  242|       |         * want to get a hold of its Montgomery context.
  243|       |         *
  244|       |         * We cast to remove the const qualifier in this case, it should be
  245|       |         * fine...
  246|       |         */
  247|    210|        BN_MONT_CTX **pmont = (BN_MONT_CTX **)&dh->method_mont_p;
  248|       |
  249|    210|        mont = BN_MONT_CTX_set_locked(pmont, dh->lock, dh->params.p, ctx);
  250|    210|        if (mont == NULL)
  ------------------
  |  Branch (250:13): [True: 0, False: 210]
  ------------------
  251|      0|            goto err;
  252|    210|    }
  253|    210|    BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|    210|#define BN_FLG_CONSTTIME 0x04
  ------------------
  254|       |
  255|       |    /* pub_key = g^priv_key mod p */
  256|    210|    if (!dh->meth->bn_mod_exp(dh, pub_key, dh->params.g, prk, dh->params.p,
  ------------------
  |  Branch (256:9): [True: 0, False: 210]
  ------------------
  257|    210|            ctx, mont))
  258|      0|        goto err;
  259|    210|    ret = 1;
  260|    210|err:
  261|    210|    BN_clear_free(prk);
  262|    210|    return ret;
  263|    210|}
ossl_dh_key2buf:
  419|    420|{
  420|    420|    const BIGNUM *pubkey;
  421|    420|    unsigned char *pbuf = NULL;
  422|    420|    const BIGNUM *p;
  423|    420|    int p_size;
  424|       |
  425|    420|    DH_get0_pqg(dh, &p, NULL, NULL);
  426|    420|    DH_get0_key(dh, &pubkey, NULL);
  427|    420|    if (p == NULL || pubkey == NULL
  ------------------
  |  Branch (427:9): [True: 0, False: 420]
  |  Branch (427:22): [True: 0, False: 420]
  ------------------
  428|    420|        || (p_size = BN_num_bytes(p)) == 0
  ------------------
  |  |  188|    420|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  |  Branch (428:12): [True: 0, False: 420]
  ------------------
  429|    420|        || BN_num_bytes(pubkey) == 0) {
  ------------------
  |  |  188|    420|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  |  Branch (429:12): [True: 0, False: 420]
  ------------------
  430|      0|        ERR_raise(ERR_LIB_DH, DH_R_INVALID_PUBKEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  431|      0|        return 0;
  432|      0|    }
  433|    420|    if (pbuf_out != NULL && (alloc || *pbuf_out != NULL)) {
  ------------------
  |  Branch (433:9): [True: 420, False: 0]
  |  Branch (433:30): [True: 0, False: 420]
  |  Branch (433:39): [True: 210, False: 210]
  ------------------
  434|    210|        if (!alloc) {
  ------------------
  |  Branch (434:13): [True: 210, False: 0]
  ------------------
  435|    210|            if (size >= (size_t)p_size)
  ------------------
  |  Branch (435:17): [True: 210, False: 0]
  ------------------
  436|    210|                pbuf = *pbuf_out;
  437|    210|            if (pbuf == NULL)
  ------------------
  |  Branch (437:17): [True: 0, False: 210]
  ------------------
  438|    210|                ERR_raise(ERR_LIB_DH, DH_R_INVALID_SIZE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  439|    210|        } else {
  440|      0|            pbuf = OPENSSL_malloc(p_size);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  441|      0|        }
  442|       |
  443|       |        /* Errors raised above */
  444|    210|        if (pbuf == NULL)
  ------------------
  |  Branch (444:13): [True: 0, False: 210]
  ------------------
  445|      0|            return 0;
  446|       |        /*
  447|       |         * As per Section 4.2.8.1 of RFC 8446 left pad public
  448|       |         * key with zeros to the size of p
  449|       |         */
  450|    210|        if (BN_bn2binpad(pubkey, pbuf, p_size) < 0) {
  ------------------
  |  Branch (450:13): [True: 0, False: 210]
  ------------------
  451|      0|            if (alloc)
  ------------------
  |  Branch (451:17): [True: 0, False: 0]
  ------------------
  452|      0|                OPENSSL_free(pbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  453|      0|            ERR_raise(ERR_LIB_DH, DH_R_BN_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  454|      0|            return 0;
  455|      0|        }
  456|    210|        *pbuf_out = pbuf;
  457|    210|    }
  458|    420|    return p_size;
  459|    420|}
dh_key.c:generate_key:
  266|    210|{
  267|    210|    int ok = 0;
  268|    210|    int generate_new_key = 0;
  269|    210|#ifndef FIPS_MODULE
  270|    210|    int l;
  271|    210|#endif
  272|    210|    BN_CTX *ctx = NULL;
  273|    210|    BIGNUM *pub_key = NULL, *priv_key = NULL;
  274|       |
  275|    210|    if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) {
  ------------------
  |  |   99|    210|#define OPENSSL_DH_MAX_MODULUS_BITS 10000
  ------------------
  |  Branch (275:9): [True: 0, False: 210]
  ------------------
  276|      0|        ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  277|      0|        return 0;
  278|      0|    }
  279|       |
  280|    210|    if (dh->params.q != NULL
  ------------------
  |  Branch (280:9): [True: 210, False: 0]
  ------------------
  281|    210|        && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) {
  ------------------
  |  |   99|    210|#define OPENSSL_DH_MAX_MODULUS_BITS 10000
  ------------------
  |  Branch (281:12): [True: 0, False: 210]
  ------------------
  282|      0|        ERR_raise(ERR_LIB_DH, DH_R_Q_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  283|      0|        return 0;
  284|      0|    }
  285|       |
  286|    210|    if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) {
  ------------------
  |  |   14|    210|#define DH_MIN_MODULUS_BITS 512
  ------------------
  |  Branch (286:9): [True: 0, False: 210]
  ------------------
  287|      0|        ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  288|      0|        return 0;
  289|      0|    }
  290|       |
  291|    210|    ctx = BN_CTX_new_ex(dh->libctx);
  292|    210|    if (ctx == NULL)
  ------------------
  |  Branch (292:9): [True: 0, False: 210]
  ------------------
  293|      0|        goto err;
  294|       |
  295|    210|    if (dh->priv_key == NULL) {
  ------------------
  |  Branch (295:9): [True: 210, False: 0]
  ------------------
  296|    210|        priv_key = BN_secure_new();
  297|    210|        if (priv_key == NULL)
  ------------------
  |  Branch (297:13): [True: 0, False: 210]
  ------------------
  298|      0|            goto err;
  299|    210|        generate_new_key = 1;
  300|    210|    } else {
  301|      0|        priv_key = dh->priv_key;
  302|      0|    }
  303|       |
  304|    210|    if (dh->pub_key == NULL) {
  ------------------
  |  Branch (304:9): [True: 210, False: 0]
  ------------------
  305|    210|        pub_key = BN_new();
  306|    210|        if (pub_key == NULL)
  ------------------
  |  Branch (306:13): [True: 0, False: 210]
  ------------------
  307|      0|            goto err;
  308|    210|    } else {
  309|      0|        pub_key = dh->pub_key;
  310|      0|    }
  311|    210|    if (generate_new_key) {
  ------------------
  |  Branch (311:9): [True: 210, False: 0]
  ------------------
  312|       |        /* Is it an approved safe prime ?*/
  313|    210|        if (DH_get_nid(dh) != NID_undef) {
  ------------------
  |  |   18|    210|#define NID_undef                       0
  ------------------
  |  Branch (313:13): [True: 210, False: 0]
  ------------------
  314|    210|            int max_strength = ossl_ifc_ffc_compute_security_bits(BN_num_bits(dh->params.p));
  315|       |
  316|    210|            if (dh->params.q == NULL
  ------------------
  |  Branch (316:17): [True: 0, False: 210]
  ------------------
  317|    210|                || dh->length > BN_num_bits(dh->params.q))
  ------------------
  |  Branch (317:20): [True: 0, False: 210]
  ------------------
  318|      0|                goto err;
  319|       |            /* dh->length = maximum bit length of generated private key */
  320|    210|            if (!ossl_ffc_generate_private_key(ctx, &dh->params, dh->length,
  ------------------
  |  Branch (320:17): [True: 0, False: 210]
  ------------------
  321|    210|                    max_strength, priv_key))
  322|      0|                goto err;
  323|    210|        } else {
  324|       |#ifdef FIPS_MODULE
  325|       |            if (dh->params.q == NULL)
  326|       |                goto err;
  327|       |#else
  328|      0|            if (dh->params.q == NULL) {
  ------------------
  |  Branch (328:17): [True: 0, False: 0]
  ------------------
  329|       |                /* secret exponent length, must satisfy 2^l < (p-1)/2 */
  330|      0|                l = BN_num_bits(dh->params.p);
  331|      0|                if (dh->length >= l)
  ------------------
  |  Branch (331:21): [True: 0, False: 0]
  ------------------
  332|      0|                    goto err;
  333|      0|                l -= 2;
  334|      0|                if (dh->length != 0 && dh->length < l)
  ------------------
  |  Branch (334:21): [True: 0, False: 0]
  |  Branch (334:40): [True: 0, False: 0]
  ------------------
  335|      0|                    l = dh->length;
  336|      0|                if (!BN_priv_rand_ex(priv_key, l, BN_RAND_TOP_ONE,
  ------------------
  |  |   81|      0|#define BN_RAND_TOP_ONE 0
  ------------------
  |  Branch (336:21): [True: 0, False: 0]
  ------------------
  337|      0|                        BN_RAND_BOTTOM_ANY, 0, ctx))
  ------------------
  |  |   85|      0|#define BN_RAND_BOTTOM_ANY 0
  ------------------
  338|      0|                    goto err;
  339|       |                /*
  340|       |                 * We handle just one known case where g is a quadratic non-residue:
  341|       |                 * for g = 2: p % 8 == 3
  342|       |                 */
  343|      0|                if (BN_is_word(dh->params.g, DH_GENERATOR_2)
  ------------------
  |  |  147|      0|#define DH_GENERATOR_2 2
  ------------------
  |  Branch (343:21): [True: 0, False: 0]
  ------------------
  344|      0|                    && !BN_is_bit_set(dh->params.p, 2)) {
  ------------------
  |  Branch (344:24): [True: 0, False: 0]
  ------------------
  345|       |                    /* clear bit 0, since it won't be a secret anyway */
  346|      0|                    if (!BN_clear_bit(priv_key, 0))
  ------------------
  |  Branch (346:25): [True: 0, False: 0]
  ------------------
  347|      0|                        goto err;
  348|      0|                }
  349|      0|            } else
  350|      0|#endif
  351|      0|            {
  352|       |                /* Do a partial check for invalid p, q, g */
  353|      0|                if (!ossl_ffc_params_simple_validate(dh->libctx, &dh->params,
  ------------------
  |  Branch (353:21): [True: 0, False: 0]
  ------------------
  354|      0|                        FFC_PARAM_TYPE_DH, NULL))
  ------------------
  |  |   27|      0|#define FFC_PARAM_TYPE_DH 1
  ------------------
  355|      0|                    goto err;
  356|       |                /*
  357|       |                 * For FFC FIPS 186-4 keygen
  358|       |                 * security strength s = 112,
  359|       |                 * Max Private key size N = len(q)
  360|       |                 */
  361|      0|                if (!ossl_ffc_generate_private_key(ctx, &dh->params,
  ------------------
  |  Branch (361:21): [True: 0, False: 0]
  ------------------
  362|      0|                        BN_num_bits(dh->params.q),
  363|      0|                        MIN_STRENGTH,
  ------------------
  |  |   26|      0|#define MIN_STRENGTH 80
  ------------------
  364|      0|                        priv_key))
  365|      0|                    goto err;
  366|      0|            }
  367|      0|        }
  368|    210|    }
  369|       |
  370|    210|    if (!ossl_dh_generate_public_key(ctx, dh, priv_key, pub_key))
  ------------------
  |  Branch (370:9): [True: 0, False: 210]
  ------------------
  371|      0|        goto err;
  372|       |
  373|    210|    dh->pub_key = pub_key;
  374|    210|    dh->priv_key = priv_key;
  375|    210|    dh->dirty_cnt++;
  376|    210|    ok = 1;
  377|    210|err:
  378|    210|    if (ok != 1)
  ------------------
  |  Branch (378:9): [True: 0, False: 210]
  ------------------
  379|    210|        ERR_raise(ERR_LIB_DH, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  380|       |
  381|    210|    if (pub_key != dh->pub_key)
  ------------------
  |  Branch (381:9): [True: 0, False: 210]
  ------------------
  382|      0|        BN_free(pub_key);
  383|    210|    if (priv_key != dh->priv_key)
  ------------------
  |  Branch (383:9): [True: 0, False: 210]
  ------------------
  384|      0|        BN_free(priv_key);
  385|    210|    BN_CTX_free(ctx);
  386|    210|    return ok;
  387|    210|}
dh_key.c:dh_bn_mod_exp:
  192|    210|{
  193|       |#ifdef S390X_MOD_EXP
  194|       |    return s390x_mod_exp(r, a, p, m, ctx, m_ctx);
  195|       |#else
  196|    210|    return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx);
  197|    210|#endif
  198|    210|}
dh_key.c:dh_init:
  201|    210|{
  202|    210|    dh->flags |= DH_FLAG_CACHE_MONT_P;
  ------------------
  |  |  108|    210|#define DH_FLAG_CACHE_MONT_P 0x01
  ------------------
  203|    210|    dh->dirty_cnt++;
  204|    210|    return 1;
  205|    210|}
dh_key.c:dh_finish:
  208|    210|{
  209|    210|    BN_MONT_CTX_free(dh->method_mont_p);
  210|    210|    return 1;
  211|    210|}

ossl_dh_new_ex:
   66|    210|{
   67|    210|    return dh_new_intern(libctx);
   68|    210|}
DH_free:
  114|    210|{
  115|    210|    int i;
  116|       |
  117|    210|    if (r == NULL)
  ------------------
  |  Branch (117:9): [True: 0, False: 210]
  ------------------
  118|      0|        return;
  119|       |
  120|    210|    CRYPTO_DOWN_REF(&r->references, &i);
  121|    210|    REF_PRINT_COUNT("DH", i, r);
  ------------------
  |  |  301|    210|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|    210|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|    210|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|    210|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  122|    210|    if (i > 0)
  ------------------
  |  Branch (122:9): [True: 0, False: 210]
  ------------------
  123|      0|        return;
  124|    210|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|    210|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 210]
  |  |  ------------------
  ------------------
  125|       |
  126|    210|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (126:9): [True: 210, False: 0]
  |  Branch (126:28): [True: 210, False: 0]
  ------------------
  127|    210|        r->meth->finish(r);
  128|    210|#if !defined(FIPS_MODULE)
  129|    210|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DH, r, &r->ex_data);
  ------------------
  |  |  257|    210|#define CRYPTO_EX_INDEX_DH 6
  ------------------
  130|    210|#endif
  131|       |
  132|    210|    CRYPTO_THREAD_lock_free(r->lock);
  133|    210|    CRYPTO_FREE_REF(&r->references);
  134|       |
  135|    210|    ossl_ffc_params_cleanup(&r->params);
  136|    210|    BN_clear_free(r->pub_key);
  137|    210|    BN_clear_free(r->priv_key);
  138|    210|    OPENSSL_free(r);
  ------------------
  |  |  132|    210|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  139|    210|}
DH_bits:
  176|    210|{
  177|    210|    if (dh->params.p != NULL)
  ------------------
  |  Branch (177:9): [True: 210, False: 0]
  ------------------
  178|    210|        return BN_num_bits(dh->params.p);
  179|      0|    return -1;
  180|    210|}
DH_size:
  183|    210|{
  184|    210|    if (dh->params.p != NULL)
  ------------------
  |  Branch (184:9): [True: 210, False: 0]
  ------------------
  185|    210|        return BN_num_bytes(dh->params.p);
  ------------------
  |  |  188|    210|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  186|      0|    return -1;
  187|    210|}
DH_security_bits:
  190|    210|{
  191|    210|    int N;
  192|       |
  193|    210|    if (dh->params.q != NULL)
  ------------------
  |  Branch (193:9): [True: 210, False: 0]
  ------------------
  194|    210|        N = BN_num_bits(dh->params.q);
  195|      0|    else if (dh->length)
  ------------------
  |  Branch (195:14): [True: 0, False: 0]
  ------------------
  196|      0|        N = dh->length;
  197|      0|    else
  198|      0|        N = -1;
  199|    210|    if (dh->params.p != NULL)
  ------------------
  |  Branch (199:9): [True: 210, False: 0]
  ------------------
  200|    210|        return BN_security_bits(BN_num_bits(dh->params.p), N);
  201|      0|    return -1;
  202|    210|}
DH_get0_pqg:
  206|    420|{
  207|    420|    ossl_ffc_params_get0_pqg(&dh->params, p, q, g);
  208|    420|}
DH_get_length:
  227|    630|{
  228|    630|    return dh->length;
  229|    630|}
DH_get0_key:
  239|  1.05k|{
  240|  1.05k|    if (pub_key != NULL)
  ------------------
  |  Branch (240:9): [True: 1.05k, False: 0]
  ------------------
  241|  1.05k|        *pub_key = dh->pub_key;
  242|  1.05k|    if (priv_key != NULL)
  ------------------
  |  Branch (242:9): [True: 630, False: 420]
  ------------------
  243|    630|        *priv_key = dh->priv_key;
  244|  1.05k|}
DH_clear_flags:
  287|    210|{
  288|    210|    dh->flags &= ~flags;
  289|    210|}
DH_set_flags:
  297|    210|{
  298|    210|    dh->flags |= flags;
  299|    210|}
ossl_dh_get0_params:
  302|    840|{
  303|    840|    return &dh->params;
  304|    840|}
dh_lib.c:dh_new_intern:
   71|    210|{
   72|    210|    DH *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|    210|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   73|       |
   74|    210|    if (ret == NULL)
  ------------------
  |  Branch (74:9): [True: 0, False: 210]
  ------------------
   75|      0|        return NULL;
   76|       |
   77|    210|    ret->lock = CRYPTO_THREAD_lock_new();
   78|    210|    if (ret->lock == NULL) {
  ------------------
  |  Branch (78:9): [True: 0, False: 210]
  ------------------
   79|      0|        ERR_raise(ERR_LIB_DH, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   80|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|      0|        return NULL;
   82|      0|    }
   83|       |
   84|    210|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (84:9): [True: 0, False: 210]
  ------------------
   85|      0|        CRYPTO_THREAD_lock_free(ret->lock);
   86|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   87|      0|        return NULL;
   88|      0|    }
   89|       |
   90|    210|    ret->libctx = libctx;
   91|    210|    ret->meth = DH_get_default_method();
   92|    210|    ret->flags = ret->meth->flags;
   93|       |
   94|    210|#ifndef FIPS_MODULE
   95|    210|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_DH, ret, &ret->ex_data))
  ------------------
  |  |  257|    210|#define CRYPTO_EX_INDEX_DH 6
  ------------------
  |  Branch (95:9): [True: 0, False: 210]
  ------------------
   96|      0|        goto err;
   97|    210|#endif /* FIPS_MODULE */
   98|       |
   99|    210|    ossl_ffc_params_init(&ret->params);
  100|       |
  101|    210|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (101:9): [True: 210, False: 0]
  |  Branch (101:38): [True: 0, False: 210]
  ------------------
  102|      0|        ERR_raise(ERR_LIB_DH, ERR_R_INIT_FAIL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  103|      0|        goto err;
  104|      0|    }
  105|       |
  106|    210|    return ret;
  107|       |
  108|      0|err:
  109|      0|    DH_free(ret);
  110|       |    return NULL;
  111|    210|}

dsa_ameth.c:int_dsa_free:
  267|  3.35k|{
  268|  3.35k|    DSA_free(pkey->pkey.dsa);
  269|  3.35k|}

ossl_err_load_DSA_strings:
   46|      1|{
   47|      1|#ifndef OPENSSL_NO_ERR
   48|      1|    if (ERR_reason_error_string(DSA_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (48:9): [True: 1, False: 0]
  ------------------
   49|      1|        ERR_load_strings_const(DSA_str_reasons);
   50|      1|#endif
   51|      1|    return 1;
   52|      1|}

DSA_free:
  186|  3.35k|{
  187|  3.35k|    int i;
  188|       |
  189|  3.35k|    if (r == NULL)
  ------------------
  |  Branch (189:9): [True: 3.35k, False: 0]
  ------------------
  190|  3.35k|        return;
  191|       |
  192|      0|    CRYPTO_DOWN_REF(&r->references, &i);
  193|      0|    REF_PRINT_COUNT("DSA", i, r);
  ------------------
  |  |  301|      0|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|      0|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  194|      0|    if (i > 0)
  ------------------
  |  Branch (194:9): [True: 0, False: 0]
  ------------------
  195|      0|        return;
  196|      0|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|      0|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  197|       |
  198|      0|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (198:9): [True: 0, False: 0]
  |  Branch (198:28): [True: 0, False: 0]
  ------------------
  199|      0|        r->meth->finish(r);
  200|       |
  201|      0|#ifndef FIPS_MODULE
  202|      0|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, r, &r->ex_data);
  ------------------
  |  |  258|      0|#define CRYPTO_EX_INDEX_DSA 7
  ------------------
  203|      0|#endif
  204|       |
  205|      0|    CRYPTO_THREAD_lock_free(r->lock);
  206|      0|    CRYPTO_FREE_REF(&r->references);
  207|       |
  208|      0|    ossl_ffc_params_cleanup(&r->params);
  209|      0|    BN_clear_free(r->pub_key);
  210|      0|    BN_clear_free(r->priv_key);
  211|      0|    OPENSSL_free(r);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|      0|}

DSO_METHOD_openssl:
   62|     92|{
   63|     92|    return &dso_meth_dlfcn;
   64|     92|}
dso_dlfcn.c:dlfcn_load:
   94|     92|{
   95|     92|    void *ptr = NULL;
   96|       |    /* See applicable comments in dso_dl.c */
   97|     92|    char *filename = DSO_convert_filename(dso, NULL);
   98|     92|    int flags = DLOPEN_FLAG;
  ------------------
  |  |   85|     92|#define DLOPEN_FLAG RTLD_NOW /* Hope this works everywhere else */
  ------------------
   99|     92|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|     92|#define get_last_sys_error() errno
  ------------------
  100|       |
  101|     92|    if (filename == NULL) {
  ------------------
  |  Branch (101:9): [True: 0, False: 92]
  ------------------
  102|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NO_FILENAME);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  103|      0|        goto err;
  104|      0|    }
  105|     92|#ifdef RTLD_GLOBAL
  106|     92|    if (dso->flags & DSO_FLAG_GLOBAL_SYMBOLS)
  ------------------
  |  |   53|     92|#define DSO_FLAG_GLOBAL_SYMBOLS 0x20
  ------------------
  |  Branch (106:9): [True: 0, False: 92]
  ------------------
  107|      0|        flags |= RTLD_GLOBAL;
  108|     92|#endif
  109|       |#ifdef _AIX
  110|       |    if (filename[strlen(filename) - 1] == ')')
  111|       |        flags |= RTLD_MEMBER;
  112|       |#endif
  113|     92|    ptr = dlopen(filename, flags);
  114|     92|    if (ptr == NULL) {
  ------------------
  |  Branch (114:9): [True: 92, False: 0]
  ------------------
  115|     92|        ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |  359|     92|    (ERR_new(),                                                  \
  |  |  360|     92|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     92|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     92|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |   81|     92|#define ERR_LIB_DSO 37
  ------------------
                      ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |   34|     92|#define DSO_R_LOAD_FAILED 103
  ------------------
  116|     92|            "filename(%s): %s", filename, dlerror());
  117|     92|        goto err;
  118|     92|    }
  119|       |    /*
  120|       |     * Some dlopen() implementations (e.g. solaris) do no preserve errno, even
  121|       |     * on a successful call.
  122|       |     */
  123|     92|    set_sys_error(saveerrno);
  ------------------
  |  |   32|     92|#define set_sys_error(e) errno = (e)
  ------------------
  124|      0|    if (!sk_void_push(dso->meth_data, (char *)ptr)) {
  ------------------
  |  |  230|      0|#define sk_void_push(sk, ptr) OPENSSL_sk_push(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
  ------------------
  |  Branch (124:9): [True: 0, False: 0]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_STACK_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        goto err;
  127|      0|    }
  128|       |    /* Success */
  129|      0|    dso->loaded_filename = filename;
  130|      0|    return 1;
  131|     92|err:
  132|       |    /* Cleanup! */
  133|     92|    OPENSSL_free(filename);
  ------------------
  |  |  132|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  134|     92|    if (ptr != NULL)
  ------------------
  |  Branch (134:9): [True: 0, False: 92]
  ------------------
  135|      0|        dlclose(ptr);
  136|     92|    return 0;
  137|      0|}
dso_dlfcn.c:dlfcn_unload:
  140|     92|{
  141|     92|    void *ptr;
  142|     92|    if (dso == NULL) {
  ------------------
  |  Branch (142:9): [True: 0, False: 92]
  ------------------
  143|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  144|      0|        return 0;
  145|      0|    }
  146|     92|    if (sk_void_num(dso->meth_data) < 1)
  ------------------
  |  |  220|     92|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (146:9): [True: 92, False: 0]
  ------------------
  147|     92|        return 1;
  148|      0|    ptr = sk_void_pop(dso->meth_data);
  ------------------
  |  |  232|      0|#define sk_void_pop(sk) ((void *)OPENSSL_sk_pop(ossl_check_void_sk_type(sk)))
  ------------------
  149|      0|    if (ptr == NULL) {
  ------------------
  |  Branch (149:9): [True: 0, False: 0]
  ------------------
  150|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NULL_HANDLE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|       |        /*
  152|       |         * Should push the value back onto the stack in case of a retry.
  153|       |         */
  154|      0|        sk_void_push(dso->meth_data, ptr);
  ------------------
  |  |  230|      0|#define sk_void_push(sk, ptr) OPENSSL_sk_push(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
  ------------------
  155|      0|        return 0;
  156|      0|    }
  157|       |    /* For now I'm not aware of any errors associated with dlclose() */
  158|      0|    dlclose(ptr);
  159|      0|    return 1;
  160|      0|}
dso_dlfcn.c:dlfcn_name_converter:
  245|    184|{
  246|    184|    char *translated;
  247|    184|    int len, rsize, transform;
  248|       |
  249|    184|    len = strlen(filename);
  250|    184|    rsize = len + 1;
  251|    184|    transform = (strchr(filename, '/') == NULL);
  252|    184|    if (transform) {
  ------------------
  |  Branch (252:9): [True: 89, False: 95]
  ------------------
  253|       |        /* We will convert this to "%s.so" or "lib%s.so" etc */
  254|     89|        rsize += strlen(DSO_EXTENSION); /* The length of ".so" */
  ------------------
  |  |   23|     89|# define DSO_EXTENSION ".so"
  ------------------
  255|     89|        if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
  ------------------
  |  |   41|     89|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  |  Branch (255:13): [True: 0, False: 89]
  ------------------
  256|      0|            rsize += 3; /* The length of "lib" */
  257|     89|    }
  258|    184|    translated = OPENSSL_malloc(rsize);
  ------------------
  |  |  107|    184|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  259|    184|    if (translated == NULL) {
  ------------------
  |  Branch (259:9): [True: 0, False: 184]
  ------------------
  260|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NAME_TRANSLATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  261|      0|        return NULL;
  262|      0|    }
  263|    184|    if (transform) {
  ------------------
  |  Branch (263:9): [True: 89, False: 95]
  ------------------
  264|     89|        if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
  ------------------
  |  |   41|     89|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  |  Branch (264:13): [True: 0, False: 89]
  ------------------
  265|      0|            BIO_snprintf(translated, rsize, "lib%s" DSO_EXTENSION, filename);
  ------------------
  |  |   23|      0|# define DSO_EXTENSION ".so"
  ------------------
  266|     89|        else
  267|     89|            BIO_snprintf(translated, rsize, "%s" DSO_EXTENSION, filename);
  ------------------
  |  |   23|     89|# define DSO_EXTENSION ".so"
  ------------------
  268|     95|    } else {
  269|     95|        BIO_snprintf(translated, rsize, "%s", filename);
  270|     95|    }
  271|    184|    return translated;
  272|    184|}
dso_dlfcn.c:dlfcn_merger:
  194|     92|{
  195|     92|    char *merged;
  196|       |
  197|     92|    if (!filespec1 && !filespec2) {
  ------------------
  |  Branch (197:9): [True: 0, False: 92]
  |  Branch (197:23): [True: 0, False: 0]
  ------------------
  198|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  199|      0|        return NULL;
  200|      0|    }
  201|       |    /*
  202|       |     * If the first file specification is a rooted path, it rules. same goes
  203|       |     * if the second file specification is missing.
  204|       |     */
  205|     92|    if (!filespec2 || (filespec1 != NULL && filespec1[0] == '/')) {
  ------------------
  |  Branch (205:9): [True: 0, False: 92]
  |  Branch (205:24): [True: 92, False: 0]
  |  Branch (205:45): [True: 2, False: 90]
  ------------------
  206|      2|        merged = OPENSSL_strdup(filespec1);
  ------------------
  |  |  136|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  207|      2|        if (merged == NULL)
  ------------------
  |  Branch (207:13): [True: 0, False: 2]
  ------------------
  208|      0|            return NULL;
  209|      2|    }
  210|       |    /*
  211|       |     * If the first file specification is missing, the second one rules.
  212|       |     */
  213|     90|    else if (!filespec1) {
  ------------------
  |  Branch (213:14): [True: 0, False: 90]
  ------------------
  214|      0|        merged = OPENSSL_strdup(filespec2);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  215|      0|        if (merged == NULL)
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|            return NULL;
  217|     90|    } else {
  218|       |        /*
  219|       |         * This part isn't as trivial as it looks.  It assumes that the
  220|       |         * second file specification really is a directory, and makes no
  221|       |         * checks whatsoever.  Therefore, the result becomes the
  222|       |         * concatenation of filespec2 followed by a slash followed by
  223|       |         * filespec1.
  224|       |         */
  225|     90|        int spec2len, len;
  226|       |
  227|     90|        spec2len = strlen(filespec2);
  228|     90|        len = spec2len + strlen(filespec1);
  229|       |
  230|     90|        if (spec2len && filespec2[spec2len - 1] == '/') {
  ------------------
  |  Branch (230:13): [True: 90, False: 0]
  |  Branch (230:25): [True: 0, False: 90]
  ------------------
  231|      0|            spec2len--;
  232|      0|            len--;
  233|      0|        }
  234|     90|        merged = OPENSSL_malloc(len + 2);
  ------------------
  |  |  107|     90|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  235|     90|        if (merged == NULL)
  ------------------
  |  Branch (235:13): [True: 0, False: 90]
  ------------------
  236|      0|            return NULL;
  237|     90|        strcpy(merged, filespec2);
  238|     90|        merged[spec2len] = '/';
  239|     90|        strcpy(&merged[spec2len + 1], filespec1);
  240|     90|    }
  241|     92|    return merged;
  242|     92|}

ossl_err_load_DSO_strings:
   50|      1|{
   51|      1|#ifndef OPENSSL_NO_ERR
   52|      1|    if (ERR_reason_error_string(DSO_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (52:9): [True: 1, False: 0]
  ------------------
   53|      1|        ERR_load_strings_const(DSO_str_reasons);
   54|      1|#endif
   55|      1|    return 1;
   56|      1|}

DSO_new:
   43|     92|{
   44|       |    return DSO_new_method(NULL);
   45|     92|}
DSO_free:
   48|  1.89k|{
   49|  1.89k|    int i;
   50|       |
   51|  1.89k|    if (dso == NULL)
  ------------------
  |  Branch (51:9): [True: 1.79k, False: 92]
  ------------------
   52|  1.79k|        return 1;
   53|       |
   54|     92|    if (CRYPTO_DOWN_REF(&dso->references, &i) <= 0)
  ------------------
  |  Branch (54:9): [True: 0, False: 92]
  ------------------
   55|      0|        return 0;
   56|       |
   57|     92|    REF_PRINT_COUNT("DSO", i, dso);
  ------------------
  |  |  301|     92|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|     92|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|     92|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|     92|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   58|     92|    if (i > 0)
  ------------------
  |  Branch (58:9): [True: 0, False: 92]
  ------------------
   59|      0|        return 1;
   60|     92|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|     92|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 92]
  |  |  ------------------
  ------------------
   61|       |
   62|     92|    if ((dso->flags & DSO_FLAG_NO_UNLOAD_ON_FREE) == 0) {
  ------------------
  |  |   46|     92|#define DSO_FLAG_NO_UNLOAD_ON_FREE 0x04
  ------------------
  |  Branch (62:9): [True: 92, False: 0]
  ------------------
   63|     92|        if ((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) {
  ------------------
  |  Branch (63:13): [True: 92, False: 0]
  |  Branch (63:48): [True: 0, False: 92]
  ------------------
   64|      0|            ERR_raise(ERR_LIB_DSO, DSO_R_UNLOAD_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   65|      0|            return 0;
   66|      0|        }
   67|     92|    }
   68|       |
   69|     92|    if ((dso->meth->finish != NULL) && !dso->meth->finish(dso)) {
  ------------------
  |  Branch (69:9): [True: 0, False: 92]
  |  Branch (69:40): [True: 0, False: 0]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_FINISH_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|       |
   74|     92|    sk_void_free(dso->meth_data);
  ------------------
  |  |  226|     92|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
   75|     92|    OPENSSL_free(dso->filename);
  ------------------
  |  |  132|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|     92|    OPENSSL_free(dso->loaded_filename);
  ------------------
  |  |  132|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|     92|    CRYPTO_FREE_REF(&dso->references);
   78|     92|    OPENSSL_free(dso);
  ------------------
  |  |  132|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|     92|    return 1;
   80|     92|}
DSO_flags:
   83|    178|{
   84|    178|    return ((dso == NULL) ? 0 : dso->flags);
  ------------------
  |  Branch (84:13): [True: 0, False: 178]
  ------------------
   85|    178|}
DSO_load:
  105|     92|{
  106|     92|    DSO *ret;
  107|     92|    int allocated = 0;
  108|       |
  109|     92|    if (dso == NULL) {
  ------------------
  |  Branch (109:9): [True: 0, False: 92]
  ------------------
  110|      0|        ret = DSO_new_method(meth);
  111|      0|        if (ret == NULL) {
  ------------------
  |  Branch (111:13): [True: 0, False: 0]
  ------------------
  112|      0|            ERR_raise(ERR_LIB_DSO, ERR_R_DSO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|            goto err;
  114|      0|        }
  115|      0|        allocated = 1;
  116|       |        /* Pass the provided flags to the new DSO object */
  117|      0|        if (DSO_ctrl(ret, DSO_CTRL_SET_FLAGS, flags, NULL) < 0) {
  ------------------
  |  |   19|      0|#define DSO_CTRL_SET_FLAGS 2
  ------------------
  |  Branch (117:13): [True: 0, False: 0]
  ------------------
  118|      0|            ERR_raise(ERR_LIB_DSO, DSO_R_CTRL_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|      0|            goto err;
  120|      0|        }
  121|      0|    } else
  122|     92|        ret = dso;
  123|       |    /* Don't load if we're currently already loaded */
  124|     92|    if (ret->filename != NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 92]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_DSO_ALREADY_LOADED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        goto err;
  127|      0|    }
  128|       |    /*
  129|       |     * filename can only be NULL if we were passed a dso that already has one
  130|       |     * set.
  131|       |     */
  132|     92|    if (filename != NULL)
  ------------------
  |  Branch (132:9): [True: 92, False: 0]
  ------------------
  133|     92|        if (!DSO_set_filename(ret, filename)) {
  ------------------
  |  Branch (133:13): [True: 0, False: 92]
  ------------------
  134|      0|            ERR_raise(ERR_LIB_DSO, DSO_R_SET_FILENAME_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  135|      0|            goto err;
  136|      0|        }
  137|     92|    filename = ret->filename;
  138|     92|    if (filename == NULL) {
  ------------------
  |  Branch (138:9): [True: 0, False: 92]
  ------------------
  139|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NO_FILENAME);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  140|      0|        goto err;
  141|      0|    }
  142|     92|    if (ret->meth->dso_load == NULL) {
  ------------------
  |  Branch (142:9): [True: 0, False: 92]
  ------------------
  143|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_UNSUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  144|      0|        goto err;
  145|      0|    }
  146|     92|    if (!ret->meth->dso_load(ret)) {
  ------------------
  |  Branch (146:9): [True: 92, False: 0]
  ------------------
  147|     92|        ERR_raise(ERR_LIB_DSO, DSO_R_LOAD_FAILED);
  ------------------
  |  |  357|     92|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     92|    (ERR_new(),                                                  \
  |  |  |  |  360|     92|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     92|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     92|        ERR_set_error)
  |  |  ------------------
  ------------------
  148|     92|        goto err;
  149|     92|    }
  150|       |    /* Load succeeded */
  151|      0|    return ret;
  152|     92|err:
  153|     92|    if (allocated)
  ------------------
  |  Branch (153:9): [True: 0, False: 92]
  ------------------
  154|      0|        DSO_free(ret);
  155|       |    return NULL;
  156|     92|}
DSO_ctrl:
  188|     92|{
  189|     92|    if (dso == NULL) {
  ------------------
  |  Branch (189:9): [True: 0, False: 92]
  ------------------
  190|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  191|      0|        return -1;
  192|      0|    }
  193|       |    /*
  194|       |     * We should intercept certain generic commands and only pass control to
  195|       |     * the method-specific ctrl() function if it's something we don't handle.
  196|       |     */
  197|     92|    switch (cmd) {
  198|      0|    case DSO_CTRL_GET_FLAGS:
  ------------------
  |  |   18|      0|#define DSO_CTRL_GET_FLAGS 1
  ------------------
  |  Branch (198:5): [True: 0, False: 92]
  ------------------
  199|      0|        return dso->flags;
  200|     92|    case DSO_CTRL_SET_FLAGS:
  ------------------
  |  |   19|     92|#define DSO_CTRL_SET_FLAGS 2
  ------------------
  |  Branch (200:5): [True: 92, False: 0]
  ------------------
  201|     92|        dso->flags = (int)larg;
  202|     92|        return 0;
  203|      0|    case DSO_CTRL_OR_FLAGS:
  ------------------
  |  |   20|      0|#define DSO_CTRL_OR_FLAGS 3
  ------------------
  |  Branch (203:5): [True: 0, False: 92]
  ------------------
  204|      0|        dso->flags |= (int)larg;
  205|      0|        return 0;
  206|      0|    default:
  ------------------
  |  Branch (206:5): [True: 0, False: 92]
  ------------------
  207|      0|        break;
  208|     92|    }
  209|      0|    if ((dso->meth == NULL) || (dso->meth->dso_ctrl == NULL)) {
  ------------------
  |  Branch (209:9): [True: 0, False: 0]
  |  Branch (209:32): [True: 0, False: 0]
  ------------------
  210|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_UNSUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  211|      0|        return -1;
  212|      0|    }
  213|      0|    return dso->meth->dso_ctrl(dso, cmd, larg, parg);
  214|      0|}
DSO_set_filename:
  226|     92|{
  227|     92|    char *copied;
  228|       |
  229|     92|    if ((dso == NULL) || (filename == NULL)) {
  ------------------
  |  Branch (229:9): [True: 0, False: 92]
  |  Branch (229:26): [True: 0, False: 92]
  ------------------
  230|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  231|      0|        return 0;
  232|      0|    }
  233|     92|    if (dso->loaded_filename) {
  ------------------
  |  Branch (233:9): [True: 0, False: 92]
  ------------------
  234|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_DSO_ALREADY_LOADED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  235|      0|        return 0;
  236|      0|    }
  237|       |    /* We'll duplicate filename */
  238|     92|    copied = OPENSSL_strdup(filename);
  ------------------
  |  |  136|     92|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  239|     92|    if (copied == NULL)
  ------------------
  |  Branch (239:9): [True: 0, False: 92]
  ------------------
  240|      0|        return 0;
  241|     92|    OPENSSL_free(dso->filename);
  ------------------
  |  |  132|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|     92|    dso->filename = copied;
  243|     92|    return 1;
  244|     92|}
DSO_merge:
  247|     92|{
  248|     92|    char *result = NULL;
  249|       |
  250|     92|    if (dso == NULL || filespec1 == NULL) {
  ------------------
  |  Branch (250:9): [True: 0, False: 92]
  |  Branch (250:24): [True: 0, False: 92]
  ------------------
  251|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  252|      0|        return NULL;
  253|      0|    }
  254|     92|    if ((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) {
  ------------------
  |  |   33|     92|#define DSO_FLAG_NO_NAME_TRANSLATION 0x01
  ------------------
  |  Branch (254:9): [True: 92, False: 0]
  ------------------
  255|     92|        if (dso->merger != NULL)
  ------------------
  |  Branch (255:13): [True: 0, False: 92]
  ------------------
  256|      0|            result = dso->merger(dso, filespec1, filespec2);
  257|     92|        else if (dso->meth->dso_merger != NULL)
  ------------------
  |  Branch (257:18): [True: 92, False: 0]
  ------------------
  258|     92|            result = dso->meth->dso_merger(dso, filespec1, filespec2);
  259|     92|    }
  260|     92|    return result;
  261|     92|}
DSO_convert_filename:
  264|    184|{
  265|    184|    char *result = NULL;
  266|       |
  267|    184|    if (dso == NULL) {
  ------------------
  |  Branch (267:9): [True: 0, False: 184]
  ------------------
  268|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        return NULL;
  270|      0|    }
  271|    184|    if (filename == NULL)
  ------------------
  |  Branch (271:9): [True: 92, False: 92]
  ------------------
  272|     92|        filename = dso->filename;
  273|    184|    if (filename == NULL) {
  ------------------
  |  Branch (273:9): [True: 0, False: 184]
  ------------------
  274|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NO_FILENAME);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  275|      0|        return NULL;
  276|      0|    }
  277|    184|    if ((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) {
  ------------------
  |  |   33|    184|#define DSO_FLAG_NO_NAME_TRANSLATION 0x01
  ------------------
  |  Branch (277:9): [True: 184, False: 0]
  ------------------
  278|    184|        if (dso->name_converter != NULL)
  ------------------
  |  Branch (278:13): [True: 0, False: 184]
  ------------------
  279|      0|            result = dso->name_converter(dso, filename);
  280|    184|        else if (dso->meth->dso_name_converter != NULL)
  ------------------
  |  Branch (280:18): [True: 184, False: 0]
  ------------------
  281|    184|            result = dso->meth->dso_name_converter(dso, filename);
  282|    184|    }
  283|    184|    if (result == NULL) {
  ------------------
  |  Branch (283:9): [True: 0, False: 184]
  ------------------
  284|      0|        result = OPENSSL_strdup(filename);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  285|      0|        if (result == NULL)
  ------------------
  |  Branch (285:13): [True: 0, False: 0]
  ------------------
  286|      0|            return NULL;
  287|      0|    }
  288|    184|    return result;
  289|    184|}
dso_lib.c:DSO_new_method:
   14|     92|{
   15|     92|    DSO *ret;
   16|       |
   17|     92|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|     92|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   18|     92|    if (ret == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 92]
  ------------------
   19|      0|        return NULL;
   20|     92|    ret->meth_data = sk_void_new_null();
  ------------------
  |  |  223|     92|#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_void_freefunc_thunk))
  ------------------
   21|     92|    if (ret->meth_data == NULL) {
  ------------------
  |  Branch (21:9): [True: 0, False: 92]
  ------------------
   22|       |        /* sk_new doesn't generate any errors so we do */
   23|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   24|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|      0|        return NULL;
   26|      0|    }
   27|     92|    ret->meth = DSO_METHOD_openssl();
   28|     92|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (28:9): [True: 0, False: 92]
  ------------------
   29|      0|        sk_void_free(ret->meth_data);
  ------------------
  |  |  226|      0|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
   30|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   31|      0|        return NULL;
   32|      0|    }
   33|       |
   34|     92|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 92]
  |  Branch (34:38): [True: 0, False: 0]
  ------------------
   35|      0|        DSO_free(ret);
   36|      0|        ret = NULL;
   37|      0|    }
   38|       |
   39|     92|    return ret;
   40|     92|}

ossl_x25519_public_from_private:
 5855|  4.16k|{
 5856|  4.16k|    uint8_t e[32];
 5857|  4.16k|    ge_p3 A;
 5858|  4.16k|    fe zplusy, zminusy, zminusy_inv;
 5859|       |
 5860|  4.16k|    memcpy(e, private_key, 32);
 5861|  4.16k|    e[0] &= 248;
 5862|  4.16k|    e[31] &= 127;
 5863|  4.16k|    e[31] |= 64;
 5864|       |
 5865|  4.16k|    ge_scalarmult_base(&A, e);
 5866|       |
 5867|       |    /*
 5868|       |     * We only need the u-coordinate of the curve25519 point.
 5869|       |     * The map is u=(y+1)/(1-y). Since y=Y/Z, this gives
 5870|       |     * u=(Z+Y)/(Z-Y).
 5871|       |     */
 5872|  4.16k|    fe_add(zplusy, A.Z, A.Y);
 5873|  4.16k|    fe_sub(zminusy, A.Z, A.Y);
 5874|  4.16k|    fe_invert(zminusy_inv, zminusy);
 5875|  4.16k|    fe_mul(zplusy, zplusy, zminusy_inv);
 5876|  4.16k|    fe_tobytes(out_public_value, zplusy);
 5877|       |
 5878|  4.16k|    OPENSSL_cleanse(e, sizeof(e));
 5879|  4.16k|}
curve25519.c:ge_scalarmult_base:
 4366|  4.16k|{
 4367|  4.16k|    signed char e[64];
 4368|  4.16k|    signed char carry;
 4369|  4.16k|    ge_p1p1 r;
 4370|  4.16k|    ge_p2 s;
 4371|  4.16k|    ge_precomp t;
 4372|  4.16k|    int i;
 4373|       |
 4374|   137k|    for (i = 0; i < 32; ++i) {
  ------------------
  |  Branch (4374:17): [True: 133k, False: 4.16k]
  ------------------
 4375|   133k|        e[2 * i + 0] = (a[i] >> 0) & 15;
 4376|   133k|        e[2 * i + 1] = (a[i] >> 4) & 15;
 4377|   133k|    }
 4378|       |    /* each e[i] is between 0 and 15 */
 4379|       |    /* e[63] is between 0 and 7 */
 4380|       |
 4381|  4.16k|    carry = 0;
 4382|   266k|    for (i = 0; i < 63; ++i) {
  ------------------
  |  Branch (4382:17): [True: 262k, False: 4.16k]
  ------------------
 4383|   262k|        e[i] += carry;
 4384|   262k|        carry = e[i] + 8;
 4385|   262k|        carry >>= 4;
 4386|   262k|        e[i] -= carry << 4;
 4387|   262k|    }
 4388|  4.16k|    e[63] += carry;
 4389|       |    /* each e[i] is between -8 and 8 */
 4390|       |
 4391|  4.16k|    ge_p3_0(h);
 4392|   137k|    for (i = 1; i < 64; i += 2) {
  ------------------
  |  Branch (4392:17): [True: 133k, False: 4.16k]
  ------------------
 4393|   133k|        table_select(&t, i / 2, e[i]);
 4394|   133k|        ge_madd(&r, h, &t);
 4395|   133k|        ge_p1p1_to_p3(h, &r);
 4396|   133k|    }
 4397|       |
 4398|  4.16k|    ge_p3_dbl(&r, h);
 4399|  4.16k|    ge_p1p1_to_p2(&s, &r);
 4400|  4.16k|    ge_p2_dbl(&r, &s);
 4401|  4.16k|    ge_p1p1_to_p2(&s, &r);
 4402|  4.16k|    ge_p2_dbl(&r, &s);
 4403|  4.16k|    ge_p1p1_to_p2(&s, &r);
 4404|  4.16k|    ge_p2_dbl(&r, &s);
 4405|  4.16k|    ge_p1p1_to_p3(h, &r);
 4406|       |
 4407|   137k|    for (i = 0; i < 64; i += 2) {
  ------------------
  |  Branch (4407:17): [True: 133k, False: 4.16k]
  ------------------
 4408|   133k|        table_select(&t, i / 2, e[i]);
 4409|   133k|        ge_madd(&r, h, &t);
 4410|   133k|        ge_p1p1_to_p3(h, &r);
 4411|   133k|    }
 4412|       |
 4413|  4.16k|    OPENSSL_cleanse(e, sizeof(e));
 4414|  4.16k|}
curve25519.c:ge_p3_0:
 2046|  4.16k|{
 2047|  4.16k|    fe_0(h->X);
 2048|  4.16k|    fe_1(h->Y);
 2049|  4.16k|    fe_1(h->Z);
 2050|  4.16k|    fe_0(h->T);
 2051|  4.16k|}
curve25519.c:fe_0:
 1022|   274k|{
 1023|   274k|    memset(h, 0, sizeof(int32_t) * 10);
 1024|   274k|}
curve25519.c:fe_1:
 1028|   540k|{
 1029|   540k|    memset(h, 0, sizeof(int32_t) * 10);
 1030|   540k|    h[0] = 1;
 1031|   540k|}
curve25519.c:table_select:
 4336|   266k|{
 4337|   266k|    ge_precomp minust;
 4338|   266k|    uint8_t bnegative = negative(b);
 4339|   266k|    uint8_t babs = b - ((uint8_t)((-bnegative) & b) << 1);
 4340|       |
 4341|   266k|    ge_precomp_0(t);
 4342|   266k|    cmov(t, &k25519Precomp[pos][0], equal(babs, 1));
 4343|   266k|    cmov(t, &k25519Precomp[pos][1], equal(babs, 2));
 4344|   266k|    cmov(t, &k25519Precomp[pos][2], equal(babs, 3));
 4345|   266k|    cmov(t, &k25519Precomp[pos][3], equal(babs, 4));
 4346|   266k|    cmov(t, &k25519Precomp[pos][4], equal(babs, 5));
 4347|   266k|    cmov(t, &k25519Precomp[pos][5], equal(babs, 6));
 4348|   266k|    cmov(t, &k25519Precomp[pos][6], equal(babs, 7));
 4349|   266k|    cmov(t, &k25519Precomp[pos][7], equal(babs, 8));
 4350|   266k|    fe_copy(minust.yplusx, t->yminusx);
 4351|   266k|    fe_copy(minust.yminusx, t->yplusx);
 4352|   266k|    fe_neg(minust.xy2d, t->xy2d);
 4353|   266k|    cmov(t, &minust, bnegative);
 4354|   266k|}
curve25519.c:negative:
 4328|   266k|{
 4329|   266k|    uint32_t x = b;
 4330|       |
 4331|   266k|    x >>= 31; /* 1: yes; 0: no */
 4332|   266k|    return x;
 4333|   266k|}
curve25519.c:ge_precomp_0:
 2054|   266k|{
 2055|   266k|    fe_1(h->yplusx);
 2056|   266k|    fe_1(h->yminusx);
 2057|   266k|    fe_0(h->xy2d);
 2058|   266k|}
curve25519.c:cmov:
 2205|  2.39M|{
 2206|  2.39M|    fe_cmov(t->yplusx, u->yplusx, b);
 2207|  2.39M|    fe_cmov(t->yminusx, u->yminusx, b);
 2208|  2.39M|    fe_cmov(t->xy2d, u->xy2d, b);
 2209|  2.39M|}
curve25519.c:fe_cmov:
 1636|  7.19M|{
 1637|  7.19M|    size_t i;
 1638|       |
 1639|  7.19M|    b = 0 - b;
 1640|  79.0M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1640:17): [True: 71.9M, False: 7.19M]
  ------------------
 1641|  71.9M|        int32_t x = f[i] ^ g[i];
 1642|  71.9M|        x &= b;
 1643|  71.9M|        f[i] ^= x;
 1644|  71.9M|    }
 1645|  7.19M|}
curve25519.c:equal:
 2194|  2.13M|{
 2195|  2.13M|    uint8_t ub = b;
 2196|  2.13M|    uint8_t uc = c;
 2197|  2.13M|    uint8_t x = ub ^ uc; /* 0: yes; 1..255: no */
 2198|  2.13M|    uint32_t y = x; /* 0: yes; 1..255: no */
 2199|  2.13M|    y -= 1; /* 4294967295: yes; 0..254: no */
 2200|  2.13M|    y >>= 31; /* 1: yes; 0: no */
 2201|  2.13M|    return y;
 2202|  2.13M|}
curve25519.c:fe_copy:
 1016|   545k|{
 1017|   545k|    memmove(h, f, sizeof(int32_t) * 10);
 1018|   545k|}
curve25519.c:ge_madd:
 2125|   266k|{
 2126|   266k|    fe t0;
 2127|       |
 2128|   266k|    fe_add(r->X, p->Y, p->X);
 2129|   266k|    fe_sub(r->Y, p->Y, p->X);
 2130|   266k|    fe_mul(r->Z, r->X, q->yplusx);
 2131|   266k|    fe_mul(r->Y, r->Y, q->yminusx);
 2132|   266k|    fe_mul(r->T, q->xy2d, p->T);
 2133|   266k|    fe_add(t0, p->Z, p->Z);
 2134|   266k|    fe_sub(r->X, r->Z, r->Y);
 2135|   266k|    fe_add(r->Y, r->Z, r->Y);
 2136|   266k|    fe_add(r->Z, t0, r->T);
 2137|   266k|    fe_sub(r->T, t0, r->T);
 2138|   266k|}
curve25519.c:ge_p1p1_to_p3:
 2092|   270k|{
 2093|   270k|    fe_mul(r->X, p->X, p->T);
 2094|   270k|    fe_mul(r->Y, p->Y, p->Z);
 2095|   270k|    fe_mul(r->Z, p->Z, p->T);
 2096|   270k|    fe_mul(r->T, p->X, p->Y);
 2097|   270k|}
curve25519.c:ge_p3_dbl:
 2117|  4.16k|{
 2118|  4.16k|    ge_p2 q;
 2119|  4.16k|    ge_p3_to_p2(&q, p);
 2120|  4.16k|    ge_p2_dbl(r, &q);
 2121|  4.16k|}
curve25519.c:ge_p3_to_p2:
 2062|  4.16k|{
 2063|  4.16k|    fe_copy(r->X, p->X);
 2064|  4.16k|    fe_copy(r->Y, p->Y);
 2065|  4.16k|    fe_copy(r->Z, p->Z);
 2066|  4.16k|}
curve25519.c:ge_p1p1_to_p2:
 2084|  12.4k|{
 2085|  12.4k|    fe_mul(r->X, p->X, p->T);
 2086|  12.4k|    fe_mul(r->Y, p->Y, p->Z);
 2087|  12.4k|    fe_mul(r->Z, p->Z, p->T);
 2088|  12.4k|}
curve25519.c:ge_p2_dbl:
 2101|  16.6k|{
 2102|  16.6k|    fe t0;
 2103|       |
 2104|  16.6k|    fe_sq(r->X, p->X);
 2105|  16.6k|    fe_sq(r->Z, p->Y);
 2106|  16.6k|    fe_sq2(r->T, p->Z);
 2107|  16.6k|    fe_add(r->Y, p->X, p->Y);
 2108|  16.6k|    fe_sq(t0, r->Y);
 2109|  16.6k|    fe_add(r->Y, r->Z, r->X);
 2110|  16.6k|    fe_sub(r->Z, r->Z, r->X);
 2111|  16.6k|    fe_sub(r->X, t0, r->Y);
 2112|  16.6k|    fe_sub(r->T, r->T, r->Z);
 2113|  16.6k|}
curve25519.c:fe_sq:
 1360|  1.10M|{
 1361|  1.10M|    int32_t f0 = f[0];
 1362|  1.10M|    int32_t f1 = f[1];
 1363|  1.10M|    int32_t f2 = f[2];
 1364|  1.10M|    int32_t f3 = f[3];
 1365|  1.10M|    int32_t f4 = f[4];
 1366|  1.10M|    int32_t f5 = f[5];
 1367|  1.10M|    int32_t f6 = f[6];
 1368|  1.10M|    int32_t f7 = f[7];
 1369|  1.10M|    int32_t f8 = f[8];
 1370|  1.10M|    int32_t f9 = f[9];
 1371|  1.10M|    int32_t f0_2 = 2 * f0;
 1372|  1.10M|    int32_t f1_2 = 2 * f1;
 1373|  1.10M|    int32_t f2_2 = 2 * f2;
 1374|  1.10M|    int32_t f3_2 = 2 * f3;
 1375|  1.10M|    int32_t f4_2 = 2 * f4;
 1376|  1.10M|    int32_t f5_2 = 2 * f5;
 1377|  1.10M|    int32_t f6_2 = 2 * f6;
 1378|  1.10M|    int32_t f7_2 = 2 * f7;
 1379|  1.10M|    int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
 1380|  1.10M|    int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
 1381|  1.10M|    int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
 1382|  1.10M|    int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
 1383|  1.10M|    int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
 1384|  1.10M|    int64_t f0f0 = f0 * (int64_t)f0;
 1385|  1.10M|    int64_t f0f1_2 = f0_2 * (int64_t)f1;
 1386|  1.10M|    int64_t f0f2_2 = f0_2 * (int64_t)f2;
 1387|  1.10M|    int64_t f0f3_2 = f0_2 * (int64_t)f3;
 1388|  1.10M|    int64_t f0f4_2 = f0_2 * (int64_t)f4;
 1389|  1.10M|    int64_t f0f5_2 = f0_2 * (int64_t)f5;
 1390|  1.10M|    int64_t f0f6_2 = f0_2 * (int64_t)f6;
 1391|  1.10M|    int64_t f0f7_2 = f0_2 * (int64_t)f7;
 1392|  1.10M|    int64_t f0f8_2 = f0_2 * (int64_t)f8;
 1393|  1.10M|    int64_t f0f9_2 = f0_2 * (int64_t)f9;
 1394|  1.10M|    int64_t f1f1_2 = f1_2 * (int64_t)f1;
 1395|  1.10M|    int64_t f1f2_2 = f1_2 * (int64_t)f2;
 1396|  1.10M|    int64_t f1f3_4 = f1_2 * (int64_t)f3_2;
 1397|  1.10M|    int64_t f1f4_2 = f1_2 * (int64_t)f4;
 1398|  1.10M|    int64_t f1f5_4 = f1_2 * (int64_t)f5_2;
 1399|  1.10M|    int64_t f1f6_2 = f1_2 * (int64_t)f6;
 1400|  1.10M|    int64_t f1f7_4 = f1_2 * (int64_t)f7_2;
 1401|  1.10M|    int64_t f1f8_2 = f1_2 * (int64_t)f8;
 1402|  1.10M|    int64_t f1f9_76 = f1_2 * (int64_t)f9_38;
 1403|  1.10M|    int64_t f2f2 = f2 * (int64_t)f2;
 1404|  1.10M|    int64_t f2f3_2 = f2_2 * (int64_t)f3;
 1405|  1.10M|    int64_t f2f4_2 = f2_2 * (int64_t)f4;
 1406|  1.10M|    int64_t f2f5_2 = f2_2 * (int64_t)f5;
 1407|  1.10M|    int64_t f2f6_2 = f2_2 * (int64_t)f6;
 1408|  1.10M|    int64_t f2f7_2 = f2_2 * (int64_t)f7;
 1409|  1.10M|    int64_t f2f8_38 = f2_2 * (int64_t)f8_19;
 1410|  1.10M|    int64_t f2f9_38 = f2 * (int64_t)f9_38;
 1411|  1.10M|    int64_t f3f3_2 = f3_2 * (int64_t)f3;
 1412|  1.10M|    int64_t f3f4_2 = f3_2 * (int64_t)f4;
 1413|  1.10M|    int64_t f3f5_4 = f3_2 * (int64_t)f5_2;
 1414|  1.10M|    int64_t f3f6_2 = f3_2 * (int64_t)f6;
 1415|  1.10M|    int64_t f3f7_76 = f3_2 * (int64_t)f7_38;
 1416|  1.10M|    int64_t f3f8_38 = f3_2 * (int64_t)f8_19;
 1417|  1.10M|    int64_t f3f9_76 = f3_2 * (int64_t)f9_38;
 1418|  1.10M|    int64_t f4f4 = f4 * (int64_t)f4;
 1419|  1.10M|    int64_t f4f5_2 = f4_2 * (int64_t)f5;
 1420|  1.10M|    int64_t f4f6_38 = f4_2 * (int64_t)f6_19;
 1421|  1.10M|    int64_t f4f7_38 = f4 * (int64_t)f7_38;
 1422|  1.10M|    int64_t f4f8_38 = f4_2 * (int64_t)f8_19;
 1423|  1.10M|    int64_t f4f9_38 = f4 * (int64_t)f9_38;
 1424|  1.10M|    int64_t f5f5_38 = f5 * (int64_t)f5_38;
 1425|  1.10M|    int64_t f5f6_38 = f5_2 * (int64_t)f6_19;
 1426|  1.10M|    int64_t f5f7_76 = f5_2 * (int64_t)f7_38;
 1427|  1.10M|    int64_t f5f8_38 = f5_2 * (int64_t)f8_19;
 1428|  1.10M|    int64_t f5f9_76 = f5_2 * (int64_t)f9_38;
 1429|  1.10M|    int64_t f6f6_19 = f6 * (int64_t)f6_19;
 1430|  1.10M|    int64_t f6f7_38 = f6 * (int64_t)f7_38;
 1431|  1.10M|    int64_t f6f8_38 = f6_2 * (int64_t)f8_19;
 1432|  1.10M|    int64_t f6f9_38 = f6 * (int64_t)f9_38;
 1433|  1.10M|    int64_t f7f7_38 = f7 * (int64_t)f7_38;
 1434|  1.10M|    int64_t f7f8_38 = f7_2 * (int64_t)f8_19;
 1435|  1.10M|    int64_t f7f9_76 = f7_2 * (int64_t)f9_38;
 1436|  1.10M|    int64_t f8f8_19 = f8 * (int64_t)f8_19;
 1437|  1.10M|    int64_t f8f9_38 = f8 * (int64_t)f9_38;
 1438|  1.10M|    int64_t f9f9_38 = f9 * (int64_t)f9_38;
 1439|  1.10M|    int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
 1440|  1.10M|    int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
 1441|  1.10M|    int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
 1442|  1.10M|    int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
 1443|  1.10M|    int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
 1444|  1.10M|    int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
 1445|  1.10M|    int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
 1446|  1.10M|    int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
 1447|  1.10M|    int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
 1448|  1.10M|    int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
 1449|  1.10M|    int64_t carry0;
 1450|  1.10M|    int64_t carry1;
 1451|  1.10M|    int64_t carry2;
 1452|  1.10M|    int64_t carry3;
 1453|  1.10M|    int64_t carry4;
 1454|  1.10M|    int64_t carry5;
 1455|  1.10M|    int64_t carry6;
 1456|  1.10M|    int64_t carry7;
 1457|  1.10M|    int64_t carry8;
 1458|  1.10M|    int64_t carry9;
 1459|       |
 1460|  1.10M|    carry0 = h0 + (1 << 25);
 1461|  1.10M|    h1 += carry0 >> 26;
 1462|  1.10M|    h0 -= carry0 & kTop38Bits;
 1463|  1.10M|    carry4 = h4 + (1 << 25);
 1464|  1.10M|    h5 += carry4 >> 26;
 1465|  1.10M|    h4 -= carry4 & kTop38Bits;
 1466|       |
 1467|  1.10M|    carry1 = h1 + (1 << 24);
 1468|  1.10M|    h2 += carry1 >> 25;
 1469|  1.10M|    h1 -= carry1 & kTop39Bits;
 1470|  1.10M|    carry5 = h5 + (1 << 24);
 1471|  1.10M|    h6 += carry5 >> 25;
 1472|  1.10M|    h5 -= carry5 & kTop39Bits;
 1473|       |
 1474|  1.10M|    carry2 = h2 + (1 << 25);
 1475|  1.10M|    h3 += carry2 >> 26;
 1476|  1.10M|    h2 -= carry2 & kTop38Bits;
 1477|  1.10M|    carry6 = h6 + (1 << 25);
 1478|  1.10M|    h7 += carry6 >> 26;
 1479|  1.10M|    h6 -= carry6 & kTop38Bits;
 1480|       |
 1481|  1.10M|    carry3 = h3 + (1 << 24);
 1482|  1.10M|    h4 += carry3 >> 25;
 1483|  1.10M|    h3 -= carry3 & kTop39Bits;
 1484|  1.10M|    carry7 = h7 + (1 << 24);
 1485|  1.10M|    h8 += carry7 >> 25;
 1486|  1.10M|    h7 -= carry7 & kTop39Bits;
 1487|       |
 1488|  1.10M|    carry4 = h4 + (1 << 25);
 1489|  1.10M|    h5 += carry4 >> 26;
 1490|  1.10M|    h4 -= carry4 & kTop38Bits;
 1491|  1.10M|    carry8 = h8 + (1 << 25);
 1492|  1.10M|    h9 += carry8 >> 26;
 1493|  1.10M|    h8 -= carry8 & kTop38Bits;
 1494|       |
 1495|  1.10M|    carry9 = h9 + (1 << 24);
 1496|  1.10M|    h0 += (carry9 >> 25) * 19;
 1497|  1.10M|    h9 -= carry9 & kTop39Bits;
 1498|       |
 1499|  1.10M|    carry0 = h0 + (1 << 25);
 1500|  1.10M|    h1 += carry0 >> 26;
 1501|  1.10M|    h0 -= carry0 & kTop38Bits;
 1502|       |
 1503|  1.10M|    h[0] = (int32_t)h0;
 1504|  1.10M|    h[1] = (int32_t)h1;
 1505|  1.10M|    h[2] = (int32_t)h2;
 1506|  1.10M|    h[3] = (int32_t)h3;
 1507|  1.10M|    h[4] = (int32_t)h4;
 1508|  1.10M|    h[5] = (int32_t)h5;
 1509|  1.10M|    h[6] = (int32_t)h6;
 1510|  1.10M|    h[7] = (int32_t)h7;
 1511|  1.10M|    h[8] = (int32_t)h8;
 1512|  1.10M|    h[9] = (int32_t)h9;
 1513|  1.10M|}
curve25519.c:fe_sq2:
 1693|  16.6k|{
 1694|  16.6k|    int32_t f0 = f[0];
 1695|  16.6k|    int32_t f1 = f[1];
 1696|  16.6k|    int32_t f2 = f[2];
 1697|  16.6k|    int32_t f3 = f[3];
 1698|  16.6k|    int32_t f4 = f[4];
 1699|  16.6k|    int32_t f5 = f[5];
 1700|  16.6k|    int32_t f6 = f[6];
 1701|  16.6k|    int32_t f7 = f[7];
 1702|  16.6k|    int32_t f8 = f[8];
 1703|  16.6k|    int32_t f9 = f[9];
 1704|  16.6k|    int32_t f0_2 = 2 * f0;
 1705|  16.6k|    int32_t f1_2 = 2 * f1;
 1706|  16.6k|    int32_t f2_2 = 2 * f2;
 1707|  16.6k|    int32_t f3_2 = 2 * f3;
 1708|  16.6k|    int32_t f4_2 = 2 * f4;
 1709|  16.6k|    int32_t f5_2 = 2 * f5;
 1710|  16.6k|    int32_t f6_2 = 2 * f6;
 1711|  16.6k|    int32_t f7_2 = 2 * f7;
 1712|  16.6k|    int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
 1713|  16.6k|    int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
 1714|  16.6k|    int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
 1715|  16.6k|    int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
 1716|  16.6k|    int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
 1717|  16.6k|    int64_t f0f0 = f0 * (int64_t)f0;
 1718|  16.6k|    int64_t f0f1_2 = f0_2 * (int64_t)f1;
 1719|  16.6k|    int64_t f0f2_2 = f0_2 * (int64_t)f2;
 1720|  16.6k|    int64_t f0f3_2 = f0_2 * (int64_t)f3;
 1721|  16.6k|    int64_t f0f4_2 = f0_2 * (int64_t)f4;
 1722|  16.6k|    int64_t f0f5_2 = f0_2 * (int64_t)f5;
 1723|  16.6k|    int64_t f0f6_2 = f0_2 * (int64_t)f6;
 1724|  16.6k|    int64_t f0f7_2 = f0_2 * (int64_t)f7;
 1725|  16.6k|    int64_t f0f8_2 = f0_2 * (int64_t)f8;
 1726|  16.6k|    int64_t f0f9_2 = f0_2 * (int64_t)f9;
 1727|  16.6k|    int64_t f1f1_2 = f1_2 * (int64_t)f1;
 1728|  16.6k|    int64_t f1f2_2 = f1_2 * (int64_t)f2;
 1729|  16.6k|    int64_t f1f3_4 = f1_2 * (int64_t)f3_2;
 1730|  16.6k|    int64_t f1f4_2 = f1_2 * (int64_t)f4;
 1731|  16.6k|    int64_t f1f5_4 = f1_2 * (int64_t)f5_2;
 1732|  16.6k|    int64_t f1f6_2 = f1_2 * (int64_t)f6;
 1733|  16.6k|    int64_t f1f7_4 = f1_2 * (int64_t)f7_2;
 1734|  16.6k|    int64_t f1f8_2 = f1_2 * (int64_t)f8;
 1735|  16.6k|    int64_t f1f9_76 = f1_2 * (int64_t)f9_38;
 1736|  16.6k|    int64_t f2f2 = f2 * (int64_t)f2;
 1737|  16.6k|    int64_t f2f3_2 = f2_2 * (int64_t)f3;
 1738|  16.6k|    int64_t f2f4_2 = f2_2 * (int64_t)f4;
 1739|  16.6k|    int64_t f2f5_2 = f2_2 * (int64_t)f5;
 1740|  16.6k|    int64_t f2f6_2 = f2_2 * (int64_t)f6;
 1741|  16.6k|    int64_t f2f7_2 = f2_2 * (int64_t)f7;
 1742|  16.6k|    int64_t f2f8_38 = f2_2 * (int64_t)f8_19;
 1743|  16.6k|    int64_t f2f9_38 = f2 * (int64_t)f9_38;
 1744|  16.6k|    int64_t f3f3_2 = f3_2 * (int64_t)f3;
 1745|  16.6k|    int64_t f3f4_2 = f3_2 * (int64_t)f4;
 1746|  16.6k|    int64_t f3f5_4 = f3_2 * (int64_t)f5_2;
 1747|  16.6k|    int64_t f3f6_2 = f3_2 * (int64_t)f6;
 1748|  16.6k|    int64_t f3f7_76 = f3_2 * (int64_t)f7_38;
 1749|  16.6k|    int64_t f3f8_38 = f3_2 * (int64_t)f8_19;
 1750|  16.6k|    int64_t f3f9_76 = f3_2 * (int64_t)f9_38;
 1751|  16.6k|    int64_t f4f4 = f4 * (int64_t)f4;
 1752|  16.6k|    int64_t f4f5_2 = f4_2 * (int64_t)f5;
 1753|  16.6k|    int64_t f4f6_38 = f4_2 * (int64_t)f6_19;
 1754|  16.6k|    int64_t f4f7_38 = f4 * (int64_t)f7_38;
 1755|  16.6k|    int64_t f4f8_38 = f4_2 * (int64_t)f8_19;
 1756|  16.6k|    int64_t f4f9_38 = f4 * (int64_t)f9_38;
 1757|  16.6k|    int64_t f5f5_38 = f5 * (int64_t)f5_38;
 1758|  16.6k|    int64_t f5f6_38 = f5_2 * (int64_t)f6_19;
 1759|  16.6k|    int64_t f5f7_76 = f5_2 * (int64_t)f7_38;
 1760|  16.6k|    int64_t f5f8_38 = f5_2 * (int64_t)f8_19;
 1761|  16.6k|    int64_t f5f9_76 = f5_2 * (int64_t)f9_38;
 1762|  16.6k|    int64_t f6f6_19 = f6 * (int64_t)f6_19;
 1763|  16.6k|    int64_t f6f7_38 = f6 * (int64_t)f7_38;
 1764|  16.6k|    int64_t f6f8_38 = f6_2 * (int64_t)f8_19;
 1765|  16.6k|    int64_t f6f9_38 = f6 * (int64_t)f9_38;
 1766|  16.6k|    int64_t f7f7_38 = f7 * (int64_t)f7_38;
 1767|  16.6k|    int64_t f7f8_38 = f7_2 * (int64_t)f8_19;
 1768|  16.6k|    int64_t f7f9_76 = f7_2 * (int64_t)f9_38;
 1769|  16.6k|    int64_t f8f8_19 = f8 * (int64_t)f8_19;
 1770|  16.6k|    int64_t f8f9_38 = f8 * (int64_t)f9_38;
 1771|  16.6k|    int64_t f9f9_38 = f9 * (int64_t)f9_38;
 1772|  16.6k|    int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
 1773|  16.6k|    int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
 1774|  16.6k|    int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
 1775|  16.6k|    int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
 1776|  16.6k|    int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
 1777|  16.6k|    int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
 1778|  16.6k|    int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
 1779|  16.6k|    int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
 1780|  16.6k|    int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
 1781|  16.6k|    int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
 1782|  16.6k|    int64_t carry0;
 1783|  16.6k|    int64_t carry1;
 1784|  16.6k|    int64_t carry2;
 1785|  16.6k|    int64_t carry3;
 1786|  16.6k|    int64_t carry4;
 1787|  16.6k|    int64_t carry5;
 1788|  16.6k|    int64_t carry6;
 1789|  16.6k|    int64_t carry7;
 1790|  16.6k|    int64_t carry8;
 1791|  16.6k|    int64_t carry9;
 1792|       |
 1793|  16.6k|    h0 += h0;
 1794|  16.6k|    h1 += h1;
 1795|  16.6k|    h2 += h2;
 1796|  16.6k|    h3 += h3;
 1797|  16.6k|    h4 += h4;
 1798|  16.6k|    h5 += h5;
 1799|  16.6k|    h6 += h6;
 1800|  16.6k|    h7 += h7;
 1801|  16.6k|    h8 += h8;
 1802|  16.6k|    h9 += h9;
 1803|       |
 1804|  16.6k|    carry0 = h0 + (1 << 25);
 1805|  16.6k|    h1 += carry0 >> 26;
 1806|  16.6k|    h0 -= carry0 & kTop38Bits;
 1807|  16.6k|    carry4 = h4 + (1 << 25);
 1808|  16.6k|    h5 += carry4 >> 26;
 1809|  16.6k|    h4 -= carry4 & kTop38Bits;
 1810|       |
 1811|  16.6k|    carry1 = h1 + (1 << 24);
 1812|  16.6k|    h2 += carry1 >> 25;
 1813|  16.6k|    h1 -= carry1 & kTop39Bits;
 1814|  16.6k|    carry5 = h5 + (1 << 24);
 1815|  16.6k|    h6 += carry5 >> 25;
 1816|  16.6k|    h5 -= carry5 & kTop39Bits;
 1817|       |
 1818|  16.6k|    carry2 = h2 + (1 << 25);
 1819|  16.6k|    h3 += carry2 >> 26;
 1820|  16.6k|    h2 -= carry2 & kTop38Bits;
 1821|  16.6k|    carry6 = h6 + (1 << 25);
 1822|  16.6k|    h7 += carry6 >> 26;
 1823|  16.6k|    h6 -= carry6 & kTop38Bits;
 1824|       |
 1825|  16.6k|    carry3 = h3 + (1 << 24);
 1826|  16.6k|    h4 += carry3 >> 25;
 1827|  16.6k|    h3 -= carry3 & kTop39Bits;
 1828|  16.6k|    carry7 = h7 + (1 << 24);
 1829|  16.6k|    h8 += carry7 >> 25;
 1830|  16.6k|    h7 -= carry7 & kTop39Bits;
 1831|       |
 1832|  16.6k|    carry4 = h4 + (1 << 25);
 1833|  16.6k|    h5 += carry4 >> 26;
 1834|  16.6k|    h4 -= carry4 & kTop38Bits;
 1835|  16.6k|    carry8 = h8 + (1 << 25);
 1836|  16.6k|    h9 += carry8 >> 26;
 1837|  16.6k|    h8 -= carry8 & kTop38Bits;
 1838|       |
 1839|  16.6k|    carry9 = h9 + (1 << 24);
 1840|  16.6k|    h0 += (carry9 >> 25) * 19;
 1841|  16.6k|    h9 -= carry9 & kTop39Bits;
 1842|       |
 1843|  16.6k|    carry0 = h0 + (1 << 25);
 1844|  16.6k|    h1 += carry0 >> 26;
 1845|  16.6k|    h0 -= carry0 & kTop38Bits;
 1846|       |
 1847|  16.6k|    h[0] = (int32_t)h0;
 1848|  16.6k|    h[1] = (int32_t)h1;
 1849|  16.6k|    h[2] = (int32_t)h2;
 1850|  16.6k|    h[3] = (int32_t)h3;
 1851|  16.6k|    h[4] = (int32_t)h4;
 1852|  16.6k|    h[5] = (int32_t)h5;
 1853|  16.6k|    h[6] = (int32_t)h6;
 1854|  16.6k|    h[7] = (int32_t)h7;
 1855|  16.6k|    h[8] = (int32_t)h8;
 1856|  16.6k|    h[9] = (int32_t)h9;
 1857|  16.6k|}
curve25519.c:fe_neg:
 1621|   266k|{
 1622|   266k|    unsigned i;
 1623|       |
 1624|  2.92M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1624:17): [True: 2.66M, False: 266k]
  ------------------
 1625|  2.66M|        h[i] = -f[i];
 1626|  2.66M|    }
 1627|   266k|}
curve25519.c:fe_add:
 1046|  1.10M|{
 1047|  1.10M|    unsigned i;
 1048|       |
 1049|  12.1M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1049:17): [True: 11.0M, False: 1.10M]
  ------------------
 1050|  11.0M|        h[i] = f[i] + g[i];
 1051|  11.0M|    }
 1052|  1.10M|}
curve25519.c:fe_sub:
 1067|   853k|{
 1068|   853k|    unsigned i;
 1069|       |
 1070|  9.38M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1070:17): [True: 8.53M, False: 853k]
  ------------------
 1071|  8.53M|        h[i] = f[i] - g[i];
 1072|  8.53M|    }
 1073|   853k|}
curve25519.c:fe_invert:
 1516|  4.16k|{
 1517|  4.16k|    fe t0;
 1518|  4.16k|    fe t1;
 1519|  4.16k|    fe t2;
 1520|  4.16k|    fe t3;
 1521|  4.16k|    int i;
 1522|       |
 1523|       |    /*
 1524|       |     * Compute z ** -1 = z ** (2 ** 255 - 19 - 2) with the exponent as
 1525|       |     * 2 ** 255 - 21 = (2 ** 5) * (2 ** 250 - 1) + 11.
 1526|       |     */
 1527|       |
 1528|       |    /* t0 = z ** 2 */
 1529|  4.16k|    fe_sq(t0, z);
 1530|       |
 1531|       |    /* t1 = t0 ** (2 ** 2) = z ** 8 */
 1532|  4.16k|    fe_sq(t1, t0);
 1533|  4.16k|    fe_sq(t1, t1);
 1534|       |
 1535|       |    /* t1 = z * t1 = z ** 9 */
 1536|  4.16k|    fe_mul(t1, z, t1);
 1537|       |    /* t0 = t0 * t1 = z ** 11 -- stash t0 away for the end. */
 1538|  4.16k|    fe_mul(t0, t0, t1);
 1539|       |
 1540|       |    /* t2 = t0 ** 2 = z ** 22 */
 1541|  4.16k|    fe_sq(t2, t0);
 1542|       |
 1543|       |    /* t1 = t1 * t2 = z ** (2 ** 5 - 1) */
 1544|  4.16k|    fe_mul(t1, t1, t2);
 1545|       |
 1546|       |    /* t2 = t1 ** (2 ** 5) = z ** ((2 ** 5) * (2 ** 5 - 1)) */
 1547|  4.16k|    fe_sq(t2, t1);
 1548|  20.8k|    for (i = 1; i < 5; ++i) {
  ------------------
  |  Branch (1548:17): [True: 16.6k, False: 4.16k]
  ------------------
 1549|  16.6k|        fe_sq(t2, t2);
 1550|  16.6k|    }
 1551|       |
 1552|       |    /* t1 = t1 * t2 = z ** ((2 ** 5 + 1) * (2 ** 5 - 1)) = z ** (2 ** 10 - 1) */
 1553|  4.16k|    fe_mul(t1, t2, t1);
 1554|       |
 1555|       |    /* Continuing similarly... */
 1556|       |
 1557|       |    /* t2 = z ** (2 ** 20 - 1) */
 1558|  4.16k|    fe_sq(t2, t1);
 1559|  41.6k|    for (i = 1; i < 10; ++i) {
  ------------------
  |  Branch (1559:17): [True: 37.4k, False: 4.16k]
  ------------------
 1560|  37.4k|        fe_sq(t2, t2);
 1561|  37.4k|    }
 1562|  4.16k|    fe_mul(t2, t2, t1);
 1563|       |
 1564|       |    /* t2 = z ** (2 ** 40 - 1) */
 1565|  4.16k|    fe_sq(t3, t2);
 1566|  83.2k|    for (i = 1; i < 20; ++i) {
  ------------------
  |  Branch (1566:17): [True: 79.0k, False: 4.16k]
  ------------------
 1567|  79.0k|        fe_sq(t3, t3);
 1568|  79.0k|    }
 1569|  4.16k|    fe_mul(t2, t3, t2);
 1570|       |
 1571|       |    /* t2 = z ** (2 ** 10) * (2 ** 40 - 1) */
 1572|  45.7k|    for (i = 0; i < 10; ++i) {
  ------------------
  |  Branch (1572:17): [True: 41.6k, False: 4.16k]
  ------------------
 1573|  41.6k|        fe_sq(t2, t2);
 1574|  41.6k|    }
 1575|       |    /* t1 = z ** (2 ** 50 - 1) */
 1576|  4.16k|    fe_mul(t1, t2, t1);
 1577|       |
 1578|       |    /* t2 = z ** (2 ** 100 - 1) */
 1579|  4.16k|    fe_sq(t2, t1);
 1580|   208k|    for (i = 1; i < 50; ++i) {
  ------------------
  |  Branch (1580:17): [True: 203k, False: 4.16k]
  ------------------
 1581|   203k|        fe_sq(t2, t2);
 1582|   203k|    }
 1583|  4.16k|    fe_mul(t2, t2, t1);
 1584|       |
 1585|       |    /* t2 = z ** (2 ** 200 - 1) */
 1586|  4.16k|    fe_sq(t3, t2);
 1587|   416k|    for (i = 1; i < 100; ++i) {
  ------------------
  |  Branch (1587:17): [True: 411k, False: 4.16k]
  ------------------
 1588|   411k|        fe_sq(t3, t3);
 1589|   411k|    }
 1590|  4.16k|    fe_mul(t2, t3, t2);
 1591|       |
 1592|       |    /* t2 = z ** ((2 ** 50) * (2 ** 200 - 1) */
 1593|  4.16k|    fe_sq(t2, t2);
 1594|   208k|    for (i = 1; i < 50; ++i) {
  ------------------
  |  Branch (1594:17): [True: 203k, False: 4.16k]
  ------------------
 1595|   203k|        fe_sq(t2, t2);
 1596|   203k|    }
 1597|       |
 1598|       |    /* t1 = z ** (2 ** 250 - 1) */
 1599|  4.16k|    fe_mul(t1, t2, t1);
 1600|       |
 1601|       |    /* t1 = z ** ((2 ** 5) * (2 ** 250 - 1)) */
 1602|  4.16k|    fe_sq(t1, t1);
 1603|  20.8k|    for (i = 1; i < 5; ++i) {
  ------------------
  |  Branch (1603:17): [True: 16.6k, False: 4.16k]
  ------------------
 1604|  16.6k|        fe_sq(t1, t1);
 1605|  16.6k|    }
 1606|       |
 1607|       |    /* Recall t0 = z ** 11; out = z ** (2 ** 255 - 21) */
 1608|  4.16k|    fe_mul(out, t1, t0);
 1609|  4.16k|}
curve25519.c:fe_mul:
 1106|  1.96M|{
 1107|  1.96M|    int32_t f0 = f[0];
 1108|  1.96M|    int32_t f1 = f[1];
 1109|  1.96M|    int32_t f2 = f[2];
 1110|  1.96M|    int32_t f3 = f[3];
 1111|  1.96M|    int32_t f4 = f[4];
 1112|  1.96M|    int32_t f5 = f[5];
 1113|  1.96M|    int32_t f6 = f[6];
 1114|  1.96M|    int32_t f7 = f[7];
 1115|  1.96M|    int32_t f8 = f[8];
 1116|  1.96M|    int32_t f9 = f[9];
 1117|  1.96M|    int32_t g0 = g[0];
 1118|  1.96M|    int32_t g1 = g[1];
 1119|  1.96M|    int32_t g2 = g[2];
 1120|  1.96M|    int32_t g3 = g[3];
 1121|  1.96M|    int32_t g4 = g[4];
 1122|  1.96M|    int32_t g5 = g[5];
 1123|  1.96M|    int32_t g6 = g[6];
 1124|  1.96M|    int32_t g7 = g[7];
 1125|  1.96M|    int32_t g8 = g[8];
 1126|  1.96M|    int32_t g9 = g[9];
 1127|  1.96M|    int32_t g1_19 = 19 * g1; /* 1.959375*2^29 */
 1128|  1.96M|    int32_t g2_19 = 19 * g2; /* 1.959375*2^30; still ok */
 1129|  1.96M|    int32_t g3_19 = 19 * g3;
 1130|  1.96M|    int32_t g4_19 = 19 * g4;
 1131|  1.96M|    int32_t g5_19 = 19 * g5;
 1132|  1.96M|    int32_t g6_19 = 19 * g6;
 1133|  1.96M|    int32_t g7_19 = 19 * g7;
 1134|  1.96M|    int32_t g8_19 = 19 * g8;
 1135|  1.96M|    int32_t g9_19 = 19 * g9;
 1136|  1.96M|    int32_t f1_2 = 2 * f1;
 1137|  1.96M|    int32_t f3_2 = 2 * f3;
 1138|  1.96M|    int32_t f5_2 = 2 * f5;
 1139|  1.96M|    int32_t f7_2 = 2 * f7;
 1140|  1.96M|    int32_t f9_2 = 2 * f9;
 1141|  1.96M|    int64_t f0g0 = f0 * (int64_t)g0;
 1142|  1.96M|    int64_t f0g1 = f0 * (int64_t)g1;
 1143|  1.96M|    int64_t f0g2 = f0 * (int64_t)g2;
 1144|  1.96M|    int64_t f0g3 = f0 * (int64_t)g3;
 1145|  1.96M|    int64_t f0g4 = f0 * (int64_t)g4;
 1146|  1.96M|    int64_t f0g5 = f0 * (int64_t)g5;
 1147|  1.96M|    int64_t f0g6 = f0 * (int64_t)g6;
 1148|  1.96M|    int64_t f0g7 = f0 * (int64_t)g7;
 1149|  1.96M|    int64_t f0g8 = f0 * (int64_t)g8;
 1150|  1.96M|    int64_t f0g9 = f0 * (int64_t)g9;
 1151|  1.96M|    int64_t f1g0 = f1 * (int64_t)g0;
 1152|  1.96M|    int64_t f1g1_2 = f1_2 * (int64_t)g1;
 1153|  1.96M|    int64_t f1g2 = f1 * (int64_t)g2;
 1154|  1.96M|    int64_t f1g3_2 = f1_2 * (int64_t)g3;
 1155|  1.96M|    int64_t f1g4 = f1 * (int64_t)g4;
 1156|  1.96M|    int64_t f1g5_2 = f1_2 * (int64_t)g5;
 1157|  1.96M|    int64_t f1g6 = f1 * (int64_t)g6;
 1158|  1.96M|    int64_t f1g7_2 = f1_2 * (int64_t)g7;
 1159|  1.96M|    int64_t f1g8 = f1 * (int64_t)g8;
 1160|  1.96M|    int64_t f1g9_38 = f1_2 * (int64_t)g9_19;
 1161|  1.96M|    int64_t f2g0 = f2 * (int64_t)g0;
 1162|  1.96M|    int64_t f2g1 = f2 * (int64_t)g1;
 1163|  1.96M|    int64_t f2g2 = f2 * (int64_t)g2;
 1164|  1.96M|    int64_t f2g3 = f2 * (int64_t)g3;
 1165|  1.96M|    int64_t f2g4 = f2 * (int64_t)g4;
 1166|  1.96M|    int64_t f2g5 = f2 * (int64_t)g5;
 1167|  1.96M|    int64_t f2g6 = f2 * (int64_t)g6;
 1168|  1.96M|    int64_t f2g7 = f2 * (int64_t)g7;
 1169|  1.96M|    int64_t f2g8_19 = f2 * (int64_t)g8_19;
 1170|  1.96M|    int64_t f2g9_19 = f2 * (int64_t)g9_19;
 1171|  1.96M|    int64_t f3g0 = f3 * (int64_t)g0;
 1172|  1.96M|    int64_t f3g1_2 = f3_2 * (int64_t)g1;
 1173|  1.96M|    int64_t f3g2 = f3 * (int64_t)g2;
 1174|  1.96M|    int64_t f3g3_2 = f3_2 * (int64_t)g3;
 1175|  1.96M|    int64_t f3g4 = f3 * (int64_t)g4;
 1176|  1.96M|    int64_t f3g5_2 = f3_2 * (int64_t)g5;
 1177|  1.96M|    int64_t f3g6 = f3 * (int64_t)g6;
 1178|  1.96M|    int64_t f3g7_38 = f3_2 * (int64_t)g7_19;
 1179|  1.96M|    int64_t f3g8_19 = f3 * (int64_t)g8_19;
 1180|  1.96M|    int64_t f3g9_38 = f3_2 * (int64_t)g9_19;
 1181|  1.96M|    int64_t f4g0 = f4 * (int64_t)g0;
 1182|  1.96M|    int64_t f4g1 = f4 * (int64_t)g1;
 1183|  1.96M|    int64_t f4g2 = f4 * (int64_t)g2;
 1184|  1.96M|    int64_t f4g3 = f4 * (int64_t)g3;
 1185|  1.96M|    int64_t f4g4 = f4 * (int64_t)g4;
 1186|  1.96M|    int64_t f4g5 = f4 * (int64_t)g5;
 1187|  1.96M|    int64_t f4g6_19 = f4 * (int64_t)g6_19;
 1188|  1.96M|    int64_t f4g7_19 = f4 * (int64_t)g7_19;
 1189|  1.96M|    int64_t f4g8_19 = f4 * (int64_t)g8_19;
 1190|  1.96M|    int64_t f4g9_19 = f4 * (int64_t)g9_19;
 1191|  1.96M|    int64_t f5g0 = f5 * (int64_t)g0;
 1192|  1.96M|    int64_t f5g1_2 = f5_2 * (int64_t)g1;
 1193|  1.96M|    int64_t f5g2 = f5 * (int64_t)g2;
 1194|  1.96M|    int64_t f5g3_2 = f5_2 * (int64_t)g3;
 1195|  1.96M|    int64_t f5g4 = f5 * (int64_t)g4;
 1196|  1.96M|    int64_t f5g5_38 = f5_2 * (int64_t)g5_19;
 1197|  1.96M|    int64_t f5g6_19 = f5 * (int64_t)g6_19;
 1198|  1.96M|    int64_t f5g7_38 = f5_2 * (int64_t)g7_19;
 1199|  1.96M|    int64_t f5g8_19 = f5 * (int64_t)g8_19;
 1200|  1.96M|    int64_t f5g9_38 = f5_2 * (int64_t)g9_19;
 1201|  1.96M|    int64_t f6g0 = f6 * (int64_t)g0;
 1202|  1.96M|    int64_t f6g1 = f6 * (int64_t)g1;
 1203|  1.96M|    int64_t f6g2 = f6 * (int64_t)g2;
 1204|  1.96M|    int64_t f6g3 = f6 * (int64_t)g3;
 1205|  1.96M|    int64_t f6g4_19 = f6 * (int64_t)g4_19;
 1206|  1.96M|    int64_t f6g5_19 = f6 * (int64_t)g5_19;
 1207|  1.96M|    int64_t f6g6_19 = f6 * (int64_t)g6_19;
 1208|  1.96M|    int64_t f6g7_19 = f6 * (int64_t)g7_19;
 1209|  1.96M|    int64_t f6g8_19 = f6 * (int64_t)g8_19;
 1210|  1.96M|    int64_t f6g9_19 = f6 * (int64_t)g9_19;
 1211|  1.96M|    int64_t f7g0 = f7 * (int64_t)g0;
 1212|  1.96M|    int64_t f7g1_2 = f7_2 * (int64_t)g1;
 1213|  1.96M|    int64_t f7g2 = f7 * (int64_t)g2;
 1214|  1.96M|    int64_t f7g3_38 = f7_2 * (int64_t)g3_19;
 1215|  1.96M|    int64_t f7g4_19 = f7 * (int64_t)g4_19;
 1216|  1.96M|    int64_t f7g5_38 = f7_2 * (int64_t)g5_19;
 1217|  1.96M|    int64_t f7g6_19 = f7 * (int64_t)g6_19;
 1218|  1.96M|    int64_t f7g7_38 = f7_2 * (int64_t)g7_19;
 1219|  1.96M|    int64_t f7g8_19 = f7 * (int64_t)g8_19;
 1220|  1.96M|    int64_t f7g9_38 = f7_2 * (int64_t)g9_19;
 1221|  1.96M|    int64_t f8g0 = f8 * (int64_t)g0;
 1222|  1.96M|    int64_t f8g1 = f8 * (int64_t)g1;
 1223|  1.96M|    int64_t f8g2_19 = f8 * (int64_t)g2_19;
 1224|  1.96M|    int64_t f8g3_19 = f8 * (int64_t)g3_19;
 1225|  1.96M|    int64_t f8g4_19 = f8 * (int64_t)g4_19;
 1226|  1.96M|    int64_t f8g5_19 = f8 * (int64_t)g5_19;
 1227|  1.96M|    int64_t f8g6_19 = f8 * (int64_t)g6_19;
 1228|  1.96M|    int64_t f8g7_19 = f8 * (int64_t)g7_19;
 1229|  1.96M|    int64_t f8g8_19 = f8 * (int64_t)g8_19;
 1230|  1.96M|    int64_t f8g9_19 = f8 * (int64_t)g9_19;
 1231|  1.96M|    int64_t f9g0 = f9 * (int64_t)g0;
 1232|  1.96M|    int64_t f9g1_38 = f9_2 * (int64_t)g1_19;
 1233|  1.96M|    int64_t f9g2_19 = f9 * (int64_t)g2_19;
 1234|  1.96M|    int64_t f9g3_38 = f9_2 * (int64_t)g3_19;
 1235|  1.96M|    int64_t f9g4_19 = f9 * (int64_t)g4_19;
 1236|  1.96M|    int64_t f9g5_38 = f9_2 * (int64_t)g5_19;
 1237|  1.96M|    int64_t f9g6_19 = f9 * (int64_t)g6_19;
 1238|  1.96M|    int64_t f9g7_38 = f9_2 * (int64_t)g7_19;
 1239|  1.96M|    int64_t f9g8_19 = f9 * (int64_t)g8_19;
 1240|  1.96M|    int64_t f9g9_38 = f9_2 * (int64_t)g9_19;
 1241|  1.96M|    int64_t h0 = f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 + f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38;
 1242|  1.96M|    int64_t h1 = f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 + f7g4_19 + f8g3_19 + f9g2_19;
 1243|  1.96M|    int64_t h2 = f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 + f7g5_38 + f8g4_19 + f9g3_38;
 1244|  1.96M|    int64_t h3 = f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 + f7g6_19 + f8g5_19 + f9g4_19;
 1245|  1.96M|    int64_t h4 = f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 + f7g7_38 + f8g6_19 + f9g5_38;
 1246|  1.96M|    int64_t h5 = f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 + f8g7_19 + f9g6_19;
 1247|  1.96M|    int64_t h6 = f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 + f7g9_38 + f8g8_19 + f9g7_38;
 1248|  1.96M|    int64_t h7 = f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 + f8g9_19 + f9g8_19;
 1249|  1.96M|    int64_t h8 = f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 + f8g0 + f9g9_38;
 1250|  1.96M|    int64_t h9 = f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0;
 1251|  1.96M|    int64_t carry0;
 1252|  1.96M|    int64_t carry1;
 1253|  1.96M|    int64_t carry2;
 1254|  1.96M|    int64_t carry3;
 1255|  1.96M|    int64_t carry4;
 1256|  1.96M|    int64_t carry5;
 1257|  1.96M|    int64_t carry6;
 1258|  1.96M|    int64_t carry7;
 1259|  1.96M|    int64_t carry8;
 1260|  1.96M|    int64_t carry9;
 1261|       |
 1262|       |    /* |h0| <= (1.65*1.65*2^52*(1+19+19+19+19)+1.65*1.65*2^50*(38+38+38+38+38))
 1263|       |     *   i.e. |h0| <= 1.4*2^60; narrower ranges for h2, h4, h6, h8
 1264|       |     * |h1| <= (1.65*1.65*2^51*(1+1+19+19+19+19+19+19+19+19))
 1265|       |     *   i.e. |h1| <= 1.7*2^59; narrower ranges for h3, h5, h7, h9 */
 1266|       |
 1267|  1.96M|    carry0 = h0 + (1 << 25);
 1268|  1.96M|    h1 += carry0 >> 26;
 1269|  1.96M|    h0 -= carry0 & kTop38Bits;
 1270|  1.96M|    carry4 = h4 + (1 << 25);
 1271|  1.96M|    h5 += carry4 >> 26;
 1272|  1.96M|    h4 -= carry4 & kTop38Bits;
 1273|       |    /* |h0| <= 2^25 */
 1274|       |    /* |h4| <= 2^25 */
 1275|       |    /* |h1| <= 1.71*2^59 */
 1276|       |    /* |h5| <= 1.71*2^59 */
 1277|       |
 1278|  1.96M|    carry1 = h1 + (1 << 24);
 1279|  1.96M|    h2 += carry1 >> 25;
 1280|  1.96M|    h1 -= carry1 & kTop39Bits;
 1281|  1.96M|    carry5 = h5 + (1 << 24);
 1282|  1.96M|    h6 += carry5 >> 25;
 1283|  1.96M|    h5 -= carry5 & kTop39Bits;
 1284|       |    /* |h1| <= 2^24; from now on fits into int32 */
 1285|       |    /* |h5| <= 2^24; from now on fits into int32 */
 1286|       |    /* |h2| <= 1.41*2^60 */
 1287|       |    /* |h6| <= 1.41*2^60 */
 1288|       |
 1289|  1.96M|    carry2 = h2 + (1 << 25);
 1290|  1.96M|    h3 += carry2 >> 26;
 1291|  1.96M|    h2 -= carry2 & kTop38Bits;
 1292|  1.96M|    carry6 = h6 + (1 << 25);
 1293|  1.96M|    h7 += carry6 >> 26;
 1294|  1.96M|    h6 -= carry6 & kTop38Bits;
 1295|       |    /* |h2| <= 2^25; from now on fits into int32 unchanged */
 1296|       |    /* |h6| <= 2^25; from now on fits into int32 unchanged */
 1297|       |    /* |h3| <= 1.71*2^59 */
 1298|       |    /* |h7| <= 1.71*2^59 */
 1299|       |
 1300|  1.96M|    carry3 = h3 + (1 << 24);
 1301|  1.96M|    h4 += carry3 >> 25;
 1302|  1.96M|    h3 -= carry3 & kTop39Bits;
 1303|  1.96M|    carry7 = h7 + (1 << 24);
 1304|  1.96M|    h8 += carry7 >> 25;
 1305|  1.96M|    h7 -= carry7 & kTop39Bits;
 1306|       |    /* |h3| <= 2^24; from now on fits into int32 unchanged */
 1307|       |    /* |h7| <= 2^24; from now on fits into int32 unchanged */
 1308|       |    /* |h4| <= 1.72*2^34 */
 1309|       |    /* |h8| <= 1.41*2^60 */
 1310|       |
 1311|  1.96M|    carry4 = h4 + (1 << 25);
 1312|  1.96M|    h5 += carry4 >> 26;
 1313|  1.96M|    h4 -= carry4 & kTop38Bits;
 1314|  1.96M|    carry8 = h8 + (1 << 25);
 1315|  1.96M|    h9 += carry8 >> 26;
 1316|  1.96M|    h8 -= carry8 & kTop38Bits;
 1317|       |    /* |h4| <= 2^25; from now on fits into int32 unchanged */
 1318|       |    /* |h8| <= 2^25; from now on fits into int32 unchanged */
 1319|       |    /* |h5| <= 1.01*2^24 */
 1320|       |    /* |h9| <= 1.71*2^59 */
 1321|       |
 1322|  1.96M|    carry9 = h9 + (1 << 24);
 1323|  1.96M|    h0 += (carry9 >> 25) * 19;
 1324|  1.96M|    h9 -= carry9 & kTop39Bits;
 1325|       |    /* |h9| <= 2^24; from now on fits into int32 unchanged */
 1326|       |    /* |h0| <= 1.1*2^39 */
 1327|       |
 1328|  1.96M|    carry0 = h0 + (1 << 25);
 1329|  1.96M|    h1 += carry0 >> 26;
 1330|  1.96M|    h0 -= carry0 & kTop38Bits;
 1331|       |    /* |h0| <= 2^25; from now on fits into int32 unchanged */
 1332|       |    /* |h1| <= 1.01*2^24 */
 1333|       |
 1334|  1.96M|    h[0] = (int32_t)h0;
 1335|  1.96M|    h[1] = (int32_t)h1;
 1336|  1.96M|    h[2] = (int32_t)h2;
 1337|  1.96M|    h[3] = (int32_t)h3;
 1338|  1.96M|    h[4] = (int32_t)h4;
 1339|  1.96M|    h[5] = (int32_t)h5;
 1340|  1.96M|    h[6] = (int32_t)h6;
 1341|  1.96M|    h[7] = (int32_t)h7;
 1342|  1.96M|    h[8] = (int32_t)h8;
 1343|  1.96M|    h[9] = (int32_t)h9;
 1344|  1.96M|}
curve25519.c:fe_tobytes:
  924|  4.16k|{
  925|  4.16k|    int32_t h0 = h[0];
  926|  4.16k|    int32_t h1 = h[1];
  927|  4.16k|    int32_t h2 = h[2];
  928|  4.16k|    int32_t h3 = h[3];
  929|  4.16k|    int32_t h4 = h[4];
  930|  4.16k|    int32_t h5 = h[5];
  931|  4.16k|    int32_t h6 = h[6];
  932|  4.16k|    int32_t h7 = h[7];
  933|  4.16k|    int32_t h8 = h[8];
  934|  4.16k|    int32_t h9 = h[9];
  935|  4.16k|    int32_t q;
  936|       |
  937|  4.16k|    q = (19 * h9 + (((int32_t)1) << 24)) >> 25;
  938|  4.16k|    q = (h0 + q) >> 26;
  939|  4.16k|    q = (h1 + q) >> 25;
  940|  4.16k|    q = (h2 + q) >> 26;
  941|  4.16k|    q = (h3 + q) >> 25;
  942|  4.16k|    q = (h4 + q) >> 26;
  943|  4.16k|    q = (h5 + q) >> 25;
  944|  4.16k|    q = (h6 + q) >> 26;
  945|  4.16k|    q = (h7 + q) >> 25;
  946|  4.16k|    q = (h8 + q) >> 26;
  947|  4.16k|    q = (h9 + q) >> 25;
  948|       |
  949|       |    /* Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20. */
  950|  4.16k|    h0 += 19 * q;
  951|       |    /* Goal: Output h-2^255 q, which is between 0 and 2^255-20. */
  952|       |
  953|  4.16k|    h1 += h0 >> 26;
  954|  4.16k|    h0 &= kBottom26Bits;
  955|  4.16k|    h2 += h1 >> 25;
  956|  4.16k|    h1 &= kBottom25Bits;
  957|  4.16k|    h3 += h2 >> 26;
  958|  4.16k|    h2 &= kBottom26Bits;
  959|  4.16k|    h4 += h3 >> 25;
  960|  4.16k|    h3 &= kBottom25Bits;
  961|  4.16k|    h5 += h4 >> 26;
  962|  4.16k|    h4 &= kBottom26Bits;
  963|  4.16k|    h6 += h5 >> 25;
  964|  4.16k|    h5 &= kBottom25Bits;
  965|  4.16k|    h7 += h6 >> 26;
  966|  4.16k|    h6 &= kBottom26Bits;
  967|  4.16k|    h8 += h7 >> 25;
  968|  4.16k|    h7 &= kBottom25Bits;
  969|  4.16k|    h9 += h8 >> 26;
  970|  4.16k|    h8 &= kBottom26Bits;
  971|  4.16k|    h9 &= kBottom25Bits;
  972|       |    /* h10 = carry9 */
  973|       |
  974|       |    /*
  975|       |     * Goal: Output h0+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
  976|       |     * Have h0+...+2^230 h9 between 0 and 2^255-1;
  977|       |     * evidently 2^255 h10-2^255 q = 0.
  978|       |     * Goal: Output h0+...+2^230 h9.
  979|       |     */
  980|  4.16k|    s[0] = (uint8_t)(h0 >> 0);
  981|  4.16k|    s[1] = (uint8_t)(h0 >> 8);
  982|  4.16k|    s[2] = (uint8_t)(h0 >> 16);
  983|  4.16k|    s[3] = (uint8_t)((h0 >> 24) | ((uint32_t)(h1) << 2));
  984|  4.16k|    s[4] = (uint8_t)(h1 >> 6);
  985|  4.16k|    s[5] = (uint8_t)(h1 >> 14);
  986|  4.16k|    s[6] = (uint8_t)((h1 >> 22) | ((uint32_t)(h2) << 3));
  987|  4.16k|    s[7] = (uint8_t)(h2 >> 5);
  988|  4.16k|    s[8] = (uint8_t)(h2 >> 13);
  989|  4.16k|    s[9] = (uint8_t)((h2 >> 21) | ((uint32_t)(h3) << 5));
  990|  4.16k|    s[10] = (uint8_t)(h3 >> 3);
  991|  4.16k|    s[11] = (uint8_t)(h3 >> 11);
  992|  4.16k|    s[12] = (uint8_t)((h3 >> 19) | ((uint32_t)(h4) << 6));
  993|  4.16k|    s[13] = (uint8_t)(h4 >> 2);
  994|  4.16k|    s[14] = (uint8_t)(h4 >> 10);
  995|  4.16k|    s[15] = (uint8_t)(h4 >> 18);
  996|  4.16k|    s[16] = (uint8_t)(h5 >> 0);
  997|  4.16k|    s[17] = (uint8_t)(h5 >> 8);
  998|  4.16k|    s[18] = (uint8_t)(h5 >> 16);
  999|  4.16k|    s[19] = (uint8_t)((h5 >> 24) | ((uint32_t)(h6) << 1));
 1000|  4.16k|    s[20] = (uint8_t)(h6 >> 7);
 1001|  4.16k|    s[21] = (uint8_t)(h6 >> 15);
 1002|  4.16k|    s[22] = (uint8_t)((h6 >> 23) | ((uint32_t)(h7) << 3));
 1003|  4.16k|    s[23] = (uint8_t)(h7 >> 5);
 1004|  4.16k|    s[24] = (uint8_t)(h7 >> 13);
 1005|  4.16k|    s[25] = (uint8_t)((h7 >> 21) | ((uint32_t)(h8) << 4));
 1006|  4.16k|    s[26] = (uint8_t)(h8 >> 4);
 1007|  4.16k|    s[27] = (uint8_t)(h8 >> 12);
 1008|  4.16k|    s[28] = (uint8_t)((h8 >> 20) | ((uint32_t)(h9) << 6));
 1009|  4.16k|    s[29] = (uint8_t)(h9 >> 2);
 1010|  4.16k|    s[30] = (uint8_t)(h9 >> 10);
 1011|  4.16k|    s[31] = (uint8_t)(h9 >> 18);
 1012|  4.16k|}

f_impl64.c:widemul:
   23|  1.55M|{
   24|  1.55M|    return ((uint128_t)a) * b;
   25|  1.55M|}

curve448.c:gf_sub_RAW:
   37|  10.1k|{
   38|  10.1k|    uint64_t co1 = ((1ULL << 56) - 1) * 2, co2 = co1 - 2;
   39|  10.1k|    unsigned int i;
   40|       |
   41|  91.5k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|  91.5k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (41:17): [True: 81.4k, False: 10.1k]
  ------------------
   42|  81.4k|        out->limb[i] = a->limb[i] - b->limb[i] + ((i == NLIMBS / 2) ? co2 : co1);
  ------------------
  |  |   21|  81.4k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (42:51): [True: 10.1k, False: 71.2k]
  ------------------
   43|       |
   44|  10.1k|    gf_weak_reduce(out);
   45|  10.1k|}
curve448.c:gf_bias:
   48|  10.1k|{
   49|  10.1k|}
curve448.c:gf_weak_reduce:
   52|  20.3k|{
   53|  20.3k|    uint64_t mask = (1ULL << 56) - 1;
   54|  20.3k|    uint64_t tmp = a->limb[NLIMBS - 1] >> 56;
  ------------------
  |  |   21|  20.3k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   55|  20.3k|    unsigned int i;
   56|       |
   57|  20.3k|    a->limb[NLIMBS / 2] += tmp;
  ------------------
  |  |   21|  20.3k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   58|   162k|    for (i = NLIMBS - 1; i > 0; i--)
  ------------------
  |  |   21|  20.3k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (58:26): [True: 142k, False: 20.3k]
  ------------------
   59|   142k|        a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 56);
   60|  20.3k|    a->limb[0] = (a->limb[0] & mask) + tmp;
   61|  20.3k|}
curve448.c:gf_add_RAW:
   27|  10.1k|{
   28|  10.1k|    unsigned int i;
   29|       |
   30|  91.5k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|  91.5k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (30:17): [True: 81.4k, False: 10.1k]
  ------------------
   31|  81.4k|        out->limb[i] = a->limb[i] + b->limb[i];
   32|       |
   33|  10.1k|    gf_weak_reduce(out);
   34|  10.1k|}
f_generic.c:gf_weak_reduce:
   52|  6.01k|{
   53|  6.01k|    uint64_t mask = (1ULL << 56) - 1;
   54|  6.01k|    uint64_t tmp = a->limb[NLIMBS - 1] >> 56;
  ------------------
  |  |   21|  6.01k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   55|  6.01k|    unsigned int i;
   56|       |
   57|  6.01k|    a->limb[NLIMBS / 2] += tmp;
  ------------------
  |  |   21|  6.01k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   58|  48.1k|    for (i = NLIMBS - 1; i > 0; i--)
  ------------------
  |  |   21|  6.01k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (58:26): [True: 42.1k, False: 6.01k]
  ------------------
   59|  42.1k|        a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 56);
   60|  6.01k|    a->limb[0] = (a->limb[0] & mask) + tmp;
   61|  6.01k|}
f_generic.c:gf_sub_RAW:
   37|  2.94k|{
   38|  2.94k|    uint64_t co1 = ((1ULL << 56) - 1) * 2, co2 = co1 - 2;
   39|  2.94k|    unsigned int i;
   40|       |
   41|  26.4k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|  26.4k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (41:17): [True: 23.5k, False: 2.94k]
  ------------------
   42|  23.5k|        out->limb[i] = a->limb[i] - b->limb[i] + ((i == NLIMBS / 2) ? co2 : co1);
  ------------------
  |  |   21|  23.5k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (42:51): [True: 2.94k, False: 20.6k]
  ------------------
   43|       |
   44|  2.94k|    gf_weak_reduce(out);
   45|  2.94k|}
f_generic.c:gf_bias:
   48|  2.94k|{
   49|  2.94k|}
f_generic.c:gf_add_RAW:
   27|     32|{
   28|     32|    unsigned int i;
   29|       |
   30|    288|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|    288|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (30:17): [True: 256, False: 32]
  ------------------
   31|    256|        out->limb[i] = a->limb[i] + b->limb[i];
   32|       |
   33|     32|    gf_weak_reduce(out);
   34|     32|}

ossl_gf_mul:
   25|  22.0k|{
   26|  22.0k|    const uint64_t *a = as->limb, *b = bs->limb;
   27|  22.0k|    uint64_t *c = cs->limb;
   28|  22.0k|    uint128_t accum0 = 0, accum1 = 0, accum2;
   29|  22.0k|    uint64_t mask = (1ULL << 56) - 1;
   30|  22.0k|    uint64_t aa[4], bb[4], bbb[4];
   31|  22.0k|    unsigned int i, j;
   32|       |
   33|   110k|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (33:17): [True: 88.3k, False: 22.0k]
  ------------------
   34|  88.3k|        aa[i] = a[i] + a[i + 4];
   35|  88.3k|        bb[i] = b[i] + b[i + 4];
   36|  88.3k|        bbb[i] = bb[i] + b[i + 4];
   37|  88.3k|    }
   38|       |
   39|   110k|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (39:17): [True: 88.3k, False: 22.0k]
  ------------------
   40|  88.3k|        accum2 = 0;
   41|       |
   42|   309k|        for (j = 0; j <= i; j++) {
  ------------------
  |  Branch (42:21): [True: 220k, False: 88.3k]
  ------------------
   43|   220k|            accum2 += widemul(a[j], b[i - j]);
   44|   220k|            accum1 += widemul(aa[j], bb[i - j]);
   45|   220k|            accum0 += widemul(a[j + 4], b[i - j + 4]);
   46|   220k|        }
   47|   220k|        for (; j < 4; j++) {
  ------------------
  |  Branch (47:16): [True: 132k, False: 88.3k]
  ------------------
   48|   132k|            accum2 += widemul(a[j], b[i + 8 - j]);
   49|   132k|            accum1 += widemul(aa[j], bbb[i + 4 - j]);
   50|   132k|            accum0 += widemul(a[j + 4], bb[i + 4 - j]);
   51|   132k|        }
   52|       |
   53|  88.3k|        accum1 -= accum2;
   54|  88.3k|        accum0 += accum2;
   55|       |
   56|  88.3k|        c[i] = ((uint64_t)(accum0)) & mask;
   57|  88.3k|        c[i + 4] = ((uint64_t)(accum1)) & mask;
   58|       |
   59|  88.3k|        accum0 >>= 56;
   60|  88.3k|        accum1 >>= 56;
   61|  88.3k|    }
   62|       |
   63|  22.0k|    accum0 += accum1;
   64|  22.0k|    accum0 += c[4];
   65|  22.0k|    accum1 += c[0];
   66|  22.0k|    c[4] = ((uint64_t)(accum0)) & mask;
   67|  22.0k|    c[0] = ((uint64_t)(accum1)) & mask;
   68|       |
   69|  22.0k|    accum0 >>= 56;
   70|  22.0k|    accum1 >>= 56;
   71|       |
   72|  22.0k|    c[5] += ((uint64_t)(accum0));
   73|  22.0k|    c[1] += ((uint64_t)(accum1));
   74|  22.0k|}
ossl_gf_sqr:
  103|  16.5k|{
  104|  16.5k|    const uint64_t *a = as->limb;
  105|  16.5k|    uint64_t *c = cs->limb;
  106|  16.5k|    uint128_t accum0 = 0, accum1 = 0, accum2;
  107|  16.5k|    uint64_t mask = (1ULL << 56) - 1;
  108|  16.5k|    uint64_t aa[4];
  109|  16.5k|    unsigned int i;
  110|       |
  111|       |    /* For some reason clang doesn't vectorize this without prompting? */
  112|  82.7k|    for (i = 0; i < 4; i++)
  ------------------
  |  Branch (112:17): [True: 66.1k, False: 16.5k]
  ------------------
  113|  66.1k|        aa[i] = a[i] + a[i + 4];
  114|       |
  115|  16.5k|    accum2 = widemul(a[0], a[3]);
  116|  16.5k|    accum0 = widemul(aa[0], aa[3]);
  117|  16.5k|    accum1 = widemul(a[4], a[7]);
  118|       |
  119|  16.5k|    accum2 += widemul(a[1], a[2]);
  120|  16.5k|    accum0 += widemul(aa[1], aa[2]);
  121|  16.5k|    accum1 += widemul(a[5], a[6]);
  122|       |
  123|  16.5k|    accum0 -= accum2;
  124|  16.5k|    accum1 += accum2;
  125|       |
  126|  16.5k|    c[3] = ((uint64_t)(accum1)) << 1 & mask;
  127|  16.5k|    c[7] = ((uint64_t)(accum0)) << 1 & mask;
  128|       |
  129|  16.5k|    accum0 >>= 55;
  130|  16.5k|    accum1 >>= 55;
  131|       |
  132|  16.5k|    accum0 += widemul(2 * aa[1], aa[3]);
  133|  16.5k|    accum1 += widemul(2 * a[5], a[7]);
  134|  16.5k|    accum0 += widemul(aa[2], aa[2]);
  135|  16.5k|    accum1 += accum0;
  136|       |
  137|  16.5k|    accum0 -= widemul(2 * a[1], a[3]);
  138|  16.5k|    accum1 += widemul(a[6], a[6]);
  139|       |
  140|  16.5k|    accum2 = widemul(a[0], a[0]);
  141|  16.5k|    accum1 -= accum2;
  142|  16.5k|    accum0 += accum2;
  143|       |
  144|  16.5k|    accum0 -= widemul(a[2], a[2]);
  145|  16.5k|    accum1 += widemul(aa[0], aa[0]);
  146|  16.5k|    accum0 += widemul(a[4], a[4]);
  147|       |
  148|  16.5k|    c[0] = ((uint64_t)(accum0)) & mask;
  149|  16.5k|    c[4] = ((uint64_t)(accum1)) & mask;
  150|       |
  151|  16.5k|    accum0 >>= 56;
  152|  16.5k|    accum1 >>= 56;
  153|       |
  154|  16.5k|    accum2 = widemul(2 * aa[2], aa[3]);
  155|  16.5k|    accum0 -= widemul(2 * a[2], a[3]);
  156|  16.5k|    accum1 += widemul(2 * a[6], a[7]);
  157|       |
  158|  16.5k|    accum1 += accum2;
  159|  16.5k|    accum0 += accum2;
  160|       |
  161|  16.5k|    accum2 = widemul(2 * a[0], a[1]);
  162|  16.5k|    accum1 += widemul(2 * aa[0], aa[1]);
  163|  16.5k|    accum0 += widemul(2 * a[4], a[5]);
  164|       |
  165|  16.5k|    accum1 -= accum2;
  166|  16.5k|    accum0 += accum2;
  167|       |
  168|  16.5k|    c[1] = ((uint64_t)(accum0)) & mask;
  169|  16.5k|    c[5] = ((uint64_t)(accum1)) & mask;
  170|       |
  171|  16.5k|    accum0 >>= 56;
  172|  16.5k|    accum1 >>= 56;
  173|       |
  174|  16.5k|    accum2 = widemul(aa[3], aa[3]);
  175|  16.5k|    accum0 -= widemul(a[3], a[3]);
  176|  16.5k|    accum1 += widemul(a[7], a[7]);
  177|       |
  178|  16.5k|    accum1 += accum2;
  179|  16.5k|    accum0 += accum2;
  180|       |
  181|  16.5k|    accum2 = widemul(2 * a[0], a[2]);
  182|  16.5k|    accum1 += widemul(2 * aa[0], aa[2]);
  183|  16.5k|    accum0 += widemul(2 * a[4], a[6]);
  184|       |
  185|  16.5k|    accum2 += widemul(a[1], a[1]);
  186|  16.5k|    accum1 += widemul(aa[1], aa[1]);
  187|  16.5k|    accum0 += widemul(a[5], a[5]);
  188|       |
  189|  16.5k|    accum1 -= accum2;
  190|  16.5k|    accum0 += accum2;
  191|       |
  192|  16.5k|    c[2] = ((uint64_t)(accum0)) & mask;
  193|  16.5k|    c[6] = ((uint64_t)(accum1)) & mask;
  194|       |
  195|  16.5k|    accum0 >>= 56;
  196|  16.5k|    accum1 >>= 56;
  197|       |
  198|  16.5k|    accum0 += c[3];
  199|  16.5k|    accum1 += c[7];
  200|  16.5k|    c[3] = ((uint64_t)(accum0)) & mask;
  201|  16.5k|    c[7] = ((uint64_t)(accum1)) & mask;
  202|       |
  203|       |    /* we could almost stop here, but it wouldn't be stable, so... */
  204|       |
  205|  16.5k|    accum0 >>= 56;
  206|  16.5k|    accum1 >>= 56;
  207|  16.5k|    c[4] += ((uint64_t)(accum0)) + ((uint64_t)(accum1));
  208|  16.5k|    c[0] += ((uint64_t)(accum1));
  209|  16.5k|}

ossl_curve448_precomputed_scalarmul:
  230|     32|{
  231|     32|    unsigned int i, j, k;
  232|     32|    const unsigned int n = COMBS_N, t = COMBS_T, s = COMBS_S;
  ------------------
  |  |   20|     32|#define COMBS_N 5
  ------------------
                  const unsigned int n = COMBS_N, t = COMBS_T, s = COMBS_S;
  ------------------
  |  |   21|     32|#define COMBS_T 5
  ------------------
                  const unsigned int n = COMBS_N, t = COMBS_T, s = COMBS_S;
  ------------------
  |  |   22|     32|#define COMBS_S 18
  ------------------
  233|     32|    niels_t ni;
  234|     32|    curve448_scalar_t scalar1x;
  235|       |
  236|     32|    ossl_curve448_scalar_add(scalar1x, scalar, precomputed_scalarmul_adjustment);
  237|     32|    ossl_curve448_scalar_halve(scalar1x, scalar1x);
  238|       |
  239|    608|    for (i = s; i > 0; i--) {
  ------------------
  |  Branch (239:17): [True: 576, False: 32]
  ------------------
  240|    576|        if (i != s)
  ------------------
  |  Branch (240:13): [True: 544, False: 32]
  ------------------
  241|    544|            point_double_internal(out, out, 0);
  242|       |
  243|  3.45k|        for (j = 0; j < n; j++) {
  ------------------
  |  Branch (243:21): [True: 2.88k, False: 576]
  ------------------
  244|  2.88k|            int tab = 0;
  245|  2.88k|            mask_t invert;
  246|       |
  247|  17.2k|            for (k = 0; k < t; k++) {
  ------------------
  |  Branch (247:25): [True: 14.4k, False: 2.88k]
  ------------------
  248|  14.4k|                unsigned int bit = (i - 1) + s * (k + j * t);
  249|       |
  250|  14.4k|                if (bit < C448_SCALAR_BITS)
  ------------------
  |  |   41|  14.4k|#define C448_SCALAR_BITS 446
  ------------------
  |  Branch (250:21): [True: 14.2k, False: 128]
  ------------------
  251|  14.2k|                    tab |= (scalar1x->limb[bit / WBITS] >> (bit % WBITS) & 1) << k;
  ------------------
  |  |   35|  14.2k|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|  14.2k|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
                                  tab |= (scalar1x->limb[bit / WBITS] >> (bit % WBITS) & 1) << k;
  ------------------
  |  |   35|  14.2k|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|  14.2k|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  252|  14.4k|            }
  253|       |
  254|  2.88k|            invert = (tab >> (t - 1)) - 1;
  255|  2.88k|            tab ^= invert;
  256|  2.88k|            tab &= (1 << (t - 1)) - 1;
  257|       |
  258|  2.88k|            constant_time_lookup_niels(ni, &table->table[j << (t - 1)],
  259|  2.88k|                1 << (t - 1), tab);
  260|       |
  261|  2.88k|            cond_neg_niels(ni, invert);
  262|  2.88k|            if ((i != s) || j != 0)
  ------------------
  |  Branch (262:17): [True: 2.72k, False: 160]
  |  Branch (262:29): [True: 128, False: 32]
  ------------------
  263|  2.84k|                add_niels_to_pt(out, ni, j == n - 1 && i != 1);
  ------------------
  |  Branch (263:42): [True: 576, False: 2.27k]
  |  Branch (263:56): [True: 544, False: 32]
  ------------------
  264|     32|            else
  265|     32|                niels_to_pt(out, ni);
  266|  2.88k|        }
  267|    576|    }
  268|       |
  269|     32|    OPENSSL_cleanse(ni, sizeof(ni));
  270|     32|    OPENSSL_cleanse(scalar1x, sizeof(scalar1x));
  271|     32|}
ossl_curve448_point_mul_by_ratio_and_encode_like_x448:
  462|     32|{
  463|     32|    curve448_point_t q;
  464|       |
  465|     32|    curve448_point_copy(q, p);
  466|     32|    gf_invert(q->t, q->x, 0); /* 1/x */
  467|     32|    ossl_gf_mul(q->z, q->t, q->y); /* y/x */
  468|     32|    ossl_gf_sqr(q->y, q->z); /* (y/x)^2 */
  469|     32|    gf_serialize(out, q->y, 1);
  470|     32|    ossl_curve448_point_destroy(q);
  471|     32|}
ossl_x448_derive_public_key:
  475|     32|{
  476|       |    /* Scalar conditioning */
  477|     32|    uint8_t scalar2[X_PRIVATE_BYTES];
  478|     32|    curve448_scalar_t the_scalar;
  479|     32|    curve448_point_t p;
  480|     32|    unsigned int i;
  481|       |
  482|     32|    memcpy(scalar2, scalar, sizeof(scalar2));
  483|     32|    scalar2[0] &= -(uint8_t)COFACTOR;
  ------------------
  |  |   21|     32|#define COFACTOR 4
  ------------------
  484|       |
  485|     32|    scalar2[X_PRIVATE_BYTES - 1] &= ~((0u - 1u) << ((X_PRIVATE_BITS + 7) % 8));
  ------------------
  |  |   41|     32|#define X_PRIVATE_BYTES X_PUBLIC_BYTES
  |  |  ------------------
  |  |  |  |   40|     32|#define X_PUBLIC_BYTES X_SER_BYTES
  |  |  |  |  ------------------
  |  |  |  |  |  |   22|     32|#define X_SER_BYTES 56
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  scalar2[X_PRIVATE_BYTES - 1] &= ~((0u - 1u) << ((X_PRIVATE_BITS + 7) % 8));
  ------------------
  |  |   42|     32|#define X_PRIVATE_BITS 448
  ------------------
  486|     32|    scalar2[X_PRIVATE_BYTES - 1] |= 1 << ((X_PRIVATE_BITS + 7) % 8);
  ------------------
  |  |   41|     32|#define X_PRIVATE_BYTES X_PUBLIC_BYTES
  |  |  ------------------
  |  |  |  |   40|     32|#define X_PUBLIC_BYTES X_SER_BYTES
  |  |  |  |  ------------------
  |  |  |  |  |  |   22|     32|#define X_SER_BYTES 56
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  scalar2[X_PRIVATE_BYTES - 1] |= 1 << ((X_PRIVATE_BITS + 7) % 8);
  ------------------
  |  |   42|     32|#define X_PRIVATE_BITS 448
  ------------------
  487|       |
  488|     32|    ossl_curve448_scalar_decode_long(the_scalar, scalar2, sizeof(scalar2));
  489|       |
  490|       |    /* Compensate for the encoding ratio */
  491|     64|    for (i = 1; i < X448_ENCODE_RATIO; i <<= 1)
  ------------------
  |  |   47|     64|#define X448_ENCODE_RATIO 2
  ------------------
  |  Branch (491:17): [True: 32, False: 32]
  ------------------
  492|     32|        ossl_curve448_scalar_halve(the_scalar, the_scalar);
  493|       |
  494|     32|    ossl_curve448_precomputed_scalarmul(p, ossl_curve448_precomputed_base,
  495|     32|        the_scalar);
  496|     32|    ossl_curve448_point_mul_by_ratio_and_encode_like_x448(out, p);
  497|     32|    ossl_curve448_point_destroy(p);
  498|     32|}
ossl_curve448_point_destroy:
  726|     64|{
  727|     64|    OPENSSL_cleanse(point, sizeof(curve448_point_t));
  728|     64|}
ossl_x448_public_from_private:
  739|     32|{
  740|     32|    ossl_x448_derive_public_key(out_public_value, private_key);
  741|     32|}
curve448.c:point_double_internal:
   60|    544|{
   61|    544|    gf a, b, c, d;
   62|       |
   63|    544|    ossl_gf_sqr(c, q->x);
   64|    544|    ossl_gf_sqr(a, q->y);
   65|    544|    gf_add_nr(d, c, a); /* 2+e */
  ------------------
  |  |  100|    544|#define gf_add_nr gf_add_RAW
  ------------------
   66|    544|    gf_add_nr(p->t, q->y, q->x); /* 2+e */
  ------------------
  |  |  100|    544|#define gf_add_nr gf_add_RAW
  ------------------
   67|    544|    ossl_gf_sqr(b, p->t);
   68|    544|    gf_subx_nr(b, b, d, 3); /* 4+e */
   69|    544|    gf_sub_nr(p->t, a, c); /* 3+e */
   70|    544|    ossl_gf_sqr(p->x, q->z);
   71|    544|    gf_add_nr(p->z, p->x, p->x); /* 2+e */
  ------------------
  |  |  100|    544|#define gf_add_nr gf_add_RAW
  ------------------
   72|    544|    gf_subx_nr(a, p->z, p->t, 4); /* 6+e */
   73|    544|    if (GF_HEADROOM == 5)
  ------------------
  |  |   16|    544|#define GF_HEADROOM 9999 /* Everything is reduced anyway */
  ------------------
  |  Branch (73:9): [Folded, False: 544]
  ------------------
   74|      0|        gf_weak_reduce(a); /* or 1+e */
   75|    544|    ossl_gf_mul(p->x, a, b);
   76|    544|    ossl_gf_mul(p->z, p->t, a);
   77|    544|    ossl_gf_mul(p->y, p->t, d);
   78|    544|    if (!before_double)
  ------------------
  |  Branch (78:9): [True: 544, False: 0]
  ------------------
   79|    544|        ossl_gf_mul(p->t, b, d);
   80|    544|}
curve448.c:constant_time_lookup_niels:
  223|  2.88k|{
  224|  2.88k|    constant_time_lookup(ni, table, sizeof(niels_s), nelts, idx);
  225|  2.88k|}
curve448.c:cond_neg_niels:
   89|  2.88k|{
   90|  2.88k|    gf_cond_swap(n->a, n->b, neg);
   91|  2.88k|    gf_cond_neg(n->c, neg);
   92|  2.88k|}
curve448.c:add_niels_to_pt:
  124|  2.84k|{
  125|  2.84k|    gf a, b, c;
  126|       |
  127|  2.84k|    gf_sub_nr(b, d->y, d->x); /* 3+e */
  128|  2.84k|    ossl_gf_mul(a, e->a, b);
  129|  2.84k|    gf_add_nr(b, d->x, d->y); /* 2+e */
  ------------------
  |  |  100|  2.84k|#define gf_add_nr gf_add_RAW
  ------------------
  130|  2.84k|    ossl_gf_mul(d->y, e->b, b);
  131|  2.84k|    ossl_gf_mul(d->x, e->c, d->t);
  132|  2.84k|    gf_add_nr(c, a, d->y); /* 2+e */
  ------------------
  |  |  100|  2.84k|#define gf_add_nr gf_add_RAW
  ------------------
  133|  2.84k|    gf_sub_nr(b, d->y, a); /* 3+e */
  134|  2.84k|    gf_sub_nr(d->y, d->z, d->x); /* 3+e */
  135|  2.84k|    gf_add_nr(a, d->x, d->z); /* 2+e */
  ------------------
  |  |  100|  2.84k|#define gf_add_nr gf_add_RAW
  ------------------
  136|  2.84k|    ossl_gf_mul(d->z, a, d->y);
  137|  2.84k|    ossl_gf_mul(d->x, d->y, b);
  138|  2.84k|    ossl_gf_mul(d->y, a, c);
  139|  2.84k|    if (!before_double)
  ------------------
  |  Branch (139:9): [True: 2.30k, False: 544]
  ------------------
  140|  2.30k|        ossl_gf_mul(d->t, b, c);
  141|  2.84k|}
curve448.c:niels_to_pt:
  115|     32|{
  116|     32|    gf_add(e->y, n->b, n->a);
  117|     32|    gf_sub(e->x, n->b, n->a);
  118|     32|    ossl_gf_mul(e->t, e->y, e->x);
  119|     32|    gf_copy(e->z, ONE);
  120|     32|}
curve448.c:gf_invert:
   39|     32|{
   40|     32|    mask_t ret;
   41|     32|    gf t1, t2;
   42|       |
   43|     32|    ossl_gf_sqr(t1, x); /* o^2 */
   44|     32|    ret = gf_isr(t2, t1); /* +-1/sqrt(o^2) = +-1/o */
   45|     32|    (void)ret;
   46|     32|    if (assert_nonzero)
  ------------------
  |  Branch (46:9): [True: 0, False: 32]
  ------------------
   47|     32|        assert(ret);
  ------------------
  |  Branch (47:9): [True: 0, False: 0]
  |  Branch (47:9): [True: 0, False: 0]
  ------------------
   48|     32|    ossl_gf_sqr(t1, t2);
   49|     32|    ossl_gf_mul(t2, t1, x); /* not direct to y in case of alias. */
   50|     32|    gf_copy(y, t2);
   51|     32|}

gf_serialize:
   22|     32|{
   23|     32|    unsigned int j = 0, fill = 0;
   24|     32|    dword_t buffer = 0;
   25|     32|    int i;
   26|     32|    gf red;
   27|       |
   28|     32|    gf_copy(red, x);
   29|     32|    gf_strong_reduce(red);
   30|     32|    if (!with_hibit)
  ------------------
  |  Branch (30:9): [True: 0, False: 32]
  ------------------
   31|     32|        assert(gf_hibit(red) == 0);
  ------------------
  |  Branch (31:9): [True: 0, False: 0]
  |  Branch (31:9): [True: 0, False: 0]
  ------------------
   32|       |
   33|  1.82k|    for (i = 0; i < (with_hibit ? X_SER_BYTES : SER_BYTES); i++) {
  ------------------
  |  |   22|  1.82k|#define X_SER_BYTES 56
  ------------------
                  for (i = 0; i < (with_hibit ? X_SER_BYTES : SER_BYTES); i++) {
  ------------------
  |  |   23|      0|#define SER_BYTES 56
  ------------------
  |  Branch (33:17): [True: 1.79k, False: 32]
  |  Branch (33:22): [True: 1.82k, False: 0]
  ------------------
   34|  1.79k|        if (fill < 8 && j < NLIMBS) {
  ------------------
  |  |   21|    256|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (34:13): [True: 256, False: 1.53k]
  |  Branch (34:25): [True: 256, False: 0]
  ------------------
   35|    256|            buffer |= ((dword_t)red->limb[LIMBPERM(j)]) << fill;
  ------------------
  |  |   69|    256|#define LIMBPERM(i) (i)
  ------------------
   36|    256|            fill += LIMB_PLACE_VALUE(LIMBPERM(j));
  ------------------
  |  |   24|    256|#define LIMB_PLACE_VALUE(i) 56
  ------------------
   37|    256|            j++;
   38|    256|        }
   39|  1.79k|        serial[i] = (uint8_t)buffer;
   40|  1.79k|        fill -= 8;
   41|  1.79k|        buffer >>= 8;
   42|  1.79k|    }
   43|     32|}
gf_strong_reduce:
   98|     64|{
   99|     64|    dsword_t scarry;
  100|     64|    word_t scarry_0;
  101|     64|    dword_t carry = 0;
  102|     64|    unsigned int i;
  103|       |
  104|       |    /* first, clear high */
  105|     64|    gf_weak_reduce(a); /* Determined to have negligible perf impact. */
  106|       |
  107|       |    /* now the total is less than 2p */
  108|       |
  109|       |    /* compute total_value - p.  No need to reduce mod p. */
  110|     64|    scarry = 0;
  111|    576|    for (i = 0; i < NLIMBS; i++) {
  ------------------
  |  |   21|    576|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (111:17): [True: 512, False: 64]
  ------------------
  112|    512|        scarry = scarry + a->limb[LIMBPERM(i)] - MODULUS->limb[LIMBPERM(i)];
  ------------------
  |  |   69|    512|#define LIMBPERM(i) (i)
  ------------------
                      scarry = scarry + a->limb[LIMBPERM(i)] - MODULUS->limb[LIMBPERM(i)];
  ------------------
  |  |   69|    512|#define LIMBPERM(i) (i)
  ------------------
  113|    512|        a->limb[LIMBPERM(i)] = scarry & LIMB_MASK(LIMBPERM(i));
  ------------------
  |  |   69|    512|#define LIMBPERM(i) (i)
  ------------------
                      a->limb[LIMBPERM(i)] = scarry & LIMB_MASK(LIMBPERM(i));
  ------------------
  |  |   75|    512|#define LIMB_MASK(i) (((1ULL) << LIMB_PLACE_VALUE(i)) - 1)
  |  |  ------------------
  |  |  |  |   24|    512|#define LIMB_PLACE_VALUE(i) 56
  |  |  ------------------
  ------------------
  114|    512|        scarry >>= LIMB_PLACE_VALUE(LIMBPERM(i));
  ------------------
  |  |   24|    512|#define LIMB_PLACE_VALUE(i) 56
  ------------------
  115|    512|    }
  116|       |
  117|       |    /*
  118|       |     * uncommon case: it was >= p, so now scarry = 0 and this = x common case:
  119|       |     * it was < p, so now scarry = -1 and this = x - p + 2^255 so let's add
  120|       |     * back in p.  will carry back off the top for 2^255.
  121|       |     */
  122|     64|    assert(scarry == 0 || scarry == -1);
  ------------------
  |  Branch (122:5): [True: 64, False: 0]
  |  Branch (122:5): [True: 0, False: 0]
  |  Branch (122:5): [True: 32, False: 32]
  |  Branch (122:5): [True: 32, False: 0]
  ------------------
  123|       |
  124|     64|    scarry_0 = (word_t)scarry;
  125|       |
  126|       |    /* add it back */
  127|    576|    for (i = 0; i < NLIMBS; i++) {
  ------------------
  |  |   21|    576|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (127:17): [True: 512, False: 64]
  ------------------
  128|    512|        carry = carry + a->limb[LIMBPERM(i)] + (scarry_0 & MODULUS->limb[LIMBPERM(i)]);
  ------------------
  |  |   69|    512|#define LIMBPERM(i) (i)
  ------------------
                      carry = carry + a->limb[LIMBPERM(i)] + (scarry_0 & MODULUS->limb[LIMBPERM(i)]);
  ------------------
  |  |   69|    512|#define LIMBPERM(i) (i)
  ------------------
  129|    512|        a->limb[LIMBPERM(i)] = carry & LIMB_MASK(LIMBPERM(i));
  ------------------
  |  |   69|    512|#define LIMBPERM(i) (i)
  ------------------
                      a->limb[LIMBPERM(i)] = carry & LIMB_MASK(LIMBPERM(i));
  ------------------
  |  |   75|    512|#define LIMB_MASK(i) (((1ULL) << LIMB_PLACE_VALUE(i)) - 1)
  |  |  ------------------
  |  |  |  |   24|    512|#define LIMB_PLACE_VALUE(i) 56
  |  |  ------------------
  ------------------
  130|    512|        carry >>= LIMB_PLACE_VALUE(LIMBPERM(i));
  ------------------
  |  |   24|    512|#define LIMB_PLACE_VALUE(i) 56
  ------------------
  131|    512|    }
  132|       |
  133|       |    assert(carry < 2 && ((word_t)carry + scarry_0) == 0);
  ------------------
  |  Branch (133:5): [True: 0, False: 64]
  |  Branch (133:5): [True: 0, False: 0]
  |  Branch (133:5): [True: 64, False: 0]
  |  Branch (133:5): [True: 64, False: 0]
  ------------------
  134|     64|}
gf_sub:
  138|  2.94k|{
  139|  2.94k|    gf_sub_RAW(d, a, b);
  140|  2.94k|    gf_bias(d, 2);
  141|  2.94k|    gf_weak_reduce(d);
  142|  2.94k|}
gf_add:
  146|     32|{
  147|     32|    gf_add_RAW(d, a, b);
  148|     32|    gf_weak_reduce(d);
  149|     32|}
gf_eq:
  153|     32|{
  154|     32|    gf c;
  155|     32|    mask_t ret = 0;
  156|     32|    unsigned int i;
  157|       |
  158|     32|    gf_sub(c, a, b);
  159|     32|    gf_strong_reduce(c);
  160|       |
  161|    288|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|    288|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (161:17): [True: 256, False: 32]
  ------------------
  162|    256|        ret |= c->limb[LIMBPERM(i)];
  ------------------
  |  |   69|    256|#define LIMBPERM(i) (i)
  ------------------
  163|       |
  164|     32|    return word_is_zero(ret);
  ------------------
  |  |   20|     32|#define word_is_zero(a) constant_time_is_zero_64(a)
  ------------------
  165|     32|}
gf_isr:
  168|     32|{
  169|     32|    gf L0, L1, L2;
  170|       |
  171|     32|    ossl_gf_sqr(L1, x);
  172|     32|    ossl_gf_mul(L2, x, L1);
  173|     32|    ossl_gf_sqr(L1, L2);
  174|     32|    ossl_gf_mul(L2, x, L1);
  175|     32|    gf_sqrn(L1, L2, 3);
  176|     32|    ossl_gf_mul(L0, L2, L1);
  177|     32|    gf_sqrn(L1, L0, 3);
  178|     32|    ossl_gf_mul(L0, L2, L1);
  179|     32|    gf_sqrn(L2, L0, 9);
  180|     32|    ossl_gf_mul(L1, L0, L2);
  181|     32|    ossl_gf_sqr(L0, L1);
  182|     32|    ossl_gf_mul(L2, x, L0);
  183|     32|    gf_sqrn(L0, L2, 18);
  184|     32|    ossl_gf_mul(L2, L1, L0);
  185|     32|    gf_sqrn(L0, L2, 37);
  186|     32|    ossl_gf_mul(L1, L2, L0);
  187|     32|    gf_sqrn(L0, L1, 37);
  188|     32|    ossl_gf_mul(L1, L2, L0);
  189|     32|    gf_sqrn(L0, L1, 111);
  190|     32|    ossl_gf_mul(L2, L1, L0);
  191|     32|    ossl_gf_sqr(L0, L2);
  192|     32|    ossl_gf_mul(L1, x, L0);
  193|     32|    gf_sqrn(L0, L1, 223);
  194|     32|    ossl_gf_mul(L1, L2, L0);
  195|     32|    ossl_gf_sqr(L2, L1);
  196|     32|    ossl_gf_mul(L0, L2, x);
  197|     32|    gf_copy(a, L1);
  198|     32|    return gf_eq(L0, ONE);
  199|     32|}

curve448.c:gf_subx_nr:
  113|  1.08k|{
  114|  1.08k|    gf_sub_RAW(c, a, b);
  115|  1.08k|    gf_bias(c, amt);
  116|  1.08k|    if (GF_HEADROOM < amt + 1)
  ------------------
  |  |   16|  1.08k|#define GF_HEADROOM 9999 /* Everything is reduced anyway */
  ------------------
  |  Branch (116:9): [True: 0, False: 1.08k]
  ------------------
  117|      0|        gf_weak_reduce(c);
  118|  1.08k|}
curve448.c:gf_cond_neg:
  150|  2.88k|{
  151|  2.88k|    gf y;
  152|       |
  153|  2.88k|    gf_sub(y, ZERO, x);
  154|  2.88k|    gf_cond_sel(x, x, y, neg);
  155|  2.88k|}
curve448.c:gf_cond_sel:
  133|  2.88k|{
  134|  2.88k|    size_t i;
  135|       |
  136|  25.9k|    for (i = 0; i < NLIMBS; i++) {
  ------------------
  |  |   21|  25.9k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (136:17): [True: 23.0k, False: 2.88k]
  ------------------
  137|       |#if ARCH_WORD_BITS == 32
  138|       |        x[0].limb[i] = constant_time_select_32(is_z, z[0].limb[i],
  139|       |            y[0].limb[i]);
  140|       |#else
  141|       |        /* Must be 64 bit */
  142|  23.0k|        x[0].limb[i] = constant_time_select_64(is_z, z[0].limb[i],
  143|  23.0k|            y[0].limb[i]);
  144|  23.0k|#endif
  145|  23.0k|    }
  146|  2.88k|}
curve448.c:gf_copy:
   45|     64|{
   46|     64|    *out = *a;
   47|     64|}
curve448.c:gf_cond_swap:
  159|  2.88k|{
  160|  2.88k|    size_t i;
  161|       |
  162|  25.9k|    for (i = 0; i < NLIMBS; i++) {
  ------------------
  |  |   21|  25.9k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (162:17): [True: 23.0k, False: 2.88k]
  ------------------
  163|       |#if ARCH_WORD_BITS == 32
  164|       |        constant_time_cond_swap_32(swap, &(x[0].limb[i]), &(y->limb[i]));
  165|       |#else
  166|       |        /* Must be 64 bit */
  167|  23.0k|        constant_time_cond_swap_64(swap, &(x[0].limb[i]), &(y->limb[i]));
  168|  23.0k|#endif
  169|  23.0k|    }
  170|  2.88k|}
curve448.c:gf_sub_nr:
  104|  9.08k|{
  105|  9.08k|    gf_sub_RAW(c, a, b);
  106|  9.08k|    gf_bias(c, 2);
  107|  9.08k|    if (GF_HEADROOM < 3)
  ------------------
  |  |   16|  9.08k|#define GF_HEADROOM 9999 /* Everything is reduced anyway */
  ------------------
  |  Branch (107:9): [Folded, False: 9.08k]
  ------------------
  108|      0|        gf_weak_reduce(c);
  109|  9.08k|}
f_generic.c:gf_copy:
   45|     64|{
   46|     64|    *out = *a;
   47|     64|}
f_generic.c:gf_sqrn:
   82|    256|{
   83|    256|    gf tmp;
   84|       |
   85|    256|    assert(n > 0);
  ------------------
  |  Branch (85:5): [True: 0, False: 256]
  |  Branch (85:5): [True: 256, False: 0]
  ------------------
   86|    256|    if (n & 1) {
  ------------------
  |  Branch (86:9): [True: 224, False: 32]
  ------------------
   87|    224|        ossl_gf_sqr(y, x);
   88|    224|        n--;
   89|    224|    } else {
   90|     32|        ossl_gf_sqr(tmp, x);
   91|     32|        ossl_gf_sqr(y, tmp);
   92|     32|        n -= 2;
   93|     32|    }
   94|  7.16k|    for (; n; n -= 2) {
  ------------------
  |  Branch (94:12): [True: 6.91k, False: 256]
  ------------------
   95|  6.91k|        ossl_gf_sqr(tmp, y);
   96|  6.91k|        ossl_gf_sqr(y, tmp);
   97|  6.91k|    }
   98|    256|}

curve448.c:curve448_point_copy:
  177|     32|{
  178|     32|    *a = *b;
  179|     32|}

ossl_curve448_scalar_mul:
  100|     32|{
  101|     32|    sc_montmul(out, a, b);
  102|     32|    sc_montmul(out, out, sc_r2);
  103|     32|}
ossl_curve448_scalar_add:
  113|     32|{
  114|     32|    c448_dword_t chain = 0;
  115|     32|    unsigned int i;
  116|       |
  117|    256|    for (i = 0; i < C448_SCALAR_LIMBS; i++) {
  ------------------
  |  |   38|    256|#define C448_SCALAR_LIMBS ((446 - 1) / C448_WORD_BITS + 1)
  |  |  ------------------
  |  |  |  |   32|    256|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  |  Branch (117:17): [True: 224, False: 32]
  ------------------
  118|    224|        chain = (chain + a->limb[i]) + b->limb[i];
  119|    224|        out->limb[i] = (c448_word_t)chain;
  120|    224|        chain >>= WBITS;
  ------------------
  |  |   28|    224|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|    224|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  121|    224|    }
  122|     32|    sc_subx(out, out->limb, sc_p, sc_p, (c448_word_t)chain);
  123|     32|}
ossl_curve448_scalar_destroy:
  158|     32|{
  159|     32|    OPENSSL_cleanse(scalar, sizeof(curve448_scalar_t));
  160|     32|}
ossl_curve448_scalar_decode_long:
  164|     32|{
  165|     32|    size_t i;
  166|     32|    curve448_scalar_t t1, t2;
  167|       |
  168|     32|    if (ser_len == 0) {
  ------------------
  |  Branch (168:9): [True: 0, False: 32]
  ------------------
  169|      0|        curve448_scalar_copy(s, ossl_curve448_scalar_zero);
  170|      0|        return;
  171|      0|    }
  172|       |
  173|     32|    i = ser_len - (ser_len % C448_SCALAR_BYTES);
  ------------------
  |  |   44|     32|#define C448_SCALAR_BYTES 56
  ------------------
  174|     32|    if (i == ser_len)
  ------------------
  |  Branch (174:9): [True: 32, False: 0]
  ------------------
  175|     32|        i -= C448_SCALAR_BYTES;
  ------------------
  |  |   44|     32|#define C448_SCALAR_BYTES 56
  ------------------
  176|       |
  177|     32|    scalar_decode_short(t1, &ser[i], ser_len - i);
  178|       |
  179|     32|    if (ser_len == sizeof(curve448_scalar_t)) {
  ------------------
  |  Branch (179:9): [True: 32, False: 0]
  ------------------
  180|     32|        assert(i == 0);
  ------------------
  |  Branch (180:9): [True: 0, False: 32]
  |  Branch (180:9): [True: 32, False: 0]
  ------------------
  181|       |        /* ham-handed reduce */
  182|     32|        ossl_curve448_scalar_mul(s, t1, ossl_curve448_scalar_one);
  183|     32|        ossl_curve448_scalar_destroy(t1);
  184|     32|        return;
  185|     32|    }
  186|       |
  187|      0|    while (i) {
  ------------------
  |  Branch (187:12): [True: 0, False: 0]
  ------------------
  188|      0|        i -= C448_SCALAR_BYTES;
  ------------------
  |  |   44|      0|#define C448_SCALAR_BYTES 56
  ------------------
  189|      0|        sc_montmul(t1, t1, sc_r2);
  190|      0|        (void)ossl_curve448_scalar_decode(t2, ser + i);
  191|      0|        ossl_curve448_scalar_add(t1, t1, t2);
  192|      0|    }
  193|       |
  194|      0|    curve448_scalar_copy(s, t1);
  195|      0|    ossl_curve448_scalar_destroy(t1);
  196|      0|    ossl_curve448_scalar_destroy(t2);
  197|      0|}
ossl_curve448_scalar_halve:
  211|     64|{
  212|     64|    c448_word_t mask = 0 - (a->limb[0] & 1);
  213|     64|    c448_dword_t chain = 0;
  214|     64|    unsigned int i;
  215|       |
  216|     64|    mask = value_barrier_c448(mask);
  ------------------
  |  |   58|     64|#define value_barrier_c448(x) value_barrier_64(x)
  ------------------
  217|    512|    for (i = 0; i < C448_SCALAR_LIMBS; i++) {
  ------------------
  |  |   38|    512|#define C448_SCALAR_LIMBS ((446 - 1) / C448_WORD_BITS + 1)
  |  |  ------------------
  |  |  |  |   32|    512|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  |  Branch (217:17): [True: 448, False: 64]
  ------------------
  218|    448|        chain = (chain + a->limb[i]) + (sc_p->limb[i] & mask);
  219|    448|        out->limb[i] = (c448_word_t)chain;
  220|    448|        chain >>= C448_WORD_BITS;
  ------------------
  |  |   32|    448|#define C448_WORD_BITS 64 /* The number of bits in a word */
  ------------------
  221|    448|    }
  222|    448|    for (i = 0; i < C448_SCALAR_LIMBS - 1; i++)
  ------------------
  |  |   38|    448|#define C448_SCALAR_LIMBS ((446 - 1) / C448_WORD_BITS + 1)
  |  |  ------------------
  |  |  |  |   32|    448|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  |  Branch (222:17): [True: 384, False: 64]
  ------------------
  223|    384|        out->limb[i] = out->limb[i] >> 1 | out->limb[i + 1] << (WBITS - 1);
  ------------------
  |  |   28|    384|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|    384|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  224|     64|    out->limb[i] = out->limb[i] >> 1 | (c448_word_t)(chain << (WBITS - 1));
  ------------------
  |  |   28|     64|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|     64|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  225|     64|}
scalar.c:sc_montmul:
   63|     64|{
   64|     64|    unsigned int i, j;
   65|     64|    c448_word_t accum[C448_SCALAR_LIMBS + 1] = { 0 };
   66|     64|    c448_word_t hi_carry = 0;
   67|       |
   68|    512|    for (i = 0; i < C448_SCALAR_LIMBS; i++) {
  ------------------
  |  |   38|    512|#define C448_SCALAR_LIMBS ((446 - 1) / C448_WORD_BITS + 1)
  |  |  ------------------
  |  |  |  |   32|    512|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  |  Branch (68:17): [True: 448, False: 64]
  ------------------
   69|    448|        c448_word_t mand = a->limb[i];
   70|    448|        const c448_word_t *mier = b->limb;
   71|       |
   72|    448|        c448_dword_t chain = 0;
   73|  3.58k|        for (j = 0; j < C448_SCALAR_LIMBS; j++) {
  ------------------
  |  |   38|  3.58k|#define C448_SCALAR_LIMBS ((446 - 1) / C448_WORD_BITS + 1)
  |  |  ------------------
  |  |  |  |   32|  3.58k|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  |  Branch (73:21): [True: 3.13k, False: 448]
  ------------------
   74|  3.13k|            chain += ((c448_dword_t)mand) * mier[j] + accum[j];
   75|  3.13k|            accum[j] = (c448_word_t)chain;
   76|  3.13k|            chain >>= WBITS;
  ------------------
  |  |   28|  3.13k|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|  3.13k|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
   77|  3.13k|        }
   78|    448|        accum[j] = (c448_word_t)chain;
   79|       |
   80|    448|        mand = accum[0] * MONTGOMERY_FACTOR;
   81|    448|        chain = 0;
   82|    448|        mier = sc_p->limb;
   83|  3.58k|        for (j = 0; j < C448_SCALAR_LIMBS; j++) {
  ------------------
  |  |   38|  3.58k|#define C448_SCALAR_LIMBS ((446 - 1) / C448_WORD_BITS + 1)
  |  |  ------------------
  |  |  |  |   32|  3.58k|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  |  Branch (83:21): [True: 3.13k, False: 448]
  ------------------
   84|  3.13k|            chain += (c448_dword_t)mand * mier[j] + accum[j];
   85|  3.13k|            if (j)
  ------------------
  |  Branch (85:17): [True: 2.68k, False: 448]
  ------------------
   86|  2.68k|                accum[j - 1] = (c448_word_t)chain;
   87|  3.13k|            chain >>= WBITS;
  ------------------
  |  |   28|  3.13k|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|  3.13k|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
   88|  3.13k|        }
   89|    448|        chain += accum[j];
   90|    448|        chain += hi_carry;
   91|    448|        accum[j - 1] = (c448_word_t)chain;
   92|    448|        hi_carry = chain >> WBITS;
  ------------------
  |  |   28|    448|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|    448|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
   93|    448|    }
   94|       |
   95|     64|    sc_subx(out, accum, sc_p, sc_p, hi_carry);
   96|     64|}
scalar.c:sc_subx:
   41|     96|{
   42|     96|    c448_dsword_t chain = 0;
   43|     96|    unsigned int i;
   44|     96|    c448_word_t borrow;
   45|       |
   46|    768|    for (i = 0; i < C448_SCALAR_LIMBS; i++) {
  ------------------
  |  |   38|    768|#define C448_SCALAR_LIMBS ((446 - 1) / C448_WORD_BITS + 1)
  |  |  ------------------
  |  |  |  |   32|    768|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  |  Branch (46:17): [True: 672, False: 96]
  ------------------
   47|    672|        chain = (chain + accum[i]) - sub->limb[i];
   48|    672|        out->limb[i] = (c448_word_t)chain;
   49|    672|        chain >>= WBITS;
  ------------------
  |  |   28|    672|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|    672|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
   50|    672|    }
   51|     96|    borrow = (c448_word_t)chain + extra; /* = 0 or -1 */
   52|       |
   53|     96|    chain = 0;
   54|    768|    for (i = 0; i < C448_SCALAR_LIMBS; i++) {
  ------------------
  |  |   38|    768|#define C448_SCALAR_LIMBS ((446 - 1) / C448_WORD_BITS + 1)
  |  |  ------------------
  |  |  |  |   32|    768|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  |  Branch (54:17): [True: 672, False: 96]
  ------------------
   55|    672|        chain = (chain + out->limb[i]) + (p->limb[i] & borrow);
   56|    672|        out->limb[i] = (c448_word_t)chain;
   57|    672|        chain >>= WBITS;
  ------------------
  |  |   28|    672|#define WBITS C448_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
  |  |  ------------------
  |  |  |  |   32|    672|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
   58|    672|    }
   59|     96|}
scalar.c:scalar_decode_short:
  128|     32|{
  129|     32|    size_t i, j, k = 0;
  130|       |
  131|    256|    for (i = 0; i < C448_SCALAR_LIMBS; i++) {
  ------------------
  |  |   38|    256|#define C448_SCALAR_LIMBS ((446 - 1) / C448_WORD_BITS + 1)
  |  |  ------------------
  |  |  |  |   32|    256|#define C448_WORD_BITS 64 /* The number of bits in a word */
  |  |  ------------------
  ------------------
  |  Branch (131:17): [True: 224, False: 32]
  ------------------
  132|    224|        c448_word_t out = 0;
  133|       |
  134|  2.01k|        for (j = 0; j < sizeof(c448_word_t) && k < nbytes; j++, k++)
  ------------------
  |  Branch (134:21): [True: 1.79k, False: 224]
  |  Branch (134:48): [True: 1.79k, False: 0]
  ------------------
  135|  1.79k|            out |= ((c448_word_t)ser[k]) << (8 * j);
  136|    224|        s->limb[i] = out;
  137|    224|    }
  138|     32|}

ec_ameth.c:eckey_pub_decode:
  101|   162k|{
  102|   162k|    const unsigned char *p = NULL;
  103|   162k|    int pklen;
  104|   162k|    EC_KEY *eckey = NULL;
  105|   162k|    X509_ALGOR *palg;
  106|   162k|    OSSL_LIB_CTX *libctx = NULL;
  107|   162k|    const char *propq = NULL;
  108|       |
  109|   162k|    if (!ossl_x509_PUBKEY_get0_libctx(&libctx, &propq, pubkey)
  ------------------
  |  Branch (109:9): [True: 0, False: 162k]
  ------------------
  110|   162k|        || !X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey))
  ------------------
  |  Branch (110:12): [True: 0, False: 162k]
  ------------------
  111|      0|        return 0;
  112|   162k|    eckey = ossl_ec_key_param_from_x509_algor(palg, libctx, propq);
  113|       |
  114|   162k|    if (!eckey)
  ------------------
  |  Branch (114:9): [True: 0, False: 162k]
  ------------------
  115|      0|        return 0;
  116|       |
  117|       |    /* We have parameters now set public key */
  118|   162k|    if (!o2i_ECPublicKey(&eckey, &p, pklen)) {
  ------------------
  |  Branch (118:9): [True: 0, False: 162k]
  ------------------
  119|      0|        ERR_raise(ERR_LIB_EC, EC_R_DECODE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  120|      0|        goto ecerr;
  121|      0|    }
  122|       |
  123|   162k|    EVP_PKEY_assign_EC_KEY(pkey, eckey);
  ------------------
  |  |  426|   162k|#define EVP_PKEY_assign_EC_KEY(pkey, eckey) EVP_PKEY_assign((pkey), \
  |  |  427|   162k|    EVP_PKEY_EC,                                                    \
  |  |  ------------------
  |  |  |  |   73|   162k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|   162k|#define NID_X9_62_id_ecPublicKey                408
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  428|   162k|    (eckey))
  ------------------
  124|   162k|    return 1;
  125|       |
  126|      0|ecerr:
  127|      0|    EC_KEY_free(eckey);
  128|      0|    return 0;
  129|   162k|}
ec_ameth.c:int_ec_free:
  261|   162k|{
  262|   162k|    EC_KEY_free(pkey->pkey.ec);
  263|   162k|}

o2i_ECPublicKey:
 1137|   162k|{
 1138|   162k|    EC_KEY *ret = NULL;
 1139|       |
 1140|   162k|    if (a == NULL || (*a) == NULL || (*a)->group == NULL) {
  ------------------
  |  Branch (1140:9): [True: 0, False: 162k]
  |  Branch (1140:22): [True: 0, False: 162k]
  |  Branch (1140:38): [True: 0, False: 162k]
  ------------------
 1141|       |        /*
 1142|       |         * sorry, but a EC_GROUP-structure is necessary to set the public key
 1143|       |         */
 1144|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1145|      0|        return 0;
 1146|      0|    }
 1147|   162k|    ret = *a;
 1148|       |    /* EC_KEY_opt2key updates dirty_cnt */
 1149|   162k|    if (!EC_KEY_oct2key(ret, *in, len, NULL)) {
  ------------------
  |  Branch (1149:9): [True: 0, False: 162k]
  ------------------
 1150|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1151|      0|        return 0;
 1152|      0|    }
 1153|   162k|    *in += len;
 1154|   162k|    return ret;
 1155|   162k|}
i2d_ECDSA_SIG:
 1247|   162k|{
 1248|   162k|    BUF_MEM *buf = NULL;
 1249|   162k|    size_t encoded_len;
 1250|   162k|    WPACKET pkt;
 1251|       |
 1252|   162k|    if (ppout == NULL) {
  ------------------
  |  Branch (1252:9): [True: 162k, False: 0]
  ------------------
 1253|   162k|        if (!WPACKET_init_null(&pkt, 0))
  ------------------
  |  Branch (1253:13): [True: 0, False: 162k]
  ------------------
 1254|      0|            return -1;
 1255|   162k|    } else if (*ppout == NULL) {
  ------------------
  |  Branch (1255:16): [True: 0, False: 0]
  ------------------
 1256|      0|        if ((buf = BUF_MEM_new()) == NULL
  ------------------
  |  Branch (1256:13): [True: 0, False: 0]
  ------------------
 1257|      0|            || !WPACKET_init_len(&pkt, buf, 0)) {
  ------------------
  |  Branch (1257:16): [True: 0, False: 0]
  ------------------
 1258|      0|            BUF_MEM_free(buf);
 1259|      0|            return -1;
 1260|      0|        }
 1261|      0|    } else {
 1262|      0|        if (!WPACKET_init_static_len(&pkt, *ppout, SIZE_MAX, 0))
  ------------------
  |  Branch (1262:13): [True: 0, False: 0]
  ------------------
 1263|      0|            return -1;
 1264|      0|    }
 1265|       |
 1266|   162k|    if (!ossl_encode_der_dsa_sig(&pkt, sig->r, sig->s)
  ------------------
  |  Branch (1266:9): [True: 0, False: 162k]
  ------------------
 1267|   162k|        || !WPACKET_get_total_written(&pkt, &encoded_len)
  ------------------
  |  Branch (1267:12): [True: 0, False: 162k]
  ------------------
 1268|   162k|        || !WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (1268:12): [True: 0, False: 162k]
  ------------------
 1269|      0|        BUF_MEM_free(buf);
 1270|      0|        WPACKET_cleanup(&pkt);
 1271|      0|        return -1;
 1272|      0|    }
 1273|       |
 1274|   162k|    if (ppout != NULL) {
  ------------------
  |  Branch (1274:9): [True: 0, False: 162k]
  ------------------
 1275|      0|        if (*ppout == NULL) {
  ------------------
  |  Branch (1275:13): [True: 0, False: 0]
  ------------------
 1276|      0|            *ppout = (unsigned char *)buf->data;
 1277|      0|            buf->data = NULL;
 1278|      0|            BUF_MEM_free(buf);
 1279|      0|        } else {
 1280|      0|            *ppout += encoded_len;
 1281|      0|        }
 1282|      0|    }
 1283|       |
 1284|   162k|    return (int)encoded_len;
 1285|   162k|}
ECDSA_size:
 1317|   162k|{
 1318|   162k|    int ret;
 1319|   162k|    ECDSA_SIG sig;
 1320|   162k|    const EC_GROUP *group;
 1321|   162k|    const BIGNUM *bn;
 1322|       |
 1323|   162k|    if (ec == NULL)
  ------------------
  |  Branch (1323:9): [True: 0, False: 162k]
  ------------------
 1324|      0|        return 0;
 1325|   162k|    group = EC_KEY_get0_group(ec);
 1326|   162k|    if (group == NULL)
  ------------------
  |  Branch (1326:9): [True: 0, False: 162k]
  ------------------
 1327|      0|        return 0;
 1328|       |
 1329|   162k|    bn = EC_GROUP_get0_order(group);
 1330|   162k|    if (bn == NULL)
  ------------------
  |  Branch (1330:9): [True: 0, False: 162k]
  ------------------
 1331|      0|        return 0;
 1332|       |
 1333|   162k|    sig.r = sig.s = (BIGNUM *)bn;
 1334|   162k|    ret = i2d_ECDSA_SIG(&sig, NULL);
 1335|       |
 1336|   162k|    if (ret < 0)
  ------------------
  |  Branch (1336:9): [True: 0, False: 162k]
  ------------------
 1337|      0|        ret = 0;
 1338|   162k|    return ret;
 1339|   162k|}

ossl_ec_check_group_type_id2name:
   77|   163k|{
   78|   163k|    size_t i, sz;
   79|       |
   80|   163k|    for (i = 0, sz = OSSL_NELEM(check_group_type_nameid_map); i < sz; i++) {
  ------------------
  |  |   14|   163k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (80:63): [True: 163k, False: 0]
  ------------------
   81|   163k|        if (id == (int)check_group_type_nameid_map[i].id)
  ------------------
  |  Branch (81:13): [True: 163k, False: 0]
  ------------------
   82|   163k|            return check_group_type_nameid_map[i].ptr;
   83|   163k|    }
   84|      0|    return NULL;
   85|   163k|}
ossl_ec_pt_format_id2name:
  148|   327k|{
  149|   327k|    size_t i, sz;
  150|       |
  151|   327k|    for (i = 0, sz = OSSL_NELEM(format_nameid_map); i < sz; i++) {
  ------------------
  |  |   14|   327k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (151:53): [True: 327k, False: 0]
  ------------------
  152|   327k|        if (id == (int)format_nameid_map[i].id)
  ------------------
  |  Branch (152:13): [True: 327k, False: 0]
  ------------------
  153|   327k|            return format_nameid_map[i].ptr;
  154|   327k|    }
  155|      0|    return NULL;
  156|   327k|}
ossl_ec_group_todata:
  293|   163k|{
  294|   163k|    int ret = 0, curve_nid, encoding_flag;
  295|   163k|    const char *encoding_name, *pt_form_name;
  296|   163k|    point_conversion_form_t genform;
  297|       |
  298|   163k|    if (group == NULL) {
  ------------------
  |  Branch (298:9): [True: 0, False: 163k]
  ------------------
  299|      0|        ERR_raise(ERR_LIB_EC, EC_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  300|      0|        return 0;
  301|      0|    }
  302|       |
  303|   163k|    genform = EC_GROUP_get_point_conversion_form(group);
  304|   163k|    pt_form_name = ossl_ec_pt_format_id2name(genform);
  305|   163k|    if (pt_form_name == NULL
  ------------------
  |  Branch (305:9): [True: 0, False: 163k]
  ------------------
  306|   163k|        || !ossl_param_build_set_utf8_string(
  ------------------
  |  Branch (306:12): [True: 0, False: 163k]
  ------------------
  307|   163k|            tmpl, params,
  308|   163k|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT, pt_form_name)) {
  ------------------
  |  |  403|   163k|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
  309|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|        return 0;
  311|      0|    }
  312|   163k|    encoding_flag = EC_GROUP_get_asn1_flag(group) & OPENSSL_EC_NAMED_CURVE;
  ------------------
  |  |   31|   163k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  313|   163k|    encoding_name = ec_param_encoding_id2name(encoding_flag);
  314|   163k|    if (encoding_name == NULL
  ------------------
  |  Branch (314:9): [True: 0, False: 163k]
  ------------------
  315|   163k|        || !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (315:12): [True: 0, False: 163k]
  ------------------
  316|   163k|            OSSL_PKEY_PARAM_EC_ENCODING,
  ------------------
  |  |  395|   163k|# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
  ------------------
  317|   163k|            encoding_name)) {
  318|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  319|      0|        return 0;
  320|      0|    }
  321|       |
  322|   163k|    if (!ossl_param_build_set_int(tmpl, params,
  ------------------
  |  Branch (322:9): [True: 0, False: 163k]
  ------------------
  323|   163k|            OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS,
  ------------------
  |  |  394|   163k|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
  324|   163k|            group->decoded_from_explicit_params))
  325|      0|        return 0;
  326|       |
  327|   163k|    curve_nid = EC_GROUP_get_curve_name(group);
  328|       |
  329|       |    /*
  330|       |     * Get the explicit parameters in these two cases:
  331|       |     * - We do not have a template, i.e. specific parameters are requested
  332|       |     * - The curve is not a named curve
  333|       |     */
  334|   163k|    if (tmpl == NULL || curve_nid == NID_undef)
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (334:9): [True: 163k, False: 0]
  |  Branch (334:25): [True: 0, False: 0]
  ------------------
  335|   163k|        if (!ec_group_explicit_todata(group, tmpl, params, bnctx, genbuf))
  ------------------
  |  Branch (335:13): [True: 0, False: 163k]
  ------------------
  336|      0|            goto err;
  337|       |
  338|   163k|    if (curve_nid != NID_undef) {
  ------------------
  |  |   18|   163k|#define NID_undef                       0
  ------------------
  |  Branch (338:9): [True: 163k, False: 0]
  ------------------
  339|       |        /* Named curve */
  340|   163k|        const char *curve_name = OSSL_EC_curve_nid2name(curve_nid);
  341|       |
  342|   163k|        if (curve_name == NULL
  ------------------
  |  Branch (342:13): [True: 0, False: 163k]
  ------------------
  343|   163k|            || !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (343:16): [True: 0, False: 163k]
  ------------------
  344|   163k|                OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|   163k|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  345|   163k|                curve_name)) {
  346|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_CURVE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  347|      0|            goto err;
  348|      0|        }
  349|   163k|    }
  350|   163k|    ret = 1;
  351|   163k|err:
  352|   163k|    return ret;
  353|   163k|}
ossl_ec_set_ecdh_cofactor_mode:
  361|    153|{
  362|    153|    const EC_GROUP *ecg = EC_KEY_get0_group(ec);
  363|    153|    const BIGNUM *cofactor;
  364|       |    /*
  365|       |     * mode can be only 0 for disable, or 1 for enable here.
  366|       |     *
  367|       |     * This is in contrast with the same parameter on an ECDH EVP_PKEY_CTX that
  368|       |     * also supports mode == -1 with the meaning of "reset to the default for
  369|       |     * the associated key".
  370|       |     */
  371|    153|    if (mode < 0 || mode > 1)
  ------------------
  |  Branch (371:9): [True: 0, False: 153]
  |  Branch (371:21): [True: 0, False: 153]
  ------------------
  372|      0|        return 0;
  373|       |
  374|    153|    if ((cofactor = EC_GROUP_get0_cofactor(ecg)) == NULL)
  ------------------
  |  Branch (374:9): [True: 0, False: 153]
  ------------------
  375|      0|        return 0;
  376|       |
  377|       |    /* ECDH cofactor mode has no effect if cofactor is 1 */
  378|    153|    if (BN_is_one(cofactor))
  ------------------
  |  Branch (378:9): [True: 153, False: 0]
  ------------------
  379|    153|        return 1;
  380|       |
  381|      0|    if (mode == 1)
  ------------------
  |  Branch (381:9): [True: 0, False: 0]
  ------------------
  382|      0|        EC_KEY_set_flags(ec, EC_FLAG_COFACTOR_ECDH);
  ------------------
  |  |  963|      0|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  383|      0|    else if (mode == 0)
  ------------------
  |  Branch (383:14): [True: 0, False: 0]
  ------------------
  384|      0|        EC_KEY_clear_flags(ec, EC_FLAG_COFACTOR_ECDH);
  ------------------
  |  |  963|      0|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  385|       |
  386|      0|    return 1;
  387|    153|}
ossl_ec_key_is_foreign:
  596|   162k|{
  597|   162k|#ifndef FIPS_MODULE
  598|   162k|    if (EC_KEY_get_method(ec) != EC_KEY_OpenSSL())
  ------------------
  |  Branch (598:9): [True: 0, False: 162k]
  ------------------
  599|      0|        return 1;
  600|   162k|#endif
  601|   162k|    return 0;
  602|   162k|}
ossl_x509_algor_is_sm2:
  739|   162k|{
  740|   162k|    int ptype = 0;
  741|   162k|    const void *pval = NULL;
  742|       |
  743|   162k|    X509_ALGOR_get0(NULL, &ptype, &pval, palg);
  744|       |
  745|   162k|    if (ptype == V_ASN1_OBJECT)
  ------------------
  |  |   70|   162k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (745:9): [True: 162k, False: 0]
  ------------------
  746|   162k|        return OBJ_obj2nid((ASN1_OBJECT *)pval) == NID_sm2;
  ------------------
  |  | 1259|   162k|#define NID_sm2         1172
  ------------------
  747|       |
  748|      0|    if (ptype == V_ASN1_SEQUENCE) {
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (748:9): [True: 0, False: 0]
  ------------------
  749|      0|        const ASN1_STRING *str = pval;
  750|      0|        const unsigned char *der = str->data;
  751|      0|        int derlen = str->length;
  752|      0|        EC_GROUP *group;
  753|      0|        int ret;
  754|       |
  755|      0|        if ((group = d2i_ECPKParameters(NULL, &der, derlen)) == NULL)
  ------------------
  |  Branch (755:13): [True: 0, False: 0]
  ------------------
  756|      0|            ret = 0;
  757|      0|        else
  758|      0|            ret = (EC_GROUP_get_curve_name(group) == NID_sm2);
  ------------------
  |  | 1259|      0|#define NID_sm2         1172
  ------------------
  759|       |
  760|      0|        EC_GROUP_free(group);
  761|      0|        return ret;
  762|      0|    }
  763|       |
  764|      0|    return 0;
  765|      0|}
ossl_ec_key_param_from_x509_algor:
  769|   162k|{
  770|   162k|    int ptype = 0;
  771|   162k|    const void *pval = NULL;
  772|   162k|    EC_KEY *eckey = NULL;
  773|   162k|    EC_GROUP *group = NULL;
  774|       |
  775|   162k|    X509_ALGOR_get0(NULL, &ptype, &pval, palg);
  776|   162k|    if ((eckey = EC_KEY_new_ex(libctx, propq)) == NULL) {
  ------------------
  |  Branch (776:9): [True: 0, False: 162k]
  ------------------
  777|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  778|      0|        goto ecerr;
  779|      0|    }
  780|       |
  781|   162k|    if (ptype == V_ASN1_SEQUENCE) {
  ------------------
  |  |   76|   162k|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (781:9): [True: 0, False: 162k]
  ------------------
  782|      0|        const ASN1_STRING *pstr = pval;
  783|      0|        const unsigned char *pm = pstr->data;
  784|      0|        int pmlen = pstr->length;
  785|       |
  786|      0|        if (d2i_ECParameters(&eckey, &pm, pmlen) == NULL) {
  ------------------
  |  Branch (786:13): [True: 0, False: 0]
  ------------------
  787|      0|            ERR_raise(ERR_LIB_EC, EC_R_DECODE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  788|      0|            goto ecerr;
  789|      0|        }
  790|   162k|    } else if (ptype == V_ASN1_OBJECT) {
  ------------------
  |  |   70|   162k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (790:16): [True: 162k, False: 0]
  ------------------
  791|   162k|        const ASN1_OBJECT *poid = pval;
  792|       |
  793|       |        /*
  794|       |         * type == V_ASN1_OBJECT => the parameters are given by an asn1 OID
  795|       |         */
  796|       |
  797|   162k|        group = EC_GROUP_new_by_curve_name_ex(libctx, propq, OBJ_obj2nid(poid));
  798|   162k|        if (group == NULL)
  ------------------
  |  Branch (798:13): [True: 0, False: 162k]
  ------------------
  799|      0|            goto ecerr;
  800|   162k|        EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE);
  ------------------
  |  |   31|   162k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  801|   162k|        if (EC_KEY_set_group(eckey, group) == 0)
  ------------------
  |  Branch (801:13): [True: 0, False: 162k]
  ------------------
  802|      0|            goto ecerr;
  803|   162k|        EC_GROUP_free(group);
  804|   162k|    } else {
  805|      0|        ERR_raise(ERR_LIB_EC, EC_R_DECODE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  806|      0|        goto ecerr;
  807|      0|    }
  808|       |
  809|   162k|    return eckey;
  810|       |
  811|      0|ecerr:
  812|      0|    EC_KEY_free(eckey);
  813|      0|    EC_GROUP_free(group);
  814|       |    return NULL;
  815|   162k|}
ec_backend.c:ec_param_encoding_id2name:
   66|   163k|{
   67|   163k|    size_t i, sz;
   68|       |
   69|   327k|    for (i = 0, sz = OSSL_NELEM(encoding_nameid_map); i < sz; i++) {
  ------------------
  |  |   14|   163k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (69:55): [True: 327k, False: 0]
  ------------------
   70|   327k|        if (id == (int)encoding_nameid_map[i].id)
  ------------------
  |  Branch (70:13): [True: 163k, False: 163k]
  ------------------
   71|   163k|            return encoding_nameid_map[i].ptr;
   72|   327k|    }
   73|      0|    return NULL;
   74|   163k|}
ec_backend.c:ec_group_explicit_todata:
  161|   163k|{
  162|   163k|    int ret = 0, fid;
  163|   163k|    const char *field_type;
  164|   163k|    const OSSL_PARAM *param = NULL;
  165|   163k|    const OSSL_PARAM *param_p = NULL;
  166|   163k|    const OSSL_PARAM *param_a = NULL;
  167|   163k|    const OSSL_PARAM *param_b = NULL;
  168|       |
  169|   163k|    fid = EC_GROUP_get_field_type(group);
  170|       |
  171|   163k|    if (fid == NID_X9_62_prime_field) {
  ------------------
  |  |  152|   163k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (171:9): [True: 163k, False: 0]
  ------------------
  172|   163k|        field_type = SN_X9_62_prime_field;
  ------------------
  |  |  151|   163k|#define SN_X9_62_prime_field            "prime-field"
  ------------------
  173|   163k|    } else if (fid == NID_X9_62_characteristic_two_field) {
  ------------------
  |  |  156|      0|#define NID_X9_62_characteristic_two_field              407
  ------------------
  |  Branch (173:16): [True: 0, False: 0]
  ------------------
  174|       |#ifdef OPENSSL_NO_EC2M
  175|       |        ERR_raise(ERR_LIB_EC, EC_R_GF2M_NOT_SUPPORTED);
  176|       |        goto err;
  177|       |#else
  178|      0|        field_type = SN_X9_62_characteristic_two_field;
  ------------------
  |  |  155|      0|#define SN_X9_62_characteristic_two_field               "characteristic-two-field"
  ------------------
  179|      0|#endif
  180|      0|    } else {
  181|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  182|      0|        return 0;
  183|      0|    }
  184|       |
  185|   163k|    param_p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_P);
  ------------------
  |  |  402|   163k|# define OSSL_PKEY_PARAM_EC_P "p"
  ------------------
  186|   163k|    param_a = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_A);
  ------------------
  |  |  385|   163k|# define OSSL_PKEY_PARAM_EC_A "a"
  ------------------
  187|   163k|    param_b = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_B);
  ------------------
  |  |  386|   163k|# define OSSL_PKEY_PARAM_EC_B "b"
  ------------------
  188|   163k|    if (tmpl != NULL || param_p != NULL || param_a != NULL || param_b != NULL) {
  ------------------
  |  Branch (188:9): [True: 0, False: 163k]
  |  Branch (188:25): [True: 0, False: 163k]
  |  Branch (188:44): [True: 0, False: 163k]
  |  Branch (188:63): [True: 0, False: 163k]
  ------------------
  189|      0|        BIGNUM *p = BN_CTX_get(bnctx);
  190|      0|        BIGNUM *a = BN_CTX_get(bnctx);
  191|      0|        BIGNUM *b = BN_CTX_get(bnctx);
  192|       |
  193|      0|        if (b == NULL) {
  ------------------
  |  Branch (193:13): [True: 0, False: 0]
  ------------------
  194|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  195|      0|            goto err;
  196|      0|        }
  197|       |
  198|      0|        if (!EC_GROUP_get_curve(group, p, a, b, bnctx)) {
  ------------------
  |  Branch (198:13): [True: 0, False: 0]
  ------------------
  199|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_CURVE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  200|      0|            goto err;
  201|      0|        }
  202|      0|        if (!ossl_param_build_set_bn(tmpl, params, OSSL_PKEY_PARAM_EC_P, p)
  ------------------
  |  |  402|      0|# define OSSL_PKEY_PARAM_EC_P "p"
  ------------------
  |  Branch (202:13): [True: 0, False: 0]
  ------------------
  203|      0|            || !ossl_param_build_set_bn(tmpl, params, OSSL_PKEY_PARAM_EC_A, a)
  ------------------
  |  |  385|      0|# define OSSL_PKEY_PARAM_EC_A "a"
  ------------------
  |  Branch (203:16): [True: 0, False: 0]
  ------------------
  204|      0|            || !ossl_param_build_set_bn(tmpl, params, OSSL_PKEY_PARAM_EC_B, b)) {
  ------------------
  |  |  386|      0|# define OSSL_PKEY_PARAM_EC_B "b"
  ------------------
  |  Branch (204:16): [True: 0, False: 0]
  ------------------
  205|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  206|      0|            goto err;
  207|      0|        }
  208|      0|    }
  209|       |
  210|   163k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ORDER);
  ------------------
  |  |  401|   163k|# define OSSL_PKEY_PARAM_EC_ORDER "order"
  ------------------
  211|   163k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (211:9): [True: 0, False: 163k]
  |  Branch (211:25): [True: 0, False: 163k]
  ------------------
  212|      0|        const BIGNUM *order = EC_GROUP_get0_order(group);
  213|       |
  214|      0|        if (order == NULL) {
  ------------------
  |  Branch (214:13): [True: 0, False: 0]
  ------------------
  215|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_GROUP_ORDER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  216|      0|            goto err;
  217|      0|        }
  218|      0|        if (!ossl_param_build_set_bn(tmpl, params, OSSL_PKEY_PARAM_EC_ORDER,
  ------------------
  |  |  401|      0|# define OSSL_PKEY_PARAM_EC_ORDER "order"
  ------------------
  |  Branch (218:13): [True: 0, False: 0]
  ------------------
  219|      0|                order)) {
  220|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  221|      0|            goto err;
  222|      0|        }
  223|      0|    }
  224|       |
  225|   163k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_FIELD_TYPE);
  ------------------
  |  |  397|   163k|# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
  ------------------
  226|   163k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (226:9): [True: 0, False: 163k]
  |  Branch (226:25): [True: 0, False: 163k]
  ------------------
  227|      0|        if (!ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (227:13): [True: 0, False: 0]
  ------------------
  228|      0|                OSSL_PKEY_PARAM_EC_FIELD_TYPE,
  ------------------
  |  |  397|      0|# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
  ------------------
  229|      0|                field_type)) {
  230|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  231|      0|            goto err;
  232|      0|        }
  233|      0|    }
  234|       |
  235|   163k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_GENERATOR);
  ------------------
  |  |  398|   163k|# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
  ------------------
  236|   163k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (236:9): [True: 0, False: 163k]
  |  Branch (236:25): [True: 0, False: 163k]
  ------------------
  237|      0|        size_t genbuf_len;
  238|      0|        const EC_POINT *genpt = EC_GROUP_get0_generator(group);
  239|      0|        point_conversion_form_t genform = EC_GROUP_get_point_conversion_form(group);
  240|       |
  241|      0|        if (genpt == NULL) {
  ------------------
  |  Branch (241:13): [True: 0, False: 0]
  ------------------
  242|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  243|      0|            goto err;
  244|      0|        }
  245|      0|        genbuf_len = EC_POINT_point2buf(group, genpt, genform, genbuf, bnctx);
  246|      0|        if (genbuf_len == 0) {
  ------------------
  |  Branch (246:13): [True: 0, False: 0]
  ------------------
  247|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  248|      0|            goto err;
  249|      0|        }
  250|      0|        if (!ossl_param_build_set_octet_string(tmpl, params,
  ------------------
  |  Branch (250:13): [True: 0, False: 0]
  ------------------
  251|      0|                OSSL_PKEY_PARAM_EC_GENERATOR,
  ------------------
  |  |  398|      0|# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
  ------------------
  252|      0|                *genbuf, genbuf_len)) {
  253|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  254|      0|            goto err;
  255|      0|        }
  256|      0|    }
  257|       |
  258|   163k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_COFACTOR);
  ------------------
  |  |  393|   163k|# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
  ------------------
  259|   163k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (259:9): [True: 0, False: 163k]
  |  Branch (259:25): [True: 0, False: 163k]
  ------------------
  260|      0|        const BIGNUM *cofactor = EC_GROUP_get0_cofactor(group);
  261|       |
  262|      0|        if (cofactor != NULL
  ------------------
  |  Branch (262:13): [True: 0, False: 0]
  ------------------
  263|      0|            && !ossl_param_build_set_bn(tmpl, params,
  ------------------
  |  Branch (263:16): [True: 0, False: 0]
  ------------------
  264|      0|                OSSL_PKEY_PARAM_EC_COFACTOR, cofactor)) {
  ------------------
  |  |  393|      0|# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
  ------------------
  265|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  266|      0|            goto err;
  267|      0|        }
  268|      0|    }
  269|       |
  270|   163k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_SEED);
  ------------------
  |  |  406|   163k|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
  271|   163k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (271:9): [True: 0, False: 163k]
  |  Branch (271:25): [True: 0, False: 163k]
  ------------------
  272|      0|        unsigned char *seed = EC_GROUP_get0_seed(group);
  273|      0|        size_t seed_len = EC_GROUP_get_seed_len(group);
  274|       |
  275|      0|        if (seed != NULL
  ------------------
  |  Branch (275:13): [True: 0, False: 0]
  ------------------
  276|      0|            && seed_len > 0
  ------------------
  |  Branch (276:16): [True: 0, False: 0]
  ------------------
  277|      0|            && !ossl_param_build_set_octet_string(tmpl, params,
  ------------------
  |  Branch (277:16): [True: 0, False: 0]
  ------------------
  278|      0|                OSSL_PKEY_PARAM_EC_SEED,
  ------------------
  |  |  406|      0|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
  279|      0|                seed, seed_len)) {
  280|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|            goto err;
  282|      0|        }
  283|      0|    }
  284|   163k|    ret = 1;
  285|   163k|err:
  286|   163k|    return ret;
  287|   163k|}

EC_GROUP_new_by_curve_name_ex:
 3020|   162k|{
 3021|   162k|    EC_GROUP *ret = NULL;
 3022|   162k|    const ec_list_element *curve;
 3023|       |
 3024|   162k|    if ((curve = ec_curve_nid2curve(nid)) == NULL
  ------------------
  |  Branch (3024:9): [True: 0, False: 162k]
  ------------------
 3025|   162k|        || (ret = ec_group_new_from_data(libctx, propq, *curve)) == NULL) {
  ------------------
  |  Branch (3025:12): [True: 0, False: 162k]
  ------------------
 3026|      0|#ifndef FIPS_MODULE
 3027|      0|        ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |   69|      0|#define ERR_LIB_EC 16
  ------------------
                      ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |   95|      0|#define EC_R_UNKNOWN_GROUP 129
  ------------------
 3028|      0|            "name=%s", OBJ_nid2sn(nid));
 3029|       |#else
 3030|       |        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_GROUP);
 3031|       |#endif
 3032|      0|        return NULL;
 3033|      0|    }
 3034|       |
 3035|   162k|    return ret;
 3036|   162k|}
ec_curve.c:ec_curve_nid2curve:
 2843|   162k|{
 2844|   162k|    size_t i;
 2845|       |
 2846|   162k|    if (nid <= 0)
  ------------------
  |  Branch (2846:9): [True: 0, False: 162k]
  ------------------
 2847|      0|        return NULL;
 2848|       |
 2849|  2.07M|    for (i = 0; i < curve_list_length; i++) {
  ------------------
  |  | 2840|  2.07M|#define curve_list_length OSSL_NELEM(curve_list)
  |  |  ------------------
  |  |  |  |   14|  2.07M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (2849:17): [True: 2.07M, False: 0]
  ------------------
 2850|  2.07M|        if (curve_list[i].nid == nid)
  ------------------
  |  Branch (2850:13): [True: 162k, False: 1.91M]
  ------------------
 2851|   162k|            return &curve_list[i];
 2852|  2.07M|    }
 2853|      0|    return NULL;
 2854|   162k|}
ec_curve.c:ec_group_new_from_data:
 2859|   162k|{
 2860|   162k|    EC_GROUP *group = NULL;
 2861|   162k|    EC_POINT *P = NULL;
 2862|   162k|    BN_CTX *ctx = NULL;
 2863|   162k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *order = NULL;
 2864|   162k|    int ok = 0;
 2865|   162k|    int seed_len, param_len;
 2866|   162k|    const EC_METHOD *meth;
 2867|   162k|    const EC_CURVE_DATA *data;
 2868|   162k|    const unsigned char *params;
 2869|       |
 2870|       |    /* If no curve data curve method must handle everything */
 2871|   162k|    if (curve.data == NULL)
  ------------------
  |  Branch (2871:9): [True: 0, False: 162k]
  ------------------
 2872|      0|        return ossl_ec_group_new_ex(libctx, propq,
 2873|      0|            curve.meth != NULL ? curve.meth() : NULL);
  ------------------
  |  Branch (2873:13): [True: 0, False: 0]
  ------------------
 2874|       |
 2875|   162k|    if ((ctx = BN_CTX_new_ex(libctx)) == NULL) {
  ------------------
  |  Branch (2875:9): [True: 0, False: 162k]
  ------------------
 2876|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2877|      0|        goto err;
 2878|      0|    }
 2879|       |
 2880|   162k|    data = curve.data;
 2881|   162k|    seed_len = data->seed_len;
 2882|   162k|    param_len = data->param_len;
 2883|   162k|    params = (const unsigned char *)(data + 1); /* skip header */
 2884|       |
 2885|   162k|    if (curve.meth != NULL) {
  ------------------
  |  Branch (2885:9): [True: 162k, False: 288]
  ------------------
 2886|   162k|        meth = curve.meth();
 2887|   162k|        if ((group = ossl_ec_group_new_ex(libctx, propq, meth)) == NULL) {
  ------------------
  |  Branch (2887:13): [True: 0, False: 162k]
  ------------------
 2888|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2889|      0|            goto err;
 2890|      0|        }
 2891|   162k|        if (group->meth->group_full_init != NULL) {
  ------------------
  |  Branch (2891:13): [True: 12.5k, False: 149k]
  ------------------
 2892|  12.5k|            if (!group->meth->group_full_init(group, params)) {
  ------------------
  |  Branch (2892:17): [True: 0, False: 12.5k]
  ------------------
 2893|      0|                ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2894|      0|                goto err;
 2895|      0|            }
 2896|  12.5k|            EC_GROUP_set_curve_name(group, curve.nid);
 2897|  12.5k|            BN_CTX_free(ctx);
 2898|  12.5k|            return group;
 2899|  12.5k|        }
 2900|   162k|    }
 2901|       |
 2902|   150k|    params += seed_len; /* skip seed */
 2903|       |
 2904|   150k|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2904:9): [True: 0, False: 150k]
  ------------------
 2905|   150k|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2905:12): [True: 0, False: 150k]
  ------------------
 2906|   150k|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (2906:12): [True: 0, False: 150k]
  ------------------
 2907|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2908|      0|        goto err;
 2909|      0|    }
 2910|       |
 2911|   150k|    if (group != NULL) {
  ------------------
  |  Branch (2911:9): [True: 149k, False: 288]
  ------------------
 2912|   149k|        if (group->meth->group_set_curve(group, p, a, b, ctx) == 0) {
  ------------------
  |  Branch (2912:13): [True: 0, False: 149k]
  ------------------
 2913|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2914|      0|            goto err;
 2915|      0|        }
 2916|   149k|    } else if (data->field_type == NID_X9_62_prime_field) {
  ------------------
  |  |  152|    288|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (2916:16): [True: 288, False: 0]
  ------------------
 2917|    288|        if ((group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) == NULL) {
  ------------------
  |  Branch (2917:13): [True: 0, False: 288]
  ------------------
 2918|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2919|      0|            goto err;
 2920|      0|        }
 2921|    288|    }
 2922|      0|#ifndef OPENSSL_NO_EC2M
 2923|      0|    else { /* field_type ==
 2924|       |            * NID_X9_62_characteristic_two_field */
 2925|       |
 2926|      0|        if ((group = EC_GROUP_new_curve_GF2m(p, a, b, ctx)) == NULL) {
  ------------------
  |  Branch (2926:13): [True: 0, False: 0]
  ------------------
 2927|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2928|      0|            goto err;
 2929|      0|        }
 2930|      0|    }
 2931|   150k|#endif
 2932|       |
 2933|   150k|    EC_GROUP_set_curve_name(group, curve.nid);
 2934|       |
 2935|   150k|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (2935:9): [True: 0, False: 150k]
  ------------------
 2936|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2937|      0|        goto err;
 2938|      0|    }
 2939|       |
 2940|   150k|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2940:9): [True: 0, False: 150k]
  ------------------
 2941|   150k|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (2941:12): [True: 0, False: 150k]
  ------------------
 2942|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2943|      0|        goto err;
 2944|      0|    }
 2945|   150k|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (2945:9): [True: 0, False: 150k]
  ------------------
 2946|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2947|      0|        goto err;
 2948|      0|    }
 2949|   150k|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2949:9): [True: 0, False: 150k]
  ------------------
 2950|   150k|        || !BN_set_word(x, (BN_ULONG)data->cofactor)) {
  ------------------
  |  Branch (2950:12): [True: 0, False: 150k]
  ------------------
 2951|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2952|      0|        goto err;
 2953|      0|    }
 2954|   150k|    if (!EC_GROUP_set_generator(group, P, order, x)) {
  ------------------
  |  Branch (2954:9): [True: 0, False: 150k]
  ------------------
 2955|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2956|      0|        goto err;
 2957|      0|    }
 2958|   150k|    if (seed_len) {
  ------------------
  |  Branch (2958:9): [True: 149k, False: 288]
  ------------------
 2959|   149k|        if (!EC_GROUP_set_seed(group, params - seed_len, seed_len)) {
  ------------------
  |  Branch (2959:13): [True: 0, False: 149k]
  ------------------
 2960|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2961|      0|            goto err;
 2962|      0|        }
 2963|   149k|    }
 2964|       |
 2965|   150k|#ifndef FIPS_MODULE
 2966|   150k|    if (EC_GROUP_get_asn1_flag(group) == OPENSSL_EC_NAMED_CURVE) {
  ------------------
  |  |   31|   150k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  |  Branch (2966:9): [True: 150k, False: 0]
  ------------------
 2967|       |        /*
 2968|       |         * Some curves don't have an associated OID: for those we should not
 2969|       |         * default to `OPENSSL_EC_NAMED_CURVE` encoding of parameters and
 2970|       |         * instead set the ASN1 flag to `OPENSSL_EC_EXPLICIT_CURVE`.
 2971|       |         *
 2972|       |         * Note that `OPENSSL_EC_NAMED_CURVE` is set as the default ASN1 flag on
 2973|       |         * `EC_GROUP_new()`, when we don't have enough elements to determine if
 2974|       |         * an OID for the curve name actually exists.
 2975|       |         * We could implement this check on `EC_GROUP_set_curve_name()` but
 2976|       |         * overloading the simple setter with this lookup could have a negative
 2977|       |         * performance impact and unexpected consequences.
 2978|       |         */
 2979|   150k|        ASN1_OBJECT *asn1obj = OBJ_nid2obj(curve.nid);
 2980|       |
 2981|   150k|        if (asn1obj == NULL) {
  ------------------
  |  Branch (2981:13): [True: 0, False: 150k]
  ------------------
 2982|      0|            ERR_raise(ERR_LIB_EC, ERR_R_OBJ_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2983|      0|            goto err;
 2984|      0|        }
 2985|   150k|        if (OBJ_length(asn1obj) == 0)
  ------------------
  |  Branch (2985:13): [True: 0, False: 150k]
  ------------------
 2986|      0|            EC_GROUP_set_asn1_flag(group, OPENSSL_EC_EXPLICIT_CURVE);
  ------------------
  |  |   30|      0|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
 2987|       |
 2988|   150k|        ASN1_OBJECT_free(asn1obj);
 2989|   150k|    }
 2990|       |#else
 2991|       |    /*
 2992|       |     * Inside the FIPS module we do not support explicit curves anyway
 2993|       |     * so the above check is not necessary.
 2994|       |     *
 2995|       |     * Skipping it is also necessary because `OBJ_length()` and
 2996|       |     * `ASN1_OBJECT_free()` are not available within the FIPS module
 2997|       |     * boundaries.
 2998|       |     */
 2999|       |#endif
 3000|       |
 3001|   150k|    ok = 1;
 3002|   150k|err:
 3003|   150k|    if (!ok) {
  ------------------
  |  Branch (3003:9): [True: 0, False: 150k]
  ------------------
 3004|      0|        EC_GROUP_free(group);
 3005|       |        group = NULL;
 3006|      0|    }
 3007|   150k|    EC_POINT_free(P);
 3008|   150k|    BN_CTX_free(ctx);
 3009|   150k|    BN_free(p);
 3010|   150k|    BN_free(a);
 3011|   150k|    BN_free(b);
 3012|   150k|    BN_free(order);
 3013|   150k|    BN_free(x);
 3014|   150k|    BN_free(y);
 3015|   150k|    return group;
 3016|   150k|}

EC_GROUP_new_curve_GFp:
   23|    288|{
   24|    288|    const EC_METHOD *meth;
   25|    288|    EC_GROUP *ret;
   26|       |
   27|    288|#if defined(OPENSSL_BN_ASM_MONT)
   28|       |    /*
   29|       |     * This might appear controversial, but the fact is that generic
   30|       |     * prime method was observed to deliver better performance even
   31|       |     * for NIST primes on a range of platforms, e.g.: 60%-15%
   32|       |     * improvement on IA-64, ~25% on ARM, 30%-90% on P4, 20%-25%
   33|       |     * in 32-bit build and 35%--12% in 64-bit build on Core2...
   34|       |     * Coefficients are relative to optimized bn_nist.c for most
   35|       |     * intensive ECDSA verify and ECDH operations for 192- and 521-
   36|       |     * bit keys respectively. Choice of these boundary values is
   37|       |     * arguable, because the dependency of improvement coefficient
   38|       |     * from key length is not a "monotone" curve. For example while
   39|       |     * 571-bit result is 23% on ARM, 384-bit one is -1%. But it's
   40|       |     * generally faster, sometimes "respectfully" faster, sometimes
   41|       |     * "tolerably" slower... What effectively happens is that loop
   42|       |     * with bn_mul_add_words is put against bn_mul_mont, and the
   43|       |     * latter "wins" on short vectors. Correct solution should be
   44|       |     * implementing dedicated NxN multiplication subroutines for
   45|       |     * small N. But till it materializes, let's stick to generic
   46|       |     * prime method...
   47|       |     *                                              <@dot-asm>
   48|       |     */
   49|    288|    meth = EC_GFp_mont_method();
   50|       |#else
   51|       |    if (BN_nist_mod_func(p))
   52|       |        meth = EC_GFp_nist_method();
   53|       |    else
   54|       |        meth = EC_GFp_mont_method();
   55|       |#endif
   56|       |
   57|    288|    ret = ossl_ec_group_new_ex(ossl_bn_get_libctx(ctx), NULL, meth);
   58|    288|    if (ret == NULL)
  ------------------
  |  Branch (58:9): [True: 0, False: 288]
  ------------------
   59|      0|        return NULL;
   60|       |
   61|    288|    if (!EC_GROUP_set_curve(ret, p, a, b, ctx)) {
  ------------------
  |  Branch (61:9): [True: 0, False: 288]
  ------------------
   62|      0|        EC_GROUP_free(ret);
   63|      0|        return NULL;
   64|      0|    }
   65|       |
   66|    288|    return ret;
   67|    288|}

ossl_err_load_EC_strings:
  127|      1|{
  128|      1|#ifndef OPENSSL_NO_ERR
  129|      1|    if (ERR_reason_error_string(EC_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (129:9): [True: 1, False: 0]
  ------------------
  130|      1|        ERR_load_strings_const(EC_str_reasons);
  131|      1|#endif
  132|      1|    return 1;
  133|      1|}

EC_KEY_new_ex:
   38|   162k|{
   39|   162k|    return ossl_ec_key_new_method_int(ctx, propq);
   40|   162k|}
EC_KEY_free:
   69|   487k|{
   70|   487k|    int i;
   71|       |
   72|   487k|    if (r == NULL)
  ------------------
  |  Branch (72:9): [True: 162k, False: 324k]
  ------------------
   73|   162k|        return;
   74|       |
   75|   324k|    CRYPTO_DOWN_REF(&r->references, &i);
   76|   324k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|   324k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   324k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   324k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   324k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   77|   324k|    if (i > 0)
  ------------------
  |  Branch (77:9): [True: 162k, False: 162k]
  ------------------
   78|   162k|        return;
   79|   162k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   162k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 162k]
  |  |  ------------------
  ------------------
   80|       |
   81|   162k|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (81:9): [True: 162k, False: 0]
  |  Branch (81:28): [True: 0, False: 162k]
  ------------------
   82|      0|        r->meth->finish(r);
   83|       |
   84|   162k|    if (r->group && r->group->meth->keyfinish)
  ------------------
  |  Branch (84:9): [True: 162k, False: 0]
  |  Branch (84:21): [True: 0, False: 162k]
  ------------------
   85|      0|        r->group->meth->keyfinish(r);
   86|       |
   87|   162k|#ifndef FIPS_MODULE
   88|   162k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EC_KEY, r, &r->ex_data);
  ------------------
  |  |  259|   162k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
   89|   162k|#endif
   90|   162k|    CRYPTO_FREE_REF(&r->references);
   91|   162k|    EC_GROUP_free(r->group);
   92|   162k|    EC_POINT_free(r->pub_key);
   93|   162k|    BN_clear_free(r->priv_key);
   94|   162k|    OPENSSL_free(r->propq);
  ------------------
  |  |  132|   162k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   95|       |
   96|   162k|    OPENSSL_clear_free((void *)r, sizeof(EC_KEY));
  ------------------
  |  |  130|   162k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   97|   162k|}
EC_KEY_up_ref:
  176|   162k|{
  177|   162k|    int i;
  178|       |
  179|   162k|    if (CRYPTO_UP_REF(&r->references, &i) <= 0)
  ------------------
  |  Branch (179:9): [True: 0, False: 162k]
  ------------------
  180|      0|        return 0;
  181|       |
  182|   162k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|   162k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   162k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   162k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   162k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  183|   162k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   162k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 162k]
  |  |  ------------------
  ------------------
  184|   162k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (184:13): [True: 162k, False: 0]
  ------------------
  185|   162k|}
EC_KEY_generate_key:
  188|    441|{
  189|    441|    if (eckey == NULL || eckey->group == NULL) {
  ------------------
  |  Branch (189:9): [True: 0, False: 441]
  |  Branch (189:26): [True: 0, False: 441]
  ------------------
  190|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  191|      0|        return 0;
  192|      0|    }
  193|    441|    if (eckey->meth->keygen != NULL) {
  ------------------
  |  Branch (193:9): [True: 441, False: 0]
  ------------------
  194|    441|        int ret;
  195|       |
  196|    441|        ret = eckey->meth->keygen(eckey);
  197|    441|        if (ret == 1)
  ------------------
  |  Branch (197:13): [True: 441, False: 0]
  ------------------
  198|    441|            eckey->dirty_cnt++;
  199|       |
  200|    441|        return ret;
  201|    441|    }
  202|    441|    ERR_raise(ERR_LIB_EC, EC_R_OPERATION_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  203|      0|    return 0;
  204|    441|}
ossl_ec_key_gen:
  207|    441|{
  208|    441|    int ret;
  209|       |
  210|    441|    ret = eckey->group->meth->keygen(eckey);
  211|       |
  212|    441|    if (ret == 1)
  ------------------
  |  Branch (212:9): [True: 441, False: 0]
  ------------------
  213|    441|        eckey->dirty_cnt++;
  214|    441|    return ret;
  215|    441|}
ossl_ec_key_simple_generate_key:
  420|    441|{
  421|    441|    return ec_generate_key(eckey, 0);
  422|    441|}
ossl_ec_key_get_libctx:
  726|   327k|{
  727|   327k|    return key->libctx;
  728|   327k|}
ossl_ec_key_get0_propq:
  731|   163k|{
  732|   163k|    return key->propq;
  733|   163k|}
ossl_ec_key_set0_libctx:
  736|   162k|{
  737|   162k|    key->libctx = libctx;
  738|       |    /* Do we need to propagate this to the group? */
  739|   162k|}
EC_KEY_get0_group:
  742|   814k|{
  743|   814k|    return key->group;
  744|   814k|}
EC_KEY_set_group:
  747|   162k|{
  748|   162k|    if (key->meth->set_group != NULL && key->meth->set_group(key, group) == 0)
  ------------------
  |  Branch (748:9): [True: 0, False: 162k]
  |  Branch (748:41): [True: 0, False: 0]
  ------------------
  749|      0|        return 0;
  750|   162k|    EC_GROUP_free(key->group);
  751|   162k|    key->group = EC_GROUP_dup(group);
  752|   162k|    if (key->group != NULL && EC_GROUP_get_curve_name(key->group) == NID_sm2)
  ------------------
  |  | 1259|   162k|#define NID_sm2         1172
  ------------------
  |  Branch (752:9): [True: 162k, False: 0]
  |  Branch (752:31): [True: 288, False: 162k]
  ------------------
  753|    288|        EC_KEY_set_flags(key, EC_FLAG_SM2_RANGE);
  ------------------
  |  |  962|    288|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  754|       |
  755|   162k|    key->dirty_cnt++;
  756|   162k|    return (key->group == NULL) ? 0 : 1;
  ------------------
  |  Branch (756:12): [True: 0, False: 162k]
  ------------------
  757|   162k|}
EC_KEY_get0_private_key:
  760|   163k|{
  761|   163k|    return key->priv_key;
  762|   163k|}
EC_KEY_get0_public_key:
  860|   164k|{
  861|   164k|    return key->pub_key;
  862|   164k|}
EC_KEY_get_enc_flags:
  876|   163k|{
  877|   163k|    return key->enc_flag;
  878|   163k|}
EC_KEY_get_conv_form:
  886|   163k|{
  887|   163k|    return key->conv_form;
  888|   163k|}
EC_KEY_get_flags:
  913|   652k|{
  914|   652k|    return key->flags;
  915|   652k|}
EC_KEY_set_flags:
  918|    288|{
  919|    288|    key->flags |= flags;
  920|    288|    key->dirty_cnt++;
  921|    288|}
EC_KEY_oct2key:
  946|   162k|{
  947|   162k|    if (key == NULL || key->group == NULL)
  ------------------
  |  Branch (947:9): [True: 0, False: 162k]
  |  Branch (947:24): [True: 0, False: 162k]
  ------------------
  948|      0|        return 0;
  949|   162k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (949:9): [True: 162k, False: 0]
  ------------------
  950|   162k|        key->pub_key = EC_POINT_new(key->group);
  951|   162k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (951:9): [True: 0, False: 162k]
  ------------------
  952|      0|        return 0;
  953|   162k|    if (EC_POINT_oct2point(key->group, key->pub_key, buf, len, ctx) == 0)
  ------------------
  |  Branch (953:9): [True: 0, False: 162k]
  ------------------
  954|      0|        return 0;
  955|   162k|    key->dirty_cnt++;
  956|       |    /*
  957|       |     * Save the point conversion form.
  958|       |     * For non-custom curves the first octet of the buffer (excluding
  959|       |     * the last significant bit) contains the point conversion form.
  960|       |     * EC_POINT_oct2point() has already performed sanity checking of
  961|       |     * the buffer so we know it is valid.
  962|       |     */
  963|   162k|    if ((key->group->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0)
  ------------------
  |  |   29|   162k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (963:9): [True: 162k, False: 0]
  ------------------
  964|   162k|        key->conv_form = (point_conversion_form_t)(buf[0] & ~0x01);
  965|   162k|    return 1;
  966|   162k|}
ec_key.c:ec_generate_key:
  280|    441|{
  281|    441|    int ok = 0;
  282|    441|    BIGNUM *priv_key = NULL;
  283|    441|    const BIGNUM *tmp = NULL;
  284|    441|    BIGNUM *order = NULL;
  285|    441|    EC_POINT *pub_key = NULL;
  286|    441|    const EC_GROUP *group = eckey->group;
  287|    441|    BN_CTX *ctx = BN_CTX_secure_new_ex(eckey->libctx);
  288|    441|    int sm2 = EC_KEY_get_flags(eckey) & EC_FLAG_SM2_RANGE ? 1 : 0;
  ------------------
  |  |  962|    441|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  |  Branch (288:15): [True: 288, False: 153]
  ------------------
  289|       |
  290|    441|    if (ctx == NULL)
  ------------------
  |  Branch (290:9): [True: 0, False: 441]
  ------------------
  291|      0|        goto err;
  292|       |
  293|    441|    if (eckey->priv_key == NULL) {
  ------------------
  |  Branch (293:9): [True: 441, False: 0]
  ------------------
  294|    441|        priv_key = BN_secure_new();
  295|    441|        if (priv_key == NULL)
  ------------------
  |  Branch (295:13): [True: 0, False: 441]
  ------------------
  296|      0|            goto err;
  297|    441|    } else
  298|      0|        priv_key = eckey->priv_key;
  299|       |
  300|       |    /*
  301|       |     * Steps (1-2): Check domain parameters and security strength.
  302|       |     * These steps must be done by the user. This would need to be
  303|       |     * stated in the security policy.
  304|       |     */
  305|       |
  306|    441|    tmp = EC_GROUP_get0_order(group);
  307|    441|    if (tmp == NULL)
  ------------------
  |  Branch (307:9): [True: 0, False: 441]
  ------------------
  308|      0|        goto err;
  309|       |
  310|       |    /*
  311|       |     * Steps (3-7): priv_key = DRBG_RAND(order_n_bits) (range [1, n-1]).
  312|       |     * Although this is slightly different from the standard, it is effectively
  313|       |     * equivalent as it gives an unbiased result ranging from 1..n-1. It is also
  314|       |     * faster as the standard needs to retry more often. Also doing
  315|       |     * 1 + rand[0..n-2] would effect the way that tests feed dummy entropy into
  316|       |     * rand so the simpler backward compatible method has been used here.
  317|       |     */
  318|       |
  319|       |    /* range of SM2 private key is [1, n-1) */
  320|    441|    if (sm2) {
  ------------------
  |  Branch (320:9): [True: 288, False: 153]
  ------------------
  321|    288|        order = BN_new();
  322|    288|        if (order == NULL || !BN_sub(order, tmp, BN_value_one()))
  ------------------
  |  Branch (322:13): [True: 0, False: 288]
  |  Branch (322:30): [True: 0, False: 288]
  ------------------
  323|      0|            goto err;
  324|    288|    } else {
  325|    153|        order = BN_dup(tmp);
  326|    153|        if (order == NULL)
  ------------------
  |  Branch (326:13): [True: 0, False: 153]
  ------------------
  327|      0|            goto err;
  328|    153|    }
  329|       |
  330|    441|    do
  331|    441|        if (!BN_priv_rand_range_ex(priv_key, order, 0, ctx))
  ------------------
  |  Branch (331:13): [True: 0, False: 441]
  ------------------
  332|      0|            goto err;
  333|    441|    while (BN_is_zero(priv_key));
  ------------------
  |  Branch (333:12): [True: 0, False: 441]
  ------------------
  334|       |
  335|    441|    if (eckey->pub_key == NULL) {
  ------------------
  |  Branch (335:9): [True: 441, False: 0]
  ------------------
  336|    441|        pub_key = EC_POINT_new(group);
  337|    441|        if (pub_key == NULL)
  ------------------
  |  Branch (337:13): [True: 0, False: 441]
  ------------------
  338|      0|            goto err;
  339|    441|    } else
  340|      0|        pub_key = eckey->pub_key;
  341|       |
  342|       |    /* Step (8) : pub_key = priv_key * G (where G is a point on the curve) */
  343|    441|    if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx))
  ------------------
  |  Branch (343:9): [True: 0, False: 441]
  ------------------
  344|      0|        goto err;
  345|       |
  346|    441|    eckey->priv_key = priv_key;
  347|    441|    eckey->pub_key = pub_key;
  348|    441|    priv_key = NULL;
  349|    441|    pub_key = NULL;
  350|       |
  351|    441|    eckey->dirty_cnt++;
  352|       |
  353|       |#ifdef FIPS_MODULE
  354|       |    pairwise_test = 1;
  355|       |#endif /* FIPS_MODULE */
  356|       |
  357|    441|    ok = 1;
  358|    441|    if (pairwise_test) {
  ------------------
  |  Branch (358:9): [True: 0, False: 441]
  ------------------
  359|      0|        OSSL_CALLBACK *cb = NULL;
  360|      0|        void *cbarg = NULL;
  361|       |
  362|      0|        OSSL_SELF_TEST_get_callback(eckey->libctx, &cb, &cbarg);
  363|      0|        ok = ecdsa_keygen_pairwise_test(eckey, cb, cbarg)
  ------------------
  |  Branch (363:14): [True: 0, False: 0]
  ------------------
  364|      0|            && ecdsa_keygen_knownanswer_test(eckey, ctx, cb, cbarg);
  ------------------
  |  Branch (364:16): [True: 0, False: 0]
  ------------------
  365|      0|    }
  366|    441|err:
  367|       |    /* Step (9): If there is an error return an invalid keypair. */
  368|    441|    if (!ok) {
  ------------------
  |  Branch (368:9): [True: 0, False: 441]
  ------------------
  369|      0|        ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
  ------------------
  |  |   32|      0|#define OSSL_SELF_TEST_TYPE_PCT "Conditional_PCT"
  ------------------
  370|      0|        BN_clear(eckey->priv_key);
  371|      0|        if (eckey->pub_key != NULL)
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  ------------------
  372|      0|            EC_POINT_set_to_infinity(group, eckey->pub_key);
  373|      0|    }
  374|       |
  375|    441|    EC_POINT_free(pub_key);
  376|    441|    BN_clear_free(priv_key);
  377|    441|    BN_CTX_free(ctx);
  378|    441|    BN_free(order);
  379|    441|    return ok;
  380|    441|}

EC_KEY_OpenSSL:
   37|   162k|{
   38|   162k|    return &openssl_ec_key_method;
   39|   162k|}
EC_KEY_get_default_method:
   42|   162k|{
   43|   162k|    return default_ec_key_meth;
   44|   162k|}
EC_KEY_get_method:
   55|   162k|{
   56|   162k|    return key->meth;
   57|   162k|}
ossl_ec_key_new_method_int:
   73|   162k|{
   74|   162k|    EC_KEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   162k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|       |
   76|   162k|    if (ret == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 162k]
  ------------------
   77|      0|        return NULL;
   78|       |
   79|   162k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (79:9): [True: 0, False: 162k]
  ------------------
   80|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|      0|        return NULL;
   82|      0|    }
   83|       |
   84|   162k|    ret->libctx = libctx;
   85|   162k|    if (propq != NULL) {
  ------------------
  |  Branch (85:9): [True: 0, False: 162k]
  ------------------
   86|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   87|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (87:13): [True: 0, False: 0]
  ------------------
   88|      0|            goto err;
   89|      0|    }
   90|       |
   91|   162k|    ret->meth = EC_KEY_get_default_method();
   92|   162k|    ret->version = 1;
   93|   162k|    ret->conv_form = POINT_CONVERSION_UNCOMPRESSED;
   94|       |
   95|       |/* No ex_data inside the FIPS provider */
   96|   162k|#ifndef FIPS_MODULE
   97|   162k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EC_KEY, ret, &ret->ex_data)) {
  ------------------
  |  |  259|   162k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
  |  Branch (97:9): [True: 0, False: 162k]
  ------------------
   98|      0|        ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   99|      0|        goto err;
  100|      0|    }
  101|   162k|#endif
  102|       |
  103|   162k|    if (ret->meth->init != NULL && ret->meth->init(ret) == 0) {
  ------------------
  |  Branch (103:9): [True: 0, False: 162k]
  |  Branch (103:36): [True: 0, False: 0]
  ------------------
  104|      0|        ERR_raise(ERR_LIB_EC, ERR_R_INIT_FAIL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  105|      0|        goto err;
  106|      0|    }
  107|   162k|    return ret;
  108|       |
  109|      0|err:
  110|      0|    EC_KEY_free(ret);
  111|       |    return NULL;
  112|   162k|}

ossl_ec_group_new_ex:
   32|   325k|{
   33|   325k|    EC_GROUP *ret;
   34|       |
   35|   325k|    if (meth == NULL) {
  ------------------
  |  Branch (35:9): [True: 0, False: 325k]
  ------------------
   36|      0|        ERR_raise(ERR_LIB_EC, EC_R_SLOT_FULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   37|      0|        return NULL;
   38|      0|    }
   39|   325k|    if (meth->group_init == 0) {
  ------------------
  |  Branch (39:9): [True: 0, False: 325k]
  ------------------
   40|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   41|      0|        return NULL;
   42|      0|    }
   43|       |
   44|   325k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   325k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|   325k|    if (ret == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 325k]
  ------------------
   46|      0|        return NULL;
   47|       |
   48|   325k|    ret->libctx = libctx;
   49|   325k|    if (propq != NULL) {
  ------------------
  |  Branch (49:9): [True: 0, False: 325k]
  ------------------
   50|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|      0|            goto err;
   53|      0|    }
   54|   325k|    ret->meth = meth;
   55|   325k|    if ((ret->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|   325k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (55:9): [True: 325k, False: 0]
  ------------------
   56|   325k|        ret->order = BN_new();
   57|   325k|        if (ret->order == NULL)
  ------------------
  |  Branch (57:13): [True: 0, False: 325k]
  ------------------
   58|      0|            goto err;
   59|   325k|        ret->cofactor = BN_new();
   60|   325k|        if (ret->cofactor == NULL)
  ------------------
  |  Branch (60:13): [True: 0, False: 325k]
  ------------------
   61|      0|            goto err;
   62|   325k|    }
   63|   325k|    ret->asn1_flag = OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|   325k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
   64|   325k|    ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED;
   65|   325k|    if (!meth->group_init(ret))
  ------------------
  |  Branch (65:9): [True: 0, False: 325k]
  ------------------
   66|      0|        goto err;
   67|   325k|    return ret;
   68|       |
   69|      0|err:
   70|      0|    BN_free(ret->order);
   71|      0|    BN_free(ret->cofactor);
   72|      0|    OPENSSL_free(ret->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   73|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|       |    return NULL;
   75|   325k|}
EC_pre_comp_free:
   87|   488k|{
   88|   488k|    switch (group->pre_comp_type) {
  ------------------
  |  Branch (88:13): [True: 488k, False: 0]
  ------------------
   89|   488k|    case PCT_none:
  ------------------
  |  Branch (89:5): [True: 488k, False: 0]
  ------------------
   90|   488k|        break;
   91|      0|    case PCT_nistz256:
  ------------------
  |  Branch (91:5): [True: 0, False: 488k]
  ------------------
   92|      0|#ifdef ECP_NISTZ256_ASM
   93|      0|        EC_nistz256_pre_comp_free(group->pre_comp.nistz256);
   94|      0|#endif
   95|      0|        break;
   96|      0|#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
   97|      0|    case PCT_nistp224:
  ------------------
  |  Branch (97:5): [True: 0, False: 488k]
  ------------------
   98|      0|        EC_nistp224_pre_comp_free(group->pre_comp.nistp224);
   99|      0|        break;
  100|      0|    case PCT_nistp256:
  ------------------
  |  Branch (100:5): [True: 0, False: 488k]
  ------------------
  101|      0|        EC_nistp256_pre_comp_free(group->pre_comp.nistp256);
  102|      0|        break;
  103|      0|    case PCT_nistp384:
  ------------------
  |  Branch (103:5): [True: 0, False: 488k]
  ------------------
  104|      0|        ossl_ec_nistp384_pre_comp_free(group->pre_comp.nistp384);
  105|      0|        break;
  106|      0|    case PCT_nistp521:
  ------------------
  |  Branch (106:5): [True: 0, False: 488k]
  ------------------
  107|      0|        EC_nistp521_pre_comp_free(group->pre_comp.nistp521);
  108|      0|        break;
  109|       |#else
  110|       |    case PCT_nistp224:
  111|       |    case PCT_nistp256:
  112|       |    case PCT_nistp384:
  113|       |    case PCT_nistp521:
  114|       |        break;
  115|       |#endif
  116|      0|    case PCT_ec:
  ------------------
  |  Branch (116:5): [True: 0, False: 488k]
  ------------------
  117|      0|        EC_ec_pre_comp_free(group->pre_comp.ec);
  118|      0|        break;
  119|   488k|    }
  120|   488k|    group->pre_comp.ec = NULL;
  121|   488k|}
EC_GROUP_free:
  124|   488k|{
  125|   488k|    if (!group)
  ------------------
  |  Branch (125:9): [True: 163k, False: 325k]
  ------------------
  126|   163k|        return;
  127|       |
  128|   325k|    if (group->meth->group_finish != 0)
  ------------------
  |  Branch (128:9): [True: 325k, False: 0]
  ------------------
  129|   325k|        group->meth->group_finish(group);
  130|       |
  131|   325k|    EC_pre_comp_free(group);
  132|   325k|    BN_MONT_CTX_free(group->mont_data);
  133|   325k|    EC_POINT_free(group->generator);
  134|   325k|    BN_free(group->order);
  135|   325k|    BN_free(group->cofactor);
  136|   325k|    OPENSSL_free(group->seed);
  ------------------
  |  |  132|   325k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|   325k|    OPENSSL_free(group->propq);
  ------------------
  |  |  132|   325k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  138|   325k|    OPENSSL_free(group);
  ------------------
  |  |  132|   325k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  139|   325k|}
EC_GROUP_copy:
  163|   162k|{
  164|   162k|    if (dest->meth->group_copy == 0) {
  ------------------
  |  Branch (164:9): [True: 0, False: 162k]
  ------------------
  165|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|        return 0;
  167|      0|    }
  168|   162k|    if (dest->meth != src->meth) {
  ------------------
  |  Branch (168:9): [True: 0, False: 162k]
  ------------------
  169|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  170|      0|        return 0;
  171|      0|    }
  172|   162k|    if (dest == src)
  ------------------
  |  Branch (172:9): [True: 0, False: 162k]
  ------------------
  173|      0|        return 1;
  174|       |
  175|   162k|    dest->libctx = src->libctx;
  176|   162k|    dest->curve_name = src->curve_name;
  177|       |
  178|   162k|    EC_pre_comp_free(dest);
  179|       |
  180|       |    /* Copy precomputed */
  181|   162k|    dest->pre_comp_type = src->pre_comp_type;
  182|   162k|    switch (src->pre_comp_type) {
  ------------------
  |  Branch (182:13): [True: 162k, False: 0]
  ------------------
  183|   162k|    case PCT_none:
  ------------------
  |  Branch (183:5): [True: 162k, False: 0]
  ------------------
  184|   162k|        dest->pre_comp.ec = NULL;
  185|   162k|        break;
  186|      0|    case PCT_nistz256:
  ------------------
  |  Branch (186:5): [True: 0, False: 162k]
  ------------------
  187|      0|#ifdef ECP_NISTZ256_ASM
  188|      0|        dest->pre_comp.nistz256 = EC_nistz256_pre_comp_dup(src->pre_comp.nistz256);
  189|      0|#endif
  190|      0|        break;
  191|      0|#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
  192|      0|    case PCT_nistp224:
  ------------------
  |  Branch (192:5): [True: 0, False: 162k]
  ------------------
  193|      0|        dest->pre_comp.nistp224 = EC_nistp224_pre_comp_dup(src->pre_comp.nistp224);
  194|      0|        break;
  195|      0|    case PCT_nistp256:
  ------------------
  |  Branch (195:5): [True: 0, False: 162k]
  ------------------
  196|      0|        dest->pre_comp.nistp256 = EC_nistp256_pre_comp_dup(src->pre_comp.nistp256);
  197|      0|        break;
  198|      0|    case PCT_nistp384:
  ------------------
  |  Branch (198:5): [True: 0, False: 162k]
  ------------------
  199|      0|        dest->pre_comp.nistp384 = ossl_ec_nistp384_pre_comp_dup(src->pre_comp.nistp384);
  200|      0|        break;
  201|      0|    case PCT_nistp521:
  ------------------
  |  Branch (201:5): [True: 0, False: 162k]
  ------------------
  202|      0|        dest->pre_comp.nistp521 = EC_nistp521_pre_comp_dup(src->pre_comp.nistp521);
  203|      0|        break;
  204|       |#else
  205|       |    case PCT_nistp224:
  206|       |    case PCT_nistp256:
  207|       |    case PCT_nistp384:
  208|       |    case PCT_nistp521:
  209|       |        break;
  210|       |#endif
  211|      0|    case PCT_ec:
  ------------------
  |  Branch (211:5): [True: 0, False: 162k]
  ------------------
  212|      0|        dest->pre_comp.ec = EC_ec_pre_comp_dup(src->pre_comp.ec);
  213|      0|        break;
  214|   162k|    }
  215|       |
  216|   162k|    if (src->mont_data != NULL) {
  ------------------
  |  Branch (216:9): [True: 162k, False: 0]
  ------------------
  217|   162k|        if (dest->mont_data == NULL) {
  ------------------
  |  Branch (217:13): [True: 162k, False: 0]
  ------------------
  218|   162k|            dest->mont_data = BN_MONT_CTX_new();
  219|   162k|            if (dest->mont_data == NULL)
  ------------------
  |  Branch (219:17): [True: 0, False: 162k]
  ------------------
  220|      0|                return 0;
  221|   162k|        }
  222|   162k|        if (!BN_MONT_CTX_copy(dest->mont_data, src->mont_data))
  ------------------
  |  Branch (222:13): [True: 0, False: 162k]
  ------------------
  223|      0|            return 0;
  224|   162k|    } else {
  225|       |        /* src->generator == NULL */
  226|      0|        BN_MONT_CTX_free(dest->mont_data);
  227|      0|        dest->mont_data = NULL;
  228|      0|    }
  229|       |
  230|   162k|    if (src->generator != NULL) {
  ------------------
  |  Branch (230:9): [True: 162k, False: 0]
  ------------------
  231|   162k|        if (dest->generator == NULL) {
  ------------------
  |  Branch (231:13): [True: 162k, False: 0]
  ------------------
  232|   162k|            dest->generator = EC_POINT_new(dest);
  233|   162k|            if (dest->generator == NULL)
  ------------------
  |  Branch (233:17): [True: 0, False: 162k]
  ------------------
  234|      0|                return 0;
  235|   162k|        }
  236|   162k|        if (!EC_POINT_copy(dest->generator, src->generator))
  ------------------
  |  Branch (236:13): [True: 0, False: 162k]
  ------------------
  237|      0|            return 0;
  238|   162k|    } else {
  239|       |        /* src->generator == NULL */
  240|      0|        EC_POINT_clear_free(dest->generator);
  241|      0|        dest->generator = NULL;
  242|      0|    }
  243|       |
  244|   162k|    if ((src->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|   162k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (244:9): [True: 162k, False: 0]
  ------------------
  245|   162k|        if (!BN_copy(dest->order, src->order))
  ------------------
  |  Branch (245:13): [True: 0, False: 162k]
  ------------------
  246|      0|            return 0;
  247|   162k|        if (!BN_copy(dest->cofactor, src->cofactor))
  ------------------
  |  Branch (247:13): [True: 0, False: 162k]
  ------------------
  248|      0|            return 0;
  249|   162k|    }
  250|       |
  251|   162k|    dest->asn1_flag = src->asn1_flag;
  252|   162k|    dest->asn1_form = src->asn1_form;
  253|   162k|    dest->decoded_from_explicit_params = src->decoded_from_explicit_params;
  254|       |
  255|   162k|    if (src->seed) {
  ------------------
  |  Branch (255:9): [True: 162k, False: 288]
  ------------------
  256|   162k|        OPENSSL_free(dest->seed);
  ------------------
  |  |  132|   162k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  257|   162k|        if ((dest->seed = OPENSSL_malloc(src->seed_len)) == NULL)
  ------------------
  |  |  107|   162k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (257:13): [True: 0, False: 162k]
  ------------------
  258|      0|            return 0;
  259|   162k|        if (!memcpy(dest->seed, src->seed, src->seed_len))
  ------------------
  |  Branch (259:13): [True: 0, False: 162k]
  ------------------
  260|      0|            return 0;
  261|   162k|        dest->seed_len = src->seed_len;
  262|   162k|    } else {
  263|    288|        OPENSSL_free(dest->seed);
  ------------------
  |  |  132|    288|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  264|    288|        dest->seed = NULL;
  265|    288|        dest->seed_len = 0;
  266|    288|    }
  267|       |
  268|   162k|    return dest->meth->group_copy(dest, src);
  269|   162k|}
EC_GROUP_dup:
  272|   162k|{
  273|   162k|    EC_GROUP *t = NULL;
  274|   162k|    int ok = 0;
  275|       |
  276|   162k|    if (a == NULL)
  ------------------
  |  Branch (276:9): [True: 0, False: 162k]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|   162k|    if ((t = ossl_ec_group_new_ex(a->libctx, a->propq, a->meth)) == NULL)
  ------------------
  |  Branch (279:9): [True: 0, False: 162k]
  ------------------
  280|      0|        return NULL;
  281|   162k|    if (!EC_GROUP_copy(t, a))
  ------------------
  |  Branch (281:9): [True: 0, False: 162k]
  ------------------
  282|      0|        goto err;
  283|       |
  284|   162k|    ok = 1;
  285|       |
  286|   162k|err:
  287|   162k|    if (!ok) {
  ------------------
  |  Branch (287:9): [True: 0, False: 162k]
  ------------------
  288|      0|        EC_GROUP_free(t);
  289|      0|        return NULL;
  290|      0|    }
  291|   162k|    return t;
  292|   162k|}
EC_GROUP_set_generator:
  372|   150k|{
  373|   150k|    if (generator == NULL) {
  ------------------
  |  Branch (373:9): [True: 0, False: 150k]
  ------------------
  374|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  375|      0|        return 0;
  376|      0|    }
  377|       |
  378|       |    /* require group->field >= 1 */
  379|   150k|    if (group->field == NULL || BN_is_zero(group->field)
  ------------------
  |  Branch (379:9): [True: 0, False: 150k]
  |  Branch (379:33): [True: 0, False: 150k]
  ------------------
  380|   150k|        || BN_is_negative(group->field)) {
  ------------------
  |  Branch (380:12): [True: 0, False: 150k]
  ------------------
  381|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  382|      0|        return 0;
  383|      0|    }
  384|       |
  385|       |    /*-
  386|       |     * - require order >= 1
  387|       |     * - enforce upper bound due to Hasse thm: order can be no more than one bit
  388|       |     *   longer than field cardinality
  389|       |     */
  390|   150k|    if (order == NULL || BN_is_zero(order) || BN_is_negative(order)
  ------------------
  |  Branch (390:9): [True: 0, False: 150k]
  |  Branch (390:26): [True: 0, False: 150k]
  |  Branch (390:47): [True: 0, False: 150k]
  ------------------
  391|   150k|        || BN_num_bits(order) > BN_num_bits(group->field) + 1) {
  ------------------
  |  Branch (391:12): [True: 0, False: 150k]
  ------------------
  392|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GROUP_ORDER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  393|      0|        return 0;
  394|      0|    }
  395|       |
  396|       |    /*-
  397|       |     * Unfortunately the cofactor is an optional field in many standards.
  398|       |     * Internally, the lib uses 0 cofactor as a marker for "unknown cofactor".
  399|       |     * So accept cofactor == NULL or cofactor >= 0.
  400|       |     */
  401|   150k|    if (cofactor != NULL && BN_is_negative(cofactor)) {
  ------------------
  |  Branch (401:9): [True: 150k, False: 0]
  |  Branch (401:29): [True: 0, False: 150k]
  ------------------
  402|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_COFACTOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  403|      0|        return 0;
  404|      0|    }
  405|       |
  406|   150k|    if (group->generator == NULL) {
  ------------------
  |  Branch (406:9): [True: 150k, False: 0]
  ------------------
  407|   150k|        group->generator = EC_POINT_new(group);
  408|   150k|        if (group->generator == NULL)
  ------------------
  |  Branch (408:13): [True: 0, False: 150k]
  ------------------
  409|      0|            return 0;
  410|   150k|    }
  411|   150k|    if (!EC_POINT_copy(group->generator, generator))
  ------------------
  |  Branch (411:9): [True: 0, False: 150k]
  ------------------
  412|      0|        return 0;
  413|       |
  414|   150k|    if (!BN_copy(group->order, order))
  ------------------
  |  Branch (414:9): [True: 0, False: 150k]
  ------------------
  415|      0|        return 0;
  416|       |
  417|       |    /* Either take the provided positive cofactor, or try to compute it */
  418|   150k|    if (cofactor != NULL && !BN_is_zero(cofactor)) {
  ------------------
  |  Branch (418:9): [True: 150k, False: 0]
  |  Branch (418:29): [True: 150k, False: 0]
  ------------------
  419|   150k|        if (!BN_copy(group->cofactor, cofactor))
  ------------------
  |  Branch (419:13): [True: 0, False: 150k]
  ------------------
  420|      0|            return 0;
  421|   150k|    } else if (!ec_guess_cofactor(group)) {
  ------------------
  |  Branch (421:16): [True: 0, False: 0]
  ------------------
  422|      0|        BN_zero(group->cofactor);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  423|      0|        return 0;
  424|      0|    }
  425|       |
  426|       |    /*
  427|       |     * Some groups have an order with
  428|       |     * factors of two, which makes the Montgomery setup fail.
  429|       |     * |group->mont_data| will be NULL in this case.
  430|       |     */
  431|   150k|    if (BN_is_odd(group->order)) {
  ------------------
  |  Branch (431:9): [True: 150k, False: 0]
  ------------------
  432|   150k|        return ec_precompute_mont_data(group);
  433|   150k|    }
  434|       |
  435|      0|    BN_MONT_CTX_free(group->mont_data);
  436|       |    group->mont_data = NULL;
  437|      0|    return 1;
  438|   150k|}
EC_GROUP_get0_generator:
  441|     83|{
  442|     83|    return group->generator;
  443|     83|}
EC_GROUP_get0_order:
  461|   163k|{
  462|   163k|    return group->order;
  463|   163k|}
EC_GROUP_order_bits:
  466|   164k|{
  467|   164k|    return group->meth->group_order_bits(group);
  468|   164k|}
EC_GROUP_security_bits:
  471|   162k|{
  472|   162k|    int ecbits = group->meth->group_order_bits(group);
  473|       |
  474|       |    /*
  475|       |     * The following estimates are based on the values published in Table 2 of
  476|       |     * "NIST Special Publication 800-57 Part 1 Revision 4" at
  477|       |     * http://dx.doi.org/10.6028/NIST.SP.800-57pt1r4 .
  478|       |     *
  479|       |     * Note that the above reference explicitly categorizes algorithms in a
  480|       |     * discrete set of values {80, 112, 128, 192, 256}, and that it is relevant
  481|       |     * only for NIST approved Elliptic Curves, while OpenSSL applies the same
  482|       |     * logic also to other curves.
  483|       |     */
  484|   162k|    if (ecbits >= 512)
  ------------------
  |  Branch (484:9): [True: 4.21k, False: 158k]
  ------------------
  485|  4.21k|        return 256;
  486|   158k|    if (ecbits >= 384)
  ------------------
  |  Branch (486:9): [True: 145k, False: 12.8k]
  ------------------
  487|   145k|        return 192;
  488|  12.8k|    if (ecbits >= 256)
  ------------------
  |  Branch (488:9): [True: 12.8k, False: 0]
  ------------------
  489|  12.8k|        return 128;
  490|      0|    if (ecbits >= 224)
  ------------------
  |  Branch (490:9): [True: 0, False: 0]
  ------------------
  491|      0|        return 112;
  492|      0|    if (ecbits >= 160)
  ------------------
  |  Branch (492:9): [True: 0, False: 0]
  ------------------
  493|      0|        return 80;
  494|      0|    return ecbits / 2;
  495|      0|}
EC_GROUP_get0_cofactor:
  509|    153|{
  510|    153|    return group->cofactor;
  511|    153|}
EC_GROUP_set_curve_name:
  514|   162k|{
  515|   162k|    group->curve_name = nid;
  516|   162k|    group->asn1_flag = (nid != NID_undef)
  ------------------
  |  |   18|   162k|#define NID_undef                       0
  ------------------
  |  Branch (516:24): [True: 162k, False: 0]
  ------------------
  517|   162k|        ? OPENSSL_EC_NAMED_CURVE
  ------------------
  |  |   31|   162k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  518|   162k|        : OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|   162k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
  519|   162k|}
EC_GROUP_get_curve_name:
  522|   650k|{
  523|   650k|    return group->curve_name;
  524|   650k|}
EC_GROUP_get_field_type:
  532|   327k|{
  533|   327k|    return group->meth->field_type;
  534|   327k|}
EC_GROUP_set_asn1_flag:
  537|   162k|{
  538|   162k|    group->asn1_flag = flag;
  539|   162k|}
EC_GROUP_get_asn1_flag:
  542|   313k|{
  543|   313k|    return group->asn1_flag;
  544|   313k|}
EC_GROUP_get_point_conversion_form:
  554|   163k|{
  555|   163k|    return group->asn1_form;
  556|   163k|}
EC_GROUP_set_seed:
  559|   162k|{
  560|   162k|    OPENSSL_free(group->seed);
  ------------------
  |  |  132|   162k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  561|   162k|    group->seed = NULL;
  562|   162k|    group->seed_len = 0;
  563|       |
  564|   162k|    if (!len || !p)
  ------------------
  |  Branch (564:9): [True: 0, False: 162k]
  |  Branch (564:17): [True: 0, False: 162k]
  ------------------
  565|      0|        return 1;
  566|       |
  567|   162k|    if ((group->seed = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  107|   162k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (567:9): [True: 0, False: 162k]
  ------------------
  568|      0|        return 0;
  569|   162k|    memcpy(group->seed, p, len);
  570|   162k|    group->seed_len = len;
  571|       |
  572|   162k|    return len;
  573|   162k|}
EC_GROUP_set_curve:
  587|    288|{
  588|    288|    if (group->meth->group_set_curve == 0) {
  ------------------
  |  Branch (588:9): [True: 0, False: 288]
  ------------------
  589|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  590|      0|        return 0;
  591|      0|    }
  592|    288|    return group->meth->group_set_curve(group, p, a, b, ctx);
  593|    288|}
EC_POINT_new:
  743|   651k|{
  744|   651k|    EC_POINT *ret;
  745|       |
  746|   651k|    if (group == NULL) {
  ------------------
  |  Branch (746:9): [True: 0, False: 651k]
  ------------------
  747|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  748|      0|        return NULL;
  749|      0|    }
  750|   651k|    if (group->meth->point_init == NULL) {
  ------------------
  |  Branch (750:9): [True: 0, False: 651k]
  ------------------
  751|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  752|      0|        return NULL;
  753|      0|    }
  754|       |
  755|   651k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   651k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  756|   651k|    if (ret == NULL)
  ------------------
  |  Branch (756:9): [True: 0, False: 651k]
  ------------------
  757|      0|        return NULL;
  758|       |
  759|   651k|    ret->meth = group->meth;
  760|   651k|    ret->curve_name = group->curve_name;
  761|       |
  762|   651k|    if (!ret->meth->point_init(ret)) {
  ------------------
  |  Branch (762:9): [True: 0, False: 651k]
  ------------------
  763|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  764|      0|        return NULL;
  765|      0|    }
  766|       |
  767|   651k|    return ret;
  768|   651k|}
EC_POINT_free:
  771|   651k|{
  772|   651k|    if (point == NULL)
  ------------------
  |  Branch (772:9): [True: 441, False: 651k]
  ------------------
  773|    441|        return;
  774|       |
  775|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
  776|       |    EC_POINT_clear_free(point);
  777|       |#else
  778|   651k|    if (point->meth->point_finish != 0)
  ------------------
  |  Branch (778:9): [True: 651k, False: 0]
  ------------------
  779|   651k|        point->meth->point_finish(point);
  780|   651k|    OPENSSL_free(point);
  ------------------
  |  |  132|   651k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  781|   651k|#endif
  782|   651k|}
EC_POINT_clear_free:
  785|    288|{
  786|    288|    if (point == NULL)
  ------------------
  |  Branch (786:9): [True: 0, False: 288]
  ------------------
  787|      0|        return;
  788|       |
  789|    288|    if (point->meth->point_clear_finish != 0)
  ------------------
  |  Branch (789:9): [True: 288, False: 0]
  ------------------
  790|    288|        point->meth->point_clear_finish(point);
  791|      0|    else if (point->meth->point_finish != 0)
  ------------------
  |  Branch (791:14): [True: 0, False: 0]
  ------------------
  792|      0|        point->meth->point_finish(point);
  793|    288|    OPENSSL_clear_free(point, sizeof(*point));
  ------------------
  |  |  130|    288|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  794|    288|}
EC_POINT_copy:
  797|   325k|{
  798|   325k|    if (dest->meth->point_copy == 0) {
  ------------------
  |  Branch (798:9): [True: 0, False: 325k]
  ------------------
  799|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  800|      0|        return 0;
  801|      0|    }
  802|   325k|    if (dest->meth != src->meth
  ------------------
  |  Branch (802:9): [True: 0, False: 325k]
  ------------------
  803|   325k|        || (dest->curve_name != src->curve_name
  ------------------
  |  Branch (803:13): [True: 12.5k, False: 313k]
  ------------------
  804|  12.5k|            && dest->curve_name != 0
  ------------------
  |  Branch (804:16): [True: 12.5k, False: 0]
  ------------------
  805|  12.5k|            && src->curve_name != 0)) {
  ------------------
  |  Branch (805:16): [True: 0, False: 12.5k]
  ------------------
  806|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  807|      0|        return 0;
  808|      0|    }
  809|   325k|    if (dest == src)
  ------------------
  |  Branch (809:9): [True: 0, False: 325k]
  ------------------
  810|      0|        return 1;
  811|   325k|    return dest->meth->point_copy(dest, src);
  812|   325k|}
EC_POINT_set_Jprojective_coordinates_GFp:
  858|   324k|{
  859|   324k|    if (group->meth->field_type != NID_X9_62_prime_field) {
  ------------------
  |  |  152|   324k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (859:9): [True: 0, False: 324k]
  ------------------
  860|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  861|      0|        return 0;
  862|      0|    }
  863|   324k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (863:9): [True: 0, False: 324k]
  ------------------
  864|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  865|      0|        return 0;
  866|      0|    }
  867|   324k|    return ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group, point,
  868|   324k|        x, y, z, ctx);
  869|   324k|}
EC_POINT_set_affine_coordinates:
  892|   324k|{
  893|   324k|    if (group->meth->point_set_affine_coordinates == NULL) {
  ------------------
  |  Branch (893:9): [True: 0, False: 324k]
  ------------------
  894|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  895|      0|        return 0;
  896|      0|    }
  897|   324k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (897:9): [True: 0, False: 324k]
  ------------------
  898|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  899|      0|        return 0;
  900|      0|    }
  901|   324k|    if (!group->meth->point_set_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (901:9): [True: 0, False: 324k]
  ------------------
  902|      0|        return 0;
  903|       |
  904|   324k|    if (EC_POINT_is_on_curve(group, point, ctx) <= 0) {
  ------------------
  |  Branch (904:9): [True: 0, False: 324k]
  ------------------
  905|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_IS_NOT_ON_CURVE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  906|      0|        return 0;
  907|      0|    }
  908|   324k|    return 1;
  909|   324k|}
EC_POINT_get_affine_coordinates:
  932|    441|{
  933|    441|    if (group->meth->point_get_affine_coordinates == NULL) {
  ------------------
  |  Branch (933:9): [True: 0, False: 441]
  ------------------
  934|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  935|      0|        return 0;
  936|      0|    }
  937|    441|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (937:9): [True: 0, False: 441]
  ------------------
  938|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  939|      0|        return 0;
  940|      0|    }
  941|    441|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (941:9): [True: 0, False: 441]
  ------------------
  942|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  943|      0|        return 0;
  944|      0|    }
  945|    441|    return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);
  946|    441|}
EC_POINT_is_at_infinity:
 1009|   326k|{
 1010|   326k|    if (group->meth->is_at_infinity == 0) {
  ------------------
  |  Branch (1010:9): [True: 0, False: 326k]
  ------------------
 1011|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1012|      0|        return 0;
 1013|      0|    }
 1014|   326k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (1014:9): [True: 0, False: 326k]
  ------------------
 1015|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1016|      0|        return 0;
 1017|      0|    }
 1018|   326k|    return group->meth->is_at_infinity(group, point);
 1019|   326k|}
EC_POINT_is_on_curve:
 1030|   324k|{
 1031|   324k|    if (group->meth->is_on_curve == 0) {
  ------------------
  |  Branch (1031:9): [True: 0, False: 324k]
  ------------------
 1032|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1033|      0|        return 0;
 1034|      0|    }
 1035|   324k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (1035:9): [True: 0, False: 324k]
  ------------------
 1036|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1037|      0|        return 0;
 1038|      0|    }
 1039|   324k|    return group->meth->is_on_curve(group, point, ctx);
 1040|   324k|}
EC_POINT_cmp:
 1044|     70|{
 1045|     70|    if (group->meth->point_cmp == 0) {
  ------------------
  |  Branch (1045:9): [True: 0, False: 70]
  ------------------
 1046|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1047|      0|        return -1;
 1048|      0|    }
 1049|     70|    if (!ec_point_is_compat(a, group) || !ec_point_is_compat(b, group)) {
  ------------------
  |  Branch (1049:9): [True: 0, False: 70]
  |  Branch (1049:42): [True: 0, False: 70]
  ------------------
 1050|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1051|      0|        return -1;
 1052|      0|    }
 1053|     70|    return group->meth->point_cmp(group, a, b, ctx);
 1054|     70|}
EC_POINT_mul:
 1145|    441|{
 1146|    441|    int ret = 0;
 1147|    441|    size_t num;
 1148|    441|#ifndef FIPS_MODULE
 1149|    441|    BN_CTX *new_ctx = NULL;
 1150|    441|#endif
 1151|       |
 1152|    441|    if (!ec_point_is_compat(r, group)
  ------------------
  |  Branch (1152:9): [True: 0, False: 441]
  ------------------
 1153|    441|        || (point != NULL && !ec_point_is_compat(point, group))) {
  ------------------
  |  Branch (1153:13): [True: 0, False: 441]
  |  Branch (1153:30): [True: 0, False: 0]
  ------------------
 1154|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1155|      0|        return 0;
 1156|      0|    }
 1157|       |
 1158|    441|    if (g_scalar == NULL && p_scalar == NULL)
  ------------------
  |  Branch (1158:9): [True: 0, False: 441]
  |  Branch (1158:29): [True: 0, False: 0]
  ------------------
 1159|      0|        return EC_POINT_set_to_infinity(group, r);
 1160|       |
 1161|    441|#ifndef FIPS_MODULE
 1162|    441|    if (ctx == NULL)
  ------------------
  |  Branch (1162:9): [True: 0, False: 441]
  ------------------
 1163|      0|        ctx = new_ctx = BN_CTX_secure_new();
 1164|    441|#endif
 1165|    441|    if (ctx == NULL) {
  ------------------
  |  Branch (1165:9): [True: 0, False: 441]
  ------------------
 1166|      0|        ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1167|      0|        return 0;
 1168|      0|    }
 1169|       |
 1170|    441|    num = (point != NULL && p_scalar != NULL) ? 1 : 0;
  ------------------
  |  Branch (1170:12): [True: 0, False: 441]
  |  Branch (1170:29): [True: 0, False: 0]
  ------------------
 1171|    441|    if (group->meth->mul != NULL)
  ------------------
  |  Branch (1171:9): [True: 153, False: 288]
  ------------------
 1172|    153|        ret = group->meth->mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
 1173|    288|    else
 1174|       |        /* use default */
 1175|    288|        ret = ossl_ec_wNAF_mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
 1176|       |
 1177|    441|#ifndef FIPS_MODULE
 1178|    441|    BN_CTX_free(new_ctx);
 1179|    441|#endif
 1180|    441|    return ret;
 1181|    441|}
ossl_ec_group_simple_order_bits:
 1256|   326k|{
 1257|   326k|    if (group->order == NULL)
  ------------------
  |  Branch (1257:9): [True: 0, False: 326k]
  ------------------
 1258|      0|        return 0;
 1259|   326k|    return BN_num_bits(group->order);
 1260|   326k|}
ossl_ec_group_set_params:
 1532|    441|{
 1533|    441|    int encoding_flag = -1, format = -1;
 1534|    441|    const OSSL_PARAM *p;
 1535|       |
 1536|    441|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT);
  ------------------
  |  |  403|    441|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
 1537|    441|    if (p != NULL) {
  ------------------
  |  Branch (1537:9): [True: 0, False: 441]
  ------------------
 1538|      0|        if (!ossl_ec_pt_format_param2id(p, &format)) {
  ------------------
  |  Branch (1538:13): [True: 0, False: 0]
  ------------------
 1539|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1540|      0|            return 0;
 1541|      0|        }
 1542|      0|        EC_GROUP_set_point_conversion_form(group, format);
 1543|      0|    }
 1544|       |
 1545|    441|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ENCODING);
  ------------------
  |  |  395|    441|# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
  ------------------
 1546|    441|    if (p != NULL) {
  ------------------
  |  Branch (1546:9): [True: 0, False: 441]
  ------------------
 1547|      0|        if (!ossl_ec_encoding_param2id(p, &encoding_flag)) {
  ------------------
  |  Branch (1547:13): [True: 0, False: 0]
  ------------------
 1548|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1549|      0|            return 0;
 1550|      0|        }
 1551|      0|        EC_GROUP_set_asn1_flag(group, encoding_flag);
 1552|      0|    }
 1553|       |    /* Optional seed */
 1554|    441|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_SEED);
  ------------------
  |  |  406|    441|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
 1555|    441|    if (p != NULL) {
  ------------------
  |  Branch (1555:9): [True: 0, False: 441]
  ------------------
 1556|       |        /* The seed is allowed to be NULL */
 1557|      0|        if (p->data_type != OSSL_PARAM_OCTET_STRING
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (1557:13): [True: 0, False: 0]
  ------------------
 1558|      0|            || !EC_GROUP_set_seed(group, p->data, p->data_size)) {
  ------------------
  |  Branch (1558:16): [True: 0, False: 0]
  ------------------
 1559|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_SEED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1560|      0|            return 0;
 1561|      0|        }
 1562|      0|    }
 1563|    441|    return 1;
 1564|    441|}
EC_GROUP_new_from_params:
 1568|    441|{
 1569|    441|    const OSSL_PARAM *ptmp;
 1570|    441|    EC_GROUP *group = NULL;
 1571|       |
 1572|    441|#ifndef FIPS_MODULE
 1573|    441|    const OSSL_PARAM *pa, *pb;
 1574|    441|    int ok = 0;
 1575|    441|    EC_GROUP *named_group = NULL;
 1576|    441|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *order = NULL, *cofactor = NULL;
 1577|    441|    EC_POINT *point = NULL;
 1578|    441|    int field_bits = 0;
 1579|    441|    int is_prime_field = 1;
 1580|    441|    BN_CTX *bnctx = NULL;
 1581|    441|    const unsigned char *buf = NULL;
 1582|       |#ifndef OPENSSL_NO_EC_EXPLICIT_CURVES
 1583|       |    int encoding_flag = -1;
 1584|       |#endif
 1585|    441|#endif
 1586|       |
 1587|       |    /* This is the simple named group case */
 1588|    441|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_GROUP_NAME);
  ------------------
  |  |  428|    441|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1589|    441|    if (ptmp != NULL) {
  ------------------
  |  Branch (1589:9): [True: 441, False: 0]
  ------------------
 1590|    441|        int decoded = 0;
 1591|       |
 1592|    441|        if ((group = group_new_from_name(ptmp, libctx, propq)) == NULL)
  ------------------
  |  Branch (1592:13): [True: 0, False: 441]
  ------------------
 1593|      0|            return NULL;
 1594|    441|        if (!ossl_ec_group_set_params(group, params)) {
  ------------------
  |  Branch (1594:13): [True: 0, False: 441]
  ------------------
 1595|      0|            EC_GROUP_free(group);
 1596|      0|            return NULL;
 1597|      0|        }
 1598|       |
 1599|    441|        ptmp = OSSL_PARAM_locate_const(params,
 1600|    441|            OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS);
  ------------------
  |  |  394|    441|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
 1601|    441|        if (ptmp != NULL && !OSSL_PARAM_get_int(ptmp, &decoded)) {
  ------------------
  |  Branch (1601:13): [True: 0, False: 441]
  |  Branch (1601:29): [True: 0, False: 0]
  ------------------
 1602|      0|            ERR_raise(ERR_LIB_EC, EC_R_WRONG_CURVE_PARAMETERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1603|      0|            EC_GROUP_free(group);
 1604|      0|            return NULL;
 1605|      0|        }
 1606|    441|        group->decoded_from_explicit_params = decoded > 0;
 1607|    441|        return group;
 1608|    441|    }
 1609|       |#ifdef FIPS_MODULE
 1610|       |    ERR_raise(ERR_LIB_EC, EC_R_EXPLICIT_PARAMS_NOT_SUPPORTED);
 1611|       |    return NULL;
 1612|       |#else
 1613|       |    /* If it gets here then we are trying explicit parameters */
 1614|      0|    bnctx = BN_CTX_new_ex(libctx);
 1615|      0|    if (bnctx == NULL) {
  ------------------
  |  Branch (1615:9): [True: 0, False: 0]
  ------------------
 1616|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1617|      0|        return 0;
 1618|      0|    }
 1619|      0|    BN_CTX_start(bnctx);
 1620|       |
 1621|      0|    p = BN_CTX_get(bnctx);
 1622|      0|    a = BN_CTX_get(bnctx);
 1623|      0|    b = BN_CTX_get(bnctx);
 1624|      0|    order = BN_CTX_get(bnctx);
 1625|      0|    if (order == NULL) {
  ------------------
  |  Branch (1625:9): [True: 0, False: 0]
  ------------------
 1626|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1627|      0|        goto err;
 1628|      0|    }
 1629|       |
 1630|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_FIELD_TYPE);
  ------------------
  |  |  397|      0|# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
  ------------------
 1631|      0|    if (ptmp == NULL || ptmp->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1631:9): [True: 0, False: 0]
  |  Branch (1631:25): [True: 0, False: 0]
  ------------------
 1632|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1633|      0|        goto err;
 1634|      0|    }
 1635|      0|    if (OPENSSL_strcasecmp(ptmp->data, SN_X9_62_prime_field) == 0) {
  ------------------
  |  |  151|      0|#define SN_X9_62_prime_field            "prime-field"
  ------------------
  |  Branch (1635:9): [True: 0, False: 0]
  ------------------
 1636|      0|        is_prime_field = 1;
 1637|      0|    } else if (OPENSSL_strcasecmp(ptmp->data,
  ------------------
  |  Branch (1637:16): [True: 0, False: 0]
  ------------------
 1638|      0|                   SN_X9_62_characteristic_two_field)
  ------------------
  |  |  155|      0|#define SN_X9_62_characteristic_two_field               "characteristic-two-field"
  ------------------
 1639|      0|        == 0) {
 1640|      0|        is_prime_field = 0;
 1641|      0|    } else {
 1642|       |        /* Invalid field */
 1643|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNSUPPORTED_FIELD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1644|      0|        goto err;
 1645|      0|    }
 1646|       |
 1647|      0|    pa = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_A);
  ------------------
  |  |  385|      0|# define OSSL_PKEY_PARAM_EC_A "a"
  ------------------
 1648|      0|    if (!OSSL_PARAM_get_BN(pa, &a)) {
  ------------------
  |  Branch (1648:9): [True: 0, False: 0]
  ------------------
 1649|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_A);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1650|      0|        goto err;
 1651|      0|    }
 1652|      0|    pb = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_B);
  ------------------
  |  |  386|      0|# define OSSL_PKEY_PARAM_EC_B "b"
  ------------------
 1653|      0|    if (!OSSL_PARAM_get_BN(pb, &b)) {
  ------------------
  |  Branch (1653:9): [True: 0, False: 0]
  ------------------
 1654|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_B);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1655|      0|        goto err;
 1656|      0|    }
 1657|       |
 1658|       |    /* extract the prime number or irreducible polynomial */
 1659|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_P);
  ------------------
  |  |  402|      0|# define OSSL_PKEY_PARAM_EC_P "p"
  ------------------
 1660|      0|    if (!OSSL_PARAM_get_BN(ptmp, &p)) {
  ------------------
  |  Branch (1660:9): [True: 0, False: 0]
  ------------------
 1661|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_P);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1662|      0|        goto err;
 1663|      0|    }
 1664|       |
 1665|      0|    if (is_prime_field) {
  ------------------
  |  Branch (1665:9): [True: 0, False: 0]
  ------------------
 1666|      0|        if (BN_is_negative(p) || BN_is_zero(p)) {
  ------------------
  |  Branch (1666:13): [True: 0, False: 0]
  |  Branch (1666:34): [True: 0, False: 0]
  ------------------
 1667|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_P);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1668|      0|            goto err;
 1669|      0|        }
 1670|      0|        field_bits = BN_num_bits(p);
 1671|      0|        if (field_bits > OPENSSL_ECC_MAX_FIELD_BITS) {
  ------------------
  |  |  103|      0|#define OPENSSL_ECC_MAX_FIELD_BITS 661
  ------------------
  |  Branch (1671:13): [True: 0, False: 0]
  ------------------
 1672|      0|            ERR_raise(ERR_LIB_EC, EC_R_FIELD_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1673|      0|            goto err;
 1674|      0|        }
 1675|       |
 1676|       |        /* create the EC_GROUP structure */
 1677|      0|        group = EC_GROUP_new_curve_GFp(p, a, b, bnctx);
 1678|      0|    } else {
 1679|       |#ifdef OPENSSL_NO_EC2M
 1680|       |        ERR_raise(ERR_LIB_EC, EC_R_GF2M_NOT_SUPPORTED);
 1681|       |        goto err;
 1682|       |#else
 1683|       |        /* create the EC_GROUP structure */
 1684|      0|        group = EC_GROUP_new_curve_GF2m(p, a, b, NULL);
 1685|      0|        if (group != NULL) {
  ------------------
  |  Branch (1685:13): [True: 0, False: 0]
  ------------------
 1686|      0|            field_bits = EC_GROUP_get_degree(group);
 1687|      0|            if (field_bits > OPENSSL_ECC_MAX_FIELD_BITS) {
  ------------------
  |  |  103|      0|#define OPENSSL_ECC_MAX_FIELD_BITS 661
  ------------------
  |  Branch (1687:17): [True: 0, False: 0]
  ------------------
 1688|      0|                ERR_raise(ERR_LIB_EC, EC_R_FIELD_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1689|      0|                goto err;
 1690|      0|            }
 1691|      0|        }
 1692|      0|#endif /* OPENSSL_NO_EC2M */
 1693|      0|    }
 1694|       |
 1695|      0|    if (group == NULL) {
  ------------------
  |  Branch (1695:9): [True: 0, False: 0]
  ------------------
 1696|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1697|      0|        goto err;
 1698|      0|    }
 1699|       |
 1700|       |    /* Optional seed */
 1701|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_SEED);
  ------------------
  |  |  406|      0|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
 1702|      0|    if (ptmp != NULL) {
  ------------------
  |  Branch (1702:9): [True: 0, False: 0]
  ------------------
 1703|      0|        if (ptmp->data_type != OSSL_PARAM_OCTET_STRING) {
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (1703:13): [True: 0, False: 0]
  ------------------
 1704|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_SEED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1705|      0|            goto err;
 1706|      0|        }
 1707|      0|        if (!EC_GROUP_set_seed(group, ptmp->data, ptmp->data_size))
  ------------------
  |  Branch (1707:13): [True: 0, False: 0]
  ------------------
 1708|      0|            goto err;
 1709|      0|    }
 1710|       |
 1711|       |    /* generator base point */
 1712|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_GENERATOR);
  ------------------
  |  |  398|      0|# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
  ------------------
 1713|      0|    if (ptmp == NULL
  ------------------
  |  Branch (1713:9): [True: 0, False: 0]
  ------------------
 1714|      0|        || ptmp->data_type != OSSL_PARAM_OCTET_STRING
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (1714:12): [True: 0, False: 0]
  ------------------
 1715|      0|        || ptmp->data_size == 0) {
  ------------------
  |  Branch (1715:12): [True: 0, False: 0]
  ------------------
 1716|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1717|      0|        goto err;
 1718|      0|    }
 1719|      0|    buf = (const unsigned char *)(ptmp->data);
 1720|      0|    if ((point = EC_POINT_new(group)) == NULL)
  ------------------
  |  Branch (1720:9): [True: 0, False: 0]
  ------------------
 1721|      0|        goto err;
 1722|      0|    EC_GROUP_set_point_conversion_form(group,
 1723|      0|        (point_conversion_form_t)buf[0] & ~0x01);
 1724|      0|    if (!EC_POINT_oct2point(group, point, buf, ptmp->data_size, bnctx)) {
  ------------------
  |  Branch (1724:9): [True: 0, False: 0]
  ------------------
 1725|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1726|      0|        goto err;
 1727|      0|    }
 1728|       |
 1729|       |    /* order */
 1730|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ORDER);
  ------------------
  |  |  401|      0|# define OSSL_PKEY_PARAM_EC_ORDER "order"
  ------------------
 1731|      0|    if (!OSSL_PARAM_get_BN(ptmp, &order)
  ------------------
  |  Branch (1731:9): [True: 0, False: 0]
  ------------------
 1732|      0|        || (BN_is_negative(order) || BN_is_zero(order))
  ------------------
  |  Branch (1732:13): [True: 0, False: 0]
  |  Branch (1732:38): [True: 0, False: 0]
  ------------------
 1733|      0|        || (BN_num_bits(order) > (int)field_bits + 1)) { /* Hasse bound */
  ------------------
  |  Branch (1733:12): [True: 0, False: 0]
  ------------------
 1734|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GROUP_ORDER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1735|      0|        goto err;
 1736|      0|    }
 1737|       |
 1738|       |    /* Optional cofactor */
 1739|      0|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_COFACTOR);
  ------------------
  |  |  393|      0|# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
  ------------------
 1740|      0|    if (ptmp != NULL) {
  ------------------
  |  Branch (1740:9): [True: 0, False: 0]
  ------------------
 1741|      0|        cofactor = BN_CTX_get(bnctx);
 1742|      0|        if (cofactor == NULL || !OSSL_PARAM_get_BN(ptmp, &cofactor)) {
  ------------------
  |  Branch (1742:13): [True: 0, False: 0]
  |  Branch (1742:33): [True: 0, False: 0]
  ------------------
 1743|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_COFACTOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1744|      0|            goto err;
 1745|      0|        }
 1746|      0|    }
 1747|       |
 1748|       |    /* set the generator, order and cofactor (if present) */
 1749|      0|    if (!EC_GROUP_set_generator(group, point, order, cofactor)) {
  ------------------
  |  Branch (1749:9): [True: 0, False: 0]
  ------------------
 1750|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1751|      0|        goto err;
 1752|      0|    }
 1753|       |
 1754|      0|    named_group = ec_group_explicit_to_named(group, libctx, propq, bnctx);
 1755|      0|    if (named_group == NULL) {
  ------------------
  |  Branch (1755:9): [True: 0, False: 0]
  ------------------
 1756|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_NAMED_GROUP_CONVERSION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1757|      0|        goto err;
 1758|      0|    }
 1759|      0|    if (named_group == group) {
  ------------------
  |  Branch (1759:9): [True: 0, False: 0]
  ------------------
 1760|      0|#ifdef OPENSSL_NO_EC_EXPLICIT_CURVES
 1761|      0|        if (EC_GROUP_check_named_curve(group, 0, NULL) == NID_undef) {
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (1761:13): [True: 0, False: 0]
  ------------------
 1762|      0|            ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_GROUP);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1763|      0|            goto err;
 1764|      0|        }
 1765|       |#else
 1766|       |        /*
 1767|       |         * If we did not find a named group then the encoding should be explicit
 1768|       |         * if it was specified
 1769|       |         */
 1770|       |        ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ENCODING);
 1771|       |        if (ptmp != NULL
 1772|       |            && !ossl_ec_encoding_param2id(ptmp, &encoding_flag)) {
 1773|       |            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
 1774|       |            goto err;
 1775|       |        }
 1776|       |        if (encoding_flag == OPENSSL_EC_NAMED_CURVE) {
 1777|       |            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
 1778|       |            goto err;
 1779|       |        }
 1780|       |        EC_GROUP_set_asn1_flag(group, OPENSSL_EC_EXPLICIT_CURVE);
 1781|       |#endif
 1782|      0|    } else {
 1783|      0|        EC_GROUP_free(group);
 1784|      0|        group = named_group;
 1785|      0|    }
 1786|       |    /* We've imported the group from explicit parameters, set it so. */
 1787|      0|    group->decoded_from_explicit_params = 1;
 1788|      0|    ok = 1;
 1789|      0|err:
 1790|      0|    if (!ok) {
  ------------------
  |  Branch (1790:9): [True: 0, False: 0]
  ------------------
 1791|      0|        EC_GROUP_free(group);
 1792|      0|        group = NULL;
 1793|      0|    }
 1794|      0|    EC_POINT_free(point);
 1795|      0|    BN_CTX_end(bnctx);
 1796|      0|    BN_CTX_free(bnctx);
 1797|       |
 1798|      0|    return group;
 1799|      0|#endif /* FIPS_MODULE */
 1800|      0|}
ec_lib.c:ec_precompute_mont_data:
 1215|   150k|{
 1216|   150k|    BN_CTX *ctx = BN_CTX_new_ex(group->libctx);
 1217|   150k|    int ret = 0;
 1218|       |
 1219|   150k|    BN_MONT_CTX_free(group->mont_data);
 1220|   150k|    group->mont_data = NULL;
 1221|       |
 1222|   150k|    if (ctx == NULL)
  ------------------
  |  Branch (1222:9): [True: 0, False: 150k]
  ------------------
 1223|      0|        goto err;
 1224|       |
 1225|   150k|    group->mont_data = BN_MONT_CTX_new();
 1226|   150k|    if (group->mont_data == NULL)
  ------------------
  |  Branch (1226:9): [True: 0, False: 150k]
  ------------------
 1227|      0|        goto err;
 1228|       |
 1229|   150k|    if (!BN_MONT_CTX_set(group->mont_data, group->order, ctx)) {
  ------------------
  |  Branch (1229:9): [True: 0, False: 150k]
  ------------------
 1230|      0|        BN_MONT_CTX_free(group->mont_data);
 1231|      0|        group->mont_data = NULL;
 1232|      0|        goto err;
 1233|      0|    }
 1234|       |
 1235|   150k|    ret = 1;
 1236|       |
 1237|   150k|err:
 1238|       |
 1239|   150k|    BN_CTX_free(ctx);
 1240|   150k|    return ret;
 1241|   150k|}
ec_lib.c:group_new_from_name:
 1503|    441|{
 1504|    441|    int ok = 0, nid;
 1505|    441|    const char *curve_name = NULL;
 1506|       |
 1507|    441|    switch (p->data_type) {
  ------------------
  |  Branch (1507:13): [True: 441, False: 0]
  ------------------
 1508|    441|    case OSSL_PARAM_UTF8_STRING:
  ------------------
  |  |  117|    441|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1508:5): [True: 441, False: 0]
  ------------------
 1509|       |        /* The OSSL_PARAM functions have no support for this */
 1510|    441|        curve_name = p->data;
 1511|    441|        ok = (curve_name != NULL);
 1512|    441|        break;
 1513|      0|    case OSSL_PARAM_UTF8_PTR:
  ------------------
  |  |  141|      0|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
  |  Branch (1513:5): [True: 0, False: 441]
  ------------------
 1514|      0|        ok = OSSL_PARAM_get_utf8_ptr(p, &curve_name);
 1515|      0|        break;
 1516|    441|    }
 1517|       |
 1518|    441|    if (ok) {
  ------------------
  |  Branch (1518:9): [True: 441, False: 0]
  ------------------
 1519|    441|        nid = ossl_ec_curve_name2nid(curve_name);
 1520|    441|        if (nid == NID_undef) {
  ------------------
  |  |   18|    441|#define NID_undef                       0
  ------------------
  |  Branch (1520:13): [True: 0, False: 441]
  ------------------
 1521|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_CURVE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1522|      0|            return NULL;
 1523|    441|        } else {
 1524|    441|            return EC_GROUP_new_by_curve_name_ex(libctx, propq, nid);
 1525|    441|        }
 1526|    441|    }
 1527|      0|    return NULL;
 1528|    441|}

ec_lib.c:ec_point_is_compat:
  332|  1.30M|{
  333|  1.30M|    return group->meth == point->meth
  ------------------
  |  Branch (333:12): [True: 1.30M, False: 0]
  ------------------
  334|  1.30M|        && (group->curve_name == 0
  ------------------
  |  Branch (334:13): [True: 50.2k, False: 1.25M]
  ------------------
  335|  1.25M|            || point->curve_name == 0
  ------------------
  |  Branch (335:16): [True: 0, False: 1.25M]
  ------------------
  336|  1.25M|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (336:16): [True: 1.25M, False: 0]
  ------------------
  337|  1.30M|}
ec_mult.c:ec_point_ladder_pre:
  763|    288|{
  764|    288|    if (group->meth->ladder_pre != NULL)
  ------------------
  |  Branch (764:9): [True: 288, False: 0]
  ------------------
  765|    288|        return group->meth->ladder_pre(group, r, s, p, ctx);
  766|       |
  767|      0|    if (!EC_POINT_copy(s, p)
  ------------------
  |  Branch (767:9): [True: 0, False: 0]
  ------------------
  768|      0|        || !EC_POINT_dbl(group, r, s, ctx))
  ------------------
  |  Branch (768:12): [True: 0, False: 0]
  ------------------
  769|      0|        return 0;
  770|       |
  771|      0|    return 1;
  772|      0|}
ec_mult.c:ec_point_ladder_step:
  777|  73.7k|{
  778|  73.7k|    if (group->meth->ladder_step != NULL)
  ------------------
  |  Branch (778:9): [True: 73.7k, False: 0]
  ------------------
  779|  73.7k|        return group->meth->ladder_step(group, r, s, p, ctx);
  780|       |
  781|      0|    if (!EC_POINT_add(group, s, r, s, ctx)
  ------------------
  |  Branch (781:9): [True: 0, False: 0]
  ------------------
  782|      0|        || !EC_POINT_dbl(group, r, r, ctx))
  ------------------
  |  Branch (782:12): [True: 0, False: 0]
  ------------------
  783|      0|        return 0;
  784|       |
  785|      0|    return 1;
  786|      0|}
ec_mult.c:ec_point_ladder_post:
  791|    288|{
  792|    288|    if (group->meth->ladder_post != NULL)
  ------------------
  |  Branch (792:9): [True: 288, False: 0]
  ------------------
  793|    288|        return group->meth->ladder_post(group, r, s, p, ctx);
  794|       |
  795|      0|    return 1;
  796|    288|}
ec_oct.c:ec_point_is_compat:
  332|   163k|{
  333|   163k|    return group->meth == point->meth
  ------------------
  |  Branch (333:12): [True: 163k, False: 0]
  ------------------
  334|   163k|        && (group->curve_name == 0
  ------------------
  |  Branch (334:13): [True: 0, False: 163k]
  ------------------
  335|   163k|            || point->curve_name == 0
  ------------------
  |  Branch (335:16): [True: 0, False: 163k]
  ------------------
  336|   163k|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (336:16): [True: 163k, False: 0]
  ------------------
  337|   163k|}

ossl_ec_scalar_mul_ladder:
  143|    288|{
  144|    288|    int i, cardinality_bits, group_top, kbit, pbit, Z_is_one;
  145|    288|    EC_POINT *p = NULL;
  146|    288|    EC_POINT *s = NULL;
  147|    288|    BIGNUM *k = NULL;
  148|    288|    BIGNUM *lambda = NULL;
  149|    288|    BIGNUM *cardinality = NULL;
  150|    288|    int ret = 0;
  151|       |
  152|       |    /* early exit if the input point is the point at infinity */
  153|    288|    if (point != NULL && EC_POINT_is_at_infinity(group, point))
  ------------------
  |  Branch (153:9): [True: 0, False: 288]
  |  Branch (153:26): [True: 0, False: 0]
  ------------------
  154|      0|        return EC_POINT_set_to_infinity(group, r);
  155|       |
  156|    288|    if (BN_is_zero(group->order)) {
  ------------------
  |  Branch (156:9): [True: 0, False: 288]
  ------------------
  157|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_ORDER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  158|      0|        return 0;
  159|      0|    }
  160|    288|    if (BN_is_zero(group->cofactor)) {
  ------------------
  |  Branch (160:9): [True: 0, False: 288]
  ------------------
  161|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_COFACTOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  162|      0|        return 0;
  163|      0|    }
  164|       |
  165|    288|    BN_CTX_start(ctx);
  166|       |
  167|    288|    if (((p = EC_POINT_new(group)) == NULL)
  ------------------
  |  Branch (167:9): [True: 0, False: 288]
  ------------------
  168|    288|        || ((s = EC_POINT_new(group)) == NULL)) {
  ------------------
  |  Branch (168:12): [True: 0, False: 288]
  ------------------
  169|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  170|      0|        goto err;
  171|      0|    }
  172|       |
  173|    288|    if (point == NULL) {
  ------------------
  |  Branch (173:9): [True: 288, False: 0]
  ------------------
  174|    288|        if (!EC_POINT_copy(p, group->generator)) {
  ------------------
  |  Branch (174:13): [True: 0, False: 288]
  ------------------
  175|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  176|      0|            goto err;
  177|      0|        }
  178|    288|    } else {
  179|      0|        if (!EC_POINT_copy(p, point)) {
  ------------------
  |  Branch (179:13): [True: 0, False: 0]
  ------------------
  180|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  181|      0|            goto err;
  182|      0|        }
  183|      0|    }
  184|       |
  185|    288|    EC_POINT_BN_set_flags(p, BN_FLG_CONSTTIME);
  ------------------
  |  |  105|    288|    do {                                \
  |  |  106|    288|        BN_set_flags((P)->X, (flags));  \
  |  |  107|    288|        BN_set_flags((P)->Y, (flags));  \
  |  |  108|    288|        BN_set_flags((P)->Z, (flags));  \
  |  |  109|    288|    } while (0)
  |  |  ------------------
  |  |  |  Branch (109:14): [Folded, False: 288]
  |  |  ------------------
  ------------------
  186|    288|    EC_POINT_BN_set_flags(r, BN_FLG_CONSTTIME);
  ------------------
  |  |  105|    288|    do {                                \
  |  |  106|    288|        BN_set_flags((P)->X, (flags));  \
  |  |  107|    288|        BN_set_flags((P)->Y, (flags));  \
  |  |  108|    288|        BN_set_flags((P)->Z, (flags));  \
  |  |  109|    288|    } while (0)
  |  |  ------------------
  |  |  |  Branch (109:14): [Folded, False: 288]
  |  |  ------------------
  ------------------
  187|    288|    EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME);
  ------------------
  |  |  105|    288|    do {                                \
  |  |  106|    288|        BN_set_flags((P)->X, (flags));  \
  |  |  107|    288|        BN_set_flags((P)->Y, (flags));  \
  |  |  108|    288|        BN_set_flags((P)->Z, (flags));  \
  |  |  109|    288|    } while (0)
  |  |  ------------------
  |  |  |  Branch (109:14): [Folded, False: 288]
  |  |  ------------------
  ------------------
  188|       |
  189|    288|    cardinality = BN_CTX_get(ctx);
  190|    288|    lambda = BN_CTX_get(ctx);
  191|    288|    k = BN_CTX_get(ctx);
  192|    288|    if (k == NULL) {
  ------------------
  |  Branch (192:9): [True: 0, False: 288]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        goto err;
  195|      0|    }
  196|       |
  197|    288|    if (!BN_mul(cardinality, group->order, group->cofactor, ctx)) {
  ------------------
  |  Branch (197:9): [True: 0, False: 288]
  ------------------
  198|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  199|      0|        goto err;
  200|      0|    }
  201|       |
  202|       |    /*
  203|       |     * Group cardinalities are often on a word boundary.
  204|       |     * So when we pad the scalar, some timing diff might
  205|       |     * pop if it needs to be expanded due to carries.
  206|       |     * So expand ahead of time.
  207|       |     */
  208|    288|    cardinality_bits = BN_num_bits(cardinality);
  209|    288|    group_top = bn_get_top(cardinality);
  210|    288|    if ((bn_wexpand(k, group_top + 2) == NULL)
  ------------------
  |  Branch (210:9): [True: 0, False: 288]
  ------------------
  211|    288|        || (bn_wexpand(lambda, group_top + 2) == NULL)) {
  ------------------
  |  Branch (211:12): [True: 0, False: 288]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        goto err;
  214|      0|    }
  215|       |
  216|    288|    if (!BN_copy(k, scalar)) {
  ------------------
  |  Branch (216:9): [True: 0, False: 288]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        goto err;
  219|      0|    }
  220|       |
  221|    288|    BN_set_flags(k, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|    288|#define BN_FLG_CONSTTIME 0x04
  ------------------
  222|       |
  223|    288|    if ((BN_num_bits(k) > cardinality_bits) || (BN_is_negative(k))) {
  ------------------
  |  Branch (223:9): [True: 0, False: 288]
  |  Branch (223:48): [True: 0, False: 288]
  ------------------
  224|       |        /*-
  225|       |         * this is an unusual input, and we don't guarantee
  226|       |         * constant-timeness
  227|       |         */
  228|      0|        if (!BN_nnmod(k, k, cardinality, ctx)) {
  ------------------
  |  Branch (228:13): [True: 0, False: 0]
  ------------------
  229|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  230|      0|            goto err;
  231|      0|        }
  232|      0|    }
  233|       |
  234|    288|    if (!BN_add(lambda, k, cardinality)) {
  ------------------
  |  Branch (234:9): [True: 0, False: 288]
  ------------------
  235|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  236|      0|        goto err;
  237|      0|    }
  238|    288|    BN_set_flags(lambda, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|    288|#define BN_FLG_CONSTTIME 0x04
  ------------------
  239|    288|    if (!BN_add(k, lambda, cardinality)) {
  ------------------
  |  Branch (239:9): [True: 0, False: 288]
  ------------------
  240|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  241|      0|        goto err;
  242|      0|    }
  243|       |    /*
  244|       |     * lambda := scalar + cardinality
  245|       |     * k := scalar + 2*cardinality
  246|       |     */
  247|    288|    kbit = BN_is_bit_set(lambda, cardinality_bits);
  248|    288|    BN_consttime_swap(kbit, k, lambda, group_top + 2);
  249|       |
  250|    288|    group_top = bn_get_top(group->field);
  251|    288|    if ((bn_wexpand(s->X, group_top) == NULL)
  ------------------
  |  Branch (251:9): [True: 0, False: 288]
  ------------------
  252|    288|        || (bn_wexpand(s->Y, group_top) == NULL)
  ------------------
  |  Branch (252:12): [True: 0, False: 288]
  ------------------
  253|    288|        || (bn_wexpand(s->Z, group_top) == NULL)
  ------------------
  |  Branch (253:12): [True: 0, False: 288]
  ------------------
  254|    288|        || (bn_wexpand(r->X, group_top) == NULL)
  ------------------
  |  Branch (254:12): [True: 0, False: 288]
  ------------------
  255|    288|        || (bn_wexpand(r->Y, group_top) == NULL)
  ------------------
  |  Branch (255:12): [True: 0, False: 288]
  ------------------
  256|    288|        || (bn_wexpand(r->Z, group_top) == NULL)
  ------------------
  |  Branch (256:12): [True: 0, False: 288]
  ------------------
  257|    288|        || (bn_wexpand(p->X, group_top) == NULL)
  ------------------
  |  Branch (257:12): [True: 0, False: 288]
  ------------------
  258|    288|        || (bn_wexpand(p->Y, group_top) == NULL)
  ------------------
  |  Branch (258:12): [True: 0, False: 288]
  ------------------
  259|    288|        || (bn_wexpand(p->Z, group_top) == NULL)) {
  ------------------
  |  Branch (259:12): [True: 0, False: 288]
  ------------------
  260|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  261|      0|        goto err;
  262|      0|    }
  263|       |
  264|       |    /* ensure input point is in affine coords for ladder step efficiency */
  265|    288|    if (!p->Z_is_one && (group->meth->make_affine == NULL || !group->meth->make_affine(group, p, ctx))) {
  ------------------
  |  Branch (265:9): [True: 0, False: 288]
  |  Branch (265:26): [True: 0, False: 0]
  |  Branch (265:62): [True: 0, False: 0]
  ------------------
  266|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  267|      0|        goto err;
  268|      0|    }
  269|       |
  270|       |    /* Initialize the Montgomery ladder */
  271|    288|    if (!ec_point_ladder_pre(group, r, s, p, ctx)) {
  ------------------
  |  Branch (271:9): [True: 0, False: 288]
  ------------------
  272|      0|        ERR_raise(ERR_LIB_EC, EC_R_LADDER_PRE_FAILURE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  273|      0|        goto err;
  274|      0|    }
  275|       |
  276|       |    /* top bit is a 1, in a fixed pos */
  277|    288|    pbit = 1;
  278|       |
  279|    288|#define EC_POINT_CSWAP(c, a, b, w, t)              \
  280|    288|    do {                                           \
  281|    288|        BN_consttime_swap(c, (a)->X, (b)->X, w);   \
  282|    288|        BN_consttime_swap(c, (a)->Y, (b)->Y, w);   \
  283|    288|        BN_consttime_swap(c, (a)->Z, (b)->Z, w);   \
  284|    288|        t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
  285|    288|        (a)->Z_is_one ^= (t);                      \
  286|    288|        (b)->Z_is_one ^= (t);                      \
  287|    288|    } while (0)
  288|       |
  289|       |    /*-
  290|       |     * The ladder step, with branches, is
  291|       |     *
  292|       |     * k[i] == 0: S = add(R, S), R = dbl(R)
  293|       |     * k[i] == 1: R = add(S, R), S = dbl(S)
  294|       |     *
  295|       |     * Swapping R, S conditionally on k[i] leaves you with state
  296|       |     *
  297|       |     * k[i] == 0: T, U = R, S
  298|       |     * k[i] == 1: T, U = S, R
  299|       |     *
  300|       |     * Then perform the ECC ops.
  301|       |     *
  302|       |     * U = add(T, U)
  303|       |     * T = dbl(T)
  304|       |     *
  305|       |     * Which leaves you with state
  306|       |     *
  307|       |     * k[i] == 0: U = add(R, S), T = dbl(R)
  308|       |     * k[i] == 1: U = add(S, R), T = dbl(S)
  309|       |     *
  310|       |     * Swapping T, U conditionally on k[i] leaves you with state
  311|       |     *
  312|       |     * k[i] == 0: R, S = T, U
  313|       |     * k[i] == 1: R, S = U, T
  314|       |     *
  315|       |     * Which leaves you with state
  316|       |     *
  317|       |     * k[i] == 0: S = add(R, S), R = dbl(R)
  318|       |     * k[i] == 1: R = add(S, R), S = dbl(S)
  319|       |     *
  320|       |     * So we get the same logic, but instead of a branch it's a
  321|       |     * conditional swap, followed by ECC ops, then another conditional swap.
  322|       |     *
  323|       |     * Optimization: The end of iteration i and start of i-1 looks like
  324|       |     *
  325|       |     * ...
  326|       |     * CSWAP(k[i], R, S)
  327|       |     * ECC
  328|       |     * CSWAP(k[i], R, S)
  329|       |     * (next iteration)
  330|       |     * CSWAP(k[i-1], R, S)
  331|       |     * ECC
  332|       |     * CSWAP(k[i-1], R, S)
  333|       |     * ...
  334|       |     *
  335|       |     * So instead of two contiguous swaps, you can merge the condition
  336|       |     * bits and do a single swap.
  337|       |     *
  338|       |     * k[i]   k[i-1]    Outcome
  339|       |     * 0      0         No Swap
  340|       |     * 0      1         Swap
  341|       |     * 1      0         Swap
  342|       |     * 1      1         No Swap
  343|       |     *
  344|       |     * This is XOR. pbit tracks the previous bit of k.
  345|       |     */
  346|       |
  347|  74.0k|    for (i = cardinality_bits - 1; i >= 0; i--) {
  ------------------
  |  Branch (347:36): [True: 73.7k, False: 288]
  ------------------
  348|  73.7k|        kbit = BN_is_bit_set(k, i) ^ pbit;
  349|  73.7k|        EC_POINT_CSWAP(kbit, r, s, group_top, Z_is_one);
  ------------------
  |  |  280|  73.7k|    do {                                           \
  |  |  281|  73.7k|        BN_consttime_swap(c, (a)->X, (b)->X, w);   \
  |  |  282|  73.7k|        BN_consttime_swap(c, (a)->Y, (b)->Y, w);   \
  |  |  283|  73.7k|        BN_consttime_swap(c, (a)->Z, (b)->Z, w);   \
  |  |  284|  73.7k|        t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
  |  |  285|  73.7k|        (a)->Z_is_one ^= (t);                      \
  |  |  286|  73.7k|        (b)->Z_is_one ^= (t);                      \
  |  |  287|  73.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (287:14): [Folded, False: 73.7k]
  |  |  ------------------
  ------------------
  350|       |
  351|       |        /* Perform a single step of the Montgomery ladder */
  352|  73.7k|        if (!ec_point_ladder_step(group, r, s, p, ctx)) {
  ------------------
  |  Branch (352:13): [True: 0, False: 73.7k]
  ------------------
  353|      0|            ERR_raise(ERR_LIB_EC, EC_R_LADDER_STEP_FAILURE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  354|      0|            goto err;
  355|      0|        }
  356|       |        /*
  357|       |         * pbit logic merges this cswap with that of the
  358|       |         * next iteration
  359|       |         */
  360|  73.7k|        pbit ^= kbit;
  361|  73.7k|    }
  362|       |    /* one final cswap to move the right value into r */
  363|    288|    EC_POINT_CSWAP(pbit, r, s, group_top, Z_is_one);
  ------------------
  |  |  280|    288|    do {                                           \
  |  |  281|    288|        BN_consttime_swap(c, (a)->X, (b)->X, w);   \
  |  |  282|    288|        BN_consttime_swap(c, (a)->Y, (b)->Y, w);   \
  |  |  283|    288|        BN_consttime_swap(c, (a)->Z, (b)->Z, w);   \
  |  |  284|    288|        t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
  |  |  285|    288|        (a)->Z_is_one ^= (t);                      \
  |  |  286|    288|        (b)->Z_is_one ^= (t);                      \
  |  |  287|    288|    } while (0)
  |  |  ------------------
  |  |  |  Branch (287:14): [Folded, False: 288]
  |  |  ------------------
  ------------------
  364|    288|#undef EC_POINT_CSWAP
  365|       |
  366|       |    /* Finalize ladder (and recover full point coordinates) */
  367|    288|    if (!ec_point_ladder_post(group, r, s, p, ctx)) {
  ------------------
  |  Branch (367:9): [True: 0, False: 288]
  ------------------
  368|      0|        ERR_raise(ERR_LIB_EC, EC_R_LADDER_POST_FAILURE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  369|      0|        goto err;
  370|      0|    }
  371|       |
  372|    288|    ret = 1;
  373|       |
  374|    288|err:
  375|    288|    EC_POINT_free(p);
  376|    288|    EC_POINT_clear_free(s);
  377|    288|    BN_CTX_end(ctx);
  378|       |
  379|    288|    return ret;
  380|    288|}
ossl_ec_wNAF_mul:
  406|    288|{
  407|    288|    const EC_POINT *generator = NULL;
  408|    288|    EC_POINT *tmp = NULL;
  409|    288|    size_t totalnum;
  410|    288|    size_t blocksize = 0, numblocks = 0; /* for wNAF splitting */
  411|    288|    size_t pre_points_per_block = 0;
  412|    288|    size_t i, j;
  413|    288|    int k;
  414|    288|    int r_is_inverted = 0;
  415|    288|    int r_is_at_infinity = 1;
  416|    288|    size_t *wsize = NULL; /* individual window sizes */
  417|    288|    signed char **wNAF = NULL; /* individual wNAFs */
  418|    288|    size_t *wNAF_len = NULL;
  419|    288|    size_t max_len = 0;
  420|    288|    size_t num_val;
  421|    288|    EC_POINT **val = NULL; /* precomputation */
  422|    288|    EC_POINT **v;
  423|    288|    EC_POINT ***val_sub = NULL; /* pointers to sub-arrays of 'val' or
  424|       |                                 * 'pre_comp->points' */
  425|    288|    const EC_PRE_COMP *pre_comp = NULL;
  426|    288|    int num_scalar = 0; /* flag: will be set to 1 if 'scalar' must be
  427|       |                         * treated like other scalars, i.e.
  428|       |                         * precomputation is not available */
  429|    288|    int ret = 0;
  430|       |
  431|    288|    if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) {
  ------------------
  |  Branch (431:9): [True: 288, False: 0]
  |  Branch (431:38): [True: 288, False: 0]
  ------------------
  432|       |        /*-
  433|       |         * Handle the common cases where the scalar is secret, enforcing a
  434|       |         * scalar multiplication implementation based on a Montgomery ladder,
  435|       |         * with various timing attack defenses.
  436|       |         */
  437|    288|        if ((scalar != group->order) && (scalar != NULL) && (num == 0)) {
  ------------------
  |  Branch (437:13): [True: 288, False: 0]
  |  Branch (437:41): [True: 288, False: 0]
  |  Branch (437:61): [True: 288, False: 0]
  ------------------
  438|       |            /*-
  439|       |             * In this case we want to compute scalar * GeneratorPoint: this
  440|       |             * codepath is reached most prominently by (ephemeral) key
  441|       |             * generation of EC cryptosystems (i.e. ECDSA keygen and sign setup,
  442|       |             * ECDH keygen/first half), where the scalar is always secret. This
  443|       |             * is why we ignore if BN_FLG_CONSTTIME is actually set and we
  444|       |             * always call the ladder version.
  445|       |             */
  446|    288|            return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx);
  447|    288|        }
  448|      0|        if ((scalar == NULL) && (num == 1) && (scalars[0] != group->order)) {
  ------------------
  |  Branch (448:13): [True: 0, False: 0]
  |  Branch (448:33): [True: 0, False: 0]
  |  Branch (448:47): [True: 0, False: 0]
  ------------------
  449|       |            /*-
  450|       |             * In this case we want to compute scalar * VariablePoint: this
  451|       |             * codepath is reached most prominently by the second half of ECDH,
  452|       |             * where the secret scalar is multiplied by the peer's public point.
  453|       |             * To protect the secret scalar, we ignore if BN_FLG_CONSTTIME is
  454|       |             * actually set and we always call the ladder version.
  455|       |             */
  456|      0|            return ossl_ec_scalar_mul_ladder(group, r, scalars[0], points[0],
  457|      0|                ctx);
  458|      0|        }
  459|      0|    }
  460|       |
  461|      0|    if (scalar != NULL) {
  ------------------
  |  Branch (461:9): [True: 0, False: 0]
  ------------------
  462|      0|        generator = EC_GROUP_get0_generator(group);
  463|      0|        if (generator == NULL) {
  ------------------
  |  Branch (463:13): [True: 0, False: 0]
  ------------------
  464|      0|            ERR_raise(ERR_LIB_EC, EC_R_UNDEFINED_GENERATOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  465|      0|            goto err;
  466|      0|        }
  467|       |
  468|       |        /* look if we can use precomputed multiples of generator */
  469|       |
  470|      0|        pre_comp = group->pre_comp.ec;
  471|      0|        if (pre_comp && pre_comp->numblocks
  ------------------
  |  Branch (471:13): [True: 0, False: 0]
  |  Branch (471:25): [True: 0, False: 0]
  ------------------
  472|      0|            && (EC_POINT_cmp(group, generator, pre_comp->points[0], ctx) == 0)) {
  ------------------
  |  Branch (472:16): [True: 0, False: 0]
  ------------------
  473|      0|            blocksize = pre_comp->blocksize;
  474|       |
  475|       |            /*
  476|       |             * determine maximum number of blocks that wNAF splitting may
  477|       |             * yield (NB: maximum wNAF length is bit length plus one)
  478|       |             */
  479|      0|            numblocks = (BN_num_bits(scalar) / blocksize) + 1;
  480|       |
  481|       |            /*
  482|       |             * we cannot use more blocks than we have precomputation for
  483|       |             */
  484|      0|            if (numblocks > pre_comp->numblocks)
  ------------------
  |  Branch (484:17): [True: 0, False: 0]
  ------------------
  485|      0|                numblocks = pre_comp->numblocks;
  486|       |
  487|      0|            pre_points_per_block = (size_t)1 << (pre_comp->w - 1);
  488|       |
  489|       |            /* check that pre_comp looks sane */
  490|      0|            if (pre_comp->num != (pre_comp->numblocks * pre_points_per_block)) {
  ------------------
  |  Branch (490:17): [True: 0, False: 0]
  ------------------
  491|      0|                ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  492|      0|                goto err;
  493|      0|            }
  494|      0|        } else {
  495|       |            /* can't use precomputation */
  496|      0|            pre_comp = NULL;
  497|      0|            numblocks = 1;
  498|      0|            num_scalar = 1; /* treat 'scalar' like 'num'-th element of
  499|       |                             * 'scalars' */
  500|      0|        }
  501|      0|    }
  502|       |
  503|      0|    totalnum = num + numblocks;
  504|       |
  505|      0|    wsize = OPENSSL_malloc_array(totalnum, sizeof(wsize[0]));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  506|      0|    wNAF_len = OPENSSL_malloc_array(totalnum, sizeof(wNAF_len[0]));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  507|       |    /* include space for pivot */
  508|      0|    wNAF = OPENSSL_malloc_array(totalnum + 1, sizeof(wNAF[0]));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  509|      0|    val_sub = OPENSSL_malloc_array(totalnum, sizeof(val_sub[0]));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  510|       |
  511|       |    /* Ensure wNAF is initialised in case we end up going to err */
  512|      0|    if (wNAF != NULL)
  ------------------
  |  Branch (512:9): [True: 0, False: 0]
  ------------------
  513|      0|        wNAF[0] = NULL; /* preliminary pivot */
  514|       |
  515|      0|    if (wsize == NULL || wNAF_len == NULL || wNAF == NULL || val_sub == NULL)
  ------------------
  |  Branch (515:9): [True: 0, False: 0]
  |  Branch (515:26): [True: 0, False: 0]
  |  Branch (515:46): [True: 0, False: 0]
  |  Branch (515:62): [True: 0, False: 0]
  ------------------
  516|      0|        goto err;
  517|       |
  518|       |    /*
  519|       |     * num_val will be the total number of temporarily precomputed points
  520|       |     */
  521|      0|    num_val = 0;
  522|       |
  523|      0|    for (i = 0; i < num + num_scalar; i++) {
  ------------------
  |  Branch (523:17): [True: 0, False: 0]
  ------------------
  524|      0|        size_t bits;
  525|       |
  526|      0|        bits = i < num ? BN_num_bits(scalars[i]) : BN_num_bits(scalar);
  ------------------
  |  Branch (526:16): [True: 0, False: 0]
  ------------------
  527|      0|        wsize[i] = EC_window_bits_for_scalar_size(bits);
  ------------------
  |  |  390|      0|    ((size_t)((b) >= 2000 ? 6 : (b) >= 800 ? 5 \
  |  |  ------------------
  |  |  |  Branch (390:15): [True: 0, False: 0]
  |  |  |  Branch (390:33): [True: 0, False: 0]
  |  |  ------------------
  |  |  391|      0|            : (b) >= 300                   ? 4 \
  |  |  ------------------
  |  |  |  Branch (391:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  392|      0|            : (b) >= 70                    ? 3 \
  |  |  ------------------
  |  |  |  Branch (392:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  393|      0|            : (b) >= 20                    ? 2 \
  |  |  ------------------
  |  |  |  Branch (393:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  394|      0|                                           : 1))
  ------------------
  528|      0|        num_val += (size_t)1 << (wsize[i] - 1);
  529|      0|        wNAF[i + 1] = NULL; /* make sure we always have a pivot */
  530|      0|        wNAF[i] = bn_compute_wNAF((i < num ? scalars[i] : scalar), (int)wsize[i],
  ------------------
  |  Branch (530:36): [True: 0, False: 0]
  ------------------
  531|      0|            &wNAF_len[i]);
  532|      0|        if (wNAF[i] == NULL)
  ------------------
  |  Branch (532:13): [True: 0, False: 0]
  ------------------
  533|      0|            goto err;
  534|      0|        if (wNAF_len[i] > max_len)
  ------------------
  |  Branch (534:13): [True: 0, False: 0]
  ------------------
  535|      0|            max_len = wNAF_len[i];
  536|      0|    }
  537|       |
  538|      0|    if (numblocks) {
  ------------------
  |  Branch (538:9): [True: 0, False: 0]
  ------------------
  539|       |        /* we go here iff scalar != NULL */
  540|       |
  541|      0|        if (pre_comp == NULL) {
  ------------------
  |  Branch (541:13): [True: 0, False: 0]
  ------------------
  542|      0|            if (num_scalar != 1) {
  ------------------
  |  Branch (542:17): [True: 0, False: 0]
  ------------------
  543|      0|                ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  544|      0|                goto err;
  545|      0|            }
  546|       |            /* we have already generated a wNAF for 'scalar' */
  547|      0|        } else {
  548|      0|            signed char *tmp_wNAF = NULL;
  549|      0|            size_t tmp_len = 0;
  550|       |
  551|      0|            if (num_scalar != 0) {
  ------------------
  |  Branch (551:17): [True: 0, False: 0]
  ------------------
  552|      0|                ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  553|      0|                goto err;
  554|      0|            }
  555|       |
  556|       |            /*
  557|       |             * use the window size for which we have precomputation
  558|       |             */
  559|      0|            wsize[num] = pre_comp->w;
  560|      0|            tmp_wNAF = bn_compute_wNAF(scalar, (int)wsize[num], &tmp_len);
  561|      0|            if (!tmp_wNAF)
  ------------------
  |  Branch (561:17): [True: 0, False: 0]
  ------------------
  562|      0|                goto err;
  563|       |
  564|      0|            if (tmp_len <= max_len) {
  ------------------
  |  Branch (564:17): [True: 0, False: 0]
  ------------------
  565|       |                /*
  566|       |                 * One of the other wNAFs is at least as long as the wNAF
  567|       |                 * belonging to the generator, so wNAF splitting will not buy
  568|       |                 * us anything.
  569|       |                 */
  570|       |
  571|      0|                numblocks = 1;
  572|      0|                totalnum = num + 1; /* don't use wNAF splitting */
  573|      0|                wNAF[num] = tmp_wNAF;
  574|      0|                wNAF[num + 1] = NULL;
  575|      0|                wNAF_len[num] = tmp_len;
  576|       |                /*
  577|       |                 * pre_comp->points starts with the points that we need here:
  578|       |                 */
  579|      0|                val_sub[num] = pre_comp->points;
  580|      0|            } else {
  581|       |                /*
  582|       |                 * don't include tmp_wNAF directly into wNAF array - use wNAF
  583|       |                 * splitting and include the blocks
  584|       |                 */
  585|       |
  586|      0|                signed char *pp;
  587|      0|                EC_POINT **tmp_points;
  588|       |
  589|      0|                if (tmp_len < numblocks * blocksize) {
  ------------------
  |  Branch (589:21): [True: 0, False: 0]
  ------------------
  590|       |                    /*
  591|       |                     * possibly we can do with fewer blocks than estimated
  592|       |                     */
  593|      0|                    numblocks = (tmp_len + blocksize - 1) / blocksize;
  594|      0|                    if (numblocks > pre_comp->numblocks) {
  ------------------
  |  Branch (594:25): [True: 0, False: 0]
  ------------------
  595|      0|                        ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  596|      0|                        OPENSSL_free(tmp_wNAF);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  597|      0|                        goto err;
  598|      0|                    }
  599|      0|                    totalnum = num + numblocks;
  600|      0|                }
  601|       |
  602|       |                /* split wNAF in 'numblocks' parts */
  603|      0|                pp = tmp_wNAF;
  604|      0|                tmp_points = pre_comp->points;
  605|       |
  606|      0|                for (i = num; i < totalnum; i++) {
  ------------------
  |  Branch (606:31): [True: 0, False: 0]
  ------------------
  607|      0|                    if (i < totalnum - 1) {
  ------------------
  |  Branch (607:25): [True: 0, False: 0]
  ------------------
  608|      0|                        wNAF_len[i] = blocksize;
  609|      0|                        if (tmp_len < blocksize) {
  ------------------
  |  Branch (609:29): [True: 0, False: 0]
  ------------------
  610|      0|                            ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  611|      0|                            OPENSSL_free(tmp_wNAF);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  612|      0|                            goto err;
  613|      0|                        }
  614|      0|                        tmp_len -= blocksize;
  615|      0|                    } else
  616|       |                        /*
  617|       |                         * last block gets whatever is left (this could be
  618|       |                         * more or less than 'blocksize'!)
  619|       |                         */
  620|      0|                        wNAF_len[i] = tmp_len;
  621|       |
  622|      0|                    wNAF[i + 1] = NULL;
  623|      0|                    wNAF[i] = OPENSSL_malloc(wNAF_len[i]);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  624|      0|                    if (wNAF[i] == NULL) {
  ------------------
  |  Branch (624:25): [True: 0, False: 0]
  ------------------
  625|      0|                        OPENSSL_free(tmp_wNAF);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  626|      0|                        goto err;
  627|      0|                    }
  628|      0|                    memcpy(wNAF[i], pp, wNAF_len[i]);
  629|      0|                    if (wNAF_len[i] > max_len)
  ------------------
  |  Branch (629:25): [True: 0, False: 0]
  ------------------
  630|      0|                        max_len = wNAF_len[i];
  631|       |
  632|      0|                    if (*tmp_points == NULL) {
  ------------------
  |  Branch (632:25): [True: 0, False: 0]
  ------------------
  633|      0|                        ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  634|      0|                        OPENSSL_free(tmp_wNAF);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  635|      0|                        goto err;
  636|      0|                    }
  637|      0|                    val_sub[i] = tmp_points;
  638|      0|                    tmp_points += pre_points_per_block;
  639|      0|                    pp += blocksize;
  640|      0|                }
  641|      0|                OPENSSL_free(tmp_wNAF);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  642|      0|            }
  643|      0|        }
  644|      0|    }
  645|       |
  646|       |    /*
  647|       |     * All points we precompute now go into a single array 'val'.
  648|       |     * 'val_sub[i]' is a pointer to the subarray for the i-th point, or to a
  649|       |     * subarray of 'pre_comp->points' if we already have precomputation.
  650|       |     */
  651|      0|    val = OPENSSL_malloc_array(num_val + 1, sizeof(val[0]));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  652|      0|    if (val == NULL)
  ------------------
  |  Branch (652:9): [True: 0, False: 0]
  ------------------
  653|      0|        goto err;
  654|      0|    val[num_val] = NULL; /* pivot element */
  655|       |
  656|       |    /* allocate points for precomputation */
  657|      0|    v = val;
  658|      0|    for (i = 0; i < num + num_scalar; i++) {
  ------------------
  |  Branch (658:17): [True: 0, False: 0]
  ------------------
  659|      0|        val_sub[i] = v;
  660|      0|        for (j = 0; j < ((size_t)1 << (wsize[i] - 1)); j++) {
  ------------------
  |  Branch (660:21): [True: 0, False: 0]
  ------------------
  661|      0|            *v = EC_POINT_new(group);
  662|      0|            if (*v == NULL)
  ------------------
  |  Branch (662:17): [True: 0, False: 0]
  ------------------
  663|      0|                goto err;
  664|      0|            v++;
  665|      0|        }
  666|      0|    }
  667|      0|    if (!(v == val + num_val)) {
  ------------------
  |  Branch (667:9): [True: 0, False: 0]
  ------------------
  668|      0|        ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  669|      0|        goto err;
  670|      0|    }
  671|       |
  672|      0|    if ((tmp = EC_POINT_new(group)) == NULL)
  ------------------
  |  Branch (672:9): [True: 0, False: 0]
  ------------------
  673|      0|        goto err;
  674|       |
  675|       |    /*-
  676|       |     * prepare precomputed values:
  677|       |     *    val_sub[i][0] :=     points[i]
  678|       |     *    val_sub[i][1] := 3 * points[i]
  679|       |     *    val_sub[i][2] := 5 * points[i]
  680|       |     *    ...
  681|       |     */
  682|      0|    for (i = 0; i < num + num_scalar; i++) {
  ------------------
  |  Branch (682:17): [True: 0, False: 0]
  ------------------
  683|      0|        if (i < num) {
  ------------------
  |  Branch (683:13): [True: 0, False: 0]
  ------------------
  684|      0|            if (!EC_POINT_copy(val_sub[i][0], points[i]))
  ------------------
  |  Branch (684:17): [True: 0, False: 0]
  ------------------
  685|      0|                goto err;
  686|      0|        } else {
  687|      0|            if (!EC_POINT_copy(val_sub[i][0], generator))
  ------------------
  |  Branch (687:17): [True: 0, False: 0]
  ------------------
  688|      0|                goto err;
  689|      0|        }
  690|       |
  691|      0|        if (wsize[i] > 1) {
  ------------------
  |  Branch (691:13): [True: 0, False: 0]
  ------------------
  692|      0|            if (!EC_POINT_dbl(group, tmp, val_sub[i][0], ctx))
  ------------------
  |  Branch (692:17): [True: 0, False: 0]
  ------------------
  693|      0|                goto err;
  694|      0|            for (j = 1; j < ((size_t)1 << (wsize[i] - 1)); j++) {
  ------------------
  |  Branch (694:25): [True: 0, False: 0]
  ------------------
  695|      0|                if (!EC_POINT_add(group, val_sub[i][j], val_sub[i][j - 1], tmp, ctx))
  ------------------
  |  Branch (695:21): [True: 0, False: 0]
  ------------------
  696|      0|                    goto err;
  697|      0|            }
  698|      0|        }
  699|      0|    }
  700|       |
  701|      0|    if (group->meth->points_make_affine == NULL
  ------------------
  |  Branch (701:9): [True: 0, False: 0]
  ------------------
  702|      0|        || !group->meth->points_make_affine(group, num_val, val, ctx))
  ------------------
  |  Branch (702:12): [True: 0, False: 0]
  ------------------
  703|      0|        goto err;
  704|       |
  705|      0|    r_is_at_infinity = 1;
  706|       |
  707|      0|    if (max_len > INT_MAX)
  ------------------
  |  Branch (707:9): [True: 0, False: 0]
  ------------------
  708|      0|        goto err;
  709|      0|    for (k = (int)(max_len - 1); k >= 0; k--) {
  ------------------
  |  Branch (709:34): [True: 0, False: 0]
  ------------------
  710|      0|        if (!r_is_at_infinity) {
  ------------------
  |  Branch (710:13): [True: 0, False: 0]
  ------------------
  711|      0|            if (!EC_POINT_dbl(group, r, r, ctx))
  ------------------
  |  Branch (711:17): [True: 0, False: 0]
  ------------------
  712|      0|                goto err;
  713|      0|        }
  714|       |
  715|      0|        for (i = 0; i < totalnum; i++) {
  ------------------
  |  Branch (715:21): [True: 0, False: 0]
  ------------------
  716|      0|            if (wNAF_len[i] > (size_t)k) {
  ------------------
  |  Branch (716:17): [True: 0, False: 0]
  ------------------
  717|      0|                int digit = wNAF[i][k];
  718|      0|                int is_neg;
  719|       |
  720|      0|                if (digit) {
  ------------------
  |  Branch (720:21): [True: 0, False: 0]
  ------------------
  721|      0|                    is_neg = digit < 0;
  722|       |
  723|      0|                    if (is_neg)
  ------------------
  |  Branch (723:25): [True: 0, False: 0]
  ------------------
  724|      0|                        digit = -digit;
  725|       |
  726|      0|                    if (is_neg != r_is_inverted) {
  ------------------
  |  Branch (726:25): [True: 0, False: 0]
  ------------------
  727|      0|                        if (!r_is_at_infinity) {
  ------------------
  |  Branch (727:29): [True: 0, False: 0]
  ------------------
  728|      0|                            if (!EC_POINT_invert(group, r, ctx))
  ------------------
  |  Branch (728:33): [True: 0, False: 0]
  ------------------
  729|      0|                                goto err;
  730|      0|                        }
  731|      0|                        r_is_inverted = !r_is_inverted;
  732|      0|                    }
  733|       |
  734|       |                    /* digit > 0 */
  735|       |
  736|      0|                    if (r_is_at_infinity) {
  ------------------
  |  Branch (736:25): [True: 0, False: 0]
  ------------------
  737|      0|                        if (!EC_POINT_copy(r, val_sub[i][digit >> 1]))
  ------------------
  |  Branch (737:29): [True: 0, False: 0]
  ------------------
  738|      0|                            goto err;
  739|       |
  740|       |                        /*-
  741|       |                         * Apply coordinate blinding for EC_POINT.
  742|       |                         *
  743|       |                         * The underlying EC_METHOD can optionally implement this function:
  744|       |                         * ossl_ec_point_blind_coordinates() returns 0 in case of errors or 1 on
  745|       |                         * success or if coordinate blinding is not implemented for this
  746|       |                         * group.
  747|       |                         */
  748|      0|                        if (!ossl_ec_point_blind_coordinates(group, r, ctx)) {
  ------------------
  |  Branch (748:29): [True: 0, False: 0]
  ------------------
  749|      0|                            ERR_raise(ERR_LIB_EC, EC_R_POINT_COORDINATES_BLIND_FAILURE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  750|      0|                            goto err;
  751|      0|                        }
  752|       |
  753|      0|                        r_is_at_infinity = 0;
  754|      0|                    } else {
  755|      0|                        if (!EC_POINT_add(group, r, r, val_sub[i][digit >> 1], ctx))
  ------------------
  |  Branch (755:29): [True: 0, False: 0]
  ------------------
  756|      0|                            goto err;
  757|      0|                    }
  758|      0|                }
  759|      0|            }
  760|      0|        }
  761|      0|    }
  762|       |
  763|      0|    if (r_is_at_infinity) {
  ------------------
  |  Branch (763:9): [True: 0, False: 0]
  ------------------
  764|      0|        if (!EC_POINT_set_to_infinity(group, r))
  ------------------
  |  Branch (764:13): [True: 0, False: 0]
  ------------------
  765|      0|            goto err;
  766|      0|    } else {
  767|      0|        if (r_is_inverted)
  ------------------
  |  Branch (767:13): [True: 0, False: 0]
  ------------------
  768|      0|            if (!EC_POINT_invert(group, r, ctx))
  ------------------
  |  Branch (768:17): [True: 0, False: 0]
  ------------------
  769|      0|                goto err;
  770|      0|    }
  771|       |
  772|      0|    ret = 1;
  773|       |
  774|      0|err:
  775|      0|    EC_POINT_free(tmp);
  776|      0|    OPENSSL_free(wsize);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  777|      0|    OPENSSL_free(wNAF_len);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  778|      0|    if (wNAF != NULL) {
  ------------------
  |  Branch (778:9): [True: 0, False: 0]
  ------------------
  779|      0|        signed char **w;
  780|       |
  781|      0|        for (w = wNAF; *w != NULL; w++)
  ------------------
  |  Branch (781:24): [True: 0, False: 0]
  ------------------
  782|      0|            OPENSSL_free(*w);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  783|       |
  784|      0|        OPENSSL_free(wNAF);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  785|      0|    }
  786|      0|    if (val != NULL) {
  ------------------
  |  Branch (786:9): [True: 0, False: 0]
  ------------------
  787|      0|        for (v = val; *v != NULL; v++)
  ------------------
  |  Branch (787:23): [True: 0, False: 0]
  ------------------
  788|      0|            EC_POINT_clear_free(*v);
  789|       |
  790|      0|        OPENSSL_free(val);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  791|      0|    }
  792|      0|    OPENSSL_free(val_sub);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  793|      0|    return ret;
  794|      0|}

EC_POINT_point2oct:
   76|    882|{
   77|    882|    if (point == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 882]
  ------------------
   78|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   79|      0|        return 0;
   80|      0|    }
   81|    882|    if (group->meth->point2oct == 0
  ------------------
  |  Branch (81:9): [True: 882, False: 0]
  ------------------
   82|    882|        && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) {
  ------------------
  |  |   26|    882|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (82:12): [True: 0, False: 882]
  ------------------
   83|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   84|      0|        return 0;
   85|      0|    }
   86|    882|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 882]
  ------------------
   87|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   88|      0|        return 0;
   89|      0|    }
   90|    882|    if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
  ------------------
  |  |   26|    882|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (90:9): [True: 882, False: 0]
  ------------------
   91|    882|        if (group->meth->field_type == NID_X9_62_prime_field)
  ------------------
  |  |  152|    882|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (91:13): [True: 882, False: 0]
  ------------------
   92|    882|            return ossl_ec_GFp_simple_point2oct(group, point, form, buf, len,
   93|    882|                ctx);
   94|      0|        else
   95|       |#ifdef OPENSSL_NO_EC2M
   96|       |        {
   97|       |            ERR_raise(ERR_LIB_EC, EC_R_GF2M_NOT_SUPPORTED);
   98|       |            return 0;
   99|       |        }
  100|       |#else
  101|      0|            return ossl_ec_GF2m_simple_point2oct(group, point,
  102|      0|                form, buf, len, ctx);
  103|    882|#endif
  104|    882|    }
  105|       |
  106|      0|    return group->meth->point2oct(group, point, form, buf, len, ctx);
  107|    882|}
EC_POINT_oct2point:
  111|   162k|{
  112|   162k|    if (group->meth->oct2point == 0
  ------------------
  |  Branch (112:9): [True: 162k, False: 0]
  ------------------
  113|   162k|        && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) {
  ------------------
  |  |   26|   162k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (113:12): [True: 0, False: 162k]
  ------------------
  114|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  115|      0|        return 0;
  116|      0|    }
  117|   162k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (117:9): [True: 0, False: 162k]
  ------------------
  118|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|      0|        return 0;
  120|      0|    }
  121|   162k|    if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
  ------------------
  |  |   26|   162k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (121:9): [True: 162k, False: 0]
  ------------------
  122|   162k|        if (group->meth->field_type == NID_X9_62_prime_field)
  ------------------
  |  |  152|   162k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (122:13): [True: 162k, False: 0]
  ------------------
  123|   162k|            return ossl_ec_GFp_simple_oct2point(group, point, buf, len, ctx);
  124|      0|        else
  125|       |#ifdef OPENSSL_NO_EC2M
  126|       |        {
  127|       |            ERR_raise(ERR_LIB_EC, EC_R_GF2M_NOT_SUPPORTED);
  128|       |            return 0;
  129|       |        }
  130|       |#else
  131|      0|            return ossl_ec_GF2m_simple_oct2point(group, point, buf, len, ctx);
  132|   162k|#endif
  133|   162k|    }
  134|      0|    return group->meth->oct2point(group, point, buf, len, ctx);
  135|   162k|}

EC_GFp_mont_method:
   22|    288|{
   23|    288|    static const EC_METHOD ret = {
   24|    288|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|    288|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
   25|    288|        NID_X9_62_prime_field,
  ------------------
  |  |  152|    288|#define NID_X9_62_prime_field           406
  ------------------
   26|    288|        ossl_ec_GFp_mont_group_init,
   27|    288|        ossl_ec_GFp_mont_group_finish,
   28|    288|        ossl_ec_GFp_mont_group_clear_finish,
   29|    288|        ossl_ec_GFp_mont_group_copy,
   30|    288|        ossl_ec_GFp_mont_group_set_curve,
   31|    288|        ossl_ec_GFp_simple_group_get_curve,
   32|    288|        ossl_ec_GFp_simple_group_get_degree,
   33|    288|        ossl_ec_group_simple_order_bits,
   34|    288|        ossl_ec_GFp_simple_group_check_discriminant,
   35|    288|        ossl_ec_GFp_simple_point_init,
   36|    288|        ossl_ec_GFp_simple_point_finish,
   37|    288|        ossl_ec_GFp_simple_point_clear_finish,
   38|    288|        ossl_ec_GFp_simple_point_copy,
   39|    288|        ossl_ec_GFp_simple_point_set_to_infinity,
   40|    288|        ossl_ec_GFp_simple_point_set_affine_coordinates,
   41|    288|        ossl_ec_GFp_simple_point_get_affine_coordinates,
   42|    288|        0, 0, 0,
   43|    288|        ossl_ec_GFp_simple_add,
   44|    288|        ossl_ec_GFp_simple_dbl,
   45|    288|        ossl_ec_GFp_simple_invert,
   46|    288|        ossl_ec_GFp_simple_is_at_infinity,
   47|    288|        ossl_ec_GFp_simple_is_on_curve,
   48|    288|        ossl_ec_GFp_simple_cmp,
   49|    288|        ossl_ec_GFp_simple_make_affine,
   50|    288|        ossl_ec_GFp_simple_points_make_affine,
   51|    288|        0 /* mul */,
   52|    288|        0 /* precompute_mult */,
   53|    288|        0 /* have_precompute_mult */,
   54|    288|        ossl_ec_GFp_mont_field_mul,
   55|    288|        ossl_ec_GFp_mont_field_sqr,
   56|    288|        0 /* field_div */,
   57|    288|        ossl_ec_GFp_mont_field_inv,
   58|    288|        ossl_ec_GFp_mont_field_encode,
   59|    288|        ossl_ec_GFp_mont_field_decode,
   60|    288|        ossl_ec_GFp_mont_field_set_to_one,
   61|    288|        ossl_ec_key_simple_priv2oct,
   62|    288|        ossl_ec_key_simple_oct2priv,
   63|    288|        0, /* set private */
   64|    288|        ossl_ec_key_simple_generate_key,
   65|    288|        ossl_ec_key_simple_check_key,
   66|    288|        ossl_ec_key_simple_generate_public_key,
   67|    288|        0, /* keycopy */
   68|    288|        0, /* keyfinish */
   69|    288|        ossl_ecdh_simple_compute_key,
   70|    288|        ossl_ecdsa_simple_sign_setup,
   71|    288|        ossl_ecdsa_simple_sign_sig,
   72|    288|        ossl_ecdsa_simple_verify_sig,
   73|    288|        0, /* field_inverse_mod_ord */
   74|    288|        ossl_ec_GFp_simple_blind_coordinates,
   75|    288|        ossl_ec_GFp_simple_ladder_pre,
   76|    288|        ossl_ec_GFp_simple_ladder_step,
   77|    288|        ossl_ec_GFp_simple_ladder_post
   78|    288|    };
   79|       |
   80|    288|    return &ret;
   81|    288|}
ossl_ec_GFp_mont_group_init:
   84|  25.7k|{
   85|  25.7k|    int ok;
   86|       |
   87|  25.7k|    ok = ossl_ec_GFp_simple_group_init(group);
   88|  25.7k|    group->field_data1 = NULL;
   89|       |    group->field_data2 = NULL;
   90|  25.7k|    return ok;
   91|  25.7k|}
ossl_ec_GFp_mont_group_finish:
   94|  25.7k|{
   95|  25.7k|    BN_MONT_CTX_free(group->field_data1);
   96|  25.7k|    group->field_data1 = NULL;
   97|  25.7k|    BN_free(group->field_data2);
   98|       |    group->field_data2 = NULL;
   99|  25.7k|    ossl_ec_GFp_simple_group_finish(group);
  100|  25.7k|}
ossl_ec_GFp_mont_group_copy:
  112|  12.8k|{
  113|  12.8k|    BN_MONT_CTX_free(dest->field_data1);
  114|  12.8k|    dest->field_data1 = NULL;
  115|  12.8k|    BN_clear_free(dest->field_data2);
  116|  12.8k|    dest->field_data2 = NULL;
  117|       |
  118|  12.8k|    if (!ossl_ec_GFp_simple_group_copy(dest, src))
  ------------------
  |  Branch (118:9): [True: 0, False: 12.8k]
  ------------------
  119|      0|        return 0;
  120|       |
  121|  12.8k|    if (src->field_data1 != NULL) {
  ------------------
  |  Branch (121:9): [True: 12.8k, False: 0]
  ------------------
  122|  12.8k|        dest->field_data1 = BN_MONT_CTX_new();
  123|  12.8k|        if (dest->field_data1 == NULL)
  ------------------
  |  Branch (123:13): [True: 0, False: 12.8k]
  ------------------
  124|      0|            return 0;
  125|  12.8k|        if (!BN_MONT_CTX_copy(dest->field_data1, src->field_data1))
  ------------------
  |  Branch (125:13): [True: 0, False: 12.8k]
  ------------------
  126|      0|            goto err;
  127|  12.8k|    }
  128|  12.8k|    if (src->field_data2 != NULL) {
  ------------------
  |  Branch (128:9): [True: 12.8k, False: 0]
  ------------------
  129|  12.8k|        dest->field_data2 = BN_dup(src->field_data2);
  130|  12.8k|        if (dest->field_data2 == NULL)
  ------------------
  |  Branch (130:13): [True: 0, False: 12.8k]
  ------------------
  131|      0|            goto err;
  132|  12.8k|    }
  133|       |
  134|  12.8k|    return 1;
  135|       |
  136|      0|err:
  137|      0|    BN_MONT_CTX_free(dest->field_data1);
  138|       |    dest->field_data1 = NULL;
  139|      0|    return 0;
  140|  12.8k|}
ossl_ec_GFp_mont_group_set_curve:
  145|    288|{
  146|    288|    BN_CTX *new_ctx = NULL;
  147|    288|    BN_MONT_CTX *mont = NULL;
  148|    288|    BIGNUM *one = NULL;
  149|    288|    int ret = 0;
  150|       |
  151|    288|    BN_MONT_CTX_free(group->field_data1);
  152|    288|    group->field_data1 = NULL;
  153|    288|    BN_free(group->field_data2);
  154|    288|    group->field_data2 = NULL;
  155|       |
  156|    288|    if (ctx == NULL) {
  ------------------
  |  Branch (156:9): [True: 0, False: 288]
  ------------------
  157|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  158|      0|        if (ctx == NULL)
  ------------------
  |  Branch (158:13): [True: 0, False: 0]
  ------------------
  159|      0|            return 0;
  160|      0|    }
  161|       |
  162|    288|    mont = BN_MONT_CTX_new();
  163|    288|    if (mont == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 288]
  ------------------
  164|      0|        goto err;
  165|    288|    if (!BN_MONT_CTX_set(mont, p, ctx)) {
  ------------------
  |  Branch (165:9): [True: 0, False: 288]
  ------------------
  166|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  167|      0|        goto err;
  168|      0|    }
  169|    288|    one = BN_new();
  170|    288|    if (one == NULL)
  ------------------
  |  Branch (170:9): [True: 0, False: 288]
  ------------------
  171|      0|        goto err;
  172|    288|    if (!BN_to_montgomery(one, BN_value_one(), mont, ctx))
  ------------------
  |  Branch (172:9): [True: 0, False: 288]
  ------------------
  173|      0|        goto err;
  174|       |
  175|    288|    group->field_data1 = mont;
  176|    288|    mont = NULL;
  177|    288|    group->field_data2 = one;
  178|    288|    one = NULL;
  179|       |
  180|    288|    ret = ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx);
  181|       |
  182|    288|    if (!ret) {
  ------------------
  |  Branch (182:9): [True: 0, False: 288]
  ------------------
  183|      0|        BN_MONT_CTX_free(group->field_data1);
  184|      0|        group->field_data1 = NULL;
  185|      0|        BN_free(group->field_data2);
  186|      0|        group->field_data2 = NULL;
  187|      0|    }
  188|       |
  189|    288|err:
  190|    288|    BN_free(one);
  191|    288|    BN_CTX_free(new_ctx);
  192|    288|    BN_MONT_CTX_free(mont);
  193|    288|    return ret;
  194|    288|}
ossl_ec_GFp_mont_field_mul:
  198|   989k|{
  199|   989k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (199:9): [True: 0, False: 989k]
  ------------------
  200|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  201|      0|        return 0;
  202|      0|    }
  203|       |
  204|   989k|    return BN_mod_mul_montgomery(r, a, b, group->field_data1, ctx);
  205|   989k|}
ossl_ec_GFp_mont_field_sqr:
  209|   567k|{
  210|   567k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (210:9): [True: 0, False: 567k]
  ------------------
  211|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  212|      0|        return 0;
  213|      0|    }
  214|       |
  215|   567k|    return BN_mod_mul_montgomery(r, a, a, group->field_data1, ctx);
  216|   567k|}
ossl_ec_GFp_mont_field_inv:
  225|    288|{
  226|    288|    BIGNUM *e = NULL;
  227|    288|    BN_CTX *new_ctx = NULL;
  228|    288|    int ret = 0;
  229|       |
  230|    288|    if (group->field_data1 == NULL)
  ------------------
  |  Branch (230:9): [True: 0, False: 288]
  ------------------
  231|      0|        return 0;
  232|       |
  233|    288|    if (ctx == NULL
  ------------------
  |  Branch (233:9): [True: 0, False: 288]
  ------------------
  234|      0|        && (ctx = new_ctx = BN_CTX_secure_new_ex(group->libctx)) == NULL)
  ------------------
  |  Branch (234:12): [True: 0, False: 0]
  ------------------
  235|      0|        return 0;
  236|       |
  237|    288|    BN_CTX_start(ctx);
  238|    288|    if ((e = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (238:9): [True: 0, False: 288]
  ------------------
  239|      0|        goto err;
  240|       |
  241|       |    /* Inverse in constant time with Fermats Little Theorem */
  242|    288|    if (!BN_set_word(e, 2))
  ------------------
  |  Branch (242:9): [True: 0, False: 288]
  ------------------
  243|      0|        goto err;
  244|    288|    if (!BN_sub(e, group->field, e))
  ------------------
  |  Branch (244:9): [True: 0, False: 288]
  ------------------
  245|      0|        goto err;
  246|       |    /*-
  247|       |     * Exponent e is public.
  248|       |     * No need for scatter-gather or BN_FLG_CONSTTIME.
  249|       |     */
  250|    288|    if (!BN_mod_exp_mont(r, a, e, group->field, ctx, group->field_data1))
  ------------------
  |  Branch (250:9): [True: 0, False: 288]
  ------------------
  251|      0|        goto err;
  252|       |
  253|       |    /* throw an error on zero */
  254|    288|    if (BN_is_zero(r)) {
  ------------------
  |  Branch (254:9): [True: 0, False: 288]
  ------------------
  255|      0|        ERR_raise(ERR_LIB_EC, EC_R_CANNOT_INVERT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  256|      0|        goto err;
  257|      0|    }
  258|       |
  259|    288|    ret = 1;
  260|       |
  261|    288|err:
  262|    288|    BN_CTX_end(ctx);
  263|    288|    BN_CTX_free(new_ctx);
  264|    288|    return ret;
  265|    288|}
ossl_ec_GFp_mont_field_encode:
  269|  77.2k|{
  270|  77.2k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (270:9): [True: 0, False: 77.2k]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        return 0;
  273|      0|    }
  274|       |
  275|  77.2k|    return BN_to_montgomery(r, a, (BN_MONT_CTX *)group->field_data1, ctx);
  276|  77.2k|}
ossl_ec_GFp_mont_field_decode:
  280|  1.15k|{
  281|  1.15k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (281:9): [True: 0, False: 1.15k]
  ------------------
  282|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  283|      0|        return 0;
  284|      0|    }
  285|       |
  286|  1.15k|    return BN_from_montgomery(r, a, group->field_data1, ctx);
  287|  1.15k|}
ossl_ec_GFp_mont_field_set_to_one:
  291|  25.6k|{
  292|  25.6k|    if (group->field_data2 == NULL) {
  ------------------
  |  Branch (292:9): [True: 0, False: 25.6k]
  ------------------
  293|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  294|      0|        return 0;
  295|      0|    }
  296|       |
  297|  25.6k|    if (!BN_copy(r, group->field_data2))
  ------------------
  |  Branch (297:9): [True: 0, False: 25.6k]
  ------------------
  298|      0|        return 0;
  299|  25.6k|    return 1;
  300|  25.6k|}

ossl_ec_GFp_nist_group_copy:
   86|   149k|{
   87|   149k|    dest->field_mod_func = src->field_mod_func;
   88|       |
   89|   149k|    return ossl_ec_GFp_simple_group_copy(dest, src);
   90|   149k|}
ossl_ec_GFp_nist_field_mul:
  130|   299k|{
  131|   299k|    int ret = 0;
  132|   299k|    BN_CTX *ctx_new = NULL;
  133|       |
  134|   299k|    if (!group || !r || !a || !b) {
  ------------------
  |  Branch (134:9): [True: 0, False: 299k]
  |  Branch (134:19): [True: 0, False: 299k]
  |  Branch (134:25): [True: 0, False: 299k]
  |  Branch (134:31): [True: 0, False: 299k]
  ------------------
  135|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  136|      0|        goto err;
  137|      0|    }
  138|   299k|    if (!ctx)
  ------------------
  |  Branch (138:9): [True: 0, False: 299k]
  ------------------
  139|      0|        if ((ctx_new = ctx = BN_CTX_new_ex(group->libctx)) == NULL)
  ------------------
  |  Branch (139:13): [True: 0, False: 0]
  ------------------
  140|      0|            goto err;
  141|       |
  142|   299k|    if (!BN_mul(r, a, b, ctx))
  ------------------
  |  Branch (142:9): [True: 0, False: 299k]
  ------------------
  143|      0|        goto err;
  144|   299k|    if (!group->field_mod_func(r, r, group->field, ctx))
  ------------------
  |  Branch (144:9): [True: 0, False: 299k]
  ------------------
  145|      0|        goto err;
  146|       |
  147|   299k|    ret = 1;
  148|   299k|err:
  149|   299k|    BN_CTX_free(ctx_new);
  150|   299k|    return ret;
  151|   299k|}
ossl_ec_GFp_nist_field_sqr:
  155|   599k|{
  156|   599k|    int ret = 0;
  157|   599k|    BN_CTX *ctx_new = NULL;
  158|       |
  159|   599k|    if (!group || !r || !a) {
  ------------------
  |  Branch (159:9): [True: 0, False: 599k]
  |  Branch (159:19): [True: 0, False: 599k]
  |  Branch (159:25): [True: 0, False: 599k]
  ------------------
  160|      0|        ERR_raise(ERR_LIB_EC, EC_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|        goto err;
  162|      0|    }
  163|   599k|    if (!ctx)
  ------------------
  |  Branch (163:9): [True: 0, False: 599k]
  ------------------
  164|      0|        if ((ctx_new = ctx = BN_CTX_new_ex(group->libctx)) == NULL)
  ------------------
  |  Branch (164:13): [True: 0, False: 0]
  ------------------
  165|      0|            goto err;
  166|       |
  167|   599k|    if (!BN_sqr(r, a, ctx))
  ------------------
  |  Branch (167:9): [True: 0, False: 599k]
  ------------------
  168|      0|        goto err;
  169|   599k|    if (!group->field_mod_func(r, r, group->field, ctx))
  ------------------
  |  Branch (169:9): [True: 0, False: 599k]
  ------------------
  170|      0|        goto err;
  171|       |
  172|   599k|    ret = 1;
  173|   599k|err:
  174|   599k|    BN_CTX_free(ctx_new);
  175|   599k|    return ret;
  176|   599k|}

ossl_ec_GFp_nistp384_method:
 1496|   145k|{
 1497|   145k|    static const EC_METHOD ret = {
 1498|   145k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|   145k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1499|   145k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|   145k|#define NID_X9_62_prime_field           406
  ------------------
 1500|   145k|        ossl_ec_GFp_nistp384_group_init,
 1501|   145k|        ossl_ec_GFp_simple_group_finish,
 1502|   145k|        ossl_ec_GFp_simple_group_clear_finish,
 1503|   145k|        ossl_ec_GFp_nist_group_copy,
 1504|   145k|        ossl_ec_GFp_nistp384_group_set_curve,
 1505|   145k|        ossl_ec_GFp_simple_group_get_curve,
 1506|   145k|        ossl_ec_GFp_simple_group_get_degree,
 1507|   145k|        ossl_ec_group_simple_order_bits,
 1508|   145k|        ossl_ec_GFp_simple_group_check_discriminant,
 1509|   145k|        ossl_ec_GFp_simple_point_init,
 1510|   145k|        ossl_ec_GFp_simple_point_finish,
 1511|   145k|        ossl_ec_GFp_simple_point_clear_finish,
 1512|   145k|        ossl_ec_GFp_simple_point_copy,
 1513|   145k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1514|   145k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1515|   145k|        ossl_ec_GFp_nistp384_point_get_affine_coordinates,
 1516|   145k|        0, /* point_set_compressed_coordinates */
 1517|   145k|        0, /* point2oct */
 1518|   145k|        0, /* oct2point */
 1519|   145k|        ossl_ec_GFp_simple_add,
 1520|   145k|        ossl_ec_GFp_simple_dbl,
 1521|   145k|        ossl_ec_GFp_simple_invert,
 1522|   145k|        ossl_ec_GFp_simple_is_at_infinity,
 1523|   145k|        ossl_ec_GFp_simple_is_on_curve,
 1524|   145k|        ossl_ec_GFp_simple_cmp,
 1525|   145k|        ossl_ec_GFp_simple_make_affine,
 1526|   145k|        ossl_ec_GFp_simple_points_make_affine,
 1527|   145k|        ossl_ec_GFp_nistp384_points_mul,
 1528|   145k|        ossl_ec_GFp_nistp384_precompute_mult,
 1529|   145k|        ossl_ec_GFp_nistp384_have_precompute_mult,
 1530|   145k|        ossl_ec_GFp_nist_field_mul,
 1531|   145k|        ossl_ec_GFp_nist_field_sqr,
 1532|   145k|        0, /* field_div */
 1533|   145k|        ossl_ec_GFp_simple_field_inv,
 1534|   145k|        0, /* field_encode */
 1535|   145k|        0, /* field_decode */
 1536|   145k|        0, /* field_set_to_one */
 1537|   145k|        ossl_ec_key_simple_priv2oct,
 1538|   145k|        ossl_ec_key_simple_oct2priv,
 1539|   145k|        0, /* set private */
 1540|   145k|        ossl_ec_key_simple_generate_key,
 1541|   145k|        ossl_ec_key_simple_check_key,
 1542|   145k|        ossl_ec_key_simple_generate_public_key,
 1543|   145k|        0, /* keycopy */
 1544|   145k|        0, /* keyfinish */
 1545|   145k|        ossl_ecdh_simple_compute_key,
 1546|   145k|        ossl_ecdsa_simple_sign_setup,
 1547|   145k|        ossl_ecdsa_simple_sign_sig,
 1548|   145k|        ossl_ecdsa_simple_verify_sig,
 1549|   145k|        0, /* field_inverse_mod_ord */
 1550|   145k|        0, /* blind_coordinates */
 1551|   145k|        0, /* ladder_pre */
 1552|   145k|        0, /* ladder_step */
 1553|   145k|        0 /* ladder_post */
 1554|   145k|    };
 1555|       |
 1556|   145k|    return &ret;
 1557|   145k|}
ossl_ec_GFp_nistp384_group_init:
 1610|   291k|{
 1611|   291k|    int ret;
 1612|       |
 1613|   291k|    ret = ossl_ec_GFp_simple_group_init(group);
 1614|   291k|    group->a_is_minus3 = 1;
 1615|   291k|    return ret;
 1616|   291k|}
ossl_ec_GFp_nistp384_group_set_curve:
 1621|   145k|{
 1622|   145k|    int ret = 0;
 1623|   145k|    BIGNUM *curve_p, *curve_a, *curve_b;
 1624|   145k|#ifndef FIPS_MODULE
 1625|   145k|    BN_CTX *new_ctx = NULL;
 1626|       |
 1627|   145k|    if (ctx == NULL)
  ------------------
  |  Branch (1627:9): [True: 0, False: 145k]
  ------------------
 1628|      0|        ctx = new_ctx = BN_CTX_new();
 1629|   145k|#endif
 1630|   145k|    if (ctx == NULL)
  ------------------
  |  Branch (1630:9): [True: 0, False: 145k]
  ------------------
 1631|      0|        return 0;
 1632|       |
 1633|   145k|    BN_CTX_start(ctx);
 1634|   145k|    curve_p = BN_CTX_get(ctx);
 1635|   145k|    curve_a = BN_CTX_get(ctx);
 1636|   145k|    curve_b = BN_CTX_get(ctx);
 1637|   145k|    if (curve_b == NULL)
  ------------------
  |  Branch (1637:9): [True: 0, False: 145k]
  ------------------
 1638|      0|        goto err;
 1639|   145k|    BN_bin2bn(nistp384_curve_params[0], sizeof(felem_bytearray), curve_p);
 1640|   145k|    BN_bin2bn(nistp384_curve_params[1], sizeof(felem_bytearray), curve_a);
 1641|   145k|    BN_bin2bn(nistp384_curve_params[2], sizeof(felem_bytearray), curve_b);
 1642|   145k|    if ((BN_cmp(curve_p, p)) || (BN_cmp(curve_a, a)) || (BN_cmp(curve_b, b))) {
  ------------------
  |  Branch (1642:9): [True: 0, False: 145k]
  |  Branch (1642:33): [True: 0, False: 145k]
  |  Branch (1642:57): [True: 0, False: 145k]
  ------------------
 1643|      0|        ERR_raise(ERR_LIB_EC, EC_R_WRONG_CURVE_PARAMETERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1644|      0|        goto err;
 1645|      0|    }
 1646|   145k|    group->field_mod_func = BN_nist_mod_384;
 1647|   145k|    ret = ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx);
 1648|   145k|err:
 1649|   145k|    BN_CTX_end(ctx);
 1650|   145k|#ifndef FIPS_MODULE
 1651|   145k|    BN_CTX_free(new_ctx);
 1652|   145k|#endif
 1653|   145k|    return ret;
 1654|   145k|}
ossl_ec_GFp_nistp384_point_get_affine_coordinates:
 1664|     16|{
 1665|     16|    felem z1, z2, x_in, y_in, x_out, y_out;
 1666|     16|    widefelem tmp;
 1667|       |
 1668|     16|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (1668:9): [True: 0, False: 16]
  ------------------
 1669|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1670|      0|        return 0;
 1671|      0|    }
 1672|     16|    if ((!BN_to_felem(x_in, point->X)) || (!BN_to_felem(y_in, point->Y)) || (!BN_to_felem(z1, point->Z)))
  ------------------
  |  Branch (1672:9): [True: 0, False: 16]
  |  Branch (1672:43): [True: 0, False: 16]
  |  Branch (1672:77): [True: 0, False: 16]
  ------------------
 1673|      0|        return 0;
 1674|     16|    felem_inv(z2, z1);
 1675|     16|    felem_square(tmp, z2);
  ------------------
  |  |  767|     16|#define felem_square felem_square_ref
  ------------------
 1676|     16|    felem_reduce(z1, tmp);
  ------------------
  |  |  769|     16|#define felem_reduce felem_reduce_ref
  ------------------
 1677|     16|    felem_mul(tmp, x_in, z1);
  ------------------
  |  |  768|     16|#define felem_mul felem_mul_ref
  ------------------
 1678|     16|    felem_reduce(x_in, tmp);
  ------------------
  |  |  769|     16|#define felem_reduce felem_reduce_ref
  ------------------
 1679|     16|    felem_contract(x_out, x_in);
 1680|     16|    if (x != NULL) {
  ------------------
  |  Branch (1680:9): [True: 16, False: 0]
  ------------------
 1681|     16|        if (!felem_to_BN(x, x_out)) {
  ------------------
  |  Branch (1681:13): [True: 0, False: 16]
  ------------------
 1682|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1683|      0|            return 0;
 1684|      0|        }
 1685|     16|    }
 1686|     16|    felem_mul(tmp, z1, z2);
  ------------------
  |  |  768|     16|#define felem_mul felem_mul_ref
  ------------------
 1687|     16|    felem_reduce(z1, tmp);
  ------------------
  |  |  769|     16|#define felem_reduce felem_reduce_ref
  ------------------
 1688|     16|    felem_mul(tmp, y_in, z1);
  ------------------
  |  |  768|     16|#define felem_mul felem_mul_ref
  ------------------
 1689|     16|    felem_reduce(y_in, tmp);
  ------------------
  |  |  769|     16|#define felem_reduce felem_reduce_ref
  ------------------
 1690|     16|    felem_contract(y_out, y_in);
 1691|     16|    if (y != NULL) {
  ------------------
  |  Branch (1691:9): [True: 16, False: 0]
  ------------------
 1692|     16|        if (!felem_to_BN(y, y_out)) {
  ------------------
  |  Branch (1692:13): [True: 0, False: 16]
  ------------------
 1693|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1694|      0|            return 0;
 1695|      0|        }
 1696|     16|    }
 1697|     16|    return 1;
 1698|     16|}
ossl_ec_GFp_nistp384_points_mul:
 1734|     16|{
 1735|     16|    int ret = 0;
 1736|     16|    int j;
 1737|     16|    int mixed = 0;
 1738|     16|    BIGNUM *x, *y, *z, *tmp_scalar;
 1739|     16|    felem_bytearray g_secret;
 1740|     16|    felem_bytearray *secrets = NULL;
 1741|     16|    felem(*pre_comp)[17][3] = NULL;
 1742|     16|    felem *tmp_felems = NULL;
 1743|     16|    unsigned int i;
 1744|     16|    int num_bytes;
 1745|     16|    int have_pre_comp = 0;
 1746|     16|    size_t num_points = num;
 1747|     16|    felem x_in, y_in, z_in, x_out, y_out, z_out;
 1748|     16|    NISTP384_PRE_COMP *pre = NULL;
 1749|     16|    felem(*g_pre_comp)[3] = NULL;
 1750|     16|    EC_POINT *generator = NULL;
 1751|     16|    const EC_POINT *p = NULL;
 1752|     16|    const BIGNUM *p_scalar = NULL;
 1753|       |
 1754|     16|    BN_CTX_start(ctx);
 1755|     16|    x = BN_CTX_get(ctx);
 1756|     16|    y = BN_CTX_get(ctx);
 1757|     16|    z = BN_CTX_get(ctx);
 1758|     16|    tmp_scalar = BN_CTX_get(ctx);
 1759|     16|    if (tmp_scalar == NULL)
  ------------------
  |  Branch (1759:9): [True: 0, False: 16]
  ------------------
 1760|      0|        goto err;
 1761|       |
 1762|     16|    if (scalar != NULL) {
  ------------------
  |  Branch (1762:9): [True: 16, False: 0]
  ------------------
 1763|     16|        pre = group->pre_comp.nistp384;
 1764|     16|        if (pre)
  ------------------
  |  Branch (1764:13): [True: 0, False: 16]
  ------------------
 1765|       |            /* we have precomputation, try to use it */
 1766|      0|            g_pre_comp = &pre->g_pre_comp[0];
 1767|     16|        else
 1768|       |            /* try to use the standard precomputation */
 1769|     16|            g_pre_comp = (felem(*)[3])gmul;
 1770|     16|        generator = EC_POINT_new(group);
 1771|     16|        if (generator == NULL)
  ------------------
  |  Branch (1771:13): [True: 0, False: 16]
  ------------------
 1772|      0|            goto err;
 1773|       |        /* get the generator from precomputation */
 1774|     16|        if (!felem_to_BN(x, g_pre_comp[1][0]) || !felem_to_BN(y, g_pre_comp[1][1]) || !felem_to_BN(z, g_pre_comp[1][2])) {
  ------------------
  |  Branch (1774:13): [True: 0, False: 16]
  |  Branch (1774:50): [True: 0, False: 16]
  |  Branch (1774:87): [True: 0, False: 16]
  ------------------
 1775|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1776|      0|            goto err;
 1777|      0|        }
 1778|     16|        if (!ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group,
  ------------------
  |  Branch (1778:13): [True: 0, False: 16]
  ------------------
 1779|     16|                generator,
 1780|     16|                x, y, z, ctx))
 1781|      0|            goto err;
 1782|     16|        if (0 == EC_POINT_cmp(group, generator, group->generator, ctx))
  ------------------
  |  Branch (1782:13): [True: 16, False: 0]
  ------------------
 1783|       |            /* precomputation matches generator */
 1784|     16|            have_pre_comp = 1;
 1785|      0|        else
 1786|       |            /*
 1787|       |             * we don't have valid precomputation: treat the generator as a
 1788|       |             * random point
 1789|       |             */
 1790|      0|            num_points++;
 1791|     16|    }
 1792|       |
 1793|     16|    if (num_points > 0) {
  ------------------
  |  Branch (1793:9): [True: 0, False: 16]
  ------------------
 1794|      0|        if (num_points >= 2) {
  ------------------
  |  Branch (1794:13): [True: 0, False: 0]
  ------------------
 1795|       |            /*
 1796|       |             * unless we precompute multiples for just one point, converting
 1797|       |             * those into affine form is time well spent
 1798|       |             */
 1799|      0|            mixed = 1;
 1800|      0|        }
 1801|      0|        secrets = OPENSSL_calloc(num_points, sizeof(*secrets));
  ------------------
  |  |  113|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1802|      0|        pre_comp = OPENSSL_calloc(num_points, sizeof(*pre_comp));
  ------------------
  |  |  113|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1803|      0|        if (mixed)
  ------------------
  |  Branch (1803:13): [True: 0, False: 0]
  ------------------
 1804|      0|            tmp_felems = OPENSSL_malloc_array(num_points * 17 + 1, sizeof(*tmp_felems));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1805|      0|        if ((secrets == NULL) || (pre_comp == NULL)
  ------------------
  |  Branch (1805:13): [True: 0, False: 0]
  |  Branch (1805:34): [True: 0, False: 0]
  ------------------
 1806|      0|            || (mixed && (tmp_felems == NULL)))
  ------------------
  |  Branch (1806:17): [True: 0, False: 0]
  |  Branch (1806:26): [True: 0, False: 0]
  ------------------
 1807|      0|            goto err;
 1808|       |
 1809|       |        /*
 1810|       |         * we treat NULL scalars as 0, and NULL points as points at infinity,
 1811|       |         * i.e., they contribute nothing to the linear combination
 1812|       |         */
 1813|      0|        for (i = 0; i < num_points; ++i) {
  ------------------
  |  Branch (1813:21): [True: 0, False: 0]
  ------------------
 1814|      0|            if (i == num) {
  ------------------
  |  Branch (1814:17): [True: 0, False: 0]
  ------------------
 1815|       |                /*
 1816|       |                 * we didn't have a valid precomputation, so we pick the
 1817|       |                 * generator
 1818|       |                 */
 1819|      0|                p = EC_GROUP_get0_generator(group);
 1820|      0|                p_scalar = scalar;
 1821|      0|            } else {
 1822|       |                /* the i^th point */
 1823|      0|                p = points[i];
 1824|      0|                p_scalar = scalars[i];
 1825|      0|            }
 1826|      0|            if (p_scalar != NULL && p != NULL) {
  ------------------
  |  Branch (1826:17): [True: 0, False: 0]
  |  Branch (1826:37): [True: 0, False: 0]
  ------------------
 1827|       |                /* reduce scalar to 0 <= scalar < 2^384 */
 1828|      0|                if ((BN_num_bits(p_scalar) > 384)
  ------------------
  |  Branch (1828:21): [True: 0, False: 0]
  ------------------
 1829|      0|                    || (BN_is_negative(p_scalar))) {
  ------------------
  |  Branch (1829:24): [True: 0, False: 0]
  ------------------
 1830|       |                    /*
 1831|       |                     * this is an unusual input, and we don't guarantee
 1832|       |                     * constant-timeness
 1833|       |                     */
 1834|      0|                    if (!BN_nnmod(tmp_scalar, p_scalar, group->order, ctx)) {
  ------------------
  |  Branch (1834:25): [True: 0, False: 0]
  ------------------
 1835|      0|                        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1836|      0|                        goto err;
 1837|      0|                    }
 1838|      0|                    num_bytes = BN_bn2lebinpad(tmp_scalar,
 1839|      0|                        secrets[i], sizeof(secrets[i]));
 1840|      0|                } else {
 1841|      0|                    num_bytes = BN_bn2lebinpad(p_scalar,
 1842|      0|                        secrets[i], sizeof(secrets[i]));
 1843|      0|                }
 1844|      0|                if (num_bytes < 0) {
  ------------------
  |  Branch (1844:21): [True: 0, False: 0]
  ------------------
 1845|      0|                    ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1846|      0|                    goto err;
 1847|      0|                }
 1848|       |                /* precompute multiples */
 1849|      0|                if ((!BN_to_felem(x_out, p->X)) || (!BN_to_felem(y_out, p->Y)) || (!BN_to_felem(z_out, p->Z)))
  ------------------
  |  Branch (1849:21): [True: 0, False: 0]
  |  Branch (1849:52): [True: 0, False: 0]
  |  Branch (1849:83): [True: 0, False: 0]
  ------------------
 1850|      0|                    goto err;
 1851|      0|                memcpy(pre_comp[i][1][0], x_out, sizeof(felem));
 1852|      0|                memcpy(pre_comp[i][1][1], y_out, sizeof(felem));
 1853|      0|                memcpy(pre_comp[i][1][2], z_out, sizeof(felem));
 1854|      0|                for (j = 2; j <= 16; ++j) {
  ------------------
  |  Branch (1854:29): [True: 0, False: 0]
  ------------------
 1855|      0|                    if (j & 1) {
  ------------------
  |  Branch (1855:25): [True: 0, False: 0]
  ------------------
 1856|      0|                        point_add(pre_comp[i][j][0], pre_comp[i][j][1], pre_comp[i][j][2],
 1857|      0|                            pre_comp[i][1][0], pre_comp[i][1][1], pre_comp[i][1][2], 0,
 1858|      0|                            pre_comp[i][j - 1][0], pre_comp[i][j - 1][1], pre_comp[i][j - 1][2]);
 1859|      0|                    } else {
 1860|      0|                        point_double(pre_comp[i][j][0], pre_comp[i][j][1], pre_comp[i][j][2],
 1861|      0|                            pre_comp[i][j / 2][0], pre_comp[i][j / 2][1], pre_comp[i][j / 2][2]);
 1862|      0|                    }
 1863|      0|                }
 1864|      0|            }
 1865|      0|        }
 1866|      0|        if (mixed)
  ------------------
  |  Branch (1866:13): [True: 0, False: 0]
  ------------------
 1867|      0|            make_points_affine(num_points * 17, pre_comp[0], tmp_felems);
 1868|      0|    }
 1869|       |
 1870|       |    /* the scalar for the generator */
 1871|     16|    if (scalar != NULL && have_pre_comp) {
  ------------------
  |  Branch (1871:9): [True: 16, False: 0]
  |  Branch (1871:27): [True: 16, False: 0]
  ------------------
 1872|     16|        memset(g_secret, 0, sizeof(g_secret));
 1873|       |        /* reduce scalar to 0 <= scalar < 2^384 */
 1874|     16|        if ((BN_num_bits(scalar) > 384) || (BN_is_negative(scalar))) {
  ------------------
  |  Branch (1874:13): [True: 0, False: 16]
  |  Branch (1874:44): [True: 0, False: 16]
  ------------------
 1875|       |            /*
 1876|       |             * this is an unusual input, and we don't guarantee
 1877|       |             * constant-timeness
 1878|       |             */
 1879|      0|            if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
  ------------------
  |  Branch (1879:17): [True: 0, False: 0]
  ------------------
 1880|      0|                ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1881|      0|                goto err;
 1882|      0|            }
 1883|      0|            num_bytes = BN_bn2lebinpad(tmp_scalar, g_secret, sizeof(g_secret));
 1884|     16|        } else {
 1885|     16|            num_bytes = BN_bn2lebinpad(scalar, g_secret, sizeof(g_secret));
 1886|     16|        }
 1887|       |        /* do the multiplication with generator precomputation */
 1888|     16|        batch_mul(x_out, y_out, z_out,
 1889|     16|            (const felem_bytearray(*))secrets, num_points,
 1890|     16|            g_secret,
 1891|     16|            mixed, (const felem(*)[17][3])pre_comp,
 1892|     16|            (const felem(*)[3])g_pre_comp);
 1893|     16|    } else {
 1894|       |        /* do the multiplication without generator precomputation */
 1895|      0|        batch_mul(x_out, y_out, z_out,
 1896|      0|            (const felem_bytearray(*))secrets, num_points,
 1897|      0|            NULL, mixed, (const felem(*)[17][3])pre_comp, NULL);
 1898|      0|    }
 1899|       |    /* reduce the output to its unique minimal representation */
 1900|     16|    felem_contract(x_in, x_out);
 1901|     16|    felem_contract(y_in, y_out);
 1902|     16|    felem_contract(z_in, z_out);
 1903|     16|    if ((!felem_to_BN(x, x_in)) || (!felem_to_BN(y, y_in)) || (!felem_to_BN(z, z_in))) {
  ------------------
  |  Branch (1903:9): [True: 0, False: 16]
  |  Branch (1903:36): [True: 0, False: 16]
  |  Branch (1903:63): [True: 0, False: 16]
  ------------------
 1904|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1905|      0|        goto err;
 1906|      0|    }
 1907|     16|    ret = ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group, r, x, y, z,
 1908|     16|        ctx);
 1909|       |
 1910|     16|err:
 1911|     16|    BN_CTX_end(ctx);
 1912|     16|    EC_POINT_free(generator);
 1913|     16|    OPENSSL_free(secrets);
  ------------------
  |  |  132|     16|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1914|     16|    OPENSSL_free(pre_comp);
  ------------------
  |  |  132|     16|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1915|     16|    OPENSSL_free(tmp_felems);
  ------------------
  |  |  132|     16|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1916|     16|    return ret;
 1917|     16|}
ecp_nistp384.c:BN_to_felem:
  142|     48|{
  143|     48|    felem_bytearray b_out;
  144|     48|    int num_bytes;
  145|       |
  146|     48|    if (BN_is_negative(bn)) {
  ------------------
  |  Branch (146:9): [True: 0, False: 48]
  ------------------
  147|      0|        ERR_raise(ERR_LIB_EC, EC_R_BIGNUM_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  148|      0|        return 0;
  149|      0|    }
  150|     48|    num_bytes = BN_bn2lebinpad(bn, b_out, sizeof(b_out));
  151|     48|    if (num_bytes < 0) {
  ------------------
  |  Branch (151:9): [True: 0, False: 48]
  ------------------
  152|      0|        ERR_raise(ERR_LIB_EC, EC_R_BIGNUM_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  153|      0|        return 0;
  154|      0|    }
  155|     48|    bin48_to_felem(out, b_out);
  156|     48|    return 1;
  157|     48|}
ecp_nistp384.c:bin48_to_felem:
  117|     48|{
  118|     48|    memset(out, 0, 56);
  119|     48|    out[0] = (*((limb *)&in[0])) & bottom56bits;
  120|     48|    out[1] = (*((limb_aX *)&in[7])) & bottom56bits;
  121|     48|    out[2] = (*((limb_aX *)&in[14])) & bottom56bits;
  122|     48|    out[3] = (*((limb_aX *)&in[21])) & bottom56bits;
  123|     48|    out[4] = (*((limb_aX *)&in[28])) & bottom56bits;
  124|     48|    out[5] = (*((limb_aX *)&in[35])) & bottom56bits;
  125|     48|    memmove(&out[6], &in[42], 6);
  126|     48|}
ecp_nistp384.c:felem_inv:
  784|     16|{
  785|     16|    felem ftmp, ftmp2, ftmp3, ftmp4, ftmp5, ftmp6;
  786|     16|    unsigned int i = 0;
  787|       |
  788|     16|    felem_square_reduce(ftmp, in); /* 2^1 */
  ------------------
  |  |  771|     16|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  789|     16|    felem_mul_reduce(ftmp, ftmp, in); /* 2^1 + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  790|     16|    felem_assign(ftmp2, ftmp);
  791|       |
  792|     16|    felem_square_reduce(ftmp, ftmp); /* 2^2 + 2^1 */
  ------------------
  |  |  771|     16|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  793|     16|    felem_mul_reduce(ftmp, ftmp, in); /* 2^2 + 2^1 * 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  794|     16|    felem_assign(ftmp3, ftmp);
  795|       |
  796|     64|    for (i = 0; i < 3; i++)
  ------------------
  |  Branch (796:17): [True: 48, False: 16]
  ------------------
  797|     48|        felem_square_reduce(ftmp, ftmp); /* 2^5 + 2^4 + 2^3 */
  ------------------
  |  |  771|     48|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  798|     16|    felem_mul_reduce(ftmp, ftmp3, ftmp); /* 2^5 + 2^4 + 2^3 + 2^2 + 2^1 + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  799|     16|    felem_assign(ftmp4, ftmp);
  800|       |
  801|    112|    for (i = 0; i < 6; i++)
  ------------------
  |  Branch (801:17): [True: 96, False: 16]
  ------------------
  802|     96|        felem_square_reduce(ftmp, ftmp); /* 2^11 + ... + 2^6 */
  ------------------
  |  |  771|     96|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  803|     16|    felem_mul_reduce(ftmp, ftmp4, ftmp); /* 2^11 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  804|       |
  805|     64|    for (i = 0; i < 3; i++)
  ------------------
  |  Branch (805:17): [True: 48, False: 16]
  ------------------
  806|     48|        felem_square_reduce(ftmp, ftmp); /* 2^14 + ... + 2^3 */
  ------------------
  |  |  771|     48|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  807|     16|    felem_mul_reduce(ftmp, ftmp3, ftmp); /* 2^14 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  808|     16|    felem_assign(ftmp5, ftmp);
  809|       |
  810|    256|    for (i = 0; i < 15; i++)
  ------------------
  |  Branch (810:17): [True: 240, False: 16]
  ------------------
  811|    240|        felem_square_reduce(ftmp, ftmp); /* 2^29 + ... + 2^15 */
  ------------------
  |  |  771|    240|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  812|     16|    felem_mul_reduce(ftmp, ftmp5, ftmp); /* 2^29 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  813|     16|    felem_assign(ftmp6, ftmp);
  814|       |
  815|    496|    for (i = 0; i < 30; i++)
  ------------------
  |  Branch (815:17): [True: 480, False: 16]
  ------------------
  816|    480|        felem_square_reduce(ftmp, ftmp); /* 2^59 + ... + 2^30 */
  ------------------
  |  |  771|    480|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  817|     16|    felem_mul_reduce(ftmp, ftmp6, ftmp); /* 2^59 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  818|     16|    felem_assign(ftmp4, ftmp);
  819|       |
  820|    976|    for (i = 0; i < 60; i++)
  ------------------
  |  Branch (820:17): [True: 960, False: 16]
  ------------------
  821|    960|        felem_square_reduce(ftmp, ftmp); /* 2^119 + ... + 2^60 */
  ------------------
  |  |  771|    960|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  822|     16|    felem_mul_reduce(ftmp, ftmp4, ftmp); /* 2^119 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  823|     16|    felem_assign(ftmp4, ftmp);
  824|       |
  825|  1.93k|    for (i = 0; i < 120; i++)
  ------------------
  |  Branch (825:17): [True: 1.92k, False: 16]
  ------------------
  826|  1.92k|        felem_square_reduce(ftmp, ftmp); /* 2^239 + ... + 2^120 */
  ------------------
  |  |  771|  1.92k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  827|     16|    felem_mul_reduce(ftmp, ftmp4, ftmp); /* 2^239 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  828|       |
  829|    256|    for (i = 0; i < 15; i++)
  ------------------
  |  Branch (829:17): [True: 240, False: 16]
  ------------------
  830|    240|        felem_square_reduce(ftmp, ftmp); /* 2^254 + ... + 2^15 */
  ------------------
  |  |  771|    240|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  831|     16|    felem_mul_reduce(ftmp, ftmp5, ftmp); /* 2^254 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  832|       |
  833|    512|    for (i = 0; i < 31; i++)
  ------------------
  |  Branch (833:17): [True: 496, False: 16]
  ------------------
  834|    496|        felem_square_reduce(ftmp, ftmp); /* 2^285 + ... + 2^31 */
  ------------------
  |  |  771|    496|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  835|     16|    felem_mul_reduce(ftmp, ftmp6, ftmp); /* 2^285 + ... + 2^31 + 2^29 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  836|       |
  837|     48|    for (i = 0; i < 2; i++)
  ------------------
  |  Branch (837:17): [True: 32, False: 16]
  ------------------
  838|     32|        felem_square_reduce(ftmp, ftmp); /* 2^287 + ... + 2^33 + 2^31 + ... + 2^2 */
  ------------------
  |  |  771|     32|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  839|     16|    felem_mul_reduce(ftmp, ftmp2, ftmp); /* 2^287 + ... + 2^33 + 2^31 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  840|       |
  841|  1.52k|    for (i = 0; i < 94; i++)
  ------------------
  |  Branch (841:17): [True: 1.50k, False: 16]
  ------------------
  842|  1.50k|        felem_square_reduce(ftmp, ftmp); /* 2^381 + ... + 2^127 + 2^125 + ... + 2^94 */
  ------------------
  |  |  771|  1.50k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  843|     16|    felem_mul_reduce(ftmp, ftmp6, ftmp); /* 2^381 + ... + 2^127 + 2^125 + ... + 2^94 + 2^29 + ... + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  844|       |
  845|     48|    for (i = 0; i < 2; i++)
  ------------------
  |  Branch (845:17): [True: 32, False: 16]
  ------------------
  846|     32|        felem_square_reduce(ftmp, ftmp); /* 2^383 + ... + 2^129 + 2^127 + ... + 2^96 + 2^31 + ... + 2^2 */
  ------------------
  |  |  771|     32|#define felem_square_reduce felem_square_reduce_ref
  ------------------
  847|     16|    felem_mul_reduce(ftmp, in, ftmp); /* 2^383 + ... + 2^129 + 2^127 + ... + 2^96 + 2^31 + ... + 2^2 + 2^0 */
  ------------------
  |  |  772|     16|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
  848|       |
  849|     16|    memcpy(out, ftmp, sizeof(felem));
  850|     16|}
ecp_nistp384.c:felem_square_reduce_ref:
  688|  12.4k|{
  689|  12.4k|    widefelem tmp;
  690|       |
  691|  12.4k|    felem_square_ref(tmp, in);
  692|  12.4k|    felem_reduce_ref(out, tmp);
  693|  12.4k|}
ecp_nistp384.c:felem_mul_reduce_ref:
  696|  9.63k|{
  697|  9.63k|    widefelem tmp;
  698|       |
  699|  9.63k|    felem_mul_ref(tmp, in1, in2);
  700|  9.63k|    felem_reduce_ref(out, tmp);
  701|  9.63k|}
ecp_nistp384.c:felem_assign:
  180|  17.4k|{
  181|  17.4k|    memcpy(out, in, sizeof(felem));
  182|  17.4k|}
ecp_nistp384.c:felem_square_ref:
  385|  18.6k|{
  386|  18.6k|    felem inx2;
  387|  18.6k|    felem_scalar(inx2, in, 2);
  388|       |
  389|  18.6k|    out[0] = ((uint128_t)in[0]) * in[0];
  390|       |
  391|  18.6k|    out[1] = ((uint128_t)in[0]) * inx2[1];
  392|       |
  393|  18.6k|    out[2] = ((uint128_t)in[0]) * inx2[2]
  394|  18.6k|        + ((uint128_t)in[1]) * in[1];
  395|       |
  396|  18.6k|    out[3] = ((uint128_t)in[0]) * inx2[3]
  397|  18.6k|        + ((uint128_t)in[1]) * inx2[2];
  398|       |
  399|  18.6k|    out[4] = ((uint128_t)in[0]) * inx2[4]
  400|  18.6k|        + ((uint128_t)in[1]) * inx2[3]
  401|  18.6k|        + ((uint128_t)in[2]) * in[2];
  402|       |
  403|  18.6k|    out[5] = ((uint128_t)in[0]) * inx2[5]
  404|  18.6k|        + ((uint128_t)in[1]) * inx2[4]
  405|  18.6k|        + ((uint128_t)in[2]) * inx2[3];
  406|       |
  407|  18.6k|    out[6] = ((uint128_t)in[0]) * inx2[6]
  408|  18.6k|        + ((uint128_t)in[1]) * inx2[5]
  409|  18.6k|        + ((uint128_t)in[2]) * inx2[4]
  410|  18.6k|        + ((uint128_t)in[3]) * in[3];
  411|       |
  412|  18.6k|    out[7] = ((uint128_t)in[1]) * inx2[6]
  413|  18.6k|        + ((uint128_t)in[2]) * inx2[5]
  414|  18.6k|        + ((uint128_t)in[3]) * inx2[4];
  415|       |
  416|  18.6k|    out[8] = ((uint128_t)in[2]) * inx2[6]
  417|  18.6k|        + ((uint128_t)in[3]) * inx2[5]
  418|  18.6k|        + ((uint128_t)in[4]) * in[4];
  419|       |
  420|  18.6k|    out[9] = ((uint128_t)in[3]) * inx2[6]
  421|  18.6k|        + ((uint128_t)in[4]) * inx2[5];
  422|       |
  423|  18.6k|    out[10] = ((uint128_t)in[4]) * inx2[6]
  424|  18.6k|        + ((uint128_t)in[5]) * in[5];
  425|       |
  426|  18.6k|    out[11] = ((uint128_t)in[5]) * inx2[6];
  427|       |
  428|  18.6k|    out[12] = ((uint128_t)in[6]) * in[6];
  429|  18.6k|}
ecp_nistp384.c:felem_scalar:
  195|  20.2k|{
  196|  20.2k|    unsigned int i;
  197|       |
  198|   162k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|   162k|#define NLIMBS 7
  ------------------
  |  Branch (198:17): [True: 141k, False: 20.2k]
  ------------------
  199|   141k|        out[i] = in[i] * scalar;
  200|  20.2k|}
ecp_nistp384.c:felem_reduce_ref:
  518|  33.0k|{
  519|       |    /*
  520|       |     * In order to prevent underflow, we add a multiple of p before subtracting.
  521|       |     * Use telescopic sums to represent 2^76 * p redundantly with each limb
  522|       |     * of the form 2^124 + ...
  523|       |     */
  524|  33.0k|    static const widelimb two124m68 = (((widelimb)1) << 124)
  525|  33.0k|        - (((widelimb)1) << 68);
  526|  33.0k|    static const widelimb two124m116m68 = (((widelimb)1) << 124)
  527|  33.0k|        - (((widelimb)1) << 116)
  528|  33.0k|        - (((widelimb)1) << 68);
  529|  33.0k|    static const widelimb two124p108m76 = (((widelimb)1) << 124)
  530|  33.0k|        + (((widelimb)1) << 108)
  531|  33.0k|        - (((widelimb)1) << 76);
  532|  33.0k|    static const widelimb two124m92m68 = (((widelimb)1) << 124)
  533|  33.0k|        - (((widelimb)1) << 92)
  534|  33.0k|        - (((widelimb)1) << 68);
  535|  33.0k|    widelimb temp, acc[9];
  536|  33.0k|    unsigned int i;
  537|       |
  538|  33.0k|    memcpy(acc, in, sizeof(widelimb) * 9);
  539|       |
  540|  33.0k|    acc[0] += two124p108m76;
  541|  33.0k|    acc[1] += two124m116m68;
  542|  33.0k|    acc[2] += two124m92m68;
  543|  33.0k|    acc[3] += two124m68;
  544|  33.0k|    acc[4] += two124m68;
  545|  33.0k|    acc[5] += two124m68;
  546|  33.0k|    acc[6] += two124m68;
  547|       |
  548|       |    /* [1]: Eliminate in[9], ..., in[12] */
  549|  33.0k|    acc[8] += in[12] >> 32;
  550|  33.0k|    acc[7] += (in[12] & 0xffffffff) << 24;
  551|  33.0k|    acc[7] += in[12] >> 8;
  552|  33.0k|    acc[6] += (in[12] & 0xff) << 48;
  553|  33.0k|    acc[6] -= in[12] >> 16;
  554|  33.0k|    acc[5] -= (in[12] & 0xffff) << 40;
  555|  33.0k|    acc[6] += in[12] >> 48;
  556|  33.0k|    acc[5] += (in[12] & 0xffffffffffff) << 8;
  557|       |
  558|  33.0k|    acc[7] += in[11] >> 32;
  559|  33.0k|    acc[6] += (in[11] & 0xffffffff) << 24;
  560|  33.0k|    acc[6] += in[11] >> 8;
  561|  33.0k|    acc[5] += (in[11] & 0xff) << 48;
  562|  33.0k|    acc[5] -= in[11] >> 16;
  563|  33.0k|    acc[4] -= (in[11] & 0xffff) << 40;
  564|  33.0k|    acc[5] += in[11] >> 48;
  565|  33.0k|    acc[4] += (in[11] & 0xffffffffffff) << 8;
  566|       |
  567|  33.0k|    acc[6] += in[10] >> 32;
  568|  33.0k|    acc[5] += (in[10] & 0xffffffff) << 24;
  569|  33.0k|    acc[5] += in[10] >> 8;
  570|  33.0k|    acc[4] += (in[10] & 0xff) << 48;
  571|  33.0k|    acc[4] -= in[10] >> 16;
  572|  33.0k|    acc[3] -= (in[10] & 0xffff) << 40;
  573|  33.0k|    acc[4] += in[10] >> 48;
  574|  33.0k|    acc[3] += (in[10] & 0xffffffffffff) << 8;
  575|       |
  576|  33.0k|    acc[5] += in[9] >> 32;
  577|  33.0k|    acc[4] += (in[9] & 0xffffffff) << 24;
  578|  33.0k|    acc[4] += in[9] >> 8;
  579|  33.0k|    acc[3] += (in[9] & 0xff) << 48;
  580|  33.0k|    acc[3] -= in[9] >> 16;
  581|  33.0k|    acc[2] -= (in[9] & 0xffff) << 40;
  582|  33.0k|    acc[3] += in[9] >> 48;
  583|  33.0k|    acc[2] += (in[9] & 0xffffffffffff) << 8;
  584|       |
  585|       |    /*
  586|       |     * [2]: Eliminate acc[7], acc[8], that is the 7 and eighth limbs, as
  587|       |     * well as the contributions made from eliminating higher limbs.
  588|       |     * acc[7] < in[7] + 2^120 + 2^56 < in[7] + 2^121
  589|       |     * acc[8] < in[8] + 2^96
  590|       |     */
  591|  33.0k|    acc[4] += acc[8] >> 32;
  592|  33.0k|    acc[3] += (acc[8] & 0xffffffff) << 24;
  593|  33.0k|    acc[3] += acc[8] >> 8;
  594|  33.0k|    acc[2] += (acc[8] & 0xff) << 48;
  595|  33.0k|    acc[2] -= acc[8] >> 16;
  596|  33.0k|    acc[1] -= (acc[8] & 0xffff) << 40;
  597|  33.0k|    acc[2] += acc[8] >> 48;
  598|  33.0k|    acc[1] += (acc[8] & 0xffffffffffff) << 8;
  599|       |
  600|  33.0k|    acc[3] += acc[7] >> 32;
  601|  33.0k|    acc[2] += (acc[7] & 0xffffffff) << 24;
  602|  33.0k|    acc[2] += acc[7] >> 8;
  603|  33.0k|    acc[1] += (acc[7] & 0xff) << 48;
  604|  33.0k|    acc[1] -= acc[7] >> 16;
  605|  33.0k|    acc[0] -= (acc[7] & 0xffff) << 40;
  606|  33.0k|    acc[1] += acc[7] >> 48;
  607|  33.0k|    acc[0] += (acc[7] & 0xffffffffffff) << 8;
  608|       |
  609|       |    /*-
  610|       |     * acc[k] < in[k] + 2^124 + 2^121
  611|       |     *        < in[k] + 2^125
  612|       |     *        < 2^128, for k <= 6
  613|       |     */
  614|       |
  615|       |    /*
  616|       |     * Carry 4 -> 5 -> 6
  617|       |     * This has the effect of ensuring that these more significant limbs
  618|       |     * will be small in value after eliminating high bits from acc[6].
  619|       |     */
  620|  33.0k|    acc[5] += acc[4] >> 56;
  621|  33.0k|    acc[4] &= 0x00ffffffffffffff;
  622|       |
  623|  33.0k|    acc[6] += acc[5] >> 56;
  624|  33.0k|    acc[5] &= 0x00ffffffffffffff;
  625|       |
  626|       |    /*-
  627|       |     * acc[6] < in[6] + 2^124 + 2^121 + 2^72 + 2^16
  628|       |     *        < in[6] + 2^125
  629|       |     *        < 2^128
  630|       |     */
  631|       |
  632|       |    /* [3]: Eliminate high bits of acc[6] */
  633|  33.0k|    temp = acc[6] >> 48;
  634|  33.0k|    acc[6] &= 0x0000ffffffffffff;
  635|       |
  636|       |    /* temp < 2^80 */
  637|       |
  638|  33.0k|    acc[3] += temp >> 40;
  639|  33.0k|    acc[2] += (temp & 0xffffffffff) << 16;
  640|  33.0k|    acc[2] += temp >> 16;
  641|  33.0k|    acc[1] += (temp & 0xffff) << 40;
  642|  33.0k|    acc[1] -= temp >> 24;
  643|  33.0k|    acc[0] -= (temp & 0xffffff) << 32;
  644|  33.0k|    acc[0] += temp;
  645|       |
  646|       |    /*-
  647|       |     * acc[k] < acc_old[k] + 2^64 + 2^56
  648|       |     *        < in[k] + 2^124 + 2^121 + 2^72 + 2^64 + 2^56 + 2^16 , k < 4
  649|       |     */
  650|       |
  651|       |    /* Carry 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 */
  652|  33.0k|    acc[1] += acc[0] >> 56; /* acc[1] < acc_old[1] + 2^72 */
  653|  33.0k|    acc[0] &= 0x00ffffffffffffff;
  654|       |
  655|  33.0k|    acc[2] += acc[1] >> 56; /* acc[2] < acc_old[2] + 2^72 + 2^16 */
  656|  33.0k|    acc[1] &= 0x00ffffffffffffff;
  657|       |
  658|  33.0k|    acc[3] += acc[2] >> 56; /* acc[3] < acc_old[3] + 2^72 + 2^16 */
  659|  33.0k|    acc[2] &= 0x00ffffffffffffff;
  660|       |
  661|       |    /*-
  662|       |     * acc[k] < acc_old[k] + 2^72 + 2^16
  663|       |     *        < in[k] + 2^124 + 2^121 + 2^73 + 2^64 + 2^56 + 2^17
  664|       |     *        < in[k] + 2^125
  665|       |     *        < 2^128 , k < 4
  666|       |     */
  667|       |
  668|  33.0k|    acc[4] += acc[3] >> 56; /*-
  669|       |                             * acc[4] < acc_old[4] + 2^72 + 2^16
  670|       |                             *        < 2^72 + 2^56 + 2^16
  671|       |                             */
  672|  33.0k|    acc[3] &= 0x00ffffffffffffff;
  673|       |
  674|  33.0k|    acc[5] += acc[4] >> 56; /*-
  675|       |                             * acc[5] < acc_old[5] + 2^16 + 1
  676|       |                             *        < 2^56 + 2^16 + 1
  677|       |                             */
  678|  33.0k|    acc[4] &= 0x00ffffffffffffff;
  679|       |
  680|  33.0k|    acc[6] += acc[5] >> 56; /* acc[6] < 2^48 + 1 <= 2^48 */
  681|  33.0k|    acc[5] &= 0x00ffffffffffffff;
  682|       |
  683|   264k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|   264k|#define NLIMBS 7
  ------------------
  |  Branch (683:17): [True: 231k, False: 33.0k]
  ------------------
  684|   231k|        out[i] = acc[i];
  685|  33.0k|}
ecp_nistp384.c:felem_mul_ref:
  432|  17.5k|{
  433|  17.5k|    out[0] = ((uint128_t)in1[0]) * in2[0];
  434|       |
  435|  17.5k|    out[1] = ((uint128_t)in1[0]) * in2[1]
  436|  17.5k|        + ((uint128_t)in1[1]) * in2[0];
  437|       |
  438|  17.5k|    out[2] = ((uint128_t)in1[0]) * in2[2]
  439|  17.5k|        + ((uint128_t)in1[1]) * in2[1]
  440|  17.5k|        + ((uint128_t)in1[2]) * in2[0];
  441|       |
  442|  17.5k|    out[3] = ((uint128_t)in1[0]) * in2[3]
  443|  17.5k|        + ((uint128_t)in1[1]) * in2[2]
  444|  17.5k|        + ((uint128_t)in1[2]) * in2[1]
  445|  17.5k|        + ((uint128_t)in1[3]) * in2[0];
  446|       |
  447|  17.5k|    out[4] = ((uint128_t)in1[0]) * in2[4]
  448|  17.5k|        + ((uint128_t)in1[1]) * in2[3]
  449|  17.5k|        + ((uint128_t)in1[2]) * in2[2]
  450|  17.5k|        + ((uint128_t)in1[3]) * in2[1]
  451|  17.5k|        + ((uint128_t)in1[4]) * in2[0];
  452|       |
  453|  17.5k|    out[5] = ((uint128_t)in1[0]) * in2[5]
  454|  17.5k|        + ((uint128_t)in1[1]) * in2[4]
  455|  17.5k|        + ((uint128_t)in1[2]) * in2[3]
  456|  17.5k|        + ((uint128_t)in1[3]) * in2[2]
  457|  17.5k|        + ((uint128_t)in1[4]) * in2[1]
  458|  17.5k|        + ((uint128_t)in1[5]) * in2[0];
  459|       |
  460|  17.5k|    out[6] = ((uint128_t)in1[0]) * in2[6]
  461|  17.5k|        + ((uint128_t)in1[1]) * in2[5]
  462|  17.5k|        + ((uint128_t)in1[2]) * in2[4]
  463|  17.5k|        + ((uint128_t)in1[3]) * in2[3]
  464|  17.5k|        + ((uint128_t)in1[4]) * in2[2]
  465|  17.5k|        + ((uint128_t)in1[5]) * in2[1]
  466|  17.5k|        + ((uint128_t)in1[6]) * in2[0];
  467|       |
  468|  17.5k|    out[7] = ((uint128_t)in1[1]) * in2[6]
  469|  17.5k|        + ((uint128_t)in1[2]) * in2[5]
  470|  17.5k|        + ((uint128_t)in1[3]) * in2[4]
  471|  17.5k|        + ((uint128_t)in1[4]) * in2[3]
  472|  17.5k|        + ((uint128_t)in1[5]) * in2[2]
  473|  17.5k|        + ((uint128_t)in1[6]) * in2[1];
  474|       |
  475|  17.5k|    out[8] = ((uint128_t)in1[2]) * in2[6]
  476|  17.5k|        + ((uint128_t)in1[3]) * in2[5]
  477|  17.5k|        + ((uint128_t)in1[4]) * in2[4]
  478|  17.5k|        + ((uint128_t)in1[5]) * in2[3]
  479|  17.5k|        + ((uint128_t)in1[6]) * in2[2];
  480|       |
  481|  17.5k|    out[9] = ((uint128_t)in1[3]) * in2[6]
  482|  17.5k|        + ((uint128_t)in1[4]) * in2[5]
  483|  17.5k|        + ((uint128_t)in1[5]) * in2[4]
  484|  17.5k|        + ((uint128_t)in1[6]) * in2[3];
  485|       |
  486|  17.5k|    out[10] = ((uint128_t)in1[4]) * in2[6]
  487|  17.5k|        + ((uint128_t)in1[5]) * in2[5]
  488|  17.5k|        + ((uint128_t)in1[6]) * in2[4];
  489|       |
  490|  17.5k|    out[11] = ((uint128_t)in1[5]) * in2[6]
  491|  17.5k|        + ((uint128_t)in1[6]) * in2[5];
  492|       |
  493|  17.5k|    out[12] = ((uint128_t)in1[6]) * in2[6];
  494|  17.5k|}
ecp_nistp384.c:felem_contract:
  888|     80|{
  889|     80|    static const int64_t two56 = ((limb)1) << 56;
  890|       |
  891|       |    /*
  892|       |     * We know for a fact that 0 <= |in| < 2*p, for p = 2^384 - 2^128 - 2^96 + 2^32 - 1
  893|       |     * Perform two successive, idempotent subtractions to reduce if |in| >= p.
  894|       |     */
  895|       |
  896|     80|    int64_t tmp[NLIMBS], cond[5], a;
  897|     80|    unsigned int i;
  898|       |
  899|     80|    memcpy(tmp, in, sizeof(felem));
  900|       |
  901|       |    /* Case 1: a = 1 iff |in| >= 2^384 */
  902|     80|    a = (in[6] >> 48);
  903|     80|    tmp[0] += a;
  904|     80|    tmp[0] -= a << 32;
  905|     80|    tmp[1] += a << 40;
  906|     80|    tmp[2] += a << 16;
  907|     80|    tmp[6] &= 0x0000ffffffffffff;
  908|       |
  909|       |    /*
  910|       |     * eliminate negative coefficients: if tmp[0] is negative, tmp[1] must be
  911|       |     * non-zero, so we only need one step
  912|       |     */
  913|       |
  914|     80|    a = tmp[0] >> 63;
  915|     80|    tmp[0] += a & two56;
  916|     80|    tmp[1] -= a & 1;
  917|       |
  918|       |    /* Carry 1 -> 2 -> 3 -> 4 -> 5 -> 6 */
  919|     80|    tmp[2] += tmp[1] >> 56;
  920|     80|    tmp[1] &= 0x00ffffffffffffff;
  921|       |
  922|     80|    tmp[3] += tmp[2] >> 56;
  923|     80|    tmp[2] &= 0x00ffffffffffffff;
  924|       |
  925|     80|    tmp[4] += tmp[3] >> 56;
  926|     80|    tmp[3] &= 0x00ffffffffffffff;
  927|       |
  928|     80|    tmp[5] += tmp[4] >> 56;
  929|     80|    tmp[4] &= 0x00ffffffffffffff;
  930|       |
  931|     80|    tmp[6] += tmp[5] >> 56; /* tmp[6] < 2^48 */
  932|     80|    tmp[5] &= 0x00ffffffffffffff;
  933|       |
  934|       |    /*
  935|       |     * Case 2: a = all ones if p <= |in| < 2^384, 0 otherwise
  936|       |     */
  937|       |
  938|       |    /* 0 iff (2^129..2^383) are all one */
  939|     80|    cond[0] = ((tmp[6] | 0xff000000000000) & tmp[5] & tmp[4] & tmp[3] & (tmp[2] | 0x0000000001ffff)) + 1;
  940|       |    /* 0 iff 2^128 bit is one */
  941|     80|    cond[1] = (tmp[2] | ~0x00000000010000) + 1;
  942|       |    /* 0 iff (2^96..2^127) bits are all one */
  943|     80|    cond[2] = ((tmp[2] | 0xffffffffff0000) & (tmp[1] | 0x0000ffffffffff)) + 1;
  944|       |    /* 0 iff (2^32..2^95) bits are all zero */
  945|     80|    cond[3] = (tmp[1] & ~0xffff0000000000) | (tmp[0] & ~((int64_t)0x000000ffffffff));
  946|       |    /* 0 iff (2^0..2^31) bits are all one */
  947|     80|    cond[4] = (tmp[0] | 0xffffff00000000) + 1;
  948|       |
  949|       |    /*
  950|       |     * In effect, invert our conditions, so that 0 values become all 1's,
  951|       |     * any non-zero value in the low-order 56 bits becomes all 0's
  952|       |     */
  953|    480|    for (i = 0; i < 5; i++)
  ------------------
  |  Branch (953:17): [True: 400, False: 80]
  ------------------
  954|    400|        cond[i] = ((cond[i] & 0x00ffffffffffffff) - 1) >> 63;
  955|       |
  956|       |    /*
  957|       |     * The condition for determining whether in is greater than our
  958|       |     * prime is given by the following condition.
  959|       |     */
  960|       |
  961|       |    /* First subtract 2^384 - 2^129 cheaply */
  962|     80|    a = cond[0] & (cond[1] | (cond[2] & (~cond[3] | cond[4])));
  963|     80|    tmp[6] &= ~a;
  964|     80|    tmp[5] &= ~a;
  965|     80|    tmp[4] &= ~a;
  966|     80|    tmp[3] &= ~a;
  967|     80|    tmp[2] &= ~a | 0x0000000001ffff;
  968|       |
  969|       |    /*
  970|       |     * Subtract 2^128 - 2^96 by
  971|       |     * means of disjoint cases.
  972|       |     */
  973|       |
  974|       |    /* subtract 2^128 if that bit is present, and add 2^96 */
  975|     80|    a = cond[0] & cond[1];
  976|     80|    tmp[2] &= ~a | 0xfffffffffeffff;
  977|     80|    tmp[1] += a & ((int64_t)1 << 40);
  978|       |
  979|       |    /* otherwise, clear bits 2^127 .. 2^96  */
  980|     80|    a = cond[0] & ~cond[1] & (cond[2] & (~cond[3] | cond[4]));
  981|     80|    tmp[2] &= ~a | 0xffffffffff0000;
  982|     80|    tmp[1] &= ~a | 0x0000ffffffffff;
  983|       |
  984|       |    /* finally, subtract the last 2^32 - 1 */
  985|     80|    a = cond[0] & (cond[1] | (cond[2] & (~cond[3] | cond[4])));
  986|     80|    tmp[0] += a & (-((int64_t)1 << 32) + 1);
  987|       |
  988|       |    /*
  989|       |     * eliminate negative coefficients: if tmp[0] is negative, tmp[1] must be
  990|       |     * non-zero, so we only need one step
  991|       |     */
  992|     80|    a = tmp[0] >> 63;
  993|     80|    tmp[0] += a & two56;
  994|     80|    tmp[1] -= a & 1;
  995|       |
  996|       |    /* Carry 1 -> 2 -> 3 -> 4 -> 5 -> 6 */
  997|     80|    tmp[2] += tmp[1] >> 56;
  998|     80|    tmp[1] &= 0x00ffffffffffffff;
  999|       |
 1000|     80|    tmp[3] += tmp[2] >> 56;
 1001|     80|    tmp[2] &= 0x00ffffffffffffff;
 1002|       |
 1003|     80|    tmp[4] += tmp[3] >> 56;
 1004|     80|    tmp[3] &= 0x00ffffffffffffff;
 1005|       |
 1006|     80|    tmp[5] += tmp[4] >> 56;
 1007|     80|    tmp[4] &= 0x00ffffffffffffff;
 1008|       |
 1009|     80|    tmp[6] += tmp[5] >> 56;
 1010|     80|    tmp[5] &= 0x00ffffffffffffff;
 1011|       |
 1012|     80|    memcpy(out, tmp, sizeof(felem));
 1013|     80|}
ecp_nistp384.c:felem_to_BN:
  161|    128|{
  162|    128|    felem_bytearray b_out;
  163|       |
  164|    128|    felem_to_bin48(b_out, in);
  165|    128|    return BN_lebin2bn(b_out, sizeof(b_out), out);
  166|    128|}
ecp_nistp384.c:felem_to_bin48:
  129|    128|{
  130|    128|    memset(out, 0, 48);
  131|    128|    (*((limb *)&out[0])) |= (in[0] & bottom56bits);
  132|    128|    (*((limb_aX *)&out[7])) |= (in[1] & bottom56bits);
  133|    128|    (*((limb_aX *)&out[14])) |= (in[2] & bottom56bits);
  134|    128|    (*((limb_aX *)&out[21])) |= (in[3] & bottom56bits);
  135|    128|    (*((limb_aX *)&out[28])) |= (in[4] & bottom56bits);
  136|    128|    (*((limb_aX *)&out[35])) |= (in[5] & bottom56bits);
  137|    128|    memmove(&out[42], &in[6], 6);
  138|    128|}
ecp_nistp384.c:point_add:
 1107|  1.56k|{
 1108|  1.56k|    felem ftmp, ftmp2, ftmp3, ftmp4, ftmp5, ftmp6, x_out, y_out, z_out;
 1109|  1.56k|    widefelem tmp, tmp2;
 1110|  1.56k|    limb x_equal, y_equal, z1_is_zero, z2_is_zero;
 1111|  1.56k|    limb points_equal;
 1112|       |
 1113|  1.56k|    z1_is_zero = felem_is_zero(z1);
 1114|  1.56k|    z2_is_zero = felem_is_zero(z2);
 1115|       |
 1116|       |    /* ftmp = z1z1 = z1**2 */
 1117|  1.56k|    felem_square_reduce(ftmp, z1); /* ftmp[i] < 2^56 */
  ------------------
  |  |  771|  1.56k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
 1118|       |
 1119|  1.56k|    if (!mixed) {
  ------------------
  |  Branch (1119:9): [True: 0, False: 1.56k]
  ------------------
 1120|       |        /* ftmp2 = z2z2 = z2**2 */
 1121|      0|        felem_square_reduce(ftmp2, z2); /* ftmp2[i] < 2^56 */
  ------------------
  |  |  771|      0|#define felem_square_reduce felem_square_reduce_ref
  ------------------
 1122|       |
 1123|       |        /* u1 = ftmp3 = x1*z2z2 */
 1124|      0|        felem_mul_reduce(ftmp3, x1, ftmp2); /* ftmp3[i] < 2^56 */
  ------------------
  |  |  772|      0|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1125|       |
 1126|       |        /* ftmp5 = z1 + z2 */
 1127|      0|        felem_assign(ftmp5, z1); /* ftmp5[i] < 2^56 */
 1128|      0|        felem_sum64(ftmp5, z2); /* ftmp5[i] < 2^57 */
 1129|       |
 1130|       |        /* ftmp5 = (z1 + z2)**2 - z1z1 - z2z2 = 2*z1z2 */
 1131|      0|        felem_square(tmp, ftmp5); /* tmp[i] < 2^117 */
  ------------------
  |  |  767|      0|#define felem_square felem_square_ref
  ------------------
 1132|      0|        felem_diff_128_64(tmp, ftmp); /* tmp[i] < 2^117 + 2^64 + 2^48 */
 1133|      0|        felem_diff_128_64(tmp, ftmp2); /* tmp[i] < 2^117 + 2^65 + 2^49 */
 1134|      0|        felem_reduce(ftmp5, tmp); /* ftmp5[i] < 2^56 */
  ------------------
  |  |  769|      0|#define felem_reduce felem_reduce_ref
  ------------------
 1135|       |
 1136|       |        /* ftmp2 = z2 * z2z2 */
 1137|      0|        felem_mul_reduce(ftmp2, ftmp2, z2); /* ftmp2[i] < 2^56 */
  ------------------
  |  |  772|      0|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1138|       |
 1139|       |        /* s1 = ftmp6 = y1 * z2**3 */
 1140|      0|        felem_mul_reduce(ftmp6, y1, ftmp2); /* ftmp6[i] < 2^56 */
  ------------------
  |  |  772|      0|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1141|  1.56k|    } else {
 1142|       |        /*
 1143|       |         * We'll assume z2 = 1 (special case z2 = 0 is handled later)
 1144|       |         */
 1145|       |
 1146|       |        /* u1 = ftmp3 = x1*z2z2 */
 1147|  1.56k|        felem_assign(ftmp3, x1); /* ftmp3[i] < 2^56 */
 1148|       |
 1149|       |        /* ftmp5 = 2*z1z2 */
 1150|  1.56k|        felem_scalar(ftmp5, z1, 2); /* ftmp5[i] < 2^57 */
 1151|       |
 1152|       |        /* s1 = ftmp6 = y1 * z2**3 */
 1153|  1.56k|        felem_assign(ftmp6, y1); /* ftmp6[i] < 2^56 */
 1154|  1.56k|    }
 1155|       |    /* ftmp3[i] < 2^56, ftmp5[i] < 2^57, ftmp6[i] < 2^56 */
 1156|       |
 1157|       |    /* u2 = x2*z1z1 */
 1158|  1.56k|    felem_mul(tmp, x2, ftmp); /* tmp[i] < 2^115 */
  ------------------
  |  |  768|  1.56k|#define felem_mul felem_mul_ref
  ------------------
 1159|       |
 1160|       |    /* h = ftmp4 = u2 - u1 */
 1161|  1.56k|    felem_diff_128_64(tmp, ftmp3); /* tmp[i] < 2^115 + 2^64 + 2^48 */
 1162|  1.56k|    felem_reduce(ftmp4, tmp); /* ftmp[4] < 2^56 */
  ------------------
  |  |  769|  1.56k|#define felem_reduce felem_reduce_ref
  ------------------
 1163|       |
 1164|  1.56k|    x_equal = felem_is_zero(ftmp4);
 1165|       |
 1166|       |    /* z_out = ftmp5 * h */
 1167|  1.56k|    felem_mul_reduce(z_out, ftmp5, ftmp4); /* z_out[i] < 2^56 */
  ------------------
  |  |  772|  1.56k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1168|       |
 1169|       |    /* ftmp = z1 * z1z1 */
 1170|  1.56k|    felem_mul_reduce(ftmp, ftmp, z1); /* ftmp[i] < 2^56 */
  ------------------
  |  |  772|  1.56k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1171|       |
 1172|       |    /* s2 = tmp = y2 * z1**3 */
 1173|  1.56k|    felem_mul(tmp, y2, ftmp); /* tmp[i] < 2^115 */
  ------------------
  |  |  768|  1.56k|#define felem_mul felem_mul_ref
  ------------------
 1174|       |
 1175|       |    /* r = ftmp5 = (s2 - s1)*2 */
 1176|  1.56k|    felem_diff_128_64(tmp, ftmp6); /* tmp[i] < 2^115 + 2^64 + 2^48 */
 1177|  1.56k|    felem_reduce(ftmp5, tmp); /* ftmp5[i] < 2^56 */
  ------------------
  |  |  769|  1.56k|#define felem_reduce felem_reduce_ref
  ------------------
 1178|  1.56k|    y_equal = felem_is_zero(ftmp5);
 1179|  1.56k|    felem_scalar64(ftmp5, 2); /* ftmp5[i] < 2^57 */
 1180|       |
 1181|       |    /*
 1182|       |     * The formulae are incorrect if the points are equal, in affine coordinates
 1183|       |     * (X_1, Y_1) == (X_2, Y_2), so we check for this and do doubling if this
 1184|       |     * happens.
 1185|       |     *
 1186|       |     * We use bitwise operations to avoid potential side-channels introduced by
 1187|       |     * the short-circuiting behaviour of boolean operators.
 1188|       |     *
 1189|       |     * The special case of either point being the point at infinity (z1 and/or
 1190|       |     * z2 are zero), is handled separately later on in this function, so we
 1191|       |     * avoid jumping to point_double here in those special cases.
 1192|       |     *
 1193|       |     * Notice the comment below on the implications of this branching for timing
 1194|       |     * leaks and why it is considered practically irrelevant.
 1195|       |     */
 1196|  1.56k|    points_equal = (x_equal & y_equal & (~z1_is_zero) & (~z2_is_zero));
 1197|       |
 1198|  1.56k|    if (points_equal) {
  ------------------
  |  Branch (1198:9): [True: 0, False: 1.56k]
  ------------------
 1199|       |        /*
 1200|       |         * This is obviously not constant-time but it will almost-never happen
 1201|       |         * for ECDH / ECDSA.
 1202|       |         */
 1203|      0|        point_double(x3, y3, z3, x1, y1, z1);
 1204|      0|        return;
 1205|      0|    }
 1206|       |
 1207|       |    /* I = ftmp = (2h)**2 */
 1208|  1.56k|    felem_assign(ftmp, ftmp4); /* ftmp[i] < 2^56 */
 1209|  1.56k|    felem_scalar64(ftmp, 2); /* ftmp[i] < 2^57 */
 1210|  1.56k|    felem_square_reduce(ftmp, ftmp); /* ftmp[i] < 2^56 */
  ------------------
  |  |  771|  1.56k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
 1211|       |
 1212|       |    /* J = ftmp2 = h * I */
 1213|  1.56k|    felem_mul_reduce(ftmp2, ftmp4, ftmp); /* ftmp2[i] < 2^56 */
  ------------------
  |  |  772|  1.56k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1214|       |
 1215|       |    /* V = ftmp4 = U1 * I */
 1216|  1.56k|    felem_mul_reduce(ftmp4, ftmp3, ftmp); /* ftmp4[i] < 2^56 */
  ------------------
  |  |  772|  1.56k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1217|       |
 1218|       |    /* x_out = r**2 - J - 2V */
 1219|  1.56k|    felem_square(tmp, ftmp5); /* tmp[i] < 2^117 */
  ------------------
  |  |  767|  1.56k|#define felem_square felem_square_ref
  ------------------
 1220|  1.56k|    felem_diff_128_64(tmp, ftmp2); /* tmp[i] < 2^117 + 2^64 + 2^48 */
 1221|  1.56k|    felem_assign(ftmp3, ftmp4); /* ftmp3[i] < 2^56 */
 1222|  1.56k|    felem_scalar64(ftmp4, 2); /* ftmp4[i] < 2^57 */
 1223|  1.56k|    felem_diff_128_64(tmp, ftmp4); /* tmp[i] < 2^117 + 2^65 + 2^49 */
 1224|  1.56k|    felem_reduce(x_out, tmp); /* x_out[i] < 2^56 */
  ------------------
  |  |  769|  1.56k|#define felem_reduce felem_reduce_ref
  ------------------
 1225|       |
 1226|       |    /* y_out = r(V-x_out) - 2 * s1 * J */
 1227|  1.56k|    felem_diff64(ftmp3, x_out); /* ftmp3[i] < 2^60 + 2^56 + 2^44 */
 1228|  1.56k|    felem_mul(tmp, ftmp5, ftmp3); /* tmp[i] < 2^116 */
  ------------------
  |  |  768|  1.56k|#define felem_mul felem_mul_ref
  ------------------
 1229|  1.56k|    felem_mul(tmp2, ftmp6, ftmp2); /* tmp2[i] < 2^115 */
  ------------------
  |  |  768|  1.56k|#define felem_mul felem_mul_ref
  ------------------
 1230|  1.56k|    felem_scalar128(tmp2, 2); /* tmp2[i] < 2^116 */
 1231|  1.56k|    felem_diff128(tmp, tmp2); /* tmp[i] < 2^127 + 2^116 + 2^111 */
 1232|  1.56k|    felem_reduce(y_out, tmp); /* y_out[i] < 2^56 */
  ------------------
  |  |  769|  1.56k|#define felem_reduce felem_reduce_ref
  ------------------
 1233|       |
 1234|  1.56k|    copy_conditional(x_out, x2, z1_is_zero);
 1235|  1.56k|    copy_conditional(x_out, x1, z2_is_zero);
 1236|  1.56k|    copy_conditional(y_out, y2, z1_is_zero);
 1237|  1.56k|    copy_conditional(y_out, y1, z2_is_zero);
 1238|  1.56k|    copy_conditional(z_out, z2, z1_is_zero);
 1239|  1.56k|    copy_conditional(z_out, z1, z2_is_zero);
 1240|  1.56k|    felem_assign(x3, x_out);
 1241|  1.56k|    felem_assign(y3, y_out);
 1242|  1.56k|    felem_assign(z3, z_out);
 1243|  1.56k|}
ecp_nistp384.c:felem_is_zero:
  861|  6.27k|{
  862|  6.27k|    limb zero, p384;
  863|       |
  864|  6.27k|    zero = in[0] | in[1] | in[2] | in[3] | in[4] | in[5] | in[6];
  865|  6.27k|    zero = ((int64_t)(zero)-1) >> 63;
  866|  6.27k|    p384 = (in[0] ^ 0x000000ffffffff) | (in[1] ^ 0xffff0000000000)
  867|  6.27k|        | (in[2] ^ 0xfffffffffeffff) | (in[3] ^ 0xffffffffffffff)
  868|  6.27k|        | (in[4] ^ 0xffffffffffffff) | (in[5] ^ 0xffffffffffffff)
  869|  6.27k|        | (in[6] ^ 0xffffffffffff);
  870|  6.27k|    p384 = ((int64_t)(p384)-1) >> 63;
  871|       |
  872|  6.27k|    return (zero | p384);
  873|  6.27k|}
ecp_nistp384.c:felem_sum64:
  186|  4.70k|{
  187|  4.70k|    unsigned int i;
  188|       |
  189|  37.6k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|  37.6k|#define NLIMBS 7
  ------------------
  |  Branch (189:17): [True: 32.9k, False: 4.70k]
  ------------------
  190|  32.9k|        out[i] += in[i];
  191|  4.70k|}
ecp_nistp384.c:felem_diff_128_64:
  306|  9.40k|{
  307|       |    /*
  308|       |     * In order to prevent underflow, we add a multiple of p before subtracting.
  309|       |     * Use telescopic sums to represent 2^16 * p redundantly with each limb
  310|       |     * of the form 2^64 + ...
  311|       |     */
  312|       |
  313|  9.40k|    static const widelimb two64m56m8 = (((widelimb)1) << 64)
  314|  9.40k|        - (((widelimb)1) << 56)
  315|  9.40k|        - (((widelimb)1) << 8);
  316|  9.40k|    static const widelimb two64m32m8 = (((widelimb)1) << 64)
  317|  9.40k|        - (((widelimb)1) << 32)
  318|  9.40k|        - (((widelimb)1) << 8);
  319|  9.40k|    static const widelimb two64m8 = (((widelimb)1) << 64)
  320|  9.40k|        - (((widelimb)1) << 8);
  321|  9.40k|    static const widelimb two64p48m16 = (((widelimb)1) << 64)
  322|  9.40k|        + (((widelimb)1) << 48)
  323|  9.40k|        - (((widelimb)1) << 16);
  324|  9.40k|    unsigned int i;
  325|       |
  326|  9.40k|    out[0] += two64p48m16;
  327|  9.40k|    out[1] += two64m56m8;
  328|  9.40k|    out[2] += two64m32m8;
  329|  9.40k|    out[3] += two64m8;
  330|  9.40k|    out[4] += two64m8;
  331|  9.40k|    out[5] += two64m8;
  332|  9.40k|    out[6] += two64m8;
  333|       |
  334|  75.2k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|  75.2k|#define NLIMBS 7
  ------------------
  |  Branch (334:17): [True: 65.8k, False: 9.40k]
  ------------------
  335|  65.8k|        out[i] -= in[i];
  336|  9.40k|}
ecp_nistp384.c:felem_scalar64:
  204|  9.40k|{
  205|  9.40k|    unsigned int i;
  206|       |
  207|  75.2k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|  75.2k|#define NLIMBS 7
  ------------------
  |  Branch (207:17): [True: 65.8k, False: 9.40k]
  ------------------
  208|  65.8k|        out[i] *= scalar;
  209|  9.40k|}
ecp_nistp384.c:felem_diff64:
  273|  4.70k|{
  274|       |    /*
  275|       |     * In order to prevent underflow, we add a multiple of p before subtracting.
  276|       |     * Use telescopic sums to represent 2^12 * p redundantly with each limb
  277|       |     * of the form 2^60 + ...
  278|       |     */
  279|       |
  280|  4.70k|    static const limb two60m52m4 = (((limb)1) << 60)
  281|  4.70k|        - (((limb)1) << 52)
  282|  4.70k|        - (((limb)1) << 4);
  283|  4.70k|    static const limb two60p44m12 = (((limb)1) << 60)
  284|  4.70k|        + (((limb)1) << 44)
  285|  4.70k|        - (((limb)1) << 12);
  286|  4.70k|    static const limb two60m28m4 = (((limb)1) << 60)
  287|  4.70k|        - (((limb)1) << 28)
  288|  4.70k|        - (((limb)1) << 4);
  289|  4.70k|    static const limb two60m4 = (((limb)1) << 60)
  290|  4.70k|        - (((limb)1) << 4);
  291|       |
  292|  4.70k|    out[0] += two60p44m12 - in[0];
  293|  4.70k|    out[1] += two60m52m4 - in[1];
  294|  4.70k|    out[2] += two60m28m4 - in[2];
  295|  4.70k|    out[3] += two60m4 - in[3];
  296|  4.70k|    out[4] += two60m4 - in[4];
  297|  4.70k|    out[5] += two60m4 - in[5];
  298|  4.70k|    out[6] += two60m4 - in[6];
  299|  4.70k|}
ecp_nistp384.c:felem_scalar128:
  213|  3.13k|{
  214|  3.13k|    unsigned int i;
  215|       |
  216|  43.9k|    for (i = 0; i < 2 * NLIMBS - 1; i++)
  ------------------
  |  |  105|  43.9k|#define NLIMBS 7
  ------------------
  |  Branch (216:17): [True: 40.7k, False: 3.13k]
  ------------------
  217|  40.7k|        out[i] *= scalar;
  218|  3.13k|}
ecp_nistp384.c:felem_diff128:
  343|  3.13k|{
  344|       |    /*
  345|       |     * In order to prevent underflow, we add a multiple of p before subtracting.
  346|       |     * Use telescopic sums to represent 2^415 * p redundantly with each limb
  347|       |     * of the form 2^127 + ...
  348|       |     */
  349|       |
  350|  3.13k|    static const widelimb two127 = ((widelimb)1) << 127;
  351|  3.13k|    static const widelimb two127m71 = (((widelimb)1) << 127)
  352|  3.13k|        - (((widelimb)1) << 71);
  353|  3.13k|    static const widelimb two127p111m79m71 = (((widelimb)1) << 127)
  354|  3.13k|        + (((widelimb)1) << 111)
  355|  3.13k|        - (((widelimb)1) << 79)
  356|  3.13k|        - (((widelimb)1) << 71);
  357|  3.13k|    static const widelimb two127m119m71 = (((widelimb)1) << 127)
  358|  3.13k|        - (((widelimb)1) << 119)
  359|  3.13k|        - (((widelimb)1) << 71);
  360|  3.13k|    static const widelimb two127m95m71 = (((widelimb)1) << 127)
  361|  3.13k|        - (((widelimb)1) << 95)
  362|  3.13k|        - (((widelimb)1) << 71);
  363|  3.13k|    unsigned int i;
  364|       |
  365|  3.13k|    out[0] += two127;
  366|  3.13k|    out[1] += two127m71;
  367|  3.13k|    out[2] += two127m71;
  368|  3.13k|    out[3] += two127m71;
  369|  3.13k|    out[4] += two127m71;
  370|  3.13k|    out[5] += two127m71;
  371|  3.13k|    out[6] += two127p111m79m71;
  372|  3.13k|    out[7] += two127m119m71;
  373|  3.13k|    out[8] += two127m95m71;
  374|  3.13k|    out[9] += two127m71;
  375|  3.13k|    out[10] += two127m71;
  376|  3.13k|    out[11] += two127m71;
  377|  3.13k|    out[12] += two127m71;
  378|       |
  379|  43.9k|    for (i = 0; i < 2 * NLIMBS - 1; i++)
  ------------------
  |  |  105|  43.9k|#define NLIMBS 7
  ------------------
  |  Branch (379:17): [True: 40.7k, False: 3.13k]
  ------------------
  380|  40.7k|        out[i] -= in[i];
  381|  3.13k|}
ecp_nistp384.c:copy_conditional:
 1085|  9.40k|{
 1086|  9.40k|    unsigned int i;
 1087|       |
 1088|  75.2k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |  105|  75.2k|#define NLIMBS 7
  ------------------
  |  Branch (1088:17): [True: 65.8k, False: 9.40k]
  ------------------
 1089|  65.8k|        out[i] ^= mask & (in[i] ^ out[i]);
 1090|  9.40k|}
ecp_nistp384.c:point_double:
 1036|  1.56k|{
 1037|  1.56k|    widefelem tmp, tmp2;
 1038|  1.56k|    felem delta, gamma, beta, alpha, ftmp, ftmp2;
 1039|       |
 1040|  1.56k|    felem_assign(ftmp, x_in);
 1041|  1.56k|    felem_assign(ftmp2, x_in);
 1042|       |
 1043|       |    /* delta = z^2 */
 1044|  1.56k|    felem_square_reduce(delta, z_in); /* delta[i] < 2^56 */
  ------------------
  |  |  771|  1.56k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
 1045|       |
 1046|       |    /* gamma = y^2 */
 1047|  1.56k|    felem_square_reduce(gamma, y_in); /* gamma[i] < 2^56 */
  ------------------
  |  |  771|  1.56k|#define felem_square_reduce felem_square_reduce_ref
  ------------------
 1048|       |
 1049|       |    /* beta = x*gamma */
 1050|  1.56k|    felem_mul_reduce(beta, x_in, gamma); /* beta[i] < 2^56 */
  ------------------
  |  |  772|  1.56k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1051|       |
 1052|       |    /* alpha = 3*(x-delta)*(x+delta) */
 1053|  1.56k|    felem_diff64(ftmp, delta); /* ftmp[i] < 2^60 + 2^58 + 2^44 */
 1054|  1.56k|    felem_sum64(ftmp2, delta); /* ftmp2[i] < 2^59 */
 1055|  1.56k|    felem_scalar64(ftmp2, 3); /* ftmp2[i] < 2^61 */
 1056|  1.56k|    felem_mul_reduce(alpha, ftmp, ftmp2); /* alpha[i] < 2^56 */
  ------------------
  |  |  772|  1.56k|#define felem_mul_reduce felem_mul_reduce_ref
  ------------------
 1057|       |
 1058|       |    /* x' = alpha^2 - 8*beta */
 1059|  1.56k|    felem_square(tmp, alpha); /* tmp[i] < 2^115 */
  ------------------
  |  |  767|  1.56k|#define felem_square felem_square_ref
  ------------------
 1060|  1.56k|    felem_assign(ftmp, beta); /* ftmp[i] < 2^56 */
 1061|  1.56k|    felem_scalar64(ftmp, 8); /* ftmp[i] < 2^59 */
 1062|  1.56k|    felem_diff_128_64(tmp, ftmp); /* tmp[i] < 2^115 + 2^64 + 2^48 */
 1063|  1.56k|    felem_reduce(x_out, tmp); /* x_out[i] < 2^56 */
  ------------------
  |  |  769|  1.56k|#define felem_reduce felem_reduce_ref
  ------------------
 1064|       |
 1065|       |    /* z' = (y + z)^2 - gamma - delta */
 1066|  1.56k|    felem_sum64(delta, gamma); /* delta[i] < 2^57 */
 1067|  1.56k|    felem_assign(ftmp, y_in); /* ftmp[i] < 2^56 */
 1068|  1.56k|    felem_sum64(ftmp, z_in); /* ftmp[i] < 2^56 */
 1069|  1.56k|    felem_square(tmp, ftmp); /* tmp[i] < 2^115 */
  ------------------
  |  |  767|  1.56k|#define felem_square felem_square_ref
  ------------------
 1070|  1.56k|    felem_diff_128_64(tmp, delta); /* tmp[i] < 2^115 + 2^64 + 2^48 */
 1071|  1.56k|    felem_reduce(z_out, tmp); /* z_out[i] < 2^56 */
  ------------------
  |  |  769|  1.56k|#define felem_reduce felem_reduce_ref
  ------------------
 1072|       |
 1073|       |    /* y' = alpha*(4*beta - x') - 8*gamma^2 */
 1074|  1.56k|    felem_scalar64(beta, 4); /* beta[i] < 2^58 */
 1075|  1.56k|    felem_diff64(beta, x_out); /* beta[i] < 2^60 + 2^58 + 2^44 */
 1076|  1.56k|    felem_mul(tmp, alpha, beta); /* tmp[i] < 2^119 */
  ------------------
  |  |  768|  1.56k|#define felem_mul felem_mul_ref
  ------------------
 1077|  1.56k|    felem_square(tmp2, gamma); /* tmp2[i] < 2^115 */
  ------------------
  |  |  767|  1.56k|#define felem_square felem_square_ref
  ------------------
 1078|  1.56k|    felem_scalar128(tmp2, 8); /* tmp2[i] < 2^118 */
 1079|  1.56k|    felem_diff128(tmp, tmp2); /* tmp[i] < 2^127 + 2^119 + 2^111 */
 1080|  1.56k|    felem_reduce(y_out, tmp); /* tmp[i] < 2^56 */
  ------------------
  |  |  769|  1.56k|#define felem_reduce felem_reduce_ref
  ------------------
 1081|  1.56k|}
ecp_nistp384.c:batch_mul:
 1410|     16|{
 1411|     16|    int i, skip;
 1412|     16|    unsigned int num, gen_mul = (g_scalar != NULL);
 1413|     16|    felem nq[3], tmp[4];
 1414|     16|    limb bits;
 1415|     16|    u8 sign, digit;
 1416|       |
 1417|       |    /* set nq to the point at infinity */
 1418|     16|    memset(nq, 0, sizeof(nq));
 1419|       |
 1420|       |    /*
 1421|       |     * Loop over all scalars msb-to-lsb, interleaving additions of multiples
 1422|       |     * of the generator (last quarter of rounds) and additions of other
 1423|       |     * points multiples (every 5th round).
 1424|       |     */
 1425|     16|    skip = 1; /* save two point operations in the first
 1426|       |               * round */
 1427|  1.60k|    for (i = (num_points ? 380 : 98); i >= 0; --i) {
  ------------------
  |  Branch (1427:15): [True: 0, False: 16]
  |  Branch (1427:39): [True: 1.58k, False: 16]
  ------------------
 1428|       |        /* double */
 1429|  1.58k|        if (!skip)
  ------------------
  |  Branch (1429:13): [True: 1.56k, False: 16]
  ------------------
 1430|  1.56k|            point_double(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2]);
 1431|       |
 1432|       |        /* add multiples of the generator */
 1433|  1.58k|        if (gen_mul && (i <= 98)) {
  ------------------
  |  Branch (1433:13): [True: 1.58k, False: 0]
  |  Branch (1433:24): [True: 1.58k, False: 0]
  ------------------
 1434|  1.58k|            bits = get_bit(g_scalar, i + 285) << 3;
 1435|  1.58k|            if (i < 95) {
  ------------------
  |  Branch (1435:17): [True: 1.52k, False: 64]
  ------------------
 1436|  1.52k|                bits |= get_bit(g_scalar, i + 190) << 2;
 1437|  1.52k|                bits |= get_bit(g_scalar, i + 95) << 1;
 1438|  1.52k|                bits |= get_bit(g_scalar, i);
 1439|  1.52k|            }
 1440|       |            /* select the point to add, in constant time */
 1441|  1.58k|            select_point(bits, 16, g_pre_comp, tmp);
 1442|  1.58k|            if (!skip) {
  ------------------
  |  Branch (1442:17): [True: 1.56k, False: 16]
  ------------------
 1443|       |                /* The 1 argument below is for "mixed" */
 1444|  1.56k|                point_add(nq[0], nq[1], nq[2],
 1445|  1.56k|                    nq[0], nq[1], nq[2], 1,
 1446|  1.56k|                    tmp[0], tmp[1], tmp[2]);
 1447|  1.56k|            } else {
 1448|     16|                memcpy(nq, tmp, 3 * sizeof(felem));
 1449|     16|                skip = 0;
 1450|     16|            }
 1451|  1.58k|        }
 1452|       |
 1453|       |        /* do other additions every 5 doublings */
 1454|  1.58k|        if (num_points && (i % 5 == 0)) {
  ------------------
  |  Branch (1454:13): [True: 0, False: 1.58k]
  |  Branch (1454:27): [True: 0, False: 0]
  ------------------
 1455|       |            /* loop over all scalars */
 1456|      0|            for (num = 0; num < num_points; ++num) {
  ------------------
  |  Branch (1456:27): [True: 0, False: 0]
  ------------------
 1457|      0|                bits = get_bit(scalars[num], i + 4) << 5;
 1458|      0|                bits |= get_bit(scalars[num], i + 3) << 4;
 1459|      0|                bits |= get_bit(scalars[num], i + 2) << 3;
 1460|      0|                bits |= get_bit(scalars[num], i + 1) << 2;
 1461|      0|                bits |= get_bit(scalars[num], i) << 1;
 1462|      0|                bits |= get_bit(scalars[num], i - 1);
 1463|      0|                ossl_ec_GFp_nistp_recode_scalar_bits(&sign, &digit, bits);
 1464|       |
 1465|       |                /*
 1466|       |                 * select the point to add or subtract, in constant time
 1467|       |                 */
 1468|      0|                select_point(digit, 17, pre_comp[num], tmp);
 1469|      0|                felem_neg(tmp[3], tmp[1]); /* (X, -Y, Z) is the negative
 1470|       |                                            * point */
 1471|      0|                copy_conditional(tmp[1], tmp[3], (-(limb)sign));
 1472|       |
 1473|      0|                if (!skip) {
  ------------------
  |  Branch (1473:21): [True: 0, False: 0]
  ------------------
 1474|      0|                    point_add(nq[0], nq[1], nq[2],
 1475|      0|                        nq[0], nq[1], nq[2], mixed,
 1476|      0|                        tmp[0], tmp[1], tmp[2]);
 1477|      0|                } else {
 1478|      0|                    memcpy(nq, tmp, 3 * sizeof(felem));
 1479|      0|                    skip = 0;
 1480|      0|                }
 1481|      0|            }
 1482|      0|        }
 1483|  1.58k|    }
 1484|     16|    felem_assign(x_out, nq[0]);
 1485|     16|    felem_assign(y_out, nq[1]);
 1486|     16|    felem_assign(z_out, nq[2]);
 1487|     16|}
ecp_nistp384.c:get_bit:
 1392|  6.14k|{
 1393|  6.14k|    if (i < 0 || i >= 384)
  ------------------
  |  Branch (1393:9): [True: 0, False: 6.14k]
  |  Branch (1393:18): [True: 0, False: 6.14k]
  ------------------
 1394|      0|        return 0;
 1395|  6.14k|    return (in[i >> 3] >> (i & 7)) & 1;
 1396|  6.14k|}
ecp_nistp384.c:select_point:
 1370|  1.58k|{
 1371|  1.58k|    unsigned int i, j;
 1372|  1.58k|    limb *outlimbs = &out[0][0];
 1373|       |
 1374|  1.58k|    memset(out, 0, sizeof(*out) * 3);
 1375|       |
 1376|  26.9k|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1376:17): [True: 25.3k, False: 1.58k]
  ------------------
 1377|  25.3k|        const limb *inlimbs = &pre_comp[i][0][0];
 1378|  25.3k|        limb mask = i ^ idx;
 1379|       |
 1380|  25.3k|        mask |= mask >> 4;
 1381|  25.3k|        mask |= mask >> 2;
 1382|  25.3k|        mask |= mask >> 1;
 1383|  25.3k|        mask &= 1;
 1384|  25.3k|        mask--;
 1385|   557k|        for (j = 0; j < NLIMBS * 3; j++)
  ------------------
  |  |  105|   557k|#define NLIMBS 7
  ------------------
  |  Branch (1385:21): [True: 532k, False: 25.3k]
  ------------------
 1386|   532k|            outlimbs[j] |= inlimbs[j] & mask;
 1387|  25.3k|    }
 1388|  1.58k|}

EC_GFp_nistp521_method:
 1588|  4.21k|{
 1589|  4.21k|    static const EC_METHOD ret = {
 1590|  4.21k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|  4.21k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1591|  4.21k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|  4.21k|#define NID_X9_62_prime_field           406
  ------------------
 1592|  4.21k|        ossl_ec_GFp_nistp521_group_init,
 1593|  4.21k|        ossl_ec_GFp_simple_group_finish,
 1594|  4.21k|        ossl_ec_GFp_simple_group_clear_finish,
 1595|  4.21k|        ossl_ec_GFp_nist_group_copy,
 1596|  4.21k|        ossl_ec_GFp_nistp521_group_set_curve,
 1597|  4.21k|        ossl_ec_GFp_simple_group_get_curve,
 1598|  4.21k|        ossl_ec_GFp_simple_group_get_degree,
 1599|  4.21k|        ossl_ec_group_simple_order_bits,
 1600|  4.21k|        ossl_ec_GFp_simple_group_check_discriminant,
 1601|  4.21k|        ossl_ec_GFp_simple_point_init,
 1602|  4.21k|        ossl_ec_GFp_simple_point_finish,
 1603|  4.21k|        ossl_ec_GFp_simple_point_clear_finish,
 1604|  4.21k|        ossl_ec_GFp_simple_point_copy,
 1605|  4.21k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1606|  4.21k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1607|  4.21k|        ossl_ec_GFp_nistp521_point_get_affine_coordinates,
 1608|  4.21k|        0 /* point_set_compressed_coordinates */,
 1609|  4.21k|        0 /* point2oct */,
 1610|  4.21k|        0 /* oct2point */,
 1611|  4.21k|        ossl_ec_GFp_simple_add,
 1612|  4.21k|        ossl_ec_GFp_simple_dbl,
 1613|  4.21k|        ossl_ec_GFp_simple_invert,
 1614|  4.21k|        ossl_ec_GFp_simple_is_at_infinity,
 1615|  4.21k|        ossl_ec_GFp_simple_is_on_curve,
 1616|  4.21k|        ossl_ec_GFp_simple_cmp,
 1617|  4.21k|        ossl_ec_GFp_simple_make_affine,
 1618|  4.21k|        ossl_ec_GFp_simple_points_make_affine,
 1619|  4.21k|        ossl_ec_GFp_nistp521_points_mul,
 1620|  4.21k|        ossl_ec_GFp_nistp521_precompute_mult,
 1621|  4.21k|        ossl_ec_GFp_nistp521_have_precompute_mult,
 1622|  4.21k|        ossl_ec_GFp_nist_field_mul,
 1623|  4.21k|        ossl_ec_GFp_nist_field_sqr,
 1624|  4.21k|        0 /* field_div */,
 1625|  4.21k|        ossl_ec_GFp_simple_field_inv,
 1626|  4.21k|        0 /* field_encode */,
 1627|  4.21k|        0 /* field_decode */,
 1628|  4.21k|        0, /* field_set_to_one */
 1629|  4.21k|        ossl_ec_key_simple_priv2oct,
 1630|  4.21k|        ossl_ec_key_simple_oct2priv,
 1631|  4.21k|        0, /* set private */
 1632|  4.21k|        ossl_ec_key_simple_generate_key,
 1633|  4.21k|        ossl_ec_key_simple_check_key,
 1634|  4.21k|        ossl_ec_key_simple_generate_public_key,
 1635|  4.21k|        0, /* keycopy */
 1636|  4.21k|        0, /* keyfinish */
 1637|  4.21k|        ossl_ecdh_simple_compute_key,
 1638|  4.21k|        ossl_ecdsa_simple_sign_setup,
 1639|  4.21k|        ossl_ecdsa_simple_sign_sig,
 1640|  4.21k|        ossl_ecdsa_simple_verify_sig,
 1641|  4.21k|        0, /* field_inverse_mod_ord */
 1642|  4.21k|        0, /* blind_coordinates */
 1643|  4.21k|        0, /* ladder_pre */
 1644|  4.21k|        0, /* ladder_step */
 1645|  4.21k|        0 /* ladder_post */
 1646|  4.21k|    };
 1647|       |
 1648|  4.21k|    return &ret;
 1649|  4.21k|}
ossl_ec_GFp_nistp521_group_init:
 1701|  8.42k|{
 1702|  8.42k|    int ret;
 1703|  8.42k|    ret = ossl_ec_GFp_simple_group_init(group);
 1704|  8.42k|    group->a_is_minus3 = 1;
 1705|  8.42k|    return ret;
 1706|  8.42k|}
ossl_ec_GFp_nistp521_group_set_curve:
 1711|  4.21k|{
 1712|  4.21k|    int ret = 0;
 1713|  4.21k|    BIGNUM *curve_p, *curve_a, *curve_b;
 1714|  4.21k|#ifndef FIPS_MODULE
 1715|  4.21k|    BN_CTX *new_ctx = NULL;
 1716|       |
 1717|  4.21k|    if (ctx == NULL)
  ------------------
  |  Branch (1717:9): [True: 0, False: 4.21k]
  ------------------
 1718|      0|        ctx = new_ctx = BN_CTX_new();
 1719|  4.21k|#endif
 1720|  4.21k|    if (ctx == NULL)
  ------------------
  |  Branch (1720:9): [True: 0, False: 4.21k]
  ------------------
 1721|      0|        return 0;
 1722|       |
 1723|  4.21k|    BN_CTX_start(ctx);
 1724|  4.21k|    curve_p = BN_CTX_get(ctx);
 1725|  4.21k|    curve_a = BN_CTX_get(ctx);
 1726|  4.21k|    curve_b = BN_CTX_get(ctx);
 1727|  4.21k|    if (curve_b == NULL)
  ------------------
  |  Branch (1727:9): [True: 0, False: 4.21k]
  ------------------
 1728|      0|        goto err;
 1729|  4.21k|    BN_bin2bn(nistp521_curve_params[0], sizeof(felem_bytearray), curve_p);
 1730|  4.21k|    BN_bin2bn(nistp521_curve_params[1], sizeof(felem_bytearray), curve_a);
 1731|  4.21k|    BN_bin2bn(nistp521_curve_params[2], sizeof(felem_bytearray), curve_b);
 1732|  4.21k|    if ((BN_cmp(curve_p, p)) || (BN_cmp(curve_a, a)) || (BN_cmp(curve_b, b))) {
  ------------------
  |  Branch (1732:9): [True: 0, False: 4.21k]
  |  Branch (1732:33): [True: 0, False: 4.21k]
  |  Branch (1732:57): [True: 0, False: 4.21k]
  ------------------
 1733|      0|        ERR_raise(ERR_LIB_EC, EC_R_WRONG_CURVE_PARAMETERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1734|      0|        goto err;
 1735|      0|    }
 1736|  4.21k|    group->field_mod_func = BN_nist_mod_521;
 1737|  4.21k|    ret = ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx);
 1738|  4.21k|err:
 1739|  4.21k|    BN_CTX_end(ctx);
 1740|  4.21k|#ifndef FIPS_MODULE
 1741|  4.21k|    BN_CTX_free(new_ctx);
 1742|  4.21k|#endif
 1743|  4.21k|    return ret;
 1744|  4.21k|}
ossl_ec_GFp_nistp521_point_get_affine_coordinates:
 1754|     54|{
 1755|     54|    felem z1, z2, x_in, y_in, x_out, y_out;
 1756|     54|    largefelem tmp;
 1757|       |
 1758|     54|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (1758:9): [True: 0, False: 54]
  ------------------
 1759|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1760|      0|        return 0;
 1761|      0|    }
 1762|     54|    if ((!BN_to_felem(x_in, point->X)) || (!BN_to_felem(y_in, point->Y)) || (!BN_to_felem(z1, point->Z)))
  ------------------
  |  Branch (1762:9): [True: 0, False: 54]
  |  Branch (1762:43): [True: 0, False: 54]
  |  Branch (1762:77): [True: 0, False: 54]
  ------------------
 1763|      0|        return 0;
 1764|     54|    felem_inv(z2, z1);
 1765|     54|    felem_square(tmp, z2);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
 1766|     54|    felem_reduce(z1, tmp);
 1767|     54|    felem_mul(tmp, x_in, z1);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
 1768|     54|    felem_reduce(x_in, tmp);
 1769|     54|    felem_contract(x_out, x_in);
 1770|     54|    if (x != NULL) {
  ------------------
  |  Branch (1770:9): [True: 54, False: 0]
  ------------------
 1771|     54|        if (!felem_to_BN(x, x_out)) {
  ------------------
  |  Branch (1771:13): [True: 0, False: 54]
  ------------------
 1772|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1773|      0|            return 0;
 1774|      0|        }
 1775|     54|    }
 1776|     54|    felem_mul(tmp, z1, z2);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
 1777|     54|    felem_reduce(z1, tmp);
 1778|     54|    felem_mul(tmp, y_in, z1);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
 1779|     54|    felem_reduce(y_in, tmp);
 1780|     54|    felem_contract(y_out, y_in);
 1781|     54|    if (y != NULL) {
  ------------------
  |  Branch (1781:9): [True: 54, False: 0]
  ------------------
 1782|     54|        if (!felem_to_BN(y, y_out)) {
  ------------------
  |  Branch (1782:13): [True: 0, False: 54]
  ------------------
 1783|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1784|      0|            return 0;
 1785|      0|        }
 1786|     54|    }
 1787|     54|    return 1;
 1788|     54|}
ossl_ec_GFp_nistp521_points_mul:
 1828|     54|{
 1829|     54|    int ret = 0;
 1830|     54|    int j;
 1831|     54|    int mixed = 0;
 1832|     54|    BIGNUM *x, *y, *z, *tmp_scalar;
 1833|     54|    felem_bytearray g_secret;
 1834|     54|    felem_bytearray *secrets = NULL;
 1835|     54|    felem(*pre_comp)[17][3] = NULL;
 1836|     54|    felem *tmp_felems = NULL;
 1837|     54|    unsigned i;
 1838|     54|    int num_bytes;
 1839|     54|    int have_pre_comp = 0;
 1840|     54|    size_t num_points = num;
 1841|     54|    felem x_in, y_in, z_in, x_out, y_out, z_out;
 1842|     54|    NISTP521_PRE_COMP *pre = NULL;
 1843|     54|    felem(*g_pre_comp)[3] = NULL;
 1844|     54|    EC_POINT *generator = NULL;
 1845|     54|    const EC_POINT *p = NULL;
 1846|     54|    const BIGNUM *p_scalar = NULL;
 1847|       |
 1848|     54|    BN_CTX_start(ctx);
 1849|     54|    x = BN_CTX_get(ctx);
 1850|     54|    y = BN_CTX_get(ctx);
 1851|     54|    z = BN_CTX_get(ctx);
 1852|     54|    tmp_scalar = BN_CTX_get(ctx);
 1853|     54|    if (tmp_scalar == NULL)
  ------------------
  |  Branch (1853:9): [True: 0, False: 54]
  ------------------
 1854|      0|        goto err;
 1855|       |
 1856|     54|    if (scalar != NULL) {
  ------------------
  |  Branch (1856:9): [True: 54, False: 0]
  ------------------
 1857|     54|        pre = group->pre_comp.nistp521;
 1858|     54|        if (pre)
  ------------------
  |  Branch (1858:13): [True: 0, False: 54]
  ------------------
 1859|       |            /* we have precomputation, try to use it */
 1860|      0|            g_pre_comp = &pre->g_pre_comp[0];
 1861|     54|        else
 1862|       |            /* try to use the standard precomputation */
 1863|     54|            g_pre_comp = (felem(*)[3])gmul;
 1864|     54|        generator = EC_POINT_new(group);
 1865|     54|        if (generator == NULL)
  ------------------
  |  Branch (1865:13): [True: 0, False: 54]
  ------------------
 1866|      0|            goto err;
 1867|       |        /* get the generator from precomputation */
 1868|     54|        if (!felem_to_BN(x, g_pre_comp[1][0]) || !felem_to_BN(y, g_pre_comp[1][1]) || !felem_to_BN(z, g_pre_comp[1][2])) {
  ------------------
  |  Branch (1868:13): [True: 0, False: 54]
  |  Branch (1868:50): [True: 0, False: 54]
  |  Branch (1868:87): [True: 0, False: 54]
  ------------------
 1869|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1870|      0|            goto err;
 1871|      0|        }
 1872|     54|        if (!ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group,
  ------------------
  |  Branch (1872:13): [True: 0, False: 54]
  ------------------
 1873|     54|                generator,
 1874|     54|                x, y, z, ctx))
 1875|      0|            goto err;
 1876|     54|        if (0 == EC_POINT_cmp(group, generator, group->generator, ctx))
  ------------------
  |  Branch (1876:13): [True: 54, False: 0]
  ------------------
 1877|       |            /* precomputation matches generator */
 1878|     54|            have_pre_comp = 1;
 1879|      0|        else
 1880|       |            /*
 1881|       |             * we don't have valid precomputation: treat the generator as a
 1882|       |             * random point
 1883|       |             */
 1884|      0|            num_points++;
 1885|     54|    }
 1886|       |
 1887|     54|    if (num_points > 0) {
  ------------------
  |  Branch (1887:9): [True: 0, False: 54]
  ------------------
 1888|      0|        if (num_points >= 2) {
  ------------------
  |  Branch (1888:13): [True: 0, False: 0]
  ------------------
 1889|       |            /*
 1890|       |             * unless we precompute multiples for just one point, converting
 1891|       |             * those into affine form is time well spent
 1892|       |             */
 1893|      0|            mixed = 1;
 1894|      0|        }
 1895|      0|        secrets = OPENSSL_calloc(num_points, sizeof(*secrets));
  ------------------
  |  |  113|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1896|      0|        pre_comp = OPENSSL_calloc(num_points, sizeof(*pre_comp));
  ------------------
  |  |  113|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1897|      0|        if (mixed)
  ------------------
  |  Branch (1897:13): [True: 0, False: 0]
  ------------------
 1898|      0|            tmp_felems = OPENSSL_malloc_array(num_points * 17 + 1, sizeof(*tmp_felems));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1899|      0|        if ((secrets == NULL) || (pre_comp == NULL)
  ------------------
  |  Branch (1899:13): [True: 0, False: 0]
  |  Branch (1899:34): [True: 0, False: 0]
  ------------------
 1900|      0|            || (mixed && (tmp_felems == NULL)))
  ------------------
  |  Branch (1900:17): [True: 0, False: 0]
  |  Branch (1900:26): [True: 0, False: 0]
  ------------------
 1901|      0|            goto err;
 1902|       |
 1903|       |        /*
 1904|       |         * we treat NULL scalars as 0, and NULL points as points at infinity,
 1905|       |         * i.e., they contribute nothing to the linear combination
 1906|       |         */
 1907|      0|        for (i = 0; i < num_points; ++i) {
  ------------------
  |  Branch (1907:21): [True: 0, False: 0]
  ------------------
 1908|      0|            if (i == num) {
  ------------------
  |  Branch (1908:17): [True: 0, False: 0]
  ------------------
 1909|       |                /*
 1910|       |                 * we didn't have a valid precomputation, so we pick the
 1911|       |                 * generator
 1912|       |                 */
 1913|      0|                p = EC_GROUP_get0_generator(group);
 1914|      0|                p_scalar = scalar;
 1915|      0|            } else {
 1916|       |                /* the i^th point */
 1917|      0|                p = points[i];
 1918|      0|                p_scalar = scalars[i];
 1919|      0|            }
 1920|      0|            if ((p_scalar != NULL) && (p != NULL)) {
  ------------------
  |  Branch (1920:17): [True: 0, False: 0]
  |  Branch (1920:39): [True: 0, False: 0]
  ------------------
 1921|       |                /* reduce scalar to 0 <= scalar < 2^521 */
 1922|      0|                if ((BN_num_bits(p_scalar) > 521)
  ------------------
  |  Branch (1922:21): [True: 0, False: 0]
  ------------------
 1923|      0|                    || (BN_is_negative(p_scalar))) {
  ------------------
  |  Branch (1923:24): [True: 0, False: 0]
  ------------------
 1924|       |                    /*
 1925|       |                     * this is an unusual input, and we don't guarantee
 1926|       |                     * constant-timeness
 1927|       |                     */
 1928|      0|                    if (!BN_nnmod(tmp_scalar, p_scalar, group->order, ctx)) {
  ------------------
  |  Branch (1928:25): [True: 0, False: 0]
  ------------------
 1929|      0|                        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1930|      0|                        goto err;
 1931|      0|                    }
 1932|      0|                    num_bytes = BN_bn2lebinpad(tmp_scalar,
 1933|      0|                        secrets[i], sizeof(secrets[i]));
 1934|      0|                } else {
 1935|      0|                    num_bytes = BN_bn2lebinpad(p_scalar,
 1936|      0|                        secrets[i], sizeof(secrets[i]));
 1937|      0|                }
 1938|      0|                if (num_bytes < 0) {
  ------------------
  |  Branch (1938:21): [True: 0, False: 0]
  ------------------
 1939|      0|                    ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1940|      0|                    goto err;
 1941|      0|                }
 1942|       |                /* precompute multiples */
 1943|      0|                if ((!BN_to_felem(x_out, p->X)) || (!BN_to_felem(y_out, p->Y)) || (!BN_to_felem(z_out, p->Z)))
  ------------------
  |  Branch (1943:21): [True: 0, False: 0]
  |  Branch (1943:52): [True: 0, False: 0]
  |  Branch (1943:83): [True: 0, False: 0]
  ------------------
 1944|      0|                    goto err;
 1945|      0|                memcpy(pre_comp[i][1][0], x_out, sizeof(felem));
 1946|      0|                memcpy(pre_comp[i][1][1], y_out, sizeof(felem));
 1947|      0|                memcpy(pre_comp[i][1][2], z_out, sizeof(felem));
 1948|      0|                for (j = 2; j <= 16; ++j) {
  ------------------
  |  Branch (1948:29): [True: 0, False: 0]
  ------------------
 1949|      0|                    if (j & 1) {
  ------------------
  |  Branch (1949:25): [True: 0, False: 0]
  ------------------
 1950|      0|                        point_add(pre_comp[i][j][0], pre_comp[i][j][1],
 1951|      0|                            pre_comp[i][j][2], pre_comp[i][1][0],
 1952|      0|                            pre_comp[i][1][1], pre_comp[i][1][2], 0,
 1953|      0|                            pre_comp[i][j - 1][0],
 1954|      0|                            pre_comp[i][j - 1][1],
 1955|      0|                            pre_comp[i][j - 1][2]);
 1956|      0|                    } else {
 1957|      0|                        point_double(pre_comp[i][j][0], pre_comp[i][j][1],
 1958|      0|                            pre_comp[i][j][2], pre_comp[i][j / 2][0],
 1959|      0|                            pre_comp[i][j / 2][1],
 1960|      0|                            pre_comp[i][j / 2][2]);
 1961|      0|                    }
 1962|      0|                }
 1963|      0|            }
 1964|      0|        }
 1965|      0|        if (mixed)
  ------------------
  |  Branch (1965:13): [True: 0, False: 0]
  ------------------
 1966|      0|            make_points_affine(num_points * 17, pre_comp[0], tmp_felems);
 1967|      0|    }
 1968|       |
 1969|       |    /* the scalar for the generator */
 1970|     54|    if ((scalar != NULL) && (have_pre_comp)) {
  ------------------
  |  Branch (1970:9): [True: 54, False: 0]
  |  Branch (1970:29): [True: 54, False: 0]
  ------------------
 1971|     54|        memset(g_secret, 0, sizeof(g_secret));
 1972|       |        /* reduce scalar to 0 <= scalar < 2^521 */
 1973|     54|        if ((BN_num_bits(scalar) > 521) || (BN_is_negative(scalar))) {
  ------------------
  |  Branch (1973:13): [True: 0, False: 54]
  |  Branch (1973:44): [True: 0, False: 54]
  ------------------
 1974|       |            /*
 1975|       |             * this is an unusual input, and we don't guarantee
 1976|       |             * constant-timeness
 1977|       |             */
 1978|      0|            if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
  ------------------
  |  Branch (1978:17): [True: 0, False: 0]
  ------------------
 1979|      0|                ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1980|      0|                goto err;
 1981|      0|            }
 1982|      0|            num_bytes = BN_bn2lebinpad(tmp_scalar, g_secret, sizeof(g_secret));
 1983|     54|        } else {
 1984|     54|            num_bytes = BN_bn2lebinpad(scalar, g_secret, sizeof(g_secret));
 1985|     54|        }
 1986|       |        /* do the multiplication with generator precomputation */
 1987|     54|        batch_mul(x_out, y_out, z_out,
 1988|     54|            (const felem_bytearray(*))secrets, num_points,
 1989|     54|            g_secret,
 1990|     54|            mixed, (const felem(*)[17][3])pre_comp,
 1991|     54|            (const felem(*)[3])g_pre_comp);
 1992|     54|    } else {
 1993|       |        /* do the multiplication without generator precomputation */
 1994|      0|        batch_mul(x_out, y_out, z_out,
 1995|      0|            (const felem_bytearray(*))secrets, num_points,
 1996|      0|            NULL, mixed, (const felem(*)[17][3])pre_comp, NULL);
 1997|      0|    }
 1998|       |    /* reduce the output to its unique minimal representation */
 1999|     54|    felem_contract(x_in, x_out);
 2000|     54|    felem_contract(y_in, y_out);
 2001|     54|    felem_contract(z_in, z_out);
 2002|     54|    if ((!felem_to_BN(x, x_in)) || (!felem_to_BN(y, y_in)) || (!felem_to_BN(z, z_in))) {
  ------------------
  |  Branch (2002:9): [True: 0, False: 54]
  |  Branch (2002:36): [True: 0, False: 54]
  |  Branch (2002:63): [True: 0, False: 54]
  ------------------
 2003|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2004|      0|        goto err;
 2005|      0|    }
 2006|     54|    ret = ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group, r, x, y, z,
 2007|     54|        ctx);
 2008|       |
 2009|     54|err:
 2010|     54|    BN_CTX_end(ctx);
 2011|     54|    EC_POINT_free(generator);
 2012|     54|    OPENSSL_free(secrets);
  ------------------
  |  |  132|     54|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2013|     54|    OPENSSL_free(pre_comp);
  ------------------
  |  |  132|     54|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2014|     54|    OPENSSL_free(tmp_felems);
  ------------------
  |  |  132|     54|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2015|     54|    return ret;
 2016|     54|}
ecp_nistp521.c:BN_to_felem:
  176|    162|{
  177|    162|    felem_bytearray b_out;
  178|    162|    int num_bytes;
  179|       |
  180|    162|    if (BN_is_negative(bn)) {
  ------------------
  |  Branch (180:9): [True: 0, False: 162]
  ------------------
  181|      0|        ERR_raise(ERR_LIB_EC, EC_R_BIGNUM_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  182|      0|        return 0;
  183|      0|    }
  184|    162|    num_bytes = BN_bn2lebinpad(bn, b_out, sizeof(b_out));
  185|    162|    if (num_bytes < 0) {
  ------------------
  |  Branch (185:9): [True: 0, False: 162]
  ------------------
  186|      0|        ERR_raise(ERR_LIB_EC, EC_R_BIGNUM_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  187|      0|        return 0;
  188|      0|    }
  189|    162|    bin66_to_felem(out, b_out);
  190|    162|    return 1;
  191|    162|}
ecp_nistp521.c:bin66_to_felem:
  144|    162|{
  145|    162|    out[0] = (*((limb *)&in[0])) & bottom58bits;
  146|    162|    out[1] = (*((limb_aX *)&in[7]) >> 2) & bottom58bits;
  147|    162|    out[2] = (*((limb_aX *)&in[14]) >> 4) & bottom58bits;
  148|    162|    out[3] = (*((limb_aX *)&in[21]) >> 6) & bottom58bits;
  149|    162|    out[4] = (*((limb_aX *)&in[29])) & bottom58bits;
  150|    162|    out[5] = (*((limb_aX *)&in[36]) >> 2) & bottom58bits;
  151|    162|    out[6] = (*((limb_aX *)&in[43]) >> 4) & bottom58bits;
  152|    162|    out[7] = (*((limb_aX *)&in[50]) >> 6) & bottom58bits;
  153|    162|    out[8] = (*((limb_aX *)&in[58])) & bottom57bits;
  154|    162|}
ecp_nistp521.c:felem_inv:
  669|     54|{
  670|     54|    felem ftmp, ftmp2, ftmp3, ftmp4;
  671|     54|    largefelem tmp;
  672|     54|    unsigned i;
  673|       |
  674|     54|    felem_square(tmp, in);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  675|     54|    felem_reduce(ftmp, tmp); /* 2^1 */
  676|     54|    felem_mul(tmp, in, ftmp);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  677|     54|    felem_reduce(ftmp, tmp); /* 2^2 - 2^0 */
  678|     54|    felem_assign(ftmp2, ftmp);
  679|     54|    felem_square(tmp, ftmp);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  680|     54|    felem_reduce(ftmp, tmp); /* 2^3 - 2^1 */
  681|     54|    felem_mul(tmp, in, ftmp);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  682|     54|    felem_reduce(ftmp, tmp); /* 2^3 - 2^0 */
  683|     54|    felem_square(tmp, ftmp);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  684|     54|    felem_reduce(ftmp, tmp); /* 2^4 - 2^1 */
  685|       |
  686|     54|    felem_square(tmp, ftmp2);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  687|     54|    felem_reduce(ftmp3, tmp); /* 2^3 - 2^1 */
  688|     54|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  689|     54|    felem_reduce(ftmp3, tmp); /* 2^4 - 2^2 */
  690|     54|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  691|     54|    felem_reduce(ftmp3, tmp); /* 2^4 - 2^0 */
  692|       |
  693|     54|    felem_assign(ftmp2, ftmp3);
  694|     54|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  695|     54|    felem_reduce(ftmp3, tmp); /* 2^5 - 2^1 */
  696|     54|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  697|     54|    felem_reduce(ftmp3, tmp); /* 2^6 - 2^2 */
  698|     54|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  699|     54|    felem_reduce(ftmp3, tmp); /* 2^7 - 2^3 */
  700|     54|    felem_square(tmp, ftmp3);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  701|     54|    felem_reduce(ftmp3, tmp); /* 2^8 - 2^4 */
  702|     54|    felem_mul(tmp, ftmp3, ftmp);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  703|     54|    felem_reduce(ftmp4, tmp); /* 2^8 - 2^1 */
  704|     54|    felem_square(tmp, ftmp4);
  ------------------
  |  |  642|     54|#define felem_square felem_square_ref
  ------------------
  705|     54|    felem_reduce(ftmp4, tmp); /* 2^9 - 2^2 */
  706|     54|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  707|     54|    felem_reduce(ftmp3, tmp); /* 2^8 - 2^0 */
  708|     54|    felem_assign(ftmp2, ftmp3);
  709|       |
  710|    486|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (710:17): [True: 432, False: 54]
  ------------------
  711|    432|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|    432|#define felem_square felem_square_ref
  ------------------
  712|    432|        felem_reduce(ftmp3, tmp); /* 2^16 - 2^8 */
  713|    432|    }
  714|     54|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  715|     54|    felem_reduce(ftmp3, tmp); /* 2^16 - 2^0 */
  716|     54|    felem_assign(ftmp2, ftmp3);
  717|       |
  718|    918|    for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (718:17): [True: 864, False: 54]
  ------------------
  719|    864|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|    864|#define felem_square felem_square_ref
  ------------------
  720|    864|        felem_reduce(ftmp3, tmp); /* 2^32 - 2^16 */
  721|    864|    }
  722|     54|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  723|     54|    felem_reduce(ftmp3, tmp); /* 2^32 - 2^0 */
  724|     54|    felem_assign(ftmp2, ftmp3);
  725|       |
  726|  1.78k|    for (i = 0; i < 32; i++) {
  ------------------
  |  Branch (726:17): [True: 1.72k, False: 54]
  ------------------
  727|  1.72k|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|  1.72k|#define felem_square felem_square_ref
  ------------------
  728|  1.72k|        felem_reduce(ftmp3, tmp); /* 2^64 - 2^32 */
  729|  1.72k|    }
  730|     54|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  731|     54|    felem_reduce(ftmp3, tmp); /* 2^64 - 2^0 */
  732|     54|    felem_assign(ftmp2, ftmp3);
  733|       |
  734|  3.51k|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (734:17): [True: 3.45k, False: 54]
  ------------------
  735|  3.45k|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|  3.45k|#define felem_square felem_square_ref
  ------------------
  736|  3.45k|        felem_reduce(ftmp3, tmp); /* 2^128 - 2^64 */
  737|  3.45k|    }
  738|     54|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  739|     54|    felem_reduce(ftmp3, tmp); /* 2^128 - 2^0 */
  740|     54|    felem_assign(ftmp2, ftmp3);
  741|       |
  742|  6.96k|    for (i = 0; i < 128; i++) {
  ------------------
  |  Branch (742:17): [True: 6.91k, False: 54]
  ------------------
  743|  6.91k|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|  6.91k|#define felem_square felem_square_ref
  ------------------
  744|  6.91k|        felem_reduce(ftmp3, tmp); /* 2^256 - 2^128 */
  745|  6.91k|    }
  746|     54|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  747|     54|    felem_reduce(ftmp3, tmp); /* 2^256 - 2^0 */
  748|     54|    felem_assign(ftmp2, ftmp3);
  749|       |
  750|  13.8k|    for (i = 0; i < 256; i++) {
  ------------------
  |  Branch (750:17): [True: 13.8k, False: 54]
  ------------------
  751|  13.8k|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|  13.8k|#define felem_square felem_square_ref
  ------------------
  752|  13.8k|        felem_reduce(ftmp3, tmp); /* 2^512 - 2^256 */
  753|  13.8k|    }
  754|     54|    felem_mul(tmp, ftmp3, ftmp2);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  755|     54|    felem_reduce(ftmp3, tmp); /* 2^512 - 2^0 */
  756|       |
  757|    540|    for (i = 0; i < 9; i++) {
  ------------------
  |  Branch (757:17): [True: 486, False: 54]
  ------------------
  758|    486|        felem_square(tmp, ftmp3);
  ------------------
  |  |  642|    486|#define felem_square felem_square_ref
  ------------------
  759|    486|        felem_reduce(ftmp3, tmp); /* 2^521 - 2^9 */
  760|    486|    }
  761|     54|    felem_mul(tmp, ftmp3, ftmp4);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  762|     54|    felem_reduce(ftmp3, tmp); /* 2^521 - 2^2 */
  763|     54|    felem_mul(tmp, ftmp3, in);
  ------------------
  |  |  643|     54|#define felem_mul felem_mul_ref
  ------------------
  764|     54|    felem_reduce(out, tmp); /* 2^521 - 3 */
  765|     54|}
ecp_nistp521.c:felem_assign:
  220|   106k|{
  221|   106k|    out[0] = in[0];
  222|   106k|    out[1] = in[1];
  223|   106k|    out[2] = in[2];
  224|   106k|    out[3] = in[3];
  225|   106k|    out[4] = in[4];
  226|   106k|    out[5] = in[5];
  227|   106k|    out[6] = in[6];
  228|   106k|    out[7] = in[7];
  229|   106k|    out[8] = in[8];
  230|   106k|}
ecp_nistp521.c:felem_square_ref:
  403|  84.4k|{
  404|  84.4k|    felem inx2, inx4;
  405|  84.4k|    felem_scalar(inx2, in, 2);
  406|  84.4k|    felem_scalar(inx4, in, 4);
  407|       |
  408|       |    /*-
  409|       |     * We have many cases were we want to do
  410|       |     *   in[x] * in[y] +
  411|       |     *   in[y] * in[x]
  412|       |     * This is obviously just
  413|       |     *   2 * in[x] * in[y]
  414|       |     * However, rather than do the doubling on the 128 bit result, we
  415|       |     * double one of the inputs to the multiplication by reading from
  416|       |     * |inx2|
  417|       |     */
  418|       |
  419|  84.4k|    out[0] = ((uint128_t)in[0]) * in[0];
  420|  84.4k|    out[1] = ((uint128_t)in[0]) * inx2[1];
  421|  84.4k|    out[2] = ((uint128_t)in[0]) * inx2[2] + ((uint128_t)in[1]) * in[1];
  422|  84.4k|    out[3] = ((uint128_t)in[0]) * inx2[3] + ((uint128_t)in[1]) * inx2[2];
  423|  84.4k|    out[4] = ((uint128_t)in[0]) * inx2[4] + ((uint128_t)in[1]) * inx2[3] + ((uint128_t)in[2]) * in[2];
  424|  84.4k|    out[5] = ((uint128_t)in[0]) * inx2[5] + ((uint128_t)in[1]) * inx2[4] + ((uint128_t)in[2]) * inx2[3];
  425|  84.4k|    out[6] = ((uint128_t)in[0]) * inx2[6] + ((uint128_t)in[1]) * inx2[5] + ((uint128_t)in[2]) * inx2[4] + ((uint128_t)in[3]) * in[3];
  426|  84.4k|    out[7] = ((uint128_t)in[0]) * inx2[7] + ((uint128_t)in[1]) * inx2[6] + ((uint128_t)in[2]) * inx2[5] + ((uint128_t)in[3]) * inx2[4];
  427|  84.4k|    out[8] = ((uint128_t)in[0]) * inx2[8] + ((uint128_t)in[1]) * inx2[7] + ((uint128_t)in[2]) * inx2[6] + ((uint128_t)in[3]) * inx2[5] + ((uint128_t)in[4]) * in[4];
  428|       |
  429|       |    /*
  430|       |     * The remaining limbs fall above 2^521, with the first falling at 2^522.
  431|       |     * They correspond to locations one bit up from the limbs produced above
  432|       |     * so we would have to multiply by two to align them. Again, rather than
  433|       |     * operate on the 128-bit result, we double one of the inputs to the
  434|       |     * multiplication. If we want to double for both this reason, and the
  435|       |     * reason above, then we end up multiplying by four.
  436|       |     */
  437|       |
  438|       |    /* 9 */
  439|  84.4k|    out[0] += ((uint128_t)in[1]) * inx4[8] + ((uint128_t)in[2]) * inx4[7] + ((uint128_t)in[3]) * inx4[6] + ((uint128_t)in[4]) * inx4[5];
  440|       |
  441|       |    /* 10 */
  442|  84.4k|    out[1] += ((uint128_t)in[2]) * inx4[8] + ((uint128_t)in[3]) * inx4[7] + ((uint128_t)in[4]) * inx4[6] + ((uint128_t)in[5]) * inx2[5];
  443|       |
  444|       |    /* 11 */
  445|  84.4k|    out[2] += ((uint128_t)in[3]) * inx4[8] + ((uint128_t)in[4]) * inx4[7] + ((uint128_t)in[5]) * inx4[6];
  446|       |
  447|       |    /* 12 */
  448|  84.4k|    out[3] += ((uint128_t)in[4]) * inx4[8] + ((uint128_t)in[5]) * inx4[7] + ((uint128_t)in[6]) * inx2[6];
  449|       |
  450|       |    /* 13 */
  451|  84.4k|    out[4] += ((uint128_t)in[5]) * inx4[8] + ((uint128_t)in[6]) * inx4[7];
  452|       |
  453|       |    /* 14 */
  454|  84.4k|    out[5] += ((uint128_t)in[6]) * inx4[8] + ((uint128_t)in[7]) * inx2[7];
  455|       |
  456|       |    /* 15 */
  457|  84.4k|    out[6] += ((uint128_t)in[7]) * inx4[8];
  458|       |
  459|       |    /* 16 */
  460|  84.4k|    out[7] += ((uint128_t)in[8]) * inx2[8];
  461|  84.4k|}
ecp_nistp521.c:felem_scalar:
  248|   254k|{
  249|   254k|    out[0] = in[0] * scalar;
  250|   254k|    out[1] = in[1] * scalar;
  251|   254k|    out[2] = in[2] * scalar;
  252|   254k|    out[3] = in[3] * scalar;
  253|   254k|    out[4] = in[4] * scalar;
  254|   254k|    out[5] = in[5] * scalar;
  255|   254k|    out[6] = in[6] * scalar;
  256|   254k|    out[7] = in[7] * scalar;
  257|   254k|    out[8] = in[8] * scalar;
  258|   254k|}
ecp_nistp521.c:felem_reduce:
  523|   148k|{
  524|   148k|    u64 overflow1, overflow2;
  525|       |
  526|   148k|    out[0] = ((limb)in[0]) & bottom58bits;
  527|   148k|    out[1] = ((limb)in[1]) & bottom58bits;
  528|   148k|    out[2] = ((limb)in[2]) & bottom58bits;
  529|   148k|    out[3] = ((limb)in[3]) & bottom58bits;
  530|   148k|    out[4] = ((limb)in[4]) & bottom58bits;
  531|   148k|    out[5] = ((limb)in[5]) & bottom58bits;
  532|   148k|    out[6] = ((limb)in[6]) & bottom58bits;
  533|   148k|    out[7] = ((limb)in[7]) & bottom58bits;
  534|   148k|    out[8] = ((limb)in[8]) & bottom58bits;
  535|       |
  536|       |    /* out[i] < 2^58 */
  537|       |
  538|   148k|    out[1] += ((limb)in[0]) >> 58;
  539|   148k|    out[1] += (((limb)(in[0] >> 64)) & bottom52bits) << 6;
  540|       |    /*-
  541|       |     * out[1] < 2^58 + 2^6 + 2^58
  542|       |     *        = 2^59 + 2^6
  543|       |     */
  544|   148k|    out[2] += ((limb)(in[0] >> 64)) >> 52;
  545|       |
  546|   148k|    out[2] += ((limb)in[1]) >> 58;
  547|   148k|    out[2] += (((limb)(in[1] >> 64)) & bottom52bits) << 6;
  548|   148k|    out[3] += ((limb)(in[1] >> 64)) >> 52;
  549|       |
  550|   148k|    out[3] += ((limb)in[2]) >> 58;
  551|   148k|    out[3] += (((limb)(in[2] >> 64)) & bottom52bits) << 6;
  552|   148k|    out[4] += ((limb)(in[2] >> 64)) >> 52;
  553|       |
  554|   148k|    out[4] += ((limb)in[3]) >> 58;
  555|   148k|    out[4] += (((limb)(in[3] >> 64)) & bottom52bits) << 6;
  556|   148k|    out[5] += ((limb)(in[3] >> 64)) >> 52;
  557|       |
  558|   148k|    out[5] += ((limb)in[4]) >> 58;
  559|   148k|    out[5] += (((limb)(in[4] >> 64)) & bottom52bits) << 6;
  560|   148k|    out[6] += ((limb)(in[4] >> 64)) >> 52;
  561|       |
  562|   148k|    out[6] += ((limb)in[5]) >> 58;
  563|   148k|    out[6] += (((limb)(in[5] >> 64)) & bottom52bits) << 6;
  564|   148k|    out[7] += ((limb)(in[5] >> 64)) >> 52;
  565|       |
  566|   148k|    out[7] += ((limb)in[6]) >> 58;
  567|   148k|    out[7] += (((limb)(in[6] >> 64)) & bottom52bits) << 6;
  568|   148k|    out[8] += ((limb)(in[6] >> 64)) >> 52;
  569|       |
  570|   148k|    out[8] += ((limb)in[7]) >> 58;
  571|   148k|    out[8] += (((limb)(in[7] >> 64)) & bottom52bits) << 6;
  572|       |    /*-
  573|       |     * out[x > 1] < 2^58 + 2^6 + 2^58 + 2^12
  574|       |     *            < 2^59 + 2^13
  575|       |     */
  576|   148k|    overflow1 = ((limb)(in[7] >> 64)) >> 52;
  577|       |
  578|   148k|    overflow1 += ((limb)in[8]) >> 58;
  579|   148k|    overflow1 += (((limb)(in[8] >> 64)) & bottom52bits) << 6;
  580|   148k|    overflow2 = ((limb)(in[8] >> 64)) >> 52;
  581|       |
  582|   148k|    overflow1 <<= 1; /* overflow1 < 2^13 + 2^7 + 2^59 */
  583|   148k|    overflow2 <<= 1; /* overflow2 < 2^13 */
  584|       |
  585|   148k|    out[0] += overflow1; /* out[0] < 2^60 */
  586|   148k|    out[1] += overflow2; /* out[1] < 2^59 + 2^6 + 2^13 */
  587|       |
  588|   148k|    out[1] += out[0] >> 58;
  589|   148k|    out[0] &= bottom58bits;
  590|       |    /*-
  591|       |     * out[0] < 2^58
  592|       |     * out[1] < 2^59 + 2^6 + 2^13 + 2^2
  593|       |     *        < 2^59 + 2^14
  594|       |     */
  595|   148k|}
ecp_nistp521.c:felem_mul_ref:
  472|  78.0k|{
  473|  78.0k|    felem in2x2;
  474|  78.0k|    felem_scalar(in2x2, in2, 2);
  475|       |
  476|  78.0k|    out[0] = ((uint128_t)in1[0]) * in2[0];
  477|       |
  478|  78.0k|    out[1] = ((uint128_t)in1[0]) * in2[1] + ((uint128_t)in1[1]) * in2[0];
  479|       |
  480|  78.0k|    out[2] = ((uint128_t)in1[0]) * in2[2] + ((uint128_t)in1[1]) * in2[1] + ((uint128_t)in1[2]) * in2[0];
  481|       |
  482|  78.0k|    out[3] = ((uint128_t)in1[0]) * in2[3] + ((uint128_t)in1[1]) * in2[2] + ((uint128_t)in1[2]) * in2[1] + ((uint128_t)in1[3]) * in2[0];
  483|       |
  484|  78.0k|    out[4] = ((uint128_t)in1[0]) * in2[4] + ((uint128_t)in1[1]) * in2[3] + ((uint128_t)in1[2]) * in2[2] + ((uint128_t)in1[3]) * in2[1] + ((uint128_t)in1[4]) * in2[0];
  485|       |
  486|  78.0k|    out[5] = ((uint128_t)in1[0]) * in2[5] + ((uint128_t)in1[1]) * in2[4] + ((uint128_t)in1[2]) * in2[3] + ((uint128_t)in1[3]) * in2[2] + ((uint128_t)in1[4]) * in2[1] + ((uint128_t)in1[5]) * in2[0];
  487|       |
  488|  78.0k|    out[6] = ((uint128_t)in1[0]) * in2[6] + ((uint128_t)in1[1]) * in2[5] + ((uint128_t)in1[2]) * in2[4] + ((uint128_t)in1[3]) * in2[3] + ((uint128_t)in1[4]) * in2[2] + ((uint128_t)in1[5]) * in2[1] + ((uint128_t)in1[6]) * in2[0];
  489|       |
  490|  78.0k|    out[7] = ((uint128_t)in1[0]) * in2[7] + ((uint128_t)in1[1]) * in2[6] + ((uint128_t)in1[2]) * in2[5] + ((uint128_t)in1[3]) * in2[4] + ((uint128_t)in1[4]) * in2[3] + ((uint128_t)in1[5]) * in2[2] + ((uint128_t)in1[6]) * in2[1] + ((uint128_t)in1[7]) * in2[0];
  491|       |
  492|  78.0k|    out[8] = ((uint128_t)in1[0]) * in2[8] + ((uint128_t)in1[1]) * in2[7] + ((uint128_t)in1[2]) * in2[6] + ((uint128_t)in1[3]) * in2[5] + ((uint128_t)in1[4]) * in2[4] + ((uint128_t)in1[5]) * in2[3] + ((uint128_t)in1[6]) * in2[2] + ((uint128_t)in1[7]) * in2[1] + ((uint128_t)in1[8]) * in2[0];
  493|       |
  494|       |    /* See comment in felem_square about the use of in2x2 here */
  495|       |
  496|  78.0k|    out[0] += ((uint128_t)in1[1]) * in2x2[8] + ((uint128_t)in1[2]) * in2x2[7] + ((uint128_t)in1[3]) * in2x2[6] + ((uint128_t)in1[4]) * in2x2[5] + ((uint128_t)in1[5]) * in2x2[4] + ((uint128_t)in1[6]) * in2x2[3] + ((uint128_t)in1[7]) * in2x2[2] + ((uint128_t)in1[8]) * in2x2[1];
  497|       |
  498|  78.0k|    out[1] += ((uint128_t)in1[2]) * in2x2[8] + ((uint128_t)in1[3]) * in2x2[7] + ((uint128_t)in1[4]) * in2x2[6] + ((uint128_t)in1[5]) * in2x2[5] + ((uint128_t)in1[6]) * in2x2[4] + ((uint128_t)in1[7]) * in2x2[3] + ((uint128_t)in1[8]) * in2x2[2];
  499|       |
  500|  78.0k|    out[2] += ((uint128_t)in1[3]) * in2x2[8] + ((uint128_t)in1[4]) * in2x2[7] + ((uint128_t)in1[5]) * in2x2[6] + ((uint128_t)in1[6]) * in2x2[5] + ((uint128_t)in1[7]) * in2x2[4] + ((uint128_t)in1[8]) * in2x2[3];
  501|       |
  502|  78.0k|    out[3] += ((uint128_t)in1[4]) * in2x2[8] + ((uint128_t)in1[5]) * in2x2[7] + ((uint128_t)in1[6]) * in2x2[6] + ((uint128_t)in1[7]) * in2x2[5] + ((uint128_t)in1[8]) * in2x2[4];
  503|       |
  504|  78.0k|    out[4] += ((uint128_t)in1[5]) * in2x2[8] + ((uint128_t)in1[6]) * in2x2[7] + ((uint128_t)in1[7]) * in2x2[6] + ((uint128_t)in1[8]) * in2x2[5];
  505|       |
  506|  78.0k|    out[5] += ((uint128_t)in1[6]) * in2x2[8] + ((uint128_t)in1[7]) * in2x2[7] + ((uint128_t)in1[8]) * in2x2[6];
  507|       |
  508|  78.0k|    out[6] += ((uint128_t)in1[7]) * in2x2[8] + ((uint128_t)in1[8]) * in2x2[7];
  509|       |
  510|  78.0k|    out[7] += ((uint128_t)in1[8]) * in2x2[8];
  511|  78.0k|}
ecp_nistp521.c:felem_contract:
  859|    270|{
  860|    270|    limb is_p, is_greater, sign;
  861|    270|    static const limb two58 = ((limb)1) << 58;
  862|       |
  863|    270|    felem_assign(out, in);
  864|       |
  865|    270|    out[0] += out[8] >> 57;
  866|    270|    out[8] &= bottom57bits;
  867|       |    /* out[8] < 2^57 */
  868|    270|    out[1] += out[0] >> 58;
  869|    270|    out[0] &= bottom58bits;
  870|    270|    out[2] += out[1] >> 58;
  871|    270|    out[1] &= bottom58bits;
  872|    270|    out[3] += out[2] >> 58;
  873|    270|    out[2] &= bottom58bits;
  874|    270|    out[4] += out[3] >> 58;
  875|    270|    out[3] &= bottom58bits;
  876|    270|    out[5] += out[4] >> 58;
  877|    270|    out[4] &= bottom58bits;
  878|    270|    out[6] += out[5] >> 58;
  879|    270|    out[5] &= bottom58bits;
  880|    270|    out[7] += out[6] >> 58;
  881|    270|    out[6] &= bottom58bits;
  882|    270|    out[8] += out[7] >> 58;
  883|    270|    out[7] &= bottom58bits;
  884|       |    /* out[8] < 2^57 + 4 */
  885|       |
  886|       |    /*
  887|       |     * If the value is greater than 2^521-1 then we have to subtract 2^521-1
  888|       |     * out. See the comments in felem_is_zero regarding why we don't test for
  889|       |     * other multiples of the prime.
  890|       |     */
  891|       |
  892|       |    /*
  893|       |     * First, if |out| is equal to 2^521-1, we subtract it out to get zero.
  894|       |     */
  895|       |
  896|    270|    is_p = out[0] ^ kPrime[0];
  897|    270|    is_p |= out[1] ^ kPrime[1];
  898|    270|    is_p |= out[2] ^ kPrime[2];
  899|    270|    is_p |= out[3] ^ kPrime[3];
  900|    270|    is_p |= out[4] ^ kPrime[4];
  901|    270|    is_p |= out[5] ^ kPrime[5];
  902|    270|    is_p |= out[6] ^ kPrime[6];
  903|    270|    is_p |= out[7] ^ kPrime[7];
  904|    270|    is_p |= out[8] ^ kPrime[8];
  905|       |
  906|    270|    is_p--;
  907|    270|    is_p &= is_p << 32;
  908|    270|    is_p &= is_p << 16;
  909|    270|    is_p &= is_p << 8;
  910|    270|    is_p &= is_p << 4;
  911|    270|    is_p &= is_p << 2;
  912|    270|    is_p &= is_p << 1;
  913|    270|    is_p = 0 - (is_p >> 63);
  914|    270|    is_p = ~is_p;
  915|       |
  916|       |    /* is_p is 0 iff |out| == 2^521-1 and all ones otherwise */
  917|       |
  918|    270|    out[0] &= is_p;
  919|    270|    out[1] &= is_p;
  920|    270|    out[2] &= is_p;
  921|    270|    out[3] &= is_p;
  922|    270|    out[4] &= is_p;
  923|    270|    out[5] &= is_p;
  924|    270|    out[6] &= is_p;
  925|    270|    out[7] &= is_p;
  926|    270|    out[8] &= is_p;
  927|       |
  928|       |    /*
  929|       |     * In order to test that |out| >= 2^521-1 we need only test if out[8] >>
  930|       |     * 57 is greater than zero as (2^521-1) + x >= 2^522
  931|       |     */
  932|    270|    is_greater = out[8] >> 57;
  933|    270|    is_greater |= is_greater << 32;
  934|    270|    is_greater |= is_greater << 16;
  935|    270|    is_greater |= is_greater << 8;
  936|    270|    is_greater |= is_greater << 4;
  937|    270|    is_greater |= is_greater << 2;
  938|    270|    is_greater |= is_greater << 1;
  939|    270|    is_greater = 0 - (is_greater >> 63);
  940|       |
  941|    270|    out[0] -= kPrime[0] & is_greater;
  942|    270|    out[1] -= kPrime[1] & is_greater;
  943|    270|    out[2] -= kPrime[2] & is_greater;
  944|    270|    out[3] -= kPrime[3] & is_greater;
  945|    270|    out[4] -= kPrime[4] & is_greater;
  946|    270|    out[5] -= kPrime[5] & is_greater;
  947|    270|    out[6] -= kPrime[6] & is_greater;
  948|    270|    out[7] -= kPrime[7] & is_greater;
  949|    270|    out[8] -= kPrime[8] & is_greater;
  950|       |
  951|       |    /* Eliminate negative coefficients */
  952|    270|    sign = -(out[0] >> 63);
  953|    270|    out[0] += (two58 & sign);
  954|    270|    out[1] -= (1 & sign);
  955|    270|    sign = -(out[1] >> 63);
  956|    270|    out[1] += (two58 & sign);
  957|    270|    out[2] -= (1 & sign);
  958|    270|    sign = -(out[2] >> 63);
  959|    270|    out[2] += (two58 & sign);
  960|    270|    out[3] -= (1 & sign);
  961|    270|    sign = -(out[3] >> 63);
  962|    270|    out[3] += (two58 & sign);
  963|    270|    out[4] -= (1 & sign);
  964|    270|    sign = -(out[4] >> 63);
  965|    270|    out[4] += (two58 & sign);
  966|    270|    out[5] -= (1 & sign);
  967|    270|    sign = -(out[0] >> 63);
  968|    270|    out[5] += (two58 & sign);
  969|    270|    out[6] -= (1 & sign);
  970|    270|    sign = -(out[6] >> 63);
  971|    270|    out[6] += (two58 & sign);
  972|    270|    out[7] -= (1 & sign);
  973|    270|    sign = -(out[7] >> 63);
  974|    270|    out[7] += (two58 & sign);
  975|    270|    out[8] -= (1 & sign);
  976|    270|    sign = -(out[5] >> 63);
  977|    270|    out[5] += (two58 & sign);
  978|    270|    out[6] -= (1 & sign);
  979|    270|    sign = -(out[6] >> 63);
  980|    270|    out[6] += (two58 & sign);
  981|    270|    out[7] -= (1 & sign);
  982|    270|    sign = -(out[7] >> 63);
  983|    270|    out[7] += (two58 & sign);
  984|    270|    out[8] -= (1 & sign);
  985|    270|}
ecp_nistp521.c:felem_to_BN:
  195|    432|{
  196|    432|    felem_bytearray b_out;
  197|    432|    felem_to_bin66(b_out, in);
  198|    432|    return BN_lebin2bn(b_out, sizeof(b_out), out);
  199|    432|}
ecp_nistp521.c:felem_to_bin66:
  161|    432|{
  162|    432|    memset(out, 0, 66);
  163|    432|    (*((limb *)&out[0])) = in[0];
  164|    432|    (*((limb_aX *)&out[7])) |= in[1] << 2;
  165|    432|    (*((limb_aX *)&out[14])) |= in[2] << 4;
  166|    432|    (*((limb_aX *)&out[21])) |= in[3] << 6;
  167|    432|    (*((limb_aX *)&out[29])) = in[4];
  168|    432|    (*((limb_aX *)&out[36])) |= in[5] << 2;
  169|    432|    (*((limb_aX *)&out[43])) |= in[6] << 4;
  170|    432|    (*((limb_aX *)&out[50])) |= in[7] << 6;
  171|    432|    (*((limb_aX *)&out[58])) = in[8];
  172|    432|}
ecp_nistp521.c:point_add:
 1126|  7.02k|{
 1127|  7.02k|    felem ftmp, ftmp2, ftmp3, ftmp4, ftmp5, ftmp6, x_out, y_out, z_out;
 1128|  7.02k|    largefelem tmp, tmp2;
 1129|  7.02k|    limb x_equal, y_equal, z1_is_zero, z2_is_zero;
 1130|  7.02k|    limb points_equal;
 1131|       |
 1132|  7.02k|    z1_is_zero = felem_is_zero(z1);
 1133|  7.02k|    z2_is_zero = felem_is_zero(z2);
 1134|       |
 1135|       |    /* ftmp = z1z1 = z1**2 */
 1136|  7.02k|    felem_square(tmp, z1);
  ------------------
  |  |  642|  7.02k|#define felem_square felem_square_ref
  ------------------
 1137|  7.02k|    felem_reduce(ftmp, tmp);
 1138|       |
 1139|  7.02k|    if (!mixed) {
  ------------------
  |  Branch (1139:9): [True: 0, False: 7.02k]
  ------------------
 1140|       |        /* ftmp2 = z2z2 = z2**2 */
 1141|      0|        felem_square(tmp, z2);
  ------------------
  |  |  642|      0|#define felem_square felem_square_ref
  ------------------
 1142|      0|        felem_reduce(ftmp2, tmp);
 1143|       |
 1144|       |        /* u1 = ftmp3 = x1*z2z2 */
 1145|      0|        felem_mul(tmp, x1, ftmp2);
  ------------------
  |  |  643|      0|#define felem_mul felem_mul_ref
  ------------------
 1146|      0|        felem_reduce(ftmp3, tmp);
 1147|       |
 1148|       |        /* ftmp5 = z1 + z2 */
 1149|      0|        felem_assign(ftmp5, z1);
 1150|      0|        felem_sum64(ftmp5, z2);
 1151|       |        /* ftmp5[i] < 2^61 */
 1152|       |
 1153|       |        /* ftmp5 = (z1 + z2)**2 - z1z1 - z2z2 = 2*z1z2 */
 1154|      0|        felem_square(tmp, ftmp5);
  ------------------
  |  |  642|      0|#define felem_square felem_square_ref
  ------------------
 1155|       |        /* tmp[i] < 17*2^122 */
 1156|      0|        felem_diff_128_64(tmp, ftmp);
 1157|       |        /* tmp[i] < 17*2^122 + 2^63 */
 1158|      0|        felem_diff_128_64(tmp, ftmp2);
 1159|       |        /* tmp[i] < 17*2^122 + 2^64 */
 1160|      0|        felem_reduce(ftmp5, tmp);
 1161|       |
 1162|       |        /* ftmp2 = z2 * z2z2 */
 1163|      0|        felem_mul(tmp, ftmp2, z2);
  ------------------
  |  |  643|      0|#define felem_mul felem_mul_ref
  ------------------
 1164|      0|        felem_reduce(ftmp2, tmp);
 1165|       |
 1166|       |        /* s1 = ftmp6 = y1 * z2**3 */
 1167|      0|        felem_mul(tmp, y1, ftmp2);
  ------------------
  |  |  643|      0|#define felem_mul felem_mul_ref
  ------------------
 1168|      0|        felem_reduce(ftmp6, tmp);
 1169|  7.02k|    } else {
 1170|       |        /*
 1171|       |         * We'll assume z2 = 1 (special case z2 = 0 is handled later)
 1172|       |         */
 1173|       |
 1174|       |        /* u1 = ftmp3 = x1*z2z2 */
 1175|  7.02k|        felem_assign(ftmp3, x1);
 1176|       |
 1177|       |        /* ftmp5 = 2*z1z2 */
 1178|  7.02k|        felem_scalar(ftmp5, z1, 2);
 1179|       |
 1180|       |        /* s1 = ftmp6 = y1 * z2**3 */
 1181|  7.02k|        felem_assign(ftmp6, y1);
 1182|  7.02k|    }
 1183|       |
 1184|       |    /* u2 = x2*z1z1 */
 1185|  7.02k|    felem_mul(tmp, x2, ftmp);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1186|       |    /* tmp[i] < 17*2^120 */
 1187|       |
 1188|       |    /* h = ftmp4 = u2 - u1 */
 1189|  7.02k|    felem_diff_128_64(tmp, ftmp3);
 1190|       |    /* tmp[i] < 17*2^120 + 2^63 */
 1191|  7.02k|    felem_reduce(ftmp4, tmp);
 1192|       |
 1193|  7.02k|    x_equal = felem_is_zero(ftmp4);
 1194|       |
 1195|       |    /* z_out = ftmp5 * h */
 1196|  7.02k|    felem_mul(tmp, ftmp5, ftmp4);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1197|  7.02k|    felem_reduce(z_out, tmp);
 1198|       |
 1199|       |    /* ftmp = z1 * z1z1 */
 1200|  7.02k|    felem_mul(tmp, ftmp, z1);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1201|  7.02k|    felem_reduce(ftmp, tmp);
 1202|       |
 1203|       |    /* s2 = tmp = y2 * z1**3 */
 1204|  7.02k|    felem_mul(tmp, y2, ftmp);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1205|       |    /* tmp[i] < 17*2^120 */
 1206|       |
 1207|       |    /* r = ftmp5 = (s2 - s1)*2 */
 1208|  7.02k|    felem_diff_128_64(tmp, ftmp6);
 1209|       |    /* tmp[i] < 17*2^120 + 2^63 */
 1210|  7.02k|    felem_reduce(ftmp5, tmp);
 1211|  7.02k|    y_equal = felem_is_zero(ftmp5);
 1212|  7.02k|    felem_scalar64(ftmp5, 2);
 1213|       |    /* ftmp5[i] < 2^61 */
 1214|       |
 1215|       |    /*
 1216|       |     * The formulae are incorrect if the points are equal, in affine coordinates
 1217|       |     * (X_1, Y_1) == (X_2, Y_2), so we check for this and do doubling if this
 1218|       |     * happens.
 1219|       |     *
 1220|       |     * We use bitwise operations to avoid potential side-channels introduced by
 1221|       |     * the short-circuiting behaviour of boolean operators.
 1222|       |     *
 1223|       |     * The special case of either point being the point at infinity (z1 and/or
 1224|       |     * z2 are zero), is handled separately later on in this function, so we
 1225|       |     * avoid jumping to point_double here in those special cases.
 1226|       |     *
 1227|       |     * Notice the comment below on the implications of this branching for timing
 1228|       |     * leaks and why it is considered practically irrelevant.
 1229|       |     */
 1230|  7.02k|    points_equal = (x_equal & y_equal & (~z1_is_zero) & (~z2_is_zero));
 1231|       |
 1232|  7.02k|    if (points_equal) {
  ------------------
  |  Branch (1232:9): [True: 0, False: 7.02k]
  ------------------
 1233|       |        /*
 1234|       |         * This is obviously not constant-time but it will almost-never happen
 1235|       |         * for ECDH / ECDSA. The case where it can happen is during scalar-mult
 1236|       |         * where the intermediate value gets very close to the group order.
 1237|       |         * Since |ossl_ec_GFp_nistp_recode_scalar_bits| produces signed digits
 1238|       |         * for the scalar, it's possible for the intermediate value to be a small
 1239|       |         * negative multiple of the base point, and for the final signed digit
 1240|       |         * to be the same value. We believe that this only occurs for the scalar
 1241|       |         * 1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
 1242|       |         * ffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb
 1243|       |         * 71e913863f7, in that case the penultimate intermediate is -9G and
 1244|       |         * the final digit is also -9G. Since this only happens for a single
 1245|       |         * scalar, the timing leak is irrelevant. (Any attacker who wanted to
 1246|       |         * check whether a secret scalar was that exact value, can already do
 1247|       |         * so.)
 1248|       |         */
 1249|      0|        point_double(x3, y3, z3, x1, y1, z1);
 1250|      0|        return;
 1251|      0|    }
 1252|       |
 1253|       |    /* I = ftmp = (2h)**2 */
 1254|  7.02k|    felem_assign(ftmp, ftmp4);
 1255|  7.02k|    felem_scalar64(ftmp, 2);
 1256|       |    /* ftmp[i] < 2^61 */
 1257|  7.02k|    felem_square(tmp, ftmp);
  ------------------
  |  |  642|  7.02k|#define felem_square felem_square_ref
  ------------------
 1258|       |    /* tmp[i] < 17*2^122 */
 1259|  7.02k|    felem_reduce(ftmp, tmp);
 1260|       |
 1261|       |    /* J = ftmp2 = h * I */
 1262|  7.02k|    felem_mul(tmp, ftmp4, ftmp);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1263|  7.02k|    felem_reduce(ftmp2, tmp);
 1264|       |
 1265|       |    /* V = ftmp4 = U1 * I */
 1266|  7.02k|    felem_mul(tmp, ftmp3, ftmp);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1267|  7.02k|    felem_reduce(ftmp4, tmp);
 1268|       |
 1269|       |    /* x_out = r**2 - J - 2V */
 1270|  7.02k|    felem_square(tmp, ftmp5);
  ------------------
  |  |  642|  7.02k|#define felem_square felem_square_ref
  ------------------
 1271|       |    /* tmp[i] < 17*2^122 */
 1272|  7.02k|    felem_diff_128_64(tmp, ftmp2);
 1273|       |    /* tmp[i] < 17*2^122 + 2^63 */
 1274|  7.02k|    felem_assign(ftmp3, ftmp4);
 1275|  7.02k|    felem_scalar64(ftmp4, 2);
 1276|       |    /* ftmp4[i] < 2^61 */
 1277|  7.02k|    felem_diff_128_64(tmp, ftmp4);
 1278|       |    /* tmp[i] < 17*2^122 + 2^64 */
 1279|  7.02k|    felem_reduce(x_out, tmp);
 1280|       |
 1281|       |    /* y_out = r(V-x_out) - 2 * s1 * J */
 1282|  7.02k|    felem_diff64(ftmp3, x_out);
 1283|       |    /*
 1284|       |     * ftmp3[i] < 2^60 + 2^60 = 2^61
 1285|       |     */
 1286|  7.02k|    felem_mul(tmp, ftmp5, ftmp3);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1287|       |    /* tmp[i] < 17*2^122 */
 1288|  7.02k|    felem_mul(tmp2, ftmp6, ftmp2);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1289|       |    /* tmp2[i] < 17*2^120 */
 1290|  7.02k|    felem_scalar128(tmp2, 2);
 1291|       |    /* tmp2[i] < 17*2^121 */
 1292|  7.02k|    felem_diff128(tmp, tmp2);
 1293|       |    /*-
 1294|       |     * tmp[i] < 2^127 - 2^69 + 17*2^122
 1295|       |     *        = 2^126 - 2^122 - 2^6 - 2^2 - 1
 1296|       |     *        < 2^127
 1297|       |     */
 1298|  7.02k|    felem_reduce(y_out, tmp);
 1299|       |
 1300|  7.02k|    copy_conditional(x_out, x2, z1_is_zero);
 1301|  7.02k|    copy_conditional(x_out, x1, z2_is_zero);
 1302|  7.02k|    copy_conditional(y_out, y2, z1_is_zero);
 1303|  7.02k|    copy_conditional(y_out, y1, z2_is_zero);
 1304|  7.02k|    copy_conditional(z_out, z2, z1_is_zero);
 1305|  7.02k|    copy_conditional(z_out, z1, z2_is_zero);
 1306|  7.02k|    felem_assign(x3, x_out);
 1307|  7.02k|    felem_assign(y3, y_out);
 1308|  7.02k|    felem_assign(z3, z_out);
 1309|  7.02k|}
ecp_nistp521.c:felem_is_zero:
  781|  28.0k|{
  782|  28.0k|    felem ftmp;
  783|  28.0k|    limb is_zero, is_p;
  784|  28.0k|    felem_assign(ftmp, in);
  785|       |
  786|  28.0k|    ftmp[0] += ftmp[8] >> 57;
  787|  28.0k|    ftmp[8] &= bottom57bits;
  788|       |    /* ftmp[8] < 2^57 */
  789|  28.0k|    ftmp[1] += ftmp[0] >> 58;
  790|  28.0k|    ftmp[0] &= bottom58bits;
  791|  28.0k|    ftmp[2] += ftmp[1] >> 58;
  792|  28.0k|    ftmp[1] &= bottom58bits;
  793|  28.0k|    ftmp[3] += ftmp[2] >> 58;
  794|  28.0k|    ftmp[2] &= bottom58bits;
  795|  28.0k|    ftmp[4] += ftmp[3] >> 58;
  796|  28.0k|    ftmp[3] &= bottom58bits;
  797|  28.0k|    ftmp[5] += ftmp[4] >> 58;
  798|  28.0k|    ftmp[4] &= bottom58bits;
  799|  28.0k|    ftmp[6] += ftmp[5] >> 58;
  800|  28.0k|    ftmp[5] &= bottom58bits;
  801|  28.0k|    ftmp[7] += ftmp[6] >> 58;
  802|  28.0k|    ftmp[6] &= bottom58bits;
  803|  28.0k|    ftmp[8] += ftmp[7] >> 58;
  804|  28.0k|    ftmp[7] &= bottom58bits;
  805|       |    /* ftmp[8] < 2^57 + 4 */
  806|       |
  807|       |    /*
  808|       |     * The ninth limb of 2*(2^521-1) is 0x03ffffffffffffff, which is greater
  809|       |     * than our bound for ftmp[8]. Therefore we only have to check if the
  810|       |     * zero is zero or 2^521-1.
  811|       |     */
  812|       |
  813|  28.0k|    is_zero = 0;
  814|  28.0k|    is_zero |= ftmp[0];
  815|  28.0k|    is_zero |= ftmp[1];
  816|  28.0k|    is_zero |= ftmp[2];
  817|  28.0k|    is_zero |= ftmp[3];
  818|  28.0k|    is_zero |= ftmp[4];
  819|  28.0k|    is_zero |= ftmp[5];
  820|  28.0k|    is_zero |= ftmp[6];
  821|  28.0k|    is_zero |= ftmp[7];
  822|  28.0k|    is_zero |= ftmp[8];
  823|       |
  824|  28.0k|    is_zero--;
  825|       |    /*
  826|       |     * We know that ftmp[i] < 2^63, therefore the only way that the top bit
  827|       |     * can be set is if is_zero was 0 before the decrement.
  828|       |     */
  829|  28.0k|    is_zero = 0 - (is_zero >> 63);
  830|       |
  831|  28.0k|    is_p = ftmp[0] ^ kPrime[0];
  832|  28.0k|    is_p |= ftmp[1] ^ kPrime[1];
  833|  28.0k|    is_p |= ftmp[2] ^ kPrime[2];
  834|  28.0k|    is_p |= ftmp[3] ^ kPrime[3];
  835|  28.0k|    is_p |= ftmp[4] ^ kPrime[4];
  836|  28.0k|    is_p |= ftmp[5] ^ kPrime[5];
  837|  28.0k|    is_p |= ftmp[6] ^ kPrime[6];
  838|  28.0k|    is_p |= ftmp[7] ^ kPrime[7];
  839|  28.0k|    is_p |= ftmp[8] ^ kPrime[8];
  840|       |
  841|  28.0k|    is_p--;
  842|  28.0k|    is_p = 0 - (is_p >> 63);
  843|       |
  844|  28.0k|    is_zero |= is_p;
  845|  28.0k|    return is_zero;
  846|  28.0k|}
ecp_nistp521.c:felem_sum64:
  234|  21.0k|{
  235|  21.0k|    out[0] += in[0];
  236|  21.0k|    out[1] += in[1];
  237|  21.0k|    out[2] += in[2];
  238|  21.0k|    out[3] += in[3];
  239|  21.0k|    out[4] += in[4];
  240|  21.0k|    out[5] += in[5];
  241|  21.0k|    out[6] += in[6];
  242|  21.0k|    out[7] += in[7];
  243|  21.0k|    out[8] += in[8];
  244|  21.0k|}
ecp_nistp521.c:felem_diff_128_64:
  346|  42.1k|{
  347|       |    /*
  348|       |     * In order to prevent underflow, we add 64p mod p (which is equivalent
  349|       |     * to 0 mod p) before subtracting. p is 2^521 - 1, i.e. in binary a 521
  350|       |     * digit number with all bits set to 1. See "The representation of field
  351|       |     * elements" comment above for a description of how limbs are used to
  352|       |     * represent a number. 64p is represented with 8 limbs containing a number
  353|       |     * with 58 bits set and one limb with a number with 57 bits set.
  354|       |     */
  355|  42.1k|    static const limb two63m6 = (((limb)1) << 63) - (((limb)1) << 6);
  356|  42.1k|    static const limb two63m5 = (((limb)1) << 63) - (((limb)1) << 5);
  357|       |
  358|  42.1k|    out[0] += two63m6 - in[0];
  359|  42.1k|    out[1] += two63m5 - in[1];
  360|  42.1k|    out[2] += two63m5 - in[2];
  361|  42.1k|    out[3] += two63m5 - in[3];
  362|  42.1k|    out[4] += two63m5 - in[4];
  363|  42.1k|    out[5] += two63m5 - in[5];
  364|  42.1k|    out[6] += two63m5 - in[6];
  365|  42.1k|    out[7] += two63m5 - in[7];
  366|  42.1k|    out[8] += two63m5 - in[8];
  367|  42.1k|}
ecp_nistp521.c:felem_scalar64:
  262|  42.1k|{
  263|  42.1k|    out[0] *= scalar;
  264|  42.1k|    out[1] *= scalar;
  265|  42.1k|    out[2] *= scalar;
  266|  42.1k|    out[3] *= scalar;
  267|  42.1k|    out[4] *= scalar;
  268|  42.1k|    out[5] *= scalar;
  269|  42.1k|    out[6] *= scalar;
  270|  42.1k|    out[7] *= scalar;
  271|  42.1k|    out[8] *= scalar;
  272|  42.1k|}
ecp_nistp521.c:felem_diff64:
  320|  21.0k|{
  321|       |    /*
  322|       |     * In order to prevent underflow, we add 0 mod p before subtracting.
  323|       |     */
  324|  21.0k|    static const limb two62m3 = (((limb)1) << 62) - (((limb)1) << 5);
  325|  21.0k|    static const limb two62m2 = (((limb)1) << 62) - (((limb)1) << 4);
  326|       |
  327|  21.0k|    out[0] += two62m3 - in[0];
  328|  21.0k|    out[1] += two62m2 - in[1];
  329|  21.0k|    out[2] += two62m2 - in[2];
  330|  21.0k|    out[3] += two62m2 - in[3];
  331|  21.0k|    out[4] += two62m2 - in[4];
  332|  21.0k|    out[5] += two62m2 - in[5];
  333|  21.0k|    out[6] += two62m2 - in[6];
  334|  21.0k|    out[7] += two62m2 - in[7];
  335|  21.0k|    out[8] += two62m2 - in[8];
  336|  21.0k|}
ecp_nistp521.c:felem_scalar128:
  276|  14.0k|{
  277|  14.0k|    out[0] *= scalar;
  278|  14.0k|    out[1] *= scalar;
  279|  14.0k|    out[2] *= scalar;
  280|  14.0k|    out[3] *= scalar;
  281|  14.0k|    out[4] *= scalar;
  282|  14.0k|    out[5] *= scalar;
  283|  14.0k|    out[6] *= scalar;
  284|  14.0k|    out[7] *= scalar;
  285|  14.0k|    out[8] *= scalar;
  286|  14.0k|}
ecp_nistp521.c:felem_diff128:
  377|  14.0k|{
  378|       |    /*
  379|       |     * In order to prevent underflow, we add 0 mod p before subtracting.
  380|       |     */
  381|  14.0k|    static const uint128_t two127m70 = (((uint128_t)1) << 127) - (((uint128_t)1) << 70);
  382|  14.0k|    static const uint128_t two127m69 = (((uint128_t)1) << 127) - (((uint128_t)1) << 69);
  383|       |
  384|  14.0k|    out[0] += (two127m70 - in[0]);
  385|  14.0k|    out[1] += (two127m69 - in[1]);
  386|  14.0k|    out[2] += (two127m69 - in[2]);
  387|  14.0k|    out[3] += (two127m69 - in[3]);
  388|  14.0k|    out[4] += (two127m69 - in[4]);
  389|  14.0k|    out[5] += (two127m69 - in[5]);
  390|  14.0k|    out[6] += (two127m69 - in[6]);
  391|  14.0k|    out[7] += (two127m69 - in[7]);
  392|  14.0k|    out[8] += (two127m69 - in[8]);
  393|  14.0k|}
ecp_nistp521.c:copy_conditional:
 1103|  42.1k|{
 1104|  42.1k|    unsigned i;
 1105|   421k|    for (i = 0; i < NLIMBS; ++i) {
  ------------------
  |  |  129|   421k|#define NLIMBS 9
  ------------------
  |  Branch (1105:17): [True: 379k, False: 42.1k]
  ------------------
 1106|   379k|        const limb tmp = mask & (in[i] ^ out[i]);
 1107|   379k|        out[i] ^= tmp;
 1108|   379k|    }
 1109|  42.1k|}
ecp_nistp521.c:point_double:
 1006|  7.02k|{
 1007|  7.02k|    largefelem tmp, tmp2;
 1008|  7.02k|    felem delta, gamma, beta, alpha, ftmp, ftmp2;
 1009|       |
 1010|  7.02k|    felem_assign(ftmp, x_in);
 1011|  7.02k|    felem_assign(ftmp2, x_in);
 1012|       |
 1013|       |    /* delta = z^2 */
 1014|  7.02k|    felem_square(tmp, z_in);
  ------------------
  |  |  642|  7.02k|#define felem_square felem_square_ref
  ------------------
 1015|  7.02k|    felem_reduce(delta, tmp); /* delta[i] < 2^59 + 2^14 */
 1016|       |
 1017|       |    /* gamma = y^2 */
 1018|  7.02k|    felem_square(tmp, y_in);
  ------------------
  |  |  642|  7.02k|#define felem_square felem_square_ref
  ------------------
 1019|  7.02k|    felem_reduce(gamma, tmp); /* gamma[i] < 2^59 + 2^14 */
 1020|       |
 1021|       |    /* beta = x*gamma */
 1022|  7.02k|    felem_mul(tmp, x_in, gamma);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1023|  7.02k|    felem_reduce(beta, tmp); /* beta[i] < 2^59 + 2^14 */
 1024|       |
 1025|       |    /* alpha = 3*(x-delta)*(x+delta) */
 1026|  7.02k|    felem_diff64(ftmp, delta);
 1027|       |    /* ftmp[i] < 2^61 */
 1028|  7.02k|    felem_sum64(ftmp2, delta);
 1029|       |    /* ftmp2[i] < 2^60 + 2^15 */
 1030|  7.02k|    felem_scalar64(ftmp2, 3);
 1031|       |    /* ftmp2[i] < 3*2^60 + 3*2^15 */
 1032|  7.02k|    felem_mul(tmp, ftmp, ftmp2);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1033|       |    /*-
 1034|       |     * tmp[i] < 17(3*2^121 + 3*2^76)
 1035|       |     *        = 61*2^121 + 61*2^76
 1036|       |     *        < 64*2^121 + 64*2^76
 1037|       |     *        = 2^127 + 2^82
 1038|       |     *        < 2^128
 1039|       |     */
 1040|  7.02k|    felem_reduce(alpha, tmp);
 1041|       |
 1042|       |    /* x' = alpha^2 - 8*beta */
 1043|  7.02k|    felem_square(tmp, alpha);
  ------------------
  |  |  642|  7.02k|#define felem_square felem_square_ref
  ------------------
 1044|       |    /*
 1045|       |     * tmp[i] < 17*2^120 < 2^125
 1046|       |     */
 1047|  7.02k|    felem_assign(ftmp, beta);
 1048|  7.02k|    felem_scalar64(ftmp, 8);
 1049|       |    /* ftmp[i] < 2^62 + 2^17 */
 1050|  7.02k|    felem_diff_128_64(tmp, ftmp);
 1051|       |    /* tmp[i] < 2^125 + 2^63 + 2^62 + 2^17 */
 1052|  7.02k|    felem_reduce(x_out, tmp);
 1053|       |
 1054|       |    /* z' = (y + z)^2 - gamma - delta */
 1055|  7.02k|    felem_sum64(delta, gamma);
 1056|       |    /* delta[i] < 2^60 + 2^15 */
 1057|  7.02k|    felem_assign(ftmp, y_in);
 1058|  7.02k|    felem_sum64(ftmp, z_in);
 1059|       |    /* ftmp[i] < 2^60 + 2^15 */
 1060|  7.02k|    felem_square(tmp, ftmp);
  ------------------
  |  |  642|  7.02k|#define felem_square felem_square_ref
  ------------------
 1061|       |    /*
 1062|       |     * tmp[i] < 17(2^122) < 2^127
 1063|       |     */
 1064|  7.02k|    felem_diff_128_64(tmp, delta);
 1065|       |    /* tmp[i] < 2^127 + 2^63 */
 1066|  7.02k|    felem_reduce(z_out, tmp);
 1067|       |
 1068|       |    /* y' = alpha*(4*beta - x') - 8*gamma^2 */
 1069|  7.02k|    felem_scalar64(beta, 4);
 1070|       |    /* beta[i] < 2^61 + 2^16 */
 1071|  7.02k|    felem_diff64(beta, x_out);
 1072|       |    /* beta[i] < 2^61 + 2^60 + 2^16 */
 1073|  7.02k|    felem_mul(tmp, alpha, beta);
  ------------------
  |  |  643|  7.02k|#define felem_mul felem_mul_ref
  ------------------
 1074|       |    /*-
 1075|       |     * tmp[i] < 17*((2^59 + 2^14)(2^61 + 2^60 + 2^16))
 1076|       |     *        = 17*(2^120 + 2^75 + 2^119 + 2^74 + 2^75 + 2^30)
 1077|       |     *        = 17*(2^120 + 2^119 + 2^76 + 2^74 + 2^30)
 1078|       |     *        < 2^128
 1079|       |     */
 1080|  7.02k|    felem_square(tmp2, gamma);
  ------------------
  |  |  642|  7.02k|#define felem_square felem_square_ref
  ------------------
 1081|       |    /*-
 1082|       |     * tmp2[i] < 17*(2^59 + 2^14)^2
 1083|       |     *         = 17*(2^118 + 2^74 + 2^28)
 1084|       |     */
 1085|  7.02k|    felem_scalar128(tmp2, 8);
 1086|       |    /*-
 1087|       |     * tmp2[i] < 8*17*(2^118 + 2^74 + 2^28)
 1088|       |     *         = 2^125 + 2^121 + 2^81 + 2^77 + 2^35 + 2^31
 1089|       |     *         < 2^126
 1090|       |     */
 1091|  7.02k|    felem_diff128(tmp, tmp2);
 1092|       |    /*-
 1093|       |     * tmp[i] < 2^127 - 2^69 + 17(2^120 + 2^119 + 2^76 + 2^74 + 2^30)
 1094|       |     *        = 2^127 + 2^124 + 2^122 + 2^120 + 2^118 + 2^80 + 2^78 + 2^76 +
 1095|       |     *          2^74 + 2^69 + 2^34 + 2^30
 1096|       |     *        < 2^128
 1097|       |     */
 1098|  7.02k|    felem_reduce(y_out, tmp);
 1099|  7.02k|}
ecp_nistp521.c:batch_mul:
 1503|     54|{
 1504|     54|    int i, skip;
 1505|     54|    unsigned num, gen_mul = (g_scalar != NULL);
 1506|     54|    felem nq[3], tmp[4];
 1507|     54|    limb bits;
 1508|     54|    u8 sign, digit;
 1509|       |
 1510|       |    /* set nq to the point at infinity */
 1511|     54|    memset(nq, 0, sizeof(nq));
 1512|       |
 1513|       |    /*
 1514|       |     * Loop over all scalars msb-to-lsb, interleaving additions of multiples
 1515|       |     * of the generator (last quarter of rounds) and additions of other
 1516|       |     * points multiples (every 5th round).
 1517|       |     */
 1518|     54|    skip = 1; /* save two point operations in the first
 1519|       |               * round */
 1520|  7.12k|    for (i = (num_points ? 520 : 130); i >= 0; --i) {
  ------------------
  |  Branch (1520:15): [True: 0, False: 54]
  |  Branch (1520:40): [True: 7.07k, False: 54]
  ------------------
 1521|       |        /* double */
 1522|  7.07k|        if (!skip)
  ------------------
  |  Branch (1522:13): [True: 7.02k, False: 54]
  ------------------
 1523|  7.02k|            point_double(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2]);
 1524|       |
 1525|       |        /* add multiples of the generator */
 1526|  7.07k|        if (gen_mul && (i <= 130)) {
  ------------------
  |  Branch (1526:13): [True: 7.07k, False: 0]
  |  Branch (1526:24): [True: 7.07k, False: 0]
  ------------------
 1527|  7.07k|            bits = get_bit(g_scalar, i + 390) << 3;
 1528|  7.07k|            if (i < 130) {
  ------------------
  |  Branch (1528:17): [True: 7.02k, False: 54]
  ------------------
 1529|  7.02k|                bits |= get_bit(g_scalar, i + 260) << 2;
 1530|  7.02k|                bits |= get_bit(g_scalar, i + 130) << 1;
 1531|  7.02k|                bits |= get_bit(g_scalar, i);
 1532|  7.02k|            }
 1533|       |            /* select the point to add, in constant time */
 1534|  7.07k|            select_point(bits, 16, g_pre_comp, tmp);
 1535|  7.07k|            if (!skip) {
  ------------------
  |  Branch (1535:17): [True: 7.02k, False: 54]
  ------------------
 1536|       |                /* The 1 argument below is for "mixed" */
 1537|  7.02k|                point_add(nq[0], nq[1], nq[2],
 1538|  7.02k|                    nq[0], nq[1], nq[2], 1, tmp[0], tmp[1], tmp[2]);
 1539|  7.02k|            } else {
 1540|     54|                memcpy(nq, tmp, 3 * sizeof(felem));
 1541|     54|                skip = 0;
 1542|     54|            }
 1543|  7.07k|        }
 1544|       |
 1545|       |        /* do other additions every 5 doublings */
 1546|  7.07k|        if (num_points && (i % 5 == 0)) {
  ------------------
  |  Branch (1546:13): [True: 0, False: 7.07k]
  |  Branch (1546:27): [True: 0, False: 0]
  ------------------
 1547|       |            /* loop over all scalars */
 1548|      0|            for (num = 0; num < num_points; ++num) {
  ------------------
  |  Branch (1548:27): [True: 0, False: 0]
  ------------------
 1549|      0|                bits = get_bit(scalars[num], i + 4) << 5;
 1550|      0|                bits |= get_bit(scalars[num], i + 3) << 4;
 1551|      0|                bits |= get_bit(scalars[num], i + 2) << 3;
 1552|      0|                bits |= get_bit(scalars[num], i + 1) << 2;
 1553|      0|                bits |= get_bit(scalars[num], i) << 1;
 1554|      0|                bits |= get_bit(scalars[num], i - 1);
 1555|      0|                ossl_ec_GFp_nistp_recode_scalar_bits(&sign, &digit, bits);
 1556|       |
 1557|       |                /*
 1558|       |                 * select the point to add or subtract, in constant time
 1559|       |                 */
 1560|      0|                select_point(digit, 17, pre_comp[num], tmp);
 1561|      0|                felem_neg(tmp[3], tmp[1]); /* (X, -Y, Z) is the negative
 1562|       |                                            * point */
 1563|      0|                copy_conditional(tmp[1], tmp[3], (-(limb)sign));
 1564|       |
 1565|      0|                if (!skip) {
  ------------------
  |  Branch (1565:21): [True: 0, False: 0]
  ------------------
 1566|      0|                    point_add(nq[0], nq[1], nq[2],
 1567|      0|                        nq[0], nq[1], nq[2],
 1568|      0|                        mixed, tmp[0], tmp[1], tmp[2]);
 1569|      0|                } else {
 1570|      0|                    memcpy(nq, tmp, 3 * sizeof(felem));
 1571|      0|                    skip = 0;
 1572|      0|                }
 1573|      0|            }
 1574|      0|        }
 1575|  7.07k|    }
 1576|     54|    felem_assign(x_out, nq[0]);
 1577|     54|    felem_assign(y_out, nq[1]);
 1578|     54|    felem_assign(z_out, nq[2]);
 1579|     54|}
ecp_nistp521.c:get_bit:
 1485|  28.1k|{
 1486|  28.1k|    if (i < 0)
  ------------------
  |  Branch (1486:9): [True: 0, False: 28.1k]
  ------------------
 1487|      0|        return 0;
 1488|  28.1k|    return (in[i >> 3] >> (i & 7)) & 1;
 1489|  28.1k|}
ecp_nistp521.c:select_point:
 1464|  7.07k|{
 1465|  7.07k|    unsigned i, j;
 1466|  7.07k|    limb *outlimbs = &out[0][0];
 1467|       |
 1468|  7.07k|    memset(out, 0, sizeof(*out) * 3);
 1469|       |
 1470|   120k|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1470:17): [True: 113k, False: 7.07k]
  ------------------
 1471|   113k|        const limb *inlimbs = &pre_comp[i][0][0];
 1472|   113k|        limb mask = i ^ idx;
 1473|   113k|        mask |= mask >> 4;
 1474|   113k|        mask |= mask >> 2;
 1475|   113k|        mask |= mask >> 1;
 1476|   113k|        mask &= 1;
 1477|   113k|        mask--;
 1478|  3.16M|        for (j = 0; j < NLIMBS * 3; j++)
  ------------------
  |  |  129|  3.16M|#define NLIMBS 9
  ------------------
  |  Branch (1478:21): [True: 3.05M, False: 113k]
  ------------------
 1479|  3.05M|            outlimbs[j] |= inlimbs[j] & mask;
 1480|   113k|    }
 1481|  7.07k|}

EC_GFp_nistz256_method:
 1570|  12.5k|{
 1571|  12.5k|    static const EC_METHOD ret = {
 1572|  12.5k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|  12.5k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1573|  12.5k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|  12.5k|#define NID_X9_62_prime_field           406
  ------------------
 1574|  12.5k|        ossl_ec_GFp_mont_group_init,
 1575|  12.5k|        ossl_ec_GFp_mont_group_finish,
 1576|  12.5k|        ossl_ec_GFp_mont_group_clear_finish,
 1577|  12.5k|        ossl_ec_GFp_mont_group_copy,
 1578|  12.5k|        ossl_ec_GFp_mont_group_set_curve,
 1579|  12.5k|        ossl_ec_GFp_simple_group_get_curve,
 1580|  12.5k|        ossl_ec_GFp_simple_group_get_degree,
 1581|  12.5k|        ossl_ec_group_simple_order_bits,
 1582|  12.5k|        ossl_ec_GFp_simple_group_check_discriminant,
 1583|  12.5k|        ossl_ec_GFp_simple_point_init,
 1584|  12.5k|        ossl_ec_GFp_simple_point_finish,
 1585|  12.5k|        ossl_ec_GFp_simple_point_clear_finish,
 1586|  12.5k|        ossl_ec_GFp_simple_point_copy,
 1587|  12.5k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1588|  12.5k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1589|  12.5k|        ecp_nistz256_get_affine,
 1590|  12.5k|        0, 0, 0,
 1591|  12.5k|        ossl_ec_GFp_simple_add,
 1592|  12.5k|        ossl_ec_GFp_simple_dbl,
 1593|  12.5k|        ossl_ec_GFp_simple_invert,
 1594|  12.5k|        ossl_ec_GFp_simple_is_at_infinity,
 1595|  12.5k|        ossl_ec_GFp_simple_is_on_curve,
 1596|  12.5k|        ossl_ec_GFp_simple_cmp,
 1597|  12.5k|        ossl_ec_GFp_simple_make_affine,
 1598|  12.5k|        ossl_ec_GFp_simple_points_make_affine,
 1599|  12.5k|        ecp_nistz256_points_mul, /* mul */
 1600|  12.5k|        ecp_nistz256_mult_precompute, /* precompute_mult */
 1601|  12.5k|        ecp_nistz256_window_have_precompute_mult, /* have_precompute_mult */
 1602|  12.5k|        ossl_ec_GFp_mont_field_mul,
 1603|  12.5k|        ossl_ec_GFp_mont_field_sqr,
 1604|  12.5k|        0, /* field_div */
 1605|  12.5k|        ossl_ec_GFp_mont_field_inv,
 1606|  12.5k|        ossl_ec_GFp_mont_field_encode,
 1607|  12.5k|        ossl_ec_GFp_mont_field_decode,
 1608|  12.5k|        ossl_ec_GFp_mont_field_set_to_one,
 1609|  12.5k|        ossl_ec_key_simple_priv2oct,
 1610|  12.5k|        ossl_ec_key_simple_oct2priv,
 1611|  12.5k|        0, /* set private */
 1612|  12.5k|        ossl_ec_key_simple_generate_key,
 1613|  12.5k|        ossl_ec_key_simple_check_key,
 1614|  12.5k|        ossl_ec_key_simple_generate_public_key,
 1615|  12.5k|        0, /* keycopy */
 1616|  12.5k|        0, /* keyfinish */
 1617|  12.5k|        ossl_ecdh_simple_compute_key,
 1618|  12.5k|        ossl_ecdsa_simple_sign_setup,
 1619|  12.5k|        ossl_ecdsa_simple_sign_sig,
 1620|  12.5k|        ossl_ecdsa_simple_verify_sig,
 1621|  12.5k|        ecp_nistz256_inv_mod_ord, /* can be #define-d NULL */
 1622|  12.5k|        0, /* blind_coordinates */
 1623|  12.5k|        0, /* ladder_pre */
 1624|  12.5k|        0, /* ladder_step */
 1625|  12.5k|        0, /* ladder_post */
 1626|  12.5k|        ecp_nistz256group_full_init
 1627|  12.5k|    };
 1628|       |
 1629|  12.5k|    return &ret;
 1630|  12.5k|}
ecp_nistz256.c:ecp_nistz256_get_affine:
 1149|     83|{
 1150|     83|    BN_ULONG z_inv2[P256_LIMBS];
 1151|     83|    BN_ULONG z_inv3[P256_LIMBS];
 1152|     83|    BN_ULONG x_aff[P256_LIMBS];
 1153|     83|    BN_ULONG y_aff[P256_LIMBS];
 1154|     83|    BN_ULONG point_x[P256_LIMBS], point_y[P256_LIMBS], point_z[P256_LIMBS];
 1155|     83|    BN_ULONG x_ret[P256_LIMBS], y_ret[P256_LIMBS];
 1156|       |
 1157|     83|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (1157:9): [True: 0, False: 83]
  ------------------
 1158|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1159|      0|        return 0;
 1160|      0|    }
 1161|       |
 1162|     83|    if (!ecp_nistz256_bignum_to_field_elem(point_x, point->X) || !ecp_nistz256_bignum_to_field_elem(point_y, point->Y) || !ecp_nistz256_bignum_to_field_elem(point_z, point->Z)) {
  ------------------
  |  Branch (1162:9): [True: 0, False: 83]
  |  Branch (1162:66): [True: 0, False: 83]
  |  Branch (1162:123): [True: 0, False: 83]
  ------------------
 1163|      0|        ERR_raise(ERR_LIB_EC, EC_R_COORDINATES_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1164|      0|        return 0;
 1165|      0|    }
 1166|       |
 1167|     83|    ecp_nistz256_mod_inverse(z_inv3, point_z);
 1168|     83|    ecp_nistz256_sqr_mont(z_inv2, z_inv3);
 1169|     83|    ecp_nistz256_mul_mont(x_aff, z_inv2, point_x);
 1170|       |
 1171|     83|    if (x != NULL) {
  ------------------
  |  Branch (1171:9): [True: 83, False: 0]
  ------------------
 1172|     83|        ecp_nistz256_from_mont(x_ret, x_aff);
 1173|     83|        if (!bn_set_words(x, x_ret, P256_LIMBS))
  ------------------
  |  |   40|     83|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     83|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     83|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1173:13): [True: 0, False: 83]
  ------------------
 1174|      0|            return 0;
 1175|     83|    }
 1176|       |
 1177|     83|    if (y != NULL) {
  ------------------
  |  Branch (1177:9): [True: 83, False: 0]
  ------------------
 1178|     83|        ecp_nistz256_mul_mont(z_inv3, z_inv3, z_inv2);
 1179|     83|        ecp_nistz256_mul_mont(y_aff, z_inv3, point_y);
 1180|     83|        ecp_nistz256_from_mont(y_ret, y_aff);
 1181|     83|        if (!bn_set_words(y, y_ret, P256_LIMBS))
  ------------------
  |  |   40|     83|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     83|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     83|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1181:13): [True: 0, False: 83]
  ------------------
 1182|      0|            return 0;
 1183|     83|    }
 1184|       |
 1185|     83|    return 1;
 1186|     83|}
ecp_nistz256.c:ecp_nistz256_bignum_to_field_elem:
  599|    249|{
  600|    249|    return bn_copy_words(out, in, P256_LIMBS);
  ------------------
  |  |   40|    249|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    249|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    249|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  601|    249|}
ecp_nistz256.c:ecp_nistz256_mod_inverse:
  519|     83|{
  520|       |    /*
  521|       |     * The poly is ffffffff 00000001 00000000 00000000 00000000 ffffffff
  522|       |     * ffffffff ffffffff We use FLT and used poly-2 as exponent
  523|       |     */
  524|     83|    BN_ULONG p2[P256_LIMBS];
  525|     83|    BN_ULONG p4[P256_LIMBS];
  526|     83|    BN_ULONG p8[P256_LIMBS];
  527|     83|    BN_ULONG p16[P256_LIMBS];
  528|     83|    BN_ULONG p32[P256_LIMBS];
  529|     83|    BN_ULONG res[P256_LIMBS];
  530|     83|    int i;
  531|       |
  532|     83|    ecp_nistz256_sqr_mont(res, in);
  533|     83|    ecp_nistz256_mul_mont(p2, res, in); /* 3*p */
  534|       |
  535|     83|    ecp_nistz256_sqr_mont(res, p2);
  536|     83|    ecp_nistz256_sqr_mont(res, res);
  537|     83|    ecp_nistz256_mul_mont(p4, res, p2); /* f*p */
  538|       |
  539|     83|    ecp_nistz256_sqr_mont(res, p4);
  540|     83|    ecp_nistz256_sqr_mont(res, res);
  541|     83|    ecp_nistz256_sqr_mont(res, res);
  542|     83|    ecp_nistz256_sqr_mont(res, res);
  543|     83|    ecp_nistz256_mul_mont(p8, res, p4); /* ff*p */
  544|       |
  545|     83|    ecp_nistz256_sqr_mont(res, p8);
  546|    664|    for (i = 0; i < 7; i++)
  ------------------
  |  Branch (546:17): [True: 581, False: 83]
  ------------------
  547|    581|        ecp_nistz256_sqr_mont(res, res);
  548|     83|    ecp_nistz256_mul_mont(p16, res, p8); /* ffff*p */
  549|       |
  550|     83|    ecp_nistz256_sqr_mont(res, p16);
  551|  1.32k|    for (i = 0; i < 15; i++)
  ------------------
  |  Branch (551:17): [True: 1.24k, False: 83]
  ------------------
  552|  1.24k|        ecp_nistz256_sqr_mont(res, res);
  553|     83|    ecp_nistz256_mul_mont(p32, res, p16); /* ffffffff*p */
  554|       |
  555|     83|    ecp_nistz256_sqr_mont(res, p32);
  556|  2.65k|    for (i = 0; i < 31; i++)
  ------------------
  |  Branch (556:17): [True: 2.57k, False: 83]
  ------------------
  557|  2.57k|        ecp_nistz256_sqr_mont(res, res);
  558|     83|    ecp_nistz256_mul_mont(res, res, in);
  559|       |
  560|  10.7k|    for (i = 0; i < 32 * 4; i++)
  ------------------
  |  Branch (560:17): [True: 10.6k, False: 83]
  ------------------
  561|  10.6k|        ecp_nistz256_sqr_mont(res, res);
  562|     83|    ecp_nistz256_mul_mont(res, res, p32);
  563|       |
  564|  2.73k|    for (i = 0; i < 32; i++)
  ------------------
  |  Branch (564:17): [True: 2.65k, False: 83]
  ------------------
  565|  2.65k|        ecp_nistz256_sqr_mont(res, res);
  566|     83|    ecp_nistz256_mul_mont(res, res, p32);
  567|       |
  568|  1.41k|    for (i = 0; i < 16; i++)
  ------------------
  |  Branch (568:17): [True: 1.32k, False: 83]
  ------------------
  569|  1.32k|        ecp_nistz256_sqr_mont(res, res);
  570|     83|    ecp_nistz256_mul_mont(res, res, p16);
  571|       |
  572|    747|    for (i = 0; i < 8; i++)
  ------------------
  |  Branch (572:17): [True: 664, False: 83]
  ------------------
  573|    664|        ecp_nistz256_sqr_mont(res, res);
  574|     83|    ecp_nistz256_mul_mont(res, res, p8);
  575|       |
  576|     83|    ecp_nistz256_sqr_mont(res, res);
  577|     83|    ecp_nistz256_sqr_mont(res, res);
  578|     83|    ecp_nistz256_sqr_mont(res, res);
  579|     83|    ecp_nistz256_sqr_mont(res, res);
  580|     83|    ecp_nistz256_mul_mont(res, res, p4);
  581|       |
  582|     83|    ecp_nistz256_sqr_mont(res, res);
  583|     83|    ecp_nistz256_sqr_mont(res, res);
  584|     83|    ecp_nistz256_mul_mont(res, res, p2);
  585|       |
  586|     83|    ecp_nistz256_sqr_mont(res, res);
  587|     83|    ecp_nistz256_sqr_mont(res, res);
  588|     83|    ecp_nistz256_mul_mont(res, res, in);
  589|       |
  590|     83|    memcpy(r, res, sizeof(res));
  591|     83|}
ecp_nistz256.c:ecp_nistz256_points_mul:
  936|     83|{
  937|     83|    int i = 0, ret = 0, no_precomp_for_generator = 0, p_is_infinity = 0;
  938|     83|    unsigned char p_str[33] = { 0 };
  939|     83|    const PRECOMP256_ROW *preComputedTable = NULL;
  940|     83|    const NISTZ256_PRE_COMP *pre_comp = NULL;
  941|     83|    const EC_POINT *generator = NULL;
  942|     83|    const BIGNUM **new_scalars = NULL;
  943|     83|    const EC_POINT **new_points = NULL;
  944|     83|    unsigned int idx = 0;
  945|     83|    const unsigned int window_size = 7;
  946|     83|    const unsigned int mask = (1 << (window_size + 1)) - 1;
  947|     83|    unsigned int wvalue;
  948|     83|    ALIGN32 union {
  ------------------
  |  |   30|     83|#define ALIGN32 __attribute((aligned(32)))
  ------------------
  949|     83|        P256_POINT p;
  950|     83|        P256_POINT_AFFINE a;
  951|     83|    } t, p;
  952|     83|    BIGNUM *tmp_scalar;
  953|       |
  954|     83|    if ((num + 1) == 0 || (num + 1) > OPENSSL_MALLOC_MAX_NELEMS(void *)) {
  ------------------
  |  |  169|     83|#define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U << (sizeof(int) * 8 - 1)) - 1) / sizeof(type))
  ------------------
  |  Branch (954:9): [True: 0, False: 83]
  |  Branch (954:27): [True: 0, False: 83]
  ------------------
  955|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  956|      0|        return 0;
  957|      0|    }
  958|       |
  959|     83|    memset(&p, 0, sizeof(p));
  960|     83|    BN_CTX_start(ctx);
  961|       |
  962|     83|    if (scalar) {
  ------------------
  |  Branch (962:9): [True: 83, False: 0]
  ------------------
  963|     83|        generator = EC_GROUP_get0_generator(group);
  964|     83|        if (generator == NULL) {
  ------------------
  |  Branch (964:13): [True: 0, False: 83]
  ------------------
  965|      0|            ERR_raise(ERR_LIB_EC, EC_R_UNDEFINED_GENERATOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  966|      0|            goto err;
  967|      0|        }
  968|       |
  969|       |        /* look if we can use precomputed multiples of generator */
  970|     83|        pre_comp = group->pre_comp.nistz256;
  971|       |
  972|     83|        if (pre_comp) {
  ------------------
  |  Branch (972:13): [True: 0, False: 83]
  ------------------
  973|       |            /*
  974|       |             * If there is a precomputed table for the generator, check that
  975|       |             * it was generated with the same generator.
  976|       |             */
  977|      0|            EC_POINT *pre_comp_generator = EC_POINT_new(group);
  978|      0|            if (pre_comp_generator == NULL)
  ------------------
  |  Branch (978:17): [True: 0, False: 0]
  ------------------
  979|      0|                goto err;
  980|       |
  981|      0|            ecp_nistz256_gather_w7(&p.a, pre_comp->precomp[0], 1);
  982|      0|            if (!ecp_nistz256_set_from_affine(pre_comp_generator,
  ------------------
  |  Branch (982:17): [True: 0, False: 0]
  ------------------
  983|      0|                    group, &p.a, ctx)) {
  984|      0|                EC_POINT_free(pre_comp_generator);
  985|      0|                goto err;
  986|      0|            }
  987|       |
  988|      0|            if (0 == EC_POINT_cmp(group, generator, pre_comp_generator, ctx))
  ------------------
  |  Branch (988:17): [True: 0, False: 0]
  ------------------
  989|      0|                preComputedTable = (const PRECOMP256_ROW *)pre_comp->precomp;
  990|       |
  991|      0|            EC_POINT_free(pre_comp_generator);
  992|      0|        }
  993|       |
  994|     83|        if (preComputedTable == NULL && ecp_nistz256_is_affine_G(generator)) {
  ------------------
  |  Branch (994:13): [True: 83, False: 0]
  |  Branch (994:41): [True: 83, False: 0]
  ------------------
  995|       |            /*
  996|       |             * If there is no precomputed data, but the generator is the
  997|       |             * default, a hardcoded table of precomputed data is used. This
  998|       |             * is because applications, such as Apache, do not use
  999|       |             * EC_KEY_precompute_mult.
 1000|       |             */
 1001|     83|            preComputedTable = ecp_nistz256_precomputed;
 1002|     83|        }
 1003|       |
 1004|     83|        if (preComputedTable) {
  ------------------
  |  Branch (1004:13): [True: 83, False: 0]
  ------------------
 1005|     83|            BN_ULONG infty;
 1006|       |
 1007|     83|            if ((BN_num_bits(scalar) > 256)
  ------------------
  |  Branch (1007:17): [True: 0, False: 83]
  ------------------
 1008|     83|                || BN_is_negative(scalar)) {
  ------------------
  |  Branch (1008:20): [True: 0, False: 83]
  ------------------
 1009|      0|                if ((tmp_scalar = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (1009:21): [True: 0, False: 0]
  ------------------
 1010|      0|                    goto err;
 1011|       |
 1012|      0|                if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
  ------------------
  |  Branch (1012:21): [True: 0, False: 0]
  ------------------
 1013|      0|                    ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1014|      0|                    goto err;
 1015|      0|                }
 1016|      0|                scalar = tmp_scalar;
 1017|      0|            }
 1018|       |
 1019|    415|            for (i = 0; i < bn_get_top(scalar) * BN_BYTES; i += BN_BYTES) {
  ------------------
  |  |   38|    415|#define BN_BYTES 8
  ------------------
                          for (i = 0; i < bn_get_top(scalar) * BN_BYTES; i += BN_BYTES) {
  ------------------
  |  |   38|    332|#define BN_BYTES 8
  ------------------
  |  Branch (1019:25): [True: 332, False: 83]
  ------------------
 1020|    332|                BN_ULONG d = bn_get_words(scalar)[i / BN_BYTES];
  ------------------
  |  |   38|    332|#define BN_BYTES 8
  ------------------
 1021|       |
 1022|    332|                p_str[i + 0] = (unsigned char)d;
 1023|    332|                p_str[i + 1] = (unsigned char)(d >> 8);
 1024|    332|                p_str[i + 2] = (unsigned char)(d >> 16);
 1025|    332|                p_str[i + 3] = (unsigned char)(d >>= 24);
 1026|    332|                if (BN_BYTES == 8) {
  ------------------
  |  |   38|    332|#define BN_BYTES 8
  ------------------
  |  Branch (1026:21): [True: 332, Folded]
  ------------------
 1027|    332|                    d >>= 8;
 1028|    332|                    p_str[i + 4] = (unsigned char)d;
 1029|    332|                    p_str[i + 5] = (unsigned char)(d >> 8);
 1030|    332|                    p_str[i + 6] = (unsigned char)(d >> 16);
 1031|    332|                    p_str[i + 7] = (unsigned char)(d >> 24);
 1032|    332|                }
 1033|    332|            }
 1034|       |
 1035|    166|            for (; i < 33; i++)
  ------------------
  |  Branch (1035:20): [True: 83, False: 83]
  ------------------
 1036|     83|                p_str[i] = 0;
 1037|       |
 1038|       |            /* First window */
 1039|     83|            wvalue = (p_str[0] << 1) & mask;
 1040|     83|            idx += window_size;
 1041|       |
 1042|     83|            wvalue = _booth_recode_w7(wvalue);
 1043|       |
 1044|     83|            ecp_nistz256_gather_w7(&p.a, preComputedTable[0],
 1045|     83|                wvalue >> 1);
 1046|       |
 1047|     83|            ecp_nistz256_neg(p.p.Z, p.p.Y);
 1048|     83|            copy_conditional(p.p.Y, p.p.Z, wvalue & 1);
 1049|       |
 1050|       |            /*
 1051|       |             * Since affine infinity is encoded as (0,0) and
 1052|       |             * Jacobian is (,,0), we need to harmonize them
 1053|       |             * by assigning "one" or zero to Z.
 1054|       |             */
 1055|     83|            infty = (p.p.X[0] | p.p.X[1] | p.p.X[2] | p.p.X[3] | p.p.Y[0] | p.p.Y[1] | p.p.Y[2] | p.p.Y[3]);
 1056|     83|            if (P256_LIMBS == 8)
  ------------------
  |  |   40|     83|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     83|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     83|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1056:17): [Folded, False: 83]
  ------------------
 1057|      0|                infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] | p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
 1058|       |
 1059|     83|            infty = 0 - is_zero(infty);
 1060|     83|            infty = ~infty;
 1061|       |
 1062|     83|            p.p.Z[0] = ONE[0] & infty;
 1063|     83|            p.p.Z[1] = ONE[1] & infty;
 1064|     83|            p.p.Z[2] = ONE[2] & infty;
 1065|     83|            p.p.Z[3] = ONE[3] & infty;
 1066|     83|            if (P256_LIMBS == 8) {
  ------------------
  |  |   40|     83|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     83|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     83|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1066:17): [Folded, False: 83]
  ------------------
 1067|      0|                p.p.Z[4] = ONE[4] & infty;
 1068|      0|                p.p.Z[5] = ONE[5] & infty;
 1069|      0|                p.p.Z[6] = ONE[6] & infty;
 1070|      0|                p.p.Z[7] = ONE[7] & infty;
 1071|      0|            }
 1072|       |
 1073|  3.07k|            for (i = 1; i < 37; i++) {
  ------------------
  |  Branch (1073:25): [True: 2.98k, False: 83]
  ------------------
 1074|  2.98k|                unsigned int off = (idx - 1) / 8;
 1075|  2.98k|                wvalue = p_str[off] | p_str[off + 1] << 8;
 1076|  2.98k|                wvalue = (wvalue >> ((idx - 1) % 8)) & mask;
 1077|  2.98k|                idx += window_size;
 1078|       |
 1079|  2.98k|                wvalue = _booth_recode_w7(wvalue);
 1080|       |
 1081|  2.98k|                ecp_nistz256_gather_w7(&t.a,
 1082|  2.98k|                    preComputedTable[i], wvalue >> 1);
 1083|       |
 1084|  2.98k|                ecp_nistz256_neg(t.p.Z, t.a.Y);
 1085|  2.98k|                copy_conditional(t.a.Y, t.p.Z, wvalue & 1);
 1086|       |
 1087|  2.98k|                ecp_nistz256_point_add_affine(&p.p, &p.p, &t.a);
 1088|  2.98k|            }
 1089|     83|        } else {
 1090|      0|            p_is_infinity = 1;
 1091|      0|            no_precomp_for_generator = 1;
 1092|      0|        }
 1093|     83|    } else
 1094|      0|        p_is_infinity = 1;
 1095|       |
 1096|     83|    if (no_precomp_for_generator) {
  ------------------
  |  Branch (1096:9): [True: 0, False: 83]
  ------------------
 1097|       |        /*
 1098|       |         * Without a precomputed table for the generator, it has to be
 1099|       |         * handled like a normal point.
 1100|       |         */
 1101|      0|        new_scalars = OPENSSL_malloc_array(num + 1, sizeof(BIGNUM *));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1102|      0|        if (new_scalars == NULL)
  ------------------
  |  Branch (1102:13): [True: 0, False: 0]
  ------------------
 1103|      0|            goto err;
 1104|       |
 1105|      0|        new_points = OPENSSL_malloc_array(num + 1, sizeof(EC_POINT *));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1106|      0|        if (new_points == NULL)
  ------------------
  |  Branch (1106:13): [True: 0, False: 0]
  ------------------
 1107|      0|            goto err;
 1108|       |
 1109|      0|        memcpy(new_scalars, scalars, num * sizeof(BIGNUM *));
 1110|      0|        new_scalars[num] = scalar;
 1111|      0|        memcpy(new_points, points, num * sizeof(EC_POINT *));
 1112|      0|        new_points[num] = generator;
 1113|       |
 1114|      0|        scalars = new_scalars;
 1115|      0|        points = new_points;
 1116|      0|        num++;
 1117|      0|    }
 1118|       |
 1119|     83|    if (num) {
  ------------------
  |  Branch (1119:9): [True: 0, False: 83]
  ------------------
 1120|      0|        P256_POINT *out = &t.p;
 1121|      0|        if (p_is_infinity)
  ------------------
  |  Branch (1121:13): [True: 0, False: 0]
  ------------------
 1122|      0|            out = &p.p;
 1123|       |
 1124|      0|        if (!ecp_nistz256_windowed_mul(group, out, scalars, points, num, ctx))
  ------------------
  |  Branch (1124:13): [True: 0, False: 0]
  ------------------
 1125|      0|            goto err;
 1126|       |
 1127|      0|        if (!p_is_infinity)
  ------------------
  |  Branch (1127:13): [True: 0, False: 0]
  ------------------
 1128|      0|            ecp_nistz256_point_add(&p.p, &p.p, out);
 1129|      0|    }
 1130|       |
 1131|       |    /* Not constant-time, but we're only operating on the public output. */
 1132|     83|    if (!bn_set_words(r->X, p.p.X, P256_LIMBS) || !bn_set_words(r->Y, p.p.Y, P256_LIMBS) || !bn_set_words(r->Z, p.p.Z, P256_LIMBS)) {
  ------------------
  |  |   40|     83|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     83|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     83|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (!bn_set_words(r->X, p.p.X, P256_LIMBS) || !bn_set_words(r->Y, p.p.Y, P256_LIMBS) || !bn_set_words(r->Z, p.p.Z, P256_LIMBS)) {
  ------------------
  |  |   40|     83|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     83|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     83|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (!bn_set_words(r->X, p.p.X, P256_LIMBS) || !bn_set_words(r->Y, p.p.Y, P256_LIMBS) || !bn_set_words(r->Z, p.p.Z, P256_LIMBS)) {
  ------------------
  |  |   40|     83|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     83|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     83|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1132:9): [True: 0, False: 83]
  |  Branch (1132:51): [True: 0, False: 83]
  |  Branch (1132:93): [True: 0, False: 83]
  ------------------
 1133|      0|        goto err;
 1134|      0|    }
 1135|     83|    r->Z_is_one = is_one(r->Z) & 1;
 1136|       |
 1137|     83|    ret = 1;
 1138|       |
 1139|     83|err:
 1140|     83|    BN_CTX_end(ctx);
 1141|     83|    OPENSSL_free(new_points);
  ------------------
  |  |  132|     83|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1142|     83|    OPENSSL_free(new_scalars);
  ------------------
  |  |  132|     83|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1143|     83|    return ret;
 1144|     83|}
ecp_nistz256.c:ecp_nistz256_is_affine_G:
  791|     83|{
  792|     83|    return (bn_get_top(generator->X) == P256_LIMBS) && (bn_get_top(generator->Y) == P256_LIMBS) && is_equal(bn_get_words(generator->X), def_xG) && is_equal(bn_get_words(generator->Y), def_yG) && is_one(generator->Z);
  ------------------
  |  |   40|     83|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     83|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     83|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return (bn_get_top(generator->X) == P256_LIMBS) && (bn_get_top(generator->Y) == P256_LIMBS) && is_equal(bn_get_words(generator->X), def_xG) && is_equal(bn_get_words(generator->Y), def_yG) && is_one(generator->Z);
  ------------------
  |  |   40|     83|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     83|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     83|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (792:12): [True: 83, False: 0]
  |  Branch (792:56): [True: 83, False: 0]
  |  Branch (792:100): [True: 83, False: 0]
  |  Branch (792:148): [True: 83, False: 0]
  |  Branch (792:196): [True: 83, False: 0]
  ------------------
  793|     83|}
ecp_nistz256.c:is_equal:
  195|    166|{
  196|    166|    BN_ULONG res;
  197|       |
  198|    166|    res = a[0] ^ b[0];
  199|    166|    res |= a[1] ^ b[1];
  200|    166|    res |= a[2] ^ b[2];
  201|    166|    res |= a[3] ^ b[3];
  202|    166|    if (P256_LIMBS == 8) {
  ------------------
  |  |   40|    166|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    166|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    166|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (202:9): [Folded, False: 166]
  ------------------
  203|      0|        res |= a[4] ^ b[4];
  204|      0|        res |= a[5] ^ b[5];
  205|      0|        res |= a[6] ^ b[6];
  206|      0|        res |= a[7] ^ b[7];
  207|      0|    }
  208|       |
  209|    166|    return is_zero(res);
  210|    166|}
ecp_nistz256.c:_booth_recode_w7:
  156|  3.07k|{
  157|  3.07k|    unsigned int s, d;
  158|       |
  159|  3.07k|    s = ~((in >> 7) - 1);
  160|  3.07k|    d = (1 << 8) - in - 1;
  161|  3.07k|    d = (d & s) | (in & ~s);
  162|  3.07k|    d = (d >> 1) + (d & 1);
  163|       |
  164|  3.07k|    return (d << 1) + (s & 1);
  165|  3.07k|}
ecp_nistz256.c:copy_conditional:
  169|  3.07k|{
  170|  3.07k|    BN_ULONG mask1 = 0 - move;
  171|  3.07k|    BN_ULONG mask2 = ~mask1;
  172|       |
  173|  3.07k|    dst[0] = (src[0] & mask1) ^ (dst[0] & mask2);
  174|  3.07k|    dst[1] = (src[1] & mask1) ^ (dst[1] & mask2);
  175|  3.07k|    dst[2] = (src[2] & mask1) ^ (dst[2] & mask2);
  176|  3.07k|    dst[3] = (src[3] & mask1) ^ (dst[3] & mask2);
  177|  3.07k|    if (P256_LIMBS == 8) {
  ------------------
  |  |   40|  3.07k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  3.07k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  3.07k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (177:9): [Folded, False: 3.07k]
  ------------------
  178|      0|        dst[4] = (src[4] & mask1) ^ (dst[4] & mask2);
  179|      0|        dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
  180|      0|        dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);
  181|      0|        dst[7] = (src[7] & mask1) ^ (dst[7] & mask2);
  182|      0|    }
  183|  3.07k|}
ecp_nistz256.c:is_zero:
  186|    415|{
  187|    415|    in |= (0 - in);
  188|    415|    in = ~in;
  189|    415|    in >>= BN_BITS2 - 1;
  ------------------
  |  |   54|    415|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|    415|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  190|    415|    return in;
  191|    415|}
ecp_nistz256.c:is_one:
  213|    166|{
  214|    166|    BN_ULONG res = 0;
  215|    166|    BN_ULONG *a = bn_get_words(z);
  216|       |
  217|    166|    if (bn_get_top(z) == (P256_LIMBS - P256_LIMBS / 8)) {
  ------------------
  |  |   40|    166|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    166|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    166|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (bn_get_top(z) == (P256_LIMBS - P256_LIMBS / 8)) {
  ------------------
  |  |   40|    166|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    166|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    166|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (217:9): [True: 166, False: 0]
  ------------------
  218|    166|        res = a[0] ^ ONE[0];
  219|    166|        res |= a[1] ^ ONE[1];
  220|    166|        res |= a[2] ^ ONE[2];
  221|    166|        res |= a[3] ^ ONE[3];
  222|    166|        if (P256_LIMBS == 8) {
  ------------------
  |  |   40|    166|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    166|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    166|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (222:13): [Folded, False: 166]
  ------------------
  223|      0|            res |= a[4] ^ ONE[4];
  224|      0|            res |= a[5] ^ ONE[5];
  225|      0|            res |= a[6] ^ ONE[6];
  226|       |            /*
  227|       |             * no check for a[7] (being zero) on 32-bit platforms,
  228|       |             * because value of "one" takes only 7 limbs.
  229|       |             */
  230|      0|        }
  231|    166|        res = is_zero(res);
  232|    166|    }
  233|       |
  234|    166|    return res;
  235|    166|}
ecp_nistz256.c:ecp_nistz256group_full_init:
 1445|  12.5k|{
 1446|  12.5k|    BN_CTX *ctx = NULL;
 1447|  12.5k|    BN_MONT_CTX *mont = NULL, *ordmont = NULL;
 1448|  12.5k|    const int param_len = 32;
 1449|  12.5k|    const int seed_len = 20;
 1450|  12.5k|    int ok = 0;
 1451|  12.5k|    uint32_t hi_order_n = 0xccd1c8aa;
 1452|  12.5k|    uint32_t lo_order_n = 0xee00bc4f;
 1453|  12.5k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *one = NULL,
 1454|  12.5k|           *order = NULL;
 1455|  12.5k|    EC_POINT *P = NULL;
 1456|       |
 1457|  12.5k|    if ((ctx = BN_CTX_new_ex(group->libctx)) == NULL) {
  ------------------
  |  Branch (1457:9): [True: 0, False: 12.5k]
  ------------------
 1458|      0|        ERR_raise(ERR_LIB_EC, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1459|      0|        return 0;
 1460|      0|    }
 1461|       |
 1462|  12.5k|    if (!EC_GROUP_set_seed(group, params, seed_len)) {
  ------------------
  |  Branch (1462:9): [True: 0, False: 12.5k]
  ------------------
 1463|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1464|      0|        goto err;
 1465|      0|    }
 1466|  12.5k|    params += seed_len;
 1467|       |
 1468|  12.5k|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1468:9): [True: 0, False: 12.5k]
  ------------------
 1469|  12.5k|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1469:12): [True: 0, False: 12.5k]
  ------------------
 1470|  12.5k|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1470:12): [True: 0, False: 12.5k]
  ------------------
 1471|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1472|      0|        goto err;
 1473|      0|    }
 1474|       |
 1475|       |    /*
 1476|       |     * Set up curve params and montgomery for field
 1477|       |     * Start by setting up montgomery and one
 1478|       |     */
 1479|  12.5k|    mont = BN_MONT_CTX_new();
 1480|  12.5k|    if (mont == NULL)
  ------------------
  |  Branch (1480:9): [True: 0, False: 12.5k]
  ------------------
 1481|      0|        goto err;
 1482|       |
 1483|  12.5k|    if (!ossl_bn_mont_ctx_set(mont, p, 256, params + 6 * param_len, param_len,
  ------------------
  |  Branch (1483:9): [True: 0, False: 12.5k]
  ------------------
 1484|  12.5k|            1, 0))
 1485|      0|        goto err;
 1486|       |
 1487|  12.5k|    one = BN_new();
 1488|  12.5k|    if (one == NULL) {
  ------------------
  |  Branch (1488:9): [True: 0, False: 12.5k]
  ------------------
 1489|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1490|      0|        goto err;
 1491|      0|    }
 1492|  12.5k|    if (!BN_to_montgomery(one, BN_value_one(), mont, ctx)) {
  ------------------
  |  Branch (1492:9): [True: 0, False: 12.5k]
  ------------------
 1493|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1494|      0|        goto err;
 1495|      0|    }
 1496|  12.5k|    group->field_data1 = mont;
 1497|  12.5k|    mont = NULL;
 1498|  12.5k|    group->field_data2 = one;
 1499|  12.5k|    one = NULL;
 1500|       |
 1501|  12.5k|    if (!ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx)) {
  ------------------
  |  Branch (1501:9): [True: 0, False: 12.5k]
  ------------------
 1502|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1503|      0|        goto err;
 1504|      0|    }
 1505|       |
 1506|  12.5k|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 12.5k]
  ------------------
 1507|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1508|      0|        goto err;
 1509|      0|    }
 1510|       |
 1511|  12.5k|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1511:9): [True: 0, False: 12.5k]
  ------------------
 1512|  12.5k|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1512:12): [True: 0, False: 12.5k]
  ------------------
 1513|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1514|      0|        goto err;
 1515|      0|    }
 1516|  12.5k|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (1516:9): [True: 0, False: 12.5k]
  ------------------
 1517|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1518|      0|        goto err;
 1519|      0|    }
 1520|  12.5k|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1520:9): [True: 0, False: 12.5k]
  ------------------
 1521|  12.5k|        || !BN_set_word(x, (BN_ULONG)1)) { /* cofactor is 1 */
  ------------------
  |  Branch (1521:12): [True: 0, False: 12.5k]
  ------------------
 1522|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1523|      0|        goto err;
 1524|      0|    }
 1525|       |
 1526|       |    /*
 1527|       |     * Set up generator and order and montgomery data
 1528|       |     */
 1529|  12.5k|    group->generator = EC_POINT_new(group);
 1530|  12.5k|    if (group->generator == NULL) {
  ------------------
  |  Branch (1530:9): [True: 0, False: 12.5k]
  ------------------
 1531|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1532|      0|        goto err;
 1533|      0|    }
 1534|  12.5k|    if (!EC_POINT_copy(group->generator, P))
  ------------------
  |  Branch (1534:9): [True: 0, False: 12.5k]
  ------------------
 1535|      0|        goto err;
 1536|  12.5k|    if (!BN_copy(group->order, order))
  ------------------
  |  Branch (1536:9): [True: 0, False: 12.5k]
  ------------------
 1537|      0|        goto err;
 1538|  12.5k|    if (!BN_set_word(group->cofactor, 1))
  ------------------
  |  Branch (1538:9): [True: 0, False: 12.5k]
  ------------------
 1539|      0|        goto err;
 1540|       |
 1541|  12.5k|    ordmont = BN_MONT_CTX_new();
 1542|  12.5k|    if (ordmont == NULL)
  ------------------
  |  Branch (1542:9): [True: 0, False: 12.5k]
  ------------------
 1543|      0|        goto err;
 1544|  12.5k|    if (!ossl_bn_mont_ctx_set(ordmont, order, 256, params + 7 * param_len,
  ------------------
  |  Branch (1544:9): [True: 0, False: 12.5k]
  ------------------
 1545|  12.5k|            param_len, lo_order_n, hi_order_n))
 1546|      0|        goto err;
 1547|       |
 1548|  12.5k|    group->mont_data = ordmont;
 1549|  12.5k|    ordmont = NULL;
 1550|       |
 1551|  12.5k|    ok = 1;
 1552|       |
 1553|  12.5k|err:
 1554|  12.5k|    EC_POINT_free(P);
 1555|  12.5k|    BN_CTX_free(ctx);
 1556|  12.5k|    BN_MONT_CTX_free(mont);
 1557|  12.5k|    BN_MONT_CTX_free(ordmont);
 1558|  12.5k|    BN_free(p);
 1559|  12.5k|    BN_free(one);
 1560|  12.5k|    BN_free(a);
 1561|  12.5k|    BN_free(b);
 1562|  12.5k|    BN_free(order);
 1563|  12.5k|    BN_free(x);
 1564|  12.5k|    BN_free(y);
 1565|       |
 1566|  12.5k|    return ok;
 1567|  12.5k|}

ossl_ec_GFp_simple_point2oct:
  162|    882|{
  163|    882|    size_t ret;
  164|    882|    BN_CTX *new_ctx = NULL;
  165|    882|    int used_ctx = 0;
  166|    882|    BIGNUM *x, *y;
  167|    882|    size_t field_len, i, skip;
  168|       |
  169|    882|    if ((form != POINT_CONVERSION_COMPRESSED)
  ------------------
  |  Branch (169:9): [True: 882, False: 0]
  ------------------
  170|    882|        && (form != POINT_CONVERSION_UNCOMPRESSED)
  ------------------
  |  Branch (170:12): [True: 0, False: 882]
  ------------------
  171|      0|        && (form != POINT_CONVERSION_HYBRID)) {
  ------------------
  |  Branch (171:12): [True: 0, False: 0]
  ------------------
  172|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  173|      0|        goto err;
  174|      0|    }
  175|       |
  176|    882|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (176:9): [True: 0, False: 882]
  ------------------
  177|       |        /* encodes to a single 0 octet */
  178|      0|        if (buf != NULL) {
  ------------------
  |  Branch (178:13): [True: 0, False: 0]
  ------------------
  179|      0|            if (len < 1) {
  ------------------
  |  Branch (179:17): [True: 0, False: 0]
  ------------------
  180|      0|                ERR_raise(ERR_LIB_EC, EC_R_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  181|      0|                return 0;
  182|      0|            }
  183|      0|            buf[0] = 0;
  184|      0|        }
  185|      0|        return 1;
  186|      0|    }
  187|       |
  188|       |    /* ret := required output buffer length */
  189|    882|    field_len = BN_num_bytes(group->field);
  ------------------
  |  |  188|    882|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  190|    882|    ret = (form == POINT_CONVERSION_COMPRESSED) ? 1 + field_len : 1 + 2 * field_len;
  ------------------
  |  Branch (190:11): [True: 0, False: 882]
  ------------------
  191|       |
  192|       |    /* if 'buf' is NULL, just return required length */
  193|    882|    if (buf != NULL) {
  ------------------
  |  Branch (193:9): [True: 441, False: 441]
  ------------------
  194|    441|        if (len < ret) {
  ------------------
  |  Branch (194:13): [True: 0, False: 441]
  ------------------
  195|      0|            ERR_raise(ERR_LIB_EC, EC_R_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  196|      0|            goto err;
  197|      0|        }
  198|       |
  199|    441|        if (ctx == NULL) {
  ------------------
  |  Branch (199:13): [True: 0, False: 441]
  ------------------
  200|      0|            ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  201|      0|            if (ctx == NULL)
  ------------------
  |  Branch (201:17): [True: 0, False: 0]
  ------------------
  202|      0|                return 0;
  203|      0|        }
  204|       |
  205|    441|        BN_CTX_start(ctx);
  206|    441|        used_ctx = 1;
  207|    441|        x = BN_CTX_get(ctx);
  208|    441|        y = BN_CTX_get(ctx);
  209|    441|        if (y == NULL)
  ------------------
  |  Branch (209:13): [True: 0, False: 441]
  ------------------
  210|      0|            goto err;
  211|       |
  212|    441|        if (!EC_POINT_get_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (212:13): [True: 0, False: 441]
  ------------------
  213|      0|            goto err;
  214|       |
  215|    441|        if ((form == POINT_CONVERSION_COMPRESSED
  ------------------
  |  Branch (215:14): [True: 0, False: 441]
  ------------------
  216|    441|                || form == POINT_CONVERSION_HYBRID)
  ------------------
  |  Branch (216:20): [True: 0, False: 441]
  ------------------
  217|      0|            && BN_is_odd(y))
  ------------------
  |  Branch (217:16): [True: 0, False: 0]
  ------------------
  218|      0|            buf[0] = form + 1;
  219|    441|        else
  220|    441|            buf[0] = form;
  221|       |
  222|    441|        i = 1;
  223|       |
  224|    441|        skip = field_len - BN_num_bytes(x);
  ------------------
  |  |  188|    441|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  225|    441|        if (skip > field_len) {
  ------------------
  |  Branch (225:13): [True: 0, False: 441]
  ------------------
  226|      0|            ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  227|      0|            goto err;
  228|      0|        }
  229|    471|        while (skip > 0) {
  ------------------
  |  Branch (229:16): [True: 30, False: 441]
  ------------------
  230|     30|            buf[i++] = 0;
  231|     30|            skip--;
  232|     30|        }
  233|    441|        skip = BN_bn2bin(x, buf + i);
  234|    441|        i += skip;
  235|    441|        if (i != 1 + field_len) {
  ------------------
  |  Branch (235:13): [True: 0, False: 441]
  ------------------
  236|      0|            ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  237|      0|            goto err;
  238|      0|        }
  239|       |
  240|    441|        if (form == POINT_CONVERSION_UNCOMPRESSED
  ------------------
  |  Branch (240:13): [True: 441, False: 0]
  ------------------
  241|    441|            || form == POINT_CONVERSION_HYBRID) {
  ------------------
  |  Branch (241:16): [True: 0, False: 0]
  ------------------
  242|    441|            skip = field_len - BN_num_bytes(y);
  ------------------
  |  |  188|    441|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  243|    441|            if (skip > field_len) {
  ------------------
  |  Branch (243:17): [True: 0, False: 441]
  ------------------
  244|      0|                ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  245|      0|                goto err;
  246|      0|            }
  247|    467|            while (skip > 0) {
  ------------------
  |  Branch (247:20): [True: 26, False: 441]
  ------------------
  248|     26|                buf[i++] = 0;
  249|     26|                skip--;
  250|     26|            }
  251|    441|            skip = BN_bn2bin(y, buf + i);
  252|    441|            i += skip;
  253|    441|        }
  254|       |
  255|    441|        if (i != ret) {
  ------------------
  |  Branch (255:13): [True: 0, False: 441]
  ------------------
  256|      0|            ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  257|      0|            goto err;
  258|      0|        }
  259|    441|    }
  260|       |
  261|    882|    if (used_ctx)
  ------------------
  |  Branch (261:9): [True: 441, False: 441]
  ------------------
  262|    441|        BN_CTX_end(ctx);
  263|    882|    BN_CTX_free(new_ctx);
  264|    882|    return ret;
  265|       |
  266|      0|err:
  267|      0|    if (used_ctx)
  ------------------
  |  Branch (267:9): [True: 0, False: 0]
  ------------------
  268|      0|        BN_CTX_end(ctx);
  269|      0|    BN_CTX_free(new_ctx);
  270|      0|    return 0;
  271|    882|}
ossl_ec_GFp_simple_oct2point:
  276|   162k|{
  277|   162k|    point_conversion_form_t form;
  278|   162k|    int y_bit;
  279|   162k|    BN_CTX *new_ctx = NULL;
  280|   162k|    BIGNUM *x, *y;
  281|   162k|    int field_len, enc_len;
  282|   162k|    int ret = 0;
  283|       |
  284|   162k|    if (len == 0) {
  ------------------
  |  Branch (284:9): [True: 0, False: 162k]
  ------------------
  285|      0|        ERR_raise(ERR_LIB_EC, EC_R_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  286|      0|        return 0;
  287|      0|    }
  288|   162k|    form = buf[0];
  289|   162k|    y_bit = form & 1;
  290|   162k|    form = form & ~1U;
  291|   162k|    if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED)
  ------------------
  |  Branch (291:9): [True: 162k, False: 0]
  |  Branch (291:24): [True: 162k, False: 0]
  ------------------
  292|   162k|        && (form != POINT_CONVERSION_UNCOMPRESSED)
  ------------------
  |  Branch (292:12): [True: 0, False: 162k]
  ------------------
  293|      0|        && (form != POINT_CONVERSION_HYBRID)) {
  ------------------
  |  Branch (293:12): [True: 0, False: 0]
  ------------------
  294|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  295|      0|        return 0;
  296|      0|    }
  297|   162k|    if ((form == 0 || form == POINT_CONVERSION_UNCOMPRESSED) && y_bit) {
  ------------------
  |  Branch (297:10): [True: 0, False: 162k]
  |  Branch (297:23): [True: 162k, False: 0]
  |  Branch (297:65): [True: 0, False: 162k]
  ------------------
  298|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|        return 0;
  300|      0|    }
  301|       |
  302|   162k|    if (form == 0) {
  ------------------
  |  Branch (302:9): [True: 0, False: 162k]
  ------------------
  303|      0|        if (len != 1) {
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  305|      0|            return 0;
  306|      0|        }
  307|       |
  308|      0|        return EC_POINT_set_to_infinity(group, point);
  309|      0|    }
  310|       |
  311|   162k|    field_len = BN_num_bytes(group->field);
  ------------------
  |  |  188|   162k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  312|   162k|    enc_len = (form == POINT_CONVERSION_COMPRESSED) ? 1 + field_len : 1 + 2 * field_len;
  ------------------
  |  Branch (312:15): [True: 0, False: 162k]
  ------------------
  313|       |
  314|   162k|    if (len != (size_t)enc_len) {
  ------------------
  |  Branch (314:9): [True: 0, False: 162k]
  ------------------
  315|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        return 0;
  317|      0|    }
  318|       |
  319|   162k|    if (ctx == NULL) {
  ------------------
  |  Branch (319:9): [True: 162k, False: 0]
  ------------------
  320|   162k|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  321|   162k|        if (ctx == NULL)
  ------------------
  |  Branch (321:13): [True: 0, False: 162k]
  ------------------
  322|      0|            return 0;
  323|   162k|    }
  324|       |
  325|   162k|    BN_CTX_start(ctx);
  326|   162k|    x = BN_CTX_get(ctx);
  327|   162k|    y = BN_CTX_get(ctx);
  328|   162k|    if (y == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 162k]
  ------------------
  329|      0|        goto err;
  330|       |
  331|   162k|    if (!BN_bin2bn(buf + 1, field_len, x))
  ------------------
  |  Branch (331:9): [True: 0, False: 162k]
  ------------------
  332|      0|        goto err;
  333|   162k|    if (BN_ucmp(x, group->field) >= 0) {
  ------------------
  |  Branch (333:9): [True: 0, False: 162k]
  ------------------
  334|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  335|      0|        goto err;
  336|      0|    }
  337|       |
  338|   162k|    if (form == POINT_CONVERSION_COMPRESSED) {
  ------------------
  |  Branch (338:9): [True: 0, False: 162k]
  ------------------
  339|      0|        if (!EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx))
  ------------------
  |  Branch (339:13): [True: 0, False: 0]
  ------------------
  340|      0|            goto err;
  341|   162k|    } else {
  342|   162k|        if (!BN_bin2bn(buf + 1 + field_len, field_len, y))
  ------------------
  |  Branch (342:13): [True: 0, False: 162k]
  ------------------
  343|      0|            goto err;
  344|   162k|        if (BN_ucmp(y, group->field) >= 0) {
  ------------------
  |  Branch (344:13): [True: 0, False: 162k]
  ------------------
  345|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  346|      0|            goto err;
  347|      0|        }
  348|   162k|        if (form == POINT_CONVERSION_HYBRID) {
  ------------------
  |  Branch (348:13): [True: 0, False: 162k]
  ------------------
  349|      0|            if (y_bit != BN_is_odd(y)) {
  ------------------
  |  Branch (349:17): [True: 0, False: 0]
  ------------------
  350|      0|                ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|                goto err;
  352|      0|            }
  353|      0|        }
  354|       |
  355|       |        /*
  356|       |         * EC_POINT_set_affine_coordinates is responsible for checking that
  357|       |         * the point is on the curve.
  358|       |         */
  359|   162k|        if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (359:13): [True: 0, False: 162k]
  ------------------
  360|      0|            goto err;
  361|   162k|    }
  362|       |
  363|   162k|    ret = 1;
  364|       |
  365|   162k|err:
  366|   162k|    BN_CTX_end(ctx);
  367|   162k|    BN_CTX_free(new_ctx);
  368|   162k|    return ret;
  369|   162k|}

ossl_ec_GFp_simple_group_init:
   99|   325k|{
  100|   325k|    group->field = BN_new();
  101|   325k|    group->a = BN_new();
  102|   325k|    group->b = BN_new();
  103|   325k|    if (group->field == NULL || group->a == NULL || group->b == NULL) {
  ------------------
  |  Branch (103:9): [True: 0, False: 325k]
  |  Branch (103:33): [True: 0, False: 325k]
  |  Branch (103:53): [True: 0, False: 325k]
  ------------------
  104|      0|        BN_free(group->field);
  105|      0|        BN_free(group->a);
  106|      0|        BN_free(group->b);
  107|      0|        return 0;
  108|      0|    }
  109|   325k|    group->a_is_minus3 = 0;
  110|   325k|    return 1;
  111|   325k|}
ossl_ec_GFp_simple_group_finish:
  114|   325k|{
  115|   325k|    BN_free(group->field);
  116|   325k|    BN_free(group->a);
  117|   325k|    BN_free(group->b);
  118|   325k|}
ossl_ec_GFp_simple_group_copy:
  128|   162k|{
  129|   162k|    if (!BN_copy(dest->field, src->field))
  ------------------
  |  Branch (129:9): [True: 0, False: 162k]
  ------------------
  130|      0|        return 0;
  131|   162k|    if (!BN_copy(dest->a, src->a))
  ------------------
  |  Branch (131:9): [True: 0, False: 162k]
  ------------------
  132|      0|        return 0;
  133|   162k|    if (!BN_copy(dest->b, src->b))
  ------------------
  |  Branch (133:9): [True: 0, False: 162k]
  ------------------
  134|      0|        return 0;
  135|       |
  136|   162k|    dest->a_is_minus3 = src->a_is_minus3;
  137|       |
  138|   162k|    return 1;
  139|   162k|}
ossl_ec_GFp_simple_group_set_curve:
  144|   162k|{
  145|   162k|    int ret = 0;
  146|   162k|    BN_CTX *new_ctx = NULL;
  147|   162k|    BIGNUM *tmp_a;
  148|       |
  149|       |    /* p must be a prime > 3 */
  150|   162k|    if (BN_num_bits(p) <= 2 || !BN_is_odd(p)) {
  ------------------
  |  Branch (150:9): [True: 0, False: 162k]
  |  Branch (150:32): [True: 0, False: 162k]
  ------------------
  151|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  152|      0|        return 0;
  153|      0|    }
  154|       |
  155|   162k|    if (ctx == NULL) {
  ------------------
  |  Branch (155:9): [True: 0, False: 162k]
  ------------------
  156|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  157|      0|        if (ctx == NULL)
  ------------------
  |  Branch (157:13): [True: 0, False: 0]
  ------------------
  158|      0|            return 0;
  159|      0|    }
  160|       |
  161|   162k|    BN_CTX_start(ctx);
  162|   162k|    tmp_a = BN_CTX_get(ctx);
  163|   162k|    if (tmp_a == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 162k]
  ------------------
  164|      0|        goto err;
  165|       |
  166|       |    /* group->field */
  167|   162k|    if (!BN_copy(group->field, p))
  ------------------
  |  Branch (167:9): [True: 0, False: 162k]
  ------------------
  168|      0|        goto err;
  169|   162k|    BN_set_negative(group->field, 0);
  170|       |
  171|       |    /* group->a */
  172|   162k|    if (!BN_nnmod(tmp_a, a, p, ctx))
  ------------------
  |  Branch (172:9): [True: 0, False: 162k]
  ------------------
  173|      0|        goto err;
  174|   162k|    if (group->meth->field_encode != NULL) {
  ------------------
  |  Branch (174:9): [True: 12.8k, False: 149k]
  ------------------
  175|  12.8k|        if (!group->meth->field_encode(group, group->a, tmp_a, ctx))
  ------------------
  |  Branch (175:13): [True: 0, False: 12.8k]
  ------------------
  176|      0|            goto err;
  177|   149k|    } else if (!BN_copy(group->a, tmp_a))
  ------------------
  |  Branch (177:16): [True: 0, False: 149k]
  ------------------
  178|      0|        goto err;
  179|       |
  180|       |    /* group->b */
  181|   162k|    if (!BN_nnmod(group->b, b, p, ctx))
  ------------------
  |  Branch (181:9): [True: 0, False: 162k]
  ------------------
  182|      0|        goto err;
  183|   162k|    if (group->meth->field_encode != NULL)
  ------------------
  |  Branch (183:9): [True: 12.8k, False: 149k]
  ------------------
  184|  12.8k|        if (!group->meth->field_encode(group, group->b, group->b, ctx))
  ------------------
  |  Branch (184:13): [True: 0, False: 12.8k]
  ------------------
  185|      0|            goto err;
  186|       |
  187|       |    /* group->a_is_minus3 */
  188|   162k|    if (!BN_add_word(tmp_a, 3))
  ------------------
  |  Branch (188:9): [True: 0, False: 162k]
  ------------------
  189|      0|        goto err;
  190|   162k|    group->a_is_minus3 = (0 == BN_cmp(tmp_a, group->field));
  191|       |
  192|   162k|    ret = 1;
  193|       |
  194|   162k|err:
  195|   162k|    BN_CTX_end(ctx);
  196|   162k|    BN_CTX_free(new_ctx);
  197|   162k|    return ret;
  198|   162k|}
ossl_ec_GFp_simple_point_init:
  323|   651k|{
  324|   651k|    point->X = BN_new();
  325|   651k|    point->Y = BN_new();
  326|   651k|    point->Z = BN_new();
  327|   651k|    point->Z_is_one = 0;
  328|       |
  329|   651k|    if (point->X == NULL || point->Y == NULL || point->Z == NULL) {
  ------------------
  |  Branch (329:9): [True: 0, False: 651k]
  |  Branch (329:29): [True: 0, False: 651k]
  |  Branch (329:49): [True: 0, False: 651k]
  ------------------
  330|      0|        BN_free(point->X);
  331|      0|        BN_free(point->Y);
  332|      0|        BN_free(point->Z);
  333|      0|        return 0;
  334|      0|    }
  335|   651k|    return 1;
  336|   651k|}
ossl_ec_GFp_simple_point_finish:
  339|   651k|{
  340|   651k|    BN_free(point->X);
  341|   651k|    BN_free(point->Y);
  342|   651k|    BN_free(point->Z);
  343|   651k|}
ossl_ec_GFp_simple_point_clear_finish:
  346|    288|{
  347|    288|    BN_clear_free(point->X);
  348|    288|    BN_clear_free(point->Y);
  349|    288|    BN_clear_free(point->Z);
  350|    288|    point->Z_is_one = 0;
  351|    288|}
ossl_ec_GFp_simple_point_copy:
  354|   325k|{
  355|   325k|    if (!BN_copy(dest->X, src->X))
  ------------------
  |  Branch (355:9): [True: 0, False: 325k]
  ------------------
  356|      0|        return 0;
  357|   325k|    if (!BN_copy(dest->Y, src->Y))
  ------------------
  |  Branch (357:9): [True: 0, False: 325k]
  ------------------
  358|      0|        return 0;
  359|   325k|    if (!BN_copy(dest->Z, src->Z))
  ------------------
  |  Branch (359:9): [True: 0, False: 325k]
  ------------------
  360|      0|        return 0;
  361|   325k|    dest->Z_is_one = src->Z_is_one;
  362|   325k|    dest->curve_name = src->curve_name;
  363|       |
  364|   325k|    return 1;
  365|   325k|}
ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp:
  381|   325k|{
  382|   325k|    BN_CTX *new_ctx = NULL;
  383|   325k|    int ret = 0;
  384|       |
  385|   325k|    if (ctx == NULL) {
  ------------------
  |  Branch (385:9): [True: 0, False: 325k]
  ------------------
  386|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  387|      0|        if (ctx == NULL)
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  ------------------
  388|      0|            return 0;
  389|      0|    }
  390|       |
  391|   325k|    if (x != NULL) {
  ------------------
  |  Branch (391:9): [True: 325k, False: 0]
  ------------------
  392|   325k|        if (!BN_nnmod(point->X, x, group->field, ctx))
  ------------------
  |  Branch (392:13): [True: 0, False: 325k]
  ------------------
  393|      0|            goto err;
  394|   325k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (394:13): [True: 25.3k, False: 299k]
  ------------------
  395|  25.3k|            if (!group->meth->field_encode(group, point->X, point->X, ctx))
  ------------------
  |  Branch (395:17): [True: 0, False: 25.3k]
  ------------------
  396|      0|                goto err;
  397|  25.3k|        }
  398|   325k|    }
  399|       |
  400|   325k|    if (y != NULL) {
  ------------------
  |  Branch (400:9): [True: 325k, False: 0]
  ------------------
  401|   325k|        if (!BN_nnmod(point->Y, y, group->field, ctx))
  ------------------
  |  Branch (401:13): [True: 0, False: 325k]
  ------------------
  402|      0|            goto err;
  403|   325k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (403:13): [True: 25.3k, False: 299k]
  ------------------
  404|  25.3k|            if (!group->meth->field_encode(group, point->Y, point->Y, ctx))
  ------------------
  |  Branch (404:17): [True: 0, False: 25.3k]
  ------------------
  405|      0|                goto err;
  406|  25.3k|        }
  407|   325k|    }
  408|       |
  409|   325k|    if (z != NULL) {
  ------------------
  |  Branch (409:9): [True: 325k, False: 0]
  ------------------
  410|   325k|        int Z_is_one;
  411|       |
  412|   325k|        if (!BN_nnmod(point->Z, z, group->field, ctx))
  ------------------
  |  Branch (412:13): [True: 0, False: 325k]
  ------------------
  413|      0|            goto err;
  414|   325k|        Z_is_one = BN_is_one(point->Z);
  415|   325k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (415:13): [True: 25.3k, False: 299k]
  ------------------
  416|  25.3k|            if (Z_is_one && (group->meth->field_set_to_one != 0)) {
  ------------------
  |  Branch (416:17): [True: 25.3k, False: 0]
  |  Branch (416:29): [True: 25.3k, False: 0]
  ------------------
  417|  25.3k|                if (!group->meth->field_set_to_one(group, point->Z, ctx))
  ------------------
  |  Branch (417:21): [True: 0, False: 25.3k]
  ------------------
  418|      0|                    goto err;
  419|  25.3k|            } else {
  420|      0|                if (!group->meth->field_encode(group, point->Z, point->Z, ctx))
  ------------------
  |  Branch (420:21): [True: 0, False: 0]
  ------------------
  421|      0|                    goto err;
  422|      0|            }
  423|  25.3k|        }
  424|   325k|        point->Z_is_one = Z_is_one;
  425|   325k|    }
  426|       |
  427|   325k|    ret = 1;
  428|       |
  429|   325k|err:
  430|   325k|    BN_CTX_free(new_ctx);
  431|   325k|    return ret;
  432|   325k|}
ossl_ec_GFp_simple_point_set_affine_coordinates:
  487|   324k|{
  488|   324k|    if (x == NULL || y == NULL) {
  ------------------
  |  Branch (488:9): [True: 0, False: 324k]
  |  Branch (488:22): [True: 0, False: 324k]
  ------------------
  489|       |        /*
  490|       |         * unlike for projective coordinates, we do not tolerate this
  491|       |         */
  492|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  493|      0|        return 0;
  494|      0|    }
  495|       |
  496|   324k|    return EC_POINT_set_Jprojective_coordinates_GFp(group, point, x, y,
  497|   324k|        BN_value_one(), ctx);
  498|   324k|}
ossl_ec_GFp_simple_point_get_affine_coordinates:
  504|    288|{
  505|    288|    BN_CTX *new_ctx = NULL;
  506|    288|    BIGNUM *Z, *Z_1, *Z_2, *Z_3;
  507|    288|    const BIGNUM *Z_;
  508|    288|    int ret = 0;
  509|       |
  510|    288|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (510:9): [True: 0, False: 288]
  ------------------
  511|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  512|      0|        return 0;
  513|      0|    }
  514|       |
  515|    288|    if (ctx == NULL) {
  ------------------
  |  Branch (515:9): [True: 0, False: 288]
  ------------------
  516|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  517|      0|        if (ctx == NULL)
  ------------------
  |  Branch (517:13): [True: 0, False: 0]
  ------------------
  518|      0|            return 0;
  519|      0|    }
  520|       |
  521|    288|    BN_CTX_start(ctx);
  522|    288|    Z = BN_CTX_get(ctx);
  523|    288|    Z_1 = BN_CTX_get(ctx);
  524|    288|    Z_2 = BN_CTX_get(ctx);
  525|    288|    Z_3 = BN_CTX_get(ctx);
  526|    288|    if (Z_3 == NULL)
  ------------------
  |  Branch (526:9): [True: 0, False: 288]
  ------------------
  527|      0|        goto err;
  528|       |
  529|       |    /* transform  (X, Y, Z)  into  (x, y) := (X/Z^2, Y/Z^3) */
  530|       |
  531|    288|    if (group->meth->field_decode != NULL) {
  ------------------
  |  Branch (531:9): [True: 288, False: 0]
  ------------------
  532|    288|        if (!group->meth->field_decode(group, Z, point->Z, ctx))
  ------------------
  |  Branch (532:13): [True: 0, False: 288]
  ------------------
  533|      0|            goto err;
  534|    288|        Z_ = Z;
  535|    288|    } else {
  536|      0|        Z_ = point->Z;
  537|      0|    }
  538|       |
  539|    288|    if (BN_is_one(Z_)) {
  ------------------
  |  Branch (539:9): [True: 288, False: 0]
  ------------------
  540|    288|        if (group->meth->field_decode != NULL) {
  ------------------
  |  Branch (540:13): [True: 288, False: 0]
  ------------------
  541|    288|            if (x != NULL) {
  ------------------
  |  Branch (541:17): [True: 288, False: 0]
  ------------------
  542|    288|                if (!group->meth->field_decode(group, x, point->X, ctx))
  ------------------
  |  Branch (542:21): [True: 0, False: 288]
  ------------------
  543|      0|                    goto err;
  544|    288|            }
  545|    288|            if (y != NULL) {
  ------------------
  |  Branch (545:17): [True: 288, False: 0]
  ------------------
  546|    288|                if (!group->meth->field_decode(group, y, point->Y, ctx))
  ------------------
  |  Branch (546:21): [True: 0, False: 288]
  ------------------
  547|      0|                    goto err;
  548|    288|            }
  549|    288|        } else {
  550|      0|            if (x != NULL) {
  ------------------
  |  Branch (550:17): [True: 0, False: 0]
  ------------------
  551|      0|                if (!BN_copy(x, point->X))
  ------------------
  |  Branch (551:21): [True: 0, False: 0]
  ------------------
  552|      0|                    goto err;
  553|      0|            }
  554|      0|            if (y != NULL) {
  ------------------
  |  Branch (554:17): [True: 0, False: 0]
  ------------------
  555|      0|                if (!BN_copy(y, point->Y))
  ------------------
  |  Branch (555:21): [True: 0, False: 0]
  ------------------
  556|      0|                    goto err;
  557|      0|            }
  558|      0|        }
  559|    288|    } else {
  560|      0|        if (!group->meth->field_inv(group, Z_1, Z_, ctx)) {
  ------------------
  |  Branch (560:13): [True: 0, False: 0]
  ------------------
  561|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  562|      0|            goto err;
  563|      0|        }
  564|       |
  565|      0|        if (group->meth->field_encode == NULL) {
  ------------------
  |  Branch (565:13): [True: 0, False: 0]
  ------------------
  566|       |            /* field_sqr works on standard representation */
  567|      0|            if (!group->meth->field_sqr(group, Z_2, Z_1, ctx))
  ------------------
  |  Branch (567:17): [True: 0, False: 0]
  ------------------
  568|      0|                goto err;
  569|      0|        } else {
  570|      0|            if (!BN_mod_sqr(Z_2, Z_1, group->field, ctx))
  ------------------
  |  Branch (570:17): [True: 0, False: 0]
  ------------------
  571|      0|                goto err;
  572|      0|        }
  573|       |
  574|      0|        if (x != NULL) {
  ------------------
  |  Branch (574:13): [True: 0, False: 0]
  ------------------
  575|       |            /*
  576|       |             * in the Montgomery case, field_mul will cancel out Montgomery
  577|       |             * factor in X:
  578|       |             */
  579|      0|            if (!group->meth->field_mul(group, x, point->X, Z_2, ctx))
  ------------------
  |  Branch (579:17): [True: 0, False: 0]
  ------------------
  580|      0|                goto err;
  581|      0|        }
  582|       |
  583|      0|        if (y != NULL) {
  ------------------
  |  Branch (583:13): [True: 0, False: 0]
  ------------------
  584|      0|            if (group->meth->field_encode == NULL) {
  ------------------
  |  Branch (584:17): [True: 0, False: 0]
  ------------------
  585|       |                /*
  586|       |                 * field_mul works on standard representation
  587|       |                 */
  588|      0|                if (!group->meth->field_mul(group, Z_3, Z_2, Z_1, ctx))
  ------------------
  |  Branch (588:21): [True: 0, False: 0]
  ------------------
  589|      0|                    goto err;
  590|      0|            } else {
  591|      0|                if (!BN_mod_mul(Z_3, Z_2, Z_1, group->field, ctx))
  ------------------
  |  Branch (591:21): [True: 0, False: 0]
  ------------------
  592|      0|                    goto err;
  593|      0|            }
  594|       |
  595|       |            /*
  596|       |             * in the Montgomery case, field_mul will cancel out Montgomery
  597|       |             * factor in Y:
  598|       |             */
  599|      0|            if (!group->meth->field_mul(group, y, point->Y, Z_3, ctx))
  ------------------
  |  Branch (599:17): [True: 0, False: 0]
  ------------------
  600|      0|                goto err;
  601|      0|        }
  602|      0|    }
  603|       |
  604|    288|    ret = 1;
  605|       |
  606|    288|err:
  607|    288|    BN_CTX_end(ctx);
  608|    288|    BN_CTX_free(new_ctx);
  609|    288|    return ret;
  610|    288|}
ossl_ec_GFp_simple_is_at_infinity:
  951|   326k|{
  952|   326k|    return BN_is_zero(point->Z);
  953|   326k|}
ossl_ec_GFp_simple_is_on_curve:
  957|   324k|{
  958|   324k|    int (*field_mul)(const EC_GROUP *, BIGNUM *, const BIGNUM *,
  959|   324k|        const BIGNUM *, BN_CTX *);
  960|   324k|    int (*field_sqr)(const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);
  961|   324k|    const BIGNUM *p;
  962|   324k|    BN_CTX *new_ctx = NULL;
  963|   324k|    BIGNUM *rh, *tmp, *Z4, *Z6;
  964|   324k|    int ret = -1;
  965|       |
  966|   324k|    if (EC_POINT_is_at_infinity(group, point))
  ------------------
  |  Branch (966:9): [True: 0, False: 324k]
  ------------------
  967|      0|        return 1;
  968|       |
  969|   324k|    field_mul = group->meth->field_mul;
  970|   324k|    field_sqr = group->meth->field_sqr;
  971|   324k|    p = group->field;
  972|       |
  973|   324k|    if (ctx == NULL) {
  ------------------
  |  Branch (973:9): [True: 0, False: 324k]
  ------------------
  974|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  975|      0|        if (ctx == NULL)
  ------------------
  |  Branch (975:13): [True: 0, False: 0]
  ------------------
  976|      0|            return -1;
  977|      0|    }
  978|       |
  979|   324k|    BN_CTX_start(ctx);
  980|   324k|    rh = BN_CTX_get(ctx);
  981|   324k|    tmp = BN_CTX_get(ctx);
  982|   324k|    Z4 = BN_CTX_get(ctx);
  983|   324k|    Z6 = BN_CTX_get(ctx);
  984|   324k|    if (Z6 == NULL)
  ------------------
  |  Branch (984:9): [True: 0, False: 324k]
  ------------------
  985|      0|        goto err;
  986|       |
  987|       |    /*-
  988|       |     * We have a curve defined by a Weierstrass equation
  989|       |     *      y^2 = x^3 + a*x + b.
  990|       |     * The point to consider is given in Jacobian projective coordinates
  991|       |     * where  (X, Y, Z)  represents  (x, y) = (X/Z^2, Y/Z^3).
  992|       |     * Substituting this and multiplying by  Z^6  transforms the above equation into
  993|       |     *      Y^2 = X^3 + a*X*Z^4 + b*Z^6.
  994|       |     * To test this, we add up the right-hand side in 'rh'.
  995|       |     */
  996|       |
  997|       |    /* rh := X^2 */
  998|   324k|    if (!field_sqr(group, rh, point->X, ctx))
  ------------------
  |  Branch (998:9): [True: 0, False: 324k]
  ------------------
  999|      0|        goto err;
 1000|       |
 1001|   324k|    if (!point->Z_is_one) {
  ------------------
  |  Branch (1001:9): [True: 0, False: 324k]
  ------------------
 1002|      0|        if (!field_sqr(group, tmp, point->Z, ctx))
  ------------------
  |  Branch (1002:13): [True: 0, False: 0]
  ------------------
 1003|      0|            goto err;
 1004|      0|        if (!field_sqr(group, Z4, tmp, ctx))
  ------------------
  |  Branch (1004:13): [True: 0, False: 0]
  ------------------
 1005|      0|            goto err;
 1006|      0|        if (!field_mul(group, Z6, Z4, tmp, ctx))
  ------------------
  |  Branch (1006:13): [True: 0, False: 0]
  ------------------
 1007|      0|            goto err;
 1008|       |
 1009|       |        /* rh := (rh + a*Z^4)*X */
 1010|      0|        if (group->a_is_minus3) {
  ------------------
  |  Branch (1010:13): [True: 0, False: 0]
  ------------------
 1011|      0|            if (!BN_mod_lshift1_quick(tmp, Z4, p))
  ------------------
  |  Branch (1011:17): [True: 0, False: 0]
  ------------------
 1012|      0|                goto err;
 1013|      0|            if (!BN_mod_add_quick(tmp, tmp, Z4, p))
  ------------------
  |  Branch (1013:17): [True: 0, False: 0]
  ------------------
 1014|      0|                goto err;
 1015|      0|            if (!BN_mod_sub_quick(rh, rh, tmp, p))
  ------------------
  |  Branch (1015:17): [True: 0, False: 0]
  ------------------
 1016|      0|                goto err;
 1017|      0|            if (!field_mul(group, rh, rh, point->X, ctx))
  ------------------
  |  Branch (1017:17): [True: 0, False: 0]
  ------------------
 1018|      0|                goto err;
 1019|      0|        } else {
 1020|      0|            if (!field_mul(group, tmp, Z4, group->a, ctx))
  ------------------
  |  Branch (1020:17): [True: 0, False: 0]
  ------------------
 1021|      0|                goto err;
 1022|      0|            if (!BN_mod_add_quick(rh, rh, tmp, p))
  ------------------
  |  Branch (1022:17): [True: 0, False: 0]
  ------------------
 1023|      0|                goto err;
 1024|      0|            if (!field_mul(group, rh, rh, point->X, ctx))
  ------------------
  |  Branch (1024:17): [True: 0, False: 0]
  ------------------
 1025|      0|                goto err;
 1026|      0|        }
 1027|       |
 1028|       |        /* rh := rh + b*Z^6 */
 1029|      0|        if (!field_mul(group, tmp, group->b, Z6, ctx))
  ------------------
  |  Branch (1029:13): [True: 0, False: 0]
  ------------------
 1030|      0|            goto err;
 1031|      0|        if (!BN_mod_add_quick(rh, rh, tmp, p))
  ------------------
  |  Branch (1031:13): [True: 0, False: 0]
  ------------------
 1032|      0|            goto err;
 1033|   324k|    } else {
 1034|       |        /* point->Z_is_one */
 1035|       |
 1036|       |        /* rh := (rh + a)*X */
 1037|   324k|        if (!BN_mod_add_quick(rh, rh, group->a, p))
  ------------------
  |  Branch (1037:13): [True: 0, False: 324k]
  ------------------
 1038|      0|            goto err;
 1039|   324k|        if (!field_mul(group, rh, rh, point->X, ctx))
  ------------------
  |  Branch (1039:13): [True: 0, False: 324k]
  ------------------
 1040|      0|            goto err;
 1041|       |        /* rh := rh + b */
 1042|   324k|        if (!BN_mod_add_quick(rh, rh, group->b, p))
  ------------------
  |  Branch (1042:13): [True: 0, False: 324k]
  ------------------
 1043|      0|            goto err;
 1044|   324k|    }
 1045|       |
 1046|       |    /* 'lh' := Y^2 */
 1047|   324k|    if (!field_sqr(group, tmp, point->Y, ctx))
  ------------------
  |  Branch (1047:9): [True: 0, False: 324k]
  ------------------
 1048|      0|        goto err;
 1049|       |
 1050|   324k|    ret = (0 == BN_ucmp(tmp, rh));
 1051|       |
 1052|   324k|err:
 1053|   324k|    BN_CTX_end(ctx);
 1054|   324k|    BN_CTX_free(new_ctx);
 1055|   324k|    return ret;
 1056|   324k|}
ossl_ec_GFp_simple_cmp:
 1060|     70|{
 1061|       |    /*-
 1062|       |     * return values:
 1063|       |     *  -1   error
 1064|       |     *   0   equal (in affine coordinates)
 1065|       |     *   1   not equal
 1066|       |     */
 1067|       |
 1068|     70|    int (*field_mul)(const EC_GROUP *, BIGNUM *, const BIGNUM *,
 1069|     70|        const BIGNUM *, BN_CTX *);
 1070|     70|    int (*field_sqr)(const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);
 1071|     70|    BN_CTX *new_ctx = NULL;
 1072|     70|    BIGNUM *tmp1, *tmp2, *Za23, *Zb23;
 1073|     70|    const BIGNUM *tmp1_, *tmp2_;
 1074|     70|    int ret = -1;
 1075|       |
 1076|     70|    if (EC_POINT_is_at_infinity(group, a)) {
  ------------------
  |  Branch (1076:9): [True: 0, False: 70]
  ------------------
 1077|      0|        return EC_POINT_is_at_infinity(group, b) ? 0 : 1;
  ------------------
  |  Branch (1077:16): [True: 0, False: 0]
  ------------------
 1078|      0|    }
 1079|       |
 1080|     70|    if (EC_POINT_is_at_infinity(group, b))
  ------------------
  |  Branch (1080:9): [True: 0, False: 70]
  ------------------
 1081|      0|        return 1;
 1082|       |
 1083|     70|    if (a->Z_is_one && b->Z_is_one) {
  ------------------
  |  Branch (1083:9): [True: 70, False: 0]
  |  Branch (1083:24): [True: 70, False: 0]
  ------------------
 1084|     70|        return ((BN_cmp(a->X, b->X) == 0) && BN_cmp(a->Y, b->Y) == 0) ? 0 : 1;
  ------------------
  |  Branch (1084:17): [True: 70, False: 0]
  |  Branch (1084:46): [True: 70, False: 0]
  ------------------
 1085|     70|    }
 1086|       |
 1087|      0|    field_mul = group->meth->field_mul;
 1088|      0|    field_sqr = group->meth->field_sqr;
 1089|       |
 1090|      0|    if (ctx == NULL) {
  ------------------
  |  Branch (1090:9): [True: 0, False: 0]
  ------------------
 1091|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
 1092|      0|        if (ctx == NULL)
  ------------------
  |  Branch (1092:13): [True: 0, False: 0]
  ------------------
 1093|      0|            return -1;
 1094|      0|    }
 1095|       |
 1096|      0|    BN_CTX_start(ctx);
 1097|      0|    tmp1 = BN_CTX_get(ctx);
 1098|      0|    tmp2 = BN_CTX_get(ctx);
 1099|      0|    Za23 = BN_CTX_get(ctx);
 1100|      0|    Zb23 = BN_CTX_get(ctx);
 1101|      0|    if (Zb23 == NULL)
  ------------------
  |  Branch (1101:9): [True: 0, False: 0]
  ------------------
 1102|      0|        goto end;
 1103|       |
 1104|       |    /*-
 1105|       |     * We have to decide whether
 1106|       |     *     (X_a/Z_a^2, Y_a/Z_a^3) = (X_b/Z_b^2, Y_b/Z_b^3),
 1107|       |     * or equivalently, whether
 1108|       |     *     (X_a*Z_b^2, Y_a*Z_b^3) = (X_b*Z_a^2, Y_b*Z_a^3).
 1109|       |     */
 1110|       |
 1111|      0|    if (!b->Z_is_one) {
  ------------------
  |  Branch (1111:9): [True: 0, False: 0]
  ------------------
 1112|      0|        if (!field_sqr(group, Zb23, b->Z, ctx))
  ------------------
  |  Branch (1112:13): [True: 0, False: 0]
  ------------------
 1113|      0|            goto end;
 1114|      0|        if (!field_mul(group, tmp1, a->X, Zb23, ctx))
  ------------------
  |  Branch (1114:13): [True: 0, False: 0]
  ------------------
 1115|      0|            goto end;
 1116|      0|        tmp1_ = tmp1;
 1117|      0|    } else
 1118|      0|        tmp1_ = a->X;
 1119|      0|    if (!a->Z_is_one) {
  ------------------
  |  Branch (1119:9): [True: 0, False: 0]
  ------------------
 1120|      0|        if (!field_sqr(group, Za23, a->Z, ctx))
  ------------------
  |  Branch (1120:13): [True: 0, False: 0]
  ------------------
 1121|      0|            goto end;
 1122|      0|        if (!field_mul(group, tmp2, b->X, Za23, ctx))
  ------------------
  |  Branch (1122:13): [True: 0, False: 0]
  ------------------
 1123|      0|            goto end;
 1124|      0|        tmp2_ = tmp2;
 1125|      0|    } else
 1126|      0|        tmp2_ = b->X;
 1127|       |
 1128|       |    /* compare  X_a*Z_b^2  with  X_b*Z_a^2 */
 1129|      0|    if (BN_cmp(tmp1_, tmp2_) != 0) {
  ------------------
  |  Branch (1129:9): [True: 0, False: 0]
  ------------------
 1130|      0|        ret = 1; /* points differ */
 1131|      0|        goto end;
 1132|      0|    }
 1133|       |
 1134|      0|    if (!b->Z_is_one) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 0]
  ------------------
 1135|      0|        if (!field_mul(group, Zb23, Zb23, b->Z, ctx))
  ------------------
  |  Branch (1135:13): [True: 0, False: 0]
  ------------------
 1136|      0|            goto end;
 1137|      0|        if (!field_mul(group, tmp1, a->Y, Zb23, ctx))
  ------------------
  |  Branch (1137:13): [True: 0, False: 0]
  ------------------
 1138|      0|            goto end;
 1139|       |        /* tmp1_ = tmp1 */
 1140|      0|    } else
 1141|      0|        tmp1_ = a->Y;
 1142|      0|    if (!a->Z_is_one) {
  ------------------
  |  Branch (1142:9): [True: 0, False: 0]
  ------------------
 1143|      0|        if (!field_mul(group, Za23, Za23, a->Z, ctx))
  ------------------
  |  Branch (1143:13): [True: 0, False: 0]
  ------------------
 1144|      0|            goto end;
 1145|      0|        if (!field_mul(group, tmp2, b->Y, Za23, ctx))
  ------------------
  |  Branch (1145:13): [True: 0, False: 0]
  ------------------
 1146|      0|            goto end;
 1147|       |        /* tmp2_ = tmp2 */
 1148|      0|    } else
 1149|      0|        tmp2_ = b->Y;
 1150|       |
 1151|       |    /* compare  Y_a*Z_b^3  with  Y_b*Z_a^3 */
 1152|      0|    if (BN_cmp(tmp1_, tmp2_) != 0) {
  ------------------
  |  Branch (1152:9): [True: 0, False: 0]
  ------------------
 1153|      0|        ret = 1; /* points differ */
 1154|      0|        goto end;
 1155|      0|    }
 1156|       |
 1157|       |    /* points are equal */
 1158|      0|    ret = 0;
 1159|       |
 1160|      0|end:
 1161|      0|    BN_CTX_end(ctx);
 1162|      0|    BN_CTX_free(new_ctx);
 1163|      0|    return ret;
 1164|      0|}
ossl_ec_GFp_simple_ladder_pre:
 1493|    288|{
 1494|    288|    BIGNUM *t1, *t2, *t3, *t4, *t5 = NULL;
 1495|       |
 1496|    288|    t1 = s->Z;
 1497|    288|    t2 = r->Z;
 1498|    288|    t3 = s->X;
 1499|    288|    t4 = r->X;
 1500|    288|    t5 = s->Y;
 1501|       |
 1502|    288|    if (!p->Z_is_one /* r := 2p */
  ------------------
  |  Branch (1502:9): [True: 0, False: 288]
  ------------------
 1503|    288|        || !group->meth->field_sqr(group, t3, p->X, ctx)
  ------------------
  |  Branch (1503:12): [True: 0, False: 288]
  ------------------
 1504|    288|        || !BN_mod_sub_quick(t4, t3, group->a, group->field)
  ------------------
  |  Branch (1504:12): [True: 0, False: 288]
  ------------------
 1505|    288|        || !group->meth->field_sqr(group, t4, t4, ctx)
  ------------------
  |  Branch (1505:12): [True: 0, False: 288]
  ------------------
 1506|    288|        || !group->meth->field_mul(group, t5, p->X, group->b, ctx)
  ------------------
  |  Branch (1506:12): [True: 0, False: 288]
  ------------------
 1507|    288|        || !BN_mod_lshift_quick(t5, t5, 3, group->field)
  ------------------
  |  Branch (1507:12): [True: 0, False: 288]
  ------------------
 1508|       |        /* r->X coord output */
 1509|    288|        || !BN_mod_sub_quick(r->X, t4, t5, group->field)
  ------------------
  |  Branch (1509:12): [True: 0, False: 288]
  ------------------
 1510|    288|        || !BN_mod_add_quick(t1, t3, group->a, group->field)
  ------------------
  |  Branch (1510:12): [True: 0, False: 288]
  ------------------
 1511|    288|        || !group->meth->field_mul(group, t2, p->X, t1, ctx)
  ------------------
  |  Branch (1511:12): [True: 0, False: 288]
  ------------------
 1512|    288|        || !BN_mod_add_quick(t2, group->b, t2, group->field)
  ------------------
  |  Branch (1512:12): [True: 0, False: 288]
  ------------------
 1513|       |        /* r->Z coord output */
 1514|    288|        || !BN_mod_lshift_quick(r->Z, t2, 2, group->field))
  ------------------
  |  Branch (1514:12): [True: 0, False: 288]
  ------------------
 1515|      0|        return 0;
 1516|       |
 1517|       |    /* make sure lambda (r->Y here for storage) is not zero */
 1518|    288|    do {
 1519|    288|        if (!BN_priv_rand_range_ex(r->Y, group->field, 0, ctx))
  ------------------
  |  Branch (1519:13): [True: 0, False: 288]
  ------------------
 1520|      0|            return 0;
 1521|    288|    } while (BN_is_zero(r->Y));
  ------------------
  |  Branch (1521:14): [True: 0, False: 288]
  ------------------
 1522|       |
 1523|       |    /* make sure lambda (s->Z here for storage) is not zero */
 1524|    288|    do {
 1525|    288|        if (!BN_priv_rand_range_ex(s->Z, group->field, 0, ctx))
  ------------------
  |  Branch (1525:13): [True: 0, False: 288]
  ------------------
 1526|      0|            return 0;
 1527|    288|    } while (BN_is_zero(s->Z));
  ------------------
  |  Branch (1527:14): [True: 0, False: 288]
  ------------------
 1528|       |
 1529|       |    /* if field_encode defined convert between representations */
 1530|    288|    if (group->meth->field_encode != NULL
  ------------------
  |  Branch (1530:9): [True: 288, False: 0]
  ------------------
 1531|    288|        && (!group->meth->field_encode(group, r->Y, r->Y, ctx)
  ------------------
  |  Branch (1531:13): [True: 0, False: 288]
  ------------------
 1532|    288|            || !group->meth->field_encode(group, s->Z, s->Z, ctx)))
  ------------------
  |  Branch (1532:16): [True: 0, False: 288]
  ------------------
 1533|      0|        return 0;
 1534|       |
 1535|       |    /* blind r and s independently */
 1536|    288|    if (!group->meth->field_mul(group, r->Z, r->Z, r->Y, ctx)
  ------------------
  |  Branch (1536:9): [True: 0, False: 288]
  ------------------
 1537|    288|        || !group->meth->field_mul(group, r->X, r->X, r->Y, ctx)
  ------------------
  |  Branch (1537:12): [True: 0, False: 288]
  ------------------
 1538|    288|        || !group->meth->field_mul(group, s->X, p->X, s->Z, ctx)) /* s := p */
  ------------------
  |  Branch (1538:12): [True: 0, False: 288]
  ------------------
 1539|      0|        return 0;
 1540|       |
 1541|    288|    r->Z_is_one = 0;
 1542|    288|    s->Z_is_one = 0;
 1543|       |
 1544|    288|    return 1;
 1545|    288|}
ossl_ec_GFp_simple_ladder_step:
 1563|  73.7k|{
 1564|  73.7k|    int ret = 0;
 1565|  73.7k|    BIGNUM *t0, *t1, *t2, *t3, *t4, *t5, *t6 = NULL;
 1566|       |
 1567|  73.7k|    BN_CTX_start(ctx);
 1568|  73.7k|    t0 = BN_CTX_get(ctx);
 1569|  73.7k|    t1 = BN_CTX_get(ctx);
 1570|  73.7k|    t2 = BN_CTX_get(ctx);
 1571|  73.7k|    t3 = BN_CTX_get(ctx);
 1572|  73.7k|    t4 = BN_CTX_get(ctx);
 1573|  73.7k|    t5 = BN_CTX_get(ctx);
 1574|  73.7k|    t6 = BN_CTX_get(ctx);
 1575|       |
 1576|  73.7k|    if (t6 == NULL
  ------------------
  |  Branch (1576:9): [True: 0, False: 73.7k]
  ------------------
 1577|  73.7k|        || !group->meth->field_mul(group, t6, r->X, s->X, ctx)
  ------------------
  |  Branch (1577:12): [True: 0, False: 73.7k]
  ------------------
 1578|  73.7k|        || !group->meth->field_mul(group, t0, r->Z, s->Z, ctx)
  ------------------
  |  Branch (1578:12): [True: 0, False: 73.7k]
  ------------------
 1579|  73.7k|        || !group->meth->field_mul(group, t4, r->X, s->Z, ctx)
  ------------------
  |  Branch (1579:12): [True: 0, False: 73.7k]
  ------------------
 1580|  73.7k|        || !group->meth->field_mul(group, t3, r->Z, s->X, ctx)
  ------------------
  |  Branch (1580:12): [True: 0, False: 73.7k]
  ------------------
 1581|  73.7k|        || !group->meth->field_mul(group, t5, group->a, t0, ctx)
  ------------------
  |  Branch (1581:12): [True: 0, False: 73.7k]
  ------------------
 1582|  73.7k|        || !BN_mod_add_quick(t5, t6, t5, group->field)
  ------------------
  |  Branch (1582:12): [True: 0, False: 73.7k]
  ------------------
 1583|  73.7k|        || !BN_mod_add_quick(t6, t3, t4, group->field)
  ------------------
  |  Branch (1583:12): [True: 0, False: 73.7k]
  ------------------
 1584|  73.7k|        || !group->meth->field_mul(group, t5, t6, t5, ctx)
  ------------------
  |  Branch (1584:12): [True: 0, False: 73.7k]
  ------------------
 1585|  73.7k|        || !group->meth->field_sqr(group, t0, t0, ctx)
  ------------------
  |  Branch (1585:12): [True: 0, False: 73.7k]
  ------------------
 1586|  73.7k|        || !BN_mod_lshift_quick(t2, group->b, 2, group->field)
  ------------------
  |  Branch (1586:12): [True: 0, False: 73.7k]
  ------------------
 1587|  73.7k|        || !group->meth->field_mul(group, t0, t2, t0, ctx)
  ------------------
  |  Branch (1587:12): [True: 0, False: 73.7k]
  ------------------
 1588|  73.7k|        || !BN_mod_lshift1_quick(t5, t5, group->field)
  ------------------
  |  Branch (1588:12): [True: 0, False: 73.7k]
  ------------------
 1589|  73.7k|        || !BN_mod_sub_quick(t3, t4, t3, group->field)
  ------------------
  |  Branch (1589:12): [True: 0, False: 73.7k]
  ------------------
 1590|       |        /* s->Z coord output */
 1591|  73.7k|        || !group->meth->field_sqr(group, s->Z, t3, ctx)
  ------------------
  |  Branch (1591:12): [True: 0, False: 73.7k]
  ------------------
 1592|  73.7k|        || !group->meth->field_mul(group, t4, s->Z, p->X, ctx)
  ------------------
  |  Branch (1592:12): [True: 0, False: 73.7k]
  ------------------
 1593|  73.7k|        || !BN_mod_add_quick(t0, t0, t5, group->field)
  ------------------
  |  Branch (1593:12): [True: 0, False: 73.7k]
  ------------------
 1594|       |        /* s->X coord output */
 1595|  73.7k|        || !BN_mod_sub_quick(s->X, t0, t4, group->field)
  ------------------
  |  Branch (1595:12): [True: 0, False: 73.7k]
  ------------------
 1596|  73.7k|        || !group->meth->field_sqr(group, t4, r->X, ctx)
  ------------------
  |  Branch (1596:12): [True: 0, False: 73.7k]
  ------------------
 1597|  73.7k|        || !group->meth->field_sqr(group, t5, r->Z, ctx)
  ------------------
  |  Branch (1597:12): [True: 0, False: 73.7k]
  ------------------
 1598|  73.7k|        || !group->meth->field_mul(group, t6, t5, group->a, ctx)
  ------------------
  |  Branch (1598:12): [True: 0, False: 73.7k]
  ------------------
 1599|  73.7k|        || !BN_mod_add_quick(t1, r->X, r->Z, group->field)
  ------------------
  |  Branch (1599:12): [True: 0, False: 73.7k]
  ------------------
 1600|  73.7k|        || !group->meth->field_sqr(group, t1, t1, ctx)
  ------------------
  |  Branch (1600:12): [True: 0, False: 73.7k]
  ------------------
 1601|  73.7k|        || !BN_mod_sub_quick(t1, t1, t4, group->field)
  ------------------
  |  Branch (1601:12): [True: 0, False: 73.7k]
  ------------------
 1602|  73.7k|        || !BN_mod_sub_quick(t1, t1, t5, group->field)
  ------------------
  |  Branch (1602:12): [True: 0, False: 73.7k]
  ------------------
 1603|  73.7k|        || !BN_mod_sub_quick(t3, t4, t6, group->field)
  ------------------
  |  Branch (1603:12): [True: 0, False: 73.7k]
  ------------------
 1604|  73.7k|        || !group->meth->field_sqr(group, t3, t3, ctx)
  ------------------
  |  Branch (1604:12): [True: 0, False: 73.7k]
  ------------------
 1605|  73.7k|        || !group->meth->field_mul(group, t0, t5, t1, ctx)
  ------------------
  |  Branch (1605:12): [True: 0, False: 73.7k]
  ------------------
 1606|  73.7k|        || !group->meth->field_mul(group, t0, t2, t0, ctx)
  ------------------
  |  Branch (1606:12): [True: 0, False: 73.7k]
  ------------------
 1607|       |        /* r->X coord output */
 1608|  73.7k|        || !BN_mod_sub_quick(r->X, t3, t0, group->field)
  ------------------
  |  Branch (1608:12): [True: 0, False: 73.7k]
  ------------------
 1609|  73.7k|        || !BN_mod_add_quick(t3, t4, t6, group->field)
  ------------------
  |  Branch (1609:12): [True: 0, False: 73.7k]
  ------------------
 1610|  73.7k|        || !group->meth->field_sqr(group, t4, t5, ctx)
  ------------------
  |  Branch (1610:12): [True: 0, False: 73.7k]
  ------------------
 1611|  73.7k|        || !group->meth->field_mul(group, t4, t4, t2, ctx)
  ------------------
  |  Branch (1611:12): [True: 0, False: 73.7k]
  ------------------
 1612|  73.7k|        || !group->meth->field_mul(group, t1, t1, t3, ctx)
  ------------------
  |  Branch (1612:12): [True: 0, False: 73.7k]
  ------------------
 1613|  73.7k|        || !BN_mod_lshift1_quick(t1, t1, group->field)
  ------------------
  |  Branch (1613:12): [True: 0, False: 73.7k]
  ------------------
 1614|       |        /* r->Z coord output */
 1615|  73.7k|        || !BN_mod_add_quick(r->Z, t4, t1, group->field))
  ------------------
  |  Branch (1615:12): [True: 0, False: 73.7k]
  ------------------
 1616|      0|        goto err;
 1617|       |
 1618|  73.7k|    ret = 1;
 1619|       |
 1620|  73.7k|err:
 1621|  73.7k|    BN_CTX_end(ctx);
 1622|  73.7k|    return ret;
 1623|  73.7k|}
ossl_ec_GFp_simple_ladder_post:
 1651|    288|{
 1652|    288|    int ret = 0;
 1653|    288|    BIGNUM *t0, *t1, *t2, *t3, *t4, *t5, *t6 = NULL;
 1654|       |
 1655|    288|    if (BN_is_zero(r->Z))
  ------------------
  |  Branch (1655:9): [True: 0, False: 288]
  ------------------
 1656|      0|        return EC_POINT_set_to_infinity(group, r);
 1657|       |
 1658|    288|    if (BN_is_zero(s->Z)) {
  ------------------
  |  Branch (1658:9): [True: 0, False: 288]
  ------------------
 1659|      0|        if (!EC_POINT_copy(r, p)
  ------------------
  |  Branch (1659:13): [True: 0, False: 0]
  ------------------
 1660|      0|            || !EC_POINT_invert(group, r, ctx))
  ------------------
  |  Branch (1660:16): [True: 0, False: 0]
  ------------------
 1661|      0|            return 0;
 1662|      0|        return 1;
 1663|      0|    }
 1664|       |
 1665|    288|    BN_CTX_start(ctx);
 1666|    288|    t0 = BN_CTX_get(ctx);
 1667|    288|    t1 = BN_CTX_get(ctx);
 1668|    288|    t2 = BN_CTX_get(ctx);
 1669|    288|    t3 = BN_CTX_get(ctx);
 1670|    288|    t4 = BN_CTX_get(ctx);
 1671|    288|    t5 = BN_CTX_get(ctx);
 1672|    288|    t6 = BN_CTX_get(ctx);
 1673|       |
 1674|    288|    if (t6 == NULL
  ------------------
  |  Branch (1674:9): [True: 0, False: 288]
  ------------------
 1675|    288|        || !BN_mod_lshift1_quick(t4, p->Y, group->field)
  ------------------
  |  Branch (1675:12): [True: 0, False: 288]
  ------------------
 1676|    288|        || !group->meth->field_mul(group, t6, r->X, t4, ctx)
  ------------------
  |  Branch (1676:12): [True: 0, False: 288]
  ------------------
 1677|    288|        || !group->meth->field_mul(group, t6, s->Z, t6, ctx)
  ------------------
  |  Branch (1677:12): [True: 0, False: 288]
  ------------------
 1678|    288|        || !group->meth->field_mul(group, t5, r->Z, t6, ctx)
  ------------------
  |  Branch (1678:12): [True: 0, False: 288]
  ------------------
 1679|    288|        || !BN_mod_lshift1_quick(t1, group->b, group->field)
  ------------------
  |  Branch (1679:12): [True: 0, False: 288]
  ------------------
 1680|    288|        || !group->meth->field_mul(group, t1, s->Z, t1, ctx)
  ------------------
  |  Branch (1680:12): [True: 0, False: 288]
  ------------------
 1681|    288|        || !group->meth->field_sqr(group, t3, r->Z, ctx)
  ------------------
  |  Branch (1681:12): [True: 0, False: 288]
  ------------------
 1682|    288|        || !group->meth->field_mul(group, t2, t3, t1, ctx)
  ------------------
  |  Branch (1682:12): [True: 0, False: 288]
  ------------------
 1683|    288|        || !group->meth->field_mul(group, t6, r->Z, group->a, ctx)
  ------------------
  |  Branch (1683:12): [True: 0, False: 288]
  ------------------
 1684|    288|        || !group->meth->field_mul(group, t1, p->X, r->X, ctx)
  ------------------
  |  Branch (1684:12): [True: 0, False: 288]
  ------------------
 1685|    288|        || !BN_mod_add_quick(t1, t1, t6, group->field)
  ------------------
  |  Branch (1685:12): [True: 0, False: 288]
  ------------------
 1686|    288|        || !group->meth->field_mul(group, t1, s->Z, t1, ctx)
  ------------------
  |  Branch (1686:12): [True: 0, False: 288]
  ------------------
 1687|    288|        || !group->meth->field_mul(group, t0, p->X, r->Z, ctx)
  ------------------
  |  Branch (1687:12): [True: 0, False: 288]
  ------------------
 1688|    288|        || !BN_mod_add_quick(t6, r->X, t0, group->field)
  ------------------
  |  Branch (1688:12): [True: 0, False: 288]
  ------------------
 1689|    288|        || !group->meth->field_mul(group, t6, t6, t1, ctx)
  ------------------
  |  Branch (1689:12): [True: 0, False: 288]
  ------------------
 1690|    288|        || !BN_mod_add_quick(t6, t6, t2, group->field)
  ------------------
  |  Branch (1690:12): [True: 0, False: 288]
  ------------------
 1691|    288|        || !BN_mod_sub_quick(t0, t0, r->X, group->field)
  ------------------
  |  Branch (1691:12): [True: 0, False: 288]
  ------------------
 1692|    288|        || !group->meth->field_sqr(group, t0, t0, ctx)
  ------------------
  |  Branch (1692:12): [True: 0, False: 288]
  ------------------
 1693|    288|        || !group->meth->field_mul(group, t0, t0, s->X, ctx)
  ------------------
  |  Branch (1693:12): [True: 0, False: 288]
  ------------------
 1694|    288|        || !BN_mod_sub_quick(t0, t6, t0, group->field)
  ------------------
  |  Branch (1694:12): [True: 0, False: 288]
  ------------------
 1695|    288|        || !group->meth->field_mul(group, t1, s->Z, t4, ctx)
  ------------------
  |  Branch (1695:12): [True: 0, False: 288]
  ------------------
 1696|    288|        || !group->meth->field_mul(group, t1, t3, t1, ctx)
  ------------------
  |  Branch (1696:12): [True: 0, False: 288]
  ------------------
 1697|    288|        || (group->meth->field_decode != NULL
  ------------------
  |  Branch (1697:13): [True: 288, False: 0]
  ------------------
 1698|    288|            && !group->meth->field_decode(group, t1, t1, ctx))
  ------------------
  |  Branch (1698:16): [True: 0, False: 288]
  ------------------
 1699|    288|        || !group->meth->field_inv(group, t1, t1, ctx)
  ------------------
  |  Branch (1699:12): [True: 0, False: 288]
  ------------------
 1700|    288|        || (group->meth->field_encode != NULL
  ------------------
  |  Branch (1700:13): [True: 288, False: 0]
  ------------------
 1701|    288|            && !group->meth->field_encode(group, t1, t1, ctx))
  ------------------
  |  Branch (1701:16): [True: 0, False: 288]
  ------------------
 1702|    288|        || !group->meth->field_mul(group, r->X, t5, t1, ctx)
  ------------------
  |  Branch (1702:12): [True: 0, False: 288]
  ------------------
 1703|    288|        || !group->meth->field_mul(group, r->Y, t0, t1, ctx))
  ------------------
  |  Branch (1703:12): [True: 0, False: 288]
  ------------------
 1704|      0|        goto err;
 1705|       |
 1706|    288|    if (group->meth->field_set_to_one != NULL) {
  ------------------
  |  Branch (1706:9): [True: 288, False: 0]
  ------------------
 1707|    288|        if (!group->meth->field_set_to_one(group, r->Z, ctx))
  ------------------
  |  Branch (1707:13): [True: 0, False: 288]
  ------------------
 1708|      0|            goto err;
 1709|    288|    } else {
 1710|      0|        if (!BN_one(r->Z))
  ------------------
  |  |  196|      0|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  |  Branch (1710:13): [True: 0, False: 0]
  ------------------
 1711|      0|            goto err;
 1712|      0|    }
 1713|       |
 1714|    288|    r->Z_is_one = 1;
 1715|    288|    ret = 1;
 1716|       |
 1717|    288|err:
 1718|    288|    BN_CTX_end(ctx);
 1719|    288|    return ret;
 1720|    288|}

ossl_ecx_key_new:
   22|  4.19k|{
   23|  4.19k|    ECX_KEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  4.19k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   24|       |
   25|  4.19k|    if (ret == NULL)
  ------------------
  |  Branch (25:9): [True: 0, False: 4.19k]
  ------------------
   26|      0|        return NULL;
   27|       |
   28|  4.19k|    ret->libctx = libctx;
   29|  4.19k|    ret->haspubkey = haspubkey;
   30|  4.19k|    switch (type) {
  ------------------
  |  Branch (30:13): [True: 4.19k, False: 0]
  ------------------
   31|  4.16k|    case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (31:5): [True: 4.16k, False: 32]
  ------------------
   32|  4.16k|        ret->keylen = X25519_KEYLEN;
  ------------------
  |  |   26|  4.16k|#define X25519_KEYLEN 32
  ------------------
   33|  4.16k|        break;
   34|     32|    case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (34:5): [True: 32, False: 4.16k]
  ------------------
   35|     32|        ret->keylen = X448_KEYLEN;
  ------------------
  |  |   27|     32|#define X448_KEYLEN 56
  ------------------
   36|     32|        break;
   37|      0|    case ECX_KEY_TYPE_ED25519:
  ------------------
  |  Branch (37:5): [True: 0, False: 4.19k]
  ------------------
   38|      0|        ret->keylen = ED25519_KEYLEN;
  ------------------
  |  |   28|      0|#define ED25519_KEYLEN 32
  ------------------
   39|      0|        break;
   40|      0|    case ECX_KEY_TYPE_ED448:
  ------------------
  |  Branch (40:5): [True: 0, False: 4.19k]
  ------------------
   41|      0|        ret->keylen = ED448_KEYLEN;
  ------------------
  |  |   29|      0|#define ED448_KEYLEN 57
  ------------------
   42|      0|        break;
   43|  4.19k|    }
   44|  4.19k|    ret->type = type;
   45|       |
   46|  4.19k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (46:9): [True: 0, False: 4.19k]
  ------------------
   47|      0|        goto err;
   48|       |
   49|  4.19k|    if (propq != NULL) {
  ------------------
  |  Branch (49:9): [True: 0, False: 4.19k]
  ------------------
   50|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|      0|            goto err;
   53|      0|    }
   54|  4.19k|    return ret;
   55|      0|err:
   56|      0|    if (ret != NULL) {
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|        OPENSSL_free(ret->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   58|      0|        CRYPTO_FREE_REF(&ret->references);
   59|      0|    }
   60|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|       |    return NULL;
   62|  4.19k|}
ossl_ecx_key_free:
   65|  4.30k|{
   66|  4.30k|    int i;
   67|       |
   68|  4.30k|    if (key == NULL)
  ------------------
  |  Branch (68:9): [True: 113, False: 4.19k]
  ------------------
   69|    113|        return;
   70|       |
   71|  4.19k|    CRYPTO_DOWN_REF(&key->references, &i);
   72|  4.19k|    REF_PRINT_COUNT("ECX_KEY", i, key);
  ------------------
  |  |  301|  4.19k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  4.19k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  4.19k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  4.19k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   73|  4.19k|    if (i > 0)
  ------------------
  |  Branch (73:9): [True: 0, False: 4.19k]
  ------------------
   74|      0|        return;
   75|  4.19k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  4.19k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 4.19k]
  |  |  ------------------
  ------------------
   76|       |
   77|  4.19k|    OPENSSL_free(key->propq);
  ------------------
  |  |  132|  4.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   78|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
   79|       |    OPENSSL_cleanse(&key->pubkey, sizeof(key->pubkey));
   80|       |#endif
   81|  4.19k|    OPENSSL_secure_clear_free(key->privkey, key->keylen);
  ------------------
  |  |  150|  4.19k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|  4.19k|    CRYPTO_FREE_REF(&key->references);
   83|  4.19k|    OPENSSL_free(key);
  ------------------
  |  |  132|  4.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|  4.19k|}
ossl_ecx_key_allocate_privkey:
  104|  4.19k|{
  105|  4.19k|    key->privkey = OPENSSL_secure_zalloc(key->keylen);
  ------------------
  |  |  142|  4.19k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  106|       |
  107|  4.19k|    return key->privkey;
  108|  4.19k|}

ecx_meth.c:ecx_free:
  156|    113|{
  157|    113|    ossl_ecx_key_free(pkey->pkey.ecx);
  158|    113|}

OSSL_DECODER_from_bio:
   48|   503k|{
   49|   503k|    struct decoder_process_data_st data;
   50|   503k|    int ok = 0;
   51|   503k|    BIO *new_bio = NULL;
   52|   503k|    unsigned long lasterr;
   53|       |
   54|   503k|    if (in == NULL) {
  ------------------
  |  Branch (54:9): [True: 0, False: 503k]
  ------------------
   55|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   56|      0|        return 0;
   57|      0|    }
   58|       |
   59|   503k|    if (OSSL_DECODER_CTX_get_num_decoders(ctx) == 0) {
  ------------------
  |  Branch (59:9): [True: 0, False: 503k]
  ------------------
   60|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, OSSL_DECODER_R_DECODER_NOT_FOUND,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, OSSL_DECODER_R_DECODER_NOT_FOUND,
  ------------------
  |  |  104|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, OSSL_DECODER_R_DECODER_NOT_FOUND,
  ------------------
  |  |   23|      0|#define OSSL_DECODER_R_DECODER_NOT_FOUND 102
  ------------------
   61|      0|            "No decoders were found. For standard decoders you need "
   62|      0|            "at least one of the default or base providers "
   63|      0|            "available. Did you forget to load them?");
   64|      0|        return 0;
   65|      0|    }
   66|       |
   67|   503k|    lasterr = ERR_peek_last_error();
   68|       |
   69|   503k|    if (BIO_tell(in) < 0) {
  ------------------
  |  |  583|   503k|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|   503k|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (69:9): [True: 0, False: 503k]
  ------------------
   70|      0|        new_bio = BIO_new(BIO_f_readbuffer());
   71|      0|        if (new_bio == NULL)
  ------------------
  |  Branch (71:13): [True: 0, False: 0]
  ------------------
   72|      0|            return 0;
   73|      0|        in = BIO_push(new_bio, in);
   74|      0|    }
   75|   503k|    memset(&data, 0, sizeof(data));
   76|   503k|    data.ctx = ctx;
   77|   503k|    data.bio = in;
   78|       |
   79|       |    /* Enable passphrase caching */
   80|   503k|    (void)ossl_pw_enable_passphrase_caching(&ctx->pwdata);
   81|       |
   82|   503k|    ok = decoder_process(NULL, &data);
   83|       |
   84|   503k|    if (!data.flag_construct_called) {
  ------------------
  |  Branch (84:9): [True: 0, False: 503k]
  ------------------
   85|      0|        const char *spaces
   86|      0|            = ctx->start_input_type != NULL && ctx->input_structure != NULL
  ------------------
  |  Branch (86:15): [True: 0, False: 0]
  |  Branch (86:48): [True: 0, False: 0]
  ------------------
   87|      0|            ? " "
   88|      0|            : "";
   89|      0|        const char *input_type_label
   90|      0|            = ctx->start_input_type != NULL ? "Input type: " : "";
  ------------------
  |  Branch (90:15): [True: 0, False: 0]
  ------------------
   91|      0|        const char *input_structure_label
   92|      0|            = ctx->input_structure != NULL ? "Input structure: " : "";
  ------------------
  |  Branch (92:15): [True: 0, False: 0]
  ------------------
   93|      0|        const char *comma
   94|      0|            = ctx->start_input_type != NULL && ctx->input_structure != NULL
  ------------------
  |  Branch (94:15): [True: 0, False: 0]
  |  Branch (94:48): [True: 0, False: 0]
  ------------------
   95|      0|            ? ", "
   96|      0|            : "";
   97|      0|        const char *input_type
   98|      0|            = ctx->start_input_type != NULL ? ctx->start_input_type : "";
  ------------------
  |  Branch (98:15): [True: 0, False: 0]
  ------------------
   99|      0|        const char *input_structure
  100|      0|            = ctx->input_structure != NULL ? ctx->input_structure : "";
  ------------------
  |  Branch (100:15): [True: 0, False: 0]
  ------------------
  101|       |
  102|      0|        if (ERR_peek_last_error() == lasterr || ERR_peek_error() == 0)
  ------------------
  |  Branch (102:13): [True: 0, False: 0]
  |  Branch (102:49): [True: 0, False: 0]
  ------------------
  103|       |            /* Prevent spurious decoding error but add at least something */
  104|      0|            ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_UNSUPPORTED,
  ------------------
  |  |  104|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                          ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  105|      0|                "No supported data to decode. %s%s%s%s%s%s",
  106|      0|                spaces, input_type_label, input_type, comma,
  107|      0|                input_structure_label, input_structure);
  108|      0|        ok = 0;
  109|      0|    }
  110|       |
  111|       |    /* Clear any internally cached passphrase */
  112|   503k|    (void)ossl_pw_clear_passphrase_cache(&ctx->pwdata);
  113|       |
  114|   503k|    if (new_bio != NULL) {
  ------------------
  |  Branch (114:9): [True: 0, False: 503k]
  ------------------
  115|      0|        BIO_pop(new_bio);
  116|      0|        BIO_free(new_bio);
  117|      0|    }
  118|   503k|    return ok;
  119|   503k|}
OSSL_DECODER_from_data:
  149|   503k|{
  150|   503k|    BIO *membio;
  151|   503k|    int ret = 0;
  152|       |
  153|   503k|    if (pdata == NULL || *pdata == NULL || pdata_len == NULL) {
  ------------------
  |  Branch (153:9): [True: 0, False: 503k]
  |  Branch (153:26): [True: 0, False: 503k]
  |  Branch (153:44): [True: 0, False: 503k]
  ------------------
  154|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  155|      0|        return 0;
  156|      0|    }
  157|       |
  158|   503k|    membio = BIO_new_mem_buf(*pdata, (int)*pdata_len);
  159|   503k|    if (OSSL_DECODER_from_bio(ctx, membio)) {
  ------------------
  |  Branch (159:9): [True: 503k, False: 0]
  ------------------
  160|   503k|        *pdata_len = (size_t)BIO_get_mem_data(membio, pdata);
  ------------------
  |  |  625|   503k|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|   503k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
  161|   503k|        ret = 1;
  162|   503k|    }
  163|   503k|    BIO_free(membio);
  164|       |
  165|   503k|    return ret;
  166|   503k|}
OSSL_DECODER_CTX_set_selection:
  169|      2|{
  170|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (170:9): [True: 0, False: 2]
  ------------------
  171|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  172|      0|        return 0;
  173|      0|    }
  174|       |
  175|      2|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (175:9): [True: 0, False: 2]
  ------------------
  176|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  177|      0|        return 0;
  178|      0|    }
  179|       |
  180|       |    /*
  181|       |     * 0 is a valid selection, and means that the caller leaves
  182|       |     * it to code to discover what the selection is.
  183|       |     */
  184|      2|    ctx->selection = selection;
  185|      2|    return 1;
  186|      2|}
OSSL_DECODER_CTX_set_input_type:
  190|   503k|{
  191|   503k|    if (ctx == NULL) {
  ------------------
  |  Branch (191:9): [True: 0, False: 503k]
  ------------------
  192|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  193|      0|        return 0;
  194|      0|    }
  195|       |
  196|   503k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (196:9): [True: 0, False: 503k]
  ------------------
  197|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  198|      0|        return 0;
  199|      0|    }
  200|       |
  201|       |    /*
  202|       |     * NULL is a valid starting input type, and means that the caller leaves
  203|       |     * it to code to discover what the starting input type is.
  204|       |     */
  205|   503k|    ctx->start_input_type = input_type;
  206|   503k|    return 1;
  207|   503k|}
OSSL_DECODER_CTX_set_input_structure:
  211|   503k|{
  212|   503k|    if (ctx == NULL) {
  ------------------
  |  Branch (212:9): [True: 0, False: 503k]
  ------------------
  213|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  214|      0|        return 0;
  215|      0|    }
  216|       |
  217|   503k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (217:9): [True: 0, False: 503k]
  ------------------
  218|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  219|      0|        return 0;
  220|      0|    }
  221|       |
  222|       |    /*
  223|       |     * NULL is a valid starting input structure, and means that the caller
  224|       |     * leaves it to code to discover what the starting input structure is.
  225|       |     */
  226|   503k|    ctx->input_structure = input_structure;
  227|   503k|    return 1;
  228|   503k|}
ossl_decoder_instance_new:
  259|     17|{
  260|     17|    OSSL_DECODER_INSTANCE *decoder_inst = NULL;
  261|     17|    const OSSL_PROVIDER *prov;
  262|     17|    OSSL_LIB_CTX *libctx;
  263|     17|    const OSSL_PROPERTY_LIST *props;
  264|     17|    const OSSL_PROPERTY_DEFINITION *prop;
  265|       |
  266|     17|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|     17|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     17|    __FILE__, __LINE__)
  ------------------
  |  Branch (266:9): [True: 0, False: 17]
  ------------------
  267|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  268|      0|        return 0;
  269|      0|    }
  270|       |
  271|     17|    if ((decoder_inst = OPENSSL_zalloc(sizeof(*decoder_inst))) == NULL)
  ------------------
  |  |  109|     17|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (271:9): [True: 0, False: 17]
  ------------------
  272|      0|        return 0;
  273|       |
  274|     17|    prov = OSSL_DECODER_get0_provider(decoder);
  275|     17|    libctx = ossl_provider_libctx(prov);
  276|     17|    props = ossl_decoder_parsed_properties(decoder);
  277|     17|    if (props == NULL) {
  ------------------
  |  Branch (277:9): [True: 0, False: 17]
  ------------------
  278|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  104|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  319|      0|#define ERR_R_INVALID_PROPERTY_DEFINITION (270 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  279|      0|            "there are no property definitions with decoder %s",
  280|      0|            OSSL_DECODER_get0_name(decoder));
  281|      0|        goto err;
  282|      0|    }
  283|       |
  284|       |    /* The "input" property is mandatory */
  285|     17|    prop = ossl_property_find_property(props, libctx, "input");
  286|     17|    decoder_inst->input_type = ossl_property_get_string_value(libctx, prop);
  287|     17|    decoder_inst->input_type_id = 0;
  288|     17|    if (decoder_inst->input_type == NULL) {
  ------------------
  |  Branch (288:9): [True: 0, False: 17]
  ------------------
  289|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  104|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  319|      0|#define ERR_R_INVALID_PROPERTY_DEFINITION (270 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  290|      0|            "the mandatory 'input' property is missing "
  291|      0|            "for decoder %s (properties: %s)",
  292|      0|            OSSL_DECODER_get0_name(decoder),
  293|      0|            OSSL_DECODER_get0_properties(decoder));
  294|      0|        goto err;
  295|      0|    }
  296|       |
  297|       |    /* The "structure" property is optional */
  298|     17|    prop = ossl_property_find_property(props, libctx, "structure");
  299|     17|    if (prop != NULL) {
  ------------------
  |  Branch (299:9): [True: 9, False: 8]
  ------------------
  300|      9|        decoder_inst->input_structure
  301|      9|            = ossl_property_get_string_value(libctx, prop);
  302|      9|    }
  303|       |
  304|     17|    if (!OSSL_DECODER_up_ref(decoder)) {
  ------------------
  |  Branch (304:9): [True: 0, False: 17]
  ------------------
  305|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  306|      0|        goto err;
  307|      0|    }
  308|     17|    decoder_inst->decoder = decoder;
  309|     17|    decoder_inst->decoderctx = decoderctx;
  310|     17|    return decoder_inst;
  311|      0|err:
  312|      0|    ossl_decoder_instance_free(decoder_inst);
  313|       |    return NULL;
  314|     17|}
ossl_decoder_instance_free:
  317|  2.85M|{
  318|  2.85M|    if (decoder_inst != NULL) {
  ------------------
  |  Branch (318:9): [True: 2.85M, False: 0]
  ------------------
  319|  2.85M|        if (decoder_inst->decoder != NULL)
  ------------------
  |  Branch (319:13): [True: 2.85M, False: 0]
  ------------------
  320|  2.85M|            decoder_inst->decoder->freectx(decoder_inst->decoderctx);
  321|  2.85M|        decoder_inst->decoderctx = NULL;
  322|  2.85M|        OSSL_DECODER_free(decoder_inst->decoder);
  323|  2.85M|        decoder_inst->decoder = NULL;
  324|  2.85M|        OPENSSL_free(decoder_inst);
  ------------------
  |  |  132|  2.85M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  325|  2.85M|    }
  326|  2.85M|}
ossl_decoder_instance_dup:
  329|  2.85M|{
  330|  2.85M|    OSSL_DECODER_INSTANCE *dest;
  331|  2.85M|    const OSSL_PROVIDER *prov;
  332|  2.85M|    void *provctx;
  333|       |
  334|  2.85M|    if ((dest = OPENSSL_zalloc(sizeof(*dest))) == NULL)
  ------------------
  |  |  109|  2.85M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (334:9): [True: 0, False: 2.85M]
  ------------------
  335|      0|        return NULL;
  336|       |
  337|  2.85M|    *dest = *src;
  338|  2.85M|    if (!OSSL_DECODER_up_ref(dest->decoder)) {
  ------------------
  |  Branch (338:9): [True: 0, False: 2.85M]
  ------------------
  339|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  340|      0|        goto err;
  341|      0|    }
  342|  2.85M|    prov = OSSL_DECODER_get0_provider(dest->decoder);
  343|  2.85M|    provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
  344|       |
  345|  2.85M|    dest->decoderctx = dest->decoder->newctx(provctx);
  346|  2.85M|    if (dest->decoderctx == NULL) {
  ------------------
  |  Branch (346:9): [True: 0, False: 2.85M]
  ------------------
  347|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  348|      0|        OSSL_DECODER_free(dest->decoder);
  349|      0|        goto err;
  350|      0|    }
  351|       |
  352|  2.85M|    return dest;
  353|       |
  354|      0|err:
  355|      0|    OPENSSL_free(dest);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|       |    return NULL;
  357|  2.85M|}
ossl_decoder_ctx_add_decoder_inst:
  371|     11|{
  372|     11|    int ok;
  373|       |
  374|     11|    if (ctx->decoder_insts == NULL
  ------------------
  |  Branch (374:9): [True: 2, False: 9]
  ------------------
  375|      2|        && (ctx->decoder_insts = sk_OSSL_DECODER_INSTANCE_new_null()) == NULL) {
  ------------------
  |  Branch (375:12): [True: 0, False: 2]
  ------------------
  376|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  377|      0|        return 0;
  378|      0|    }
  379|       |
  380|     11|    ok = (sk_OSSL_DECODER_INSTANCE_push(ctx->decoder_insts, di) > 0);
  381|     11|    if (ok) {
  ------------------
  |  Branch (381:9): [True: 11, False: 0]
  ------------------
  382|     11|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|     11|    do {                           \
  |  |  220|     11|        BIO *trc_out = NULL;       \
  |  |  221|     11|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 11]
  |  |  ------------------
  ------------------
  383|      0|        {
  384|      0|            BIO_printf(trc_out,
  385|      0|                "(ctx %p) Added decoder instance %p for decoder %p\n"
  386|      0|                "    %s with %s (%s)\n",
  387|      0|                (void *)ctx, (void *)di, (void *)di->decoder,
  388|      0|                OSSL_DECODER_get0_name(di->decoder),
  389|      0|                OSSL_DECODER_get0_properties(di->decoder),
  390|      0|                OSSL_DECODER_get0_description(di->decoder));
  391|      0|        }
  392|     11|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|     11|    }                            \
  |  |  225|     11|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 11]
  |  |  ------------------
  ------------------
  393|     11|    }
  394|     11|    return ok;
  395|     11|}
OSSL_DECODER_CTX_add_extra:
  580|      2|{
  581|       |    /*
  582|       |     * This function goes through existing decoder methods in
  583|       |     * |ctx->decoder_insts|, and tries to fetch new decoders that produce
  584|       |     * what the existing ones want as input, and push those newly fetched
  585|       |     * decoders on top of the same stack.
  586|       |     * Then it does the same again, but looping over the newly fetched
  587|       |     * decoders, until there are no more decoders to be fetched, or
  588|       |     * when we have done this 10 times.
  589|       |     *
  590|       |     * we do this with sliding windows on the stack by keeping track of indexes
  591|       |     * and of the end.
  592|       |     *
  593|       |     * +----------------+
  594|       |     * |   DER to RSA   | <--- w_prev_start
  595|       |     * +----------------+
  596|       |     * |   DER to DSA   |
  597|       |     * +----------------+
  598|       |     * |   DER to DH    |
  599|       |     * +----------------+
  600|       |     * |   PEM to DER   | <--- w_prev_end, w_new_start
  601|       |     * +----------------+
  602|       |     *                    <--- w_new_end
  603|       |     */
  604|      2|    struct collect_extra_decoder_data_st data;
  605|      2|    size_t depth = 0; /* Counts the number of iterations */
  606|      2|    size_t count; /* Calculates how many were added in each iteration */
  607|      2|    int numdecoders;
  608|      2|    STACK_OF(OSSL_DECODER) *skdecoders;
  ------------------
  |  |   33|      2|#define STACK_OF(type) struct stack_st_##type
  ------------------
  609|       |
  610|      2|    if (ctx == NULL) {
  ------------------
  |  Branch (610:9): [True: 0, False: 2]
  ------------------
  611|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  612|      0|        return 0;
  613|      0|    }
  614|       |
  615|      2|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (615:9): [True: 0, False: 2]
  ------------------
  616|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  617|      0|        return 0;
  618|      0|    }
  619|       |
  620|       |    /*
  621|       |     * If there is no stack of OSSL_DECODER_INSTANCE, we have nothing
  622|       |     * more to add.  That's fine.
  623|       |     */
  624|      2|    if (ctx->decoder_insts == NULL)
  ------------------
  |  Branch (624:9): [True: 0, False: 2]
  ------------------
  625|      0|        return 1;
  626|       |
  627|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      2|    do {                           \
  |  |  220|      2|        BIO *trc_out = NULL;       \
  |  |  221|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  628|      0|    {
  629|      0|        BIO_printf(trc_out, "(ctx %p) Looking for extra decoders\n",
  630|      0|            (void *)ctx);
  631|      0|    }
  632|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      2|    }                            \
  |  |  225|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  633|       |
  634|      2|    skdecoders = sk_OSSL_DECODER_new_null();
  635|      2|    if (skdecoders == NULL) {
  ------------------
  |  Branch (635:9): [True: 0, False: 2]
  ------------------
  636|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  637|      0|        return 0;
  638|      0|    }
  639|      2|    OSSL_DECODER_do_all_provided(libctx, collect_all_decoders, skdecoders);
  640|      2|    numdecoders = sk_OSSL_DECODER_num(skdecoders);
  641|       |
  642|       |    /*
  643|       |     * If there are provided or default properties, sort the initial decoder list
  644|       |     * by property matching score so that the highest scored provider is selected
  645|       |     * first.
  646|       |     */
  647|      2|    if (propq != NULL || ossl_ctx_global_properties(libctx, 0) != NULL) {
  ------------------
  |  Branch (647:9): [True: 0, False: 2]
  |  Branch (647:26): [True: 2, False: 0]
  ------------------
  648|      2|        int num_decoder_insts = sk_OSSL_DECODER_INSTANCE_num(ctx->decoder_insts);
  649|      2|        int i;
  650|      2|        OSSL_DECODER_INSTANCE *di;
  651|      2|        sk_OSSL_DECODER_INSTANCE_compfunc old_cmp = sk_OSSL_DECODER_INSTANCE_set_cmp_func(ctx->decoder_insts, decoder_sk_cmp);
  652|       |
  653|      7|        for (i = 0; i < num_decoder_insts; i++) {
  ------------------
  |  Branch (653:21): [True: 5, False: 2]
  ------------------
  654|      5|            di = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts, i);
  655|      5|            di->order = i;
  656|      5|        }
  657|      2|        sk_OSSL_DECODER_INSTANCE_sort(ctx->decoder_insts);
  658|      2|        sk_OSSL_DECODER_INSTANCE_set_cmp_func(ctx->decoder_insts, old_cmp);
  659|      2|    }
  660|       |
  661|      2|    memset(&data, 0, sizeof(data));
  662|      2|    data.ctx = ctx;
  663|      2|    data.w_prev_start = 0;
  664|      2|    data.w_prev_end = sk_OSSL_DECODER_INSTANCE_num(ctx->decoder_insts);
  665|      4|    do {
  666|      4|        int i, j;
  667|       |
  668|      4|        data.w_new_start = data.w_new_end = data.w_prev_end;
  669|       |
  670|       |        /*
  671|       |         * Two iterations:
  672|       |         * 0.  All decoders that have the same name as their input type.
  673|       |         *     This allows for decoders that unwrap some data in a specific
  674|       |         *     encoding, and pass the result on with the same encoding.
  675|       |         * 1.  All decoders that a different name than their input type.
  676|       |         */
  677|      4|        for (data.type_check = IS_SAME;
  678|     12|            data.type_check <= IS_DIFFERENT;
  ------------------
  |  Branch (678:13): [True: 8, False: 4]
  ------------------
  679|      8|            data.type_check++) {
  680|     30|            for (i = data.w_prev_start; i < data.w_prev_end; i++) {
  ------------------
  |  Branch (680:41): [True: 22, False: 8]
  ------------------
  681|     22|                OSSL_DECODER_INSTANCE *decoder_inst = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts, i);
  682|       |
  683|     22|                data.output_type
  684|     22|                    = OSSL_DECODER_INSTANCE_get_input_type(decoder_inst);
  685|       |
  686|     22|                data.output_type_id = 0;
  687|       |
  688|  1.69k|                for (j = 0; j < numdecoders; j++)
  ------------------
  |  Branch (688:29): [True: 1.67k, False: 22]
  ------------------
  689|  1.67k|                    collect_extra_decoder(sk_OSSL_DECODER_value(skdecoders, j),
  690|  1.67k|                        &data);
  691|     22|            }
  692|      8|        }
  693|       |        /* How many were added in this iteration */
  694|      4|        count = data.w_new_end - data.w_new_start;
  695|       |
  696|       |        /* Slide the "previous decoder" windows */
  697|      4|        data.w_prev_start = data.w_new_start;
  698|      4|        data.w_prev_end = data.w_new_end;
  699|       |
  700|      4|        depth++;
  701|      4|    } while (count != 0 && depth <= 10);
  ------------------
  |  Branch (701:14): [True: 2, False: 2]
  |  Branch (701:28): [True: 2, False: 0]
  ------------------
  702|       |
  703|      2|    sk_OSSL_DECODER_pop_free(skdecoders, OSSL_DECODER_free);
  704|      2|    return 1;
  705|      2|}
OSSL_DECODER_CTX_get_num_decoders:
  708|  1.00M|{
  709|  1.00M|    if (ctx == NULL || ctx->decoder_insts == NULL)
  ------------------
  |  Branch (709:9): [True: 0, False: 1.00M]
  |  Branch (709:24): [True: 0, False: 1.00M]
  ------------------
  710|      0|        return 0;
  711|  1.00M|    return sk_OSSL_DECODER_INSTANCE_num(ctx->decoder_insts);
  712|  1.00M|}
OSSL_DECODER_CTX_set_construct:
  716|   503k|{
  717|   503k|    if (ctx == NULL) {
  ------------------
  |  Branch (717:9): [True: 0, False: 503k]
  ------------------
  718|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  719|      0|        return 0;
  720|      0|    }
  721|       |
  722|   503k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (722:9): [True: 0, False: 503k]
  ------------------
  723|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  724|      0|        return 0;
  725|      0|    }
  726|       |
  727|   503k|    ctx->construct = construct;
  728|   503k|    return 1;
  729|   503k|}
OSSL_DECODER_CTX_set_construct_data:
  733|   503k|{
  734|   503k|    if (ctx == NULL) {
  ------------------
  |  Branch (734:9): [True: 0, False: 503k]
  ------------------
  735|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  736|      0|        return 0;
  737|      0|    }
  738|       |
  739|   503k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (739:9): [True: 0, False: 503k]
  ------------------
  740|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  741|      0|        return 0;
  742|      0|    }
  743|       |
  744|   503k|    ctx->construct_data = construct_data;
  745|   503k|    return 1;
  746|   503k|}
OSSL_DECODER_CTX_set_cleanup:
  750|   503k|{
  751|   503k|    if (ctx == NULL) {
  ------------------
  |  Branch (751:9): [True: 0, False: 503k]
  ------------------
  752|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  753|      0|        return 0;
  754|      0|    }
  755|       |
  756|   503k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (756:9): [True: 0, False: 503k]
  ------------------
  757|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  758|      0|        return 0;
  759|      0|    }
  760|       |
  761|   503k|    ctx->cleanup = cleanup;
  762|   503k|    return 1;
  763|   503k|}
OSSL_DECODER_CTX_get_construct:
  767|   503k|{
  768|   503k|    if (ctx == NULL)
  ------------------
  |  Branch (768:9): [True: 0, False: 503k]
  ------------------
  769|      0|        return NULL;
  770|   503k|    return ctx->construct;
  771|   503k|}
OSSL_DECODER_CTX_get_construct_data:
  774|   503k|{
  775|   503k|    if (ctx == NULL)
  ------------------
  |  Branch (775:9): [True: 0, False: 503k]
  ------------------
  776|      0|        return NULL;
  777|   503k|    return ctx->construct_data;
  778|   503k|}
OSSL_DECODER_CTX_get_cleanup:
  782|   503k|{
  783|   503k|    if (ctx == NULL)
  ------------------
  |  Branch (783:9): [True: 0, False: 503k]
  ------------------
  784|      0|        return NULL;
  785|   503k|    return ctx->cleanup;
  786|   503k|}
OSSL_DECODER_INSTANCE_get_decoder:
  809|  4.87M|{
  810|  4.87M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (810:9): [True: 0, False: 4.87M]
  ------------------
  811|      0|        return NULL;
  812|  4.87M|    return decoder_inst->decoder;
  813|  4.87M|}
OSSL_DECODER_INSTANCE_get_decoder_ctx:
  817|  3.86M|{
  818|  3.86M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (818:9): [True: 0, False: 3.86M]
  ------------------
  819|      0|        return NULL;
  820|  3.86M|    return decoder_inst->decoderctx;
  821|  3.86M|}
OSSL_DECODER_INSTANCE_get_input_type:
  825|  2.85M|{
  826|  2.85M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (826:9): [True: 0, False: 2.85M]
  ------------------
  827|      0|        return NULL;
  828|  2.85M|    return decoder_inst->input_type;
  829|  2.85M|}
OSSL_DECODER_INSTANCE_get_input_structure:
  834|  2.85M|{
  835|  2.85M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (835:9): [True: 0, False: 2.85M]
  ------------------
  836|      0|        return NULL;
  837|  2.85M|    *was_set = decoder_inst->flag_input_structure_was_set;
  838|  2.85M|    return decoder_inst->input_structure;
  839|  2.85M|}
decoder_lib.c:collect_all_decoders:
  452|    152|{
  453|    152|    STACK_OF(OSSL_DECODER) *skdecoders = arg;
  ------------------
  |  |   33|    152|#define STACK_OF(type) struct stack_st_##type
  ------------------
  454|       |
  455|    152|    if (OSSL_DECODER_up_ref(decoder)
  ------------------
  |  Branch (455:9): [True: 152, False: 0]
  ------------------
  456|    152|        && !sk_OSSL_DECODER_push(skdecoders, decoder))
  ------------------
  |  Branch (456:12): [True: 0, False: 152]
  ------------------
  457|      0|        OSSL_DECODER_free(decoder);
  458|    152|}
decoder_lib.c:decoder_sk_cmp:
  572|      3|{
  573|      3|    if ((*a)->score == (*b)->score)
  ------------------
  |  Branch (573:9): [True: 3, False: 0]
  ------------------
  574|      3|        return (*a)->order - (*b)->order;
  575|      0|    return (*a)->score - (*b)->score;
  576|      3|}
decoder_lib.c:collect_extra_decoder:
  461|  1.67k|{
  462|  1.67k|    struct collect_extra_decoder_data_st *data = arg;
  463|  1.67k|    int j;
  464|  1.67k|    const OSSL_PROVIDER *prov = OSSL_DECODER_get0_provider(decoder);
  465|  1.67k|    void *provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
  466|       |
  467|  1.67k|    if (ossl_decoder_fast_is_a(decoder, data->output_type, &data->output_type_id)) {
  ------------------
  |  Branch (467:9): [True: 54, False: 1.61k]
  ------------------
  468|     54|        void *decoderctx = NULL;
  469|     54|        OSSL_DECODER_INSTANCE *di = NULL;
  470|       |
  471|     54|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|     54|    do {                           \
  |  |  220|     54|        BIO *trc_out = NULL;       \
  |  |  221|     54|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 54]
  |  |  ------------------
  ------------------
  472|      0|        {
  473|      0|            BIO_printf(trc_out,
  474|      0|                "(ctx %p) [%d] Checking out decoder %p:\n"
  475|      0|                "    %s with %s (%s)\n",
  476|      0|                (void *)data->ctx, data->type_check, (void *)decoder,
  477|      0|                OSSL_DECODER_get0_name(decoder),
  478|      0|                OSSL_DECODER_get0_properties(decoder),
  479|      0|                OSSL_DECODER_get0_description(decoder));
  480|      0|        }
  481|     54|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|     54|    }                            \
  |  |  225|     54|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 54]
  |  |  ------------------
  ------------------
  482|       |
  483|       |        /*
  484|       |         * Check that we don't already have this decoder in our stack,
  485|       |         * starting with the previous windows but also looking at what
  486|       |         * we have added in the current window.
  487|       |         */
  488|    184|        for (j = data->w_prev_start; j < data->w_new_end; j++) {
  ------------------
  |  Branch (488:38): [True: 173, False: 11]
  ------------------
  489|    173|            OSSL_DECODER_INSTANCE *check_inst = sk_OSSL_DECODER_INSTANCE_value(data->ctx->decoder_insts, j);
  490|       |
  491|    173|            if (decoder->base.algodef == check_inst->decoder->base.algodef) {
  ------------------
  |  Branch (491:17): [True: 43, False: 130]
  ------------------
  492|       |                /* We found it, so don't do anything more */
  493|     43|                OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|     43|    do {                           \
  |  |  220|     43|        BIO *trc_out = NULL;       \
  |  |  221|     43|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 43]
  |  |  ------------------
  ------------------
  494|      0|                {
  495|      0|                    BIO_printf(trc_out,
  496|      0|                        "    REJECTED: already exists in the chain\n");
  497|      0|                }
  498|     43|                OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|     43|    }                            \
  |  |  225|     43|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 43]
  |  |  ------------------
  ------------------
  499|     43|                return;
  500|     43|            }
  501|    173|        }
  502|       |
  503|     11|        if ((decoderctx = decoder->newctx(provctx)) == NULL)
  ------------------
  |  Branch (503:13): [True: 0, False: 11]
  ------------------
  504|      0|            return;
  505|       |
  506|     11|        if (decoder->set_ctx_params != NULL
  ------------------
  |  Branch (506:13): [True: 11, False: 0]
  ------------------
  507|     11|            && data->ctx->input_structure != NULL) {
  ------------------
  |  Branch (507:16): [True: 11, False: 0]
  ------------------
  508|     11|            OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|     11|    { NULL, 0, NULL, 0, 0 }
  ------------------
                          OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|     11|    { NULL, 0, NULL, 0, 0 }
  ------------------
  509|     11|            const char *str = data->ctx->input_structure;
  510|       |
  511|     11|            params[0] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  365|     11|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  512|     11|                (char *)str, 0);
  513|     11|            if (!decoder->set_ctx_params(decoderctx, params)) {
  ------------------
  |  Branch (513:17): [True: 0, False: 11]
  ------------------
  514|      0|                decoder->freectx(decoderctx);
  515|      0|                return;
  516|      0|            }
  517|     11|        }
  518|       |
  519|     11|        if ((di = ossl_decoder_instance_new(decoder, decoderctx)) == NULL) {
  ------------------
  |  Branch (519:13): [True: 0, False: 11]
  ------------------
  520|      0|            decoder->freectx(decoderctx);
  521|      0|            return;
  522|      0|        }
  523|       |
  524|     11|        switch (data->type_check) {
  ------------------
  |  Branch (524:17): [True: 11, False: 0]
  ------------------
  525|      9|        case IS_SAME:
  ------------------
  |  Branch (525:9): [True: 9, False: 2]
  ------------------
  526|       |            /* If it differs, this is not a decoder to add for now. */
  527|      9|            if (!ossl_decoder_fast_is_a(decoder,
  ------------------
  |  Branch (527:17): [True: 5, False: 4]
  ------------------
  528|      9|                    OSSL_DECODER_INSTANCE_get_input_type(di),
  529|      9|                    &di->input_type_id)) {
  530|      5|                ossl_decoder_instance_free(di);
  531|      5|                OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      5|    do {                           \
  |  |  220|      5|        BIO *trc_out = NULL;       \
  |  |  221|      5|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 5]
  |  |  ------------------
  ------------------
  532|      0|                {
  533|      0|                    BIO_printf(trc_out,
  534|      0|                        "    REJECTED: input type doesn't match output type\n");
  535|      0|                }
  536|      5|                OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      5|    }                            \
  |  |  225|      5|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 5]
  |  |  ------------------
  ------------------
  537|      5|                return;
  538|      5|            }
  539|      4|            break;
  540|      4|        case IS_DIFFERENT:
  ------------------
  |  Branch (540:9): [True: 2, False: 9]
  ------------------
  541|       |            /* If it's the same, this is not a decoder to add for now. */
  542|      2|            if (ossl_decoder_fast_is_a(decoder,
  ------------------
  |  Branch (542:17): [True: 0, False: 2]
  ------------------
  543|      2|                    OSSL_DECODER_INSTANCE_get_input_type(di),
  544|      2|                    &di->input_type_id)) {
  545|      0|                ossl_decoder_instance_free(di);
  546|      0|                OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  547|      0|                {
  548|      0|                    BIO_printf(trc_out,
  549|      0|                        "    REJECTED: input type matches output type\n");
  550|      0|                }
  551|      0|                OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  552|      0|                return;
  553|      0|            }
  554|      2|            break;
  555|     11|        }
  556|       |
  557|       |        /*
  558|       |         * Apart from keeping w_new_end up to date, We don't care about
  559|       |         * errors here.  If it doesn't collect, then it doesn't...
  560|       |         */
  561|      6|        if (!ossl_decoder_ctx_add_decoder_inst(data->ctx, di)) {
  ------------------
  |  Branch (561:13): [True: 0, False: 6]
  ------------------
  562|      0|            ossl_decoder_instance_free(di);
  563|      0|            return;
  564|      0|        }
  565|       |
  566|      6|        data->w_new_end++;
  567|      6|    }
  568|  1.67k|}
decoder_lib.c:decoder_process:
  842|  1.51M|{
  843|  1.51M|    struct decoder_process_data_st *data = arg;
  844|  1.51M|    OSSL_DECODER_CTX *ctx = data->ctx;
  845|  1.51M|    OSSL_DECODER_INSTANCE *decoder_inst = NULL;
  846|  1.51M|    OSSL_DECODER *decoder = NULL;
  847|  1.51M|    OSSL_CORE_BIO *cbio = NULL;
  848|  1.51M|    BIO *bio = data->bio;
  849|  1.51M|    long loc;
  850|  1.51M|    int i;
  851|  1.51M|    int ok = 0;
  852|       |    /* For recursions */
  853|  1.51M|    struct decoder_process_data_st new_data;
  854|  1.51M|    const char *data_type = NULL;
  855|  1.51M|    const char *data_structure = NULL;
  856|       |    /* Saved to restore on return, mutated in PEM->DER transition. */
  857|  1.51M|    const char *start_input_type = ctx->start_input_type;
  858|       |
  859|       |    /*
  860|       |     * This is an indicator up the call stack that something was indeed
  861|       |     * decoded, leading to a recursive call of this function.
  862|       |     */
  863|  1.51M|    data->flag_next_level_called = 1;
  864|       |
  865|  1.51M|    memset(&new_data, 0, sizeof(new_data));
  866|  1.51M|    new_data.ctx = data->ctx;
  867|  1.51M|    new_data.recursion = data->recursion + 1;
  868|       |
  869|  1.51M|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  870|  1.51M|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  871|  1.51M|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  872|  1.51M|        : LEVEL_STR "...")
  873|       |
  874|  1.51M|    if (params == NULL) {
  ------------------
  |  Branch (874:9): [True: 503k, False: 1.00M]
  ------------------
  875|       |        /* First iteration, where we prepare for what is to come */
  876|       |
  877|   503k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   503k|    do {                           \
  |  |  220|   503k|        BIO *trc_out = NULL;       \
  |  |  221|   503k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 503k]
  |  |  ------------------
  ------------------
  878|      0|        {
  879|      0|            BIO_printf(trc_out,
  880|      0|                "(ctx %p) starting to walk the decoder chain\n",
  881|      0|                (void *)new_data.ctx);
  882|      0|        }
  883|   503k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   503k|    }                            \
  |  |  225|   503k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 503k]
  |  |  ------------------
  ------------------
  884|       |
  885|   503k|        data->current_decoder_inst_index = OSSL_DECODER_CTX_get_num_decoders(ctx);
  886|       |
  887|   503k|        bio = data->bio;
  888|  1.00M|    } else {
  889|  1.00M|        const OSSL_PARAM *p;
  890|  1.00M|        const char *trace_data_structure;
  891|       |
  892|  1.00M|        decoder_inst = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts,
  893|  1.00M|            data->current_decoder_inst_index);
  894|  1.00M|        decoder = OSSL_DECODER_INSTANCE_get_decoder(decoder_inst);
  895|       |
  896|  1.00M|        data->flag_construct_called = 0;
  897|  1.00M|        if (ctx->construct != NULL) {
  ------------------
  |  Branch (897:13): [True: 1.00M, False: 0]
  ------------------
  898|  1.00M|            int rv;
  899|       |
  900|  1.00M|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|  1.00M|    do {                           \
  |  |  220|  1.00M|        BIO *trc_out = NULL;       \
  |  |  221|  1.00M|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
  901|      0|            {
  902|      0|                BIO_printf(trc_out,
  903|      0|                    "(ctx %p) %s Running constructor\n",
  904|      0|                    (void *)new_data.ctx, LEVEL);
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
  905|      0|            }
  906|  1.00M|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|  1.00M|    }                            \
  |  |  225|  1.00M|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
  907|       |
  908|  1.00M|            rv = ctx->construct(decoder_inst, params, ctx->construct_data);
  909|       |
  910|  1.00M|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|  1.00M|    do {                           \
  |  |  220|  1.00M|        BIO *trc_out = NULL;       \
  |  |  221|  1.00M|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
  911|      0|            {
  912|      0|                BIO_printf(trc_out,
  913|      0|                    "(ctx %p) %s Running constructor => %d\n",
  914|      0|                    (void *)new_data.ctx, LEVEL, rv);
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
  915|      0|            }
  916|  1.00M|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|  1.00M|    }                            \
  |  |  225|  1.00M|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
  917|       |
  918|  1.00M|            ok = (rv > 0);
  919|  1.00M|            if (ok) {
  ------------------
  |  Branch (919:17): [True: 503k, False: 503k]
  ------------------
  920|   503k|                data->flag_construct_called = 1;
  921|   503k|                goto end;
  922|   503k|            }
  923|  1.00M|        }
  924|       |
  925|       |        /* The constructor didn't return success */
  926|       |
  927|       |        /*
  928|       |         * so we try to use the object we got and feed it to any next
  929|       |         * decoder that will take it.  Object references are not
  930|       |         * allowed for this.
  931|       |         * If this data isn't present, decoding has failed.
  932|       |         */
  933|       |
  934|   503k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA);
  ------------------
  |  |  364|   503k|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  935|   503k|        if (p == NULL || p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|   503k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (935:13): [True: 0, False: 503k]
  |  Branch (935:26): [True: 0, False: 503k]
  ------------------
  936|      0|            goto end;
  937|   503k|        new_data.bio = BIO_new_mem_buf(p->data, (int)p->data_size);
  938|   503k|        if (new_data.bio == NULL)
  ------------------
  |  Branch (938:13): [True: 0, False: 503k]
  ------------------
  939|      0|            goto end;
  940|   503k|        bio = new_data.bio;
  941|       |
  942|       |        /* Get the data type if there is one */
  943|   503k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_TYPE);
  ------------------
  |  |  366|   503k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  944|   503k|        if (p != NULL && !OSSL_PARAM_get_utf8_string_ptr(p, &data_type))
  ------------------
  |  Branch (944:13): [True: 503k, False: 0]
  |  Branch (944:26): [True: 0, False: 503k]
  ------------------
  945|      0|            goto end;
  946|       |
  947|       |        /* Get the data structure if there is one */
  948|   503k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_STRUCTURE);
  ------------------
  |  |  365|   503k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  949|   503k|        if (p != NULL && !OSSL_PARAM_get_utf8_string_ptr(p, &data_structure))
  ------------------
  |  Branch (949:13): [True: 503k, False: 0]
  |  Branch (949:26): [True: 0, False: 503k]
  ------------------
  950|      0|            goto end;
  951|       |
  952|       |        /* Get the new input type if there is one */
  953|   503k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_INPUT_TYPE);
  ------------------
  |  |  368|   503k|# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
  ------------------
  954|   503k|        if (p != NULL) {
  ------------------
  |  Branch (954:13): [True: 503k, False: 0]
  ------------------
  955|   503k|            if (!OSSL_PARAM_get_utf8_string_ptr(p, &ctx->start_input_type))
  ------------------
  |  Branch (955:17): [True: 0, False: 503k]
  ------------------
  956|      0|                goto end;
  957|       |            /*
  958|       |             * When switching PKCS8 from PEM to DER we decrypt the data if needed
  959|       |             * and then determine the algorithm OID.  Likewise, with SPKI, only
  960|       |             * this time sans decryption.
  961|       |             */
  962|   503k|            if (ctx->input_structure != NULL
  ------------------
  |  Branch (962:17): [True: 503k, False: 0]
  ------------------
  963|   503k|                && (OPENSSL_strcasecmp(ctx->input_structure, "SubjectPublicKeyInfo") == 0
  ------------------
  |  Branch (963:21): [True: 503k, False: 0]
  ------------------
  964|      0|                    || OPENSSL_strcasecmp(data_structure, "PrivateKeyInfo") == 0
  ------------------
  |  Branch (964:24): [True: 0, False: 0]
  ------------------
  965|      0|                    || OPENSSL_strcasecmp(ctx->input_structure, "PrivateKeyInfo") == 0))
  ------------------
  |  Branch (965:24): [True: 0, False: 0]
  ------------------
  966|   503k|                data->flag_input_structure_checked = 1;
  967|   503k|        }
  968|       |
  969|       |        /*
  970|       |         * If the data structure is "type-specific" and the data type is
  971|       |         * given, we drop the data structure.  The reasoning is that the
  972|       |         * data type is already enough to find the applicable next decoder,
  973|       |         * so an additional "type-specific" data structure is extraneous.
  974|       |         *
  975|       |         * Furthermore, if the OSSL_DECODER caller asked for a type specific
  976|       |         * structure under another name, such as "DH", we get a mismatch
  977|       |         * if the data structure we just received is "type-specific".
  978|       |         * There's only so much you can do without infusing this code with
  979|       |         * too special knowledge.
  980|       |         */
  981|   503k|        trace_data_structure = data_structure;
  982|   503k|        if (data_type != NULL && data_structure != NULL
  ------------------
  |  Branch (982:13): [True: 503k, False: 0]
  |  Branch (982:34): [True: 503k, False: 0]
  ------------------
  983|   503k|            && OPENSSL_strcasecmp(data_structure, "type-specific") == 0)
  ------------------
  |  Branch (983:16): [True: 0, False: 503k]
  ------------------
  984|      0|            data_structure = NULL;
  985|       |
  986|   503k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   503k|    do {                           \
  |  |  220|   503k|        BIO *trc_out = NULL;       \
  |  |  221|   503k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 503k]
  |  |  ------------------
  ------------------
  987|      0|        {
  988|      0|            BIO_printf(trc_out,
  989|      0|                "(ctx %p) %s incoming from previous decoder (%p %s):\n"
  990|      0|                "    data type: %s, data structure: %s%s\n",
  991|      0|                (void *)new_data.ctx, LEVEL, (void *)decoder,
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
  992|      0|                OSSL_DECODER_get0_description(decoder),
  993|      0|                data_type, trace_data_structure,
  994|      0|                (trace_data_structure == data_structure
  ------------------
  |  Branch (994:18): [True: 0, False: 0]
  ------------------
  995|      0|                        ? ""
  996|      0|                        : " (dropped)"));
  997|      0|        }
  998|   503k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   503k|    }                            \
  |  |  225|   503k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 503k]
  |  |  ------------------
  ------------------
  999|   503k|    }
 1000|       |
 1001|       |    /*
 1002|       |     * If we have no more decoders to look through at this point,
 1003|       |     * we failed
 1004|       |     */
 1005|  1.00M|    if (data->current_decoder_inst_index == 0)
  ------------------
  |  Branch (1005:9): [True: 0, False: 1.00M]
  ------------------
 1006|      0|        goto end;
 1007|       |
 1008|  1.00M|    if ((loc = BIO_tell(bio)) < 0) {
  ------------------
  |  |  583|  1.00M|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|  1.00M|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (1008:9): [True: 0, False: 1.00M]
  ------------------
 1009|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_BIO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1010|      0|        goto end;
 1011|      0|    }
 1012|       |
 1013|  1.00M|    if ((cbio = ossl_core_bio_new_from_bio(bio)) == NULL) {
  ------------------
  |  Branch (1013:9): [True: 0, False: 1.00M]
  ------------------
 1014|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_BIO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1015|      0|        goto end;
 1016|      0|    }
 1017|       |
 1018|  2.85M|    for (i = data->current_decoder_inst_index; i-- > 0;) {
  ------------------
  |  Branch (1018:48): [True: 2.85M, False: 0]
  ------------------
 1019|  2.85M|        OSSL_DECODER_INSTANCE *new_decoder_inst = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts, i);
 1020|  2.85M|        OSSL_DECODER *new_decoder = OSSL_DECODER_INSTANCE_get_decoder(new_decoder_inst);
 1021|  2.85M|        const char *new_decoder_name = NULL;
 1022|  2.85M|        void *new_decoderctx = OSSL_DECODER_INSTANCE_get_decoder_ctx(new_decoder_inst);
 1023|  2.85M|        const char *new_input_type = OSSL_DECODER_INSTANCE_get_input_type(new_decoder_inst);
 1024|  2.85M|        int n_i_s_was_set = 0; /* We don't care here */
 1025|  2.85M|        const char *new_input_structure = OSSL_DECODER_INSTANCE_get_input_structure(new_decoder_inst,
 1026|  2.85M|            &n_i_s_was_set);
 1027|       |
 1028|  2.85M|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|  2.85M|    do {                           \
  |  |  220|  2.85M|        BIO *trc_out = NULL;       \
  |  |  221|  2.85M|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2.85M]
  |  |  ------------------
  ------------------
 1029|      0|        {
 1030|      0|            new_decoder_name = OSSL_DECODER_get0_name(new_decoder);
 1031|      0|            BIO_printf(trc_out,
 1032|      0|                "(ctx %p) %s [%u] Considering decoder instance %p (decoder %p %s):\n"
 1033|      0|                "    %s with %s\n",
 1034|      0|                (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1035|      0|                (void *)new_decoder_inst, (void *)new_decoder,
 1036|      0|                OSSL_DECODER_get0_description(new_decoder),
 1037|      0|                new_decoder_name,
 1038|      0|                OSSL_DECODER_get0_properties(new_decoder));
 1039|      0|        }
 1040|  2.85M|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|  2.85M|    }                            \
  |  |  225|  2.85M|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2.85M]
  |  |  ------------------
  ------------------
 1041|       |
 1042|       |        /*
 1043|       |         * If |decoder| is NULL, it means we've just started, and the caller
 1044|       |         * may have specified what it expects the initial input to be.  If
 1045|       |         * that's the case, we do this extra check.
 1046|       |         */
 1047|  2.85M|        if (decoder == NULL && ctx->start_input_type != NULL
  ------------------
  |  Branch (1047:13): [True: 1.51M, False: 1.34M]
  |  Branch (1047:32): [True: 1.51M, False: 0]
  ------------------
 1048|  1.51M|            && OPENSSL_strcasecmp(ctx->start_input_type, new_input_type) != 0) {
  ------------------
  |  Branch (1048:16): [True: 503k, False: 1.00M]
  ------------------
 1049|   503k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   503k|    do {                           \
  |  |  220|   503k|        BIO *trc_out = NULL;       \
  |  |  221|   503k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 503k]
  |  |  ------------------
  ------------------
 1050|      0|            {
 1051|      0|                BIO_printf(trc_out,
 1052|      0|                    "(ctx %p) %s [%u] the start input type '%s' doesn't match the input type of the considered decoder, skipping...\n",
 1053|      0|                    (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1054|      0|                    ctx->start_input_type);
 1055|      0|            }
 1056|   503k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   503k|    }                            \
  |  |  225|   503k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 503k]
  |  |  ------------------
  ------------------
 1057|   503k|            continue;
 1058|   503k|        }
 1059|       |
 1060|       |        /*
 1061|       |         * If we have a previous decoder, we check that the input type
 1062|       |         * of the next to be used matches the type of this previous one.
 1063|       |         * |new_input_type| holds the value of the "input-type" parameter
 1064|       |         * for the decoder we're currently considering.
 1065|       |         */
 1066|  2.35M|        if (decoder != NULL && !ossl_decoder_fast_is_a(decoder, new_input_type, &new_decoder_inst->input_type_id)) {
  ------------------
  |  Branch (1066:13): [True: 1.34M, False: 1.00M]
  |  Branch (1066:32): [True: 0, False: 1.34M]
  ------------------
 1067|      0|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1068|      0|            {
 1069|      0|                BIO_printf(trc_out,
 1070|      0|                    "(ctx %p) %s [%u] the input type doesn't match the name of the previous decoder (%p %s), skipping...\n",
 1071|      0|                    (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1072|      0|                    (void *)decoder,
 1073|      0|                    OSSL_DECODER_get0_description(decoder));
 1074|      0|            }
 1075|      0|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1076|      0|            continue;
 1077|      0|        }
 1078|       |
 1079|       |        /*
 1080|       |         * If the previous decoder gave us a data type, we check to see
 1081|       |         * if that matches the decoder we're currently considering.
 1082|       |         */
 1083|  2.35M|        if (data_type != NULL && !OSSL_DECODER_is_a(new_decoder, data_type)) {
  ------------------
  |  Branch (1083:13): [True: 1.34M, False: 1.00M]
  |  Branch (1083:34): [True: 162k, False: 1.18M]
  ------------------
 1084|   162k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   162k|    do {                           \
  |  |  220|   162k|        BIO *trc_out = NULL;       \
  |  |  221|   162k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 162k]
  |  |  ------------------
  ------------------
 1085|      0|            {
 1086|      0|                BIO_printf(trc_out,
 1087|      0|                    "(ctx %p) %s [%u] the previous decoder's data type doesn't match the name of the considered decoder, skipping...\n",
 1088|      0|                    (void *)new_data.ctx, LEVEL, (unsigned int)i);
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1089|      0|            }
 1090|   162k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   162k|    }                            \
  |  |  225|   162k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 162k]
  |  |  ------------------
  ------------------
 1091|   162k|            continue;
 1092|   162k|        }
 1093|       |
 1094|       |        /*
 1095|       |         * If the previous decoder gave us a data structure name, we check
 1096|       |         * to see that it matches the input data structure of the decoder
 1097|       |         * we're currently considering.
 1098|       |         */
 1099|  2.19M|        if (data_structure != NULL
  ------------------
  |  Branch (1099:13): [True: 1.18M, False: 1.00M]
  ------------------
 1100|  1.18M|            && (new_input_structure == NULL
  ------------------
  |  Branch (1100:17): [True: 0, False: 1.18M]
  ------------------
 1101|  1.18M|                || OPENSSL_strcasecmp(data_structure,
  ------------------
  |  Branch (1101:20): [True: 682k, False: 503k]
  ------------------
 1102|  1.18M|                       new_input_structure)
 1103|  1.18M|                    != 0)) {
 1104|   682k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   682k|    do {                           \
  |  |  220|   682k|        BIO *trc_out = NULL;       \
  |  |  221|   682k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 682k]
  |  |  ------------------
  ------------------
 1105|      0|            {
 1106|      0|                BIO_printf(trc_out,
 1107|      0|                    "(ctx %p) %s [%u] the previous decoder's data structure doesn't match the input structure of the considered decoder, skipping...\n",
 1108|      0|                    (void *)new_data.ctx, LEVEL, (unsigned int)i);
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1109|      0|            }
 1110|   682k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   682k|    }                            \
  |  |  225|   682k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 682k]
  |  |  ------------------
  ------------------
 1111|   682k|            continue;
 1112|   682k|        }
 1113|       |
 1114|       |        /*
 1115|       |         * If the decoder we're currently considering specifies a structure,
 1116|       |         * and this check hasn't already been done earlier in this chain of
 1117|       |         * decoder_process() calls, check that it matches the user provided
 1118|       |         * input structure, if one is given.
 1119|       |         */
 1120|  1.51M|        if (!data->flag_input_structure_checked
  ------------------
  |  Branch (1120:13): [True: 503k, False: 1.00M]
  ------------------
 1121|   503k|            && ctx->input_structure != NULL
  ------------------
  |  Branch (1121:16): [True: 503k, False: 0]
  ------------------
 1122|   503k|            && new_input_structure != NULL) {
  ------------------
  |  Branch (1122:16): [True: 503k, False: 0]
  ------------------
 1123|   503k|            data->flag_input_structure_checked = 1;
 1124|   503k|            if (OPENSSL_strcasecmp(new_input_structure,
  ------------------
  |  Branch (1124:17): [True: 503k, False: 0]
  ------------------
 1125|   503k|                    ctx->input_structure)
 1126|   503k|                != 0) {
 1127|   503k|                OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   503k|    do {                           \
  |  |  220|   503k|        BIO *trc_out = NULL;       \
  |  |  221|   503k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 503k]
  |  |  ------------------
  ------------------
 1128|      0|                {
 1129|      0|                    BIO_printf(trc_out,
 1130|      0|                        "(ctx %p) %s [%u] the previous decoder's data structure doesn't match the input structure given by the user, skipping...\n",
 1131|      0|                        (void *)new_data.ctx, LEVEL, (unsigned int)i);
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1132|      0|                }
 1133|   503k|                OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   503k|    }                            \
  |  |  225|   503k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 503k]
  |  |  ------------------
  ------------------
 1134|   503k|                continue;
 1135|   503k|            }
 1136|   503k|        }
 1137|       |
 1138|       |        /*
 1139|       |         * Checking the return value of BIO_reset() or BIO_seek() is unsafe.
 1140|       |         * Furthermore, BIO_reset() is unsafe to use if the source BIO happens
 1141|       |         * to be a BIO_s_mem(), because the earlier BIO_tell() gives us zero
 1142|       |         * no matter where we are in the underlying buffer we're reading from.
 1143|       |         *
 1144|       |         * So, we simply do a BIO_seek(), and use BIO_tell() that we're back
 1145|       |         * at the same position.  This is a best effort attempt, but BIO_seek()
 1146|       |         * and BIO_tell() should come as a pair...
 1147|       |         */
 1148|  1.00M|        (void)BIO_seek(bio, loc);
  ------------------
  |  |  582|  1.00M|#define BIO_seek(b, ofs) (int)BIO_ctrl(b, BIO_C_FILE_SEEK, ofs, NULL)
  |  |  ------------------
  |  |  |  |  471|  1.00M|#define BIO_C_FILE_SEEK 128
  |  |  ------------------
  ------------------
 1149|  1.00M|        if (BIO_tell(bio) != loc)
  ------------------
  |  |  583|  1.00M|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|  1.00M|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (1149:13): [True: 0, False: 1.00M]
  ------------------
 1150|      0|            goto end;
 1151|       |
 1152|       |        /* Recurse */
 1153|  1.00M|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|  1.00M|    do {                           \
  |  |  220|  1.00M|        BIO *trc_out = NULL;       \
  |  |  221|  1.00M|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
 1154|      0|        {
 1155|      0|            BIO_printf(trc_out,
 1156|      0|                "(ctx %p) %s [%u] Running decoder instance %s (%p)\n",
 1157|      0|                (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1158|      0|                new_decoder_name, (void *)new_decoder_inst);
 1159|      0|        }
 1160|  1.00M|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|  1.00M|    }                            \
  |  |  225|  1.00M|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
 1161|       |
 1162|       |        /*
 1163|       |         * We only care about errors reported from decoder implementations
 1164|       |         * if it returns false (i.e. there was a fatal error).
 1165|       |         */
 1166|  1.00M|        ERR_set_mark();
 1167|       |
 1168|  1.00M|        new_data.current_decoder_inst_index = i;
 1169|  1.00M|        new_data.flag_input_structure_checked
 1170|  1.00M|            = data->flag_input_structure_checked;
 1171|  1.00M|        ok = new_decoder->decode(new_decoderctx, cbio,
 1172|  1.00M|            new_data.ctx->selection,
 1173|  1.00M|            decoder_process, &new_data,
 1174|  1.00M|            ossl_pw_passphrase_callback_dec,
 1175|  1.00M|            &new_data.ctx->pwdata);
 1176|       |
 1177|  1.00M|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|  1.00M|    do {                           \
  |  |  220|  1.00M|        BIO *trc_out = NULL;       \
  |  |  221|  1.00M|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
 1178|      0|        {
 1179|      0|            BIO_printf(trc_out,
 1180|      0|                "(ctx %p) %s [%u] Running decoder instance %s (%p) => %d"
 1181|      0|                " (recursed further: %s, construct called: %s)\n",
 1182|      0|                (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1183|      0|                new_decoder_name, (void *)new_decoder_inst, ok,
 1184|      0|                new_data.flag_next_level_called ? "yes" : "no",
  ------------------
  |  Branch (1184:17): [True: 0, False: 0]
  ------------------
 1185|      0|                new_data.flag_construct_called ? "yes" : "no");
  ------------------
  |  Branch (1185:17): [True: 0, False: 0]
  ------------------
 1186|      0|        }
 1187|  1.00M|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|  1.00M|    }                            \
  |  |  225|  1.00M|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
 1188|       |
 1189|  1.00M|        data->flag_construct_called = new_data.flag_construct_called;
 1190|       |
 1191|       |        /* Break on error or if we tried to construct an object already */
 1192|  1.00M|        if (!ok || data->flag_construct_called) {
  ------------------
  |  Branch (1192:13): [True: 0, False: 1.00M]
  |  Branch (1192:20): [True: 1.00M, False: 0]
  ------------------
 1193|  1.00M|            ERR_clear_last_mark();
 1194|  1.00M|            break;
 1195|  1.00M|        }
 1196|      0|        ERR_pop_to_mark();
 1197|       |
 1198|       |        /*
 1199|       |         * Break if the decoder implementation that we called recursed, since
 1200|       |         * that indicates that it successfully decoded something.
 1201|       |         */
 1202|      0|        if (new_data.flag_next_level_called)
  ------------------
  |  Branch (1202:13): [True: 0, False: 0]
  ------------------
 1203|      0|            break;
 1204|      0|    }
 1205|       |
 1206|  1.51M|end:
 1207|  1.51M|    ossl_core_bio_free(cbio);
 1208|  1.51M|    BIO_free(new_data.bio);
 1209|  1.51M|    ctx->start_input_type = start_input_type;
 1210|  1.51M|    return ok;
 1211|  1.00M|}

OSSL_DECODER_up_ref:
   53|  2.85M|{
   54|  2.85M|    int ref = 0;
   55|       |
   56|  2.85M|    CRYPTO_UP_REF(&decoder->base.refcnt, &ref);
   57|  2.85M|    return 1;
   58|  2.85M|}
OSSL_DECODER_free:
   61|  2.85M|{
   62|  2.85M|    int ref = 0;
   63|       |
   64|  2.85M|    if (decoder == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 2.85M]
  ------------------
   65|      0|        return;
   66|       |
   67|  2.85M|    CRYPTO_DOWN_REF(&decoder->base.refcnt, &ref);
   68|  2.85M|    if (ref > 0)
  ------------------
  |  Branch (68:9): [True: 2.85M, False: 0]
  ------------------
   69|  2.85M|        return;
   70|      0|    OPENSSL_free(decoder->base.name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   71|      0|    ossl_property_free(decoder->base.parsed_propdef);
   72|      0|    ossl_provider_free(decoder->base.prov);
   73|      0|    CRYPTO_FREE_REF(&decoder->base.refcnt);
   74|      0|    OPENSSL_free(decoder);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|      0|}
ossl_decoder_from_algorithm:
  211|     76|{
  212|     76|    OSSL_DECODER *decoder = NULL;
  213|     76|    const OSSL_DISPATCH *fns = algodef->implementation;
  214|     76|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  215|       |
  216|     76|    if ((decoder = ossl_decoder_new()) == NULL)
  ------------------
  |  Branch (216:9): [True: 0, False: 76]
  ------------------
  217|      0|        return NULL;
  218|     76|    decoder->base.id = id;
  219|     76|    if ((decoder->base.name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (219:9): [True: 0, False: 76]
  ------------------
  220|      0|        OSSL_DECODER_free(decoder);
  221|      0|        return NULL;
  222|      0|    }
  223|     76|    decoder->base.algodef = algodef;
  224|     76|    if ((decoder->base.parsed_propdef
  ------------------
  |  Branch (224:9): [True: 0, False: 76]
  ------------------
  225|     76|            = ossl_parse_property(libctx, algodef->property_definition))
  226|     76|        == NULL) {
  227|      0|        OSSL_DECODER_free(decoder);
  228|      0|        return NULL;
  229|      0|    }
  230|       |
  231|    598|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (231:12): [True: 522, False: 76]
  ------------------
  232|    522|        switch (fns->function_id) {
  ------------------
  |  Branch (232:17): [True: 522, False: 0]
  ------------------
  233|     76|        case OSSL_FUNC_DECODER_NEWCTX:
  ------------------
  |  |  992|     76|#define OSSL_FUNC_DECODER_NEWCTX 1
  ------------------
  |  Branch (233:9): [True: 76, False: 446]
  ------------------
  234|     76|            if (decoder->newctx == NULL)
  ------------------
  |  Branch (234:17): [True: 76, False: 0]
  ------------------
  235|     76|                decoder->newctx = OSSL_FUNC_decoder_newctx(fns);
  236|     76|            break;
  237|     76|        case OSSL_FUNC_DECODER_FREECTX:
  ------------------
  |  |  993|     76|#define OSSL_FUNC_DECODER_FREECTX 2
  ------------------
  |  Branch (237:9): [True: 76, False: 446]
  ------------------
  238|     76|            if (decoder->freectx == NULL)
  ------------------
  |  Branch (238:17): [True: 76, False: 0]
  ------------------
  239|     76|                decoder->freectx = OSSL_FUNC_decoder_freectx(fns);
  240|     76|            break;
  241|      0|        case OSSL_FUNC_DECODER_GET_PARAMS:
  ------------------
  |  |  994|      0|#define OSSL_FUNC_DECODER_GET_PARAMS 3
  ------------------
  |  Branch (241:9): [True: 0, False: 522]
  ------------------
  242|      0|            if (decoder->get_params == NULL)
  ------------------
  |  Branch (242:17): [True: 0, False: 0]
  ------------------
  243|      0|                decoder->get_params = OSSL_FUNC_decoder_get_params(fns);
  244|      0|            break;
  245|      0|        case OSSL_FUNC_DECODER_GETTABLE_PARAMS:
  ------------------
  |  |  995|      0|#define OSSL_FUNC_DECODER_GETTABLE_PARAMS 4
  ------------------
  |  Branch (245:9): [True: 0, False: 522]
  ------------------
  246|      0|            if (decoder->gettable_params == NULL)
  ------------------
  |  Branch (246:17): [True: 0, False: 0]
  ------------------
  247|      0|                decoder->gettable_params = OSSL_FUNC_decoder_gettable_params(fns);
  248|      0|            break;
  249|     74|        case OSSL_FUNC_DECODER_SET_CTX_PARAMS:
  ------------------
  |  |  996|     74|#define OSSL_FUNC_DECODER_SET_CTX_PARAMS 5
  ------------------
  |  Branch (249:9): [True: 74, False: 448]
  ------------------
  250|     74|            if (decoder->set_ctx_params == NULL)
  ------------------
  |  Branch (250:17): [True: 74, False: 0]
  ------------------
  251|     74|                decoder->set_ctx_params = OSSL_FUNC_decoder_set_ctx_params(fns);
  252|     74|            break;
  253|     74|        case OSSL_FUNC_DECODER_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  997|     74|#define OSSL_FUNC_DECODER_SETTABLE_CTX_PARAMS 6
  ------------------
  |  Branch (253:9): [True: 74, False: 448]
  ------------------
  254|     74|            if (decoder->settable_ctx_params == NULL)
  ------------------
  |  Branch (254:17): [True: 74, False: 0]
  ------------------
  255|     74|                decoder->settable_ctx_params = OSSL_FUNC_decoder_settable_ctx_params(fns);
  256|     74|            break;
  257|     73|        case OSSL_FUNC_DECODER_DOES_SELECTION:
  ------------------
  |  |  998|     73|#define OSSL_FUNC_DECODER_DOES_SELECTION 10
  ------------------
  |  Branch (257:9): [True: 73, False: 449]
  ------------------
  258|     73|            if (decoder->does_selection == NULL)
  ------------------
  |  Branch (258:17): [True: 73, False: 0]
  ------------------
  259|     73|                decoder->does_selection = OSSL_FUNC_decoder_does_selection(fns);
  260|     73|            break;
  261|     76|        case OSSL_FUNC_DECODER_DECODE:
  ------------------
  |  |  999|     76|#define OSSL_FUNC_DECODER_DECODE 11
  ------------------
  |  Branch (261:9): [True: 76, False: 446]
  ------------------
  262|     76|            if (decoder->decode == NULL)
  ------------------
  |  Branch (262:17): [True: 76, False: 0]
  ------------------
  263|     76|                decoder->decode = OSSL_FUNC_decoder_decode(fns);
  264|     76|            break;
  265|     73|        case OSSL_FUNC_DECODER_EXPORT_OBJECT:
  ------------------
  |  | 1000|     73|#define OSSL_FUNC_DECODER_EXPORT_OBJECT 20
  ------------------
  |  Branch (265:9): [True: 73, False: 449]
  ------------------
  266|     73|            if (decoder->export_object == NULL)
  ------------------
  |  Branch (266:17): [True: 73, False: 0]
  ------------------
  267|     73|                decoder->export_object = OSSL_FUNC_decoder_export_object(fns);
  268|     73|            break;
  269|    522|        }
  270|    522|    }
  271|       |    /*
  272|       |     * Try to check that the method is sensible.
  273|       |     * If you have a constructor, you must have a destructor and vice versa.
  274|       |     * You must have at least one of the encoding driver functions.
  275|       |     */
  276|     76|    if (!((decoder->newctx == NULL && decoder->freectx == NULL)
  ------------------
  |  Branch (276:12): [True: 0, False: 76]
  |  Branch (276:39): [True: 0, False: 0]
  ------------------
  277|     76|            || (decoder->newctx != NULL && decoder->freectx != NULL))
  ------------------
  |  Branch (277:17): [True: 76, False: 0]
  |  Branch (277:44): [True: 76, False: 0]
  ------------------
  278|     76|        || decoder->decode == NULL) {
  ------------------
  |  Branch (278:12): [True: 0, False: 76]
  ------------------
  279|      0|        OSSL_DECODER_free(decoder);
  280|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|      0|    }
  283|       |
  284|     76|    if (prov != NULL && !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (284:9): [True: 76, False: 0]
  |  Branch (284:25): [True: 0, False: 76]
  ------------------
  285|      0|        OSSL_DECODER_free(decoder);
  286|      0|        return NULL;
  287|      0|    }
  288|       |
  289|     76|    decoder->base.prov = prov;
  290|     76|    return decoder;
  291|     76|}
ossl_decoder_store_cache_flush:
  438|    899|{
  439|    899|    OSSL_METHOD_STORE *store = get_decoder_store(libctx);
  440|       |
  441|    899|    if (store != NULL)
  ------------------
  |  Branch (441:9): [True: 899, False: 0]
  ------------------
  442|    899|        return ossl_method_store_cache_flush_all(store);
  443|      0|    return 1;
  444|    899|}
ossl_decoder_store_remove_all_provided:
  447|    899|{
  448|    899|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  449|    899|    OSSL_METHOD_STORE *store = get_decoder_store(libctx);
  450|       |
  451|    899|    if (store != NULL)
  ------------------
  |  Branch (451:9): [True: 899, False: 0]
  ------------------
  452|    899|        return ossl_method_store_remove_all_provided(store, prov);
  453|      0|    return 1;
  454|    899|}
OSSL_DECODER_get0_provider:
  461|  3.86M|{
  462|  3.86M|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|  3.86M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.86M|    __FILE__, __LINE__)
  ------------------
  |  Branch (462:9): [True: 0, False: 3.86M]
  ------------------
  463|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  464|      0|        return 0;
  465|      0|    }
  466|       |
  467|  3.86M|    return decoder->base.prov;
  468|  3.86M|}
ossl_decoder_parsed_properties:
  482|     22|{
  483|     22|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|     22|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     22|    __FILE__, __LINE__)
  ------------------
  |  Branch (483:9): [True: 0, False: 22]
  ------------------
  484|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  485|      0|        return 0;
  486|      0|    }
  487|       |
  488|     22|    return decoder->base.parsed_propdef;
  489|     22|}
ossl_decoder_get_number:
  492|  1.34M|{
  493|  1.34M|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|  1.34M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.34M|    __FILE__, __LINE__)
  ------------------
  |  Branch (493:9): [True: 0, False: 1.34M]
  ------------------
  494|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  495|      0|        return 0;
  496|      0|    }
  497|       |
  498|  1.34M|    return decoder->base.id;
  499|  1.34M|}
OSSL_DECODER_is_a:
  512|  1.34M|{
  513|  1.34M|    if (decoder->base.prov != NULL) {
  ------------------
  |  Branch (513:9): [True: 1.34M, False: 0]
  ------------------
  514|  1.34M|        OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  515|  1.34M|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  516|       |
  517|  1.34M|        return ossl_namemap_name2num(namemap, name) == decoder->base.id;
  518|  1.34M|    }
  519|      0|    return 0;
  520|  1.34M|}
ossl_decoder_fast_is_a:
  531|  1.34M|{
  532|  1.34M|    int id = *id_cache;
  533|       |
  534|  1.34M|    if (id <= 0)
  ------------------
  |  Branch (534:9): [True: 1.34M, False: 1.35k]
  ------------------
  535|  1.34M|        *id_cache = id = resolve_name(decoder, name);
  536|       |
  537|  1.34M|    return id > 0 && ossl_decoder_get_number(decoder) == id;
  ------------------
  |  Branch (537:12): [True: 1.34M, False: 311]
  |  Branch (537:22): [True: 1.34M, False: 1.31k]
  ------------------
  538|  1.34M|}
OSSL_DECODER_do_all_provided:
  556|      4|{
  557|      4|    struct decoder_data_st methdata;
  558|      4|    struct do_one_data_st data;
  559|       |
  560|      4|    methdata.libctx = libctx;
  561|      4|    methdata.tmp_store = NULL;
  562|      4|    (void)inner_ossl_decoder_fetch(&methdata, NULL, NULL /* properties */);
  563|       |
  564|      4|    data.user_fn = user_fn;
  565|      4|    data.user_arg = user_arg;
  566|      4|    if (methdata.tmp_store != NULL)
  ------------------
  |  Branch (566:9): [True: 0, False: 4]
  ------------------
  567|      0|        ossl_method_store_do_all(methdata.tmp_store, &do_one, &data);
  568|      4|    ossl_method_store_do_all(get_decoder_store(libctx), &do_one, &data);
  569|      4|    dealloc_tmp_decoder_store(methdata.tmp_store);
  570|      4|}
OSSL_DECODER_CTX_new:
  629|   503k|{
  630|   503k|    OSSL_DECODER_CTX *ctx;
  631|       |
  632|   503k|    ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  633|   503k|    return ctx;
  634|   503k|}
OSSL_DECODER_CTX_free:
  666|  1.00M|{
  667|  1.00M|    if (ctx != NULL) {
  ------------------
  |  Branch (667:9): [True: 503k, False: 503k]
  ------------------
  668|   503k|        if (ctx->cleanup != NULL)
  ------------------
  |  Branch (668:13): [True: 503k, False: 0]
  ------------------
  669|   503k|            ctx->cleanup(ctx->construct_data);
  670|   503k|        sk_OSSL_DECODER_INSTANCE_pop_free(ctx->decoder_insts,
  671|   503k|            ossl_decoder_instance_free);
  672|   503k|        ossl_pw_clear_passphrase_data(&ctx->pwdata);
  673|   503k|        OPENSSL_free(ctx);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  674|   503k|    }
  675|  1.00M|}
decoder_meth.c:ossl_decoder_new:
   39|     76|{
   40|     76|    OSSL_DECODER *decoder = NULL;
   41|       |
   42|     76|    if ((decoder = OPENSSL_zalloc(sizeof(*decoder))) == NULL)
  ------------------
  |  |  109|     76|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (42:9): [True: 0, False: 76]
  ------------------
   43|      0|        return NULL;
   44|     76|    if (!CRYPTO_NEW_REF(&decoder->base.refcnt, 1)) {
  ------------------
  |  Branch (44:9): [True: 0, False: 76]
  ------------------
   45|      0|        OSSL_DECODER_free(decoder);
   46|      0|        return NULL;
   47|      0|    }
   48|       |
   49|     76|    return decoder;
   50|     76|}
decoder_meth.c:inner_ossl_decoder_fetch:
  348|      4|{
  349|      4|    OSSL_METHOD_STORE *store = get_decoder_store(methdata->libctx);
  350|      4|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  351|      4|    const char *const propq = properties != NULL ? properties : "";
  ------------------
  |  Branch (351:31): [True: 0, False: 4]
  ------------------
  352|      4|    void *method = NULL;
  353|      4|    int unsupported, id;
  354|       |
  355|      4|    if (store == NULL || namemap == NULL) {
  ------------------
  |  Branch (355:9): [True: 0, False: 4]
  |  Branch (355:26): [True: 0, False: 4]
  ------------------
  356|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  357|      0|        return NULL;
  358|      0|    }
  359|       |
  360|      4|    id = name != NULL ? ossl_namemap_name2num(namemap, name) : 0;
  ------------------
  |  Branch (360:10): [True: 0, False: 4]
  ------------------
  361|       |
  362|       |    /*
  363|       |     * If we haven't found the name yet, chances are that the algorithm to
  364|       |     * be fetched is unsupported.
  365|       |     */
  366|      4|    unsupported = id == 0;
  367|       |
  368|      4|    if (id == 0
  ------------------
  |  Branch (368:9): [True: 4, False: 0]
  ------------------
  369|      4|        || !ossl_method_store_cache_get(store, NULL, id, propq, &method)) {
  ------------------
  |  Branch (369:12): [True: 0, False: 0]
  ------------------
  370|      4|        OSSL_METHOD_CONSTRUCT_METHOD mcm = {
  371|      4|            get_tmp_decoder_store,
  372|      4|            reserve_decoder_store,
  373|      4|            unreserve_decoder_store,
  374|      4|            get_decoder_from_store,
  375|      4|            put_decoder_in_store,
  376|      4|            construct_decoder,
  377|      4|            destruct_decoder
  378|      4|        };
  379|      4|        OSSL_PROVIDER *prov = NULL;
  380|       |
  381|      4|        methdata->id = id;
  382|      4|        methdata->names = name;
  383|      4|        methdata->propquery = propq;
  384|      4|        methdata->flag_construct_error_occurred = 0;
  385|      4|        if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_DECODER,
  ------------------
  |  |  296|      4|#define OSSL_OP_DECODER 21
  ------------------
  |  Branch (385:13): [True: 0, False: 4]
  ------------------
  386|      4|                 &prov, 0 /* !force_cache */,
  387|      4|                 &mcm, methdata))
  388|      4|            != NULL) {
  389|       |            /*
  390|       |             * If construction did create a method for us, we know that
  391|       |             * there is a correct name_id and meth_id, since those have
  392|       |             * already been calculated in get_decoder_from_store() and
  393|       |             * put_decoder_in_store() above.
  394|       |             */
  395|      0|            if (id == 0 && name != NULL)
  ------------------
  |  Branch (395:17): [True: 0, False: 0]
  |  Branch (395:28): [True: 0, False: 0]
  ------------------
  396|      0|                id = ossl_namemap_name2num(namemap, name);
  397|      0|            if (id != 0)
  ------------------
  |  Branch (397:17): [True: 0, False: 0]
  ------------------
  398|      0|                ossl_method_store_cache_set(store, prov, id, propq, method,
  399|      0|                    up_ref_decoder, free_decoder);
  400|      0|        }
  401|       |
  402|       |        /*
  403|       |         * If we never were in the constructor, the algorithm to be fetched
  404|       |         * is unsupported.
  405|       |         */
  406|      4|        unsupported = !methdata->flag_construct_error_occurred;
  407|      4|    }
  408|       |
  409|      4|    if ((id != 0 || name != NULL) && method == NULL) {
  ------------------
  |  Branch (409:10): [True: 0, False: 4]
  |  Branch (409:21): [True: 0, False: 4]
  |  Branch (409:38): [True: 0, False: 0]
  ------------------
  410|      0|        int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  318|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (410:20): [True: 0, False: 0]
  ------------------
  411|       |
  412|      0|        if (name == NULL)
  ------------------
  |  Branch (412:13): [True: 0, False: 0]
  ------------------
  413|      0|            name = ossl_namemap_num2name(namemap, id, 0);
  414|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, code,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, code,
  ------------------
  |  |  104|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
  415|      0|            "%s, Name (%s : %d), Properties (%s)",
  416|      0|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  417|      0|            name == NULL ? "<null>" : name, id,
  ------------------
  |  Branch (417:13): [True: 0, False: 0]
  ------------------
  418|      0|            properties == NULL ? "<null>" : properties);
  ------------------
  |  Branch (418:13): [True: 0, False: 0]
  ------------------
  419|      0|    }
  420|       |
  421|      4|    return method;
  422|      4|}
decoder_meth.c:reserve_decoder_store:
  117|      4|{
  118|      4|    struct decoder_data_st *methdata = data;
  119|       |
  120|      4|    if (store == NULL
  ------------------
  |  Branch (120:9): [True: 4, False: 0]
  ------------------
  121|      4|        && (store = get_decoder_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (121:12): [True: 0, False: 4]
  ------------------
  122|      0|        return 0;
  123|       |
  124|      4|    return ossl_method_lock_store(store);
  125|      4|}
decoder_meth.c:unreserve_decoder_store:
  128|      4|{
  129|      4|    struct decoder_data_st *methdata = data;
  130|       |
  131|      4|    if (store == NULL
  ------------------
  |  Branch (131:9): [True: 4, False: 0]
  ------------------
  132|      4|        && (store = get_decoder_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (132:12): [True: 0, False: 4]
  ------------------
  133|      0|        return 0;
  134|       |
  135|      4|    return ossl_method_unlock_store(store);
  136|      4|}
decoder_meth.c:get_decoder_from_store:
  141|      4|{
  142|      4|    struct decoder_data_st *methdata = data;
  143|      4|    void *method = NULL;
  144|      4|    int id;
  145|       |
  146|       |    /*
  147|       |     * get_decoder_from_store() is only called to try and get the method
  148|       |     * that OSSL_DECODER_fetch() is asking for, and the name or name id are
  149|       |     * passed via methdata.
  150|       |     */
  151|      4|    if ((id = methdata->id) == 0 && methdata->names != NULL) {
  ------------------
  |  Branch (151:9): [True: 4, False: 0]
  |  Branch (151:37): [True: 0, False: 4]
  ------------------
  152|      0|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  153|      0|        const char *names = methdata->names;
  154|      0|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   25|      0|#define NAME_SEPARATOR ':'
  ------------------
  155|      0|        size_t l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (155:21): [True: 0, False: 0]
  ------------------
  156|       |
  157|      0|        if (namemap == 0)
  ------------------
  |  Branch (157:13): [True: 0, False: 0]
  ------------------
  158|      0|            return NULL;
  159|      0|        id = ossl_namemap_name2num_n(namemap, names, l);
  160|      0|    }
  161|       |
  162|      4|    if (id == 0)
  ------------------
  |  Branch (162:9): [True: 4, False: 0]
  ------------------
  163|      4|        return NULL;
  164|       |
  165|      0|    if (store == NULL
  ------------------
  |  Branch (165:9): [True: 0, False: 0]
  ------------------
  166|      0|        && (store = get_decoder_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (166:12): [True: 0, False: 0]
  ------------------
  167|      0|        return NULL;
  168|       |
  169|      0|    if (!ossl_method_store_fetch(store, id, methdata->propquery, prov, &method))
  ------------------
  |  Branch (169:9): [True: 0, False: 0]
  ------------------
  170|      0|        return NULL;
  171|      0|    return method;
  172|      0|}
decoder_meth.c:put_decoder_in_store:
  178|     76|{
  179|     76|    struct decoder_data_st *methdata = data;
  180|     76|    OSSL_NAMEMAP *namemap;
  181|     76|    int id;
  182|     76|    size_t l = 0;
  183|       |
  184|       |    /*
  185|       |     * put_decoder_in_store() is only called with an OSSL_DECODER method that
  186|       |     * was successfully created by construct_decoder() below, which means that
  187|       |     * all the names should already be stored in the namemap with the same
  188|       |     * numeric identity, so just use the first to get that identity.
  189|       |     */
  190|     76|    if (names != NULL) {
  ------------------
  |  Branch (190:9): [True: 76, False: 0]
  ------------------
  191|     76|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   25|     76|#define NAME_SEPARATOR ':'
  ------------------
  192|       |
  193|     76|        l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (193:14): [True: 76, False: 0]
  ------------------
  194|     76|    }
  195|       |
  196|     76|    if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL
  ------------------
  |  Branch (196:9): [True: 0, False: 76]
  ------------------
  197|     76|        || (id = ossl_namemap_name2num_n(namemap, names, l)) == 0)
  ------------------
  |  Branch (197:12): [True: 0, False: 76]
  ------------------
  198|      0|        return 0;
  199|       |
  200|     76|    if (store == NULL && (store = get_decoder_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (200:9): [True: 76, False: 0]
  |  Branch (200:26): [True: 0, False: 76]
  ------------------
  201|      0|        return 0;
  202|       |
  203|     76|    return ossl_method_store_add(store, prov, id, propdef, method,
  204|     76|        ossl_decoder_up_ref,
  205|     76|        ossl_decoder_free);
  206|     76|}
decoder_meth.c:ossl_decoder_up_ref:
   33|     76|{
   34|     76|    return OSSL_DECODER_up_ref(data);
   35|     76|}
decoder_meth.c:construct_decoder:
  300|     76|{
  301|       |    /*
  302|       |     * This function is only called if get_decoder_from_store() returned
  303|       |     * NULL, so it's safe to say that of all the spots to create a new
  304|       |     * namemap entry, this is it.  Should the name already exist there, we
  305|       |     * know that ossl_namemap_add() will return its corresponding number.
  306|       |     */
  307|     76|    struct decoder_data_st *methdata = data;
  308|     76|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  309|     76|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  310|     76|    const char *names = algodef->algorithm_names;
  311|     76|    int id = ossl_namemap_add_names(namemap, 0, names, NAME_SEPARATOR);
  ------------------
  |  |   25|     76|#define NAME_SEPARATOR ':'
  ------------------
  312|     76|    void *method = NULL;
  313|       |
  314|     76|    if (id != 0)
  ------------------
  |  Branch (314:9): [True: 76, False: 0]
  ------------------
  315|     76|        method = ossl_decoder_from_algorithm(id, algodef, prov);
  316|       |
  317|       |    /*
  318|       |     * Flag to indicate that there was actual construction errors.  This
  319|       |     * helps inner_evp_generic_fetch() determine what error it should
  320|       |     * record on inaccessible algorithms.
  321|       |     */
  322|     76|    if (method == NULL)
  ------------------
  |  Branch (322:9): [True: 0, False: 76]
  ------------------
  323|      0|        methdata->flag_construct_error_occurred = 1;
  324|       |
  325|     76|    return method;
  326|     76|}
decoder_meth.c:destruct_decoder:
  330|     76|{
  331|     76|    OSSL_DECODER_free(method);
  332|     76|}
decoder_meth.c:dealloc_tmp_decoder_store:
  105|      4|{
  106|      4|    if (store != NULL)
  ------------------
  |  Branch (106:9): [True: 0, False: 4]
  ------------------
  107|      0|        ossl_method_store_free(store);
  108|      4|}
decoder_meth.c:get_decoder_store:
  112|  1.89k|{
  113|  1.89k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_STORE_INDEX);
  ------------------
  |  |  108|  1.89k|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  114|  1.89k|}
decoder_meth.c:resolve_name:
  523|  1.34M|{
  524|  1.34M|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  525|  1.34M|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  526|       |
  527|  1.34M|    return ossl_namemap_name2num(namemap, name);
  528|  1.34M|}
decoder_meth.c:do_one:
  546|    304|{
  547|    304|    struct do_one_data_st *data = arg;
  548|       |
  549|    304|    data->user_fn(method, data->user_arg);
  550|    304|}

ossl_decoder_cache_new:
  774|    809|{
  775|    809|    DECODER_CACHE *cache = OPENSSL_malloc(sizeof(*cache));
  ------------------
  |  |  107|    809|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  776|       |
  777|    809|    if (cache == NULL)
  ------------------
  |  Branch (777:9): [True: 0, False: 809]
  ------------------
  778|      0|        return NULL;
  779|       |
  780|    809|    cache->lock = CRYPTO_THREAD_lock_new();
  781|    809|    if (cache->lock == NULL) {
  ------------------
  |  Branch (781:9): [True: 0, False: 809]
  ------------------
  782|      0|        OPENSSL_free(cache);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  783|      0|        return NULL;
  784|      0|    }
  785|    809|    cache->hashtable = lh_DECODER_CACHE_ENTRY_new(decoder_cache_entry_hash,
  786|    809|        decoder_cache_entry_cmp);
  787|    809|    if (cache->hashtable == NULL) {
  ------------------
  |  Branch (787:9): [True: 0, False: 809]
  ------------------
  788|      0|        CRYPTO_THREAD_lock_free(cache->lock);
  789|      0|        OPENSSL_free(cache);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  790|      0|        return NULL;
  791|      0|    }
  792|       |
  793|    809|    return cache;
  794|    809|}
ossl_decoder_cache_free:
  797|    808|{
  798|    808|    DECODER_CACHE *cache = (DECODER_CACHE *)vcache;
  799|       |
  800|    808|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  801|    808|    lh_DECODER_CACHE_ENTRY_free(cache->hashtable);
  802|    808|    CRYPTO_THREAD_lock_free(cache->lock);
  803|    808|    OPENSSL_free(cache);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  804|    808|}
ossl_decoder_cache_flush:
  811|  2.60k|{
  812|  2.60k|    DECODER_CACHE *cache
  813|  2.60k|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  117|  2.60k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  814|       |
  815|  2.60k|    if (cache == NULL)
  ------------------
  |  Branch (815:9): [True: 808, False: 1.79k]
  ------------------
  816|    808|        return 0;
  817|       |
  818|  1.79k|    if (!CRYPTO_THREAD_write_lock(cache->lock)) {
  ------------------
  |  Branch (818:9): [True: 0, False: 1.79k]
  ------------------
  819|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  820|      0|        return 0;
  821|      0|    }
  822|       |
  823|  1.79k|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  824|  1.79k|    lh_DECODER_CACHE_ENTRY_flush(cache->hashtable);
  825|       |
  826|  1.79k|    CRYPTO_THREAD_unlock(cache->lock);
  827|  1.79k|    return 1;
  828|  1.79k|}
OSSL_DECODER_CTX_new_for_pkey:
  836|   503k|{
  837|   503k|    OSSL_DECODER_CTX *ctx = NULL;
  838|   503k|    OSSL_PARAM decoder_params[] = {
  839|   503k|        OSSL_PARAM_END,
  ------------------
  |  |   25|   503k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  840|   503k|        OSSL_PARAM_END,
  ------------------
  |  |   25|   503k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  841|   503k|        OSSL_PARAM_END
  ------------------
  |  |   25|   503k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  842|   503k|    };
  843|   503k|    DECODER_CACHE *cache
  844|   503k|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  117|   503k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  845|   503k|    DECODER_CACHE_ENTRY cacheent, *res, *newcache = NULL;
  846|   503k|    int i = 0;
  847|       |
  848|   503k|    if (cache == NULL) {
  ------------------
  |  Branch (848:9): [True: 0, False: 503k]
  ------------------
  849|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  850|      0|        return NULL;
  851|      0|    }
  852|   503k|    if (input_structure != NULL)
  ------------------
  |  Branch (852:9): [True: 503k, False: 0]
  ------------------
  853|   503k|        decoder_params[i++] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  365|   503k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  854|   503k|            (char *)input_structure, 0);
  855|   503k|    if (propquery != NULL)
  ------------------
  |  Branch (855:9): [True: 0, False: 503k]
  ------------------
  856|      0|        decoder_params[i++] = OSSL_PARAM_construct_utf8_string(OSSL_DECODER_PARAM_PROPERTIES,
  ------------------
  |  |  221|      0|# define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  130|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  ------------------
  ------------------
  857|      0|            (char *)propquery, 0);
  858|       |
  859|       |    /* It is safe to cast away the const here */
  860|   503k|    cacheent.input_type = (char *)input_type;
  861|   503k|    cacheent.input_structure = (char *)input_structure;
  862|   503k|    cacheent.keytype = (char *)keytype;
  863|   503k|    cacheent.selection = selection;
  864|   503k|    cacheent.propquery = (char *)propquery;
  865|       |
  866|   503k|    if (!CRYPTO_THREAD_read_lock(cache->lock)) {
  ------------------
  |  Branch (866:9): [True: 0, False: 503k]
  ------------------
  867|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  868|      0|        return NULL;
  869|      0|    }
  870|       |
  871|       |    /* First see if we have a template OSSL_DECODER_CTX */
  872|   503k|    res = lh_DECODER_CACHE_ENTRY_retrieve(cache->hashtable, &cacheent);
  873|       |
  874|   503k|    if (res == NULL) {
  ------------------
  |  Branch (874:9): [True: 2, False: 503k]
  ------------------
  875|       |        /*
  876|       |         * There is no template so we will have to construct one. This will be
  877|       |         * time consuming so release the lock and we will later upgrade it to a
  878|       |         * write lock.
  879|       |         */
  880|      2|        CRYPTO_THREAD_unlock(cache->lock);
  881|       |
  882|      2|        if ((ctx = OSSL_DECODER_CTX_new()) == NULL) {
  ------------------
  |  Branch (882:13): [True: 0, False: 2]
  ------------------
  883|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  884|      0|            return NULL;
  885|      0|        }
  886|       |
  887|      2|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      2|    do {                           \
  |  |  220|      2|        BIO *trc_out = NULL;       \
  |  |  221|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  888|      0|        {
  889|      0|            BIO_printf(trc_out,
  890|      0|                "(ctx %p) Looking for %s decoders with selection %d\n",
  891|      0|                (void *)ctx, keytype, selection);
  892|      0|            BIO_printf(trc_out, "    input type: %s, input structure: %s\n",
  893|      0|                input_type, input_structure);
  894|      0|        }
  895|      2|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      2|    }                            \
  |  |  225|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  896|       |
  897|      2|        if (OSSL_DECODER_CTX_set_input_type(ctx, input_type)
  ------------------
  |  Branch (897:13): [True: 2, False: 0]
  ------------------
  898|      2|            && OSSL_DECODER_CTX_set_input_structure(ctx, input_structure)
  ------------------
  |  Branch (898:16): [True: 2, False: 0]
  ------------------
  899|      2|            && OSSL_DECODER_CTX_set_selection(ctx, selection)
  ------------------
  |  Branch (899:16): [True: 2, False: 0]
  ------------------
  900|      2|            && ossl_decoder_ctx_setup_for_pkey(ctx, keytype, libctx, propquery)
  ------------------
  |  Branch (900:16): [True: 2, False: 0]
  ------------------
  901|      2|            && OSSL_DECODER_CTX_add_extra(ctx, libctx, propquery)
  ------------------
  |  Branch (901:16): [True: 2, False: 0]
  ------------------
  902|      2|            && (propquery == NULL
  ------------------
  |  Branch (902:17): [True: 2, False: 0]
  ------------------
  903|      2|                || OSSL_DECODER_CTX_set_params(ctx, decoder_params))) {
  ------------------
  |  Branch (903:20): [True: 0, False: 0]
  ------------------
  904|      2|            ctx->frozen = 1;
  905|      2|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      2|    do {                           \
  |  |  220|      2|        BIO *trc_out = NULL;       \
  |  |  221|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  906|      0|            {
  907|      0|                BIO_printf(trc_out, "(ctx %p) Got %d decoders\n",
  908|      0|                    (void *)ctx, OSSL_DECODER_CTX_get_num_decoders(ctx));
  909|      0|            }
  910|      2|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      2|    }                            \
  |  |  225|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  911|      2|        } else {
  912|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  913|      0|            OSSL_DECODER_CTX_free(ctx);
  914|      0|            return NULL;
  915|      0|        }
  916|       |
  917|      2|        newcache = OPENSSL_zalloc(sizeof(*newcache));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  918|      2|        if (newcache == NULL) {
  ------------------
  |  Branch (918:13): [True: 0, False: 2]
  ------------------
  919|      0|            OSSL_DECODER_CTX_free(ctx);
  920|      0|            return NULL;
  921|      0|        }
  922|       |
  923|      2|        if (input_type != NULL) {
  ------------------
  |  Branch (923:13): [True: 2, False: 0]
  ------------------
  924|      2|            newcache->input_type = OPENSSL_strdup(input_type);
  ------------------
  |  |  136|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  925|      2|            if (newcache->input_type == NULL)
  ------------------
  |  Branch (925:17): [True: 0, False: 2]
  ------------------
  926|      0|                goto err;
  927|      2|        }
  928|      2|        if (input_structure != NULL) {
  ------------------
  |  Branch (928:13): [True: 2, False: 0]
  ------------------
  929|      2|            newcache->input_structure = OPENSSL_strdup(input_structure);
  ------------------
  |  |  136|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  930|      2|            if (newcache->input_structure == NULL)
  ------------------
  |  Branch (930:17): [True: 0, False: 2]
  ------------------
  931|      0|                goto err;
  932|      2|        }
  933|      2|        if (keytype != NULL) {
  ------------------
  |  Branch (933:13): [True: 2, False: 0]
  ------------------
  934|      2|            newcache->keytype = OPENSSL_strdup(keytype);
  ------------------
  |  |  136|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  935|      2|            if (newcache->keytype == NULL)
  ------------------
  |  Branch (935:17): [True: 0, False: 2]
  ------------------
  936|      0|                goto err;
  937|      2|        }
  938|      2|        if (propquery != NULL) {
  ------------------
  |  Branch (938:13): [True: 0, False: 2]
  ------------------
  939|      0|            newcache->propquery = OPENSSL_strdup(propquery);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  940|      0|            if (newcache->propquery == NULL)
  ------------------
  |  Branch (940:17): [True: 0, False: 0]
  ------------------
  941|      0|                goto err;
  942|      0|        }
  943|      2|        newcache->selection = selection;
  944|      2|        newcache->template = ctx;
  945|       |
  946|      2|        if (!CRYPTO_THREAD_write_lock(cache->lock)) {
  ------------------
  |  Branch (946:13): [True: 0, False: 2]
  ------------------
  947|      0|            ctx = NULL;
  948|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  949|      0|            goto err;
  950|      0|        }
  951|      2|        res = lh_DECODER_CACHE_ENTRY_retrieve(cache->hashtable, &cacheent);
  952|      2|        if (res == NULL) {
  ------------------
  |  Branch (952:13): [True: 2, False: 0]
  ------------------
  953|      2|            (void)lh_DECODER_CACHE_ENTRY_insert(cache->hashtable, newcache);
  954|      2|            if (lh_DECODER_CACHE_ENTRY_error(cache->hashtable)) {
  ------------------
  |  Branch (954:17): [True: 0, False: 2]
  ------------------
  955|      0|                ctx = NULL;
  956|      0|                CRYPTO_THREAD_unlock(cache->lock);
  957|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  958|      0|                goto err;
  959|      0|            }
  960|      2|        } else {
  961|       |            /*
  962|       |             * We raced with another thread to construct this and lost. Free
  963|       |             * what we just created and use the entry from the hashtable instead
  964|       |             */
  965|      0|            decoder_cache_entry_free(newcache);
  966|      0|            ctx = res->template;
  967|      0|        }
  968|   503k|    } else {
  969|   503k|        ctx = res->template;
  970|   503k|    }
  971|       |
  972|   503k|    ctx = ossl_decoder_ctx_for_pkey_dup(ctx, pkey, input_type, input_structure);
  973|   503k|    CRYPTO_THREAD_unlock(cache->lock);
  974|       |
  975|   503k|    return ctx;
  976|      0|err:
  977|      0|    decoder_cache_entry_free(newcache);
  978|      0|    OSSL_DECODER_CTX_free(ctx);
  979|       |    return NULL;
  980|   503k|}
decoder_pkey.c:decoder_cache_entry_hash:
  704|   503k|{
  705|   503k|    unsigned long hash = 17;
  706|       |
  707|   503k|    hash = (hash * 23)
  708|   503k|        + (cache->propquery == NULL
  ------------------
  |  Branch (708:12): [True: 503k, False: 0]
  ------------------
  709|   503k|                ? 0
  710|   503k|                : ossl_lh_strcasehash(cache->propquery));
  711|   503k|    hash = (hash * 23)
  712|   503k|        + (cache->input_structure == NULL
  ------------------
  |  Branch (712:12): [True: 0, False: 503k]
  ------------------
  713|   503k|                ? 0
  714|   503k|                : ossl_lh_strcasehash(cache->input_structure));
  715|   503k|    hash = (hash * 23)
  716|   503k|        + (cache->input_type == NULL
  ------------------
  |  Branch (716:12): [True: 0, False: 503k]
  ------------------
  717|   503k|                ? 0
  718|   503k|                : ossl_lh_strcasehash(cache->input_type));
  719|   503k|    hash = (hash * 23)
  720|   503k|        + (cache->keytype == NULL
  ------------------
  |  Branch (720:12): [True: 0, False: 503k]
  ------------------
  721|   503k|                ? 0
  722|   503k|                : ossl_lh_strcasehash(cache->keytype));
  723|       |
  724|   503k|    hash ^= cache->selection;
  725|       |
  726|   503k|    return hash;
  727|   503k|}
decoder_pkey.c:decoder_cache_entry_cmp:
  750|   503k|{
  751|   503k|    int cmp;
  752|       |
  753|   503k|    if (a->selection != b->selection)
  ------------------
  |  Branch (753:9): [True: 0, False: 503k]
  ------------------
  754|      0|        return (a->selection < b->selection) ? -1 : 1;
  ------------------
  |  Branch (754:16): [True: 0, False: 0]
  ------------------
  755|       |
  756|   503k|    cmp = nullstrcmp(a->keytype, b->keytype, 1);
  757|   503k|    if (cmp != 0)
  ------------------
  |  Branch (757:9): [True: 0, False: 503k]
  ------------------
  758|      0|        return cmp;
  759|       |
  760|   503k|    cmp = nullstrcmp(a->input_type, b->input_type, 1);
  761|   503k|    if (cmp != 0)
  ------------------
  |  Branch (761:9): [True: 0, False: 503k]
  ------------------
  762|      0|        return cmp;
  763|       |
  764|   503k|    cmp = nullstrcmp(a->input_structure, b->input_structure, 1);
  765|   503k|    if (cmp != 0)
  ------------------
  |  Branch (765:9): [True: 0, False: 503k]
  ------------------
  766|      0|        return cmp;
  767|       |
  768|   503k|    cmp = nullstrcmp(a->propquery, b->propquery, 0);
  769|       |
  770|   503k|    return cmp;
  771|   503k|}
decoder_pkey.c:nullstrcmp:
  730|  2.01M|{
  731|  2.01M|    if (a == NULL || b == NULL) {
  ------------------
  |  Branch (731:9): [True: 503k, False: 1.51M]
  |  Branch (731:22): [True: 0, False: 1.51M]
  ------------------
  732|   503k|        if (a == NULL) {
  ------------------
  |  Branch (732:13): [True: 503k, False: 0]
  ------------------
  733|   503k|            if (b == NULL)
  ------------------
  |  Branch (733:17): [True: 503k, False: 0]
  ------------------
  734|   503k|                return 0;
  735|      0|            else
  736|      0|                return 1;
  737|   503k|        } else {
  738|      0|            return -1;
  739|      0|        }
  740|  1.51M|    } else {
  741|  1.51M|        if (casecmp)
  ------------------
  |  Branch (741:13): [True: 1.51M, False: 0]
  ------------------
  742|  1.51M|            return OPENSSL_strcasecmp(a, b);
  743|      0|        else
  744|      0|            return strcmp(a, b);
  745|  1.51M|    }
  746|  2.01M|}
decoder_pkey.c:ossl_decoder_ctx_setup_for_pkey:
  444|      2|{
  445|      2|    int ok = 0;
  446|      2|    struct decoder_pkey_data_st *process_data = NULL;
  447|      2|    struct collect_data_st collect_data = { NULL };
  448|      2|    STACK_OF(EVP_KEYMGMT) *keymgmts = NULL;
  ------------------
  |  |   33|      2|#define STACK_OF(type) struct stack_st_##type
  ------------------
  449|      2|    OSSL_PROPERTY_LIST **plp;
  450|      2|    OSSL_PROPERTY_LIST *pq = NULL, *p2 = NULL;
  451|       |
  452|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      2|    do {                           \
  |  |  220|      2|        BIO *trc_out = NULL;       \
  |  |  221|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  453|      0|    {
  454|      0|        const char *input_type = ctx->start_input_type;
  455|      0|        const char *input_structure = ctx->input_structure;
  456|       |
  457|      0|        BIO_printf(trc_out,
  458|      0|            "(ctx %p) Looking for decoders producing %s%s%s%s%s%s\n",
  459|      0|            (void *)ctx,
  460|      0|            keytype != NULL ? keytype : "",
  ------------------
  |  Branch (460:13): [True: 0, False: 0]
  ------------------
  461|      0|            keytype != NULL ? " keys" : "keys of any type",
  ------------------
  |  Branch (461:13): [True: 0, False: 0]
  ------------------
  462|      0|            input_type != NULL ? " from " : "",
  ------------------
  |  Branch (462:13): [True: 0, False: 0]
  ------------------
  463|      0|            input_type != NULL ? input_type : "",
  ------------------
  |  Branch (463:13): [True: 0, False: 0]
  ------------------
  464|      0|            input_structure != NULL ? " with " : "",
  ------------------
  |  Branch (464:13): [True: 0, False: 0]
  ------------------
  465|      0|            input_structure != NULL ? input_structure : "");
  ------------------
  |  Branch (465:13): [True: 0, False: 0]
  ------------------
  466|      0|    }
  467|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      2|    }                            \
  |  |  225|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  468|       |
  469|       |    /* Allocate data. */
  470|      2|    if ((process_data = OPENSSL_zalloc(sizeof(*process_data))) == NULL)
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (470:9): [True: 0, False: 2]
  ------------------
  471|      0|        goto err;
  472|      2|    if ((propquery != NULL
  ------------------
  |  Branch (472:10): [True: 0, False: 2]
  ------------------
  473|      0|            && (process_data->propq = OPENSSL_strdup(propquery)) == NULL))
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (473:16): [True: 0, False: 0]
  ------------------
  474|      0|        goto err;
  475|       |
  476|       |    /* Allocate our list of EVP_KEYMGMTs. */
  477|      2|    keymgmts = sk_EVP_KEYMGMT_new_null();
  478|      2|    if (keymgmts == NULL) {
  ------------------
  |  Branch (478:9): [True: 0, False: 2]
  ------------------
  479|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  480|      0|        goto err;
  481|      0|    }
  482|       |
  483|      2|    process_data->object = NULL;
  484|      2|    process_data->libctx = libctx;
  485|      2|    process_data->selection = ctx->selection;
  486|      2|    process_data->keymgmts = keymgmts;
  487|       |
  488|       |    /*
  489|       |     * Collect passed and default properties to prioritize the decoders.
  490|       |     */
  491|      2|    if (propquery != NULL)
  ------------------
  |  Branch (491:9): [True: 0, False: 2]
  ------------------
  492|      0|        p2 = pq = ossl_parse_query(libctx, propquery, 1);
  493|       |
  494|      2|    plp = ossl_ctx_global_properties(libctx, 0);
  495|      2|    if (plp != NULL && *plp != NULL) {
  ------------------
  |  Branch (495:9): [True: 2, False: 0]
  |  Branch (495:24): [True: 0, False: 2]
  ------------------
  496|      0|        if (pq == NULL) {
  ------------------
  |  Branch (496:13): [True: 0, False: 0]
  ------------------
  497|      0|            pq = *plp;
  498|      0|        } else {
  499|      0|            p2 = ossl_property_merge(pq, *plp);
  500|      0|            ossl_property_free(pq);
  501|      0|            if (p2 == NULL)
  ------------------
  |  Branch (501:17): [True: 0, False: 0]
  ------------------
  502|      0|                goto err;
  503|      0|            pq = p2;
  504|      0|        }
  505|      0|    }
  506|       |
  507|       |    /*
  508|       |     * Enumerate all keymgmts into a stack.
  509|       |     *
  510|       |     * We could nest EVP_KEYMGMT_do_all_provided inside
  511|       |     * OSSL_DECODER_do_all_provided or vice versa but these functions become
  512|       |     * bottlenecks if called repeatedly, which is why we collect the
  513|       |     * EVP_KEYMGMTs into a stack here and call both functions only once.
  514|       |     *
  515|       |     * We resolve the keytype string to a name ID so we don't have to resolve it
  516|       |     * multiple times, avoiding repeated calls to EVP_KEYMGMT_is_a, which is a
  517|       |     * performance bottleneck. However, we do this lazily on the first call to
  518|       |     * collect_keymgmt made by EVP_KEYMGMT_do_all_provided, rather than do it
  519|       |     * upfront, as this ensures that the names for all loaded providers have
  520|       |     * been registered by the time we try to resolve the keytype string.
  521|       |     */
  522|      2|    collect_data.ctx = ctx;
  523|      2|    collect_data.libctx = libctx;
  524|      2|    collect_data.keymgmts = keymgmts;
  525|      2|    collect_data.keytype = keytype;
  526|      2|    collect_data.pq = pq;
  527|      2|    EVP_KEYMGMT_do_all_provided(libctx, collect_keymgmt, &collect_data);
  528|       |
  529|      2|    if (collect_data.error_occurred)
  ------------------
  |  Branch (529:9): [True: 0, False: 2]
  ------------------
  530|      0|        goto err;
  531|       |
  532|       |    /* Enumerate all matching decoders. */
  533|      2|    OSSL_DECODER_do_all_provided(libctx, collect_decoder, &collect_data);
  534|       |
  535|      2|    if (collect_data.error_occurred)
  ------------------
  |  Branch (535:9): [True: 0, False: 2]
  ------------------
  536|      0|        goto err;
  537|       |
  538|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      2|    do {                           \
  |  |  220|      2|        BIO *trc_out = NULL;       \
  |  |  221|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  539|      0|    {
  540|      0|        BIO_printf(trc_out,
  541|      0|            "(ctx %p) Got %d decoders producing keys\n",
  542|      0|            (void *)ctx, collect_data.total);
  543|      0|    }
  544|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      2|    }                            \
  |  |  225|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  545|       |
  546|       |    /*
  547|       |     * Finish initializing the decoder context. If one or more decoders matched
  548|       |     * above then the number of decoders attached to the OSSL_DECODER_CTX will
  549|       |     * be nonzero. Else nothing was found and we do nothing.
  550|       |     */
  551|      2|    if (OSSL_DECODER_CTX_get_num_decoders(ctx) != 0) {
  ------------------
  |  Branch (551:9): [True: 2, False: 0]
  ------------------
  552|      2|        if (!OSSL_DECODER_CTX_set_construct(ctx, decoder_construct_pkey)
  ------------------
  |  Branch (552:13): [True: 0, False: 2]
  ------------------
  553|      2|            || !OSSL_DECODER_CTX_set_construct_data(ctx, process_data)
  ------------------
  |  Branch (553:16): [True: 0, False: 2]
  ------------------
  554|      2|            || !OSSL_DECODER_CTX_set_cleanup(ctx,
  ------------------
  |  Branch (554:16): [True: 0, False: 2]
  ------------------
  555|      2|                decoder_clean_pkey_construct_arg))
  556|      0|            goto err;
  557|       |
  558|      2|        process_data = NULL; /* Avoid it being freed */
  559|      2|    }
  560|       |
  561|      2|    ok = 1;
  562|      2|err:
  563|      2|    decoder_clean_pkey_construct_arg(process_data);
  564|      2|    ossl_property_free(p2);
  565|      2|    return ok;
  566|      2|}
decoder_pkey.c:collect_keymgmt:
  406|     84|{
  407|     84|    struct collect_data_st *data = arg;
  408|       |
  409|     84|    if (!check_keymgmt(keymgmt, data))
  ------------------
  |  Branch (409:9): [True: 81, False: 3]
  ------------------
  410|     81|        return;
  411|       |
  412|       |    /*
  413|       |     * We have to ref EVP_KEYMGMT here because in the success case,
  414|       |     * data->keymgmts is referenced by the constructor we register in the
  415|       |     * OSSL_DECODER_CTX. The registered cleanup function
  416|       |     * (decoder_clean_pkey_construct_arg) unrefs every element of the stack and
  417|       |     * frees it.
  418|       |     */
  419|      3|    if (!EVP_KEYMGMT_up_ref(keymgmt))
  ------------------
  |  Branch (419:9): [True: 0, False: 3]
  ------------------
  420|      0|        return;
  421|       |
  422|      3|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      3|    do {                           \
  |  |  220|      3|        BIO *trc_out = NULL;       \
  |  |  221|      3|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 3]
  |  |  ------------------
  ------------------
  423|      0|    {
  424|      0|        BIO_printf(trc_out,
  425|      0|            "(Collecting KeyManager %s %s [id %d]:\n",
  426|      0|            keymgmt->description, keymgmt->type_name, keymgmt->id);
  427|      0|    }
  428|      3|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      3|    }                            \
  |  |  225|      3|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 3]
  |  |  ------------------
  ------------------
  429|      3|    if (sk_EVP_KEYMGMT_push(data->keymgmts, keymgmt) <= 0) {
  ------------------
  |  Branch (429:9): [True: 0, False: 3]
  ------------------
  430|      0|        EVP_KEYMGMT_free(keymgmt);
  431|      0|        data->error_occurred = 1;
  432|      0|    }
  433|      3|}
decoder_pkey.c:check_keymgmt:
  367|     84|{
  368|       |    /* If no keytype was specified, everything matches. */
  369|     84|    if (data->keytype == NULL)
  ------------------
  |  Branch (369:9): [True: 0, False: 84]
  ------------------
  370|      0|        return 1;
  371|       |
  372|     84|    if (!data->keytype_resolved) {
  ------------------
  |  Branch (372:9): [True: 2, False: 82]
  ------------------
  373|       |        /* We haven't cached the IDs from the keytype string yet. */
  374|      2|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(data->libctx);
  375|      2|        data->keytype_id = ossl_namemap_name2num(namemap, data->keytype);
  376|       |
  377|       |        /*
  378|       |         * If keytype is a value ambiguously used for both EC and SM2,
  379|       |         * collect the ID for SM2 as well.
  380|       |         */
  381|      2|        if (data->keytype_id != 0
  ------------------
  |  Branch (381:13): [True: 2, False: 0]
  ------------------
  382|      2|            && (strcmp(data->keytype, "id-ecPublicKey") == 0
  ------------------
  |  Branch (382:17): [True: 1, False: 1]
  ------------------
  383|      1|                || strcmp(data->keytype, "1.2.840.10045.2.1") == 0))
  ------------------
  |  Branch (383:20): [True: 0, False: 1]
  ------------------
  384|      1|            data->sm2_id = ossl_namemap_name2num(namemap, "SM2");
  385|       |
  386|       |        /*
  387|       |         * If keytype_id is zero the name was not found, but we still
  388|       |         * set keytype_resolved to avoid trying all this again.
  389|       |         */
  390|      2|        data->keytype_resolved = 1;
  391|      2|    }
  392|       |
  393|       |    /* Specified keytype could not be resolved, so nothing matches. */
  394|     84|    if (data->keytype_id == 0)
  ------------------
  |  Branch (394:9): [True: 0, False: 84]
  ------------------
  395|      0|        return 0;
  396|       |
  397|       |    /* Does not match the keytype specified, so skip. */
  398|     84|    if (keymgmt->name_id != data->keytype_id
  ------------------
  |  Branch (398:9): [True: 82, False: 2]
  ------------------
  399|     82|        && keymgmt->name_id != data->sm2_id)
  ------------------
  |  Branch (399:12): [True: 81, False: 1]
  ------------------
  400|     81|        return 0;
  401|       |
  402|      3|    return 1;
  403|     84|}
decoder_pkey.c:collect_decoder:
  315|    152|{
  316|    152|    struct collect_data_st *data = arg;
  317|    152|    STACK_OF(EVP_KEYMGMT) *keymgmts = data->keymgmts;
  ------------------
  |  |   33|    152|#define STACK_OF(type) struct stack_st_##type
  ------------------
  318|    152|    int i, end_i;
  319|    152|    EVP_KEYMGMT *keymgmt;
  320|    152|    const OSSL_PROVIDER *prov;
  321|    152|    void *provctx;
  322|       |
  323|    152|    if (data->error_occurred)
  ------------------
  |  Branch (323:9): [True: 0, False: 152]
  ------------------
  324|      0|        return;
  325|       |
  326|    152|    prov = OSSL_DECODER_get0_provider(decoder);
  327|    152|    provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
  328|       |
  329|       |    /*
  330|       |     * Either the caller didn't give us a selection, or if they did, the decoder
  331|       |     * must tell us if it supports that selection to be accepted. If the decoder
  332|       |     * doesn't have |does_selection|, it's seen as taking anything.
  333|       |     */
  334|    152|    if (decoder->does_selection != NULL
  ------------------
  |  Branch (334:9): [True: 146, False: 6]
  ------------------
  335|    146|        && !decoder->does_selection(provctx, data->ctx->selection))
  ------------------
  |  Branch (335:12): [True: 76, False: 70]
  ------------------
  336|     76|        return;
  337|       |
  338|     76|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|     76|    do {                           \
  |  |  220|     76|        BIO *trc_out = NULL;       \
  |  |  221|     76|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 76]
  |  |  ------------------
  ------------------
  339|      0|    {
  340|      0|        BIO_printf(trc_out,
  341|      0|            "(ctx %p) Checking out decoder %p (%s):\n"
  342|      0|            "    %s with %s\n",
  343|      0|            (void *)data->ctx, (void *)decoder,
  344|      0|            OSSL_DECODER_get0_description(decoder),
  345|      0|            OSSL_DECODER_get0_name(decoder),
  346|      0|            OSSL_DECODER_get0_properties(decoder));
  347|      0|    }
  348|     76|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|     76|    }                            \
  |  |  225|     76|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 76]
  |  |  ------------------
  ------------------
  349|       |
  350|     76|    end_i = sk_EVP_KEYMGMT_num(keymgmts);
  351|    184|    for (i = 0; i < end_i; ++i) {
  ------------------
  |  Branch (351:17): [True: 113, False: 71]
  ------------------
  352|    113|        keymgmt = sk_EVP_KEYMGMT_value(keymgmts, i);
  353|       |
  354|       |        /* Only add this decoder once */
  355|    113|        if (collect_decoder_keymgmt(keymgmt, decoder, provctx, data))
  ------------------
  |  Branch (355:13): [True: 5, False: 108]
  ------------------
  356|      5|            break;
  357|    108|        if (data->error_occurred)
  ------------------
  |  Branch (357:13): [True: 0, False: 108]
  ------------------
  358|      0|            return;
  359|    108|    }
  360|     76|}
decoder_pkey.c:collect_decoder_keymgmt:
  237|    113|{
  238|    113|    void *decoderctx = NULL;
  239|    113|    OSSL_DECODER_INSTANCE *di = NULL;
  240|    113|    const OSSL_PROPERTY_LIST *props;
  241|       |
  242|       |    /*
  243|       |     * We already checked the EVP_KEYMGMT is applicable in check_keymgmt so we
  244|       |     * don't check it again here.
  245|       |     */
  246|       |
  247|    113|    if (keymgmt->name_id != decoder->base.id)
  ------------------
  |  Branch (247:9): [True: 107, False: 6]
  ------------------
  248|       |        /* Mismatch is not an error, continue. */
  249|    107|        return 0;
  250|       |
  251|      6|    if ((decoderctx = decoder->newctx(provctx)) == NULL) {
  ------------------
  |  Branch (251:9): [True: 0, False: 6]
  ------------------
  252|      0|        data->error_occurred = 1;
  253|      0|        return 0;
  254|      0|    }
  255|       |
  256|      6|    if ((di = ossl_decoder_instance_new(decoder, decoderctx)) == NULL) {
  ------------------
  |  Branch (256:9): [True: 0, False: 6]
  ------------------
  257|      0|        decoder->freectx(decoderctx);
  258|      0|        data->error_occurred = 1;
  259|      0|        return 0;
  260|      0|    }
  261|       |
  262|       |    /*
  263|       |     * Input types must be compatible, but we must accept DER encoders when the
  264|       |     * start input type is "PEM".
  265|       |     */
  266|      6|    if (data->ctx->start_input_type != NULL
  ------------------
  |  Branch (266:9): [True: 6, False: 0]
  ------------------
  267|      6|        && di->input_type != NULL
  ------------------
  |  Branch (267:12): [True: 6, False: 0]
  ------------------
  268|      6|        && OPENSSL_strcasecmp(di->input_type, data->ctx->start_input_type) != 0
  ------------------
  |  Branch (268:12): [True: 1, False: 5]
  ------------------
  269|      1|        && (OPENSSL_strcasecmp(di->input_type, "DER") != 0
  ------------------
  |  Branch (269:13): [True: 1, False: 0]
  ------------------
  270|      1|            || OPENSSL_strcasecmp(data->ctx->start_input_type, "PEM") != 0)) {
  ------------------
  |  Branch (270:16): [True: 0, False: 0]
  ------------------
  271|       |        /* Mismatch is not an error, continue. */
  272|      1|        ossl_decoder_instance_free(di);
  273|      1|        return 0;
  274|      1|    }
  275|       |
  276|      5|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      5|    do {                           \
  |  |  220|      5|        BIO *trc_out = NULL;       \
  |  |  221|      5|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 5]
  |  |  ------------------
  ------------------
  277|      0|    {
  278|      0|        BIO_printf(trc_out,
  279|      0|            "(ctx %p) Checking out decoder %p (%s):\n"
  280|      0|            "    %s with %s\n",
  281|      0|            (void *)data->ctx, (void *)decoder,
  282|      0|            OSSL_DECODER_get0_description(decoder),
  283|      0|            OSSL_DECODER_get0_name(decoder),
  284|      0|            OSSL_DECODER_get0_properties(decoder));
  285|      0|    }
  286|      5|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      5|    }                            \
  |  |  225|      5|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 5]
  |  |  ------------------
  ------------------
  287|       |
  288|       |    /*
  289|       |     * Get the property match score so the decoders can be prioritized later.
  290|       |     */
  291|      5|    props = ossl_decoder_parsed_properties(decoder);
  292|      5|    if (data->pq != NULL && props != NULL) {
  ------------------
  |  Branch (292:9): [True: 0, False: 5]
  |  Branch (292:29): [True: 0, False: 0]
  ------------------
  293|      0|        di->score = ossl_property_match_count(data->pq, props);
  294|       |        /*
  295|       |         * Mismatch of mandatory properties is not an error, the decoder is just
  296|       |         * ignored, continue.
  297|       |         */
  298|      0|        if (di->score < 0) {
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  ------------------
  299|      0|            ossl_decoder_instance_free(di);
  300|      0|            return 0;
  301|      0|        }
  302|      0|    }
  303|       |
  304|      5|    if (!ossl_decoder_ctx_add_decoder_inst(data->ctx, di)) {
  ------------------
  |  Branch (304:9): [True: 0, False: 5]
  ------------------
  305|      0|        ossl_decoder_instance_free(di);
  306|      0|        data->error_occurred = 1;
  307|      0|        return 0;
  308|      0|    }
  309|       |
  310|      5|    ++data->total;
  311|      5|    return 1;
  312|      5|}
decoder_pkey.c:decoder_construct_pkey:
   74|  1.00M|{
   75|  1.00M|    struct decoder_pkey_data_st *data = construct_data;
   76|  1.00M|    OSSL_DECODER *decoder = OSSL_DECODER_INSTANCE_get_decoder(decoder_inst);
   77|  1.00M|    void *decoderctx = OSSL_DECODER_INSTANCE_get_decoder_ctx(decoder_inst);
   78|  1.00M|    const OSSL_PROVIDER *decoder_prov = OSSL_DECODER_get0_provider(decoder);
   79|  1.00M|    EVP_KEYMGMT *keymgmt = NULL;
   80|  1.00M|    const OSSL_PROVIDER *keymgmt_prov = NULL;
   81|  1.00M|    int i, end;
   82|       |    /*
   83|       |     * |object_ref| points to a provider reference to an object, its exact
   84|       |     * contents entirely opaque to us, but may be passed to any provider
   85|       |     * function that expects this (such as OSSL_FUNC_keymgmt_load().
   86|       |     *
   87|       |     * This pointer is considered volatile, i.e. whatever it points at
   88|       |     * is assumed to be freed as soon as this function returns.
   89|       |     */
   90|  1.00M|    void *object_ref = NULL;
   91|  1.00M|    size_t object_ref_sz = 0;
   92|  1.00M|    const OSSL_PARAM *p;
   93|       |
   94|  1.00M|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_TYPE);
  ------------------
  |  |  366|  1.00M|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
   95|  1.00M|    if (p != NULL) {
  ------------------
  |  Branch (95:9): [True: 1.00M, False: 0]
  ------------------
   96|  1.00M|        char *object_type = NULL;
   97|       |
   98|  1.00M|        if (!OSSL_PARAM_get_utf8_string(p, &object_type, 0))
  ------------------
  |  Branch (98:13): [True: 0, False: 1.00M]
  ------------------
   99|      0|            return 0;
  100|  1.00M|        OPENSSL_free(data->object_type);
  ------------------
  |  |  132|  1.00M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  101|  1.00M|        data->object_type = object_type;
  102|  1.00M|    }
  103|       |
  104|       |    /*
  105|       |     * For stuff that should end up in an EVP_PKEY, we only accept an object
  106|       |     * reference for the moment.  This enforces that the key data itself
  107|       |     * remains with the provider.
  108|       |     */
  109|  1.00M|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_REFERENCE);
  ------------------
  |  |  369|  1.00M|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  110|  1.00M|    if (p == NULL || p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|   503k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (110:9): [True: 503k, False: 503k]
  |  Branch (110:22): [True: 0, False: 503k]
  ------------------
  111|   503k|        return 0;
  112|   503k|    object_ref = p->data;
  113|   503k|    object_ref_sz = p->data_size;
  114|       |
  115|       |    /*
  116|       |     * First, we try to find a keymgmt that comes from the same provider as
  117|       |     * the decoder that passed the params.
  118|       |     */
  119|   503k|    end = sk_EVP_KEYMGMT_num(data->keymgmts);
  120|   503k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (120:17): [True: 503k, False: 0]
  ------------------
  121|   503k|        keymgmt = sk_EVP_KEYMGMT_value(data->keymgmts, i);
  122|   503k|        keymgmt_prov = EVP_KEYMGMT_get0_provider(keymgmt);
  123|       |
  124|   503k|        if (keymgmt_prov == decoder_prov
  ------------------
  |  Branch (124:13): [True: 503k, False: 0]
  ------------------
  125|   503k|            && evp_keymgmt_has_load(keymgmt)
  ------------------
  |  Branch (125:16): [True: 503k, False: 0]
  ------------------
  126|   503k|            && EVP_KEYMGMT_is_a(keymgmt, data->object_type))
  ------------------
  |  Branch (126:16): [True: 503k, False: 0]
  ------------------
  127|   503k|            break;
  128|   503k|    }
  129|   503k|    if (i < end) {
  ------------------
  |  Branch (129:9): [True: 503k, False: 0]
  ------------------
  130|       |        /* To allow it to be freed further down */
  131|   503k|        if (!EVP_KEYMGMT_up_ref(keymgmt))
  ------------------
  |  Branch (131:13): [True: 0, False: 503k]
  ------------------
  132|      0|            return 0;
  133|   503k|    } else if ((keymgmt = EVP_KEYMGMT_fetch(data->libctx,
  ------------------
  |  Branch (133:16): [True: 0, False: 0]
  ------------------
  134|      0|                    data->object_type,
  135|      0|                    data->propq))
  136|      0|        != NULL) {
  137|      0|        keymgmt_prov = EVP_KEYMGMT_get0_provider(keymgmt);
  138|      0|    }
  139|       |
  140|   503k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (140:9): [True: 503k, False: 0]
  ------------------
  141|   503k|        EVP_PKEY *pkey = NULL;
  142|   503k|        void *keydata = NULL;
  143|       |
  144|       |        /*
  145|       |         * If the EVP_KEYMGMT and the OSSL_DECODER are from the
  146|       |         * same provider, we assume that the KEYMGMT has a key loading
  147|       |         * function that can handle the provider reference we hold.
  148|       |         *
  149|       |         * Otherwise, we export from the decoder and import the
  150|       |         * result in the keymgmt.
  151|       |         */
  152|   503k|        if (keymgmt_prov == decoder_prov) {
  ------------------
  |  Branch (152:13): [True: 503k, False: 0]
  ------------------
  153|   503k|            keydata = evp_keymgmt_load(keymgmt, object_ref, object_ref_sz);
  154|   503k|        } else {
  155|      0|            struct evp_keymgmt_util_try_import_data_st import_data;
  156|       |
  157|      0|            import_data.keymgmt = keymgmt;
  158|      0|            import_data.keydata = NULL;
  159|      0|            if (data->selection == 0)
  ------------------
  |  Branch (159:17): [True: 0, False: 0]
  ------------------
  160|       |                /* import/export functions do not tolerate 0 selection */
  161|      0|                import_data.selection = OSSL_KEYMGMT_SELECT_ALL;
  ------------------
  |  |  658|      0|    (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  656|      0|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  646|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|      0|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  653|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  ------------------
  |  |  |  |  |  |  648|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  ------------------
  |  |  |  |  654|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  649|      0|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  162|      0|            else
  163|      0|                import_data.selection = data->selection;
  164|       |
  165|       |            /*
  166|       |             * No need to check for errors here, the value of
  167|       |             * |import_data.keydata| is as much an indicator.
  168|       |             */
  169|      0|            (void)decoder->export_object(decoderctx,
  170|      0|                object_ref, object_ref_sz,
  171|      0|                &evp_keymgmt_util_try_import,
  172|      0|                &import_data);
  173|      0|            keydata = import_data.keydata;
  174|      0|            import_data.keydata = NULL;
  175|      0|        }
  176|       |        /*
  177|       |         * When load or import fails, because this is not an acceptable key
  178|       |         * (despite the provided key material being syntactically valid), the
  179|       |         * reason why the key is rejected would be lost, unless we signal a
  180|       |         * hard error, and suppress resetting for another try.
  181|       |         */
  182|   503k|        if (keydata == NULL)
  ------------------
  |  Branch (182:13): [True: 0, False: 503k]
  ------------------
  183|      0|            ossl_decoder_ctx_set_harderr(data->ctx);
  184|       |
  185|   503k|        if (keydata != NULL
  ------------------
  |  Branch (185:13): [True: 503k, False: 0]
  ------------------
  186|   503k|            && (pkey = evp_keymgmt_util_make_pkey(keymgmt, keydata)) == NULL)
  ------------------
  |  Branch (186:16): [True: 0, False: 503k]
  ------------------
  187|      0|            evp_keymgmt_freedata(keymgmt, keydata);
  188|       |
  189|   503k|        *data->object = pkey;
  190|       |
  191|       |        /*
  192|       |         * evp_keymgmt_util_make_pkey() increments the reference count when
  193|       |         * assigning the EVP_PKEY, so we can free the keymgmt here.
  194|       |         */
  195|   503k|        EVP_KEYMGMT_free(keymgmt);
  196|   503k|    }
  197|       |    /*
  198|       |     * We successfully looked through, |*ctx->object| determines if we
  199|       |     * actually found something.
  200|       |     */
  201|       |    return (*data->object != NULL);
  202|   503k|}
decoder_pkey.c:decoder_clean_pkey_construct_arg:
  205|   503k|{
  206|   503k|    struct decoder_pkey_data_st *data = construct_data;
  207|       |
  208|   503k|    if (data != NULL) {
  ------------------
  |  Branch (208:9): [True: 503k, False: 2]
  ------------------
  209|   503k|        sk_EVP_KEYMGMT_pop_free(data->keymgmts, EVP_KEYMGMT_free);
  210|   503k|        OPENSSL_free(data->propq);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  211|   503k|        OPENSSL_free(data->object_type);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|   503k|        OPENSSL_free(data);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  213|   503k|    }
  214|   503k|}
decoder_pkey.c:ossl_decoder_ctx_for_pkey_dup:
  588|   503k|{
  589|   503k|    OSSL_DECODER_CTX *dest;
  590|   503k|    struct decoder_pkey_data_st *process_data_src, *process_data_dest = NULL;
  591|       |
  592|   503k|    if (src == NULL)
  ------------------
  |  Branch (592:9): [True: 0, False: 503k]
  ------------------
  593|      0|        return NULL;
  594|       |
  595|   503k|    if ((dest = OSSL_DECODER_CTX_new()) == NULL) {
  ------------------
  |  Branch (595:9): [True: 0, False: 503k]
  ------------------
  596|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  597|      0|        return NULL;
  598|      0|    }
  599|       |
  600|   503k|    if (!OSSL_DECODER_CTX_set_input_type(dest, input_type)
  ------------------
  |  Branch (600:9): [True: 0, False: 503k]
  ------------------
  601|   503k|        || !OSSL_DECODER_CTX_set_input_structure(dest, input_structure)) {
  ------------------
  |  Branch (601:12): [True: 0, False: 503k]
  ------------------
  602|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  603|      0|        goto err;
  604|      0|    }
  605|   503k|    dest->selection = src->selection;
  606|       |
  607|   503k|    if (src->decoder_insts != NULL) {
  ------------------
  |  Branch (607:9): [True: 503k, False: 0]
  ------------------
  608|   503k|        dest->decoder_insts
  609|   503k|            = sk_OSSL_DECODER_INSTANCE_deep_copy(src->decoder_insts,
  610|   503k|                ossl_decoder_instance_dup,
  611|   503k|                ossl_decoder_instance_free);
  612|   503k|        if (dest->decoder_insts == NULL) {
  ------------------
  |  Branch (612:13): [True: 0, False: 503k]
  ------------------
  613|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  614|      0|            goto err;
  615|      0|        }
  616|   503k|    }
  617|       |
  618|   503k|    if (!OSSL_DECODER_CTX_set_construct(dest,
  ------------------
  |  Branch (618:9): [True: 0, False: 503k]
  ------------------
  619|   503k|            OSSL_DECODER_CTX_get_construct(src))) {
  620|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  621|      0|        goto err;
  622|      0|    }
  623|       |
  624|   503k|    process_data_src = OSSL_DECODER_CTX_get_construct_data(src);
  625|   503k|    if (process_data_src != NULL) {
  ------------------
  |  Branch (625:9): [True: 503k, False: 0]
  ------------------
  626|   503k|        process_data_dest = OPENSSL_zalloc(sizeof(*process_data_dest));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  627|   503k|        if (process_data_dest == NULL) {
  ------------------
  |  Branch (627:13): [True: 0, False: 503k]
  ------------------
  628|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  629|      0|            goto err;
  630|      0|        }
  631|   503k|        if (process_data_src->propq != NULL) {
  ------------------
  |  Branch (631:13): [True: 0, False: 503k]
  ------------------
  632|      0|            process_data_dest->propq = OPENSSL_strdup(process_data_src->propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  633|      0|            if (process_data_dest->propq == NULL) {
  ------------------
  |  Branch (633:17): [True: 0, False: 0]
  ------------------
  634|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  635|      0|                goto err;
  636|      0|            }
  637|      0|        }
  638|       |
  639|   503k|        if (process_data_src->keymgmts != NULL) {
  ------------------
  |  Branch (639:13): [True: 503k, False: 0]
  ------------------
  640|   503k|            process_data_dest->keymgmts
  641|   503k|                = sk_EVP_KEYMGMT_deep_copy(process_data_src->keymgmts,
  642|   503k|                    keymgmt_dup,
  643|   503k|                    EVP_KEYMGMT_free);
  644|   503k|            if (process_data_dest->keymgmts == NULL) {
  ------------------
  |  Branch (644:17): [True: 0, False: 503k]
  ------------------
  645|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  646|      0|                goto err;
  647|      0|            }
  648|   503k|        }
  649|       |
  650|   503k|        process_data_dest->object = (void **)pkey;
  651|   503k|        process_data_dest->libctx = process_data_src->libctx;
  652|   503k|        process_data_dest->selection = process_data_src->selection;
  653|   503k|        process_data_dest->ctx = dest;
  654|   503k|        if (!OSSL_DECODER_CTX_set_construct_data(dest, process_data_dest)) {
  ------------------
  |  Branch (654:13): [True: 0, False: 503k]
  ------------------
  655|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  656|      0|            goto err;
  657|      0|        }
  658|   503k|        process_data_dest = NULL;
  659|   503k|    }
  660|       |
  661|   503k|    if (!OSSL_DECODER_CTX_set_cleanup(dest,
  ------------------
  |  Branch (661:9): [True: 0, False: 503k]
  ------------------
  662|   503k|            OSSL_DECODER_CTX_get_cleanup(src))) {
  663|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  664|      0|        goto err;
  665|      0|    }
  666|       |
  667|   503k|    dest->frozen = src->frozen;
  668|   503k|    return dest;
  669|      0|err:
  670|      0|    decoder_clean_pkey_construct_arg(process_data_dest);
  671|      0|    OSSL_DECODER_CTX_free(dest);
  672|       |    return NULL;
  673|   503k|}
decoder_pkey.c:keymgmt_dup:
  570|   665k|{
  571|   665k|    if (!EVP_KEYMGMT_up_ref((EVP_KEYMGMT *)keymgmt))
  ------------------
  |  Branch (571:9): [True: 0, False: 665k]
  ------------------
  572|      0|        return NULL;
  573|       |
  574|   665k|    return (EVP_KEYMGMT *)keymgmt;
  575|   665k|}

ossl_encoder_store_cache_flush:
  444|    899|{
  445|    899|    OSSL_METHOD_STORE *store = get_encoder_store(libctx);
  446|       |
  447|    899|    if (store != NULL)
  ------------------
  |  Branch (447:9): [True: 899, False: 0]
  ------------------
  448|    899|        return ossl_method_store_cache_flush_all(store);
  449|      0|    return 1;
  450|    899|}
ossl_encoder_store_remove_all_provided:
  453|    899|{
  454|    899|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  455|    899|    OSSL_METHOD_STORE *store = get_encoder_store(libctx);
  456|       |
  457|    899|    if (store != NULL)
  ------------------
  |  Branch (457:9): [True: 899, False: 0]
  ------------------
  458|    899|        return ossl_method_store_remove_all_provided(store, prov);
  459|      0|    return 1;
  460|    899|}
encoder_meth.c:get_encoder_store:
  113|  1.79k|{
  114|  1.79k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_ENCODER_STORE_INDEX);
  ------------------
  |  |  107|  1.79k|#define OSSL_LIB_CTX_ENCODER_STORE_INDEX 10
  ------------------
  115|  1.79k|}

ossl_err_load_ERR_strings:
  267|     36|{
  268|     36|#ifndef OPENSSL_NO_ERR
  269|     36|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|     36|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 36, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (269:9): [True: 0, False: 36]
  ------------------
  270|      0|        return 0;
  271|       |
  272|     36|    err_load_strings(ERR_str_libraries);
  273|     36|    err_load_strings(ERR_str_reasons);
  274|     36|#endif
  275|     36|    return 1;
  276|     36|}
ERR_load_strings_const:
  292|     35|{
  293|     35|#ifndef OPENSSL_NO_ERR
  294|     35|    if (ossl_err_load_ERR_strings() == 0)
  ------------------
  |  Branch (294:9): [True: 0, False: 35]
  ------------------
  295|      0|        return 0;
  296|     35|    err_load_strings(str);
  297|     35|#endif
  298|       |
  299|     35|    return 1;
  300|     35|}
ERR_clear_error:
  330|  6.13k|{
  331|  6.13k|    int i;
  332|  6.13k|    ERR_STATE *es;
  333|       |
  334|  6.13k|    es = ossl_err_get_state_int();
  335|  6.13k|    if (es == NULL)
  ------------------
  |  Branch (335:9): [True: 0, False: 6.13k]
  ------------------
  336|      0|        return;
  337|       |
  338|   104k|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   14|   104k|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (338:17): [True: 98.1k, False: 6.13k]
  ------------------
  339|  98.1k|        err_clear(es, i, 0);
  340|  98.1k|    }
  341|  6.13k|    es->top = es->bottom = 0;
  342|  6.13k|}
ERR_get_error:
  345|    586|{
  346|    586|    return get_error_values(EV_POP, NULL, NULL, NULL, NULL, NULL);
  347|    586|}
ERR_peek_error:
  370|  6.42k|{
  371|  6.42k|    return get_error_values(EV_PEEK, NULL, NULL, NULL, NULL, NULL);
  372|  6.42k|}
ERR_peek_last_error:
  405|  1.51M|{
  406|  1.51M|    return get_error_values(EV_PEEK_LAST, NULL, NULL, NULL, NULL, NULL);
  407|  1.51M|}
ossl_err_string_int:
  518|    698|{
  519|    698|    char lsbuf[64], rsbuf[256];
  520|    698|    const char *ls, *rs = NULL;
  521|    698|    unsigned long l, r;
  522|       |
  523|    698|    if (len == 0)
  ------------------
  |  Branch (523:9): [True: 0, False: 698]
  ------------------
  524|      0|        return;
  525|       |
  526|    698|    l = ERR_GET_LIB(e);
  527|    698|    ls = ERR_lib_error_string(e);
  528|    698|    if (ls == NULL) {
  ------------------
  |  Branch (528:9): [True: 1, False: 697]
  ------------------
  529|      1|        BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
  530|      1|        ls = lsbuf;
  531|      1|    }
  532|       |
  533|       |    /*
  534|       |     * ERR_reason_error_string() can't safely return system error strings,
  535|       |     * since it would call openssl_strerror_r(), which needs a buffer for
  536|       |     * thread safety.  So for system errors, we call openssl_strerror_r()
  537|       |     * directly instead.
  538|       |     */
  539|    698|    r = ERR_GET_REASON(e);
  540|    698|#ifndef OPENSSL_NO_ERR
  541|    698|    if (ERR_SYSTEM_ERROR(e)) {
  ------------------
  |  |  222|    698|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|    698|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 38, False: 660]
  |  |  ------------------
  ------------------
  542|     38|        if (openssl_strerror_r(r, rsbuf, sizeof(rsbuf)))
  ------------------
  |  Branch (542:13): [True: 38, False: 0]
  ------------------
  543|     38|            rs = rsbuf;
  544|    660|    } else {
  545|    660|        rs = ERR_reason_error_string(e);
  546|    660|    }
  547|    698|#endif
  548|    698|    if (rs == NULL) {
  ------------------
  |  Branch (548:9): [True: 3, False: 695]
  ------------------
  549|      3|        BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)",
  550|      3|            r & ~(ERR_RFLAGS_MASK << ERR_RFLAGS_OFFSET));
  ------------------
  |  |  212|      3|#define ERR_RFLAGS_MASK 0x1F
  ------------------
                          r & ~(ERR_RFLAGS_MASK << ERR_RFLAGS_OFFSET));
  ------------------
  |  |  211|      3|#define ERR_RFLAGS_OFFSET 18L
  ------------------
  551|      3|        rs = rsbuf;
  552|      3|    }
  553|       |
  554|    698|    BIO_snprintf(buf, len, "error:%08lX:%s:%s:%s", e, ls, func, rs);
  555|    698|    if (strlen(buf) == len - 1) {
  ------------------
  |  Branch (555:9): [True: 0, False: 698]
  ------------------
  556|       |        /* Didn't fit; use a minimal format. */
  557|      0|        BIO_snprintf(buf, len, "err:%lx:%lx:%lx:%lx", e, l, 0L, r);
  558|      0|    }
  559|    698|}
ERR_error_string_n:
  562|    698|{
  563|    698|    ossl_err_string_int(e, "", buf, len);
  564|    698|}
ERR_lib_error_string:
  581|    698|{
  582|    698|#ifndef OPENSSL_NO_ERR
  583|    698|    ERR_STRING_DATA d, *p;
  584|    698|    unsigned long l;
  585|       |
  586|    698|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|    698|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 698, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (586:9): [True: 0, False: 698]
  ------------------
  587|      0|        return NULL;
  588|      0|    }
  589|       |
  590|    698|    l = ERR_GET_LIB(e);
  591|    698|    d.error = ERR_PACK(l, 0, 0);
  ------------------
  |  |  262|    698|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|    698|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|    698|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|    698|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  592|    698|    p = int_err_get_item(&d);
  593|    698|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (593:13): [True: 1, False: 697]
  ------------------
  594|       |#else
  595|       |    return NULL;
  596|       |#endif
  597|    698|}
ERR_reason_error_string:
  607|    695|{
  608|    695|#ifndef OPENSSL_NO_ERR
  609|    695|    ERR_STRING_DATA d, *p = NULL;
  610|    695|    unsigned long l, r;
  611|       |
  612|    695|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|    695|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 695, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (612:9): [True: 0, False: 695]
  ------------------
  613|      0|        return NULL;
  614|      0|    }
  615|       |
  616|       |    /*
  617|       |     * ERR_reason_error_string() can't safely return system error strings,
  618|       |     * since openssl_strerror_r() needs a buffer for thread safety, and we
  619|       |     * haven't got one that would serve any sensible purpose.
  620|       |     */
  621|    695|    if (ERR_SYSTEM_ERROR(e))
  ------------------
  |  |  222|    695|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|    695|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 695]
  |  |  ------------------
  ------------------
  622|      0|        return NULL;
  623|       |
  624|    695|    l = ERR_GET_LIB(e);
  625|    695|    r = ERR_GET_REASON(e);
  626|    695|    d.error = ERR_PACK(l, 0, r);
  ------------------
  |  |  262|    695|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|    695|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|    695|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|    695|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  627|    695|    p = int_err_get_item(&d);
  628|    695|    if (p == NULL) {
  ------------------
  |  Branch (628:9): [True: 38, False: 657]
  ------------------
  629|     38|        d.error = ERR_PACK(0, 0, r);
  ------------------
  |  |  262|     38|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|     38|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|     38|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|     38|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  630|     38|        p = int_err_get_item(&d);
  631|     38|    }
  632|    695|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (632:13): [True: 38, False: 657]
  ------------------
  633|       |#else
  634|       |    return NULL;
  635|       |#endif
  636|    695|}
ossl_err_get_state_int:
  652|  24.3M|{
  653|  24.3M|    ERR_STATE *state;
  654|  24.3M|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|  24.3M|#define get_last_sys_error() errno
  ------------------
  655|       |
  656|  24.3M|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|  24.3M|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (656:9): [True: 0, False: 24.3M]
  ------------------
  657|      0|        return NULL;
  658|       |
  659|  24.3M|    state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  660|  24.3M|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   42|  24.3M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  661|  24.3M|    if (state == (ERR_STATE *)-1)
  ------------------
  |  Branch (661:9): [True: 0, False: 24.3M]
  ------------------
  662|      0|        return NULL;
  663|       |
  664|  24.3M|    if (state == NULL) {
  ------------------
  |  Branch (664:9): [True: 1, False: 24.3M]
  ------------------
  665|      1|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (665:13): [True: 0, False: 1]
  ------------------
  666|      1|                CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)-1))
  ------------------
  |  |   42|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  667|      0|            return NULL;
  668|       |
  669|      1|        state = OSSL_ERR_STATE_new();
  670|      1|        if (state == NULL) {
  ------------------
  |  Branch (670:13): [True: 0, False: 1]
  ------------------
  671|      0|            CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  672|      0|                CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   42|      0|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  673|      0|            return NULL;
  674|      0|        }
  675|       |
  676|      1|        if (!ossl_init_thread_start(NULL, NULL, err_delete_thread_state)
  ------------------
  |  Branch (676:13): [True: 0, False: 1]
  ------------------
  677|      1|            || !CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (677:16): [True: 0, False: 1]
  ------------------
  678|      1|                CRYPTO_THREAD_NO_CONTEXT, state)) {
  ------------------
  |  |   42|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  679|      0|            OSSL_ERR_STATE_free(state);
  680|      0|            CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  681|      0|                CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   42|      0|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  682|      0|            return NULL;
  683|      0|        }
  684|       |
  685|       |        /* Ignore failures from these */
  686|      1|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ------------------
  |  |  506|      1|#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
  ------------------
  687|      1|    }
  688|       |
  689|  24.3M|    set_sys_error(saveerrno);
  ------------------
  |  |   32|  24.3M|#define set_sys_error(e) errno = (e)
  ------------------
  690|  24.3M|    return state;
  691|  24.3M|}
err_shelve_state:
  698|      1|{
  699|      1|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|      1|#define get_last_sys_error() errno
  ------------------
  700|       |
  701|       |    /*
  702|       |     * Note, at present our only caller is OPENSSL_init_crypto(), indirectly
  703|       |     * via ossl_init_load_crypto_nodelete(), by which point the requested
  704|       |     * "base" initialization has already been performed, so the below call is a
  705|       |     * NOOP, that re-enters OPENSSL_init_crypto() only to quickly return.
  706|       |     *
  707|       |     * If are no other valid callers of this function, the call below can be
  708|       |     * removed, avoiding the re-entry into OPENSSL_init_crypto().  If there are
  709|       |     * potential uses that are not from inside OPENSSL_init_crypto(), then this
  710|       |     * call is needed, but some care is required to make sure that the re-entry
  711|       |     * remains a NOOP.
  712|       |     */
  713|      1|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      1|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (713:9): [True: 0, False: 1]
  ------------------
  714|      0|        return 0;
  715|       |
  716|      1|    *state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  717|      1|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   42|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  718|      1|    if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (718:9): [True: 0, False: 1]
  ------------------
  719|      1|            CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)-1))
  ------------------
  |  |   42|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  720|      0|        return 0;
  721|       |
  722|      1|    set_sys_error(saveerrno);
  ------------------
  |  |   32|      1|#define set_sys_error(e) errno = (e)
  ------------------
  723|      1|    return 1;
  724|      1|}
err_unshelve_state:
  731|      1|{
  732|      1|    if (state != (void *)-1)
  ------------------
  |  Branch (732:9): [True: 1, False: 0]
  ------------------
  733|      1|        CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  734|      1|            CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)state);
  ------------------
  |  |   42|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  735|      1|}
ERR_get_next_error_library:
  738|  1.80k|{
  739|  1.80k|    int ret;
  740|       |
  741|  1.80k|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|  1.80k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1.80k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (741:9): [True: 0, False: 1.80k]
  ------------------
  742|      0|        return 0;
  743|       |
  744|  1.80k|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (744:9): [True: 0, False: 1.80k]
  ------------------
  745|      0|        return 0;
  746|  1.80k|    ret = int_err_library_number++;
  747|  1.80k|    CRYPTO_THREAD_unlock(err_string_lock);
  748|  1.80k|    return ret;
  749|  1.80k|}
ERR_add_error_data:
  786|  1.83k|{
  787|  1.83k|    va_list args;
  788|  1.83k|    va_start(args, num);
  789|  1.83k|    ERR_add_error_vdata(num, args);
  790|       |    va_end(args);
  791|  1.83k|}
ERR_add_error_vdata:
  794|  1.83k|{
  795|  1.83k|    int i;
  796|  1.83k|    size_t len, size;
  797|  1.83k|    int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   50|  1.83k|#define ERR_TXT_MALLOCED 0x01
  ------------------
                  int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   51|  1.83k|#define ERR_TXT_STRING 0x02
  ------------------
  798|  1.83k|    char *str, *arg;
  799|  1.83k|    ERR_STATE *es;
  800|       |
  801|       |    /* Get the current error data; if an allocated string get it. */
  802|  1.83k|    es = ossl_err_get_state_int();
  803|  1.83k|    if (es == NULL)
  ------------------
  |  Branch (803:9): [True: 0, False: 1.83k]
  ------------------
  804|      0|        return;
  805|  1.83k|    i = es->top;
  806|       |
  807|       |    /*
  808|       |     * If err_data is allocated already, reuse the space.
  809|       |     * Otherwise, allocate a small new buffer.
  810|       |     */
  811|  1.83k|    if ((es->err_data_flags[i] & flags) == flags
  ------------------
  |  Branch (811:9): [True: 0, False: 1.83k]
  ------------------
  812|      0|        && ossl_assert(es->err_data[i] != NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  813|      0|        str = es->err_data[i];
  814|      0|        size = es->err_data_size[i];
  815|       |
  816|       |        /*
  817|       |         * To protect the string we just grabbed from tampering by other
  818|       |         * functions we may call, or to protect them from freeing a pointer
  819|       |         * that may no longer be valid at that point, we clear away the
  820|       |         * data pointer and the flags.  We will set them again at the end
  821|       |         * of this function.
  822|       |         */
  823|      0|        es->err_data[i] = NULL;
  824|      0|        es->err_data_flags[i] = 0;
  825|  1.83k|    } else if ((str = OPENSSL_malloc(size = 81)) == NULL) {
  ------------------
  |  |  107|  1.83k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (825:16): [True: 0, False: 1.83k]
  ------------------
  826|      0|        return;
  827|  1.83k|    } else {
  828|  1.83k|        str[0] = '\0';
  829|  1.83k|    }
  830|  1.83k|    len = strlen(str);
  831|       |
  832|  5.51k|    while (--num >= 0) {
  ------------------
  |  Branch (832:12): [True: 3.67k, False: 1.83k]
  ------------------
  833|  3.67k|        arg = va_arg(args, char *);
  834|  3.67k|        if (arg == NULL)
  ------------------
  |  Branch (834:13): [True: 0, False: 3.67k]
  ------------------
  835|      0|            arg = "<NULL>";
  836|  3.67k|        len += strlen(arg);
  837|  3.67k|        if (len >= size) {
  ------------------
  |  Branch (837:13): [True: 0, False: 3.67k]
  ------------------
  838|      0|            char *p;
  839|       |
  840|      0|            size = len + 20;
  841|      0|            p = OPENSSL_realloc(str, size);
  ------------------
  |  |  121|      0|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  842|      0|            if (p == NULL) {
  ------------------
  |  Branch (842:17): [True: 0, False: 0]
  ------------------
  843|      0|                OPENSSL_free(str);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  844|      0|                return;
  845|      0|            }
  846|      0|            str = p;
  847|      0|        }
  848|  3.67k|        OPENSSL_strlcat(str, arg, size);
  849|  3.67k|    }
  850|  1.83k|    if (!err_set_error_data_int(str, size, flags, 0))
  ------------------
  |  Branch (850:9): [True: 0, False: 1.83k]
  ------------------
  851|      0|        OPENSSL_free(str);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  852|  1.83k|}
err.c:do_err_strings_init:
  211|      1|{
  212|      1|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      1|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (212:9): [True: 0, False: 1]
  ------------------
  213|      0|        return 0;
  214|      1|    err_string_lock = CRYPTO_THREAD_lock_new();
  215|      1|    if (err_string_lock == NULL)
  ------------------
  |  Branch (215:9): [True: 0, False: 1]
  ------------------
  216|      0|        return 0;
  217|      1|#ifndef OPENSSL_NO_ERR
  218|      1|    int_error_hash = lh_ERR_STRING_DATA_new(err_string_data_hash,
  ------------------
  |  |  330|      1|#define lh_ERR_STRING_DATA_new(hfn, cmp) ((LHASH_OF(ERR_STRING_DATA) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_ERR_STRING_DATA_lh_hashfunc_type(hfn), ossl_check_ERR_STRING_DATA_lh_compfunc_type(cmp)), lh_ERR_STRING_DATA_hash_thunk, lh_ERR_STRING_DATA_comp_thunk, lh_ERR_STRING_DATA_doall_thunk, lh_ERR_STRING_DATA_doall_arg_thunk))
  ------------------
  219|      1|        err_string_data_cmp);
  220|      1|    if (int_error_hash == NULL) {
  ------------------
  |  Branch (220:9): [True: 0, False: 1]
  ------------------
  221|      0|        CRYPTO_THREAD_lock_free(err_string_lock);
  222|      0|        err_string_lock = NULL;
  223|      0|        return 0;
  224|      0|    }
  225|      1|#endif
  226|      1|    return 1;
  227|      1|}
err.c:err_string_data_hash:
  169|  6.18k|{
  170|  6.18k|    unsigned long ret, l;
  171|       |
  172|  6.18k|    l = a->error;
  173|  6.18k|    ret = l ^ ERR_GET_LIB(l);
  174|  6.18k|    return (ret ^ ret % 19 * 13);
  175|  6.18k|}
err.c:err_string_data_cmp:
  179|  4.68k|{
  180|  4.68k|    if (a->error == b->error)
  ------------------
  |  Branch (180:9): [True: 4.22k, False: 463]
  ------------------
  181|  4.22k|        return 0;
  182|    463|    return a->error > b->error ? 1 : -1;
  ------------------
  |  Branch (182:12): [True: 364, False: 99]
  ------------------
  183|  4.68k|}
err.c:err_load_strings:
  255|    107|{
  256|    107|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (256:9): [True: 0, False: 107]
  ------------------
  257|      0|        return 0;
  258|  4.85k|    for (; str->error; str++)
  ------------------
  |  Branch (258:12): [True: 4.74k, False: 107]
  ------------------
  259|  4.74k|        (void)lh_ERR_STRING_DATA_insert(int_error_hash,
  ------------------
  |  |  333|  4.85k|#define lh_ERR_STRING_DATA_insert(lh, ptr) ((ERR_STRING_DATA *)OPENSSL_LH_insert(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_ERR_STRING_DATA_lh_plain_type(ptr)))
  ------------------
  260|    107|            (ERR_STRING_DATA *)str);
  261|    107|    CRYPTO_THREAD_unlock(err_string_lock);
  262|    107|    return 1;
  263|    107|}
err.c:get_error_values:
  443|  1.52M|{
  444|  1.52M|    int i = 0;
  445|  1.52M|    ERR_STATE *es;
  446|  1.52M|    unsigned long ret;
  447|       |
  448|  1.52M|    es = ossl_err_get_state_int();
  449|  1.52M|    if (es == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 1.52M]
  ------------------
  450|      0|        return 0;
  451|       |
  452|       |    /*
  453|       |     * Clear anything that should have been cleared earlier. We do this
  454|       |     * here because this doesn't have constant-time issues.
  455|       |     */
  456|  1.52M|    while (es->bottom != es->top) {
  ------------------
  |  Branch (456:12): [True: 1.25M, False: 274k]
  ------------------
  457|  1.25M|        if (es->err_flags[es->top] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   16|  1.25M|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (457:13): [True: 0, False: 1.25M]
  ------------------
  458|      0|            err_clear(es, es->top, 0);
  459|      0|            es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|      0|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (459:23): [True: 0, False: 0]
  ------------------
  460|      0|            continue;
  461|      0|        }
  462|  1.25M|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|  1.25M|#define ERR_NUM_ERRORS 16
  ------------------
  463|  1.25M|        if (es->err_flags[i] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   16|  1.25M|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (463:13): [True: 0, False: 1.25M]
  ------------------
  464|      0|            es->bottom = i;
  465|      0|            err_clear(es, es->bottom, 0);
  466|      0|            continue;
  467|      0|        }
  468|  1.25M|        break;
  469|  1.25M|    }
  470|       |
  471|       |    /* If everything has been cleared, the stack is empty. */
  472|  1.52M|    if (es->bottom == es->top)
  ------------------
  |  Branch (472:9): [True: 274k, False: 1.25M]
  ------------------
  473|   274k|        return 0;
  474|       |
  475|       |    /* Which error, the top of stack (latest one) or the first one? */
  476|  1.25M|    if (g == EV_PEEK_LAST)
  ------------------
  |  Branch (476:9): [True: 1.24M, False: 6.98k]
  ------------------
  477|  1.24M|        i = es->top;
  478|  6.98k|    else
  479|  6.98k|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|  6.98k|#define ERR_NUM_ERRORS 16
  ------------------
  480|       |
  481|  1.25M|    ret = es->err_buffer[i];
  482|  1.25M|    if (g == EV_POP) {
  ------------------
  |  Branch (482:9): [True: 585, False: 1.25M]
  ------------------
  483|    585|        es->bottom = i;
  484|    585|        es->err_buffer[i] = 0;
  485|    585|    }
  486|       |
  487|  1.25M|    if (file != NULL) {
  ------------------
  |  Branch (487:9): [True: 0, False: 1.25M]
  ------------------
  488|      0|        *file = es->err_file[i];
  489|      0|        if (*file == NULL)
  ------------------
  |  Branch (489:13): [True: 0, False: 0]
  ------------------
  490|      0|            *file = "";
  491|      0|    }
  492|  1.25M|    if (line != NULL)
  ------------------
  |  Branch (492:9): [True: 0, False: 1.25M]
  ------------------
  493|      0|        *line = es->err_line[i];
  494|  1.25M|    if (func != NULL) {
  ------------------
  |  Branch (494:9): [True: 0, False: 1.25M]
  ------------------
  495|      0|        *func = es->err_func[i];
  496|      0|        if (*func == NULL)
  ------------------
  |  Branch (496:13): [True: 0, False: 0]
  ------------------
  497|      0|            *func = "";
  498|      0|    }
  499|  1.25M|    if (flags != NULL)
  ------------------
  |  Branch (499:9): [True: 0, False: 1.25M]
  ------------------
  500|      0|        *flags = es->err_data_flags[i];
  501|  1.25M|    if (data == NULL) {
  ------------------
  |  Branch (501:9): [True: 1.25M, False: 0]
  ------------------
  502|  1.25M|        if (g == EV_POP) {
  ------------------
  |  Branch (502:13): [True: 585, False: 1.25M]
  ------------------
  503|    585|            err_clear_data(es, i, 0);
  504|    585|        }
  505|  1.25M|    } else {
  506|      0|        *data = es->err_data[i];
  507|      0|        if (*data == NULL) {
  ------------------
  |  Branch (507:13): [True: 0, False: 0]
  ------------------
  508|      0|            *data = "";
  509|      0|            if (flags != NULL)
  ------------------
  |  Branch (509:17): [True: 0, False: 0]
  ------------------
  510|      0|                *flags = 0;
  511|      0|        }
  512|      0|    }
  513|  1.25M|    return ret;
  514|  1.52M|}
err.c:int_err_get_item:
  186|  1.43k|{
  187|  1.43k|    ERR_STRING_DATA *p = NULL;
  188|       |
  189|  1.43k|    if (!CRYPTO_THREAD_read_lock(err_string_lock))
  ------------------
  |  Branch (189:9): [True: 0, False: 1.43k]
  ------------------
  190|      0|        return NULL;
  191|  1.43k|    p = lh_ERR_STRING_DATA_retrieve(int_error_hash, d);
  ------------------
  |  |  335|  1.43k|#define lh_ERR_STRING_DATA_retrieve(lh, ptr) ((ERR_STRING_DATA *)OPENSSL_LH_retrieve(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_const_ERR_STRING_DATA_lh_plain_type(ptr)))
  ------------------
  192|  1.43k|    CRYPTO_THREAD_unlock(err_string_lock);
  193|       |
  194|  1.43k|    return p;
  195|  1.43k|}
err.c:err_set_error_data_int:
  753|  1.83k|{
  754|  1.83k|    ERR_STATE *es;
  755|       |
  756|  1.83k|    es = ossl_err_get_state_int();
  757|  1.83k|    if (es == NULL)
  ------------------
  |  Branch (757:9): [True: 0, False: 1.83k]
  ------------------
  758|      0|        return 0;
  759|       |
  760|  1.83k|    err_clear_data(es, es->top, deallocate);
  761|  1.83k|    err_set_data(es, es->top, data, size, flags);
  762|       |
  763|  1.83k|    return 1;
  764|  1.83k|}

ossl_err_load_crypto_strings:
   49|      1|{
   50|      1|    if (0
  ------------------
  |  Branch (50:9): [Folded, False: 1]
  ------------------
   51|      1|#ifndef OPENSSL_NO_ERR
   52|      1|        || ossl_err_load_ERR_strings() == 0 /* include error strings for SYSerr */
  ------------------
  |  Branch (52:12): [True: 0, False: 1]
  ------------------
   53|      1|        || ossl_err_load_BN_strings() == 0
  ------------------
  |  Branch (53:12): [True: 0, False: 1]
  ------------------
   54|      1|        || ossl_err_load_RSA_strings() == 0
  ------------------
  |  Branch (54:12): [True: 0, False: 1]
  ------------------
   55|      1|#ifndef OPENSSL_NO_DH
   56|      1|        || ossl_err_load_DH_strings() == 0
  ------------------
  |  Branch (56:12): [True: 0, False: 1]
  ------------------
   57|      1|#endif
   58|      1|        || ossl_err_load_EVP_strings() == 0
  ------------------
  |  Branch (58:12): [True: 0, False: 1]
  ------------------
   59|      1|        || ossl_err_load_BUF_strings() == 0
  ------------------
  |  Branch (59:12): [True: 0, False: 1]
  ------------------
   60|      1|        || ossl_err_load_OBJ_strings() == 0
  ------------------
  |  Branch (60:12): [True: 0, False: 1]
  ------------------
   61|      1|        || ossl_err_load_PEM_strings() == 0
  ------------------
  |  Branch (61:12): [True: 0, False: 1]
  ------------------
   62|      1|#ifndef OPENSSL_NO_DSA
   63|      1|        || ossl_err_load_DSA_strings() == 0
  ------------------
  |  Branch (63:12): [True: 0, False: 1]
  ------------------
   64|      1|#endif
   65|      1|        || ossl_err_load_X509_strings() == 0
  ------------------
  |  Branch (65:12): [True: 0, False: 1]
  ------------------
   66|      1|        || ossl_err_load_ASN1_strings() == 0
  ------------------
  |  Branch (66:12): [True: 0, False: 1]
  ------------------
   67|      1|        || ossl_err_load_CONF_strings() == 0
  ------------------
  |  Branch (67:12): [True: 0, False: 1]
  ------------------
   68|      1|        || ossl_err_load_CRYPTO_strings() == 0
  ------------------
  |  Branch (68:12): [True: 0, False: 1]
  ------------------
   69|      1|#ifndef OPENSSL_NO_COMP
   70|      1|        || ossl_err_load_COMP_strings() == 0
  ------------------
  |  Branch (70:12): [True: 0, False: 1]
  ------------------
   71|      1|#endif
   72|      1|#ifndef OPENSSL_NO_EC
   73|      1|        || ossl_err_load_EC_strings() == 0
  ------------------
  |  Branch (73:12): [True: 0, False: 1]
  ------------------
   74|      1|#endif
   75|       |        /* skip ossl_err_load_SSL_strings() because it is not in this library */
   76|      1|        || ossl_err_load_BIO_strings() == 0
  ------------------
  |  Branch (76:12): [True: 0, False: 1]
  ------------------
   77|      1|        || ossl_err_load_PKCS7_strings() == 0
  ------------------
  |  Branch (77:12): [True: 0, False: 1]
  ------------------
   78|      1|        || ossl_err_load_X509V3_strings() == 0
  ------------------
  |  Branch (78:12): [True: 0, False: 1]
  ------------------
   79|      1|        || ossl_err_load_PKCS12_strings() == 0
  ------------------
  |  Branch (79:12): [True: 0, False: 1]
  ------------------
   80|      1|        || ossl_err_load_RAND_strings() == 0
  ------------------
  |  Branch (80:12): [True: 0, False: 1]
  ------------------
   81|      1|        || ossl_err_load_DSO_strings() == 0
  ------------------
  |  Branch (81:12): [True: 0, False: 1]
  ------------------
   82|      1|#ifndef OPENSSL_NO_TS
   83|      1|        || ossl_err_load_TS_strings() == 0
  ------------------
  |  Branch (83:12): [True: 0, False: 1]
  ------------------
   84|      1|#endif
   85|      1|#ifndef OPENSSL_NO_HTTP
   86|      1|        || ossl_err_load_HTTP_strings() == 0
  ------------------
  |  Branch (86:12): [True: 0, False: 1]
  ------------------
   87|      1|#endif
   88|      1|#ifndef OPENSSL_NO_OCSP
   89|      1|        || ossl_err_load_OCSP_strings() == 0
  ------------------
  |  Branch (89:12): [True: 0, False: 1]
  ------------------
   90|      1|#endif
   91|      1|        || ossl_err_load_UI_strings() == 0
  ------------------
  |  Branch (91:12): [True: 0, False: 1]
  ------------------
   92|      1|#ifndef OPENSSL_NO_CMS
   93|      1|        || ossl_err_load_CMS_strings() == 0
  ------------------
  |  Branch (93:12): [True: 0, False: 1]
  ------------------
   94|      1|#endif
   95|      1|#ifndef OPENSSL_NO_CRMF
   96|      1|        || ossl_err_load_CRMF_strings() == 0
  ------------------
  |  Branch (96:12): [True: 0, False: 1]
  ------------------
   97|      1|        || ossl_err_load_CMP_strings() == 0
  ------------------
  |  Branch (97:12): [True: 0, False: 1]
  ------------------
   98|      1|#endif
   99|      1|#ifndef OPENSSL_NO_CT
  100|      1|        || ossl_err_load_CT_strings() == 0
  ------------------
  |  Branch (100:12): [True: 0, False: 1]
  ------------------
  101|      1|#endif
  102|      1|        || ossl_err_load_ESS_strings() == 0
  ------------------
  |  Branch (102:12): [True: 0, False: 1]
  ------------------
  103|      1|        || ossl_err_load_ASYNC_strings() == 0
  ------------------
  |  Branch (103:12): [True: 0, False: 1]
  ------------------
  104|      1|#ifndef OPENSSL_NO_SM2
  105|      1|        || ossl_err_load_SM2_strings() == 0
  ------------------
  |  Branch (105:12): [True: 0, False: 1]
  ------------------
  106|      1|#endif
  107|      1|        || ossl_err_load_OSSL_STORE_strings() == 0
  ------------------
  |  Branch (107:12): [True: 0, False: 1]
  ------------------
  108|      1|        || ossl_err_load_PROP_strings() == 0
  ------------------
  |  Branch (108:12): [True: 0, False: 1]
  ------------------
  109|      1|        || ossl_err_load_PROV_strings() == 0
  ------------------
  |  Branch (109:12): [True: 0, False: 1]
  ------------------
  110|      1|#endif
  111|      1|    )
  112|      0|        return 0;
  113|       |
  114|      1|    return 1;
  115|      1|}

ERR_new:
   15|  2.50M|{
   16|  2.50M|    ERR_STATE *es;
   17|       |
   18|  2.50M|    es = ossl_err_get_state_int();
   19|  2.50M|    if (es == NULL)
  ------------------
  |  Branch (19:9): [True: 0, False: 2.50M]
  ------------------
   20|      0|        return;
   21|       |
   22|       |    /* Allocate a slot */
   23|  2.50M|    err_get_slot(es);
   24|  2.50M|    err_clear(es, es->top, 0);
   25|  2.50M|}
ERR_set_debug:
   28|  2.50M|{
   29|  2.50M|    ERR_STATE *es;
   30|       |
   31|  2.50M|    es = ossl_err_get_state_int();
   32|  2.50M|    if (es == NULL)
  ------------------
  |  Branch (32:9): [True: 0, False: 2.50M]
  ------------------
   33|      0|        return;
   34|       |
   35|  2.50M|    err_set_debug(es, es->top, file, line, func);
   36|  2.50M|}
ERR_set_error:
   39|  2.50M|{
   40|  2.50M|    va_list args;
   41|       |
   42|  2.50M|    va_start(args, fmt);
   43|  2.50M|    ERR_vset_error(lib, reason, fmt, args);
   44|       |    va_end(args);
   45|  2.50M|}
ERR_vset_error:
   48|  2.50M|{
   49|  2.50M|    ERR_STATE *es;
   50|  2.50M|    char *buf = NULL;
   51|  2.50M|    size_t buf_size = 0;
   52|  2.50M|    unsigned long flags = 0;
   53|  2.50M|    size_t i;
   54|       |
   55|  2.50M|    es = ossl_err_get_state_int();
   56|  2.50M|    if (es == NULL)
  ------------------
  |  Branch (56:9): [True: 0, False: 2.50M]
  ------------------
   57|      0|        return;
   58|  2.50M|    i = es->top;
   59|       |
   60|  2.50M|    if (fmt != NULL) {
  ------------------
  |  Branch (60:9): [True: 101k, False: 2.40M]
  ------------------
   61|   101k|        int printed_len = 0;
   62|   101k|        char *rbuf = NULL;
   63|       |
   64|   101k|        buf = es->err_data[i];
   65|   101k|        buf_size = es->err_data_size[i];
   66|       |
   67|       |        /*
   68|       |         * To protect the string we just grabbed from tampering by other
   69|       |         * functions we may call, or to protect them from freeing a pointer
   70|       |         * that may no longer be valid at that point, we clear away the
   71|       |         * data pointer and the flags.  We will set them again at the end
   72|       |         * of this function.
   73|       |         */
   74|   101k|        es->err_data[i] = NULL;
   75|   101k|        es->err_data_flags[i] = 0;
   76|       |
   77|       |        /*
   78|       |         * Try to maximize the space available.  If that fails, we use what
   79|       |         * we have.
   80|       |         */
   81|   101k|        if (buf_size < ERR_MAX_DATA_SIZE
  ------------------
  |  |  348|   203k|#define ERR_MAX_DATA_SIZE 1024
  ------------------
  |  Branch (81:13): [True: 101k, False: 131]
  ------------------
   82|   101k|            && (rbuf = OPENSSL_realloc(buf, ERR_MAX_DATA_SIZE)) != NULL) {
  ------------------
  |  |  121|   101k|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (82:16): [True: 101k, False: 0]
  ------------------
   83|   101k|            buf = rbuf;
   84|   101k|            buf_size = ERR_MAX_DATA_SIZE;
  ------------------
  |  |  348|   101k|#define ERR_MAX_DATA_SIZE 1024
  ------------------
   85|   101k|        }
   86|       |
   87|   101k|        if (buf != NULL) {
  ------------------
  |  Branch (87:13): [True: 101k, False: 0]
  ------------------
   88|   101k|            printed_len = BIO_vsnprintf(buf, buf_size, fmt, args);
   89|   101k|        }
   90|   101k|        if (printed_len < 0)
  ------------------
  |  Branch (90:13): [True: 1.52k, False: 100k]
  ------------------
   91|  1.52k|            printed_len = 0;
   92|   101k|        if (buf != NULL)
  ------------------
  |  Branch (92:13): [True: 101k, False: 0]
  ------------------
   93|   101k|            buf[printed_len] = '\0';
   94|       |
   95|       |        /*
   96|       |         * Try to reduce the size, but only if we maximized above.  If that
   97|       |         * fails, we keep what we have.
   98|       |         * (According to documentation, realloc leaves the old buffer untouched
   99|       |         * if it fails)
  100|       |         */
  101|   101k|        if ((rbuf = OPENSSL_realloc(buf, printed_len + 1)) != NULL) {
  ------------------
  |  |  121|   101k|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (101:13): [True: 101k, False: 0]
  ------------------
  102|   101k|            buf = rbuf;
  103|   101k|            buf_size = printed_len + 1;
  104|   101k|            buf[printed_len] = '\0';
  105|   101k|        }
  106|       |
  107|   101k|        if (buf != NULL)
  ------------------
  |  Branch (107:13): [True: 101k, False: 0]
  ------------------
  108|   101k|            flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   50|   101k|#define ERR_TXT_MALLOCED 0x01
  ------------------
                          flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   51|   101k|#define ERR_TXT_STRING 0x02
  ------------------
  109|   101k|    }
  110|       |
  111|  2.50M|    err_clear_data(es, es->top, 0);
  112|  2.50M|    err_set_error(es, es->top, lib, reason);
  113|  2.50M|    if (fmt != NULL)
  ------------------
  |  Branch (113:9): [True: 101k, False: 2.40M]
  ------------------
  114|   101k|        err_set_data(es, es->top, buf, buf_size, flags);
  115|  2.50M|}

err.c:err_clear:
  103|  98.1k|{
  104|  98.1k|    err_clear_data(es, i, (deall));
  105|  98.1k|    es->err_marks[i] = 0;
  106|  98.1k|    es->err_flags[i] = 0;
  107|  98.1k|    es->err_buffer[i] = 0;
  108|  98.1k|    es->err_line[i] = -1;
  109|  98.1k|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  132|  98.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|  98.1k|    es->err_file[i] = NULL;
  111|  98.1k|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  132|  98.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |    es->err_func[i] = NULL;
  113|  98.1k|}
err.c:err_clear_data:
   39|   100k|{
   40|   100k|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   50|   100k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (40:9): [True: 100k, False: 1]
  ------------------
   41|   100k|        if (deall) {
  ------------------
  |  Branch (41:13): [True: 0, False: 100k]
  ------------------
   42|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|            es->err_data[i] = NULL;
   44|      0|            es->err_data_size[i] = 0;
   45|      0|            es->err_data_flags[i] = 0;
   46|   100k|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (46:20): [True: 100k, False: 0]
  ------------------
   47|   100k|            es->err_data[i][0] = '\0';
   48|   100k|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   50|   100k|#define ERR_TXT_MALLOCED 0x01
  ------------------
   49|   100k|        }
   50|   100k|    } else {
   51|       |        es->err_data[i] = NULL;
   52|      1|        es->err_data_size[i] = 0;
   53|      1|        es->err_data_flags[i] = 0;
   54|      1|    }
   55|   100k|}
err.c:err_set_data:
   94|  1.83k|{
   95|  1.83k|    if ((es->err_data_flags[i] & ERR_TXT_MALLOCED) != 0)
  ------------------
  |  |   50|  1.83k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (95:9): [True: 1.83k, False: 0]
  ------------------
   96|  1.83k|        OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|  1.83k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   97|  1.83k|    es->err_data[i] = data;
   98|  1.83k|    es->err_data_size[i] = datasz;
   99|  1.83k|    es->err_data_flags[i] = flags;
  100|  1.83k|}
err_blocks.c:err_get_slot:
   32|  2.50M|{
   33|  2.50M|    es->top = (es->top + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|  2.50M|#define ERR_NUM_ERRORS 16
  ------------------
   34|  2.50M|    if (es->top == es->bottom)
  ------------------
  |  Branch (34:9): [True: 3.65k, False: 2.50M]
  ------------------
   35|  3.65k|        es->bottom = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|  3.65k|#define ERR_NUM_ERRORS 16
  ------------------
   36|  2.50M|}
err_blocks.c:err_clear:
  103|  2.50M|{
  104|  2.50M|    err_clear_data(es, i, (deall));
  105|  2.50M|    es->err_marks[i] = 0;
  106|  2.50M|    es->err_flags[i] = 0;
  107|  2.50M|    es->err_buffer[i] = 0;
  108|  2.50M|    es->err_line[i] = -1;
  109|  2.50M|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  132|  2.50M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|  2.50M|    es->err_file[i] = NULL;
  111|  2.50M|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  132|  2.50M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |    es->err_func[i] = NULL;
  113|  2.50M|}
err_blocks.c:err_set_debug:
   68|  2.50M|{
   69|       |    /*
   70|       |     * We dup the file and fn strings because they may be provider owned. If the
   71|       |     * provider gets unloaded, they may not be valid anymore.
   72|       |     */
   73|  2.50M|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  132|  2.50M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|  2.50M|    if (file == NULL || file[0] == '\0')
  ------------------
  |  Branch (74:9): [True: 0, False: 2.50M]
  |  Branch (74:25): [True: 0, False: 2.50M]
  ------------------
   75|      0|        es->err_file[i] = NULL;
   76|  2.50M|    else if ((es->err_file[i] = CRYPTO_malloc(strlen(file) + 1,
  ------------------
  |  Branch (76:14): [True: 2.50M, False: 0]
  ------------------
   77|  2.50M|                  NULL, 0))
   78|  2.50M|        != NULL)
   79|       |        /* We cannot use OPENSSL_strdup due to possible recursion */
   80|  2.50M|        strcpy(es->err_file[i], file);
   81|       |
   82|  2.50M|    es->err_line[i] = line;
   83|  2.50M|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  132|  2.50M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|  2.50M|    if (fn == NULL || fn[0] == '\0')
  ------------------
  |  Branch (84:9): [True: 2.07k, False: 2.50M]
  |  Branch (84:23): [True: 0, False: 2.50M]
  ------------------
   85|  2.07k|        es->err_func[i] = NULL;
   86|  2.50M|    else if ((es->err_func[i] = CRYPTO_malloc(strlen(fn) + 1,
  ------------------
  |  Branch (86:14): [True: 2.50M, False: 0]
  ------------------
   87|  2.50M|                  NULL, 0))
   88|  2.50M|        != NULL)
   89|  2.50M|        strcpy(es->err_func[i], fn);
   90|  2.50M|}
err_blocks.c:err_clear_data:
   39|  5.01M|{
   40|  5.01M|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   50|  5.01M|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (40:9): [True: 4.91M, False: 101k]
  ------------------
   41|  4.91M|        if (deall) {
  ------------------
  |  Branch (41:13): [True: 0, False: 4.91M]
  ------------------
   42|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|            es->err_data[i] = NULL;
   44|      0|            es->err_data_size[i] = 0;
   45|      0|            es->err_data_flags[i] = 0;
   46|  4.91M|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (46:20): [True: 4.91M, False: 0]
  ------------------
   47|  4.91M|            es->err_data[i][0] = '\0';
   48|  4.91M|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   50|  4.91M|#define ERR_TXT_MALLOCED 0x01
  ------------------
   49|  4.91M|        }
   50|  4.91M|    } else {
   51|       |        es->err_data[i] = NULL;
   52|   101k|        es->err_data_size[i] = 0;
   53|   101k|        es->err_data_flags[i] = 0;
   54|   101k|    }
   55|  5.01M|}
err_blocks.c:err_set_error:
   59|  2.50M|{
   60|  2.50M|    es->err_buffer[i] = lib == ERR_LIB_SYS
  ------------------
  |  |   55|  2.50M|#define ERR_LIB_SYS 2
  ------------------
  |  Branch (60:25): [True: 1.15k, False: 2.50M]
  ------------------
   61|  2.50M|        ? (unsigned int)(ERR_SYSTEM_FLAG | reason)
  ------------------
  |  |  201|  1.15k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  ------------------
   62|  2.50M|        : ERR_PACK(lib, 0, reason);
  ------------------
  |  |  262|  5.01M|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|  2.50M|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|  2.50M|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|  2.50M|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
   63|  2.50M|}
err_blocks.c:err_set_data:
   94|   101k|{
   95|   101k|    if ((es->err_data_flags[i] & ERR_TXT_MALLOCED) != 0)
  ------------------
  |  |   50|   101k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (95:9): [True: 0, False: 101k]
  ------------------
   96|      0|        OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   97|   101k|    es->err_data[i] = data;
   98|   101k|    es->err_data_size[i] = datasz;
   99|   101k|    es->err_data_flags[i] = flags;
  100|   101k|}
err_mark.c:err_clear:
  103|  2.49M|{
  104|  2.49M|    err_clear_data(es, i, (deall));
  105|  2.49M|    es->err_marks[i] = 0;
  106|  2.49M|    es->err_flags[i] = 0;
  107|  2.49M|    es->err_buffer[i] = 0;
  108|  2.49M|    es->err_line[i] = -1;
  109|  2.49M|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  132|  2.49M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|  2.49M|    es->err_file[i] = NULL;
  111|  2.49M|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  132|  2.49M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |    es->err_func[i] = NULL;
  113|  2.49M|}
err_mark.c:err_clear_data:
   39|  2.49M|{
   40|  2.49M|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   50|  2.49M|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (40:9): [True: 2.49M, False: 2]
  ------------------
   41|  2.49M|        if (deall) {
  ------------------
  |  Branch (41:13): [True: 0, False: 2.49M]
  ------------------
   42|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|            es->err_data[i] = NULL;
   44|      0|            es->err_data_size[i] = 0;
   45|      0|            es->err_data_flags[i] = 0;
   46|  2.49M|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (46:20): [True: 2.49M, False: 0]
  ------------------
   47|  2.49M|            es->err_data[i][0] = '\0';
   48|  2.49M|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   50|  2.49M|#define ERR_TXT_MALLOCED 0x01
  ------------------
   49|  2.49M|        }
   50|  2.49M|    } else {
   51|       |        es->err_data[i] = NULL;
   52|      2|        es->err_data_size[i] = 0;
   53|      2|        es->err_data_flags[i] = 0;
   54|      2|    }
   55|  2.49M|}

ERR_set_mark:
   14|  7.62M|{
   15|  7.62M|    ERR_STATE *es;
   16|       |
   17|  7.62M|    es = ossl_err_get_state_int();
   18|  7.62M|    if (es == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 7.62M]
  ------------------
   19|      0|        return 0;
   20|       |
   21|  7.62M|    if (es->bottom == es->top)
  ------------------
  |  Branch (21:9): [True: 3.82M, False: 3.80M]
  ------------------
   22|  3.82M|        return 0;
   23|  3.80M|    es->err_marks[es->top]++;
   24|  3.80M|    return 1;
   25|  7.62M|}
ERR_pop_to_mark:
   41|  5.09M|{
   42|  5.09M|    ERR_STATE *es;
   43|       |
   44|  5.09M|    es = ossl_err_get_state_int();
   45|  5.09M|    if (es == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 5.09M]
  ------------------
   46|      0|        return 0;
   47|       |
   48|  7.59M|    while (es->bottom != es->top
  ------------------
  |  Branch (48:12): [True: 5.15M, False: 2.44M]
  ------------------
   49|  5.15M|        && es->err_marks[es->top] == 0) {
  ------------------
  |  Branch (49:12): [True: 2.49M, False: 2.65M]
  ------------------
   50|  2.49M|        err_clear(es, es->top, 0);
   51|  2.49M|        es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|    352|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (51:19): [True: 2.49M, False: 352]
  ------------------
   52|  2.49M|    }
   53|       |
   54|  5.09M|    if (es->bottom == es->top)
  ------------------
  |  Branch (54:9): [True: 2.44M, False: 2.65M]
  ------------------
   55|  2.44M|        return 0;
   56|  2.65M|    es->err_marks[es->top]--;
   57|  2.65M|    return 1;
   58|  5.09M|}
ERR_count_to_mark:
   61|    596|{
   62|    596|    ERR_STATE *es;
   63|    596|    int count = 0, top;
   64|       |
   65|    596|    es = ossl_err_get_state_int();
   66|    596|    if (es == NULL)
  ------------------
  |  Branch (66:9): [True: 0, False: 596]
  ------------------
   67|      0|        return 0;
   68|       |
   69|    596|    top = es->top;
   70|    596|    while (es->bottom != top
  ------------------
  |  Branch (70:12): [True: 595, False: 1]
  ------------------
   71|    595|        && es->err_marks[top] == 0) {
  ------------------
  |  Branch (71:12): [True: 0, False: 595]
  ------------------
   72|      0|        ++count;
   73|      0|        top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|      0|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (73:15): [True: 0, False: 0]
  ------------------
   74|      0|    }
   75|       |
   76|    596|    return count;
   77|    596|}
ERR_clear_last_mark:
   80|  2.53M|{
   81|  2.53M|    ERR_STATE *es;
   82|  2.53M|    int top;
   83|       |
   84|  2.53M|    es = ossl_err_get_state_int();
   85|  2.53M|    if (es == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 2.53M]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  2.53M|    top = es->top;
   89|  2.53M|    while (es->bottom != top
  ------------------
  |  Branch (89:12): [True: 1.15M, False: 1.38M]
  ------------------
   90|  1.15M|        && es->err_marks[top] == 0) {
  ------------------
  |  Branch (90:12): [True: 2.42k, False: 1.14M]
  ------------------
   91|  2.42k|        top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|     22|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (91:15): [True: 2.40k, False: 22]
  ------------------
   92|  2.42k|    }
   93|       |
   94|  2.53M|    if (es->bottom == top)
  ------------------
  |  Branch (94:9): [True: 1.38M, False: 1.14M]
  ------------------
   95|  1.38M|        return 0;
   96|  1.14M|    es->err_marks[top]--;
   97|  1.14M|    return 1;
   98|  2.53M|}

OSSL_ERR_STATE_new:
   20|      1|{
   21|       |    return CRYPTO_zalloc(sizeof(ERR_STATE), NULL, 0);
   22|      1|}

ossl_err_load_ESS_strings:
   42|      1|{
   43|      1|#ifndef OPENSSL_NO_ERR
   44|      1|    if (ERR_reason_error_string(ESS_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (44:9): [True: 1, False: 0]
  ------------------
   45|      1|        ERR_load_strings_const(ESS_str_reasons);
   46|      1|#endif
   47|      1|    return 1;
   48|      1|}

openssl_add_all_ciphers_int:
   18|      1|{
   19|       |
   20|      1|#ifndef OPENSSL_NO_DES
   21|      1|    EVP_add_cipher(EVP_des_cfb());
  ------------------
  |  |  901|      1|#define EVP_des_cfb EVP_des_cfb64
  ------------------
   22|      1|    EVP_add_cipher(EVP_des_cfb1());
   23|      1|    EVP_add_cipher(EVP_des_cfb8());
   24|      1|    EVP_add_cipher(EVP_des_ede_cfb());
  ------------------
  |  |  905|      1|#define EVP_des_ede_cfb EVP_des_ede_cfb64
  ------------------
   25|      1|    EVP_add_cipher(EVP_des_ede3_cfb());
  ------------------
  |  |  907|      1|#define EVP_des_ede3_cfb EVP_des_ede3_cfb64
  ------------------
   26|      1|    EVP_add_cipher(EVP_des_ede3_cfb1());
   27|      1|    EVP_add_cipher(EVP_des_ede3_cfb8());
   28|       |
   29|      1|    EVP_add_cipher(EVP_des_ofb());
   30|      1|    EVP_add_cipher(EVP_des_ede_ofb());
   31|      1|    EVP_add_cipher(EVP_des_ede3_ofb());
   32|       |
   33|      1|    EVP_add_cipher(EVP_desx_cbc());
   34|      1|    EVP_add_cipher_alias(SN_desx_cbc, "DESX");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   35|      1|    EVP_add_cipher_alias(SN_desx_cbc, "desx");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   36|       |
   37|      1|    EVP_add_cipher(EVP_des_cbc());
   38|      1|    EVP_add_cipher_alias(SN_des_cbc, "DES");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   39|      1|    EVP_add_cipher_alias(SN_des_cbc, "des");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   40|      1|    EVP_add_cipher(EVP_des_ede_cbc());
   41|      1|    EVP_add_cipher(EVP_des_ede3_cbc());
   42|      1|    EVP_add_cipher_alias(SN_des_ede3_cbc, "DES3");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   43|      1|    EVP_add_cipher_alias(SN_des_ede3_cbc, "des3");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   44|       |
   45|      1|    EVP_add_cipher(EVP_des_ecb());
   46|      1|    EVP_add_cipher(EVP_des_ede());
   47|      1|    EVP_add_cipher_alias(SN_des_ede_ecb, "DES-EDE-ECB");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   48|      1|    EVP_add_cipher_alias(SN_des_ede_ecb, "des-ede-ecb");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   49|      1|    EVP_add_cipher(EVP_des_ede3());
   50|      1|    EVP_add_cipher_alias(SN_des_ede3_ecb, "DES-EDE3-ECB");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   51|      1|    EVP_add_cipher_alias(SN_des_ede3_ecb, "des-ede3-ecb");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   52|      1|    EVP_add_cipher(EVP_des_ede3_wrap());
   53|      1|    EVP_add_cipher_alias(SN_id_smime_alg_CMS3DESwrap, "des3-wrap");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   54|      1|#endif
   55|       |
   56|      1|#ifndef OPENSSL_NO_RC4
   57|      1|    EVP_add_cipher(EVP_rc4());
   58|      1|    EVP_add_cipher(EVP_rc4_40());
   59|      1|#ifndef OPENSSL_NO_MD5
   60|      1|    EVP_add_cipher(EVP_rc4_hmac_md5());
   61|      1|#endif
   62|      1|#endif
   63|       |
   64|      1|#ifndef OPENSSL_NO_IDEA
   65|      1|    EVP_add_cipher(EVP_idea_ecb());
   66|      1|    EVP_add_cipher(EVP_idea_cfb());
  ------------------
  |  |  934|      1|#define EVP_idea_cfb EVP_idea_cfb64
  ------------------
   67|      1|    EVP_add_cipher(EVP_idea_ofb());
   68|      1|    EVP_add_cipher(EVP_idea_cbc());
   69|      1|    EVP_add_cipher_alias(SN_idea_cbc, "IDEA");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   70|      1|    EVP_add_cipher_alias(SN_idea_cbc, "idea");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   71|      1|#endif
   72|       |
   73|      1|#ifndef OPENSSL_NO_SEED
   74|      1|    EVP_add_cipher(EVP_seed_ecb());
   75|      1|    EVP_add_cipher(EVP_seed_cfb());
  ------------------
  |  | 1088|      1|#define EVP_seed_cfb EVP_seed_cfb128
  ------------------
   76|      1|    EVP_add_cipher(EVP_seed_ofb());
   77|      1|    EVP_add_cipher(EVP_seed_cbc());
   78|      1|    EVP_add_cipher_alias(SN_seed_cbc, "SEED");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   79|      1|    EVP_add_cipher_alias(SN_seed_cbc, "seed");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   80|      1|#endif
   81|       |
   82|      1|#ifndef OPENSSL_NO_SM4
   83|      1|    EVP_add_cipher(EVP_sm4_ecb());
   84|      1|    EVP_add_cipher(EVP_sm4_cbc());
   85|      1|    EVP_add_cipher(EVP_sm4_cfb());
  ------------------
  |  | 1096|      1|#define EVP_sm4_cfb EVP_sm4_cfb128
  ------------------
   86|      1|    EVP_add_cipher(EVP_sm4_ofb());
   87|      1|    EVP_add_cipher(EVP_sm4_ctr());
   88|      1|    EVP_add_cipher_alias(SN_sm4_cbc, "SM4");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   89|      1|    EVP_add_cipher_alias(SN_sm4_cbc, "sm4");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   90|      1|#endif
   91|       |
   92|      1|#ifndef OPENSSL_NO_RC2
   93|      1|    EVP_add_cipher(EVP_rc2_ecb());
   94|      1|    EVP_add_cipher(EVP_rc2_cfb());
  ------------------
  |  |  944|      1|#define EVP_rc2_cfb EVP_rc2_cfb64
  ------------------
   95|      1|    EVP_add_cipher(EVP_rc2_ofb());
   96|      1|    EVP_add_cipher(EVP_rc2_cbc());
   97|      1|    EVP_add_cipher(EVP_rc2_40_cbc());
   98|      1|    EVP_add_cipher(EVP_rc2_64_cbc());
   99|      1|    EVP_add_cipher_alias(SN_rc2_cbc, "RC2");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  100|      1|    EVP_add_cipher_alias(SN_rc2_cbc, "rc2");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  101|      1|    EVP_add_cipher_alias(SN_rc2_cbc, "rc2-128");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  102|      1|    EVP_add_cipher_alias(SN_rc2_64_cbc, "rc2-64");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  103|      1|    EVP_add_cipher_alias(SN_rc2_40_cbc, "rc2-40");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  104|      1|#endif
  105|       |
  106|      1|#ifndef OPENSSL_NO_BF
  107|      1|    EVP_add_cipher(EVP_bf_ecb());
  108|      1|    EVP_add_cipher(EVP_bf_cfb());
  ------------------
  |  |  951|      1|#define EVP_bf_cfb EVP_bf_cfb64
  ------------------
  109|      1|    EVP_add_cipher(EVP_bf_ofb());
  110|      1|    EVP_add_cipher(EVP_bf_cbc());
  111|      1|    EVP_add_cipher_alias(SN_bf_cbc, "BF");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  112|      1|    EVP_add_cipher_alias(SN_bf_cbc, "bf");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  113|      1|    EVP_add_cipher_alias(SN_bf_cbc, "blowfish");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  114|      1|#endif
  115|       |
  116|      1|#ifndef OPENSSL_NO_CAST
  117|      1|    EVP_add_cipher(EVP_cast5_ecb());
  118|      1|    EVP_add_cipher(EVP_cast5_cfb());
  ------------------
  |  |  958|      1|#define EVP_cast5_cfb EVP_cast5_cfb64
  ------------------
  119|      1|    EVP_add_cipher(EVP_cast5_ofb());
  120|      1|    EVP_add_cipher(EVP_cast5_cbc());
  121|      1|    EVP_add_cipher_alias(SN_cast5_cbc, "CAST");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  122|      1|    EVP_add_cipher_alias(SN_cast5_cbc, "cast");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  123|      1|    EVP_add_cipher_alias(SN_cast5_cbc, "CAST-cbc");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  124|      1|    EVP_add_cipher_alias(SN_cast5_cbc, "cast-cbc");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  125|      1|#endif
  126|       |
  127|      1|#ifndef OPENSSL_NO_RC5
  128|      1|    EVP_add_cipher(EVP_rc5_32_12_16_ecb());
  129|      1|    EVP_add_cipher(EVP_rc5_32_12_16_cfb());
  ------------------
  |  |  965|      1|#define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64
  ------------------
  130|      1|    EVP_add_cipher(EVP_rc5_32_12_16_ofb());
  131|      1|    EVP_add_cipher(EVP_rc5_32_12_16_cbc());
  132|      1|    EVP_add_cipher_alias(SN_rc5_cbc, "rc5");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  133|      1|    EVP_add_cipher_alias(SN_rc5_cbc, "RC5");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  134|      1|#endif
  135|       |
  136|      1|    EVP_add_cipher(EVP_aes_128_ecb());
  137|      1|    EVP_add_cipher(EVP_aes_128_cbc());
  138|      1|    EVP_add_cipher(EVP_aes_128_cfb());
  ------------------
  |  |  973|      1|#define EVP_aes_128_cfb EVP_aes_128_cfb128
  ------------------
  139|      1|    EVP_add_cipher(EVP_aes_128_cfb1());
  140|      1|    EVP_add_cipher(EVP_aes_128_cfb8());
  141|      1|    EVP_add_cipher(EVP_aes_128_ofb());
  142|      1|    EVP_add_cipher(EVP_aes_128_ctr());
  143|      1|    EVP_add_cipher(EVP_aes_128_gcm());
  144|      1|#ifndef OPENSSL_NO_OCB
  145|      1|    EVP_add_cipher(EVP_aes_128_ocb());
  146|      1|#endif
  147|      1|    EVP_add_cipher(EVP_aes_128_xts());
  148|      1|    EVP_add_cipher(EVP_aes_128_ccm());
  149|      1|    EVP_add_cipher(EVP_aes_128_wrap());
  150|      1|    EVP_add_cipher_alias(SN_id_aes128_wrap, "aes128-wrap");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  151|      1|    EVP_add_cipher(EVP_aes_128_wrap_pad());
  152|      1|    EVP_add_cipher_alias(SN_id_aes128_wrap_pad, "aes128-wrap-pad");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  153|      1|    EVP_add_cipher_alias(SN_aes_128_cbc, "AES128");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  154|      1|    EVP_add_cipher_alias(SN_aes_128_cbc, "aes128");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  155|      1|    EVP_add_cipher(EVP_aes_192_ecb());
  156|      1|    EVP_add_cipher(EVP_aes_192_cbc());
  157|      1|    EVP_add_cipher(EVP_aes_192_cfb());
  ------------------
  |  |  989|      1|#define EVP_aes_192_cfb EVP_aes_192_cfb128
  ------------------
  158|      1|    EVP_add_cipher(EVP_aes_192_cfb1());
  159|      1|    EVP_add_cipher(EVP_aes_192_cfb8());
  160|      1|    EVP_add_cipher(EVP_aes_192_ofb());
  161|      1|    EVP_add_cipher(EVP_aes_192_ctr());
  162|      1|    EVP_add_cipher(EVP_aes_192_gcm());
  163|      1|#ifndef OPENSSL_NO_OCB
  164|      1|    EVP_add_cipher(EVP_aes_192_ocb());
  165|      1|#endif
  166|      1|    EVP_add_cipher(EVP_aes_192_ccm());
  167|      1|    EVP_add_cipher(EVP_aes_192_wrap());
  168|      1|    EVP_add_cipher_alias(SN_id_aes192_wrap, "aes192-wrap");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  169|      1|    EVP_add_cipher(EVP_aes_192_wrap_pad());
  170|      1|    EVP_add_cipher_alias(SN_id_aes192_wrap_pad, "aes192-wrap-pad");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  171|      1|    EVP_add_cipher_alias(SN_aes_192_cbc, "AES192");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  172|      1|    EVP_add_cipher_alias(SN_aes_192_cbc, "aes192");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  173|      1|    EVP_add_cipher(EVP_aes_256_ecb());
  174|      1|    EVP_add_cipher(EVP_aes_256_cbc());
  175|      1|    EVP_add_cipher(EVP_aes_256_cfb());
  ------------------
  |  | 1004|      1|#define EVP_aes_256_cfb EVP_aes_256_cfb128
  ------------------
  176|      1|    EVP_add_cipher(EVP_aes_256_cfb1());
  177|      1|    EVP_add_cipher(EVP_aes_256_cfb8());
  178|      1|    EVP_add_cipher(EVP_aes_256_ofb());
  179|      1|    EVP_add_cipher(EVP_aes_256_ctr());
  180|      1|    EVP_add_cipher(EVP_aes_256_gcm());
  181|      1|#ifndef OPENSSL_NO_OCB
  182|      1|    EVP_add_cipher(EVP_aes_256_ocb());
  183|      1|#endif
  184|      1|    EVP_add_cipher(EVP_aes_256_xts());
  185|      1|    EVP_add_cipher(EVP_aes_256_ccm());
  186|      1|    EVP_add_cipher(EVP_aes_256_wrap());
  187|      1|    EVP_add_cipher_alias(SN_id_aes256_wrap, "aes256-wrap");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  188|      1|    EVP_add_cipher(EVP_aes_256_wrap_pad());
  189|      1|    EVP_add_cipher_alias(SN_id_aes256_wrap_pad, "aes256-wrap-pad");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  190|      1|    EVP_add_cipher_alias(SN_aes_256_cbc, "AES256");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  191|      1|    EVP_add_cipher_alias(SN_aes_256_cbc, "aes256");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  192|      1|    EVP_add_cipher(EVP_aes_128_cbc_hmac_sha1());
  193|      1|    EVP_add_cipher(EVP_aes_256_cbc_hmac_sha1());
  194|      1|    EVP_add_cipher(EVP_aes_128_cbc_hmac_sha256());
  195|      1|    EVP_add_cipher(EVP_aes_256_cbc_hmac_sha256());
  196|      1|#ifndef OPENSSL_NO_ARIA
  197|      1|    EVP_add_cipher(EVP_aria_128_ecb());
  198|      1|    EVP_add_cipher(EVP_aria_128_cbc());
  199|      1|    EVP_add_cipher(EVP_aria_128_cfb());
  ------------------
  |  | 1025|      1|#define EVP_aria_128_cfb EVP_aria_128_cfb128
  ------------------
  200|      1|    EVP_add_cipher(EVP_aria_128_cfb1());
  201|      1|    EVP_add_cipher(EVP_aria_128_cfb8());
  202|      1|    EVP_add_cipher(EVP_aria_128_ctr());
  203|      1|    EVP_add_cipher(EVP_aria_128_ofb());
  204|      1|    EVP_add_cipher(EVP_aria_128_gcm());
  205|      1|    EVP_add_cipher(EVP_aria_128_ccm());
  206|      1|    EVP_add_cipher_alias(SN_aria_128_cbc, "ARIA128");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  207|      1|    EVP_add_cipher_alias(SN_aria_128_cbc, "aria128");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  208|      1|    EVP_add_cipher(EVP_aria_192_ecb());
  209|      1|    EVP_add_cipher(EVP_aria_192_cbc());
  210|      1|    EVP_add_cipher(EVP_aria_192_cfb());
  ------------------
  |  | 1035|      1|#define EVP_aria_192_cfb EVP_aria_192_cfb128
  ------------------
  211|      1|    EVP_add_cipher(EVP_aria_192_cfb1());
  212|      1|    EVP_add_cipher(EVP_aria_192_cfb8());
  213|      1|    EVP_add_cipher(EVP_aria_192_ctr());
  214|      1|    EVP_add_cipher(EVP_aria_192_ofb());
  215|      1|    EVP_add_cipher(EVP_aria_192_gcm());
  216|      1|    EVP_add_cipher(EVP_aria_192_ccm());
  217|      1|    EVP_add_cipher_alias(SN_aria_192_cbc, "ARIA192");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  218|      1|    EVP_add_cipher_alias(SN_aria_192_cbc, "aria192");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  219|      1|    EVP_add_cipher(EVP_aria_256_ecb());
  220|      1|    EVP_add_cipher(EVP_aria_256_cbc());
  221|      1|    EVP_add_cipher(EVP_aria_256_cfb());
  ------------------
  |  | 1045|      1|#define EVP_aria_256_cfb EVP_aria_256_cfb128
  ------------------
  222|      1|    EVP_add_cipher(EVP_aria_256_cfb1());
  223|      1|    EVP_add_cipher(EVP_aria_256_cfb8());
  224|      1|    EVP_add_cipher(EVP_aria_256_ctr());
  225|      1|    EVP_add_cipher(EVP_aria_256_ofb());
  226|      1|    EVP_add_cipher(EVP_aria_256_gcm());
  227|      1|    EVP_add_cipher(EVP_aria_256_ccm());
  228|      1|    EVP_add_cipher_alias(SN_aria_256_cbc, "ARIA256");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  229|      1|    EVP_add_cipher_alias(SN_aria_256_cbc, "aria256");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  230|      1|#endif
  231|       |
  232|      1|#ifndef OPENSSL_NO_CAMELLIA
  233|      1|    EVP_add_cipher(EVP_camellia_128_ecb());
  234|      1|    EVP_add_cipher(EVP_camellia_128_cbc());
  235|      1|    EVP_add_cipher(EVP_camellia_128_cfb());
  ------------------
  |  | 1057|      1|#define EVP_camellia_128_cfb EVP_camellia_128_cfb128
  ------------------
  236|      1|    EVP_add_cipher(EVP_camellia_128_cfb1());
  237|      1|    EVP_add_cipher(EVP_camellia_128_cfb8());
  238|      1|    EVP_add_cipher(EVP_camellia_128_ofb());
  239|      1|    EVP_add_cipher_alias(SN_camellia_128_cbc, "CAMELLIA128");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  240|      1|    EVP_add_cipher_alias(SN_camellia_128_cbc, "camellia128");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  241|      1|    EVP_add_cipher(EVP_camellia_192_ecb());
  242|      1|    EVP_add_cipher(EVP_camellia_192_cbc());
  243|      1|    EVP_add_cipher(EVP_camellia_192_cfb());
  ------------------
  |  | 1065|      1|#define EVP_camellia_192_cfb EVP_camellia_192_cfb128
  ------------------
  244|      1|    EVP_add_cipher(EVP_camellia_192_cfb1());
  245|      1|    EVP_add_cipher(EVP_camellia_192_cfb8());
  246|      1|    EVP_add_cipher(EVP_camellia_192_ofb());
  247|      1|    EVP_add_cipher_alias(SN_camellia_192_cbc, "CAMELLIA192");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  248|      1|    EVP_add_cipher_alias(SN_camellia_192_cbc, "camellia192");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  249|      1|    EVP_add_cipher(EVP_camellia_256_ecb());
  250|      1|    EVP_add_cipher(EVP_camellia_256_cbc());
  251|      1|    EVP_add_cipher(EVP_camellia_256_cfb());
  ------------------
  |  | 1073|      1|#define EVP_camellia_256_cfb EVP_camellia_256_cfb128
  ------------------
  252|      1|    EVP_add_cipher(EVP_camellia_256_cfb1());
  253|      1|    EVP_add_cipher(EVP_camellia_256_cfb8());
  254|      1|    EVP_add_cipher(EVP_camellia_256_ofb());
  255|      1|    EVP_add_cipher_alias(SN_camellia_256_cbc, "CAMELLIA256");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  256|      1|    EVP_add_cipher_alias(SN_camellia_256_cbc, "camellia256");
  ------------------
  |  |  601|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_CIPHER_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
  257|      1|    EVP_add_cipher(EVP_camellia_128_ctr());
  258|      1|    EVP_add_cipher(EVP_camellia_192_ctr());
  259|      1|    EVP_add_cipher(EVP_camellia_256_ctr());
  260|      1|#endif
  261|       |
  262|      1|#ifndef OPENSSL_NO_CHACHA
  263|      1|    EVP_add_cipher(EVP_chacha20());
  264|      1|#ifndef OPENSSL_NO_POLY1305
  265|      1|    EVP_add_cipher(EVP_chacha20_poly1305());
  266|      1|#endif
  267|      1|#endif
  268|      1|}

openssl_add_all_digests_int:
   18|      1|{
   19|      1|#ifndef OPENSSL_NO_MD4
   20|      1|    EVP_add_digest(EVP_md4());
   21|      1|#endif
   22|      1|#ifndef OPENSSL_NO_MD5
   23|      1|    EVP_add_digest(EVP_md5());
   24|      1|    EVP_add_digest_alias(SN_md5, "ssl3-md5");
  ------------------
  |  |  603|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   25|      1|#define OBJ_NAME_TYPE_MD_METH 0x01
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   25|      1|    EVP_add_digest(EVP_md5_sha1());
   26|      1|#endif
   27|      1|    EVP_add_digest(EVP_sha1());
   28|      1|    EVP_add_digest_alias(SN_sha1, "ssl3-sha1");
  ------------------
  |  |  603|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   25|      1|#define OBJ_NAME_TYPE_MD_METH 0x01
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   29|      1|    EVP_add_digest_alias(SN_sha1WithRSAEncryption, SN_sha1WithRSA);
  ------------------
  |  |  603|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   25|      1|#define OBJ_NAME_TYPE_MD_METH 0x01
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   30|      1|#if !defined(OPENSSL_NO_MDC2) && !defined(OPENSSL_NO_DES)
   31|      1|    EVP_add_digest(EVP_mdc2());
   32|      1|#endif
   33|      1|#ifndef OPENSSL_NO_RMD160
   34|      1|    EVP_add_digest(EVP_ripemd160());
   35|      1|    EVP_add_digest_alias(SN_ripemd160, "ripemd");
  ------------------
  |  |  603|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   25|      1|#define OBJ_NAME_TYPE_MD_METH 0x01
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   36|      1|    EVP_add_digest_alias(SN_ripemd160, "rmd160");
  ------------------
  |  |  603|      1|    OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   25|      1|#define OBJ_NAME_TYPE_MD_METH 0x01
  |  |  ------------------
  |  |                   OBJ_NAME_add((alias), OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, (n))
  |  |  ------------------
  |  |  |  |   33|      1|#define OBJ_NAME_ALIAS 0x8000
  |  |  ------------------
  ------------------
   37|      1|#endif
   38|      1|    EVP_add_digest(EVP_sha224());
   39|      1|    EVP_add_digest(EVP_sha256());
   40|      1|    EVP_add_digest(EVP_sha384());
   41|      1|    EVP_add_digest(EVP_sha512());
   42|      1|    EVP_add_digest(EVP_sha512_224());
   43|      1|    EVP_add_digest(EVP_sha512_256());
   44|      1|#ifndef OPENSSL_NO_WHIRLPOOL
   45|      1|    EVP_add_digest(EVP_whirlpool());
   46|      1|#endif
   47|      1|#ifndef OPENSSL_NO_SM3
   48|      1|    EVP_add_digest(EVP_sm3());
   49|      1|#endif
   50|      1|#ifndef OPENSSL_NO_BLAKE2
   51|      1|    EVP_add_digest(EVP_blake2b512());
   52|      1|    EVP_add_digest(EVP_blake2s256());
   53|      1|#endif
   54|      1|    EVP_add_digest(EVP_sha3_224());
   55|      1|    EVP_add_digest(EVP_sha3_256());
   56|      1|    EVP_add_digest(EVP_sha3_384());
   57|      1|    EVP_add_digest(EVP_sha3_512());
   58|      1|    EVP_add_digest(EVP_shake128());
   59|      1|    EVP_add_digest(EVP_shake256());
   60|      1|}

evp_md_ctx_clear_digest:
   27|   456k|{
   28|   456k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (28:9): [True: 456k, False: 0]
  ------------------
   29|   456k|        if (ctx->digest != NULL && ctx->digest->freectx != NULL)
  ------------------
  |  Branch (29:13): [True: 456k, False: 0]
  |  Branch (29:36): [True: 456k, False: 0]
  ------------------
   30|   456k|            ctx->digest->freectx(ctx->algctx);
   31|   456k|        ctx->algctx = NULL;
   32|   456k|        EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
  ------------------
  |  |  173|   456k|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
   33|   456k|    }
   34|       |
   35|       |    /* Code below to be removed when legacy support is dropped. */
   36|       |
   37|       |    /*
   38|       |     * Don't assume ctx->md_data was cleaned in EVP_Digest_Final, because
   39|       |     * sometimes only copies of the context are ever finalised.
   40|       |     */
   41|   456k|    if (force)
  ------------------
  |  Branch (41:9): [True: 0, False: 456k]
  ------------------
   42|      0|        ctx->digest = NULL;
   43|       |
   44|       |    /* Non legacy code, this has to be later than the ctx->digest cleaning */
   45|   456k|    if (!keep_fetched) {
  ------------------
  |  Branch (45:9): [True: 456k, False: 0]
  ------------------
   46|   456k|        EVP_MD_free(ctx->fetched_digest);
   47|   456k|        ctx->fetched_digest = NULL;
   48|       |        ctx->reqdigest = NULL;
   49|   456k|    }
   50|   456k|}
EVP_MD_CTX_reset:
   75|   456k|{
   76|   456k|    return evp_md_ctx_reset_ex(ctx, 0);
   77|   456k|}
EVP_MD_CTX_new:
  106|   456k|{
  107|   456k|    return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
  ------------------
  |  |  109|   456k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  108|   456k|}
EVP_MD_CTX_free:
  111|   494k|{
  112|   494k|    if (ctx == NULL)
  ------------------
  |  Branch (112:9): [True: 38.7k, False: 456k]
  ------------------
  113|  38.7k|        return;
  114|       |
  115|   456k|    EVP_MD_CTX_reset(ctx);
  116|   456k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   456k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|   456k|}
evp_md_ctx_free_algctx:
  120|   462k|{
  121|   462k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (121:9): [True: 6.28k, False: 456k]
  ------------------
  122|  6.28k|        if (!ossl_assert(ctx->digest != NULL)) {
  ------------------
  |  |   52|  6.28k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  6.28k|    __FILE__, __LINE__)
  ------------------
  |  Branch (122:13): [True: 0, False: 6.28k]
  ------------------
  123|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|            return 0;
  125|      0|        }
  126|  6.28k|        if (ctx->digest->freectx != NULL)
  ------------------
  |  Branch (126:13): [True: 6.28k, False: 0]
  ------------------
  127|  6.28k|            ctx->digest->freectx(ctx->algctx);
  128|  6.28k|        ctx->algctx = NULL;
  129|  6.28k|    }
  130|   462k|    return 1;
  131|   462k|}
EVP_DigestInit_ex:
  237|   489k|{
  238|   489k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|   489k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   489k|    __FILE__, __LINE__)
  ------------------
  |  Branch (238:9): [True: 0, False: 489k]
  ------------------
  239|      0|        return 0;
  240|   489k|    return evp_md_init_internal(ctx, type, NULL);
  241|   489k|}
EVP_DigestUpdate:
  244|  1.18M|{
  245|  1.18M|    if (ossl_unlikely(count == 0))
  ------------------
  |  |   23|  1.18M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 1.09k, False: 1.17M]
  |  |  ------------------
  ------------------
  246|  1.09k|        return 1;
  247|       |
  248|  1.17M|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  1.17M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.17M]
  |  |  ------------------
  ------------------
  249|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  250|      0|        return 0;
  251|      0|    }
  252|       |
  253|  1.17M|    if (ossl_unlikely(ctx->pctx != NULL)
  ------------------
  |  |   23|  2.35M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.17M]
  |  |  ------------------
  ------------------
  254|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  473|  1.17M|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  255|      0|        && ctx->pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (255:12): [True: 0, False: 0]
  ------------------
  256|      0|#ifndef FIPS_MODULE
  257|       |        /*
  258|       |         * Prior to OpenSSL 3.0 EVP_DigestSignUpdate() and
  259|       |         * EVP_DigestVerifyUpdate() were just macros for EVP_DigestUpdate().
  260|       |         * Some code calls EVP_DigestUpdate() directly even when initialised
  261|       |         * with EVP_DigestSignInit_ex() or
  262|       |         * EVP_DigestVerifyInit_ex(), so we detect that and redirect to
  263|       |         * the correct EVP_Digest*Update() function
  264|       |         */
  265|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (265:13): [True: 0, False: 0]
  ------------------
  266|      0|            return EVP_DigestSignUpdate(ctx, data, count);
  267|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_VERIFYCTX)
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (267:13): [True: 0, False: 0]
  ------------------
  268|      0|            return EVP_DigestVerifyUpdate(ctx, data, count);
  269|      0|#endif
  270|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|        return 0;
  272|      0|    }
  273|       |
  274|  1.17M|    if (ctx->digest == NULL || ctx->digest->prov == NULL) {
  ------------------
  |  Branch (274:9): [True: 0, False: 1.17M]
  |  Branch (274:32): [True: 0, False: 1.17M]
  ------------------
  275|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|      0|        return 0;
  277|      0|    }
  278|       |
  279|  1.17M|    if (ossl_unlikely(ctx->digest->dupdate == NULL)) {
  ------------------
  |  |   23|  1.17M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.17M]
  |  |  ------------------
  ------------------
  280|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        return 0;
  282|      0|    }
  283|  1.17M|    return ctx->digest->dupdate(ctx->algctx, data, count);
  284|  1.17M|}
EVP_DigestFinal_ex:
  297|   458k|{
  298|   458k|    int ret, sz;
  299|   458k|    size_t size = 0;
  300|   458k|    size_t mdsize = 0;
  301|       |
  302|   458k|    if (ossl_unlikely(ctx->digest == NULL))
  ------------------
  |  |   23|   458k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 458k]
  |  |  ------------------
  ------------------
  303|      0|        return 0;
  304|       |
  305|   458k|    sz = EVP_MD_CTX_get_size(ctx);
  ------------------
  |  |  482|   458k|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
  306|   458k|    if (ossl_unlikely(sz < 0))
  ------------------
  |  |   23|   458k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 458k]
  |  |  ------------------
  ------------------
  307|      0|        return 0;
  308|   458k|    mdsize = sz;
  309|   458k|    if (ossl_unlikely(ctx->digest->prov == NULL)) {
  ------------------
  |  |   23|   458k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 458k]
  |  |  ------------------
  ------------------
  310|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  311|      0|        return 0;
  312|      0|    }
  313|       |
  314|   458k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|   458k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 458k]
  |  |  ------------------
  ------------------
  315|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        return 0;
  317|      0|    }
  318|       |
  319|   458k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|   458k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 458k]
  |  |  ------------------
  ------------------
  320|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  321|      0|        return 0;
  322|      0|    }
  323|       |
  324|   458k|    ret = ctx->digest->dfinal(ctx->algctx, md, &size, mdsize);
  325|       |
  326|   458k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|   458k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  327|       |
  328|   458k|    if (isize != NULL) {
  ------------------
  |  Branch (328:9): [True: 4.19k, False: 454k]
  ------------------
  329|  4.19k|        if (ossl_likely(size <= UINT_MAX)) {
  ------------------
  |  |   22|  4.19k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.19k, False: 0]
  |  |  ------------------
  ------------------
  330|  4.19k|            *isize = (unsigned int)size;
  331|  4.19k|        } else {
  332|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  333|      0|            ret = 0;
  334|      0|        }
  335|  4.19k|    }
  336|       |
  337|   458k|    return ret;
  338|   458k|}
EVP_DigestFinalXOF:
  342|  12.5k|{
  343|  12.5k|    int ret = 0;
  344|  12.5k|    OSSL_PARAM params[2];
  345|  12.5k|    size_t i = 0;
  346|       |
  347|  12.5k|    if (ossl_unlikely(ctx->digest == NULL)) {
  ------------------
  |  |   23|  12.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.5k]
  |  |  ------------------
  ------------------
  348|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|        return 0;
  350|      0|    }
  351|       |
  352|  12.5k|    if (ossl_unlikely(ctx->digest->prov == NULL)) {
  ------------------
  |  |   23|  12.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.5k]
  |  |  ------------------
  ------------------
  353|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  354|      0|        return 0;
  355|      0|    }
  356|       |
  357|  12.5k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|  12.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.5k]
  |  |  ------------------
  ------------------
  358|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  359|      0|        return 0;
  360|      0|    }
  361|       |
  362|  12.5k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  12.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.5k]
  |  |  ------------------
  ------------------
  363|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  364|      0|        return 0;
  365|      0|    }
  366|       |
  367|       |    /*
  368|       |     * For backward compatibility we pass the XOFLEN via a param here so that
  369|       |     * older providers can use the supplied value. Ideally we should have just
  370|       |     * used the size passed into ctx->digest->dfinal().
  371|       |     */
  372|  12.5k|    params[i++] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_XOFLEN, &size);
  ------------------
  |  |  236|  12.5k|# define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
  ------------------
  373|  12.5k|    params[i++] = OSSL_PARAM_construct_end();
  374|       |
  375|  12.5k|    if (ossl_likely(EVP_MD_CTX_set_params(ctx, params) >= 0))
  ------------------
  |  |   22|  12.5k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 12.5k, False: 0]
  |  |  ------------------
  ------------------
  376|  12.5k|        ret = ctx->digest->dfinal(ctx->algctx, md, &size, size);
  377|       |
  378|  12.5k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|  12.5k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  379|       |
  380|  12.5k|    return ret;
  381|  12.5k|}
EVP_DigestSqueeze:
  385|  56.7k|{
  386|  56.7k|    if (ctx->digest == NULL) {
  ------------------
  |  Branch (386:9): [True: 0, False: 56.7k]
  ------------------
  387|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  388|      0|        return 0;
  389|      0|    }
  390|       |
  391|  56.7k|    if (ctx->digest->prov == NULL) {
  ------------------
  |  Branch (391:9): [True: 0, False: 56.7k]
  ------------------
  392|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  393|      0|        return 0;
  394|      0|    }
  395|       |
  396|  56.7k|    if (ctx->digest->dsqueeze == NULL) {
  ------------------
  |  Branch (396:9): [True: 0, False: 56.7k]
  ------------------
  397|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_METHOD_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  398|      0|        return 0;
  399|      0|    }
  400|       |
  401|  56.7k|    return ctx->digest->dsqueeze(ctx->algctx, md, &size, size);
  402|  56.7k|}
EVP_Digest:
  546|   441k|{
  547|   441k|    EVP_MD_CTX *ctx;
  548|   441k|    int ret;
  549|       |
  550|   441k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|   441k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   441k|    __FILE__, __LINE__)
  ------------------
  |  Branch (550:9): [True: 0, False: 441k]
  ------------------
  551|      0|        return 0;
  552|       |
  553|   441k|    ctx = EVP_MD_CTX_new();
  554|   441k|    if (ctx == NULL)
  ------------------
  |  Branch (554:9): [True: 0, False: 441k]
  ------------------
  555|      0|        return 0;
  556|   441k|    EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT);
  ------------------
  |  |  171|   441k|#define EVP_MD_CTX_FLAG_ONESHOT 0x0001 /* digest update will be \
  ------------------
  557|   441k|    ret = EVP_DigestInit_ex(ctx, type, NULL)
  ------------------
  |  Branch (557:11): [True: 441k, False: 0]
  ------------------
  558|   441k|        && EVP_DigestUpdate(ctx, data, count)
  ------------------
  |  Branch (558:12): [True: 441k, False: 0]
  ------------------
  559|   441k|        && EVP_DigestFinal_ex(ctx, md, size);
  ------------------
  |  Branch (559:12): [True: 441k, False: 0]
  ------------------
  560|   441k|    EVP_MD_CTX_free(ctx);
  561|       |
  562|   441k|    return ret;
  563|   441k|}
EVP_MD_CTX_set_params:
  598|  12.5k|{
  599|  12.5k|    EVP_PKEY_CTX *pctx = ctx->pctx;
  600|       |
  601|       |    /* If we have a pctx then we should try that first */
  602|  12.5k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|  25.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.5k]
  |  |  ------------------
  ------------------
  603|      0|        && (pctx->operation == EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (603:13): [True: 0, False: 0]
  ------------------
  604|      0|            || pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (604:16): [True: 0, False: 0]
  ------------------
  605|      0|        && pctx->op.sig.algctx != NULL
  ------------------
  |  Branch (605:12): [True: 0, False: 0]
  ------------------
  606|      0|        && pctx->op.sig.signature->set_ctx_md_params != NULL)
  ------------------
  |  Branch (606:12): [True: 0, False: 0]
  ------------------
  607|      0|        return pctx->op.sig.signature->set_ctx_md_params(pctx->op.sig.algctx,
  608|      0|            params);
  609|       |
  610|  12.5k|    if (ossl_likely(ctx->digest != NULL && ctx->digest->set_ctx_params != NULL))
  ------------------
  |  |   22|  25.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 12.5k, False: 0]
  |  |  |  Branch (22:44): [True: 12.5k, False: 0]
  |  |  |  Branch (22:44): [True: 12.5k, False: 0]
  |  |  ------------------
  ------------------
  611|  12.5k|        return ctx->digest->set_ctx_params(ctx->algctx, params);
  612|       |
  613|      0|    return 0;
  614|  12.5k|}
EVP_MD_CTX_gettable_params:
  684|   458k|{
  685|   458k|    EVP_PKEY_CTX *pctx;
  686|   458k|    void *provctx;
  687|       |
  688|   458k|    if (ossl_unlikely(ctx == NULL))
  ------------------
  |  |   23|   458k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 458k]
  |  |  ------------------
  ------------------
  689|      0|        return NULL;
  690|       |
  691|       |    /* If we have a pctx then we should try that first */
  692|   458k|    pctx = ctx->pctx;
  693|   458k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|   916k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 458k]
  |  |  ------------------
  ------------------
  694|      0|        && (pctx->operation == EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (694:13): [True: 0, False: 0]
  ------------------
  695|      0|            || pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (695:16): [True: 0, False: 0]
  ------------------
  696|      0|        && pctx->op.sig.signature != NULL
  ------------------
  |  Branch (696:12): [True: 0, False: 0]
  ------------------
  697|      0|        && pctx->op.sig.signature->gettable_ctx_md_params != NULL
  ------------------
  |  Branch (697:12): [True: 0, False: 0]
  ------------------
  698|      0|        && pctx->op.sig.algctx != NULL)
  ------------------
  |  Branch (698:12): [True: 0, False: 0]
  ------------------
  699|      0|        return pctx->op.sig.signature->gettable_ctx_md_params(
  700|      0|            pctx->op.sig.algctx);
  701|       |
  702|   458k|    if (ossl_unlikely(ctx->digest != NULL
  ------------------
  |  |   23|   916k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 458k]
  |  |  |  Branch (23:46): [True: 458k, False: 0]
  |  |  |  Branch (23:46): [True: 0, False: 458k]
  |  |  ------------------
  ------------------
  703|   458k|            && ctx->digest->gettable_ctx_params != NULL)) {
  704|      0|        provctx = ossl_provider_ctx(EVP_MD_get0_provider(ctx->digest));
  705|      0|        return ctx->digest->gettable_ctx_params(ctx->algctx, provctx);
  706|      0|    }
  707|   458k|    return NULL;
  708|   458k|}
evp_md_new:
  757|  21.2k|{
  758|  21.2k|    EVP_MD *md = OPENSSL_zalloc(sizeof(*md));
  ------------------
  |  |  109|  21.2k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  759|       |
  760|  21.2k|    if (md != NULL && !CRYPTO_NEW_REF(&md->refcnt, 1)) {
  ------------------
  |  Branch (760:9): [True: 21.2k, False: 0]
  |  Branch (760:23): [True: 0, False: 21.2k]
  ------------------
  761|      0|        OPENSSL_free(md);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  762|      0|        return NULL;
  763|      0|    }
  764|  21.2k|    return md;
  765|  21.2k|}
EVP_MD_fetch:
  984|   521k|{
  985|   521k|    EVP_MD *md = evp_generic_fetch(ctx, OSSL_OP_DIGEST, algorithm, properties,
  ------------------
  |  |  283|   521k|#define OSSL_OP_DIGEST 1
  ------------------
  986|   521k|        evp_md_from_algorithm, evp_md_up_ref, evp_md_free);
  987|       |
  988|   521k|    return md;
  989|   521k|}
EVP_MD_up_ref:
  992|   973k|{
  993|   973k|    int ref = 0;
  994|       |
  995|   973k|    if (md->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   973k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (995:9): [True: 973k, False: 0]
  ------------------
  996|   973k|        CRYPTO_UP_REF(&md->refcnt, &ref);
  997|   973k|    return 1;
  998|   973k|}
EVP_MD_free:
 1001|  1.45M|{
 1002|  1.45M|    int i;
 1003|       |
 1004|  1.45M|    if (md == NULL || md->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   994k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1004:9): [True: 456k, False: 994k]
  |  Branch (1004:23): [True: 0, False: 994k]
  ------------------
 1005|   456k|        return;
 1006|       |
 1007|   994k|    CRYPTO_DOWN_REF(&md->refcnt, &i);
 1008|   994k|    if (i > 0)
  ------------------
  |  Branch (1008:9): [True: 973k, False: 21.2k]
  ------------------
 1009|   973k|        return;
 1010|       |
 1011|  21.2k|    OPENSSL_free(md->type_name);
  ------------------
  |  |  132|  21.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1012|  21.2k|    ossl_provider_free(md->prov);
 1013|  21.2k|    CRYPTO_FREE_REF(&md->refcnt);
 1014|  21.2k|    OPENSSL_free(md);
  ------------------
  |  |  132|  21.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1015|  21.2k|}
digest.c:evp_md_ctx_reset_ex:
   53|   456k|{
   54|   456k|    if (ctx == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 456k]
  ------------------
   55|      0|        return 1;
   56|       |
   57|       |    /*
   58|       |     * pctx should be freed by the user of EVP_MD_CTX
   59|       |     * if EVP_MD_CTX_FLAG_KEEP_PKEY_CTX is set
   60|       |     */
   61|   456k|    if (!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX)) {
  ------------------
  |  |   32|   456k|#define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400
  ------------------
  |  Branch (61:9): [True: 456k, False: 0]
  ------------------
   62|   456k|        EVP_PKEY_CTX_free(ctx->pctx);
   63|   456k|        ctx->pctx = NULL;
   64|   456k|    }
   65|       |
   66|   456k|    evp_md_ctx_clear_digest(ctx, 0, keep_fetched);
   67|   456k|    if (!keep_fetched)
  ------------------
  |  Branch (67:9): [True: 456k, False: 0]
  ------------------
   68|   456k|        OPENSSL_cleanse(ctx, sizeof(*ctx));
   69|       |
   70|   456k|    return 1;
   71|   456k|}
digest.c:evp_md_init_internal:
  135|   489k|{
  136|   489k|#if !defined(FIPS_MODULE)
  137|   489k|    if (ctx->pctx != NULL
  ------------------
  |  Branch (137:9): [True: 0, False: 489k]
  ------------------
  138|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  473|   489k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  139|      0|        && ctx->pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (139:12): [True: 0, False: 0]
  ------------------
  140|       |        /*
  141|       |         * Prior to OpenSSL 3.0 calling EVP_DigestInit_ex() on an mdctx
  142|       |         * previously initialised with EVP_DigestSignInit() would retain
  143|       |         * information about the key, and re-initialise for another sign
  144|       |         * operation. So in that case we redirect to EVP_DigestSignInit()
  145|       |         */
  146|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (146:13): [True: 0, False: 0]
  ------------------
  147|      0|            return EVP_DigestSignInit(ctx, NULL, type, NULL, NULL);
  148|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_VERIFYCTX)
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (148:13): [True: 0, False: 0]
  ------------------
  149|      0|            return EVP_DigestVerifyInit(ctx, NULL, type, NULL, NULL);
  150|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|      0|        return 0;
  152|      0|    }
  153|   489k|#endif
  154|       |
  155|   489k|    EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_CLEANED | EVP_MD_CTX_FLAG_FINALISED);
  ------------------
  |  |  173|   489k|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
                  EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_CLEANED | EVP_MD_CTX_FLAG_FINALISED);
  ------------------
  |  |   33|   489k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  156|       |
  157|   489k|    if (type != NULL) {
  ------------------
  |  Branch (157:9): [True: 489k, False: 0]
  ------------------
  158|   489k|        ctx->reqdigest = type;
  159|   489k|    } else {
  160|      0|        if (ossl_unlikely(ctx->digest == NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  161|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_NO_DIGEST_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  162|      0|            return 0;
  163|      0|        }
  164|      0|        type = ctx->digest;
  165|      0|    }
  166|       |
  167|   489k|    if (ossl_likely(ctx->digest == type)) {
  ------------------
  |  |   22|   489k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 27.2k, False: 462k]
  |  |  ------------------
  ------------------
  168|  27.2k|        if (ossl_unlikely(!ossl_assert(type->prov != NULL))) {
  ------------------
  |  |   23|  27.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 27.2k]
  |  |  ------------------
  ------------------
  169|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  170|      0|            return 0;
  171|      0|        }
  172|   462k|    } else {
  173|   462k|        if (!evp_md_ctx_free_algctx(ctx))
  ------------------
  |  Branch (173:13): [True: 0, False: 462k]
  ------------------
  174|      0|            return 0;
  175|   462k|    }
  176|       |
  177|   489k|    if (ossl_unlikely(type->prov == NULL)) {
  ------------------
  |  |   23|   489k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 12.8k, False: 476k]
  |  |  ------------------
  ------------------
  178|       |#ifdef FIPS_MODULE
  179|       |        /* We only do explicit fetches inside the FIPS module */
  180|       |        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  181|       |        return 0;
  182|       |#else
  183|       |        /* The NULL digest is a special case */
  184|  12.8k|        EVP_MD *provmd = EVP_MD_fetch(NULL,
  185|  12.8k|            type->type != NID_undef ? OBJ_nid2sn(type->type)
  ------------------
  |  |   18|  12.8k|#define NID_undef                       0
  ------------------
  |  Branch (185:13): [True: 12.8k, False: 0]
  ------------------
  186|  12.8k|                                    : "NULL",
  187|  12.8k|            "");
  188|       |
  189|  12.8k|        if (provmd == NULL) {
  ------------------
  |  Branch (189:13): [True: 0, False: 12.8k]
  ------------------
  190|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  191|      0|            return 0;
  192|      0|        }
  193|  12.8k|        type = provmd;
  194|  12.8k|        EVP_MD_free(ctx->fetched_digest);
  195|  12.8k|        ctx->fetched_digest = provmd;
  196|  12.8k|#endif
  197|  12.8k|    }
  198|       |
  199|   489k|    if (ossl_unlikely(type->prov != NULL && ctx->fetched_digest != type)) {
  ------------------
  |  |   23|   979k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 449k, False: 40.1k]
  |  |  |  Branch (23:46): [True: 489k, False: 0]
  |  |  |  Branch (23:46): [True: 449k, False: 40.1k]
  |  |  ------------------
  ------------------
  200|   449k|        if (ossl_unlikely(!EVP_MD_up_ref((EVP_MD *)type))) {
  ------------------
  |  |   23|   449k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 449k]
  |  |  ------------------
  ------------------
  201|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  202|      0|            return 0;
  203|      0|        }
  204|   449k|        EVP_MD_free(ctx->fetched_digest);
  205|   449k|        ctx->fetched_digest = (EVP_MD *)type;
  206|   449k|    }
  207|   489k|    ctx->digest = type;
  208|   489k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (208:9): [True: 462k, False: 27.2k]
  ------------------
  209|   462k|        ctx->algctx = ctx->digest->newctx(ossl_provider_ctx(type->prov));
  210|   462k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (210:13): [True: 0, False: 462k]
  ------------------
  211|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  212|      0|            return 0;
  213|      0|        }
  214|   462k|    }
  215|       |
  216|   489k|    if (ctx->digest->dinit == NULL) {
  ------------------
  |  Branch (216:9): [True: 0, False: 489k]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        return 0;
  219|      0|    }
  220|       |
  221|   489k|    return ctx->digest->dinit(ctx->algctx, params);
  222|   489k|}
digest.c:evp_md_from_algorithm:
  833|  21.2k|{
  834|  21.2k|    const OSSL_DISPATCH *fns = algodef->implementation;
  835|  21.2k|    EVP_MD *md = NULL;
  836|  21.2k|    int fncnt = 0;
  837|       |
  838|       |    /* EVP_MD_fetch() will set the legacy NID if available */
  839|  21.2k|    if ((md = evp_md_new()) == NULL) {
  ------------------
  |  Branch (839:9): [True: 0, False: 21.2k]
  ------------------
  840|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  841|      0|        return NULL;
  842|      0|    }
  843|       |
  844|  21.2k|#ifndef FIPS_MODULE
  845|  21.2k|    md->type = NID_undef;
  ------------------
  |  |   18|  21.2k|#define NID_undef                       0
  ------------------
  846|  21.2k|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &md->type)
  ------------------
  |  Branch (846:9): [True: 0, False: 21.2k]
  ------------------
  847|  21.2k|        || md->type == -1) {
  ------------------
  |  Branch (847:12): [True: 0, False: 21.2k]
  ------------------
  848|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  849|      0|        goto err;
  850|      0|    }
  851|  21.2k|#endif
  852|       |
  853|  21.2k|    md->name_id = name_id;
  854|  21.2k|    if ((md->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (854:9): [True: 0, False: 21.2k]
  ------------------
  855|      0|        goto err;
  856|       |
  857|  21.2k|    md->description = algodef->algorithm_description;
  858|       |
  859|   270k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (859:12): [True: 248k, False: 21.2k]
  ------------------
  860|   248k|        switch (fns->function_id) {
  ------------------
  |  Branch (860:17): [True: 248k, False: 0]
  ------------------
  861|  21.2k|        case OSSL_FUNC_DIGEST_NEWCTX:
  ------------------
  |  |  303|  21.2k|#define OSSL_FUNC_DIGEST_NEWCTX 1
  ------------------
  |  Branch (861:9): [True: 21.2k, False: 227k]
  ------------------
  862|  21.2k|            if (md->newctx == NULL) {
  ------------------
  |  Branch (862:17): [True: 21.2k, False: 0]
  ------------------
  863|  21.2k|                md->newctx = OSSL_FUNC_digest_newctx(fns);
  864|  21.2k|                fncnt++;
  865|  21.2k|            }
  866|  21.2k|            break;
  867|  21.2k|        case OSSL_FUNC_DIGEST_INIT:
  ------------------
  |  |  304|  21.2k|#define OSSL_FUNC_DIGEST_INIT 2
  ------------------
  |  Branch (867:9): [True: 21.2k, False: 227k]
  ------------------
  868|  21.2k|            if (md->dinit == NULL) {
  ------------------
  |  Branch (868:17): [True: 21.2k, False: 0]
  ------------------
  869|  21.2k|                md->dinit = OSSL_FUNC_digest_init(fns);
  870|  21.2k|                fncnt++;
  871|  21.2k|            }
  872|  21.2k|            break;
  873|  21.2k|        case OSSL_FUNC_DIGEST_UPDATE:
  ------------------
  |  |  305|  21.2k|#define OSSL_FUNC_DIGEST_UPDATE 3
  ------------------
  |  Branch (873:9): [True: 21.2k, False: 227k]
  ------------------
  874|  21.2k|            if (md->dupdate == NULL) {
  ------------------
  |  Branch (874:17): [True: 21.2k, False: 0]
  ------------------
  875|  21.2k|                md->dupdate = OSSL_FUNC_digest_update(fns);
  876|  21.2k|                fncnt++;
  877|  21.2k|            }
  878|  21.2k|            break;
  879|  21.2k|        case OSSL_FUNC_DIGEST_FINAL:
  ------------------
  |  |  306|  21.2k|#define OSSL_FUNC_DIGEST_FINAL 4
  ------------------
  |  Branch (879:9): [True: 21.2k, False: 227k]
  ------------------
  880|  21.2k|            if (md->dfinal == NULL) {
  ------------------
  |  Branch (880:17): [True: 21.2k, False: 0]
  ------------------
  881|  21.2k|                md->dfinal = OSSL_FUNC_digest_final(fns);
  882|  21.2k|                fncnt++;
  883|  21.2k|            }
  884|  21.2k|            break;
  885|  4.25k|        case OSSL_FUNC_DIGEST_SQUEEZE:
  ------------------
  |  |  316|  4.25k|#define OSSL_FUNC_DIGEST_SQUEEZE 14
  ------------------
  |  Branch (885:9): [True: 4.25k, False: 244k]
  ------------------
  886|  4.25k|            if (md->dsqueeze == NULL) {
  ------------------
  |  Branch (886:17): [True: 4.25k, False: 0]
  ------------------
  887|  4.25k|                md->dsqueeze = OSSL_FUNC_digest_squeeze(fns);
  888|  4.25k|                fncnt++;
  889|  4.25k|            }
  890|  4.25k|            break;
  891|      0|        case OSSL_FUNC_DIGEST_DIGEST:
  ------------------
  |  |  307|      0|#define OSSL_FUNC_DIGEST_DIGEST 5
  ------------------
  |  Branch (891:9): [True: 0, False: 248k]
  ------------------
  892|      0|            if (md->digest == NULL)
  ------------------
  |  Branch (892:17): [True: 0, False: 0]
  ------------------
  893|      0|                md->digest = OSSL_FUNC_digest_digest(fns);
  894|       |            /* We don't increment fnct for this as it is stand alone */
  895|      0|            break;
  896|  21.2k|        case OSSL_FUNC_DIGEST_FREECTX:
  ------------------
  |  |  308|  21.2k|#define OSSL_FUNC_DIGEST_FREECTX 6
  ------------------
  |  Branch (896:9): [True: 21.2k, False: 227k]
  ------------------
  897|  21.2k|            if (md->freectx == NULL) {
  ------------------
  |  Branch (897:17): [True: 21.2k, False: 0]
  ------------------
  898|  21.2k|                md->freectx = OSSL_FUNC_digest_freectx(fns);
  899|  21.2k|                fncnt++;
  900|  21.2k|            }
  901|  21.2k|            break;
  902|  21.2k|        case OSSL_FUNC_DIGEST_DUPCTX:
  ------------------
  |  |  309|  21.2k|#define OSSL_FUNC_DIGEST_DUPCTX 7
  ------------------
  |  Branch (902:9): [True: 21.2k, False: 227k]
  ------------------
  903|  21.2k|            if (md->dupctx == NULL)
  ------------------
  |  Branch (903:17): [True: 21.2k, False: 0]
  ------------------
  904|  21.2k|                md->dupctx = OSSL_FUNC_digest_dupctx(fns);
  905|  21.2k|            break;
  906|  21.2k|        case OSSL_FUNC_DIGEST_GET_PARAMS:
  ------------------
  |  |  310|  21.2k|#define OSSL_FUNC_DIGEST_GET_PARAMS 8
  ------------------
  |  Branch (906:9): [True: 21.2k, False: 227k]
  ------------------
  907|  21.2k|            if (md->get_params == NULL)
  ------------------
  |  Branch (907:17): [True: 21.2k, False: 0]
  ------------------
  908|  21.2k|                md->get_params = OSSL_FUNC_digest_get_params(fns);
  909|  21.2k|            break;
  910|  7.79k|        case OSSL_FUNC_DIGEST_SET_CTX_PARAMS:
  ------------------
  |  |  311|  7.79k|#define OSSL_FUNC_DIGEST_SET_CTX_PARAMS 9
  ------------------
  |  Branch (910:9): [True: 7.79k, False: 241k]
  ------------------
  911|  7.79k|            if (md->set_ctx_params == NULL)
  ------------------
  |  Branch (911:17): [True: 7.79k, False: 0]
  ------------------
  912|  7.79k|                md->set_ctx_params = OSSL_FUNC_digest_set_ctx_params(fns);
  913|  7.79k|            break;
  914|  6.38k|        case OSSL_FUNC_DIGEST_GET_CTX_PARAMS:
  ------------------
  |  |  312|  6.38k|#define OSSL_FUNC_DIGEST_GET_CTX_PARAMS 10
  ------------------
  |  Branch (914:9): [True: 6.38k, False: 242k]
  ------------------
  915|  6.38k|            if (md->get_ctx_params == NULL)
  ------------------
  |  Branch (915:17): [True: 6.38k, False: 0]
  ------------------
  916|  6.38k|                md->get_ctx_params = OSSL_FUNC_digest_get_ctx_params(fns);
  917|  6.38k|            break;
  918|  21.2k|        case OSSL_FUNC_DIGEST_GETTABLE_PARAMS:
  ------------------
  |  |  313|  21.2k|#define OSSL_FUNC_DIGEST_GETTABLE_PARAMS 11
  ------------------
  |  Branch (918:9): [True: 21.2k, False: 227k]
  ------------------
  919|  21.2k|            if (md->gettable_params == NULL)
  ------------------
  |  Branch (919:17): [True: 21.2k, False: 0]
  ------------------
  920|  21.2k|                md->gettable_params = OSSL_FUNC_digest_gettable_params(fns);
  921|  21.2k|            break;
  922|  7.79k|        case OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  314|  7.79k|#define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS 12
  ------------------
  |  Branch (922:9): [True: 7.79k, False: 241k]
  ------------------
  923|  7.79k|            if (md->settable_ctx_params == NULL)
  ------------------
  |  Branch (923:17): [True: 7.79k, False: 0]
  ------------------
  924|  7.79k|                md->settable_ctx_params = OSSL_FUNC_digest_settable_ctx_params(fns);
  925|  7.79k|            break;
  926|  6.38k|        case OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  315|  6.38k|#define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (926:9): [True: 6.38k, False: 242k]
  ------------------
  927|  6.38k|            if (md->gettable_ctx_params == NULL)
  ------------------
  |  Branch (927:17): [True: 6.38k, False: 0]
  ------------------
  928|  6.38k|                md->gettable_ctx_params = OSSL_FUNC_digest_gettable_ctx_params(fns);
  929|  6.38k|            break;
  930|  19.1k|        case OSSL_FUNC_DIGEST_COPYCTX:
  ------------------
  |  |  317|  19.1k|#define OSSL_FUNC_DIGEST_COPYCTX 15
  ------------------
  |  Branch (930:9): [True: 19.1k, False: 229k]
  ------------------
  931|  19.1k|            if (md->copyctx == NULL)
  ------------------
  |  Branch (931:17): [True: 19.1k, False: 0]
  ------------------
  932|  19.1k|                md->copyctx = OSSL_FUNC_digest_copyctx(fns);
  933|  19.1k|            break;
  934|  13.4k|        case OSSL_FUNC_DIGEST_SERIALIZE:
  ------------------
  |  |  318|  13.4k|#define OSSL_FUNC_DIGEST_SERIALIZE 16
  ------------------
  |  Branch (934:9): [True: 13.4k, False: 235k]
  ------------------
  935|  13.4k|            if (md->serialize == NULL)
  ------------------
  |  Branch (935:17): [True: 13.4k, False: 0]
  ------------------
  936|  13.4k|                md->serialize = OSSL_FUNC_digest_serialize(fns);
  937|  13.4k|            break;
  938|  13.4k|        case OSSL_FUNC_DIGEST_DESERIALIZE:
  ------------------
  |  |  319|  13.4k|#define OSSL_FUNC_DIGEST_DESERIALIZE 17
  ------------------
  |  Branch (938:9): [True: 13.4k, False: 235k]
  ------------------
  939|  13.4k|            if (md->deserialize == NULL)
  ------------------
  |  Branch (939:17): [True: 13.4k, False: 0]
  ------------------
  940|  13.4k|                md->deserialize = OSSL_FUNC_digest_deserialize(fns);
  941|  13.4k|            break;
  942|   248k|        }
  943|   248k|    }
  944|  21.2k|    if ((fncnt != 0 && fncnt != 5 && fncnt != 6)
  ------------------
  |  Branch (944:10): [True: 21.2k, False: 0]
  |  Branch (944:24): [True: 4.25k, False: 17.0k]
  |  Branch (944:38): [True: 0, False: 4.25k]
  ------------------
  945|  21.2k|        || (fncnt == 0 && md->digest == NULL)) {
  ------------------
  |  Branch (945:13): [True: 0, False: 21.2k]
  |  Branch (945:27): [True: 0, False: 0]
  ------------------
  946|       |        /*
  947|       |         * In order to be a consistent set of functions we either need the
  948|       |         * whole set of init/update/final etc functions or none of them.
  949|       |         * The "digest" function can standalone. We at least need one way to
  950|       |         * generate digests.
  951|       |         */
  952|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  953|      0|        goto err;
  954|      0|    }
  955|  21.2k|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (955:9): [True: 21.2k, False: 0]
  |  Branch (955:25): [True: 0, False: 21.2k]
  ------------------
  956|      0|        goto err;
  957|       |
  958|  21.2k|    md->prov = prov;
  959|       |
  960|  21.2k|    if (!evp_md_cache_constants(md)) {
  ------------------
  |  Branch (960:9): [True: 0, False: 21.2k]
  ------------------
  961|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  962|      0|        goto err;
  963|      0|    }
  964|       |
  965|  21.2k|    return md;
  966|       |
  967|      0|err:
  968|      0|    EVP_MD_free(md);
  969|       |    return NULL;
  970|  21.2k|}
digest.c:set_legacy_nid:
  774|  55.3k|{
  775|  55.3k|    int nid;
  776|  55.3k|    int *legacy_nid = vlegacy_nid;
  777|       |    /*
  778|       |     * We use lowest level function to get the associated method, because
  779|       |     * higher level functions such as EVP_get_digestbyname() have changed
  780|       |     * to look at providers too.
  781|       |     */
  782|  55.3k|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|  55.3k|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  783|       |
  784|  55.3k|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (784:9): [True: 0, False: 55.3k]
  ------------------
  785|      0|        return;
  786|       |
  787|  55.3k|    if (legacy_method == NULL)
  ------------------
  |  Branch (787:9): [True: 38.9k, False: 16.3k]
  ------------------
  788|  38.9k|        return;
  789|  16.3k|    nid = EVP_MD_nid(legacy_method);
  ------------------
  |  |  453|  16.3k|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  790|  16.3k|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|  32.6k|#define NID_undef                       0
  ------------------
  |  Branch (790:9): [True: 2.83k, False: 13.4k]
  |  Branch (790:37): [True: 0, False: 2.83k]
  ------------------
  791|      0|        *legacy_nid = -1;
  792|      0|        return;
  793|      0|    }
  794|  16.3k|    *legacy_nid = nid;
  795|  16.3k|}
digest.c:evp_md_cache_constants:
  799|  21.2k|{
  800|  21.2k|    int ok, xof = 0, algid_absent = 0;
  801|  21.2k|    size_t blksz = 0;
  802|  21.2k|    size_t mdsize = 0;
  803|  21.2k|    OSSL_PARAM params[5];
  804|       |
  805|       |    /*
  806|       |     * Note that these parameters are 'constants' that are only set up
  807|       |     * during the EVP_MD_fetch(). For this reason the XOF functions set the
  808|       |     * md_size to 0, since the output size is unknown.
  809|       |     */
  810|  21.2k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  223|  21.2k|# define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  811|  21.2k|    params[1] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_SIZE, &mdsize);
  ------------------
  |  |  233|  21.2k|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
  812|  21.2k|    params[2] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_XOF, &xof);
  ------------------
  |  |  235|  21.2k|# define OSSL_DIGEST_PARAM_XOF "xof"
  ------------------
  813|  21.2k|    params[3] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_ALGID_ABSENT,
  ------------------
  |  |  222|  21.2k|# define OSSL_DIGEST_PARAM_ALGID_ABSENT "algid-absent"
  ------------------
  814|  21.2k|        &algid_absent);
  815|  21.2k|    params[4] = OSSL_PARAM_construct_end();
  816|  21.2k|    ok = evp_do_md_getparams(md, params) > 0;
  817|  21.2k|    if (mdsize > INT_MAX || blksz > INT_MAX)
  ------------------
  |  Branch (817:9): [True: 0, False: 21.2k]
  |  Branch (817:29): [True: 0, False: 21.2k]
  ------------------
  818|      0|        ok = 0;
  819|  21.2k|    if (ok) {
  ------------------
  |  Branch (819:9): [True: 21.2k, False: 0]
  ------------------
  820|  21.2k|        md->block_size = (int)blksz;
  821|  21.2k|        md->md_size = (int)mdsize;
  822|  21.2k|        if (xof)
  ------------------
  |  Branch (822:13): [True: 4.25k, False: 17.0k]
  ------------------
  823|  4.25k|            md->flags |= EVP_MD_FLAG_XOF;
  ------------------
  |  |  135|  4.25k|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
  824|  21.2k|        if (algid_absent)
  ------------------
  |  Branch (824:13): [True: 14.8k, False: 6.38k]
  ------------------
  825|  14.8k|            md->flags |= EVP_MD_FLAG_DIGALGID_ABSENT;
  ------------------
  |  |  147|  14.8k|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  826|  21.2k|    }
  827|  21.2k|    return ok;
  828|  21.2k|}
digest.c:evp_md_up_ref:
  973|   524k|{
  974|   524k|    return EVP_MD_up_ref(md);
  975|   524k|}
digest.c:evp_md_free:
  978|  49.3k|{
  979|  49.3k|    EVP_MD_free(md);
  980|  49.3k|}

EVP_aes_128_cbc:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_128_ecb:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_128_ofb:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_128_cfb128:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_128_cfb1:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_128_cfb8:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_128_ctr:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_192_cbc:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_192_ecb:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_192_ofb:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_192_cfb128:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_192_cfb1:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_192_cfb8:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_192_ctr:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_256_cbc:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_256_ecb:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_256_ofb:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_256_cfb128:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_256_cfb1:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_256_cfb8:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_256_ctr:
   22|      1|    {                                                                                 \
   23|      1|        return &aes_##keylen##_##mode;                                                \
   24|      1|    }
EVP_aes_128_gcm:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_192_gcm:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_256_gcm:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_128_xts:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_256_xts:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_128_ccm:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_192_ccm:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_256_ccm:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_128_wrap:
   89|      1|{
   90|      1|    return &aes_128_wrap;
   91|      1|}
EVP_aes_192_wrap:
   99|      1|{
  100|      1|    return &aes_192_wrap;
  101|      1|}
EVP_aes_256_wrap:
  109|      1|{
  110|      1|    return &aes_256_wrap;
  111|      1|}
EVP_aes_128_wrap_pad:
  119|      1|{
  120|      1|    return &aes_128_wrap_pad;
  121|      1|}
EVP_aes_192_wrap_pad:
  129|      1|{
  130|      1|    return &aes_192_wrap_pad;
  131|      1|}
EVP_aes_256_wrap_pad:
  139|      1|{
  140|      1|    return &aes_256_wrap_pad;
  141|      1|}
EVP_aes_128_ocb:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_192_ocb:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }
EVP_aes_256_ocb:
   36|      1|    {                                                                                                                      \
   37|      1|        return &aes_##keylen##_##mode;                                                                                     \
   38|      1|    }

EVP_aes_128_cbc_hmac_sha1:
   41|      1|{
   42|      1|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ? &aesni_128_cbc_hmac_sha1_cipher : NULL);
  ------------------
  |  |   16|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (42:13): [True: 1, False: 0]
  ------------------
   43|      1|}
EVP_aes_256_cbc_hmac_sha1:
   46|      1|{
   47|      1|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ? &aesni_256_cbc_hmac_sha1_cipher : NULL);
  ------------------
  |  |   16|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (47:13): [True: 1, False: 0]
  ------------------
   48|      1|}

EVP_aes_128_cbc_hmac_sha256:
   53|      1|{
   54|      1|    return ((OPENSSL_ia32cap_P[1] & AESNI_CAPABLE) && aesni_cbc_sha256_enc(NULL, NULL, 0, NULL, NULL, NULL, NULL) ? &aesni_128_cbc_hmac_sha256_cipher : NULL);
  ------------------
  |  |   24|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (54:13): [True: 1, False: 0]
  |  Branch (54:55): [True: 1, False: 0]
  ------------------
   55|      1|}
EVP_aes_256_cbc_hmac_sha256:
   58|      1|{
   59|      1|    return ((OPENSSL_ia32cap_P[1] & AESNI_CAPABLE) && aesni_cbc_sha256_enc(NULL, NULL, 0, NULL, NULL, NULL, NULL) ? &aesni_256_cbc_hmac_sha256_cipher : NULL);
  ------------------
  |  |   24|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (59:13): [True: 1, False: 0]
  |  Branch (59:55): [True: 1, False: 0]
  ------------------
   60|      1|}

EVP_aria_128_ctr:
   42|      1|    {                                                                                 \
   43|      1|        return &aria_##keylen##_##mode;                                               \
   44|      1|    }
EVP_aria_192_ctr:
   42|      1|    {                                                                                 \
   43|      1|        return &aria_##keylen##_##mode;                                               \
   44|      1|    }
EVP_aria_256_ctr:
   42|      1|    {                                                                                 \
   43|      1|        return &aria_##keylen##_##mode;                                               \
   44|      1|    }
EVP_aria_128_gcm:
   64|      1|    {                                                  \
   65|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      1|    }
EVP_aria_192_gcm:
   64|      1|    {                                                  \
   65|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      1|    }
EVP_aria_256_gcm:
   64|      1|    {                                                  \
   65|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      1|    }
EVP_aria_128_ccm:
   64|      1|    {                                                  \
   65|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      1|    }
EVP_aria_192_ccm:
   64|      1|    {                                                  \
   65|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      1|    }
EVP_aria_256_ccm:
   64|      1|    {                                                  \
   65|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      1|    }

EVP_camellia_128_cbc:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_128_ecb:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_128_ofb:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_128_cfb128:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_128_cfb1:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_128_cfb8:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_128_ctr:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_192_cbc:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_192_ecb:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_192_ofb:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_192_cfb128:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_192_cfb1:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_192_cfb8:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_192_ctr:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_256_cbc:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_256_ecb:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_256_ofb:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_256_cfb128:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_256_cfb1:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_256_cfb8:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }
EVP_camellia_256_ctr:
   22|      1|    {                                                                                 \
   23|      1|        return &camellia_##keylen##_##mode;                                           \
   24|      1|    }

EVP_chacha20:
   27|      1|{
   28|      1|    return &chacha20;
   29|      1|}
EVP_chacha20_poly1305:
   43|      1|{
   44|      1|    return (&chacha20_poly1305);
   45|      1|}

EVP_des_ede:
   28|      1|{
   29|      1|    return &des_ede_ecb;
   30|      1|}
EVP_des_ede3:
   33|      1|{
   34|      1|    return &des_ede3_ecb;
   35|      1|}
EVP_des_ede3_wrap:
   46|      1|{
   47|      1|    return &des3_wrap;
   48|      1|}

EVP_rc2_64_cbc:
   35|      1|{
   36|      1|    return &r2_64_cbc_cipher;
   37|      1|}
EVP_rc2_40_cbc:
   40|      1|{
   41|      1|    return &r2_40_cbc_cipher;
   42|      1|}

EVP_rc4:
   30|      1|{
   31|      1|    return &r4_cipher;
   32|      1|}
EVP_rc4_40:
   35|      1|{
   36|      1|    return &r4_40_cipher;
   37|      1|}

EVP_rc4_hmac_md5:
   27|      1|{
   28|      1|    return &r4_hmac_md5_cipher;
   29|      1|}

EVP_sm4_cbc:
   24|      1|    {                                                                         \
   25|      1|        return &sm4_##mode;                                                   \
   26|      1|    }
EVP_sm4_ecb:
   24|      1|    {                                                                         \
   25|      1|        return &sm4_##mode;                                                   \
   26|      1|    }
EVP_sm4_ofb:
   24|      1|    {                                                                         \
   25|      1|        return &sm4_##mode;                                                   \
   26|      1|    }
EVP_sm4_cfb128:
   24|      1|    {                                                                         \
   25|      1|        return &sm4_##mode;                                                   \
   26|      1|    }
EVP_sm4_ctr:
   24|      1|    {                                                                         \
   25|      1|        return &sm4_##mode;                                                   \
   26|      1|    }

EVP_desx_cbc:
   23|      1|{
   24|      1|    return &d_xcbc_cipher;
   25|      1|}

OSSL_EC_curve_nid2name:
  119|   163k|{
  120|   163k|    size_t i;
  121|       |
  122|   163k|    if (nid <= 0)
  ------------------
  |  Branch (122:9): [True: 0, False: 163k]
  ------------------
  123|      0|        return NULL;
  124|       |
  125|  2.12M|    for (i = 0; i < OSSL_NELEM(curve_list); i++) {
  ------------------
  |  |   14|  2.12M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (125:17): [True: 2.12M, False: 0]
  ------------------
  126|  2.12M|        if (curve_list[i].nid == nid)
  ------------------
  |  Branch (126:13): [True: 163k, False: 1.96M]
  ------------------
  127|   163k|            return curve_list[i].name;
  128|  2.12M|    }
  129|      0|    return NULL;
  130|   163k|}
ossl_ec_curve_name2nid:
  133|    441|{
  134|    441|    size_t i;
  135|    441|    int nid;
  136|       |
  137|    441|    if (name != NULL) {
  ------------------
  |  Branch (137:9): [True: 441, False: 0]
  ------------------
  138|    441|        if ((nid = ossl_ec_curve_nist2nid_int(name)) != NID_undef)
  ------------------
  |  |   18|    441|#define NID_undef                       0
  ------------------
  |  Branch (138:13): [True: 0, False: 441]
  ------------------
  139|      0|            return nid;
  140|       |
  141|  26.1k|        for (i = 0; i < OSSL_NELEM(curve_list); i++) {
  ------------------
  |  |   14|  26.1k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (141:21): [True: 26.1k, False: 0]
  ------------------
  142|  26.1k|            if (OPENSSL_strcasecmp(curve_list[i].name, name) == 0)
  ------------------
  |  Branch (142:17): [True: 441, False: 25.7k]
  ------------------
  143|    441|                return curve_list[i].nid;
  144|  26.1k|        }
  145|    441|    }
  146|       |
  147|      0|    return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  148|    441|}
ossl_ec_curve_nist2nid_int:
  181|    441|{
  182|    441|    size_t i;
  183|  7.05k|    for (i = 0; i < OSSL_NELEM(nist_curves); i++) {
  ------------------
  |  |   14|  7.05k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (183:17): [True: 6.61k, False: 441]
  ------------------
  184|  6.61k|        if (strcmp(nist_curves[i].name, name) == 0)
  ------------------
  |  Branch (184:13): [True: 0, False: 6.61k]
  ------------------
  185|      0|            return nist_curves[i].nid;
  186|  6.61k|    }
  187|    441|    return NID_undef;
  ------------------
  |  |   18|    441|#define NID_undef                       0
  ------------------
  188|    441|}

EVP_ENCODE_CTX_new:
  111|   503k|{
  112|   503k|    return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  113|   503k|}
EVP_ENCODE_CTX_free:
  116|   511k|{
  117|   511k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   511k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  118|   511k|}
EVP_DecodeInit:
  259|   503k|{
  260|       |    /* Only ctx->num and ctx->flags are used during decoding. */
  261|   503k|    ctx->num = 0;
  262|   503k|    ctx->line_num = 0;
  263|   503k|    ctx->flags = 0;
  264|   503k|}
EVP_DecodeUpdate:
  288|   503k|{
  289|   503k|    int seof = 0, eof = 0, rv = -1, ret = 0, i, v, tmp, n, decoded_len;
  290|   503k|    unsigned char *d;
  291|   503k|    const unsigned char *table;
  292|       |
  293|   503k|    n = ctx->num;
  294|   503k|    d = ctx->enc_data;
  295|       |
  296|   503k|    if (n > 0 && d[n - 1] == '=') {
  ------------------
  |  Branch (296:9): [True: 0, False: 503k]
  |  Branch (296:18): [True: 0, False: 0]
  ------------------
  297|      0|        eof++;
  298|      0|        if (n > 1 && d[n - 2] == '=')
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  |  Branch (298:22): [True: 0, False: 0]
  ------------------
  299|      0|            eof++;
  300|      0|    }
  301|       |
  302|       |    /* Legacy behaviour: an empty input chunk signals end of input. */
  303|   503k|    if (inl == 0) {
  ------------------
  |  Branch (303:9): [True: 0, False: 503k]
  ------------------
  304|      0|        rv = 0;
  305|      0|        goto end;
  306|      0|    }
  307|       |
  308|   503k|    if ((ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  627|   503k|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (308:9): [True: 0, False: 503k]
  ------------------
  309|      0|        table = srpdata_ascii2bin;
  310|   503k|    else
  311|   503k|        table = data_ascii2bin;
  312|       |
  313|   731M|    for (i = 0; i < inl; i++) {
  ------------------
  |  Branch (313:17): [True: 730M, False: 503k]
  ------------------
  314|   730M|        tmp = *(in++);
  315|   730M|        v = conv_ascii2bin(tmp, table);
  316|   730M|        if (v == B64_ERROR) {
  ------------------
  |  |   57|   730M|#define B64_ERROR 0xFF
  ------------------
  |  Branch (316:13): [True: 0, False: 730M]
  ------------------
  317|      0|            rv = -1;
  318|      0|            goto end;
  319|      0|        }
  320|       |
  321|   730M|        if (tmp == '=') {
  ------------------
  |  Branch (321:13): [True: 386k, False: 730M]
  ------------------
  322|   386k|            eof++;
  323|   730M|        } else if (eof > 0 && B64_BASE64(v)) {
  ------------------
  |  |   59|   274k|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   58|   274k|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (59:23): [True: 0, False: 274k]
  |  |  ------------------
  ------------------
  |  Branch (323:20): [True: 274k, False: 729M]
  ------------------
  324|       |            /* More data after padding. */
  325|      0|            rv = -1;
  326|      0|            goto end;
  327|      0|        }
  328|       |
  329|   730M|        if (eof > 2) {
  ------------------
  |  Branch (329:13): [True: 0, False: 730M]
  ------------------
  330|      0|            rv = -1;
  331|      0|            goto end;
  332|      0|        }
  333|       |
  334|   730M|        if (v == B64_EOF) {
  ------------------
  |  |   55|   730M|#define B64_EOF 0xF2
  ------------------
  |  Branch (334:13): [True: 0, False: 730M]
  ------------------
  335|      0|            seof = 1;
  336|      0|            goto tail;
  337|      0|        }
  338|       |
  339|       |        /* Only save valid base64 characters. */
  340|   730M|        if (B64_BASE64(v)) {
  ------------------
  |  |   59|   730M|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   58|   730M|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (59:23): [True: 719M, False: 11.4M]
  |  |  ------------------
  ------------------
  341|   719M|            if (n >= 64) {
  ------------------
  |  Branch (341:17): [True: 0, False: 719M]
  ------------------
  342|       |                /*
  343|       |                 * We increment n once per loop, and empty the buffer as soon as
  344|       |                 * we reach 64 characters, so this can only happen if someone's
  345|       |                 * manually messed with the ctx. Refuse to write any more data.
  346|       |                 */
  347|      0|                rv = -1;
  348|      0|                goto end;
  349|      0|            }
  350|   719M|            OPENSSL_assert(n < (int)sizeof(ctx->enc_data));
  ------------------
  |  |  477|   719M|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (477:12): [True: 719M, False: 0]
  |  |  ------------------
  ------------------
  351|   719M|            d[n++] = tmp;
  352|   719M|        }
  353|       |
  354|   730M|        if (n == 64) {
  ------------------
  |  Branch (354:13): [True: 11.0M, False: 719M]
  ------------------
  355|  11.0M|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  356|  11.0M|            n = 0;
  357|  11.0M|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (357:17): [True: 0, False: 11.0M]
  |  Branch (357:37): [True: 0, False: 11.0M]
  |  Branch (357:57): [True: 0, False: 0]
  ------------------
  358|      0|                rv = -1;
  359|      0|                goto end;
  360|      0|            }
  361|  11.0M|            ret += decoded_len;
  362|  11.0M|            out += decoded_len;
  363|  11.0M|        }
  364|   730M|    }
  365|       |
  366|       |    /*
  367|       |     * Legacy behaviour: if the current line is a full base64-block (i.e., has
  368|       |     * 0 mod 4 base64 characters), it is processed immediately. We keep this
  369|       |     * behaviour as applications may not be calling EVP_DecodeFinal properly.
  370|       |     */
  371|   503k|tail:
  372|   503k|    if (n > 0) {
  ------------------
  |  Branch (372:9): [True: 470k, False: 33.2k]
  ------------------
  373|   470k|        if ((n & 3) == 0) {
  ------------------
  |  Branch (373:13): [True: 470k, False: 0]
  ------------------
  374|   470k|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  375|   470k|            n = 0;
  376|   470k|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (376:17): [True: 0, False: 470k]
  |  Branch (376:37): [True: 0, False: 470k]
  |  Branch (376:57): [True: 0, False: 0]
  ------------------
  377|      0|                rv = -1;
  378|      0|                goto end;
  379|      0|            }
  380|   470k|            ret += decoded_len;
  381|   470k|        } else if (seof) {
  ------------------
  |  Branch (381:20): [True: 0, False: 0]
  ------------------
  382|       |            /* EOF in the middle of a base64 block. */
  383|      0|            rv = -1;
  384|      0|            goto end;
  385|      0|        }
  386|   470k|    }
  387|       |
  388|   503k|    rv = seof || (n == 0 && eof) ? 0 : 1;
  ------------------
  |  Branch (388:10): [True: 0, False: 503k]
  |  Branch (388:19): [True: 503k, False: 0]
  |  Branch (388:29): [True: 274k, False: 228k]
  ------------------
  389|   503k|end:
  390|       |    /* Legacy behaviour. This should probably rather be zeroed on error. */
  391|   503k|    *outl = ret;
  392|   503k|    ctx->num = n;
  393|   503k|    return rv;
  394|   503k|}
EVP_DecodeFinal:
  482|   503k|{
  483|   503k|    int i;
  484|       |
  485|   503k|    *outl = 0;
  486|   503k|    if (ctx->num != 0) {
  ------------------
  |  Branch (486:9): [True: 0, False: 503k]
  ------------------
  487|      0|        i = evp_decodeblock_int(ctx, out, ctx->enc_data, ctx->num, -1);
  488|      0|        if (i < 0)
  ------------------
  |  Branch (488:13): [True: 0, False: 0]
  ------------------
  489|      0|            return -1;
  490|      0|        ctx->num = 0;
  491|      0|        *outl = i;
  492|      0|        return 1;
  493|      0|    } else
  494|   503k|        return 1;
  495|   503k|}
encode.c:conv_ascii2bin:
   95|  1.47G|{
   96|  1.47G|    if (a & 0x80)
  ------------------
  |  Branch (96:9): [True: 0, False: 1.47G]
  ------------------
   97|      0|        return B64_ERROR;
  ------------------
  |  |   57|      0|#define B64_ERROR 0xFF
  ------------------
   98|  1.47G|    return table[a];
   99|  1.47G|}
encode.c:evp_decodeblock_int:
  399|  11.4M|{
  400|  11.4M|    int i, ret = 0, a, b, c, d;
  401|  11.4M|    unsigned long l;
  402|  11.4M|    const unsigned char *table;
  403|       |
  404|  11.4M|    if (eof < -1 || eof > 2)
  ------------------
  |  Branch (404:9): [True: 0, False: 11.4M]
  |  Branch (404:21): [True: 0, False: 11.4M]
  ------------------
  405|      0|        return -1;
  406|       |
  407|  11.4M|    if (ctx != NULL && (ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  627|  11.4M|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (407:9): [True: 11.4M, False: 0]
  |  Branch (407:24): [True: 0, False: 11.4M]
  ------------------
  408|      0|        table = srpdata_ascii2bin;
  409|  11.4M|    else
  410|  11.4M|        table = data_ascii2bin;
  411|       |
  412|       |    /* trim whitespace from the start of the line. */
  413|  11.4M|    while ((n > 0) && (conv_ascii2bin(*f, table) == B64_WS)) {
  ------------------
  |  |   56|  11.4M|#define B64_WS 0xE0
  ------------------
  |  Branch (413:12): [True: 11.4M, False: 0]
  |  Branch (413:23): [True: 0, False: 11.4M]
  ------------------
  414|      0|        f++;
  415|      0|        n--;
  416|      0|    }
  417|       |
  418|       |    /*
  419|       |     * strip off stuff at the end of the line ascii2bin values B64_WS,
  420|       |     * B64_EOLN, B64_EOLN and B64_EOF
  421|       |     */
  422|  11.4M|    while ((n > 3) && (B64_NOT_BASE64(conv_ascii2bin(f[n - 1], table))))
  ------------------
  |  |   58|  11.4M|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  ------------------
  |  Branch (422:12): [True: 11.4M, False: 0]
  |  Branch (422:23): [True: 0, False: 11.4M]
  ------------------
  423|      0|        n--;
  424|       |
  425|  11.4M|    if (n % 4 != 0)
  ------------------
  |  Branch (425:9): [True: 0, False: 11.4M]
  ------------------
  426|      0|        return -1;
  427|  11.4M|    if (n == 0)
  ------------------
  |  Branch (427:9): [True: 0, False: 11.4M]
  ------------------
  428|      0|        return 0;
  429|       |
  430|       |    /* all 4-byte blocks except the last one do not have padding. */
  431|   179M|    for (i = 0; i < n - 4; i += 4) {
  ------------------
  |  Branch (431:17): [True: 168M, False: 11.4M]
  ------------------
  432|   168M|        a = conv_ascii2bin(*(f++), table);
  433|   168M|        b = conv_ascii2bin(*(f++), table);
  434|   168M|        c = conv_ascii2bin(*(f++), table);
  435|   168M|        d = conv_ascii2bin(*(f++), table);
  436|   168M|        if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (436:13): [True: 0, False: 168M]
  ------------------
  437|      0|            return -1;
  438|   168M|        l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  439|   168M|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  440|   168M|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  441|   168M|        *(t++) = (unsigned char)(l) & 0xff;
  442|   168M|        ret += 3;
  443|   168M|    }
  444|       |
  445|       |    /* process the last block that may have padding. */
  446|  11.4M|    a = conv_ascii2bin(*(f++), table);
  447|  11.4M|    b = conv_ascii2bin(*(f++), table);
  448|  11.4M|    c = conv_ascii2bin(*(f++), table);
  449|  11.4M|    d = conv_ascii2bin(*(f++), table);
  450|  11.4M|    if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (450:9): [True: 0, False: 11.4M]
  ------------------
  451|      0|        return -1;
  452|  11.4M|    l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  453|       |
  454|  11.4M|    if (eof == -1)
  ------------------
  |  Branch (454:9): [True: 0, False: 11.4M]
  ------------------
  455|      0|        eof = (c == '=') + (d == '=');
  456|       |
  457|  11.4M|    switch (eof) {
  ------------------
  |  Branch (457:13): [True: 11.4M, False: 0]
  ------------------
  458|   112k|    case 2:
  ------------------
  |  Branch (458:5): [True: 112k, False: 11.3M]
  ------------------
  459|   112k|        *t = (unsigned char)(l >> 16L) & 0xff;
  460|   112k|        break;
  461|   162k|    case 1:
  ------------------
  |  Branch (461:5): [True: 162k, False: 11.3M]
  ------------------
  462|   162k|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  463|   162k|        *t = (unsigned char)(l >> 8L) & 0xff;
  464|   162k|        break;
  465|  11.1M|    case 0:
  ------------------
  |  Branch (465:5): [True: 11.1M, False: 274k]
  ------------------
  466|  11.1M|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  467|  11.1M|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  468|  11.1M|        *t = (unsigned char)(l) & 0xff;
  469|  11.1M|        break;
  470|  11.4M|    }
  471|  11.4M|    ret += 3 - eof;
  472|       |
  473|  11.4M|    return ret;
  474|  11.4M|}

EVP_CIPHER_CTX_reset:
   29|  5.35k|{
   30|  5.35k|    if (ctx == NULL)
  ------------------
  |  Branch (30:9): [True: 0, False: 5.35k]
  ------------------
   31|      0|        return 1;
   32|       |
   33|  5.35k|    if (ctx->cipher == NULL || ctx->cipher->prov == NULL)
  ------------------
  |  Branch (33:9): [True: 0, False: 5.35k]
  |  Branch (33:32): [True: 0, False: 5.35k]
  ------------------
   34|      0|        return 1;
   35|       |
   36|  5.35k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (36:9): [True: 5.35k, False: 0]
  ------------------
   37|  5.35k|        if (ctx->cipher->freectx != NULL)
  ------------------
  |  Branch (37:13): [True: 5.35k, False: 0]
  ------------------
   38|  5.35k|            ctx->cipher->freectx(ctx->algctx);
   39|  5.35k|        ctx->algctx = NULL;
   40|  5.35k|    }
   41|  5.35k|    if (ctx->fetched_cipher != NULL)
  ------------------
  |  Branch (41:9): [True: 5.35k, False: 0]
  ------------------
   42|  5.35k|        EVP_CIPHER_free(ctx->fetched_cipher);
   43|  5.35k|    memset(ctx, 0, sizeof(*ctx));
   44|  5.35k|    ctx->iv_len = -1;
   45|       |
   46|  5.35k|    return 1;
   47|  5.35k|}
EVP_CIPHER_CTX_new:
   50|  5.36k|{
   51|  5.36k|    EVP_CIPHER_CTX *ctx;
   52|       |
   53|  5.36k|    ctx = OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
  ------------------
  |  |  109|  5.36k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|  5.36k|    if (ctx == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 5.36k]
  ------------------
   55|      0|        return NULL;
   56|       |
   57|  5.36k|    ctx->iv_len = -1;
   58|  5.36k|    return ctx;
   59|  5.36k|}
EVP_CIPHER_CTX_free:
   62|  20.8k|{
   63|  20.8k|    if (ctx == NULL)
  ------------------
  |  Branch (63:9): [True: 15.5k, False: 5.35k]
  ------------------
   64|  15.5k|        return;
   65|  5.35k|    EVP_CIPHER_CTX_reset(ctx);
   66|  5.35k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  5.35k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|  5.35k|}
EVP_CipherInit_ex:
  411|   121k|{
  412|   121k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|   121k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   121k|    __FILE__, __LINE__)
  ------------------
  |  Branch (412:9): [True: 0, False: 121k]
  ------------------
  413|      0|        return 0;
  414|   121k|    return evp_cipher_init_internal(ctx, cipher, key, iv, enc, 0, NULL);
  415|   121k|}
EVP_CipherUpdate:
  479|   111k|{
  480|   111k|    if (ctx->encrypt)
  ------------------
  |  Branch (480:9): [True: 111k, False: 0]
  ------------------
  481|   111k|        return EVP_EncryptUpdate(ctx, out, outl, in, inl);
  482|      0|    else
  483|      0|        return EVP_DecryptUpdate(ctx, out, outl, in, inl);
  484|   111k|}
EVP_EncryptUpdate:
  652|   111k|{
  653|   111k|    int ret;
  654|   111k|    size_t soutl, inl_ = (size_t)inl;
  655|   111k|    int blocksize;
  656|       |
  657|   111k|    if (inl < 0) {
  ------------------
  |  Branch (657:9): [True: 0, False: 111k]
  ------------------
  658|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  659|      0|        return 0;
  660|      0|    }
  661|       |
  662|   111k|    if (ossl_likely(outl != NULL)) {
  ------------------
  |  |   22|   111k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 111k, False: 0]
  |  |  ------------------
  ------------------
  663|   111k|        *outl = 0;
  664|   111k|    } else {
  665|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  666|      0|        return 0;
  667|      0|    }
  668|       |
  669|       |    /* Prevent accidental use of decryption context when encrypting */
  670|   111k|    if (ossl_unlikely(!ctx->encrypt)) {
  ------------------
  |  |   23|   111k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 111k]
  |  |  ------------------
  ------------------
  671|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  672|      0|        return 0;
  673|      0|    }
  674|       |
  675|   111k|    if (ossl_unlikely(ctx->cipher == NULL)) {
  ------------------
  |  |   23|   111k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 111k]
  |  |  ------------------
  ------------------
  676|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  677|      0|        return 0;
  678|      0|    }
  679|       |
  680|   111k|    if (ossl_unlikely(ctx->cipher->prov == NULL))
  ------------------
  |  |   23|   111k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 111k]
  |  |  ------------------
  ------------------
  681|      0|        return 0;
  682|       |
  683|   111k|    blocksize = ctx->cipher->block_size;
  684|       |
  685|   111k|    if (ossl_unlikely(ctx->cipher->cupdate == NULL || blocksize < 1)) {
  ------------------
  |  |   23|   222k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 111k]
  |  |  |  Branch (23:46): [True: 0, False: 111k]
  |  |  |  Branch (23:46): [True: 0, False: 111k]
  |  |  ------------------
  ------------------
  686|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  687|      0|        return 0;
  688|      0|    }
  689|       |
  690|   111k|    ret = ctx->cipher->cupdate(ctx->algctx, out, &soutl,
  691|   111k|        inl_ + (size_t)(blocksize == 1 ? 0 : blocksize),
  ------------------
  |  Branch (691:25): [True: 32.6k, False: 78.5k]
  ------------------
  692|   111k|        in, inl_);
  693|       |
  694|   111k|    if (ossl_likely(ret)) {
  ------------------
  |  |   22|   111k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 111k, False: 0]
  |  |  ------------------
  ------------------
  695|   111k|        if (ossl_unlikely(soutl > INT_MAX)) {
  ------------------
  |  |   23|   111k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 111k]
  |  |  ------------------
  ------------------
  696|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  697|      0|            return 0;
  698|      0|        }
  699|   111k|        *outl = (int)soutl;
  700|   111k|    }
  701|       |
  702|   111k|    return ret;
  703|   111k|}
EVP_CIPHER_get_params:
 1130|  53.7k|{
 1131|  53.7k|    if (cipher != NULL && cipher->get_params != NULL)
  ------------------
  |  Branch (1131:9): [True: 53.7k, False: 0]
  |  Branch (1131:27): [True: 53.7k, False: 0]
  ------------------
 1132|  53.7k|        return cipher->get_params(params);
 1133|      0|    return 0;
 1134|  53.7k|}
EVP_CIPHER_gettable_ctx_params:
 1188|  92.1k|{
 1189|  92.1k|    void *provctx;
 1190|       |
 1191|  92.1k|    if (cipher != NULL && cipher->gettable_ctx_params != NULL) {
  ------------------
  |  Branch (1191:9): [True: 92.1k, False: 0]
  |  Branch (1191:27): [True: 92.1k, False: 0]
  ------------------
 1192|  92.1k|        provctx = ossl_provider_ctx(EVP_CIPHER_get0_provider(cipher));
 1193|  92.1k|        return cipher->gettable_ctx_params(NULL, provctx);
 1194|  92.1k|    }
 1195|      0|    return NULL;
 1196|  92.1k|}
evp_cipher_new:
 1302|  92.1k|{
 1303|  92.1k|    EVP_CIPHER *cipher = OPENSSL_zalloc(sizeof(EVP_CIPHER));
  ------------------
  |  |  109|  92.1k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1304|       |
 1305|  92.1k|    if (cipher != NULL && !CRYPTO_NEW_REF(&cipher->refcnt, 1)) {
  ------------------
  |  Branch (1305:9): [True: 92.1k, False: 0]
  |  Branch (1305:27): [True: 0, False: 92.1k]
  ------------------
 1306|      0|        OPENSSL_free(cipher);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1307|      0|        return NULL;
 1308|      0|    }
 1309|  92.1k|    return cipher;
 1310|  92.1k|}
EVP_CIPHER_fetch:
 1530|  86.7k|{
 1531|  86.7k|    EVP_CIPHER *cipher = evp_generic_fetch(ctx, OSSL_OP_CIPHER, algorithm, properties,
  ------------------
  |  |  284|  86.7k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
 1532|  86.7k|        evp_cipher_from_algorithm, evp_cipher_up_ref,
 1533|  86.7k|        evp_cipher_free);
 1534|       |
 1535|  86.7k|    return cipher;
 1536|  86.7k|}
evp_cipher_fetch_from_prov:
 1541|  3.57k|{
 1542|  3.57k|    return evp_generic_fetch_from_prov(prov, OSSL_OP_CIPHER,
  ------------------
  |  |  284|  3.57k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
 1543|  3.57k|        algorithm, properties,
 1544|  3.57k|        evp_cipher_from_algorithm,
 1545|  3.57k|        evp_cipher_up_ref,
 1546|  3.57k|        evp_cipher_free);
 1547|  3.57k|}
EVP_CIPHER_up_ref:
 1559|   164k|{
 1560|   164k|    int ref = 0;
 1561|       |
 1562|   164k|    if (cipher->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   164k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1562:9): [True: 164k, False: 0]
  ------------------
 1563|   164k|        CRYPTO_UP_REF(&cipher->refcnt, &ref);
 1564|   164k|    return 1;
 1565|   164k|}
evp_cipher_free_int:
 1568|  92.0k|{
 1569|  92.0k|    OPENSSL_free(cipher->type_name);
  ------------------
  |  |  132|  92.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1570|  92.0k|    ossl_provider_free(cipher->prov);
 1571|  92.0k|    CRYPTO_FREE_REF(&cipher->refcnt);
 1572|  92.0k|    OPENSSL_free(cipher);
  ------------------
  |  |  132|  92.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1573|  92.0k|}
EVP_CIPHER_free:
 1576|   265k|{
 1577|   265k|    int i;
 1578|       |
 1579|   265k|    if (cipher == NULL || cipher->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   256k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1579:9): [True: 8.94k, False: 256k]
  |  Branch (1579:27): [True: 0, False: 256k]
  ------------------
 1580|  8.94k|        return;
 1581|       |
 1582|   256k|    CRYPTO_DOWN_REF(&cipher->refcnt, &i);
 1583|   256k|    if (i > 0)
  ------------------
  |  Branch (1583:9): [True: 164k, False: 92.0k]
  ------------------
 1584|   164k|        return;
 1585|  92.0k|    evp_cipher_free_int(cipher);
 1586|  92.0k|}
evp_enc.c:evp_cipher_init_internal:
   75|   121k|{
   76|       |    /*
   77|       |     * enc == 1 means we are encrypting.
   78|       |     * enc == 0 means we are decrypting.
   79|       |     * enc == -1 means, use the previously initialised value for encrypt/decrypt
   80|       |     */
   81|   121k|    if (enc == -1) {
  ------------------
  |  Branch (81:9): [True: 115k, False: 5.36k]
  ------------------
   82|   115k|        enc = ctx->encrypt;
   83|   115k|    } else {
   84|  5.36k|        if (enc)
  ------------------
  |  Branch (84:13): [True: 5.36k, False: 0]
  ------------------
   85|  5.36k|            enc = 1;
   86|  5.36k|        ctx->encrypt = enc;
   87|  5.36k|    }
   88|       |
   89|   121k|    if (cipher == NULL && ctx->cipher == NULL) {
  ------------------
  |  Branch (89:9): [True: 115k, False: 5.36k]
  |  Branch (89:27): [True: 0, False: 115k]
  ------------------
   90|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   91|      0|        return 0;
   92|      0|    }
   93|       |
   94|       |    /* Ensure a context left lying around from last time is cleared */
   95|   121k|    if (cipher != NULL && ctx->cipher != NULL) {
  ------------------
  |  Branch (95:9): [True: 5.36k, False: 115k]
  |  Branch (95:27): [True: 0, False: 5.36k]
  ------------------
   96|      0|        unsigned long flags = ctx->flags;
   97|       |
   98|      0|        EVP_CIPHER_CTX_reset(ctx);
   99|       |        /* Restore encrypt and flags */
  100|      0|        ctx->encrypt = enc;
  101|      0|        ctx->flags = flags;
  102|      0|    }
  103|       |
  104|   121k|    if (cipher == NULL)
  ------------------
  |  Branch (104:9): [True: 115k, False: 5.36k]
  ------------------
  105|   115k|        cipher = ctx->cipher;
  106|       |
  107|   121k|    if (cipher->prov == NULL) {
  ------------------
  |  Branch (107:9): [True: 0, False: 121k]
  ------------------
  108|       |#ifdef FIPS_MODULE
  109|       |        /* We only do explicit fetches inside the FIPS module */
  110|       |        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  111|       |        return 0;
  112|       |#else
  113|      0|        EVP_CIPHER *provciph = EVP_CIPHER_fetch(NULL,
  114|      0|            cipher->nid == NID_undef ? "NULL"
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|                                     : OBJ_nid2sn(cipher->nid),
  116|      0|            "");
  117|       |
  118|      0|        if (provciph == NULL)
  ------------------
  |  Branch (118:13): [True: 0, False: 0]
  ------------------
  119|      0|            return 0;
  120|      0|        cipher = provciph;
  121|      0|        EVP_CIPHER_free(ctx->fetched_cipher);
  122|      0|        ctx->fetched_cipher = provciph;
  123|      0|#endif
  124|      0|    }
  125|       |
  126|   121k|    if (!ossl_assert(cipher->prov != NULL)) {
  ------------------
  |  |   52|   121k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   121k|    __FILE__, __LINE__)
  ------------------
  |  Branch (126:9): [True: 0, False: 121k]
  ------------------
  127|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  128|      0|        return 0;
  129|      0|    }
  130|       |
  131|   121k|    if (cipher != ctx->fetched_cipher) {
  ------------------
  |  Branch (131:9): [True: 5.36k, False: 115k]
  ------------------
  132|  5.36k|        if (!EVP_CIPHER_up_ref((EVP_CIPHER *)cipher)) {
  ------------------
  |  Branch (132:13): [True: 0, False: 5.36k]
  ------------------
  133|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  134|      0|            return 0;
  135|      0|        }
  136|  5.36k|        EVP_CIPHER_free(ctx->fetched_cipher);
  137|       |        /* Coverity false positive, the reference counting is confusing it */
  138|       |        /* coverity[use_after_free] */
  139|  5.36k|        ctx->fetched_cipher = (EVP_CIPHER *)cipher;
  140|  5.36k|    }
  141|   121k|    ctx->cipher = cipher;
  142|       |
  143|   121k|    if (is_pipeline && !EVP_CIPHER_can_pipeline(cipher, enc)) {
  ------------------
  |  Branch (143:9): [True: 0, False: 121k]
  |  Branch (143:24): [True: 0, False: 0]
  ------------------
  144|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_PIPELINE_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  145|      0|        return 0;
  146|      0|    }
  147|       |
  148|   121k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (148:9): [True: 5.36k, False: 115k]
  ------------------
  149|  5.36k|        ctx->algctx = ctx->cipher->newctx(ossl_provider_ctx(cipher->prov));
  150|  5.36k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (150:13): [True: 0, False: 5.36k]
  ------------------
  151|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  152|      0|            return 0;
  153|      0|        }
  154|  5.36k|    }
  155|       |
  156|   121k|    if ((ctx->flags & EVP_CIPH_NO_PADDING) != 0) {
  ------------------
  |  |  234|   121k|#define EVP_CIPH_NO_PADDING 0x100
  ------------------
  |  Branch (156:9): [True: 0, False: 121k]
  ------------------
  157|       |        /*
  158|       |         * If this ctx was already set up for no padding then we need to tell
  159|       |         * the new cipher about it.
  160|       |         */
  161|      0|        if (!EVP_CIPHER_CTX_set_padding(ctx, 0))
  ------------------
  |  Branch (161:13): [True: 0, False: 0]
  ------------------
  162|      0|            return 0;
  163|      0|    }
  164|       |
  165|   121k|#ifndef FIPS_MODULE
  166|       |    /*
  167|       |     * Fix for CVE-2023-5363
  168|       |     * Passing in a size as part of the init call takes effect late
  169|       |     * so, force such to occur before the initialisation.
  170|       |     *
  171|       |     * The FIPS provider's internal library context is used in a manner
  172|       |     * such that this is not an issue.
  173|       |     */
  174|   121k|    if (params != NULL) {
  ------------------
  |  Branch (174:9): [True: 0, False: 121k]
  ------------------
  175|      0|        OSSL_PARAM param_lens[3] = { OSSL_PARAM_END, OSSL_PARAM_END,
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM param_lens[3] = { OSSL_PARAM_END, OSSL_PARAM_END,
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
  176|      0|            OSSL_PARAM_END };
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
  177|      0|        OSSL_PARAM *q = param_lens;
  178|      0|        const OSSL_PARAM *p;
  179|       |
  180|      0|        p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN);
  ------------------
  |  |  197|      0|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  181|      0|        if (p != NULL)
  ------------------
  |  Branch (181:13): [True: 0, False: 0]
  ------------------
  182|      0|            memcpy(q++, p, sizeof(*q));
  183|       |
  184|       |        /*
  185|       |         * Note that OSSL_CIPHER_PARAM_AEAD_IVLEN is a synonym for
  186|       |         * OSSL_CIPHER_PARAM_IVLEN so both are covered here.
  187|       |         */
  188|      0|        p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_IVLEN);
  ------------------
  |  |  196|      0|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  189|      0|        if (p != NULL)
  ------------------
  |  Branch (189:13): [True: 0, False: 0]
  ------------------
  190|      0|            memcpy(q++, p, sizeof(*q));
  191|       |
  192|      0|        if (q != param_lens) {
  ------------------
  |  Branch (192:13): [True: 0, False: 0]
  ------------------
  193|      0|            if (!EVP_CIPHER_CTX_set_params(ctx, param_lens)) {
  ------------------
  |  Branch (193:17): [True: 0, False: 0]
  ------------------
  194|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  195|      0|                return 0;
  196|      0|            }
  197|      0|        }
  198|      0|    }
  199|   121k|#endif
  200|       |
  201|   121k|    if (is_pipeline)
  ------------------
  |  Branch (201:9): [True: 0, False: 121k]
  ------------------
  202|      0|        return 1;
  203|       |
  204|   121k|    if (enc) {
  ------------------
  |  Branch (204:9): [True: 121k, False: 0]
  ------------------
  205|   121k|        if (ctx->cipher->einit == NULL) {
  ------------------
  |  Branch (205:13): [True: 0, False: 121k]
  ------------------
  206|       |            /*
  207|       |             * We still should be able to set the IV using the new API
  208|       |             * if the key is not specified and old API is not available
  209|       |             */
  210|      0|            if (key == NULL && ctx->cipher->einit_skey != NULL) {
  ------------------
  |  Branch (210:17): [True: 0, False: 0]
  |  Branch (210:32): [True: 0, False: 0]
  ------------------
  211|      0|                return ctx->cipher->einit_skey(ctx->algctx, NULL,
  212|      0|                    iv,
  213|      0|                    iv == NULL ? 0
  ------------------
  |  Branch (213:21): [True: 0, False: 0]
  ------------------
  214|      0|                               : EVP_CIPHER_CTX_get_iv_length(ctx),
  215|      0|                    params);
  216|      0|            }
  217|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|            return 0;
  219|      0|        }
  220|       |
  221|   121k|        return ctx->cipher->einit(ctx->algctx,
  222|   121k|            key,
  223|   121k|            key == NULL ? 0
  ------------------
  |  Branch (223:13): [True: 36.1k, False: 84.8k]
  ------------------
  224|   121k|                        : EVP_CIPHER_CTX_get_key_length(ctx),
  225|   121k|            iv,
  226|   121k|            iv == NULL ? 0
  ------------------
  |  Branch (226:13): [True: 88.4k, False: 32.6k]
  ------------------
  227|   121k|                       : EVP_CIPHER_CTX_get_iv_length(ctx),
  228|   121k|            params);
  229|   121k|    }
  230|       |
  231|      0|    if (ctx->cipher->dinit == NULL) {
  ------------------
  |  Branch (231:9): [True: 0, False: 0]
  ------------------
  232|       |        /*
  233|       |         * We still should be able to set the IV using the new API
  234|       |         * if the key is not specified and old API is not available
  235|       |         */
  236|      0|        if (key == NULL && ctx->cipher->dinit_skey != NULL) {
  ------------------
  |  Branch (236:13): [True: 0, False: 0]
  |  Branch (236:28): [True: 0, False: 0]
  ------------------
  237|      0|            return ctx->cipher->dinit_skey(ctx->algctx, NULL,
  238|      0|                iv,
  239|      0|                iv == NULL ? 0
  ------------------
  |  Branch (239:17): [True: 0, False: 0]
  ------------------
  240|      0|                           : EVP_CIPHER_CTX_get_iv_length(ctx),
  241|      0|                params);
  242|      0|        }
  243|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  244|      0|        return 0;
  245|      0|    }
  246|       |
  247|      0|    return ctx->cipher->dinit(ctx->algctx,
  248|      0|        key,
  249|      0|        key == NULL ? 0
  ------------------
  |  Branch (249:9): [True: 0, False: 0]
  ------------------
  250|      0|                    : EVP_CIPHER_CTX_get_key_length(ctx),
  251|      0|        iv,
  252|      0|        iv == NULL ? 0
  ------------------
  |  Branch (252:9): [True: 0, False: 0]
  ------------------
  253|      0|                   : EVP_CIPHER_CTX_get_iv_length(ctx),
  254|      0|        params);
  255|      0|}
evp_enc.c:evp_cipher_from_algorithm:
 1346|  92.1k|{
 1347|  92.1k|    const OSSL_DISPATCH *fns = algodef->implementation;
 1348|  92.1k|    EVP_CIPHER *cipher = NULL;
 1349|  92.1k|    int fnciphcnt = 0, encinit = 0, decinit = 0, fnpipecnt = 0, fnctxcnt = 0;
 1350|       |
 1351|  92.1k|    if ((cipher = evp_cipher_new()) == NULL) {
  ------------------
  |  Branch (1351:9): [True: 0, False: 92.1k]
  ------------------
 1352|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1353|      0|        return NULL;
 1354|      0|    }
 1355|       |
 1356|  92.1k|#ifndef FIPS_MODULE
 1357|  92.1k|    cipher->nid = NID_undef;
  ------------------
  |  |   18|  92.1k|#define NID_undef                       0
  ------------------
 1358|  92.1k|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &cipher->nid)
  ------------------
  |  Branch (1358:9): [True: 0, False: 92.1k]
  ------------------
 1359|  92.1k|        || cipher->nid == -1) {
  ------------------
  |  Branch (1359:12): [True: 0, False: 92.1k]
  ------------------
 1360|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1361|      0|        goto err;
 1362|      0|    }
 1363|  92.1k|#endif
 1364|       |
 1365|  92.1k|    cipher->name_id = name_id;
 1366|  92.1k|    if ((cipher->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (1366:9): [True: 0, False: 92.1k]
  ------------------
 1367|      0|        goto err;
 1368|       |
 1369|  92.1k|    cipher->description = algodef->algorithm_description;
 1370|       |
 1371|  1.46M|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1371:12): [True: 1.37M, False: 92.1k]
  ------------------
 1372|  1.37M|        switch (fns->function_id) {
  ------------------
  |  Branch (1372:17): [True: 1.37M, False: 0]
  ------------------
 1373|  92.1k|        case OSSL_FUNC_CIPHER_NEWCTX:
  ------------------
  |  |  357|  92.1k|#define OSSL_FUNC_CIPHER_NEWCTX 1
  ------------------
  |  Branch (1373:9): [True: 92.1k, False: 1.28M]
  ------------------
 1374|  92.1k|            if (cipher->newctx != NULL)
  ------------------
  |  Branch (1374:17): [True: 0, False: 92.1k]
  ------------------
 1375|      0|                break;
 1376|  92.1k|            cipher->newctx = OSSL_FUNC_cipher_newctx(fns);
 1377|  92.1k|            fnctxcnt++;
 1378|  92.1k|            break;
 1379|  92.1k|        case OSSL_FUNC_CIPHER_ENCRYPT_INIT:
  ------------------
  |  |  358|  92.1k|#define OSSL_FUNC_CIPHER_ENCRYPT_INIT 2
  ------------------
  |  Branch (1379:9): [True: 92.1k, False: 1.28M]
  ------------------
 1380|  92.1k|            if (cipher->einit != NULL)
  ------------------
  |  Branch (1380:17): [True: 0, False: 92.1k]
  ------------------
 1381|      0|                break;
 1382|  92.1k|            cipher->einit = OSSL_FUNC_cipher_encrypt_init(fns);
 1383|  92.1k|            encinit = 1;
 1384|  92.1k|            break;
 1385|  92.1k|        case OSSL_FUNC_CIPHER_DECRYPT_INIT:
  ------------------
  |  |  359|  92.1k|#define OSSL_FUNC_CIPHER_DECRYPT_INIT 3
  ------------------
  |  Branch (1385:9): [True: 92.1k, False: 1.28M]
  ------------------
 1386|  92.1k|            if (cipher->dinit != NULL)
  ------------------
  |  Branch (1386:17): [True: 0, False: 92.1k]
  ------------------
 1387|      0|                break;
 1388|  92.1k|            cipher->dinit = OSSL_FUNC_cipher_decrypt_init(fns);
 1389|  92.1k|            decinit = 1;
 1390|  92.1k|            break;
 1391|  48.2k|        case OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT:
  ------------------
  |  |  375|  48.2k|#define OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT 19
  ------------------
  |  Branch (1391:9): [True: 48.2k, False: 1.32M]
  ------------------
 1392|  48.2k|            if (cipher->einit_skey != NULL)
  ------------------
  |  Branch (1392:17): [True: 0, False: 48.2k]
  ------------------
 1393|      0|                break;
 1394|  48.2k|            cipher->einit_skey = OSSL_FUNC_cipher_encrypt_skey_init(fns);
 1395|  48.2k|            encinit = 1;
 1396|  48.2k|            break;
 1397|  48.2k|        case OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT:
  ------------------
  |  |  376|  48.2k|#define OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT 20
  ------------------
  |  Branch (1397:9): [True: 48.2k, False: 1.32M]
  ------------------
 1398|  48.2k|            if (cipher->dinit_skey != NULL)
  ------------------
  |  Branch (1398:17): [True: 0, False: 48.2k]
  ------------------
 1399|      0|                break;
 1400|  48.2k|            cipher->dinit_skey = OSSL_FUNC_cipher_decrypt_skey_init(fns);
 1401|  48.2k|            decinit = 1;
 1402|  48.2k|            break;
 1403|  92.1k|        case OSSL_FUNC_CIPHER_UPDATE:
  ------------------
  |  |  360|  92.1k|#define OSSL_FUNC_CIPHER_UPDATE 4
  ------------------
  |  Branch (1403:9): [True: 92.1k, False: 1.28M]
  ------------------
 1404|  92.1k|            if (cipher->cupdate != NULL)
  ------------------
  |  Branch (1404:17): [True: 0, False: 92.1k]
  ------------------
 1405|      0|                break;
 1406|  92.1k|            cipher->cupdate = OSSL_FUNC_cipher_update(fns);
 1407|  92.1k|            fnciphcnt++;
 1408|  92.1k|            break;
 1409|  92.1k|        case OSSL_FUNC_CIPHER_FINAL:
  ------------------
  |  |  361|  92.1k|#define OSSL_FUNC_CIPHER_FINAL 5
  ------------------
  |  Branch (1409:9): [True: 92.1k, False: 1.28M]
  ------------------
 1410|  92.1k|            if (cipher->cfinal != NULL)
  ------------------
  |  Branch (1410:17): [True: 0, False: 92.1k]
  ------------------
 1411|      0|                break;
 1412|  92.1k|            cipher->cfinal = OSSL_FUNC_cipher_final(fns);
 1413|  92.1k|            fnciphcnt++;
 1414|  92.1k|            break;
 1415|  83.6k|        case OSSL_FUNC_CIPHER_CIPHER:
  ------------------
  |  |  362|  83.6k|#define OSSL_FUNC_CIPHER_CIPHER 6
  ------------------
  |  Branch (1415:9): [True: 83.6k, False: 1.29M]
  ------------------
 1416|  83.6k|            if (cipher->ccipher != NULL)
  ------------------
  |  Branch (1416:17): [True: 0, False: 83.6k]
  ------------------
 1417|      0|                break;
 1418|  83.6k|            cipher->ccipher = OSSL_FUNC_cipher_cipher(fns);
 1419|  83.6k|            break;
 1420|      0|        case OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT:
  ------------------
  |  |  371|      0|#define OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT 15
  ------------------
  |  Branch (1420:9): [True: 0, False: 1.37M]
  ------------------
 1421|      0|            if (cipher->p_einit != NULL)
  ------------------
  |  Branch (1421:17): [True: 0, False: 0]
  ------------------
 1422|      0|                break;
 1423|      0|            cipher->p_einit = OSSL_FUNC_cipher_pipeline_encrypt_init(fns);
 1424|      0|            fnpipecnt++;
 1425|      0|            break;
 1426|      0|        case OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT:
  ------------------
  |  |  372|      0|#define OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT 16
  ------------------
  |  Branch (1426:9): [True: 0, False: 1.37M]
  ------------------
 1427|      0|            if (cipher->p_dinit != NULL)
  ------------------
  |  Branch (1427:17): [True: 0, False: 0]
  ------------------
 1428|      0|                break;
 1429|      0|            cipher->p_dinit = OSSL_FUNC_cipher_pipeline_decrypt_init(fns);
 1430|      0|            fnpipecnt++;
 1431|      0|            break;
 1432|      0|        case OSSL_FUNC_CIPHER_PIPELINE_UPDATE:
  ------------------
  |  |  373|      0|#define OSSL_FUNC_CIPHER_PIPELINE_UPDATE 17
  ------------------
  |  Branch (1432:9): [True: 0, False: 1.37M]
  ------------------
 1433|      0|            if (cipher->p_cupdate != NULL)
  ------------------
  |  Branch (1433:17): [True: 0, False: 0]
  ------------------
 1434|      0|                break;
 1435|      0|            cipher->p_cupdate = OSSL_FUNC_cipher_pipeline_update(fns);
 1436|      0|            fnpipecnt++;
 1437|      0|            break;
 1438|      0|        case OSSL_FUNC_CIPHER_PIPELINE_FINAL:
  ------------------
  |  |  374|      0|#define OSSL_FUNC_CIPHER_PIPELINE_FINAL 18
  ------------------
  |  Branch (1438:9): [True: 0, False: 1.37M]
  ------------------
 1439|      0|            if (cipher->p_cfinal != NULL)
  ------------------
  |  Branch (1439:17): [True: 0, False: 0]
  ------------------
 1440|      0|                break;
 1441|      0|            cipher->p_cfinal = OSSL_FUNC_cipher_pipeline_final(fns);
 1442|      0|            fnpipecnt++;
 1443|      0|            break;
 1444|  92.1k|        case OSSL_FUNC_CIPHER_FREECTX:
  ------------------
  |  |  363|  92.1k|#define OSSL_FUNC_CIPHER_FREECTX 7
  ------------------
  |  Branch (1444:9): [True: 92.1k, False: 1.28M]
  ------------------
 1445|  92.1k|            if (cipher->freectx != NULL)
  ------------------
  |  Branch (1445:17): [True: 0, False: 92.1k]
  ------------------
 1446|      0|                break;
 1447|  92.1k|            cipher->freectx = OSSL_FUNC_cipher_freectx(fns);
 1448|  92.1k|            fnctxcnt++;
 1449|  92.1k|            break;
 1450|  91.4k|        case OSSL_FUNC_CIPHER_DUPCTX:
  ------------------
  |  |  364|  91.4k|#define OSSL_FUNC_CIPHER_DUPCTX 8
  ------------------
  |  Branch (1450:9): [True: 91.4k, False: 1.28M]
  ------------------
 1451|  91.4k|            if (cipher->dupctx != NULL)
  ------------------
  |  Branch (1451:17): [True: 0, False: 91.4k]
  ------------------
 1452|      0|                break;
 1453|  91.4k|            cipher->dupctx = OSSL_FUNC_cipher_dupctx(fns);
 1454|  91.4k|            break;
 1455|  92.1k|        case OSSL_FUNC_CIPHER_GET_PARAMS:
  ------------------
  |  |  365|  92.1k|#define OSSL_FUNC_CIPHER_GET_PARAMS 9
  ------------------
  |  Branch (1455:9): [True: 92.1k, False: 1.28M]
  ------------------
 1456|  92.1k|            if (cipher->get_params != NULL)
  ------------------
  |  Branch (1456:17): [True: 0, False: 92.1k]
  ------------------
 1457|      0|                break;
 1458|  92.1k|            cipher->get_params = OSSL_FUNC_cipher_get_params(fns);
 1459|  92.1k|            break;
 1460|  92.1k|        case OSSL_FUNC_CIPHER_GET_CTX_PARAMS:
  ------------------
  |  |  366|  92.1k|#define OSSL_FUNC_CIPHER_GET_CTX_PARAMS 10
  ------------------
  |  Branch (1460:9): [True: 92.1k, False: 1.28M]
  ------------------
 1461|  92.1k|            if (cipher->get_ctx_params != NULL)
  ------------------
  |  Branch (1461:17): [True: 0, False: 92.1k]
  ------------------
 1462|      0|                break;
 1463|  92.1k|            cipher->get_ctx_params = OSSL_FUNC_cipher_get_ctx_params(fns);
 1464|  92.1k|            break;
 1465|  92.1k|        case OSSL_FUNC_CIPHER_SET_CTX_PARAMS:
  ------------------
  |  |  367|  92.1k|#define OSSL_FUNC_CIPHER_SET_CTX_PARAMS 11
  ------------------
  |  Branch (1465:9): [True: 92.1k, False: 1.28M]
  ------------------
 1466|  92.1k|            if (cipher->set_ctx_params != NULL)
  ------------------
  |  Branch (1466:17): [True: 0, False: 92.1k]
  ------------------
 1467|      0|                break;
 1468|  92.1k|            cipher->set_ctx_params = OSSL_FUNC_cipher_set_ctx_params(fns);
 1469|  92.1k|            break;
 1470|  92.1k|        case OSSL_FUNC_CIPHER_GETTABLE_PARAMS:
  ------------------
  |  |  368|  92.1k|#define OSSL_FUNC_CIPHER_GETTABLE_PARAMS 12
  ------------------
  |  Branch (1470:9): [True: 92.1k, False: 1.28M]
  ------------------
 1471|  92.1k|            if (cipher->gettable_params != NULL)
  ------------------
  |  Branch (1471:17): [True: 0, False: 92.1k]
  ------------------
 1472|      0|                break;
 1473|  92.1k|            cipher->gettable_params = OSSL_FUNC_cipher_gettable_params(fns);
 1474|  92.1k|            break;
 1475|  92.1k|        case OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  369|  92.1k|#define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (1475:9): [True: 92.1k, False: 1.28M]
  ------------------
 1476|  92.1k|            if (cipher->gettable_ctx_params != NULL)
  ------------------
  |  Branch (1476:17): [True: 0, False: 92.1k]
  ------------------
 1477|      0|                break;
 1478|  92.1k|            cipher->gettable_ctx_params = OSSL_FUNC_cipher_gettable_ctx_params(fns);
 1479|  92.1k|            break;
 1480|  92.1k|        case OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  370|  92.1k|#define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS 14
  ------------------
  |  Branch (1480:9): [True: 92.1k, False: 1.28M]
  ------------------
 1481|  92.1k|            if (cipher->settable_ctx_params != NULL)
  ------------------
  |  Branch (1481:17): [True: 0, False: 92.1k]
  ------------------
 1482|      0|                break;
 1483|  92.1k|            cipher->settable_ctx_params = OSSL_FUNC_cipher_settable_ctx_params(fns);
 1484|  92.1k|            break;
 1485|  1.37M|        }
 1486|  1.37M|    }
 1487|  92.1k|    fnciphcnt += encinit + decinit;
 1488|  92.1k|    if ((fnciphcnt != 0 && fnciphcnt != 3 && fnciphcnt != 4)
  ------------------
  |  Branch (1488:10): [True: 92.1k, False: 0]
  |  Branch (1488:28): [True: 92.1k, False: 0]
  |  Branch (1488:46): [True: 0, False: 92.1k]
  ------------------
 1489|  92.1k|        || (fnciphcnt == 0 && cipher->ccipher == NULL && fnpipecnt == 0)
  ------------------
  |  Branch (1489:13): [True: 0, False: 92.1k]
  |  Branch (1489:31): [True: 0, False: 0]
  |  Branch (1489:58): [True: 0, False: 0]
  ------------------
 1490|  92.1k|        || (fnpipecnt != 0 && (fnpipecnt < 3 || cipher->p_cupdate == NULL || cipher->p_cfinal == NULL))
  ------------------
  |  Branch (1490:13): [True: 0, False: 92.1k]
  |  Branch (1490:32): [True: 0, False: 0]
  |  Branch (1490:49): [True: 0, False: 0]
  |  Branch (1490:78): [True: 0, False: 0]
  ------------------
 1491|  92.1k|        || fnctxcnt != 2) {
  ------------------
  |  Branch (1491:12): [True: 0, False: 92.1k]
  ------------------
 1492|       |        /*
 1493|       |         * In order to be a consistent set of functions we must have at least
 1494|       |         * a complete set of "encrypt" functions, or a complete set of "decrypt"
 1495|       |         * functions, or a single "cipher" function. In all cases we need both
 1496|       |         * the "newctx" and "freectx" functions.
 1497|       |         */
 1498|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1499|      0|        goto err;
 1500|      0|    }
 1501|  92.1k|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (1501:9): [True: 92.1k, False: 0]
  |  Branch (1501:25): [True: 0, False: 92.1k]
  ------------------
 1502|      0|        goto err;
 1503|       |
 1504|  92.1k|    cipher->prov = prov;
 1505|       |
 1506|  92.1k|    if (!evp_cipher_cache_constants(cipher)) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 92.1k]
  ------------------
 1507|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1508|      0|        goto err;
 1509|      0|    }
 1510|       |
 1511|  92.1k|    return cipher;
 1512|       |
 1513|      0|err:
 1514|      0|    EVP_CIPHER_free(cipher);
 1515|       |    return NULL;
 1516|  92.1k|}
evp_enc.c:set_legacy_nid:
 1320|   172k|{
 1321|   172k|    int nid;
 1322|   172k|    int *legacy_nid = vlegacy_nid;
 1323|       |    /*
 1324|       |     * We use lowest level function to get the associated method, because
 1325|       |     * higher level functions such as EVP_get_cipherbyname() have changed
 1326|       |     * to look at providers too.
 1327|       |     */
 1328|   172k|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_CIPHER_METH);
  ------------------
  |  |   26|   172k|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
 1329|       |
 1330|   172k|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (1330:9): [True: 0, False: 172k]
  ------------------
 1331|      0|        return;
 1332|   172k|    if (legacy_method == NULL)
  ------------------
  |  Branch (1332:9): [True: 77.2k, False: 95.0k]
  ------------------
 1333|  77.2k|        return;
 1334|  95.0k|    nid = EVP_CIPHER_get_nid(legacy_method);
 1335|  95.0k|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|   190k|#define NID_undef                       0
  ------------------
  |  Branch (1335:9): [True: 18.4k, False: 76.5k]
  |  Branch (1335:37): [True: 0, False: 18.4k]
  ------------------
 1336|      0|        *legacy_nid = -1;
 1337|      0|        return;
 1338|      0|    }
 1339|  95.0k|    *legacy_nid = nid;
 1340|  95.0k|}
evp_enc.c:evp_cipher_up_ref:
 1519|   158k|{
 1520|   158k|    return EVP_CIPHER_up_ref(cipher);
 1521|   158k|}
evp_enc.c:evp_cipher_free:
 1524|   193k|{
 1525|   193k|    EVP_CIPHER_free(cipher);
 1526|   193k|}

ossl_err_load_EVP_strings:
  230|      1|{
  231|      1|#ifndef OPENSSL_NO_ERR
  232|      1|    if (ERR_reason_error_string(EVP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (232:9): [True: 1, False: 0]
  ------------------
  233|      1|        ERR_load_strings_const(EVP_str_reasons);
  234|      1|#endif
  235|      1|    return 1;
  236|      1|}

evp_generic_fetch:
  398|   828k|{
  399|   828k|    struct evp_method_data_st methdata;
  400|   828k|    void *method;
  401|       |
  402|   828k|    methdata.libctx = libctx;
  403|   828k|    methdata.tmp_store = NULL;
  404|       |    method = inner_evp_generic_fetch(&methdata, NULL, operation_id,
  405|   828k|        name, properties,
  406|   828k|        new_method, up_ref_method, free_method);
  407|   828k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  408|   828k|    return method;
  409|   828k|}
evp_generic_fetch_from_prov:
  424|  3.57k|{
  425|  3.57k|    struct evp_method_data_st methdata;
  426|  3.57k|    void *method;
  427|       |
  428|  3.57k|    methdata.libctx = ossl_provider_libctx(prov);
  429|       |    methdata.tmp_store = NULL;
  430|  3.57k|    method = inner_evp_generic_fetch(&methdata, prov, operation_id,
  431|  3.57k|        name, properties,
  432|  3.57k|        new_method, up_ref_method, free_method);
  433|  3.57k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  434|  3.57k|    return method;
  435|  3.57k|}
evp_method_store_cache_flush:
  438|    899|{
  439|    899|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  440|       |
  441|    899|    if (store != NULL)
  ------------------
  |  Branch (441:9): [True: 899, False: 0]
  ------------------
  442|    899|        return ossl_method_store_cache_flush_all(store);
  443|      0|    return 1;
  444|    899|}
evp_method_store_remove_all_provided:
  447|    899|{
  448|    899|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  449|    899|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  450|       |
  451|    899|    if (store != NULL)
  ------------------
  |  Branch (451:9): [True: 899, False: 0]
  ------------------
  452|    899|        return ossl_method_store_remove_all_provided(store, prov);
  453|      0|    return 1;
  454|    899|}
evp_generic_do_all:
  638|      2|{
  639|      2|    struct evp_method_data_st methdata;
  640|      2|    struct filter_data_st data;
  641|       |
  642|      2|    methdata.libctx = libctx;
  643|      2|    methdata.tmp_store = NULL;
  644|      2|    (void)inner_evp_generic_fetch(&methdata, NULL, operation_id, NULL, NULL,
  645|      2|        new_method, up_ref_method, free_method);
  646|       |
  647|      2|    data.operation_id = operation_id;
  648|      2|    data.user_fn = user_fn;
  649|      2|    data.user_arg = user_arg;
  650|      2|    if (methdata.tmp_store != NULL)
  ------------------
  |  Branch (650:9): [True: 0, False: 2]
  ------------------
  651|      0|        ossl_method_store_do_all(methdata.tmp_store, &filter_on_operation_id,
  652|      0|            &data);
  653|      2|    ossl_method_store_do_all(get_evp_method_store(libctx),
  654|      2|        &filter_on_operation_id, &data);
  655|      2|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  656|      2|}
evp_is_a:
  660|  1.38M|{
  661|       |    /*
  662|       |     * For a |prov| that is NULL, the library context will be NULL
  663|       |     */
  664|  1.38M|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  665|  1.38M|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  666|       |
  667|  1.38M|    if (prov == NULL)
  ------------------
  |  Branch (667:9): [True: 441k, False: 944k]
  ------------------
  668|   441k|        number = ossl_namemap_name2num(namemap, legacy_name);
  669|  1.38M|    return ossl_namemap_name2num(namemap, name) == number;
  670|  1.38M|}
evp_names_do_all:
  675|   655k|{
  676|   655k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  677|   655k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  678|       |
  679|   655k|    return ossl_namemap_doall_names(namemap, number, fn, data);
  680|   655k|}
evp_fetch.c:inner_evp_generic_fetch:
  259|   831k|{
  260|   831k|    OSSL_METHOD_STORE *store = get_evp_method_store(methdata->libctx);
  261|   831k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  262|       |#ifdef FIPS_MODULE
  263|       |    /*
  264|       |     * The FIPS provider has its own internal library context where only it
  265|       |     * is loaded.  Consequently, property queries aren't relevant because
  266|       |     * there is only one fetchable algorithm and it is assumed that the
  267|       |     * FIPS-ness is handled by the using algorithm.
  268|       |     */
  269|       |    const char *const propq = "";
  270|       |#else
  271|   831k|    const char *const propq = properties != NULL ? properties : "";
  ------------------
  |  Branch (271:31): [True: 80.7k, False: 751k]
  ------------------
  272|   831k|#endif /* FIPS_MODULE */
  273|   831k|    uint32_t meth_id = 0;
  274|   831k|    void *method = NULL;
  275|   831k|    int unsupported, name_id;
  276|       |
  277|   831k|    if (store == NULL || namemap == NULL) {
  ------------------
  |  Branch (277:9): [True: 0, False: 831k]
  |  Branch (277:26): [True: 0, False: 831k]
  ------------------
  278|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  279|      0|        return NULL;
  280|      0|    }
  281|       |
  282|       |    /*
  283|       |     * If there's ever an operation_id == 0 passed, we have an internal
  284|       |     * programming error.
  285|       |     */
  286|   831k|    if (!ossl_assert(operation_id > 0)) {
  ------------------
  |  |   52|   831k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   831k|    __FILE__, __LINE__)
  ------------------
  |  Branch (286:9): [True: 0, False: 831k]
  ------------------
  287|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  288|      0|        return NULL;
  289|      0|    }
  290|       |
  291|       |    /* If we haven't received a name id yet, try to get one for the name */
  292|   831k|    name_id = ossl_namemap_name2num(namemap, name);
  293|       |
  294|       |    /*
  295|       |     * If we have a name id, calculate a method id with evp_method_id().
  296|       |     *
  297|       |     * evp_method_id returns 0 if we have too many operations (more than
  298|       |     * about 2^8) or too many names (more than about 2^24).  In that case,
  299|       |     * we can't create any new method.
  300|       |     * For all intents and purposes, this is an internal error.
  301|       |     */
  302|   831k|    if (name_id != 0 && (meth_id = evp_method_id(name_id, operation_id)) == 0) {
  ------------------
  |  Branch (302:9): [True: 792k, False: 39.4k]
  |  Branch (302:25): [True: 0, False: 792k]
  ------------------
  303|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  304|      0|        return NULL;
  305|      0|    }
  306|       |
  307|       |    /*
  308|       |     * If we haven't found the name yet, chances are that the algorithm to
  309|       |     * be fetched is unsupported.
  310|       |     */
  311|   831k|    unsupported = name_id == 0;
  312|       |
  313|   831k|    if (meth_id == 0
  ------------------
  |  Branch (313:9): [True: 39.4k, False: 792k]
  ------------------
  314|   792k|        || !ossl_method_store_cache_get(store, prov, meth_id, propq, &method)) {
  ------------------
  |  Branch (314:12): [True: 56.4k, False: 735k]
  ------------------
  315|  95.9k|        OSSL_METHOD_CONSTRUCT_METHOD mcm = {
  316|  95.9k|            get_tmp_evp_method_store,
  317|  95.9k|            reserve_evp_method_store,
  318|  95.9k|            unreserve_evp_method_store,
  319|  95.9k|            get_evp_method_from_store,
  320|  95.9k|            put_evp_method_in_store,
  321|  95.9k|            construct_evp_method,
  322|  95.9k|            destruct_evp_method
  323|  95.9k|        };
  324|       |
  325|  95.9k|        methdata->operation_id = operation_id;
  326|  95.9k|        methdata->name_id = name_id;
  327|  95.9k|        methdata->names = name;
  328|  95.9k|        methdata->propquery = propq;
  329|  95.9k|        methdata->method_from_algorithm = new_method;
  330|  95.9k|        methdata->refcnt_up_method = up_ref_method;
  331|  95.9k|        methdata->destruct_method = free_method;
  332|  95.9k|        methdata->flag_construct_error_occurred = 0;
  333|  95.9k|        if ((method = ossl_method_construct(methdata->libctx, operation_id,
  ------------------
  |  Branch (333:13): [True: 33.5k, False: 62.4k]
  ------------------
  334|  95.9k|                 &prov, 0 /* !force_cache */,
  335|  95.9k|                 &mcm, methdata))
  336|  95.9k|            != NULL) {
  337|       |            /*
  338|       |             * If construction did create a method for us, we know that
  339|       |             * there is a correct name_id and meth_id, since those have
  340|       |             * already been calculated in get_evp_method_from_store() and
  341|       |             * put_evp_method_in_store() above.
  342|       |             * Note that there is a corner case here, in which, if a user
  343|       |             * passes a name of the form name1:name2:..., then the construction
  344|       |             * will create a method against all names, but the lookup will fail
  345|       |             * as ossl_namemap_name2num treats the name string as a single name
  346|       |             * rather than introducing new features where in the EVP_<obj>_fetch
  347|       |             * parses the string and queries for each, return an error.
  348|       |             */
  349|  33.5k|            if (name_id == 0)
  ------------------
  |  Branch (349:17): [True: 1.19k, False: 32.3k]
  ------------------
  350|  1.19k|                name_id = ossl_namemap_name2num(namemap, name);
  351|  33.5k|            if (name_id == 0) {
  ------------------
  |  Branch (351:17): [True: 0, False: 33.5k]
  ------------------
  352|      0|                ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  318|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  353|      0|                    "Algorithm %s cannot be found", name != NULL ? name : "<null>");
  ------------------
  |  Branch (353:53): [True: 0, False: 0]
  ------------------
  354|      0|                free_method(method);
  355|      0|                method = NULL;
  356|  33.5k|            } else {
  357|  33.5k|                meth_id = evp_method_id(name_id, operation_id);
  358|  33.5k|                if (meth_id != 0)
  ------------------
  |  Branch (358:21): [True: 33.5k, False: 0]
  ------------------
  359|  33.5k|                    ossl_method_store_cache_set(store, prov, meth_id, propq,
  360|  33.5k|                        method, up_ref_method, free_method);
  361|  33.5k|            }
  362|  33.5k|        }
  363|       |
  364|       |        /*
  365|       |         * If we never were in the constructor, the algorithm to be fetched
  366|       |         * is unsupported.
  367|       |         */
  368|  95.9k|        unsupported = !methdata->flag_construct_error_occurred;
  369|  95.9k|    }
  370|       |
  371|   831k|    if ((name_id != 0 || name != NULL) && method == NULL) {
  ------------------
  |  Branch (371:10): [True: 793k, False: 38.2k]
  |  Branch (371:26): [True: 38.2k, False: 2]
  |  Branch (371:43): [True: 62.4k, False: 769k]
  ------------------
  372|  62.4k|        int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  317|  62.4k|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|  62.4k|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|  62.4k|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  318|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (372:20): [True: 62.4k, False: 0]
  ------------------
  373|       |
  374|  62.4k|        if (name == NULL)
  ------------------
  |  Branch (374:13): [True: 0, False: 62.4k]
  ------------------
  375|      0|            name = ossl_namemap_num2name(namemap, name_id, 0);
  376|  62.4k|        ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |  359|  62.4k|    (ERR_new(),                                                  \
  |  |  360|  62.4k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  62.4k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  62.4k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |   59|  62.4k|#define ERR_LIB_EVP 6
  ------------------
  377|  62.4k|            "%s, Algorithm (%s : %d), Properties (%s)",
  378|  62.4k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  379|  62.4k|            name == NULL ? "<null>" : name, name_id,
  ------------------
  |  Branch (379:13): [True: 0, False: 62.4k]
  ------------------
  380|  62.4k|            properties == NULL ? "<null>" : properties);
  ------------------
  |  Branch (380:13): [True: 44.6k, False: 17.7k]
  ------------------
  381|   769k|    } else {
  382|   769k|        OSSL_TRACE4(QUERY, "%s, Algorithm (%s : %d), Properties (%s)\n",
  ------------------
  |  |  297|   769k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  283|   769k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  383|   769k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  384|   769k|            name == NULL ? "<null>" : name, name_id,
  385|   769k|            properties == NULL ? "<null>" : properties);
  386|   769k|    }
  387|       |
  388|   831k|    return method;
  389|   831k|}
evp_fetch.c:evp_method_id:
  117|  1.07M|{
  118|  1.07M|    if (!ossl_assert(name_id > 0 && name_id <= METHOD_ID_NAME_MAX)
  ------------------
  |  |   52|  2.15M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 1.07M, False: 0]
  |  |  |  Branch (52:41): [True: 1.07M, False: 0]
  |  |  ------------------
  |  |   53|  2.15M|    __FILE__, __LINE__)
  ------------------
  |  Branch (118:9): [True: 0, False: 1.07M]
  ------------------
  119|  1.07M|        || !ossl_assert(operation_id > 0
  ------------------
  |  |   52|  2.15M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 1.07M, False: 0]
  |  |  |  Branch (52:41): [True: 1.07M, False: 0]
  |  |  ------------------
  |  |   53|  1.07M|    __FILE__, __LINE__)
  ------------------
  |  Branch (119:12): [True: 0, False: 1.07M]
  ------------------
  120|  1.07M|            && operation_id <= METHOD_ID_OPERATION_MAX))
  121|      0|        return 0;
  122|  1.07M|    return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  114|  1.07M|#define METHOD_ID_NAME_OFFSET 8
  ------------------
                  return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  113|  1.07M|#define METHOD_ID_NAME_MASK 0x7FFFFF00
  ------------------
  123|  1.07M|        | (operation_id & METHOD_ID_OPERATION_MASK));
  ------------------
  |  |  111|  1.07M|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  124|  1.07M|}
evp_fetch.c:reserve_evp_method_store:
   73|   159k|{
   74|   159k|    struct evp_method_data_st *methdata = data;
   75|       |
   76|   159k|    if (store == NULL
  ------------------
  |  Branch (76:9): [True: 159k, False: 0]
  ------------------
   77|   159k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (77:12): [True: 0, False: 159k]
  ------------------
   78|      0|        return 0;
   79|       |
   80|   159k|    return ossl_method_lock_store(store);
   81|   159k|}
evp_fetch.c:unreserve_evp_method_store:
   84|   159k|{
   85|   159k|    struct evp_method_data_st *methdata = data;
   86|       |
   87|   159k|    if (store == NULL
  ------------------
  |  Branch (87:9): [True: 159k, False: 0]
  ------------------
   88|   159k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (88:12): [True: 0, False: 159k]
  ------------------
   89|      0|        return 0;
   90|       |
   91|   159k|    return ossl_method_unlock_store(store);
   92|   159k|}
evp_fetch.c:get_evp_method_from_store:
  128|  95.9k|{
  129|  95.9k|    struct evp_method_data_st *methdata = data;
  130|  95.9k|    void *method = NULL;
  131|  95.9k|    int name_id;
  132|  95.9k|    uint32_t meth_id;
  133|       |
  134|       |    /*
  135|       |     * get_evp_method_from_store() is only called to try and get the method
  136|       |     * that evp_generic_fetch() is asking for, and the operation id as well
  137|       |     * as the name or name id are passed via methdata.
  138|       |     */
  139|  95.9k|    if ((name_id = methdata->name_id) == 0 && methdata->names != NULL) {
  ------------------
  |  Branch (139:9): [True: 39.4k, False: 56.4k]
  |  Branch (139:47): [True: 39.4k, False: 2]
  ------------------
  140|  39.4k|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  141|  39.4k|        const char *names = methdata->names;
  142|  39.4k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|  39.4k|#define NAME_SEPARATOR ':'
  ------------------
  143|  39.4k|        size_t l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (143:21): [True: 39.4k, False: 0]
  ------------------
  144|       |
  145|  39.4k|        if (namemap == 0)
  ------------------
  |  Branch (145:13): [True: 0, False: 39.4k]
  ------------------
  146|      0|            return NULL;
  147|  39.4k|        name_id = ossl_namemap_name2num_n(namemap, names, l);
  148|  39.4k|    }
  149|       |
  150|  95.9k|    if (name_id == 0
  ------------------
  |  Branch (150:9): [True: 38.1k, False: 57.7k]
  ------------------
  151|  57.7k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (151:12): [True: 0, False: 57.7k]
  ------------------
  152|  38.1k|        return NULL;
  153|       |
  154|  57.7k|    if (store == NULL
  ------------------
  |  Branch (154:9): [True: 57.7k, False: 0]
  ------------------
  155|  57.7k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (155:12): [True: 0, False: 57.7k]
  ------------------
  156|      0|        return NULL;
  157|       |
  158|  57.7k|    if (!ossl_method_store_fetch(store, meth_id, methdata->propquery, prov,
  ------------------
  |  Branch (158:9): [True: 24.2k, False: 33.5k]
  ------------------
  159|  57.7k|            &method))
  160|  24.2k|        return NULL;
  161|  33.5k|    return method;
  162|  57.7k|}
evp_fetch.c:put_evp_method_in_store:
  168|   193k|{
  169|   193k|    struct evp_method_data_st *methdata = data;
  170|   193k|    OSSL_NAMEMAP *namemap;
  171|   193k|    int name_id;
  172|   193k|    uint32_t meth_id;
  173|   193k|    size_t l = 0;
  174|       |
  175|       |    /*
  176|       |     * put_evp_method_in_store() is only called with an EVP method that was
  177|       |     * successfully created by construct_method() below, which means that
  178|       |     * all the names should already be stored in the namemap with the same
  179|       |     * numeric identity, so just use the first to get that identity.
  180|       |     */
  181|   193k|    if (names != NULL) {
  ------------------
  |  Branch (181:9): [True: 193k, False: 0]
  ------------------
  182|   193k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|   193k|#define NAME_SEPARATOR ':'
  ------------------
  183|       |
  184|   193k|        l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (184:14): [True: 60.2k, False: 133k]
  ------------------
  185|   193k|    }
  186|       |
  187|   193k|    if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL
  ------------------
  |  Branch (187:9): [True: 0, False: 193k]
  ------------------
  188|   193k|        || (name_id = ossl_namemap_name2num_n(namemap, names, l)) == 0
  ------------------
  |  Branch (188:12): [True: 0, False: 193k]
  ------------------
  189|   193k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (189:12): [True: 0, False: 193k]
  ------------------
  190|      0|        return 0;
  191|       |
  192|   193k|    OSSL_TRACE1(QUERY, "put_evp_method_in_store: original store: %p\n", store);
  ------------------
  |  |  291|   193k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|   193k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  193|   193k|    if (store == NULL
  ------------------
  |  Branch (193:9): [True: 193k, False: 0]
  ------------------
  194|   193k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (194:12): [True: 0, False: 193k]
  ------------------
  195|      0|        return 0;
  196|       |
  197|   193k|    OSSL_TRACE5(QUERY,
  ------------------
  |  |  299|   193k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5))
  |  |  ------------------
  |  |  |  |  283|   193k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  198|   193k|        "put_evp_method_in_store: "
  199|   193k|        "store: %p, names: %s, operation_id %d, method_id: %d, properties: %s\n",
  200|   193k|        store, names, methdata->operation_id, meth_id, propdef ? propdef : "<null>");
  201|   193k|    return ossl_method_store_add(store, prov, meth_id, propdef, method,
  202|   193k|        methdata->refcnt_up_method,
  203|   193k|        methdata->destruct_method);
  204|   193k|}
evp_fetch.c:construct_evp_method:
  212|   193k|{
  213|       |    /*
  214|       |     * This function is only called if get_evp_method_from_store() returned
  215|       |     * NULL, so it's safe to say that of all the spots to create a new
  216|       |     * namemap entry, this is it.  Should the name already exist there, we
  217|       |     * know that ossl_namemap_add_name() will return its corresponding
  218|       |     * number.
  219|       |     */
  220|   193k|    struct evp_method_data_st *methdata = data;
  221|   193k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  222|   193k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  223|   193k|    const char *names = algodef->algorithm_names;
  224|   193k|    int name_id = ossl_namemap_add_names(namemap, 0, names, NAME_SEPARATOR);
  ------------------
  |  |   24|   193k|#define NAME_SEPARATOR ':'
  ------------------
  225|   193k|    void *method;
  226|       |
  227|   193k|    if (name_id == 0)
  ------------------
  |  Branch (227:9): [True: 0, False: 193k]
  ------------------
  228|      0|        return NULL;
  229|       |
  230|   193k|    method = methdata->method_from_algorithm(name_id, algodef, prov);
  231|       |
  232|       |    /*
  233|       |     * Flag to indicate that there was actual construction errors.  This
  234|       |     * helps inner_evp_generic_fetch() determine what error it should
  235|       |     * record on inaccessible algorithms.
  236|       |     */
  237|   193k|    if (method == NULL)
  ------------------
  |  Branch (237:9): [True: 0, False: 193k]
  ------------------
  238|      0|        methdata->flag_construct_error_occurred = 1;
  239|       |
  240|   193k|    return method;
  241|   193k|}
evp_fetch.c:destruct_evp_method:
  244|   193k|{
  245|   193k|    struct evp_method_data_st *methdata = data;
  246|       |
  247|   193k|    methdata->destruct_method(method);
  248|   193k|}
evp_fetch.c:dealloc_tmp_evp_method_store:
   61|   831k|{
   62|   831k|    OSSL_TRACE1(QUERY, "Deallocating the tmp_store %p\n", store);
  ------------------
  |  |  291|   831k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|   831k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   63|   831k|    if (store != NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 831k]
  ------------------
   64|      0|        ossl_method_store_free(store);
   65|   831k|}
evp_fetch.c:get_evp_method_store:
   68|  1.40M|{
   69|  1.40M|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX);
  ------------------
  |  |   95|  1.40M|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
   70|  1.40M|}
evp_fetch.c:filter_on_operation_id:
  623|    546|{
  624|    546|    struct filter_data_st *data = arg;
  625|       |
  626|    546|    if ((id & METHOD_ID_OPERATION_MASK) == data->operation_id)
  ------------------
  |  |  111|    546|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  |  Branch (626:9): [True: 84, False: 462]
  ------------------
  627|     84|        data->user_fn(method, data->user_arg);
  628|    546|}

EVP_CIPHER_get_type:
  241|   129k|{
  242|   129k|    int nid;
  243|   129k|    nid = EVP_CIPHER_get_nid(cipher);
  244|       |
  245|   129k|    switch (nid) {
  246|       |
  247|  2.12k|    case NID_rc2_cbc:
  ------------------
  |  | 1307|  2.12k|#define NID_rc2_cbc             37
  ------------------
  |  Branch (247:5): [True: 2.12k, False: 127k]
  ------------------
  248|  3.54k|    case NID_rc2_64_cbc:
  ------------------
  |  | 1328|  3.54k|#define NID_rc2_64_cbc          166
  ------------------
  |  Branch (248:5): [True: 1.41k, False: 128k]
  ------------------
  249|  4.96k|    case NID_rc2_40_cbc:
  ------------------
  |  | 1324|  4.96k|#define NID_rc2_40_cbc          98
  ------------------
  |  Branch (249:5): [True: 1.41k, False: 128k]
  ------------------
  250|       |
  251|  4.96k|        return NID_rc2_cbc;
  ------------------
  |  | 1307|  4.96k|#define NID_rc2_cbc             37
  ------------------
  252|       |
  253|    709|    case NID_rc4:
  ------------------
  |  | 1332|    709|#define NID_rc4         5
  ------------------
  |  Branch (253:5): [True: 709, False: 129k]
  ------------------
  254|  1.41k|    case NID_rc4_40:
  ------------------
  |  | 1337|  1.41k|#define NID_rc4_40              97
  ------------------
  |  Branch (254:5): [True: 709, False: 129k]
  ------------------
  255|       |
  256|  1.41k|        return NID_rc4;
  ------------------
  |  | 1332|  1.41k|#define NID_rc4         5
  ------------------
  257|       |
  258|    709|    case NID_aes_128_cfb128:
  ------------------
  |  | 3116|    709|#define NID_aes_128_cfb128              421
  ------------------
  |  Branch (258:5): [True: 709, False: 129k]
  ------------------
  259|  1.41k|    case NID_aes_128_cfb8:
  ------------------
  |  | 3237|  1.41k|#define NID_aes_128_cfb8                653
  ------------------
  |  Branch (259:5): [True: 709, False: 129k]
  ------------------
  260|  2.12k|    case NID_aes_128_cfb1:
  ------------------
  |  | 3225|  2.12k|#define NID_aes_128_cfb1                650
  ------------------
  |  Branch (260:5): [True: 709, False: 129k]
  ------------------
  261|       |
  262|  2.12k|        return NID_aes_128_cfb128;
  ------------------
  |  | 3116|  2.12k|#define NID_aes_128_cfb128              421
  ------------------
  263|       |
  264|    709|    case NID_aes_192_cfb128:
  ------------------
  |  | 3154|    709|#define NID_aes_192_cfb128              425
  ------------------
  |  Branch (264:5): [True: 709, False: 129k]
  ------------------
  265|  1.41k|    case NID_aes_192_cfb8:
  ------------------
  |  | 3241|  1.41k|#define NID_aes_192_cfb8                654
  ------------------
  |  Branch (265:5): [True: 709, False: 129k]
  ------------------
  266|  2.12k|    case NID_aes_192_cfb1:
  ------------------
  |  | 3229|  2.12k|#define NID_aes_192_cfb1                651
  ------------------
  |  Branch (266:5): [True: 709, False: 129k]
  ------------------
  267|       |
  268|  2.12k|        return NID_aes_192_cfb128;
  ------------------
  |  | 3154|  2.12k|#define NID_aes_192_cfb128              425
  ------------------
  269|       |
  270|    709|    case NID_aes_256_cfb128:
  ------------------
  |  | 3192|    709|#define NID_aes_256_cfb128              429
  ------------------
  |  Branch (270:5): [True: 709, False: 129k]
  ------------------
  271|  1.41k|    case NID_aes_256_cfb8:
  ------------------
  |  | 3245|  1.41k|#define NID_aes_256_cfb8                655
  ------------------
  |  Branch (271:5): [True: 709, False: 129k]
  ------------------
  272|  2.12k|    case NID_aes_256_cfb1:
  ------------------
  |  | 3233|  2.12k|#define NID_aes_256_cfb1                652
  ------------------
  |  Branch (272:5): [True: 709, False: 129k]
  ------------------
  273|       |
  274|  2.12k|        return NID_aes_256_cfb128;
  ------------------
  |  | 3192|  2.12k|#define NID_aes_256_cfb128              429
  ------------------
  275|       |
  276|    709|    case NID_des_cfb64:
  ------------------
  |  | 2286|    709|#define NID_des_cfb64           30
  ------------------
  |  Branch (276:5): [True: 709, False: 129k]
  ------------------
  277|  1.41k|    case NID_des_cfb8:
  ------------------
  |  | 3277|  1.41k|#define NID_des_cfb8            657
  ------------------
  |  Branch (277:5): [True: 709, False: 129k]
  ------------------
  278|  2.12k|    case NID_des_cfb1:
  ------------------
  |  | 3273|  2.12k|#define NID_des_cfb1            656
  ------------------
  |  Branch (278:5): [True: 709, False: 129k]
  ------------------
  279|       |
  280|  2.12k|        return NID_des_cfb64;
  ------------------
  |  | 2286|  2.12k|#define NID_des_cfb64           30
  ------------------
  281|       |
  282|    709|    case NID_des_ede3_cfb64:
  ------------------
  |  | 2327|    709|#define NID_des_ede3_cfb64              61
  ------------------
  |  Branch (282:5): [True: 709, False: 129k]
  ------------------
  283|  1.41k|    case NID_des_ede3_cfb8:
  ------------------
  |  | 3285|  1.41k|#define NID_des_ede3_cfb8               659
  ------------------
  |  Branch (283:5): [True: 709, False: 129k]
  ------------------
  284|  2.12k|    case NID_des_ede3_cfb1:
  ------------------
  |  | 3281|  2.12k|#define NID_des_ede3_cfb1               658
  ------------------
  |  Branch (284:5): [True: 709, False: 129k]
  ------------------
  285|       |
  286|  2.12k|        return NID_des_ede3_cfb64;
  ------------------
  |  | 2327|  2.12k|#define NID_des_ede3_cfb64              61
  ------------------
  287|       |
  288|   112k|    default:
  ------------------
  |  Branch (288:5): [True: 112k, False: 17.0k]
  ------------------
  289|       |#ifdef FIPS_MODULE
  290|       |        return NID_undef;
  291|       |#else
  292|   112k|    {
  293|       |        /* Check it has an OID and it is valid */
  294|   112k|        ASN1_OBJECT *otmp = OBJ_nid2obj(nid);
  295|       |
  296|   112k|        if (OBJ_get0_data(otmp) == NULL)
  ------------------
  |  Branch (296:13): [True: 34.0k, False: 78.6k]
  ------------------
  297|  34.0k|            nid = NID_undef;
  ------------------
  |  |   18|  34.0k|#define NID_undef                       0
  ------------------
  298|   112k|        ASN1_OBJECT_free(otmp);
  299|   112k|        return nid;
  300|  1.41k|    }
  301|   129k|#endif
  302|   129k|    }
  303|   129k|}
evp_cipher_cache_constants:
  306|  92.1k|{
  307|  92.1k|    int ok, aead = 0, custom_iv = 0, cts = 0, multiblock = 0, randkey = 0;
  308|  92.1k|    int encrypt_then_mac = 0;
  309|  92.1k|    size_t ivlen = 0;
  310|  92.1k|    size_t blksz = 0;
  311|  92.1k|    size_t keylen = 0;
  312|  92.1k|    unsigned int mode = 0;
  313|  92.1k|    OSSL_PARAM params[11];
  314|       |
  315|  92.1k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  186|  92.1k|# define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  316|  92.1k|    params[1] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN, &ivlen);
  ------------------
  |  |  196|  92.1k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  317|  92.1k|    params[2] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &keylen);
  ------------------
  |  |  197|  92.1k|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  318|  92.1k|    params[3] = OSSL_PARAM_construct_uint(OSSL_CIPHER_PARAM_MODE, &mode);
  ------------------
  |  |  198|  92.1k|# define OSSL_CIPHER_PARAM_MODE "mode"
  ------------------
  319|  92.1k|    params[4] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_AEAD, &aead);
  ------------------
  |  |  172|  92.1k|# define OSSL_CIPHER_PARAM_AEAD "aead"
  ------------------
  320|  92.1k|    params[5] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CUSTOM_IV,
  ------------------
  |  |  189|  92.1k|# define OSSL_CIPHER_PARAM_CUSTOM_IV "custom-iv"
  ------------------
  321|  92.1k|        &custom_iv);
  322|  92.1k|    params[6] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CTS, &cts);
  ------------------
  |  |  187|  92.1k|# define OSSL_CIPHER_PARAM_CTS "cts"
  ------------------
  323|  92.1k|    params[7] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK,
  ------------------
  |  |  206|  92.1k|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK "tls-multi"
  ------------------
  324|  92.1k|        &multiblock);
  325|  92.1k|    params[8] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_HAS_RAND_KEY,
  ------------------
  |  |  194|  92.1k|# define OSSL_CIPHER_PARAM_HAS_RAND_KEY "has-randkey"
  ------------------
  326|  92.1k|        &randkey);
  327|  92.1k|    params[9] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC,
  ------------------
  |  |  191|  92.1k|# define OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC "encrypt-then-mac"
  ------------------
  328|  92.1k|        &encrypt_then_mac);
  329|  92.1k|    params[10] = OSSL_PARAM_construct_end();
  330|  92.1k|    ok = evp_do_ciph_getparams(cipher, params) > 0;
  331|  92.1k|    if (ok) {
  ------------------
  |  Branch (331:9): [True: 92.1k, False: 0]
  ------------------
  332|  92.1k|        cipher->block_size = (int)blksz;
  333|  92.1k|        cipher->iv_len = (int)ivlen;
  334|  92.1k|        cipher->key_len = (int)keylen;
  335|  92.1k|        cipher->flags = mode;
  336|  92.1k|        if (aead)
  ------------------
  |  Branch (336:13): [True: 19.8k, False: 72.3k]
  ------------------
  337|  19.8k|            cipher->flags |= EVP_CIPH_FLAG_AEAD_CIPHER;
  ------------------
  |  |  256|  19.8k|#define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
  ------------------
  338|  92.1k|        if (custom_iv)
  ------------------
  |  Branch (338:13): [True: 29.0k, False: 63.1k]
  ------------------
  339|  29.0k|            cipher->flags |= EVP_CIPH_CUSTOM_IV;
  ------------------
  |  |  226|  29.0k|#define EVP_CIPH_CUSTOM_IV 0x10
  ------------------
  340|  92.1k|        if (cts)
  ------------------
  |  Branch (340:13): [True: 4.25k, False: 87.9k]
  ------------------
  341|  4.25k|            cipher->flags |= EVP_CIPH_FLAG_CTS;
  ------------------
  |  |  254|  4.25k|#define EVP_CIPH_FLAG_CTS 0x4000
  ------------------
  342|  92.1k|        if (multiblock)
  ------------------
  |  Branch (342:13): [True: 2.83k, False: 89.3k]
  ------------------
  343|  2.83k|            cipher->flags |= EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK;
  ------------------
  |  |  257|  2.83k|#define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0x400000
  ------------------
  344|  92.1k|        if (cipher->ccipher != NULL)
  ------------------
  |  Branch (344:13): [True: 83.6k, False: 8.50k]
  ------------------
  345|  83.6k|            cipher->flags |= EVP_CIPH_FLAG_CUSTOM_CIPHER;
  ------------------
  |  |  255|  83.6k|#define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000
  ------------------
  346|  92.1k|        if (randkey)
  ------------------
  |  Branch (346:13): [True: 7.79k, False: 84.3k]
  ------------------
  347|  7.79k|            cipher->flags |= EVP_CIPH_RAND_KEY;
  ------------------
  |  |  236|  7.79k|#define EVP_CIPH_RAND_KEY 0x200
  ------------------
  348|  92.1k|        if (encrypt_then_mac)
  ------------------
  |  Branch (348:13): [True: 0, False: 92.1k]
  ------------------
  349|      0|            cipher->flags |= EVP_CIPH_FLAG_ENC_THEN_MAC;
  ------------------
  |  |  267|      0|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  350|  92.1k|        if (OSSL_PARAM_locate_const(EVP_CIPHER_gettable_ctx_params(cipher),
  ------------------
  |  Branch (350:13): [True: 0, False: 92.1k]
  ------------------
  351|  92.1k|                OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS))
  ------------------
  |  |  184|  92.1k|# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
  |  |  ------------------
  |  |  |  |  125|  92.1k|# define OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS "algorithm-id-params"
  |  |  ------------------
  ------------------
  352|      0|            cipher->flags |= EVP_CIPH_FLAG_CUSTOM_ASN1;
  ------------------
  |  |  261|      0|#define EVP_CIPH_FLAG_CUSTOM_ASN1 0x1000000
  ------------------
  353|  92.1k|    }
  354|  92.1k|    return ok;
  355|  92.1k|}
EVP_CIPHER_get_iv_length:
  473|  1.78k|{
  474|  1.78k|    return (cipher == NULL) ? 0 : cipher->iv_len;
  ------------------
  |  Branch (474:12): [True: 0, False: 1.78k]
  ------------------
  475|  1.78k|}
EVP_CIPHER_CTX_get_iv_length:
  478|  32.6k|{
  479|  32.6k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (479:9): [True: 0, False: 32.6k]
  ------------------
  480|      0|        return 0;
  481|       |
  482|  32.6k|    if (ctx->iv_len < 0) {
  ------------------
  |  Branch (482:9): [True: 1.78k, False: 30.8k]
  ------------------
  483|  1.78k|        int rv, len = EVP_CIPHER_get_iv_length(ctx->cipher);
  484|  1.78k|        size_t v = len;
  485|  1.78k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  1.78k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  1.78k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  486|       |
  487|  1.78k|        if (ctx->cipher->get_ctx_params != NULL) {
  ------------------
  |  Branch (487:13): [True: 1.78k, False: 0]
  ------------------
  488|  1.78k|            params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN,
  ------------------
  |  |  196|  1.78k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  489|  1.78k|                &v);
  490|  1.78k|            rv = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  491|  1.78k|            if (rv > 0) {
  ------------------
  |  Branch (491:17): [True: 1.78k, False: 0]
  ------------------
  492|  1.78k|                if (OSSL_PARAM_modified(params)
  ------------------
  |  Branch (492:21): [True: 1.78k, False: 0]
  ------------------
  493|  1.78k|                    && !OSSL_PARAM_get_int(params, &len))
  ------------------
  |  Branch (493:24): [True: 0, False: 1.78k]
  ------------------
  494|      0|                    return -1;
  495|  1.78k|            } else if (rv != EVP_CTRL_RET_UNSUPPORTED) {
  ------------------
  |  |   13|      0|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  |  Branch (495:24): [True: 0, False: 0]
  ------------------
  496|      0|                return -1;
  497|      0|            }
  498|  1.78k|        }
  499|       |        /* Code below to be removed when legacy support is dropped. */
  500|      0|        else if ((EVP_CIPHER_get_flags(ctx->cipher)
  ------------------
  |  Branch (500:18): [True: 0, False: 0]
  ------------------
  501|      0|                     & EVP_CIPH_CUSTOM_IV_LENGTH)
  ------------------
  |  |  240|      0|#define EVP_CIPH_CUSTOM_IV_LENGTH 0x800
  ------------------
  502|      0|            != 0) {
  503|      0|            rv = EVP_CIPHER_CTX_ctrl((EVP_CIPHER_CTX *)ctx, EVP_CTRL_GET_IVLEN,
  ------------------
  |  |  341|      0|#define EVP_CTRL_GET_IVLEN 0x25
  ------------------
  504|      0|                0, &len);
  505|      0|            if (rv <= 0)
  ------------------
  |  Branch (505:17): [True: 0, False: 0]
  ------------------
  506|      0|                return -1;
  507|      0|        }
  508|       |        /*-
  509|       |         * Casting away the const is annoying but required here.  We need to
  510|       |         * cache the result for performance reasons.
  511|       |         */
  512|  1.78k|        ((EVP_CIPHER_CTX *)ctx)->iv_len = len;
  513|  1.78k|    }
  514|  32.6k|    return ctx->iv_len;
  515|  32.6k|}
EVP_CIPHER_get_key_length:
  620|  1.78k|{
  621|  1.78k|    return cipher->key_len;
  622|  1.78k|}
EVP_CIPHER_CTX_get_key_length:
  625|  84.8k|{
  626|  84.8k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (626:9): [True: 0, False: 84.8k]
  ------------------
  627|      0|        return 0;
  628|       |
  629|  84.8k|    if (ctx->key_len <= 0 && ctx->cipher->prov != NULL) {
  ------------------
  |  Branch (629:9): [True: 5.36k, False: 79.5k]
  |  Branch (629:30): [True: 5.36k, False: 0]
  ------------------
  630|  5.36k|        int ok;
  631|  5.36k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  5.36k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  5.36k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  632|  5.36k|        size_t len;
  633|       |
  634|  5.36k|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &len);
  ------------------
  |  |  197|  5.36k|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  635|  5.36k|        ok = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  636|  5.36k|        if (ok <= 0)
  ------------------
  |  Branch (636:13): [True: 0, False: 5.36k]
  ------------------
  637|      0|            return EVP_CTRL_RET_UNSUPPORTED;
  ------------------
  |  |   13|      0|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  638|       |
  639|       |        /*-
  640|       |         * The if branch should never be taken since EVP_MAX_KEY_LENGTH is
  641|       |         * less than INT_MAX but best to be safe.
  642|       |         *
  643|       |         * Casting away the const is annoying but required here.  We need to
  644|       |         * cache the result for performance reasons.
  645|       |         */
  646|  5.36k|        if (!OSSL_PARAM_get_int(params, &((EVP_CIPHER_CTX *)ctx)->key_len))
  ------------------
  |  Branch (646:13): [True: 0, False: 5.36k]
  ------------------
  647|      0|            return -1;
  648|  5.36k|        ((EVP_CIPHER_CTX *)ctx)->key_len = (int)len;
  649|  5.36k|    }
  650|  84.8k|    return ctx->key_len;
  651|  84.8k|}
EVP_CIPHER_get_nid:
  654|   224k|{
  655|   224k|    return (cipher == NULL) ? NID_undef : cipher->nid;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (655:12): [True: 0, False: 224k]
  ------------------
  656|   224k|}
EVP_CIPHER_get0_provider:
  710|   145k|{
  711|   145k|    return cipher->prov;
  712|   145k|}
EVP_MD_is_a:
  720|   441k|{
  721|   441k|    if (md == NULL)
  ------------------
  |  Branch (721:9): [True: 0, False: 441k]
  ------------------
  722|      0|        return 0;
  723|   441k|    if (md->prov != NULL)
  ------------------
  |  Branch (723:9): [True: 0, False: 441k]
  ------------------
  724|      0|        return evp_is_a(md->prov, md->name_id, NULL, name);
  725|   441k|    return evp_is_a(NULL, 0, EVP_MD_get0_name(md), name);
  726|   441k|}
EVP_MD_get0_name:
  745|   882k|{
  746|   882k|    if (md == NULL)
  ------------------
  |  Branch (746:9): [True: 0, False: 882k]
  ------------------
  747|      0|        return NULL;
  748|   882k|    if (md->type_name != NULL)
  ------------------
  |  Branch (748:9): [True: 0, False: 882k]
  ------------------
  749|      0|        return md->type_name;
  750|   882k|#ifndef FIPS_MODULE
  751|   882k|    return OBJ_nid2sn(EVP_MD_nid(md));
  ------------------
  |  |  453|   882k|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  752|       |#else
  753|       |    return NULL;
  754|       |#endif
  755|   882k|}
EVP_MD_get0_provider:
  768|   474k|{
  769|   474k|    return md->prov;
  770|   474k|}
EVP_MD_get_type:
  773|  1.03M|{
  774|  1.03M|    return md->type;
  775|  1.03M|}
EVP_MD_get_size:
  792|   998k|{
  793|   998k|    if (md == NULL) {
  ------------------
  |  Branch (793:9): [True: 0, False: 998k]
  ------------------
  794|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_MESSAGE_DIGEST_IS_NULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  795|      0|        return -1;
  796|      0|    }
  797|   998k|    return md->md_size;
  798|   998k|}
EVP_MD_xof:
  801|  14.6k|{
  802|  14.6k|    return md != NULL && ((EVP_MD_get_flags(md) & EVP_MD_FLAG_XOF) != 0);
  ------------------
  |  |  135|  14.6k|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
  |  Branch (802:12): [True: 14.6k, False: 0]
  |  Branch (802:26): [True: 12.5k, False: 2.09k]
  ------------------
  803|  14.6k|}
EVP_MD_get_flags:
  806|  14.6k|{
  807|  14.6k|    return md->flags;
  808|  14.6k|}
EVP_MD_CTX_get0_md:
  820|   472k|{
  821|   472k|    if (ctx == NULL)
  ------------------
  |  Branch (821:9): [True: 0, False: 472k]
  ------------------
  822|      0|        return NULL;
  823|   472k|    return ctx->reqdigest;
  824|   472k|}
EVP_MD_CTX_get_size_ex:
  839|   458k|{
  840|   458k|    EVP_MD_CTX *c = (EVP_MD_CTX *)ctx;
  841|   458k|    const OSSL_PARAM *gettables;
  842|       |
  843|   458k|    gettables = EVP_MD_CTX_gettable_params(c);
  844|   458k|    if (gettables != NULL
  ------------------
  |  Branch (844:9): [True: 0, False: 458k]
  ------------------
  845|      0|        && OSSL_PARAM_locate_const(gettables,
  ------------------
  |  Branch (845:12): [True: 0, False: 0]
  ------------------
  846|      0|               OSSL_DIGEST_PARAM_SIZE)
  ------------------
  |  |  233|      0|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
  847|      0|            != NULL) {
  848|      0|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
  849|      0|        size_t sz = 0;
  850|       |
  851|       |        /*
  852|       |         * For XOF's EVP_MD_get_size() returns 0
  853|       |         * So try to get the xoflen instead. This will return -1 if the
  854|       |         * xof length has not been set.
  855|       |         */
  856|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_SIZE, &sz);
  ------------------
  |  |  233|      0|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
  857|      0|        if (EVP_MD_CTX_get_params(c, params) != 1
  ------------------
  |  Branch (857:13): [True: 0, False: 0]
  ------------------
  858|      0|            || sz > INT_MAX
  ------------------
  |  Branch (858:16): [True: 0, False: 0]
  ------------------
  859|      0|            || sz == 0)
  ------------------
  |  Branch (859:16): [True: 0, False: 0]
  ------------------
  860|      0|            return -1;
  861|      0|        return (int)sz;
  862|      0|    }
  863|       |    /* Normal digests have a constant fixed size output */
  864|   458k|    return EVP_MD_get_size(EVP_MD_CTX_get0_md(ctx));
  865|   458k|}
EVP_MD_CTX_set_flags:
  901|   897k|{
  902|   897k|    ctx->flags |= flags;
  903|   897k|}
EVP_MD_CTX_clear_flags:
  906|   489k|{
  907|   489k|    ctx->flags &= ~flags;
  908|   489k|}
EVP_MD_CTX_test_flags:
  911|   456k|{
  912|   456k|    return (ctx->flags & flags);
  913|   456k|}
EVP_PKEY_CTX_set_group_name:
  950|  4.84k|{
  951|  4.84k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.84k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.84k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  952|       |
  953|  4.84k|    if (ctx == NULL || !EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  482|  4.84k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  4.84k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  4.84k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  4.84k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (953:9): [True: 0, False: 4.84k]
  |  Branch (953:24): [True: 0, False: 4.84k]
  ------------------
  954|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_COMMAND_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  955|       |        /* Uses the same return values as EVP_PKEY_CTX_ctrl */
  956|      0|        return -2;
  957|      0|    }
  958|       |
  959|  4.84k|    if (name == NULL)
  ------------------
  |  Branch (959:9): [True: 0, False: 4.84k]
  ------------------
  960|      0|        return -1;
  961|       |
  962|  4.84k|    params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|  4.84k|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  963|  4.84k|        (char *)name, 0);
  964|  4.84k|    return EVP_PKEY_CTX_set_params(ctx, params);
  965|  4.84k|}
EVP_PKEY_Q_keygen:
 1016|  4.18k|{
 1017|  4.18k|    va_list args;
 1018|  4.18k|    size_t bits;
 1019|  4.18k|    char *name;
 1020|  4.18k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.18k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.18k|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1021|  4.18k|    EVP_PKEY *ret = NULL;
 1022|       |
 1023|  4.18k|    va_start(args, type);
 1024|       |
 1025|  4.18k|    if (OPENSSL_strcasecmp(type, "RSA") == 0) {
  ------------------
  |  Branch (1025:9): [True: 0, False: 4.18k]
  ------------------
 1026|      0|        bits = va_arg(args, size_t);
 1027|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_PKEY_PARAM_RSA_BITS, &bits);
  ------------------
  |  |  453|      0|# define OSSL_PKEY_PARAM_RSA_BITS OSSL_PKEY_PARAM_BITS
  |  |  ------------------
  |  |  |  |  374|      0|# define OSSL_PKEY_PARAM_BITS "bits"
  |  |  ------------------
  ------------------
 1028|  4.18k|    } else if (OPENSSL_strcasecmp(type, "EC") == 0) {
  ------------------
  |  Branch (1028:16): [True: 0, False: 4.18k]
  ------------------
 1029|      0|        name = va_arg(args, char *);
 1030|      0|        params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|      0|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1031|      0|            name, 0);
 1032|      0|    }
 1033|       |
 1034|  4.18k|    ret = evp_pkey_keygen(libctx, type, propq, params);
 1035|       |
 1036|       |    va_end(args);
 1037|  4.18k|    return ret;
 1038|  4.18k|}
evp_lib.c:evp_pkey_keygen:
 1001|  4.18k|{
 1002|  4.18k|    EVP_PKEY *pkey = NULL;
 1003|  4.18k|    EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_name(libctx, name, propq);
 1004|       |
 1005|  4.18k|    if (ctx != NULL
  ------------------
  |  Branch (1005:9): [True: 4.18k, False: 0]
  ------------------
 1006|  4.18k|        && EVP_PKEY_keygen_init(ctx) > 0
  ------------------
  |  Branch (1006:12): [True: 4.18k, False: 0]
  ------------------
 1007|  4.18k|        && EVP_PKEY_CTX_set_params(ctx, params))
  ------------------
  |  Branch (1007:12): [True: 4.18k, False: 0]
  ------------------
 1008|  4.18k|        (void)EVP_PKEY_generate(ctx, &pkey);
 1009|       |
 1010|  4.18k|    EVP_PKEY_CTX_free(ctx);
 1011|  4.18k|    return pkey;
 1012|  4.18k|}

EVP_PKEY_type:
   63|   783k|{
   64|   783k|#ifndef OPENSSL_NO_DEPRECATED_3_6
   65|   783k|    int ret;
   66|   783k|    const EVP_PKEY_ASN1_METHOD *ameth;
   67|       |
   68|   783k|    ameth = evp_pkey_asn1_find(type);
   69|   783k|    if (ameth)
  ------------------
  |  Branch (69:9): [True: 668k, False: 115k]
  ------------------
   70|   668k|        ret = ameth->pkey_id;
   71|   115k|    else
   72|   115k|        ret = NID_undef;
  ------------------
  |  |   18|   115k|#define NID_undef                       0
  ------------------
   73|   783k|    return ret;
   74|       |#else
   75|       |    size_t i;
   76|       |
   77|       |    for (i = 0; i < OSSL_NELEM(base_id_conversion); i++) {
   78|       |        if (type == base_id_conversion[i].pkey_id)
   79|       |            return base_id_conversion[i].pkey_base_id;
   80|       |    }
   81|       |    return NID_undef;
   82|       |#endif
   83|   783k|}

EVP_RAND_enable_locking:
   95|    596|{
   96|    596|    if (rand->meth->enable_locking != NULL)
  ------------------
  |  Branch (96:9): [True: 596, False: 0]
  ------------------
   97|    596|        return rand->meth->enable_locking(rand->algctx);
   98|    596|    ERR_raise(ERR_LIB_EVP, EVP_R_LOCKING_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   99|      0|    return 0;
  100|    596|}
EVP_RAND_fetch:
  284|  2.38k|{
  285|  2.38k|    return evp_generic_fetch(libctx, OSSL_OP_RAND, algorithm, properties,
  ------------------
  |  |  287|  2.38k|#define OSSL_OP_RAND 5
  ------------------
  286|  2.38k|        evp_rand_from_algorithm, evp_rand_up_ref,
  287|  2.38k|        evp_rand_free);
  288|  2.38k|}
EVP_RAND_up_ref:
  291|  2.38k|{
  292|  2.38k|    return evp_rand_up_ref(rand);
  293|  2.38k|}
EVP_RAND_free:
  296|  4.76k|{
  297|  4.76k|    evp_rand_free(rand);
  298|  4.76k|}
EVP_RAND_get0_provider:
  321|  3.57k|{
  322|  3.57k|    return rand->prov;
  323|  3.57k|}
EVP_RAND_CTX_up_ref:
  333|  1.78k|{
  334|  1.78k|    int ref = 0;
  335|       |
  336|  1.78k|    return CRYPTO_UP_REF(&ctx->refcnt, &ref);
  337|  1.78k|}
EVP_RAND_CTX_new:
  340|  2.38k|{
  341|  2.38k|    EVP_RAND_CTX *ctx;
  342|  2.38k|    void *parent_ctx = NULL;
  343|  2.38k|    const OSSL_DISPATCH *parent_dispatch = NULL;
  344|       |
  345|  2.38k|    if (rand == NULL) {
  ------------------
  |  Branch (345:9): [True: 0, False: 2.38k]
  ------------------
  346|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  347|      0|        return NULL;
  348|      0|    }
  349|       |
  350|  2.38k|    ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  2.38k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  351|  2.38k|    if (ctx == NULL)
  ------------------
  |  Branch (351:9): [True: 0, False: 2.38k]
  ------------------
  352|      0|        return NULL;
  353|  2.38k|    if (!CRYPTO_NEW_REF(&ctx->refcnt, 1)) {
  ------------------
  |  Branch (353:9): [True: 0, False: 2.38k]
  ------------------
  354|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  355|      0|        return NULL;
  356|      0|    }
  357|  2.38k|    if (parent != NULL) {
  ------------------
  |  Branch (357:9): [True: 1.78k, False: 596]
  ------------------
  358|  1.78k|        if (!EVP_RAND_CTX_up_ref(parent)) {
  ------------------
  |  Branch (358:13): [True: 0, False: 1.78k]
  ------------------
  359|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  360|      0|            CRYPTO_FREE_REF(&ctx->refcnt);
  361|      0|            OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|      0|            return NULL;
  363|      0|        }
  364|  1.78k|        parent_ctx = parent->algctx;
  365|  1.78k|        parent_dispatch = parent->meth->dispatch;
  366|  1.78k|    }
  367|  2.38k|    if ((ctx->algctx = rand->newctx(ossl_provider_ctx(rand->prov), parent_ctx,
  ------------------
  |  Branch (367:9): [True: 0, False: 2.38k]
  ------------------
  368|  2.38k|             parent_dispatch))
  369|  2.38k|            == NULL
  370|  2.38k|        || !EVP_RAND_up_ref(rand)) {
  ------------------
  |  Branch (370:12): [True: 0, False: 2.38k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        rand->freectx(ctx->algctx);
  373|      0|        CRYPTO_FREE_REF(&ctx->refcnt);
  374|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  375|      0|        EVP_RAND_CTX_free(parent);
  376|      0|        return NULL;
  377|      0|    }
  378|  2.38k|    ctx->meth = rand;
  379|  2.38k|    ctx->parent = parent;
  380|  2.38k|    return ctx;
  381|  2.38k|}
EVP_RAND_CTX_free:
  384|  5.18k|{
  385|  5.18k|    int ref = 0;
  386|  5.18k|    EVP_RAND_CTX *parent;
  387|       |
  388|  5.18k|    if (ctx == NULL)
  ------------------
  |  Branch (388:9): [True: 1.02k, False: 4.16k]
  ------------------
  389|  1.02k|        return;
  390|       |
  391|  4.16k|    CRYPTO_DOWN_REF(&ctx->refcnt, &ref);
  392|  4.16k|    if (ref > 0)
  ------------------
  |  Branch (392:9): [True: 1.78k, False: 2.38k]
  ------------------
  393|  1.78k|        return;
  394|  2.38k|    parent = ctx->parent;
  395|  2.38k|    ctx->meth->freectx(ctx->algctx);
  396|  2.38k|    ctx->algctx = NULL;
  397|  2.38k|    EVP_RAND_free(ctx->meth);
  398|  2.38k|    CRYPTO_FREE_REF(&ctx->refcnt);
  399|  2.38k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  2.38k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  400|  2.38k|    EVP_RAND_CTX_free(parent);
  401|  2.38k|}
EVP_RAND_CTX_get_params:
  415|  7.55k|{
  416|  7.55k|    int res;
  417|       |
  418|  7.55k|    if (!evp_rand_lock(ctx))
  ------------------
  |  Branch (418:9): [True: 0, False: 7.55k]
  ------------------
  419|      0|        return 0;
  420|  7.55k|    res = evp_rand_get_ctx_params_locked(ctx, params);
  421|  7.55k|    evp_rand_unlock(ctx);
  422|  7.55k|    return res;
  423|  7.55k|}
EVP_RAND_CTX_settable_params:
  482|  1.78k|{
  483|  1.78k|    void *provctx;
  484|       |
  485|  1.78k|    if (ctx->meth->settable_ctx_params == NULL)
  ------------------
  |  Branch (485:9): [True: 0, False: 1.78k]
  ------------------
  486|      0|        return NULL;
  487|  1.78k|    provctx = ossl_provider_ctx(EVP_RAND_get0_provider(ctx->meth));
  488|  1.78k|    return ctx->meth->settable_ctx_params(ctx->algctx, provctx);
  489|  1.78k|}
EVP_RAND_instantiate:
  522|  2.38k|{
  523|  2.38k|    int res;
  524|       |
  525|  2.38k|    if (!evp_rand_lock(ctx))
  ------------------
  |  Branch (525:9): [True: 0, False: 2.38k]
  ------------------
  526|      0|        return 0;
  527|  2.38k|    res = evp_rand_instantiate_locked(ctx, strength, prediction_resistance,
  528|  2.38k|        pstr, pstr_len, params);
  529|  2.38k|    evp_rand_unlock(ctx);
  530|  2.38k|    return res;
  531|  2.38k|}
EVP_RAND_generate:
  584|  30.2k|{
  585|  30.2k|    int res;
  586|       |
  587|  30.2k|    if (!evp_rand_lock(ctx))
  ------------------
  |  Branch (587:9): [True: 0, False: 30.2k]
  ------------------
  588|      0|        return 0;
  589|  30.2k|    res = evp_rand_generate_locked(ctx, out, outlen, strength,
  590|  30.2k|        prediction_resistance, addin, addin_len);
  591|  30.2k|    evp_rand_unlock(ctx);
  592|  30.2k|    return res;
  593|  30.2k|}
EVP_RAND_get_state:
  668|  7.55k|{
  669|  7.55k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  7.55k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  7.55k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  670|  7.55k|    int state;
  671|       |
  672|  7.55k|    params[0] = OSSL_PARAM_construct_int(OSSL_RAND_PARAM_STATE, &state);
  ------------------
  |  |  552|  7.55k|# define OSSL_RAND_PARAM_STATE "state"
  ------------------
  673|  7.55k|    if (!EVP_RAND_CTX_get_params(ctx, params))
  ------------------
  |  Branch (673:9): [True: 0, False: 7.55k]
  ------------------
  674|      0|        state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  675|  7.55k|    return state;
  676|  7.55k|}
evp_rand.c:evp_rand_from_algorithm:
  120|  3.53k|{
  121|  3.53k|    const OSSL_DISPATCH *fns = algodef->implementation;
  122|  3.53k|    EVP_RAND *rand = NULL;
  123|  3.53k|    int fnrandcnt = 0, fnctxcnt = 0, fnlockcnt = 0, fnenablelockcnt = 0;
  124|       |#ifdef FIPS_MODULE
  125|       |    int fnzeroizecnt = 0;
  126|       |#endif
  127|       |
  128|  3.53k|    if ((rand = evp_rand_new()) == NULL) {
  ------------------
  |  Branch (128:9): [True: 0, False: 3.53k]
  ------------------
  129|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  130|      0|        return NULL;
  131|      0|    }
  132|  3.53k|    rand->name_id = name_id;
  133|  3.53k|    if ((rand->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (133:9): [True: 0, False: 3.53k]
  ------------------
  134|      0|        evp_rand_free(rand);
  135|      0|        return NULL;
  136|      0|    }
  137|  3.53k|    rand->description = algodef->algorithm_description;
  138|  3.53k|    rand->dispatch = fns;
  139|  57.8k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (139:12): [True: 54.2k, False: 3.53k]
  ------------------
  140|  54.2k|        switch (fns->function_id) {
  ------------------
  |  Branch (140:17): [True: 54.2k, False: 0]
  ------------------
  141|  3.53k|        case OSSL_FUNC_RAND_NEWCTX:
  ------------------
  |  |  541|  3.53k|#define OSSL_FUNC_RAND_NEWCTX 1
  ------------------
  |  Branch (141:9): [True: 3.53k, False: 50.7k]
  ------------------
  142|  3.53k|            if (rand->newctx != NULL)
  ------------------
  |  Branch (142:17): [True: 0, False: 3.53k]
  ------------------
  143|      0|                break;
  144|  3.53k|            rand->newctx = OSSL_FUNC_rand_newctx(fns);
  145|  3.53k|            fnctxcnt++;
  146|  3.53k|            break;
  147|  3.53k|        case OSSL_FUNC_RAND_FREECTX:
  ------------------
  |  |  542|  3.53k|#define OSSL_FUNC_RAND_FREECTX 2
  ------------------
  |  Branch (147:9): [True: 3.53k, False: 50.7k]
  ------------------
  148|  3.53k|            if (rand->freectx != NULL)
  ------------------
  |  Branch (148:17): [True: 0, False: 3.53k]
  ------------------
  149|      0|                break;
  150|  3.53k|            rand->freectx = OSSL_FUNC_rand_freectx(fns);
  151|  3.53k|            fnctxcnt++;
  152|  3.53k|            break;
  153|  3.53k|        case OSSL_FUNC_RAND_INSTANTIATE:
  ------------------
  |  |  543|  3.53k|#define OSSL_FUNC_RAND_INSTANTIATE 3
  ------------------
  |  Branch (153:9): [True: 3.53k, False: 50.7k]
  ------------------
  154|  3.53k|            if (rand->instantiate != NULL)
  ------------------
  |  Branch (154:17): [True: 0, False: 3.53k]
  ------------------
  155|      0|                break;
  156|  3.53k|            rand->instantiate = OSSL_FUNC_rand_instantiate(fns);
  157|  3.53k|            fnrandcnt++;
  158|  3.53k|            break;
  159|  3.53k|        case OSSL_FUNC_RAND_UNINSTANTIATE:
  ------------------
  |  |  544|  3.53k|#define OSSL_FUNC_RAND_UNINSTANTIATE 4
  ------------------
  |  Branch (159:9): [True: 3.53k, False: 50.7k]
  ------------------
  160|  3.53k|            if (rand->uninstantiate != NULL)
  ------------------
  |  Branch (160:17): [True: 0, False: 3.53k]
  ------------------
  161|      0|                break;
  162|  3.53k|            rand->uninstantiate = OSSL_FUNC_rand_uninstantiate(fns);
  163|  3.53k|            fnrandcnt++;
  164|  3.53k|            break;
  165|  3.53k|        case OSSL_FUNC_RAND_GENERATE:
  ------------------
  |  |  545|  3.53k|#define OSSL_FUNC_RAND_GENERATE 5
  ------------------
  |  Branch (165:9): [True: 3.53k, False: 50.7k]
  ------------------
  166|  3.53k|            if (rand->generate != NULL)
  ------------------
  |  Branch (166:17): [True: 0, False: 3.53k]
  ------------------
  167|      0|                break;
  168|  3.53k|            rand->generate = OSSL_FUNC_rand_generate(fns);
  169|  3.53k|            fnrandcnt++;
  170|  3.53k|            break;
  171|  3.53k|        case OSSL_FUNC_RAND_RESEED:
  ------------------
  |  |  546|  3.53k|#define OSSL_FUNC_RAND_RESEED 6
  ------------------
  |  Branch (171:9): [True: 3.53k, False: 50.7k]
  ------------------
  172|  3.53k|            if (rand->reseed != NULL)
  ------------------
  |  Branch (172:17): [True: 0, False: 3.53k]
  ------------------
  173|      0|                break;
  174|  3.53k|            rand->reseed = OSSL_FUNC_rand_reseed(fns);
  175|  3.53k|            break;
  176|    596|        case OSSL_FUNC_RAND_NONCE:
  ------------------
  |  |  547|    596|#define OSSL_FUNC_RAND_NONCE 7
  ------------------
  |  Branch (176:9): [True: 596, False: 53.6k]
  ------------------
  177|    596|            if (rand->nonce != NULL)
  ------------------
  |  Branch (177:17): [True: 0, False: 596]
  ------------------
  178|      0|                break;
  179|    596|            rand->nonce = OSSL_FUNC_rand_nonce(fns);
  180|    596|            break;
  181|  3.53k|        case OSSL_FUNC_RAND_ENABLE_LOCKING:
  ------------------
  |  |  548|  3.53k|#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
  ------------------
  |  Branch (181:9): [True: 3.53k, False: 50.7k]
  ------------------
  182|  3.53k|            if (rand->enable_locking != NULL)
  ------------------
  |  Branch (182:17): [True: 0, False: 3.53k]
  ------------------
  183|      0|                break;
  184|  3.53k|            rand->enable_locking = OSSL_FUNC_rand_enable_locking(fns);
  185|  3.53k|            fnenablelockcnt++;
  186|  3.53k|            break;
  187|  3.53k|        case OSSL_FUNC_RAND_LOCK:
  ------------------
  |  |  549|  3.53k|#define OSSL_FUNC_RAND_LOCK 9
  ------------------
  |  Branch (187:9): [True: 3.53k, False: 50.7k]
  ------------------
  188|  3.53k|            if (rand->lock != NULL)
  ------------------
  |  Branch (188:17): [True: 0, False: 3.53k]
  ------------------
  189|      0|                break;
  190|  3.53k|            rand->lock = OSSL_FUNC_rand_lock(fns);
  191|  3.53k|            fnlockcnt++;
  192|  3.53k|            break;
  193|  3.53k|        case OSSL_FUNC_RAND_UNLOCK:
  ------------------
  |  |  550|  3.53k|#define OSSL_FUNC_RAND_UNLOCK 10
  ------------------
  |  Branch (193:9): [True: 3.53k, False: 50.7k]
  ------------------
  194|  3.53k|            if (rand->unlock != NULL)
  ------------------
  |  Branch (194:17): [True: 0, False: 3.53k]
  ------------------
  195|      0|                break;
  196|  3.53k|            rand->unlock = OSSL_FUNC_rand_unlock(fns);
  197|  3.53k|            fnlockcnt++;
  198|  3.53k|            break;
  199|      0|        case OSSL_FUNC_RAND_GETTABLE_PARAMS:
  ------------------
  |  |  551|      0|#define OSSL_FUNC_RAND_GETTABLE_PARAMS 11
  ------------------
  |  Branch (199:9): [True: 0, False: 54.2k]
  ------------------
  200|      0|            if (rand->gettable_params != NULL)
  ------------------
  |  Branch (200:17): [True: 0, False: 0]
  ------------------
  201|      0|                break;
  202|      0|            rand->gettable_params = OSSL_FUNC_rand_gettable_params(fns);
  203|      0|            break;
  204|  3.53k|        case OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  552|  3.53k|#define OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS 12
  ------------------
  |  Branch (204:9): [True: 3.53k, False: 50.7k]
  ------------------
  205|  3.53k|            if (rand->gettable_ctx_params != NULL)
  ------------------
  |  Branch (205:17): [True: 0, False: 3.53k]
  ------------------
  206|      0|                break;
  207|  3.53k|            rand->gettable_ctx_params = OSSL_FUNC_rand_gettable_ctx_params(fns);
  208|  3.53k|            break;
  209|  2.38k|        case OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  553|  2.38k|#define OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (209:9): [True: 2.38k, False: 51.9k]
  ------------------
  210|  2.38k|            if (rand->settable_ctx_params != NULL)
  ------------------
  |  Branch (210:17): [True: 0, False: 2.38k]
  ------------------
  211|      0|                break;
  212|  2.38k|            rand->settable_ctx_params = OSSL_FUNC_rand_settable_ctx_params(fns);
  213|  2.38k|            break;
  214|      0|        case OSSL_FUNC_RAND_GET_PARAMS:
  ------------------
  |  |  554|      0|#define OSSL_FUNC_RAND_GET_PARAMS 14
  ------------------
  |  Branch (214:9): [True: 0, False: 54.2k]
  ------------------
  215|      0|            if (rand->get_params != NULL)
  ------------------
  |  Branch (215:17): [True: 0, False: 0]
  ------------------
  216|      0|                break;
  217|      0|            rand->get_params = OSSL_FUNC_rand_get_params(fns);
  218|      0|            break;
  219|  3.53k|        case OSSL_FUNC_RAND_GET_CTX_PARAMS:
  ------------------
  |  |  555|  3.53k|#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
  ------------------
  |  Branch (219:9): [True: 3.53k, False: 50.7k]
  ------------------
  220|  3.53k|            if (rand->get_ctx_params != NULL)
  ------------------
  |  Branch (220:17): [True: 0, False: 3.53k]
  ------------------
  221|      0|                break;
  222|  3.53k|            rand->get_ctx_params = OSSL_FUNC_rand_get_ctx_params(fns);
  223|  3.53k|            fnctxcnt++;
  224|  3.53k|            break;
  225|  2.38k|        case OSSL_FUNC_RAND_SET_CTX_PARAMS:
  ------------------
  |  |  556|  2.38k|#define OSSL_FUNC_RAND_SET_CTX_PARAMS 16
  ------------------
  |  Branch (225:9): [True: 2.38k, False: 51.9k]
  ------------------
  226|  2.38k|            if (rand->set_ctx_params != NULL)
  ------------------
  |  Branch (226:17): [True: 0, False: 2.38k]
  ------------------
  227|      0|                break;
  228|  2.38k|            rand->set_ctx_params = OSSL_FUNC_rand_set_ctx_params(fns);
  229|  2.38k|            break;
  230|  3.53k|        case OSSL_FUNC_RAND_VERIFY_ZEROIZATION:
  ------------------
  |  |  557|  3.53k|#define OSSL_FUNC_RAND_VERIFY_ZEROIZATION 17
  ------------------
  |  Branch (230:9): [True: 3.53k, False: 50.7k]
  ------------------
  231|  3.53k|            if (rand->verify_zeroization != NULL)
  ------------------
  |  Branch (231:17): [True: 0, False: 3.53k]
  ------------------
  232|      0|                break;
  233|  3.53k|            rand->verify_zeroization = OSSL_FUNC_rand_verify_zeroization(fns);
  234|       |#ifdef FIPS_MODULE
  235|       |            fnzeroizecnt++;
  236|       |#endif
  237|  3.53k|            break;
  238|  3.53k|        case OSSL_FUNC_RAND_GET_SEED:
  ------------------
  |  |  558|  3.53k|#define OSSL_FUNC_RAND_GET_SEED 18
  ------------------
  |  Branch (238:9): [True: 3.53k, False: 50.7k]
  ------------------
  239|  3.53k|            if (rand->get_seed != NULL)
  ------------------
  |  Branch (239:17): [True: 0, False: 3.53k]
  ------------------
  240|      0|                break;
  241|  3.53k|            rand->get_seed = OSSL_FUNC_rand_get_seed(fns);
  242|  3.53k|            break;
  243|  2.94k|        case OSSL_FUNC_RAND_CLEAR_SEED:
  ------------------
  |  |  559|  2.94k|#define OSSL_FUNC_RAND_CLEAR_SEED 19
  ------------------
  |  Branch (243:9): [True: 2.94k, False: 51.3k]
  ------------------
  244|  2.94k|            if (rand->clear_seed != NULL)
  ------------------
  |  Branch (244:17): [True: 0, False: 2.94k]
  ------------------
  245|      0|                break;
  246|  2.94k|            rand->clear_seed = OSSL_FUNC_rand_clear_seed(fns);
  247|  2.94k|            break;
  248|  54.2k|        }
  249|  54.2k|    }
  250|       |    /*
  251|       |     * In order to be a consistent set of functions we must have at least
  252|       |     * a complete set of "rand" functions and a complete set of context
  253|       |     * management functions.  In FIPS mode, we also require the zeroization
  254|       |     * verification function.
  255|       |     *
  256|       |     * In addition, if locking can be enabled, we need a complete set of
  257|       |     * locking functions.
  258|       |     */
  259|  3.53k|    if (fnrandcnt != 3
  ------------------
  |  Branch (259:9): [True: 0, False: 3.53k]
  ------------------
  260|  3.53k|        || fnctxcnt != 3
  ------------------
  |  Branch (260:12): [True: 0, False: 3.53k]
  ------------------
  261|  3.53k|        || (fnenablelockcnt != 0 && fnenablelockcnt != 1)
  ------------------
  |  Branch (261:13): [True: 3.53k, False: 0]
  |  Branch (261:37): [True: 0, False: 3.53k]
  ------------------
  262|  3.53k|        || (fnlockcnt != 0 && fnlockcnt != 2)
  ------------------
  |  Branch (262:13): [True: 3.53k, False: 0]
  |  Branch (262:31): [True: 0, False: 3.53k]
  ------------------
  263|       |#ifdef FIPS_MODULE
  264|       |        || fnzeroizecnt != 1
  265|       |#endif
  266|  3.53k|    ) {
  267|      0|        evp_rand_free(rand);
  268|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        return NULL;
  270|      0|    }
  271|       |
  272|  3.53k|    if (prov != NULL && !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (272:9): [True: 3.53k, False: 0]
  |  Branch (272:25): [True: 0, False: 3.53k]
  ------------------
  273|      0|        evp_rand_free(rand);
  274|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  275|      0|        return NULL;
  276|      0|    }
  277|  3.53k|    rand->prov = prov;
  278|       |
  279|  3.53k|    return rand;
  280|  3.53k|}
evp_rand.c:evp_rand_new:
   80|  3.53k|{
   81|  3.53k|    EVP_RAND *rand = OPENSSL_zalloc(sizeof(*rand));
  ------------------
  |  |  109|  3.53k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|       |
   83|  3.53k|    if (rand == NULL)
  ------------------
  |  Branch (83:9): [True: 0, False: 3.53k]
  ------------------
   84|      0|        return NULL;
   85|       |
   86|  3.53k|    if (!CRYPTO_NEW_REF(&rand->refcnt, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 3.53k]
  ------------------
   87|      0|        OPENSSL_free(rand);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   88|      0|        return NULL;
   89|      0|    }
   90|  3.53k|    return rand;
   91|  3.53k|}
evp_rand.c:evp_rand_up_ref:
   54|  9.49k|{
   55|  9.49k|    EVP_RAND *rand = (EVP_RAND *)vrand;
   56|  9.49k|    int ref = 0;
   57|       |
   58|  9.49k|    if (rand != NULL)
  ------------------
  |  Branch (58:9): [True: 9.49k, False: 0]
  ------------------
   59|  9.49k|        return CRYPTO_UP_REF(&rand->refcnt, &ref);
   60|      0|    return 1;
   61|  9.49k|}
evp_rand.c:evp_rand_free:
   64|  13.0k|{
   65|  13.0k|    EVP_RAND *rand = (EVP_RAND *)vrand;
   66|  13.0k|    int ref = 0;
   67|       |
   68|  13.0k|    if (rand == NULL)
  ------------------
  |  Branch (68:9): [True: 0, False: 13.0k]
  ------------------
   69|      0|        return;
   70|  13.0k|    CRYPTO_DOWN_REF(&rand->refcnt, &ref);
   71|  13.0k|    if (ref > 0)
  ------------------
  |  Branch (71:9): [True: 9.49k, False: 3.53k]
  ------------------
   72|  9.49k|        return;
   73|  3.53k|    OPENSSL_free(rand->type_name);
  ------------------
  |  |  132|  3.53k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|  3.53k|    ossl_provider_free(rand->prov);
   75|  3.53k|    CRYPTO_FREE_REF(&rand->refcnt);
   76|  3.53k|    OPENSSL_free(rand);
  ------------------
  |  |  132|  3.53k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  3.53k|}
evp_rand.c:evp_rand_lock:
  104|  40.1k|{
  105|  40.1k|    if (rand->meth->lock != NULL)
  ------------------
  |  Branch (105:9): [True: 40.1k, False: 0]
  ------------------
  106|  40.1k|        return rand->meth->lock(rand->algctx);
  107|      0|    return 1;
  108|  40.1k|}
evp_rand.c:evp_rand_get_ctx_params_locked:
  410|  37.7k|{
  411|  37.7k|    return ctx->meth->get_ctx_params(ctx->algctx, params);
  412|  37.7k|}
evp_rand.c:evp_rand_unlock:
  112|  40.1k|{
  113|  40.1k|    if (rand->meth->unlock != NULL)
  ------------------
  |  Branch (113:9): [True: 40.1k, False: 0]
  ------------------
  114|  40.1k|        rand->meth->unlock(rand->algctx);
  115|  40.1k|}
evp_rand.c:evp_rand_instantiate_locked:
  513|  2.38k|{
  514|  2.38k|    return ctx->meth->instantiate(ctx->algctx, strength, prediction_resistance,
  515|  2.38k|        pstr, pstr_len, params);
  516|  2.38k|}
evp_rand.c:evp_rand_generate_locked:
  554|  30.2k|{
  555|  30.2k|    size_t chunk, max_request = 0;
  556|  30.2k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  30.2k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  30.2k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  557|       |
  558|  30.2k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_RAND_PARAM_MAX_REQUEST,
  ------------------
  |  |  551|  30.2k|# define OSSL_RAND_PARAM_MAX_REQUEST "max_request"
  ------------------
  559|  30.2k|        &max_request);
  560|  30.2k|    if (!evp_rand_get_ctx_params_locked(ctx, params)
  ------------------
  |  Branch (560:9): [True: 0, False: 30.2k]
  ------------------
  561|  30.2k|        || max_request == 0) {
  ------------------
  |  Branch (561:12): [True: 0, False: 30.2k]
  ------------------
  562|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UNABLE_TO_GET_MAXIMUM_REQUEST_SIZE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  563|      0|        return 0;
  564|      0|    }
  565|  60.4k|    for (; outlen > 0; outlen -= chunk, out += chunk) {
  ------------------
  |  Branch (565:12): [True: 30.2k, False: 30.2k]
  ------------------
  566|  30.2k|        chunk = outlen > max_request ? max_request : outlen;
  ------------------
  |  Branch (566:17): [True: 0, False: 30.2k]
  ------------------
  567|  30.2k|        if (!ctx->meth->generate(ctx->algctx, out, chunk, strength,
  ------------------
  |  Branch (567:13): [True: 0, False: 30.2k]
  ------------------
  568|  30.2k|                prediction_resistance, addin, addin_len)) {
  569|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_GENERATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  570|      0|            return 0;
  571|      0|        }
  572|       |        /*
  573|       |         * Prediction resistance is only relevant the first time around,
  574|       |         * subsequently, the DRBG has already been properly reseeded.
  575|       |         */
  576|  30.2k|        prediction_resistance = 0;
  577|  30.2k|    }
  578|  30.2k|    return 1;
  579|  30.2k|}

EVP_KEYEXCH_free:
  162|  17.8k|{
  163|  17.8k|    int i;
  164|       |
  165|  17.8k|    if (exchange == NULL)
  ------------------
  |  Branch (165:9): [True: 0, False: 17.8k]
  ------------------
  166|      0|        return;
  167|  17.8k|    CRYPTO_DOWN_REF(&exchange->refcnt, &i);
  168|  17.8k|    if (i > 0)
  ------------------
  |  Branch (168:9): [True: 12.8k, False: 4.95k]
  ------------------
  169|  12.8k|        return;
  170|  4.95k|    OPENSSL_free(exchange->type_name);
  ------------------
  |  |  132|  4.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  171|  4.95k|    ossl_provider_free(exchange->prov);
  172|  4.95k|    CRYPTO_FREE_REF(&exchange->refcnt);
  173|  4.95k|    OPENSSL_free(exchange);
  ------------------
  |  |  132|  4.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  174|  4.95k|}
EVP_KEYEXCH_up_ref:
  177|  12.8k|{
  178|  12.8k|    int ref = 0;
  179|       |
  180|  12.8k|    CRYPTO_UP_REF(&exchange->refcnt, &ref);
  181|  12.8k|    return 1;
  182|  12.8k|}
EVP_KEYEXCH_fetch:
  191|  6.94k|{
  192|  6.94k|    return evp_generic_fetch(ctx, OSSL_OP_KEYEXCH, algorithm, properties,
  ------------------
  |  |  289|  6.94k|#define OSSL_OP_KEYEXCH 11
  ------------------
  193|  6.94k|        evp_keyexch_from_algorithm,
  194|  6.94k|        evp_keyexch_up_ref,
  195|  6.94k|        evp_keyexch_free);
  196|  6.94k|}
exchange.c:evp_keyexch_from_algorithm:
   53|  4.96k|{
   54|  4.96k|    const OSSL_DISPATCH *fns = algodef->implementation;
   55|  4.96k|    EVP_KEYEXCH *exchange = NULL;
   56|  4.96k|    int fncnt = 0, sparamfncnt = 0, gparamfncnt = 0, derive_found = 0;
   57|       |
   58|  4.96k|    if ((exchange = evp_keyexch_new(prov)) == NULL) {
  ------------------
  |  Branch (58:9): [True: 0, False: 4.96k]
  ------------------
   59|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   60|      0|        goto err;
   61|      0|    }
   62|       |
   63|  4.96k|    exchange->name_id = name_id;
   64|  4.96k|    if ((exchange->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 4.96k]
  ------------------
   65|      0|        goto err;
   66|  4.96k|    exchange->description = algodef->algorithm_description;
   67|       |
   68|  50.3k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (68:12): [True: 45.3k, False: 4.96k]
  ------------------
   69|  45.3k|        switch (fns->function_id) {
  ------------------
  |  Branch (69:17): [True: 45.3k, False: 0]
  ------------------
   70|  4.96k|        case OSSL_FUNC_KEYEXCH_NEWCTX:
  ------------------
  |  |  769|  4.96k|#define OSSL_FUNC_KEYEXCH_NEWCTX 1
  ------------------
  |  Branch (70:9): [True: 4.96k, False: 40.4k]
  ------------------
   71|  4.96k|            if (exchange->newctx != NULL)
  ------------------
  |  Branch (71:17): [True: 0, False: 4.96k]
  ------------------
   72|      0|                break;
   73|  4.96k|            exchange->newctx = OSSL_FUNC_keyexch_newctx(fns);
   74|  4.96k|            fncnt++;
   75|  4.96k|            break;
   76|  4.96k|        case OSSL_FUNC_KEYEXCH_INIT:
  ------------------
  |  |  770|  4.96k|#define OSSL_FUNC_KEYEXCH_INIT 2
  ------------------
  |  Branch (76:9): [True: 4.96k, False: 40.4k]
  ------------------
   77|  4.96k|            if (exchange->init != NULL)
  ------------------
  |  Branch (77:17): [True: 0, False: 4.96k]
  ------------------
   78|      0|                break;
   79|  4.96k|            exchange->init = OSSL_FUNC_keyexch_init(fns);
   80|  4.96k|            fncnt++;
   81|  4.96k|            break;
   82|  2.83k|        case OSSL_FUNC_KEYEXCH_SET_PEER:
  ------------------
  |  |  772|  2.83k|#define OSSL_FUNC_KEYEXCH_SET_PEER 4
  ------------------
  |  Branch (82:9): [True: 2.83k, False: 42.5k]
  ------------------
   83|  2.83k|            if (exchange->set_peer != NULL)
  ------------------
  |  Branch (83:17): [True: 0, False: 2.83k]
  ------------------
   84|      0|                break;
   85|  2.83k|            exchange->set_peer = OSSL_FUNC_keyexch_set_peer(fns);
   86|  2.83k|            break;
   87|  4.96k|        case OSSL_FUNC_KEYEXCH_DERIVE:
  ------------------
  |  |  771|  4.96k|#define OSSL_FUNC_KEYEXCH_DERIVE 3
  ------------------
  |  Branch (87:9): [True: 4.96k, False: 40.4k]
  ------------------
   88|  4.96k|            if (exchange->derive != NULL)
  ------------------
  |  Branch (88:17): [True: 0, False: 4.96k]
  ------------------
   89|      0|                break;
   90|  4.96k|            exchange->derive = OSSL_FUNC_keyexch_derive(fns);
   91|  4.96k|            derive_found = 1;
   92|  4.96k|            break;
   93|  4.96k|        case OSSL_FUNC_KEYEXCH_FREECTX:
  ------------------
  |  |  773|  4.96k|#define OSSL_FUNC_KEYEXCH_FREECTX 5
  ------------------
  |  Branch (93:9): [True: 4.96k, False: 40.4k]
  ------------------
   94|  4.96k|            if (exchange->freectx != NULL)
  ------------------
  |  Branch (94:17): [True: 0, False: 4.96k]
  ------------------
   95|      0|                break;
   96|  4.96k|            exchange->freectx = OSSL_FUNC_keyexch_freectx(fns);
   97|  4.96k|            fncnt++;
   98|  4.96k|            break;
   99|  4.96k|        case OSSL_FUNC_KEYEXCH_DUPCTX:
  ------------------
  |  |  774|  4.96k|#define OSSL_FUNC_KEYEXCH_DUPCTX 6
  ------------------
  |  Branch (99:9): [True: 4.96k, False: 40.4k]
  ------------------
  100|  4.96k|            if (exchange->dupctx != NULL)
  ------------------
  |  Branch (100:17): [True: 0, False: 4.96k]
  ------------------
  101|      0|                break;
  102|  4.96k|            exchange->dupctx = OSSL_FUNC_keyexch_dupctx(fns);
  103|  4.96k|            break;
  104|  4.96k|        case OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS:
  ------------------
  |  |  777|  4.96k|#define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS 9
  ------------------
  |  Branch (104:9): [True: 4.96k, False: 40.4k]
  ------------------
  105|  4.96k|            if (exchange->get_ctx_params != NULL)
  ------------------
  |  Branch (105:17): [True: 0, False: 4.96k]
  ------------------
  106|      0|                break;
  107|  4.96k|            exchange->get_ctx_params = OSSL_FUNC_keyexch_get_ctx_params(fns);
  108|  4.96k|            gparamfncnt++;
  109|  4.96k|            break;
  110|  4.96k|        case OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  778|  4.96k|#define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS 10
  ------------------
  |  Branch (110:9): [True: 4.96k, False: 40.4k]
  ------------------
  111|  4.96k|            if (exchange->gettable_ctx_params != NULL)
  ------------------
  |  Branch (111:17): [True: 0, False: 4.96k]
  ------------------
  112|      0|                break;
  113|  4.96k|            exchange->gettable_ctx_params
  114|  4.96k|                = OSSL_FUNC_keyexch_gettable_ctx_params(fns);
  115|  4.96k|            gparamfncnt++;
  116|  4.96k|            break;
  117|  3.54k|        case OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS:
  ------------------
  |  |  775|  3.54k|#define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS 7
  ------------------
  |  Branch (117:9): [True: 3.54k, False: 41.8k]
  ------------------
  118|  3.54k|            if (exchange->set_ctx_params != NULL)
  ------------------
  |  Branch (118:17): [True: 0, False: 3.54k]
  ------------------
  119|      0|                break;
  120|  3.54k|            exchange->set_ctx_params = OSSL_FUNC_keyexch_set_ctx_params(fns);
  121|  3.54k|            sparamfncnt++;
  122|  3.54k|            break;
  123|  3.54k|        case OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  776|  3.54k|#define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS 8
  ------------------
  |  Branch (123:9): [True: 3.54k, False: 41.8k]
  ------------------
  124|  3.54k|            if (exchange->settable_ctx_params != NULL)
  ------------------
  |  Branch (124:17): [True: 0, False: 3.54k]
  ------------------
  125|      0|                break;
  126|  3.54k|            exchange->settable_ctx_params
  127|  3.54k|                = OSSL_FUNC_keyexch_settable_ctx_params(fns);
  128|  3.54k|            sparamfncnt++;
  129|  3.54k|            break;
  130|    709|        case OSSL_FUNC_KEYEXCH_DERIVE_SKEY:
  ------------------
  |  |  779|    709|#define OSSL_FUNC_KEYEXCH_DERIVE_SKEY 11
  ------------------
  |  Branch (130:9): [True: 709, False: 44.6k]
  ------------------
  131|    709|            if (exchange->derive_skey != NULL)
  ------------------
  |  Branch (131:17): [True: 0, False: 709]
  ------------------
  132|      0|                break;
  133|    709|            exchange->derive_skey = OSSL_FUNC_keyexch_derive_skey(fns);
  134|    709|            derive_found = 1;
  135|    709|            break;
  136|  45.3k|        }
  137|  45.3k|    }
  138|  4.96k|    fncnt += derive_found;
  139|  4.96k|    if (fncnt != 4
  ------------------
  |  Branch (139:9): [True: 0, False: 4.96k]
  ------------------
  140|  4.96k|        || (gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (140:13): [True: 4.96k, False: 0]
  |  Branch (140:33): [True: 0, False: 4.96k]
  ------------------
  141|  4.96k|        || (sparamfncnt != 0 && sparamfncnt != 2)) {
  ------------------
  |  Branch (141:13): [True: 3.54k, False: 1.41k]
  |  Branch (141:33): [True: 0, False: 3.54k]
  ------------------
  142|       |        /*
  143|       |         * In order to be a consistent set of functions we must have at least
  144|       |         * a complete set of "exchange" functions: init, derive, newctx,
  145|       |         * and freectx. The set_ctx_params and settable_ctx_params functions are
  146|       |         * optional, but if one of them is present then the other one must also
  147|       |         * be present. Same goes for get_ctx_params and gettable_ctx_params.
  148|       |         * The dupctx and set_peer functions are optional.
  149|       |         */
  150|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|      0|        goto err;
  152|      0|    }
  153|       |
  154|  4.96k|    return exchange;
  155|       |
  156|      0|err:
  157|      0|    EVP_KEYEXCH_free(exchange);
  158|       |    return NULL;
  159|  4.96k|}
exchange.c:evp_keyexch_new:
   33|  4.96k|{
   34|  4.96k|    EVP_KEYEXCH *exchange = OPENSSL_zalloc(sizeof(EVP_KEYEXCH));
  ------------------
  |  |  109|  4.96k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   35|       |
   36|  4.96k|    if (exchange == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 4.96k]
  ------------------
   37|      0|        return NULL;
   38|       |
   39|  4.96k|    if (!CRYPTO_NEW_REF(&exchange->refcnt, 1)
  ------------------
  |  Branch (39:9): [True: 0, False: 4.96k]
  ------------------
   40|  4.96k|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (40:12): [True: 0, False: 4.96k]
  ------------------
   41|      0|        CRYPTO_FREE_REF(&exchange->refcnt);
   42|      0|        OPENSSL_free(exchange);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|        return NULL;
   44|      0|    }
   45|  4.96k|    exchange->prov = prov;
   46|       |
   47|  4.96k|    return exchange;
   48|  4.96k|}
exchange.c:evp_keyexch_up_ref:
   28|  12.8k|{
   29|  12.8k|    return EVP_KEYEXCH_up_ref(data);
   30|  12.8k|}
exchange.c:evp_keyexch_free:
   23|  11.1k|{
   24|  11.1k|    EVP_KEYEXCH_free(data);
   25|  11.1k|}

evp_keymgmt_util_assign_pkey:
   62|   512k|{
   63|   512k|    if (pkey == NULL || keymgmt == NULL || keydata == NULL
  ------------------
  |  Branch (63:9): [True: 0, False: 512k]
  |  Branch (63:25): [True: 0, False: 512k]
  |  Branch (63:44): [True: 0, False: 512k]
  ------------------
   64|   512k|        || !EVP_PKEY_set_type_by_keymgmt(pkey, keymgmt)) {
  ------------------
  |  Branch (64:12): [True: 0, False: 512k]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|   512k|    pkey->keydata = keydata;
   69|   512k|    evp_keymgmt_util_cache_keyinfo(pkey);
   70|   512k|    return 1;
   71|   512k|}
evp_keymgmt_util_make_pkey:
   74|   503k|{
   75|   503k|    EVP_PKEY *pkey = NULL;
   76|       |
   77|   503k|    if (keymgmt == NULL
  ------------------
  |  Branch (77:9): [True: 0, False: 503k]
  ------------------
   78|   503k|        || keydata == NULL
  ------------------
  |  Branch (78:12): [True: 0, False: 503k]
  ------------------
   79|   503k|        || (pkey = EVP_PKEY_new()) == NULL
  ------------------
  |  Branch (79:12): [True: 0, False: 503k]
  ------------------
   80|   503k|        || !evp_keymgmt_util_assign_pkey(pkey, keymgmt, keydata)) {
  ------------------
  |  Branch (80:12): [True: 0, False: 503k]
  ------------------
   81|      0|        EVP_PKEY_free(pkey);
   82|      0|        return NULL;
   83|      0|    }
   84|   503k|    return pkey;
   85|   503k|}
evp_keymgmt_util_export:
   89|  4.18k|{
   90|  4.18k|    if (pk == NULL || export_cb == NULL)
  ------------------
  |  Branch (90:9): [True: 0, False: 4.18k]
  |  Branch (90:23): [True: 0, False: 4.18k]
  ------------------
   91|      0|        return 0;
   92|  4.18k|    return evp_keymgmt_export(pk->keymgmt, pk->keydata, selection,
   93|  4.18k|        export_cb, export_cbarg);
   94|  4.18k|}
evp_keymgmt_util_clear_operation_cache:
  223|  1.01M|{
  224|  1.01M|    if (pk == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 1.01M]
  ------------------
  225|      0|        return;
  226|       |
  227|  1.01M|    sk_OP_CACHE_ELEM_pop_free(pk->operation_cache, op_cache_free);
  228|       |    pk->operation_cache = NULL;
  229|  1.01M|}
evp_keymgmt_util_cache_keyinfo:
  289|   512k|{
  290|       |    /*
  291|       |     * Cache information about the provider "origin" key.
  292|       |     *
  293|       |     * This services functions like EVP_PKEY_get_size, EVP_PKEY_get_bits, etc
  294|       |     */
  295|   512k|    if (pk->keydata != NULL) {
  ------------------
  |  Branch (295:9): [True: 512k, False: 0]
  ------------------
  296|   512k|        int bits = 0;
  297|   512k|        int security_bits = 0;
  298|   512k|        int security_category = -1;
  299|   512k|        int size = 0;
  300|   512k|        OSSL_PARAM params[5];
  301|       |
  302|   512k|        params[0] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_BITS, &bits);
  ------------------
  |  |  374|   512k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  303|   512k|        params[1] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_SECURITY_BITS,
  ------------------
  |  |  506|   512k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  304|   512k|            &security_bits);
  305|   512k|        params[2] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_SECURITY_CATEGORY,
  ------------------
  |  |  507|   512k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  131|   512k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  306|   512k|            &security_category);
  307|   512k|        params[3] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_MAX_SIZE, &size);
  ------------------
  |  |  432|   512k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  308|   512k|        params[4] = OSSL_PARAM_construct_end();
  309|   512k|        if (evp_keymgmt_get_params(pk->keymgmt, pk->keydata, params)) {
  ------------------
  |  Branch (309:13): [True: 512k, False: 0]
  ------------------
  310|   512k|            pk->cache.size = size;
  311|   512k|            pk->cache.bits = bits;
  312|   512k|            pk->cache.security_bits = security_bits;
  313|   512k|            pk->cache.security_category = security_category;
  314|   512k|        }
  315|   512k|    }
  316|   512k|}
evp_keymgmt_util_gen:
  516|  9.03k|{
  517|  9.03k|    void *keydata = NULL;
  518|       |
  519|  9.03k|    if ((keydata = evp_keymgmt_gen(keymgmt, genctx, cb, cbarg)) == NULL
  ------------------
  |  Branch (519:9): [True: 0, False: 9.03k]
  ------------------
  520|  9.03k|        || !evp_keymgmt_util_assign_pkey(target, keymgmt, keydata)) {
  ------------------
  |  Branch (520:12): [True: 0, False: 9.03k]
  ------------------
  521|      0|        evp_keymgmt_freedata(keymgmt, keydata);
  522|      0|        keydata = NULL;
  523|      0|    }
  524|       |
  525|  9.03k|    return keydata;
  526|  9.03k|}

EVP_KEYMGMT_fetch:
  287|   204k|{
  288|   204k|    return evp_generic_fetch(ctx, OSSL_OP_KEYMGMT, algorithm, properties,
  ------------------
  |  |  288|   204k|#define OSSL_OP_KEYMGMT 10
  ------------------
  289|   204k|        keymgmt_from_algorithm,
  290|   204k|        evp_keymgmt_up_ref,
  291|   204k|        evp_keymgmt_free);
  292|   204k|}
EVP_KEYMGMT_up_ref:
  295|  1.92M|{
  296|  1.92M|    int ref = 0;
  297|       |
  298|  1.92M|    CRYPTO_UP_REF(&keymgmt->refcnt, &ref);
  299|  1.92M|    return 1;
  300|  1.92M|}
EVP_KEYMGMT_free:
  303|  1.95M|{
  304|  1.95M|    int ref = 0;
  305|       |
  306|  1.95M|    if (keymgmt == NULL)
  ------------------
  |  Branch (306:9): [True: 0, False: 1.95M]
  ------------------
  307|      0|        return;
  308|       |
  309|  1.95M|    CRYPTO_DOWN_REF(&keymgmt->refcnt, &ref);
  310|  1.95M|    if (ref > 0)
  ------------------
  |  Branch (310:9): [True: 1.92M, False: 29.7k]
  ------------------
  311|  1.92M|        return;
  312|  29.7k|    OPENSSL_free(keymgmt->type_name);
  ------------------
  |  |  132|  29.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  313|  29.7k|    ossl_provider_free(keymgmt->prov);
  314|  29.7k|    CRYPTO_FREE_REF(&keymgmt->refcnt);
  315|  29.7k|    OPENSSL_free(keymgmt);
  ------------------
  |  |  132|  29.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  316|  29.7k|}
EVP_KEYMGMT_get0_provider:
  319|   525k|{
  320|   525k|    return keymgmt->prov;
  321|   525k|}
evp_keymgmt_get_legacy_alg:
  329|  96.3k|{
  330|  96.3k|    return keymgmt->legacy_alg;
  331|  96.3k|}
EVP_KEYMGMT_is_a:
  344|   944k|{
  345|   944k|    return keymgmt != NULL
  ------------------
  |  Branch (345:12): [True: 944k, False: 0]
  ------------------
  346|   944k|        && evp_is_a(keymgmt->prov, keymgmt->name_id, NULL, name);
  ------------------
  |  Branch (346:12): [True: 944k, False: 0]
  ------------------
  347|   944k|}
EVP_KEYMGMT_do_all_provided:
  352|      2|{
  353|      2|    evp_generic_do_all(libctx, OSSL_OP_KEYMGMT,
  ------------------
  |  |  288|      2|#define OSSL_OP_KEYMGMT 10
  ------------------
  354|      2|        (void (*)(void *, void *))fn, arg,
  355|      2|        keymgmt_from_algorithm,
  356|      2|        evp_keymgmt_up_ref,
  357|      2|        evp_keymgmt_free);
  358|      2|}
EVP_KEYMGMT_names_do_all:
  363|   542k|{
  364|   542k|    if (keymgmt->prov != NULL)
  ------------------
  |  Branch (364:9): [True: 542k, False: 0]
  ------------------
  365|   542k|        return evp_names_do_all(keymgmt->prov, keymgmt->name_id, fn, data);
  366|       |
  367|      0|    return 1;
  368|   542k|}
evp_keymgmt_freedata:
  390|   512k|{
  391|       |    /* This is mandatory, no need to check for its presence */
  392|   512k|    keymgmt->free(keydata);
  393|   512k|}
evp_keymgmt_gen_init:
  397|  9.03k|{
  398|  9.03k|    void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt));
  399|       |
  400|  9.03k|    if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (400:9): [True: 0, False: 9.03k]
  ------------------
  401|      0|        return NULL;
  402|  9.03k|    return keymgmt->gen_init(provctx, selection, params);
  403|  9.03k|}
evp_keymgmt_gen_set_params:
  421|  9.03k|{
  422|  9.03k|    if (keymgmt->gen_set_params == NULL)
  ------------------
  |  Branch (422:9): [True: 0, False: 9.03k]
  ------------------
  423|      0|        return 0;
  424|  9.03k|    return keymgmt->gen_set_params(genctx, params);
  425|  9.03k|}
evp_keymgmt_gen:
  455|  9.03k|{
  456|  9.03k|    void *ret;
  457|  9.03k|    const char *desc = keymgmt->description != NULL ? keymgmt->description : "";
  ------------------
  |  Branch (457:24): [True: 9.03k, False: 0]
  ------------------
  458|       |
  459|  9.03k|    if (keymgmt->gen == NULL) {
  ------------------
  |  Branch (459:9): [True: 0, False: 9.03k]
  ------------------
  460|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |  110|      0|#define EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED 236
  ------------------
  461|      0|            "%s key generation:%s", keymgmt->type_name, desc);
  462|      0|        return NULL;
  463|      0|    }
  464|       |
  465|  9.03k|    ERR_set_mark();
  466|  9.03k|    ret = keymgmt->gen(genctx, cb, cbarg);
  467|  9.03k|    if (ret == NULL && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (467:9): [True: 0, False: 9.03k]
  |  Branch (467:24): [True: 0, False: 0]
  ------------------
  468|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |  109|      0|#define EVP_R_PROVIDER_KEYMGMT_FAILURE 233
  ------------------
  469|      0|            "%s key generation:%s", keymgmt->type_name, desc);
  470|  9.03k|    ERR_clear_last_mark();
  471|  9.03k|    return ret;
  472|  9.03k|}
evp_keymgmt_gen_cleanup:
  475|  9.03k|{
  476|  9.03k|    if (keymgmt->gen_cleanup != NULL)
  ------------------
  |  Branch (476:9): [True: 9.03k, False: 0]
  ------------------
  477|  9.03k|        keymgmt->gen_cleanup(genctx);
  478|  9.03k|}
evp_keymgmt_has_load:
  481|  1.00M|{
  482|  1.00M|    return keymgmt != NULL && keymgmt->load != NULL;
  ------------------
  |  Branch (482:12): [True: 1.00M, False: 0]
  |  Branch (482:31): [True: 1.00M, False: 0]
  ------------------
  483|  1.00M|}
evp_keymgmt_load:
  487|   503k|{
  488|   503k|    if (evp_keymgmt_has_load(keymgmt))
  ------------------
  |  Branch (488:9): [True: 503k, False: 0]
  ------------------
  489|   503k|        return keymgmt->load(objref, objref_sz);
  490|      0|    return NULL;
  491|   503k|}
evp_keymgmt_get_params:
  495|   522k|{
  496|   522k|    if (keymgmt->get_params == NULL)
  ------------------
  |  Branch (496:9): [True: 0, False: 522k]
  ------------------
  497|      0|        return 1;
  498|   522k|    return keymgmt->get_params(keydata, params);
  499|   522k|}
evp_keymgmt_export:
  574|  4.18k|{
  575|  4.18k|    if (keymgmt->export == NULL)
  ------------------
  |  Branch (575:9): [True: 0, False: 4.18k]
  ------------------
  576|      0|        return 0;
  577|  4.18k|    return keymgmt->export(keydata, selection, param_cb, cbarg);
  578|  4.18k|}
keymgmt_meth.c:keymgmt_from_algorithm:
   66|  29.7k|{
   67|  29.7k|    const OSSL_DISPATCH *fns = algodef->implementation;
   68|  29.7k|    EVP_KEYMGMT *keymgmt = NULL;
   69|  29.7k|    int setparamfncnt = 0, getparamfncnt = 0;
   70|  29.7k|    int setgenparamfncnt = 0;
   71|  29.7k|    int importfncnt = 0, exportfncnt = 0;
   72|  29.7k|    int importtypesfncnt = 0, exporttypesfncnt = 0;
   73|  29.7k|    int getgenparamfncnt = 0;
   74|       |
   75|  29.7k|    if ((keymgmt = keymgmt_new()) == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 29.7k]
  ------------------
   76|      0|        return NULL;
   77|       |
   78|  29.7k|    keymgmt->name_id = name_id;
   79|  29.7k|    if ((keymgmt->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (79:9): [True: 0, False: 29.7k]
  ------------------
   80|      0|        EVP_KEYMGMT_free(keymgmt);
   81|      0|        return NULL;
   82|      0|    }
   83|  29.7k|    keymgmt->description = algodef->algorithm_description;
   84|       |
   85|   562k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (85:12): [True: 533k, False: 29.7k]
  ------------------
   86|   533k|        switch (fns->function_id) {
  ------------------
  |  Branch (86:17): [True: 533k, False: 0]
  ------------------
   87|  29.7k|        case OSSL_FUNC_KEYMGMT_NEW:
  ------------------
  |  |  664|  29.7k|#define OSSL_FUNC_KEYMGMT_NEW 1
  ------------------
  |  Branch (87:9): [True: 29.7k, False: 503k]
  ------------------
   88|  29.7k|            if (keymgmt->new == NULL)
  ------------------
  |  Branch (88:17): [True: 29.7k, False: 0]
  ------------------
   89|  29.7k|                keymgmt->new = OSSL_FUNC_keymgmt_new(fns);
   90|  29.7k|            break;
   91|  4.25k|        case OSSL_FUNC_KEYMGMT_NEW_EX:
  ------------------
  |  |  666|  4.25k|#define OSSL_FUNC_KEYMGMT_NEW_EX 17
  ------------------
  |  Branch (91:9): [True: 4.25k, False: 528k]
  ------------------
   92|  4.25k|            if (keymgmt->new_ex == NULL)
  ------------------
  |  Branch (92:17): [True: 4.25k, False: 0]
  ------------------
   93|  4.25k|                keymgmt->new_ex = OSSL_FUNC_keymgmt_new_ex(fns);
   94|  4.25k|            break;
   95|  27.6k|        case OSSL_FUNC_KEYMGMT_GEN_INIT:
  ------------------
  |  |  670|  27.6k|#define OSSL_FUNC_KEYMGMT_GEN_INIT 2
  ------------------
  |  Branch (95:9): [True: 27.6k, False: 505k]
  ------------------
   96|  27.6k|            if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (96:17): [True: 27.6k, False: 0]
  ------------------
   97|  27.6k|                keymgmt->gen_init = OSSL_FUNC_keymgmt_gen_init(fns);
   98|  27.6k|            break;
   99|  4.25k|        case OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE:
  ------------------
  |  |  671|  4.25k|#define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE 3
  ------------------
  |  Branch (99:9): [True: 4.25k, False: 528k]
  ------------------
  100|  4.25k|            if (keymgmt->gen_set_template == NULL)
  ------------------
  |  Branch (100:17): [True: 4.25k, False: 0]
  ------------------
  101|  4.25k|                keymgmt->gen_set_template = OSSL_FUNC_keymgmt_gen_set_template(fns);
  102|  4.25k|            break;
  103|  27.6k|        case OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS:
  ------------------
  |  |  672|  27.6k|#define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS 4
  ------------------
  |  Branch (103:9): [True: 27.6k, False: 505k]
  ------------------
  104|  27.6k|            if (keymgmt->gen_set_params == NULL) {
  ------------------
  |  Branch (104:17): [True: 27.6k, False: 0]
  ------------------
  105|  27.6k|                setgenparamfncnt++;
  106|  27.6k|                keymgmt->gen_set_params = OSSL_FUNC_keymgmt_gen_set_params(fns);
  107|  27.6k|            }
  108|  27.6k|            break;
  109|  27.6k|        case OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS:
  ------------------
  |  |  673|  27.6k|#define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS 5
  ------------------
  |  Branch (109:9): [True: 27.6k, False: 505k]
  ------------------
  110|  27.6k|            if (keymgmt->gen_settable_params == NULL) {
  ------------------
  |  Branch (110:17): [True: 27.6k, False: 0]
  ------------------
  111|  27.6k|                setgenparamfncnt++;
  112|  27.6k|                keymgmt->gen_settable_params = OSSL_FUNC_keymgmt_gen_settable_params(fns);
  113|  27.6k|            }
  114|  27.6k|            break;
  115|  1.41k|        case OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS:
  ------------------
  |  |  676|  1.41k|#define OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS 15
  ------------------
  |  Branch (115:9): [True: 1.41k, False: 531k]
  ------------------
  116|  1.41k|            if (keymgmt->gen_get_params == NULL) {
  ------------------
  |  Branch (116:17): [True: 1.41k, False: 0]
  ------------------
  117|  1.41k|                getgenparamfncnt++;
  118|  1.41k|                keymgmt->gen_get_params = OSSL_FUNC_keymgmt_gen_get_params(fns);
  119|  1.41k|            }
  120|  1.41k|            break;
  121|  1.41k|        case OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS:
  ------------------
  |  |  677|  1.41k|#define OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS 16
  ------------------
  |  Branch (121:9): [True: 1.41k, False: 531k]
  ------------------
  122|  1.41k|            if (keymgmt->gen_gettable_params == NULL) {
  ------------------
  |  Branch (122:17): [True: 1.41k, False: 0]
  ------------------
  123|  1.41k|                getgenparamfncnt++;
  124|  1.41k|                keymgmt->gen_gettable_params = OSSL_FUNC_keymgmt_gen_gettable_params(fns);
  125|  1.41k|            }
  126|  1.41k|            break;
  127|  27.6k|        case OSSL_FUNC_KEYMGMT_GEN:
  ------------------
  |  |  674|  27.6k|#define OSSL_FUNC_KEYMGMT_GEN 6
  ------------------
  |  Branch (127:9): [True: 27.6k, False: 505k]
  ------------------
  128|  27.6k|            if (keymgmt->gen == NULL)
  ------------------
  |  Branch (128:17): [True: 27.6k, False: 0]
  ------------------
  129|  27.6k|                keymgmt->gen = OSSL_FUNC_keymgmt_gen(fns);
  130|  27.6k|            break;
  131|  27.6k|        case OSSL_FUNC_KEYMGMT_GEN_CLEANUP:
  ------------------
  |  |  675|  27.6k|#define OSSL_FUNC_KEYMGMT_GEN_CLEANUP 7
  ------------------
  |  Branch (131:9): [True: 27.6k, False: 505k]
  ------------------
  132|  27.6k|            if (keymgmt->gen_cleanup == NULL)
  ------------------
  |  Branch (132:17): [True: 27.6k, False: 0]
  ------------------
  133|  27.6k|                keymgmt->gen_cleanup = OSSL_FUNC_keymgmt_gen_cleanup(fns);
  134|  27.6k|            break;
  135|  29.7k|        case OSSL_FUNC_KEYMGMT_FREE:
  ------------------
  |  |  702|  29.7k|#define OSSL_FUNC_KEYMGMT_FREE 10
  ------------------
  |  Branch (135:9): [True: 29.7k, False: 503k]
  ------------------
  136|  29.7k|            if (keymgmt->free == NULL)
  ------------------
  |  Branch (136:17): [True: 29.7k, False: 0]
  ------------------
  137|  29.7k|                keymgmt->free = OSSL_FUNC_keymgmt_free(fns);
  138|  29.7k|            break;
  139|  21.2k|        case OSSL_FUNC_KEYMGMT_LOAD:
  ------------------
  |  |  697|  21.2k|#define OSSL_FUNC_KEYMGMT_LOAD 8
  ------------------
  |  Branch (139:9): [True: 21.2k, False: 511k]
  ------------------
  140|  21.2k|            if (keymgmt->load == NULL)
  ------------------
  |  Branch (140:17): [True: 21.2k, False: 0]
  ------------------
  141|  21.2k|                keymgmt->load = OSSL_FUNC_keymgmt_load(fns);
  142|  21.2k|            break;
  143|  27.6k|        case OSSL_FUNC_KEYMGMT_GET_PARAMS:
  ------------------
  |  |  706|  27.6k|#define OSSL_FUNC_KEYMGMT_GET_PARAMS 11
  ------------------
  |  Branch (143:9): [True: 27.6k, False: 505k]
  ------------------
  144|  27.6k|            if (keymgmt->get_params == NULL) {
  ------------------
  |  Branch (144:17): [True: 27.6k, False: 0]
  ------------------
  145|  27.6k|                getparamfncnt++;
  146|  27.6k|                keymgmt->get_params = OSSL_FUNC_keymgmt_get_params(fns);
  147|  27.6k|            }
  148|  27.6k|            break;
  149|  27.6k|        case OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS:
  ------------------
  |  |  707|  27.6k|#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
  ------------------
  |  Branch (149:9): [True: 27.6k, False: 505k]
  ------------------
  150|  27.6k|            if (keymgmt->gettable_params == NULL) {
  ------------------
  |  Branch (150:17): [True: 27.6k, False: 0]
  ------------------
  151|  27.6k|                getparamfncnt++;
  152|  27.6k|                keymgmt->gettable_params = OSSL_FUNC_keymgmt_gettable_params(fns);
  153|  27.6k|            }
  154|  27.6k|            break;
  155|  14.8k|        case OSSL_FUNC_KEYMGMT_SET_PARAMS:
  ------------------
  |  |  713|  14.8k|#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
  ------------------
  |  Branch (155:9): [True: 14.8k, False: 518k]
  ------------------
  156|  14.8k|            if (keymgmt->set_params == NULL) {
  ------------------
  |  Branch (156:17): [True: 14.8k, False: 0]
  ------------------
  157|  14.8k|                setparamfncnt++;
  158|  14.8k|                keymgmt->set_params = OSSL_FUNC_keymgmt_set_params(fns);
  159|  14.8k|            }
  160|  14.8k|            break;
  161|  14.8k|        case OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS:
  ------------------
  |  |  714|  14.8k|#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
  ------------------
  |  Branch (161:9): [True: 14.8k, False: 518k]
  ------------------
  162|  14.8k|            if (keymgmt->settable_params == NULL) {
  ------------------
  |  Branch (162:17): [True: 14.8k, False: 0]
  ------------------
  163|  14.8k|                setparamfncnt++;
  164|  14.8k|                keymgmt->settable_params = OSSL_FUNC_keymgmt_settable_params(fns);
  165|  14.8k|            }
  166|  14.8k|            break;
  167|  3.54k|        case OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME:
  ------------------
  |  |  721|  3.54k|#define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 20
  ------------------
  |  Branch (167:9): [True: 3.54k, False: 529k]
  ------------------
  168|  3.54k|            if (keymgmt->query_operation_name == NULL)
  ------------------
  |  Branch (168:17): [True: 3.54k, False: 0]
  ------------------
  169|  3.54k|                keymgmt->query_operation_name = OSSL_FUNC_keymgmt_query_operation_name(fns);
  170|  3.54k|            break;
  171|  29.7k|        case OSSL_FUNC_KEYMGMT_HAS:
  ------------------
  |  |  726|  29.7k|#define OSSL_FUNC_KEYMGMT_HAS 21
  ------------------
  |  Branch (171:9): [True: 29.7k, False: 503k]
  ------------------
  172|  29.7k|            if (keymgmt->has == NULL)
  ------------------
  |  Branch (172:17): [True: 29.7k, False: 0]
  ------------------
  173|  29.7k|                keymgmt->has = OSSL_FUNC_keymgmt_has(fns);
  174|  29.7k|            break;
  175|  24.8k|        case OSSL_FUNC_KEYMGMT_DUP:
  ------------------
  |  |  755|  24.8k|#define OSSL_FUNC_KEYMGMT_DUP 44
  ------------------
  |  Branch (175:9): [True: 24.8k, False: 508k]
  ------------------
  176|  24.8k|            if (keymgmt->dup == NULL)
  ------------------
  |  Branch (176:17): [True: 24.8k, False: 0]
  ------------------
  177|  24.8k|                keymgmt->dup = OSSL_FUNC_keymgmt_dup(fns);
  178|  24.8k|            break;
  179|  21.2k|        case OSSL_FUNC_KEYMGMT_VALIDATE:
  ------------------
  |  |  730|  21.2k|#define OSSL_FUNC_KEYMGMT_VALIDATE 22
  ------------------
  |  Branch (179:9): [True: 21.2k, False: 511k]
  ------------------
  180|  21.2k|            if (keymgmt->validate == NULL)
  ------------------
  |  Branch (180:17): [True: 21.2k, False: 0]
  ------------------
  181|  21.2k|                keymgmt->validate = OSSL_FUNC_keymgmt_validate(fns);
  182|  21.2k|            break;
  183|  27.6k|        case OSSL_FUNC_KEYMGMT_MATCH:
  ------------------
  |  |  734|  27.6k|#define OSSL_FUNC_KEYMGMT_MATCH 23
  ------------------
  |  Branch (183:9): [True: 27.6k, False: 505k]
  ------------------
  184|  27.6k|            if (keymgmt->match == NULL)
  ------------------
  |  Branch (184:17): [True: 27.6k, False: 0]
  ------------------
  185|  27.6k|                keymgmt->match = OSSL_FUNC_keymgmt_match(fns);
  186|  27.6k|            break;
  187|  27.6k|        case OSSL_FUNC_KEYMGMT_IMPORT:
  ------------------
  |  |  740|  27.6k|#define OSSL_FUNC_KEYMGMT_IMPORT 40
  ------------------
  |  Branch (187:9): [True: 27.6k, False: 505k]
  ------------------
  188|  27.6k|            if (keymgmt->import == NULL) {
  ------------------
  |  Branch (188:17): [True: 27.6k, False: 0]
  ------------------
  189|  27.6k|                importfncnt++;
  190|  27.6k|                keymgmt->import = OSSL_FUNC_keymgmt_import(fns);
  191|  27.6k|            }
  192|  27.6k|            break;
  193|  27.6k|        case OSSL_FUNC_KEYMGMT_IMPORT_TYPES:
  ------------------
  |  |  741|  27.6k|#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES 41
  ------------------
  |  Branch (193:9): [True: 27.6k, False: 505k]
  ------------------
  194|  27.6k|            if (keymgmt->import_types == NULL) {
  ------------------
  |  Branch (194:17): [True: 27.6k, False: 0]
  ------------------
  195|  27.6k|                if (importtypesfncnt == 0)
  ------------------
  |  Branch (195:21): [True: 27.6k, False: 0]
  ------------------
  196|  27.6k|                    importfncnt++;
  197|  27.6k|                importtypesfncnt++;
  198|  27.6k|                keymgmt->import_types = OSSL_FUNC_keymgmt_import_types(fns);
  199|  27.6k|            }
  200|  27.6k|            break;
  201|      0|        case OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX:
  ------------------
  |  |  760|      0|#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX 45
  ------------------
  |  Branch (201:9): [True: 0, False: 533k]
  ------------------
  202|      0|            if (keymgmt->import_types_ex == NULL) {
  ------------------
  |  Branch (202:17): [True: 0, False: 0]
  ------------------
  203|      0|                if (importtypesfncnt == 0)
  ------------------
  |  Branch (203:21): [True: 0, False: 0]
  ------------------
  204|      0|                    importfncnt++;
  205|      0|                importtypesfncnt++;
  206|      0|                keymgmt->import_types_ex = OSSL_FUNC_keymgmt_import_types_ex(fns);
  207|      0|            }
  208|      0|            break;
  209|  27.6k|        case OSSL_FUNC_KEYMGMT_EXPORT:
  ------------------
  |  |  742|  27.6k|#define OSSL_FUNC_KEYMGMT_EXPORT 42
  ------------------
  |  Branch (209:9): [True: 27.6k, False: 505k]
  ------------------
  210|  27.6k|            if (keymgmt->export == NULL) {
  ------------------
  |  Branch (210:17): [True: 27.6k, False: 0]
  ------------------
  211|  27.6k|                exportfncnt++;
  212|  27.6k|                keymgmt->export = OSSL_FUNC_keymgmt_export(fns);
  213|  27.6k|            }
  214|  27.6k|            break;
  215|  27.6k|        case OSSL_FUNC_KEYMGMT_EXPORT_TYPES:
  ------------------
  |  |  743|  27.6k|#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES 43
  ------------------
  |  Branch (215:9): [True: 27.6k, False: 505k]
  ------------------
  216|  27.6k|            if (keymgmt->export_types == NULL) {
  ------------------
  |  Branch (216:17): [True: 27.6k, False: 0]
  ------------------
  217|  27.6k|                if (exporttypesfncnt == 0)
  ------------------
  |  Branch (217:21): [True: 27.6k, False: 0]
  ------------------
  218|  27.6k|                    exportfncnt++;
  219|  27.6k|                exporttypesfncnt++;
  220|  27.6k|                keymgmt->export_types = OSSL_FUNC_keymgmt_export_types(fns);
  221|  27.6k|            }
  222|  27.6k|            break;
  223|      0|        case OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX:
  ------------------
  |  |  761|      0|#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX 46
  ------------------
  |  Branch (223:9): [True: 0, False: 533k]
  ------------------
  224|      0|            if (keymgmt->export_types_ex == NULL) {
  ------------------
  |  Branch (224:17): [True: 0, False: 0]
  ------------------
  225|      0|                if (exporttypesfncnt == 0)
  ------------------
  |  Branch (225:21): [True: 0, False: 0]
  ------------------
  226|      0|                    exportfncnt++;
  227|      0|                exporttypesfncnt++;
  228|      0|                keymgmt->export_types_ex = OSSL_FUNC_keymgmt_export_types_ex(fns);
  229|      0|            }
  230|      0|            break;
  231|   533k|        }
  232|   533k|    }
  233|       |    /*
  234|       |     * Try to check that the method is sensible.
  235|       |     * At least one constructor and the destructor are MANDATORY
  236|       |     * The functions 'has' is MANDATORY
  237|       |     * It makes no sense being able to free stuff if you can't create it.
  238|       |     * It makes no sense providing OSSL_PARAM descriptors for import and
  239|       |     * export if you can't import or export.
  240|       |     */
  241|  29.7k|    if (keymgmt->free == NULL
  ------------------
  |  Branch (241:9): [True: 0, False: 29.7k]
  ------------------
  242|  29.7k|        || (keymgmt->new == NULL
  ------------------
  |  Branch (242:13): [True: 0, False: 29.7k]
  ------------------
  243|      0|            && keymgmt->new_ex == NULL
  ------------------
  |  Branch (243:16): [True: 0, False: 0]
  ------------------
  244|      0|            && keymgmt->gen == NULL
  ------------------
  |  Branch (244:16): [True: 0, False: 0]
  ------------------
  245|      0|            && keymgmt->load == NULL)
  ------------------
  |  Branch (245:16): [True: 0, False: 0]
  ------------------
  246|  29.7k|        || keymgmt->has == NULL
  ------------------
  |  Branch (246:12): [True: 0, False: 29.7k]
  ------------------
  247|  29.7k|        || (getparamfncnt != 0 && getparamfncnt != 2)
  ------------------
  |  Branch (247:13): [True: 27.6k, False: 2.12k]
  |  Branch (247:35): [True: 0, False: 27.6k]
  ------------------
  248|  29.7k|        || (setparamfncnt != 0 && setparamfncnt != 2)
  ------------------
  |  Branch (248:13): [True: 14.8k, False: 14.8k]
  |  Branch (248:35): [True: 0, False: 14.8k]
  ------------------
  249|  29.7k|        || (setgenparamfncnt != 0 && setgenparamfncnt != 2)
  ------------------
  |  Branch (249:13): [True: 27.6k, False: 2.12k]
  |  Branch (249:38): [True: 0, False: 27.6k]
  ------------------
  250|  29.7k|        || (getgenparamfncnt != 0 && getgenparamfncnt != 2)
  ------------------
  |  Branch (250:13): [True: 1.41k, False: 28.3k]
  |  Branch (250:38): [True: 0, False: 1.41k]
  ------------------
  251|  29.7k|        || (importfncnt != 0 && importfncnt != 2)
  ------------------
  |  Branch (251:13): [True: 27.6k, False: 2.12k]
  |  Branch (251:33): [True: 0, False: 27.6k]
  ------------------
  252|  29.7k|        || (exportfncnt != 0 && exportfncnt != 2)
  ------------------
  |  Branch (252:13): [True: 27.6k, False: 2.12k]
  |  Branch (252:33): [True: 0, False: 27.6k]
  ------------------
  253|  29.7k|        || (keymgmt->gen != NULL
  ------------------
  |  Branch (253:13): [True: 27.6k, False: 2.12k]
  ------------------
  254|  27.6k|            && (keymgmt->gen_init == NULL
  ------------------
  |  Branch (254:17): [True: 0, False: 27.6k]
  ------------------
  255|  27.6k|                || keymgmt->gen_cleanup == NULL))) {
  ------------------
  |  Branch (255:20): [True: 0, False: 27.6k]
  ------------------
  256|      0|        EVP_KEYMGMT_free(keymgmt);
  257|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  258|      0|        return NULL;
  259|      0|    }
  260|  29.7k|    keymgmt->prov = prov;
  261|  29.7k|    if (prov != NULL && !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (261:9): [True: 29.7k, False: 0]
  |  Branch (261:25): [True: 0, False: 29.7k]
  ------------------
  262|      0|        EVP_KEYMGMT_free(keymgmt);
  263|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  264|      0|        return NULL;
  265|      0|    }
  266|       |
  267|  29.7k|#ifndef FIPS_MODULE
  268|  29.7k|    keymgmt->legacy_alg = get_legacy_alg_type_from_keymgmt(keymgmt);
  269|  29.7k|#endif
  270|       |
  271|  29.7k|    return keymgmt;
  272|  29.7k|}
keymgmt_meth.c:keymgmt_new:
   31|  29.7k|{
   32|  29.7k|    EVP_KEYMGMT *keymgmt = NULL;
   33|       |
   34|  29.7k|    if ((keymgmt = OPENSSL_zalloc(sizeof(*keymgmt))) == NULL)
  ------------------
  |  |  109|  29.7k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (34:9): [True: 0, False: 29.7k]
  ------------------
   35|      0|        return NULL;
   36|  29.7k|    if (!CRYPTO_NEW_REF(&keymgmt->refcnt, 1)) {
  ------------------
  |  Branch (36:9): [True: 0, False: 29.7k]
  ------------------
   37|      0|        EVP_KEYMGMT_free(keymgmt);
   38|      0|        return NULL;
   39|      0|    }
   40|  29.7k|    return keymgmt;
   41|  29.7k|}
keymgmt_meth.c:get_legacy_alg_type_from_keymgmt:
   54|  29.7k|{
   55|  29.7k|    int type = NID_undef;
  ------------------
  |  |   18|  29.7k|#define NID_undef                       0
  ------------------
   56|       |
   57|  29.7k|    EVP_KEYMGMT_names_do_all(keymgmt, help_get_legacy_alg_type_from_keymgmt,
   58|  29.7k|        &type);
   59|  29.7k|    return type;
   60|  29.7k|}
keymgmt_meth.c:help_get_legacy_alg_type_from_keymgmt:
   46|  77.2k|{
   47|  77.2k|    int *type = arg;
   48|       |
   49|  77.2k|    if (*type == NID_undef)
  ------------------
  |  |   18|  77.2k|#define NID_undef                       0
  ------------------
  |  Branch (49:9): [True: 60.9k, False: 16.3k]
  ------------------
   50|  60.9k|        *type = evp_pkey_name2type(keytype);
   51|  77.2k|}
keymgmt_meth.c:evp_keymgmt_up_ref:
   26|   243k|{
   27|   243k|    return EVP_KEYMGMT_up_ref(data);
   28|   243k|}
keymgmt_meth.c:evp_keymgmt_free:
   21|  73.0k|{
   22|  73.0k|    EVP_KEYMGMT_free(data);
   23|  73.0k|}

EVP_blake2b512:
   23|      1|{
   24|      1|    return &blake2b_md;
   25|      1|}
EVP_blake2s256:
   37|      1|{
   38|      1|    return &blake2s_md;
   39|      1|}

EVP_md4:
   29|      1|{
   30|      1|    return &md4_md;
   31|      1|}

EVP_md5:
   29|      1|{
   30|      1|    return &md5_md;
   31|      1|}

EVP_md5_sha1:
   30|      1|{
   31|      1|    return &md5_sha1_md;
   32|      1|}

EVP_mdc2:
   29|      1|{
   30|      1|    return &mdc2_md;
   31|      1|}

EVP_ripemd160:
   29|      1|{
   30|      1|    return &ripemd160_md;
   31|      1|}

EVP_sha1:
   30|   441k|{
   31|   441k|    return &sha1_md;
   32|   441k|}
EVP_sha224:
   44|      1|{
   45|      1|    return &sha224_md;
   46|      1|}
EVP_sha256:
   58|  12.8k|{
   59|  12.8k|    return &sha256_md;
   60|  12.8k|}
EVP_sha512_224:
   72|      1|{
   73|      1|    return &sha512_224_md;
   74|      1|}
EVP_sha512_256:
   86|      1|{
   87|      1|    return &sha512_256_md;
   88|      1|}
EVP_sha384:
  100|      1|{
  101|      1|    return &sha384_md;
  102|      1|}
EVP_sha512:
  114|      1|{
  115|      1|    return &sha512_md;
  116|      1|}
EVP_sha3_224:
  120|      1|    {                                              \
  121|      1|        static const EVP_MD sha3_##bitlen##_md = { \
  122|      1|            NID_sha3_##bitlen,                     \
  ------------------
  |  | 3321|      1|#define NID_sha3_224            1096
  ------------------
  123|      1|            NID_RSA_SHA3_##bitlen,                 \
  ------------------
  |  | 3443|      1|#define NID_RSA_SHA3_224                1116
  ------------------
  124|      1|            bitlen / 8,                            \
  125|      1|            EVP_MD_FLAG_DIGALGID_ABSENT,           \
  ------------------
  |  |  147|      1|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  126|      1|            EVP_ORIG_GLOBAL,                       \
  ------------------
  |  |  187|      1|#define EVP_ORIG_GLOBAL 1
  ------------------
  127|      1|            (KECCAK1600_WIDTH - bitlen * 2) / 8    \
  ------------------
  |  |   18|      1|#define KECCAK1600_WIDTH 1600
  ------------------
  128|      1|        };                                         \
  129|      1|        return &sha3_##bitlen##_md;                \
  130|      1|    }
EVP_sha3_256:
  120|      1|    {                                              \
  121|      1|        static const EVP_MD sha3_##bitlen##_md = { \
  122|      1|            NID_sha3_##bitlen,                     \
  ------------------
  |  | 3326|      1|#define NID_sha3_256            1097
  ------------------
  123|      1|            NID_RSA_SHA3_##bitlen,                 \
  ------------------
  |  | 3448|      1|#define NID_RSA_SHA3_256                1117
  ------------------
  124|      1|            bitlen / 8,                            \
  125|      1|            EVP_MD_FLAG_DIGALGID_ABSENT,           \
  ------------------
  |  |  147|      1|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  126|      1|            EVP_ORIG_GLOBAL,                       \
  ------------------
  |  |  187|      1|#define EVP_ORIG_GLOBAL 1
  ------------------
  127|      1|            (KECCAK1600_WIDTH - bitlen * 2) / 8    \
  ------------------
  |  |   18|      1|#define KECCAK1600_WIDTH 1600
  ------------------
  128|      1|        };                                         \
  129|      1|        return &sha3_##bitlen##_md;                \
  130|      1|    }
EVP_sha3_384:
  120|      1|    {                                              \
  121|      1|        static const EVP_MD sha3_##bitlen##_md = { \
  122|      1|            NID_sha3_##bitlen,                     \
  ------------------
  |  | 3331|      1|#define NID_sha3_384            1098
  ------------------
  123|      1|            NID_RSA_SHA3_##bitlen,                 \
  ------------------
  |  | 3453|      1|#define NID_RSA_SHA3_384                1118
  ------------------
  124|      1|            bitlen / 8,                            \
  125|      1|            EVP_MD_FLAG_DIGALGID_ABSENT,           \
  ------------------
  |  |  147|      1|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  126|      1|            EVP_ORIG_GLOBAL,                       \
  ------------------
  |  |  187|      1|#define EVP_ORIG_GLOBAL 1
  ------------------
  127|      1|            (KECCAK1600_WIDTH - bitlen * 2) / 8    \
  ------------------
  |  |   18|      1|#define KECCAK1600_WIDTH 1600
  ------------------
  128|      1|        };                                         \
  129|      1|        return &sha3_##bitlen##_md;                \
  130|      1|    }
EVP_sha3_512:
  120|      1|    {                                              \
  121|      1|        static const EVP_MD sha3_##bitlen##_md = { \
  122|      1|            NID_sha3_##bitlen,                     \
  ------------------
  |  | 3336|      1|#define NID_sha3_512            1099
  ------------------
  123|      1|            NID_RSA_SHA3_##bitlen,                 \
  ------------------
  |  | 3458|      1|#define NID_RSA_SHA3_512                1119
  ------------------
  124|      1|            bitlen / 8,                            \
  125|      1|            EVP_MD_FLAG_DIGALGID_ABSENT,           \
  ------------------
  |  |  147|      1|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  126|      1|            EVP_ORIG_GLOBAL,                       \
  ------------------
  |  |  187|      1|#define EVP_ORIG_GLOBAL 1
  ------------------
  127|      1|            (KECCAK1600_WIDTH - bitlen * 2) / 8    \
  ------------------
  |  |   18|      1|#define KECCAK1600_WIDTH 1600
  ------------------
  128|      1|        };                                         \
  129|      1|        return &sha3_##bitlen##_md;                \
  130|      1|    }
EVP_shake128:
  133|      1|    {                                                      \
  134|      1|        static const EVP_MD shake##bitlen##_md = {         \
  135|      1|            NID_shake##bitlen,                             \
  ------------------
  |  | 3341|      1|#define NID_shake128            1100
  ------------------
  136|      1|            0,                                             \
  137|      1|            bitlen / 8,                                    \
  138|      1|            EVP_MD_FLAG_XOF | EVP_MD_FLAG_DIGALGID_ABSENT, \
  ------------------
  |  |  135|      1|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
                          EVP_MD_FLAG_XOF | EVP_MD_FLAG_DIGALGID_ABSENT, \
  ------------------
  |  |  147|      1|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  139|      1|            EVP_ORIG_GLOBAL,                               \
  ------------------
  |  |  187|      1|#define EVP_ORIG_GLOBAL 1
  ------------------
  140|      1|            (KECCAK1600_WIDTH - bitlen * 2) / 8            \
  ------------------
  |  |   18|      1|#define KECCAK1600_WIDTH 1600
  ------------------
  141|      1|        };                                                 \
  142|      1|        return &shake##bitlen##_md;                        \
  143|      1|    }
EVP_shake256:
  133|      1|    {                                                      \
  134|      1|        static const EVP_MD shake##bitlen##_md = {         \
  135|      1|            NID_shake##bitlen,                             \
  ------------------
  |  | 3346|      1|#define NID_shake256            1101
  ------------------
  136|      1|            0,                                             \
  137|      1|            bitlen / 8,                                    \
  138|      1|            EVP_MD_FLAG_XOF | EVP_MD_FLAG_DIGALGID_ABSENT, \
  ------------------
  |  |  135|      1|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
                          EVP_MD_FLAG_XOF | EVP_MD_FLAG_DIGALGID_ABSENT, \
  ------------------
  |  |  147|      1|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  139|      1|            EVP_ORIG_GLOBAL,                               \
  ------------------
  |  |  187|      1|#define EVP_ORIG_GLOBAL 1
  ------------------
  140|      1|            (KECCAK1600_WIDTH - bitlen * 2) / 8            \
  ------------------
  |  |   18|      1|#define KECCAK1600_WIDTH 1600
  ------------------
  141|      1|        };                                                 \
  142|      1|        return &shake##bitlen##_md;                        \
  143|      1|    }

EVP_whirlpool:
   29|      1|{
   30|      1|    return &whirlpool_md;
   31|      1|}

EVP_MAC_CTX_free:
   40|  15.5k|{
   41|  15.5k|    if (ctx == NULL)
  ------------------
  |  Branch (41:9): [True: 15.5k, False: 0]
  ------------------
   42|  15.5k|        return;
   43|      0|    ctx->meth->freectx(ctx->algctx);
   44|      0|    ctx->algctx = NULL;
   45|       |    /* refcnt-- */
   46|      0|    EVP_MAC_free(ctx->meth);
   47|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|      0|}

EVP_add_cipher:
   20|    144|{
   21|    144|    int r;
   22|       |
   23|    144|    if (c == NULL)
  ------------------
  |  Branch (23:9): [True: 0, False: 144]
  ------------------
   24|      0|        return 0;
   25|       |
   26|    144|    r = OBJ_NAME_add(OBJ_nid2sn(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    144|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
   27|    144|        (const char *)c);
   28|    144|    if (r == 0)
  ------------------
  |  Branch (28:9): [True: 0, False: 144]
  ------------------
   29|      0|        return 0;
   30|    144|    r = OBJ_NAME_add(OBJ_nid2ln(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    144|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
   31|    144|        (const char *)c);
   32|    144|    return r;
   33|    144|}
EVP_add_digest:
   36|     22|{
   37|     22|    int r;
   38|     22|    const char *name;
   39|       |
   40|     22|    name = OBJ_nid2sn(md->type);
   41|     22|    r = OBJ_NAME_add(name, OBJ_NAME_TYPE_MD_METH, (const char *)md);
  ------------------
  |  |   25|     22|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
   42|     22|    if (r == 0)
  ------------------
  |  Branch (42:9): [True: 0, False: 22]
  ------------------
   43|      0|        return 0;
   44|     22|    r = OBJ_NAME_add(OBJ_nid2ln(md->type), OBJ_NAME_TYPE_MD_METH,
  ------------------
  |  |   25|     22|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
   45|     22|        (const char *)md);
   46|     22|    if (r == 0)
  ------------------
  |  Branch (46:9): [True: 0, False: 22]
  ------------------
   47|      0|        return 0;
   48|       |
   49|     22|    if (md->pkey_type && md->type != md->pkey_type) {
  ------------------
  |  Branch (49:9): [True: 17, False: 5]
  |  Branch (49:26): [True: 16, False: 1]
  ------------------
   50|     16|        r = OBJ_NAME_add(OBJ_nid2sn(md->pkey_type),
   51|     16|            OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   25|     16|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
                          OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   33|     16|#define OBJ_NAME_ALIAS 0x8000
  ------------------
   52|     16|        if (r == 0)
  ------------------
  |  Branch (52:13): [True: 0, False: 16]
  ------------------
   53|      0|            return 0;
   54|     16|        r = OBJ_NAME_add(OBJ_nid2ln(md->pkey_type),
   55|     16|            OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   25|     16|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
                          OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   33|     16|#define OBJ_NAME_ALIAS 0x8000
  ------------------
   56|     16|    }
   57|     22|    return r;
   58|     22|}
EVP_get_digestbyname:
  131|   422k|{
  132|       |    return evp_get_digestbyname_ex(NULL, name);
  133|   422k|}
evp_get_digestbyname_ex:
  136|   422k|{
  137|   422k|    const EVP_MD *dp;
  138|   422k|    OSSL_NAMEMAP *namemap;
  139|   422k|    int id;
  140|   422k|    int do_retry = 1;
  141|       |
  142|   422k|    if (!OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL))
  ------------------
  |  |  508|   422k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  |  Branch (142:9): [True: 0, False: 422k]
  ------------------
  143|      0|        return NULL;
  144|       |
  145|   422k|    dp = (const EVP_MD *)OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|   422k|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  146|       |
  147|   422k|    if (dp != NULL)
  ------------------
  |  Branch (147:9): [True: 422k, False: 0]
  ------------------
  148|   422k|        return dp;
  149|       |
  150|       |    /*
  151|       |     * It's not in the method database, but it might be there under a different
  152|       |     * name. So we check for aliases in the EVP namemap and try all of those
  153|       |     * in turn.
  154|       |     */
  155|       |
  156|      0|    namemap = ossl_namemap_stored(libctx);
  157|      0|retry:
  158|      0|    id = ossl_namemap_name2num(namemap, name);
  159|      0|    if (id == 0) {
  ------------------
  |  Branch (159:9): [True: 0, False: 0]
  ------------------
  160|      0|        EVP_MD *fetched_md;
  161|       |
  162|       |        /* Try to fetch it because the name might not be known yet. */
  163|      0|        if (!do_retry)
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|            return NULL;
  165|      0|        do_retry = 0;
  166|      0|        ERR_set_mark();
  167|      0|        fetched_md = EVP_MD_fetch(libctx, name, NULL);
  168|      0|        EVP_MD_free(fetched_md);
  169|      0|        ERR_pop_to_mark();
  170|      0|        goto retry;
  171|      0|    }
  172|       |
  173|      0|    if (!ossl_namemap_doall_names(namemap, id, digest_from_name, &dp))
  ------------------
  |  Branch (173:9): [True: 0, False: 0]
  ------------------
  174|      0|        return NULL;
  175|       |
  176|      0|    return dp;
  177|      0|}

evp_pkey_get0_RSA_int:
   41|   341k|{
   42|   341k|    if (pkey->type != EVP_PKEY_RSA && pkey->type != EVP_PKEY_RSA_PSS) {
  ------------------
  |  |   63|   341k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   682k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
                  if (pkey->type != EVP_PKEY_RSA && pkey->type != EVP_PKEY_RSA_PSS) {
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (42:9): [True: 0, False: 341k]
  |  Branch (42:39): [True: 0, False: 0]
  ------------------
   43|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_EXPECTING_AN_RSA_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|   341k|    return evp_pkey_get_legacy((EVP_PKEY *)pkey);
   47|   341k|}
EVP_PKEY_get1_RSA:
   55|   341k|{
   56|   341k|    RSA *ret = evp_pkey_get0_RSA_int(pkey);
   57|       |
   58|   341k|    if (ret != NULL && !RSA_up_ref(ret))
  ------------------
  |  Branch (58:9): [True: 341k, False: 0]
  |  Branch (58:24): [True: 0, False: 341k]
  ------------------
   59|      0|        ret = NULL;
   60|       |
   61|   341k|    return ret;
   62|   341k|}
evp_pkey_get0_EC_KEY_int:
   77|   162k|{
   78|   162k|    if (EVP_PKEY_get_base_id(pkey) != EVP_PKEY_EC) {
  ------------------
  |  |   73|   162k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   162k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (78:9): [True: 0, False: 162k]
  ------------------
   79|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_EXPECTING_A_EC_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   80|      0|        return NULL;
   81|      0|    }
   82|   162k|    return evp_pkey_get_legacy((EVP_PKEY *)pkey);
   83|   162k|}
EVP_PKEY_get1_EC_KEY:
   91|   162k|{
   92|   162k|    EC_KEY *ret = evp_pkey_get0_EC_KEY_int(pkey);
   93|       |
   94|   162k|    if (ret != NULL && !EC_KEY_up_ref(ret))
  ------------------
  |  Branch (94:9): [True: 162k, False: 0]
  |  Branch (94:24): [True: 0, False: 162k]
  ------------------
   95|      0|        ret = NULL;
   96|   162k|    return ret;
   97|   162k|}

EVP_PKEY_set_type:
  693|  1.09M|{
  694|  1.09M|    return pkey_set_type(pkey, type, NULL, -1, NULL);
  695|  1.09M|}
EVP_PKEY_assign:
  738|   503k|{
  739|   503k|#ifndef OPENSSL_NO_EC
  740|   503k|    int pktype;
  741|       |
  742|   503k|    pktype = EVP_PKEY_type(type);
  743|   503k|    if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   73|   503k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  1.00M|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
                  if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   74|   341k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|   341k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (743:9): [True: 503k, False: 0]
  |  Branch (743:27): [True: 162k, False: 341k]
  |  Branch (743:52): [True: 0, False: 341k]
  ------------------
  744|   162k|        const EC_GROUP *group = EC_KEY_get0_group(key);
  745|       |
  746|   162k|        if (group != NULL) {
  ------------------
  |  Branch (746:13): [True: 162k, False: 0]
  ------------------
  747|   162k|            int curve = EC_GROUP_get_curve_name(group);
  748|       |
  749|       |            /*
  750|       |             * Regardless of what is requested the SM2 curve must be SM2 type,
  751|       |             * and non SM2 curves are EC type.
  752|       |             */
  753|   162k|            if (curve == NID_sm2 && pktype == EVP_PKEY_EC)
  ------------------
  |  | 1259|   324k|#define NID_sm2         1172
  ------------------
                          if (curve == NID_sm2 && pktype == EVP_PKEY_EC)
  ------------------
  |  |   73|      0|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (753:17): [True: 0, False: 162k]
  |  Branch (753:37): [True: 0, False: 0]
  ------------------
  754|      0|                type = EVP_PKEY_SM2;
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  755|   162k|            else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  | 1259|   324k|#define NID_sm2         1172
  ------------------
                          else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  |   74|   162k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|   162k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (755:22): [True: 162k, False: 0]
  |  Branch (755:42): [True: 0, False: 162k]
  ------------------
  756|      0|                type = EVP_PKEY_EC;
  ------------------
  |  |   73|      0|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  757|   162k|        }
  758|   162k|    }
  759|   503k|#endif
  760|       |
  761|   503k|    if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
  ------------------
  |  Branch (761:9): [True: 0, False: 503k]
  |  Branch (761:25): [True: 0, False: 503k]
  ------------------
  762|      0|        return 0;
  763|       |
  764|   503k|    pkey->pkey.ptr = key;
  765|   503k|    detect_foreign_key(pkey);
  766|       |
  767|       |    return (key != NULL);
  768|   503k|}
EVP_PKEY_get_id:
  970|   162k|{
  971|   162k|    return pkey->type;
  972|   162k|}
EVP_PKEY_get_base_id:
  975|   162k|{
  976|   162k|    return EVP_PKEY_type(pkey->type);
  977|   162k|}
evp_pkey_name2type:
 1007|  70.0k|{
 1008|  70.0k|    int type;
 1009|  70.0k|    size_t i;
 1010|       |
 1011|   845k|    for (i = 0; i < OSSL_NELEM(standard_name2type); i++) {
  ------------------
  |  |   14|   845k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1011:17): [True: 784k, False: 60.4k]
  ------------------
 1012|   784k|        if (OPENSSL_strcasecmp(name, standard_name2type[i].ptr) == 0)
  ------------------
  |  Branch (1012:13): [True: 9.51k, False: 775k]
  ------------------
 1013|  9.51k|            return (int)standard_name2type[i].id;
 1014|   784k|    }
 1015|       |
 1016|  60.4k|    if ((type = EVP_PKEY_type(OBJ_sn2nid(name))) != NID_undef)
  ------------------
  |  |   18|  60.4k|#define NID_undef                       0
  ------------------
  |  Branch (1016:9): [True: 2.83k, False: 57.6k]
  ------------------
 1017|  2.83k|        return type;
 1018|  57.6k|    return EVP_PKEY_type(OBJ_ln2nid(name));
 1019|  60.4k|}
EVP_PKEY_is_a:
 1034|   441k|{
 1035|   441k|    if (pkey == NULL)
  ------------------
  |  Branch (1035:9): [True: 0, False: 441k]
  ------------------
 1036|      0|        return 0;
 1037|   441k|    if (pkey->keymgmt == NULL)
  ------------------
  |  Branch (1037:9): [True: 0, False: 441k]
  ------------------
 1038|      0|        return pkey->type == evp_pkey_name2type(name);
 1039|   441k|    return EVP_KEYMGMT_is_a(pkey->keymgmt, name);
 1040|   441k|}
EVP_PKEY_get1_encoded_public_key:
 1388|  4.84k|{
 1389|  4.84k|    if (pkey == NULL)
  ------------------
  |  Branch (1389:9): [True: 0, False: 4.84k]
  ------------------
 1390|      0|        return 0;
 1391|  4.84k|#ifndef FIPS_MODULE
 1392|  4.84k|    if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  383|  4.84k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 4.84k, False: 0]
  |  |  ------------------
  ------------------
 1393|  4.84k|#endif
 1394|  4.84k|    {
 1395|  4.84k|        size_t return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  4.84k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
 1396|  4.84k|        unsigned char *buf;
 1397|       |
 1398|       |        /*
 1399|       |         * We know that this is going to fail, but it will give us a size
 1400|       |         * to allocate.
 1401|       |         */
 1402|  4.84k|        EVP_PKEY_get_octet_string_param(pkey,
 1403|  4.84k|            OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  407|  4.84k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1404|  4.84k|            NULL, 0, &return_size);
 1405|  4.84k|        if (return_size == OSSL_PARAM_UNMODIFIED)
  ------------------
  |  |   22|  4.84k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (1405:13): [True: 0, False: 4.84k]
  ------------------
 1406|      0|            return 0;
 1407|       |
 1408|  4.84k|        *ppub = NULL;
 1409|  4.84k|        buf = OPENSSL_malloc(return_size);
  ------------------
  |  |  107|  4.84k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1410|  4.84k|        if (buf == NULL)
  ------------------
  |  Branch (1410:13): [True: 0, False: 4.84k]
  ------------------
 1411|      0|            return 0;
 1412|       |
 1413|  4.84k|        if (!EVP_PKEY_get_octet_string_param(pkey,
  ------------------
  |  Branch (1413:13): [True: 0, False: 4.84k]
  ------------------
 1414|  4.84k|                OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  407|  4.84k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1415|  4.84k|                buf, return_size, NULL)) {
 1416|      0|            OPENSSL_free(buf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1417|      0|            return 0;
 1418|      0|        }
 1419|  4.84k|        *ppub = buf;
 1420|  4.84k|        return return_size;
 1421|  4.84k|    }
 1422|       |
 1423|      0|#ifndef FIPS_MODULE
 1424|      0|    {
 1425|      0|        int rv = evp_pkey_asn1_ctrl(pkey, ASN1_PKEY_CTRL_GET1_TLS_ENCPT, 0, ppub);
  ------------------
  |  | 1513|      0|#define ASN1_PKEY_CTRL_GET1_TLS_ENCPT 0xa
  ------------------
 1426|      0|        if (rv <= 0)
  ------------------
  |  Branch (1426:13): [True: 0, False: 0]
  ------------------
 1427|      0|            return 0;
 1428|      0|        return rv;
 1429|      0|    }
 1430|      0|#endif /* !FIPS_MODULE */
 1431|      0|}
EVP_PKEY_new:
 1436|  1.01M|{
 1437|  1.01M|    EVP_PKEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  1.01M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1438|       |
 1439|  1.01M|    if (ret == NULL)
  ------------------
  |  Branch (1439:9): [True: 0, False: 1.01M]
  ------------------
 1440|      0|        return NULL;
 1441|       |
 1442|  1.01M|    ret->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|  1.01M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  1.01M|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1443|  1.01M|    ret->save_type = EVP_PKEY_NONE;
  ------------------
  |  |   62|  1.01M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  1.01M|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1444|       |
 1445|  1.01M|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (1445:9): [True: 0, False: 1.01M]
  ------------------
 1446|      0|        goto err;
 1447|       |
 1448|  1.01M|    ret->lock = CRYPTO_THREAD_lock_new();
 1449|  1.01M|    if (ret->lock == NULL) {
  ------------------
  |  Branch (1449:9): [True: 0, False: 1.01M]
  ------------------
 1450|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1451|      0|        goto err;
 1452|      0|    }
 1453|       |
 1454|  1.01M|#ifndef FIPS_MODULE
 1455|  1.01M|    ret->save_parameters = 1;
 1456|  1.01M|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, ret, &ret->ex_data)) {
  ------------------
  |  |  269|  1.01M|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
  |  Branch (1456:9): [True: 0, False: 1.01M]
  ------------------
 1457|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1458|      0|        goto err;
 1459|      0|    }
 1460|  1.01M|#endif
 1461|  1.01M|    return ret;
 1462|       |
 1463|      0|err:
 1464|      0|    CRYPTO_FREE_REF(&ret->references);
 1465|      0|    CRYPTO_THREAD_lock_free(ret->lock);
 1466|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1467|       |    return NULL;
 1468|  1.01M|}
EVP_PKEY_set_type_by_keymgmt:
 1601|   512k|{
 1602|   512k|#ifndef FIPS_MODULE
 1603|   512k|#define EVP_PKEY_TYPE_STR str[0]
 1604|   512k|#define EVP_PKEY_TYPE_STRLEN (str[0] == NULL ? -1 : (int)strlen(str[0]))
 1605|       |    /*
 1606|       |     * Find at most two strings that have an associated EVP_PKEY_ASN1_METHOD
 1607|       |     * Ideally, only one should be found.  If two (or more) are found, the
 1608|       |     * match is ambiguous.  This should never happen, but...
 1609|       |     */
 1610|   512k|    const char *str[2] = { NULL, NULL };
 1611|       |
 1612|   512k|    if (!EVP_KEYMGMT_names_do_all(keymgmt, find_ameth, &str)
  ------------------
  |  Branch (1612:9): [True: 0, False: 512k]
  ------------------
 1613|   512k|        || str[1] != NULL) {
  ------------------
  |  Branch (1613:12): [True: 0, False: 512k]
  ------------------
 1614|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1615|      0|        return 0;
 1616|      0|    }
 1617|       |#else
 1618|       |#define EVP_PKEY_TYPE_STR NULL
 1619|       |#define EVP_PKEY_TYPE_STRLEN -1
 1620|       |#endif
 1621|   512k|    return pkey_set_type(pkey, EVP_PKEY_NONE,
  ------------------
  |  |   62|   512k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   512k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1622|   512k|        EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1603|   512k|#define EVP_PKEY_TYPE_STR str[0]
  ------------------
                      EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1604|   512k|#define EVP_PKEY_TYPE_STRLEN (str[0] == NULL ? -1 : (int)strlen(str[0]))
  |  |  ------------------
  |  |  |  Branch (1604:31): [True: 4.47k, False: 507k]
  |  |  ------------------
  ------------------
 1623|   512k|        keymgmt);
 1624|       |
 1625|   512k|#undef EVP_PKEY_TYPE_STR
 1626|   512k|#undef EVP_PKEY_TYPE_STRLEN
 1627|   512k|}
EVP_PKEY_up_ref:
 1630|   590k|{
 1631|   590k|    int i;
 1632|       |
 1633|   590k|    if (CRYPTO_UP_REF(&pkey->references, &i) <= 0)
  ------------------
  |  Branch (1633:9): [True: 0, False: 590k]
  ------------------
 1634|      0|        return 0;
 1635|       |
 1636|   590k|    REF_PRINT_COUNT("EVP_PKEY", i, pkey);
  ------------------
  |  |  301|   590k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   590k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   590k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   590k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1637|   590k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   590k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 590k]
  |  |  ------------------
  ------------------
 1638|   590k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (1638:13): [True: 590k, False: 0]
  ------------------
 1639|   590k|}
evp_pkey_free_legacy:
 1704|  1.02M|{
 1705|  1.02M|    const EVP_PKEY_ASN1_METHOD *ameth = x->ameth;
 1706|       |
 1707|  1.02M|    if (ameth == NULL && x->legacy_cache_pkey.ptr != NULL)
  ------------------
  |  Branch (1707:9): [True: 521k, False: 506k]
  |  Branch (1707:26): [True: 0, False: 521k]
  ------------------
 1708|      0|        ameth = evp_pkey_asn1_find(x->type);
 1709|       |
 1710|  1.02M|    if (ameth != NULL) {
  ------------------
  |  Branch (1710:9): [True: 506k, False: 521k]
  ------------------
 1711|   506k|        if (x->legacy_cache_pkey.ptr != NULL) {
  ------------------
  |  Branch (1711:13): [True: 0, False: 506k]
  ------------------
 1712|       |            /*
 1713|       |             * We should never have both a legacy origin key, and a key in the
 1714|       |             * legacy cache.
 1715|       |             */
 1716|      0|            assert(x->pkey.ptr == NULL);
  ------------------
  |  Branch (1716:13): [True: 0, False: 0]
  |  Branch (1716:13): [True: 0, False: 0]
  ------------------
 1717|       |            /*
 1718|       |             * For the purposes of freeing we make the legacy cache look like
 1719|       |             * a legacy origin key.
 1720|       |             */
 1721|      0|            x->pkey = x->legacy_cache_pkey;
 1722|      0|            x->legacy_cache_pkey.ptr = NULL;
 1723|      0|        }
 1724|   506k|        if (ameth->pkey_free != NULL)
  ------------------
  |  Branch (1724:13): [True: 506k, False: 0]
  ------------------
 1725|   506k|            ameth->pkey_free(x);
 1726|       |        x->pkey.ptr = NULL;
 1727|   506k|    }
 1728|  1.02M|}
EVP_PKEY_free:
 1749|  2.82M|{
 1750|  2.82M|    int i;
 1751|       |
 1752|  2.82M|    if (x == NULL)
  ------------------
  |  Branch (1752:9): [True: 1.21M, False: 1.60M]
  ------------------
 1753|  1.21M|        return;
 1754|       |
 1755|  1.60M|    CRYPTO_DOWN_REF(&x->references, &i);
 1756|  1.60M|    REF_PRINT_COUNT("EVP_PKEY", i, x);
  ------------------
  |  |  301|  1.60M|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  1.60M|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  1.60M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  1.60M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1757|  1.60M|    if (i > 0)
  ------------------
  |  Branch (1757:9): [True: 590k, False: 1.01M]
  ------------------
 1758|   590k|        return;
 1759|  1.01M|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  1.01M|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 1.01M]
  |  |  ------------------
  ------------------
 1760|  1.01M|    evp_pkey_free_it(x);
 1761|  1.01M|#ifndef FIPS_MODULE
 1762|  1.01M|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, x, &x->ex_data);
  ------------------
  |  |  269|  1.01M|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
 1763|  1.01M|#endif
 1764|  1.01M|    CRYPTO_THREAD_lock_free(x->lock);
 1765|  1.01M|    CRYPTO_FREE_REF(&x->references);
 1766|  1.01M|#ifndef FIPS_MODULE
 1767|  1.01M|    sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free);
  ------------------
  |  |  287|  1.01M|#define sk_X509_ATTRIBUTE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_freefunc_type(freefunc))
  ------------------
 1768|  1.01M|#endif
 1769|  1.01M|    OPENSSL_free(x);
  ------------------
  |  |  132|  1.01M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1770|  1.01M|}
evp_pkey_get_legacy:
 2089|   503k|{
 2090|   503k|    EVP_PKEY *tmp_copy = NULL;
 2091|   503k|    void *ret = NULL;
 2092|       |
 2093|   503k|    if (!ossl_assert(pk != NULL))
  ------------------
  |  |   52|   503k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   503k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2093:9): [True: 0, False: 503k]
  ------------------
 2094|      0|        return NULL;
 2095|       |
 2096|       |    /*
 2097|       |     * If this isn't an assigned provider side key, we just use any existing
 2098|       |     * origin legacy key.
 2099|       |     */
 2100|   503k|    if (!evp_pkey_is_assigned(pk))
  ------------------
  |  |  375|   503k|    ((pk)->pkey.ptr != NULL || (pk)->keydata != NULL)
  |  |  ------------------
  |  |  |  Branch (375:6): [True: 503k, False: 0]
  |  |  |  Branch (375:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2101|      0|        return NULL;
 2102|   503k|    if (!evp_pkey_is_provided(pk))
  ------------------
  |  |  383|   503k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (2102:9): [True: 503k, False: 0]
  ------------------
 2103|   503k|        return pk->pkey.ptr;
 2104|       |
 2105|      0|    if (!CRYPTO_THREAD_read_lock(pk->lock))
  ------------------
  |  Branch (2105:9): [True: 0, False: 0]
  ------------------
 2106|      0|        return NULL;
 2107|       |
 2108|      0|    ret = pk->legacy_cache_pkey.ptr;
 2109|       |
 2110|      0|    if (!CRYPTO_THREAD_unlock(pk->lock))
  ------------------
  |  Branch (2110:9): [True: 0, False: 0]
  ------------------
 2111|      0|        return NULL;
 2112|       |
 2113|      0|    if (ret != NULL)
  ------------------
  |  Branch (2113:9): [True: 0, False: 0]
  ------------------
 2114|      0|        return ret;
 2115|       |
 2116|      0|    if (!evp_pkey_copy_downgraded(&tmp_copy, pk))
  ------------------
  |  Branch (2116:9): [True: 0, False: 0]
  ------------------
 2117|      0|        goto err;
 2118|       |
 2119|      0|    if (!CRYPTO_THREAD_write_lock(pk->lock))
  ------------------
  |  Branch (2119:9): [True: 0, False: 0]
  ------------------
 2120|      0|        goto err;
 2121|       |
 2122|       |    /* Check again in case some other thread has updated it in the meantime */
 2123|      0|    ret = pk->legacy_cache_pkey.ptr;
 2124|      0|    if (ret == NULL) {
  ------------------
  |  Branch (2124:9): [True: 0, False: 0]
  ------------------
 2125|       |        /* Steal the legacy key reference from the temporary copy */
 2126|      0|        ret = pk->legacy_cache_pkey.ptr = tmp_copy->pkey.ptr;
 2127|      0|        tmp_copy->pkey.ptr = NULL;
 2128|      0|    }
 2129|       |
 2130|      0|    if (!CRYPTO_THREAD_unlock(pk->lock)) {
  ------------------
  |  Branch (2130:9): [True: 0, False: 0]
  ------------------
 2131|      0|        ret = NULL;
 2132|      0|        goto err;
 2133|      0|    }
 2134|       |
 2135|      0|err:
 2136|      0|    EVP_PKEY_free(tmp_copy);
 2137|       |
 2138|      0|    return ret;
 2139|      0|}
EVP_PKEY_get_octet_string_param:
 2194|  9.69k|{
 2195|  9.69k|    OSSL_PARAM params[2];
 2196|  9.69k|    int ret1 = 0, ret2 = 0;
 2197|       |
 2198|  9.69k|    if (key_name == NULL)
  ------------------
  |  Branch (2198:9): [True: 0, False: 9.69k]
  ------------------
 2199|      0|        return 0;
 2200|       |
 2201|  9.69k|    params[0] = OSSL_PARAM_construct_octet_string(key_name, buf, max_buf_sz);
 2202|  9.69k|    params[1] = OSSL_PARAM_construct_end();
 2203|  9.69k|    if ((ret1 = EVP_PKEY_get_params(pkey, params)))
  ------------------
  |  Branch (2203:9): [True: 9.69k, False: 0]
  ------------------
 2204|  9.69k|        ret2 = OSSL_PARAM_modified(params);
 2205|  9.69k|    if (ret2 && out_len != NULL)
  ------------------
  |  Branch (2205:9): [True: 9.69k, False: 0]
  |  Branch (2205:17): [True: 4.84k, False: 4.84k]
  ------------------
 2206|  4.84k|        *out_len = params[0].return_size;
 2207|  9.69k|    return ret1 && ret2;
  ------------------
  |  Branch (2207:12): [True: 9.69k, False: 0]
  |  Branch (2207:20): [True: 9.69k, False: 0]
  ------------------
 2208|  9.69k|}
EVP_PKEY_get_params:
 2380|  9.69k|{
 2381|  9.69k|    if (pkey != NULL) {
  ------------------
  |  Branch (2381:9): [True: 9.69k, False: 0]
  ------------------
 2382|  9.69k|        if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  383|  9.69k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 9.69k, False: 0]
  |  |  ------------------
  ------------------
 2383|  9.69k|            return evp_keymgmt_get_params(pkey->keymgmt, pkey->keydata, params) > 0;
 2384|      0|#ifndef FIPS_MODULE
 2385|      0|        else if (evp_pkey_is_legacy(pkey))
  ------------------
  |  |  381|      0|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|      0|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|      0|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 0, False: 0]
  |  |  |  Branch (381:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2386|      0|            return evp_pkey_get_params_to_ctrl(pkey, params) > 0;
 2387|  9.69k|#endif
 2388|  9.69k|    }
 2389|  9.69k|    ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2390|      0|    return 0;
 2391|  9.69k|}
p_lib.c:detect_foreign_key:
  704|   503k|{
  705|   503k|    switch (pkey->type) {
  706|   341k|    case EVP_PKEY_RSA:
  ------------------
  |  |   63|   341k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   341k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (706:5): [True: 341k, False: 162k]
  ------------------
  707|   341k|    case EVP_PKEY_RSA_PSS:
  ------------------
  |  |   65|   341k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|   341k|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (707:5): [True: 0, False: 503k]
  ------------------
  708|   341k|        pkey->foreign = pkey->pkey.rsa != NULL
  ------------------
  |  Branch (708:25): [True: 341k, False: 0]
  ------------------
  709|   341k|            && ossl_rsa_is_foreign(pkey->pkey.rsa);
  ------------------
  |  Branch (709:16): [True: 0, False: 341k]
  ------------------
  710|   341k|        break;
  711|      0|#ifndef OPENSSL_NO_EC
  712|      0|    case EVP_PKEY_SM2:
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (712:5): [True: 0, False: 503k]
  ------------------
  713|      0|        break;
  714|   162k|    case EVP_PKEY_EC:
  ------------------
  |  |   73|   162k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   162k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (714:5): [True: 162k, False: 341k]
  ------------------
  715|   162k|        pkey->foreign = pkey->pkey.ec != NULL
  ------------------
  |  Branch (715:25): [True: 162k, False: 0]
  ------------------
  716|   162k|            && ossl_ec_key_is_foreign(pkey->pkey.ec);
  ------------------
  |  Branch (716:16): [True: 0, False: 162k]
  ------------------
  717|   162k|        break;
  718|      0|#endif
  719|      0|#ifndef OPENSSL_NO_DSA
  720|      0|    case EVP_PKEY_DSA:
  ------------------
  |  |   66|      0|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|      0|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (720:5): [True: 0, False: 503k]
  ------------------
  721|      0|        pkey->foreign = pkey->pkey.dsa != NULL
  ------------------
  |  Branch (721:25): [True: 0, False: 0]
  ------------------
  722|      0|            && ossl_dsa_is_foreign(pkey->pkey.dsa);
  ------------------
  |  Branch (722:16): [True: 0, False: 0]
  ------------------
  723|      0|        break;
  724|      0|#endif
  725|      0|#ifndef OPENSSL_NO_DH
  726|      0|    case EVP_PKEY_DH:
  ------------------
  |  |   71|      0|#define EVP_PKEY_DH NID_dhKeyAgreement
  |  |  ------------------
  |  |  |  |  621|      0|#define NID_dhKeyAgreement              28
  |  |  ------------------
  ------------------
  |  Branch (726:5): [True: 0, False: 503k]
  ------------------
  727|      0|        pkey->foreign = pkey->pkey.dh != NULL
  ------------------
  |  Branch (727:25): [True: 0, False: 0]
  ------------------
  728|      0|            && ossl_dh_is_foreign(pkey->pkey.dh);
  ------------------
  |  Branch (728:16): [True: 0, False: 0]
  ------------------
  729|      0|        break;
  730|      0|#endif
  731|      0|    default:
  ------------------
  |  Branch (731:5): [True: 0, False: 503k]
  ------------------
  732|      0|        pkey->foreign = 0;
  733|      0|        break;
  734|   503k|    }
  735|   503k|}
p_lib.c:pkey_set_type:
 1485|  3.47M|{
 1486|  3.47M|#ifndef FIPS_MODULE
 1487|  3.47M|    const EVP_PKEY_ASN1_METHOD *ameth = NULL;
 1488|  3.47M|#endif
 1489|       |
 1490|       |    /*
 1491|       |     * The setups can't set both legacy and provider side methods.
 1492|       |     * It is forbidden
 1493|       |     */
 1494|  3.47M|    if (!ossl_assert(type == EVP_PKEY_NONE || keymgmt == NULL)) {
  ------------------
  |  |   52|  4.57M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 2.38M, False: 1.09M]
  |  |  |  Branch (52:41): [True: 1.09M, False: 0]
  |  |  ------------------
  |  |   53|  3.47M|    __FILE__, __LINE__)
  ------------------
  |  Branch (1494:9): [True: 0, False: 3.47M]
  ------------------
 1495|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1496|      0|        return 0;
 1497|      0|    }
 1498|       |
 1499|  3.47M|    if (pkey != NULL) {
  ------------------
  |  Branch (1499:9): [True: 1.60M, False: 1.87M]
  ------------------
 1500|  1.60M|        int free_it = 0;
 1501|       |
 1502|  1.60M|#ifndef FIPS_MODULE
 1503|  1.60M|        free_it = free_it || pkey->pkey.ptr != NULL;
  ------------------
  |  Branch (1503:19): [True: 0, False: 1.60M]
  |  Branch (1503:30): [True: 0, False: 1.60M]
  ------------------
 1504|  1.60M|#endif
 1505|  1.60M|        free_it = free_it || pkey->keydata != NULL;
  ------------------
  |  Branch (1505:19): [True: 0, False: 1.60M]
  |  Branch (1505:30): [True: 0, False: 1.60M]
  ------------------
 1506|  1.60M|        if (free_it)
  ------------------
  |  Branch (1506:13): [True: 0, False: 1.60M]
  ------------------
 1507|      0|            evp_pkey_free_it(pkey);
 1508|  1.60M|#ifndef FIPS_MODULE
 1509|       |        /*
 1510|       |         * If key type matches and a method exists then this lookup has
 1511|       |         * succeeded once so just indicate success.
 1512|       |         */
 1513|  1.60M|        if (pkey->type != EVP_PKEY_NONE
  ------------------
  |  |   62|  1.60M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  3.21M|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1513:13): [True: 587k, False: 1.01M]
  ------------------
 1514|   587k|            && type == pkey->save_type
  ------------------
  |  Branch (1514:16): [True: 567k, False: 20.2k]
  ------------------
 1515|   567k|            && pkey->ameth != NULL)
  ------------------
  |  Branch (1515:16): [True: 567k, False: 0]
  ------------------
 1516|   567k|            return 1;
 1517|  1.60M|#endif
 1518|  1.60M|    }
 1519|  2.91M|#ifndef FIPS_MODULE
 1520|  2.91M|    if (str != NULL)
  ------------------
  |  Branch (1520:9): [True: 2.37M, False: 531k]
  ------------------
 1521|  2.37M|        ameth = evp_pkey_asn1_find_str(str, len);
 1522|   531k|    else if (type != EVP_PKEY_NONE)
  ------------------
  |  |   62|   531k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   531k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1522:14): [True: 527k, False: 4.47k]
  ------------------
 1523|   527k|        ameth = evp_pkey_asn1_find(type);
 1524|  2.91M|#endif
 1525|       |
 1526|  2.91M|    {
 1527|  2.91M|        int check = 1;
 1528|       |
 1529|  2.91M|#ifndef FIPS_MODULE
 1530|  2.91M|        check = check && ameth == NULL;
  ------------------
  |  Branch (1530:17): [True: 2.91M, False: 0]
  |  Branch (1530:26): [True: 1.36M, False: 1.54M]
  ------------------
 1531|  2.91M|#endif
 1532|  2.91M|        check = check && keymgmt == NULL;
  ------------------
  |  Branch (1532:17): [True: 1.36M, False: 1.54M]
  |  Branch (1532:26): [True: 1.36M, False: 4.47k]
  ------------------
 1533|  2.91M|        if (check) {
  ------------------
  |  Branch (1533:13): [True: 1.36M, False: 1.54M]
  ------------------
 1534|  1.36M|            ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  357|  1.36M|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  1.36M|    (ERR_new(),                                                  \
  |  |  |  |  360|  1.36M|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  1.36M|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  1.36M|        ERR_set_error)
  |  |  ------------------
  ------------------
 1535|  1.36M|            return 0;
 1536|  1.36M|        }
 1537|  2.91M|    }
 1538|  1.54M|    if (pkey != NULL) {
  ------------------
  |  Branch (1538:9): [True: 1.03M, False: 507k]
  ------------------
 1539|  1.03M|        if (keymgmt != NULL && !EVP_KEYMGMT_up_ref(keymgmt)) {
  ------------------
  |  Branch (1539:13): [True: 512k, False: 527k]
  |  Branch (1539:32): [True: 0, False: 512k]
  ------------------
 1540|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1541|      0|            return 0;
 1542|      0|        }
 1543|       |
 1544|  1.03M|        pkey->keymgmt = keymgmt;
 1545|       |
 1546|  1.03M|        pkey->save_type = type;
 1547|  1.03M|        pkey->type = type;
 1548|       |
 1549|  1.03M|#ifndef FIPS_MODULE
 1550|       |        /*
 1551|       |         * If the internal "origin" key is provider side, don't save |ameth|.
 1552|       |         * The main reason is that |ameth| is one factor to detect that the
 1553|       |         * internal "origin" key is a legacy one.
 1554|       |         */
 1555|  1.03M|        if (keymgmt == NULL)
  ------------------
  |  Branch (1555:13): [True: 527k, False: 512k]
  ------------------
 1556|   527k|            pkey->ameth = ameth;
 1557|       |
 1558|       |        /*
 1559|       |         * The EVP_PKEY_ASN1_METHOD |pkey_id| retains its legacy key purpose
 1560|       |         * for any key type that has a legacy implementation, regardless of
 1561|       |         * if the internal key is a legacy or a provider side one.  When
 1562|       |         * there is no legacy implementation for the key, the type becomes
 1563|       |         * EVP_PKEY_KEYMGMT, which indicates that one should be cautious
 1564|       |         * with functions that expect legacy internal keys.
 1565|       |         */
 1566|  1.03M|        if (ameth != NULL) {
  ------------------
  |  Branch (1566:13): [True: 1.03M, False: 4.47k]
  ------------------
 1567|  1.03M|            if (type == EVP_PKEY_NONE)
  ------------------
  |  |   62|  1.03M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  1.03M|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1567:17): [True: 507k, False: 527k]
  ------------------
 1568|   507k|                pkey->type = ameth->pkey_id;
 1569|  1.03M|        } else {
 1570|  4.47k|            pkey->type = EVP_PKEY_KEYMGMT;
  ------------------
  |  |  104|  4.47k|#define EVP_PKEY_KEYMGMT -1
  ------------------
 1571|  4.47k|        }
 1572|  1.03M|#endif
 1573|  1.03M|    }
 1574|  1.54M|    return 1;
 1575|  1.54M|}
p_lib.c:find_ameth:
 1579|  1.87M|{
 1580|  1.87M|    const char **str = data;
 1581|       |
 1582|       |    /*
 1583|       |     * The error messages from pkey_set_type() are uninteresting here,
 1584|       |     * and misleading.
 1585|       |     */
 1586|  1.87M|    ERR_set_mark();
 1587|       |
 1588|  1.87M|    if (pkey_set_type(NULL, EVP_PKEY_NONE, name, (int)strlen(name),
  ------------------
  |  |   62|  1.87M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  1.87M|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1588:9): [True: 507k, False: 1.36M]
  ------------------
 1589|  1.87M|            NULL)) {
 1590|   507k|        if (str[0] == NULL)
  ------------------
  |  Branch (1590:13): [True: 507k, False: 0]
  ------------------
 1591|   507k|            str[0] = name;
 1592|      0|        else if (str[1] == NULL)
  ------------------
  |  Branch (1592:18): [True: 0, False: 0]
  ------------------
 1593|      0|            str[1] = name;
 1594|   507k|    }
 1595|       |
 1596|  1.87M|    ERR_pop_to_mark();
 1597|  1.87M|}
p_lib.c:evp_pkey_free_it:
 1732|  1.01M|{
 1733|       |    /* internal function; x is never NULL */
 1734|  1.01M|    evp_keymgmt_util_clear_operation_cache(x);
 1735|  1.01M|#ifndef FIPS_MODULE
 1736|  1.01M|    evp_pkey_free_legacy(x);
 1737|  1.01M|#endif
 1738|       |
 1739|  1.01M|    if (x->keymgmt != NULL) {
  ------------------
  |  Branch (1739:9): [True: 512k, False: 506k]
  ------------------
 1740|   512k|        evp_keymgmt_freedata(x->keymgmt, x->keydata);
 1741|   512k|        EVP_KEYMGMT_free(x->keymgmt);
 1742|   512k|        x->keymgmt = NULL;
 1743|   512k|        x->keydata = NULL;
 1744|   512k|    }
 1745|  1.01M|    x->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|  1.01M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  1.01M|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1746|  1.01M|}

EVP_PKEY_keygen_init:
   75|  9.03k|{
   76|  9.03k|    return gen_init(ctx, EVP_PKEY_OP_KEYGEN);
  ------------------
  |  | 1529|  9.03k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
   77|  9.03k|}
EVP_PKEY_generate:
  104|  9.03k|{
  105|  9.03k|    int ret = 0;
  106|  9.03k|    EVP_PKEY *allocated_pkey = NULL;
  107|       |    /* Legacy compatible keygen callback info, only used with provider impls */
  108|  9.03k|    int gentmp[2];
  109|       |
  110|  9.03k|    if (ppkey == NULL)
  ------------------
  |  Branch (110:9): [True: 0, False: 9.03k]
  ------------------
  111|      0|        return -1;
  112|       |
  113|  9.03k|    if (ctx == NULL)
  ------------------
  |  Branch (113:9): [True: 0, False: 9.03k]
  ------------------
  114|      0|        goto not_supported;
  115|       |
  116|  9.03k|    if ((ctx->operation & EVP_PKEY_OP_TYPE_GEN) == 0)
  ------------------
  |  | 1565|  9.03k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1528|  9.03k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  ------------------
  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1529|  9.03k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (116:9): [True: 0, False: 9.03k]
  ------------------
  117|      0|        goto not_initialized;
  118|       |
  119|  9.03k|    if (*ppkey == NULL)
  ------------------
  |  Branch (119:9): [True: 9.03k, False: 0]
  ------------------
  120|  9.03k|        *ppkey = allocated_pkey = EVP_PKEY_new();
  121|       |
  122|  9.03k|    if (*ppkey == NULL) {
  ------------------
  |  Branch (122:9): [True: 0, False: 9.03k]
  ------------------
  123|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|        return -1;
  125|      0|    }
  126|       |
  127|  9.03k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (127:9): [True: 0, False: 9.03k]
  ------------------
  128|      0|        goto not_supported;
  129|       |
  130|       |    /*
  131|       |     * Assigning gentmp to ctx->keygen_info is something our legacy
  132|       |     * implementations do.  Because the provider implementations aren't
  133|       |     * allowed to reach into our EVP_PKEY_CTX, we need to provide similar
  134|       |     * space for backward compatibility.  It's ok that we attach a local
  135|       |     * variable, as it should only be useful in the calls down from here.
  136|       |     * This is cleared as soon as it isn't useful any more, i.e. directly
  137|       |     * after the evp_keymgmt_util_gen() call.
  138|       |     */
  139|  9.03k|    ctx->keygen_info = gentmp;
  140|  9.03k|    ctx->keygen_info_count = 2;
  141|       |
  142|  9.03k|    ret = 1;
  143|  9.03k|    if (ctx->pkey != NULL) {
  ------------------
  |  Branch (143:9): [True: 0, False: 9.03k]
  ------------------
  144|      0|        EVP_KEYMGMT *tmp_keymgmt = ctx->keymgmt;
  145|      0|        void *keydata = evp_pkey_export_to_provider(ctx->pkey, ctx->libctx,
  146|      0|            &tmp_keymgmt, ctx->propquery);
  147|       |
  148|      0|        if (tmp_keymgmt == NULL)
  ------------------
  |  Branch (148:13): [True: 0, False: 0]
  ------------------
  149|      0|            goto not_supported;
  150|       |        /*
  151|       |         * It's ok if keydata is NULL here.  The backend is expected to deal
  152|       |         * with that as it sees fit.
  153|       |         */
  154|      0|        ret = evp_keymgmt_gen_set_template(ctx->keymgmt,
  155|      0|            ctx->op.keymgmt.genctx, keydata);
  156|      0|    }
  157|       |
  158|       |    /*
  159|       |     * the returned value from evp_keymgmt_util_gen() is cached in *ppkey,
  160|       |     * so we do not need to save it, just check it.
  161|       |     */
  162|  9.03k|    ret = ret
  ------------------
  |  Branch (162:11): [True: 9.03k, False: 0]
  ------------------
  163|  9.03k|        && (evp_keymgmt_util_gen(*ppkey, ctx->keymgmt, ctx->op.keymgmt.genctx,
  ------------------
  |  Branch (163:12): [True: 9.03k, False: 0]
  ------------------
  164|  9.03k|                ossl_callback_to_pkey_gencb, ctx)
  165|  9.03k|            != NULL);
  166|       |
  167|  9.03k|    ctx->keygen_info = NULL;
  168|       |
  169|  9.03k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_DEPRECATED_3_6)
  170|       |    /* In case |*ppkey| was originally a legacy key */
  171|  9.03k|    if (ret)
  ------------------
  |  Branch (171:9): [True: 9.03k, False: 0]
  ------------------
  172|  9.03k|        evp_pkey_free_legacy(*ppkey);
  173|  9.03k|#endif
  174|       |
  175|       |    /*
  176|       |     * Because we still have legacy keys
  177|       |     */
  178|  9.03k|    (*ppkey)->type = ctx->legacy_keytype;
  179|       |
  180|  9.03k|    goto end;
  181|       |
  182|  9.03k|end:
  183|  9.03k|    if (ret <= 0) {
  ------------------
  |  Branch (183:9): [True: 0, False: 9.03k]
  ------------------
  184|      0|        if (allocated_pkey != NULL)
  ------------------
  |  Branch (184:13): [True: 0, False: 0]
  ------------------
  185|      0|            *ppkey = NULL;
  186|      0|        EVP_PKEY_free(allocated_pkey);
  187|      0|    }
  188|  9.03k|    return ret;
  189|       |
  190|      0|not_supported:
  191|      0|    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  192|      0|    ret = -2;
  193|      0|    goto end;
  194|      0|not_initialized:
  195|       |    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  196|      0|    ret = -1;
  197|      0|    goto end;
  198|  9.03k|}
EVP_PKEY_keygen:
  210|  4.84k|{
  211|  4.84k|    if (ctx->operation != EVP_PKEY_OP_KEYGEN) {
  ------------------
  |  | 1529|  4.84k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (211:9): [True: 0, False: 4.84k]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return -1;
  214|      0|    }
  215|  4.84k|    return EVP_PKEY_generate(ctx, ppkey);
  216|  4.84k|}
EVP_PKEY_export:
  384|  4.18k|{
  385|  4.18k|    if (pkey == NULL) {
  ------------------
  |  Branch (385:9): [True: 0, False: 4.18k]
  ------------------
  386|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  387|      0|        return 0;
  388|      0|    }
  389|  4.18k|#ifndef FIPS_MODULE
  390|  4.18k|    if (evp_pkey_is_legacy(pkey)) {
  ------------------
  |  |  381|  4.18k|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|  4.18k|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  8.37k|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 4.18k, False: 0]
  |  |  |  Branch (381:37): [True: 0, False: 4.18k]
  |  |  ------------------
  ------------------
  391|      0|        struct fake_import_data_st data;
  392|       |
  393|      0|        data.export_cb = export_cb;
  394|      0|        data.export_cbarg = export_cbarg;
  395|       |
  396|       |        /*
  397|       |         * We don't need to care about libctx or propq here, as we're only
  398|       |         * interested in the resulting OSSL_PARAM array.
  399|       |         */
  400|      0|        return pkey->ameth->export_to(pkey, &data, pkey_fake_import,
  401|      0|            NULL, NULL);
  402|      0|    }
  403|  4.18k|#endif
  404|  4.18k|    return evp_keymgmt_util_export(pkey, selection, export_cb, export_cbarg);
  405|  4.18k|}
pmeth_gn.c:gen_init:
   27|  9.03k|{
   28|  9.03k|    int ret = 0;
   29|       |
   30|  9.03k|    if (ctx == NULL)
  ------------------
  |  Branch (30:9): [True: 0, False: 9.03k]
  ------------------
   31|      0|        goto not_supported;
   32|       |
   33|  9.03k|    evp_pkey_ctx_free_old_ops(ctx);
   34|  9.03k|    ctx->operation = operation;
   35|       |
   36|  9.03k|    if (ctx->keymgmt == NULL || ctx->keymgmt->gen_init == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 9.03k]
  |  Branch (36:33): [True: 0, False: 9.03k]
  ------------------
   37|      0|        goto not_supported;
   38|       |
   39|  9.03k|    switch (operation) {
  ------------------
  |  Branch (39:13): [True: 9.03k, False: 0]
  ------------------
   40|      0|    case EVP_PKEY_OP_PARAMGEN:
  ------------------
  |  | 1528|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (40:5): [True: 0, False: 9.03k]
  ------------------
   41|      0|        ctx->op.keymgmt.genctx = evp_keymgmt_gen_init(ctx->keymgmt,
   42|      0|            OSSL_KEYMGMT_SELECT_ALL_PARAMETERS, NULL);
  ------------------
  |  |  653|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  648|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  654|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  649|      0|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
   43|      0|        break;
   44|  9.03k|    case EVP_PKEY_OP_KEYGEN:
  ------------------
  |  | 1529|  9.03k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (44:5): [True: 9.03k, False: 0]
  ------------------
   45|  9.03k|        ctx->op.keymgmt.genctx = evp_keymgmt_gen_init(ctx->keymgmt, OSSL_KEYMGMT_SELECT_KEYPAIR,
  ------------------
  |  |  656|  9.03k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  9.03k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  9.03k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
   46|  9.03k|            NULL);
   47|  9.03k|        break;
   48|  9.03k|    }
   49|       |
   50|  9.03k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (50:9): [True: 0, False: 9.03k]
  ------------------
   51|  9.03k|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   52|  9.03k|    else
   53|  9.03k|        ret = 1;
   54|  9.03k|    goto end;
   55|       |
   56|  9.03k|end:
   57|  9.03k|    if (ret <= 0 && ctx != NULL) {
  ------------------
  |  Branch (57:9): [True: 0, False: 9.03k]
  |  Branch (57:21): [True: 0, False: 0]
  ------------------
   58|      0|        evp_pkey_ctx_free_old_ops(ctx);
   59|      0|        ctx->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1527|      0|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
   60|      0|    }
   61|  9.03k|    return ret;
   62|       |
   63|      0|not_supported:
   64|       |    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   65|      0|    ret = -2;
   66|      0|    goto end;
   67|  9.03k|}

evp_pkey_ctx_state:
   49|  9.03k|{
   50|  9.03k|    if (ctx->operation == EVP_PKEY_OP_UNDEFINED)
  ------------------
  |  | 1527|  9.03k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  |  Branch (50:9): [True: 0, False: 9.03k]
  ------------------
   51|      0|        return EVP_PKEY_STATE_UNKNOWN;
  ------------------
  |  |  678|      0|#define EVP_PKEY_STATE_UNKNOWN 0
  ------------------
   52|       |
   53|  9.03k|    if ((EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  476|  18.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  9.03k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  9.03k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 0, False: 9.03k]
  |  |  ------------------
  ------------------
   54|      0|            && ctx->op.kex.algctx != NULL)
  ------------------
  |  Branch (54:16): [True: 0, False: 0]
  ------------------
   55|  9.03k|        || (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  473|  18.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|  9.03k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|  9.03k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|  9.03k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|  9.03k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|  9.03k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|  9.03k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|  9.03k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|  9.03k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|  9.03k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|  9.03k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|  9.03k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 9.03k]
  |  |  ------------------
  ------------------
   56|      0|            && ctx->op.sig.algctx != NULL)
  ------------------
  |  Branch (56:16): [True: 0, False: 0]
  ------------------
   57|  9.03k|        || (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  479|  18.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|  9.03k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|  9.03k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|  9.03k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 9.03k]
  |  |  ------------------
  ------------------
   58|      0|            && ctx->op.ciph.algctx != NULL)
  ------------------
  |  Branch (58:16): [True: 0, False: 0]
  ------------------
   59|  9.03k|        || (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  482|  18.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  9.03k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  9.03k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  9.03k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 9.03k, False: 0]
  |  |  ------------------
  ------------------
   60|  9.03k|            && ctx->op.keymgmt.genctx != NULL)
  ------------------
  |  Branch (60:16): [True: 9.03k, False: 0]
  ------------------
   61|      0|        || (EVP_PKEY_CTX_IS_KEM_OP(ctx)
  ------------------
  |  |  488|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1562|      0|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1539|      0|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1540|      0|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (488:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   62|      0|            && ctx->op.encap.algctx != NULL))
  ------------------
  |  Branch (62:16): [True: 0, False: 0]
  ------------------
   63|  9.03k|        return EVP_PKEY_STATE_PROVIDER;
  ------------------
  |  |  680|  9.03k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
   64|       |
   65|      0|    return EVP_PKEY_STATE_LEGACY;
  ------------------
  |  |  679|      0|#define EVP_PKEY_STATE_LEGACY 1
  ------------------
   66|  9.03k|}
EVP_PKEY_CTX_new_from_name:
  194|  9.03k|{
  195|       |    return int_ctx_new(libctx, NULL, name, propquery, -1);
  196|  9.03k|}
EVP_PKEY_CTX_new_from_pkey:
  200|  87.5k|{
  201|       |    return int_ctx_new(libctx, pkey, NULL, propquery, -1);
  202|  87.5k|}
evp_pkey_ctx_free_old_ops:
  205|   105k|{
  206|   105k|    if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)) {
  ------------------
  |  |  473|   105k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|   105k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|   105k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|   105k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|   105k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|   105k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|   105k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|   105k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|   105k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|   105k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|   105k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|   105k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 105k]
  |  |  ------------------
  ------------------
  207|      0|        if (ctx->op.sig.algctx != NULL && ctx->op.sig.signature != NULL)
  ------------------
  |  Branch (207:13): [True: 0, False: 0]
  |  Branch (207:43): [True: 0, False: 0]
  ------------------
  208|      0|            ctx->op.sig.signature->freectx(ctx->op.sig.algctx);
  209|      0|        EVP_SIGNATURE_free(ctx->op.sig.signature);
  210|      0|        ctx->op.sig.algctx = NULL;
  211|      0|        ctx->op.sig.signature = NULL;
  212|   105k|    } else if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) {
  ------------------
  |  |  476|   105k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|   105k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|   105k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 0, False: 105k]
  |  |  ------------------
  ------------------
  213|      0|        if (ctx->op.kex.algctx != NULL && ctx->op.kex.exchange != NULL)
  ------------------
  |  Branch (213:13): [True: 0, False: 0]
  |  Branch (213:43): [True: 0, False: 0]
  ------------------
  214|      0|            ctx->op.kex.exchange->freectx(ctx->op.kex.algctx);
  215|      0|        EVP_KEYEXCH_free(ctx->op.kex.exchange);
  216|      0|        ctx->op.kex.algctx = NULL;
  217|      0|        ctx->op.kex.exchange = NULL;
  218|   105k|    } else if (EVP_PKEY_CTX_IS_KEM_OP(ctx)) {
  ------------------
  |  |  488|   105k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1562|   105k|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1539|   105k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1540|   105k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (488:5): [True: 0, False: 105k]
  |  |  ------------------
  ------------------
  219|      0|        if (ctx->op.encap.algctx != NULL && ctx->op.encap.kem != NULL)
  ------------------
  |  Branch (219:13): [True: 0, False: 0]
  |  Branch (219:45): [True: 0, False: 0]
  ------------------
  220|      0|            ctx->op.encap.kem->freectx(ctx->op.encap.algctx);
  221|      0|        EVP_KEM_free(ctx->op.encap.kem);
  222|      0|        ctx->op.encap.algctx = NULL;
  223|      0|        ctx->op.encap.kem = NULL;
  224|   105k|    } else if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)) {
  ------------------
  |  |  479|   105k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|   105k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|   105k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|   105k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 105k]
  |  |  ------------------
  ------------------
  225|      0|        if (ctx->op.ciph.algctx != NULL && ctx->op.ciph.cipher != NULL)
  ------------------
  |  Branch (225:13): [True: 0, False: 0]
  |  Branch (225:44): [True: 0, False: 0]
  ------------------
  226|      0|            ctx->op.ciph.cipher->freectx(ctx->op.ciph.algctx);
  227|      0|        EVP_ASYM_CIPHER_free(ctx->op.ciph.cipher);
  228|      0|        ctx->op.ciph.algctx = NULL;
  229|      0|        ctx->op.ciph.cipher = NULL;
  230|   105k|    } else if (EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  482|   105k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|   105k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|   105k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|   105k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 9.03k, False: 96.3k]
  |  |  ------------------
  ------------------
  231|  9.03k|        if (ctx->op.keymgmt.genctx != NULL && ctx->keymgmt != NULL)
  ------------------
  |  Branch (231:13): [True: 9.03k, False: 0]
  |  Branch (231:47): [True: 9.03k, False: 0]
  ------------------
  232|  9.03k|            evp_keymgmt_gen_cleanup(ctx->keymgmt, ctx->op.keymgmt.genctx);
  233|  9.03k|    }
  234|   105k|}
EVP_PKEY_CTX_free:
  237|   552k|{
  238|   552k|    if (ctx == NULL)
  ------------------
  |  Branch (238:9): [True: 456k, False: 96.3k]
  ------------------
  239|   456k|        return;
  240|       |
  241|  96.3k|    evp_pkey_ctx_free_old_ops(ctx);
  242|  96.3k|#ifndef FIPS_MODULE
  243|  96.3k|    evp_pkey_ctx_free_all_cached_data(ctx);
  244|  96.3k|#endif
  245|  96.3k|    EVP_KEYMGMT_free(ctx->keymgmt);
  246|       |
  247|  96.3k|    OPENSSL_free(ctx->propquery);
  ------------------
  |  |  132|  96.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  248|  96.3k|    EVP_PKEY_free(ctx->pkey);
  249|  96.3k|    EVP_PKEY_free(ctx->peerkey);
  250|  96.3k|    BN_free(ctx->rsa_pubexp);
  251|  96.3k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  96.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  252|  96.3k|}
EVP_PKEY_CTX_set_params:
  425|  9.03k|{
  426|  9.03k|    switch (evp_pkey_ctx_state(ctx)) {
  ------------------
  |  Branch (426:13): [True: 9.03k, False: 0]
  ------------------
  427|  9.03k|    case EVP_PKEY_STATE_PROVIDER:
  ------------------
  |  |  680|  9.03k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
  |  Branch (427:5): [True: 9.03k, False: 0]
  ------------------
  428|  9.03k|        if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  476|  18.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  9.03k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  9.03k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 0, False: 9.03k]
  |  |  ------------------
  ------------------
  429|      0|            && ctx->op.kex.exchange != NULL
  ------------------
  |  Branch (429:16): [True: 0, False: 0]
  ------------------
  430|      0|            && ctx->op.kex.exchange->set_ctx_params != NULL)
  ------------------
  |  Branch (430:16): [True: 0, False: 0]
  ------------------
  431|      0|            return ctx->op.kex.exchange->set_ctx_params(ctx->op.kex.algctx,
  432|      0|                params);
  433|  9.03k|        if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  473|  18.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|  9.03k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|  9.03k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|  9.03k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|  9.03k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|  9.03k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|  9.03k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|  9.03k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|  9.03k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|  9.03k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|  9.03k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|  9.03k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 9.03k]
  |  |  ------------------
  ------------------
  434|      0|            && ctx->op.sig.signature != NULL
  ------------------
  |  Branch (434:16): [True: 0, False: 0]
  ------------------
  435|      0|            && ctx->op.sig.signature->set_ctx_params != NULL)
  ------------------
  |  Branch (435:16): [True: 0, False: 0]
  ------------------
  436|      0|            return ctx->op.sig.signature->set_ctx_params(ctx->op.sig.algctx,
  437|      0|                params);
  438|  9.03k|        if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  479|  18.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|  9.03k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|  9.03k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|  9.03k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 9.03k]
  |  |  ------------------
  ------------------
  439|      0|            && ctx->op.ciph.cipher != NULL
  ------------------
  |  Branch (439:16): [True: 0, False: 0]
  ------------------
  440|      0|            && ctx->op.ciph.cipher->set_ctx_params != NULL)
  ------------------
  |  Branch (440:16): [True: 0, False: 0]
  ------------------
  441|      0|            return ctx->op.ciph.cipher->set_ctx_params(ctx->op.ciph.algctx,
  442|      0|                params);
  443|  9.03k|        if (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  482|  18.0k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  9.03k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  9.03k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  9.03k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 9.03k, False: 0]
  |  |  ------------------
  ------------------
  444|  9.03k|            && ctx->keymgmt != NULL
  ------------------
  |  Branch (444:16): [True: 9.03k, False: 0]
  ------------------
  445|  9.03k|            && ctx->keymgmt->gen_set_params != NULL)
  ------------------
  |  Branch (445:16): [True: 9.03k, False: 0]
  ------------------
  446|  9.03k|            return evp_keymgmt_gen_set_params(ctx->keymgmt, ctx->op.keymgmt.genctx,
  447|  9.03k|                params);
  448|      0|        if (EVP_PKEY_CTX_IS_KEM_OP(ctx)
  ------------------
  |  |  488|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1562|      0|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1539|      0|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1540|      0|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (488:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  449|      0|            && ctx->op.encap.kem != NULL
  ------------------
  |  Branch (449:16): [True: 0, False: 0]
  ------------------
  450|      0|            && ctx->op.encap.kem->set_ctx_params != NULL)
  ------------------
  |  Branch (450:16): [True: 0, False: 0]
  ------------------
  451|      0|            return ctx->op.encap.kem->set_ctx_params(ctx->op.encap.algctx,
  452|      0|                params);
  453|      0|        break;
  454|      0|    case EVP_PKEY_STATE_UNKNOWN:
  ------------------
  |  |  678|      0|#define EVP_PKEY_STATE_UNKNOWN 0
  ------------------
  |  Branch (454:5): [True: 0, False: 9.03k]
  ------------------
  455|      0|        break;
  456|      0|#ifndef FIPS_MODULE
  457|      0|    case EVP_PKEY_STATE_LEGACY:
  ------------------
  |  |  679|      0|#define EVP_PKEY_STATE_LEGACY 1
  ------------------
  |  Branch (457:5): [True: 0, False: 9.03k]
  ------------------
  458|      0|        return evp_pkey_ctx_set_params_to_ctrl(ctx, params);
  459|  9.03k|#endif
  460|  9.03k|    }
  461|      0|    return 0;
  462|  9.03k|}
pmeth_lib.c:int_ctx_new:
   71|  96.5k|{
   72|  96.5k|    EVP_PKEY_CTX *ret = NULL;
   73|  96.5k|    EVP_KEYMGMT *keymgmt = NULL;
   74|       |
   75|       |    /* Code below to be removed when legacy support is dropped. */
   76|       |    /* BEGIN legacy */
   77|  96.5k|    if (id == -1) {
  ------------------
  |  Branch (77:9): [True: 96.5k, False: 0]
  ------------------
   78|  96.5k|        if (pkey != NULL && !evp_pkey_is_provided(pkey)) {
  ------------------
  |  |  383|  87.5k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (78:13): [True: 87.5k, False: 9.03k]
  |  Branch (78:29): [True: 87.5k, False: 0]
  ------------------
   79|  87.5k|            id = pkey->type;
   80|  87.5k|        } else {
   81|  9.03k|            if (pkey != NULL) {
  ------------------
  |  Branch (81:17): [True: 0, False: 9.03k]
  ------------------
   82|       |                /* Must be provided if we get here */
   83|      0|                keytype = EVP_KEYMGMT_get0_name(pkey->keymgmt);
   84|      0|            }
   85|  9.03k|#ifndef FIPS_MODULE
   86|  9.03k|            if (keytype != NULL) {
  ------------------
  |  Branch (86:17): [True: 9.03k, False: 0]
  ------------------
   87|  9.03k|                id = evp_pkey_name2type(keytype);
   88|  9.03k|                if (id == NID_undef)
  ------------------
  |  |   18|  9.03k|#define NID_undef                       0
  ------------------
  |  Branch (88:21): [True: 4.47k, False: 4.55k]
  ------------------
   89|  4.47k|                    id = -1;
   90|  9.03k|            }
   91|  9.03k|#endif
   92|  9.03k|        }
   93|  96.5k|    }
   94|       |
   95|  96.5k|#ifndef FIPS_MODULE
   96|       |    /*
   97|       |     * Here, we extract what information we can for the purpose of
   98|       |     * supporting usage with implementations from providers, to make
   99|       |     * for a smooth transition from legacy stuff to provider based stuff.
  100|       |     */
  101|  96.5k|    if (id != -1)
  ------------------
  |  Branch (101:9): [True: 92.0k, False: 4.47k]
  ------------------
  102|  92.0k|        keytype = OBJ_nid2sn(id);
  103|       |
  104|       |    /* END legacy */
  105|  96.5k|#endif /* FIPS_MODULE */
  106|       |    /* We try fetching a provider implementation. */
  107|  96.5k|    if (keytype != NULL) {
  ------------------
  |  Branch (107:9): [True: 96.5k, False: 0]
  ------------------
  108|       |        /*
  109|       |         * If |pkey| is given and is provided, we take a reference to its
  110|       |         * keymgmt.  Otherwise, we fetch one for the keytype we got. This
  111|       |         * is to ensure that operation init functions can access what they
  112|       |         * need through this single pointer.
  113|       |         */
  114|  96.5k|        if (pkey != NULL && pkey->keymgmt != NULL) {
  ------------------
  |  Branch (114:13): [True: 87.5k, False: 9.03k]
  |  Branch (114:29): [True: 0, False: 87.5k]
  ------------------
  115|      0|            if (!EVP_KEYMGMT_up_ref(pkey->keymgmt))
  ------------------
  |  Branch (115:17): [True: 0, False: 0]
  ------------------
  116|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|            else
  118|      0|                keymgmt = pkey->keymgmt;
  119|  96.5k|        } else {
  120|  96.5k|            keymgmt = EVP_KEYMGMT_fetch(libctx, keytype, propquery);
  121|  96.5k|        }
  122|  96.5k|        if (keymgmt == NULL)
  ------------------
  |  Branch (122:13): [True: 226, False: 96.3k]
  ------------------
  123|    226|            return NULL; /* EVP_KEYMGMT_fetch() recorded an error */
  124|       |
  125|  96.3k|#ifndef FIPS_MODULE
  126|       |        /*
  127|       |         * Chase down the legacy NID, as that might be needed for diverse
  128|       |         * purposes, such as ensure that EVP_PKEY_type() can return sensible
  129|       |         * values. We go through all keymgmt names, because the keytype
  130|       |         * that's passed to this function doesn't necessarily translate
  131|       |         * directly.
  132|       |         */
  133|  96.3k|        if (keymgmt != NULL) {
  ------------------
  |  Branch (133:13): [True: 96.3k, False: 0]
  ------------------
  134|  96.3k|            int tmp_id = evp_keymgmt_get_legacy_alg(keymgmt);
  135|       |
  136|  96.3k|            if (tmp_id != NID_undef) {
  ------------------
  |  |   18|  96.3k|#define NID_undef                       0
  ------------------
  |  Branch (136:17): [True: 91.8k, False: 4.47k]
  ------------------
  137|  91.8k|                if (id == -1) {
  ------------------
  |  Branch (137:21): [True: 0, False: 91.8k]
  ------------------
  138|      0|                    id = tmp_id;
  139|  91.8k|                } else {
  140|       |                    /*
  141|       |                     * It really really shouldn't differ.  If it still does,
  142|       |                     * something is very wrong.
  143|       |                     */
  144|  91.8k|                    if (!ossl_assert(id == tmp_id)) {
  ------------------
  |  |   52|  91.8k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  91.8k|    __FILE__, __LINE__)
  ------------------
  |  Branch (144:25): [True: 0, False: 91.8k]
  ------------------
  145|      0|                        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  146|      0|                        EVP_KEYMGMT_free(keymgmt);
  147|      0|                        return NULL;
  148|      0|                    }
  149|  91.8k|                }
  150|  91.8k|            }
  151|  96.3k|        }
  152|  96.3k|#endif
  153|  96.3k|    }
  154|       |
  155|  96.3k|    if (keymgmt == NULL) {
  ------------------
  |  Branch (155:9): [True: 0, False: 96.3k]
  ------------------
  156|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  157|  96.3k|    } else {
  158|  96.3k|        ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  96.3k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  159|  96.3k|    }
  160|       |
  161|  96.3k|    if (ret == NULL) {
  ------------------
  |  Branch (161:9): [True: 0, False: 96.3k]
  ------------------
  162|      0|        EVP_KEYMGMT_free(keymgmt);
  163|      0|        return NULL;
  164|      0|    }
  165|  96.3k|    if (propquery != NULL) {
  ------------------
  |  Branch (165:9): [True: 15.7k, False: 80.5k]
  ------------------
  166|  15.7k|        ret->propquery = OPENSSL_strdup(propquery);
  ------------------
  |  |  136|  15.7k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|  15.7k|        if (ret->propquery == NULL) {
  ------------------
  |  Branch (167:13): [True: 0, False: 15.7k]
  ------------------
  168|      0|            OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  169|      0|            EVP_KEYMGMT_free(keymgmt);
  170|      0|            return NULL;
  171|      0|        }
  172|  15.7k|    }
  173|  96.3k|    ret->libctx = libctx;
  174|  96.3k|    ret->keytype = keytype;
  175|  96.3k|    ret->keymgmt = keymgmt;
  176|  96.3k|    ret->legacy_keytype = id;
  177|  96.3k|    ret->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1527|  96.3k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  178|       |
  179|  96.3k|    if (pkey != NULL && !EVP_PKEY_up_ref(pkey)) {
  ------------------
  |  Branch (179:9): [True: 87.2k, False: 9.03k]
  |  Branch (179:25): [True: 0, False: 87.2k]
  ------------------
  180|      0|        EVP_PKEY_CTX_free(ret);
  181|      0|        return NULL;
  182|      0|    }
  183|       |
  184|  96.3k|    ret->pkey = pkey;
  185|       |
  186|  96.3k|    return ret;
  187|  96.3k|}
pmeth_lib.c:decode_cmd:
 1154|  96.3k|{
 1155|  96.3k|    if (cmd == -1) {
  ------------------
  |  Branch (1155:9): [True: 0, False: 96.3k]
  ------------------
 1156|       |        /*
 1157|       |         * The consequence of the assertion not being true is that this
 1158|       |         * function will return -1, which will cause the calling functions
 1159|       |         * to signal that the command is unsupported...  in non-debug mode.
 1160|       |         */
 1161|      0|        if (ossl_assert(name != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
 1162|      0|            if (strcmp(name, "distid") == 0 || strcmp(name, "hexdistid") == 0)
  ------------------
  |  Branch (1162:17): [True: 0, False: 0]
  |  Branch (1162:48): [True: 0, False: 0]
  ------------------
 1163|      0|                cmd = EVP_PKEY_CTRL_SET1_ID;
  ------------------
  |  | 1590|      0|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1164|      0|    }
 1165|       |
 1166|  96.3k|    return cmd;
 1167|  96.3k|}
pmeth_lib.c:evp_pkey_ctx_free_cached_data:
 1233|  96.3k|{
 1234|  96.3k|    cmd = decode_cmd(cmd, name);
 1235|  96.3k|    switch (cmd) {
  ------------------
  |  Branch (1235:13): [True: 96.3k, False: 0]
  ------------------
 1236|  96.3k|    case EVP_PKEY_CTRL_SET1_ID:
  ------------------
  |  | 1590|  96.3k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
  |  Branch (1236:5): [True: 96.3k, False: 0]
  ------------------
 1237|  96.3k|        OPENSSL_free(ctx->cached_parameters.dist_id);
  ------------------
  |  |  132|  96.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1238|  96.3k|        OPENSSL_free(ctx->cached_parameters.dist_id_name);
  ------------------
  |  |  132|  96.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1239|  96.3k|        ctx->cached_parameters.dist_id = NULL;
 1240|       |        ctx->cached_parameters.dist_id_name = NULL;
 1241|  96.3k|        break;
 1242|  96.3k|    }
 1243|  96.3k|}
pmeth_lib.c:evp_pkey_ctx_free_all_cached_data:
 1246|  96.3k|{
 1247|  96.3k|    evp_pkey_ctx_free_cached_data(ctx, EVP_PKEY_CTRL_SET1_ID, NULL);
  ------------------
  |  | 1590|  96.3k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1248|  96.3k|}

EVP_SIGNATURE_free:
  456|  91.5k|{
  457|  91.5k|    int i;
  458|       |
  459|  91.5k|    if (signature == NULL)
  ------------------
  |  Branch (459:9): [True: 0, False: 91.5k]
  ------------------
  460|      0|        return;
  461|  91.5k|    CRYPTO_DOWN_REF(&signature->refcnt, &i);
  462|  91.5k|    if (i > 0)
  ------------------
  |  Branch (462:9): [True: 49.7k, False: 41.7k]
  ------------------
  463|  49.7k|        return;
  464|  41.7k|    OPENSSL_free(signature->type_name);
  ------------------
  |  |  132|  41.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  465|  41.7k|    ossl_provider_free(signature->prov);
  466|  41.7k|    CRYPTO_FREE_REF(&signature->refcnt);
  467|  41.7k|    OPENSSL_free(signature);
  ------------------
  |  |  132|  41.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  468|  41.7k|}
EVP_SIGNATURE_up_ref:
  471|  49.7k|{
  472|  49.7k|    int ref = 0;
  473|       |
  474|  49.7k|    CRYPTO_UP_REF(&signature->refcnt, &ref);
  475|  49.7k|    return 1;
  476|  49.7k|}
EVP_SIGNATURE_fetch:
  485|  6.94k|{
  486|  6.94k|    return evp_generic_fetch(ctx, OSSL_OP_SIGNATURE, algorithm, properties,
  ------------------
  |  |  290|  6.94k|#define OSSL_OP_SIGNATURE 12
  ------------------
  487|  6.94k|        evp_signature_from_algorithm,
  488|  6.94k|        evp_signature_up_ref,
  489|  6.94k|        evp_signature_free);
  490|  6.94k|}
signature.c:evp_signature_from_algorithm:
   55|  41.8k|{
   56|  41.8k|    const OSSL_DISPATCH *fns = algodef->implementation;
   57|  41.8k|    EVP_SIGNATURE *signature = NULL;
   58|  41.8k|    const char *desc;
   59|       |    /* Counts newctx / freectx */
   60|  41.8k|    int ctxfncnt = 0;
   61|       |    /* Counts all init functions  */
   62|  41.8k|    int initfncnt = 0;
   63|       |    /* Counts all parameter functions */
   64|  41.8k|    int gparamfncnt = 0, sparamfncnt = 0, gmdparamfncnt = 0, smdparamfncnt = 0;
   65|  41.8k|    int valid = 0;
   66|       |
   67|  41.8k|    if ((signature = evp_signature_new(prov)) == NULL) {
  ------------------
  |  Branch (67:9): [True: 0, False: 41.8k]
  ------------------
   68|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   69|      0|        goto err;
   70|      0|    }
   71|       |
   72|  41.8k|    signature->name_id = name_id;
   73|  41.8k|    if ((signature->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 41.8k]
  ------------------
   74|      0|        goto err;
   75|  41.8k|    signature->description = algodef->algorithm_description;
   76|  41.8k|    desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (76:12): [True: 8.50k, False: 33.3k]
  ------------------
   77|       |
   78|   765k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (78:12): [True: 723k, False: 41.8k]
  ------------------
   79|   723k|        switch (fns->function_id) {
  ------------------
  |  Branch (79:17): [True: 723k, False: 0]
  ------------------
   80|  41.8k|        case OSSL_FUNC_SIGNATURE_NEWCTX:
  ------------------
  |  |  797|  41.8k|#define OSSL_FUNC_SIGNATURE_NEWCTX 1
  ------------------
  |  Branch (80:9): [True: 41.8k, False: 682k]
  ------------------
   81|  41.8k|            if (signature->newctx != NULL)
  ------------------
  |  Branch (81:17): [True: 0, False: 41.8k]
  ------------------
   82|      0|                break;
   83|  41.8k|            signature->newctx = OSSL_FUNC_signature_newctx(fns);
   84|  41.8k|            ctxfncnt++;
   85|  41.8k|            break;
   86|  29.7k|        case OSSL_FUNC_SIGNATURE_SIGN_INIT:
  ------------------
  |  |  798|  29.7k|#define OSSL_FUNC_SIGNATURE_SIGN_INIT 2
  ------------------
  |  Branch (86:9): [True: 29.7k, False: 694k]
  ------------------
   87|  29.7k|            if (signature->sign_init != NULL)
  ------------------
  |  Branch (87:17): [True: 1.41k, False: 28.3k]
  ------------------
   88|  1.41k|                break;
   89|  28.3k|            signature->sign_init = OSSL_FUNC_signature_sign_init(fns);
   90|  28.3k|            initfncnt++;
   91|  28.3k|            break;
   92|  38.9k|        case OSSL_FUNC_SIGNATURE_SIGN:
  ------------------
  |  |  799|  38.9k|#define OSSL_FUNC_SIGNATURE_SIGN 3
  ------------------
  |  Branch (92:9): [True: 38.9k, False: 684k]
  ------------------
   93|  38.9k|            if (signature->sign != NULL)
  ------------------
  |  Branch (93:17): [True: 0, False: 38.9k]
  ------------------
   94|      0|                break;
   95|  38.9k|            signature->sign = OSSL_FUNC_signature_sign(fns);
   96|  38.9k|            break;
   97|  36.1k|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT:
  ------------------
  |  |  823|  36.1k|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT 27
  ------------------
  |  Branch (97:9): [True: 36.1k, False: 687k]
  ------------------
   98|  36.1k|            if (signature->sign_message_init != NULL)
  ------------------
  |  Branch (98:17): [True: 0, False: 36.1k]
  ------------------
   99|      0|                break;
  100|  36.1k|            signature->sign_message_init
  101|  36.1k|                = OSSL_FUNC_signature_sign_message_init(fns);
  102|  36.1k|            initfncnt++;
  103|  36.1k|            break;
  104|  24.1k|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE:
  ------------------
  |  |  824|  24.1k|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE 28
  ------------------
  |  Branch (104:9): [True: 24.1k, False: 699k]
  ------------------
  105|  24.1k|            if (signature->sign_message_update != NULL)
  ------------------
  |  Branch (105:17): [True: 0, False: 24.1k]
  ------------------
  106|      0|                break;
  107|  24.1k|            signature->sign_message_update
  108|  24.1k|                = OSSL_FUNC_signature_sign_message_update(fns);
  109|  24.1k|            break;
  110|  24.1k|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL:
  ------------------
  |  |  825|  24.1k|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL 29
  ------------------
  |  Branch (110:9): [True: 24.1k, False: 699k]
  ------------------
  111|  24.1k|            if (signature->sign_message_final != NULL)
  ------------------
  |  Branch (111:17): [True: 0, False: 24.1k]
  ------------------
  112|      0|                break;
  113|  24.1k|            signature->sign_message_final
  114|  24.1k|                = OSSL_FUNC_signature_sign_message_final(fns);
  115|  24.1k|            break;
  116|  29.7k|        case OSSL_FUNC_SIGNATURE_VERIFY_INIT:
  ------------------
  |  |  800|  29.7k|#define OSSL_FUNC_SIGNATURE_VERIFY_INIT 4
  ------------------
  |  Branch (116:9): [True: 29.7k, False: 694k]
  ------------------
  117|  29.7k|            if (signature->verify_init != NULL)
  ------------------
  |  Branch (117:17): [True: 1.41k, False: 28.3k]
  ------------------
  118|  1.41k|                break;
  119|  28.3k|            signature->verify_init = OSSL_FUNC_signature_verify_init(fns);
  120|  28.3k|            initfncnt++;
  121|  28.3k|            break;
  122|  38.9k|        case OSSL_FUNC_SIGNATURE_VERIFY:
  ------------------
  |  |  801|  38.9k|#define OSSL_FUNC_SIGNATURE_VERIFY 5
  ------------------
  |  Branch (122:9): [True: 38.9k, False: 684k]
  ------------------
  123|  38.9k|            if (signature->verify != NULL)
  ------------------
  |  Branch (123:17): [True: 0, False: 38.9k]
  ------------------
  124|      0|                break;
  125|  38.9k|            signature->verify = OSSL_FUNC_signature_verify(fns);
  126|  38.9k|            break;
  127|  36.1k|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT:
  ------------------
  |  |  826|  36.1k|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT 30
  ------------------
  |  Branch (127:9): [True: 36.1k, False: 687k]
  ------------------
  128|  36.1k|            if (signature->verify_message_init != NULL)
  ------------------
  |  Branch (128:17): [True: 0, False: 36.1k]
  ------------------
  129|      0|                break;
  130|  36.1k|            signature->verify_message_init
  131|  36.1k|                = OSSL_FUNC_signature_verify_message_init(fns);
  132|  36.1k|            initfncnt++;
  133|  36.1k|            break;
  134|  24.1k|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE:
  ------------------
  |  |  827|  24.1k|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE 31
  ------------------
  |  Branch (134:9): [True: 24.1k, False: 699k]
  ------------------
  135|  24.1k|            if (signature->verify_message_update != NULL)
  ------------------
  |  Branch (135:17): [True: 0, False: 24.1k]
  ------------------
  136|      0|                break;
  137|  24.1k|            signature->verify_message_update
  138|  24.1k|                = OSSL_FUNC_signature_verify_message_update(fns);
  139|  24.1k|            break;
  140|  24.1k|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL:
  ------------------
  |  |  828|  24.1k|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL 32
  ------------------
  |  Branch (140:9): [True: 24.1k, False: 699k]
  ------------------
  141|  24.1k|            if (signature->verify_message_final != NULL)
  ------------------
  |  Branch (141:17): [True: 0, False: 24.1k]
  ------------------
  142|      0|                break;
  143|  24.1k|            signature->verify_message_final
  144|  24.1k|                = OSSL_FUNC_signature_verify_message_final(fns);
  145|  24.1k|            break;
  146|  9.92k|        case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT:
  ------------------
  |  |  802|  9.92k|#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT 6
  ------------------
  |  Branch (146:9): [True: 9.92k, False: 713k]
  ------------------
  147|  9.92k|            if (signature->verify_recover_init != NULL)
  ------------------
  |  Branch (147:17): [True: 0, False: 9.92k]
  ------------------
  148|      0|                break;
  149|  9.92k|            signature->verify_recover_init
  150|  9.92k|                = OSSL_FUNC_signature_verify_recover_init(fns);
  151|  9.92k|            initfncnt++;
  152|  9.92k|            break;
  153|  9.92k|        case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER:
  ------------------
  |  |  803|  9.92k|#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER 7
  ------------------
  |  Branch (153:9): [True: 9.92k, False: 713k]
  ------------------
  154|  9.92k|            if (signature->verify_recover != NULL)
  ------------------
  |  Branch (154:17): [True: 0, False: 9.92k]
  ------------------
  155|      0|                break;
  156|  9.92k|            signature->verify_recover
  157|  9.92k|                = OSSL_FUNC_signature_verify_recover(fns);
  158|  9.92k|            break;
  159|  17.7k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT:
  ------------------
  |  |  804|  17.7k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT 8
  ------------------
  |  Branch (159:9): [True: 17.7k, False: 706k]
  ------------------
  160|  17.7k|            if (signature->digest_sign_init != NULL)
  ------------------
  |  Branch (160:17): [True: 0, False: 17.7k]
  ------------------
  161|      0|                break;
  162|  17.7k|            signature->digest_sign_init
  163|  17.7k|                = OSSL_FUNC_signature_digest_sign_init(fns);
  164|  17.7k|            initfncnt++;
  165|  17.7k|            break;
  166|  5.67k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE:
  ------------------
  |  |  805|  5.67k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE 9
  ------------------
  |  Branch (166:9): [True: 5.67k, False: 718k]
  ------------------
  167|  5.67k|            if (signature->digest_sign_update != NULL)
  ------------------
  |  Branch (167:17): [True: 0, False: 5.67k]
  ------------------
  168|      0|                break;
  169|  5.67k|            signature->digest_sign_update
  170|  5.67k|                = OSSL_FUNC_signature_digest_sign_update(fns);
  171|  5.67k|            break;
  172|  5.67k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL:
  ------------------
  |  |  806|  5.67k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL 10
  ------------------
  |  Branch (172:9): [True: 5.67k, False: 718k]
  ------------------
  173|  5.67k|            if (signature->digest_sign_final != NULL)
  ------------------
  |  Branch (173:17): [True: 0, False: 5.67k]
  ------------------
  174|      0|                break;
  175|  5.67k|            signature->digest_sign_final
  176|  5.67k|                = OSSL_FUNC_signature_digest_sign_final(fns);
  177|  5.67k|            break;
  178|  12.0k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN:
  ------------------
  |  |  807|  12.0k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN 11
  ------------------
  |  Branch (178:9): [True: 12.0k, False: 711k]
  ------------------
  179|  12.0k|            if (signature->digest_sign != NULL)
  ------------------
  |  Branch (179:17): [True: 0, False: 12.0k]
  ------------------
  180|      0|                break;
  181|  12.0k|            signature->digest_sign
  182|  12.0k|                = OSSL_FUNC_signature_digest_sign(fns);
  183|  12.0k|            break;
  184|  14.8k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT:
  ------------------
  |  |  808|  14.8k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT 12
  ------------------
  |  Branch (184:9): [True: 14.8k, False: 709k]
  ------------------
  185|  14.8k|            if (signature->digest_verify_init != NULL)
  ------------------
  |  Branch (185:17): [True: 0, False: 14.8k]
  ------------------
  186|      0|                break;
  187|  14.8k|            signature->digest_verify_init
  188|  14.8k|                = OSSL_FUNC_signature_digest_verify_init(fns);
  189|  14.8k|            initfncnt++;
  190|  14.8k|            break;
  191|  2.83k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE:
  ------------------
  |  |  809|  2.83k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE 13
  ------------------
  |  Branch (191:9): [True: 2.83k, False: 721k]
  ------------------
  192|  2.83k|            if (signature->digest_verify_update != NULL)
  ------------------
  |  Branch (192:17): [True: 0, False: 2.83k]
  ------------------
  193|      0|                break;
  194|  2.83k|            signature->digest_verify_update
  195|  2.83k|                = OSSL_FUNC_signature_digest_verify_update(fns);
  196|  2.83k|            break;
  197|  2.83k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL:
  ------------------
  |  |  810|  2.83k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL 14
  ------------------
  |  Branch (197:9): [True: 2.83k, False: 721k]
  ------------------
  198|  2.83k|            if (signature->digest_verify_final != NULL)
  ------------------
  |  Branch (198:17): [True: 0, False: 2.83k]
  ------------------
  199|      0|                break;
  200|  2.83k|            signature->digest_verify_final
  201|  2.83k|                = OSSL_FUNC_signature_digest_verify_final(fns);
  202|  2.83k|            break;
  203|  12.0k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY:
  ------------------
  |  |  811|  12.0k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY 15
  ------------------
  |  Branch (203:9): [True: 12.0k, False: 711k]
  ------------------
  204|  12.0k|            if (signature->digest_verify != NULL)
  ------------------
  |  Branch (204:17): [True: 0, False: 12.0k]
  ------------------
  205|      0|                break;
  206|  12.0k|            signature->digest_verify
  207|  12.0k|                = OSSL_FUNC_signature_digest_verify(fns);
  208|  12.0k|            break;
  209|  41.8k|        case OSSL_FUNC_SIGNATURE_FREECTX:
  ------------------
  |  |  812|  41.8k|#define OSSL_FUNC_SIGNATURE_FREECTX 16
  ------------------
  |  Branch (209:9): [True: 41.8k, False: 682k]
  ------------------
  210|  41.8k|            if (signature->freectx != NULL)
  ------------------
  |  Branch (210:17): [True: 0, False: 41.8k]
  ------------------
  211|      0|                break;
  212|  41.8k|            signature->freectx = OSSL_FUNC_signature_freectx(fns);
  213|  41.8k|            ctxfncnt++;
  214|  41.8k|            break;
  215|  41.8k|        case OSSL_FUNC_SIGNATURE_DUPCTX:
  ------------------
  |  |  813|  41.8k|#define OSSL_FUNC_SIGNATURE_DUPCTX 17
  ------------------
  |  Branch (215:9): [True: 41.8k, False: 682k]
  ------------------
  216|  41.8k|            if (signature->dupctx != NULL)
  ------------------
  |  Branch (216:17): [True: 0, False: 41.8k]
  ------------------
  217|      0|                break;
  218|  41.8k|            signature->dupctx = OSSL_FUNC_signature_dupctx(fns);
  219|  41.8k|            break;
  220|  38.9k|        case OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS:
  ------------------
  |  |  814|  38.9k|#define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS 18
  ------------------
  |  Branch (220:9): [True: 38.9k, False: 684k]
  ------------------
  221|  38.9k|            if (signature->get_ctx_params != NULL)
  ------------------
  |  Branch (221:17): [True: 0, False: 38.9k]
  ------------------
  222|      0|                break;
  223|  38.9k|            signature->get_ctx_params
  224|  38.9k|                = OSSL_FUNC_signature_get_ctx_params(fns);
  225|  38.9k|            gparamfncnt++;
  226|  38.9k|            break;
  227|  38.9k|        case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  815|  38.9k|#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS 19
  ------------------
  |  Branch (227:9): [True: 38.9k, False: 684k]
  ------------------
  228|  38.9k|            if (signature->gettable_ctx_params != NULL)
  ------------------
  |  Branch (228:17): [True: 0, False: 38.9k]
  ------------------
  229|      0|                break;
  230|  38.9k|            signature->gettable_ctx_params
  231|  38.9k|                = OSSL_FUNC_signature_gettable_ctx_params(fns);
  232|  38.9k|            gparamfncnt++;
  233|  38.9k|            break;
  234|  41.8k|        case OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS:
  ------------------
  |  |  816|  41.8k|#define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS 20
  ------------------
  |  Branch (234:9): [True: 41.8k, False: 682k]
  ------------------
  235|  41.8k|            if (signature->set_ctx_params != NULL)
  ------------------
  |  Branch (235:17): [True: 0, False: 41.8k]
  ------------------
  236|      0|                break;
  237|  41.8k|            signature->set_ctx_params
  238|  41.8k|                = OSSL_FUNC_signature_set_ctx_params(fns);
  239|  41.8k|            sparamfncnt++;
  240|  41.8k|            break;
  241|  41.8k|        case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  817|  41.8k|#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS 21
  ------------------
  |  Branch (241:9): [True: 41.8k, False: 682k]
  ------------------
  242|  41.8k|            if (signature->settable_ctx_params != NULL)
  ------------------
  |  Branch (242:17): [True: 0, False: 41.8k]
  ------------------
  243|      0|                break;
  244|  41.8k|            signature->settable_ctx_params
  245|  41.8k|                = OSSL_FUNC_signature_settable_ctx_params(fns);
  246|  41.8k|            sparamfncnt++;
  247|  41.8k|            break;
  248|  2.83k|        case OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS:
  ------------------
  |  |  818|  2.83k|#define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS 22
  ------------------
  |  Branch (248:9): [True: 2.83k, False: 721k]
  ------------------
  249|  2.83k|            if (signature->get_ctx_md_params != NULL)
  ------------------
  |  Branch (249:17): [True: 0, False: 2.83k]
  ------------------
  250|      0|                break;
  251|  2.83k|            signature->get_ctx_md_params
  252|  2.83k|                = OSSL_FUNC_signature_get_ctx_md_params(fns);
  253|  2.83k|            gmdparamfncnt++;
  254|  2.83k|            break;
  255|  2.83k|        case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS:
  ------------------
  |  |  819|  2.83k|#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
  ------------------
  |  Branch (255:9): [True: 2.83k, False: 721k]
  ------------------
  256|  2.83k|            if (signature->gettable_ctx_md_params != NULL)
  ------------------
  |  Branch (256:17): [True: 0, False: 2.83k]
  ------------------
  257|      0|                break;
  258|  2.83k|            signature->gettable_ctx_md_params
  259|  2.83k|                = OSSL_FUNC_signature_gettable_ctx_md_params(fns);
  260|  2.83k|            gmdparamfncnt++;
  261|  2.83k|            break;
  262|  2.83k|        case OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS:
  ------------------
  |  |  820|  2.83k|#define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS 24
  ------------------
  |  Branch (262:9): [True: 2.83k, False: 721k]
  ------------------
  263|  2.83k|            if (signature->set_ctx_md_params != NULL)
  ------------------
  |  Branch (263:17): [True: 0, False: 2.83k]
  ------------------
  264|      0|                break;
  265|  2.83k|            signature->set_ctx_md_params
  266|  2.83k|                = OSSL_FUNC_signature_set_ctx_md_params(fns);
  267|  2.83k|            smdparamfncnt++;
  268|  2.83k|            break;
  269|  2.83k|        case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS:
  ------------------
  |  |  821|  2.83k|#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
  ------------------
  |  Branch (269:9): [True: 2.83k, False: 721k]
  ------------------
  270|  2.83k|            if (signature->settable_ctx_md_params != NULL)
  ------------------
  |  Branch (270:17): [True: 0, False: 2.83k]
  ------------------
  271|      0|                break;
  272|  2.83k|            signature->settable_ctx_md_params
  273|  2.83k|                = OSSL_FUNC_signature_settable_ctx_md_params(fns);
  274|  2.83k|            smdparamfncnt++;
  275|  2.83k|            break;
  276|  25.5k|        case OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES:
  ------------------
  |  |  822|  25.5k|#define OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES 26
  ------------------
  |  Branch (276:9): [True: 25.5k, False: 698k]
  ------------------
  277|  25.5k|            if (signature->query_key_types != NULL)
  ------------------
  |  Branch (277:17): [True: 0, False: 25.5k]
  ------------------
  278|      0|                break;
  279|  25.5k|            signature->query_key_types
  280|  25.5k|                = OSSL_FUNC_signature_query_key_types(fns);
  281|  25.5k|            break;
  282|   723k|        }
  283|   723k|    }
  284|       |    /*
  285|       |     * In order to be a consistent set of functions we must have at least
  286|       |     * a set of context functions (newctx and freectx) as well as a set of
  287|       |     * "signature" functions.  Because there's an overlap between some sets
  288|       |     * of functions, counters don't always cut it, we must test known
  289|       |     * combinations.
  290|       |     * We start by assuming the implementation is valid, and then look for
  291|       |     * reasons it's not.
  292|       |     */
  293|  41.8k|    valid = 1;
  294|       |    /* Start with the ones where counters say enough */
  295|  41.8k|    if (ctxfncnt != 2) {
  ------------------
  |  Branch (295:9): [True: 0, False: 41.8k]
  ------------------
  296|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  297|      0|            "missing %s newctx or freectx:%s", signature->type_name, desc);
  298|      0|        valid = 0;
  299|      0|    }
  300|  41.8k|    if (valid
  ------------------
  |  Branch (300:9): [True: 41.8k, False: 0]
  ------------------
  301|  41.8k|        && ((gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (301:14): [True: 38.9k, False: 2.83k]
  |  Branch (301:34): [True: 0, False: 38.9k]
  ------------------
  302|  41.8k|            || (sparamfncnt != 0 && sparamfncnt != 2)
  ------------------
  |  Branch (302:17): [True: 41.8k, False: 0]
  |  Branch (302:37): [True: 0, False: 41.8k]
  ------------------
  303|  41.8k|            || (gmdparamfncnt != 0 && gmdparamfncnt != 2)
  ------------------
  |  Branch (303:17): [True: 2.83k, False: 38.9k]
  |  Branch (303:39): [True: 0, False: 2.83k]
  ------------------
  304|  41.8k|            || (smdparamfncnt != 0 && smdparamfncnt != 2))) {
  ------------------
  |  Branch (304:17): [True: 2.83k, False: 38.9k]
  |  Branch (304:39): [True: 0, False: 2.83k]
  ------------------
  305|       |        /*
  306|       |         * Params functions are optional, but if defined, they must
  307|       |         * be pairwise complete sets, i.e. a getter must have an
  308|       |         * associated gettable, etc
  309|       |         */
  310|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  311|      0|            "missing %s params getter or setter:%s", signature->type_name, desc);
  312|      0|        valid = 0;
  313|      0|    }
  314|  41.8k|    if (valid && initfncnt == 0) {
  ------------------
  |  Branch (314:9): [True: 41.8k, False: 0]
  |  Branch (314:18): [True: 0, False: 41.8k]
  ------------------
  315|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  316|      0|            "missing %s init:%s", signature->type_name, desc);
  317|      0|        valid = 0;
  318|      0|    }
  319|       |
  320|       |    /* Now we check for function combinations */
  321|  41.8k|    if (valid
  ------------------
  |  Branch (321:9): [True: 41.8k, False: 0]
  ------------------
  322|  41.8k|        && ((signature->sign_init != NULL
  ------------------
  |  Branch (322:14): [True: 28.3k, False: 13.4k]
  ------------------
  323|  28.3k|                && signature->sign == NULL)
  ------------------
  |  Branch (323:20): [True: 0, False: 28.3k]
  ------------------
  324|  41.8k|            || (signature->sign_message_init != NULL
  ------------------
  |  Branch (324:17): [True: 36.1k, False: 5.67k]
  ------------------
  325|  36.1k|                && signature->sign == NULL
  ------------------
  |  Branch (325:20): [True: 0, False: 36.1k]
  ------------------
  326|      0|                && (signature->sign_message_update == NULL
  ------------------
  |  Branch (326:21): [True: 0, False: 0]
  ------------------
  327|      0|                    || signature->sign_message_final == NULL)))) {
  ------------------
  |  Branch (327:24): [True: 0, False: 0]
  ------------------
  328|       |        /* sign_init function(s) with no signing function?  That's weird */
  329|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  330|      0|            "missing %s signing function:%s", signature->type_name, desc);
  331|      0|        valid = 0;
  332|      0|    }
  333|  41.8k|    if (valid
  ------------------
  |  Branch (333:9): [True: 41.8k, False: 0]
  ------------------
  334|  41.8k|        && (signature->sign != NULL
  ------------------
  |  Branch (334:13): [True: 38.9k, False: 2.83k]
  ------------------
  335|  2.83k|            || signature->sign_message_update != NULL
  ------------------
  |  Branch (335:16): [True: 0, False: 2.83k]
  ------------------
  336|  2.83k|            || signature->sign_message_final != NULL)
  ------------------
  |  Branch (336:16): [True: 0, False: 2.83k]
  ------------------
  337|  38.9k|        && signature->sign_init == NULL
  ------------------
  |  Branch (337:12): [True: 10.6k, False: 28.3k]
  ------------------
  338|  10.6k|        && signature->sign_message_init == NULL) {
  ------------------
  |  Branch (338:12): [True: 0, False: 10.6k]
  ------------------
  339|       |        /* signing function(s) with no sign_init? That's odd */
  340|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  341|      0|            "missing %s sign_init or sign_message_init:%s", signature->type_name, desc);
  342|      0|        valid = 0;
  343|      0|    }
  344|       |
  345|  41.8k|    if (valid
  ------------------
  |  Branch (345:9): [True: 41.8k, False: 0]
  ------------------
  346|  41.8k|        && ((signature->verify_init != NULL
  ------------------
  |  Branch (346:14): [True: 28.3k, False: 13.4k]
  ------------------
  347|  28.3k|                && signature->verify == NULL)
  ------------------
  |  Branch (347:20): [True: 0, False: 28.3k]
  ------------------
  348|  41.8k|            || (signature->verify_message_init != NULL
  ------------------
  |  Branch (348:17): [True: 36.1k, False: 5.67k]
  ------------------
  349|  36.1k|                && signature->verify == NULL
  ------------------
  |  Branch (349:20): [True: 0, False: 36.1k]
  ------------------
  350|      0|                && (signature->verify_message_update == NULL
  ------------------
  |  Branch (350:21): [True: 0, False: 0]
  ------------------
  351|      0|                    || signature->verify_message_final == NULL)))) {
  ------------------
  |  Branch (351:24): [True: 0, False: 0]
  ------------------
  352|       |        /* verify_init function(s) with no verification function?  That's weird */
  353|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  354|      0|            "missing %s verification function:%s", signature->type_name, desc);
  355|      0|        valid = 0;
  356|      0|    }
  357|  41.8k|    if (valid
  ------------------
  |  Branch (357:9): [True: 41.8k, False: 0]
  ------------------
  358|  41.8k|        && (signature->verify != NULL
  ------------------
  |  Branch (358:13): [True: 38.9k, False: 2.83k]
  ------------------
  359|  2.83k|            || signature->verify_message_update != NULL
  ------------------
  |  Branch (359:16): [True: 0, False: 2.83k]
  ------------------
  360|  2.83k|            || signature->verify_message_final != NULL)
  ------------------
  |  Branch (360:16): [True: 0, False: 2.83k]
  ------------------
  361|  38.9k|        && signature->verify_init == NULL
  ------------------
  |  Branch (361:12): [True: 10.6k, False: 28.3k]
  ------------------
  362|  10.6k|        && signature->verify_message_init == NULL) {
  ------------------
  |  Branch (362:12): [True: 0, False: 10.6k]
  ------------------
  363|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  364|      0|            "missing %s verify_init or verify_message_init:%s",
  365|      0|            signature->type_name, desc);
  366|       |        /* verification function(s) with no verify_init? That's odd */
  367|      0|        valid = 0;
  368|      0|    }
  369|       |
  370|  41.8k|    if (valid
  ------------------
  |  Branch (370:9): [True: 41.8k, False: 0]
  ------------------
  371|  41.8k|        && (signature->verify_recover_init != NULL)
  ------------------
  |  Branch (371:12): [True: 9.92k, False: 31.9k]
  ------------------
  372|  9.92k|        && (signature->verify_recover == NULL)) {
  ------------------
  |  Branch (372:12): [True: 0, False: 9.92k]
  ------------------
  373|       |        /* verify_recover_init function with no verify_recover?  How quaint */
  374|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  375|      0|            "missing %s verify_recover:%s", signature->type_name, desc);
  376|      0|        valid = 0;
  377|      0|    }
  378|       |
  379|  41.8k|    if (valid
  ------------------
  |  Branch (379:9): [True: 41.8k, False: 0]
  ------------------
  380|  41.8k|        && (signature->digest_sign_init != NULL
  ------------------
  |  Branch (380:13): [True: 17.7k, False: 24.1k]
  ------------------
  381|  17.7k|            && signature->digest_sign == NULL
  ------------------
  |  Branch (381:16): [True: 5.67k, False: 12.0k]
  ------------------
  382|  5.67k|            && (signature->digest_sign_update == NULL
  ------------------
  |  Branch (382:17): [True: 0, False: 5.67k]
  ------------------
  383|  5.67k|                || signature->digest_sign_final == NULL))) {
  ------------------
  |  Branch (383:20): [True: 0, False: 5.67k]
  ------------------
  384|       |        /* You can't have a digest_sign_init without *some* performing functions */
  385|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  386|      0|            "missing %s digest_sign function:%s", signature->type_name, desc);
  387|      0|        valid = 0;
  388|      0|    }
  389|       |
  390|  41.8k|    if (valid
  ------------------
  |  Branch (390:9): [True: 41.8k, False: 0]
  ------------------
  391|  41.8k|        && ((signature->digest_verify_init != NULL
  ------------------
  |  Branch (391:14): [True: 14.8k, False: 26.9k]
  ------------------
  392|  14.8k|            && signature->digest_verify == NULL
  ------------------
  |  Branch (392:16): [True: 2.83k, False: 12.0k]
  ------------------
  393|  2.83k|            && (signature->digest_verify_update == NULL
  ------------------
  |  Branch (393:17): [True: 0, False: 2.83k]
  ------------------
  394|  2.83k|                || signature->digest_verify_final == NULL)))) {
  ------------------
  |  Branch (394:20): [True: 0, False: 2.83k]
  ------------------
  395|       |        /* You can't have a digest_verify_init without *some* performing functions */
  396|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  397|      0|            "missing %s digest_verify function:%s", signature->type_name, desc);
  398|      0|        valid = 0;
  399|      0|    }
  400|       |
  401|  41.8k|    if (!valid)
  ------------------
  |  Branch (401:9): [True: 0, False: 41.8k]
  ------------------
  402|      0|        goto err;
  403|       |
  404|  41.8k|    if ((signature->digest_sign != NULL
  ------------------
  |  Branch (404:10): [True: 12.0k, False: 29.7k]
  ------------------
  405|  29.7k|            || signature->digest_sign_update != NULL
  ------------------
  |  Branch (405:16): [True: 5.67k, False: 24.1k]
  ------------------
  406|  24.1k|            || signature->digest_sign_final != NULL)
  ------------------
  |  Branch (406:16): [True: 0, False: 24.1k]
  ------------------
  407|  17.7k|        && signature->digest_sign_init == NULL) {
  ------------------
  |  Branch (407:12): [True: 0, False: 17.7k]
  ------------------
  408|       |        /* digest signing function(s) with no digest_sign_init? That's odd */
  409|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  410|      0|            "missing %s digest_sign_init:%s", signature->type_name, desc);
  411|      0|        goto err;
  412|      0|    }
  413|       |
  414|  41.8k|    if ((signature->digest_verify != NULL
  ------------------
  |  Branch (414:10): [True: 12.0k, False: 29.7k]
  ------------------
  415|  29.7k|            || signature->digest_verify_update != NULL
  ------------------
  |  Branch (415:16): [True: 2.83k, False: 26.9k]
  ------------------
  416|  26.9k|            || signature->digest_verify_final != NULL)
  ------------------
  |  Branch (416:16): [True: 0, False: 26.9k]
  ------------------
  417|  14.8k|        && signature->digest_verify_init == NULL) {
  ------------------
  |  Branch (417:12): [True: 0, False: 14.8k]
  ------------------
  418|       |        /* digest verification function(s) with no digest_verify_init? That's odd */
  419|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  420|      0|            "missing %s digest_verify_init:%s", signature->type_name, desc);
  421|      0|        goto err;
  422|      0|    }
  423|       |
  424|  41.8k|    if ((signature->sign_message_update == NULL) != (signature->sign_message_final == NULL)) {
  ------------------
  |  Branch (424:9): [True: 0, False: 41.8k]
  ------------------
  425|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  426|      0|            "only one of %s message signing update and final available:%s",
  427|      0|            signature->type_name, desc);
  428|      0|        goto err;
  429|      0|    }
  430|  41.8k|    if ((signature->verify_message_update == NULL) != (signature->verify_message_final == NULL)) {
  ------------------
  |  Branch (430:9): [True: 0, False: 41.8k]
  ------------------
  431|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  432|      0|            "only one of %s message verification update and final available:%s",
  433|      0|            signature->type_name, desc);
  434|      0|        goto err;
  435|      0|    }
  436|  41.8k|    if ((signature->digest_sign_update == NULL) != (signature->digest_sign_final == NULL)) {
  ------------------
  |  Branch (436:9): [True: 0, False: 41.8k]
  ------------------
  437|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  438|      0|            "only one of %s digest signing update and final available:%s",
  439|      0|            signature->type_name, desc);
  440|      0|        goto err;
  441|      0|    }
  442|  41.8k|    if ((signature->digest_verify_update == NULL) != (signature->digest_verify_final == NULL)) {
  ------------------
  |  Branch (442:9): [True: 0, False: 41.8k]
  ------------------
  443|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  444|      0|            "only one of %s digest verification update and final available:%s",
  445|      0|            signature->type_name, desc);
  446|      0|        goto err;
  447|      0|    }
  448|       |
  449|  41.8k|    return signature;
  450|      0|err:
  451|      0|    EVP_SIGNATURE_free(signature);
  452|       |    return NULL;
  453|  41.8k|}
signature.c:evp_signature_new:
   34|  41.8k|{
   35|  41.8k|    EVP_SIGNATURE *signature = OPENSSL_zalloc(sizeof(EVP_SIGNATURE));
  ------------------
  |  |  109|  41.8k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|       |
   37|  41.8k|    if (signature == NULL)
  ------------------
  |  Branch (37:9): [True: 0, False: 41.8k]
  ------------------
   38|      0|        return NULL;
   39|       |
   40|  41.8k|    if (!CRYPTO_NEW_REF(&signature->refcnt, 1)
  ------------------
  |  Branch (40:9): [True: 0, False: 41.8k]
  ------------------
   41|  41.8k|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (41:12): [True: 0, False: 41.8k]
  ------------------
   42|      0|        CRYPTO_FREE_REF(&signature->refcnt);
   43|      0|        OPENSSL_free(signature);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|       |
   47|  41.8k|    signature->prov = prov;
   48|       |
   49|  41.8k|    return signature;
   50|  41.8k|}
signature.c:evp_signature_up_ref:
   29|  49.7k|{
   30|  49.7k|    return EVP_SIGNATURE_up_ref(data);
   31|  49.7k|}
signature.c:evp_signature_free:
   24|  84.7k|{
   25|  84.7k|    EVP_SIGNATURE_free(data);
   26|  84.7k|}

ossl_do_ex_data_init:
   15|    809|{
   16|    809|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
   17|       |
   18|    809|    if (global == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 809]
  ------------------
   19|      0|        return 0;
   20|       |
   21|    809|    global->ex_data_lock = CRYPTO_THREAD_lock_new();
   22|       |    return global->ex_data_lock != NULL;
   23|    809|}
ossl_crypto_cleanup_all_ex_data_int:
   73|    808|{
   74|    808|    int i;
   75|    808|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
   76|       |
   77|    808|    if (global == NULL)
  ------------------
  |  Branch (77:9): [True: 0, False: 808]
  ------------------
   78|      0|        return;
   79|       |
   80|  15.3k|    for (i = 0; i < CRYPTO_EX_INDEX__COUNT; ++i) {
  ------------------
  |  |  270|  15.3k|#define CRYPTO_EX_INDEX__COUNT 18
  ------------------
  |  Branch (80:17): [True: 14.5k, False: 808]
  ------------------
   81|  14.5k|        EX_CALLBACKS *ip = &global->ex_data[i];
   82|       |
   83|  14.5k|        sk_EX_CALLBACK_pop_free(ip->meth, cleanup_cb);
   84|  14.5k|        ip->meth = NULL;
   85|  14.5k|    }
   86|       |
   87|    808|    CRYPTO_THREAD_lock_free(global->ex_data_lock);
   88|       |    global->ex_data_lock = NULL;
   89|    808|}
ossl_crypto_get_ex_new_index_ex:
  154|      1|{
  155|      1|    int toret = -1;
  156|      1|    EX_CALLBACK *a;
  157|      1|    EX_CALLBACKS *ip;
  158|      1|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
  159|       |
  160|      1|    if (global == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 1]
  ------------------
  161|      0|        return -1;
  162|       |
  163|      1|    ip = get_and_lock(global, class_index, 0);
  164|      1|    if (ip == NULL)
  ------------------
  |  Branch (164:9): [True: 0, False: 1]
  ------------------
  165|      0|        return -1;
  166|       |
  167|      1|    if (ip->meth == NULL) {
  ------------------
  |  Branch (167:9): [True: 1, False: 0]
  ------------------
  168|      1|        ip->meth = sk_EX_CALLBACK_new_null();
  169|       |        /* We push an initial value on the stack because the SSL
  170|       |         * "app_data" routines use ex_data index zero.  See RT 3710. */
  171|      1|        if (ip->meth == NULL
  ------------------
  |  Branch (171:13): [True: 0, False: 1]
  ------------------
  172|      1|            || !sk_EX_CALLBACK_push(ip->meth, NULL)) {
  ------------------
  |  Branch (172:16): [True: 0, False: 1]
  ------------------
  173|      0|            sk_EX_CALLBACK_free(ip->meth);
  174|      0|            ip->meth = NULL;
  175|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  176|      0|            goto err;
  177|      0|        }
  178|      1|    }
  179|       |
  180|      1|    a = (EX_CALLBACK *)OPENSSL_malloc(sizeof(*a));
  ------------------
  |  |  107|      1|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  181|      1|    if (a == NULL)
  ------------------
  |  Branch (181:9): [True: 0, False: 1]
  ------------------
  182|      0|        goto err;
  183|      1|    a->argl = argl;
  184|      1|    a->argp = argp;
  185|      1|    a->new_func = new_func;
  186|      1|    a->dup_func = dup_func;
  187|      1|    a->free_func = free_func;
  188|      1|    a->priority = priority;
  189|       |
  190|      1|    if (!sk_EX_CALLBACK_push(ip->meth, NULL)) {
  ------------------
  |  Branch (190:9): [True: 0, False: 1]
  ------------------
  191|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  192|      0|        OPENSSL_free(a);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  193|      0|        goto err;
  194|      0|    }
  195|      1|    toret = sk_EX_CALLBACK_num(ip->meth) - 1;
  196|      1|    (void)sk_EX_CALLBACK_set(ip->meth, toret, a);
  197|       |
  198|      1|err:
  199|      1|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  200|      1|    return toret;
  201|      1|}
CRYPTO_get_ex_new_index:
  206|      1|{
  207|       |    return ossl_crypto_get_ex_new_index_ex(NULL, class_index, argl, argp,
  208|      1|        new_func, dup_func, free_func, 0);
  209|      1|}
ossl_crypto_new_ex_data_ex:
  220|  5.60M|{
  221|  5.60M|    int mx, i;
  222|  5.60M|    void *ptr;
  223|  5.60M|    EX_CALLBACK **storage = NULL;
  224|  5.60M|    EX_CALLBACK *stack[10];
  225|  5.60M|    EX_CALLBACKS *ip;
  226|  5.60M|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
  227|       |
  228|  5.60M|    if (global == NULL)
  ------------------
  |  Branch (228:9): [True: 0, False: 5.60M]
  ------------------
  229|      0|        return 0;
  230|       |
  231|  5.60M|    ip = get_and_lock(global, class_index, 1);
  232|  5.60M|    if (ip == NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 5.60M]
  ------------------
  233|      0|        return 0;
  234|       |
  235|  5.60M|    ad->ctx = ctx;
  236|  5.60M|    ad->sk = NULL;
  237|  5.60M|    mx = sk_EX_CALLBACK_num(ip->meth);
  238|  5.60M|    if (mx > 0) {
  ------------------
  |  Branch (238:9): [True: 0, False: 5.60M]
  ------------------
  239|      0|        if (mx < (int)OSSL_NELEM(stack))
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (239:13): [True: 0, False: 0]
  ------------------
  240|      0|            storage = stack;
  241|      0|        else
  242|      0|            storage = OPENSSL_malloc_array(mx, sizeof(*storage));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  243|      0|        if (storage != NULL)
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|      0|            for (i = 0; i < mx; i++)
  ------------------
  |  Branch (244:25): [True: 0, False: 0]
  ------------------
  245|      0|                storage[i] = sk_EX_CALLBACK_value(ip->meth, i);
  246|      0|    }
  247|  5.60M|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  248|       |
  249|  5.60M|    if (mx > 0 && storage == NULL)
  ------------------
  |  Branch (249:9): [True: 0, False: 5.60M]
  |  Branch (249:19): [True: 0, False: 0]
  ------------------
  250|      0|        return 0;
  251|  5.60M|    for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (251:17): [True: 0, False: 5.60M]
  ------------------
  252|      0|        if (storage[i] != NULL && storage[i]->new_func != NULL) {
  ------------------
  |  Branch (252:13): [True: 0, False: 0]
  |  Branch (252:35): [True: 0, False: 0]
  ------------------
  253|      0|            ptr = CRYPTO_get_ex_data(ad, i);
  254|      0|            storage[i]->new_func(obj, ptr, ad, i,
  255|      0|                storage[i]->argl, storage[i]->argp);
  256|      0|        }
  257|      0|    }
  258|  5.60M|    if (storage != stack)
  ------------------
  |  Branch (258:9): [True: 5.60M, False: 0]
  ------------------
  259|  5.60M|        OPENSSL_free(storage);
  ------------------
  |  |  132|  5.60M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  260|  5.60M|    return 1;
  261|  5.60M|}
CRYPTO_new_ex_data:
  264|  5.60M|{
  265|       |    return ossl_crypto_new_ex_data_ex(NULL, class_index, obj, ad);
  266|  5.60M|}
CRYPTO_free_ex_data:
  367|  5.60M|{
  368|  5.60M|    int mx, i;
  369|  5.60M|    EX_CALLBACKS *ip;
  370|  5.60M|    void *ptr;
  371|  5.60M|    const EX_CALLBACK *f;
  372|  5.60M|    struct ex_callback_entry stack[10];
  373|  5.60M|    struct ex_callback_entry *storage = NULL;
  374|  5.60M|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ad->ctx);
  375|       |
  376|  5.60M|    if (global == NULL)
  ------------------
  |  Branch (376:9): [True: 0, False: 5.60M]
  ------------------
  377|      0|        goto err;
  378|       |
  379|  5.60M|    ip = get_and_lock(global, class_index, 1);
  380|  5.60M|    if (ip == NULL)
  ------------------
  |  Branch (380:9): [True: 0, False: 5.60M]
  ------------------
  381|      0|        goto err;
  382|       |
  383|  5.60M|    mx = sk_EX_CALLBACK_num(ip->meth);
  384|  5.60M|    if (mx > 0) {
  ------------------
  |  Branch (384:9): [True: 0, False: 5.60M]
  ------------------
  385|      0|        if (mx < (int)OSSL_NELEM(stack))
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (385:13): [True: 0, False: 0]
  ------------------
  386|      0|            storage = stack;
  387|      0|        else
  388|      0|            storage = OPENSSL_malloc_array(mx, sizeof(*storage));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|      0|        if (storage != NULL)
  ------------------
  |  Branch (389:13): [True: 0, False: 0]
  ------------------
  390|      0|            for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (390:25): [True: 0, False: 0]
  ------------------
  391|      0|                storage[i].excb = sk_EX_CALLBACK_value(ip->meth, i);
  392|      0|                storage[i].index = i;
  393|      0|            }
  394|      0|    }
  395|  5.60M|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  396|       |
  397|  5.60M|    if (storage != NULL) {
  ------------------
  |  Branch (397:9): [True: 0, False: 5.60M]
  ------------------
  398|       |        /* Sort according to priority. High priority first */
  399|      0|        qsort(storage, mx, sizeof(*storage), ex_callback_compare);
  400|      0|        for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (400:21): [True: 0, False: 0]
  ------------------
  401|      0|            f = storage[i].excb;
  402|       |
  403|      0|            if (f != NULL && f->free_func != NULL) {
  ------------------
  |  Branch (403:17): [True: 0, False: 0]
  |  Branch (403:30): [True: 0, False: 0]
  ------------------
  404|      0|                ptr = CRYPTO_get_ex_data(ad, storage[i].index);
  405|      0|                f->free_func(obj, ptr, ad, storage[i].index, f->argl, f->argp);
  406|      0|            }
  407|      0|        }
  408|      0|    }
  409|       |
  410|  5.60M|    if (storage != stack)
  ------------------
  |  Branch (410:9): [True: 5.60M, False: 0]
  ------------------
  411|  5.60M|        OPENSSL_free(storage);
  ------------------
  |  |  132|  5.60M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  412|  5.60M|err:
  413|  5.60M|    sk_void_free(ad->sk);
  ------------------
  |  |  226|  5.60M|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
  414|  5.60M|    ad->sk = NULL;
  415|       |    ad->ctx = NULL;
  416|  5.60M|}
CRYPTO_set_ex_data:
  469|  2.58k|{
  470|  2.58k|    int i;
  471|       |
  472|  2.58k|    if (ad->sk == NULL) {
  ------------------
  |  Branch (472:9): [True: 2.58k, False: 0]
  ------------------
  473|  2.58k|        if ((ad->sk = sk_void_new_null()) == NULL) {
  ------------------
  |  |  223|  2.58k|#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_void_freefunc_thunk))
  ------------------
  |  Branch (473:13): [True: 0, False: 2.58k]
  ------------------
  474|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  475|      0|            return 0;
  476|      0|        }
  477|  2.58k|    }
  478|       |
  479|  5.17k|    for (i = sk_void_num(ad->sk); i <= idx; ++i) {
  ------------------
  |  |  220|  2.58k|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (479:35): [True: 2.58k, False: 2.58k]
  ------------------
  480|  2.58k|        if (!sk_void_push(ad->sk, NULL)) {
  ------------------
  |  |  230|  2.58k|#define sk_void_push(sk, ptr) OPENSSL_sk_push(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
  ------------------
  |  Branch (480:13): [True: 0, False: 2.58k]
  ------------------
  481|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  482|      0|            return 0;
  483|      0|        }
  484|  2.58k|    }
  485|  2.58k|    if (sk_void_set(ad->sk, idx, val) != val) {
  ------------------
  |  |  236|  2.58k|#define sk_void_set(sk, idx, ptr) ((void *)OPENSSL_sk_set(ossl_check_void_sk_type(sk), (idx), ossl_check_void_type(ptr)))
  ------------------
  |  Branch (485:9): [True: 0, False: 2.58k]
  ------------------
  486|       |        /* Probably the index is out of bounds */
  487|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  488|      0|        return 0;
  489|      0|    }
  490|  2.58k|    return 1;
  491|  2.58k|}
ex_data.c:get_and_lock:
   33|  11.2M|{
   34|  11.2M|    EX_CALLBACKS *ip;
   35|       |
   36|  11.2M|    if (class_index < 0 || class_index >= CRYPTO_EX_INDEX__COUNT) {
  ------------------
  |  |  270|  11.2M|#define CRYPTO_EX_INDEX__COUNT 18
  ------------------
  |  Branch (36:9): [True: 0, False: 11.2M]
  |  Branch (36:28): [True: 0, False: 11.2M]
  ------------------
   37|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   38|      0|        return NULL;
   39|      0|    }
   40|       |
   41|  11.2M|    if (global->ex_data_lock == NULL) {
  ------------------
  |  Branch (41:9): [True: 0, False: 11.2M]
  ------------------
   42|       |        /*
   43|       |         * If we get here, someone (who?) cleaned up the lock, so just
   44|       |         * treat it as an error.
   45|       |         */
   46|      0|        return NULL;
   47|      0|    }
   48|       |
   49|  11.2M|    if (read) {
  ------------------
  |  Branch (49:9): [True: 11.2M, False: 1]
  ------------------
   50|  11.2M|        if (!CRYPTO_THREAD_read_lock(global->ex_data_lock))
  ------------------
  |  Branch (50:13): [True: 0, False: 11.2M]
  ------------------
   51|      0|            return NULL;
   52|  11.2M|    } else {
   53|      1|        if (!CRYPTO_THREAD_write_lock(global->ex_data_lock))
  ------------------
  |  Branch (53:13): [True: 0, False: 1]
  ------------------
   54|      0|            return NULL;
   55|      1|    }
   56|       |
   57|  11.2M|    ip = &global->ex_data[class_index];
   58|  11.2M|    return ip;
   59|  11.2M|}

ossl_ffc_name_to_dh_named_group:
   93|    210|{
   94|    210|    size_t i;
   95|       |
   96|    606|    for (i = 0; i < OSSL_NELEM(dh_named_groups); ++i) {
  ------------------
  |  |   14|    606|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (96:17): [True: 606, False: 0]
  ------------------
   97|    606|        if (OPENSSL_strcasecmp(dh_named_groups[i].name, name) == 0)
  ------------------
  |  Branch (97:13): [True: 210, False: 396]
  ------------------
   98|    210|            return &dh_named_groups[i];
   99|    606|    }
  100|      0|    return NULL;
  101|    210|}
ossl_ffc_uid_to_dh_named_group:
  104|    840|{
  105|    840|    size_t i;
  106|       |
  107|  2.42k|    for (i = 0; i < OSSL_NELEM(dh_named_groups); ++i) {
  ------------------
  |  |   14|  2.42k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (107:17): [True: 2.42k, False: 0]
  ------------------
  108|  2.42k|        if (dh_named_groups[i].uid == uid)
  ------------------
  |  Branch (108:13): [True: 840, False: 1.58k]
  ------------------
  109|    840|            return &dh_named_groups[i];
  110|  2.42k|    }
  111|      0|    return NULL;
  112|    840|}
ossl_ffc_named_group_get_uid:
  134|    420|{
  135|    420|    if (group == NULL)
  ------------------
  |  Branch (135:9): [True: 0, False: 420]
  ------------------
  136|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  137|    420|    return group->uid;
  138|    420|}
ossl_ffc_named_group_get_name:
  141|    630|{
  142|    630|    if (group == NULL)
  ------------------
  |  Branch (142:9): [True: 0, False: 630]
  ------------------
  143|      0|        return NULL;
  144|    630|    return group->name;
  145|    630|}
ossl_ffc_named_group_set:
  163|    210|{
  164|    210|    if (ffc == NULL || group == NULL)
  ------------------
  |  Branch (164:9): [True: 0, False: 210]
  |  Branch (164:24): [True: 0, False: 210]
  ------------------
  165|      0|        return 0;
  166|       |
  167|    210|    ossl_ffc_params_set0_pqg(ffc, (BIGNUM *)group->p, (BIGNUM *)group->q,
  168|    210|        (BIGNUM *)group->g);
  169|    210|    ffc->keylength = group->keylength;
  170|       |
  171|       |    /* flush the cached nid, The DH layer is responsible for caching */
  172|    210|    ffc->nid = NID_undef;
  ------------------
  |  |   18|    210|#define NID_undef                       0
  ------------------
  173|    210|    return 1;
  174|    210|}

ossl_ffc_generate_private_key:
   24|    210|{
   25|    210|    int ret = 0, qbits = BN_num_bits(params->q);
   26|    210|    BIGNUM *m, *two_powN = NULL;
   27|       |
   28|       |    /* Deal with the edge cases where the value of N and/or s is not set */
   29|    210|    if (s == 0)
  ------------------
  |  Branch (29:9): [True: 0, False: 210]
  ------------------
   30|      0|        goto err;
   31|    210|    if (N == 0)
  ------------------
  |  Branch (31:9): [True: 210, False: 0]
  ------------------
   32|    210|        N = params->keylength ? params->keylength : 2 * s;
  ------------------
  |  Branch (32:13): [True: 210, False: 0]
  ------------------
   33|       |
   34|       |    /* Step (2) : check range of N */
   35|    210|    if (N < 2 * s || N > qbits)
  ------------------
  |  Branch (35:9): [True: 0, False: 210]
  |  Branch (35:22): [True: 0, False: 210]
  ------------------
   36|      0|        return 0;
   37|       |
   38|    210|    two_powN = BN_new();
   39|       |    /* 2^N */
   40|    210|    if (two_powN == NULL || !BN_lshift(two_powN, BN_value_one(), N))
  ------------------
  |  Branch (40:9): [True: 0, False: 210]
  |  Branch (40:29): [True: 0, False: 210]
  ------------------
   41|      0|        goto err;
   42|       |
   43|       |    /* Step (5) : M = min(2 ^ N, q) */
   44|    210|    m = (BN_cmp(two_powN, params->q) > 0) ? params->q : two_powN;
  ------------------
  |  Branch (44:9): [True: 0, False: 210]
  ------------------
   45|       |
   46|    210|    do {
   47|       |        /* Steps (3, 4 & 7) :  c + 1 = 1 + random[0..2^N - 1] */
   48|    210|        if (!BN_priv_rand_range_ex(priv, two_powN, 0, ctx)
  ------------------
  |  Branch (48:13): [True: 0, False: 210]
  ------------------
   49|    210|            || !BN_add_word(priv, 1))
  ------------------
  |  Branch (49:16): [True: 0, False: 210]
  ------------------
   50|      0|            goto err;
   51|       |        /* Step (6) : loop if c > M - 2 (i.e. c + 1 >= M) */
   52|    210|        if (BN_cmp(priv, m) < 0)
  ------------------
  |  Branch (52:13): [True: 210, False: 0]
  ------------------
   53|    210|            break;
   54|    210|    } while (1);
  ------------------
  |  Branch (54:14): [True: 0, Folded]
  ------------------
   55|       |
   56|    210|    ret = 1;
   57|    210|err:
   58|    210|    BN_free(two_powN);
   59|    210|    return ret;
   60|    210|}

ossl_ffc_params_init:
   21|    420|{
   22|    420|    memset(params, 0, sizeof(*params));
   23|    420|    params->pcounter = -1;
   24|    420|    params->gindex = FFC_UNVERIFIABLE_GINDEX;
  ------------------
  |  |   23|    420|#define FFC_UNVERIFIABLE_GINDEX -1
  ------------------
   25|    420|    params->flags = FFC_PARAM_FLAG_VALIDATE_PQG;
  ------------------
  |  |   46|    420|    (FFC_PARAM_FLAG_VALIDATE_PQ | FFC_PARAM_FLAG_VALIDATE_G)
  |  |  ------------------
  |  |  |  |   43|    420|#define FFC_PARAM_FLAG_VALIDATE_PQ 0x01
  |  |  ------------------
  |  |                   (FFC_PARAM_FLAG_VALIDATE_PQ | FFC_PARAM_FLAG_VALIDATE_G)
  |  |  ------------------
  |  |  |  |   44|    420|#define FFC_PARAM_FLAG_VALIDATE_G 0x02
  |  |  ------------------
  ------------------
   26|    420|}
ossl_ffc_params_cleanup:
   29|    210|{
   30|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
   31|       |    BN_clear_free(params->p);
   32|       |    BN_clear_free(params->q);
   33|       |    BN_clear_free(params->g);
   34|       |    BN_clear_free(params->j);
   35|       |    OPENSSL_clear_free(params->seed, params->seedlen);
   36|       |#else
   37|    210|    BN_free(params->p);
   38|    210|    BN_free(params->q);
   39|    210|    BN_free(params->g);
   40|    210|    BN_free(params->j);
   41|    210|    OPENSSL_free(params->seed);
  ------------------
  |  |  132|    210|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   42|    210|#endif
   43|    210|    ossl_ffc_params_init(params);
   44|    210|}
ossl_ffc_params_set0_pqg:
   47|    210|{
   48|    210|    if (p != NULL && p != d->p) {
  ------------------
  |  Branch (48:9): [True: 210, False: 0]
  |  Branch (48:22): [True: 210, False: 0]
  ------------------
   49|    210|        BN_free(d->p);
   50|    210|        d->p = p;
   51|    210|    }
   52|    210|    if (q != NULL && q != d->q) {
  ------------------
  |  Branch (52:9): [True: 210, False: 0]
  |  Branch (52:22): [True: 210, False: 0]
  ------------------
   53|    210|        BN_free(d->q);
   54|    210|        d->q = q;
   55|    210|    }
   56|    210|    if (g != NULL && g != d->g) {
  ------------------
  |  Branch (56:9): [True: 210, False: 0]
  |  Branch (56:22): [True: 210, False: 0]
  ------------------
   57|    210|        BN_free(d->g);
   58|    210|        d->g = g;
   59|    210|    }
   60|    210|}
ossl_ffc_params_get0_pqg:
   64|    420|{
   65|    420|    if (p != NULL)
  ------------------
  |  Branch (65:9): [True: 420, False: 0]
  ------------------
   66|    420|        *p = d->p;
   67|    420|    if (q != NULL)
  ------------------
  |  Branch (67:9): [True: 0, False: 420]
  ------------------
   68|      0|        *q = d->q;
   69|    420|    if (g != NULL)
  ------------------
  |  Branch (69:9): [True: 0, False: 420]
  ------------------
   70|      0|        *g = d->g;
   71|    420|}
ossl_ffc_params_enable_flags:
  125|    210|{
  126|    210|    if (enable)
  ------------------
  |  Branch (126:9): [True: 0, False: 210]
  ------------------
  127|      0|        params->flags |= flags;
  128|    210|    else
  129|    210|        params->flags &= ~flags;
  130|    210|}
ossl_ffc_params_todata:
  221|    630|{
  222|    630|    int test_flags;
  223|       |
  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  225|    630|    if (ffc->p != NULL
  ------------------
  |  Branch (225:9): [True: 630, False: 0]
  ------------------
  226|    630|        && !ossl_param_build_set_bn(bld, PP(p), OSSL_PKEY_PARAM_FFC_P, ffc->p))
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
                      && !ossl_param_build_set_bn(bld, PP(p), OSSL_PKEY_PARAM_FFC_P, ffc->p))
  ------------------
  |  |  414|    630|# define OSSL_PKEY_PARAM_FFC_P "p"
  ------------------
  |  Branch (226:12): [True: 0, False: 630]
  ------------------
  227|      0|        return 0;
  228|    630|    if (ffc->q != NULL
  ------------------
  |  Branch (228:9): [True: 630, False: 0]
  ------------------
  229|    630|        && !ossl_param_build_set_bn(bld, PP(q), OSSL_PKEY_PARAM_FFC_Q, ffc->q))
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
                      && !ossl_param_build_set_bn(bld, PP(q), OSSL_PKEY_PARAM_FFC_Q, ffc->q))
  ------------------
  |  |  417|    630|# define OSSL_PKEY_PARAM_FFC_Q "q"
  ------------------
  |  Branch (229:12): [True: 0, False: 630]
  ------------------
  230|      0|        return 0;
  231|    630|    if (ffc->g != NULL
  ------------------
  |  Branch (231:9): [True: 630, False: 0]
  ------------------
  232|    630|        && !ossl_param_build_set_bn(bld, PP(g), OSSL_PKEY_PARAM_FFC_G, ffc->g))
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
                      && !ossl_param_build_set_bn(bld, PP(g), OSSL_PKEY_PARAM_FFC_G, ffc->g))
  ------------------
  |  |  411|    630|# define OSSL_PKEY_PARAM_FFC_G "g"
  ------------------
  |  Branch (232:12): [True: 0, False: 630]
  ------------------
  233|      0|        return 0;
  234|    630|    if (ffc->j != NULL
  ------------------
  |  Branch (234:9): [True: 0, False: 630]
  ------------------
  235|      0|        && !ossl_param_build_set_bn(bld, PP(cofactor),
  ------------------
  |  |  224|      0|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (235:12): [True: 0, False: 0]
  ------------------
  236|      0|            OSSL_PKEY_PARAM_FFC_COFACTOR, ffc->j))
  ------------------
  |  |  408|      0|# define OSSL_PKEY_PARAM_FFC_COFACTOR "j"
  ------------------
  237|      0|        return 0;
  238|    630|    if (!ossl_param_build_set_int(bld, PP(g_index), OSSL_PKEY_PARAM_FFC_GINDEX,
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
                  if (!ossl_param_build_set_int(bld, PP(g_index), OSSL_PKEY_PARAM_FFC_GINDEX,
  ------------------
  |  |  412|    630|# define OSSL_PKEY_PARAM_FFC_GINDEX "gindex"
  ------------------
  |  Branch (238:9): [True: 0, False: 630]
  ------------------
  239|    630|            ffc->gindex))
  240|      0|        return 0;
  241|    630|    if (!ossl_param_build_set_int(bld, PP(p_counter), OSSL_PKEY_PARAM_FFC_PCOUNTER,
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
                  if (!ossl_param_build_set_int(bld, PP(p_counter), OSSL_PKEY_PARAM_FFC_PCOUNTER,
  ------------------
  |  |  416|    630|# define OSSL_PKEY_PARAM_FFC_PCOUNTER "pcounter"
  ------------------
  |  Branch (241:9): [True: 0, False: 630]
  ------------------
  242|    630|            ffc->pcounter))
  243|      0|        return 0;
  244|    630|    if (!ossl_param_build_set_int(bld, PP(h), OSSL_PKEY_PARAM_FFC_H, ffc->h))
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
                  if (!ossl_param_build_set_int(bld, PP(h), OSSL_PKEY_PARAM_FFC_H, ffc->h))
  ------------------
  |  |  413|    630|# define OSSL_PKEY_PARAM_FFC_H "hindex"
  ------------------
  |  Branch (244:9): [True: 0, False: 630]
  ------------------
  245|      0|        return 0;
  246|    630|    if (ffc->seed != NULL
  ------------------
  |  Branch (246:9): [True: 0, False: 630]
  ------------------
  247|      0|        && !ossl_param_build_set_octet_string(bld, PP(seed),
  ------------------
  |  |  224|      0|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (247:12): [True: 0, False: 0]
  ------------------
  248|      0|            OSSL_PKEY_PARAM_FFC_SEED,
  ------------------
  |  |  419|      0|# define OSSL_PKEY_PARAM_FFC_SEED "seed"
  ------------------
  249|      0|            ffc->seed, ffc->seedlen))
  250|      0|        return 0;
  251|    630|    if (ffc->nid != NID_undef) {
  ------------------
  |  |   18|    630|#define NID_undef                       0
  ------------------
  |  Branch (251:9): [True: 630, False: 0]
  ------------------
  252|    630|        const DH_NAMED_GROUP *group = ossl_ffc_uid_to_dh_named_group(ffc->nid);
  253|    630|        const char *name = ossl_ffc_named_group_get_name(group);
  254|       |
  255|    630|        if (name == NULL
  ------------------
  |  Branch (255:13): [True: 0, False: 630]
  ------------------
  256|    630|            || !ossl_param_build_set_utf8_string(bld, PP(group_name),
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
  |  Branch (256:16): [True: 0, False: 630]
  ------------------
  257|    630|                OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|    630|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  258|    630|                name))
  259|      0|            return 0;
  260|    630|    }
  261|    630|    test_flags = ((ffc->flags & FFC_PARAM_FLAG_VALIDATE_PQ) != 0);
  ------------------
  |  |   43|    630|#define FFC_PARAM_FLAG_VALIDATE_PQ 0x01
  ------------------
  262|    630|    if (!ossl_param_build_set_int(bld, PP(validate_pq),
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
  |  Branch (262:9): [True: 0, False: 630]
  ------------------
  263|    630|            OSSL_PKEY_PARAM_FFC_VALIDATE_PQ, test_flags))
  ------------------
  |  |  423|    630|# define OSSL_PKEY_PARAM_FFC_VALIDATE_PQ "validate-pq"
  ------------------
  264|      0|        return 0;
  265|    630|    test_flags = ((ffc->flags & FFC_PARAM_FLAG_VALIDATE_G) != 0);
  ------------------
  |  |   44|    630|#define FFC_PARAM_FLAG_VALIDATE_G 0x02
  ------------------
  266|    630|    if (!ossl_param_build_set_int(bld, PP(validate_g),
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
  |  Branch (266:9): [True: 0, False: 630]
  ------------------
  267|    630|            OSSL_PKEY_PARAM_FFC_VALIDATE_G, test_flags))
  ------------------
  |  |  421|    630|# define OSSL_PKEY_PARAM_FFC_VALIDATE_G "validate-g"
  ------------------
  268|      0|        return 0;
  269|    630|    test_flags = ((ffc->flags & FFC_PARAM_FLAG_VALIDATE_LEGACY) != 0);
  ------------------
  |  |   47|    630|#define FFC_PARAM_FLAG_VALIDATE_LEGACY 0x04
  ------------------
  270|    630|    if (!ossl_param_build_set_int(bld, PP(validate_legacy),
  ------------------
  |  |  224|    630|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 630]
  |  |  ------------------
  ------------------
  |  Branch (270:9): [True: 0, False: 630]
  ------------------
  271|    630|            OSSL_PKEY_PARAM_FFC_VALIDATE_LEGACY,
  ------------------
  |  |  422|    630|# define OSSL_PKEY_PARAM_FFC_VALIDATE_LEGACY "validate-legacy"
  ------------------
  272|    630|            test_flags))
  273|      0|        return 0;
  274|       |
  275|    630|    if (ffc->mdname != NULL
  ------------------
  |  Branch (275:9): [True: 0, False: 630]
  ------------------
  276|      0|        && !ossl_param_build_set_utf8_string(bld, PP(digest),
  ------------------
  |  |  224|      0|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (276:12): [True: 0, False: 0]
  ------------------
  277|      0|            OSSL_PKEY_PARAM_FFC_DIGEST,
  ------------------
  |  |  409|      0|# define OSSL_PKEY_PARAM_FFC_DIGEST OSSL_PKEY_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  382|      0|# define OSSL_PKEY_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  |  |  ------------------
  |  |  |  |  |  |  127|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|      0|            ffc->mdname))
  279|      0|        return 0;
  280|    630|    if (ffc->mdprops != NULL
  ------------------
  |  Branch (280:9): [True: 0, False: 630]
  ------------------
  281|      0|        && !ossl_param_build_set_utf8_string(bld, PP(propq),
  ------------------
  |  |  224|      0|#define PP(f) (pp == NULL ? NULL : pp->f)
  |  |  ------------------
  |  |  |  Branch (224:16): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (281:12): [True: 0, False: 0]
  ------------------
  282|      0|            OSSL_PKEY_PARAM_FFC_DIGEST_PROPS,
  ------------------
  |  |  410|      0|# define OSSL_PKEY_PARAM_FFC_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  449|      0|# define OSSL_PKEY_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  283|      0|            ffc->mdprops))
  284|      0|        return 0;
  285|    630|#undef PP
  286|    630|    return 1;
  287|    630|}

ossl_safe_getenv:
   19|    901|{
   20|       |#if defined(_WIN32) && defined(CP_UTF8) && !defined(_WIN32_WCE)
   21|       |    if (GetEnvironmentVariableW(L"OPENSSL_WIN32_UTF8", NULL, 0) != 0) {
   22|       |        char *val = NULL;
   23|       |        int vallen = 0;
   24|       |        WCHAR *namew = NULL;
   25|       |        WCHAR *valw = NULL;
   26|       |        DWORD envlen = 0;
   27|       |        DWORD dwFlags = MB_ERR_INVALID_CHARS;
   28|       |        int rsize, fsize;
   29|       |        UINT curacp;
   30|       |
   31|       |        curacp = GetACP();
   32|       |
   33|       |        /*
   34|       |         * For the code pages listed below, dwFlags must be set to 0.
   35|       |         * Otherwise, the function fails with ERROR_INVALID_FLAGS.
   36|       |         */
   37|       |        if (curacp == 50220 || curacp == 50221 || curacp == 50222 || curacp == 50225 || curacp == 50227 || curacp == 50229 || (57002 <= curacp && curacp <= 57011) || curacp == 65000 || curacp == 42)
   38|       |            dwFlags = 0;
   39|       |
   40|       |        /* query for buffer len */
   41|       |        rsize = MultiByteToWideChar(curacp, dwFlags, name, -1, NULL, 0);
   42|       |        /* if name is valid string and can be converted to wide string */
   43|       |        if (rsize > 0)
   44|       |            namew = _malloca(rsize * sizeof(WCHAR));
   45|       |
   46|       |        if (NULL != namew) {
   47|       |            /* convert name to wide string */
   48|       |            fsize = MultiByteToWideChar(curacp, dwFlags, name, -1, namew, rsize);
   49|       |            /* if conversion is ok, then determine value string size in wchars */
   50|       |            if (fsize > 0)
   51|       |                envlen = GetEnvironmentVariableW(namew, NULL, 0);
   52|       |        }
   53|       |
   54|       |        if (envlen > 0)
   55|       |            valw = _malloca(envlen * sizeof(WCHAR));
   56|       |
   57|       |        if (NULL != valw) {
   58|       |            /* if can get env value as wide string */
   59|       |            if (GetEnvironmentVariableW(namew, valw, envlen) < envlen) {
   60|       |                /* determine value string size in utf-8 */
   61|       |                vallen = WideCharToMultiByte(CP_UTF8, 0, valw, -1, NULL, 0,
   62|       |                    NULL, NULL);
   63|       |            }
   64|       |        }
   65|       |
   66|       |        if (vallen > 0)
   67|       |            val = OPENSSL_malloc(vallen);
   68|       |
   69|       |        if (NULL != val) {
   70|       |            /* convert value string from wide to utf-8 */
   71|       |            if (WideCharToMultiByte(CP_UTF8, 0, valw, -1, val, vallen,
   72|       |                    NULL, NULL)
   73|       |                == 0) {
   74|       |                OPENSSL_free(val);
   75|       |                val = NULL;
   76|       |            }
   77|       |        }
   78|       |
   79|       |        if (NULL != namew)
   80|       |            _freea(namew);
   81|       |
   82|       |        if (NULL != valw)
   83|       |            _freea(valw);
   84|       |
   85|       |        return val;
   86|       |    }
   87|       |#endif
   88|       |
   89|    901|#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
   90|    901|#if __GLIBC_PREREQ(2, 17)
   91|    901|#define SECURE_GETENV
   92|    901|    return secure_getenv(name);
   93|    901|#endif
   94|    901|#endif
   95|       |
   96|       |#ifndef SECURE_GETENV
   97|       |    if (OPENSSL_issetugid())
   98|       |        return NULL;
   99|       |    return getenv(name);
  100|       |#endif
  101|    901|}

ossl_fnv1a_hash:
   14|  8.15M|{
   15|  8.15M|    uint64_t hash = 0xcbf29ce484222325ULL;
   16|  8.15M|    size_t i;
   17|       |
   18|   148M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (18:17): [True: 140M, False: 8.15M]
  ------------------
   19|   140M|        hash ^= key[i];
   20|   140M|        hash *= 0x00000100000001B3ULL;
   21|   140M|    }
   22|  8.15M|    return hash;
   23|  8.15M|}

ossl_ht_new:
  185|  4.27k|{
  186|  4.27k|    HT *new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  109|  4.27k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  187|       |
  188|  4.27k|    if (new == NULL)
  ------------------
  |  Branch (188:9): [True: 0, False: 4.27k]
  ------------------
  189|      0|        return NULL;
  190|       |
  191|  4.27k|    if (conf->lockless_reads && conf->no_rcu)
  ------------------
  |  Branch (191:9): [True: 809, False: 3.47k]
  |  Branch (191:33): [True: 0, False: 809]
  ------------------
  192|      0|        goto err;
  193|       |
  194|  4.27k|    if (!conf->no_rcu) {
  ------------------
  |  Branch (194:9): [True: 809, False: 3.47k]
  ------------------
  195|    809|        new->atomic_lock = CRYPTO_THREAD_lock_new();
  196|    809|        if (new->atomic_lock == NULL)
  ------------------
  |  Branch (196:13): [True: 0, False: 809]
  ------------------
  197|      0|            goto err;
  198|    809|    }
  199|  4.27k|    memcpy(&new->config, conf, sizeof(*conf));
  200|       |
  201|  4.27k|    if (new->config.init_neighborhoods != 0) {
  ------------------
  |  Branch (201:9): [True: 4.27k, False: 0]
  ------------------
  202|  4.27k|        new->wpd.neighborhood_len = new->config.init_neighborhoods;
  203|       |        /* round up to the next power of 2 */
  204|  4.27k|        new->wpd.neighborhood_len--;
  205|  4.27k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 1;
  206|  4.27k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 2;
  207|  4.27k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 4;
  208|  4.27k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 8;
  209|  4.27k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 16;
  210|  4.27k|        new->wpd.neighborhood_len++;
  211|  4.27k|    } else {
  212|      0|        new->wpd.neighborhood_len = DEFAULT_NEIGH_LEN;
  ------------------
  |  |   96|      0|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|      0|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  213|      0|    }
  214|       |
  215|  4.27k|    if (new->config.ht_free_fn == NULL)
  ------------------
  |  Branch (215:9): [True: 809, False: 3.47k]
  ------------------
  216|    809|        new->config.ht_free_fn = internal_free_nop;
  217|       |
  218|  4.27k|    new->md = OPENSSL_zalloc(sizeof(*new->md));
  ------------------
  |  |  109|  4.27k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  219|  4.27k|    if (new->md == NULL)
  ------------------
  |  Branch (219:9): [True: 0, False: 4.27k]
  ------------------
  220|      0|        goto err;
  221|       |
  222|  4.27k|    new->md->neighborhoods = alloc_new_neighborhood_list(new->wpd.neighborhood_len,
  223|  4.27k|        &new->md->neighborhood_ptr_to_free);
  224|  4.27k|    if (new->md->neighborhoods == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 4.27k]
  ------------------
  225|      0|        goto err;
  226|  4.27k|    new->md->neighborhood_mask = new->wpd.neighborhood_len - 1;
  227|       |
  228|  4.27k|    if (!conf->no_rcu) {
  ------------------
  |  Branch (228:9): [True: 809, False: 3.47k]
  ------------------
  229|    809|        new->lock = ossl_rcu_lock_new(1, conf->ctx);
  230|    809|        if (new->lock == NULL)
  ------------------
  |  Branch (230:13): [True: 0, False: 809]
  ------------------
  231|      0|            goto err;
  232|    809|    }
  233|  4.27k|    if (new->config.ht_hash_fn == NULL)
  ------------------
  |  Branch (233:9): [True: 809, False: 3.47k]
  ------------------
  234|    809|        new->config.ht_hash_fn = internal_ht_hash_fn;
  235|       |
  236|  4.27k|    return new;
  237|       |
  238|      0|err:
  239|      0|    if (!conf->no_rcu) {
  ------------------
  |  Branch (239:9): [True: 0, False: 0]
  ------------------
  240|      0|        CRYPTO_THREAD_lock_free(new->atomic_lock);
  241|      0|        ossl_rcu_lock_free(new->lock);
  242|      0|    }
  243|      0|    if (new->md != NULL)
  ------------------
  |  Branch (243:9): [True: 0, False: 0]
  ------------------
  244|      0|        OPENSSL_free(new->md->neighborhood_ptr_to_free);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  245|      0|    OPENSSL_free(new->md);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  246|      0|    OPENSSL_free(new);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  247|       |    return NULL;
  248|  4.27k|}
ossl_ht_write_lock:
  267|  4.27k|{
  268|  4.27k|    if (htable->config.no_rcu)
  ------------------
  |  Branch (268:9): [True: 3.47k, False: 808]
  ------------------
  269|  3.47k|        return;
  270|       |
  271|    808|    ossl_rcu_write_lock(htable->lock);
  272|    808|    htable->wpd.need_sync = 0;
  273|    808|}
ossl_ht_write_unlock:
  276|  4.27k|{
  277|  4.27k|    int need_sync = htable->wpd.need_sync;
  278|       |
  279|  4.27k|    if (htable->config.no_rcu)
  ------------------
  |  Branch (279:9): [True: 3.47k, False: 808]
  ------------------
  280|  3.47k|        return;
  281|       |
  282|    808|    htable->wpd.need_sync = 0;
  283|    808|    ossl_rcu_write_unlock(htable->lock);
  284|    808|    if (need_sync)
  ------------------
  |  Branch (284:9): [True: 808, False: 0]
  ------------------
  285|    808|        ossl_synchronize_rcu(htable->lock);
  286|    808|}
ossl_ht_free:
  365|  4.27k|{
  366|  4.27k|    int flush_ok;
  367|       |
  368|  4.27k|    if (h == NULL)
  ------------------
  |  Branch (368:9): [True: 0, False: 4.27k]
  ------------------
  369|      0|        return;
  370|       |
  371|  4.27k|    ossl_ht_write_lock(h);
  372|  4.27k|    flush_ok = ossl_ht_flush_internal(h);
  373|  4.27k|    ossl_ht_write_unlock(h);
  374|       |    /* Freeing the lock does a final sync for us */
  375|  4.27k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (375:9): [True: 808, False: 3.47k]
  ------------------
  376|    808|        CRYPTO_THREAD_lock_free(h->atomic_lock);
  377|    808|        ossl_rcu_lock_free(h->lock);
  378|    808|    }
  379|  4.27k|    if (flush_ok) {
  ------------------
  |  Branch (379:9): [True: 4.27k, False: 0]
  ------------------
  380|  4.27k|        OPENSSL_free(h->md->neighborhood_ptr_to_free);
  ------------------
  |  |  132|  4.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  381|  4.27k|        OPENSSL_free(h->md);
  ------------------
  |  |  132|  4.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  382|  4.27k|    } else {
  383|      0|        free_oldmd(h->md);
  384|      0|    }
  385|  4.27k|    OPENSSL_free(h);
  ------------------
  |  |  132|  4.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  386|  4.27k|    return;
  387|  4.27k|}
ossl_ht_insert:
  719|   706k|{
  720|   706k|    struct ht_internal_value_st *newval = NULL;
  721|   706k|    uint64_t hash;
  722|   706k|    int rc = 0;
  723|   706k|    int i;
  724|       |
  725|   706k|    if (data->value == NULL)
  ------------------
  |  Branch (725:9): [True: 0, False: 706k]
  ------------------
  726|      0|        goto out;
  727|       |
  728|   706k|    rc = -1;
  729|   706k|    newval = alloc_new_value(h, key, data->value, data->type_id);
  730|   706k|    if (newval == NULL)
  ------------------
  |  Branch (730:9): [True: 0, False: 706k]
  ------------------
  731|      0|        goto out;
  732|       |
  733|       |    /*
  734|       |     * we have to take our lock here to prevent other changes
  735|       |     * to the bucket list
  736|       |     */
  737|   706k|    hash = h->config.ht_hash_fn(key);
  738|       |
  739|   706k|    for (i = 0;
  740|   720k|        (rc = ossl_ht_insert_locked(h, hash, newval, olddata)) == -1
  ------------------
  |  Branch (740:9): [True: 14.0k, False: 706k]
  ------------------
  741|  14.0k|        && i <= (int)NEIGHBORHOOD_LEN;
  ------------------
  |  |  104|  14.0k|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  14.0k|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (741:12): [True: 14.0k, False: 0]
  ------------------
  742|   706k|        ++i)
  743|  14.0k|        if (!grow_hashtable(h, h->wpd.neighborhood_len)) {
  ------------------
  |  Branch (743:13): [True: 0, False: 14.0k]
  ------------------
  744|      0|            rc = -1;
  745|      0|            break;
  746|      0|        }
  747|       |
  748|   706k|    if (rc <= 0)
  ------------------
  |  Branch (748:9): [True: 0, False: 706k]
  ------------------
  749|      0|        free_value(newval);
  750|       |
  751|   706k|out:
  752|   706k|    return rc;
  753|   706k|}
ossl_ht_get:
  756|  7.44M|{
  757|  7.44M|    struct ht_mutable_data_st *md;
  758|  7.44M|    uint64_t hash;
  759|  7.44M|    uint64_t neigh_idx_start;
  760|  7.44M|    uint64_t neigh_idx;
  761|  7.44M|    struct ht_internal_value_st *ival = NULL;
  762|  7.44M|    size_t j;
  763|  7.44M|    uint64_t ehash;
  764|  7.44M|    int lockless_reads = h->config.lockless_reads;
  765|       |
  766|  7.44M|    hash = h->config.ht_hash_fn(key);
  767|       |
  768|  7.44M|    if (!h->config.no_rcu)
  ------------------
  |  Branch (768:9): [True: 6.94M, False: 503k]
  ------------------
  769|  6.94M|        md = ossl_rcu_deref(&h->md);
  ------------------
  |  |   35|  6.94M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  770|   503k|    else
  771|   503k|        md = h->md;
  772|  7.44M|    neigh_idx = neigh_idx_start = hash & md->neighborhood_mask;
  773|  7.45M|    do {
  774|  7.45M|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   82|  7.45M|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  775|  12.5M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  104|  12.5M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  12.5M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (775:21): [True: 12.2M, False: 288k]
  ------------------
  776|  12.2M|            if (!h->config.no_rcu)
  ------------------
  |  Branch (776:17): [True: 10.6M, False: 1.59M]
  ------------------
  777|  10.6M|                ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   35|  10.6M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  778|  1.59M|            else
  779|  1.59M|                ival = md->neighborhoods[neigh_idx].entries[j].value;
  780|  12.2M|            if (ival == NULL) {
  ------------------
  |  Branch (780:17): [True: 1.85M, False: 10.3M]
  ------------------
  781|  1.85M|                if (lockless_reads)
  ------------------
  |  Branch (781:21): [True: 740k, False: 1.11M]
  ------------------
  782|       |                    /* lockless_reads implies no deletion, we can break out */
  783|   740k|                    return NULL;
  784|  1.11M|                continue;
  785|  1.85M|            }
  786|  10.3M|            if (!h->config.no_rcu) {
  ------------------
  |  Branch (786:17): [True: 9.91M, False: 477k]
  ------------------
  787|  9.91M|                if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (787:21): [True: 0, False: 9.91M]
  ------------------
  788|  9.91M|                        &ehash, h->atomic_lock))
  789|      0|                    return NULL;
  790|  9.91M|            } else {
  791|   477k|                ehash = md->neighborhoods[neigh_idx].entries[j].hash;
  792|   477k|            }
  793|  10.3M|            if (compare_hash(hash, ehash) && match_key(&ival->value.key, key))
  ------------------
  |  Branch (793:17): [True: 6.42M, False: 3.96M]
  |  Branch (793:46): [True: 6.42M, False: 0]
  ------------------
  794|  6.42M|                return (HT_VALUE *)ival;
  795|  10.3M|        }
  796|   288k|        if (!lockless_reads)
  ------------------
  |  Branch (796:13): [True: 282k, False: 5.67k]
  ------------------
  797|   282k|            break;
  798|       |        /* Continue search in subsequent neighborhoods */
  799|  5.67k|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  800|  5.67k|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (800:14): [True: 5.67k, False: 0]
  ------------------
  801|       |
  802|   282k|    return NULL;
  803|  7.44M|}
hashtable.c:internal_free_nop:
  175|   422k|{
  176|   422k|    return;
  177|   422k|}
hashtable.c:alloc_new_neighborhood_list:
  155|  22.5k|{
  156|  22.5k|    struct ht_neighborhood_st *ret;
  157|       |
  158|  22.5k|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  159|  22.5k|    ret = OPENSSL_aligned_alloc_array(len, sizeof(struct ht_neighborhood_st),
  ------------------
  |  |  118|  22.5k|    CRYPTO_aligned_alloc_array(num, size, alignment, freeptr,      \
  |  |  119|  22.5k|        OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  160|  22.5k|        CACHE_LINE_BYTES, freeptr);
  161|       |
  162|       |    /* fall back to regular malloc */
  163|  22.5k|    if (ret == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 22.5k]
  ------------------
  164|      0|#endif
  165|      0|    {
  166|      0|        ret = *freeptr = OPENSSL_malloc_array(len, sizeof(struct ht_neighborhood_st));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|      0|        if (ret == NULL)
  ------------------
  |  Branch (167:13): [True: 0, False: 0]
  ------------------
  168|      0|            return NULL;
  169|      0|    }
  170|  22.5k|    memset(ret, 0, sizeof(struct ht_neighborhood_st) * len);
  171|  22.5k|    return ret;
  172|  22.5k|}
hashtable.c:internal_ht_hash_fn:
  180|  7.36M|{
  181|  7.36M|    return ossl_fnv1a_hash(key->keybuf, key->keysize);
  182|  7.36M|}
hashtable.c:ossl_ht_flush_internal:
  311|  4.27k|{
  312|  4.27k|    struct ht_mutable_data_st *newmd = NULL;
  313|  4.27k|    struct ht_mutable_data_st *oldmd = NULL;
  314|  4.27k|    CRYPTO_RCU_CB_ITEM *cbi = NULL;
  315|       |
  316|  4.27k|    newmd = OPENSSL_zalloc(sizeof(*newmd));
  ------------------
  |  |  109|  4.27k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  317|  4.27k|    if (newmd == NULL)
  ------------------
  |  Branch (317:9): [True: 0, False: 4.27k]
  ------------------
  318|      0|        return 0;
  319|       |
  320|  4.27k|    newmd->neighborhoods = alloc_new_neighborhood_list(DEFAULT_NEIGH_LEN,
  ------------------
  |  |   96|  4.27k|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|  4.27k|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  321|  4.27k|        &newmd->neighborhood_ptr_to_free);
  322|  4.27k|    if (newmd->neighborhoods == NULL) {
  ------------------
  |  Branch (322:9): [True: 0, False: 4.27k]
  ------------------
  323|      0|        OPENSSL_free(newmd);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  324|      0|        return 0;
  325|      0|    }
  326|       |
  327|  4.27k|    newmd->neighborhood_mask = DEFAULT_NEIGH_LEN - 1;
  ------------------
  |  |   96|  4.27k|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|  4.27k|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  328|       |
  329|  4.27k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (329:9): [True: 808, False: 3.47k]
  ------------------
  330|    808|        cbi = ossl_rcu_cb_item_new();
  331|    808|        if (cbi == NULL) {
  ------------------
  |  Branch (331:13): [True: 0, False: 808]
  ------------------
  332|      0|            OPENSSL_free(newmd->neighborhood_ptr_to_free);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  333|      0|            OPENSSL_free(newmd);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  334|      0|            return 0;
  335|      0|        }
  336|       |
  337|       |        /* Swap the old and new mutable data sets */
  338|    808|        oldmd = ossl_rcu_deref(&h->md);
  ------------------
  |  |   35|    808|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  339|    808|        ossl_rcu_assign_ptr(&h->md, &newmd);
  ------------------
  |  |   36|    808|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  340|  3.47k|    } else {
  341|  3.47k|        oldmd = h->md;
  342|  3.47k|        h->md = newmd;
  343|  3.47k|    }
  344|       |
  345|       |    /* Set the number of entries to 0 */
  346|  4.27k|    h->wpd.value_count = 0;
  347|  4.27k|    h->wpd.neighborhood_len = DEFAULT_NEIGH_LEN;
  ------------------
  |  |   96|  4.27k|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|  4.27k|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  348|       |
  349|  4.27k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (349:9): [True: 808, False: 3.47k]
  ------------------
  350|    808|        ossl_rcu_call(h->lock, cbi, free_oldmd, oldmd);
  351|    808|        h->wpd.need_sync = 1;
  352|  3.47k|    } else {
  353|  3.47k|        free_oldmd(oldmd);
  354|  3.47k|    }
  355|       |
  356|  4.27k|    return 1;
  357|  4.27k|}
hashtable.c:free_oldmd:
  289|  4.27k|{
  290|  4.27k|    struct ht_mutable_data_st *oldmd = arg;
  291|  4.27k|    size_t i, j;
  292|  4.27k|    size_t neighborhood_len = (size_t)oldmd->neighborhood_mask + 1;
  293|  4.27k|    struct ht_internal_value_st *v;
  294|       |
  295|  1.62M|    for (i = 0; i < neighborhood_len; i++) {
  ------------------
  |  Branch (295:17): [True: 1.61M, False: 4.27k]
  ------------------
  296|  1.61M|        PREFETCH_NEIGHBORHOOD(oldmd->neighborhoods[i + 1]);
  ------------------
  |  |   82|  1.61M|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  297|  8.09M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  104|  8.09M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  8.09M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (297:21): [True: 6.47M, False: 1.61M]
  ------------------
  298|  6.47M|            if (oldmd->neighborhoods[i].entries[j].value != NULL) {
  ------------------
  |  Branch (298:17): [True: 705k, False: 5.77M]
  ------------------
  299|   705k|                v = oldmd->neighborhoods[i].entries[j].value;
  300|   705k|                v->ht->config.ht_free_fn((HT_VALUE *)v);
  301|   705k|                free_value(v);
  302|   705k|            }
  303|  6.47M|        }
  304|  1.61M|    }
  305|       |
  306|  4.27k|    OPENSSL_free(oldmd->neighborhood_ptr_to_free);
  ------------------
  |  |  132|  4.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  307|  4.27k|    OPENSSL_free(oldmd);
  ------------------
  |  |  132|  4.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  308|  4.27k|}
hashtable.c:alloc_new_value:
  688|   706k|{
  689|   706k|    struct ht_internal_value_st *tmp;
  690|   706k|    size_t nvsize = sizeof(*tmp);
  691|       |
  692|   706k|    if (h->config.collision_check == 1)
  ------------------
  |  Branch (692:9): [True: 423k, False: 282k]
  ------------------
  693|   423k|        nvsize += key->keysize;
  694|       |
  695|   706k|    tmp = OPENSSL_malloc(nvsize);
  ------------------
  |  |  107|   706k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  696|       |
  697|   706k|    if (tmp == NULL)
  ------------------
  |  Branch (697:9): [True: 0, False: 706k]
  ------------------
  698|      0|        return NULL;
  699|       |
  700|   706k|    tmp->ht = h;
  701|   706k|    tmp->value.value = data;
  702|   706k|    tmp->value.type_id = type;
  703|   706k|    tmp->value.key.keybuf = NULL;
  704|   706k|    if (h->config.collision_check) {
  ------------------
  |  Branch (704:9): [True: 423k, False: 282k]
  ------------------
  705|   423k|        tmp->value.key.keybuf = (uint8_t *)(tmp + 1);
  706|   423k|        tmp->value.key.keysize = key->keysize;
  707|   423k|        memcpy(tmp->value.key.keybuf, key->keybuf, key->keysize);
  708|   423k|    }
  709|       |
  710|   706k|    return tmp;
  711|   706k|}
hashtable.c:ossl_ht_insert_locked:
  601|   720k|{
  602|   720k|    struct ht_mutable_data_st *md = h->md;
  603|   720k|    uint64_t neigh_idx_start = hash & md->neighborhood_mask;
  604|   720k|    uint64_t neigh_idx = neigh_idx_start;
  605|   720k|    size_t j;
  606|   720k|    uint64_t ihash;
  607|   720k|    HT_VALUE *ival;
  608|   720k|    size_t empty_idx = SIZE_MAX;
  609|   720k|    int lockless_reads = h->config.lockless_reads;
  610|       |
  611|   722k|    do {
  612|   722k|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   82|   722k|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  613|       |
  614|  2.14M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  104|  2.14M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  2.14M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (614:21): [True: 1.84M, False: 298k]
  ------------------
  615|  1.84M|            if (!h->config.no_rcu)
  ------------------
  |  Branch (615:17): [True: 659k, False: 1.18M]
  ------------------
  616|   659k|                ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   35|   659k|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  617|  1.18M|            else
  618|  1.18M|                ival = (HT_VALUE *)md->neighborhoods[neigh_idx].entries[j].value;
  619|  1.84M|            if (ival == NULL) {
  ------------------
  |  Branch (619:17): [True: 1.34M, False: 502k]
  ------------------
  620|  1.34M|                empty_idx = j;
  621|       |                /* lockless_reads implies no deletion, we can break out */
  622|  1.34M|                if (lockless_reads)
  ------------------
  |  Branch (622:21): [True: 423k, False: 920k]
  ------------------
  623|   423k|                    goto not_found;
  624|   920k|                continue;
  625|  1.34M|            }
  626|   502k|            if (!h->config.no_rcu) {
  ------------------
  |  Branch (626:17): [True: 236k, False: 266k]
  ------------------
  627|   236k|                if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (627:21): [True: 0, False: 236k]
  ------------------
  628|   236k|                        &ihash, h->atomic_lock))
  629|      0|                    return 0;
  630|   266k|            } else {
  631|   266k|                ihash = md->neighborhoods[neigh_idx].entries[j].hash;
  632|   266k|            }
  633|   502k|            if (compare_hash(hash, ihash) && match_key(&newval->value.key, &ival->key)) {
  ------------------
  |  Branch (633:17): [True: 0, False: 502k]
  |  Branch (633:46): [True: 0, False: 0]
  ------------------
  634|      0|                if (olddata == NULL) {
  ------------------
  |  Branch (634:21): [True: 0, False: 0]
  ------------------
  635|       |                    /* This would insert a duplicate -> fail */
  636|      0|                    return 0;
  637|      0|                }
  638|       |                /* Do a replacement */
  639|      0|                if (!h->config.no_rcu) {
  ------------------
  |  Branch (639:21): [True: 0, False: 0]
  ------------------
  640|      0|                    CRYPTO_RCU_CB_ITEM *cbi = ossl_rcu_cb_item_new();
  641|      0|                    if (cbi == NULL)
  ------------------
  |  Branch (641:25): [True: 0, False: 0]
  ------------------
  642|      0|                        return 0;
  643|      0|                    if (!CRYPTO_atomic_store(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (643:25): [True: 0, False: 0]
  ------------------
  644|      0|                            hash, h->atomic_lock)) {
  645|      0|                        ossl_rcu_cb_item_free(cbi);
  646|      0|                        return 0;
  647|      0|                    }
  648|      0|                    *olddata = (HT_VALUE *)md->neighborhoods[neigh_idx].entries[j].value;
  649|      0|                    ossl_rcu_assign_ptr(&md->neighborhoods[neigh_idx].entries[j].value,
  ------------------
  |  |   36|      0|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  650|      0|                        &newval);
  651|      0|                    ossl_rcu_call(h->lock, cbi, free_old_ht_value, *olddata);
  652|      0|                } else {
  653|      0|                    md->neighborhoods[neigh_idx].entries[j].hash = hash;
  654|      0|                    *olddata = (HT_VALUE *)md->neighborhoods[neigh_idx].entries[j].value;
  655|      0|                    md->neighborhoods[neigh_idx].entries[j].value = newval;
  656|      0|                }
  657|      0|                h->wpd.need_sync = 1;
  658|      0|                return 1;
  659|      0|            }
  660|   502k|        }
  661|   298k|        if (!lockless_reads)
  ------------------
  |  Branch (661:13): [True: 296k, False: 2.12k]
  ------------------
  662|   296k|            break;
  663|       |        /* Continue search in subsequent neighborhoods */
  664|  2.12k|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  665|  2.12k|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (665:14): [True: 2.12k, False: 0]
  ------------------
  666|       |
  667|   720k|not_found:
  668|       |    /* If we get to here, its just an insert */
  669|   720k|    if (empty_idx == SIZE_MAX)
  ------------------
  |  Branch (669:9): [True: 14.0k, False: 706k]
  ------------------
  670|  14.0k|        return -1; /* out of space */
  671|   706k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (671:9): [True: 423k, False: 282k]
  ------------------
  672|   423k|        if (!CRYPTO_atomic_store(&md->neighborhoods[neigh_idx].entries[empty_idx].hash,
  ------------------
  |  Branch (672:13): [True: 0, False: 423k]
  ------------------
  673|   423k|                hash, h->atomic_lock))
  674|      0|            return 0;
  675|   423k|        ossl_rcu_assign_ptr(&md->neighborhoods[neigh_idx].entries[empty_idx].value,
  ------------------
  |  |   36|   423k|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  676|   423k|            &newval);
  677|   423k|    } else {
  678|   282k|        md->neighborhoods[neigh_idx].entries[empty_idx].hash = hash;
  679|   282k|        md->neighborhoods[neigh_idx].entries[empty_idx].value = newval;
  680|   282k|    }
  681|   706k|    h->wpd.value_count++;
  682|   706k|    return 1;
  683|   706k|}
hashtable.c:grow_hashtable:
  475|  14.0k|{
  476|  14.0k|    struct ht_mutable_data_st *newmd;
  477|  14.0k|    struct ht_mutable_data_st *oldmd = ossl_rcu_deref(&h->md);
  ------------------
  |  |   35|  14.0k|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  478|  14.0k|    CRYPTO_RCU_CB_ITEM *cbi = NULL;
  479|  14.0k|    int rc = 0;
  480|  14.0k|    uint64_t oldi, oldj, newi, newj;
  481|  14.0k|    uint64_t oldhash;
  482|  14.0k|    struct ht_internal_value_st *oldv;
  483|  14.0k|    int rehashed;
  484|  14.0k|    size_t newsize = oldsize * 2;
  485|       |
  486|  14.0k|    if (h->config.lockless_reads)
  ------------------
  |  Branch (486:9): [True: 0, False: 14.0k]
  ------------------
  487|      0|        goto out;
  488|       |
  489|  14.0k|    if ((newmd = OPENSSL_zalloc(sizeof(*newmd))) == NULL)
  ------------------
  |  |  109|  14.0k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (489:9): [True: 0, False: 14.0k]
  ------------------
  490|      0|        goto out;
  491|       |
  492|       |    /* bucket list is always a power of 2 */
  493|  14.0k|    newmd->neighborhoods = alloc_new_neighborhood_list(oldsize * 2,
  494|  14.0k|        &newmd->neighborhood_ptr_to_free);
  495|  14.0k|    if (newmd->neighborhoods == NULL)
  ------------------
  |  Branch (495:9): [True: 0, False: 14.0k]
  ------------------
  496|      0|        goto out_free;
  497|       |
  498|       |    /* being a power of 2 makes for easy mask computation */
  499|  14.0k|    newmd->neighborhood_mask = (newsize - 1);
  500|       |
  501|       |    /*
  502|       |     * Now we need to start rehashing entries
  503|       |     * Note we don't need to use atomics here as the new
  504|       |     * mutable data hasn't been published
  505|       |     */
  506|  1.19M|    for (oldi = 0; oldi < h->wpd.neighborhood_len; oldi++) {
  ------------------
  |  Branch (506:20): [True: 1.17M, False: 14.0k]
  ------------------
  507|  1.17M|        PREFETCH_NEIGHBORHOOD(oldmd->neighborhoods[oldi + 1]);
  ------------------
  |  |   82|  1.17M|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  508|  5.88M|        for (oldj = 0; oldj < NEIGHBORHOOD_LEN; oldj++) {
  ------------------
  |  |  104|  5.88M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  5.88M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (508:24): [True: 4.71M, False: 1.17M]
  ------------------
  509|  4.71M|            oldv = oldmd->neighborhoods[oldi].entries[oldj].value;
  510|  4.71M|            if (oldv == NULL)
  ------------------
  |  Branch (510:17): [True: 3.92M, False: 787k]
  ------------------
  511|  3.92M|                continue;
  512|   787k|            oldhash = oldmd->neighborhoods[oldi].entries[oldj].hash;
  513|   787k|            newi = oldhash & newmd->neighborhood_mask;
  514|   787k|            rehashed = 0;
  515|   979k|            for (newj = 0; newj < NEIGHBORHOOD_LEN; newj++) {
  ------------------
  |  |  104|   979k|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|   979k|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (515:28): [True: 979k, False: 0]
  ------------------
  516|   979k|                if (newmd->neighborhoods[newi].entries[newj].value == NULL) {
  ------------------
  |  Branch (516:21): [True: 787k, False: 191k]
  ------------------
  517|   787k|                    newmd->neighborhoods[newi].entries[newj].value = oldv;
  518|   787k|                    newmd->neighborhoods[newi].entries[newj].hash = oldhash;
  519|   787k|                    rehashed = 1;
  520|   787k|                    break;
  521|   787k|                }
  522|   979k|            }
  523|   787k|            if (rehashed == 0) {
  ------------------
  |  Branch (523:17): [True: 0, False: 787k]
  ------------------
  524|       |                /* we ran out of space in a neighborhood, grow again */
  525|      0|                OPENSSL_free(newmd->neighborhood_ptr_to_free);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  526|      0|                OPENSSL_free(newmd);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  527|      0|                return grow_hashtable(h, newsize);
  528|      0|            }
  529|   787k|        }
  530|  1.17M|    }
  531|       |
  532|       |    /*
  533|       |     * Pre allocate the rcu callback item before assigning the newmd.
  534|       |     */
  535|  14.0k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (535:9): [True: 0, False: 14.0k]
  ------------------
  536|      0|        cbi = ossl_rcu_cb_item_new();
  537|      0|        if (cbi == NULL)
  ------------------
  |  Branch (537:13): [True: 0, False: 0]
  ------------------
  538|      0|            goto out_free;
  539|      0|    }
  540|       |
  541|       |    /*
  542|       |     * Now that our entries are all hashed into the new bucket list
  543|       |     * update our bucket_len and target_max_load
  544|       |     */
  545|  14.0k|    h->wpd.neighborhood_len = newsize;
  546|       |
  547|       |    /*
  548|       |     * Now we replace the old mutable data with the new
  549|       |     */
  550|  14.0k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (550:9): [True: 0, False: 14.0k]
  ------------------
  551|      0|        ossl_rcu_assign_ptr(&h->md, &newmd);
  ------------------
  |  |   36|      0|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  552|      0|        ossl_rcu_call(h->lock, cbi, free_old_neigh_table, oldmd);
  553|      0|        h->wpd.need_sync = 1;
  554|  14.0k|    } else {
  555|  14.0k|        h->md = newmd;
  556|  14.0k|        free_old_neigh_table(oldmd);
  557|  14.0k|    }
  558|       |    /*
  559|       |     * And we're done
  560|       |     */
  561|  14.0k|    rc = 1;
  562|       |
  563|  14.0k|out:
  564|  14.0k|    return rc;
  565|      0|out_free:
  566|      0|    OPENSSL_free(newmd->neighborhood_ptr_to_free);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  567|      0|    OPENSSL_free(newmd);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  568|      0|    goto out;
  569|  14.0k|}
hashtable.c:free_old_neigh_table:
  463|  14.0k|{
  464|  14.0k|    struct ht_mutable_data_st *oldmd = arg;
  465|       |
  466|  14.0k|    OPENSSL_free(oldmd->neighborhood_ptr_to_free);
  ------------------
  |  |  132|  14.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  467|  14.0k|    OPENSSL_free(oldmd);
  ------------------
  |  |  132|  14.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  468|  14.0k|}
hashtable.c:free_value:
  714|   705k|{
  715|   705k|    OPENSSL_free(v);
  ------------------
  |  |  132|   705k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  716|   705k|}
hashtable.c:compare_hash:
  458|  10.8M|{
  459|  10.8M|    return (hash1 == hash2);
  460|  10.8M|}
hashtable.c:match_key:
  585|  6.42M|{
  586|       |    /*
  587|       |     * keys match if they are both present, the same size
  588|       |     * and compare equal in memory
  589|       |     */
  590|  6.42M|    PREFETCH(a->keybuf);
  ------------------
  |  |   83|  6.42M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  591|  6.42M|    PREFETCH(b->keybuf);
  ------------------
  |  |   83|  6.42M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  592|  6.42M|    if (a->keybuf != NULL && b->keybuf != NULL && a->keysize == b->keysize)
  ------------------
  |  Branch (592:9): [True: 6.20M, False: 220k]
  |  Branch (592:30): [True: 6.20M, False: 0]
  |  Branch (592:51): [True: 6.20M, False: 0]
  ------------------
  593|  6.20M|        return !memcmp(a->keybuf, b->keybuf, a->keysize);
  594|       |
  595|   220k|    return 1;
  596|  6.42M|}

OSSL_HPKE_CTX_free:
  863|  2.58k|{
  864|  2.58k|    if (ctx == NULL)
  ------------------
  |  Branch (864:9): [True: 2.58k, False: 0]
  ------------------
  865|  2.58k|        return;
  866|      0|    EVP_CIPHER_free(ctx->aead_ciph);
  867|      0|    OPENSSL_free(ctx->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  868|      0|    OPENSSL_clear_free(ctx->exportersec, ctx->exporterseclen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  869|      0|    OPENSSL_free(ctx->pskid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  870|      0|    OPENSSL_clear_free(ctx->psk, ctx->psklen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  871|      0|    OPENSSL_clear_free(ctx->key, ctx->keylen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  872|      0|    OPENSSL_clear_free(ctx->nonce, ctx->noncelen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  873|      0|    OPENSSL_clear_free(ctx->shared_secret, ctx->shared_secretlen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  874|      0|    OPENSSL_clear_free(ctx->ikme, ctx->ikmelen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  875|      0|    EVP_PKEY_free(ctx->authpriv);
  876|      0|    OPENSSL_free(ctx->authpub);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  877|       |
  878|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  879|      0|    return;
  880|  2.58k|}

ossl_err_load_HTTP_strings:
   82|      1|{
   83|      1|#ifndef OPENSSL_NO_ERR
   84|      1|    if (ERR_reason_error_string(HTTP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (84:9): [True: 1, False: 0]
  ------------------
   85|      1|        ERR_load_strings_const(HTTP_str_reasons);
   86|      1|#endif
   87|      1|    return 1;
   88|      1|}

ossl_indicator_set_callback_new:
   21|    809|{
   22|    809|    INDICATOR_CB *cb;
   23|       |
   24|    809|    cb = OPENSSL_zalloc(sizeof(*cb));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|    809|    return cb;
   26|    809|}
ossl_indicator_set_callback_free:
   29|    808|{
   30|    808|    OPENSSL_free(cb);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   31|    808|}

OPENSSL_init_crypto:
  349|  25.2M|{
  350|  25.2M|    uint64_t tmp;
  351|  25.2M|    int aloaddone = 0;
  352|       |
  353|       |    /* Applications depend on 0 being returned when cleanup was already done */
  354|  25.2M|    if (ossl_unlikely(stopped)) {
  ------------------
  |  |   23|  25.2M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 25.2M]
  |  |  ------------------
  ------------------
  355|      0|        if (!(opts & OPENSSL_INIT_BASE_ONLY))
  ------------------
  |  |   31|      0|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (355:13): [True: 0, False: 0]
  ------------------
  356|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  357|      0|        return 0;
  358|      0|    }
  359|       |
  360|       |    /*
  361|       |     * We ignore failures from this function. It is probably because we are
  362|       |     * on a platform that doesn't support lockless atomic loads (we may not
  363|       |     * have created optsdone_lock yet so we can't use it). This is just an
  364|       |     * optimisation to skip the full checks in this function if we don't need
  365|       |     * to, so we carry on regardless in the event of failure.
  366|       |     *
  367|       |     * There could be a race here with other threads, so that optsdone has not
  368|       |     * been updated yet, even though the options have in fact been initialised.
  369|       |     * This doesn't matter - it just means we will run the full function
  370|       |     * unnecessarily - but all the critical code is contained in RUN_ONCE
  371|       |     * functions anyway so we are safe.
  372|       |     */
  373|  25.2M|    if (ossl_likely(CRYPTO_atomic_load(&optsdone, &tmp, NULL))) {
  ------------------
  |  |   22|  25.2M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 25.2M, False: 0]
  |  |  ------------------
  ------------------
  374|  25.2M|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (374:13): [True: 915k, False: 24.3M]
  ------------------
  375|   915k|            return 1;
  376|  24.3M|        aloaddone = 1;
  377|  24.3M|    }
  378|       |
  379|       |    /*
  380|       |     * At some point we should look at this function with a view to moving
  381|       |     * most/all of this into OSSL_LIB_CTX.
  382|       |     *
  383|       |     * When the caller specifies OPENSSL_INIT_BASE_ONLY, that should be the
  384|       |     * *only* option specified.  With that option we return immediately after
  385|       |     * doing the requested limited initialization.
  386|       |     *
  387|       |     * If we remain the only caller of err_shelve_state() the recursion should
  388|       |     * perhaps be removed, but if in doubt, it can be left in place.
  389|       |     */
  390|  24.3M|    if (ossl_unlikely(!RUN_ONCE(&base, ossl_init_base)))
  ------------------
  |  |   23|  48.6M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 24.3M]
  |  |  |  Branch (23:46): [True: 24.3M, False: 0]
  |  |  ------------------
  ------------------
  391|      0|        return 0;
  392|       |
  393|  24.3M|    if (opts & OPENSSL_INIT_BASE_ONLY)
  ------------------
  |  |   31|  24.3M|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (393:9): [True: 24.3M, False: 3]
  ------------------
  394|  24.3M|        return 1;
  395|       |
  396|       |    /*
  397|       |     * optsdone_lock should definitely be set up now, so we can now repeat the
  398|       |     * same check from above but be sure that it will work even on platforms
  399|       |     * without lockless CRYPTO_atomic_load
  400|       |     */
  401|      3|    if (!aloaddone) {
  ------------------
  |  Branch (401:9): [True: 0, False: 3]
  ------------------
  402|      0|        if (!CRYPTO_atomic_load(&optsdone, &tmp, optsdone_lock))
  ------------------
  |  Branch (402:13): [True: 0, False: 0]
  ------------------
  403|      0|            return 0;
  404|      0|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (404:13): [True: 0, False: 0]
  ------------------
  405|      0|            return 1;
  406|      0|    }
  407|       |
  408|      3|    if ((opts & OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  505|      3|#define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
  ------------------
  |  Branch (408:9): [True: 0, False: 3]
  ------------------
  409|      0|        && !RUN_ONCE_ALT(&load_crypto_strings,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (409:12): [True: 0, False: 0]
  ------------------
  410|      3|            ossl_init_no_load_crypto_strings,
  411|      3|            ossl_init_load_crypto_strings))
  412|      0|        return 0;
  413|       |
  414|      3|    if ((opts & OPENSSL_INIT_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  506|      3|#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
  ------------------
  |  Branch (414:9): [True: 1, False: 2]
  ------------------
  415|      1|        && !RUN_ONCE(&load_crypto_strings, ossl_init_load_crypto_strings))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (415:12): [True: 0, False: 1]
  ------------------
  416|      0|        return 0;
  417|       |
  418|      3|    if ((opts & OPENSSL_INIT_NO_LOAD_SSL_STRINGS)
  ------------------
  |  | 2812|      3|#define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L
  ------------------
  |  Branch (418:9): [True: 0, False: 3]
  ------------------
  419|      0|        && !RUN_ONCE_ALT(&ssl_strings, ossl_init_no_load_ssl_strings,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (419:12): [True: 0, False: 0]
  ------------------
  420|      3|            ossl_init_load_ssl_strings))
  421|      0|        return 0;
  422|       |
  423|      3|    if ((opts & OPENSSL_INIT_LOAD_SSL_STRINGS)
  ------------------
  |  | 2813|      3|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (423:9): [True: 1, False: 2]
  ------------------
  424|      1|        && !RUN_ONCE(&ssl_strings, ossl_init_load_ssl_strings))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (424:12): [True: 0, False: 1]
  ------------------
  425|      0|        return 0;
  426|       |
  427|      3|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_CIPHERS)
  ------------------
  |  |  509|      3|#define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L
  ------------------
  |  Branch (427:9): [True: 0, False: 3]
  ------------------
  428|      0|        && !RUN_ONCE_ALT(&add_all_ciphers, ossl_init_no_add_all_ciphers,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (428:12): [True: 0, False: 0]
  ------------------
  429|      3|            ossl_init_add_all_ciphers))
  430|      0|        return 0;
  431|       |
  432|      3|    if ((opts & OPENSSL_INIT_ADD_ALL_CIPHERS)
  ------------------
  |  |  507|      3|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
  |  Branch (432:9): [True: 2, False: 1]
  ------------------
  433|      2|        && !RUN_ONCE(&add_all_ciphers, ossl_init_add_all_ciphers))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (433:12): [True: 0, False: 2]
  ------------------
  434|      0|        return 0;
  435|       |
  436|      3|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_DIGESTS)
  ------------------
  |  |  510|      3|#define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L
  ------------------
  |  Branch (436:9): [True: 0, False: 3]
  ------------------
  437|      0|        && !RUN_ONCE_ALT(&add_all_digests, ossl_init_no_add_all_digests,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (437:12): [True: 0, False: 0]
  ------------------
  438|      3|            ossl_init_add_all_digests))
  439|      0|        return 0;
  440|       |
  441|      3|    if ((opts & OPENSSL_INIT_ADD_ALL_DIGESTS)
  ------------------
  |  |  508|      3|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  |  Branch (441:9): [True: 2, False: 1]
  ------------------
  442|      2|        && !RUN_ONCE(&add_all_digests, ossl_init_add_all_digests))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (442:12): [True: 0, False: 2]
  ------------------
  443|      0|        return 0;
  444|       |
  445|      3|    if ((opts & OPENSSL_INIT_ATFORK)
  ------------------
  |  |  515|      3|#define OPENSSL_INIT_ATFORK 0x00020000L
  ------------------
  |  Branch (445:9): [True: 0, False: 3]
  ------------------
  446|      0|        && !openssl_init_fork_handlers())
  ------------------
  |  Branch (446:12): [True: 0, False: 0]
  ------------------
  447|      0|        return 0;
  448|       |
  449|      3|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG)
  ------------------
  |  |  512|      3|#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
  ------------------
  |  Branch (449:9): [True: 0, False: 3]
  ------------------
  450|      0|        && !RUN_ONCE_ALT(&config, ossl_init_no_config, ossl_init_config))
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (450:12): [True: 0, False: 0]
  ------------------
  451|      0|        return 0;
  452|       |
  453|      3|    if (opts & OPENSSL_INIT_LOAD_CONFIG) {
  ------------------
  |  |  511|      3|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (453:9): [True: 2, False: 1]
  ------------------
  454|      2|        int loading = CRYPTO_THREAD_get_local(&in_init_config_local) != NULL;
  455|       |
  456|       |        /* If called recursively from OBJ_ calls, just skip it. */
  457|      2|        if (!loading) {
  ------------------
  |  Branch (457:13): [True: 1, False: 1]
  ------------------
  458|      1|            int ret;
  459|       |
  460|      1|            if (!CRYPTO_THREAD_set_local(&in_init_config_local, (void *)-1))
  ------------------
  |  Branch (460:17): [True: 0, False: 1]
  ------------------
  461|      0|                return 0;
  462|      1|            if (settings == NULL) {
  ------------------
  |  Branch (462:17): [True: 1, False: 0]
  ------------------
  463|      1|                ret = RUN_ONCE(&config, ossl_init_config);
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  464|      1|            } else {
  465|      0|                if (!CRYPTO_THREAD_write_lock(init_lock))
  ------------------
  |  Branch (465:21): [True: 0, False: 0]
  ------------------
  466|      0|                    return 0;
  467|      0|                conf_settings = settings;
  468|      0|                ret = RUN_ONCE_ALT(&config, ossl_init_config_settings,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  469|      0|                    ossl_init_config);
  470|      0|                conf_settings = NULL;
  471|      0|                CRYPTO_THREAD_unlock(init_lock);
  472|      0|            }
  473|       |
  474|      1|            if (ret <= 0)
  ------------------
  |  Branch (474:17): [True: 0, False: 1]
  ------------------
  475|      0|                return 0;
  476|      1|        }
  477|      2|    }
  478|       |
  479|      3|    if ((opts & OPENSSL_INIT_ASYNC)
  ------------------
  |  |  513|      3|#define OPENSSL_INIT_ASYNC 0x00000100L
  ------------------
  |  Branch (479:9): [True: 0, False: 3]
  ------------------
  480|      0|        && !RUN_ONCE(&async, ossl_init_async))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (480:12): [True: 0, False: 0]
  ------------------
  481|      0|        return 0;
  482|       |
  483|      3|    if (!CRYPTO_atomic_or(&optsdone, opts, &tmp, optsdone_lock))
  ------------------
  |  Branch (483:9): [True: 0, False: 3]
  ------------------
  484|      0|        return 0;
  485|       |
  486|      3|    return 1;
  487|      3|}
init.c:ossl_init_base:
   53|      1|{
   54|       |    /* no need to init trace */
   55|       |
   56|      1|    OSSL_TRACE(INIT, "ossl_init_base: setting up stop handlers\n");
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   57|       |#ifndef OPENSSL_NO_CRYPTO_MDEBUG
   58|       |    ossl_malloc_setup_failures();
   59|       |#endif
   60|       |
   61|      1|    if ((optsdone_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (61:9): [True: 0, False: 1]
  ------------------
   62|      1|        || (init_lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (62:12): [True: 0, False: 1]
  ------------------
   63|      0|        goto err;
   64|       |
   65|      1|    OPENSSL_cpuid_setup();
   66|       |
   67|      1|    if (!ossl_init_thread())
  ------------------
  |  Branch (67:9): [True: 0, False: 1]
  ------------------
   68|      0|        goto err;
   69|       |
   70|      1|    if (!CRYPTO_THREAD_init_local(&in_init_config_local, NULL))
  ------------------
  |  Branch (70:9): [True: 0, False: 1]
  ------------------
   71|      0|        goto err;
   72|       |
   73|      1|    base_inited = 1;
   74|      1|    return 1;
   75|       |
   76|      0|err:
   77|      0|    OSSL_TRACE(INIT, "ossl_init_base failed!\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   78|      0|    CRYPTO_THREAD_lock_free(optsdone_lock);
   79|      0|    optsdone_lock = NULL;
   80|      0|    CRYPTO_THREAD_lock_free(init_lock);
   81|      0|    init_lock = NULL;
   82|       |
   83|      0|    return 0;
   84|      1|}
init.c:ossl_init_load_crypto_strings:
   89|      1|{
   90|      1|    int ret = 1;
   91|       |    /*
   92|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
   93|       |     * pulling in all the error strings during static linking
   94|       |     */
   95|      1|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
   96|      1|    void *err;
   97|       |
   98|      1|    if (!err_shelve_state(&err))
  ------------------
  |  Branch (98:9): [True: 0, False: 1]
  ------------------
   99|      0|        return 0;
  100|       |
  101|      1|    OSSL_TRACE(INIT, "ossl_err_load_crypto_strings()\n");
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  102|      1|    ret = ossl_err_load_crypto_strings();
  103|       |
  104|      1|    err_unshelve_state(err);
  105|      1|#endif
  106|      1|    return ret;
  107|      1|}
init.c:ossl_init_load_ssl_strings:
  119|      1|{
  120|       |    /*
  121|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
  122|       |     * pulling in all the error strings during static linking
  123|       |     */
  124|      1|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
  125|      1|    OSSL_TRACE(INIT, "ossl_init_load_ssl_strings: ossl_err_load_SSL_strings()\n");
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  126|      1|    ossl_err_load_SSL_strings();
  127|      1|#endif
  128|      1|    return 1;
  129|      1|}
init.c:ossl_init_add_all_ciphers:
  140|      1|{
  141|       |    /*
  142|       |     * OPENSSL_NO_AUTOALGINIT is provided here to prevent at compile time
  143|       |     * pulling in all the ciphers during static linking
  144|       |     */
  145|      1|#ifndef OPENSSL_NO_AUTOALGINIT
  146|      1|    OSSL_TRACE(INIT, "openssl_add_all_ciphers_int()\n");
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  147|      1|    openssl_add_all_ciphers_int();
  148|      1|#endif
  149|      1|    return 1;
  150|      1|}
init.c:ossl_init_add_all_digests:
  161|      1|{
  162|       |    /*
  163|       |     * OPENSSL_NO_AUTOALGINIT is provided here to prevent at compile time
  164|       |     * pulling in all the ciphers during static linking
  165|       |     */
  166|      1|#ifndef OPENSSL_NO_AUTOALGINIT
  167|      1|    OSSL_TRACE(INIT, "openssl_add_all_digests()\n");
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  168|      1|    openssl_add_all_digests_int();
  169|      1|#endif
  170|      1|    return 1;
  171|      1|}
init.c:ossl_init_config:
  183|      1|{
  184|      1|    int ret = ossl_config_int(NULL);
  185|       |
  186|      1|    return ret;
  187|      1|}

ossl_init_thread:
  240|      1|{
  241|      1|    if (!CRYPTO_THREAD_init_local(&destructor_key.value,
  ------------------
  |  Branch (241:9): [True: 0, False: 1]
  ------------------
  242|      1|            init_thread_destructor))
  243|      0|        return 0;
  244|       |
  245|      1|    return 1;
  246|      1|}
ossl_ctx_thread_stop:
  281|    808|{
  282|    808|    if (destructor_key.sane != -1) {
  ------------------
  |  Branch (282:9): [True: 808, False: 0]
  ------------------
  283|    808|        THREAD_EVENT_HANDLER **hands = fetch_thread_local(ctx);
  284|       |
  285|    808|        init_thread_stop(ctx, hands);
  286|    808|    }
  287|    808|}
ossl_init_thread_start:
  392|    597|{
  393|    597|    THREAD_EVENT_HANDLER **hands;
  394|    597|    THREAD_EVENT_HANDLER *hand;
  395|    597|    OSSL_LIB_CTX *ctx = NULL;
  396|       |#ifdef FIPS_MODULE
  397|       |    /*
  398|       |     * In FIPS mode the list of THREAD_EVENT_HANDLERs is unique per combination
  399|       |     * of OSSL_LIB_CTX and thread. This is because in FIPS mode each
  400|       |     * OSSL_LIB_CTX gets informed about thread stop events individually.
  401|       |     */
  402|       |
  403|       |    ctx = arg;
  404|       |#endif
  405|       |
  406|    597|    hands = alloc_thread_local(ctx);
  407|       |
  408|    597|    if (hands == NULL)
  ------------------
  |  Branch (408:9): [True: 0, False: 597]
  ------------------
  409|      0|        return 0;
  410|       |
  411|       |#ifdef FIPS_MODULE
  412|       |    if (*hands == NULL) {
  413|       |        /*
  414|       |         * We've not yet registered any handlers for this thread. We need to get
  415|       |         * libcrypto to tell us about later thread stop events. c_thread_start
  416|       |         * is a callback to libcrypto defined in fipsprov.c
  417|       |         */
  418|       |        if (!ossl_thread_register_fips(ctx))
  419|       |            return 0;
  420|       |    }
  421|       |#endif
  422|       |
  423|    597|    hand = OPENSSL_malloc(sizeof(*hand));
  ------------------
  |  |  107|    597|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  424|    597|    if (hand == NULL)
  ------------------
  |  Branch (424:9): [True: 0, False: 597]
  ------------------
  425|      0|        return 0;
  426|       |
  427|    597|    hand->handfn = handfn;
  428|    597|    hand->arg = arg;
  429|    597|#ifndef FIPS_MODULE
  430|    597|    hand->index = index;
  431|    597|#endif
  432|    597|    hand->next = *hands;
  433|    597|    *hands = hand;
  434|       |
  435|    597|    return 1;
  436|    597|}
ossl_init_thread_deregister:
  492|  1.79k|{
  493|  1.79k|    return init_thread_deregister(index, 0);
  494|  1.79k|}
initthread.c:manage_thread_local:
  137|  1.40k|{
  138|  1.40k|    THREAD_EVENT_HANDLER **hands = get_thread_event_handler(ctx);
  139|       |
  140|  1.40k|    if (alloc) {
  ------------------
  |  Branch (140:9): [True: 597, False: 808]
  ------------------
  141|    597|        if (hands == NULL) {
  ------------------
  |  Branch (141:13): [True: 1, False: 596]
  ------------------
  142|       |
  143|      1|            if ((hands = OPENSSL_zalloc(sizeof(*hands))) == NULL)
  ------------------
  |  |  109|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (143:17): [True: 0, False: 1]
  ------------------
  144|      0|                return NULL;
  145|       |
  146|      1|            if (!set_thread_event_handler(ctx, hands)) {
  ------------------
  |  Branch (146:17): [True: 0, False: 1]
  ------------------
  147|      0|                OPENSSL_free(hands);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|      0|                return NULL;
  149|      0|            }
  150|      1|#ifndef FIPS_MODULE
  151|      1|            if (!init_thread_push_handlers(hands)) {
  ------------------
  |  Branch (151:17): [True: 0, False: 1]
  ------------------
  152|      0|                set_thread_event_handler(ctx, NULL);
  153|      0|                OPENSSL_free(hands);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|      0|                return NULL;
  155|      0|            }
  156|      1|#endif
  157|      1|        }
  158|    808|    } else if (!keep) {
  ------------------
  |  Branch (158:16): [True: 0, False: 808]
  ------------------
  159|      0|        set_thread_event_handler(ctx, NULL);
  160|      0|    }
  161|       |
  162|  1.40k|    return hands;
  163|  1.40k|}
initthread.c:get_thread_event_handler:
  114|  1.40k|{
  115|       |#ifdef FIPS_MODULE
  116|       |    return CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_TEVENT_KEY, ctx);
  117|       |#else
  118|  1.40k|    if (destructor_key.sane != -1)
  ------------------
  |  Branch (118:9): [True: 1.40k, False: 0]
  ------------------
  119|  1.40k|        return CRYPTO_THREAD_get_local(&destructor_key.value);
  120|      0|    return NULL;
  121|  1.40k|#endif
  122|  1.40k|}
initthread.c:set_thread_event_handler:
  125|      1|{
  126|       |#ifdef FIPS_MODULE
  127|       |    return CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_TEVENT_KEY, ctx, hands);
  128|       |#else
  129|      1|    if (destructor_key.sane != -1)
  ------------------
  |  Branch (129:9): [True: 1, False: 0]
  ------------------
  130|      1|        return CRYPTO_THREAD_set_local(&destructor_key.value, hands);
  131|      0|    return 0;
  132|      1|#endif
  133|      1|}
initthread.c:init_thread_push_handlers:
  192|      1|{
  193|      1|    int ret;
  194|      1|    GLOBAL_TEVENT_REGISTER *gtr;
  195|       |
  196|      1|    gtr = get_global_tevent_register();
  197|      1|    if (gtr == NULL)
  ------------------
  |  Branch (197:9): [True: 0, False: 1]
  ------------------
  198|      0|        return 0;
  199|       |
  200|      1|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (200:9): [True: 0, False: 1]
  ------------------
  201|      0|        return 0;
  202|      1|    ret = (sk_THREAD_EVENT_HANDLER_PTR_push(gtr->skhands, hands) != 0);
  203|      1|    CRYPTO_THREAD_unlock(gtr->lock);
  204|       |
  205|      1|    return ret;
  206|      1|}
initthread.c:get_global_tevent_register:
   79|  2.60k|{
   80|  2.60k|    if (!RUN_ONCE(&tevent_register_runonce, create_global_tevent_register))
  ------------------
  |  |  130|  2.60k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2.60k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (80:9): [True: 0, False: 2.60k]
  ------------------
   81|      0|        return NULL;
   82|  2.60k|    return glob_tevent_reg;
   83|  2.60k|}
initthread.c:create_global_tevent_register:
   60|      1|{
   61|      1|    glob_tevent_reg = OPENSSL_zalloc(sizeof(*glob_tevent_reg));
  ------------------
  |  |  109|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      1|    if (glob_tevent_reg == NULL)
  ------------------
  |  Branch (62:9): [True: 0, False: 1]
  ------------------
   63|      0|        return 0;
   64|       |
   65|      1|    glob_tevent_reg->skhands = sk_THREAD_EVENT_HANDLER_PTR_new_null();
   66|      1|    glob_tevent_reg->lock = CRYPTO_THREAD_lock_new();
   67|      1|    if (glob_tevent_reg->skhands == NULL || glob_tevent_reg->lock == NULL) {
  ------------------
  |  Branch (67:9): [True: 0, False: 1]
  |  Branch (67:45): [True: 0, False: 1]
  ------------------
   68|      0|        sk_THREAD_EVENT_HANDLER_PTR_free(glob_tevent_reg->skhands);
   69|      0|        CRYPTO_THREAD_lock_free(glob_tevent_reg->lock);
   70|      0|        OPENSSL_free(glob_tevent_reg);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   71|      0|        glob_tevent_reg = NULL;
   72|      0|        return 0;
   73|      0|    }
   74|       |
   75|      1|    return 1;
   76|      1|}
initthread.c:fetch_thread_local:
  171|    808|{
  172|    808|    return manage_thread_local(ctx, 0, 1);
  173|    808|}
initthread.c:init_thread_stop:
  348|    808|{
  349|    808|    THREAD_EVENT_HANDLER *curr, *prev = NULL, *tmp;
  350|    808|#ifndef FIPS_MODULE
  351|    808|    GLOBAL_TEVENT_REGISTER *gtr;
  352|    808|#endif
  353|       |
  354|       |    /* Can't do much about this */
  355|    808|    if (hands == NULL)
  ------------------
  |  Branch (355:9): [True: 0, False: 808]
  ------------------
  356|      0|        return;
  357|       |
  358|    808|#ifndef FIPS_MODULE
  359|    808|    gtr = get_global_tevent_register();
  360|    808|    if (gtr == NULL)
  ------------------
  |  Branch (360:9): [True: 0, False: 808]
  ------------------
  361|      0|        return;
  362|       |
  363|    808|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (363:9): [True: 0, False: 808]
  ------------------
  364|      0|        return;
  365|    808|#endif
  366|       |
  367|    808|    curr = *hands;
  368|  3.01k|    while (curr != NULL) {
  ------------------
  |  Branch (368:12): [True: 2.21k, False: 808]
  ------------------
  369|  2.21k|        if (arg != NULL && curr->arg != arg) {
  ------------------
  |  Branch (369:13): [True: 2.21k, False: 0]
  |  Branch (369:28): [True: 1.61k, False: 595]
  ------------------
  370|  1.61k|            prev = curr;
  371|  1.61k|            curr = curr->next;
  372|  1.61k|            continue;
  373|  1.61k|        }
  374|    595|        curr->handfn(curr->arg);
  375|    595|        if (prev == NULL)
  ------------------
  |  Branch (375:13): [True: 595, False: 0]
  ------------------
  376|    595|            *hands = curr->next;
  377|      0|        else
  378|      0|            prev->next = curr->next;
  379|       |
  380|    595|        tmp = curr;
  381|    595|        curr = curr->next;
  382|       |
  383|    595|        OPENSSL_free(tmp);
  ------------------
  |  |  132|    595|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  384|    595|    }
  385|    808|#ifndef FIPS_MODULE
  386|    808|    CRYPTO_THREAD_unlock(gtr->lock);
  387|    808|#endif
  388|    808|}
initthread.c:alloc_thread_local:
  176|    597|{
  177|    597|    return manage_thread_local(ctx, 1, 0);
  178|    597|}
initthread.c:init_thread_deregister:
  440|  1.79k|{
  441|  1.79k|    GLOBAL_TEVENT_REGISTER *gtr;
  442|  1.79k|    int i;
  443|       |
  444|  1.79k|    gtr = get_global_tevent_register();
  445|  1.79k|    if (gtr == NULL)
  ------------------
  |  Branch (445:9): [True: 0, False: 1.79k]
  ------------------
  446|      0|        return 0;
  447|  1.79k|    if (!all) {
  ------------------
  |  Branch (447:9): [True: 1.79k, False: 0]
  ------------------
  448|  1.79k|        if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (448:13): [True: 0, False: 1.79k]
  ------------------
  449|      0|            return 0;
  450|  1.79k|    } else {
  451|      0|        glob_tevent_reg = NULL;
  452|      0|    }
  453|  3.59k|    for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
  ------------------
  |  Branch (453:17): [True: 1.79k, False: 1.79k]
  ------------------
  454|  1.79k|        THREAD_EVENT_HANDLER **hands
  455|  1.79k|            = sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
  456|  1.79k|        THREAD_EVENT_HANDLER *curr = NULL, *prev = NULL, *tmp;
  457|       |
  458|  1.79k|        if (hands == NULL) {
  ------------------
  |  Branch (458:13): [True: 0, False: 1.79k]
  ------------------
  459|      0|            if (!all)
  ------------------
  |  Branch (459:17): [True: 0, False: 0]
  ------------------
  460|      0|                CRYPTO_THREAD_unlock(gtr->lock);
  461|      0|            return 0;
  462|      0|        }
  463|  1.79k|        curr = *hands;
  464|  5.39k|        while (curr != NULL) {
  ------------------
  |  Branch (464:16): [True: 3.59k, False: 1.79k]
  ------------------
  465|  3.59k|            if (all || curr->index == index) {
  ------------------
  |  Branch (465:17): [True: 0, False: 3.59k]
  |  Branch (465:24): [True: 0, False: 3.59k]
  ------------------
  466|      0|                if (prev != NULL)
  ------------------
  |  Branch (466:21): [True: 0, False: 0]
  ------------------
  467|      0|                    prev->next = curr->next;
  468|      0|                else
  469|      0|                    *hands = curr->next;
  470|      0|                tmp = curr;
  471|      0|                curr = curr->next;
  472|      0|                OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  473|      0|                continue;
  474|      0|            }
  475|  3.59k|            prev = curr;
  476|  3.59k|            curr = curr->next;
  477|  3.59k|        }
  478|  1.79k|        if (all)
  ------------------
  |  Branch (478:13): [True: 0, False: 1.79k]
  ------------------
  479|      0|            OPENSSL_free(hands);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  480|  1.79k|    }
  481|  1.79k|    if (all) {
  ------------------
  |  Branch (481:9): [True: 0, False: 1.79k]
  ------------------
  482|      0|        CRYPTO_THREAD_lock_free(gtr->lock);
  483|      0|        sk_THREAD_EVENT_HANDLER_PTR_free(gtr->skhands);
  484|      0|        OPENSSL_free(gtr);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  485|  1.79k|    } else {
  486|  1.79k|        CRYPTO_THREAD_unlock(gtr->lock);
  487|  1.79k|    }
  488|  1.79k|    return 1;
  489|  1.79k|}

OPENSSL_LH_set_thunks:
   52|   199k|{
   53|       |
   54|   199k|    if (lh == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 199k]
  ------------------
   55|      0|        return NULL;
   56|   199k|    lh->compw = cw;
   57|   199k|    lh->hashw = hw;
   58|   199k|    lh->daw = daw;
   59|   199k|    lh->daaw = daaw;
   60|   199k|    return lh;
   61|   199k|}
OPENSSL_LH_new:
   64|   199k|{
   65|   199k|    OPENSSL_LHASH *ret;
   66|       |
   67|   199k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|   199k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (67:9): [True: 0, False: 199k]
  ------------------
   68|      0|        return NULL;
   69|   199k|    if ((ret->b = OPENSSL_calloc(MIN_NODES, sizeof(*ret->b))) == NULL)
  ------------------
  |  |  113|   199k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (69:9): [True: 0, False: 199k]
  ------------------
   70|      0|        goto err;
   71|   199k|    ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
  ------------------
  |  Branch (71:18): [True: 0, False: 199k]
  ------------------
   72|   199k|    ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
  ------------------
  |  Branch (72:18): [True: 0, False: 199k]
  ------------------
   73|   199k|    ret->num_nodes = MIN_NODES / 2;
  ------------------
  |  |   39|   199k|#define MIN_NODES 16
  ------------------
   74|   199k|    ret->num_alloc_nodes = MIN_NODES;
  ------------------
  |  |   39|   199k|#define MIN_NODES 16
  ------------------
   75|   199k|    ret->pmax = MIN_NODES / 2;
  ------------------
  |  |   39|   199k|#define MIN_NODES 16
  ------------------
   76|   199k|    ret->up_load = UP_LOAD;
  ------------------
  |  |   40|   199k|#define UP_LOAD (2 * LH_LOAD_MULT) /* load times 256 (default 2) */
  |  |  ------------------
  |  |  |  |   92|   199k|#define LH_LOAD_MULT 256
  |  |  ------------------
  ------------------
   77|   199k|    ret->down_load = DOWN_LOAD;
  ------------------
  |  |   41|   199k|#define DOWN_LOAD (LH_LOAD_MULT) /* load times 256 (default 1) */
  |  |  ------------------
  |  |  |  |   92|   199k|#define LH_LOAD_MULT 256
  |  |  ------------------
  ------------------
   78|   199k|    return ret;
   79|       |
   80|      0|err:
   81|      0|    OPENSSL_free(ret->b);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   83|       |    return NULL;
   84|   199k|}
OPENSSL_LH_free:
   87|   199k|{
   88|   199k|    if (lh == NULL)
  ------------------
  |  Branch (88:9): [True: 0, False: 199k]
  ------------------
   89|      0|        return;
   90|       |
   91|   199k|    OPENSSL_LH_flush(lh);
   92|   199k|    OPENSSL_free(lh->b);
  ------------------
  |  |  132|   199k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|   199k|    OPENSSL_free(lh);
  ------------------
  |  |  132|   199k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|   199k|}
OPENSSL_LH_flush:
   97|   202k|{
   98|   202k|    unsigned int i;
   99|   202k|    OPENSSL_LH_NODE *n, *nn;
  100|       |
  101|   202k|    if (lh == NULL)
  ------------------
  |  Branch (101:9): [True: 0, False: 202k]
  ------------------
  102|      0|        return;
  103|       |
  104|  1.82M|    for (i = 0; i < lh->num_nodes; i++) {
  ------------------
  |  Branch (104:17): [True: 1.61M, False: 202k]
  ------------------
  105|  1.61M|        n = lh->b[i];
  106|  1.66M|        while (n != NULL) {
  ------------------
  |  Branch (106:16): [True: 43.1k, False: 1.61M]
  ------------------
  107|  43.1k|            nn = n->next;
  108|  43.1k|            OPENSSL_free(n);
  ------------------
  |  |  132|  43.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  109|  43.1k|            n = nn;
  110|  43.1k|        }
  111|  1.61M|        lh->b[i] = NULL;
  112|  1.61M|    }
  113|       |
  114|   202k|    lh->num_items = 0;
  115|   202k|}
OPENSSL_LH_insert:
  118|  48.4k|{
  119|  48.4k|    unsigned long hash;
  120|  48.4k|    OPENSSL_LH_NODE *nn, **rn;
  121|  48.4k|    void *ret;
  122|       |
  123|  48.4k|    lh->error = 0;
  124|  48.4k|    if ((lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)) && !expand(lh))
  ------------------
  |  |   92|  48.4k|#define LH_LOAD_MULT 256
  ------------------
  |  Branch (124:9): [True: 1.10k, False: 47.3k]
  |  Branch (124:76): [True: 0, False: 1.10k]
  ------------------
  125|      0|        return NULL; /* 'lh->error++' already done in 'expand' */
  126|       |
  127|  48.4k|    rn = getrn(lh, data, &hash);
  128|       |
  129|  48.4k|    if (*rn == NULL) {
  ------------------
  |  Branch (129:9): [True: 45.3k, False: 3.05k]
  ------------------
  130|  45.3k|        if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
  ------------------
  |  |  107|  45.3k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (130:13): [True: 0, False: 45.3k]
  ------------------
  131|      0|            lh->error++;
  132|      0|            return NULL;
  133|      0|        }
  134|  45.3k|        nn->data = data;
  135|  45.3k|        nn->next = NULL;
  136|  45.3k|        nn->hash = hash;
  137|  45.3k|        *rn = nn;
  138|  45.3k|        ret = NULL;
  139|  45.3k|        lh->num_items++;
  140|  45.3k|    } else { /* replace same key */
  141|  3.05k|        ret = (*rn)->data;
  142|  3.05k|        (*rn)->data = data;
  143|  3.05k|    }
  144|  48.4k|    return ret;
  145|  48.4k|}
OPENSSL_LH_retrieve:
  173|  2.90M|{
  174|  2.90M|    unsigned long hash;
  175|  2.90M|    OPENSSL_LH_NODE **rn;
  176|       |
  177|  2.90M|    if (lh->error != 0)
  ------------------
  |  Branch (177:9): [True: 0, False: 2.90M]
  ------------------
  178|      0|        lh->error = 0;
  179|       |
  180|  2.90M|    rn = getrn(lh, data, &hash);
  181|       |
  182|  2.90M|    return *rn == NULL ? NULL : (*rn)->data;
  ------------------
  |  Branch (182:12): [True: 664k, False: 2.24M]
  ------------------
  183|  2.90M|}
OPENSSL_LH_doall:
  216|   198k|{
  217|   198k|    if (lh == NULL)
  ------------------
  |  Branch (217:9): [True: 0, False: 198k]
  ------------------
  218|      0|        return;
  219|       |
  220|   198k|    doall_util_fn(lh, 0, lh->daw, func, (OPENSSL_LH_DOALL_FUNCARG)NULL,
  221|   198k|        (OPENSSL_LH_DOALL_FUNCARG_THUNK)NULL, NULL);
  222|   198k|}
OPENSSL_LH_doall_arg_thunk:
  237|  1.41k|{
  238|  1.41k|    doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC_THUNK)NULL,
  239|       |        (OPENSSL_LH_DOALL_FUNC)NULL, fn, daaw, arg);
  240|  1.41k|}
OPENSSL_LH_strhash:
  360|  1.30M|{
  361|  1.30M|    unsigned long ret = 0;
  362|  1.30M|    long n;
  363|  1.30M|    unsigned long v;
  364|  1.30M|    int r;
  365|       |
  366|  1.30M|    if ((c == NULL) || (*c == '\0'))
  ------------------
  |  Branch (366:9): [True: 0, False: 1.30M]
  |  Branch (366:24): [True: 726k, False: 574k]
  ------------------
  367|   726k|        return ret;
  368|       |
  369|   574k|    n = 0x100;
  370|  13.0M|    while (*c) {
  ------------------
  |  Branch (370:12): [True: 12.4M, False: 574k]
  ------------------
  371|  12.4M|        v = n | (*c);
  372|  12.4M|        n += 0x100;
  373|  12.4M|        r = (int)((v >> 2) ^ v) & 0x0f;
  374|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  375|  12.4M|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  376|  12.4M|        ret &= 0xFFFFFFFFL;
  377|  12.4M|        ret ^= v * v;
  378|  12.4M|        c++;
  379|  12.4M|    }
  380|   574k|    return (ret >> 16) ^ ret;
  381|  1.30M|}
ossl_lh_strcasehash:
  398|  2.39M|{
  399|  2.39M|    unsigned long ret = 0;
  400|  2.39M|    long n;
  401|  2.39M|    unsigned long v;
  402|  2.39M|    int r;
  403|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  404|       |    const long int case_adjust = ~0x40;
  405|       |#else
  406|  2.39M|    const long int case_adjust = ~0x20;
  407|  2.39M|#endif
  408|       |
  409|  2.39M|    if (c == NULL || *c == '\0')
  ------------------
  |  Branch (409:9): [True: 0, False: 2.39M]
  |  Branch (409:22): [True: 0, False: 2.39M]
  ------------------
  410|      0|        return ret;
  411|       |
  412|  29.1M|    for (n = 0x100; *c != '\0'; n += 0x100) {
  ------------------
  |  Branch (412:21): [True: 26.7M, False: 2.39M]
  ------------------
  413|  26.7M|        v = n | (case_adjust & *c);
  414|  26.7M|        r = (int)((v >> 2) ^ v) & 0x0f;
  415|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  416|  26.7M|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  417|  26.7M|        ret &= 0xFFFFFFFFL;
  418|  26.7M|        ret ^= v * v;
  419|  26.7M|        c++;
  420|  26.7M|    }
  421|  2.39M|    return (ret >> 16) ^ ret;
  422|  2.39M|}
OPENSSL_LH_num_items:
  425|  1.16k|{
  426|  1.16k|    return lh ? lh->num_items : 0;
  ------------------
  |  Branch (426:12): [True: 1.16k, False: 0]
  ------------------
  427|  1.16k|}
OPENSSL_LH_get_down_load:
  430|  3.47k|{
  431|  3.47k|    return lh->down_load;
  432|  3.47k|}
OPENSSL_LH_set_down_load:
  435|  6.94k|{
  436|  6.94k|    lh->down_load = down_load;
  437|  6.94k|}
OPENSSL_LH_error:
  440|  43.4k|{
  441|  43.4k|    return lh->error;
  442|  43.4k|}
lhash.c:doall_util_fn:
  191|   200k|{
  192|   200k|    int i;
  193|   200k|    OPENSSL_LH_NODE *a, *n;
  194|       |
  195|   200k|    if (lh == NULL)
  ------------------
  |  Branch (195:9): [True: 0, False: 200k]
  ------------------
  196|      0|        return;
  197|       |
  198|       |    /*
  199|       |     * reverse the order so we search from 'top to bottom' We were having
  200|       |     * memory leaks otherwise
  201|       |     */
  202|  1.96M|    for (i = lh->num_nodes - 1; i >= 0; i--) {
  ------------------
  |  Branch (202:33): [True: 1.76M, False: 200k]
  ------------------
  203|  1.76M|        a = lh->b[i];
  204|  2.15M|        while (a != NULL) {
  ------------------
  |  Branch (204:16): [True: 386k, False: 1.76M]
  ------------------
  205|   386k|            n = a->next;
  206|   386k|            if (use_arg)
  ------------------
  |  Branch (206:17): [True: 343k, False: 43.1k]
  ------------------
  207|   343k|                wfunc_arg(a->data, arg, func_arg);
  208|  43.1k|            else
  209|  43.1k|                wfunc(a->data, func);
  210|   386k|            a = n;
  211|   386k|        }
  212|  1.76M|    }
  213|   200k|}
lhash.c:expand:
  243|  1.10k|{
  244|  1.10k|    OPENSSL_LH_NODE **n, **n1, **n2, *np;
  245|  1.10k|    unsigned int p, pmax, nni, j;
  246|  1.10k|    unsigned long hash;
  247|       |
  248|  1.10k|    nni = lh->num_alloc_nodes;
  249|  1.10k|    p = lh->p;
  250|  1.10k|    pmax = lh->pmax;
  251|  1.10k|    if (p + 1 >= pmax) {
  ------------------
  |  Branch (251:9): [True: 9, False: 1.09k]
  ------------------
  252|      9|        j = nni * 2;
  253|      9|        n = OPENSSL_realloc_array(lh->b, j, sizeof(OPENSSL_LH_NODE *));
  ------------------
  |  |  125|      9|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  254|      9|        if (n == NULL) {
  ------------------
  |  Branch (254:13): [True: 0, False: 9]
  ------------------
  255|      0|            lh->error++;
  256|      0|            return 0;
  257|      0|        }
  258|      9|        lh->b = n;
  259|      9|        memset(n + nni, 0, sizeof(*n) * (j - nni));
  260|      9|        lh->pmax = nni;
  261|      9|        lh->num_alloc_nodes = j;
  262|      9|        lh->p = 0;
  263|  1.09k|    } else {
  264|  1.09k|        lh->p++;
  265|  1.09k|    }
  266|       |
  267|  1.10k|    lh->num_nodes++;
  268|  1.10k|    n1 = &(lh->b[p]);
  269|  1.10k|    n2 = &(lh->b[p + pmax]);
  270|  1.10k|    *n2 = NULL;
  271|       |
  272|  4.45k|    for (np = *n1; np != NULL;) {
  ------------------
  |  Branch (272:20): [True: 3.34k, False: 1.10k]
  ------------------
  273|  3.34k|        hash = np->hash;
  274|  3.34k|        if ((hash % nni) != p) { /* move it */
  ------------------
  |  Branch (274:13): [True: 650, False: 2.69k]
  ------------------
  275|    650|            *n1 = (*n1)->next;
  276|    650|            np->next = *n2;
  277|    650|            *n2 = np;
  278|    650|        } else
  279|  2.69k|            n1 = &((*n1)->next);
  280|  3.34k|        np = *n1;
  281|  3.34k|    }
  282|       |
  283|  1.10k|    return 1;
  284|  1.10k|}
lhash.c:getrn:
  320|  2.95M|{
  321|  2.95M|    OPENSSL_LH_NODE **ret, *n1;
  322|  2.95M|    unsigned long hash, nn;
  323|       |
  324|  2.95M|    if (lh->hashw != NULL)
  ------------------
  |  Branch (324:9): [True: 2.95M, False: 0]
  ------------------
  325|  2.95M|        hash = lh->hashw(data, lh->hash);
  326|      0|    else
  327|      0|        hash = lh->hash(data);
  328|       |
  329|  2.95M|    *rhash = hash;
  330|       |
  331|  2.95M|    nn = hash % lh->pmax;
  332|  2.95M|    if (nn < lh->p)
  ------------------
  |  Branch (332:9): [True: 865k, False: 2.09M]
  ------------------
  333|   865k|        nn = hash % lh->num_alloc_nodes;
  334|       |
  335|  2.95M|    ret = &(lh->b[(int)nn]);
  336|  4.18M|    for (n1 = *ret; n1 != NULL; n1 = n1->next) {
  ------------------
  |  Branch (336:21): [True: 3.47M, False: 709k]
  ------------------
  337|  3.47M|        if (n1->hash != hash) {
  ------------------
  |  Branch (337:13): [True: 1.22M, False: 2.24M]
  ------------------
  338|  1.22M|            ret = &(n1->next);
  339|  1.22M|            continue;
  340|  1.22M|        }
  341|       |
  342|  2.24M|        if (lh->compw != NULL) {
  ------------------
  |  Branch (342:13): [True: 2.24M, False: 0]
  ------------------
  343|  2.24M|            if (lh->compw(n1->data, data, lh->comp) == 0)
  ------------------
  |  Branch (343:17): [True: 2.24M, False: 471]
  ------------------
  344|  2.24M|                break;
  345|  2.24M|        } else {
  346|      0|            if (lh->comp(n1->data, data) == 0)
  ------------------
  |  Branch (346:17): [True: 0, False: 0]
  ------------------
  347|      0|                break;
  348|      0|        }
  349|    471|        ret = &(n1->next);
  350|    471|    }
  351|  2.95M|    return ret;
  352|  2.95M|}

CRYPTO_malloc:
  190|   141M|{
  191|   141M|    void *ptr;
  192|       |
  193|   141M|    INCREMENT(malloc_count);
  194|   141M|    if (malloc_impl != CRYPTO_malloc) {
  ------------------
  |  Branch (194:9): [True: 0, False: 141M]
  ------------------
  195|      0|        ptr = malloc_impl(num, file, line);
  196|      0|        if (ptr != NULL || num == 0)
  ------------------
  |  Branch (196:13): [True: 0, False: 0]
  |  Branch (196:28): [True: 0, False: 0]
  ------------------
  197|      0|            return ptr;
  198|      0|        goto err;
  199|      0|    }
  200|       |
  201|   141M|    if (ossl_unlikely(num == 0))
  ------------------
  |  |   23|   141M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 141M]
  |  |  ------------------
  ------------------
  202|      0|        return NULL;
  203|       |
  204|   141M|    FAILTEST();
  205|   141M|    if (allow_customize) {
  ------------------
  |  Branch (205:9): [True: 1, False: 141M]
  ------------------
  206|       |        /*
  207|       |         * Disallow customization after the first allocation. We only set this
  208|       |         * if necessary to avoid a store to the same cache line on every
  209|       |         * allocation.
  210|       |         */
  211|      1|        allow_customize = 0;
  212|      1|    }
  213|       |
  214|   141M|    ptr = malloc(num);
  215|   141M|    if (ossl_likely(ptr != NULL))
  ------------------
  |  |   22|   141M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 141M, False: 0]
  |  |  ------------------
  ------------------
  216|   141M|        return ptr;
  217|      0|err:
  218|      0|    ossl_report_alloc_err(file, line);
  219|       |    return NULL;
  220|   141M|}
CRYPTO_zalloc:
  223|   102M|{
  224|   102M|    void *ret;
  225|       |
  226|   102M|    ret = CRYPTO_malloc(num, file, line);
  227|   102M|    if (ret != NULL)
  ------------------
  |  Branch (227:9): [True: 102M, False: 0]
  ------------------
  228|   102M|        memset(ret, 0, num);
  229|       |
  230|   102M|    return ret;
  231|   102M|}
CRYPTO_aligned_alloc:
  235|  22.5k|{
  236|  22.5k|    *freeptr = NULL;
  237|       |
  238|       |    /* Ensure that alignment is a power of two no larger than 65536 */
  239|  22.5k|    if (alignment == 0 || (alignment & (alignment - 1)) != 0
  ------------------
  |  Branch (239:9): [True: 0, False: 22.5k]
  |  Branch (239:27): [True: 0, False: 22.5k]
  ------------------
  240|  22.5k|        || alignment > 65536) {
  ------------------
  |  Branch (240:12): [True: 0, False: 22.5k]
  ------------------
  241|      0|        ossl_report_alloc_err_inv(file, line);
  242|      0|        return NULL;
  243|      0|    }
  244|       |
  245|       |    /* Allow non-malloc() allocations as long as no malloc_impl is provided. */
  246|  22.5k|    if (malloc_impl == CRYPTO_malloc) {
  ------------------
  |  Branch (246:9): [True: 22.5k, False: 0]
  ------------------
  247|  22.5k|#if defined(_BSD_SOURCE) || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L)
  248|  22.5k|        void *ret;
  249|       |
  250|       |        /* posix_memalign() requires alignment to be at least sizeof(void *) */
  251|  22.5k|        if (alignment < sizeof(void *))
  ------------------
  |  Branch (251:13): [True: 0, False: 22.5k]
  ------------------
  252|      0|            alignment = sizeof(void *);
  253|       |
  254|  22.5k|        if (posix_memalign(&ret, alignment, num) == 0) {
  ------------------
  |  Branch (254:13): [True: 22.5k, False: 0]
  ------------------
  255|  22.5k|            *freeptr = ret;
  256|  22.5k|            return ret;
  257|  22.5k|        }
  258|  22.5k|#endif
  259|  22.5k|    }
  260|       |
  261|      0|    return ossl_malloc_align(num, alignment, freeptr, file, line);
  262|  22.5k|}
CRYPTO_realloc:
  265|  10.7M|{
  266|  10.7M|    void *ret;
  267|       |
  268|  10.7M|    INCREMENT(realloc_count);
  269|  10.7M|    if (realloc_impl != CRYPTO_realloc) {
  ------------------
  |  Branch (269:9): [True: 0, False: 10.7M]
  ------------------
  270|      0|        ret = realloc_impl(str, num, file, line);
  271|       |
  272|      0|        if (num == 0 || ret != NULL)
  ------------------
  |  Branch (272:13): [True: 0, False: 0]
  |  Branch (272:25): [True: 0, False: 0]
  ------------------
  273|      0|            return ret;
  274|       |
  275|      0|        goto err;
  276|      0|    }
  277|       |
  278|  10.7M|    if (str == NULL)
  ------------------
  |  Branch (278:9): [True: 9.88M, False: 858k]
  ------------------
  279|  9.88M|        return CRYPTO_malloc(num, file, line);
  280|       |
  281|   858k|    if (num == 0) {
  ------------------
  |  Branch (281:9): [True: 0, False: 858k]
  ------------------
  282|      0|        CRYPTO_free(str, file, line);
  283|      0|        return NULL;
  284|      0|    }
  285|       |
  286|   858k|    FAILTEST();
  287|   858k|    ret = realloc(str, num);
  288|       |
  289|   858k|err:
  290|   858k|    if (num != 0 && ret == NULL)
  ------------------
  |  Branch (290:9): [True: 858k, False: 0]
  |  Branch (290:21): [True: 0, False: 858k]
  ------------------
  291|      0|        ossl_report_alloc_err(file, line);
  292|       |
  293|   858k|    return ret;
  294|   858k|}
CRYPTO_clear_realloc:
  298|  5.95M|{
  299|  5.95M|    void *ret = NULL;
  300|       |
  301|  5.95M|    if (str == NULL)
  ------------------
  |  Branch (301:9): [True: 1.51M, False: 4.44M]
  ------------------
  302|  1.51M|        return CRYPTO_malloc(num, file, line);
  303|       |
  304|  4.44M|    if (num == 0) {
  ------------------
  |  Branch (304:9): [True: 0, False: 4.44M]
  ------------------
  305|      0|        CRYPTO_clear_free(str, old_len, file, line);
  306|      0|        return NULL;
  307|      0|    }
  308|       |
  309|       |    /* Can't shrink the buffer since memcpy below copies |old_len| bytes. */
  310|  4.44M|    if (num < old_len) {
  ------------------
  |  Branch (310:9): [True: 0, False: 4.44M]
  ------------------
  311|      0|        OPENSSL_cleanse((char *)str + num, old_len - num);
  312|      0|        return str;
  313|      0|    }
  314|       |
  315|  4.44M|    ret = CRYPTO_malloc(num, file, line);
  316|  4.44M|    if (ret != NULL) {
  ------------------
  |  Branch (316:9): [True: 4.44M, False: 0]
  ------------------
  317|  4.44M|        memcpy(ret, str, old_len);
  318|  4.44M|        CRYPTO_clear_free(str, old_len, file, line);
  319|  4.44M|    }
  320|  4.44M|    return ret;
  321|  4.44M|}
CRYPTO_free:
  324|   184M|{
  325|   184M|    INCREMENT(free_count);
  326|   184M|    if (free_impl != CRYPTO_free) {
  ------------------
  |  Branch (326:9): [True: 0, False: 184M]
  ------------------
  327|      0|        free_impl(str, file, line);
  328|      0|        return;
  329|      0|    }
  330|       |
  331|   184M|    free(str);
  332|   184M|}
CRYPTO_clear_free:
  335|  14.8M|{
  336|  14.8M|    if (str == NULL)
  ------------------
  |  Branch (336:9): [True: 1.03M, False: 13.7M]
  ------------------
  337|  1.03M|        return;
  338|  13.7M|    if (num)
  ------------------
  |  Branch (338:9): [True: 13.7M, False: 0]
  ------------------
  339|  13.7M|        OPENSSL_cleanse(str, num);
  340|  13.7M|    CRYPTO_free(str, file, line);
  341|  13.7M|}

CRYPTO_secure_malloc:
  154|  4.48k|{
  155|  4.48k|#ifndef OPENSSL_NO_SECURE_MEMORY
  156|  4.48k|    void *ret = NULL;
  157|  4.48k|    size_t actual_size;
  158|  4.48k|    int reason = CRYPTO_R_SECURE_MALLOC_FAILURE;
  ------------------
  |  |   45|  4.48k|#define CRYPTO_R_SECURE_MALLOC_FAILURE 111
  ------------------
  159|       |
  160|  4.48k|    if (!secure_mem_initialized) {
  ------------------
  |  Branch (160:9): [True: 4.48k, False: 0]
  ------------------
  161|  4.48k|        return CRYPTO_malloc(num, file, line);
  162|  4.48k|    }
  163|      0|    if (!CRYPTO_THREAD_write_lock(sec_malloc_lock)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 0]
  ------------------
  164|      0|        reason = ERR_R_CRYPTO_LIB;
  ------------------
  |  |  281|      0|#define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  |  |  ------------------
  |  |               #define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|      0|        goto err;
  166|      0|    }
  167|      0|    ret = sh_malloc(num);
  168|      0|    actual_size = ret ? sh_actual_size(ret) : 0;
  ------------------
  |  Branch (168:19): [True: 0, False: 0]
  ------------------
  169|      0|    secure_mem_used += actual_size;
  170|      0|    CRYPTO_THREAD_unlock(sec_malloc_lock);
  171|      0|err:
  172|      0|    if (ret == NULL && (file != NULL || line != 0)) {
  ------------------
  |  Branch (172:9): [True: 0, False: 0]
  |  Branch (172:25): [True: 0, False: 0]
  |  Branch (172:41): [True: 0, False: 0]
  ------------------
  173|      0|        ERR_new();
  174|      0|        ERR_set_debug(file, line, NULL);
  175|      0|        ERR_set_error(ERR_LIB_CRYPTO, reason, NULL);
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
  176|      0|    }
  177|      0|    return ret;
  178|       |#else
  179|       |    return CRYPTO_malloc(num, file, line);
  180|       |#endif /* OPENSSL_NO_SECURE_MEMORY */
  181|      0|}
CRYPTO_secure_zalloc:
  184|  21.5k|{
  185|  21.5k|#ifndef OPENSSL_NO_SECURE_MEMORY
  186|  21.5k|    if (secure_mem_initialized)
  ------------------
  |  Branch (186:9): [True: 0, False: 21.5k]
  ------------------
  187|       |        /* CRYPTO_secure_malloc() zeroes allocations when it is implemented */
  188|      0|        return CRYPTO_secure_malloc(num, file, line);
  189|  21.5k|#endif
  190|  21.5k|    return CRYPTO_zalloc(num, file, line);
  191|  21.5k|}
CRYPTO_secure_clear_free:
  218|  35.5k|{
  219|  35.5k|#ifndef OPENSSL_NO_SECURE_MEMORY
  220|  35.5k|    size_t actual_size;
  221|       |
  222|  35.5k|    if (ptr == NULL)
  ------------------
  |  Branch (222:9): [True: 9.52k, False: 25.9k]
  ------------------
  223|  9.52k|        return;
  224|  25.9k|    if (!CRYPTO_secure_allocated(ptr)) {
  ------------------
  |  Branch (224:9): [True: 25.9k, False: 0]
  ------------------
  225|  25.9k|        OPENSSL_cleanse(ptr, num);
  226|  25.9k|        CRYPTO_free(ptr, file, line);
  227|  25.9k|        return;
  228|  25.9k|    }
  229|      0|    if (!CRYPTO_THREAD_write_lock(sec_malloc_lock))
  ------------------
  |  Branch (229:9): [True: 0, False: 0]
  ------------------
  230|      0|        return;
  231|      0|    actual_size = sh_actual_size(ptr);
  232|      0|    CLEAR(ptr, actual_size);
  ------------------
  |  |   81|      0|#define CLEAR(p, s) OPENSSL_cleanse(p, s)
  ------------------
  233|      0|    secure_mem_used -= actual_size;
  234|      0|    sh_free(ptr);
  235|      0|    CRYPTO_THREAD_unlock(sec_malloc_lock);
  236|       |#else
  237|       |    if (ptr == NULL)
  238|       |        return;
  239|       |    OPENSSL_cleanse(ptr, num);
  240|       |    CRYPTO_free(ptr, file, line);
  241|       |#endif /* OPENSSL_NO_SECURE_MEMORY */
  242|      0|}
CRYPTO_secure_allocated:
  245|  30.6k|{
  246|  30.6k|#ifndef OPENSSL_NO_SECURE_MEMORY
  247|  30.6k|    if (!secure_mem_initialized)
  ------------------
  |  Branch (247:9): [True: 30.6k, False: 0]
  ------------------
  248|  30.6k|        return 0;
  249|       |    /*
  250|       |     * Only read accesses to the arena take place in sh_allocated() and this
  251|       |     * is only changed by the sh_init() and sh_done() calls which are not
  252|       |     * locked.  Hence, it is safe to make this check without a lock too.
  253|       |     */
  254|      0|    return sh_allocated(ptr);
  255|       |#else
  256|       |    return 0;
  257|       |#endif /* OPENSSL_NO_SECURE_MEMORY */
  258|  30.6k|}

ossl_ml_kem_key_reset:
 1584|  2.09k|{
 1585|       |    /*
 1586|       |     * seedbuf can be allocated and contain |z| and |d| if the key is
 1587|       |     * being created from a private key encoding.  Similarly a pending
 1588|       |     * serialised (encoded) private key may be queued up to load.
 1589|       |     * Clear and free that data now.
 1590|       |     */
 1591|  2.09k|    if (key->seedbuf != NULL)
  ------------------
  |  Branch (1591:9): [True: 0, False: 2.09k]
  ------------------
 1592|      0|        OPENSSL_secure_clear_free(key->seedbuf, ML_KEM_SEED_BYTES);
  ------------------
  |  |  150|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1593|  2.09k|    if (ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  2.09k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
 1594|      0|        OPENSSL_secure_clear_free(key->encoded_dk, key->vinfo->prvkey_bytes);
  ------------------
  |  |  150|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1595|       |
 1596|       |    /*-
 1597|       |     * Cleanse any sensitive data:
 1598|       |     * - The private vector |s| is immediately followed by the FO failure
 1599|       |     *   secret |z|, and seed |d|, we can cleanse all three in one call.
 1600|       |     */
 1601|  2.09k|    if (key->t != NULL) {
  ------------------
  |  Branch (1601:9): [True: 2.09k, False: 0]
  ------------------
 1602|  2.09k|        if (ossl_ml_kem_have_prvkey(key))
  ------------------
  |  |  208|  2.09k|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  |  |  ------------------
  |  |  |  Branch (208:38): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
 1603|  2.09k|            OPENSSL_secure_clear_free(key->s, key->vinfo->prvalloc);
  ------------------
  |  |  150|  2.09k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1604|  2.09k|        OPENSSL_free(key->t);
  ------------------
  |  |  132|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1605|  2.09k|    }
 1606|       |    key->d = key->z = key->seedbuf = key->encoded_dk = (uint8_t *)(key->s = key->m = key->t = NULL);
 1607|  2.09k|}
ossl_ml_kem_get_vinfo:
 1618|  4.19k|{
 1619|  4.19k|    switch (evp_type) {
  ------------------
  |  Branch (1619:13): [True: 4.19k, False: 0]
  ------------------
 1620|      0|    case EVP_PKEY_ML_KEM_512:
  ------------------
  |  |   93|      0|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  ------------------
  |  |  |  | 6640|      0|#define NID_ML_KEM_512          1454
  |  |  ------------------
  ------------------
  |  Branch (1620:5): [True: 0, False: 4.19k]
  ------------------
 1621|      0|        return &vinfo_map[ML_KEM_512_VINFO];
  ------------------
  |  |  177|      0|#define ML_KEM_512_VINFO 0
  ------------------
 1622|  4.19k|    case EVP_PKEY_ML_KEM_768:
  ------------------
  |  |  103|  4.19k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6645|  4.19k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  |  Branch (1622:5): [True: 4.19k, False: 0]
  ------------------
 1623|  4.19k|        return &vinfo_map[ML_KEM_768_VINFO];
  ------------------
  |  |  178|  4.19k|#define ML_KEM_768_VINFO 1
  ------------------
 1624|      0|    case EVP_PKEY_ML_KEM_1024:
  ------------------
  |  |  113|      0|#define EVP_PKEY_ML_KEM_1024 NID_ML_KEM_1024
  |  |  ------------------
  |  |  |  | 6650|      0|#define NID_ML_KEM_1024         1456
  |  |  ------------------
  ------------------
  |  Branch (1624:5): [True: 0, False: 4.19k]
  ------------------
 1625|      0|        return &vinfo_map[ML_KEM_1024_VINFO];
  ------------------
  |  |  179|      0|#define ML_KEM_1024_VINFO 2
  ------------------
 1626|  4.19k|    }
 1627|      0|    return NULL;
 1628|  4.19k|}
ossl_ml_kem_key_new:
 1632|  2.09k|{
 1633|  2.09k|    const ML_KEM_VINFO *vinfo = ossl_ml_kem_get_vinfo(evp_type);
 1634|  2.09k|    ML_KEM_KEY *key;
 1635|       |
 1636|  2.09k|    if (vinfo == NULL) {
  ------------------
  |  Branch (1636:9): [True: 0, False: 2.09k]
  ------------------
 1637|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1638|      0|            "unsupported ML-KEM key type: %d", evp_type);
 1639|      0|        return NULL;
 1640|      0|    }
 1641|       |
 1642|  2.09k|    if ((key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  107|  2.09k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1642:9): [True: 0, False: 2.09k]
  ------------------
 1643|      0|        return NULL;
 1644|       |
 1645|  2.09k|    key->vinfo = vinfo;
 1646|  2.09k|    key->libctx = libctx;
 1647|  2.09k|    key->prov_flags = ML_KEM_KEY_PROV_FLAGS_DEFAULT;
  ------------------
  |  |  132|  2.09k|    (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  123|  2.09k|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  125|  2.09k|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  126|  2.09k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  |  |  ------------------
  ------------------
 1648|  2.09k|    key->shake128_md = EVP_MD_fetch(libctx, "SHAKE128", properties);
 1649|  2.09k|    key->shake256_md = EVP_MD_fetch(libctx, "SHAKE256", properties);
 1650|  2.09k|    key->sha3_256_md = EVP_MD_fetch(libctx, "SHA3-256", properties);
 1651|  2.09k|    key->sha3_512_md = EVP_MD_fetch(libctx, "SHA3-512", properties);
 1652|  2.09k|    key->d = key->z = key->rho = key->pkhash = key->encoded_dk = key->seedbuf = NULL;
 1653|  2.09k|    key->s = key->m = key->t = NULL;
 1654|       |
 1655|  2.09k|    if (key->shake128_md != NULL
  ------------------
  |  Branch (1655:9): [True: 2.09k, False: 0]
  ------------------
 1656|  2.09k|        && key->shake256_md != NULL
  ------------------
  |  Branch (1656:12): [True: 2.09k, False: 0]
  ------------------
 1657|  2.09k|        && key->sha3_256_md != NULL
  ------------------
  |  Branch (1657:12): [True: 2.09k, False: 0]
  ------------------
 1658|  2.09k|        && key->sha3_512_md != NULL)
  ------------------
  |  Branch (1658:12): [True: 2.09k, False: 0]
  ------------------
 1659|  2.09k|        return key;
 1660|       |
 1661|      0|    ossl_ml_kem_key_free(key);
 1662|      0|    ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                  ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                  ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1663|      0|        "missing SHA3 digest algorithms while creating %s key",
 1664|      0|        vinfo->algorithm_name);
 1665|       |    return NULL;
 1666|  2.09k|}
ossl_ml_kem_key_free:
 1734|  2.09k|{
 1735|  2.09k|    if (key == NULL)
  ------------------
  |  Branch (1735:9): [True: 0, False: 2.09k]
  ------------------
 1736|      0|        return;
 1737|       |
 1738|  2.09k|    EVP_MD_free(key->shake128_md);
 1739|  2.09k|    EVP_MD_free(key->shake256_md);
 1740|  2.09k|    EVP_MD_free(key->sha3_256_md);
 1741|  2.09k|    EVP_MD_free(key->sha3_512_md);
 1742|       |
 1743|  2.09k|    ossl_ml_kem_key_reset(key);
 1744|  2.09k|    OPENSSL_free(key);
  ------------------
  |  |  132|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1745|  2.09k|}
ossl_ml_kem_encode_public_key:
 1750|  2.09k|{
 1751|  2.09k|    if (!ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  4.19k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (1751:9): [True: 0, False: 2.09k]
  ------------------
 1752|  2.09k|        || len != key->vinfo->pubkey_bytes)
  ------------------
  |  Branch (1752:12): [True: 0, False: 2.09k]
  ------------------
 1753|      0|        return 0;
 1754|  2.09k|    encode_pubkey(out, key);
 1755|  2.09k|    return 1;
 1756|  2.09k|}
ossl_ml_kem_genkey:
 1872|  2.09k|{
 1873|  2.09k|    uint8_t seed[ML_KEM_SEED_BYTES];
 1874|  2.09k|    EVP_MD_CTX *mdctx = NULL;
 1875|  2.09k|    const ML_KEM_VINFO *vinfo;
 1876|  2.09k|    int ret = 0;
 1877|       |
 1878|  2.09k|    if (key == NULL
  ------------------
  |  Branch (1878:9): [True: 0, False: 2.09k]
  ------------------
 1879|  2.09k|        || ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  4.19k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
 1880|  2.09k|        || ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  2.09k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
 1881|      0|        return 0;
 1882|  2.09k|    vinfo = key->vinfo;
 1883|       |
 1884|  2.09k|    if (pubenc != NULL && publen != vinfo->pubkey_bytes)
  ------------------
  |  Branch (1884:9): [True: 0, False: 2.09k]
  |  Branch (1884:27): [True: 0, False: 0]
  ------------------
 1885|      0|        return 0;
 1886|       |
 1887|  2.09k|    if (key->seedbuf != NULL) {
  ------------------
  |  Branch (1887:9): [True: 0, False: 2.09k]
  ------------------
 1888|      0|        if (!ossl_ml_kem_encode_seed(seed, sizeof(seed), key))
  ------------------
  |  Branch (1888:13): [True: 0, False: 0]
  ------------------
 1889|      0|            return 0;
 1890|      0|        ossl_ml_kem_key_reset(key);
 1891|  2.09k|    } else if (RAND_priv_bytes_ex(key->libctx, seed, sizeof(seed),
  ------------------
  |  Branch (1891:16): [True: 0, False: 2.09k]
  ------------------
 1892|  2.09k|                   key->vinfo->secbits)
 1893|  2.09k|        <= 0) {
 1894|      0|        return 0;
 1895|      0|    }
 1896|       |
 1897|  2.09k|    if ((mdctx = EVP_MD_CTX_new()) == NULL)
  ------------------
  |  Branch (1897:9): [True: 0, False: 2.09k]
  ------------------
 1898|      0|        return 0;
 1899|       |
 1900|       |    /*
 1901|       |     * Data derived from (d, z) defaults secret, and to avoid side-channel
 1902|       |     * leaks should not influence control flow.
 1903|       |     */
 1904|  2.09k|    CONSTTIME_SECRET(seed, ML_KEM_SEED_BYTES);
 1905|       |
 1906|  2.09k|    if (add_storage(OPENSSL_malloc(vinfo->puballoc),
  ------------------
  |  |  107|  2.09k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1906:9): [True: 2.09k, False: 0]
  ------------------
 1907|  2.09k|            OPENSSL_secure_malloc(vinfo->prvalloc), 1, key))
  ------------------
  |  |  140|  2.09k|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1908|  2.09k|        ret = genkey(seed, mdctx, pubenc, key);
 1909|  2.09k|    OPENSSL_cleanse(seed, sizeof(seed));
 1910|       |
 1911|       |    /* Declassify secret inputs and derived outputs before returning control */
 1912|  2.09k|    CONSTTIME_DECLASSIFY(seed, ML_KEM_SEED_BYTES);
 1913|       |
 1914|  2.09k|    EVP_MD_CTX_free(mdctx);
 1915|  2.09k|    if (!ret) {
  ------------------
  |  Branch (1915:9): [True: 0, False: 2.09k]
  ------------------
 1916|      0|        ossl_ml_kem_key_reset(key);
 1917|      0|        return 0;
 1918|      0|    }
 1919|       |
 1920|       |    /* The public components are already declassified */
 1921|  2.09k|    CONSTTIME_DECLASSIFY(key->s, vinfo->rank * sizeof(scalar));
 1922|  2.09k|    CONSTTIME_DECLASSIFY(key->z, 2 * ML_KEM_RANDOM_BYTES);
 1923|  2.09k|    return 1;
 1924|  2.09k|}
ml_kem.c:add_storage:
 1543|  2.09k|{
 1544|  2.09k|    int rank = key->vinfo->rank;
 1545|       |
 1546|  2.09k|    if (pub == NULL || (private && priv == NULL)) {
  ------------------
  |  Branch (1546:9): [True: 0, False: 2.09k]
  |  Branch (1546:25): [True: 2.09k, False: 0]
  |  Branch (1546:36): [True: 0, False: 2.09k]
  ------------------
 1547|       |        /*
 1548|       |         * One of these could be allocated correctly. It is legal to call free with a NULL
 1549|       |         * pointer, so always attempt to free both allocations here
 1550|       |         */
 1551|      0|        OPENSSL_free(pub);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1552|      0|        OPENSSL_secure_free(priv);
  ------------------
  |  |  148|      0|    CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1553|      0|        return 0;
 1554|      0|    }
 1555|       |
 1556|       |    /*
 1557|       |     * We're adding key material, set up rho and pkhash to point to the rho_pkhash buffer
 1558|       |     */
 1559|  2.09k|    memset(key->rho_pkhash, 0, sizeof(key->rho_pkhash));
 1560|  2.09k|    key->rho = key->rho_pkhash;
 1561|  2.09k|    key->pkhash = key->rho_pkhash + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1562|  2.09k|    key->d = key->z = NULL;
 1563|       |
 1564|       |    /* A public key needs space for |t| and |m| */
 1565|  2.09k|    key->m = (key->t = pub) + rank;
 1566|       |
 1567|       |    /*
 1568|       |     * A private key also needs space for |s| and |z|.
 1569|       |     * The |z| buffer always includes additional space for |d|, but a key's |d|
 1570|       |     * pointer is left NULL when parsed from the NIST format, which omits that
 1571|       |     * information.  Only keys generated from a (d, z) seed pair will have a
 1572|       |     * non-NULL |d| pointer.
 1573|       |     */
 1574|  2.09k|    if (private)
  ------------------
  |  Branch (1574:9): [True: 2.09k, False: 0]
  ------------------
 1575|  2.09k|        key->z = (uint8_t *)(rank + (key->s = priv));
 1576|  2.09k|    return 1;
 1577|  2.09k|}
ml_kem.c:encode_pubkey:
 1232|  2.09k|{
 1233|  2.09k|    const uint8_t *rho = key->rho;
 1234|  2.09k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1235|       |
 1236|  2.09k|    vector_encode(out, key->t, 12, vinfo->rank);
 1237|  2.09k|    memcpy(out + vinfo->vector_bytes, rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1238|  2.09k|}
ml_kem.c:vector_encode:
  885|  2.09k|{
  886|  2.09k|    int stride = bits * DEGREE / 8;
  ------------------
  |  |   41|  2.09k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  2.09k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  887|       |
  888|  8.38k|    for (; rank-- > 0; out += stride)
  ------------------
  |  Branch (888:12): [True: 6.28k, False: 2.09k]
  ------------------
  889|  6.28k|        scalar_encode(out, a++, bits);
  890|  2.09k|}
ml_kem.c:scalar_encode:
  637|  12.5k|{
  638|  12.5k|    const uint16_t *curr = s->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  12.5k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  12.5k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  639|  12.5k|    uint64_t accum = 0, element;
  640|  12.5k|    int used = 0;
  641|       |
  642|  3.21M|    do {
  643|  3.21M|        element = *curr++;
  644|  3.21M|        if (used + bits < 64) {
  ------------------
  |  Branch (644:13): [True: 2.61M, False: 603k]
  ------------------
  645|  2.61M|            accum |= element << used;
  646|  2.61M|            used += bits;
  647|  2.61M|        } else if (used + bits > 64) {
  ------------------
  |  Branch (647:20): [True: 402k, False: 201k]
  ------------------
  648|   402k|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  649|   402k|            accum = element >> (64 - used);
  650|   402k|            used = (used + bits) - 64;
  651|   402k|        } else {
  652|   201k|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  653|   201k|            accum = 0;
  654|   201k|            used = 0;
  655|   201k|        }
  656|  3.21M|    } while (curr < end);
  ------------------
  |  Branch (656:14): [True: 3.20M, False: 12.5k]
  ------------------
  657|  12.5k|}
ml_kem.c:single_keccak:
  336|  14.6k|{
  337|  14.6k|    unsigned int sz = (unsigned int)outlen;
  338|       |
  339|  14.6k|    if (!EVP_DigestUpdate(mdctx, in, inlen))
  ------------------
  |  Branch (339:9): [True: 0, False: 14.6k]
  ------------------
  340|      0|        return 0;
  341|  14.6k|    if (EVP_MD_xof(EVP_MD_CTX_get0_md(mdctx)))
  ------------------
  |  Branch (341:9): [True: 12.5k, False: 2.09k]
  ------------------
  342|  12.5k|        return EVP_DigestFinalXOF(mdctx, out, outlen);
  343|  2.09k|    return EVP_DigestFinal_ex(mdctx, out, &sz)
  ------------------
  |  Branch (343:12): [True: 2.09k, False: 0]
  ------------------
  344|  2.09k|        && ossl_assert((size_t)sz == outlen);
  ------------------
  |  |   52|  2.09k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 2.09k, False: 0]
  |  |  ------------------
  |  |   53|  2.09k|    __FILE__, __LINE__)
  ------------------
  345|  14.6k|}
ml_kem.c:matrix_expand:
  981|  2.09k|{
  982|  2.09k|    scalar *out = key->m;
  983|  2.09k|    uint8_t input[ML_KEM_RANDOM_BYTES + 2];
  984|  2.09k|    int rank = key->vinfo->rank;
  985|  2.09k|    int i, j;
  986|       |
  987|  2.09k|    memcpy(input, key->rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  988|  8.38k|    for (i = 0; i < rank; i++) {
  ------------------
  |  Branch (988:17): [True: 6.28k, False: 2.09k]
  ------------------
  989|  25.1k|        for (j = 0; j < rank; j++) {
  ------------------
  |  Branch (989:21): [True: 18.8k, False: 6.28k]
  ------------------
  990|  18.8k|            input[ML_KEM_RANDOM_BYTES] = i;
  ------------------
  |  |   47|  18.8k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  991|  18.8k|            input[ML_KEM_RANDOM_BYTES + 1] = j;
  ------------------
  |  |   47|  18.8k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  992|  18.8k|            if (!EVP_DigestInit_ex(mdctx, key->shake128_md, NULL)
  ------------------
  |  Branch (992:17): [True: 0, False: 18.8k]
  ------------------
  993|  18.8k|                || !EVP_DigestUpdate(mdctx, input, sizeof(input))
  ------------------
  |  Branch (993:20): [True: 0, False: 18.8k]
  ------------------
  994|  18.8k|                || !sample_scalar(out++, mdctx))
  ------------------
  |  Branch (994:20): [True: 0, False: 18.8k]
  ------------------
  995|      0|                return 0;
  996|  18.8k|        }
  997|  6.28k|    }
  998|  2.09k|    return 1;
  999|  2.09k|}
ml_kem.c:sample_scalar:
  431|  18.8k|{
  432|  18.8k|    uint16_t *curr = out->c, *endout = curr + DEGREE;
  ------------------
  |  |   41|  18.8k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  18.8k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  433|  18.8k|    uint8_t buf[SCALAR_SAMPLING_BUFSIZE], *in;
  434|  18.8k|    uint8_t *endin = buf + sizeof(buf);
  435|  18.8k|    uint16_t d;
  436|  18.8k|    uint8_t b1, b2, b3;
  437|       |
  438|  56.7k|    do {
  439|  56.7k|        if (!EVP_DigestSqueeze(mdctx, in = buf, sizeof(buf)))
  ------------------
  |  Branch (439:13): [True: 0, False: 56.7k]
  ------------------
  440|      0|            return 0;
  441|  2.98M|        do {
  442|  2.98M|            b1 = *in++;
  443|  2.98M|            b2 = *in++;
  444|  2.98M|            b3 = *in++;
  445|       |
  446|  2.98M|            if (curr >= endout)
  ------------------
  |  Branch (446:17): [True: 9.24k, False: 2.97M]
  ------------------
  447|  9.24k|                break;
  448|  2.97M|            if ((d = ((b2 & 0x0f) << 8) + b1) < kPrime)
  ------------------
  |  Branch (448:17): [True: 2.41M, False: 556k]
  ------------------
  449|  2.41M|                *curr++ = d;
  450|  2.97M|            if (curr >= endout)
  ------------------
  |  Branch (450:17): [True: 9.56k, False: 2.96M]
  ------------------
  451|  9.56k|                break;
  452|  2.96M|            if ((d = (b3 << 4) + (b2 >> 4)) < kPrime)
  ------------------
  |  Branch (452:17): [True: 2.41M, False: 555k]
  ------------------
  453|  2.41M|                *curr++ = d;
  454|  2.96M|        } while (in < endin);
  ------------------
  |  Branch (454:18): [True: 2.92M, False: 37.9k]
  ------------------
  455|  56.7k|    } while (curr < endout);
  ------------------
  |  Branch (455:14): [True: 37.9k, False: 18.8k]
  ------------------
  456|  18.8k|    return 1;
  457|  18.8k|}
ml_kem.c:genkey:
 1357|  2.09k|{
 1358|  2.09k|    uint8_t hashed[2 * ML_KEM_RANDOM_BYTES];
 1359|  2.09k|    const uint8_t *const sigma = hashed + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1360|  2.09k|    uint8_t augmented_seed[ML_KEM_RANDOM_BYTES + 1];
 1361|  2.09k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1362|  2.09k|    CBD_FUNC cbd_1 = CBD1(vinfo->evp_type);
  ------------------
  |  | 1134|  2.09k|#define CBD1(evp_type) ((evp_type) == EVP_PKEY_ML_KEM_512 ? cbd_3 : cbd_2)
  |  |  ------------------
  |  |  |  |   93|  2.09k|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  |  |  ------------------
  |  |  |  |  |  | 6640|  2.09k|#define NID_ML_KEM_512          1454
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (1134:25): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
 1363|  2.09k|    int rank = vinfo->rank;
 1364|  2.09k|    uint8_t counter = 0;
 1365|  2.09k|    int ret = 0;
 1366|       |
 1367|       |    /*
 1368|       |     * Use the "d" seed salted with the rank to derive the public and private
 1369|       |     * seeds rho and sigma.
 1370|       |     */
 1371|  2.09k|    memcpy(augmented_seed, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1372|  2.09k|    augmented_seed[ML_KEM_RANDOM_BYTES] = (uint8_t)rank;
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1373|  2.09k|    if (!hash_g(hashed, augmented_seed, sizeof(augmented_seed), mdctx, key))
  ------------------
  |  Branch (1373:9): [True: 0, False: 2.09k]
  ------------------
 1374|      0|        goto end;
 1375|  2.09k|    memcpy(key->rho, hashed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1376|       |    /* The |rho| matrix seed is public */
 1377|  2.09k|    CONSTTIME_DECLASSIFY(key->rho, ML_KEM_RANDOM_BYTES);
 1378|       |
 1379|       |    /* FIPS 203 |e| vector is initial value of key->t */
 1380|  2.09k|    if (!matrix_expand(mdctx, key)
  ------------------
  |  Branch (1380:9): [True: 0, False: 2.09k]
  ------------------
 1381|  2.09k|        || !gencbd_vector_ntt(key->s, cbd_1, &counter, sigma, rank, mdctx, key)
  ------------------
  |  Branch (1381:12): [True: 0, False: 2.09k]
  ------------------
 1382|  2.09k|        || !gencbd_vector_ntt(key->t, cbd_1, &counter, sigma, rank, mdctx, key))
  ------------------
  |  Branch (1382:12): [True: 0, False: 2.09k]
  ------------------
 1383|      0|        goto end;
 1384|       |
 1385|       |    /* To |e| we now add the product of transpose |m| and |s|, giving |t|. */
 1386|  2.09k|    matrix_mult_transpose_add(key->t, key->m, key->s, rank);
 1387|       |    /* The |t| vector is public */
 1388|  2.09k|    CONSTTIME_DECLASSIFY(key->t, vinfo->rank * sizeof(scalar));
 1389|       |
 1390|  2.09k|    if (pubenc == NULL) {
  ------------------
  |  Branch (1390:9): [True: 2.09k, False: 0]
  ------------------
 1391|       |        /* Incremental digest of public key without in-full serialisation. */
 1392|  2.09k|        if (!hash_h_pubkey(key->pkhash, mdctx, key))
  ------------------
  |  Branch (1392:13): [True: 0, False: 2.09k]
  ------------------
 1393|      0|            goto end;
 1394|  2.09k|    } else {
 1395|      0|        encode_pubkey(pubenc, key);
 1396|      0|        if (!hash_h(key->pkhash, pubenc, vinfo->pubkey_bytes, mdctx, key))
  ------------------
  |  Branch (1396:13): [True: 0, False: 0]
  ------------------
 1397|      0|            goto end;
 1398|      0|    }
 1399|       |
 1400|       |    /* Save |z| portion of seed for "implicit rejection" on failure. */
 1401|  2.09k|    memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
                  memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1402|       |
 1403|       |    /* Save the |d| portion of the seed */
 1404|  2.09k|    key->d = key->z + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1405|  2.09k|    memcpy(key->d, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1406|       |
 1407|  2.09k|    ret = 1;
 1408|  2.09k|end:
 1409|  2.09k|    OPENSSL_cleanse((void *)augmented_seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1410|  2.09k|    OPENSSL_cleanse((void *)sigma, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1411|  2.09k|    if (ret == 0) {
  ------------------
  |  Branch (1411:9): [True: 0, False: 2.09k]
  ------------------
 1412|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1413|      0|            "internal error while generating %s private key",
 1414|      0|            vinfo->algorithm_name);
 1415|      0|    }
 1416|  2.09k|    return ret;
 1417|  2.09k|}
ml_kem.c:prf:
  353|  12.5k|{
  354|  12.5k|    return EVP_DigestInit_ex(mdctx, key->shake256_md, NULL)
  ------------------
  |  Branch (354:12): [True: 12.5k, False: 0]
  ------------------
  355|  12.5k|        && single_keccak(out, len, in, ML_KEM_RANDOM_BYTES + 1, mdctx);
  ------------------
  |  |   47|  12.5k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (355:12): [True: 12.5k, False: 0]
  ------------------
  356|  12.5k|}
ml_kem.c:cbd_2:
 1011|  12.5k|{
 1012|  12.5k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  12.5k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  12.5k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
 1013|  12.5k|    uint8_t randbuf[4 * DEGREE / 8], *r = randbuf; /* 64 * eta slots */
 1014|  12.5k|    uint16_t value, mask;
 1015|  12.5k|    uint8_t b;
 1016|       |
 1017|  12.5k|    if (!prf(randbuf, sizeof(randbuf), in, mdctx, key))
  ------------------
  |  Branch (1017:9): [True: 0, False: 12.5k]
  ------------------
 1018|      0|        return 0;
 1019|       |
 1020|  1.60M|    do {
 1021|  1.60M|        b = *r++;
 1022|       |
 1023|       |        /*
 1024|       |         * Add |kPrime| if |value| underflowed.  See |constish_time_non_zero|
 1025|       |         * for a discussion on why the value barrier is by default omitted.
 1026|       |         * While this could have been written reduce_once(value + kPrime), this
 1027|       |         * is one extra addition and small range of |value| tempts some
 1028|       |         * versions of Clang to emit a branch.
 1029|       |         */
 1030|  1.60M|        value = bit0(b) + bitn(1, b);
  ------------------
  |  |   34|  1.60M|#define bit0(b) ((b) & 1)
  ------------------
                      value = bit0(b) + bitn(1, b);
  ------------------
  |  |   35|  1.60M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1031|  1.60M|        value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|  1.60M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|  1.60M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1032|  1.60M|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  1.60M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1033|  1.60M|        *curr++ = value + (kPrime & mask);
 1034|       |
 1035|  1.60M|        value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|  1.60M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|  1.60M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1036|  1.60M|        value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|  1.60M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|  1.60M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1037|  1.60M|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  1.60M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1038|  1.60M|        *curr++ = value + (kPrime & mask);
 1039|  1.60M|    } while (curr < end);
  ------------------
  |  Branch (1039:14): [True: 1.59M, False: 12.5k]
  ------------------
 1040|  12.5k|    return 1;
 1041|  12.5k|}
ml_kem.c:hash_g:
  402|  2.09k|{
  403|  2.09k|    return EVP_DigestInit_ex(mdctx, key->sha3_512_md, NULL)
  ------------------
  |  Branch (403:12): [True: 2.09k, False: 0]
  ------------------
  404|  2.09k|        && single_keccak(out, ML_KEM_SEED_BYTES, in, len, mdctx);
  ------------------
  |  |   48|  2.09k|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (404:12): [True: 2.09k, False: 0]
  ------------------
  405|  2.09k|}
ml_kem.c:gencbd_vector_ntt:
 1120|  4.19k|{
 1121|  4.19k|    uint8_t input[ML_KEM_RANDOM_BYTES + 1];
 1122|       |
 1123|  4.19k|    memcpy(input, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  4.19k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1124|  12.5k|    do {
 1125|  12.5k|        input[ML_KEM_RANDOM_BYTES] = (*counter)++;
  ------------------
  |  |   47|  12.5k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1126|  12.5k|        if (!cbd(out, input, mdctx, key))
  ------------------
  |  Branch (1126:13): [True: 0, False: 12.5k]
  ------------------
 1127|      0|            return 0;
 1128|  12.5k|        scalar_ntt(out++);
 1129|  12.5k|    } while (--rank > 0);
  ------------------
  |  Branch (1129:14): [True: 8.38k, False: 4.19k]
  ------------------
 1130|  4.19k|    return 1;
 1131|  4.19k|}
ml_kem.c:scalar_ntt:
  510|  12.5k|{
  511|  12.5k|    const uint16_t *roots = kNTTRoots;
  512|  12.5k|    uint16_t *end = s->c + DEGREE;
  ------------------
  |  |   41|  12.5k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  12.5k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  513|  12.5k|    int offset = DEGREE / 2;
  ------------------
  |  |   41|  12.5k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  12.5k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  514|       |
  515|  88.0k|    do {
  516|  88.0k|        uint16_t *curr = s->c, *peer;
  517|       |
  518|  1.59M|        do {
  519|  1.59M|            uint16_t *pause = curr + offset, even, odd;
  520|  1.59M|            uint32_t zeta = *++roots;
  521|       |
  522|  1.59M|            peer = pause;
  523|  11.2M|            do {
  524|  11.2M|                even = *curr;
  525|  11.2M|                odd = reduce(*peer * zeta);
  526|  11.2M|                *peer++ = reduce_once(even - odd + kPrime);
  527|  11.2M|                *curr++ = reduce_once(odd + even);
  528|  11.2M|            } while (curr < pause);
  ------------------
  |  Branch (528:22): [True: 9.67M, False: 1.59M]
  ------------------
  529|  1.59M|        } while ((curr = peer) < end);
  ------------------
  |  Branch (529:18): [True: 1.50M, False: 88.0k]
  ------------------
  530|  88.0k|    } while ((offset >>= 1) >= 2);
  ------------------
  |  Branch (530:14): [True: 75.4k, False: 12.5k]
  ------------------
  531|  12.5k|}
ml_kem.c:reduce:
  481|  18.5M|{
  482|  18.5M|    uint64_t product = (uint64_t)x * kBarrettMultiplier;
  483|  18.5M|    uint32_t quotient = (uint32_t)(product >> kBarrettShift);
  484|  18.5M|    uint32_t remainder = x - quotient * kPrime;
  485|       |
  486|  18.5M|    return reduce_once(remainder);
  487|  18.5M|}
ml_kem.c:reduce_once:
  467|  41.0M|{
  468|  41.0M|    const uint16_t subtracted = x - kPrime;
  469|  41.0M|    uint16_t mask = constish_time_non_zero(subtracted >> 15);
  ------------------
  |  |   70|  41.0M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
  470|       |
  471|  41.0M|    return (mask & x) | (~mask & subtracted);
  472|  41.0M|}
ml_kem.c:matrix_mult_transpose_add:
  962|  2.09k|{
  963|  2.09k|    const scalar *mc = m, *mr, *ar;
  964|  2.09k|    int i, j;
  965|       |
  966|  8.38k|    for (i = rank; i-- > 0; ++out) {
  ------------------
  |  Branch (966:20): [True: 6.28k, False: 2.09k]
  ------------------
  967|  6.28k|        scalar_mult_add(out, mr = mc++, ar = a);
  968|  18.8k|        for (j = rank; --j > 0;)
  ------------------
  |  Branch (968:24): [True: 12.5k, False: 6.28k]
  ------------------
  969|  12.5k|            scalar_mult_add(out, (mr += rank), ++ar);
  970|  6.28k|    }
  971|  2.09k|}
ml_kem.c:scalar_mult_add:
  615|  18.8k|{
  616|  18.8k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  18.8k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  18.8k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  617|  18.8k|    const uint16_t *lc = lhs->c, *rc = rhs->c;
  618|  18.8k|    const uint16_t *roots = kModRoots;
  619|       |
  620|  2.41M|    do {
  621|  2.41M|        uint32_t l0 = *lc++, r0 = *rc++;
  622|  2.41M|        uint32_t l1 = *lc++, r1 = *rc++;
  623|  2.41M|        uint16_t *c0 = curr++;
  624|  2.41M|        uint16_t *c1 = curr++;
  625|  2.41M|        uint32_t zetapow = *roots++;
  626|       |
  627|  2.41M|        *c0 = reduce(*c0 + l0 * r0 + reduce(l1 * r1) * zetapow);
  628|  2.41M|        *c1 = reduce(*c1 + l0 * r1 + l1 * r0);
  629|  2.41M|    } while (curr < end);
  ------------------
  |  Branch (629:14): [True: 2.39M, False: 18.8k]
  ------------------
  630|  18.8k|}
ml_kem.c:hash_h_pubkey:
  373|  2.09k|{
  374|  2.09k|    const ML_KEM_VINFO *vinfo = key->vinfo;
  375|  2.09k|    const scalar *t = key->t, *end = t + vinfo->rank;
  376|  2.09k|    unsigned int sz;
  377|       |
  378|  2.09k|    if (!EVP_DigestInit_ex(mdctx, key->sha3_256_md, NULL))
  ------------------
  |  Branch (378:9): [True: 0, False: 2.09k]
  ------------------
  379|      0|        return 0;
  380|       |
  381|  6.28k|    do {
  382|  6.28k|        uint8_t buf[3 * DEGREE / 2];
  383|       |
  384|  6.28k|        scalar_encode(buf, t++, 12);
  385|  6.28k|        if (!EVP_DigestUpdate(mdctx, buf, sizeof(buf)))
  ------------------
  |  Branch (385:13): [True: 0, False: 6.28k]
  ------------------
  386|      0|            return 0;
  387|  6.28k|    } while (t < end);
  ------------------
  |  Branch (387:14): [True: 4.19k, False: 2.09k]
  ------------------
  388|       |
  389|  2.09k|    if (!EVP_DigestUpdate(mdctx, key->rho, ML_KEM_RANDOM_BYTES))
  ------------------
  |  |   47|  2.09k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (389:9): [True: 0, False: 2.09k]
  ------------------
  390|      0|        return 0;
  391|  2.09k|    return EVP_DigestFinal_ex(mdctx, pkhash, &sz)
  ------------------
  |  Branch (391:12): [True: 2.09k, False: 0]
  ------------------
  392|  2.09k|        && ossl_assert(sz == ML_KEM_PKHASH_BYTES);
  ------------------
  |  |   52|  2.09k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 2.09k, False: 0]
  |  |  ------------------
  |  |   53|  2.09k|    __FILE__, __LINE__)
  ------------------
  393|  2.09k|}

CRYPTO_ctr128_encrypt_ctr32:
  155|  32.6k|{
  156|  32.6k|    unsigned int n, ctr32;
  157|       |
  158|  32.6k|    n = *num;
  159|       |
  160|  32.6k|    while (n && len) {
  ------------------
  |  Branch (160:12): [True: 0, False: 32.6k]
  |  Branch (160:17): [True: 0, False: 0]
  ------------------
  161|      0|        *(out++) = *(in++) ^ ecount_buf[n];
  162|      0|        --len;
  163|      0|        n = (n + 1) % 16;
  164|      0|    }
  165|       |
  166|  32.6k|    ctr32 = GETU32(ivec + 12);
  ------------------
  |  |   98|  32.6k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  167|  61.1k|    while (len >= 16) {
  ------------------
  |  Branch (167:12): [True: 28.4k, False: 32.6k]
  ------------------
  168|  28.4k|        size_t blocks = len / 16;
  169|       |        /*
  170|       |         * 1<<28 is just a not-so-small yet not-so-large number...
  171|       |         * Below condition is practically never met, but it has to
  172|       |         * be checked for code correctness.
  173|       |         */
  174|  28.4k|        if (sizeof(size_t) > sizeof(unsigned int) && blocks > (1U << 28))
  ------------------
  |  Branch (174:13): [True: 28.4k, Folded]
  |  Branch (174:54): [True: 0, False: 28.4k]
  ------------------
  175|      0|            blocks = (1U << 28);
  176|       |        /*
  177|       |         * As (*func) operates on 32-bit counter, caller
  178|       |         * has to handle overflow. 'if' below detects the
  179|       |         * overflow, which is then handled by limiting the
  180|       |         * amount of blocks to the exact overflow point...
  181|       |         */
  182|  28.4k|        ctr32 += (u32)blocks;
  183|  28.4k|        if (ctr32 < blocks) {
  ------------------
  |  Branch (183:13): [True: 0, False: 28.4k]
  ------------------
  184|      0|            blocks -= ctr32;
  185|      0|            ctr32 = 0;
  186|      0|        }
  187|  28.4k|        (*func)(in, out, blocks, key, ivec);
  188|       |        /* (*ctr) does not update ivec, caller does: */
  189|  28.4k|        PUTU32(ivec + 12, ctr32);
  ------------------
  |  |   99|  28.4k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  190|       |        /* ... overflow was detected, propagate carry. */
  191|  28.4k|        if (ctr32 == 0)
  ------------------
  |  Branch (191:13): [True: 0, False: 28.4k]
  ------------------
  192|      0|            ctr96_inc(ivec);
  193|  28.4k|        blocks *= 16;
  194|  28.4k|        len -= blocks;
  195|  28.4k|        out += blocks;
  196|  28.4k|        in += blocks;
  197|  28.4k|    }
  198|  32.6k|    if (len) {
  ------------------
  |  Branch (198:9): [True: 4.47k, False: 28.1k]
  ------------------
  199|  4.47k|        memset(ecount_buf, 0, 16);
  200|  4.47k|        (*func)(ecount_buf, ecount_buf, 1, key, ivec);
  201|  4.47k|        ++ctr32;
  202|  4.47k|        PUTU32(ivec + 12, ctr32);
  ------------------
  |  |   99|  4.47k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  203|  4.47k|        if (ctr32 == 0)
  ------------------
  |  Branch (203:13): [True: 0, False: 4.47k]
  ------------------
  204|      0|            ctr96_inc(ivec);
  205|  23.3k|        while (len--) {
  ------------------
  |  Branch (205:16): [True: 18.8k, False: 4.47k]
  ------------------
  206|  18.8k|            out[n] = in[n] ^ ecount_buf[n];
  207|  18.8k|            ++n;
  208|  18.8k|        }
  209|  4.47k|    }
  210|       |
  211|  32.6k|    *num = n;
  212|  32.6k|}

openssl_fopen:
   39|  9.08k|{
   40|  9.08k|    FILE *file = NULL;
   41|       |#if defined(_WIN32) && defined(CP_UTF8)
   42|       |    int sz, len_0;
   43|       |    DWORD flags;
   44|       |#endif
   45|       |
   46|  9.08k|    if (filename == NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 9.08k]
  ------------------
   47|      0|        return NULL;
   48|       |#if defined(_WIN32) && defined(CP_UTF8)
   49|       |    len_0 = (int)strlen(filename) + 1;
   50|       |
   51|       |    /*
   52|       |     * Basically there are three cases to cover: a) filename is
   53|       |     * pure ASCII string; b) actual UTF-8 encoded string and
   54|       |     * c) locale-ized string, i.e. one containing 8-bit
   55|       |     * characters that are meaningful in current system locale.
   56|       |     * If filename is pure ASCII or real UTF-8 encoded string,
   57|       |     * MultiByteToWideChar succeeds and _wfopen works. If
   58|       |     * filename is locale-ized string, chances are that
   59|       |     * MultiByteToWideChar fails reporting
   60|       |     * ERROR_NO_UNICODE_TRANSLATION, in which case we fall
   61|       |     * back to fopen...
   62|       |     */
   63|       |    if ((sz = MultiByteToWideChar(CP_UTF8, (flags = MB_ERR_INVALID_CHARS),
   64|       |             filename, len_0, NULL, 0))
   65|       |            > 0
   66|       |        || (GetLastError() == ERROR_INVALID_FLAGS && (sz = MultiByteToWideChar(CP_UTF8, (flags = 0), filename, len_0, NULL, 0)) > 0)) {
   67|       |        WCHAR wmode[8];
   68|       |        WCHAR *wfilename = _alloca(sz * sizeof(WCHAR));
   69|       |
   70|       |        if (MultiByteToWideChar(CP_UTF8, flags,
   71|       |                filename, len_0, wfilename, sz)
   72|       |            && MultiByteToWideChar(CP_UTF8, 0, mode, (int)(strlen(mode) + 1),
   73|       |                wmode, OSSL_NELEM(wmode))
   74|       |            && (file = _wfopen(wfilename, wmode)) == NULL && (errno == ENOENT || errno == EBADF)) {
   75|       |            /*
   76|       |             * UTF-8 decode succeeded, but no file, filename
   77|       |             * could still have been locale-ized...
   78|       |             */
   79|       |            file = fopen(filename, mode);
   80|       |        }
   81|       |    } else if (GetLastError() == ERROR_NO_UNICODE_TRANSLATION) {
   82|       |        file = fopen(filename, mode);
   83|       |    }
   84|       |#elif defined(__DJGPP__)
   85|       |    {
   86|       |        char *newname = NULL;
   87|       |
   88|       |        if (pathconf(filename, _PC_NAME_MAX) <= 12) { /* 8.3 file system? */
   89|       |            char *iterator;
   90|       |            char lastchar;
   91|       |
   92|       |            if ((newname = OPENSSL_malloc(strlen(filename) + 1)) == NULL)
   93|       |                return NULL;
   94|       |
   95|       |            for (iterator = newname, lastchar = '\0';
   96|       |                *filename; filename++, iterator++) {
   97|       |                if (lastchar == '/' && filename[0] == '.'
   98|       |                    && filename[1] != '.' && filename[1] != '/') {
   99|       |                    /* Leading dots are not permitted in plain DOS. */
  100|       |                    *iterator = '_';
  101|       |                } else {
  102|       |                    *iterator = *filename;
  103|       |                }
  104|       |                lastchar = *filename;
  105|       |            }
  106|       |            *iterator = '\0';
  107|       |            filename = newname;
  108|       |        }
  109|       |        file = fopen(filename, mode);
  110|       |
  111|       |        OPENSSL_free(newname);
  112|       |    }
  113|       |#else
  114|  9.08k|    file = fopen(filename, mode);
  115|  9.08k|#endif
  116|  9.08k|    return file;
  117|  9.08k|}

CRYPTO_strdup:
   23|   965k|{
   24|   965k|    char *ret;
   25|   965k|    size_t len;
   26|       |
   27|   965k|    if (str == NULL)
  ------------------
  |  Branch (27:9): [True: 0, False: 965k]
  ------------------
   28|      0|        return NULL;
   29|       |
   30|   965k|    len = strlen(str) + 1;
   31|   965k|    ret = CRYPTO_malloc(len, file, line);
   32|   965k|    if (ret != NULL)
  ------------------
  |  Branch (32:9): [True: 965k, False: 0]
  ------------------
   33|   965k|        memcpy(ret, str, len);
   34|   965k|    return ret;
   35|   965k|}
CRYPTO_strndup:
   38|   200k|{
   39|   200k|    size_t maxlen;
   40|   200k|    char *ret;
   41|       |
   42|   200k|    if (str == NULL)
  ------------------
  |  Branch (42:9): [True: 0, False: 200k]
  ------------------
   43|      0|        return NULL;
   44|       |
   45|   200k|    maxlen = OPENSSL_strnlen(str, s);
   46|       |
   47|   200k|    ret = CRYPTO_malloc(maxlen + 1, file, line);
   48|   200k|    if (ret) {
  ------------------
  |  Branch (48:9): [True: 200k, False: 0]
  ------------------
   49|   200k|        memcpy(ret, str, maxlen);
   50|   200k|        ret[maxlen] = CH_ZERO;
  ------------------
  |  |   20|   200k|#define CH_ZERO '\0'
  ------------------
   51|   200k|    }
   52|   200k|    return ret;
   53|   200k|}
CRYPTO_memdup:
   56|  11.0k|{
   57|  11.0k|    void *ret;
   58|       |
   59|  11.0k|    if (data == NULL || siz >= INT_MAX)
  ------------------
  |  Branch (59:9): [True: 0, False: 11.0k]
  |  Branch (59:25): [True: 0, False: 11.0k]
  ------------------
   60|      0|        return NULL;
   61|       |
   62|  11.0k|    ret = CRYPTO_malloc(siz, file, line);
   63|  11.0k|    if (ret == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 11.0k]
  ------------------
   64|      0|        return NULL;
   65|  11.0k|    return memcpy(ret, data, siz);
   66|  11.0k|}
OPENSSL_strnlen:
   69|   200k|{
   70|   200k|    const char *p;
   71|       |
   72|  2.54M|    for (p = str; maxlen-- != 0 && *p != CH_ZERO; ++p)
  ------------------
  |  |   20|  2.34M|#define CH_ZERO '\0'
  ------------------
  |  Branch (72:19): [True: 2.34M, False: 200k]
  |  Branch (72:36): [True: 2.34M, False: 0]
  ------------------
   73|  2.34M|        ;
   74|       |
   75|   200k|    return p - str;
   76|   200k|}
OPENSSL_strlcpy:
   79|  1.98M|{
   80|  1.98M|    size_t l = 0;
   81|  18.1M|    for (; size > 1 && *src; size--) {
  ------------------
  |  Branch (81:12): [True: 18.1M, False: 0]
  |  Branch (81:24): [True: 16.1M, False: 1.98M]
  ------------------
   82|  16.1M|        *dst++ = *src++;
   83|  16.1M|        l++;
   84|  16.1M|    }
   85|  1.98M|    if (size)
  ------------------
  |  Branch (85:9): [True: 1.98M, False: 0]
  ------------------
   86|  1.98M|        *dst = CH_ZERO;
  ------------------
  |  |   20|  1.98M|#define CH_ZERO '\0'
  ------------------
   87|  1.98M|    return l + strlen(src);
   88|  1.98M|}
OPENSSL_strlcat:
   91|  3.67k|{
   92|  3.67k|    size_t l = 0;
   93|  23.8k|    for (; size > 0 && *dst; size--, dst++)
  ------------------
  |  Branch (93:12): [True: 23.8k, False: 0]
  |  Branch (93:24): [True: 20.2k, False: 3.67k]
  ------------------
   94|  20.2k|        l++;
   95|  3.67k|    return l + OPENSSL_strlcpy(dst, src, size);
   96|  3.67k|}
openssl_strerror_r:
  379|     38|{
  380|       |#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_WIN32_WCE)
  381|       |    return !strerror_s(buf, buflen, errnum);
  382|       |#elif defined(_GNU_SOURCE)
  383|       |    char *err;
  384|       |
  385|       |    /*
  386|       |     * GNU strerror_r may not actually set buf.
  387|       |     * It can return a pointer to some (immutable) static string in which case
  388|       |     * buf is left unused.
  389|       |     */
  390|       |    err = strerror_r(errnum, buf, buflen);
  391|       |    if (err == NULL || buflen == 0)
  392|       |        return 0;
  393|       |    /*
  394|       |     * If err is statically allocated, err != buf and we need to copy the data.
  395|       |     * If err points somewhere inside buf, OPENSSL_strlcpy can handle this,
  396|       |     * since src and dest are not annotated with __restrict and the function
  397|       |     * reads src byte for byte and writes to dest.
  398|       |     * If err == buf we do not have to copy anything.
  399|       |     */
  400|       |    if (err != buf)
  401|       |        OPENSSL_strlcpy(buf, err, buflen);
  402|       |    return 1;
  403|       |#elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
  404|       |    /*
  405|       |     * We can use "real" strerror_r. The OpenSSL version differs in that it
  406|       |     * gives 1 on success and 0 on failure for consistency with other OpenSSL
  407|       |     * functions. Real strerror_r does it the other way around
  408|       |     */
  409|     38|    return !strerror_r(errnum, buf, buflen);
  410|       |#else
  411|       |    char *err;
  412|       |
  413|       |    /* Fall back to non-thread safe strerror()...its all we can do */
  414|       |    if (buflen < 2)
  415|       |        return 0;
  416|       |    err = strerror(errnum);
  417|       |    /* Can this ever happen? */
  418|       |    if (err == NULL)
  419|       |        return 0;
  420|       |    OPENSSL_strlcpy(buf, err, buflen);
  421|       |    return 1;
  422|       |#endif
  423|     38|}
OPENSSL_strcasecmp:
  426|  8.44M|{
  427|  8.44M|    int t;
  428|       |
  429|  57.7M|    while ((t = ossl_tolower(*s1) - ossl_tolower(*s2++)) == 0)
  ------------------
  |  Branch (429:12): [True: 53.7M, False: 4.07M]
  ------------------
  430|  53.7M|        if (*s1++ == '\0')
  ------------------
  |  Branch (430:13): [True: 4.37M, False: 49.3M]
  ------------------
  431|  4.37M|            return 0;
  432|  4.07M|    return t;
  433|  8.44M|}
OPENSSL_strncasecmp:
  436|  20.7M|{
  437|  20.7M|    int t;
  438|  20.7M|    size_t i;
  439|       |
  440|  25.5M|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (440:17): [True: 24.0M, False: 1.48M]
  ------------------
  441|  24.0M|        if ((t = ossl_tolower(*s1) - ossl_tolower(*s2++)) != 0)
  ------------------
  |  Branch (441:13): [True: 19.2M, False: 4.77M]
  ------------------
  442|  19.2M|            return t;
  443|  4.77M|        else if (*s1++ == '\0')
  ------------------
  |  Branch (443:18): [True: 0, False: 4.77M]
  ------------------
  444|      0|            return 0;
  445|  1.48M|    return 0;
  446|  20.7M|}

OBJ_NAME_init:
   64|   822k|{
   65|   822k|    return RUN_ONCE(&init, o_names_init);
  ------------------
  |  |  130|   822k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 822k, False: 0]
  |  |  ------------------
  ------------------
   66|   822k|}
OBJ_NAME_get:
  153|   822k|{
  154|   822k|    OBJ_NAME on, *ret;
  155|   822k|    int num = 0, alias;
  156|   822k|    const char *value = NULL;
  157|       |
  158|   822k|    if (name == NULL)
  ------------------
  |  Branch (158:9): [True: 0, False: 822k]
  ------------------
  159|      0|        return NULL;
  160|   822k|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (160:9): [True: 0, False: 822k]
  ------------------
  161|      0|        return NULL;
  162|   822k|    if (!CRYPTO_THREAD_read_lock(obj_lock))
  ------------------
  |  Branch (162:9): [True: 0, False: 822k]
  ------------------
  163|      0|        return NULL;
  164|       |
  165|   822k|    alias = type & OBJ_NAME_ALIAS;
  ------------------
  |  |   33|   822k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  166|   822k|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|   822k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  167|       |
  168|   822k|    on.name = name;
  169|   822k|    on.type = type;
  170|       |
  171|   889k|    for (;;) {
  172|   889k|        ret = lh_OBJ_NAME_retrieve(names_lh, &on);
  173|   889k|        if (ret == NULL)
  ------------------
  |  Branch (173:13): [True: 116k, False: 773k]
  ------------------
  174|   116k|            break;
  175|   773k|        if ((ret->alias) && !alias) {
  ------------------
  |  Branch (175:13): [True: 67.3k, False: 705k]
  |  Branch (175:29): [True: 67.3k, False: 0]
  ------------------
  176|  67.3k|            if (++num > 10)
  ------------------
  |  Branch (176:17): [True: 0, False: 67.3k]
  ------------------
  177|      0|                break;
  178|  67.3k|            on.name = ret->data;
  179|   705k|        } else {
  180|   705k|            value = ret->data;
  181|   705k|            break;
  182|   705k|        }
  183|   773k|    }
  184|       |
  185|   822k|    CRYPTO_THREAD_unlock(obj_lock);
  186|   822k|    return value;
  187|   822k|}
OBJ_NAME_add:
  190|    424|{
  191|    424|    OBJ_NAME *onp, *ret;
  192|    424|    int alias, ok = 0;
  193|       |
  194|    424|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (194:9): [True: 0, False: 424]
  ------------------
  195|      0|        return 0;
  196|       |
  197|    424|    alias = type & OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    424|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  198|    424|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    424|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  199|       |
  200|    424|    onp = OPENSSL_malloc(sizeof(*onp));
  ------------------
  |  |  107|    424|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  201|    424|    if (onp == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 424]
  ------------------
  202|      0|        return 0;
  203|       |
  204|    424|    onp->name = name;
  205|    424|    onp->alias = alias;
  206|    424|    onp->type = type;
  207|    424|    onp->data = data;
  208|       |
  209|    424|    if (!CRYPTO_THREAD_write_lock(obj_lock)) {
  ------------------
  |  Branch (209:9): [True: 0, False: 424]
  ------------------
  210|      0|        OPENSSL_free(onp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  211|      0|        return 0;
  212|      0|    }
  213|       |
  214|    424|    ret = lh_OBJ_NAME_insert(names_lh, onp);
  215|    424|    if (ret != NULL) {
  ------------------
  |  Branch (215:9): [True: 182, False: 242]
  ------------------
  216|       |        /* free things */
  217|    182|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (217:13): [True: 0, False: 182]
  ------------------
  218|      0|            && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) {
  ------------------
  |  Branch (218:16): [True: 0, False: 0]
  ------------------
  219|       |            /*
  220|       |             * XXX: I'm not sure I understand why the free function should
  221|       |             * get three arguments... -- Richard Levitte
  222|       |             */
  223|      0|            sk_NAME_FUNCS_value(name_funcs_stack,
  224|      0|                ret->type)
  225|      0|                ->free_func(ret->name, ret->type,
  226|      0|                    ret->data);
  227|      0|        }
  228|    182|        OPENSSL_free(ret);
  ------------------
  |  |  132|    182|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  229|    242|    } else {
  230|    242|        if (lh_OBJ_NAME_error(names_lh)) {
  ------------------
  |  Branch (230:13): [True: 0, False: 242]
  ------------------
  231|       |            /* ERROR */
  232|      0|            OPENSSL_free(onp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  233|      0|            goto unlock;
  234|      0|        }
  235|    242|    }
  236|       |
  237|    424|    ok = 1;
  238|       |
  239|    424|unlock:
  240|    424|    CRYPTO_THREAD_unlock(obj_lock);
  241|    424|    return ok;
  242|    424|}
OBJ_NAME_do_all:
  296|  1.41k|{
  297|  1.41k|    OBJ_DOALL d;
  298|       |
  299|  1.41k|    d.type = type;
  300|  1.41k|    d.fn = fn;
  301|  1.41k|    d.arg = arg;
  302|       |
  303|  1.41k|    lh_OBJ_NAME_doall_OBJ_DOALL(names_lh, do_all_fn, &d);
  304|  1.41k|}
o_names.c:o_names_init:
   51|      1|{
   52|      1|    names_lh = NULL;
   53|      1|    obj_lock = CRYPTO_THREAD_lock_new();
   54|      1|    if (obj_lock != NULL)
  ------------------
  |  Branch (54:9): [True: 1, False: 0]
  ------------------
   55|      1|        names_lh = lh_OBJ_NAME_new(obj_name_hash, obj_name_cmp);
   56|      1|    if (names_lh == NULL) {
  ------------------
  |  Branch (56:9): [True: 0, False: 1]
  ------------------
   57|      0|        CRYPTO_THREAD_lock_free(obj_lock);
   58|      0|        obj_lock = NULL;
   59|      0|    }
   60|      1|    return names_lh != NULL && obj_lock != NULL;
  ------------------
  |  Branch (60:12): [True: 1, False: 0]
  |  Branch (60:32): [True: 1, False: 0]
  ------------------
   61|      1|}
o_names.c:obj_name_hash:
  137|   889k|{
  138|   889k|    unsigned long ret;
  139|       |
  140|   889k|    if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 889k]
  ------------------
  141|      0|        && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) {
  ------------------
  |  Branch (141:12): [True: 0, False: 0]
  ------------------
  142|      0|        ret = sk_NAME_FUNCS_value(name_funcs_stack,
  143|      0|            a->type)
  144|      0|                  ->hash_func(a->name);
  145|   889k|    } else {
  146|   889k|        ret = ossl_lh_strcasehash(a->name);
  147|   889k|    }
  148|   889k|    ret ^= a->type;
  149|   889k|    return ret;
  150|   889k|}
o_names.c:obj_name_cmp:
  120|   773k|{
  121|   773k|    int ret;
  122|       |
  123|   773k|    ret = a->type - b->type;
  124|   773k|    if (ret == 0) {
  ------------------
  |  Branch (124:9): [True: 773k, False: 0]
  ------------------
  125|   773k|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (125:13): [True: 0, False: 773k]
  ------------------
  126|      0|            && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) {
  ------------------
  |  Branch (126:16): [True: 0, False: 0]
  ------------------
  127|      0|            ret = sk_NAME_FUNCS_value(name_funcs_stack,
  128|      0|                a->type)
  129|      0|                      ->cmp_func(a->name, b->name);
  130|      0|        } else
  131|   773k|            ret = OPENSSL_strcasecmp(a->name, b->name);
  132|   773k|    }
  133|   773k|    return ret;
  134|   773k|}
o_names.c:do_all_fn:
  287|   343k|{
  288|   343k|    if (name->type == d->type)
  ------------------
  |  Branch (288:9): [True: 171k, False: 171k]
  ------------------
  289|   171k|        d->fn(name, d->arg);
  290|   343k|}

OBJ_nid2obj:
  259|  23.4M|{
  260|  23.4M|    ADDED_OBJ ad, *adp = NULL;
  261|  23.4M|    ASN1_OBJECT ob;
  262|       |
  263|  23.4M|    if (n == NID_undef
  ------------------
  |  |   18|  46.9M|#define NID_undef                       0
  ------------------
  |  Branch (263:9): [True: 11.3M, False: 12.0M]
  ------------------
  264|  12.0M|        || (n > 0 && n < NUM_NID && nid_objs[n].nid != NID_undef))
  ------------------
  |  | 1359|  24.1M|#define NUM_NID 1502
  ------------------
                      || (n > 0 && n < NUM_NID && nid_objs[n].nid != NID_undef))
  ------------------
  |  |   18|  12.0M|#define NID_undef                       0
  ------------------
  |  Branch (264:13): [True: 12.0M, False: 0]
  |  Branch (264:22): [True: 12.0M, False: 0]
  |  Branch (264:37): [True: 12.0M, False: 0]
  ------------------
  265|  23.4M|        return (ASN1_OBJECT *)&(nid_objs[n]);
  266|       |
  267|      0|    ad.type = ADDED_NID;
  ------------------
  |  |   34|      0|#define ADDED_NID 3
  ------------------
  268|      0|    ad.obj = &ob;
  269|      0|    ob.nid = n;
  270|      0|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (270:9): [True: 0, False: 0]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        return NULL;
  273|      0|    }
  274|      0|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  275|      0|    ossl_obj_unlock();
  276|      0|    if (adp != NULL)
  ------------------
  |  Branch (276:9): [True: 0, False: 0]
  ------------------
  277|      0|        return adp->obj;
  278|       |
  279|      0|    ERR_raise(ERR_LIB_OBJ, OBJ_R_UNKNOWN_NID);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  280|       |    return NULL;
  281|      0|}
OBJ_nid2sn:
  284|  2.14M|{
  285|  2.14M|    ASN1_OBJECT *ob = OBJ_nid2obj(n);
  286|       |
  287|  2.14M|    return ob == NULL ? NULL : ob->sn;
  ------------------
  |  Branch (287:12): [True: 0, False: 2.14M]
  ------------------
  288|  2.14M|}
OBJ_nid2ln:
  291|  1.15M|{
  292|  1.15M|    ASN1_OBJECT *ob = OBJ_nid2obj(n);
  293|       |
  294|  1.15M|    return ob == NULL ? NULL : ob->ln;
  ------------------
  |  Branch (294:12): [True: 0, False: 1.15M]
  ------------------
  295|  1.15M|}
OBJ_txt2obj:
  349|   104k|{
  350|   104k|    int nid = NID_undef;
  ------------------
  |  |   18|   104k|#define NID_undef                       0
  ------------------
  351|   104k|    ASN1_OBJECT *op = NULL;
  352|   104k|    unsigned char *buf;
  353|   104k|    unsigned char *p;
  354|   104k|    const unsigned char *cp;
  355|   104k|    int i, j;
  356|       |
  357|   104k|    if (!no_name) {
  ------------------
  |  Branch (357:9): [True: 93.9k, False: 10.0k]
  ------------------
  358|  93.9k|        if ((nid = OBJ_sn2nid(s)) != NID_undef
  ------------------
  |  |   18|   187k|#define NID_undef                       0
  ------------------
  |  Branch (358:13): [True: 23.4k, False: 70.4k]
  ------------------
  359|  93.9k|            || (nid = OBJ_ln2nid(s)) != NID_undef) {
  ------------------
  |  |   18|  70.4k|#define NID_undef                       0
  ------------------
  |  Branch (359:16): [True: 70.4k, False: 0]
  ------------------
  360|  93.9k|            return OBJ_nid2obj(nid);
  361|  93.9k|        }
  362|      0|        if (!ossl_isdigit(*s)) {
  ------------------
  |  Branch (362:13): [True: 0, False: 0]
  ------------------
  363|      0|            ERR_raise(ERR_LIB_OBJ, OBJ_R_UNKNOWN_OBJECT_NAME);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  364|      0|            return NULL;
  365|      0|        }
  366|      0|    }
  367|       |
  368|       |    /* Work out size of content octets */
  369|  10.0k|    i = a2d_ASN1_OBJECT(NULL, 0, s, -1);
  370|  10.0k|    if (i <= 0)
  ------------------
  |  Branch (370:9): [True: 0, False: 10.0k]
  ------------------
  371|      0|        return NULL;
  372|       |
  373|       |    /* Work out total size */
  374|  10.0k|    j = ASN1_object_size(0, i, V_ASN1_OBJECT);
  ------------------
  |  |   70|  10.0k|#define V_ASN1_OBJECT 6
  ------------------
  375|  10.0k|    if (j < 0)
  ------------------
  |  Branch (375:9): [True: 0, False: 10.0k]
  ------------------
  376|      0|        return NULL;
  377|       |
  378|  10.0k|    if ((buf = OPENSSL_malloc(j)) == NULL)
  ------------------
  |  |  107|  10.0k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (378:9): [True: 0, False: 10.0k]
  ------------------
  379|      0|        return NULL;
  380|       |
  381|  10.0k|    p = buf;
  382|       |    /* Write out tag+length */
  383|  10.0k|    ASN1_put_object(&p, 0, i, V_ASN1_OBJECT, V_ASN1_UNIVERSAL);
  ------------------
  |  |   70|  10.0k|#define V_ASN1_OBJECT 6
  ------------------
                  ASN1_put_object(&p, 0, i, V_ASN1_OBJECT, V_ASN1_UNIVERSAL);
  ------------------
  |  |   49|  10.0k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  384|       |    /* Write out contents */
  385|  10.0k|    a2d_ASN1_OBJECT(p, i, s, -1);
  386|       |
  387|  10.0k|    cp = buf;
  388|  10.0k|    op = d2i_ASN1_OBJECT(NULL, &cp, j);
  389|  10.0k|    OPENSSL_free(buf);
  ------------------
  |  |  132|  10.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  390|  10.0k|    return op;
  391|  10.0k|}
OBJ_obj2txt:
  394|  1.15M|{
  395|  1.15M|    int i, n = 0, len, nid, first, use_bn;
  396|  1.15M|    BIGNUM *bl;
  397|  1.15M|    unsigned long l;
  398|  1.15M|    const unsigned char *p;
  399|  1.15M|    char tbuf[DECIMAL_SIZE(i) + DECIMAL_SIZE(l) + 2];
  400|  1.15M|    const char *s;
  401|       |
  402|       |    /* Ensure that, at every state, |buf| is NUL-terminated. */
  403|  1.15M|    if (buf != NULL && buf_len > 0)
  ------------------
  |  Branch (403:9): [True: 1.15M, False: 0]
  |  Branch (403:24): [True: 1.15M, False: 0]
  ------------------
  404|  1.15M|        buf[0] = '\0';
  405|       |
  406|  1.15M|    if (a == NULL || a->data == NULL)
  ------------------
  |  Branch (406:9): [True: 0, False: 1.15M]
  |  Branch (406:22): [True: 2.83k, False: 1.15M]
  ------------------
  407|  2.83k|        return 0;
  408|       |
  409|  1.15M|    if (!no_name && (nid = OBJ_obj2nid(a)) != NID_undef) {
  ------------------
  |  |   18|  1.00M|#define NID_undef                       0
  ------------------
  |  Branch (409:9): [True: 1.00M, False: 146k]
  |  Branch (409:21): [True: 1.00M, False: 0]
  ------------------
  410|  1.00M|        s = OBJ_nid2ln(nid);
  411|  1.00M|        if (s == NULL)
  ------------------
  |  Branch (411:13): [True: 0, False: 1.00M]
  ------------------
  412|      0|            s = OBJ_nid2sn(nid);
  413|  1.00M|        if (s != NULL) {
  ------------------
  |  Branch (413:13): [True: 1.00M, False: 0]
  ------------------
  414|  1.00M|            if (buf != NULL)
  ------------------
  |  Branch (414:17): [True: 1.00M, False: 0]
  ------------------
  415|  1.00M|                OPENSSL_strlcpy(buf, s, buf_len);
  416|  1.00M|            return (int)strlen(s);
  417|  1.00M|        }
  418|  1.00M|    }
  419|       |
  420|   146k|    len = a->length;
  421|   146k|    p = a->data;
  422|       |
  423|   146k|    first = 1;
  424|   146k|    bl = NULL;
  425|       |
  426|       |    /*
  427|       |     * RFC 2578 (STD 58) says this about OBJECT IDENTIFIERs:
  428|       |     *
  429|       |     * > 3.5. OBJECT IDENTIFIER values
  430|       |     * >
  431|       |     * > An OBJECT IDENTIFIER value is an ordered list of non-negative
  432|       |     * > numbers. For the SMIv2, each number in the list is referred to as a
  433|       |     * > sub-identifier, there are at most 128 sub-identifiers in a value,
  434|       |     * > and each sub-identifier has a maximum value of 2^32-1 (4294967295
  435|       |     * > decimal).
  436|       |     *
  437|       |     * So a legitimate OID according to this RFC is at most (32 * 128 / 7),
  438|       |     * i.e. 586 bytes long.
  439|       |     *
  440|       |     * Ref: https://datatracker.ietf.org/doc/html/rfc2578#section-3.5
  441|       |     */
  442|   146k|    if (len > 586)
  ------------------
  |  Branch (442:9): [True: 0, False: 146k]
  ------------------
  443|      0|        goto err;
  444|       |
  445|  1.11M|    while (len > 0) {
  ------------------
  |  Branch (445:12): [True: 968k, False: 146k]
  ------------------
  446|   968k|        l = 0;
  447|   968k|        use_bn = 0;
  448|  1.19M|        for (;;) {
  449|  1.19M|            unsigned char c = *p++;
  450|       |
  451|  1.19M|            len--;
  452|  1.19M|            if (len == 0 && (c & 0x80) != 0)
  ------------------
  |  Branch (452:17): [True: 146k, False: 1.05M]
  |  Branch (452:29): [True: 0, False: 146k]
  ------------------
  453|      0|                goto err;
  454|  1.19M|            if (use_bn) {
  ------------------
  |  Branch (454:17): [True: 0, False: 1.19M]
  ------------------
  455|      0|                if (!BN_add_word(bl, c & 0x7f))
  ------------------
  |  Branch (455:21): [True: 0, False: 0]
  ------------------
  456|      0|                    goto err;
  457|  1.19M|            } else {
  458|  1.19M|                l |= c & 0x7f;
  459|  1.19M|            }
  460|  1.19M|            if ((c & 0x80) == 0)
  ------------------
  |  Branch (460:17): [True: 968k, False: 228k]
  ------------------
  461|   968k|                break;
  462|   228k|            if (!use_bn && l > (ULONG_MAX >> 7L)) {
  ------------------
  |  Branch (462:17): [True: 228k, False: 0]
  |  Branch (462:28): [True: 0, False: 228k]
  ------------------
  463|      0|                if (bl == NULL && (bl = BN_new()) == NULL)
  ------------------
  |  Branch (463:21): [True: 0, False: 0]
  |  Branch (463:35): [True: 0, False: 0]
  ------------------
  464|      0|                    goto err;
  465|      0|                if (!BN_set_word(bl, l))
  ------------------
  |  Branch (465:21): [True: 0, False: 0]
  ------------------
  466|      0|                    goto err;
  467|      0|                use_bn = 1;
  468|      0|            }
  469|   228k|            if (use_bn) {
  ------------------
  |  Branch (469:17): [True: 0, False: 228k]
  ------------------
  470|      0|                if (!BN_lshift(bl, bl, 7))
  ------------------
  |  Branch (470:21): [True: 0, False: 0]
  ------------------
  471|      0|                    goto err;
  472|   228k|            } else {
  473|   228k|                l <<= 7L;
  474|   228k|            }
  475|   228k|        }
  476|       |
  477|   968k|        if (first) {
  ------------------
  |  Branch (477:13): [True: 146k, False: 822k]
  ------------------
  478|   146k|            first = 0;
  479|   146k|            if (l >= 80) {
  ------------------
  |  Branch (479:17): [True: 57.4k, False: 88.6k]
  ------------------
  480|  57.4k|                i = 2;
  481|  57.4k|                if (use_bn) {
  ------------------
  |  Branch (481:21): [True: 0, False: 57.4k]
  ------------------
  482|      0|                    if (!BN_sub_word(bl, 80))
  ------------------
  |  Branch (482:25): [True: 0, False: 0]
  ------------------
  483|      0|                        goto err;
  484|  57.4k|                } else {
  485|  57.4k|                    l -= 80;
  486|  57.4k|                }
  487|  88.6k|            } else {
  488|  88.6k|                i = (int)(l / 40);
  489|  88.6k|                l -= (long)(i * 40);
  490|  88.6k|            }
  491|   146k|            if (buf != NULL && buf_len > 1) {
  ------------------
  |  Branch (491:17): [True: 146k, False: 0]
  |  Branch (491:32): [True: 146k, False: 0]
  ------------------
  492|   146k|                *buf++ = i + '0';
  493|   146k|                *buf = '\0';
  494|   146k|                buf_len--;
  495|   146k|            }
  496|   146k|            n++;
  497|   146k|        }
  498|       |
  499|   968k|        if (use_bn) {
  ------------------
  |  Branch (499:13): [True: 0, False: 968k]
  ------------------
  500|      0|            char *bndec;
  501|      0|            bndec = BN_bn2dec(bl);
  502|      0|            if (!bndec)
  ------------------
  |  Branch (502:17): [True: 0, False: 0]
  ------------------
  503|      0|                goto err;
  504|      0|            i = (int)strlen(bndec);
  505|      0|            if (buf != NULL) {
  ------------------
  |  Branch (505:17): [True: 0, False: 0]
  ------------------
  506|      0|                if (buf_len > 1) {
  ------------------
  |  Branch (506:21): [True: 0, False: 0]
  ------------------
  507|      0|                    *buf++ = '.';
  508|      0|                    *buf = '\0';
  509|      0|                    buf_len--;
  510|      0|                }
  511|      0|                OPENSSL_strlcpy(buf, bndec, buf_len);
  512|      0|                if (i > buf_len) {
  ------------------
  |  Branch (512:21): [True: 0, False: 0]
  ------------------
  513|      0|                    buf += buf_len;
  514|      0|                    buf_len = 0;
  515|      0|                } else {
  516|      0|                    buf += i;
  517|      0|                    buf_len -= i;
  518|      0|                }
  519|      0|            }
  520|      0|            n++;
  521|      0|            n += i;
  522|      0|            OPENSSL_free(bndec);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  523|   968k|        } else {
  524|   968k|            BIO_snprintf(tbuf, sizeof(tbuf), ".%lu", l);
  525|   968k|            i = (int)strlen(tbuf);
  526|   968k|            if (buf && buf_len > 0) {
  ------------------
  |  Branch (526:17): [True: 968k, False: 0]
  |  Branch (526:24): [True: 968k, False: 0]
  ------------------
  527|   968k|                OPENSSL_strlcpy(buf, tbuf, buf_len);
  528|   968k|                if (i > buf_len) {
  ------------------
  |  Branch (528:21): [True: 0, False: 968k]
  ------------------
  529|      0|                    buf += buf_len;
  530|      0|                    buf_len = 0;
  531|   968k|                } else {
  532|   968k|                    buf += i;
  533|   968k|                    buf_len -= i;
  534|   968k|                }
  535|   968k|            }
  536|   968k|            n += i;
  537|   968k|            l = 0;
  538|   968k|        }
  539|   968k|    }
  540|       |
  541|   146k|    BN_free(bl);
  542|   146k|    return n;
  543|       |
  544|      0|err:
  545|      0|    BN_free(bl);
  546|      0|    return -1;
  547|   146k|}
OBJ_txt2nid:
  550|  93.9k|{
  551|  93.9k|    ASN1_OBJECT *obj = OBJ_txt2obj(s, 0);
  552|  93.9k|    int nid = NID_undef;
  ------------------
  |  |   18|  93.9k|#define NID_undef                       0
  ------------------
  553|       |
  554|  93.9k|    if (obj != NULL) {
  ------------------
  |  Branch (554:9): [True: 93.9k, False: 0]
  ------------------
  555|  93.9k|        nid = OBJ_obj2nid(obj);
  556|  93.9k|        ASN1_OBJECT_free(obj);
  557|  93.9k|    }
  558|  93.9k|    return nid;
  559|  93.9k|}
OBJ_ln2nid:
  562|   128k|{
  563|   128k|    ASN1_OBJECT o;
  564|   128k|    const ASN1_OBJECT *oo = &o;
  565|   128k|    ADDED_OBJ ad, *adp;
  566|   128k|    const unsigned int *op;
  567|   128k|    int nid = NID_undef;
  ------------------
  |  |   18|   128k|#define NID_undef                       0
  ------------------
  568|       |
  569|   128k|    o.ln = s;
  570|   128k|    op = OBJ_bsearch_ln(&oo, ln_objs, NUM_LN);
  ------------------
  |  | 4362|   128k|#define NUM_LN 1493
  ------------------
  571|   128k|    if (op != NULL)
  ------------------
  |  Branch (571:9): [True: 85.3k, False: 42.7k]
  ------------------
  572|  85.3k|        return nid_objs[*op].nid;
  573|  42.7k|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (573:9): [True: 0, False: 42.7k]
  ------------------
  574|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  575|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  576|      0|    }
  577|  42.7k|    ad.type = ADDED_LNAME;
  ------------------
  |  |   33|  42.7k|#define ADDED_LNAME 2
  ------------------
  578|  42.7k|    ad.obj = &o;
  579|  42.7k|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  580|  42.7k|    if (adp != NULL)
  ------------------
  |  Branch (580:9): [True: 0, False: 42.7k]
  ------------------
  581|      0|        nid = adp->obj->nid;
  582|  42.7k|    ossl_obj_unlock();
  583|  42.7k|    return nid;
  584|  42.7k|}
OBJ_sn2nid:
  587|   167k|{
  588|   167k|    ASN1_OBJECT o;
  589|   167k|    const ASN1_OBJECT *oo = &o;
  590|   167k|    ADDED_OBJ ad, *adp;
  591|   167k|    const unsigned int *op;
  592|   167k|    int nid = NID_undef;
  ------------------
  |  |   18|   167k|#define NID_undef                       0
  ------------------
  593|       |
  594|   167k|    o.sn = s;
  595|   167k|    op = OBJ_bsearch_sn(&oo, sn_objs, NUM_SN);
  ------------------
  |  | 2865|   167k|#define NUM_SN 1493
  ------------------
  596|   167k|    if (op != NULL)
  ------------------
  |  Branch (596:9): [True: 45.9k, False: 121k]
  ------------------
  597|  45.9k|        return nid_objs[*op].nid;
  598|   121k|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (598:9): [True: 0, False: 121k]
  ------------------
  599|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  600|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  601|      0|    }
  602|   121k|    ad.type = ADDED_SNAME;
  ------------------
  |  |   32|   121k|#define ADDED_SNAME 1
  ------------------
  603|   121k|    ad.obj = &o;
  604|   121k|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  605|   121k|    if (adp != NULL)
  ------------------
  |  Branch (605:9): [True: 0, False: 121k]
  ------------------
  606|      0|        nid = adp->obj->nid;
  607|   121k|    ossl_obj_unlock();
  608|   121k|    return nid;
  609|   121k|}
OBJ_bsearch_:
  613|  13.3M|{
  614|  13.3M|    return OBJ_bsearch_ex_(key, base, num, size, cmp, 0);
  615|  13.3M|}
OBJ_bsearch_ex_:
  621|  13.3M|{
  622|  13.3M|    const char *p = ossl_bsearch(key, base, num, size, cmp, NULL, flags);
  623|       |
  624|       |#ifdef CHARSET_EBCDIC
  625|       |    /*
  626|       |     * THIS IS A KLUDGE - Because the *_obj is sorted in ASCII order, and I
  627|       |     * don't have perl (yet), we revert to a *LINEAR* search when the object
  628|       |     * wasn't found in the binary search.
  629|       |     */
  630|       |    if (p == NULL) {
  631|       |        const char *base_ = base;
  632|       |        int i = 0, c = 0;
  633|       |        const char *p1;
  634|       |
  635|       |        for (i = 0; i < num; ++i) {
  636|       |            p1 = &(base_[i * size]);
  637|       |            c = (*cmp)(key, p1);
  638|       |            if (c == 0
  639|       |                || (c < 0 && (flags & OBJ_BSEARCH_VALUE_ON_NOMATCH)))
  640|       |                return p1;
  641|       |        }
  642|       |    }
  643|       |#endif
  644|  13.3M|    return p;
  645|  13.3M|}
OBJ_create:
  701|  13.4k|{
  702|  13.4k|    ASN1_OBJECT *tmpoid = NULL;
  703|  13.4k|    int ok = NID_undef;
  ------------------
  |  |   18|  13.4k|#define NID_undef                       0
  ------------------
  704|       |
  705|       |    /* With no arguments at all, nothing can be done */
  706|  13.4k|    if (oid == NULL && sn == NULL && ln == NULL) {
  ------------------
  |  Branch (706:9): [True: 0, False: 13.4k]
  |  Branch (706:24): [True: 0, False: 0]
  |  Branch (706:38): [True: 0, False: 0]
  ------------------
  707|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  708|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  709|      0|    }
  710|       |
  711|       |    /* Check to see if short or long name already present */
  712|  13.4k|    if ((sn != NULL && OBJ_sn2nid(sn) != NID_undef)
  ------------------
  |  |   18|  13.4k|#define NID_undef                       0
  ------------------
  |  Branch (712:10): [True: 13.4k, False: 0]
  |  Branch (712:24): [True: 3.35k, False: 10.0k]
  ------------------
  713|  10.0k|        || (ln != NULL && OBJ_ln2nid(ln) != NID_undef)) {
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (713:13): [True: 0, False: 10.0k]
  |  Branch (713:27): [True: 0, False: 0]
  ------------------
  714|  3.35k|        ERR_raise(ERR_LIB_OBJ, OBJ_R_OID_EXISTS);
  ------------------
  |  |  357|  3.35k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  3.35k|    (ERR_new(),                                                  \
  |  |  |  |  360|  3.35k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  3.35k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  3.35k|        ERR_set_error)
  |  |  ------------------
  ------------------
  715|  3.35k|        return NID_undef;
  ------------------
  |  |   18|  3.35k|#define NID_undef                       0
  ------------------
  716|  3.35k|    }
  717|       |
  718|  10.0k|    if (oid != NULL) {
  ------------------
  |  Branch (718:9): [True: 10.0k, False: 0]
  ------------------
  719|       |        /* Convert numerical OID string to an ASN1_OBJECT structure */
  720|  10.0k|        tmpoid = OBJ_txt2obj(oid, 1);
  721|  10.0k|        if (tmpoid == NULL)
  ------------------
  |  Branch (721:13): [True: 0, False: 10.0k]
  ------------------
  722|      0|            return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  723|  10.0k|    } else {
  724|       |        /* Create a no-OID ASN1_OBJECT */
  725|      0|        tmpoid = ossl_asn1_object_new();
  726|      0|        if (tmpoid == NULL) {
  ------------------
  |  Branch (726:13): [True: 0, False: 0]
  ------------------
  727|      0|            ERR_raise(ERR_LIB_OBJ, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  728|      0|            return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  729|      0|        }
  730|      0|    }
  731|       |
  732|       |    /* If NID is not NID_undef then object already exists */
  733|  10.0k|    if (oid != NULL
  ------------------
  |  Branch (733:9): [True: 10.0k, False: 0]
  ------------------
  734|  10.0k|        && ossl_obj_obj2nid(tmpoid) != NID_undef) {
  ------------------
  |  |   18|  10.0k|#define NID_undef                       0
  ------------------
  |  Branch (734:12): [True: 10.0k, False: 0]
  ------------------
  735|  10.0k|        ERR_raise(ERR_LIB_OBJ, OBJ_R_OID_EXISTS);
  ------------------
  |  |  357|  10.0k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  10.0k|    (ERR_new(),                                                  \
  |  |  |  |  360|  10.0k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  10.0k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  10.0k|        ERR_set_error)
  |  |  ------------------
  ------------------
  736|  10.0k|        goto err;
  737|  10.0k|    }
  738|       |
  739|      0|    tmpoid->nid = NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  740|      0|    tmpoid->sn = (char *)sn;
  741|      0|    tmpoid->ln = (char *)ln;
  742|       |
  743|      0|    ok = add_object(tmpoid, 1);
  744|       |
  745|      0|    tmpoid->sn = NULL;
  746|      0|    tmpoid->ln = NULL;
  747|       |
  748|  10.0k|err:
  749|  10.0k|    ASN1_OBJECT_free(tmpoid);
  750|  10.0k|    return ok;
  751|      0|}
OBJ_length:
  754|   150k|{
  755|   150k|    if (obj == NULL)
  ------------------
  |  Branch (755:9): [True: 0, False: 150k]
  ------------------
  756|      0|        return 0;
  757|   150k|    return obj->length;
  758|   150k|}
OBJ_get0_data:
  761|   112k|{
  762|   112k|    if (obj == NULL)
  ------------------
  |  Branch (762:9): [True: 0, False: 112k]
  ------------------
  763|      0|        return NULL;
  764|   112k|    return obj->data;
  765|   112k|}
OBJ_obj2nid:
  869|  34.3M|{
  870|  34.3M|    return ossl_obj_obj2nid(a);
  871|  34.3M|}
obj_dat.c:ossl_obj_read_lock:
  102|   422k|{
  103|   422k|    if (!ossl_init_added_api())
  ------------------
  |  Branch (103:9): [True: 0, False: 422k]
  ------------------
  104|      0|        return 0;
  105|   422k|    return CRYPTO_THREAD_read_lock(ossl_obj_lock);
  106|   422k|}
obj_dat.c:ossl_init_added_api:
   86|   422k|{
   87|   422k|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
   88|       |    /* Make sure we've loaded config before checking for any "added" objects */
   89|   422k|    OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  511|   422k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
   90|   422k|#endif
   91|   422k|    return RUN_ONCE(&ossl_obj_api_init, obj_api_initialise);
  ------------------
  |  |  130|   422k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 422k, False: 0]
  |  |  ------------------
  ------------------
   92|   422k|}
obj_dat.c:obj_api_initialise:
   64|      1|{
   65|      1|    ossl_obj_lock = CRYPTO_THREAD_lock_new();
   66|      1|    if (ossl_obj_lock == NULL)
  ------------------
  |  Branch (66:9): [True: 0, False: 1]
  ------------------
   67|      0|        return 0;
   68|       |
   69|       |#ifdef TSAN_REQUIRES_LOCKING
   70|       |    ossl_obj_nid_lock = CRYPTO_THREAD_lock_new();
   71|       |    if (ossl_obj_nid_lock == NULL) {
   72|       |        objs_free_locks();
   73|       |        return 0;
   74|       |    }
   75|       |#endif
   76|      1|    added = lh_ADDED_OBJ_new(added_obj_hash, added_obj_cmp);
   77|      1|    if (added == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 1]
  ------------------
   78|      0|        objs_free_locks();
   79|      0|        return 0;
   80|      0|    }
   81|       |
   82|      1|    return 1;
   83|      1|}
obj_dat.c:added_obj_hash:
  128|   422k|{
  129|   422k|    const ASN1_OBJECT *a;
  130|   422k|    int i;
  131|   422k|    unsigned long ret = 0;
  132|   422k|    unsigned char *p;
  133|       |
  134|   422k|    a = ca->obj;
  135|   422k|    switch (ca->type) {
  136|   257k|    case ADDED_DATA:
  ------------------
  |  |   31|   257k|#define ADDED_DATA 0
  ------------------
  |  Branch (136:5): [True: 257k, False: 164k]
  ------------------
  137|   257k|        ret = (unsigned long)a->length << 20UL;
  138|   257k|        p = (unsigned char *)a->data;
  139|  2.57M|        for (i = 0; i < a->length; i++)
  ------------------
  |  Branch (139:21): [True: 2.32M, False: 257k]
  ------------------
  140|  2.32M|            ret ^= p[i] << ((i * 3) % 24);
  141|   257k|        break;
  142|   121k|    case ADDED_SNAME:
  ------------------
  |  |   32|   121k|#define ADDED_SNAME 1
  ------------------
  |  Branch (142:5): [True: 121k, False: 300k]
  ------------------
  143|   121k|        ret = OPENSSL_LH_strhash(a->sn);
  144|   121k|        break;
  145|  42.7k|    case ADDED_LNAME:
  ------------------
  |  |   33|  42.7k|#define ADDED_LNAME 2
  ------------------
  |  Branch (145:5): [True: 42.7k, False: 379k]
  ------------------
  146|  42.7k|        ret = OPENSSL_LH_strhash(a->ln);
  147|  42.7k|        break;
  148|      0|    case ADDED_NID:
  ------------------
  |  |   34|      0|#define ADDED_NID 3
  ------------------
  |  Branch (148:5): [True: 0, False: 422k]
  ------------------
  149|      0|        ret = a->nid;
  150|      0|        break;
  151|      0|    default:
  ------------------
  |  Branch (151:5): [True: 0, False: 422k]
  ------------------
  152|       |        /* abort(); */
  153|      0|        return 0;
  154|   422k|    }
  155|   422k|    ret &= 0x3fffffffL;
  156|   422k|    ret |= ((unsigned long)ca->type) << 30L;
  157|   422k|    return ret;
  158|   422k|}
obj_dat.c:ossl_obj_unlock:
  109|   422k|{
  110|   422k|    CRYPTO_THREAD_unlock(ossl_obj_lock);
  111|   422k|}
obj_dat.c:ln_cmp:
  121|  1.27M|{
  122|  1.27M|    return strcmp((*a)->ln, nid_objs[*b].ln);
  123|  1.27M|}
obj_dat.c:sn_cmp:
  114|  1.75M|{
  115|  1.75M|    return strcmp((*a)->sn, nid_objs[*b].sn);
  116|  1.75M|}
obj_dat.c:ossl_obj_obj2nid:
  314|  34.3M|{
  315|  34.3M|    int nid = NID_undef;
  ------------------
  |  |   18|  34.3M|#define NID_undef                       0
  ------------------
  316|  34.3M|    const unsigned int *op;
  317|  34.3M|    ADDED_OBJ ad, *adp;
  318|       |
  319|  34.3M|    if (a == NULL)
  ------------------
  |  Branch (319:9): [True: 0, False: 34.3M]
  ------------------
  320|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  321|  34.3M|    if (a->nid != NID_undef)
  ------------------
  |  |   18|  34.3M|#define NID_undef                       0
  ------------------
  |  Branch (321:9): [True: 25.7M, False: 8.53M]
  ------------------
  322|  25.7M|        return a->nid;
  323|  8.53M|    if (a->length == 0)
  ------------------
  |  Branch (323:9): [True: 0, False: 8.53M]
  ------------------
  324|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  325|       |
  326|  8.53M|    op = OBJ_bsearch_obj(&a, obj_objs, NUM_OBJ);
  ------------------
  |  | 5859|  8.53M|#define NUM_OBJ 1350
  ------------------
  327|  8.53M|    if (op != NULL)
  ------------------
  |  Branch (327:9): [True: 8.27M, False: 257k]
  ------------------
  328|  8.27M|        return nid_objs[*op].nid;
  329|   257k|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (329:9): [True: 0, False: 257k]
  ------------------
  330|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  331|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  332|      0|    }
  333|   257k|    ad.type = ADDED_DATA;
  ------------------
  |  |   31|   257k|#define ADDED_DATA 0
  ------------------
  334|   257k|    ad.obj = (ASN1_OBJECT *)a; /* casting away const is harmless here */
  335|   257k|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  336|   257k|    if (adp != NULL)
  ------------------
  |  Branch (336:9): [True: 0, False: 257k]
  ------------------
  337|      0|        nid = adp->obj->nid;
  338|   257k|    ossl_obj_unlock();
  339|   257k|    return nid;
  340|   257k|}
obj_dat.c:obj_cmp:
  298|  82.7M|{
  299|  82.7M|    int j;
  300|  82.7M|    const ASN1_OBJECT *a = *ap;
  301|  82.7M|    const ASN1_OBJECT *b = &nid_objs[*bp];
  302|       |
  303|  82.7M|    j = (a->length - b->length);
  304|  82.7M|    if (j)
  ------------------
  |  Branch (304:9): [True: 26.4M, False: 56.2M]
  ------------------
  305|  26.4M|        return j;
  306|  56.2M|    if (a->length == 0)
  ------------------
  |  Branch (306:9): [True: 0, False: 56.2M]
  ------------------
  307|      0|        return 0;
  308|  56.2M|    return memcmp(a->data, b->data, a->length);
  309|  56.2M|}

ossl_err_load_OBJ_strings:
   28|      1|{
   29|      1|#ifndef OPENSSL_NO_ERR
   30|      1|    if (ERR_reason_error_string(OBJ_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (30:9): [True: 1, False: 0]
  ------------------
   31|      1|        ERR_load_strings_const(OBJ_str_reasons);
   32|      1|#endif
   33|      1|    return 1;
   34|      1|}

OBJ_dup:
   18|  3.56M|{
   19|  3.56M|    ASN1_OBJECT *r;
   20|       |
   21|  3.56M|    if (o == NULL)
  ------------------
  |  Branch (21:9): [True: 0, False: 3.56M]
  ------------------
   22|      0|        return NULL;
   23|       |    /* If object isn't dynamic it's an internal OID which is never freed */
   24|  3.56M|    if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC))
  ------------------
  |  |  146|  3.56M|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (24:9): [True: 3.56M, False: 0]
  ------------------
   25|  3.56M|        return (ASN1_OBJECT *)o;
   26|       |
   27|      0|    r = ossl_asn1_object_new();
   28|      0|    if (r == NULL) {
  ------------------
  |  Branch (28:9): [True: 0, False: 0]
  ------------------
   29|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   30|      0|        return NULL;
   31|      0|    }
   32|       |
   33|       |    /* Set dynamic flags so everything gets freed up on error */
   34|       |
   35|      0|    r->flags = o->flags | (ASN1_OBJECT_FLAG_DYNAMIC | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS | ASN1_OBJECT_FLAG_DYNAMIC_DATA);
  ------------------
  |  |  146|      0|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
                  r->flags = o->flags | (ASN1_OBJECT_FLAG_DYNAMIC | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS | ASN1_OBJECT_FLAG_DYNAMIC_DATA);
  ------------------
  |  |  148|      0|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
                  r->flags = o->flags | (ASN1_OBJECT_FLAG_DYNAMIC | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS | ASN1_OBJECT_FLAG_DYNAMIC_DATA);
  ------------------
  |  |  149|      0|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
   36|       |
   37|      0|    if (o->length > 0 && (r->data = OPENSSL_memdup(o->data, o->length)) == NULL)
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (37:9): [True: 0, False: 0]
  |  Branch (37:26): [True: 0, False: 0]
  ------------------
   38|      0|        goto err;
   39|       |
   40|      0|    r->length = o->length;
   41|      0|    r->nid = o->nid;
   42|       |
   43|      0|    if (o->ln != NULL && (r->ln = OPENSSL_strdup(o->ln)) == NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (43:9): [True: 0, False: 0]
  |  Branch (43:26): [True: 0, False: 0]
  ------------------
   44|      0|        goto err;
   45|       |
   46|      0|    if (o->sn != NULL && (r->sn = OPENSSL_strdup(o->sn)) == NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (46:9): [True: 0, False: 0]
  |  Branch (46:26): [True: 0, False: 0]
  ------------------
   47|      0|        goto err;
   48|       |
   49|      0|    return r;
   50|      0|err:
   51|      0|    ASN1_OBJECT_free(r);
   52|       |    return NULL;
   53|      0|}

OBJ_find_sigid_algs:
  104|   882k|{
  105|   882k|    return ossl_obj_find_sigid_algs(signid, pdig_nid, ppkey_nid, 1);
  106|   882k|}
OBJ_add_sigid:
  148|  13.4k|{
  149|  13.4k|    nid_triple *ntr;
  150|  13.4k|    int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  13.4k|#define NID_undef                       0
  ------------------
                  int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  13.4k|#define NID_undef                       0
  ------------------
  151|       |
  152|  13.4k|    if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  26.8k|#define NID_undef                       0
  ------------------
                  if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  13.4k|#define NID_undef                       0
  ------------------
  |  Branch (152:9): [True: 0, False: 13.4k]
  |  Branch (152:32): [True: 0, False: 13.4k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|  13.4k|    if (!obj_sig_init())
  ------------------
  |  Branch (155:9): [True: 0, False: 13.4k]
  ------------------
  156|      0|        return 0;
  157|       |
  158|  13.4k|    if ((ntr = OPENSSL_malloc(sizeof(*ntr))) == NULL)
  ------------------
  |  |  107|  13.4k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (158:9): [True: 0, False: 13.4k]
  ------------------
  159|      0|        return 0;
  160|  13.4k|    ntr->sign_id = signid;
  161|  13.4k|    ntr->hash_id = dig_id;
  162|  13.4k|    ntr->pkey_id = pkey_id;
  163|       |
  164|  13.4k|    if (!CRYPTO_THREAD_write_lock(sig_lock)) {
  ------------------
  |  Branch (164:9): [True: 0, False: 13.4k]
  ------------------
  165|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_WRITE_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|        OPENSSL_free(ntr);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|      0|        return 0;
  168|      0|    }
  169|       |
  170|       |    /* Check that the entry doesn't exist or exists as desired */
  171|  13.4k|    if (ossl_obj_find_sigid_algs(signid, &dnid, &pnid, 0)) {
  ------------------
  |  Branch (171:9): [True: 13.4k, False: 1]
  ------------------
  172|  13.4k|        ret = dnid == dig_id && pnid == pkey_id;
  ------------------
  |  Branch (172:15): [True: 13.4k, False: 0]
  |  Branch (172:33): [True: 13.4k, False: 0]
  ------------------
  173|  13.4k|        goto err;
  174|  13.4k|    }
  175|       |
  176|      1|    if (sig_app == NULL) {
  ------------------
  |  Branch (176:9): [True: 1, False: 0]
  ------------------
  177|      1|        sig_app = sk_nid_triple_new(sig_sk_cmp);
  178|      1|        if (sig_app == NULL)
  ------------------
  |  Branch (178:13): [True: 0, False: 1]
  ------------------
  179|      0|            goto err;
  180|      1|    }
  181|      1|    if (sigx_app == NULL) {
  ------------------
  |  Branch (181:9): [True: 1, False: 0]
  ------------------
  182|      1|        sigx_app = sk_nid_triple_new(sigx_cmp);
  183|      1|        if (sigx_app == NULL)
  ------------------
  |  Branch (183:13): [True: 0, False: 1]
  ------------------
  184|      0|            goto err;
  185|      1|    }
  186|       |
  187|       |    /*
  188|       |     * Better might be to find where to insert the element and insert it there.
  189|       |     * This would avoid the sorting steps below.
  190|       |     */
  191|      1|    if (!sk_nid_triple_push(sig_app, ntr))
  ------------------
  |  Branch (191:9): [True: 0, False: 1]
  ------------------
  192|      0|        goto err;
  193|      1|    if (!sk_nid_triple_push(sigx_app, ntr)) {
  ------------------
  |  Branch (193:9): [True: 0, False: 1]
  ------------------
  194|      0|        ntr = NULL; /* This is referenced by sig_app still */
  195|      0|        goto err;
  196|      0|    }
  197|       |
  198|      1|    sk_nid_triple_sort(sig_app);
  199|      1|    sk_nid_triple_sort(sigx_app);
  200|       |
  201|      1|    ntr = NULL;
  202|      1|    ret = 1;
  203|  13.4k|err:
  204|  13.4k|    OPENSSL_free(ntr);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|  13.4k|    CRYPTO_THREAD_unlock(sig_lock);
  206|  13.4k|    return ret;
  207|      1|}
obj_xref.c:ossl_obj_find_sigid_algs:
   68|   895k|{
   69|   895k|    nid_triple tmp;
   70|   895k|    const nid_triple *rv;
   71|   895k|    int idx;
   72|       |
   73|   895k|    if (signid == NID_undef)
  ------------------
  |  |   18|   895k|#define NID_undef                       0
  ------------------
  |  Branch (73:9): [True: 0, False: 895k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|   895k|    tmp.sign_id = signid;
   77|   895k|    rv = OBJ_bsearch_sig(&tmp, sigoid_srt, OSSL_NELEM(sigoid_srt));
  ------------------
  |  |   14|   895k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   78|   895k|    if (rv == NULL) {
  ------------------
  |  Branch (78:9): [True: 3.35k, False: 892k]
  ------------------
   79|  3.35k|        if (!obj_sig_init())
  ------------------
  |  Branch (79:13): [True: 0, False: 3.35k]
  ------------------
   80|      0|            return 0;
   81|  3.35k|        if (lock && !CRYPTO_THREAD_read_lock(sig_lock)) {
  ------------------
  |  Branch (81:13): [True: 0, False: 3.35k]
  |  Branch (81:21): [True: 0, False: 0]
  ------------------
   82|      0|            ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   83|      0|            return 0;
   84|      0|        }
   85|  3.35k|        if (sig_app != NULL) {
  ------------------
  |  Branch (85:13): [True: 3.35k, False: 1]
  ------------------
   86|  3.35k|            idx = sk_nid_triple_find(sig_app, &tmp);
   87|  3.35k|            if (idx >= 0)
  ------------------
  |  Branch (87:17): [True: 3.35k, False: 0]
  ------------------
   88|  3.35k|                rv = sk_nid_triple_value(sig_app, idx);
   89|  3.35k|        }
   90|  3.35k|        if (lock)
  ------------------
  |  Branch (90:13): [True: 0, False: 3.35k]
  ------------------
   91|      0|            CRYPTO_THREAD_unlock(sig_lock);
   92|  3.35k|        if (rv == NULL)
  ------------------
  |  Branch (92:13): [True: 1, False: 3.35k]
  ------------------
   93|      1|            return 0;
   94|  3.35k|    }
   95|       |
   96|   895k|    if (pdig_nid != NULL)
  ------------------
  |  Branch (96:9): [True: 454k, False: 441k]
  ------------------
   97|   454k|        *pdig_nid = rv->hash_id;
   98|   895k|    if (ppkey_nid != NULL)
  ------------------
  |  Branch (98:9): [True: 895k, False: 0]
  ------------------
   99|   895k|        *ppkey_nid = rv->pkey_id;
  100|   895k|    return 1;
  101|   895k|}
obj_xref.c:sig_cmp:
   20|  4.48M|{
   21|  4.48M|    return a->sign_id - b->sign_id;
   22|  4.48M|}
obj_xref.c:obj_sig_init:
   62|  16.7k|{
   63|  16.7k|    return RUN_ONCE(&sig_init, o_sig_init);
  ------------------
  |  |  130|  16.7k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 16.7k, False: 0]
  |  |  ------------------
  ------------------
   64|  16.7k|}
obj_xref.c:o_sig_init:
   56|      1|{
   57|      1|    sig_lock = CRYPTO_THREAD_lock_new();
   58|       |    return sig_lock != NULL;
   59|      1|}
obj_xref.c:sig_sk_cmp:
   28|  3.35k|{
   29|  3.35k|    return (*a)->sign_id - (*b)->sign_id;
   30|  3.35k|}

ossl_err_load_OCSP_strings:
   66|      1|{
   67|      1|#ifndef OPENSSL_NO_ERR
   68|      1|    if (ERR_reason_error_string(OCSP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (68:9): [True: 1, False: 0]
  ------------------
   69|      1|        ERR_load_strings_const(OCSP_str_reasons);
   70|      1|#endif
   71|      1|    return 1;
   72|      1|}

WPACKET_allocate_bytes:
   20|  1.62M|{
   21|  1.62M|    if (!WPACKET_reserve_bytes(pkt, len, allocbytes))
  ------------------
  |  Branch (21:9): [True: 0, False: 1.62M]
  ------------------
   22|      0|        return 0;
   23|       |
   24|  1.62M|    pkt->written += len;
   25|  1.62M|    pkt->curr += len;
   26|  1.62M|    return 1;
   27|  1.62M|}
WPACKET_sub_allocate_bytes__:
   31|    279|{
   32|    279|    if (!WPACKET_start_sub_packet_len__(pkt, lenbytes)
  ------------------
  |  Branch (32:9): [True: 0, False: 279]
  ------------------
   33|    279|        || !WPACKET_allocate_bytes(pkt, len, allocbytes)
  ------------------
  |  Branch (33:12): [True: 0, False: 279]
  ------------------
   34|    279|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (34:12): [True: 0, False: 279]
  ------------------
   35|      0|        return 0;
   36|       |
   37|    279|    return 1;
   38|    279|}
WPACKET_reserve_bytes:
   47|  1.63M|{
   48|       |    /* Internal API, so should not fail */
   49|  1.63M|    if (!ossl_assert(pkt->subs != NULL && len != 0))
  ------------------
  |  |   52|  3.26M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 1.63M, False: 0]
  |  |  |  Branch (52:41): [True: 1.63M, False: 0]
  |  |  ------------------
  |  |   53|  1.63M|    __FILE__, __LINE__)
  ------------------
  |  Branch (49:9): [True: 0, False: 1.63M]
  ------------------
   50|      0|        return 0;
   51|       |
   52|  1.63M|    if (pkt->maxsize - pkt->written < len)
  ------------------
  |  Branch (52:9): [True: 0, False: 1.63M]
  ------------------
   53|      0|        return 0;
   54|       |
   55|  1.63M|    if (pkt->buf != NULL && (pkt->buf->length - pkt->written < len)) {
  ------------------
  |  Branch (55:9): [True: 297k, False: 1.33M]
  |  Branch (55:29): [True: 0, False: 297k]
  ------------------
   56|      0|        size_t newlen;
   57|      0|        size_t reflen;
   58|       |
   59|      0|        reflen = (len > pkt->buf->length) ? len : pkt->buf->length;
  ------------------
  |  Branch (59:18): [True: 0, False: 0]
  ------------------
   60|       |
   61|      0|        if (reflen > SIZE_MAX / 2) {
  ------------------
  |  Branch (61:13): [True: 0, False: 0]
  ------------------
   62|      0|            newlen = SIZE_MAX;
   63|      0|        } else {
   64|      0|            newlen = reflen * 2;
   65|      0|            if (newlen < DEFAULT_BUF_SIZE)
  ------------------
  |  |   17|      0|#define DEFAULT_BUF_SIZE 256
  ------------------
  |  Branch (65:17): [True: 0, False: 0]
  ------------------
   66|      0|                newlen = DEFAULT_BUF_SIZE;
  ------------------
  |  |   17|      0|#define DEFAULT_BUF_SIZE 256
  ------------------
   67|      0|        }
   68|      0|        if (BUF_MEM_grow(pkt->buf, newlen) == 0)
  ------------------
  |  Branch (68:13): [True: 0, False: 0]
  ------------------
   69|      0|            return 0;
   70|      0|    }
   71|  1.63M|    if (allocbytes != NULL) {
  ------------------
  |  Branch (71:9): [True: 1.62M, False: 4.79k]
  ------------------
   72|  1.62M|        *allocbytes = WPACKET_get_curr(pkt);
   73|  1.62M|        if (pkt->endfirst && *allocbytes != NULL)
  ------------------
  |  Branch (73:13): [True: 0, False: 1.62M]
  |  Branch (73:30): [True: 0, False: 0]
  ------------------
   74|      0|            *allocbytes -= len;
   75|  1.62M|    }
   76|       |
   77|  1.63M|    return 1;
   78|  1.63M|}
WPACKET_init_static_len:
  131|  4.79k|{
  132|  4.79k|    size_t max = maxmaxsize(lenbytes);
  133|       |
  134|       |    /* Internal API, so should not fail */
  135|  4.79k|    if (!ossl_assert(buf != NULL && len > 0))
  ------------------
  |  |   52|  9.59k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 4.79k, False: 0]
  |  |  |  Branch (52:41): [True: 4.79k, False: 0]
  |  |  ------------------
  |  |   53|  4.79k|    __FILE__, __LINE__)
  ------------------
  |  Branch (135:9): [True: 0, False: 4.79k]
  ------------------
  136|      0|        return 0;
  137|       |
  138|  4.79k|    pkt->staticbuf = buf;
  139|  4.79k|    pkt->buf = NULL;
  140|  4.79k|    pkt->maxsize = (max < len) ? max : len;
  ------------------
  |  Branch (140:20): [True: 0, False: 4.79k]
  ------------------
  141|  4.79k|    pkt->endfirst = 0;
  142|       |
  143|  4.79k|    return wpacket_intern_init_len(pkt, lenbytes);
  144|  4.79k|}
WPACKET_init_len:
  161|  2.57k|{
  162|       |    /* Internal API, so should not fail */
  163|  2.57k|    if (!ossl_assert(buf != NULL))
  ------------------
  |  |   52|  2.57k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.57k|    __FILE__, __LINE__)
  ------------------
  |  Branch (163:9): [True: 0, False: 2.57k]
  ------------------
  164|      0|        return 0;
  165|       |
  166|  2.57k|    pkt->staticbuf = NULL;
  167|  2.57k|    pkt->buf = buf;
  168|  2.57k|    pkt->maxsize = maxmaxsize(lenbytes);
  169|  2.57k|    pkt->endfirst = 0;
  170|       |
  171|  2.57k|    return wpacket_intern_init_len(pkt, lenbytes);
  172|  2.57k|}
WPACKET_init:
  175|  2.57k|{
  176|  2.57k|    return WPACKET_init_len(pkt, buf, 0);
  177|  2.57k|}
WPACKET_init_null:
  180|   162k|{
  181|   162k|    pkt->staticbuf = NULL;
  182|   162k|    pkt->buf = NULL;
  183|   162k|    pkt->maxsize = maxmaxsize(lenbytes);
  184|   162k|    pkt->endfirst = 0;
  185|       |
  186|   162k|    return wpacket_intern_init_len(pkt, 0);
  187|   162k|}
WPACKET_set_flags:
  200|  5.03k|{
  201|       |    /* Internal API, so should not fail */
  202|  5.03k|    if (!ossl_assert(pkt->subs != NULL))
  ------------------
  |  |   52|  5.03k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  5.03k|    __FILE__, __LINE__)
  ------------------
  |  Branch (202:9): [True: 0, False: 5.03k]
  ------------------
  203|      0|        return 0;
  204|       |
  205|  5.03k|    pkt->subs->flags = flags;
  206|       |
  207|  5.03k|    return 1;
  208|  5.03k|}
WPACKET_close:
  336|   552k|{
  337|       |    /*
  338|       |     * Internal API, so should not fail - but we do negative testing of this
  339|       |     * so no assert (otherwise the tests fail)
  340|       |     */
  341|   552k|    if (pkt->subs == NULL || pkt->subs->parent == NULL)
  ------------------
  |  Branch (341:9): [True: 0, False: 552k]
  |  Branch (341:30): [True: 0, False: 552k]
  ------------------
  342|      0|        return 0;
  343|       |
  344|   552k|    return wpacket_intern_close(pkt, pkt->subs, 1);
  345|   552k|}
WPACKET_finish:
  348|   169k|{
  349|   169k|    int ret;
  350|       |
  351|       |    /*
  352|       |     * Internal API, so should not fail - but we do negative testing of this
  353|       |     * so no assert (otherwise the tests fail)
  354|       |     */
  355|   169k|    if (pkt->subs == NULL || pkt->subs->parent != NULL)
  ------------------
  |  Branch (355:9): [True: 0, False: 169k]
  |  Branch (355:30): [True: 0, False: 169k]
  ------------------
  356|      0|        return 0;
  357|       |
  358|   169k|    ret = wpacket_intern_close(pkt, pkt->subs, 1);
  359|   169k|    if (ret) {
  ------------------
  |  Branch (359:9): [True: 169k, False: 0]
  ------------------
  360|   169k|        OPENSSL_free(pkt->subs);
  ------------------
  |  |  132|   169k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  361|   169k|        pkt->subs = NULL;
  362|   169k|    }
  363|       |
  364|   169k|    return ret;
  365|   169k|}
WPACKET_start_sub_packet_len__:
  368|   552k|{
  369|   552k|    WPACKET_SUB *sub;
  370|   552k|    unsigned char *lenchars;
  371|       |
  372|       |    /* Internal API, so should not fail */
  373|   552k|    if (!ossl_assert(pkt->subs != NULL))
  ------------------
  |  |   52|   552k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   552k|    __FILE__, __LINE__)
  ------------------
  |  Branch (373:9): [True: 0, False: 552k]
  ------------------
  374|      0|        return 0;
  375|       |
  376|       |    /* We don't support lenbytes greater than 0 when doing endfirst writing */
  377|   552k|    if (lenbytes > 0 && pkt->endfirst)
  ------------------
  |  Branch (377:9): [True: 64.7k, False: 488k]
  |  Branch (377:25): [True: 0, False: 64.7k]
  ------------------
  378|      0|        return 0;
  379|       |
  380|   552k|    if ((sub = OPENSSL_zalloc(sizeof(*sub))) == NULL)
  ------------------
  |  |  109|   552k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (380:9): [True: 0, False: 552k]
  ------------------
  381|      0|        return 0;
  382|       |
  383|   552k|    sub->parent = pkt->subs;
  384|   552k|    pkt->subs = sub;
  385|   552k|    sub->pwritten = pkt->written + lenbytes;
  386|   552k|    sub->lenbytes = lenbytes;
  387|       |
  388|   552k|    if (lenbytes == 0) {
  ------------------
  |  Branch (388:9): [True: 488k, False: 64.7k]
  ------------------
  389|   488k|        sub->packet_len = 0;
  390|   488k|        return 1;
  391|   488k|    }
  392|       |
  393|  64.7k|    sub->packet_len = pkt->written;
  394|       |
  395|  64.7k|    if (!WPACKET_allocate_bytes(pkt, lenbytes, &lenchars))
  ------------------
  |  Branch (395:9): [True: 0, False: 64.7k]
  ------------------
  396|      0|        return 0;
  397|       |
  398|  64.7k|    return 1;
  399|  64.7k|}
WPACKET_start_sub_packet:
  402|   488k|{
  403|   488k|    return WPACKET_start_sub_packet_len__(pkt, 0);
  404|   488k|}
WPACKET_put_bytes__:
  407|  1.21M|{
  408|  1.21M|    unsigned char *data;
  409|       |
  410|       |    /* Internal API, so should not fail */
  411|  1.21M|    if (!ossl_assert(size <= sizeof(uint64_t))
  ------------------
  |  |   52|  2.42M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.42M|    __FILE__, __LINE__)
  ------------------
  |  Branch (411:9): [True: 0, False: 1.21M]
  ------------------
  412|  1.21M|        || !WPACKET_allocate_bytes(pkt, size, &data)
  ------------------
  |  Branch (412:12): [True: 0, False: 1.21M]
  ------------------
  413|  1.21M|        || !put_value(data, val, size))
  ------------------
  |  Branch (413:12): [True: 0, False: 1.21M]
  ------------------
  414|      0|        return 0;
  415|       |
  416|  1.21M|    return 1;
  417|  1.21M|}
WPACKET_memcpy:
  461|  20.5k|{
  462|  20.5k|    unsigned char *dest;
  463|       |
  464|  20.5k|    if (len == 0)
  ------------------
  |  Branch (464:9): [True: 0, False: 20.5k]
  ------------------
  465|      0|        return 1;
  466|       |
  467|  20.5k|    if (!WPACKET_allocate_bytes(pkt, len, &dest))
  ------------------
  |  Branch (467:9): [True: 0, False: 20.5k]
  ------------------
  468|      0|        return 0;
  469|       |
  470|  20.5k|    if (dest != NULL)
  ------------------
  |  Branch (470:9): [True: 20.5k, False: 0]
  ------------------
  471|  20.5k|        memcpy(dest, src, len);
  472|       |
  473|  20.5k|    return 1;
  474|  20.5k|}
WPACKET_sub_memcpy__:
  478|  10.6k|{
  479|  10.6k|    if (!WPACKET_start_sub_packet_len__(pkt, lenbytes)
  ------------------
  |  Branch (479:9): [True: 0, False: 10.6k]
  ------------------
  480|  10.6k|        || !WPACKET_memcpy(pkt, src, len)
  ------------------
  |  Branch (480:12): [True: 0, False: 10.6k]
  ------------------
  481|  10.6k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (481:12): [True: 0, False: 10.6k]
  ------------------
  482|      0|        return 0;
  483|       |
  484|  10.6k|    return 1;
  485|  10.6k|}
WPACKET_get_total_written:
  488|   165k|{
  489|       |    /* Internal API, so should not fail */
  490|   165k|    if (!ossl_assert(written != NULL))
  ------------------
  |  |   52|   165k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   165k|    __FILE__, __LINE__)
  ------------------
  |  Branch (490:9): [True: 0, False: 165k]
  ------------------
  491|      0|        return 0;
  492|       |
  493|   165k|    *written = pkt->written;
  494|       |
  495|   165k|    return 1;
  496|   165k|}
WPACKET_get_length:
  499|   174k|{
  500|       |    /* Internal API, so should not fail */
  501|   174k|    if (!ossl_assert(pkt->subs != NULL && len != NULL))
  ------------------
  |  |   52|   349k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 174k, False: 0]
  |  |  |  Branch (52:41): [True: 174k, False: 0]
  |  |  ------------------
  |  |   53|   174k|    __FILE__, __LINE__)
  ------------------
  |  Branch (501:9): [True: 0, False: 174k]
  ------------------
  502|      0|        return 0;
  503|       |
  504|   174k|    *len = pkt->written - pkt->subs->pwritten;
  505|       |
  506|   174k|    return 1;
  507|   174k|}
WPACKET_get_curr:
  510|  1.62M|{
  511|  1.62M|    unsigned char *buf = GETBUF(pkt);
  ------------------
  |  |   40|  1.62M|#define GETBUF(p) (((p)->staticbuf != NULL)         \
  |  |  ------------------
  |  |  |  Branch (40:20): [True: 23.9k, False: 1.60M]
  |  |  ------------------
  |  |   41|  1.62M|        ? (p)->staticbuf                            \
  |  |   42|  1.62M|        : ((p)->buf != NULL                         \
  |  |  ------------------
  |  |  |  Branch (42:12): [True: 297k, False: 1.30M]
  |  |  ------------------
  |  |   43|  1.60M|                  ? (unsigned char *)(p)->buf->data \
  |  |   44|  1.60M|                  : NULL))
  ------------------
  512|       |
  513|  1.62M|    if (buf == NULL)
  ------------------
  |  Branch (513:9): [True: 1.30M, False: 321k]
  ------------------
  514|  1.30M|        return NULL;
  515|       |
  516|   321k|    if (pkt->endfirst)
  ------------------
  |  Branch (516:9): [True: 0, False: 321k]
  ------------------
  517|      0|        return buf + pkt->maxsize - pkt->curr;
  518|       |
  519|   321k|    return buf + pkt->curr;
  520|   321k|}
WPACKET_is_null_buf:
  523|   162k|{
  524|   162k|    return pkt->buf == NULL && pkt->staticbuf == NULL;
  ------------------
  |  Branch (524:12): [True: 162k, False: 0]
  |  Branch (524:32): [True: 162k, False: 0]
  ------------------
  525|   162k|}
WPACKET_cleanup:
  528|  4.89k|{
  529|  4.89k|    WPACKET_SUB *sub, *parent;
  530|       |
  531|  5.26k|    for (sub = pkt->subs; sub != NULL; sub = parent) {
  ------------------
  |  Branch (531:27): [True: 367, False: 4.89k]
  ------------------
  532|    367|        parent = sub->parent;
  533|    367|        OPENSSL_free(sub);
  ------------------
  |  |  132|    367|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  534|    367|    }
  535|       |    pkt->subs = NULL;
  536|  4.89k|}
packet.c:maxmaxsize:
   96|   170k|{
   97|   170k|    if (lenbytes >= sizeof(size_t) || lenbytes == 0)
  ------------------
  |  Branch (97:9): [True: 0, False: 170k]
  |  Branch (97:39): [True: 170k, False: 0]
  ------------------
   98|   170k|        return SIZE_MAX;
   99|       |
  100|      0|    return ((size_t)1 << (lenbytes * 8)) - 1 + lenbytes;
  101|   170k|}
packet.c:wpacket_intern_init_len:
  104|   170k|{
  105|   170k|    unsigned char *lenchars;
  106|       |
  107|   170k|    pkt->curr = 0;
  108|   170k|    pkt->written = 0;
  109|       |
  110|   170k|    if ((pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs))) == NULL)
  ------------------
  |  |  109|   170k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (110:9): [True: 0, False: 170k]
  ------------------
  111|      0|        return 0;
  112|       |
  113|   170k|    if (lenbytes == 0)
  ------------------
  |  Branch (113:9): [True: 170k, False: 0]
  ------------------
  114|   170k|        return 1;
  115|       |
  116|      0|    pkt->subs->pwritten = lenbytes;
  117|      0|    pkt->subs->lenbytes = lenbytes;
  118|       |
  119|      0|    if (!WPACKET_allocate_bytes(pkt, lenbytes, &lenchars)) {
  ------------------
  |  Branch (119:9): [True: 0, False: 0]
  ------------------
  120|      0|        OPENSSL_free(pkt->subs);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|      0|        pkt->subs = NULL;
  122|      0|        return 0;
  123|      0|    }
  124|      0|    pkt->subs->packet_len = 0;
  125|       |
  126|      0|    return 1;
  127|      0|}
packet.c:wpacket_intern_close:
  251|   722k|{
  252|   722k|    size_t packlen = pkt->written - sub->pwritten;
  253|       |
  254|   722k|    if (packlen == 0
  ------------------
  |  Branch (254:9): [True: 2.53k, False: 720k]
  ------------------
  255|  2.53k|        && (sub->flags & WPACKET_FLAGS_NON_ZERO_LENGTH) != 0)
  ------------------
  |  |  717|  2.53k|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (255:12): [True: 33, False: 2.49k]
  ------------------
  256|     33|        return 0;
  257|       |
  258|   722k|    if (packlen == 0
  ------------------
  |  Branch (258:9): [True: 2.49k, False: 720k]
  ------------------
  259|  2.49k|        && sub->flags & WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH) {
  ------------------
  |  |  723|  2.49k|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  |  Branch (259:12): [True: 0, False: 2.49k]
  ------------------
  260|       |        /* We can't handle this case. Return an error */
  261|      0|        if (!doclose)
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      0|            return 0;
  263|       |
  264|       |        /* Deallocate any bytes allocated for the length of the WPACKET */
  265|      0|        if ((pkt->curr - sub->lenbytes) == sub->packet_len) {
  ------------------
  |  Branch (265:13): [True: 0, False: 0]
  ------------------
  266|      0|            pkt->written -= sub->lenbytes;
  267|      0|            pkt->curr -= sub->lenbytes;
  268|      0|        }
  269|       |
  270|       |        /* Don't write out the packet length */
  271|      0|        sub->packet_len = 0;
  272|      0|        sub->lenbytes = 0;
  273|      0|    }
  274|       |
  275|       |    /* Write out the WPACKET length if needed */
  276|   722k|    if (sub->lenbytes > 0) {
  ------------------
  |  Branch (276:9): [True: 64.5k, False: 658k]
  ------------------
  277|  64.5k|        unsigned char *buf = GETBUF(pkt);
  ------------------
  |  |   40|  64.5k|#define GETBUF(p) (((p)->staticbuf != NULL)         \
  |  |  ------------------
  |  |  |  Branch (40:20): [True: 4.79k, False: 59.7k]
  |  |  ------------------
  |  |   41|  64.5k|        ? (p)->staticbuf                            \
  |  |   42|  64.5k|        : ((p)->buf != NULL                         \
  |  |  ------------------
  |  |  |  Branch (42:12): [True: 59.7k, False: 0]
  |  |  ------------------
  |  |   43|  59.7k|                  ? (unsigned char *)(p)->buf->data \
  |  |   44|  59.7k|                  : NULL))
  ------------------
  278|       |
  279|  64.5k|        if (buf != NULL) {
  ------------------
  |  Branch (279:13): [True: 64.5k, False: 0]
  ------------------
  280|  64.5k|#if !defined OPENSSL_NO_QUIC && !defined FIPS_MODULE
  281|  64.5k|            if ((sub->flags & WPACKET_FLAGS_QUIC_VLINT) == 0) {
  ------------------
  |  |  726|  64.5k|#define WPACKET_FLAGS_QUIC_VLINT 4
  ------------------
  |  Branch (281:17): [True: 64.5k, False: 0]
  ------------------
  282|  64.5k|                if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes))
  ------------------
  |  Branch (282:21): [True: 0, False: 64.5k]
  ------------------
  283|      0|                    return 0;
  284|  64.5k|            } else {
  285|      0|                if (!put_quic_value(&buf[sub->packet_len], packlen, sub->lenbytes))
  ------------------
  |  Branch (285:21): [True: 0, False: 0]
  ------------------
  286|      0|                    return 0;
  287|      0|            }
  288|       |#else
  289|       |            if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes))
  290|       |                return 0;
  291|       |#endif
  292|  64.5k|        }
  293|   658k|    } else if (pkt->endfirst && sub->parent != NULL
  ------------------
  |  Branch (293:16): [True: 0, False: 658k]
  |  Branch (293:33): [True: 0, False: 0]
  ------------------
  294|      0|        && (packlen != 0
  ------------------
  |  Branch (294:13): [True: 0, False: 0]
  ------------------
  295|      0|            || (sub->flags
  ------------------
  |  Branch (295:16): [True: 0, False: 0]
  ------------------
  296|      0|                   & WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH)
  ------------------
  |  |  723|      0|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  297|      0|                == 0)) {
  298|      0|        size_t tmplen = packlen;
  299|      0|        size_t numlenbytes = 1;
  300|       |
  301|      0|        while ((tmplen = tmplen >> 8) > 0)
  ------------------
  |  Branch (301:16): [True: 0, False: 0]
  ------------------
  302|      0|            numlenbytes++;
  303|      0|        if (!WPACKET_put_bytes__(pkt, packlen, numlenbytes))
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|            return 0;
  305|      0|        if (packlen > 0x7f) {
  ------------------
  |  Branch (305:13): [True: 0, False: 0]
  ------------------
  306|      0|            numlenbytes |= 0x80;
  307|      0|            if (!WPACKET_put_bytes_u8(pkt, numlenbytes))
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (307:17): [True: 0, False: 0]
  ------------------
  308|      0|                return 0;
  309|      0|        }
  310|      0|    }
  311|       |
  312|   722k|    if (doclose) {
  ------------------
  |  Branch (312:9): [True: 722k, False: 0]
  ------------------
  313|   722k|        pkt->subs = sub->parent;
  314|   722k|        OPENSSL_free(sub);
  ------------------
  |  |  132|   722k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  315|   722k|    }
  316|       |
  317|   722k|    return 1;
  318|   722k|}
packet.c:put_value:
  212|  1.27M|{
  213|  1.27M|    if (data == NULL)
  ------------------
  |  Branch (213:9): [True: 980k, False: 295k]
  ------------------
  214|   980k|        return 1;
  215|       |
  216|   862k|    for (data += len - 1; len > 0; len--) {
  ------------------
  |  Branch (216:27): [True: 566k, False: 295k]
  ------------------
  217|   566k|        *data = (unsigned char)(value & 0xff);
  218|   566k|        data--;
  219|   566k|        value >>= 8;
  220|   566k|    }
  221|       |
  222|       |    /* Check whether we could fit the value in the assigned number of bytes */
  223|   295k|    if (value > 0)
  ------------------
  |  Branch (223:9): [True: 0, False: 295k]
  ------------------
  224|      0|        return 0;
  225|       |
  226|   295k|    return 1;
  227|   295k|}

OSSL_PARAM_BLD_new:
   92|  4.62k|{
   93|  4.62k|    OSSL_PARAM_BLD *r = OPENSSL_zalloc(sizeof(OSSL_PARAM_BLD));
  ------------------
  |  |  109|  4.62k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|       |
   95|  4.62k|    if (r != NULL) {
  ------------------
  |  Branch (95:9): [True: 4.62k, False: 0]
  ------------------
   96|  4.62k|        r->params = sk_OSSL_PARAM_BLD_DEF_new_null();
   97|  4.62k|        if (r->params == NULL) {
  ------------------
  |  Branch (97:13): [True: 0, False: 4.62k]
  ------------------
   98|      0|            OPENSSL_free(r);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|       |            r = NULL;
  100|      0|        }
  101|  4.62k|    }
  102|  4.62k|    return r;
  103|  4.62k|}
OSSL_PARAM_BLD_free:
  114|  4.62k|{
  115|  4.62k|    if (bld == NULL)
  ------------------
  |  Branch (115:9): [True: 0, False: 4.62k]
  ------------------
  116|      0|        return;
  117|  4.62k|    free_all_params(bld);
  118|  4.62k|    sk_OSSL_PARAM_BLD_DEF_free(bld->params);
  119|  4.62k|    OPENSSL_free(bld);
  ------------------
  |  |  132|  4.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|  4.62k|}
OSSL_PARAM_BLD_push_utf8_string:
  324|    441|{
  325|    441|    OSSL_PARAM_BLD_DEF *pd;
  326|    441|    int secure;
  327|       |
  328|    441|    if (bld == NULL || key == NULL || buf == NULL) {
  ------------------
  |  Branch (328:9): [True: 0, False: 441]
  |  Branch (328:24): [True: 0, False: 441]
  |  Branch (328:39): [True: 0, False: 441]
  ------------------
  329|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  330|      0|        return 0;
  331|      0|    }
  332|       |
  333|    441|    if (bsize == 0)
  ------------------
  |  Branch (333:9): [True: 441, False: 0]
  ------------------
  334|    441|        bsize = strlen(buf);
  335|    441|    secure = CRYPTO_secure_allocated(buf);
  336|    441|    pd = param_push(bld, key, bsize, bsize + 1, OSSL_PARAM_UTF8_STRING, secure);
  ------------------
  |  |  117|    441|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  337|    441|    if (pd == NULL)
  ------------------
  |  Branch (337:9): [True: 0, False: 441]
  ------------------
  338|      0|        return 0;
  339|    441|    pd->string = buf;
  340|    441|    return 1;
  341|    441|}
OSSL_PARAM_BLD_push_octet_string:
  364|  4.18k|{
  365|  4.18k|    OSSL_PARAM_BLD_DEF *pd;
  366|  4.18k|    int secure;
  367|       |
  368|  4.18k|    if (bld == NULL || key == NULL || (buf == NULL && bsize != 0)) {
  ------------------
  |  Branch (368:9): [True: 0, False: 4.18k]
  |  Branch (368:24): [True: 0, False: 4.18k]
  |  Branch (368:40): [True: 0, False: 4.18k]
  |  Branch (368:55): [True: 0, False: 0]
  ------------------
  369|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  370|      0|        return 0;
  371|      0|    }
  372|       |
  373|  4.18k|    secure = CRYPTO_secure_allocated(buf);
  374|  4.18k|    pd = param_push(bld, key, bsize, bsize, OSSL_PARAM_OCTET_STRING, secure);
  ------------------
  |  |  123|  4.18k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  375|  4.18k|    if (pd == NULL)
  ------------------
  |  Branch (375:9): [True: 0, False: 4.18k]
  ------------------
  376|      0|        return 0;
  377|  4.18k|    pd->string = buf;
  378|  4.18k|    return 1;
  379|  4.18k|}
OSSL_PARAM_BLD_to_param:
  452|  4.62k|{
  453|  4.62k|    OSSL_PARAM_ALIGNED_BLOCK *blk, *s = NULL;
  454|  4.62k|    OSSL_PARAM *params, *last;
  455|  4.62k|    int num;
  456|  4.62k|    size_t p_blks, total, ss;
  457|       |
  458|  4.62k|    if (bld == NULL) {
  ------------------
  |  Branch (458:9): [True: 0, False: 4.62k]
  ------------------
  459|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  460|      0|        return 0;
  461|      0|    }
  462|       |
  463|  4.62k|    num = sk_OSSL_PARAM_BLD_DEF_num(bld->params);
  464|  4.62k|    p_blks = ossl_param_bytes_to_blocks((1 + num) * sizeof(*params));
  465|  4.62k|    total = OSSL_PARAM_ALIGN_SIZE * (p_blks + bld->total_blocks);
  ------------------
  |  |   22|  4.62k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
  466|  4.62k|    ss = OSSL_PARAM_ALIGN_SIZE * bld->secure_blocks;
  ------------------
  |  |   22|  4.62k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
  467|       |
  468|  4.62k|    if (ss > 0) {
  ------------------
  |  Branch (468:9): [True: 0, False: 4.62k]
  ------------------
  469|      0|        s = OPENSSL_secure_malloc(ss);
  ------------------
  |  |  140|      0|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  470|      0|        if (s == NULL) {
  ------------------
  |  Branch (470:13): [True: 0, False: 0]
  ------------------
  471|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_SECURE_MALLOC_FAILURE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  472|      0|            return NULL;
  473|      0|        }
  474|      0|    }
  475|  4.62k|    params = OPENSSL_malloc(total);
  ------------------
  |  |  107|  4.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  476|  4.62k|    if (params == NULL) {
  ------------------
  |  Branch (476:9): [True: 0, False: 4.62k]
  ------------------
  477|      0|        OPENSSL_secure_free(s);
  ------------------
  |  |  148|      0|    CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  478|      0|        return NULL;
  479|      0|    }
  480|  4.62k|    blk = p_blks + (OSSL_PARAM_ALIGNED_BLOCK *)(params);
  481|  4.62k|    last = param_bld_convert(bld, params, blk, s);
  482|  4.62k|    ossl_param_set_secure_block(last, s, ss);
  483|  4.62k|    last->return_size = total;
  484|       |
  485|       |    /* Reset builder for reuse */
  486|  4.62k|    bld->total_blocks = 0;
  487|  4.62k|    bld->secure_blocks = 0;
  488|  4.62k|    free_all_params(bld);
  489|  4.62k|    return params;
  490|  4.62k|}
param_build.c:free_all_params:
  106|  9.25k|{
  107|  9.25k|    int i, n = sk_OSSL_PARAM_BLD_DEF_num(bld->params);
  108|       |
  109|  13.8k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (109:17): [True: 4.62k, False: 9.25k]
  ------------------
  110|  4.62k|        OPENSSL_free(sk_OSSL_PARAM_BLD_DEF_pop(bld->params));
  ------------------
  |  |  132|  4.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|  9.25k|}
param_build.c:param_push:
   54|  4.62k|{
   55|  4.62k|    OSSL_PARAM_BLD_DEF *pd = OPENSSL_zalloc(sizeof(*pd));
  ------------------
  |  |  109|  4.62k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   56|       |
   57|  4.62k|    if (pd == NULL)
  ------------------
  |  Branch (57:9): [True: 0, False: 4.62k]
  ------------------
   58|      0|        return NULL;
   59|  4.62k|    pd->key = key;
   60|  4.62k|    pd->type = type;
   61|  4.62k|    pd->size = size;
   62|  4.62k|    pd->alloc_blocks = ossl_param_bytes_to_blocks(alloc);
   63|  4.62k|    if ((pd->secure = secure) != 0)
  ------------------
  |  Branch (63:9): [True: 0, False: 4.62k]
  ------------------
   64|      0|        bld->secure_blocks += pd->alloc_blocks;
   65|  4.62k|    else
   66|  4.62k|        bld->total_blocks += pd->alloc_blocks;
   67|  4.62k|    if (sk_OSSL_PARAM_BLD_DEF_push(bld->params, pd) <= 0) {
  ------------------
  |  Branch (67:9): [True: 0, False: 4.62k]
  ------------------
   68|      0|        OPENSSL_free(pd);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   69|       |        pd = NULL;
   70|      0|    }
   71|  4.62k|    return pd;
   72|  4.62k|}
param_build.c:param_bld_convert:
  401|  4.62k|{
  402|  4.62k|    int i, num = sk_OSSL_PARAM_BLD_DEF_num(bld->params);
  403|  4.62k|    OSSL_PARAM_BLD_DEF *pd;
  404|  4.62k|    void *p;
  405|       |
  406|  9.25k|    for (i = 0; i < num; i++) {
  ------------------
  |  Branch (406:17): [True: 4.62k, False: 4.62k]
  ------------------
  407|  4.62k|        pd = sk_OSSL_PARAM_BLD_DEF_value(bld->params, i);
  408|  4.62k|        param[i].key = pd->key;
  409|  4.62k|        param[i].data_type = pd->type;
  410|  4.62k|        param[i].data_size = pd->size;
  411|  4.62k|        param[i].return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  4.62k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  412|       |
  413|  4.62k|        if (pd->secure) {
  ------------------
  |  Branch (413:13): [True: 0, False: 4.62k]
  ------------------
  414|      0|            p = secure;
  415|      0|            secure += pd->alloc_blocks;
  416|  4.62k|        } else {
  417|  4.62k|            p = blk;
  418|  4.62k|            blk += pd->alloc_blocks;
  419|  4.62k|        }
  420|  4.62k|        param[i].data = p;
  421|  4.62k|        if (pd->bn != NULL) {
  ------------------
  |  Branch (421:13): [True: 0, False: 4.62k]
  ------------------
  422|       |            /* BIGNUM */
  423|      0|            if (pd->type == OSSL_PARAM_UNSIGNED_INTEGER)
  ------------------
  |  |  107|      0|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (423:17): [True: 0, False: 0]
  ------------------
  424|      0|                BN_bn2nativepad(pd->bn, (unsigned char *)p, (int)pd->size);
  425|      0|            else
  426|      0|                BN_signed_bn2native(pd->bn, (unsigned char *)p, (int)pd->size);
  427|  4.62k|        } else if (pd->type == OSSL_PARAM_OCTET_PTR
  ------------------
  |  |  160|  9.25k|#define OSSL_PARAM_OCTET_PTR 7
  ------------------
  |  Branch (427:20): [True: 0, False: 4.62k]
  ------------------
  428|  4.62k|            || pd->type == OSSL_PARAM_UTF8_PTR) {
  ------------------
  |  |  141|  4.62k|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
  |  Branch (428:16): [True: 0, False: 4.62k]
  ------------------
  429|       |            /* PTR */
  430|      0|            *(const void **)p = pd->string;
  431|  4.62k|        } else if (pd->type == OSSL_PARAM_OCTET_STRING
  ------------------
  |  |  123|  9.25k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (431:20): [True: 4.18k, False: 441]
  ------------------
  432|  4.62k|            || pd->type == OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|    441|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (432:16): [True: 441, False: 0]
  ------------------
  433|  4.62k|            if (pd->string != NULL)
  ------------------
  |  Branch (433:17): [True: 4.62k, False: 0]
  ------------------
  434|  4.62k|                memcpy(p, pd->string, pd->size);
  435|      0|            else
  436|      0|                memset(p, 0, pd->size);
  437|  4.62k|            if (pd->type == OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|  4.62k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (437:17): [True: 441, False: 4.18k]
  ------------------
  438|    441|                ((char *)p)[pd->size] = '\0';
  439|  4.62k|        } else {
  440|       |            /* Number, but could also be a NULL BIGNUM */
  441|      0|            if (pd->size > sizeof(pd->num))
  ------------------
  |  Branch (441:17): [True: 0, False: 0]
  ------------------
  442|      0|                memset(p, 0, pd->size);
  443|      0|            else if (pd->size > 0)
  ------------------
  |  Branch (443:22): [True: 0, False: 0]
  ------------------
  444|      0|                memcpy(p, &pd->num, pd->size);
  445|      0|        }
  446|  4.62k|    }
  447|  4.62k|    param[i] = OSSL_PARAM_construct_end();
  448|  4.62k|    return param + i;
  449|  4.62k|}

ossl_param_build_set_int:
   24|   330k|{
   25|   330k|    if (bld != NULL)
  ------------------
  |  Branch (25:9): [True: 0, False: 330k]
  ------------------
   26|      0|        return OSSL_PARAM_BLD_push_int(bld, key, num);
   27|   330k|    p = OSSL_PARAM_locate(p, key);
   28|   330k|    if (p != NULL)
  ------------------
  |  Branch (28:9): [True: 0, False: 330k]
  ------------------
   29|      0|        return OSSL_PARAM_set_int(p, num);
   30|   330k|    return 1;
   31|   330k|}
ossl_param_build_set_utf8_string:
   46|   818k|{
   47|   818k|    if (bld != NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 818k]
  ------------------
   48|      0|        return OSSL_PARAM_BLD_push_utf8_string(bld, key, buf, 0);
   49|   818k|    p = OSSL_PARAM_locate(p, key);
   50|   818k|    if (p != NULL)
  ------------------
  |  Branch (50:9): [True: 0, False: 818k]
  ------------------
   51|      0|        return OSSL_PARAM_set_utf8_string(p, buf);
   52|   818k|    return 1;
   53|   818k|}
ossl_param_build_set_octet_string:
   59|  20.9k|{
   60|  20.9k|    if (bld != NULL)
  ------------------
  |  Branch (60:9): [True: 4.18k, False: 16.7k]
  ------------------
   61|  4.18k|        return OSSL_PARAM_BLD_push_octet_string(bld, key, data, data_len);
   62|       |
   63|  16.7k|    p = OSSL_PARAM_locate(p, key);
   64|  16.7k|    if (p != NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 16.7k]
  ------------------
   65|      0|        return OSSL_PARAM_set_octet_string(p, data, data_len);
   66|  16.7k|    return 1;
   67|  16.7k|}
ossl_param_build_set_bn_pad:
   71|  1.32k|{
   72|  1.32k|    if (bld != NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 1.32k]
  ------------------
   73|      0|        return OSSL_PARAM_BLD_push_BN_pad(bld, key, bn, sz);
   74|  1.32k|    p = OSSL_PARAM_locate(p, key);
   75|  1.32k|    if (p != NULL) {
  ------------------
  |  Branch (75:9): [True: 0, False: 1.32k]
  ------------------
   76|       |        /* Size probe: NULL data means "report the required size". */
   77|      0|        if (p->data == NULL) {
  ------------------
  |  Branch (77:13): [True: 0, False: 0]
  ------------------
   78|      0|            p->return_size = sz;
   79|      0|            return 1;
   80|      0|        }
   81|      0|        if (sz > p->data_size) {
  ------------------
  |  Branch (81:13): [True: 0, False: 0]
  ------------------
   82|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   83|      0|            return 0;
   84|      0|        }
   85|      0|        p->data_size = sz;
   86|      0|        return OSSL_PARAM_set_BN(p, bn);
   87|      0|    }
   88|  1.32k|    return 1;
   89|  1.32k|}
ossl_param_build_set_bn:
   93|   685k|{
   94|   685k|    if (bld != NULL)
  ------------------
  |  Branch (94:9): [True: 0, False: 685k]
  ------------------
   95|      0|        return OSSL_PARAM_BLD_push_BN(bld, key, bn);
   96|       |
   97|   685k|    p = OSSL_PARAM_locate(p, key);
   98|   685k|    if (p != NULL)
  ------------------
  |  Branch (98:9): [True: 0, False: 685k]
  ------------------
   99|      0|        return OSSL_PARAM_set_BN(p, bn) > 0;
  100|   685k|    return 1;
  101|   685k|}

OSSL_PARAM_locate:
   55|  12.5M|{
   56|  12.5M|    if (ossl_likely(p != NULL && key != NULL))
  ------------------
  |  |   22|  25.0M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 12.5M, False: 30.5k]
  |  |  |  Branch (22:44): [True: 12.5M, False: 30.5k]
  |  |  |  Branch (22:44): [True: 12.5M, False: 0]
  |  |  ------------------
  ------------------
   57|  49.3M|        for (; p->key != NULL; p++)
  ------------------
  |  Branch (57:16): [True: 43.4M, False: 5.84M]
  ------------------
   58|  43.4M|            if (strcmp(key, p->key) == 0)
  ------------------
  |  Branch (58:17): [True: 6.66M, False: 36.8M]
  ------------------
   59|  6.66M|                return p;
   60|  5.87M|    return NULL;
   61|  12.5M|}
OSSL_PARAM_locate_const:
   64|  6.64M|{
   65|  6.64M|    return OSSL_PARAM_locate((OSSL_PARAM *)p, key);
   66|  6.64M|}
OSSL_PARAM_modified:
   82|  17.7k|{
   83|  17.7k|    return p != NULL && p->return_size != OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  17.7k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (83:12): [True: 17.7k, False: 0]
  |  Branch (83:25): [True: 11.4k, False: 6.28k]
  ------------------
   84|  17.7k|}
OSSL_PARAM_get_int:
  268|   439k|{
  269|   439k|#ifndef OPENSSL_SMALL_FOOTPRINT
  270|   439k|    switch (sizeof(int)) {
  ------------------
  |  Branch (270:13): [True: 439k, Folded]
  ------------------
  271|   439k|    case sizeof(int32_t):
  ------------------
  |  Branch (271:5): [True: 439k, False: 0]
  ------------------
  272|   439k|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
  273|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (273:5): [True: 0, False: 439k]
  ------------------
  274|      0|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
  275|   439k|    }
  276|      0|#endif
  277|      0|    return general_get_int(p, val, sizeof(*val));
  278|   439k|}
OSSL_PARAM_set_int:
  281|  2.65M|{
  282|  2.65M|#ifndef OPENSSL_SMALL_FOOTPRINT
  283|  2.65M|    switch (sizeof(int)) {
  ------------------
  |  Branch (283:13): [True: 2.65M, Folded]
  ------------------
  284|  2.65M|    case sizeof(int32_t):
  ------------------
  |  Branch (284:5): [True: 2.65M, False: 0]
  ------------------
  285|  2.65M|        return OSSL_PARAM_set_int32(p, (int32_t)val);
  286|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (286:5): [True: 0, False: 2.65M]
  ------------------
  287|      0|        return OSSL_PARAM_set_int64(p, (int64_t)val);
  288|  2.65M|    }
  289|      0|#endif
  290|      0|    return general_set_int(p, &val, sizeof(val));
  291|  2.65M|}
OSSL_PARAM_construct_int:
  294|  3.72M|{
  295|  3.72M|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(int));
  ------------------
  |  |  106|  3.72M|#define OSSL_PARAM_INTEGER 1
  ------------------
  296|  3.72M|}
OSSL_PARAM_get_uint:
  299|   310k|{
  300|   310k|#ifndef OPENSSL_SMALL_FOOTPRINT
  301|   310k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (301:13): [True: 310k, Folded]
  ------------------
  302|   310k|    case sizeof(uint32_t):
  ------------------
  |  Branch (302:5): [True: 310k, False: 0]
  ------------------
  303|   310k|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
  304|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (304:5): [True: 0, False: 310k]
  ------------------
  305|      0|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
  306|   310k|    }
  307|      0|#endif
  308|      0|    return general_get_uint(p, val, sizeof(*val));
  309|   310k|}
OSSL_PARAM_set_uint:
  312|   124k|{
  313|   124k|#ifndef OPENSSL_SMALL_FOOTPRINT
  314|   124k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (314:13): [True: 124k, Folded]
  ------------------
  315|   124k|    case sizeof(uint32_t):
  ------------------
  |  Branch (315:5): [True: 124k, False: 0]
  ------------------
  316|   124k|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
  317|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (317:5): [True: 0, False: 124k]
  ------------------
  318|      0|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
  319|   124k|    }
  320|      0|#endif
  321|      0|    return general_set_uint(p, &val, sizeof(val));
  322|   124k|}
OSSL_PARAM_construct_uint:
  325|   132k|{
  326|   132k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|   132k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  327|   132k|        sizeof(unsigned int));
  328|   132k|}
OSSL_PARAM_get_int32:
  394|   439k|{
  395|   439k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (395:9): [True: 0, False: 439k]
  |  Branch (395:24): [True: 0, False: 439k]
  ------------------
  396|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  397|      0|        return 0;
  398|      0|    }
  399|       |
  400|   439k|    if (p->data == NULL) {
  ------------------
  |  Branch (400:9): [True: 0, False: 439k]
  ------------------
  401|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  402|      0|        return 0;
  403|      0|    }
  404|       |
  405|   439k|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|   439k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (405:9): [True: 432k, False: 7.15k]
  ------------------
  406|   432k|#ifndef OPENSSL_SMALL_FOOTPRINT
  407|   432k|        int64_t i64;
  408|       |
  409|   432k|        switch (p->data_size) {
  ------------------
  |  Branch (409:17): [True: 432k, False: 0]
  ------------------
  410|   432k|        case sizeof(int32_t):
  ------------------
  |  Branch (410:9): [True: 432k, False: 0]
  ------------------
  411|   432k|            *val = *(const int32_t *)p->data;
  412|   432k|            return 1;
  413|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (413:9): [True: 0, False: 432k]
  ------------------
  414|      0|            i64 = *(const int64_t *)p->data;
  415|      0|            if (i64 >= INT32_MIN && i64 <= INT32_MAX) {
  ------------------
  |  Branch (415:17): [True: 0, False: 0]
  |  Branch (415:37): [True: 0, False: 0]
  ------------------
  416|      0|                *val = (int32_t)i64;
  417|      0|                return 1;
  418|      0|            }
  419|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  420|      0|            return 0;
  421|   432k|        }
  422|      0|#endif
  423|      0|        return general_get_int(p, val, sizeof(*val));
  424|       |
  425|   432k|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|  7.15k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (425:16): [True: 7.15k, False: 0]
  ------------------
  426|  7.15k|#ifndef OPENSSL_SMALL_FOOTPRINT
  427|  7.15k|        uint32_t u32;
  428|  7.15k|        uint64_t u64;
  429|       |
  430|  7.15k|        switch (p->data_size) {
  ------------------
  |  Branch (430:17): [True: 7.15k, False: 0]
  ------------------
  431|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (431:9): [True: 0, False: 7.15k]
  ------------------
  432|      0|            u32 = *(const uint32_t *)p->data;
  433|      0|            if (u32 <= INT32_MAX) {
  ------------------
  |  Branch (433:17): [True: 0, False: 0]
  ------------------
  434|      0|                *val = (int32_t)u32;
  435|      0|                return 1;
  436|      0|            }
  437|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  438|      0|            return 0;
  439|  7.15k|        case sizeof(uint64_t):
  ------------------
  |  Branch (439:9): [True: 7.15k, False: 0]
  ------------------
  440|  7.15k|            u64 = *(const uint64_t *)p->data;
  441|  7.15k|            if (u64 <= INT32_MAX) {
  ------------------
  |  Branch (441:17): [True: 7.15k, False: 0]
  ------------------
  442|  7.15k|                *val = (int32_t)u64;
  443|  7.15k|                return 1;
  444|  7.15k|            }
  445|      0|            err_out_of_range;
  ------------------
  |  |   26|  7.15k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  446|      0|            return 0;
  447|  7.15k|        }
  448|      0|#endif
  449|      0|        return general_get_int(p, val, sizeof(*val));
  450|       |
  451|  7.15k|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (451:16): [True: 0, False: 0]
  ------------------
  452|      0|#ifndef OPENSSL_SYS_UEFI
  453|      0|        double d;
  454|       |
  455|      0|        switch (p->data_size) {
  ------------------
  |  Branch (455:17): [True: 0, False: 0]
  ------------------
  456|      0|        case sizeof(double):
  ------------------
  |  Branch (456:9): [True: 0, False: 0]
  ------------------
  457|      0|            d = *(const double *)p->data;
  458|      0|            if (d >= INT32_MIN && d <= INT32_MAX && d == (int32_t)d) {
  ------------------
  |  Branch (458:17): [True: 0, False: 0]
  |  Branch (458:35): [True: 0, False: 0]
  |  Branch (458:53): [True: 0, False: 0]
  ------------------
  459|      0|                *val = (int32_t)d;
  460|      0|                return 1;
  461|      0|            }
  462|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  463|      0|            return 0;
  464|      0|        }
  465|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|      0|        return 0;
  467|      0|#endif
  468|      0|    }
  469|      0|    err_bad_type;
  ------------------
  |  |   36|   439k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  470|      0|    return 0;
  471|   439k|}
OSSL_PARAM_set_int32:
  474|  2.65M|{
  475|  2.65M|    if (p == NULL) {
  ------------------
  |  Branch (475:9): [True: 0, False: 2.65M]
  ------------------
  476|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|      0|        return 0;
  478|      0|    }
  479|  2.65M|    p->return_size = 0;
  480|  2.65M|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  2.65M|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (480:9): [True: 2.64M, False: 3.57k]
  ------------------
  481|  2.64M|#ifndef OPENSSL_SMALL_FOOTPRINT
  482|  2.64M|        p->return_size = sizeof(int32_t); /* Minimum expected size */
  483|  2.64M|        if (p->data == NULL)
  ------------------
  |  Branch (483:13): [True: 0, False: 2.64M]
  ------------------
  484|      0|            return 1;
  485|  2.64M|        switch (p->data_size) {
  ------------------
  |  Branch (485:17): [True: 2.64M, False: 0]
  ------------------
  486|  2.64M|        case sizeof(int32_t):
  ------------------
  |  Branch (486:9): [True: 2.64M, False: 0]
  ------------------
  487|  2.64M|            *(int32_t *)p->data = val;
  488|  2.64M|            return 1;
  489|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (489:9): [True: 0, False: 2.64M]
  ------------------
  490|      0|            p->return_size = sizeof(int64_t);
  491|      0|            *(int64_t *)p->data = (int64_t)val;
  492|      0|            return 1;
  493|  2.64M|        }
  494|      0|#endif
  495|      0|        return general_set_int(p, &val, sizeof(val));
  496|  2.64M|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER && val >= 0) {
  ------------------
  |  |  107|  7.15k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (496:16): [True: 3.57k, False: 0]
  |  Branch (496:63): [True: 3.57k, False: 0]
  ------------------
  497|  3.57k|#ifndef OPENSSL_SMALL_FOOTPRINT
  498|  3.57k|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  499|  3.57k|        if (p->data == NULL)
  ------------------
  |  Branch (499:13): [True: 0, False: 3.57k]
  ------------------
  500|      0|            return 1;
  501|  3.57k|        switch (p->data_size) {
  ------------------
  |  Branch (501:17): [True: 3.57k, False: 0]
  ------------------
  502|  3.57k|        case sizeof(uint32_t):
  ------------------
  |  Branch (502:9): [True: 3.57k, False: 0]
  ------------------
  503|  3.57k|            *(uint32_t *)p->data = (uint32_t)val;
  504|  3.57k|            return 1;
  505|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (505:9): [True: 0, False: 3.57k]
  ------------------
  506|      0|            p->return_size = sizeof(uint64_t);
  507|      0|            *(uint64_t *)p->data = (uint64_t)val;
  508|      0|            return 1;
  509|  3.57k|        }
  510|      0|#endif
  511|      0|        return general_set_int(p, &val, sizeof(val));
  512|  3.57k|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (512:16): [True: 0, False: 0]
  ------------------
  513|      0|#ifndef OPENSSL_SYS_UEFI
  514|      0|        uint32_t u32;
  515|      0|        unsigned int shift;
  516|       |
  517|      0|        p->return_size = sizeof(double);
  518|      0|        if (p->data == NULL)
  ------------------
  |  Branch (518:13): [True: 0, False: 0]
  ------------------
  519|      0|            return 1;
  520|      0|        switch (p->data_size) {
  ------------------
  |  Branch (520:17): [True: 0, False: 0]
  ------------------
  521|      0|        case sizeof(double):
  ------------------
  |  Branch (521:9): [True: 0, False: 0]
  ------------------
  522|      0|            shift = real_shift();
  523|      0|            if (shift < 8 * sizeof(val) - 1) {
  ------------------
  |  Branch (523:17): [True: 0, False: 0]
  ------------------
  524|      0|                u32 = val < 0 ? -val : val;
  ------------------
  |  Branch (524:23): [True: 0, False: 0]
  ------------------
  525|      0|                if ((u32 >> shift) != 0) {
  ------------------
  |  Branch (525:21): [True: 0, False: 0]
  ------------------
  526|      0|                    err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  527|      0|                    return 0;
  528|      0|                }
  529|      0|            }
  530|      0|            *(double *)p->data = (double)val;
  531|      0|            return 1;
  532|      0|        }
  533|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  534|      0|        return 0;
  535|      0|#endif
  536|      0|    }
  537|      0|    err_bad_type;
  ------------------
  |  |   36|  2.65M|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|      0|    return 0;
  539|  2.65M|}
OSSL_PARAM_get_uint32:
  548|   326k|{
  549|   326k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (549:9): [True: 0, False: 326k]
  |  Branch (549:24): [True: 0, False: 326k]
  ------------------
  550|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  551|      0|        return 0;
  552|      0|    }
  553|       |
  554|   326k|    if (p->data == NULL) {
  ------------------
  |  Branch (554:9): [True: 0, False: 326k]
  ------------------
  555|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  556|      0|        return 0;
  557|      0|    }
  558|       |
  559|   326k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   326k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (559:9): [True: 232k, False: 93.6k]
  ------------------
  560|   232k|#ifndef OPENSSL_SMALL_FOOTPRINT
  561|   232k|        uint64_t u64;
  562|       |
  563|   232k|        switch (p->data_size) {
  ------------------
  |  Branch (563:17): [True: 232k, False: 0]
  ------------------
  564|   232k|        case sizeof(uint32_t):
  ------------------
  |  Branch (564:9): [True: 232k, False: 0]
  ------------------
  565|   232k|            *val = *(const uint32_t *)p->data;
  566|   232k|            return 1;
  567|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (567:9): [True: 0, False: 232k]
  ------------------
  568|      0|            u64 = *(const uint64_t *)p->data;
  569|      0|            if (u64 <= UINT32_MAX) {
  ------------------
  |  Branch (569:17): [True: 0, False: 0]
  ------------------
  570|      0|                *val = (uint32_t)u64;
  571|      0|                return 1;
  572|      0|            }
  573|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  574|      0|            return 0;
  575|   232k|        }
  576|      0|#endif
  577|      0|        return general_get_uint(p, val, sizeof(*val));
  578|   232k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  93.6k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (578:16): [True: 93.6k, False: 0]
  ------------------
  579|  93.6k|#ifndef OPENSSL_SMALL_FOOTPRINT
  580|  93.6k|        int32_t i32;
  581|  93.6k|        int64_t i64;
  582|       |
  583|  93.6k|        switch (p->data_size) {
  ------------------
  |  Branch (583:17): [True: 93.6k, False: 0]
  ------------------
  584|  93.6k|        case sizeof(int32_t):
  ------------------
  |  Branch (584:9): [True: 93.6k, False: 0]
  ------------------
  585|  93.6k|            i32 = *(const int32_t *)p->data;
  586|  93.6k|            if (i32 >= 0) {
  ------------------
  |  Branch (586:17): [True: 93.6k, False: 0]
  ------------------
  587|  93.6k|                *val = i32;
  588|  93.6k|                return 1;
  589|  93.6k|            }
  590|      0|            err_unsigned_negative;
  ------------------
  |  |   23|  93.6k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED)
  ------------------
  591|      0|            return 0;
  592|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (592:9): [True: 0, False: 93.6k]
  ------------------
  593|      0|            i64 = *(const int64_t *)p->data;
  594|      0|            if (i64 >= 0 && i64 <= UINT32_MAX) {
  ------------------
  |  Branch (594:17): [True: 0, False: 0]
  |  Branch (594:29): [True: 0, False: 0]
  ------------------
  595|      0|                *val = (uint32_t)i64;
  596|      0|                return 1;
  597|      0|            }
  598|      0|            if (i64 < 0)
  ------------------
  |  Branch (598:17): [True: 0, False: 0]
  ------------------
  599|      0|                err_unsigned_negative;
  ------------------
  |  |   23|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED)
  ------------------
  600|      0|            else
  601|      0|                err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  602|      0|            return 0;
  603|  93.6k|        }
  604|      0|#endif
  605|      0|        return general_get_uint(p, val, sizeof(*val));
  606|  93.6k|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (606:16): [True: 0, False: 0]
  ------------------
  607|      0|#ifndef OPENSSL_SYS_UEFI
  608|      0|        double d;
  609|       |
  610|      0|        switch (p->data_size) {
  ------------------
  |  Branch (610:17): [True: 0, False: 0]
  ------------------
  611|      0|        case sizeof(double):
  ------------------
  |  Branch (611:9): [True: 0, False: 0]
  ------------------
  612|      0|            d = *(const double *)p->data;
  613|      0|            if (d >= 0 && d <= UINT32_MAX && d == (uint32_t)d) {
  ------------------
  |  Branch (613:17): [True: 0, False: 0]
  |  Branch (613:27): [True: 0, False: 0]
  |  Branch (613:46): [True: 0, False: 0]
  ------------------
  614|      0|                *val = (uint32_t)d;
  615|      0|                return 1;
  616|      0|            }
  617|      0|            err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  618|      0|            return 0;
  619|      0|        }
  620|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  621|      0|        return 0;
  622|      0|#endif
  623|      0|    }
  624|      0|    err_bad_type;
  ------------------
  |  |   36|   326k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  625|      0|    return 0;
  626|   326k|}
OSSL_PARAM_set_uint32:
  629|   124k|{
  630|   124k|    if (p == NULL) {
  ------------------
  |  Branch (630:9): [True: 0, False: 124k]
  ------------------
  631|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  632|      0|        return 0;
  633|      0|    }
  634|   124k|    p->return_size = 0;
  635|       |
  636|   124k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   124k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (636:9): [True: 124k, False: 0]
  ------------------
  637|   124k|#ifndef OPENSSL_SMALL_FOOTPRINT
  638|   124k|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  639|   124k|        if (p->data == NULL)
  ------------------
  |  Branch (639:13): [True: 0, False: 124k]
  ------------------
  640|      0|            return 1;
  641|   124k|        switch (p->data_size) {
  ------------------
  |  Branch (641:17): [True: 124k, False: 0]
  ------------------
  642|   124k|        case sizeof(uint32_t):
  ------------------
  |  Branch (642:9): [True: 124k, False: 0]
  ------------------
  643|   124k|            *(uint32_t *)p->data = val;
  644|   124k|            return 1;
  645|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (645:9): [True: 0, False: 124k]
  ------------------
  646|      0|            p->return_size = sizeof(uint64_t);
  647|      0|            *(uint64_t *)p->data = val;
  648|      0|            return 1;
  649|   124k|        }
  650|      0|#endif
  651|      0|        return general_set_uint(p, &val, sizeof(val));
  652|   124k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|      0|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (652:16): [True: 0, False: 0]
  ------------------
  653|      0|#ifndef OPENSSL_SMALL_FOOTPRINT
  654|      0|        p->return_size = sizeof(int32_t); /* Minimum expected size */
  655|      0|        if (p->data == NULL)
  ------------------
  |  Branch (655:13): [True: 0, False: 0]
  ------------------
  656|      0|            return 1;
  657|      0|        switch (p->data_size) {
  ------------------
  |  Branch (657:17): [True: 0, False: 0]
  ------------------
  658|      0|        case sizeof(int32_t):
  ------------------
  |  Branch (658:9): [True: 0, False: 0]
  ------------------
  659|      0|            if (val <= INT32_MAX) {
  ------------------
  |  Branch (659:17): [True: 0, False: 0]
  ------------------
  660|      0|                *(int32_t *)p->data = (int32_t)val;
  661|      0|                return 1;
  662|      0|            }
  663|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  664|      0|            return 0;
  665|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (665:9): [True: 0, False: 0]
  ------------------
  666|      0|            p->return_size = sizeof(int64_t);
  667|      0|            *(int64_t *)p->data = (int64_t)val;
  668|      0|            return 1;
  669|      0|        }
  670|      0|#endif
  671|      0|        return general_set_uint(p, &val, sizeof(val));
  672|      0|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (672:16): [True: 0, False: 0]
  ------------------
  673|      0|#ifndef OPENSSL_SYS_UEFI
  674|      0|        unsigned int shift;
  675|       |
  676|      0|        if (p->data == NULL) {
  ------------------
  |  Branch (676:13): [True: 0, False: 0]
  ------------------
  677|      0|            p->return_size = sizeof(double);
  678|      0|            return 1;
  679|      0|        }
  680|      0|        switch (p->data_size) {
  ------------------
  |  Branch (680:17): [True: 0, False: 0]
  ------------------
  681|      0|        case sizeof(double):
  ------------------
  |  Branch (681:9): [True: 0, False: 0]
  ------------------
  682|      0|            shift = real_shift();
  683|      0|            if (shift < 8 * sizeof(val) && (val >> shift) != 0) {
  ------------------
  |  Branch (683:17): [True: 0, False: 0]
  |  Branch (683:44): [True: 0, False: 0]
  ------------------
  684|      0|                err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  685|      0|                return 0;
  686|      0|            }
  687|      0|            *(double *)p->data = (double)val;
  688|      0|            p->return_size = sizeof(double);
  689|      0|            return 1;
  690|      0|        }
  691|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  692|      0|        return 0;
  693|      0|#endif
  694|      0|    }
  695|      0|    err_bad_type;
  ------------------
  |  |   36|   124k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|      0|    return 0;
  697|   124k|}
OSSL_PARAM_construct_uint32:
  700|  15.5k|{
  701|  15.5k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  15.5k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  702|  15.5k|        sizeof(uint32_t));
  703|  15.5k|}
OSSL_PARAM_get_int64:
  706|  1.78k|{
  707|  1.78k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (707:9): [True: 0, False: 1.78k]
  |  Branch (707:24): [True: 0, False: 1.78k]
  ------------------
  708|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  709|      0|        return 0;
  710|      0|    }
  711|       |
  712|  1.78k|    if (p->data == NULL) {
  ------------------
  |  Branch (712:9): [True: 0, False: 1.78k]
  ------------------
  713|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  714|      0|        return 0;
  715|      0|    }
  716|       |
  717|  1.78k|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  1.78k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (717:9): [True: 1.78k, False: 0]
  ------------------
  718|  1.78k|#ifndef OPENSSL_SMALL_FOOTPRINT
  719|  1.78k|        switch (p->data_size) {
  ------------------
  |  Branch (719:17): [True: 1.78k, False: 0]
  ------------------
  720|      0|        case sizeof(int32_t):
  ------------------
  |  Branch (720:9): [True: 0, False: 1.78k]
  ------------------
  721|      0|            *val = *(const int32_t *)p->data;
  722|      0|            return 1;
  723|  1.78k|        case sizeof(int64_t):
  ------------------
  |  Branch (723:9): [True: 1.78k, False: 0]
  ------------------
  724|  1.78k|            *val = *(const int64_t *)p->data;
  725|  1.78k|            return 1;
  726|  1.78k|        }
  727|      0|#endif
  728|      0|        return general_get_int(p, val, sizeof(*val));
  729|  1.78k|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|      0|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (729:16): [True: 0, False: 0]
  ------------------
  730|      0|#ifndef OPENSSL_SMALL_FOOTPRINT
  731|      0|        uint64_t u64;
  732|       |
  733|      0|        switch (p->data_size) {
  ------------------
  |  Branch (733:17): [True: 0, False: 0]
  ------------------
  734|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (734:9): [True: 0, False: 0]
  ------------------
  735|      0|            *val = *(const uint32_t *)p->data;
  736|      0|            return 1;
  737|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (737:9): [True: 0, False: 0]
  ------------------
  738|      0|            u64 = *(const uint64_t *)p->data;
  739|      0|            if (u64 <= INT64_MAX) {
  ------------------
  |  Branch (739:17): [True: 0, False: 0]
  ------------------
  740|      0|                *val = (int64_t)u64;
  741|      0|                return 1;
  742|      0|            }
  743|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  744|      0|            return 0;
  745|      0|        }
  746|      0|#endif
  747|      0|        return general_get_int(p, val, sizeof(*val));
  748|      0|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (748:16): [True: 0, False: 0]
  ------------------
  749|      0|#ifndef OPENSSL_SYS_UEFI
  750|      0|        double d;
  751|       |
  752|      0|        switch (p->data_size) {
  ------------------
  |  Branch (752:17): [True: 0, False: 0]
  ------------------
  753|      0|        case sizeof(double):
  ------------------
  |  Branch (753:9): [True: 0, False: 0]
  ------------------
  754|      0|            d = *(const double *)p->data;
  755|      0|            if (d >= INT64_MIN
  ------------------
  |  Branch (755:17): [True: 0, False: 0]
  ------------------
  756|       |                /*
  757|       |                 * By subtracting 65535 (2^16-1) we cancel the low order
  758|       |                 * 15 bits of INT64_MAX to avoid using imprecise floating
  759|       |                 * point values.
  760|       |                 */
  761|      0|                && d < (double)(INT64_MAX - 65535) + 65536.0
  ------------------
  |  Branch (761:20): [True: 0, False: 0]
  ------------------
  762|      0|                && d == (int64_t)d) {
  ------------------
  |  Branch (762:20): [True: 0, False: 0]
  ------------------
  763|      0|                *val = (int64_t)d;
  764|      0|                return 1;
  765|      0|            }
  766|      0|            err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  767|      0|            return 0;
  768|      0|        }
  769|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|      0|        return 0;
  771|      0|#endif
  772|      0|    }
  773|      0|    err_bad_type;
  ------------------
  |  |   36|  1.78k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  774|      0|    return 0;
  775|  1.78k|}
OSSL_PARAM_get_uint64:
  861|  51.3k|{
  862|  51.3k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (862:9): [True: 0, False: 51.3k]
  |  Branch (862:24): [True: 0, False: 51.3k]
  ------------------
  863|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  864|      0|        return 0;
  865|      0|    }
  866|       |
  867|  51.3k|    if (p->data == NULL) {
  ------------------
  |  Branch (867:9): [True: 0, False: 51.3k]
  ------------------
  868|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  869|      0|        return 0;
  870|      0|    }
  871|       |
  872|  51.3k|    if (ossl_likely(p->data_type == OSSL_PARAM_UNSIGNED_INTEGER)) {
  ------------------
  |  |   22|  51.3k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 51.3k, False: 0]
  |  |  ------------------
  ------------------
  873|  51.3k|#ifndef OPENSSL_SMALL_FOOTPRINT
  874|  51.3k|        switch (p->data_size) {
  ------------------
  |  Branch (874:17): [True: 51.3k, False: 0]
  ------------------
  875|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (875:9): [True: 0, False: 51.3k]
  ------------------
  876|      0|            *val = *(const uint32_t *)p->data;
  877|      0|            return 1;
  878|  51.3k|        case sizeof(uint64_t):
  ------------------
  |  Branch (878:9): [True: 51.3k, False: 0]
  ------------------
  879|  51.3k|            *val = *(const uint64_t *)p->data;
  880|  51.3k|            return 1;
  881|  51.3k|        }
  882|      0|#endif
  883|      0|        return general_get_uint(p, val, sizeof(*val));
  884|  51.3k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|      0|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (884:16): [True: 0, False: 0]
  ------------------
  885|      0|#ifndef OPENSSL_SMALL_FOOTPRINT
  886|      0|        int32_t i32;
  887|      0|        int64_t i64;
  888|       |
  889|      0|        switch (p->data_size) {
  ------------------
  |  Branch (889:17): [True: 0, False: 0]
  ------------------
  890|      0|        case sizeof(int32_t):
  ------------------
  |  Branch (890:9): [True: 0, False: 0]
  ------------------
  891|      0|            i32 = *(const int32_t *)p->data;
  892|      0|            if (i32 >= 0) {
  ------------------
  |  Branch (892:17): [True: 0, False: 0]
  ------------------
  893|      0|                *val = (uint64_t)i32;
  894|      0|                return 1;
  895|      0|            }
  896|      0|            err_unsigned_negative;
  ------------------
  |  |   23|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED)
  ------------------
  897|      0|            return 0;
  898|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (898:9): [True: 0, False: 0]
  ------------------
  899|      0|            i64 = *(const int64_t *)p->data;
  900|      0|            if (i64 >= 0) {
  ------------------
  |  Branch (900:17): [True: 0, False: 0]
  ------------------
  901|      0|                *val = (uint64_t)i64;
  902|      0|                return 1;
  903|      0|            }
  904|      0|            err_unsigned_negative;
  ------------------
  |  |   23|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED)
  ------------------
  905|      0|            return 0;
  906|      0|        }
  907|      0|#endif
  908|      0|        return general_get_uint(p, val, sizeof(*val));
  909|      0|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (909:16): [True: 0, False: 0]
  ------------------
  910|      0|#ifndef OPENSSL_SYS_UEFI
  911|      0|        double d;
  912|       |
  913|      0|        switch (p->data_size) {
  ------------------
  |  Branch (913:17): [True: 0, False: 0]
  ------------------
  914|      0|        case sizeof(double):
  ------------------
  |  Branch (914:9): [True: 0, False: 0]
  ------------------
  915|      0|            d = *(const double *)p->data;
  916|      0|            if (d >= 0
  ------------------
  |  Branch (916:17): [True: 0, False: 0]
  ------------------
  917|       |                /*
  918|       |                 * By subtracting 65535 (2^16-1) we cancel the low order
  919|       |                 * 15 bits of UINT64_MAX to avoid using imprecise floating
  920|       |                 * point values.
  921|       |                 */
  922|      0|                && d < (double)(UINT64_MAX - 65535) + 65536.0
  ------------------
  |  Branch (922:20): [True: 0, False: 0]
  ------------------
  923|      0|                && d == (uint64_t)d) {
  ------------------
  |  Branch (923:20): [True: 0, False: 0]
  ------------------
  924|      0|                *val = (uint64_t)d;
  925|      0|                return 1;
  926|      0|            }
  927|      0|            err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  928|      0|            return 0;
  929|      0|        }
  930|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  931|      0|        return 0;
  932|      0|#endif
  933|      0|    }
  934|      0|    err_bad_type;
  ------------------
  |  |   36|  51.3k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  935|      0|    return 0;
  936|  51.3k|}
OSSL_PARAM_set_uint64:
  939|   364k|{
  940|   364k|    if (p == NULL) {
  ------------------
  |  Branch (940:9): [True: 0, False: 364k]
  ------------------
  941|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  942|      0|        return 0;
  943|      0|    }
  944|   364k|    p->return_size = 0;
  945|       |
  946|   364k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   364k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (946:9): [True: 356k, False: 8.38k]
  ------------------
  947|   356k|#ifndef OPENSSL_SMALL_FOOTPRINT
  948|   356k|        if (p->data == NULL) {
  ------------------
  |  Branch (948:13): [True: 0, False: 356k]
  ------------------
  949|      0|            p->return_size = sizeof(uint64_t); /* Expected size */
  950|      0|            return 1;
  951|      0|        }
  952|   356k|        switch (p->data_size) {
  ------------------
  |  Branch (952:17): [True: 356k, False: 0]
  ------------------
  953|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (953:9): [True: 0, False: 356k]
  ------------------
  954|      0|            if (val <= UINT32_MAX) {
  ------------------
  |  Branch (954:17): [True: 0, False: 0]
  ------------------
  955|      0|                p->return_size = sizeof(uint32_t);
  956|      0|                *(uint32_t *)p->data = (uint32_t)val;
  957|      0|                return 1;
  958|      0|            }
  959|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  960|      0|            return 0;
  961|   356k|        case sizeof(uint64_t):
  ------------------
  |  Branch (961:9): [True: 356k, False: 0]
  ------------------
  962|   356k|            p->return_size = sizeof(uint64_t);
  963|   356k|            *(uint64_t *)p->data = val;
  964|   356k|            return 1;
  965|   356k|        }
  966|      0|#endif
  967|      0|        return general_set_uint(p, &val, sizeof(val));
  968|   356k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  8.38k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (968:16): [True: 8.38k, False: 0]
  ------------------
  969|  8.38k|#ifndef OPENSSL_SMALL_FOOTPRINT
  970|  8.38k|        if (p->data == NULL) {
  ------------------
  |  Branch (970:13): [True: 0, False: 8.38k]
  ------------------
  971|      0|            p->return_size = sizeof(int64_t); /* Expected size */
  972|      0|            return 1;
  973|      0|        }
  974|  8.38k|        switch (p->data_size) {
  ------------------
  |  Branch (974:17): [True: 8.38k, False: 0]
  ------------------
  975|  8.38k|        case sizeof(int32_t):
  ------------------
  |  Branch (975:9): [True: 8.38k, False: 0]
  ------------------
  976|  8.38k|            if (val <= INT32_MAX) {
  ------------------
  |  Branch (976:17): [True: 8.38k, False: 0]
  ------------------
  977|  8.38k|                p->return_size = sizeof(int32_t);
  978|  8.38k|                *(int32_t *)p->data = (int32_t)val;
  979|  8.38k|                return 1;
  980|  8.38k|            }
  981|      0|            err_out_of_range;
  ------------------
  |  |   26|  8.38k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  982|      0|            return 0;
  983|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (983:9): [True: 0, False: 8.38k]
  ------------------
  984|      0|            if (val <= INT64_MAX) {
  ------------------
  |  Branch (984:17): [True: 0, False: 0]
  ------------------
  985|      0|                p->return_size = sizeof(int64_t);
  986|      0|                *(int64_t *)p->data = (int64_t)val;
  987|      0|                return 1;
  988|      0|            }
  989|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  990|      0|            return 0;
  991|  8.38k|        }
  992|      0|#endif
  993|      0|        return general_set_uint(p, &val, sizeof(val));
  994|  8.38k|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (994:16): [True: 0, False: 0]
  ------------------
  995|      0|#ifndef OPENSSL_SYS_UEFI
  996|      0|        switch (p->data_size) {
  ------------------
  |  Branch (996:17): [True: 0, False: 0]
  ------------------
  997|      0|        case sizeof(double):
  ------------------
  |  Branch (997:9): [True: 0, False: 0]
  ------------------
  998|      0|            if ((val >> real_shift()) == 0) {
  ------------------
  |  Branch (998:17): [True: 0, False: 0]
  ------------------
  999|      0|                p->return_size = sizeof(double);
 1000|      0|                *(double *)p->data = (double)val;
 1001|      0|                return 1;
 1002|      0|            }
 1003|      0|            err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
 1004|      0|            return 0;
 1005|      0|        }
 1006|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1007|      0|        return 0;
 1008|      0|#endif
 1009|      0|    }
 1010|      0|    err_bad_type;
  ------------------
  |  |   36|   364k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1011|      0|    return 0;
 1012|   364k|}
OSSL_PARAM_construct_uint64:
 1015|  15.5k|{
 1016|  15.5k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  15.5k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1017|  15.5k|        sizeof(uint64_t));
 1018|  15.5k|}
OSSL_PARAM_get_size_t:
 1021|  35.8k|{
 1022|  35.8k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1023|  35.8k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1023:13): [True: 35.8k, Folded]
  ------------------
 1024|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1024:5): [True: 0, False: 35.8k]
  ------------------
 1025|      0|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
 1026|  35.8k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1026:5): [True: 35.8k, False: 0]
  ------------------
 1027|  35.8k|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
 1028|  35.8k|    }
 1029|      0|#endif
 1030|      0|    return general_get_uint(p, val, sizeof(*val));
 1031|  35.8k|}
OSSL_PARAM_set_size_t:
 1034|   364k|{
 1035|   364k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1036|   364k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1036:13): [True: 364k, Folded]
  ------------------
 1037|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1037:5): [True: 0, False: 364k]
  ------------------
 1038|      0|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
 1039|   364k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1039:5): [True: 364k, False: 0]
  ------------------
 1040|   364k|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
 1041|   364k|    }
 1042|      0|#endif
 1043|      0|    return general_set_uint(p, &val, sizeof(val));
 1044|   364k|}
OSSL_PARAM_construct_size_t:
 1047|   392k|{
 1048|   392k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|   392k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1049|   392k|        sizeof(size_t));
 1050|   392k|}
OSSL_PARAM_get_time_t:
 1053|  1.78k|{
 1054|  1.78k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1055|  1.78k|    switch (sizeof(time_t)) {
  ------------------
  |  Branch (1055:13): [True: 1.78k, Folded]
  ------------------
 1056|      0|    case sizeof(int32_t):
  ------------------
  |  Branch (1056:5): [True: 0, False: 1.78k]
  ------------------
 1057|      0|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
 1058|  1.78k|    case sizeof(int64_t):
  ------------------
  |  Branch (1058:5): [True: 1.78k, False: 0]
  ------------------
 1059|  1.78k|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
 1060|  1.78k|    }
 1061|      0|#endif
 1062|      0|    return general_get_int(p, val, sizeof(*val));
 1063|  1.78k|}
OSSL_PARAM_construct_time_t:
 1079|  1.78k|{
 1080|  1.78k|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(time_t));
  ------------------
  |  |  106|  1.78k|#define OSSL_PARAM_INTEGER 1
  ------------------
 1081|  1.78k|}
OSSL_PARAM_get_utf8_string:
 1381|  1.00M|{
 1382|  1.00M|    int ret = get_string_internal(p, (void **)val, &max_len, NULL,
 1383|  1.00M|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|  1.00M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1384|       |
 1385|       |    /*
 1386|       |     * We try to ensure that the copied string is terminated with a
 1387|       |     * NUL byte.  That should be easy, just place a NUL byte at
 1388|       |     * |((char*)*val)[p->data_size]|.
 1389|       |     * Unfortunately, we have seen cases where |p->data_size| doesn't
 1390|       |     * correctly reflect the length of the string, and just happens
 1391|       |     * to be out of bounds according to |max_len|, so in that case, we
 1392|       |     * make the extra step of trying to find the true length of the
 1393|       |     * string that |p->data| points at, and use that as an index to
 1394|       |     * place the NUL byte in |*val|.
 1395|       |     */
 1396|  1.00M|    size_t data_length = p->data_size;
 1397|       |
 1398|  1.00M|    if (ret == 0)
  ------------------
  |  Branch (1398:9): [True: 0, False: 1.00M]
  ------------------
 1399|      0|        return 0;
 1400|  1.00M|    if (data_length >= max_len)
  ------------------
  |  Branch (1400:9): [True: 0, False: 1.00M]
  ------------------
 1401|      0|        data_length = OPENSSL_strnlen(p->data, data_length);
 1402|  1.00M|    if (data_length >= max_len) {
  ------------------
  |  Branch (1402:9): [True: 0, False: 1.00M]
  ------------------
 1403|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_NO_SPACE_FOR_TERMINATING_NULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1404|      0|        return 0; /* No space for a terminating NUL byte */
 1405|      0|    }
 1406|  1.00M|    (*val)[data_length] = '\0';
 1407|       |
 1408|  1.00M|    return ret;
 1409|  1.00M|}
OSSL_PARAM_get_octet_string:
 1413|  4.18k|{
 1414|  4.18k|    return get_string_internal(p, val, &max_len, used_len,
 1415|  4.18k|        OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  4.18k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1416|  4.18k|}
OSSL_PARAM_set_octet_string:
 1452|  4.19k|{
 1453|  4.19k|    if (p == NULL || val == NULL) {
  ------------------
  |  Branch (1453:9): [True: 0, False: 4.19k]
  |  Branch (1453:22): [True: 0, False: 4.19k]
  ------------------
 1454|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|      0|        return 0;
 1456|      0|    }
 1457|  4.19k|    p->return_size = 0;
 1458|  4.19k|    return set_string_internal(p, val, len, OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  4.19k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1459|  4.19k|}
OSSL_PARAM_construct_utf8_string:
 1463|  2.52M|{
 1464|  2.52M|    if (buf != NULL && bsize == 0)
  ------------------
  |  Branch (1464:9): [True: 2.52M, False: 0]
  |  Branch (1464:24): [True: 2.52M, False: 0]
  ------------------
 1465|  2.52M|        bsize = strlen(buf);
 1466|  2.52M|    return ossl_param_construct(key, OSSL_PARAM_UTF8_STRING, buf, bsize);
  ------------------
  |  |  117|  2.52M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1467|  2.52M|}
OSSL_PARAM_construct_octet_string:
 1471|  1.01M|{
 1472|  1.01M|    return ossl_param_construct(key, OSSL_PARAM_OCTET_STRING, buf, bsize);
  ------------------
  |  |  123|  1.01M|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1473|  1.01M|}
OSSL_PARAM_construct_end:
 1665|  1.74M|{
 1666|  1.74M|    OSSL_PARAM end = OSSL_PARAM_END;
  ------------------
  |  |   25|  1.74M|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1667|       |
 1668|  1.74M|    return end;
 1669|  1.74M|}
OSSL_PARAM_get_utf8_string_ptr:
 1694|  1.51M|{
 1695|  1.51M|    return get_string_ptr_internal(p, (const void **)val, NULL,
 1696|  1.51M|        OSSL_PARAM_UTF8_PTR,
  ------------------
  |  |  141|  1.51M|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
 1697|  1.51M|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|  1.51M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1698|  1.51M|}
params.c:ossl_param_construct:
   70|  7.82M|{
   71|  7.82M|    OSSL_PARAM res;
   72|       |
   73|  7.82M|    res.key = key;
   74|  7.82M|    res.data_type = data_type;
   75|  7.82M|    res.data = data;
   76|  7.82M|    res.data_size = data_size;
   77|  7.82M|    res.return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  7.82M|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
   78|  7.82M|    return res;
   79|  7.82M|}
params.c:get_string_internal:
 1333|  1.01M|{
 1334|  1.01M|    size_t sz, alloc_sz;
 1335|       |
 1336|  1.01M|    if ((val == NULL && used_len == NULL) || p == NULL) {
  ------------------
  |  Branch (1336:10): [True: 0, False: 1.01M]
  |  Branch (1336:25): [True: 0, False: 0]
  |  Branch (1336:46): [True: 0, False: 1.01M]
  ------------------
 1337|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1338|      0|        return 0;
 1339|      0|    }
 1340|  1.01M|    if (p->data_type != type) {
  ------------------
  |  Branch (1340:9): [True: 0, False: 1.01M]
  ------------------
 1341|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1342|      0|        return 0;
 1343|      0|    }
 1344|       |
 1345|  1.01M|    sz = p->data_size;
 1346|       |    /*
 1347|       |     * If the input size is 0, or the input string needs NUL byte
 1348|       |     * termination, allocate an extra byte.
 1349|       |     */
 1350|  1.01M|    alloc_sz = sz + (type == OSSL_PARAM_UTF8_STRING || sz == 0);
  ------------------
  |  |  117|  2.02M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1350:22): [True: 1.00M, False: 4.18k]
  |  Branch (1350:56): [True: 0, False: 4.18k]
  ------------------
 1351|       |
 1352|  1.01M|    if (used_len != NULL)
  ------------------
  |  Branch (1352:9): [True: 4.18k, False: 1.00M]
  ------------------
 1353|  4.18k|        *used_len = sz;
 1354|       |
 1355|  1.01M|    if (p->data == NULL) {
  ------------------
  |  Branch (1355:9): [True: 0, False: 1.01M]
  ------------------
 1356|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1357|      0|        return 0;
 1358|      0|    }
 1359|       |
 1360|  1.01M|    if (val == NULL)
  ------------------
  |  Branch (1360:9): [True: 0, False: 1.01M]
  ------------------
 1361|      0|        return 1;
 1362|       |
 1363|  1.01M|    if (*val == NULL) {
  ------------------
  |  Branch (1363:9): [True: 1.00M, False: 4.19k]
  ------------------
 1364|  1.00M|        char *const q = OPENSSL_malloc(alloc_sz);
  ------------------
  |  |  107|  1.00M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1365|       |
 1366|  1.00M|        if (q == NULL)
  ------------------
  |  Branch (1366:13): [True: 0, False: 1.00M]
  ------------------
 1367|      0|            return 0;
 1368|  1.00M|        *val = q;
 1369|  1.00M|        *max_len = alloc_sz;
 1370|  1.00M|    }
 1371|       |
 1372|  1.01M|    if (*max_len < sz) {
  ------------------
  |  Branch (1372:9): [True: 0, False: 1.01M]
  ------------------
 1373|      0|        err_too_small;
  ------------------
  |  |   34|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1374|      0|        return 0;
 1375|      0|    }
 1376|  1.01M|    memcpy(*val, p->data, sz);
 1377|  1.01M|    return 1;
 1378|  1.01M|}
params.c:set_string_internal:
 1420|  4.19k|{
 1421|  4.19k|    if (p->data_type != type) {
  ------------------
  |  Branch (1421:9): [True: 0, False: 4.19k]
  ------------------
 1422|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1423|      0|        return 0;
 1424|      0|    }
 1425|  4.19k|    p->return_size = len;
 1426|  4.19k|    if (p->data == NULL)
  ------------------
  |  Branch (1426:9): [True: 2.09k, False: 2.09k]
  ------------------
 1427|  2.09k|        return 1;
 1428|  2.09k|    if (p->data_size < len) {
  ------------------
  |  Branch (1428:9): [True: 0, False: 2.09k]
  ------------------
 1429|      0|        err_too_small;
  ------------------
  |  |   34|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1430|      0|        return 0;
 1431|      0|    }
 1432|       |
 1433|  2.09k|    memcpy(p->data, val, len);
 1434|       |    /* If possible within the size of p->data, add a NUL terminator byte */
 1435|  2.09k|    if (type == OSSL_PARAM_UTF8_STRING && p->data_size > len)
  ------------------
  |  |  117|  4.19k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1435:9): [True: 0, False: 2.09k]
  |  Branch (1435:43): [True: 0, False: 0]
  ------------------
 1436|      0|        ((char *)p->data)[len] = '\0';
 1437|  2.09k|    return 1;
 1438|  2.09k|}
params.c:get_string_ptr_internal:
 1674|  1.51M|{
 1675|  1.51M|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (1675:9): [True: 0, False: 1.51M]
  |  Branch (1675:24): [True: 0, False: 1.51M]
  ------------------
 1676|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1677|      0|        return 0;
 1678|      0|    }
 1679|       |
 1680|  1.51M|    if (p->data_type == ref_type)
  ------------------
  |  Branch (1680:9): [True: 0, False: 1.51M]
  ------------------
 1681|      0|        return get_ptr_internal_skip_checks(p, (const void **)val, used_len);
 1682|       |
 1683|  1.51M|    if (p->data_type != type) {
  ------------------
  |  Branch (1683:9): [True: 0, False: 1.51M]
  ------------------
 1684|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1685|      0|        return 0;
 1686|      0|    }
 1687|  1.51M|    if (used_len != NULL)
  ------------------
  |  Branch (1687:9): [True: 0, False: 1.51M]
  ------------------
 1688|      0|        *used_len = p->data_size;
 1689|  1.51M|    *val = p->data;
 1690|  1.51M|    return 1;
 1691|  1.51M|}

ossl_param_bytes_to_blocks:
   31|  9.25k|{
   32|  9.25k|    return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  9.25k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
                  return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  9.25k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
   33|  9.25k|}
ossl_param_set_secure_block:
   56|  4.62k|{
   57|  4.62k|    last->key = NULL;
   58|  4.62k|    last->data_size = secure_buffer_sz;
   59|  4.62k|    last->data = secure_buffer;
   60|  4.62k|    last->data_type = OSSL_PARAM_ALLOCATED_END;
  ------------------
  |  |   16|  4.62k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
   61|  4.62k|}
OSSL_PARAM_free:
  234|    441|{
  235|    441|    if (params != NULL) {
  ------------------
  |  Branch (235:9): [True: 441, False: 0]
  ------------------
  236|    441|        OSSL_PARAM *p;
  237|       |
  238|    882|        for (p = params; p->key != NULL; p++)
  ------------------
  |  Branch (238:26): [True: 441, False: 441]
  ------------------
  239|    441|            ;
  240|    441|        if (p->data_type == OSSL_PARAM_ALLOCATED_END)
  ------------------
  |  |   16|    441|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
  |  Branch (240:13): [True: 441, False: 0]
  ------------------
  241|    441|            OPENSSL_secure_clear_free(p->data, p->data_size);
  ------------------
  |  |  150|    441|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|    441|        OPENSSL_free(params);
  ------------------
  |  |  132|    441|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  243|    441|    }
  244|    441|}
OSSL_PARAM_clear_free:
  247|  4.18k|{
  248|  4.18k|    if (params != NULL) {
  ------------------
  |  Branch (248:9): [True: 4.18k, False: 0]
  ------------------
  249|  4.18k|        OSSL_PARAM *p;
  250|       |
  251|  8.37k|        for (p = params; p->key != NULL; p++)
  ------------------
  |  Branch (251:26): [True: 4.18k, False: 4.18k]
  ------------------
  252|  4.18k|            ;
  253|  4.18k|        if (p->data_type == OSSL_PARAM_ALLOCATED_END)
  ------------------
  |  |   16|  4.18k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
  |  Branch (253:13): [True: 4.18k, False: 0]
  ------------------
  254|  4.18k|            OPENSSL_secure_clear_free(p->data, p->data_size);
  ------------------
  |  |  150|  4.18k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  255|  4.18k|        if (p->return_size > 0 && p->return_size != OSSL_PARAM_UNMODIFIED)
  ------------------
  |  |   22|  4.18k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (255:13): [True: 4.18k, False: 0]
  |  Branch (255:35): [True: 4.18k, False: 0]
  ------------------
  256|  4.18k|            OPENSSL_cleanse(params, p->return_size);
  257|  4.18k|        OPENSSL_free(params);
  ------------------
  |  |  132|  4.18k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|  4.18k|    }
  259|  4.18k|}

ossl_pw_clear_passphrase_data:
   17|   503k|{
   18|   503k|    if (data != NULL) {
  ------------------
  |  Branch (18:9): [True: 503k, False: 0]
  ------------------
   19|   503k|        if (data->type == is_expl_passphrase)
  ------------------
  |  Branch (19:13): [True: 0, False: 503k]
  ------------------
   20|      0|            OPENSSL_clear_free(data->_.expl_passphrase.passphrase_copy,
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   21|   503k|                data->_.expl_passphrase.passphrase_len);
   22|   503k|        ossl_pw_clear_passphrase_cache(data);
   23|   503k|        memset(data, 0, sizeof(*data));
   24|   503k|    }
   25|   503k|}
ossl_pw_clear_passphrase_cache:
   28|  1.00M|{
   29|  1.00M|    OPENSSL_clear_free(data->cached_passphrase, data->cached_passphrase_len);
  ------------------
  |  |  130|  1.00M|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   30|       |    data->cached_passphrase = NULL;
   31|  1.00M|}
ossl_pw_enable_passphrase_caching:
   94|   503k|{
   95|   503k|    data->flag_cache_passphrase = 1;
   96|   503k|    return 1;
   97|   503k|}

ossl_err_load_PEM_strings:
   70|      1|{
   71|      1|#ifndef OPENSSL_NO_ERR
   72|      1|    if (ERR_reason_error_string(PEM_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (72:9): [True: 1, False: 0]
  ------------------
   73|      1|        ERR_load_strings_const(PEM_str_reasons);
   74|      1|#endif
   75|      1|    return 1;
   76|      1|}

PEM_X509_INFO_read_bio_ex:
   56|  4.18k|{
   57|  4.18k|    X509_INFO *xi = NULL;
   58|  4.18k|    char *name = NULL, *header = NULL, *str;
   59|  4.18k|    void *pp;
   60|  4.18k|    unsigned char *data = NULL;
   61|  4.18k|    const unsigned char *p;
   62|  4.18k|    long len, error = 0;
   63|  4.18k|    int ok = 0;
   64|  4.18k|    STACK_OF(X509_INFO) *ret = NULL;
  ------------------
  |  |   33|  4.18k|#define STACK_OF(type) struct stack_st_##type
  ------------------
   65|  4.18k|    unsigned int i, raw, ptype;
   66|  4.18k|    d2i_of_void *d2i = 0;
   67|       |
   68|  4.18k|    if (sk == NULL) {
  ------------------
  |  Branch (68:9): [True: 4.18k, False: 0]
  ------------------
   69|  4.18k|        if ((ret = sk_X509_INFO_new_null()) == NULL) {
  ------------------
  |  |  400|  4.18k|#define sk_X509_INFO_new_null() ((STACK_OF(X509_INFO) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_INFO_freefunc_thunk))
  ------------------
  |  Branch (69:13): [True: 0, False: 4.18k]
  ------------------
   70|      0|            ERR_raise(ERR_LIB_PEM, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|            goto err;
   72|      0|        }
   73|  4.18k|    } else
   74|      0|        ret = sk;
   75|       |
   76|  4.18k|    if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 4.18k]
  ------------------
   77|      0|        goto err;
   78|   507k|    for (;;) {
   79|   507k|        raw = 0;
   80|   507k|        ptype = 0;
   81|   507k|        ERR_set_mark();
   82|   507k|        i = PEM_read_bio(bp, &name, &header, &data, &len);
   83|   507k|        if (i == 0) {
  ------------------
  |  Branch (83:13): [True: 4.18k, False: 503k]
  ------------------
   84|  4.18k|            error = ERR_GET_REASON(ERR_peek_last_error());
   85|  4.18k|            if (error == PEM_R_NO_START_LINE) {
  ------------------
  |  |   44|  4.18k|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (85:17): [True: 4.18k, False: 0]
  ------------------
   86|  4.18k|                ERR_pop_to_mark();
   87|  4.18k|                break;
   88|  4.18k|            }
   89|      0|            ERR_clear_last_mark();
   90|      0|            goto err;
   91|  4.18k|        }
   92|   503k|        ERR_clear_last_mark();
   93|  1.00M|    start:
   94|  1.00M|        if (strcmp(name, PEM_STRING_X509) == 0
  ------------------
  |  |   36|  1.00M|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
  |  Branch (94:13): [True: 1.00M, False: 0]
  ------------------
   95|      0|            || strcmp(name, PEM_STRING_X509_OLD) == 0
  ------------------
  |  |   35|      0|#define PEM_STRING_X509_OLD "X509 CERTIFICATE"
  ------------------
  |  Branch (95:16): [True: 0, False: 0]
  ------------------
   96|  1.00M|            || strcmp(name, PEM_STRING_X509_TRUSTED) == 0) {
  ------------------
  |  |   37|      0|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (96:16): [True: 0, False: 0]
  ------------------
   97|  1.00M|            if (xi->x509 != NULL) {
  ------------------
  |  Branch (97:17): [True: 499k, False: 503k]
  ------------------
   98|   499k|                if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|   499k|#define sk_X509_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
  ------------------
  |  Branch (98:21): [True: 0, False: 499k]
  ------------------
   99|      0|                    goto err;
  100|   499k|                if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (100:21): [True: 0, False: 499k]
  ------------------
  101|      0|                    goto err;
  102|   499k|                goto start;
  103|   499k|            }
  104|   503k|            if ((strcmp(name, PEM_STRING_X509_TRUSTED) == 0))
  ------------------
  |  |   37|   503k|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (104:17): [True: 0, False: 503k]
  ------------------
  105|      0|                d2i = (D2I_OF(void))d2i_X509_AUX;
  106|   503k|            else
  107|   503k|                d2i = (D2I_OF(void))d2i_X509;
  108|   503k|            xi->x509 = X509_new_ex(libctx, propq);
  109|   503k|            if (xi->x509 == NULL)
  ------------------
  |  Branch (109:17): [True: 0, False: 503k]
  ------------------
  110|      0|                goto err;
  111|   503k|            pp = &(xi->x509);
  112|   503k|        } else if (strcmp(name, PEM_STRING_X509_CRL) == 0) {
  ------------------
  |  |   40|      0|#define PEM_STRING_X509_CRL "X509 CRL"
  ------------------
  |  Branch (112:20): [True: 0, False: 0]
  ------------------
  113|      0|            d2i = (D2I_OF(void))d2i_X509_CRL;
  114|      0|            if (xi->crl != NULL) {
  ------------------
  |  Branch (114:17): [True: 0, False: 0]
  ------------------
  115|      0|                if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|      0|#define sk_X509_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
  ------------------
  |  Branch (115:21): [True: 0, False: 0]
  ------------------
  116|      0|                    goto err;
  117|      0|                if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (117:21): [True: 0, False: 0]
  ------------------
  118|      0|                    goto err;
  119|      0|                goto start;
  120|      0|            }
  121|      0|            pp = &(xi->crl);
  122|      0|        } else if ((str = strstr(name, PEM_STRING_PKCS8INF)) != NULL) {
  ------------------
  |  |   50|      0|#define PEM_STRING_PKCS8INF "PRIVATE KEY"
  ------------------
  |  Branch (122:20): [True: 0, False: 0]
  ------------------
  123|      0|            if (xi->x_pkey != NULL) {
  ------------------
  |  Branch (123:17): [True: 0, False: 0]
  ------------------
  124|      0|                if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|      0|#define sk_X509_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
  ------------------
  |  Branch (124:21): [True: 0, False: 0]
  ------------------
  125|      0|                    goto err;
  126|      0|                if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (126:21): [True: 0, False: 0]
  ------------------
  127|      0|                    goto err;
  128|      0|                goto start;
  129|      0|            }
  130|      0|            if (str == name || strcmp(name, PEM_STRING_PKCS8) == 0) {
  ------------------
  |  |   49|      0|#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY"
  ------------------
  |  Branch (130:17): [True: 0, False: 0]
  |  Branch (130:32): [True: 0, False: 0]
  ------------------
  131|      0|                ptype = EVP_PKEY_NONE;
  ------------------
  |  |   62|      0|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|      0|#define NID_undef                       0
  |  |  ------------------
  ------------------
  132|      0|            } else {
  133|       |                /* chop " PRIVATE KEY" */
  134|      0|                *--str = '\0';
  135|      0|                ptype = evp_pkey_name2type(name);
  136|      0|            }
  137|      0|            xi->enc_data = NULL;
  138|      0|            xi->enc_len = 0;
  139|       |
  140|      0|            d2i = (D2I_OF(void))d2i_AutoPrivateKey;
  141|      0|            xi->x_pkey = X509_PKEY_new();
  142|      0|            if (xi->x_pkey == NULL)
  ------------------
  |  Branch (142:17): [True: 0, False: 0]
  ------------------
  143|      0|                goto err;
  144|      0|            pp = &xi->x_pkey->dec_pkey;
  145|      0|            if ((int)strlen(header) > 10 /* assume encrypted */
  ------------------
  |  Branch (145:17): [True: 0, False: 0]
  ------------------
  146|      0|                || strcmp(name, PEM_STRING_PKCS8) == 0)
  ------------------
  |  |   49|      0|#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY"
  ------------------
  |  Branch (146:20): [True: 0, False: 0]
  ------------------
  147|      0|                raw = 1;
  148|      0|        } else { /* unknown */
  149|      0|            d2i = NULL;
  150|      0|            pp = NULL;
  151|      0|        }
  152|       |
  153|   503k|        if (d2i != NULL) {
  ------------------
  |  Branch (153:13): [True: 503k, False: 0]
  ------------------
  154|   503k|            if (!raw) {
  ------------------
  |  Branch (154:17): [True: 503k, False: 0]
  ------------------
  155|   503k|                EVP_CIPHER_INFO cipher;
  156|       |
  157|   503k|                if (!PEM_get_EVP_CIPHER_INFO(header, &cipher))
  ------------------
  |  Branch (157:21): [True: 0, False: 503k]
  ------------------
  158|      0|                    goto err;
  159|   503k|                if (!PEM_do_header(&cipher, data, &len, cb, u))
  ------------------
  |  Branch (159:21): [True: 0, False: 503k]
  ------------------
  160|      0|                    goto err;
  161|   503k|                p = data;
  162|   503k|                if (ptype) {
  ------------------
  |  Branch (162:21): [True: 0, False: 503k]
  ------------------
  163|      0|                    if (d2i_PrivateKey_ex(ptype, pp, &p, len,
  ------------------
  |  Branch (163:25): [True: 0, False: 0]
  ------------------
  164|      0|                            libctx, propq)
  165|      0|                        == NULL) {
  166|      0|                        ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  167|      0|                        goto err;
  168|      0|                    }
  169|   503k|                } else if (d2i(pp, &p, len) == NULL) {
  ------------------
  |  Branch (169:28): [True: 0, False: 503k]
  ------------------
  170|      0|                    ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  171|      0|                    goto err;
  172|      0|                }
  173|   503k|            } else { /* encrypted key data */
  174|      0|                if (!PEM_get_EVP_CIPHER_INFO(header, &xi->enc_cipher))
  ------------------
  |  Branch (174:21): [True: 0, False: 0]
  ------------------
  175|      0|                    goto err;
  176|      0|                xi->enc_data = (char *)data;
  177|      0|                xi->enc_len = (int)len;
  178|      0|                data = NULL;
  179|      0|            }
  180|   503k|        }
  181|   503k|        OPENSSL_free(name);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  182|   503k|        name = NULL;
  183|   503k|        OPENSSL_free(header);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|   503k|        header = NULL;
  185|   503k|        OPENSSL_free(data);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  186|   503k|        data = NULL;
  187|   503k|    }
  188|       |
  189|       |    /*
  190|       |     * if the last one hasn't been pushed yet and there is anything in it
  191|       |     * then add it to the stack ...
  192|       |     */
  193|  4.18k|    if ((xi->x509 != NULL) || (xi->crl != NULL) || (xi->x_pkey != NULL) || (xi->enc_data != NULL)) {
  ------------------
  |  Branch (193:9): [True: 4.16k, False: 29]
  |  Branch (193:31): [True: 0, False: 29]
  |  Branch (193:52): [True: 0, False: 29]
  |  Branch (193:76): [True: 0, False: 29]
  ------------------
  194|  4.16k|        if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|  4.16k|#define sk_X509_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
  ------------------
  |  Branch (194:13): [True: 0, False: 4.16k]
  ------------------
  195|      0|            goto err;
  196|  4.16k|        xi = NULL;
  197|  4.16k|    }
  198|  4.18k|    ok = 1;
  199|  4.18k|err:
  200|  4.18k|    X509_INFO_free(xi);
  201|  4.18k|    if (!ok) {
  ------------------
  |  Branch (201:9): [True: 0, False: 4.18k]
  ------------------
  202|      0|        for (i = 0; ((int)i) < sk_X509_INFO_num(ret); i++) {
  ------------------
  |  |  397|      0|#define sk_X509_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_X509_INFO_sk_type(sk))
  ------------------
  |  Branch (202:21): [True: 0, False: 0]
  ------------------
  203|      0|            xi = sk_X509_INFO_value(ret, i);
  ------------------
  |  |  398|      0|#define sk_X509_INFO_value(sk, idx) ((X509_INFO *)OPENSSL_sk_value(ossl_check_const_X509_INFO_sk_type(sk), (idx)))
  ------------------
  204|      0|            X509_INFO_free(xi);
  205|      0|        }
  206|      0|        if (ret != sk)
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|            sk_X509_INFO_free(ret);
  ------------------
  |  |  403|      0|#define sk_X509_INFO_free(sk) OPENSSL_sk_free(ossl_check_X509_INFO_sk_type(sk))
  ------------------
  208|      0|        ret = NULL;
  209|      0|    }
  210|       |
  211|  4.18k|    OPENSSL_free(name);
  ------------------
  |  |  132|  4.18k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|  4.18k|    OPENSSL_free(header);
  ------------------
  |  |  132|  4.18k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  213|  4.18k|    OPENSSL_free(data);
  ------------------
  |  |  132|  4.18k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  214|  4.18k|    return ret;
  215|  4.18k|}

PEM_bytes_read_bio:
  285|  3.73k|{
  286|  3.73k|    return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u,
  287|  3.73k|        PEM_FLAG_EAY_COMPATIBLE);
  ------------------
  |  |  383|  3.73k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
  288|  3.73k|}
PEM_do_header:
  443|   503k|{
  444|   503k|    int ok;
  445|   503k|    int keylen;
  446|   503k|    long len = *plen;
  447|   503k|    int ilen = (int)len; /* EVP_DecryptUpdate etc. take int lengths */
  448|   503k|    EVP_CIPHER_CTX *ctx;
  449|   503k|    unsigned char key[EVP_MAX_KEY_LENGTH];
  450|   503k|    char buf[PEM_BUFSIZE];
  451|       |
  452|   503k|#if LONG_MAX > INT_MAX
  453|       |    /* Check that we did not truncate the length */
  454|   503k|    if (len > INT_MAX) {
  ------------------
  |  Branch (454:9): [True: 0, False: 503k]
  ------------------
  455|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_HEADER_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  456|      0|        return 0;
  457|      0|    }
  458|   503k|#endif
  459|       |
  460|   503k|    if (cipher->cipher == NULL)
  ------------------
  |  Branch (460:9): [True: 503k, False: 0]
  ------------------
  461|   503k|        return 1;
  462|      0|    if (callback == NULL)
  ------------------
  |  Branch (462:9): [True: 0, False: 0]
  ------------------
  463|      0|        keylen = PEM_def_callback(buf, PEM_BUFSIZE, 0, u);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  464|      0|    else
  465|      0|        keylen = callback(buf, PEM_BUFSIZE, 0, u);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  466|      0|    if (keylen < 0) {
  ------------------
  |  Branch (466:9): [True: 0, False: 0]
  ------------------
  467|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_PASSWORD_READ);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  468|      0|        return 0;
  469|      0|    }
  470|       |#ifdef CHARSET_EBCDIC
  471|       |    /* Convert the pass phrase from EBCDIC */
  472|       |    ebcdic2ascii(buf, buf, keylen);
  473|       |#endif
  474|       |
  475|      0|    if (!EVP_BytesToKey(cipher->cipher, EVP_md5(), &(cipher->iv[0]),
  ------------------
  |  Branch (475:9): [True: 0, False: 0]
  ------------------
  476|      0|            (unsigned char *)buf, keylen, 1, key, NULL))
  477|      0|        return 0;
  478|       |
  479|      0|    ctx = EVP_CIPHER_CTX_new();
  480|      0|    if (ctx == NULL)
  ------------------
  |  Branch (480:9): [True: 0, False: 0]
  ------------------
  481|      0|        return 0;
  482|       |
  483|      0|    ok = EVP_DecryptInit_ex(ctx, cipher->cipher, NULL, key, &(cipher->iv[0]));
  484|      0|    if (ok)
  ------------------
  |  Branch (484:9): [True: 0, False: 0]
  ------------------
  485|      0|        ok = EVP_DecryptUpdate(ctx, data, &ilen, data, ilen);
  486|      0|    if (ok) {
  ------------------
  |  Branch (486:9): [True: 0, False: 0]
  ------------------
  487|       |        /* Squirrel away the length of data decrypted so far. */
  488|      0|        *plen = ilen;
  489|      0|        ok = EVP_DecryptFinal_ex(ctx, &(data[ilen]), &ilen);
  490|      0|    }
  491|      0|    if (ok)
  ------------------
  |  Branch (491:9): [True: 0, False: 0]
  ------------------
  492|      0|        *plen += ilen;
  493|      0|    else
  494|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_DECRYPT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  495|       |
  496|      0|    EVP_CIPHER_CTX_free(ctx);
  497|      0|    OPENSSL_cleanse((char *)buf, sizeof(buf));
  498|      0|    OPENSSL_cleanse((char *)key, sizeof(key));
  499|      0|    return ok;
  500|      0|}
PEM_get_EVP_CIPHER_INFO:
  518|   503k|{
  519|   503k|    const EVP_CIPHER *enc = NULL;
  520|   503k|    int ivlen;
  521|   503k|    char *dekinfostart, c;
  522|       |
  523|   503k|    cipher->cipher = NULL;
  524|   503k|    memset(cipher->iv, 0, sizeof(cipher->iv));
  525|   503k|    if ((header == NULL) || (*header == '\0') || (*header == '\n'))
  ------------------
  |  Branch (525:9): [True: 0, False: 503k]
  |  Branch (525:29): [True: 503k, False: 0]
  |  Branch (525:50): [True: 0, False: 0]
  ------------------
  526|   503k|        return 1;
  527|       |
  528|      0|    if (!CHECK_AND_SKIP_PREFIX(header, PROC_TYPE)) {
  ------------------
  |  |   61|      0|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (528:9): [True: 0, False: 0]
  ------------------
  529|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_NOT_PROC_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  530|      0|        return 0;
  531|      0|    }
  532|      0|    header += strspn(header, " \t");
  533|       |
  534|      0|    if (*header++ != '4' || *header++ != ',')
  ------------------
  |  Branch (534:9): [True: 0, False: 0]
  |  Branch (534:29): [True: 0, False: 0]
  ------------------
  535|      0|        return 0;
  536|      0|    header += strspn(header, " \t");
  537|       |
  538|       |    /* We expect "ENCRYPTED" followed by optional white-space + line break */
  539|      0|    if (!CHECK_AND_SKIP_PREFIX(header, ENCRYPTED) || strspn(header, " \t\r\n") == 0) {
  ------------------
  |  |   61|      0|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (539:9): [True: 0, False: 0]
  |  Branch (539:54): [True: 0, False: 0]
  ------------------
  540|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_NOT_ENCRYPTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  541|      0|        return 0;
  542|      0|    }
  543|      0|    header += strspn(header, " \t\r");
  544|      0|    if (*header++ != '\n') {
  ------------------
  |  Branch (544:9): [True: 0, False: 0]
  ------------------
  545|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_SHORT_HEADER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  546|      0|        return 0;
  547|      0|    }
  548|       |
  549|       |    /*-
  550|       |     * https://tools.ietf.org/html/rfc1421#section-4.6.1.3
  551|       |     * We expect "DEK-Info: algo[,hex-parameters]"
  552|       |     */
  553|      0|    if (!CHECK_AND_SKIP_PREFIX(header, DEK_INFO)) {
  ------------------
  |  |   61|      0|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (553:9): [True: 0, False: 0]
  ------------------
  554|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_NOT_DEK_INFO);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  555|      0|        return 0;
  556|      0|    }
  557|      0|    header += strspn(header, " \t");
  558|       |
  559|       |    /*
  560|       |     * DEK-INFO is a comma-separated combination of algorithm name and optional
  561|       |     * parameters.
  562|       |     */
  563|      0|    dekinfostart = header;
  564|      0|    header += strcspn(header, " \t,");
  565|      0|    c = *header;
  566|      0|    *header = '\0';
  567|      0|    cipher->cipher = enc = EVP_get_cipherbyname(dekinfostart);
  568|      0|    *header = c;
  569|      0|    header += strspn(header, " \t");
  570|       |
  571|      0|    if (enc == NULL) {
  ------------------
  |  Branch (571:9): [True: 0, False: 0]
  ------------------
  572|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_UNSUPPORTED_ENCRYPTION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  573|      0|        return 0;
  574|      0|    }
  575|      0|    ivlen = EVP_CIPHER_get_iv_length(enc);
  576|      0|    if (ivlen > 0 && *header++ != ',') {
  ------------------
  |  Branch (576:9): [True: 0, False: 0]
  |  Branch (576:22): [True: 0, False: 0]
  ------------------
  577|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_MISSING_DEK_IV);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  578|      0|        return 0;
  579|      0|    } else if (ivlen == 0 && *header == ',') {
  ------------------
  |  Branch (579:16): [True: 0, False: 0]
  |  Branch (579:30): [True: 0, False: 0]
  ------------------
  580|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_UNEXPECTED_DEK_IV);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  581|      0|        return 0;
  582|      0|    }
  583|       |
  584|      0|    if (!load_iv(&header, cipher->iv, EVP_CIPHER_get_iv_length(enc)))
  ------------------
  |  Branch (584:9): [True: 0, False: 0]
  ------------------
  585|      0|        return 0;
  586|       |
  587|      0|    return 1;
  588|      0|}
PEM_read_bio_ex:
  942|   511k|{
  943|   511k|    EVP_ENCODE_CTX *ctx = NULL;
  944|   511k|    const BIO_METHOD *bmeth;
  945|   511k|    BIO *headerB = NULL, *dataB = NULL;
  946|   511k|    char *name = NULL;
  947|   511k|    int len, taillen, headerlen, ret = 0;
  948|   511k|    BUF_MEM *buf_mem;
  949|       |
  950|   511k|    *len_out = 0;
  951|   511k|    *name_out = *header = NULL;
  952|   511k|    *data = NULL;
  953|   511k|    if ((flags & PEM_FLAG_EAY_COMPATIBLE) && (flags & PEM_FLAG_ONLY_B64)) {
  ------------------
  |  |  383|   511k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
                  if ((flags & PEM_FLAG_EAY_COMPATIBLE) && (flags & PEM_FLAG_ONLY_B64)) {
  ------------------
  |  |  384|   511k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  |  Branch (953:9): [True: 511k, False: 0]
  |  Branch (953:46): [True: 0, False: 511k]
  ------------------
  954|       |        /* These two are mutually incompatible; bail out. */
  955|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  956|      0|        goto end;
  957|      0|    }
  958|   511k|    bmeth = (flags & PEM_FLAG_SECURE) ? BIO_s_secmem() : BIO_s_mem();
  ------------------
  |  |  382|   511k|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (958:13): [True: 0, False: 511k]
  ------------------
  959|       |
  960|   511k|    headerB = BIO_new(bmeth);
  961|   511k|    dataB = BIO_new(bmeth);
  962|   511k|    if (headerB == NULL || dataB == NULL) {
  ------------------
  |  Branch (962:9): [True: 0, False: 511k]
  |  Branch (962:28): [True: 0, False: 511k]
  ------------------
  963|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_BIO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  964|      0|        goto end;
  965|      0|    }
  966|       |
  967|   511k|    if (!get_name(bp, &name, flags))
  ------------------
  |  Branch (967:9): [True: 7.92k, False: 503k]
  ------------------
  968|  7.92k|        goto end;
  969|   503k|    if (!get_header_and_data(bp, &headerB, &dataB, name, flags))
  ------------------
  |  Branch (969:9): [True: 0, False: 503k]
  ------------------
  970|      0|        goto end;
  971|       |
  972|   503k|    BIO_get_mem_ptr(dataB, &buf_mem);
  ------------------
  |  |  627|   503k|#define BIO_get_mem_ptr(b, pp) BIO_ctrl(b, BIO_C_GET_BUF_MEM_PTR, 0, \
  |  |  ------------------
  |  |  |  |  458|   503k|#define BIO_C_GET_BUF_MEM_PTR 115
  |  |  ------------------
  |  |  628|   503k|    (char *)(pp))
  ------------------
  973|   503k|    if (buf_mem->length > INT_MAX) {
  ------------------
  |  Branch (973:9): [True: 0, False: 503k]
  ------------------
  974|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_BASE64_DECODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  975|      0|        goto end;
  976|      0|    }
  977|   503k|    len = (int)buf_mem->length;
  978|       |
  979|       |    /* There was no data in the PEM file */
  980|   503k|    if (len == 0)
  ------------------
  |  Branch (980:9): [True: 0, False: 503k]
  ------------------
  981|      0|        goto end;
  982|       |
  983|   503k|    ctx = EVP_ENCODE_CTX_new();
  984|   503k|    if (ctx == NULL) {
  ------------------
  |  Branch (984:9): [True: 0, False: 503k]
  ------------------
  985|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  986|      0|        goto end;
  987|      0|    }
  988|       |
  989|   503k|    EVP_DecodeInit(ctx);
  990|   503k|    if (EVP_DecodeUpdate(ctx, (unsigned char *)buf_mem->data, &len,
  ------------------
  |  Branch (990:9): [True: 0, False: 503k]
  ------------------
  991|   503k|            (unsigned char *)buf_mem->data, len)
  992|   503k|            < 0
  993|   503k|        || EVP_DecodeFinal(ctx, (unsigned char *)&(buf_mem->data[len]),
  ------------------
  |  Branch (993:12): [True: 0, False: 503k]
  ------------------
  994|   503k|               &taillen)
  995|   503k|            < 0) {
  996|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_BASE64_DECODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  997|      0|        goto end;
  998|      0|    }
  999|   503k|    len += taillen;
 1000|   503k|    buf_mem->length = len;
 1001|       |
 1002|   503k|    headerlen = BIO_get_mem_data(headerB, NULL);
  ------------------
  |  |  625|   503k|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|   503k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
 1003|   503k|    *header = PEM_MALLOC(headerlen + 1, flags);
  ------------------
  |  |  231|   503k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1004|   503k|    *data = PEM_MALLOC(len, flags);
  ------------------
  |  |  231|   503k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1005|   503k|    if (*header == NULL || *data == NULL)
  ------------------
  |  Branch (1005:9): [True: 0, False: 503k]
  |  Branch (1005:28): [True: 0, False: 503k]
  ------------------
 1006|      0|        goto out_free;
 1007|   503k|    if (headerlen != 0 && BIO_read(headerB, *header, headerlen) != headerlen)
  ------------------
  |  Branch (1007:9): [True: 0, False: 503k]
  |  Branch (1007:27): [True: 0, False: 0]
  ------------------
 1008|      0|        goto out_free;
 1009|   503k|    (*header)[headerlen] = '\0';
 1010|   503k|    if (BIO_read(dataB, *data, len) != len)
  ------------------
  |  Branch (1010:9): [True: 0, False: 503k]
  ------------------
 1011|      0|        goto out_free;
 1012|   503k|    *len_out = len;
 1013|   503k|    *name_out = name;
 1014|   503k|    name = NULL;
 1015|   503k|    ret = 1;
 1016|   503k|    goto end;
 1017|       |
 1018|      0|out_free:
 1019|      0|    PEM_FREE(*header, flags, 0);
  ------------------
  |  |  220|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1020|      0|    *header = NULL;
 1021|      0|    PEM_FREE(*data, flags, 0);
  ------------------
  |  |  220|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1022|      0|    *data = NULL;
 1023|   511k|end:
 1024|   511k|    EVP_ENCODE_CTX_free(ctx);
 1025|   511k|    PEM_FREE(name, flags, 0);
  ------------------
  |  |  220|   511k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1026|   511k|    BIO_free(headerB);
 1027|   511k|    BIO_free(dataB);
 1028|   511k|    return ret;
 1029|      0|}
PEM_read_bio:
 1033|   507k|{
 1034|   507k|    return PEM_read_bio_ex(bp, name, header, data, len, PEM_FLAG_EAY_COMPATIBLE);
  ------------------
  |  |  383|   507k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
 1035|   507k|}
pem_lib.c:pem_bytes_read_bio_flags:
  243|  3.73k|{
  244|  3.73k|    EVP_CIPHER_INFO cipher;
  245|  3.73k|    char *nm = NULL, *header = NULL;
  246|  3.73k|    unsigned char *data = NULL;
  247|  3.73k|    long len = 0;
  248|  3.73k|    int ret = 0;
  249|       |
  250|  3.73k|    do {
  251|  3.73k|        PEM_FREE(nm, flags, 0);
  ------------------
  |  |  220|  3.73k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  252|  3.73k|        PEM_FREE(header, flags, 0);
  ------------------
  |  |  220|  3.73k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  253|  3.73k|        PEM_FREE(data, flags, len);
  ------------------
  |  |  220|  3.73k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  254|  3.73k|        if (!PEM_read_bio_ex(bp, &nm, &header, &data, &len, flags)) {
  ------------------
  |  Branch (254:13): [True: 3.73k, False: 0]
  ------------------
  255|  3.73k|            if (ERR_GET_REASON(ERR_peek_error()) == PEM_R_NO_START_LINE)
  ------------------
  |  |   44|  3.73k|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (255:17): [True: 1.83k, False: 1.89k]
  ------------------
  256|  1.83k|                ERR_add_error_data(2, "Expecting: ", name);
  257|  3.73k|            return 0;
  258|  3.73k|        }
  259|  3.73k|    } while (!check_pem(nm, name));
  ------------------
  |  Branch (259:14): [True: 0, False: 0]
  ------------------
  260|      0|    if (!PEM_get_EVP_CIPHER_INFO(header, &cipher))
  ------------------
  |  Branch (260:9): [True: 0, False: 0]
  ------------------
  261|      0|        goto err;
  262|      0|    if (!PEM_do_header(&cipher, data, &len, cb, u))
  ------------------
  |  Branch (262:9): [True: 0, False: 0]
  ------------------
  263|      0|        goto err;
  264|       |
  265|      0|    *pdata = data;
  266|      0|    *plen = len;
  267|       |
  268|      0|    if (pnm != NULL)
  ------------------
  |  Branch (268:9): [True: 0, False: 0]
  ------------------
  269|      0|        *pnm = nm;
  270|       |
  271|      0|    ret = 1;
  272|       |
  273|      0|err:
  274|      0|    if (!ret || pnm == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 0]
  |  Branch (274:17): [True: 0, False: 0]
  ------------------
  275|      0|        PEM_FREE(nm, flags, 0);
  ------------------
  |  |  220|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  276|      0|    PEM_FREE(header, flags, 0);
  ------------------
  |  |  220|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  277|      0|    if (!ret)
  ------------------
  |  Branch (277:9): [True: 0, False: 0]
  ------------------
  278|      0|        PEM_FREE(data, flags, len);
  ------------------
  |  |  220|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  279|      0|    return ret;
  280|      0|}
pem_lib.c:get_name:
  772|   511k|{
  773|   511k|    char *linebuf;
  774|   511k|    int ret = 0;
  775|   511k|    int len;
  776|   511k|    int first_call = 1;
  777|       |
  778|       |    /*
  779|       |     * Need to hold trailing NUL (accounted for by BIO_gets() and the newline
  780|       |     * that will be added by sanitize_line() (the extra '1').
  781|       |     */
  782|   511k|    linebuf = PEM_MALLOC(LINESIZE + 1, flags);
  ------------------
  |  |  231|   511k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  783|   511k|    if (linebuf == NULL)
  ------------------
  |  Branch (783:9): [True: 0, False: 511k]
  ------------------
  784|      0|        return 0;
  785|       |
  786|   511k|    do {
  787|   511k|        len = BIO_gets(bp, linebuf, LINESIZE);
  ------------------
  |  |  763|   511k|#define LINESIZE 255
  ------------------
  788|       |
  789|   511k|        if (len <= 0) {
  ------------------
  |  Branch (789:13): [True: 7.92k, False: 503k]
  ------------------
  790|  7.92k|            ERR_raise(ERR_LIB_PEM, PEM_R_NO_START_LINE);
  ------------------
  |  |  357|  7.92k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  7.92k|    (ERR_new(),                                                  \
  |  |  |  |  360|  7.92k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  7.92k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  7.92k|        ERR_set_error)
  |  |  ------------------
  ------------------
  791|  7.92k|            goto err;
  792|  7.92k|        }
  793|       |
  794|       |        /* Strip trailing garbage and standardize ending. */
  795|   503k|        len = sanitize_line(linebuf, len, flags & ~PEM_FLAG_ONLY_B64, first_call);
  ------------------
  |  |  384|   503k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  796|   503k|        first_call = 0;
  797|       |
  798|       |        /* Allow leading empty or non-matching lines. */
  799|   503k|    } while (!HAS_PREFIX(linebuf, BEGINSTR)
  ------------------
  |  |   58|  1.00M|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (799:14): [True: 0, False: 503k]
  ------------------
  800|   503k|        || len < TAILLEN
  ------------------
  |  |  770|  1.00M|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  767|   503k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  |  Branch (800:12): [True: 0, False: 503k]
  ------------------
  801|   503k|        || !HAS_PREFIX(linebuf + len - TAILLEN, TAILSTR));
  ------------------
  |  |   58|   503k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (801:12): [True: 0, False: 503k]
  ------------------
  802|   503k|    linebuf[len - TAILLEN] = '\0';
  ------------------
  |  |  770|   503k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  767|   503k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  803|   503k|    len = len - BEGINLEN - TAILLEN + 1;
  ------------------
  |  |  768|   503k|#define BEGINLEN ((int)(sizeof(BEGINSTR) - 1))
  |  |  ------------------
  |  |  |  |  765|   503k|#define BEGINSTR "-----BEGIN "
  |  |  ------------------
  ------------------
                  len = len - BEGINLEN - TAILLEN + 1;
  ------------------
  |  |  770|   503k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  767|   503k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  804|   503k|    *name = PEM_MALLOC(len, flags);
  ------------------
  |  |  231|   503k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  805|   503k|    if (*name == NULL)
  ------------------
  |  Branch (805:9): [True: 0, False: 503k]
  ------------------
  806|      0|        goto err;
  807|   503k|    memcpy(*name, linebuf + BEGINLEN, len);
  ------------------
  |  |  768|   503k|#define BEGINLEN ((int)(sizeof(BEGINSTR) - 1))
  |  |  ------------------
  |  |  |  |  765|   503k|#define BEGINSTR "-----BEGIN "
  |  |  ------------------
  ------------------
  808|   503k|    ret = 1;
  809|       |
  810|   511k|err:
  811|   511k|    PEM_FREE(linebuf, flags, LINESIZE + 1);
  ------------------
  |  |  220|   511k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  812|   511k|    return ret;
  813|   503k|}
pem_lib.c:sanitize_line:
  719|  12.4M|{
  720|  12.4M|    int i;
  721|  12.4M|    if (first_call) {
  ------------------
  |  Branch (721:9): [True: 503k, False: 11.9M]
  ------------------
  722|       |        /* Other BOMs imply unsupported multibyte encoding,
  723|       |         * so don't strip them and let the error raise */
  724|   503k|        const unsigned char utf8_bom[3] = { 0xEF, 0xBB, 0xBF };
  725|       |
  726|   503k|        if (len > 3 && memcmp(linebuf, utf8_bom, 3) == 0) {
  ------------------
  |  Branch (726:13): [True: 503k, False: 0]
  |  Branch (726:24): [True: 0, False: 503k]
  ------------------
  727|      0|            memmove(linebuf, linebuf + 3, len - 3);
  728|      0|            linebuf[len - 3] = 0;
  729|      0|            len -= 3;
  730|      0|        }
  731|   503k|    }
  732|       |
  733|  12.4M|    if (flags & PEM_FLAG_EAY_COMPATIBLE) {
  ------------------
  |  |  383|  12.4M|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
  |  Branch (733:9): [True: 12.4M, False: 0]
  ------------------
  734|       |        /* Strip trailing whitespace */
  735|  37.4M|        while ((len >= 0) && (linebuf[len] <= ' '))
  ------------------
  |  Branch (735:16): [True: 37.4M, False: 0]
  |  Branch (735:30): [True: 24.9M, False: 12.4M]
  ------------------
  736|  24.9M|            len--;
  737|       |        /* Go back to whitespace before applying uniform line ending. */
  738|  12.4M|        len++;
  739|  12.4M|    } else if (flags & PEM_FLAG_ONLY_B64) {
  ------------------
  |  |  384|      0|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  |  Branch (739:16): [True: 0, False: 0]
  ------------------
  740|      0|        for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (740:21): [True: 0, False: 0]
  ------------------
  741|      0|            if (!ossl_isbase64(linebuf[i]) || linebuf[i] == '\n'
  ------------------
  |  |   84|      0|#define ossl_isbase64(c) (ossl_ctype_check((c), CTYPE_MASK_base64))
  |  |  ------------------
  |  |  |  |   37|      0|#define CTYPE_MASK_base64 0x400
  |  |  ------------------
  ------------------
  |  Branch (741:17): [True: 0, False: 0]
  |  Branch (741:47): [True: 0, False: 0]
  ------------------
  742|      0|                || linebuf[i] == '\r')
  ------------------
  |  Branch (742:20): [True: 0, False: 0]
  ------------------
  743|      0|                break;
  744|      0|        }
  745|      0|        len = i;
  746|      0|    } else {
  747|       |        /* EVP_DecodeBlock strips leading and trailing whitespace, so just strip
  748|       |         * control characters in-place and let everything through. */
  749|      0|        for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (749:21): [True: 0, False: 0]
  ------------------
  750|      0|            if (linebuf[i] == '\n' || linebuf[i] == '\r')
  ------------------
  |  Branch (750:17): [True: 0, False: 0]
  |  Branch (750:39): [True: 0, False: 0]
  ------------------
  751|      0|                break;
  752|      0|            if (ossl_iscntrl(linebuf[i]))
  ------------------
  |  |   78|      0|#define ossl_iscntrl(c) (ossl_ctype_check((c), CTYPE_MASK_cntrl))
  |  |  ------------------
  |  |  |  |   33|      0|#define CTYPE_MASK_cntrl 0x40
  |  |  ------------------
  |  |  |  Branch (78:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  753|      0|                linebuf[i] = ' ';
  754|      0|        }
  755|      0|        len = i;
  756|      0|    }
  757|       |    /* The caller allocated LINESIZE+1, so this is safe. */
  758|  12.4M|    linebuf[len++] = '\n';
  759|  12.4M|    linebuf[len] = '\0';
  760|  12.4M|    return len;
  761|  12.4M|}
pem_lib.c:get_header_and_data:
  835|   503k|{
  836|   503k|    BIO *tmp = *header;
  837|   503k|    char *linebuf, *p;
  838|   503k|    int len, ret = 0, end = 0, prev_partial_line_read = 0, partial_line_read = 0;
  839|       |    /* 0 if not seen (yet), 1 if reading header, 2 if finished header */
  840|   503k|    enum header_status got_header = MAYBE_HEADER;
  841|   503k|    unsigned int flags_mask;
  842|   503k|    size_t namelen;
  843|       |
  844|       |    /* Need to hold trailing NUL (accounted for by BIO_gets() and the newline
  845|       |     * that will be added by sanitize_line() (the extra '1'). */
  846|   503k|    linebuf = PEM_MALLOC(LINESIZE + 1, flags);
  ------------------
  |  |  231|   503k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  847|   503k|    if (linebuf == NULL)
  ------------------
  |  Branch (847:9): [True: 0, False: 503k]
  ------------------
  848|      0|        return 0;
  849|       |
  850|  11.9M|    while (1) {
  ------------------
  |  Branch (850:12): [True: 11.9M, Folded]
  ------------------
  851|  11.9M|        flags_mask = ~0u;
  852|  11.9M|        len = BIO_gets(bp, linebuf, LINESIZE);
  ------------------
  |  |  763|  11.9M|#define LINESIZE 255
  ------------------
  853|  11.9M|        if (len <= 0) {
  ------------------
  |  Branch (853:13): [True: 0, False: 11.9M]
  ------------------
  854|      0|            ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  855|      0|            goto err;
  856|      0|        }
  857|       |
  858|       |        /*
  859|       |         * Check if line has been read completely or if only part of the line
  860|       |         * has been read. Keep the previous value to ignore newlines that
  861|       |         * appear due to reading a line up until the char before the newline.
  862|       |         */
  863|  11.9M|        prev_partial_line_read = partial_line_read;
  864|  11.9M|        partial_line_read = len == LINESIZE - 1 && linebuf[LINESIZE - 2] != '\n';
  ------------------
  |  |  763|  11.9M|#define LINESIZE 255
  ------------------
                      partial_line_read = len == LINESIZE - 1 && linebuf[LINESIZE - 2] != '\n';
  ------------------
  |  |  763|      0|#define LINESIZE 255
  ------------------
  |  Branch (864:29): [True: 0, False: 11.9M]
  |  Branch (864:52): [True: 0, False: 0]
  ------------------
  865|       |
  866|  11.9M|        if (got_header == MAYBE_HEADER) {
  ------------------
  |  Branch (866:13): [True: 11.9M, False: 0]
  ------------------
  867|  11.9M|            if (memchr(linebuf, ':', len) != NULL)
  ------------------
  |  Branch (867:17): [True: 0, False: 11.9M]
  ------------------
  868|      0|                got_header = IN_HEADER;
  869|  11.9M|        }
  870|  11.9M|        if (HAS_PREFIX(linebuf, ENDSTR) || got_header == IN_HEADER)
  ------------------
  |  |   58|  23.9M|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 503k, False: 11.4M]
  |  |  ------------------
  ------------------
  |  Branch (870:44): [True: 0, False: 11.4M]
  ------------------
  871|   503k|            flags_mask &= ~PEM_FLAG_ONLY_B64;
  ------------------
  |  |  384|   503k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  872|  11.9M|        len = sanitize_line(linebuf, len, flags & flags_mask, 0);
  873|       |
  874|       |        /* Check for end of header. */
  875|  11.9M|        if (linebuf[0] == '\n') {
  ------------------
  |  Branch (875:13): [True: 0, False: 11.9M]
  ------------------
  876|       |            /*
  877|       |             * If previous line has been read only partially this newline is a
  878|       |             * regular newline at the end of a line and not an empty line.
  879|       |             */
  880|      0|            if (!prev_partial_line_read) {
  ------------------
  |  Branch (880:17): [True: 0, False: 0]
  ------------------
  881|      0|                if (got_header == POST_HEADER) {
  ------------------
  |  Branch (881:21): [True: 0, False: 0]
  ------------------
  882|       |                    /* Another blank line is an error. */
  883|      0|                    ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  884|      0|                    goto err;
  885|      0|                }
  886|      0|                got_header = POST_HEADER;
  887|      0|                tmp = *data;
  888|      0|            }
  889|      0|            continue;
  890|      0|        }
  891|       |
  892|       |        /* Check for end of stream (which means there is no header). */
  893|  11.9M|        p = linebuf;
  894|  11.9M|        if (CHECK_AND_SKIP_PREFIX(p, ENDSTR)) {
  ------------------
  |  |   61|  11.9M|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|  11.9M|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 503k, False: 11.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 503k, False: 11.4M]
  |  |  ------------------
  ------------------
  895|   503k|            namelen = strlen(name);
  896|   503k|            if (strncmp(p, name, namelen) != 0 || !HAS_PREFIX(p + namelen, TAILSTR)) {
  ------------------
  |  |   58|   503k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (896:17): [True: 0, False: 503k]
  |  Branch (896:51): [True: 0, False: 503k]
  ------------------
  897|      0|                ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  898|      0|                goto err;
  899|      0|            }
  900|   503k|            if (got_header == MAYBE_HEADER) {
  ------------------
  |  Branch (900:17): [True: 503k, False: 0]
  ------------------
  901|   503k|                *header = *data;
  902|   503k|                *data = tmp;
  903|   503k|            }
  904|   503k|            break;
  905|  11.4M|        } else if (end) {
  ------------------
  |  Branch (905:20): [True: 0, False: 11.4M]
  ------------------
  906|       |            /* Malformed input; short line not at end of data. */
  907|      0|            ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  908|      0|            goto err;
  909|      0|        }
  910|       |        /*
  911|       |         * Else, a line of text -- could be header or data; we don't
  912|       |         * know yet.  Just pass it through.
  913|       |         */
  914|  11.4M|        if (BIO_puts(tmp, linebuf) < 0)
  ------------------
  |  Branch (914:13): [True: 0, False: 11.4M]
  ------------------
  915|      0|            goto err;
  916|       |        /*
  917|       |         * Only encrypted files need the line length check applied.
  918|       |         */
  919|  11.4M|        if (got_header == POST_HEADER) {
  ------------------
  |  Branch (919:13): [True: 0, False: 11.4M]
  ------------------
  920|       |            /* 65 includes the trailing newline */
  921|      0|            if (len > 65)
  ------------------
  |  Branch (921:17): [True: 0, False: 0]
  ------------------
  922|      0|                goto err;
  923|      0|            if (len < 65)
  ------------------
  |  Branch (923:17): [True: 0, False: 0]
  ------------------
  924|      0|                end = 1;
  925|      0|        }
  926|  11.4M|    }
  927|       |
  928|   503k|    ret = 1;
  929|   503k|err:
  930|   503k|    PEM_FREE(linebuf, flags, LINESIZE + 1);
  ------------------
  |  |  220|   503k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  931|   503k|    return ret;
  932|   503k|}
pem_lib.c:pem_malloc:
  234|  2.52M|{
  235|  2.52M|    return (flags & PEM_FLAG_SECURE) ? CRYPTO_secure_malloc(num, file, line)
  ------------------
  |  |  382|  2.52M|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (235:12): [True: 0, False: 2.52M]
  ------------------
  236|  2.52M|                                     : CRYPTO_malloc(num, file, line);
  237|  2.52M|}
pem_lib.c:pem_free:
  223|  1.53M|{
  224|  1.53M|    if (flags & PEM_FLAG_SECURE)
  ------------------
  |  |  382|  1.53M|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (224:9): [True: 0, False: 1.53M]
  ------------------
  225|      0|        CRYPTO_secure_clear_free(p, num, file, line);
  226|  1.53M|    else
  227|  1.53M|        CRYPTO_free(p, file, line);
  228|  1.53M|}

PEM_ASN1_read_bio:
   22|  3.73k|{
   23|  3.73k|    const unsigned char *p = NULL;
   24|  3.73k|    unsigned char *data = NULL;
   25|  3.73k|    long len;
   26|  3.73k|    char *ret = NULL;
   27|       |
   28|  3.73k|    if (!PEM_bytes_read_bio(&data, &len, NULL, name, bp, cb, u))
  ------------------
  |  Branch (28:9): [True: 3.73k, False: 0]
  ------------------
   29|  3.73k|        return NULL;
   30|      0|    p = data;
   31|      0|    ret = d2i(x, &p, len);
   32|      0|    if (ret == NULL)
  ------------------
  |  Branch (32:9): [True: 0, False: 0]
  ------------------
   33|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   34|      0|    OPENSSL_free(data);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   35|      0|    return ret;
   36|  3.73k|}

ossl_err_load_PKCS12_strings:
   58|      1|{
   59|      1|#ifndef OPENSSL_NO_ERR
   60|      1|    if (ERR_reason_error_string(PKCS12_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (60:9): [True: 1, False: 0]
  ------------------
   61|      1|        ERR_load_strings_const(PKCS12_str_reasons);
   62|      1|#endif
   63|      1|    return 1;
   64|      1|}

ossl_err_load_PKCS7_strings:
   92|      1|{
   93|      1|#ifndef OPENSSL_NO_ERR
   94|      1|    if (ERR_reason_error_string(PKCS7_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (94:9): [True: 1, False: 0]
  ------------------
   95|      1|        ERR_load_strings_const(PKCS7_str_reasons);
   96|      1|#endif
   97|      1|    return 1;
   98|      1|}

ossl_property_defns_free:
   52|    808|{
   53|    808|    LHASH_OF(PROPERTY_DEFN_ELEM) *property_defns = vproperty_defns;
  ------------------
  |  |  156|    808|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   54|       |
   55|    808|    if (property_defns != NULL) {
  ------------------
  |  Branch (55:9): [True: 808, False: 0]
  ------------------
   56|    808|        lh_PROPERTY_DEFN_ELEM_doall(property_defns,
   57|    808|            &property_defn_free);
   58|    808|        lh_PROPERTY_DEFN_ELEM_free(property_defns);
   59|    808|    }
   60|    808|}
ossl_property_defns_new:
   63|    809|{
   64|    809|    return lh_PROPERTY_DEFN_ELEM_new(&property_defn_hash, &property_defn_cmp);
   65|    809|}
ossl_prop_defn_get:
   68|   193k|{
   69|   193k|    PROPERTY_DEFN_ELEM elem, *r;
   70|   193k|    LHASH_OF(PROPERTY_DEFN_ELEM) *property_defns;
  ------------------
  |  |  156|   193k|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   71|       |
   72|   193k|    property_defns = ossl_lib_ctx_get_data(ctx,
   73|   193k|        OSSL_LIB_CTX_PROPERTY_DEFN_INDEX);
  ------------------
  |  |   97|   193k|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
   74|   193k|    if (!ossl_assert(property_defns != NULL) || !ossl_lib_ctx_read_lock(ctx))
  ------------------
  |  |   52|   387k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   387k|    __FILE__, __LINE__)
  ------------------
  |  Branch (74:9): [True: 0, False: 193k]
  |  Branch (74:49): [True: 0, False: 193k]
  ------------------
   75|      0|        return NULL;
   76|       |
   77|   193k|    elem.prop = prop;
   78|   193k|    r = lh_PROPERTY_DEFN_ELEM_retrieve(property_defns, &elem);
   79|   193k|    ossl_lib_ctx_unlock(ctx);
   80|   193k|    if (r == NULL || !ossl_assert(r->defn != NULL))
  ------------------
  |  |   52|   192k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   192k|    __FILE__, __LINE__)
  ------------------
  |  Branch (80:9): [True: 1.28k, False: 192k]
  |  Branch (80:22): [True: 0, False: 192k]
  ------------------
   81|  1.28k|        return NULL;
   82|   192k|    return r->defn;
   83|   193k|}
ossl_prop_defn_set:
   92|  1.28k|{
   93|  1.28k|    PROPERTY_DEFN_ELEM elem, *old, *p = NULL;
   94|  1.28k|    size_t len;
   95|  1.28k|    LHASH_OF(PROPERTY_DEFN_ELEM) *property_defns;
  ------------------
  |  |  156|  1.28k|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   96|  1.28k|    int res = 1;
   97|       |
   98|  1.28k|    property_defns = ossl_lib_ctx_get_data(ctx,
   99|  1.28k|        OSSL_LIB_CTX_PROPERTY_DEFN_INDEX);
  ------------------
  |  |   97|  1.28k|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
  100|  1.28k|    if (property_defns == NULL)
  ------------------
  |  Branch (100:9): [True: 0, False: 1.28k]
  ------------------
  101|      0|        return 0;
  102|       |
  103|  1.28k|    if (prop == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 1.28k]
  ------------------
  104|      0|        return 1;
  105|       |
  106|  1.28k|    if (!ossl_lib_ctx_write_lock(ctx))
  ------------------
  |  Branch (106:9): [True: 0, False: 1.28k]
  ------------------
  107|      0|        return 0;
  108|  1.28k|    elem.prop = prop;
  109|  1.28k|    if (pl == NULL) {
  ------------------
  |  Branch (109:9): [True: 0, False: 1.28k]
  ------------------
  110|      0|        lh_PROPERTY_DEFN_ELEM_delete(property_defns, &elem);
  111|      0|        goto end;
  112|      0|    }
  113|       |    /* check if property definition is in the cache already */
  114|  1.28k|    if ((p = lh_PROPERTY_DEFN_ELEM_retrieve(property_defns, &elem)) != NULL) {
  ------------------
  |  Branch (114:9): [True: 0, False: 1.28k]
  ------------------
  115|      0|        ossl_property_free(*pl);
  116|      0|        *pl = p->defn;
  117|      0|        goto end;
  118|      0|    }
  119|  1.28k|    len = strlen(prop);
  120|  1.28k|    p = OPENSSL_malloc(sizeof(*p) + len);
  ------------------
  |  |  107|  1.28k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|  1.28k|    if (p != NULL) {
  ------------------
  |  Branch (121:9): [True: 1.28k, False: 0]
  ------------------
  122|  1.28k|        p->prop = p->body;
  123|  1.28k|        p->defn = *pl;
  124|  1.28k|        memcpy(p->body, prop, len + 1);
  125|  1.28k|        old = lh_PROPERTY_DEFN_ELEM_insert(property_defns, p);
  126|  1.28k|        if (!ossl_assert(old == NULL))
  ------------------
  |  |   52|  1.28k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.28k|    __FILE__, __LINE__)
  ------------------
  |  Branch (126:13): [True: 0, False: 1.28k]
  ------------------
  127|       |            /* This should not happen. An existing entry is handled above. */
  128|      0|            goto end;
  129|  1.28k|        if (!lh_PROPERTY_DEFN_ELEM_error(property_defns))
  ------------------
  |  Branch (129:13): [True: 1.28k, False: 0]
  ------------------
  130|  1.28k|            goto end;
  131|  1.28k|    }
  132|      0|    OPENSSL_free(p);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  133|      0|    res = 0;
  134|  1.28k|end:
  135|  1.28k|    ossl_lib_ctx_unlock(ctx);
  136|  1.28k|    return res;
  137|      0|}
defn_cache.c:property_defn_free:
   46|  1.26k|{
   47|  1.26k|    ossl_property_free(elem->defn);
   48|  1.26k|    OPENSSL_free(elem);
  ------------------
  |  |  132|  1.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   49|  1.26k|}
defn_cache.c:property_defn_hash:
   35|   196k|{
   36|   196k|    return OPENSSL_LH_strhash(a->prop);
   37|   196k|}
defn_cache.c:property_defn_cmp:
   41|   192k|{
   42|   192k|    return strcmp(a->prop, b->prop);
   43|   192k|}

ossl_ctx_global_properties_free:
  132|    808|{
  133|    808|    OSSL_GLOBAL_PROPERTIES *globp = vglobp;
  134|       |
  135|    808|    if (globp != NULL) {
  ------------------
  |  Branch (135:9): [True: 808, False: 0]
  ------------------
  136|    808|        ossl_property_free(globp->list);
  137|    808|        OPENSSL_free(globp);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  138|    808|    }
  139|    808|}
ossl_ctx_global_properties_new:
  142|    809|{
  143|    809|    return OPENSSL_zalloc(sizeof(OSSL_GLOBAL_PROPERTIES));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  144|    809|}
ossl_ctx_global_properties:
  148|  40.4k|{
  149|  40.4k|    OSSL_GLOBAL_PROPERTIES *globp;
  150|       |
  151|  40.4k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  152|  40.4k|    if (loadconfig && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  511|      0|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (152:9): [True: 0, False: 40.4k]
  |  Branch (152:23): [True: 0, False: 0]
  ------------------
  153|      0|        return NULL;
  154|  40.4k|#endif
  155|  40.4k|    globp = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_GLOBAL_PROPERTIES);
  ------------------
  |  |  111|  40.4k|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  156|       |
  157|  40.4k|    return globp != NULL ? &globp->list : NULL;
  ------------------
  |  Branch (157:12): [True: 40.4k, False: 0]
  ------------------
  158|  40.4k|}
ossl_method_store_new:
  301|  3.23k|{
  302|  3.23k|    OSSL_METHOD_STORE *res;
  303|       |
  304|  3.23k|    res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  109|  3.23k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  305|  3.23k|    if (res != NULL) {
  ------------------
  |  Branch (305:9): [True: 3.23k, False: 0]
  ------------------
  306|  3.23k|        res->ctx = ctx;
  307|  3.23k|        if ((res->algs = stored_algs_new()) == NULL
  ------------------
  |  Branch (307:13): [True: 0, False: 3.23k]
  ------------------
  308|  3.23k|            || (res->biglock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (308:16): [True: 0, False: 3.23k]
  ------------------
  309|      0|            ossl_method_store_free(res);
  310|      0|            return NULL;
  311|      0|        }
  312|  3.23k|    }
  313|  3.23k|    return res;
  314|  3.23k|}
ossl_method_store_free:
  317|  3.23k|{
  318|  3.23k|    if (store == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 3.23k]
  ------------------
  319|      0|        return;
  320|       |
  321|  3.23k|    stored_algs_free(store->algs);
  322|  3.23k|    CRYPTO_THREAD_lock_free(store->biglock);
  323|  3.23k|    OPENSSL_free(store);
  ------------------
  |  |  132|  3.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  324|  3.23k|}
ossl_method_lock_store:
  327|   159k|{
  328|   159k|    return store != NULL ? CRYPTO_THREAD_write_lock(store->biglock) : 0;
  ------------------
  |  Branch (328:12): [True: 159k, False: 0]
  ------------------
  329|   159k|}
ossl_method_unlock_store:
  332|   159k|{
  333|   159k|    return store != NULL ? CRYPTO_THREAD_unlock(store->biglock) : 0;
  ------------------
  |  Branch (333:12): [True: 159k, False: 0]
  ------------------
  334|   159k|}
ossl_method_store_add:
  375|   193k|{
  376|   193k|    STORED_ALGORITHMS *sa;
  377|   193k|    ALGORITHM *alg = NULL;
  378|   193k|    IMPLEMENTATION *impl;
  379|   193k|    int ret = 0;
  380|   193k|    int i;
  381|       |
  382|   193k|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (382:9): [True: 0, False: 193k]
  |  Branch (382:21): [True: 0, False: 193k]
  |  Branch (382:39): [True: 0, False: 193k]
  ------------------
  383|      0|        return 0;
  384|       |
  385|   193k|    if (properties == NULL)
  ------------------
  |  Branch (385:9): [True: 0, False: 193k]
  ------------------
  386|      0|        properties = "";
  387|       |
  388|   193k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|   193k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   193k|    __FILE__, __LINE__)
  ------------------
  |  Branch (388:9): [True: 0, False: 193k]
  ------------------
  389|      0|        return 0;
  390|       |
  391|       |    /* Create new entry */
  392|   193k|    impl = OPENSSL_malloc(sizeof(*impl));
  ------------------
  |  |  107|   193k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  393|   193k|    if (impl == NULL)
  ------------------
  |  Branch (393:9): [True: 0, False: 193k]
  ------------------
  394|      0|        return 0;
  395|   193k|    impl->method.method = method;
  396|   193k|    impl->method.up_ref = method_up_ref;
  397|   193k|    impl->method.free = method_destruct;
  398|   193k|    if (!ossl_method_up_ref(&impl->method)) {
  ------------------
  |  Branch (398:9): [True: 0, False: 193k]
  ------------------
  399|      0|        OPENSSL_free(impl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  400|      0|        return 0;
  401|      0|    }
  402|   193k|    impl->provider = prov;
  403|       |
  404|   193k|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|   193k|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|   193k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  405|       |
  406|       |    /* Insert into the hash table if required */
  407|   193k|    if (!ossl_property_write_lock(sa)) {
  ------------------
  |  Branch (407:9): [True: 0, False: 193k]
  ------------------
  408|      0|        impl_free(impl);
  409|      0|        return 0;
  410|      0|    }
  411|       |
  412|       |    /*
  413|       |     * Flush the alg cache of any implementation that already exists
  414|       |     * for this id.
  415|       |     * This is done to ensure that on the next lookup we go through the
  416|       |     * provider comparison in ossl_method_store_fetch.  If we don't do this
  417|       |     * then this new method won't be given a chance to get selected.
  418|       |     * NOTE: This doesn't actually remove the method from the backing store
  419|       |     * It just ensures that we query the backing store when (re)-adding a
  420|       |     * method to the algorithm cache, in case the one selected by the next
  421|       |     * query selects a different implementation
  422|       |     */
  423|   193k|    ossl_method_cache_flush(sa, nid);
  424|       |
  425|       |    /*
  426|       |     * Parse the properties associated with this method, and convert it to a
  427|       |     * property list stored against the implementation for later comparison
  428|       |     * during fetch operations
  429|       |     */
  430|   193k|    if ((impl->properties = ossl_prop_defn_get(store->ctx, properties)) == NULL) {
  ------------------
  |  Branch (430:9): [True: 1.28k, False: 192k]
  ------------------
  431|  1.28k|        impl->properties = ossl_parse_property(store->ctx, properties);
  432|  1.28k|        if (impl->properties == NULL)
  ------------------
  |  Branch (432:13): [True: 0, False: 1.28k]
  ------------------
  433|      0|            goto err;
  434|  1.28k|        if (!ossl_prop_defn_set(store->ctx, properties, &impl->properties)) {
  ------------------
  |  Branch (434:13): [True: 0, False: 1.28k]
  ------------------
  435|      0|            ossl_property_free(impl->properties);
  436|      0|            impl->properties = NULL;
  437|      0|            goto err;
  438|      0|        }
  439|  1.28k|    }
  440|       |
  441|       |    /*
  442|       |     * Check if we have an algorithm cache already for this nid.  If so use
  443|       |     * it, otherwise, create it, and insert it into the store
  444|       |     */
  445|   193k|    alg = ossl_method_store_retrieve(sa, nid);
  446|   193k|    if (alg == NULL) {
  ------------------
  |  Branch (446:9): [True: 193k, False: 603]
  ------------------
  447|   193k|        if ((alg = OPENSSL_zalloc(sizeof(*alg))) == NULL
  ------------------
  |  |  109|   193k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (447:13): [True: 0, False: 193k]
  ------------------
  448|   193k|            || (alg->impls = sk_IMPLEMENTATION_new_null()) == NULL
  ------------------
  |  Branch (448:16): [True: 0, False: 193k]
  ------------------
  449|   193k|            || (alg->cache = lh_QUERY_new(&query_hash, &query_cmp)) == NULL)
  ------------------
  |  Branch (449:16): [True: 0, False: 193k]
  ------------------
  450|      0|            goto err;
  451|   193k|        alg->nid = nid;
  452|   193k|        if (!ossl_method_store_insert(sa, alg))
  ------------------
  |  Branch (452:13): [True: 0, False: 193k]
  ------------------
  453|      0|            goto err;
  454|   193k|        OSSL_TRACE2(QUERY, "Inserted an alg with nid %d into the stored algorithms %p\n",
  ------------------
  |  |  293|   193k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|   193k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  455|   193k|            nid, (void *)sa);
  456|   193k|    }
  457|       |
  458|       |    /* Push onto stack if there isn't one there already */
  459|   194k|    for (i = 0; i < sk_IMPLEMENTATION_num(alg->impls); i++) {
  ------------------
  |  Branch (459:17): [True: 634, False: 193k]
  ------------------
  460|    634|        const IMPLEMENTATION *tmpimpl = sk_IMPLEMENTATION_value(alg->impls, i);
  461|       |
  462|    634|        if (tmpimpl->provider == impl->provider
  ------------------
  |  Branch (462:13): [True: 77, False: 557]
  ------------------
  463|     77|            && tmpimpl->properties == impl->properties)
  ------------------
  |  Branch (463:16): [True: 0, False: 77]
  ------------------
  464|      0|            break;
  465|    634|    }
  466|       |
  467|   193k|    if (i == sk_IMPLEMENTATION_num(alg->impls)
  ------------------
  |  Branch (467:9): [True: 193k, False: 0]
  ------------------
  468|   193k|        && sk_IMPLEMENTATION_push(alg->impls, impl)) {
  ------------------
  |  Branch (468:12): [True: 193k, False: 0]
  ------------------
  469|   193k|        ret = 1;
  470|   193k|#ifndef FIPS_MODULE
  471|   193k|        OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  219|   193k|    do {                           \
  |  |  220|   193k|        BIO *trc_out = NULL;       \
  |  |  221|   193k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  472|      0|        {
  473|      0|            BIO_printf(trc_out, "Adding to method store "
  474|      0|                                "nid: %d\nproperties: %s\nprovider: %s\n",
  475|      0|                nid, properties,
  476|      0|                ossl_provider_name(prov) == NULL ? "none" : ossl_provider_name(prov));
  ------------------
  |  Branch (476:17): [True: 0, False: 0]
  ------------------
  477|      0|        }
  478|   193k|        OSSL_TRACE_END(QUERY);
  ------------------
  |  |  224|   193k|    }                            \
  |  |  225|   193k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  479|   193k|#endif
  480|   193k|    }
  481|   193k|    ossl_property_unlock(sa);
  482|   193k|    if (ret == 0)
  ------------------
  |  Branch (482:9): [True: 0, False: 193k]
  ------------------
  483|      0|        impl_free(impl);
  484|   193k|    return ret;
  485|       |
  486|      0|err:
  487|      0|    ossl_property_unlock(sa);
  488|       |    alg_cleanup(0, alg, NULL);
  489|      0|    impl_free(impl);
  490|      0|    return 0;
  491|   193k|}
ossl_method_store_remove_all_provided:
  600|  3.59k|{
  601|  3.59k|    struct alg_cleanup_by_provider_data_st data;
  602|       |
  603|  17.9k|    for (int k = 0; k < NUM_SHARDS; ++k) {
  ------------------
  |  |   32|  17.9k|#define NUM_SHARDS 4
  ------------------
  |  Branch (603:21): [True: 14.3k, False: 3.59k]
  ------------------
  604|  14.3k|        STORED_ALGORITHMS *sa = &store->algs[k];
  605|       |
  606|  14.3k|        if (!ossl_property_write_lock(sa))
  ------------------
  |  Branch (606:13): [True: 0, False: 14.3k]
  ------------------
  607|      0|            return 0;
  608|  14.3k|        data.prov = prov;
  609|  14.3k|        data.sa = sa;
  610|  14.3k|        ossl_sa_ALGORITHM_doall_arg(sa->algs, &alg_cleanup_by_provider, &data);
  611|  14.3k|        ossl_property_unlock(sa);
  612|  14.3k|    }
  613|  3.59k|    return 1;
  614|  3.59k|}
ossl_method_store_do_all:
  645|      6|{
  646|      6|    int i, j;
  647|      6|    int numalgs, numimps;
  648|      6|    STACK_OF(ALGORITHM) *tmpalgs;
  ------------------
  |  |   33|      6|#define STACK_OF(type) struct stack_st_##type
  ------------------
  649|      6|    ALGORITHM *alg;
  650|       |
  651|      6|    if (store == NULL)
  ------------------
  |  Branch (651:9): [True: 0, False: 6]
  ------------------
  652|      0|        return;
  653|       |
  654|     30|    for (int k = 0; k < NUM_SHARDS; ++k) {
  ------------------
  |  |   32|     30|#define NUM_SHARDS 4
  ------------------
  |  Branch (654:21): [True: 24, False: 6]
  ------------------
  655|     24|        STORED_ALGORITHMS *sa = &store->algs[k];
  656|       |
  657|     24|        if (!ossl_property_read_lock(sa))
  ------------------
  |  Branch (657:13): [True: 0, False: 24]
  ------------------
  658|      0|            return;
  659|       |
  660|     24|        tmpalgs = sk_ALGORITHM_new_reserve(NULL,
  661|     24|            (int)ossl_sa_ALGORITHM_num(sa->algs));
  662|     24|        if (tmpalgs == NULL) {
  ------------------
  |  Branch (662:13): [True: 0, False: 24]
  ------------------
  663|      0|            ossl_property_unlock(sa);
  664|      0|            return;
  665|      0|        }
  666|       |
  667|     24|        ossl_sa_ALGORITHM_doall_arg(sa->algs, alg_copy, tmpalgs);
  668|     24|        ossl_property_unlock(sa);
  669|     24|        numalgs = sk_ALGORITHM_num(tmpalgs);
  670|    690|        for (i = 0; i < numalgs; i++) {
  ------------------
  |  Branch (670:21): [True: 666, False: 24]
  ------------------
  671|    666|            alg = sk_ALGORITHM_value(tmpalgs, i);
  672|    666|            numimps = sk_IMPLEMENTATION_num(alg->impls);
  673|  1.51k|            for (j = 0; j < numimps; j++)
  ------------------
  |  Branch (673:25): [True: 850, False: 666]
  ------------------
  674|    850|                alg_do_one(alg, sk_IMPLEMENTATION_value(alg->impls, j), fn, fnarg);
  675|    666|        }
  676|     24|        sk_ALGORITHM_pop_free(tmpalgs, del_tmpalg);
  677|     24|    }
  678|      6|}
ossl_method_store_fetch:
  706|  57.7k|{
  707|  57.7k|    OSSL_PROPERTY_LIST **plp;
  708|  57.7k|    ALGORITHM *alg;
  709|  57.7k|    IMPLEMENTATION *impl, *best_impl = NULL;
  710|  57.7k|    OSSL_PROPERTY_LIST *pq = NULL, *p2 = NULL;
  711|  57.7k|    const OSSL_PROVIDER *prov = prov_rw != NULL ? *prov_rw : NULL;
  ------------------
  |  Branch (711:33): [True: 57.7k, False: 0]
  ------------------
  712|  57.7k|    int ret = 0;
  713|  57.7k|    int j, best = -1, score, optional;
  714|  57.7k|    STORED_ALGORITHMS *sa;
  715|       |
  716|  57.7k|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (716:9): [True: 0, False: 57.7k]
  |  Branch (716:21): [True: 0, False: 57.7k]
  |  Branch (716:39): [True: 0, False: 57.7k]
  ------------------
  717|      0|        return 0;
  718|       |
  719|  57.7k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  720|  57.7k|    if (ossl_lib_ctx_is_default(store->ctx)
  ------------------
  |  Branch (720:9): [True: 13.8k, False: 43.9k]
  ------------------
  721|  13.8k|        && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  511|  13.8k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (721:12): [True: 0, False: 13.8k]
  ------------------
  722|      0|        return 0;
  723|  57.7k|#endif
  724|       |
  725|  57.7k|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|  57.7k|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|  57.7k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  726|       |
  727|       |    /* This only needs to be a read lock, because the query won't create anything */
  728|  57.7k|    if (!ossl_property_read_lock(sa))
  ------------------
  |  Branch (728:9): [True: 0, False: 57.7k]
  ------------------
  729|      0|        return 0;
  730|       |
  731|  57.7k|    OSSL_TRACE2(QUERY, "Retrieving by nid %d from stored algorithms %p\n",
  ------------------
  |  |  293|  57.7k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|  57.7k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  732|  57.7k|        nid, (void *)sa);
  733|  57.7k|    alg = ossl_method_store_retrieve(sa, nid);
  734|  57.7k|    if (alg == NULL) {
  ------------------
  |  Branch (734:9): [True: 17.3k, False: 40.4k]
  ------------------
  735|  17.3k|        ossl_property_unlock(sa);
  736|  17.3k|        OSSL_TRACE2(QUERY, "Failed to retrieve by nid %d from stored algorithms %p\n",
  ------------------
  |  |  293|  17.3k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|  17.3k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  737|  17.3k|            nid, (void *)sa);
  738|  17.3k|        return 0;
  739|  17.3k|    }
  740|  40.4k|    OSSL_TRACE2(QUERY, "Retrieved by nid %d from stored algorithms %p\n",
  ------------------
  |  |  293|  40.4k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|  40.4k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  741|  40.4k|        nid, (void *)sa);
  742|       |
  743|       |    /*
  744|       |     * If a property query string is provided, convert it to an
  745|       |     * OSSL_PROPERTY_LIST structure
  746|       |     */
  747|  40.4k|    if (prop_query != NULL)
  ------------------
  |  Branch (747:9): [True: 40.4k, False: 0]
  ------------------
  748|  40.4k|        p2 = pq = ossl_parse_query(store->ctx, prop_query, 0);
  749|       |
  750|       |    /*
  751|       |     * If the library context has default properties specified
  752|       |     * then merge those with the properties passed to this function
  753|       |     */
  754|  40.4k|    plp = ossl_ctx_global_properties(store->ctx, 0);
  755|  40.4k|    if (plp != NULL && *plp != NULL) {
  ------------------
  |  Branch (755:9): [True: 40.4k, False: 0]
  |  Branch (755:24): [True: 0, False: 40.4k]
  ------------------
  756|      0|        if (pq == NULL) {
  ------------------
  |  Branch (756:13): [True: 0, False: 0]
  ------------------
  757|      0|            pq = *plp;
  758|      0|        } else {
  759|      0|            p2 = ossl_property_merge(pq, *plp);
  760|      0|            ossl_property_free(pq);
  761|      0|            if (p2 == NULL)
  ------------------
  |  Branch (761:17): [True: 0, False: 0]
  ------------------
  762|      0|                goto fin;
  763|      0|            pq = p2;
  764|      0|        }
  765|      0|    }
  766|       |
  767|       |    /*
  768|       |     * Search for a provider that provides this implementation.
  769|       |     * If the requested provider is NULL, then any provider will do,
  770|       |     * otherwise we should try to find the one that matches the requested
  771|       |     * provider.  Note that providers are given implicit preference via the
  772|       |     * ordering of the implementation stack
  773|       |     */
  774|  40.4k|    if (pq == NULL) {
  ------------------
  |  Branch (774:9): [True: 25.6k, False: 14.7k]
  ------------------
  775|  25.6k|        for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (775:21): [True: 25.6k, False: 0]
  ------------------
  776|  25.6k|            impl = sk_IMPLEMENTATION_value(alg->impls, j);
  777|  25.6k|            if (impl != NULL
  ------------------
  |  Branch (777:17): [True: 25.6k, False: 0]
  ------------------
  778|  25.6k|                && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (778:21): [True: 25.6k, False: 0]
  |  Branch (778:37): [True: 0, False: 0]
  ------------------
  779|  25.6k|                best_impl = impl;
  780|  25.6k|                ret = 1;
  781|  25.6k|                break;
  782|  25.6k|            }
  783|  25.6k|        }
  784|  25.6k|        goto fin;
  785|  25.6k|    }
  786|       |
  787|       |    /*
  788|       |     * If there are optional properties specified
  789|       |     * then run the search again, and select the provider that matches the
  790|       |     * most options
  791|       |     */
  792|  14.7k|    optional = ossl_property_has_optional(pq);
  793|  21.9k|    for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (793:17): [True: 14.7k, False: 7.17k]
  ------------------
  794|  14.7k|        impl = sk_IMPLEMENTATION_value(alg->impls, j);
  795|  14.7k|        if (impl != NULL
  ------------------
  |  Branch (795:13): [True: 14.7k, False: 0]
  ------------------
  796|  14.7k|            && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (796:17): [True: 13.5k, False: 1.19k]
  |  Branch (796:33): [True: 1.19k, False: 0]
  ------------------
  797|  14.7k|            score = ossl_property_match_count(pq, impl->properties);
  798|  14.7k|            if (score > best) {
  ------------------
  |  Branch (798:17): [True: 7.87k, False: 6.89k]
  ------------------
  799|  7.87k|                best_impl = impl;
  800|  7.87k|                best = score;
  801|  7.87k|                ret = 1;
  802|  7.87k|                if (!optional)
  ------------------
  |  Branch (802:21): [True: 7.59k, False: 282]
  ------------------
  803|  7.59k|                    goto fin;
  804|  7.87k|            }
  805|  14.7k|        }
  806|  14.7k|    }
  807|  40.4k|fin:
  808|  40.4k|    if (ret && ossl_method_up_ref(&best_impl->method)) {
  ------------------
  |  Branch (808:9): [True: 33.5k, False: 6.89k]
  |  Branch (808:16): [True: 33.5k, False: 0]
  ------------------
  809|  33.5k|        *method = best_impl->method.method;
  810|  33.5k|        if (prov_rw != NULL)
  ------------------
  |  Branch (810:13): [True: 33.5k, False: 0]
  ------------------
  811|  33.5k|            *prov_rw = best_impl->provider;
  812|  33.5k|    } else {
  813|  6.89k|        ret = 0;
  814|  6.89k|    }
  815|       |
  816|  40.4k|#ifndef FIPS_MODULE
  817|  40.4k|    OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  219|  40.4k|    do {                           \
  |  |  220|  40.4k|        BIO *trc_out = NULL;       \
  |  |  221|  40.4k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 40.4k]
  |  |  ------------------
  ------------------
  818|      0|    {
  819|      0|        char buf[512];
  820|      0|        size_t size;
  821|       |
  822|      0|        size = ossl_property_list_to_string(NULL, pq, buf, 512);
  823|      0|        BIO_printf(trc_out, "method store query with properties %s "
  824|      0|                            "resolves to provider %s\n",
  825|      0|            size == 0 ? "none" : buf,
  ------------------
  |  Branch (825:13): [True: 0, False: 0]
  ------------------
  826|      0|            best_impl == NULL ? "none" : ossl_provider_name(best_impl->provider));
  ------------------
  |  Branch (826:13): [True: 0, False: 0]
  ------------------
  827|      0|    }
  828|  40.4k|    OSSL_TRACE_END(QUERY);
  ------------------
  |  |  224|  40.4k|    }                            \
  |  |  225|  40.4k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 40.4k]
  |  |  ------------------
  ------------------
  829|  40.4k|#endif
  830|       |
  831|  40.4k|    ossl_property_unlock(sa);
  832|  40.4k|    ossl_property_free(p2);
  833|  40.4k|    return ret;
  834|  14.7k|}
ossl_method_store_cache_flush_all:
  852|  3.59k|{
  853|  17.9k|    for (int i = 0; i < NUM_SHARDS; ++i) {
  ------------------
  |  |   32|  17.9k|#define NUM_SHARDS 4
  ------------------
  |  Branch (853:21): [True: 14.3k, False: 3.59k]
  ------------------
  854|  14.3k|        STORED_ALGORITHMS *sa = &store->algs[i];
  855|       |
  856|  14.3k|        if (!ossl_property_write_lock(sa))
  ------------------
  |  Branch (856:13): [True: 0, False: 14.3k]
  ------------------
  857|      0|            return 0;
  858|  14.3k|        ossl_sa_ALGORITHM_doall(sa->algs, &impl_cache_flush_alg);
  859|  14.3k|        sa->cache_nelem = 0;
  860|  14.3k|        ossl_property_unlock(sa);
  861|  14.3k|    }
  862|       |
  863|  3.59k|    return 1;
  864|  3.59k|}
ossl_method_store_cache_get:
  944|   792k|{
  945|   792k|    ALGORITHM *alg;
  946|   792k|    QUERY elem, *r;
  947|   792k|    int res = 0;
  948|   792k|    STORED_ALGORITHMS *sa;
  949|       |
  950|   792k|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (950:9): [True: 0, False: 792k]
  |  Branch (950:21): [True: 0, False: 792k]
  |  Branch (950:38): [True: 0, False: 792k]
  ------------------
  951|      0|        return 0;
  952|       |
  953|   792k|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|   792k|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|   792k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  954|   792k|    if (!ossl_property_read_lock(sa))
  ------------------
  |  Branch (954:9): [True: 0, False: 792k]
  ------------------
  955|      0|        return 0;
  956|   792k|    alg = ossl_method_store_retrieve(sa, nid);
  957|   792k|    if (alg == NULL)
  ------------------
  |  Branch (957:9): [True: 19.4k, False: 772k]
  ------------------
  958|  19.4k|        goto err;
  959|       |
  960|   772k|    elem.query = prop_query;
  961|   772k|    elem.provider = prov;
  962|   772k|    r = lh_QUERY_retrieve(alg->cache, &elem);
  963|   772k|    if (r == NULL)
  ------------------
  |  Branch (963:9): [True: 36.9k, False: 735k]
  ------------------
  964|  36.9k|        goto err;
  965|   735k|    if (ossl_method_up_ref(&r->method)) {
  ------------------
  |  Branch (965:9): [True: 735k, False: 0]
  ------------------
  966|   735k|        *method = r->method.method;
  967|   735k|        res = 1;
  968|   735k|    }
  969|   792k|err:
  970|   792k|    ossl_property_unlock(sa);
  971|   792k|    return res;
  972|   735k|}
ossl_method_store_cache_set:
  978|  33.5k|{
  979|  33.5k|    QUERY elem, *old, *p = NULL;
  980|  33.5k|    ALGORITHM *alg;
  981|  33.5k|    STORED_ALGORITHMS *sa;
  982|  33.5k|    size_t len;
  983|  33.5k|    int res = 1;
  984|       |
  985|  33.5k|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (985:9): [True: 0, False: 33.5k]
  |  Branch (985:21): [True: 0, False: 33.5k]
  |  Branch (985:38): [True: 0, False: 33.5k]
  ------------------
  986|      0|        return 0;
  987|       |
  988|  33.5k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|  33.5k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  33.5k|    __FILE__, __LINE__)
  ------------------
  |  Branch (988:9): [True: 0, False: 33.5k]
  ------------------
  989|      0|        return 0;
  990|       |
  991|  33.5k|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|  33.5k|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|  33.5k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  992|  33.5k|    if (!ossl_property_write_lock(sa))
  ------------------
  |  Branch (992:9): [True: 0, False: 33.5k]
  ------------------
  993|      0|        return 0;
  994|  33.5k|    if (sa->cache_need_flush)
  ------------------
  |  Branch (994:9): [True: 0, False: 33.5k]
  ------------------
  995|      0|        ossl_method_cache_flush_some(sa);
  996|  33.5k|    alg = ossl_method_store_retrieve(sa, nid);
  997|  33.5k|    if (alg == NULL)
  ------------------
  |  Branch (997:9): [True: 0, False: 33.5k]
  ------------------
  998|      0|        goto err;
  999|       |
 1000|  33.5k|    if (method == NULL) {
  ------------------
  |  Branch (1000:9): [True: 0, False: 33.5k]
  ------------------
 1001|      0|        elem.query = prop_query;
 1002|      0|        elem.provider = prov;
 1003|      0|        if ((old = lh_QUERY_delete(alg->cache, &elem)) != NULL) {
  ------------------
  |  Branch (1003:13): [True: 0, False: 0]
  ------------------
 1004|      0|            impl_cache_free(old);
 1005|      0|            sa->cache_nelem--;
 1006|      0|        }
 1007|      0|        goto end;
 1008|      0|    }
 1009|  33.5k|    p = OPENSSL_malloc(sizeof(*p) + (len = strlen(prop_query)));
  ------------------
  |  |  107|  33.5k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1010|  33.5k|    if (p != NULL) {
  ------------------
  |  Branch (1010:9): [True: 33.5k, False: 0]
  ------------------
 1011|  33.5k|        p->query = p->body;
 1012|  33.5k|        p->provider = prov;
 1013|  33.5k|        p->method.method = method;
 1014|  33.5k|        p->method.up_ref = method_up_ref;
 1015|  33.5k|        p->method.free = method_destruct;
 1016|  33.5k|        if (!ossl_method_up_ref(&p->method))
  ------------------
  |  Branch (1016:13): [True: 0, False: 33.5k]
  ------------------
 1017|      0|            goto err;
 1018|  33.5k|        memcpy((char *)p->query, prop_query, len + 1);
 1019|  33.5k|        if ((old = lh_QUERY_insert(alg->cache, p)) != NULL) {
  ------------------
  |  Branch (1019:13): [True: 0, False: 33.5k]
  ------------------
 1020|      0|            impl_cache_free(old);
 1021|      0|            goto end;
 1022|      0|        }
 1023|  33.5k|        if (!lh_QUERY_error(alg->cache)) {
  ------------------
  |  Branch (1023:13): [True: 33.5k, False: 0]
  ------------------
 1024|  33.5k|            if (++sa->cache_nelem >= IMPL_CACHE_FLUSH_THRESHOLD)
  ------------------
  |  |   44|  33.5k|#define IMPL_CACHE_FLUSH_THRESHOLD (CACHE_SIZE / NUM_SHARDS)
  |  |  ------------------
  |  |  |  |   36|  33.5k|#define CACHE_SIZE 512
  |  |  ------------------
  |  |               #define IMPL_CACHE_FLUSH_THRESHOLD (CACHE_SIZE / NUM_SHARDS)
  |  |  ------------------
  |  |  |  |   32|  33.5k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  |  Branch (1024:17): [True: 0, False: 33.5k]
  ------------------
 1025|      0|                sa->cache_need_flush = 1;
 1026|  33.5k|            goto end;
 1027|  33.5k|        }
 1028|      0|        ossl_method_free(&p->method);
 1029|      0|    }
 1030|      0|err:
 1031|      0|    res = 0;
 1032|      0|    OPENSSL_free(p);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1033|  33.5k|end:
 1034|  33.5k|    ossl_property_unlock(sa);
 1035|  33.5k|    return res;
 1036|      0|}
property.c:stored_algs_new:
  271|  3.23k|{
  272|  3.23k|    STORED_ALGORITHMS *ret;
  273|       |
  274|  3.23k|    ret = OPENSSL_calloc(NUM_SHARDS, sizeof(STORED_ALGORITHMS));
  ------------------
  |  |  113|  3.23k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  275|  3.23k|    if (ret == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 3.23k]
  ------------------
  276|      0|        return NULL;
  277|       |
  278|  16.1k|    for (int i = 0; i < NUM_SHARDS; ++i) {
  ------------------
  |  |   32|  16.1k|#define NUM_SHARDS 4
  ------------------
  |  Branch (278:21): [True: 12.9k, False: 3.23k]
  ------------------
  279|  12.9k|        ret[i].algs = ossl_sa_ALGORITHM_new();
  280|  12.9k|        if (ret[i].algs == NULL)
  ------------------
  |  Branch (280:13): [True: 0, False: 12.9k]
  ------------------
  281|      0|            goto err;
  282|       |
  283|  12.9k|        ret[i].lock = CRYPTO_THREAD_lock_new();
  284|  12.9k|        if (ret[i].lock == NULL)
  ------------------
  |  Branch (284:13): [True: 0, False: 12.9k]
  ------------------
  285|      0|            goto err;
  286|  12.9k|    }
  287|       |
  288|  3.23k|    return ret;
  289|       |
  290|      0|err:
  291|      0|    stored_algs_free(ret);
  292|       |
  293|       |    return NULL;
  294|  3.23k|}
property.c:stored_algs_free:
  257|  3.23k|{
  258|  3.23k|    if (sa == NULL)
  ------------------
  |  Branch (258:9): [True: 0, False: 3.23k]
  ------------------
  259|      0|        return;
  260|       |
  261|  16.1k|    for (int i = 0; i < NUM_SHARDS; ++i) {
  ------------------
  |  |   32|  16.1k|#define NUM_SHARDS 4
  ------------------
  |  Branch (261:21): [True: 12.9k, False: 3.23k]
  ------------------
  262|  12.9k|        ossl_sa_ALGORITHM_doall_arg(sa[i].algs, &alg_cleanup, &sa[i]);
  263|  12.9k|        ossl_sa_ALGORITHM_free(sa[i].algs);
  264|  12.9k|        CRYPTO_THREAD_lock_free(sa[i].lock);
  265|  12.9k|    }
  266|       |
  267|  3.23k|    OPENSSL_free(sa);
  ------------------
  |  |  132|  3.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  268|  3.23k|}
property.c:ossl_method_up_ref:
  180|   996k|{
  181|   996k|    return (*method->up_ref)(method->method);
  182|   996k|}
property.c:ossl_property_write_lock:
  195|   255k|{
  196|   255k|    return p != NULL ? CRYPTO_THREAD_write_lock(p->lock) : 0;
  ------------------
  |  Branch (196:12): [True: 255k, False: 0]
  ------------------
  197|   255k|}
property.c:impl_free:
  221|   193k|{
  222|   193k|    if (impl != NULL) {
  ------------------
  |  Branch (222:9): [True: 193k, False: 0]
  ------------------
  223|   193k|        ossl_method_free(&impl->method);
  224|   193k|        OPENSSL_free(impl);
  ------------------
  |  |  132|   193k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  225|   193k|    }
  226|   193k|}
property.c:ossl_method_store_retrieve:
  337|  1.27M|{
  338|  1.27M|    return ossl_sa_ALGORITHM_get(sa->algs, nid);
  339|  1.27M|}
property.c:query_hash:
  205|   806k|{
  206|   806k|    return OPENSSL_LH_strhash(a->query);
  207|   806k|}
property.c:query_cmp:
  210|   735k|{
  211|   735k|    int res = strcmp(a->query, b->query);
  212|       |
  213|   735k|    if (res == 0 && a->provider != NULL && b->provider != NULL)
  ------------------
  |  Branch (213:9): [True: 735k, False: 8]
  |  Branch (213:21): [True: 735k, False: 0]
  |  Branch (213:44): [True: 2.38k, False: 733k]
  ------------------
  214|  2.38k|        res = b->provider > a->provider ? 1
  ------------------
  |  Branch (214:15): [True: 0, False: 2.38k]
  ------------------
  215|  2.38k|            : b->provider < a->provider ? -1
  ------------------
  |  Branch (215:15): [True: 0, False: 2.38k]
  ------------------
  216|  2.38k|                                        : 0;
  217|   735k|    return res;
  218|   735k|}
property.c:ossl_method_store_insert:
  342|   193k|{
  343|   193k|    return ossl_sa_ALGORITHM_set(sa->algs, alg->nid, alg);
  344|   193k|}
property.c:ossl_property_unlock:
  200|  1.10M|{
  201|  1.10M|    return p != 0 ? CRYPTO_THREAD_unlock(p->lock) : 0;
  ------------------
  |  Branch (201:12): [True: 1.10M, False: 0]
  ------------------
  202|  1.10M|}
property.c:alg_cleanup:
  243|   192k|{
  244|   192k|    STORED_ALGORITHMS *sa = arg;
  245|       |
  246|   192k|    if (a != NULL) {
  ------------------
  |  Branch (246:9): [True: 192k, False: 0]
  ------------------
  247|   192k|        sk_IMPLEMENTATION_pop_free(a->impls, &impl_free);
  248|   192k|        lh_QUERY_doall(a->cache, &impl_cache_free);
  249|   192k|        lh_QUERY_free(a->cache);
  250|   192k|        OPENSSL_free(a);
  ------------------
  |  |  132|   192k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  251|   192k|    }
  252|   192k|    if (sa != NULL)
  ------------------
  |  Branch (252:9): [True: 192k, False: 0]
  ------------------
  253|   192k|        ossl_sa_ALGORITHM_set(sa->algs, idx, NULL);
  254|   192k|}
property.c:alg_cleanup_by_provider:
  554|   241k|{
  555|   241k|    struct alg_cleanup_by_provider_data_st *data = arg;
  556|   241k|    int i, count;
  557|       |
  558|       |    /*
  559|       |     * We walk the stack backwards, to avoid having to deal with stack shifts
  560|       |     * caused by deletion
  561|       |     */
  562|   484k|    for (count = 0, i = sk_IMPLEMENTATION_num(alg->impls); i-- > 0;) {
  ------------------
  |  Branch (562:60): [True: 242k, False: 241k]
  ------------------
  563|   242k|        IMPLEMENTATION *impl = sk_IMPLEMENTATION_value(alg->impls, i);
  564|       |
  565|   242k|        if (impl->provider == data->prov) {
  ------------------
  |  Branch (565:13): [True: 557, False: 241k]
  ------------------
  566|    557|#ifndef FIPS_MODULE
  567|    557|            OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  219|    557|    do {                           \
  |  |  220|    557|        BIO *trc_out = NULL;       \
  |  |  221|    557|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 557]
  |  |  ------------------
  ------------------
  568|      0|            {
  569|      0|                char buf[512];
  570|      0|                size_t size;
  571|       |
  572|      0|                size = ossl_property_list_to_string(NULL, impl->properties, buf,
  573|      0|                    sizeof(buf));
  574|      0|                BIO_printf(trc_out, "Removing implementation from "
  575|      0|                                    "query cache\nproperties %s\nprovider %s\n",
  576|      0|                    size == 0 ? "none" : buf,
  ------------------
  |  Branch (576:21): [True: 0, False: 0]
  ------------------
  577|      0|                    ossl_provider_name(impl->provider) == NULL ? "none" : ossl_provider_name(impl->provider));
  ------------------
  |  Branch (577:21): [True: 0, False: 0]
  ------------------
  578|      0|            }
  579|    557|            OSSL_TRACE_END(QUERY);
  ------------------
  |  |  224|    557|    }                            \
  |  |  225|    557|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 557]
  |  |  ------------------
  ------------------
  580|    557|#endif
  581|       |
  582|    557|            (void)sk_IMPLEMENTATION_delete(alg->impls, i);
  583|    557|            count++;
  584|    557|            impl_free(impl);
  585|    557|        }
  586|   242k|    }
  587|       |
  588|       |    /*
  589|       |     * If we removed any implementation, we also clear the whole associated
  590|       |     * cache, 'cause that's the sensible thing to do.
  591|       |     * There's no point flushing the cache entries where we didn't remove
  592|       |     * any implementation, though.
  593|       |     */
  594|   241k|    if (count > 0)
  ------------------
  |  Branch (594:9): [True: 557, False: 241k]
  ------------------
  595|    557|        ossl_method_cache_flush_alg(data->sa, alg);
  596|   241k|}
property.c:ossl_method_cache_flush_alg:
  838|  1.16k|{
  839|  1.16k|    sa->cache_nelem -= lh_QUERY_num_items(alg->cache);
  840|  1.16k|    impl_cache_flush_alg(0, alg);
  841|  1.16k|}
property.c:ossl_property_read_lock:
  190|   850k|{
  191|   850k|    return p != NULL ? CRYPTO_THREAD_read_lock(p->lock) : 0;
  ------------------
  |  Branch (191:12): [True: 850k, False: 0]
  ------------------
  192|   850k|}
property.c:alg_copy:
  624|    666|{
  625|    666|    STACK_OF(ALGORITHM) *newalg = arg;
  ------------------
  |  |   33|    666|#define STACK_OF(type) struct stack_st_##type
  ------------------
  626|       |
  627|    666|    alg = OPENSSL_memdup(alg, sizeof(ALGORITHM));
  ------------------
  |  |  134|    666|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  628|    666|    if (alg == NULL)
  ------------------
  |  Branch (628:9): [True: 0, False: 666]
  ------------------
  629|      0|        return;
  630|       |
  631|    666|    alg->impls = sk_IMPLEMENTATION_dup(alg->impls);
  632|       |
  633|    666|    (void)sk_ALGORITHM_push(newalg, alg);
  634|    666|}
property.c:alg_do_one:
  619|    850|{
  620|    850|    fn(alg->nid, impl->method.method, fnarg);
  621|    850|}
property.c:del_tmpalg:
  637|    666|{
  638|    666|    sk_IMPLEMENTATION_free(alg->impls);
  639|    666|    OPENSSL_free(alg);
  ------------------
  |  |  132|    666|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  640|    666|}
property.c:ossl_method_cache_flush:
  844|   193k|{
  845|   193k|    ALGORITHM *alg = ossl_method_store_retrieve(sa, nid);
  846|       |
  847|   193k|    if (alg != NULL)
  ------------------
  |  Branch (847:9): [True: 603, False: 193k]
  ------------------
  848|    603|        ossl_method_cache_flush_alg(sa, alg);
  849|   193k|}
property.c:impl_cache_flush_alg:
  237|  1.16k|{
  238|  1.16k|    lh_QUERY_doall(alg->cache, &impl_cache_free);
  239|  1.16k|    lh_QUERY_flush(alg->cache);
  240|  1.16k|}
property.c:impl_cache_free:
  229|  33.4k|{
  230|  33.4k|    if (elem != NULL) {
  ------------------
  |  Branch (230:9): [True: 33.4k, False: 0]
  ------------------
  231|  33.4k|        ossl_method_free(&elem->method);
  232|  33.4k|        OPENSSL_free(elem);
  ------------------
  |  |  132|  33.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  233|  33.4k|    }
  234|  33.4k|}
property.c:ossl_method_free:
  185|   226k|{
  186|   226k|    (*method->free)(method->method);
  187|   226k|}

ossl_err_load_PROP_strings:
   40|      1|{
   41|      1|#ifndef OPENSSL_NO_ERR
   42|      1|    if (ERR_reason_error_string(PROP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (42:9): [True: 1, False: 0]
  ------------------
   43|      1|        ERR_load_strings_const(PROP_str_reasons);
   44|      1|#endif
   45|      1|    return 1;
   46|      1|}

ossl_parse_property:
  346|  1.35k|{
  347|  1.35k|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  348|  1.35k|    OSSL_PROPERTY_LIST *res = NULL;
  349|  1.35k|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|  1.35k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  350|  1.35k|    const char *s = defn;
  351|  1.35k|    int done;
  352|       |
  353|  1.35k|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (353:9): [True: 0, False: 1.35k]
  |  Branch (353:22): [True: 0, False: 1.35k]
  ------------------
  354|      0|        return NULL;
  355|       |
  356|  1.35k|    s = skip_space(s);
  357|  1.35k|    done = *s == '\0';
  358|  2.97k|    while (!done) {
  ------------------
  |  Branch (358:12): [True: 1.62k, False: 1.35k]
  ------------------
  359|  1.62k|        const char *start = s;
  360|       |
  361|  1.62k|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  107|  1.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|  1.62k|        if (prop == NULL)
  ------------------
  |  Branch (362:13): [True: 0, False: 1.62k]
  ------------------
  363|      0|            goto err;
  364|  1.62k|        memset(&prop->v, 0, sizeof(prop->v));
  365|  1.62k|        prop->optional = 0;
  366|  1.62k|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (366:13): [True: 0, False: 1.62k]
  ------------------
  367|      0|            goto err;
  368|  1.62k|        prop->oper = OSSL_PROPERTY_OPER_EQ;
  369|  1.62k|        if (prop->name_idx == 0) {
  ------------------
  |  Branch (369:13): [True: 0, False: 1.62k]
  ------------------
  370|      0|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|      0|#define PROP_R_PARSE_FAILED 108
  ------------------
  371|      0|                "Unknown name HERE-->%s", start);
  372|      0|            goto err;
  373|      0|        }
  374|  1.62k|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (374:13): [True: 1.62k, False: 0]
  ------------------
  375|  1.62k|            if (!parse_value(ctx, &s, prop, 1)) {
  ------------------
  |  Branch (375:17): [True: 0, False: 1.62k]
  ------------------
  376|      0|                ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |   34|      0|#define PROP_R_NO_VALUE 107
  ------------------
  377|      0|                    "HERE-->%s", start);
  378|      0|                goto err;
  379|      0|            }
  380|  1.62k|        } else {
  381|       |            /* A name alone means a true Boolean */
  382|      0|            prop->type = OSSL_PROPERTY_TYPE_STRING;
  383|      0|            prop->v.str_val = OSSL_PROPERTY_TRUE;
  ------------------
  |  |   39|      0|#define OSSL_PROPERTY_TRUE 1
  ------------------
  384|      0|        }
  385|       |
  386|  1.62k|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (386:13): [True: 0, False: 1.62k]
  ------------------
  387|      0|            goto err;
  388|  1.62k|        prop = NULL;
  389|  1.62k|        done = !match_ch(&s, ',');
  390|  1.62k|    }
  391|  1.35k|    if (*s != '\0') {
  ------------------
  |  Branch (391:9): [True: 0, False: 1.35k]
  ------------------
  392|      0|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   37|      0|#define PROP_R_TRAILING_CHARACTERS 110
  ------------------
  393|      0|            "HERE-->%s", s);
  394|      0|        goto err;
  395|      0|    }
  396|  1.35k|    res = stack_to_property_list(ctx, sk);
  397|       |
  398|  1.35k|err:
  399|  1.35k|    OPENSSL_free(prop);
  ------------------
  |  |  132|  1.35k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  400|  1.35k|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  401|  1.35k|    return res;
  402|  1.35k|}
ossl_parse_query:
  406|  40.4k|{
  407|  40.4k|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|  40.4k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  408|  40.4k|    OSSL_PROPERTY_LIST *res = NULL;
  409|  40.4k|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  410|  40.4k|    int done;
  411|       |
  412|  40.4k|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (412:9): [True: 0, False: 40.4k]
  |  Branch (412:22): [True: 0, False: 40.4k]
  ------------------
  413|      0|        return NULL;
  414|       |
  415|  40.4k|    s = skip_space(s);
  416|  40.4k|    done = *s == '\0';
  417|   139k|    while (!done) {
  ------------------
  |  Branch (417:12): [True: 104k, False: 35.3k]
  ------------------
  418|   104k|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  107|   104k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  419|   104k|        if (prop == NULL)
  ------------------
  |  Branch (419:13): [True: 0, False: 104k]
  ------------------
  420|      0|            goto err;
  421|   104k|        memset(&prop->v, 0, sizeof(prop->v));
  422|       |
  423|   104k|        if (match_ch(&s, '-')) {
  ------------------
  |  Branch (423:13): [True: 1.87k, False: 102k]
  ------------------
  424|  1.87k|            prop->oper = OSSL_PROPERTY_OVERRIDE;
  425|  1.87k|            prop->optional = 0;
  426|  1.87k|            if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (426:17): [True: 517, False: 1.35k]
  ------------------
  427|    517|                goto err;
  428|  1.35k|            goto skip_value;
  429|  1.87k|        }
  430|   102k|        prop->optional = match_ch(&s, '?');
  431|   102k|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (431:13): [True: 4.60k, False: 97.9k]
  ------------------
  432|  4.60k|            goto err;
  433|       |
  434|  97.9k|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (434:13): [True: 29.6k, False: 68.3k]
  ------------------
  435|  29.6k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  436|  68.3k|        } else if (MATCH(&s, "!=")) {
  ------------------
  |  |   43|  68.3k|#define MATCH(s, m) match(s, m, sizeof(m) - 1)
  |  |  ------------------
  |  |  |  Branch (43:21): [True: 1.94k, False: 66.4k]
  |  |  ------------------
  ------------------
  437|  1.94k|            prop->oper = OSSL_PROPERTY_OPER_NE;
  438|  66.4k|        } else {
  439|       |            /* A name alone is a Boolean comparison for true */
  440|  66.4k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  441|  66.4k|            prop->type = OSSL_PROPERTY_TYPE_STRING;
  442|  66.4k|            prop->v.str_val = OSSL_PROPERTY_TRUE;
  ------------------
  |  |   39|  66.4k|#define OSSL_PROPERTY_TRUE 1
  ------------------
  443|  66.4k|            goto skip_value;
  444|  66.4k|        }
  445|  31.5k|        if (!parse_value(ctx, &s, prop, create_values))
  ------------------
  |  Branch (445:13): [True: 24.4k, False: 7.12k]
  ------------------
  446|  24.4k|            prop->type = OSSL_PROPERTY_TYPE_VALUE_UNDEFINED;
  447|       |
  448|  99.3k|    skip_value:
  449|  99.3k|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (449:13): [True: 0, False: 99.3k]
  ------------------
  450|      0|            goto err;
  451|  99.3k|        prop = NULL;
  452|  99.3k|        done = !match_ch(&s, ',');
  453|  99.3k|    }
  454|  35.3k|    if (*s != '\0') {
  ------------------
  |  Branch (454:9): [True: 18.5k, False: 16.7k]
  ------------------
  455|  18.5k|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  359|  18.5k|    (ERR_new(),                                                  \
  |  |  360|  18.5k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  18.5k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  18.5k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   99|  18.5k|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   37|  18.5k|#define PROP_R_TRAILING_CHARACTERS 110
  ------------------
  456|  18.5k|            "HERE-->%s", s);
  457|  18.5k|        goto err;
  458|  18.5k|    }
  459|  16.7k|    res = stack_to_property_list(ctx, sk);
  460|       |
  461|  40.4k|err:
  462|  40.4k|    OPENSSL_free(prop);
  ------------------
  |  |  132|  40.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  463|  40.4k|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  464|  40.4k|    return res;
  465|  16.7k|}
ossl_property_match_count:
  473|  14.7k|{
  474|  14.7k|    const OSSL_PROPERTY_DEFINITION *const q = query->properties;
  475|  14.7k|    const OSSL_PROPERTY_DEFINITION *const d = defn->properties;
  476|  14.7k|    int i = 0, j = 0, matches = 0;
  477|  14.7k|    OSSL_PROPERTY_OPER oper;
  478|       |
  479|  18.0k|    while (i < query->num_properties) {
  ------------------
  |  Branch (479:12): [True: 10.1k, False: 7.87k]
  ------------------
  480|  10.1k|        if ((oper = q[i].oper) == OSSL_PROPERTY_OVERRIDE) {
  ------------------
  |  Branch (480:13): [True: 108, False: 10.0k]
  ------------------
  481|    108|            i++;
  482|    108|            continue;
  483|    108|        }
  484|  10.0k|        if (j < defn->num_properties) {
  ------------------
  |  Branch (484:13): [True: 7.77k, False: 2.29k]
  ------------------
  485|  7.77k|            if (q[i].name_idx > d[j].name_idx) { /* skip defn, not in query */
  ------------------
  |  Branch (485:17): [True: 1.71k, False: 6.06k]
  ------------------
  486|  1.71k|                j++;
  487|  1.71k|                continue;
  488|  1.71k|            }
  489|  6.06k|            if (q[i].name_idx == d[j].name_idx) { /* both in defn and query */
  ------------------
  |  Branch (489:17): [True: 155, False: 5.90k]
  ------------------
  490|    155|                const int eq = q[i].type == d[j].type
  ------------------
  |  Branch (490:32): [True: 108, False: 47]
  ------------------
  491|    108|                    && memcmp(&q[i].v, &d[j].v, sizeof(q[i].v)) == 0;
  ------------------
  |  Branch (491:24): [True: 0, False: 108]
  ------------------
  492|       |
  493|    155|                if ((eq && oper == OSSL_PROPERTY_OPER_EQ)
  ------------------
  |  Branch (493:22): [True: 0, False: 155]
  |  Branch (493:28): [True: 0, False: 0]
  ------------------
  494|    155|                    || (!eq && oper == OSSL_PROPERTY_OPER_NE))
  ------------------
  |  Branch (494:25): [True: 155, False: 0]
  |  Branch (494:32): [True: 47, False: 108]
  ------------------
  495|     47|                    matches++;
  496|    108|                else if (!q[i].optional)
  ------------------
  |  Branch (496:26): [True: 61, False: 47]
  ------------------
  497|     61|                    return -1;
  498|     94|                i++;
  499|     94|                j++;
  500|     94|                continue;
  501|    155|            }
  502|  6.06k|        }
  503|       |
  504|       |        /*
  505|       |         * Handle the cases of a missing value and a query with no corresponding
  506|       |         * definition.  The former fails for any comparison except inequality,
  507|       |         * the latter is treated as a comparison against the Boolean false.
  508|       |         */
  509|  8.20k|        if (q[i].type == OSSL_PROPERTY_TYPE_VALUE_UNDEFINED) {
  ------------------
  |  Branch (509:13): [True: 1.80k, False: 6.39k]
  ------------------
  510|  1.80k|            if (oper == OSSL_PROPERTY_OPER_NE)
  ------------------
  |  Branch (510:17): [True: 94, False: 1.71k]
  ------------------
  511|     94|                matches++;
  512|  1.71k|            else if (!q[i].optional)
  ------------------
  |  Branch (512:22): [True: 1.46k, False: 249]
  ------------------
  513|  1.46k|                return -1;
  514|  6.39k|        } else if (q[i].type != OSSL_PROPERTY_TYPE_STRING
  ------------------
  |  Branch (514:20): [True: 2.37k, False: 4.01k]
  ------------------
  515|  4.01k|            || (oper == OSSL_PROPERTY_OPER_EQ
  ------------------
  |  Branch (515:17): [True: 3.92k, False: 94]
  ------------------
  516|  3.92k|                && q[i].v.str_val != OSSL_PROPERTY_FALSE)
  ------------------
  |  |   40|  3.92k|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (516:20): [True: 3.92k, False: 0]
  ------------------
  517|     94|            || (oper == OSSL_PROPERTY_OPER_NE
  ------------------
  |  Branch (517:17): [True: 94, False: 0]
  ------------------
  518|  6.30k|                && q[i].v.str_val == OSSL_PROPERTY_FALSE)) {
  ------------------
  |  |   40|     94|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (518:20): [True: 0, False: 94]
  ------------------
  519|  6.30k|            if (!q[i].optional)
  ------------------
  |  Branch (519:17): [True: 5.36k, False: 934]
  ------------------
  520|  5.36k|                return -1;
  521|  6.30k|        } else {
  522|     94|            matches++;
  523|     94|        }
  524|  1.37k|        i++;
  525|  1.37k|    }
  526|  7.87k|    return matches;
  527|  14.7k|}
ossl_property_free:
  530|  42.5k|{
  531|  42.5k|    OPENSSL_free(p);
  ------------------
  |  |  132|  42.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  532|  42.5k|}
ossl_property_parse_init:
  575|    809|{
  576|    809|    static const char *const predefined_names[] = {
  577|    809|        "provider", /* Name of provider (default, legacy, fips) */
  578|    809|        "version", /* Version number of this provider */
  579|    809|        "fips", /* FIPS validated or FIPS supporting algorithm */
  580|    809|        "output", /* Output type for encoders */
  581|    809|        "input", /* Input type for decoders */
  582|    809|        "structure", /* Structure name for encoders and decoders */
  583|    809|    };
  584|    809|    size_t i;
  585|       |
  586|  5.66k|    for (i = 0; i < OSSL_NELEM(predefined_names); i++)
  ------------------
  |  |   14|  5.66k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (586:17): [True: 4.85k, False: 809]
  ------------------
  587|  4.85k|        if (ossl_property_name(ctx, predefined_names[i], 1) == 0)
  ------------------
  |  Branch (587:13): [True: 0, False: 4.85k]
  ------------------
  588|      0|            goto err;
  589|       |
  590|       |    /*
  591|       |     * Pre-populate the two Boolean values. We must do them before any other
  592|       |     * values and in this order so that we get the same index as the global
  593|       |     * OSSL_PROPERTY_TRUE and OSSL_PROPERTY_FALSE values
  594|       |     */
  595|    809|    if ((ossl_property_value(ctx, "yes", 1) != OSSL_PROPERTY_TRUE)
  ------------------
  |  |   39|    809|#define OSSL_PROPERTY_TRUE 1
  ------------------
  |  Branch (595:9): [True: 0, False: 809]
  ------------------
  596|    809|        || (ossl_property_value(ctx, "no", 1) != OSSL_PROPERTY_FALSE))
  ------------------
  |  |   40|    809|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (596:12): [True: 0, False: 809]
  ------------------
  597|      0|        goto err;
  598|       |
  599|    809|    return 1;
  600|      0|err:
  601|      0|    return 0;
  602|    809|}
property_parse.c:pd_compare:
  289|   117k|{
  290|   117k|    const OSSL_PROPERTY_DEFINITION *pd1 = *p1;
  291|   117k|    const OSSL_PROPERTY_DEFINITION *pd2 = *p2;
  292|       |
  293|   117k|    if (pd1->name_idx < pd2->name_idx)
  ------------------
  |  Branch (293:9): [True: 55.5k, False: 61.7k]
  ------------------
  294|  55.5k|        return -1;
  295|  61.7k|    if (pd1->name_idx > pd2->name_idx)
  ------------------
  |  Branch (295:9): [True: 22.8k, False: 38.9k]
  ------------------
  296|  22.8k|        return 1;
  297|  38.9k|    return 0;
  298|  61.7k|}
property_parse.c:skip_space:
   26|   272k|{
   27|   440k|    while (ossl_isspace(*s))
  ------------------
  |  |   82|   440k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|   440k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 167k, False: 272k]
  |  |  ------------------
  ------------------
   28|   167k|        s++;
   29|   272k|    return s;
   30|   272k|}
property_parse.c:parse_name:
   58|   106k|{
   59|   106k|    char name[100];
   60|   106k|    int err = 0;
   61|   106k|    size_t i = 0;
   62|   106k|    const char *s = *t;
   63|   106k|    int user_name = 0;
   64|       |
   65|   151k|    for (;;) {
   66|   151k|        if (!ossl_isalpha(*s)) {
  ------------------
  |  |   71|   151k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|   151k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   151k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|   151k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:13): [True: 4.41k, False: 147k]
  ------------------
   67|  4.41k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |  359|  4.41k|    (ERR_new(),                                                  \
  |  |  360|  4.41k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  4.41k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  4.41k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   99|  4.41k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   30|  4.41k|#define PROP_R_NOT_AN_IDENTIFIER 103
  ------------------
   68|  4.41k|                "HERE-->%s", *t);
   69|  4.41k|            return 0;
   70|  4.41k|        }
   71|   441k|        do {
   72|   441k|            if (i < sizeof(name) - 1)
  ------------------
  |  Branch (72:17): [True: 400k, False: 40.6k]
  ------------------
   73|   400k|                name[i++] = ossl_tolower(*s);
   74|  40.6k|            else
   75|  40.6k|                err = 1;
   76|   441k|        } while (*++s == '_' || ossl_isalnum(*s));
  ------------------
  |  |   70|   428k|#define ossl_isalnum(c) (ossl_ctype_check((c), CTYPE_MASK_alnum))
  |  |  ------------------
  |  |  |  |   41|   428k|#define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|   428k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   27|   428k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|   428k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   29|   428k|#define CTYPE_MASK_digit 0x4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (70:25): [True: 280k, False: 147k]
  |  |  ------------------
  ------------------
  |  Branch (76:18): [True: 13.3k, False: 428k]
  ------------------
   77|   147k|        if (*s != '.')
  ------------------
  |  Branch (77:13): [True: 101k, False: 45.6k]
  ------------------
   78|   101k|            break;
   79|  45.6k|        user_name = 1;
   80|  45.6k|        if (i < sizeof(name) - 1)
  ------------------
  |  Branch (80:13): [True: 44.5k, False: 1.12k]
  ------------------
   81|  44.5k|            name[i++] = *s;
   82|  1.12k|        else
   83|  1.12k|            err = 1;
   84|  45.6k|        s++;
   85|  45.6k|    }
   86|   101k|    name[i] = '\0';
   87|   101k|    if (err) {
  ------------------
  |  Branch (87:9): [True: 705, False: 100k]
  ------------------
   88|    705|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|    705|    (ERR_new(),                                                  \
  |  |  360|    705|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    705|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    705|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|    705|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   27|    705|#define PROP_R_NAME_TOO_LONG 100
  ------------------
   89|    705|        return 0;
   90|    705|    }
   91|   100k|    *t = skip_space(s);
   92|   100k|    *idx = ossl_property_name(ctx, name, user_name && create);
  ------------------
  |  Branch (92:42): [True: 38.1k, False: 62.7k]
  |  Branch (92:55): [True: 38.1k, False: 0]
  ------------------
   93|   100k|    return 1;
   94|   101k|}
property_parse.c:match_ch:
   33|   407k|{
   34|   407k|    const char *s = *t;
   35|       |
   36|   407k|    if (*s == m) {
  ------------------
  |  Branch (36:9): [True: 112k, False: 295k]
  ------------------
   37|   112k|        *t = skip_space(s + 1);
   38|   112k|        return 1;
   39|   112k|    }
   40|   295k|    return 0;
   41|   407k|}
property_parse.c:parse_value:
  258|  33.1k|{
  259|  33.1k|    const char *s = *t;
  260|  33.1k|    int r = 0;
  261|       |
  262|  33.1k|    if (*s == '"' || *s == '\'') {
  ------------------
  |  Branch (262:9): [True: 578, False: 32.6k]
  |  Branch (262:22): [True: 1.16k, False: 31.4k]
  ------------------
  263|  1.74k|        s++;
  264|  1.74k|        r = parse_string(ctx, &s, s[-1], res, create);
  265|  31.4k|    } else if (*s == '+') {
  ------------------
  |  Branch (265:16): [True: 216, False: 31.2k]
  ------------------
  266|    216|        s++;
  267|    216|        r = parse_number(&s, res);
  268|  31.2k|    } else if (*s == '-') {
  ------------------
  |  Branch (268:16): [True: 714, False: 30.5k]
  ------------------
  269|    714|        s++;
  270|    714|        r = parse_number(&s, res);
  271|    714|        res->v.int_val = -res->v.int_val;
  272|  30.5k|    } else if (*s == '0' && s[1] == 'x') {
  ------------------
  |  Branch (272:16): [True: 11.2k, False: 19.2k]
  |  Branch (272:29): [True: 4.16k, False: 7.05k]
  ------------------
  273|  4.16k|        s += 2;
  274|  4.16k|        r = parse_hex(&s, res);
  275|  26.3k|    } else if (*s == '0' && ossl_isdigit(s[1])) {
  ------------------
  |  Branch (275:16): [True: 7.05k, False: 19.2k]
  |  Branch (275:29): [True: 5.77k, False: 1.28k]
  ------------------
  276|  5.77k|        s++;
  277|  5.77k|        r = parse_oct(&s, res);
  278|  20.5k|    } else if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (278:16): [True: 5.60k, False: 14.9k]
  ------------------
  279|  5.60k|        return parse_number(t, res);
  280|  14.9k|    } else if (ossl_isalpha(*s))
  ------------------
  |  |   71|  14.9k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|  14.9k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  14.9k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  14.9k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:25): [True: 9.51k, False: 5.45k]
  |  |  ------------------
  ------------------
  281|  9.51k|        return parse_unquoted(ctx, t, res, create);
  282|  18.0k|    if (r)
  ------------------
  |  Branch (282:9): [True: 4.95k, False: 13.1k]
  ------------------
  283|  4.95k|        *t = s;
  284|  18.0k|    return r;
  285|  33.1k|}
property_parse.c:parse_string:
  195|  1.74k|{
  196|  1.74k|    char v[1000];
  197|  1.74k|    const char *s = *t;
  198|  1.74k|    size_t i = 0;
  199|  1.74k|    int err = 0;
  200|       |
  201|   418k|    while (*s != '\0' && *s != delim) {
  ------------------
  |  Branch (201:12): [True: 417k, False: 564]
  |  Branch (201:26): [True: 416k, False: 1.17k]
  ------------------
  202|   416k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (202:13): [True: 410k, False: 5.87k]
  ------------------
  203|   410k|            v[i++] = *s;
  204|  5.87k|        else
  205|  5.87k|            err = 1;
  206|   416k|        s++;
  207|   416k|    }
  208|  1.74k|    if (*s == '\0') {
  ------------------
  |  Branch (208:9): [True: 564, False: 1.17k]
  ------------------
  209|    564|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |  359|    564|    (ERR_new(),                                                  \
  |  |  360|    564|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    564|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    564|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |   99|    564|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |   33|    564|#define PROP_R_NO_MATCHING_STRING_DELIMITER 106
  ------------------
  210|    564|            "HERE-->%c%s", delim, *t);
  211|    564|        return 0;
  212|    564|    }
  213|  1.17k|    v[i] = '\0';
  214|  1.17k|    if (err) {
  ------------------
  |  Branch (214:9): [True: 47, False: 1.13k]
  ------------------
  215|     47|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|     47|    (ERR_new(),                                                  \
  |  |  360|     47|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     47|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     47|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|     47|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|     47|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  216|  1.13k|    } else {
  217|  1.13k|        res->v.str_val = ossl_property_value(ctx, v, create);
  218|  1.13k|    }
  219|  1.17k|    *t = skip_space(s + 1);
  220|  1.17k|    res->type = OSSL_PROPERTY_TYPE_STRING;
  221|  1.17k|    return !err;
  222|  1.74k|}
property_parse.c:parse_number:
   97|  6.53k|{
   98|  6.53k|    const char *s = *t;
   99|  6.53k|    int64_t v = 0;
  100|       |
  101|  65.2k|    do {
  102|  65.2k|        if (!ossl_isdigit(*s)) {
  ------------------
  |  Branch (102:13): [True: 235, False: 64.9k]
  ------------------
  103|    235|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  359|    235|    (ERR_new(),                                                  \
  |  |  360|    235|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    235|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    235|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   99|    235|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   32|    235|#define PROP_R_NOT_A_DECIMAL_DIGIT 105
  ------------------
  104|    235|                "HERE-->%s", *t);
  105|    235|            return 0;
  106|    235|        }
  107|       |        /* overflow check */
  108|  64.9k|        if (v > ((INT64_MAX - (*s - '0')) / 10)) {
  ------------------
  |  Branch (108:13): [True: 2.20k, False: 62.7k]
  ------------------
  109|  2.20k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  2.20k|    (ERR_new(),                                                  \
  |  |  360|  2.20k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  2.20k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  2.20k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  2.20k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.20k|#define PROP_R_PARSE_FAILED 108
  ------------------
  110|  2.20k|                "Property %s overflows", *t);
  111|  2.20k|            return 0;
  112|  2.20k|        }
  113|  62.7k|        v = v * 10 + (*s++ - '0');
  114|  62.7k|    } while (ossl_isdigit(*s));
  ------------------
  |  Branch (114:14): [True: 58.6k, False: 4.09k]
  ------------------
  115|  4.09k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  8.18k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  4.09k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 2.75k, False: 1.33k]
  |  Branch (115:30): [True: 2.33k, False: 427]
  |  Branch (115:44): [True: 1.55k, False: 780]
  ------------------
  116|  1.55k|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  359|  1.55k|    (ERR_new(),                                                  \
  |  |  360|  1.55k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  1.55k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  1.55k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   99|  1.55k|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   32|  1.55k|#define PROP_R_NOT_A_DECIMAL_DIGIT 105
  ------------------
  117|  1.55k|            "HERE-->%s", *t);
  118|  1.55k|        return 0;
  119|  1.55k|    }
  120|  2.54k|    *t = skip_space(s);
  121|  2.54k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  122|  2.54k|    res->v.int_val = v;
  123|  2.54k|    return 1;
  124|  4.09k|}
property_parse.c:parse_hex:
  127|  4.16k|{
  128|  4.16k|    const char *s = *t;
  129|  4.16k|    int64_t v = 0;
  130|  4.16k|    int sval;
  131|       |
  132|  57.3k|    do {
  133|  57.3k|        if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (133:13): [True: 49.3k, False: 7.98k]
  ------------------
  134|  49.3k|            sval = *s - '0';
  135|  49.3k|        } else if (ossl_isxdigit(*s)) {
  ------------------
  |  |   83|  7.98k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|  7.98k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 7.93k, False: 47]
  |  |  ------------------
  ------------------
  136|  7.93k|            sval = ossl_tolower(*s) - 'a' + 10;
  137|  7.93k|        } else {
  138|     47|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  359|     47|    (ERR_new(),                                                  \
  |  |  360|     47|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     47|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     47|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   99|     47|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|     47|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  139|     47|                "%s", *t);
  140|     47|            return 0;
  141|     47|        }
  142|       |
  143|  57.2k|        if (v > ((INT64_MAX - sval) / 16)) {
  ------------------
  |  Branch (143:13): [True: 2.67k, False: 54.5k]
  ------------------
  144|  2.67k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  2.67k|    (ERR_new(),                                                  \
  |  |  360|  2.67k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  2.67k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  2.67k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  2.67k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.67k|#define PROP_R_PARSE_FAILED 108
  ------------------
  145|  2.67k|                "Property %s overflows", *t);
  146|  2.67k|            return 0;
  147|  2.67k|        }
  148|       |
  149|  54.5k|        v <<= 4;
  150|  54.5k|        v += sval;
  151|  54.5k|    } while (ossl_isxdigit(*++s));
  ------------------
  |  |   83|  54.5k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|  54.5k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 53.1k, False: 1.44k]
  |  |  ------------------
  ------------------
  152|  1.44k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  2.88k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  1.44k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (152:9): [True: 841, False: 601]
  |  Branch (152:30): [True: 564, False: 277]
  |  Branch (152:44): [True: 517, False: 47]
  ------------------
  153|    517|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  359|    517|    (ERR_new(),                                                  \
  |  |  360|    517|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    517|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    517|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   99|    517|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|    517|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  154|    517|            "HERE-->%s", *t);
  155|    517|        return 0;
  156|    517|    }
  157|    925|    *t = skip_space(s);
  158|    925|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  159|    925|    res->v.int_val = v;
  160|    925|    return 1;
  161|  1.44k|}
property_parse.c:parse_oct:
  164|  5.77k|{
  165|  5.77k|    const char *s = *t;
  166|  5.77k|    int64_t v = 0;
  167|       |
  168|  70.1k|    do {
  169|  70.1k|        if (*s == '9' || *s == '8' || !ossl_isdigit(*s)) {
  ------------------
  |  Branch (169:13): [True: 47, False: 70.1k]
  |  Branch (169:26): [True: 47, False: 70.0k]
  |  Branch (169:39): [True: 0, False: 70.0k]
  ------------------
  170|     94|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  359|     94|    (ERR_new(),                                                  \
  |  |  360|     94|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     94|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     94|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   99|     94|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|     94|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  171|     94|                "HERE-->%s", *t);
  172|     94|            return 0;
  173|     94|        }
  174|  70.0k|        if (v > ((INT64_MAX - (*s - '0')) / 8)) {
  ------------------
  |  Branch (174:13): [True: 2.53k, False: 67.5k]
  ------------------
  175|  2.53k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  2.53k|    (ERR_new(),                                                  \
  |  |  360|  2.53k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  2.53k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  2.53k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  2.53k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.53k|#define PROP_R_PARSE_FAILED 108
  ------------------
  176|  2.53k|                "Property %s overflows", *t);
  177|  2.53k|            return 0;
  178|  2.53k|        }
  179|       |
  180|  67.5k|        v = (v << 3) + (*s - '0');
  181|  67.5k|    } while (ossl_isdigit(*++s) && *s != '9' && *s != '8');
  ------------------
  |  Branch (181:14): [True: 64.4k, False: 3.04k]
  |  Branch (181:36): [True: 64.3k, False: 94]
  |  Branch (181:49): [True: 64.3k, False: 0]
  ------------------
  182|  3.13k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  6.27k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  3.13k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (182:9): [True: 2.33k, False: 803]
  |  Branch (182:30): [True: 1.90k, False: 427]
  |  Branch (182:44): [True: 611, False: 1.29k]
  ------------------
  183|    611|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  359|    611|    (ERR_new(),                                                  \
  |  |  360|    611|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    611|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    611|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   99|    611|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|    611|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  184|    611|            "HERE-->%s", *t);
  185|    611|        return 0;
  186|    611|    }
  187|  2.52k|    *t = skip_space(s);
  188|  2.52k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  189|  2.52k|    res->v.int_val = v;
  190|  2.52k|    return 1;
  191|  3.13k|}
property_parse.c:parse_unquoted:
  226|  9.51k|{
  227|  9.51k|    char v[1000];
  228|  9.51k|    const char *s = *t;
  229|  9.51k|    size_t i = 0;
  230|  9.51k|    int err = 0;
  231|       |
  232|  9.51k|    if (*s == '\0' || *s == ',')
  ------------------
  |  Branch (232:9): [True: 0, False: 9.51k]
  |  Branch (232:23): [True: 0, False: 9.51k]
  ------------------
  233|      0|        return 0;
  234|   689k|    while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   80|  1.37M|#define ossl_isprint(c) (ossl_ctype_check((c), CTYPE_MASK_print))
  |  |  ------------------
  |  |  |  |   35|   689k|#define CTYPE_MASK_print 0x100
  |  |  ------------------
  |  |  |  Branch (80:25): [True: 685k, False: 3.91k]
  |  |  ------------------
  ------------------
                  while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   82|  1.37M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|   685k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (234:32): [True: 684k, False: 841]
  |  Branch (234:53): [True: 680k, False: 4.76k]
  ------------------
  235|   680k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (235:13): [True: 668k, False: 11.3k]
  ------------------
  236|   668k|            v[i++] = ossl_tolower(*s);
  237|  11.3k|        else
  238|  11.3k|            err = 1;
  239|   680k|        s++;
  240|   680k|    }
  241|  9.51k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  19.0k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  9.51k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (241:9): [True: 7.99k, False: 1.52k]
  |  Branch (241:30): [True: 5.65k, False: 2.33k]
  |  Branch (241:44): [True: 893, False: 4.76k]
  ------------------
  242|    893|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |  359|    893|    (ERR_new(),                                                  \
  |  |  360|    893|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    893|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    893|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   99|    893|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   28|    893|#define PROP_R_NOT_AN_ASCII_CHARACTER 101
  ------------------
  243|    893|            "HERE-->%s", s);
  244|    893|        return 0;
  245|    893|    }
  246|  8.62k|    v[i] = 0;
  247|  8.62k|    if (err)
  ------------------
  |  Branch (247:9): [True: 291, False: 8.33k]
  ------------------
  248|    291|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|    291|    (ERR_new(),                                                  \
  |  |  360|    291|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    291|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    291|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|    291|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|    291|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  249|  8.33k|    else if ((res->v.str_val = ossl_property_value(ctx, v, create)) == 0)
  ------------------
  |  Branch (249:14): [True: 6.70k, False: 1.62k]
  ------------------
  250|  6.70k|        err = 1;
  251|  8.62k|    *t = skip_space(s);
  252|  8.62k|    res->type = OSSL_PROPERTY_TYPE_STRING;
  253|  8.62k|    return !err;
  254|  9.51k|}
property_parse.c:stack_to_property_list:
  314|  18.1k|{
  315|  18.1k|    const int n = sk_OSSL_PROPERTY_DEFINITION_num(sk);
  316|  18.1k|    OSSL_PROPERTY_LIST *r;
  317|  18.1k|    OSSL_PROPERTY_IDX prev_name_idx = 0;
  318|  18.1k|    int i;
  319|       |
  320|  18.1k|    r = OPENSSL_malloc(sizeof(*r)
  ------------------
  |  |  107|  36.2k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (107:19): [True: 7.30k, False: 10.8k]
  |  |  ------------------
  ------------------
  321|  18.1k|        + (n <= 0 ? 0 : n - 1) * sizeof(r->properties[0]));
  322|  18.1k|    if (r != NULL) {
  ------------------
  |  Branch (322:9): [True: 18.1k, False: 0]
  ------------------
  323|  18.1k|        sk_OSSL_PROPERTY_DEFINITION_sort(sk);
  324|       |
  325|  18.1k|        r->has_optional = 0;
  326|  48.8k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (326:21): [True: 32.7k, False: 16.1k]
  ------------------
  327|  32.7k|            r->properties[i] = *sk_OSSL_PROPERTY_DEFINITION_value(sk, i);
  328|  32.7k|            r->has_optional |= r->properties[i].optional;
  329|       |
  330|       |            /* Check for duplicated names */
  331|  32.7k|            if (i > 0 && r->properties[i].name_idx == prev_name_idx) {
  ------------------
  |  Branch (331:17): [True: 21.9k, False: 10.8k]
  |  Branch (331:26): [True: 2.02k, False: 19.9k]
  ------------------
  332|  2.02k|                OPENSSL_free(r);
  ------------------
  |  |  132|  2.02k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  333|  2.02k|                ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  2.02k|    (ERR_new(),                                                  \
  |  |  360|  2.02k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  2.02k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  2.02k|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  2.02k|#define ERR_LIB_PROP 55
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.02k|#define PROP_R_PARSE_FAILED 108
  ------------------
  334|  2.02k|                    "Duplicated name `%s'",
  335|  2.02k|                    ossl_property_name_str(ctx, prev_name_idx));
  336|  2.02k|                return NULL;
  337|  2.02k|            }
  338|  30.7k|            prev_name_idx = r->properties[i].name_idx;
  339|  30.7k|        }
  340|  16.1k|        r->num_properties = n;
  341|  16.1k|    }
  342|  16.1k|    return r;
  343|  18.1k|}
property_parse.c:pd_free:
  301|   100k|{
  302|   100k|    OPENSSL_free(pd);
  ------------------
  |  |  132|   100k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  303|   100k|}
property_parse.c:match:
   46|  68.3k|{
   47|  68.3k|    const char *s = *t;
   48|       |
   49|  68.3k|    if (OPENSSL_strncasecmp(s, m, m_len) == 0) {
  ------------------
  |  Branch (49:9): [True: 1.94k, False: 66.4k]
  ------------------
   50|  1.94k|        *t = skip_space(s + m_len);
   51|  1.94k|        return 1;
   52|  1.94k|    }
   53|  66.4k|    return 0;
   54|  68.3k|}

ossl_property_find_property:
   25|     34|{
   26|     34|    OSSL_PROPERTY_IDX name_idx;
   27|       |
   28|     34|    if (list == NULL || name == NULL
  ------------------
  |  Branch (28:9): [True: 0, False: 34]
  |  Branch (28:25): [True: 0, False: 34]
  ------------------
   29|     34|        || (name_idx = ossl_property_name(libctx, name, 0)) == 0)
  ------------------
  |  Branch (29:12): [True: 0, False: 34]
  ------------------
   30|      0|        return NULL;
   31|       |
   32|     34|    return ossl_bsearch(&name_idx, list->properties, list->num_properties,
   33|       |        sizeof(*list->properties), &property_idx_cmp, NULL, 0);
   34|     34|}
ossl_property_get_string_value:
   43|     26|{
   44|     26|    const char *value = NULL;
   45|       |
   46|     26|    if (prop != NULL && prop->type == OSSL_PROPERTY_TYPE_STRING)
  ------------------
  |  Branch (46:9): [True: 26, False: 0]
  |  Branch (46:25): [True: 26, False: 0]
  ------------------
   47|     26|        value = ossl_property_value_str(libctx, prop->v.str_val);
   48|     26|    return value;
   49|     26|}
ossl_property_has_optional:
   62|  14.7k|{
   63|  14.7k|    return query->has_optional ? 1 : 0;
  ------------------
  |  Branch (63:12): [True: 1.38k, False: 13.3k]
  ------------------
   64|  14.7k|}
property_query.c:property_idx_cmp:
   15|     59|{
   16|     59|    OSSL_PROPERTY_IDX key = *(const OSSL_PROPERTY_IDX *)keyp;
   17|     59|    const OSSL_PROPERTY_DEFINITION *defn = (const OSSL_PROPERTY_DEFINITION *)compare;
   18|       |
   19|     59|    return key - defn->name_idx;
   20|     59|}

ossl_property_string_data_free:
   77|    808|{
   78|    808|    PROPERTY_STRING_DATA *propdata = vpropdata;
   79|       |
   80|    808|    if (propdata == NULL)
  ------------------
  |  Branch (80:9): [True: 0, False: 808]
  ------------------
   81|      0|        return;
   82|       |
   83|    808|    CRYPTO_THREAD_lock_free(propdata->lock);
   84|    808|    property_table_free(&propdata->prop_names);
   85|    808|    property_table_free(&propdata->prop_values);
   86|    808|#ifndef OPENSSL_SMALL_FOOTPRINT
   87|    808|    sk_OPENSSL_CSTRING_free(propdata->prop_namelist);
  ------------------
  |  |  288|    808|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   88|    808|    sk_OPENSSL_CSTRING_free(propdata->prop_valuelist);
  ------------------
  |  |  288|    808|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   89|    808|    propdata->prop_namelist = propdata->prop_valuelist = NULL;
   90|    808|#endif
   91|    808|    propdata->prop_name_idx = propdata->prop_value_idx = 0;
   92|       |
   93|    808|    OPENSSL_free(propdata);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|    808|}
ossl_property_string_data_new:
   97|    809|{
   98|    809|    PROPERTY_STRING_DATA *propdata = OPENSSL_zalloc(sizeof(*propdata));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|       |
  100|    809|    if (propdata == NULL)
  ------------------
  |  Branch (100:9): [True: 0, False: 809]
  ------------------
  101|      0|        return NULL;
  102|       |
  103|    809|    propdata->lock = CRYPTO_THREAD_lock_new();
  104|    809|    propdata->prop_names = lh_PROPERTY_STRING_new(&property_hash,
  105|    809|        &property_cmp);
  106|    809|    propdata->prop_values = lh_PROPERTY_STRING_new(&property_hash,
  107|    809|        &property_cmp);
  108|    809|#ifndef OPENSSL_SMALL_FOOTPRINT
  109|    809|    propdata->prop_namelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  285|    809|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OPENSSL_CSTRING_freefunc_thunk))
  ------------------
  110|    809|    propdata->prop_valuelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  285|    809|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OPENSSL_CSTRING_freefunc_thunk))
  ------------------
  111|    809|#endif
  112|    809|    if (propdata->lock == NULL
  ------------------
  |  Branch (112:9): [True: 0, False: 809]
  ------------------
  113|    809|#ifndef OPENSSL_SMALL_FOOTPRINT
  114|    809|        || propdata->prop_namelist == NULL
  ------------------
  |  Branch (114:12): [True: 0, False: 809]
  ------------------
  115|    809|        || propdata->prop_valuelist == NULL
  ------------------
  |  Branch (115:12): [True: 0, False: 809]
  ------------------
  116|    809|#endif
  117|    809|        || propdata->prop_names == NULL
  ------------------
  |  Branch (117:12): [True: 0, False: 809]
  ------------------
  118|    809|        || propdata->prop_values == NULL) {
  ------------------
  |  Branch (118:12): [True: 0, False: 809]
  ------------------
  119|      0|        ossl_property_string_data_free(propdata);
  120|      0|        return NULL;
  121|      0|    }
  122|    809|    return propdata;
  123|    809|}
ossl_property_name:
  255|   105k|{
  256|   105k|    return ossl_property_string(ctx, 1, create, s);
  257|   105k|}
ossl_property_name_str:
  260|  2.02k|{
  261|  2.02k|    return ossl_property_str(1, ctx, idx);
  262|  2.02k|}
ossl_property_value:
  266|  11.0k|{
  267|  11.0k|    return ossl_property_string(ctx, 0, create, s);
  268|  11.0k|}
ossl_property_value_str:
  271|     26|{
  272|     26|    return ossl_property_str(0, ctx, idx);
  273|     26|}
property_string.c:property_table_free:
   66|  1.61k|{
   67|  1.61k|    PROP_TABLE *t = *pt;
   68|       |
   69|  1.61k|    if (t != NULL) {
  ------------------
  |  Branch (69:9): [True: 1.61k, False: 0]
  ------------------
   70|  1.61k|        lh_PROPERTY_STRING_doall(t, &property_free);
   71|  1.61k|        lh_PROPERTY_STRING_free(t);
   72|       |        *pt = NULL;
   73|  1.61k|    }
   74|  1.61k|}
property_string.c:property_free:
   61|  8.41k|{
   62|  8.41k|    OPENSSL_free(ps);
  ------------------
  |  |  132|  8.41k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   63|  8.41k|}
property_string.c:property_hash:
   51|   133k|{
   52|   133k|    return OPENSSL_LH_strhash(a->s);
   53|   133k|}
property_string.c:property_cmp:
   56|  39.6k|{
   57|  39.6k|    return strcmp(a->s, b->s);
   58|  39.6k|}
property_string.c:ossl_property_string:
  145|   116k|{
  146|   116k|    PROPERTY_STRING p, *ps, *ps_new;
  147|   116k|    PROP_TABLE *t;
  148|   116k|    OSSL_PROPERTY_IDX *pidx;
  149|   116k|    PROPERTY_STRING_DATA *propdata
  150|   116k|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   98|   116k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  151|       |
  152|   116k|    if (propdata == NULL)
  ------------------
  |  Branch (152:9): [True: 0, False: 116k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|   116k|    t = name ? propdata->prop_names : propdata->prop_values;
  ------------------
  |  Branch (155:9): [True: 105k, False: 11.0k]
  ------------------
  156|   116k|    p.s = s;
  157|   116k|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (157:9): [True: 0, False: 116k]
  ------------------
  158|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  159|      0|        return 0;
  160|      0|    }
  161|   116k|    ps = lh_PROPERTY_STRING_retrieve(t, &p);
  162|   116k|    if (ps == NULL && create) {
  ------------------
  |  Branch (162:9): [True: 77.2k, False: 39.6k]
  |  Branch (162:23): [True: 8.43k, False: 68.8k]
  ------------------
  163|  8.43k|        CRYPTO_THREAD_unlock(propdata->lock);
  164|  8.43k|        if (!CRYPTO_THREAD_write_lock(propdata->lock)) {
  ------------------
  |  Branch (164:13): [True: 0, False: 8.43k]
  ------------------
  165|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_WRITE_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|            return 0;
  167|      0|        }
  168|  8.43k|        pidx = name ? &propdata->prop_name_idx : &propdata->prop_value_idx;
  ------------------
  |  Branch (168:16): [True: 5.54k, False: 2.89k]
  ------------------
  169|  8.43k|        ps = lh_PROPERTY_STRING_retrieve(t, &p);
  170|  8.43k|        if (ps == NULL && (ps_new = new_property_string(s, pidx)) != NULL) {
  ------------------
  |  Branch (170:13): [True: 8.43k, False: 0]
  |  Branch (170:27): [True: 8.43k, False: 0]
  ------------------
  171|  8.43k|#ifndef OPENSSL_SMALL_FOOTPRINT
  172|  8.43k|            STACK_OF(OPENSSL_CSTRING) *slist;
  ------------------
  |  |   33|  8.43k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  173|       |
  174|  8.43k|            slist = name ? propdata->prop_namelist : propdata->prop_valuelist;
  ------------------
  |  Branch (174:21): [True: 5.54k, False: 2.89k]
  ------------------
  175|  8.43k|            if (sk_OPENSSL_CSTRING_push(slist, ps_new->s) <= 0) {
  ------------------
  |  |  292|  8.43k|#define sk_OPENSSL_CSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
  ------------------
  |  Branch (175:17): [True: 0, False: 8.43k]
  ------------------
  176|      0|                property_free(ps_new);
  177|      0|                CRYPTO_THREAD_unlock(propdata->lock);
  178|      0|                return 0;
  179|      0|            }
  180|  8.43k|#endif
  181|  8.43k|            lh_PROPERTY_STRING_insert(t, ps_new);
  182|  8.43k|            if (lh_PROPERTY_STRING_error(t)) {
  ------------------
  |  Branch (182:17): [True: 0, False: 8.43k]
  ------------------
  183|       |                /*-
  184|       |                 * Undo the previous push which means also decrementing the
  185|       |                 * index and freeing the allocated storage.
  186|       |                 */
  187|      0|#ifndef OPENSSL_SMALL_FOOTPRINT
  188|      0|                sk_OPENSSL_CSTRING_pop(slist);
  ------------------
  |  |  294|      0|#define sk_OPENSSL_CSTRING_pop(sk) ((const char *)OPENSSL_sk_pop(ossl_check_OPENSSL_CSTRING_sk_type(sk)))
  ------------------
  189|      0|#endif
  190|      0|                property_free(ps_new);
  191|      0|                --*pidx;
  192|      0|                CRYPTO_THREAD_unlock(propdata->lock);
  193|      0|                return 0;
  194|      0|            }
  195|  8.43k|            ps = ps_new;
  196|  8.43k|        }
  197|  8.43k|    }
  198|   116k|    CRYPTO_THREAD_unlock(propdata->lock);
  199|   116k|    return ps != NULL ? ps->idx : 0;
  ------------------
  |  Branch (199:12): [True: 48.0k, False: 68.8k]
  ------------------
  200|   116k|}
property_string.c:new_property_string:
  127|  8.43k|{
  128|  8.43k|    const size_t l = strlen(s);
  129|  8.43k|    PROPERTY_STRING *ps = OPENSSL_malloc(sizeof(*ps) + l);
  ------------------
  |  |  107|  8.43k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  130|       |
  131|  8.43k|    if (ps != NULL) {
  ------------------
  |  Branch (131:9): [True: 8.43k, False: 0]
  ------------------
  132|  8.43k|        memcpy(ps->body, s, l + 1);
  133|  8.43k|        ps->s = ps->body;
  134|  8.43k|        ps->idx = ++*pidx;
  135|  8.43k|        if (ps->idx == 0) {
  ------------------
  |  Branch (135:13): [True: 0, False: 8.43k]
  ------------------
  136|      0|            OPENSSL_free(ps);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|      0|            return NULL;
  138|      0|        }
  139|  8.43k|    }
  140|  8.43k|    return ps;
  141|  8.43k|}
property_string.c:ossl_property_str:
  219|  2.04k|{
  220|  2.04k|    const char *r;
  221|  2.04k|    PROPERTY_STRING_DATA *propdata
  222|  2.04k|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   98|  2.04k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  223|       |
  224|  2.04k|    if (propdata == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 2.04k]
  ------------------
  225|      0|        return NULL;
  226|       |
  227|  2.04k|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 2.04k]
  ------------------
  228|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  229|      0|        return NULL;
  230|      0|    }
  231|       |#ifdef OPENSSL_SMALL_FOOTPRINT
  232|       |    {
  233|       |        struct find_str_st findstr;
  234|       |
  235|       |        findstr.str = NULL;
  236|       |        findstr.idx = idx;
  237|       |
  238|       |        lh_PROPERTY_STRING_doall_arg(name ? propdata->prop_names
  239|       |                                          : propdata->prop_values,
  240|       |            find_str_fn, &findstr);
  241|       |        r = findstr.str;
  242|       |    }
  243|       |#else
  244|  2.04k|    r = sk_OPENSSL_CSTRING_value(name ? propdata->prop_namelist
  ------------------
  |  |  283|  4.09k|#define sk_OPENSSL_CSTRING_value(sk, idx) ((const char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_CSTRING_sk_type(sk), (idx)))
  |  |  ------------------
  |  |  |  Branch (283:116): [True: 2.02k, False: 26]
  |  |  ------------------
  ------------------
  245|  2.04k|                                      : propdata->prop_valuelist,
  246|  2.04k|        idx - 1);
  247|  2.04k|#endif
  248|  2.04k|    CRYPTO_THREAD_unlock(propdata->lock);
  249|       |
  250|  2.04k|    return r;
  251|  2.04k|}

OSSL_PROVIDER_try_load_ex:
   20|  1.42k|{
   21|  1.42k|    OSSL_PROVIDER *prov = NULL, *actual;
   22|  1.42k|    int isnew = 0;
   23|       |
   24|       |    /* Find it or create it */
   25|  1.42k|    if ((prov = ossl_provider_find(libctx, name, 0)) == NULL) {
  ------------------
  |  Branch (25:9): [True: 991, False: 437]
  ------------------
   26|    991|        if ((prov = ossl_provider_new(libctx, name, NULL, params, 0)) == NULL)
  ------------------
  |  Branch (26:13): [True: 0, False: 991]
  ------------------
   27|      0|            return NULL;
   28|    991|        isnew = 1;
   29|    991|    }
   30|       |
   31|  1.42k|    if (!ossl_provider_activate(prov, 1, 0)) {
  ------------------
  |  Branch (31:9): [True: 92, False: 1.33k]
  ------------------
   32|     92|        ossl_provider_free(prov);
   33|     92|        return NULL;
   34|     92|    }
   35|       |
   36|  1.33k|    actual = prov;
   37|  1.33k|    if (isnew && !ossl_provider_add_to_store(prov, &actual, retain_fallbacks)) {
  ------------------
  |  Branch (37:9): [True: 899, False: 437]
  |  Branch (37:18): [True: 0, False: 899]
  ------------------
   38|      0|        ossl_provider_deactivate(prov, 1);
   39|      0|        ossl_provider_free(prov);
   40|      0|        return NULL;
   41|      0|    }
   42|  1.33k|    if (actual != prov) {
  ------------------
  |  Branch (42:9): [True: 0, False: 1.33k]
  ------------------
   43|      0|        if (!ossl_provider_activate(actual, 1, 0)) {
  ------------------
  |  Branch (43:13): [True: 0, False: 0]
  ------------------
   44|      0|            ossl_provider_free(actual);
   45|      0|            return NULL;
   46|      0|        }
   47|      0|    }
   48|       |
   49|  1.33k|    return actual;
   50|  1.33k|}
OSSL_PROVIDER_try_load:
   54|  1.42k|{
   55|       |    return OSSL_PROVIDER_try_load_ex(libctx, name, NULL, retain_fallbacks);
   56|  1.42k|}
OSSL_PROVIDER_unload:
   72|  1.33k|{
   73|  1.33k|    if (!ossl_provider_deactivate(prov, 1))
  ------------------
  |  Branch (73:9): [True: 0, False: 1.33k]
  ------------------
   74|      0|        return 0;
   75|  1.33k|    ossl_provider_free(prov);
   76|  1.33k|    return 1;
   77|  1.33k|}
OSSL_PROVIDER_get0_provider_ctx:
  104|  2.85M|{
  105|  2.85M|    return ossl_provider_ctx(prov);
  106|  2.85M|}
OSSL_PROVIDER_get_capabilities:
  122|  8.71k|{
  123|  8.71k|    return ossl_provider_get_capabilities(prov, capability, cb, arg);
  124|  8.71k|}
OSSL_PROVIDER_do_all:
  156|  6.94k|{
  157|  6.94k|    return ossl_provider_doall_activated(ctx, cb, cbdata);
  158|  6.94k|}

ossl_child_prov_ctx_new:
   38|    809|{
   39|    809|    return OPENSSL_zalloc(sizeof(struct child_prov_globals));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|    809|}
ossl_child_prov_ctx_free:
   43|    808|{
   44|    808|    struct child_prov_globals *gbl = vgbl;
   45|       |
   46|    808|    CRYPTO_THREAD_lock_free(gbl->lock);
   47|    808|    OPENSSL_free(gbl);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|    808|}

ossl_prov_conf_ctx_new:
   31|    809|{
   32|    809|    PROVIDER_CONF_GLOBAL *pcgbl = OPENSSL_zalloc(sizeof(*pcgbl));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|       |
   34|    809|    if (pcgbl == NULL)
  ------------------
  |  Branch (34:9): [True: 0, False: 809]
  ------------------
   35|      0|        return NULL;
   36|       |
   37|    809|    pcgbl->lock = CRYPTO_THREAD_lock_new();
   38|    809|    if (pcgbl->lock == NULL) {
  ------------------
  |  Branch (38:9): [True: 0, False: 809]
  ------------------
   39|      0|        OPENSSL_free(pcgbl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|      0|        return NULL;
   41|      0|    }
   42|       |
   43|    809|    return pcgbl;
   44|    809|}
ossl_prov_conf_ctx_free:
   47|    808|{
   48|    808|    PROVIDER_CONF_GLOBAL *pcgbl = vpcgbl;
   49|       |
   50|    808|    sk_OSSL_PROVIDER_pop_free(pcgbl->activated_providers,
   51|    808|        ossl_provider_free);
   52|       |
   53|    808|    OSSL_TRACE(CONF, "Cleaned up providers\n");
  ------------------
  |  |  288|    808|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|    808|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   54|    808|    CRYPTO_THREAD_lock_free(pcgbl->lock);
   55|    808|    OPENSSL_free(pcgbl);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   56|    808|}

ossl_provider_store_free:
  288|    808|{
  289|    808|    struct provider_store_st *store = vstore;
  290|    808|    size_t i;
  291|       |
  292|    808|    if (store == NULL)
  ------------------
  |  Branch (292:9): [True: 0, False: 808]
  ------------------
  293|      0|        return;
  294|    808|    store->freeing = 1;
  295|    808|    OPENSSL_free(store->default_path);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  296|    808|    sk_OSSL_PROVIDER_pop_free(store->providers, provider_deactivate_free);
  297|    808|#ifndef FIPS_MODULE
  298|    808|    sk_OSSL_PROVIDER_CHILD_CB_pop_free(store->child_cbs,
  299|    808|        ossl_provider_child_cb_free);
  300|    808|#endif
  301|    808|    CRYPTO_THREAD_lock_free(store->default_path_lock);
  302|    808|    CRYPTO_THREAD_lock_free(store->lock);
  303|    808|    for (i = 0; i < store->numprovinfo; i++)
  ------------------
  |  Branch (303:17): [True: 0, False: 808]
  ------------------
  304|      0|        ossl_provider_info_clear(&store->provinfo[i]);
  305|    808|    OPENSSL_free(store->provinfo);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  306|    808|    OPENSSL_free(store);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  307|    808|}
ossl_provider_store_new:
  310|    809|{
  311|    809|    struct provider_store_st *store = OPENSSL_zalloc(sizeof(*store));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  312|       |
  313|    809|    if (store == NULL
  ------------------
  |  Branch (313:9): [True: 0, False: 809]
  ------------------
  314|    809|        || (store->providers = sk_OSSL_PROVIDER_new(ossl_provider_cmp)) == NULL
  ------------------
  |  Branch (314:12): [True: 0, False: 809]
  ------------------
  315|    809|        || (store->default_path_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (315:12): [True: 0, False: 809]
  ------------------
  316|    809|#ifndef FIPS_MODULE
  317|    809|        || (store->child_cbs = sk_OSSL_PROVIDER_CHILD_CB_new_null()) == NULL
  ------------------
  |  Branch (317:12): [True: 0, False: 809]
  ------------------
  318|    809|#endif
  319|    809|        || (store->lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (319:12): [True: 0, False: 809]
  ------------------
  320|      0|        ossl_provider_store_free(store);
  321|      0|        return NULL;
  322|      0|    }
  323|    809|    store->libctx = ctx;
  324|    809|    store->use_fallbacks = 1;
  325|       |
  326|    809|    return store;
  327|    809|}
ossl_provider_find:
  401|  4.02k|{
  402|  4.02k|    struct provider_store_st *store = NULL;
  403|  4.02k|    OSSL_PROVIDER *prov = NULL;
  404|       |
  405|  4.02k|    if ((store = get_provider_store(libctx)) != NULL) {
  ------------------
  |  Branch (405:9): [True: 4.02k, False: 0]
  ------------------
  406|  4.02k|        OSSL_PROVIDER tmpl = {
  407|  4.02k|            0,
  408|  4.02k|        };
  409|  4.02k|        int i;
  410|       |
  411|  4.02k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  412|       |        /*
  413|       |         * Make sure any providers are loaded from config before we try to find
  414|       |         * them.
  415|       |         */
  416|  4.02k|        if (!noconfig) {
  ------------------
  |  Branch (416:13): [True: 2.23k, False: 1.78k]
  ------------------
  417|  2.23k|            if (ossl_lib_ctx_is_default(libctx))
  ------------------
  |  Branch (417:17): [True: 0, False: 2.23k]
  ------------------
  418|      0|                OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  511|      0|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  419|  2.23k|        }
  420|  4.02k|#endif
  421|       |
  422|  4.02k|        tmpl.name = (char *)name;
  423|  4.02k|        if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (423:13): [True: 0, False: 4.02k]
  ------------------
  424|      0|            return NULL;
  425|  4.02k|        if (!sk_OSSL_PROVIDER_is_sorted(store->providers)) {
  ------------------
  |  Branch (425:13): [True: 614, False: 3.41k]
  ------------------
  426|    614|            CRYPTO_THREAD_unlock(store->lock);
  427|    614|            if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (427:17): [True: 0, False: 614]
  ------------------
  428|      0|                return NULL;
  429|    614|            if (!sk_OSSL_PROVIDER_is_sorted(store->providers))
  ------------------
  |  Branch (429:17): [True: 614, False: 0]
  ------------------
  430|    614|                sk_OSSL_PROVIDER_sort(store->providers);
  431|    614|        }
  432|  4.02k|        if ((i = sk_OSSL_PROVIDER_find(store->providers, &tmpl)) != -1)
  ------------------
  |  Branch (432:13): [True: 2.27k, False: 1.75k]
  ------------------
  433|  2.27k|            prov = sk_OSSL_PROVIDER_value(store->providers, i);
  434|  4.02k|        CRYPTO_THREAD_unlock(store->lock);
  435|  4.02k|        if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (435:13): [True: 2.27k, False: 1.75k]
  |  Branch (435:29): [True: 0, False: 2.27k]
  ------------------
  436|      0|            prov = NULL;
  437|  4.02k|    }
  438|       |
  439|  4.02k|    return prov;
  440|  4.02k|}
ossl_provider_up_ref:
  486|   196k|{
  487|   196k|    int ref = 0;
  488|       |
  489|   196k|    if (CRYPTO_UP_REF(&prov->refcnt, &ref) <= 0)
  ------------------
  |  Branch (489:9): [True: 0, False: 196k]
  ------------------
  490|      0|        return 0;
  491|       |
  492|   196k|#ifndef FIPS_MODULE
  493|   196k|    if (prov->ischild) {
  ------------------
  |  Branch (493:9): [True: 0, False: 196k]
  ------------------
  494|      0|        if (!ossl_provider_up_ref_parent(prov, 0)) {
  ------------------
  |  Branch (494:13): [True: 0, False: 0]
  ------------------
  495|      0|            ossl_provider_free(prov);
  496|      0|            return 0;
  497|      0|        }
  498|      0|    }
  499|   196k|#endif
  500|       |
  501|   196k|    return ref;
  502|   196k|}
ossl_provider_new:
  531|    991|{
  532|    991|    struct provider_store_st *store = NULL;
  533|    991|    OSSL_PROVIDER_INFO template;
  534|    991|    OSSL_PROVIDER *prov = NULL;
  535|       |
  536|    991|    if ((store = get_provider_store(libctx)) == NULL)
  ------------------
  |  Branch (536:9): [True: 0, False: 991]
  ------------------
  537|      0|        return NULL;
  538|       |
  539|    991|    memset(&template, 0, sizeof(template));
  540|    991|    if (init_function == NULL) {
  ------------------
  |  Branch (540:9): [True: 991, False: 0]
  ------------------
  541|    991|        const OSSL_PROVIDER_INFO *p;
  542|    991|        size_t i;
  543|    991|        int chosen = 0;
  544|       |
  545|       |        /* Check if this is a predefined builtin provider */
  546|  2.39k|        for (p = ossl_predefined_providers; p->name != NULL; p++) {
  ------------------
  |  Branch (546:45): [True: 2.30k, False: 92]
  ------------------
  547|  2.30k|            if (strcmp(p->name, name) != 0)
  ------------------
  |  Branch (547:17): [True: 1.40k, False: 899]
  ------------------
  548|  1.40k|                continue;
  549|       |            /* These compile-time templates always have NULL parameters */
  550|    899|            template = *p;
  551|    899|            chosen = 1;
  552|    899|            break;
  553|  2.30k|        }
  554|    991|        if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (554:13): [True: 0, False: 991]
  ------------------
  555|      0|            return NULL;
  556|    991|        for (i = 0, p = store->provinfo; i < store->numprovinfo; p++, i++) {
  ------------------
  |  Branch (556:42): [True: 0, False: 991]
  ------------------
  557|      0|            if (strcmp(p->name, name) != 0)
  ------------------
  |  Branch (557:17): [True: 0, False: 0]
  ------------------
  558|      0|                continue;
  559|       |            /* For built-in providers, copy just implicit parameters. */
  560|      0|            if (!chosen)
  ------------------
  |  Branch (560:17): [True: 0, False: 0]
  ------------------
  561|      0|                template = *p;
  562|       |            /*
  563|       |             * Explicit parameters override config-file defaults.  If an empty
  564|       |             * parameter set is desired, a non-NULL empty set must be provided.
  565|       |             */
  566|      0|            if (params != NULL || p->parameters == NULL) {
  ------------------
  |  Branch (566:17): [True: 0, False: 0]
  |  Branch (566:35): [True: 0, False: 0]
  ------------------
  567|      0|                template.parameters = NULL;
  568|      0|                break;
  569|      0|            }
  570|       |            /* Always copy to avoid sharing/mutation. */
  571|      0|            template.parameters = sk_INFOPAIR_deep_copy(p->parameters,
  572|      0|                infopair_copy,
  573|      0|                infopair_free);
  574|      0|            if (template.parameters == NULL) {
  ------------------
  |  Branch (574:17): [True: 0, False: 0]
  ------------------
  575|      0|                CRYPTO_THREAD_unlock(store->lock);
  576|      0|                return NULL;
  577|      0|            }
  578|      0|            break;
  579|      0|        }
  580|    991|        CRYPTO_THREAD_unlock(store->lock);
  581|    991|    } else {
  582|      0|        template.init = init_function;
  583|      0|    }
  584|       |
  585|    991|    if (params != NULL) {
  ------------------
  |  Branch (585:9): [True: 0, False: 991]
  ------------------
  586|      0|        int i;
  587|       |
  588|       |        /* Don't leak if already non-NULL */
  589|      0|        if (template.parameters == NULL)
  ------------------
  |  Branch (589:13): [True: 0, False: 0]
  ------------------
  590|      0|            template.parameters = sk_INFOPAIR_new_null();
  591|      0|        if (template.parameters == NULL)
  ------------------
  |  Branch (591:13): [True: 0, False: 0]
  ------------------
  592|      0|            return NULL;
  593|       |
  594|      0|        for (i = 0; params[i].key != NULL; i++) {
  ------------------
  |  Branch (594:21): [True: 0, False: 0]
  ------------------
  595|      0|            if (params[i].data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (595:17): [True: 0, False: 0]
  ------------------
  596|      0|                continue;
  597|      0|            if (ossl_provider_info_add_parameter(&template, params[i].key,
  ------------------
  |  Branch (597:17): [True: 0, False: 0]
  ------------------
  598|      0|                    (char *)params[i].data)
  599|      0|                <= 0) {
  600|      0|                sk_INFOPAIR_pop_free(template.parameters, infopair_free);
  601|      0|                return NULL;
  602|      0|            }
  603|      0|        }
  604|      0|    }
  605|       |
  606|       |    /* provider_new() generates an error, so no need here */
  607|    991|    prov = provider_new(name, template.init, template.parameters);
  608|       |
  609|       |    /* If we copied the parameters, free them */
  610|    991|    if (template.parameters != NULL)
  ------------------
  |  Branch (610:9): [True: 0, False: 991]
  ------------------
  611|      0|        sk_INFOPAIR_pop_free(template.parameters, infopair_free);
  612|       |
  613|    991|    if (prov == NULL)
  ------------------
  |  Branch (613:9): [True: 0, False: 991]
  ------------------
  614|      0|        return NULL;
  615|       |
  616|    991|    if (!ossl_provider_set_module_path(prov, template.path)) {
  ------------------
  |  Branch (616:9): [True: 0, False: 991]
  ------------------
  617|      0|        ossl_provider_free(prov);
  618|      0|        return NULL;
  619|      0|    }
  620|       |
  621|    991|    prov->libctx = libctx;
  622|    991|#ifndef FIPS_MODULE
  623|    991|    prov->error_lib = ERR_get_next_error_library();
  624|    991|#endif
  625|       |
  626|       |    /*
  627|       |     * At this point, the provider is only partially "loaded".  To be
  628|       |     * fully "loaded", ossl_provider_activate() must also be called and it must
  629|       |     * then be added to the provider store.
  630|       |     */
  631|       |
  632|    991|    return prov;
  633|    991|}
ossl_provider_add_to_store:
  660|    899|{
  661|    899|    struct provider_store_st *store;
  662|    899|    int idx;
  663|    899|    OSSL_PROVIDER tmpl = {
  664|    899|        0,
  665|    899|    };
  666|    899|    OSSL_PROVIDER *actualtmp = NULL;
  667|       |
  668|    899|    if (actualprov != NULL)
  ------------------
  |  Branch (668:9): [True: 899, False: 0]
  ------------------
  669|    899|        *actualprov = NULL;
  670|       |
  671|    899|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (671:9): [True: 0, False: 899]
  ------------------
  672|      0|        return 0;
  673|       |
  674|    899|    if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (674:9): [True: 0, False: 899]
  ------------------
  675|      0|        return 0;
  676|       |
  677|    899|    tmpl.name = (char *)prov->name;
  678|    899|    idx = sk_OSSL_PROVIDER_find(store->providers, &tmpl);
  679|    899|    if (idx == -1)
  ------------------
  |  Branch (679:9): [True: 899, False: 0]
  ------------------
  680|    899|        actualtmp = prov;
  681|      0|    else
  682|      0|        actualtmp = sk_OSSL_PROVIDER_value(store->providers, idx);
  683|       |
  684|    899|    if (idx == -1) {
  ------------------
  |  Branch (684:9): [True: 899, False: 0]
  ------------------
  685|    899|        if (sk_OSSL_PROVIDER_push(store->providers, prov) == 0)
  ------------------
  |  Branch (685:13): [True: 0, False: 899]
  ------------------
  686|      0|            goto err;
  687|    899|        prov->store = store;
  688|    899|        if (!create_provider_children(prov)) {
  ------------------
  |  Branch (688:13): [True: 0, False: 899]
  ------------------
  689|      0|            sk_OSSL_PROVIDER_delete_ptr(store->providers, prov);
  690|      0|            goto err;
  691|      0|        }
  692|    899|        if (!retain_fallbacks)
  ------------------
  |  Branch (692:13): [True: 0, False: 899]
  ------------------
  693|      0|            store->use_fallbacks = 0;
  694|    899|    }
  695|       |
  696|    899|    CRYPTO_THREAD_unlock(store->lock);
  697|       |
  698|    899|    if (actualprov != NULL) {
  ------------------
  |  Branch (698:9): [True: 899, False: 0]
  ------------------
  699|    899|        if (!ossl_provider_up_ref(actualtmp)) {
  ------------------
  |  Branch (699:13): [True: 0, False: 899]
  ------------------
  700|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  701|      0|            actualtmp = NULL;
  702|      0|            return 0;
  703|      0|        }
  704|    899|        *actualprov = actualtmp;
  705|    899|    }
  706|       |
  707|    899|    if (idx >= 0) {
  ------------------
  |  Branch (707:9): [True: 0, False: 899]
  ------------------
  708|       |        /*
  709|       |         * The provider is already in the store. Probably two threads
  710|       |         * independently initialised their own provider objects with the same
  711|       |         * name and raced to put them in the store. This thread lost. We
  712|       |         * deactivate the one we just created and use the one that already
  713|       |         * exists instead.
  714|       |         * If we get here then we know we did not create provider children
  715|       |         * above, so we inform ossl_provider_deactivate not to attempt to remove
  716|       |         * any.
  717|       |         */
  718|      0|        ossl_provider_deactivate(prov, 0);
  719|      0|        ossl_provider_free(prov);
  720|      0|    }
  721|    899|#ifndef FIPS_MODULE
  722|    899|    else {
  723|       |        /*
  724|       |         * This can be done outside the lock. We tolerate other threads getting
  725|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
  726|       |         */
  727|    899|        ossl_decoder_cache_flush(prov->libctx);
  728|    899|    }
  729|    899|#endif
  730|       |
  731|    899|    return 1;
  732|       |
  733|      0|err:
  734|      0|    CRYPTO_THREAD_unlock(store->lock);
  735|      0|    return 0;
  736|    899|}
ossl_provider_free:
  739|   198k|{
  740|   198k|    if (prov != NULL) {
  ------------------
  |  Branch (740:9): [True: 198k, False: 0]
  ------------------
  741|   198k|        int ref = 0;
  742|       |
  743|   198k|        CRYPTO_DOWN_REF(&prov->refcnt, &ref);
  744|       |
  745|       |        /*
  746|       |         * When the refcount drops to zero, we clean up the provider.
  747|       |         * Note that this also does teardown, which may seem late,
  748|       |         * considering that init happens on first activation.  However,
  749|       |         * there may be other structures hanging on to the provider after
  750|       |         * the last deactivation and may therefore need full access to the
  751|       |         * provider's services.  Therefore, we deinit late.
  752|       |         */
  753|   198k|        if (ref == 0) {
  ------------------
  |  Branch (753:13): [True: 1.79k, False: 196k]
  ------------------
  754|  1.79k|            if (prov->flag_initialized) {
  ------------------
  |  Branch (754:17): [True: 1.70k, False: 92]
  ------------------
  755|  1.70k|                ossl_provider_teardown(prov);
  756|  1.70k|#ifndef OPENSSL_NO_ERR
  757|  1.70k|#ifndef FIPS_MODULE
  758|  1.70k|                if (prov->error_strings != NULL) {
  ------------------
  |  Branch (758:21): [True: 0, False: 1.70k]
  ------------------
  759|      0|                    ERR_unload_strings(prov->error_lib, prov->error_strings);
  760|      0|                    OPENSSL_free(prov->error_strings);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  761|      0|                    prov->error_strings = NULL;
  762|      0|                }
  763|  1.70k|#endif
  764|  1.70k|#endif
  765|  1.70k|                OPENSSL_free(prov->operation_bits);
  ------------------
  |  |  132|  1.70k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  766|  1.70k|                prov->operation_bits = NULL;
  767|  1.70k|                prov->operation_bits_sz = 0;
  768|  1.70k|                prov->flag_initialized = 0;
  769|  1.70k|            }
  770|       |
  771|  1.79k|#ifndef FIPS_MODULE
  772|       |            /*
  773|       |             * We deregister thread handling whether or not the provider was
  774|       |             * initialized. If init was attempted but was not successful then
  775|       |             * the provider may still have registered a thread handler.
  776|       |             */
  777|  1.79k|            ossl_init_thread_deregister(prov);
  778|  1.79k|            DSO_free(prov->module);
  779|  1.79k|#endif
  780|  1.79k|            OPENSSL_free(prov->name);
  ------------------
  |  |  132|  1.79k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  781|  1.79k|            OPENSSL_free(prov->path);
  ------------------
  |  |  132|  1.79k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  782|  1.79k|            sk_INFOPAIR_pop_free(prov->parameters, infopair_free);
  783|  1.79k|            CRYPTO_THREAD_lock_free(prov->opbits_lock);
  784|  1.79k|            CRYPTO_THREAD_lock_free(prov->flag_lock);
  785|  1.79k|            CRYPTO_THREAD_lock_free(prov->activatecnt_lock);
  786|  1.79k|            CRYPTO_FREE_REF(&prov->refcnt);
  787|  1.79k|            OPENSSL_free(prov);
  ------------------
  |  |  132|  1.79k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  788|  1.79k|        }
  789|   196k|#ifndef FIPS_MODULE
  790|   196k|        else if (prov->ischild) {
  ------------------
  |  Branch (790:18): [True: 0, False: 196k]
  ------------------
  791|      0|            ossl_provider_free_parent(prov, 0);
  792|      0|        }
  793|   198k|#endif
  794|   198k|    }
  795|   198k|}
ossl_provider_set_module_path:
  799|    991|{
  800|    991|    OPENSSL_free(prov->path);
  ------------------
  |  |  132|    991|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  801|    991|    prov->path = NULL;
  802|    991|    if (module_path == NULL)
  ------------------
  |  Branch (802:9): [True: 991, False: 0]
  ------------------
  803|    991|        return 1;
  804|      0|    if ((prov->path = OPENSSL_strdup(module_path)) != NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (804:9): [True: 0, False: 0]
  ------------------
  805|      0|        return 1;
  806|      0|    return 0;
  807|      0|}
OSSL_PROVIDER_get_conf_parameters:
  845|  6.28k|{
  846|  6.28k|    int i;
  847|       |
  848|  6.28k|    if (prov->parameters == NULL)
  ------------------
  |  Branch (848:9): [True: 0, False: 6.28k]
  ------------------
  849|      0|        return 1;
  850|       |
  851|  6.28k|    for (i = 0; i < sk_INFOPAIR_num(prov->parameters); i++) {
  ------------------
  |  Branch (851:17): [True: 0, False: 6.28k]
  ------------------
  852|      0|        INFOPAIR *pair = sk_INFOPAIR_value(prov->parameters, i);
  853|      0|        OSSL_PARAM *p = OSSL_PARAM_locate(params, pair->name);
  854|       |
  855|      0|        if (p != NULL
  ------------------
  |  Branch (855:13): [True: 0, False: 0]
  ------------------
  856|      0|            && !OSSL_PARAM_set_utf8_ptr(p, pair->value))
  ------------------
  |  Branch (856:16): [True: 0, False: 0]
  ------------------
  857|      0|            return 0;
  858|      0|    }
  859|  6.28k|    return 1;
  860|  6.28k|}
ossl_provider_activate:
 1402|  1.42k|{
 1403|  1.42k|    int count;
 1404|       |
 1405|  1.42k|    if (prov == NULL)
  ------------------
  |  Branch (1405:9): [True: 0, False: 1.42k]
  ------------------
 1406|      0|        return 0;
 1407|  1.42k|#ifndef FIPS_MODULE
 1408|       |    /*
 1409|       |     * If aschild is true, then we only actually do the activation if the
 1410|       |     * provider is a child. If its not, this is still success.
 1411|       |     */
 1412|  1.42k|    if (aschild && !prov->ischild)
  ------------------
  |  Branch (1412:9): [True: 0, False: 1.42k]
  |  Branch (1412:20): [True: 0, False: 0]
  ------------------
 1413|      0|        return 1;
 1414|  1.42k|#endif
 1415|  1.42k|    if ((count = provider_activate(prov, 1, upcalls)) > 0)
  ------------------
  |  Branch (1415:9): [True: 1.33k, False: 92]
  ------------------
 1416|  1.33k|        return count == 1 ? provider_flush_store_cache(prov) : 1;
  ------------------
  |  Branch (1416:16): [True: 899, False: 437]
  ------------------
 1417|       |
 1418|     92|    return 0;
 1419|  1.42k|}
ossl_provider_deactivate:
 1422|  2.14k|{
 1423|  2.14k|    int count;
 1424|       |
 1425|  2.14k|    if (prov == NULL
  ------------------
  |  Branch (1425:9): [True: 0, False: 2.14k]
  ------------------
 1426|  2.14k|        || (count = provider_deactivate(prov, 1, removechildren)) < 0)
  ------------------
  |  Branch (1426:12): [True: 0, False: 2.14k]
  ------------------
 1427|      0|        return 0;
 1428|  2.14k|    return count == 0 ? provider_remove_store_methods(prov) : 1;
  ------------------
  |  Branch (1428:12): [True: 1.70k, False: 437]
  ------------------
 1429|  2.14k|}
ossl_provider_ctx:
 1432|  3.43M|{
 1433|  3.43M|    return prov != NULL ? prov->provctx : NULL;
  ------------------
  |  Branch (1433:12): [True: 3.43M, False: 0]
  ------------------
 1434|  3.43M|}
ossl_provider_doall_activated:
 1533|   101k|{
 1534|   101k|    int ret = 0, curr, max, ref = 0;
 1535|   101k|    struct provider_store_st *store = get_provider_store(ctx);
 1536|   101k|    STACK_OF(OSSL_PROVIDER) *provs = NULL;
  ------------------
  |  |   33|   101k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1537|       |
 1538|   101k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
 1539|       |    /*
 1540|       |     * Make sure any providers are loaded from config before we try to use
 1541|       |     * them.
 1542|       |     */
 1543|   101k|    if (ossl_lib_ctx_is_default(ctx))
  ------------------
  |  Branch (1543:9): [True: 49.7k, False: 51.9k]
  ------------------
 1544|  49.7k|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  511|  49.7k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
 1545|   101k|#endif
 1546|       |
 1547|   101k|    if (store == NULL)
  ------------------
  |  Branch (1547:9): [True: 0, False: 101k]
  ------------------
 1548|      0|        return 1;
 1549|   101k|    if (!provider_activate_fallbacks(store))
  ------------------
  |  Branch (1549:9): [True: 0, False: 101k]
  ------------------
 1550|      0|        return 0;
 1551|       |
 1552|       |    /*
 1553|       |     * Under lock, grab a copy of the provider list and up_ref each
 1554|       |     * provider so that they don't disappear underneath us.
 1555|       |     */
 1556|   101k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1556:9): [True: 0, False: 101k]
  ------------------
 1557|      0|        return 0;
 1558|   101k|    provs = sk_OSSL_PROVIDER_dup(store->providers);
 1559|   101k|    if (provs == NULL) {
  ------------------
  |  Branch (1559:9): [True: 0, False: 101k]
  ------------------
 1560|      0|        CRYPTO_THREAD_unlock(store->lock);
 1561|      0|        return 0;
 1562|      0|    }
 1563|   101k|    max = sk_OSSL_PROVIDER_num(provs);
 1564|       |    /*
 1565|       |     * We work backwards through the stack so that we can safely delete items
 1566|       |     * as we go.
 1567|       |     */
 1568|   268k|    for (curr = max - 1; curr >= 0; curr--) {
  ------------------
  |  Branch (1568:26): [True: 166k, False: 101k]
  ------------------
 1569|   166k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1570|       |
 1571|   166k|        if (!CRYPTO_THREAD_read_lock(prov->flag_lock))
  ------------------
  |  Branch (1571:13): [True: 0, False: 166k]
  ------------------
 1572|      0|            goto err_unlock;
 1573|   166k|        if (prov->flag_activated) {
  ------------------
  |  Branch (1573:13): [True: 166k, False: 0]
  ------------------
 1574|       |            /*
 1575|       |             * We call CRYPTO_UP_REF directly rather than ossl_provider_up_ref
 1576|       |             * to avoid upping the ref count on the parent provider, which we
 1577|       |             * must not do while holding locks.
 1578|       |             */
 1579|   166k|            if (CRYPTO_UP_REF(&prov->refcnt, &ref) <= 0) {
  ------------------
  |  Branch (1579:17): [True: 0, False: 166k]
  ------------------
 1580|      0|                CRYPTO_THREAD_unlock(prov->flag_lock);
 1581|      0|                goto err_unlock;
 1582|      0|            }
 1583|       |            /*
 1584|       |             * It's already activated, but we up the activated count to ensure
 1585|       |             * it remains activated until after we've called the user callback.
 1586|       |             * In theory this could mean the parent provider goes inactive,
 1587|       |             * whilst still activated in the child for a short period. That's ok.
 1588|       |             */
 1589|   166k|            if (!CRYPTO_atomic_add(&prov->activatecnt, 1, &ref,
  ------------------
  |  Branch (1589:17): [True: 0, False: 166k]
  ------------------
 1590|   166k|                    prov->activatecnt_lock)) {
 1591|      0|                CRYPTO_DOWN_REF(&prov->refcnt, &ref);
 1592|      0|                CRYPTO_THREAD_unlock(prov->flag_lock);
 1593|      0|                goto err_unlock;
 1594|      0|            }
 1595|   166k|        } else {
 1596|      0|            sk_OSSL_PROVIDER_delete(provs, curr);
 1597|      0|            max--;
 1598|      0|        }
 1599|   166k|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1600|   166k|    }
 1601|   101k|    CRYPTO_THREAD_unlock(store->lock);
 1602|       |
 1603|       |    /*
 1604|       |     * Now, we sweep through all providers not under lock
 1605|       |     */
 1606|   268k|    for (curr = 0; curr < max; curr++) {
  ------------------
  |  Branch (1606:20): [True: 166k, False: 101k]
  ------------------
 1607|   166k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1608|       |
 1609|   166k|        if (!cb(prov, cbdata)) {
  ------------------
  |  Branch (1609:13): [True: 0, False: 166k]
  ------------------
 1610|      0|            curr = -1;
 1611|      0|            goto finish;
 1612|      0|        }
 1613|   166k|    }
 1614|   101k|    curr = -1;
 1615|       |
 1616|   101k|    ret = 1;
 1617|   101k|    goto finish;
 1618|       |
 1619|      0|err_unlock:
 1620|      0|    CRYPTO_THREAD_unlock(store->lock);
 1621|   101k|finish:
 1622|       |    /*
 1623|       |     * The pop_free call doesn't do what we want on an error condition. We
 1624|       |     * either start from the first item in the stack, or part way through if
 1625|       |     * we only processed some of the items.
 1626|       |     */
 1627|   268k|    for (curr++; curr < max; curr++) {
  ------------------
  |  Branch (1627:18): [True: 166k, False: 101k]
  ------------------
 1628|   166k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1629|       |
 1630|   166k|        if (!CRYPTO_atomic_add(&prov->activatecnt, -1, &ref,
  ------------------
  |  Branch (1630:13): [True: 0, False: 166k]
  ------------------
 1631|   166k|                prov->activatecnt_lock)) {
 1632|      0|            ret = 0;
 1633|      0|            continue;
 1634|      0|        }
 1635|   166k|        if (ref < 1) {
  ------------------
  |  Branch (1635:13): [True: 0, False: 166k]
  ------------------
 1636|       |            /*
 1637|       |             * Looks like we need to deactivate properly. We could just have
 1638|       |             * done this originally, but it involves taking a write lock so
 1639|       |             * we avoid it. We up the count again and do a full deactivation
 1640|       |             */
 1641|      0|            if (CRYPTO_atomic_add(&prov->activatecnt, 1, &ref,
  ------------------
  |  Branch (1641:17): [True: 0, False: 0]
  ------------------
 1642|      0|                    prov->activatecnt_lock))
 1643|      0|                provider_deactivate(prov, 0, 1);
 1644|      0|            else
 1645|      0|                ret = 0;
 1646|      0|        }
 1647|       |        /*
 1648|       |         * As above where we did the up-ref, we don't call ossl_provider_free
 1649|       |         * to avoid making upcalls. There should always be at least one ref
 1650|       |         * to the provider in the store, so this should never drop to 0.
 1651|       |         */
 1652|   166k|        if (!CRYPTO_DOWN_REF(&prov->refcnt, &ref)) {
  ------------------
  |  Branch (1652:13): [True: 0, False: 166k]
  ------------------
 1653|      0|            ret = 0;
 1654|      0|            continue;
 1655|      0|        }
 1656|       |        /*
 1657|       |         * Not much we can do if this assert ever fails. So we don't use
 1658|       |         * ossl_assert here.
 1659|       |         */
 1660|   166k|        assert(ref > 0);
  ------------------
  |  Branch (1660:9): [True: 0, False: 166k]
  |  Branch (1660:9): [True: 166k, False: 0]
  ------------------
 1661|   166k|    }
 1662|   101k|    sk_OSSL_PROVIDER_free(provs);
 1663|   101k|    return ret;
 1664|   101k|}
OSSL_PROVIDER_available:
 1667|    808|{
 1668|    808|    OSSL_PROVIDER *prov = NULL;
 1669|    808|    int available = 0;
 1670|    808|    struct provider_store_st *store = get_provider_store(libctx);
 1671|       |
 1672|    808|    if (store == NULL || !provider_activate_fallbacks(store))
  ------------------
  |  Branch (1672:9): [True: 0, False: 808]
  |  Branch (1672:26): [True: 0, False: 808]
  ------------------
 1673|      0|        return 0;
 1674|       |
 1675|    808|    prov = ossl_provider_find(libctx, name, 0);
 1676|    808|    if (prov != NULL) {
  ------------------
  |  Branch (1676:9): [True: 48, False: 760]
  ------------------
 1677|     48|        if (!CRYPTO_THREAD_read_lock(prov->flag_lock))
  ------------------
  |  Branch (1677:13): [True: 0, False: 48]
  ------------------
 1678|      0|            return 0;
 1679|     48|        available = prov->flag_activated;
 1680|     48|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1681|     48|        ossl_provider_free(prov);
 1682|     48|    }
 1683|    808|    return available;
 1684|    808|}
ossl_provider_name:
 1688|  1.78k|{
 1689|  1.78k|    return prov->name;
 1690|  1.78k|}
ossl_provider_libctx:
 1725|  4.93M|{
 1726|  4.93M|    return prov != NULL ? prov->libctx : NULL;
  ------------------
  |  Branch (1726:12): [True: 4.49M, False: 441k]
  ------------------
 1727|  4.93M|}
ossl_provider_teardown:
 1742|  1.70k|{
 1743|  1.70k|    if (prov->teardown != NULL
  ------------------
  |  Branch (1743:9): [True: 1.47k, False: 231]
  ------------------
 1744|  1.47k|#ifndef FIPS_MODULE
 1745|  1.47k|        && !prov->ischild
  ------------------
  |  Branch (1745:12): [True: 1.47k, False: 0]
  ------------------
 1746|  1.70k|#endif
 1747|  1.70k|    ) {
 1748|  1.47k|#ifndef FIPS_MODULE
 1749|  1.47k|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|  1.47k|    do {                           \
  |  |  220|  1.47k|        BIO *trc_out = NULL;       \
  |  |  221|  1.47k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
 1750|      0|        {
 1751|      0|            BIO_printf(trc_out, "(provider %s) calling teardown\n",
 1752|      0|                ossl_provider_name(prov));
 1753|      0|        }
 1754|  1.47k|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|  1.47k|    }                            \
  |  |  225|  1.47k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
 1755|  1.47k|#endif
 1756|  1.47k|        prov->teardown(prov->provctx);
 1757|  1.47k|    }
 1758|  1.70k|}
ossl_provider_get_capabilities:
 1913|  8.71k|{
 1914|  8.71k|    if (prov->get_capabilities != NULL) {
  ------------------
  |  Branch (1914:9): [True: 6.94k, False: 1.77k]
  ------------------
 1915|  6.94k|#ifndef FIPS_MODULE
 1916|  6.94k|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|  6.94k|    do {                           \
  |  |  220|  6.94k|        BIO *trc_out = NULL;       \
  |  |  221|  6.94k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 6.94k]
  |  |  ------------------
  ------------------
 1917|      0|        {
 1918|      0|            BIO_printf(trc_out,
 1919|      0|                "(provider %s) Calling get_capabilities "
 1920|      0|                "with capabilities %s\n",
 1921|      0|                prov->name,
 1922|      0|                capability == NULL ? "none" : capability);
  ------------------
  |  Branch (1922:17): [True: 0, False: 0]
  ------------------
 1923|      0|        }
 1924|  6.94k|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|  6.94k|    }                            \
  |  |  225|  6.94k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 6.94k]
  |  |  ------------------
  ------------------
 1925|  6.94k|#endif
 1926|  6.94k|        return prov->get_capabilities(prov->provctx, capability, cb, arg);
 1927|  6.94k|    }
 1928|  1.77k|    return 1;
 1929|  8.71k|}
ossl_provider_query_operation:
 1952|   159k|{
 1953|   159k|    const OSSL_ALGORITHM *res;
 1954|       |
 1955|   159k|    if (prov->query_operation == NULL) {
  ------------------
  |  Branch (1955:9): [True: 0, False: 159k]
  ------------------
 1956|      0|#ifndef FIPS_MODULE
 1957|      0|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1958|      0|        {
 1959|      0|            BIO_printf(trc_out, "provider %s lacks query operation!\n",
 1960|      0|                prov->name);
 1961|      0|        }
 1962|      0|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1963|      0|#endif
 1964|      0|        return NULL;
 1965|      0|    }
 1966|       |
 1967|   159k|    res = prov->query_operation(prov->provctx, operation_id, no_cache);
 1968|   159k|#ifndef FIPS_MODULE
 1969|   159k|    OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|   159k|    do {                           \
  |  |  220|   159k|        BIO *trc_out = NULL;       \
  |  |  221|   159k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 159k]
  |  |  ------------------
  ------------------
 1970|      0|    {
 1971|      0|        const OSSL_ALGORITHM *idx;
 1972|      0|        if (res != NULL) {
  ------------------
  |  Branch (1972:13): [True: 0, False: 0]
  ------------------
 1973|      0|            BIO_printf(trc_out,
 1974|      0|                "(provider %s) Calling query, available algs are:\n", prov->name);
 1975|       |
 1976|      0|            for (idx = res; idx->algorithm_names != NULL; idx++) {
  ------------------
  |  Branch (1976:29): [True: 0, False: 0]
  ------------------
 1977|      0|                BIO_printf(trc_out,
 1978|      0|                    "(provider %s) names %s, prop_def %s, desc %s\n",
 1979|      0|                    prov->name,
 1980|      0|                    idx->algorithm_names == NULL ? "none" : idx->algorithm_names,
  ------------------
  |  Branch (1980:21): [True: 0, False: 0]
  ------------------
 1981|      0|                    idx->property_definition == NULL ? "none" : idx->property_definition,
  ------------------
  |  Branch (1981:21): [True: 0, False: 0]
  ------------------
 1982|      0|                    idx->algorithm_description == NULL ? "none" : idx->algorithm_description);
  ------------------
  |  Branch (1982:21): [True: 0, False: 0]
  ------------------
 1983|      0|            }
 1984|      0|        } else {
 1985|      0|            BIO_printf(trc_out, "(provider %s) query_operation failed\n", prov->name);
 1986|      0|        }
 1987|      0|    }
 1988|   159k|    OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|   159k|    }                            \
  |  |  225|   159k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 159k]
  |  |  ------------------
  ------------------
 1989|   159k|#endif
 1990|       |
 1991|       |#if defined(OPENSSL_NO_CACHED_FETCH)
 1992|       |    /* Forcing the non-caching of queries */
 1993|       |    if (no_cache != NULL)
 1994|       |        *no_cache = 1;
 1995|       |#endif
 1996|   159k|    return res;
 1997|   159k|}
ossl_provider_unquery_operation:
 2016|   159k|{
 2017|   159k|    if (prov->unquery_operation != NULL) {
  ------------------
  |  Branch (2017:9): [True: 0, False: 159k]
  ------------------
 2018|      0|#ifndef FIPS_MODULE
 2019|      0|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2020|      0|        {
 2021|      0|            BIO_printf(trc_out,
 2022|      0|                "(provider %s) Calling unquery"
 2023|      0|                " with operation %d\n",
 2024|      0|                prov->name,
 2025|      0|                operation_id);
 2026|      0|        }
 2027|      0|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2028|      0|#endif
 2029|      0|        prov->unquery_operation(prov->provctx, operation_id, algs);
 2030|      0|    }
 2031|   159k|}
ossl_provider_set_operation_bit:
 2034|  9.32k|{
 2035|  9.32k|    size_t byte = bitnum / 8;
 2036|  9.32k|    unsigned char bit = (1 << (bitnum % 8)) & 0xFF;
 2037|       |
 2038|  9.32k|    if (!CRYPTO_THREAD_write_lock(provider->opbits_lock))
  ------------------
  |  Branch (2038:9): [True: 0, False: 9.32k]
  ------------------
 2039|      0|        return 0;
 2040|  9.32k|    if (provider->operation_bits_sz <= byte) {
  ------------------
  |  Branch (2040:9): [True: 3.19k, False: 6.12k]
  ------------------
 2041|  3.19k|        unsigned char *tmp = OPENSSL_realloc(provider->operation_bits,
  ------------------
  |  |  121|  3.19k|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2042|  3.19k|            byte + 1);
 2043|       |
 2044|  3.19k|        if (tmp == NULL) {
  ------------------
  |  Branch (2044:13): [True: 0, False: 3.19k]
  ------------------
 2045|      0|            CRYPTO_THREAD_unlock(provider->opbits_lock);
 2046|      0|            return 0;
 2047|      0|        }
 2048|  3.19k|        provider->operation_bits = tmp;
 2049|  3.19k|        memset(provider->operation_bits + provider->operation_bits_sz,
 2050|  3.19k|            '\0', byte + 1 - provider->operation_bits_sz);
 2051|  3.19k|        provider->operation_bits_sz = byte + 1;
 2052|  3.19k|    }
 2053|  9.32k|    provider->operation_bits[byte] |= bit;
 2054|  9.32k|    CRYPTO_THREAD_unlock(provider->opbits_lock);
 2055|  9.32k|    return 1;
 2056|  9.32k|}
ossl_provider_test_operation_bit:
 2060|   159k|{
 2061|   159k|    size_t byte = bitnum / 8;
 2062|   159k|    unsigned char bit = (1 << (bitnum % 8)) & 0xFF;
 2063|       |
 2064|   159k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|   159k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   159k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2064:9): [True: 0, False: 159k]
  ------------------
 2065|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2066|      0|        return 0;
 2067|      0|    }
 2068|       |
 2069|   159k|    *result = 0;
 2070|   159k|    if (!CRYPTO_THREAD_read_lock(provider->opbits_lock))
  ------------------
  |  Branch (2070:9): [True: 0, False: 159k]
  ------------------
 2071|      0|        return 0;
 2072|   159k|    if (provider->operation_bits_sz > byte)
  ------------------
  |  Branch (2072:9): [True: 156k, False: 3.19k]
  ------------------
 2073|   156k|        *result = ((provider->operation_bits[byte] & bit) != 0);
 2074|   159k|    CRYPTO_THREAD_unlock(provider->opbits_lock);
 2075|   159k|    return 1;
 2076|   159k|}
provider_core.c:provider_deactivate_free:
  237|  1.70k|{
  238|  1.70k|    if (prov->flag_activated)
  ------------------
  |  Branch (238:9): [True: 808, False: 899]
  ------------------
  239|    808|        ossl_provider_deactivate(prov, 1);
  240|  1.70k|    ossl_provider_free(prov);
  241|  1.70k|}
provider_core.c:ossl_provider_cmp:
  204|  9.36k|{
  205|  9.36k|    return strcmp((*a)->name, (*b)->name);
  206|  9.36k|}
provider_core.c:get_provider_store:
  330|   113k|{
  331|   113k|    struct provider_store_st *store = NULL;
  332|       |
  333|   113k|    store = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_PROVIDER_STORE_INDEX);
  ------------------
  |  |   96|   113k|#define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
  ------------------
  334|   113k|    if (store == NULL)
  ------------------
  |  Branch (334:9): [True: 0, False: 113k]
  ------------------
  335|       |        ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  336|   113k|    return store;
  337|   113k|}
provider_core.c:provider_new:
  450|  1.80k|{
  451|  1.80k|    OSSL_PROVIDER *prov = NULL;
  452|       |
  453|  1.80k|    if ((prov = OPENSSL_zalloc(sizeof(*prov))) == NULL)
  ------------------
  |  |  109|  1.80k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (453:9): [True: 0, False: 1.80k]
  ------------------
  454|      0|        return NULL;
  455|  1.80k|    if (!CRYPTO_NEW_REF(&prov->refcnt, 1)) {
  ------------------
  |  Branch (455:9): [True: 0, False: 1.80k]
  ------------------
  456|      0|        OPENSSL_free(prov);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  457|      0|        return NULL;
  458|      0|    }
  459|  1.80k|    if ((prov->activatecnt_lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (459:9): [True: 0, False: 1.80k]
  ------------------
  460|      0|        ossl_provider_free(prov);
  461|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  462|      0|        return NULL;
  463|      0|    }
  464|       |
  465|  1.80k|    if ((prov->opbits_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (465:9): [True: 0, False: 1.80k]
  ------------------
  466|  1.80k|        || (prov->flag_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (466:12): [True: 0, False: 1.80k]
  ------------------
  467|  1.80k|        || (prov->parameters = sk_INFOPAIR_deep_copy(parameters,
  ------------------
  |  Branch (467:12): [True: 0, False: 1.80k]
  ------------------
  468|  1.80k|                infopair_copy,
  469|  1.80k|                infopair_free))
  470|  1.80k|            == NULL) {
  471|      0|        ossl_provider_free(prov);
  472|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  473|      0|        return NULL;
  474|      0|    }
  475|  1.80k|    if ((prov->name = OPENSSL_strdup(name)) == NULL) {
  ------------------
  |  |  136|  1.80k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (475:9): [True: 0, False: 1.80k]
  ------------------
  476|      0|        ossl_provider_free(prov);
  477|      0|        return NULL;
  478|      0|    }
  479|       |
  480|  1.80k|    prov->init_function = init_function;
  481|       |
  482|  1.80k|    return prov;
  483|  1.80k|}
provider_core.c:create_provider_children:
  637|    899|{
  638|    899|    int ret = 1;
  639|    899|#ifndef FIPS_MODULE
  640|    899|    struct provider_store_st *store = prov->store;
  641|    899|    OSSL_PROVIDER_CHILD_CB *child_cb;
  642|    899|    int i, max;
  643|       |
  644|    899|    max = sk_OSSL_PROVIDER_CHILD_CB_num(store->child_cbs);
  645|    899|    for (i = 0; i < max; i++) {
  ------------------
  |  Branch (645:17): [True: 0, False: 899]
  ------------------
  646|       |        /*
  647|       |         * This is newly activated (activatecnt == 1), so we need to
  648|       |         * create child providers as necessary.
  649|       |         */
  650|      0|        child_cb = sk_OSSL_PROVIDER_CHILD_CB_value(store->child_cbs, i);
  651|      0|        ret &= child_cb->create_cb((OSSL_CORE_HANDLE *)prov, child_cb->cbdata);
  652|      0|    }
  653|    899|#endif
  654|       |
  655|    899|    return ret;
  656|    899|}
provider_core.c:provider_activate:
 1262|  2.23k|{
 1263|  2.23k|    int count = -1;
 1264|  2.23k|    struct provider_store_st *store;
 1265|  2.23k|    int ret = 1;
 1266|       |
 1267|  2.23k|    store = prov->store;
 1268|       |    /*
 1269|       |     * If the provider hasn't been added to the store, then we don't need
 1270|       |     * any locks because we've not shared it with other threads.
 1271|       |     */
 1272|  2.23k|    if (store == NULL) {
  ------------------
  |  Branch (1272:9): [True: 1.80k, False: 437]
  ------------------
 1273|  1.80k|        lock = 0;
 1274|  1.80k|        if (!provider_init(prov))
  ------------------
  |  Branch (1274:13): [True: 92, False: 1.70k]
  ------------------
 1275|     92|            return -1;
 1276|  1.80k|    }
 1277|       |
 1278|  2.14k|#ifndef FIPS_MODULE
 1279|  2.14k|    if (prov->random_bytes != NULL
  ------------------
  |  Branch (1279:9): [True: 0, False: 2.14k]
  ------------------
 1280|      0|        && !ossl_rand_check_random_provider_on_load(prov->libctx, prov))
  ------------------
  |  Branch (1280:12): [True: 0, False: 0]
  ------------------
 1281|      0|        return -1;
 1282|       |
 1283|  2.14k|    if (prov->ischild && upcalls && !ossl_provider_up_ref_parent(prov, 1))
  ------------------
  |  Branch (1283:9): [True: 0, False: 2.14k]
  |  Branch (1283:26): [True: 0, False: 0]
  |  Branch (1283:37): [True: 0, False: 0]
  ------------------
 1284|      0|        return -1;
 1285|  2.14k|#endif
 1286|       |
 1287|  2.14k|    if (lock && !CRYPTO_THREAD_read_lock(store->lock)) {
  ------------------
  |  Branch (1287:9): [True: 437, False: 1.70k]
  |  Branch (1287:17): [True: 0, False: 437]
  ------------------
 1288|      0|#ifndef FIPS_MODULE
 1289|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1289:13): [True: 0, False: 0]
  |  Branch (1289:30): [True: 0, False: 0]
  ------------------
 1290|      0|            ossl_provider_free_parent(prov, 1);
 1291|      0|#endif
 1292|      0|        return -1;
 1293|      0|    }
 1294|       |
 1295|  2.14k|    if (lock && !CRYPTO_THREAD_write_lock(prov->flag_lock)) {
  ------------------
  |  Branch (1295:9): [True: 437, False: 1.70k]
  |  Branch (1295:17): [True: 0, False: 437]
  ------------------
 1296|      0|        CRYPTO_THREAD_unlock(store->lock);
 1297|      0|#ifndef FIPS_MODULE
 1298|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  |  Branch (1298:30): [True: 0, False: 0]
  ------------------
 1299|      0|            ossl_provider_free_parent(prov, 1);
 1300|      0|#endif
 1301|      0|        return -1;
 1302|      0|    }
 1303|  2.14k|    if (CRYPTO_atomic_add(&prov->activatecnt, 1, &count, prov->activatecnt_lock)) {
  ------------------
  |  Branch (1303:9): [True: 2.14k, False: 0]
  ------------------
 1304|  2.14k|        prov->flag_activated = 1;
 1305|       |
 1306|  2.14k|        if (count == 1 && store != NULL) {
  ------------------
  |  Branch (1306:13): [True: 1.70k, False: 437]
  |  Branch (1306:27): [True: 0, False: 1.70k]
  ------------------
 1307|      0|            ret = create_provider_children(prov);
 1308|      0|        }
 1309|  2.14k|    }
 1310|  2.14k|    if (lock) {
  ------------------
  |  Branch (1310:9): [True: 437, False: 1.70k]
  ------------------
 1311|    437|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1312|    437|        CRYPTO_THREAD_unlock(store->lock);
 1313|       |        /*
 1314|       |         * This can be done outside the lock. We tolerate other threads getting
 1315|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
 1316|       |         */
 1317|    437|#ifndef FIPS_MODULE
 1318|    437|        if (count == 1)
  ------------------
  |  Branch (1318:13): [True: 0, False: 437]
  ------------------
 1319|      0|            ossl_decoder_cache_flush(prov->libctx);
 1320|    437|#endif
 1321|    437|    }
 1322|       |
 1323|  2.14k|    if (!ret)
  ------------------
  |  Branch (1323:9): [True: 0, False: 2.14k]
  ------------------
 1324|      0|        return -1;
 1325|       |
 1326|  2.14k|    return count;
 1327|  2.14k|}
provider_core.c:provider_init:
  954|  1.80k|{
  955|  1.80k|    const OSSL_DISPATCH *provider_dispatch = NULL;
  956|  1.80k|    void *tmp_provctx = NULL; /* safety measure */
  957|  1.80k|#ifndef OPENSSL_NO_ERR
  958|  1.80k|#ifndef FIPS_MODULE
  959|  1.80k|    OSSL_FUNC_provider_get_reason_strings_fn *p_get_reason_strings = NULL;
  960|  1.80k|#endif
  961|  1.80k|#endif
  962|  1.80k|    int ok = 0;
  963|       |
  964|  1.80k|    if (!ossl_assert(!prov->flag_initialized)) {
  ------------------
  |  |   52|  1.80k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.80k|    __FILE__, __LINE__)
  ------------------
  |  Branch (964:9): [True: 0, False: 1.80k]
  ------------------
  965|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  966|      0|        goto end;
  967|      0|    }
  968|       |
  969|       |    /*
  970|       |     * If the init function isn't set, it indicates that this provider is
  971|       |     * a loadable module.
  972|       |     */
  973|  1.80k|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (973:9): [True: 92, False: 1.70k]
  ------------------
  974|       |#ifdef FIPS_MODULE
  975|       |        goto end;
  976|       |#else
  977|     92|        if (prov->module == NULL) {
  ------------------
  |  Branch (977:13): [True: 92, False: 0]
  ------------------
  978|     92|            char *allocated_path = NULL;
  979|     92|            const char *module_path = NULL;
  980|     92|            char *merged_path = NULL;
  981|     92|            const char *load_dir = NULL;
  982|     92|            char *allocated_load_dir = NULL;
  983|     92|            struct provider_store_st *store;
  984|       |
  985|     92|            if ((prov->module = DSO_new()) == NULL) {
  ------------------
  |  Branch (985:17): [True: 0, False: 92]
  ------------------
  986|       |                /* DSO_new() generates an error already */
  987|      0|                goto end;
  988|      0|            }
  989|       |
  990|     92|            if ((store = get_provider_store(prov->libctx)) == NULL
  ------------------
  |  Branch (990:17): [True: 0, False: 92]
  ------------------
  991|     92|                || !CRYPTO_THREAD_read_lock(store->default_path_lock))
  ------------------
  |  Branch (991:20): [True: 0, False: 92]
  ------------------
  992|      0|                goto end;
  993|       |
  994|     92|            if (store->default_path != NULL) {
  ------------------
  |  Branch (994:17): [True: 0, False: 92]
  ------------------
  995|      0|                allocated_load_dir = OPENSSL_strdup(store->default_path);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  996|      0|                CRYPTO_THREAD_unlock(store->default_path_lock);
  997|      0|                if (allocated_load_dir == NULL)
  ------------------
  |  Branch (997:21): [True: 0, False: 0]
  ------------------
  998|      0|                    goto end;
  999|      0|                load_dir = allocated_load_dir;
 1000|     92|            } else {
 1001|     92|                CRYPTO_THREAD_unlock(store->default_path_lock);
 1002|     92|            }
 1003|       |
 1004|     92|            if (load_dir == NULL) {
  ------------------
  |  Branch (1004:17): [True: 92, False: 0]
  ------------------
 1005|     92|                load_dir = ossl_safe_getenv("OPENSSL_MODULES");
 1006|     92|                if (load_dir == NULL)
  ------------------
  |  Branch (1006:21): [True: 92, False: 0]
  ------------------
 1007|     92|                    load_dir = ossl_get_modulesdir();
 1008|     92|            }
 1009|       |
 1010|     92|            DSO_ctrl(prov->module, DSO_CTRL_SET_FLAGS,
  ------------------
  |  |   19|     92|#define DSO_CTRL_SET_FLAGS 2
  ------------------
 1011|     92|                DSO_FLAG_NAME_TRANSLATION_EXT_ONLY, NULL);
  ------------------
  |  |   41|     92|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
 1012|       |
 1013|     92|            module_path = prov->path;
 1014|     92|            if (module_path == NULL)
  ------------------
  |  Branch (1014:17): [True: 92, False: 0]
  ------------------
 1015|     92|                module_path = allocated_path = DSO_convert_filename(prov->module, prov->name);
 1016|     92|            if (module_path != NULL)
  ------------------
  |  Branch (1016:17): [True: 92, False: 0]
  ------------------
 1017|     92|                merged_path = DSO_merge(prov->module, module_path, load_dir);
 1018|       |
 1019|     92|            if (merged_path == NULL
  ------------------
  |  Branch (1019:17): [True: 0, False: 92]
  ------------------
 1020|     92|                || (DSO_load(prov->module, merged_path, NULL, 0)) == NULL) {
  ------------------
  |  Branch (1020:20): [True: 92, False: 0]
  ------------------
 1021|     92|                DSO_free(prov->module);
 1022|     92|                prov->module = NULL;
 1023|     92|            }
 1024|       |
 1025|     92|            OPENSSL_free(merged_path);
  ------------------
  |  |  132|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1026|     92|            OPENSSL_free(allocated_path);
  ------------------
  |  |  132|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1027|     92|            OPENSSL_free(allocated_load_dir);
  ------------------
  |  |  132|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1028|     92|        }
 1029|       |
 1030|     92|        if (prov->module == NULL) {
  ------------------
  |  Branch (1030:13): [True: 92, False: 0]
  ------------------
 1031|       |            /* DSO has already recorded errors, this is just a tracepoint */
 1032|     92|            ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  359|     92|    (ERR_new(),                                                  \
  |  |  360|     92|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     92|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     92|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |   68|     92|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  289|     92|#define ERR_R_DSO_LIB (ERR_LIB_DSO /* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   81|     92|#define ERR_LIB_DSO 37
  |  |  ------------------
  |  |               #define ERR_R_DSO_LIB (ERR_LIB_DSO /* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|     92|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|     92|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1033|     92|                "name=%s", prov->name);
 1034|     92|            goto end;
 1035|     92|        }
 1036|       |
 1037|      0|        prov->init_function = (OSSL_provider_init_fn *)
 1038|      0|            DSO_bind_func(prov->module, "OSSL_provider_init");
 1039|      0|#endif
 1040|      0|    }
 1041|       |
 1042|       |    /* Check for and call the initialise function for the provider. */
 1043|  1.70k|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (1043:9): [True: 0, False: 1.70k]
  ------------------
 1044|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1045|      0|            "name=%s, provider has no provider init function",
 1046|      0|            prov->name);
 1047|      0|        goto end;
 1048|      0|    }
 1049|  1.70k|#ifndef FIPS_MODULE
 1050|  1.70k|    OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|  1.70k|    do {                           \
  |  |  220|  1.70k|        BIO *trc_out = NULL;       \
  |  |  221|  1.70k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 1.70k]
  |  |  ------------------
  ------------------
 1051|      0|    {
 1052|      0|        BIO_printf(trc_out,
 1053|      0|            "(provider %s) initializing\n", prov->name);
 1054|      0|    }
 1055|  1.70k|    OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|  1.70k|    }                            \
  |  |  225|  1.70k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 1.70k]
  |  |  ------------------
  ------------------
 1056|  1.70k|#endif
 1057|       |
 1058|  1.70k|    if (!prov->init_function((OSSL_CORE_HANDLE *)prov, core_dispatch,
  ------------------
  |  Branch (1058:9): [True: 0, False: 1.70k]
  ------------------
 1059|  1.70k|            &provider_dispatch, &tmp_provctx)) {
 1060|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |  310|      0|#define ERR_R_INIT_FAIL (261 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1061|      0|            "name=%s", prov->name);
 1062|      0|        goto end;
 1063|      0|    }
 1064|  1.70k|    prov->provctx = tmp_provctx;
 1065|  1.70k|    prov->dispatch = provider_dispatch;
 1066|       |
 1067|  1.70k|    if (provider_dispatch != NULL) {
  ------------------
  |  Branch (1067:9): [True: 1.70k, False: 0]
  ------------------
 1068|  9.11k|        for (; provider_dispatch->function_id != 0; provider_dispatch++) {
  ------------------
  |  Branch (1068:16): [True: 7.41k, False: 1.70k]
  ------------------
 1069|  7.41k|            switch (provider_dispatch->function_id) {
  ------------------
  |  Branch (1069:21): [True: 7.41k, False: 0]
  ------------------
 1070|  1.47k|            case OSSL_FUNC_PROVIDER_TEARDOWN:
  ------------------
  |  |  234|  1.47k|#define OSSL_FUNC_PROVIDER_TEARDOWN 1024
  ------------------
  |  Branch (1070:13): [True: 1.47k, False: 5.93k]
  ------------------
 1071|  1.47k|                prov->teardown = OSSL_FUNC_provider_teardown(provider_dispatch);
 1072|  1.47k|                break;
 1073|  1.70k|            case OSSL_FUNC_PROVIDER_GETTABLE_PARAMS:
  ------------------
  |  |  236|  1.70k|#define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS 1025
  ------------------
  |  Branch (1073:13): [True: 1.70k, False: 5.70k]
  ------------------
 1074|  1.70k|                prov->gettable_params = OSSL_FUNC_provider_gettable_params(provider_dispatch);
 1075|  1.70k|                break;
 1076|  1.70k|            case OSSL_FUNC_PROVIDER_GET_PARAMS:
  ------------------
  |  |  239|  1.70k|#define OSSL_FUNC_PROVIDER_GET_PARAMS 1026
  ------------------
  |  Branch (1076:13): [True: 1.70k, False: 5.70k]
  ------------------
 1077|  1.70k|                prov->get_params = OSSL_FUNC_provider_get_params(provider_dispatch);
 1078|  1.70k|                break;
 1079|      0|            case OSSL_FUNC_PROVIDER_SELF_TEST:
  ------------------
  |  |  252|      0|#define OSSL_FUNC_PROVIDER_SELF_TEST 1031
  ------------------
  |  Branch (1079:13): [True: 0, False: 7.41k]
  ------------------
 1080|      0|                prov->self_test = OSSL_FUNC_provider_self_test(provider_dispatch);
 1081|      0|                break;
 1082|      0|            case OSSL_FUNC_PROVIDER_RANDOM_BYTES:
  ------------------
  |  |  254|      0|#define OSSL_FUNC_PROVIDER_RANDOM_BYTES 1032
  ------------------
  |  Branch (1082:13): [True: 0, False: 7.41k]
  ------------------
 1083|      0|                prov->random_bytes = OSSL_FUNC_provider_random_bytes(provider_dispatch);
 1084|      0|                break;
 1085|    809|            case OSSL_FUNC_PROVIDER_GET_CAPABILITIES:
  ------------------
  |  |  250|    809|#define OSSL_FUNC_PROVIDER_GET_CAPABILITIES 1030
  ------------------
  |  Branch (1085:13): [True: 809, False: 6.60k]
  ------------------
 1086|    809|                prov->get_capabilities = OSSL_FUNC_provider_get_capabilities(provider_dispatch);
 1087|    809|                break;
 1088|  1.70k|            case OSSL_FUNC_PROVIDER_QUERY_OPERATION:
  ------------------
  |  |  241|  1.70k|#define OSSL_FUNC_PROVIDER_QUERY_OPERATION 1027
  ------------------
  |  Branch (1088:13): [True: 1.70k, False: 5.70k]
  ------------------
 1089|  1.70k|                prov->query_operation = OSSL_FUNC_provider_query_operation(provider_dispatch);
 1090|  1.70k|                break;
 1091|      0|            case OSSL_FUNC_PROVIDER_UNQUERY_OPERATION:
  ------------------
  |  |  244|      0|#define OSSL_FUNC_PROVIDER_UNQUERY_OPERATION 1028
  ------------------
  |  Branch (1091:13): [True: 0, False: 7.41k]
  ------------------
 1092|      0|                prov->unquery_operation = OSSL_FUNC_provider_unquery_operation(provider_dispatch);
 1093|      0|                break;
 1094|      0|#ifndef OPENSSL_NO_ERR
 1095|      0|#ifndef FIPS_MODULE
 1096|      0|            case OSSL_FUNC_PROVIDER_GET_REASON_STRINGS:
  ------------------
  |  |  247|      0|#define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1029
  ------------------
  |  Branch (1096:13): [True: 0, False: 7.41k]
  ------------------
 1097|      0|                p_get_reason_strings = OSSL_FUNC_provider_get_reason_strings(provider_dispatch);
 1098|      0|                break;
 1099|  7.41k|#endif
 1100|  7.41k|#endif
 1101|  7.41k|            }
 1102|  7.41k|        }
 1103|  1.70k|    }
 1104|       |
 1105|  1.70k|#ifndef OPENSSL_NO_ERR
 1106|  1.70k|#ifndef FIPS_MODULE
 1107|  1.70k|    if (p_get_reason_strings != NULL) {
  ------------------
  |  Branch (1107:9): [True: 0, False: 1.70k]
  ------------------
 1108|      0|        const OSSL_ITEM *reasonstrings = p_get_reason_strings(prov->provctx);
 1109|      0|        size_t cnt, cnt2;
 1110|       |
 1111|       |        /*
 1112|       |         * ERR_load_strings() handles ERR_STRING_DATA rather than OSSL_ITEM,
 1113|       |         * although they are essentially the same type.
 1114|       |         * Furthermore, ERR_load_strings() patches the array's error number
 1115|       |         * with the error library number, so we need to make a copy of that
 1116|       |         * array either way.
 1117|       |         */
 1118|      0|        cnt = 0;
 1119|      0|        while (reasonstrings[cnt].id != 0) {
  ------------------
  |  Branch (1119:16): [True: 0, False: 0]
  ------------------
 1120|      0|            if (ERR_GET_LIB(reasonstrings[cnt].id) != 0)
  ------------------
  |  Branch (1120:17): [True: 0, False: 0]
  ------------------
 1121|      0|                goto end;
 1122|      0|            cnt++;
 1123|      0|        }
 1124|      0|        cnt++; /* One for the terminating item */
 1125|       |
 1126|       |        /* Allocate one extra item for the "library" name */
 1127|      0|        prov->error_strings = OPENSSL_calloc(cnt + 1, sizeof(ERR_STRING_DATA));
  ------------------
  |  |  113|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1128|      0|        if (prov->error_strings == NULL)
  ------------------
  |  Branch (1128:13): [True: 0, False: 0]
  ------------------
 1129|      0|            goto end;
 1130|       |
 1131|       |        /*
 1132|       |         * Set the "library" name.
 1133|       |         */
 1134|      0|        prov->error_strings[0].error = ERR_PACK(prov->error_lib, 0, 0);
  ------------------
  |  |  262|      0|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|      0|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|      0|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|      0|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
 1135|      0|        prov->error_strings[0].string = prov->name;
 1136|       |        /*
 1137|       |         * Copy reasonstrings item 0..cnt-1 to prov->error_trings positions
 1138|       |         * 1..cnt.
 1139|       |         */
 1140|      0|        for (cnt2 = 1; cnt2 <= cnt; cnt2++) {
  ------------------
  |  Branch (1140:24): [True: 0, False: 0]
  ------------------
 1141|      0|            prov->error_strings[cnt2].error = (int)reasonstrings[cnt2 - 1].id;
 1142|      0|            prov->error_strings[cnt2].string = reasonstrings[cnt2 - 1].ptr;
 1143|      0|        }
 1144|       |
 1145|      0|        ERR_load_strings(prov->error_lib, prov->error_strings);
 1146|      0|    }
 1147|  1.70k|#endif
 1148|  1.70k|#endif
 1149|       |
 1150|       |    /* With this flag set, this provider has become fully "loaded". */
 1151|  1.70k|    prov->flag_initialized = 1;
 1152|  1.70k|    ok = 1;
 1153|       |
 1154|  1.80k|end:
 1155|  1.80k|    return ok;
 1156|  1.70k|}
provider_core.c:core_get_params:
 2328|  6.28k|{
 2329|  6.28k|    OSSL_PARAM *p;
 2330|       |    /*
 2331|       |     * We created this object originally and we know it is actually an
 2332|       |     * OSSL_PROVIDER *, so the cast is safe
 2333|       |     */
 2334|  6.28k|    OSSL_PROVIDER *prov = (OSSL_PROVIDER *)handle;
 2335|       |
 2336|  6.28k|    if ((p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_CORE_VERSION)) != NULL)
  ------------------
  |  |  514|  6.28k|# define OSSL_PROV_PARAM_CORE_VERSION "openssl-version"
  ------------------
  |  Branch (2336:9): [True: 0, False: 6.28k]
  ------------------
 2337|      0|        OSSL_PARAM_set_utf8_ptr(p, OPENSSL_VERSION_STR);
  ------------------
  |  |   90|      0|# define OPENSSL_VERSION_STR "4.0.1"
  ------------------
 2338|  6.28k|    if ((p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_CORE_PROV_NAME)) != NULL)
  ------------------
  |  |  513|  6.28k|# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
  ------------------
  |  Branch (2338:9): [True: 0, False: 6.28k]
  ------------------
 2339|      0|        OSSL_PARAM_set_utf8_ptr(p, prov->name);
 2340|       |
 2341|  6.28k|#ifndef FIPS_MODULE
 2342|  6.28k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (2342:9): [True: 0, False: 6.28k]
  ------------------
 2343|  6.28k|             OSSL_PROV_PARAM_CORE_MODULE_FILENAME))
  ------------------
  |  |  512|  6.28k|# define OSSL_PROV_PARAM_CORE_MODULE_FILENAME "module-filename"
  ------------------
 2344|  6.28k|        != NULL)
 2345|      0|        OSSL_PARAM_set_utf8_ptr(p, ossl_provider_module_path(prov));
 2346|  6.28k|#endif
 2347|       |
 2348|  6.28k|    return OSSL_PROVIDER_get_conf_parameters(prov, params);
 2349|  6.28k|}
provider_core.c:core_get_libctx:
 2352|  1.47k|{
 2353|       |    /*
 2354|       |     * We created this object originally and we know it is actually an
 2355|       |     * OSSL_PROVIDER *, so the cast is safe
 2356|       |     */
 2357|  1.47k|    OSSL_PROVIDER *prov = (OSSL_PROVIDER *)handle;
 2358|       |
 2359|       |    /*
 2360|       |     * Using ossl_provider_libctx would be wrong as that returns
 2361|       |     * NULL for |prov| == NULL and NULL libctx has a special meaning
 2362|       |     * that does not apply here. Here |prov| == NULL can happen only in
 2363|       |     * case of a coding error.
 2364|       |     */
 2365|  1.47k|    assert(prov != NULL);
  ------------------
  |  Branch (2365:5): [True: 0, False: 1.47k]
  |  Branch (2365:5): [True: 1.47k, False: 0]
  ------------------
 2366|  1.47k|    return (OPENSSL_CORE_CTX *)prov->libctx;
 2367|  1.47k|}
provider_core.c:provider_flush_store_cache:
 1330|    899|{
 1331|    899|    struct provider_store_st *store;
 1332|    899|    int freeing;
 1333|       |
 1334|    899|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (1334:9): [True: 0, False: 899]
  ------------------
 1335|      0|        return 0;
 1336|       |
 1337|    899|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1337:9): [True: 0, False: 899]
  ------------------
 1338|      0|        return 0;
 1339|    899|    freeing = store->freeing;
 1340|    899|    CRYPTO_THREAD_unlock(store->lock);
 1341|       |
 1342|    899|    if (!freeing) {
  ------------------
  |  Branch (1342:9): [True: 899, False: 0]
  ------------------
 1343|    899|        int acc
 1344|    899|            = evp_method_store_cache_flush(prov->libctx)
 1345|    899|#ifndef FIPS_MODULE
 1346|    899|            + ossl_encoder_store_cache_flush(prov->libctx)
 1347|    899|            + ossl_decoder_store_cache_flush(prov->libctx)
 1348|    899|            + ossl_store_loader_store_cache_flush(prov->libctx)
 1349|    899|#endif
 1350|    899|            ;
 1351|       |
 1352|    899|#ifndef FIPS_MODULE
 1353|    899|        return acc == 4;
 1354|       |#else
 1355|       |        return acc == 1;
 1356|       |#endif
 1357|    899|    }
 1358|      0|    return 1;
 1359|    899|}
provider_core.c:provider_deactivate:
 1166|  2.14k|{
 1167|  2.14k|    int count;
 1168|  2.14k|    struct provider_store_st *store;
 1169|  2.14k|#ifndef FIPS_MODULE
 1170|  2.14k|    int freeparent = 0;
 1171|  2.14k|#endif
 1172|  2.14k|    int lock = 1;
 1173|       |
 1174|  2.14k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|  2.14k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.14k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1174:9): [True: 0, False: 2.14k]
  ------------------
 1175|      0|        return -1;
 1176|       |
 1177|  2.14k|#ifndef FIPS_MODULE
 1178|  2.14k|    if (prov->random_bytes != NULL
  ------------------
  |  Branch (1178:9): [True: 0, False: 2.14k]
  ------------------
 1179|      0|        && !ossl_rand_check_random_provider_on_unload(prov->libctx, prov))
  ------------------
  |  Branch (1179:12): [True: 0, False: 0]
  ------------------
 1180|      0|        return -1;
 1181|  2.14k|#endif
 1182|       |
 1183|       |    /*
 1184|       |     * No need to lock if we've got no store because we've not been shared with
 1185|       |     * other threads.
 1186|       |     */
 1187|  2.14k|    store = get_provider_store(prov->libctx);
 1188|  2.14k|    if (store == NULL)
  ------------------
  |  Branch (1188:9): [True: 0, False: 2.14k]
  ------------------
 1189|      0|        lock = 0;
 1190|       |
 1191|  2.14k|    if (lock && !CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1191:9): [True: 2.14k, False: 0]
  |  Branch (1191:17): [True: 0, False: 2.14k]
  ------------------
 1192|      0|        return -1;
 1193|  2.14k|    if (lock && !CRYPTO_THREAD_write_lock(prov->flag_lock)) {
  ------------------
  |  Branch (1193:9): [True: 2.14k, False: 0]
  |  Branch (1193:17): [True: 0, False: 2.14k]
  ------------------
 1194|      0|        CRYPTO_THREAD_unlock(store->lock);
 1195|      0|        return -1;
 1196|      0|    }
 1197|       |
 1198|  2.14k|    if (!CRYPTO_atomic_add(&prov->activatecnt, -1, &count, prov->activatecnt_lock)) {
  ------------------
  |  Branch (1198:9): [True: 0, False: 2.14k]
  ------------------
 1199|      0|        if (lock) {
  ------------------
  |  Branch (1199:13): [True: 0, False: 0]
  ------------------
 1200|      0|            CRYPTO_THREAD_unlock(prov->flag_lock);
 1201|      0|            CRYPTO_THREAD_unlock(store->lock);
 1202|      0|        }
 1203|      0|        return -1;
 1204|      0|    }
 1205|       |
 1206|  2.14k|#ifndef FIPS_MODULE
 1207|  2.14k|    if (count >= 1 && prov->ischild && upcalls) {
  ------------------
  |  Branch (1207:9): [True: 437, False: 1.70k]
  |  Branch (1207:23): [True: 0, False: 437]
  |  Branch (1207:40): [True: 0, False: 0]
  ------------------
 1208|       |        /*
 1209|       |         * We have had a direct activation in this child libctx so we need to
 1210|       |         * now down the ref count in the parent provider. We do the actual down
 1211|       |         * ref outside of the flag_lock, since it could involve getting other
 1212|       |         * locks.
 1213|       |         */
 1214|      0|        freeparent = 1;
 1215|      0|    }
 1216|  2.14k|#endif
 1217|       |
 1218|  2.14k|    if (count < 1)
  ------------------
  |  Branch (1218:9): [True: 1.70k, False: 437]
  ------------------
 1219|  1.70k|        prov->flag_activated = 0;
 1220|    437|#ifndef FIPS_MODULE
 1221|    437|    else
 1222|    437|        removechildren = 0;
 1223|  2.14k|#endif
 1224|       |
 1225|  2.14k|#ifndef FIPS_MODULE
 1226|  2.14k|    if (removechildren && store != NULL) {
  ------------------
  |  Branch (1226:9): [True: 1.70k, False: 437]
  |  Branch (1226:27): [True: 1.70k, False: 0]
  ------------------
 1227|  1.70k|        int i, max = sk_OSSL_PROVIDER_CHILD_CB_num(store->child_cbs);
 1228|  1.70k|        OSSL_PROVIDER_CHILD_CB *child_cb;
 1229|       |
 1230|  1.70k|        for (i = 0; i < max; i++) {
  ------------------
  |  Branch (1230:21): [True: 0, False: 1.70k]
  ------------------
 1231|      0|            child_cb = sk_OSSL_PROVIDER_CHILD_CB_value(store->child_cbs, i);
 1232|      0|            child_cb->remove_cb((OSSL_CORE_HANDLE *)prov, child_cb->cbdata);
 1233|      0|        }
 1234|  1.70k|    }
 1235|  2.14k|#endif
 1236|  2.14k|    if (lock) {
  ------------------
  |  Branch (1236:9): [True: 2.14k, False: 0]
  ------------------
 1237|  2.14k|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1238|  2.14k|        CRYPTO_THREAD_unlock(store->lock);
 1239|       |        /*
 1240|       |         * This can be done outside the lock. We tolerate other threads getting
 1241|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
 1242|       |         */
 1243|  2.14k|#ifndef FIPS_MODULE
 1244|  2.14k|        if (count < 1)
  ------------------
  |  Branch (1244:13): [True: 1.70k, False: 437]
  ------------------
 1245|  1.70k|            ossl_decoder_cache_flush(prov->libctx);
 1246|  2.14k|#endif
 1247|  2.14k|    }
 1248|  2.14k|#ifndef FIPS_MODULE
 1249|  2.14k|    if (freeparent)
  ------------------
  |  Branch (1249:9): [True: 0, False: 2.14k]
  ------------------
 1250|      0|        ossl_provider_free_parent(prov, 1);
 1251|  2.14k|#endif
 1252|       |
 1253|       |    /* We don't deinit here, that's done in ossl_provider_free() */
 1254|  2.14k|    return count;
 1255|  2.14k|}
provider_core.c:provider_remove_store_methods:
 1362|  1.70k|{
 1363|  1.70k|    struct provider_store_st *store;
 1364|  1.70k|    int freeing;
 1365|       |
 1366|  1.70k|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (1366:9): [True: 0, False: 1.70k]
  ------------------
 1367|      0|        return 0;
 1368|       |
 1369|  1.70k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1369:9): [True: 0, False: 1.70k]
  ------------------
 1370|      0|        return 0;
 1371|  1.70k|    freeing = store->freeing;
 1372|  1.70k|    CRYPTO_THREAD_unlock(store->lock);
 1373|       |
 1374|  1.70k|    if (!freeing) {
  ------------------
  |  Branch (1374:9): [True: 899, False: 808]
  ------------------
 1375|    899|        int acc;
 1376|       |
 1377|    899|        if (!CRYPTO_THREAD_write_lock(prov->opbits_lock))
  ------------------
  |  Branch (1377:13): [True: 0, False: 899]
  ------------------
 1378|      0|            return 0;
 1379|    899|        OPENSSL_free(prov->operation_bits);
  ------------------
  |  |  132|    899|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1380|    899|        prov->operation_bits = NULL;
 1381|    899|        prov->operation_bits_sz = 0;
 1382|    899|        CRYPTO_THREAD_unlock(prov->opbits_lock);
 1383|       |
 1384|    899|        acc = evp_method_store_remove_all_provided(prov)
 1385|    899|#ifndef FIPS_MODULE
 1386|    899|            + ossl_encoder_store_remove_all_provided(prov)
 1387|    899|            + ossl_decoder_store_remove_all_provided(prov)
 1388|    899|            + ossl_store_loader_store_remove_all_provided(prov)
 1389|    899|#endif
 1390|    899|            ;
 1391|       |
 1392|    899|#ifndef FIPS_MODULE
 1393|    899|        return acc == 4;
 1394|       |#else
 1395|       |        return acc == 1;
 1396|       |#endif
 1397|    899|    }
 1398|    808|    return 1;
 1399|  1.70k|}
provider_core.c:provider_activate_fallbacks:
 1442|   102k|{
 1443|   102k|    int use_fallbacks;
 1444|   102k|    int activated_fallback_count = 0;
 1445|   102k|    int ret = 0;
 1446|   102k|    const OSSL_PROVIDER_INFO *p;
 1447|       |
 1448|   102k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1448:9): [True: 0, False: 102k]
  ------------------
 1449|      0|        return 0;
 1450|   102k|    use_fallbacks = store->use_fallbacks;
 1451|   102k|    CRYPTO_THREAD_unlock(store->lock);
 1452|   102k|    if (!use_fallbacks)
  ------------------
  |  Branch (1452:9): [True: 101k, False: 809]
  ------------------
 1453|   101k|        return 1;
 1454|       |
 1455|    809|    if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (1455:9): [True: 0, False: 809]
  ------------------
 1456|      0|        return 0;
 1457|       |    /* Check again, just in case another thread changed it */
 1458|    809|    use_fallbacks = store->use_fallbacks;
 1459|    809|    if (!use_fallbacks) {
  ------------------
  |  Branch (1459:9): [True: 0, False: 809]
  ------------------
 1460|      0|        CRYPTO_THREAD_unlock(store->lock);
 1461|      0|        return 1;
 1462|      0|    }
 1463|       |
 1464|  3.23k|    for (p = ossl_predefined_providers; p->name != NULL; p++) {
  ------------------
  |  Branch (1464:41): [True: 2.42k, False: 809]
  ------------------
 1465|  2.42k|        OSSL_PROVIDER *prov = NULL;
 1466|  2.42k|        OSSL_PROVIDER_INFO *info = store->provinfo;
 1467|  2.42k|        STACK_OF(INFOPAIR) *params = NULL;
  ------------------
  |  |   33|  2.42k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1468|  2.42k|        size_t i;
 1469|       |
 1470|  2.42k|        if (!p->is_fallback)
  ------------------
  |  Branch (1470:13): [True: 1.61k, False: 809]
  ------------------
 1471|  1.61k|            continue;
 1472|       |
 1473|    809|        for (i = 0; i < store->numprovinfo; info++, i++) {
  ------------------
  |  Branch (1473:21): [True: 0, False: 809]
  ------------------
 1474|      0|            if (strcmp(info->name, p->name) != 0)
  ------------------
  |  Branch (1474:17): [True: 0, False: 0]
  ------------------
 1475|      0|                continue;
 1476|      0|            params = info->parameters;
 1477|      0|            break;
 1478|      0|        }
 1479|       |
 1480|       |        /*
 1481|       |         * We use the internal constructor directly here,
 1482|       |         * otherwise we get a call loop
 1483|       |         */
 1484|    809|        prov = provider_new(p->name, p->init, params);
 1485|    809|        if (prov == NULL)
  ------------------
  |  Branch (1485:13): [True: 0, False: 809]
  ------------------
 1486|      0|            goto err;
 1487|    809|        prov->libctx = store->libctx;
 1488|    809|#ifndef FIPS_MODULE
 1489|    809|        prov->error_lib = ERR_get_next_error_library();
 1490|    809|#endif
 1491|       |
 1492|       |        /*
 1493|       |         * We are calling provider_activate while holding the store lock. This
 1494|       |         * means the init function will be called while holding a lock. Normally
 1495|       |         * we try to avoid calling a user callback while holding a lock.
 1496|       |         * However, fallbacks are never third party providers so we accept this.
 1497|       |         */
 1498|    809|        if (provider_activate(prov, 0, 0) < 0) {
  ------------------
  |  Branch (1498:13): [True: 0, False: 809]
  ------------------
 1499|      0|            ossl_provider_free(prov);
 1500|      0|            goto err;
 1501|      0|        }
 1502|    809|        prov->store = store;
 1503|    809|        if (sk_OSSL_PROVIDER_push(store->providers, prov) == 0) {
  ------------------
  |  Branch (1503:13): [True: 0, False: 809]
  ------------------
 1504|      0|            ossl_provider_free(prov);
 1505|      0|            goto err;
 1506|      0|        }
 1507|    809|        activated_fallback_count++;
 1508|    809|    }
 1509|       |
 1510|    809|    if (activated_fallback_count > 0) {
  ------------------
  |  Branch (1510:9): [True: 809, False: 0]
  ------------------
 1511|    809|        store->use_fallbacks = 0;
 1512|    809|        ret = 1;
 1513|    809|    }
 1514|    809|err:
 1515|    809|    CRYPTO_THREAD_unlock(store->lock);
 1516|    809|    return ret;
 1517|    809|}

ossl_err_load_RAND_strings:
  105|      1|{
  106|      1|#ifndef OPENSSL_NO_ERR
  107|      1|    if (ERR_reason_error_string(RAND_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (107:9): [True: 1, False: 0]
  ------------------
  108|      1|        ERR_load_strings_const(RAND_str_reasons);
  109|      1|#endif
  110|      1|    return 1;
  111|      1|}

RAND_get_rand_method:
  249|  37.7k|{
  250|  37.7k|    const RAND_METHOD *tmp_meth = NULL;
  251|       |
  252|  37.7k|    if (!RUN_ONCE(&rand_init, do_rand_init))
  ------------------
  |  |  130|  37.7k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 37.7k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (252:9): [True: 0, False: 37.7k]
  ------------------
  253|      0|        return NULL;
  254|       |
  255|  37.7k|    if (rand_meth_lock == NULL)
  ------------------
  |  Branch (255:9): [True: 0, False: 37.7k]
  ------------------
  256|      0|        return NULL;
  257|       |
  258|  37.7k|    if (!CRYPTO_THREAD_read_lock(rand_meth_lock))
  ------------------
  |  Branch (258:9): [True: 0, False: 37.7k]
  ------------------
  259|      0|        return NULL;
  260|  37.7k|    tmp_meth = default_RAND_meth;
  261|  37.7k|    CRYPTO_THREAD_unlock(rand_meth_lock);
  262|  37.7k|    if (tmp_meth != NULL)
  ------------------
  |  Branch (262:9): [True: 37.7k, False: 1]
  ------------------
  263|  37.7k|        return tmp_meth;
  264|       |
  265|      1|    if (!CRYPTO_THREAD_write_lock(rand_meth_lock))
  ------------------
  |  Branch (265:9): [True: 0, False: 1]
  ------------------
  266|      0|        return NULL;
  267|      1|    if (default_RAND_meth == NULL)
  ------------------
  |  Branch (267:9): [True: 1, False: 0]
  ------------------
  268|      1|        default_RAND_meth = &ossl_rand_meth;
  269|      1|    tmp_meth = default_RAND_meth;
  270|      1|    CRYPTO_THREAD_unlock(rand_meth_lock);
  271|      1|    return tmp_meth;
  272|      1|}
RAND_status:
  327|  7.55k|{
  328|  7.55k|    EVP_RAND_CTX *rand;
  329|  7.55k|#ifndef OPENSSL_NO_DEPRECATED_3_0
  330|  7.55k|    const RAND_METHOD *meth = RAND_get_rand_method();
  331|       |
  332|  7.55k|    if (meth != NULL && meth != RAND_OpenSSL())
  ------------------
  |  Branch (332:9): [True: 7.55k, False: 0]
  |  Branch (332:25): [True: 0, False: 7.55k]
  ------------------
  333|      0|        return meth->status != NULL ? meth->status() : 0;
  ------------------
  |  Branch (333:16): [True: 0, False: 0]
  ------------------
  334|  7.55k|#endif
  335|       |
  336|  7.55k|    if ((rand = RAND_get0_primary(NULL)) == NULL)
  ------------------
  |  Branch (336:9): [True: 0, False: 7.55k]
  ------------------
  337|      0|        return 0;
  338|  7.55k|    return EVP_RAND_get_state(rand) == EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|  7.55k|#define EVP_RAND_STATE_READY 1
  ------------------
  339|  7.55k|}
RAND_priv_bytes_ex:
  357|  17.6k|{
  358|  17.6k|    RAND_GLOBAL *dgbl;
  359|  17.6k|    EVP_RAND_CTX *rand;
  360|  17.6k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  361|  17.6k|    const RAND_METHOD *meth = RAND_get_rand_method();
  362|       |
  363|  17.6k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (363:9): [True: 17.6k, False: 0]
  |  Branch (363:25): [True: 0, False: 17.6k]
  ------------------
  364|      0|        if (num > INT_MAX) {
  ------------------
  |  Branch (364:13): [True: 0, False: 0]
  ------------------
  365|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  366|      0|            return -1;
  367|      0|        }
  368|      0|        if (meth->bytes != NULL)
  ------------------
  |  Branch (368:13): [True: 0, False: 0]
  ------------------
  369|      0|            return meth->bytes(buf, (int)num);
  370|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_FUNC_NOT_IMPLEMENTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  371|      0|        return -1;
  372|      0|    }
  373|  17.6k|#endif
  374|       |
  375|  17.6k|    dgbl = rand_get_global(ctx);
  376|  17.6k|    if (dgbl == NULL)
  ------------------
  |  Branch (376:9): [True: 0, False: 17.6k]
  ------------------
  377|      0|        return 0;
  378|  17.6k|#ifndef FIPS_MODULE
  379|  17.6k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (379:9): [True: 0, False: 17.6k]
  ------------------
  380|      0|        return ossl_provider_random_bytes(dgbl->random_provider,
  381|      0|            OSSL_PROV_RANDOM_PRIVATE,
  ------------------
  |  |  124|      0|#define OSSL_PROV_RANDOM_PRIVATE 1
  ------------------
  382|      0|            buf, num, strength);
  383|  17.6k|#endif /* !FIPS_MODULE */
  384|  17.6k|    rand = rand_get0_private(ctx, dgbl);
  385|  17.6k|    if (rand != NULL)
  ------------------
  |  Branch (385:9): [True: 17.6k, False: 0]
  ------------------
  386|  17.6k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  387|       |
  388|      0|    return 0;
  389|  17.6k|}
RAND_bytes_ex:
  400|  12.5k|{
  401|  12.5k|    RAND_GLOBAL *dgbl;
  402|  12.5k|    EVP_RAND_CTX *rand;
  403|  12.5k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  404|  12.5k|    const RAND_METHOD *meth = RAND_get_rand_method();
  405|       |
  406|  12.5k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (406:9): [True: 12.5k, False: 0]
  |  Branch (406:25): [True: 0, False: 12.5k]
  ------------------
  407|      0|        if (num > INT_MAX) {
  ------------------
  |  Branch (407:13): [True: 0, False: 0]
  ------------------
  408|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  409|      0|            return -1;
  410|      0|        }
  411|      0|        if (meth->bytes != NULL)
  ------------------
  |  Branch (411:13): [True: 0, False: 0]
  ------------------
  412|      0|            return meth->bytes(buf, (int)num);
  413|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_FUNC_NOT_IMPLEMENTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  414|      0|        return -1;
  415|      0|    }
  416|  12.5k|#endif
  417|       |
  418|  12.5k|    dgbl = rand_get_global(ctx);
  419|  12.5k|    if (dgbl == NULL)
  ------------------
  |  Branch (419:9): [True: 0, False: 12.5k]
  ------------------
  420|      0|        return 0;
  421|  12.5k|#ifndef FIPS_MODULE
  422|  12.5k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (422:9): [True: 0, False: 12.5k]
  ------------------
  423|      0|        return ossl_provider_random_bytes(dgbl->random_provider,
  424|      0|            OSSL_PROV_RANDOM_PUBLIC,
  ------------------
  |  |  123|      0|#define OSSL_PROV_RANDOM_PUBLIC 0
  ------------------
  425|      0|            buf, num, strength);
  426|  12.5k|#endif /* !FIPS_MODULE */
  427|       |
  428|  12.5k|    rand = rand_get0_public(ctx, dgbl);
  429|  12.5k|    if (rand != NULL)
  ------------------
  |  Branch (429:9): [True: 12.5k, False: 0]
  ------------------
  430|  12.5k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  431|       |
  432|      0|    return 0;
  433|  12.5k|}
RAND_bytes:
  436|  4.11k|{
  437|  4.11k|    if (num < 0)
  ------------------
  |  Branch (437:9): [True: 0, False: 4.11k]
  ------------------
  438|      0|        return 0;
  439|  4.11k|    return RAND_bytes_ex(NULL, buf, (size_t)num, 0);
  440|  4.11k|}
ossl_rand_ctx_new:
  447|    809|{
  448|    809|    RAND_GLOBAL *dgbl = OPENSSL_zalloc(sizeof(*dgbl));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  449|       |
  450|    809|    if (dgbl == NULL)
  ------------------
  |  Branch (450:9): [True: 0, False: 809]
  ------------------
  451|      0|        return NULL;
  452|       |
  453|    809|#ifndef FIPS_MODULE
  454|       |    /*
  455|       |     * We need to ensure that base libcrypto thread handling has been
  456|       |     * initialised.
  457|       |     */
  458|    809|    OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL);
  ------------------
  |  |   31|    809|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  459|       |
  460|       |    /* Prepopulate the random provider name */
  461|    809|    dgbl->random_provider_name = OPENSSL_strdup(random_provider_fips_name);
  ------------------
  |  |  136|    809|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  462|    809|    if (dgbl->random_provider_name == NULL)
  ------------------
  |  Branch (462:9): [True: 0, False: 809]
  ------------------
  463|      0|        goto err0;
  464|    809|#endif
  465|       |
  466|    809|    dgbl->lock = CRYPTO_THREAD_lock_new();
  467|    809|    if (dgbl->lock == NULL)
  ------------------
  |  Branch (467:9): [True: 0, False: 809]
  ------------------
  468|      0|        goto err1;
  469|       |
  470|    809|    return dgbl;
  471|       |
  472|      0|err1:
  473|      0|    CRYPTO_THREAD_lock_free(dgbl->lock);
  474|      0|#ifndef FIPS_MODULE
  475|      0|err0:
  476|      0|    OPENSSL_free(dgbl->random_provider_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  477|      0|#endif
  478|      0|    OPENSSL_free(dgbl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  479|       |    return NULL;
  480|      0|}
ossl_rand_ctx_free:
  483|    808|{
  484|    808|    RAND_GLOBAL *dgbl = vdgbl;
  485|       |
  486|    808|    if (dgbl == NULL)
  ------------------
  |  Branch (486:9): [True: 0, False: 808]
  ------------------
  487|      0|        return;
  488|       |
  489|    808|    CRYPTO_THREAD_lock_free(dgbl->lock);
  490|    808|    EVP_RAND_CTX_free(dgbl->primary);
  491|    808|    EVP_RAND_CTX_free(dgbl->seed);
  492|    808|#ifndef FIPS_MODULE
  493|    808|    OPENSSL_free(dgbl->random_provider_name);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  494|    808|#endif /* !FIPS_MODULE */
  495|    808|    OPENSSL_free(dgbl->rng_name);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  496|    808|    OPENSSL_free(dgbl->rng_cipher);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  497|    808|    OPENSSL_free(dgbl->rng_digest);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  498|    808|    OPENSSL_free(dgbl->rng_propq);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  499|    808|    OPENSSL_free(dgbl->seed_name);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  500|    808|    OPENSSL_free(dgbl->seed_propq);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  501|       |
  502|    808|    OPENSSL_free(dgbl);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  503|    808|}
RAND_get0_primary:
  762|  7.55k|{
  763|  7.55k|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  764|       |
  765|  7.55k|    return dgbl == NULL ? NULL : rand_get0_primary(ctx, dgbl);
  ------------------
  |  Branch (765:12): [True: 0, False: 7.55k]
  ------------------
  766|  7.55k|}
rand_lib.c:do_rand_init:
  126|      1|{
  127|      1|#ifndef OPENSSL_NO_DEPRECATED_3_0
  128|      1|    rand_meth_lock = CRYPTO_THREAD_lock_new();
  129|      1|    if (rand_meth_lock == NULL)
  ------------------
  |  Branch (129:9): [True: 0, False: 1]
  ------------------
  130|      0|        goto err;
  131|      1|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  132|       |
  133|      1|    if (!ossl_rand_pool_init())
  ------------------
  |  Branch (133:9): [True: 0, False: 1]
  ------------------
  134|      0|        goto err;
  135|       |
  136|      1|    rand_inited = 1;
  137|      1|    return 1;
  138|       |
  139|      0|err:
  140|      0|#ifndef OPENSSL_NO_DEPRECATED_3_0
  141|      0|    CRYPTO_THREAD_lock_free(rand_meth_lock);
  142|       |    rand_meth_lock = NULL;
  143|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  144|      0|    return 0;
  145|      1|}
rand_lib.c:rand_get_global:
   84|  40.7k|{
   85|  40.7k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DRBG_INDEX);
  ------------------
  |  |  100|  40.7k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
   86|  40.7k|}
rand_lib.c:rand_get0_primary:
  685|  8.74k|{
  686|  8.74k|    EVP_RAND_CTX *ret, *seed, *newseed = NULL, *primary;
  687|       |
  688|  8.74k|    if (dgbl == NULL)
  ------------------
  |  Branch (688:9): [True: 0, False: 8.74k]
  ------------------
  689|      0|        return NULL;
  690|       |
  691|  8.74k|    if (!CRYPTO_THREAD_read_lock(dgbl->lock))
  ------------------
  |  Branch (691:9): [True: 0, False: 8.74k]
  ------------------
  692|      0|        return NULL;
  693|       |
  694|  8.74k|    ret = dgbl->primary;
  695|  8.74k|    seed = dgbl->seed;
  696|  8.74k|    CRYPTO_THREAD_unlock(dgbl->lock);
  697|       |
  698|  8.74k|    if (ret != NULL)
  ------------------
  |  Branch (698:9): [True: 8.14k, False: 596]
  ------------------
  699|  8.14k|        return ret;
  700|       |
  701|    596|#if !defined(FIPS_MODULE) || !defined(OPENSSL_NO_FIPS_JITTER)
  702|       |    /* Create a seed source for libcrypto or jitter enabled FIPS provider */
  703|    596|    if (seed == NULL) {
  ------------------
  |  Branch (703:9): [True: 596, False: 0]
  ------------------
  704|    596|        ERR_set_mark();
  705|    596|        seed = newseed = rand_new_seed(ctx);
  706|    596|        if (ERR_count_to_mark() > 0) {
  ------------------
  |  Branch (706:13): [True: 0, False: 596]
  ------------------
  707|      0|            EVP_RAND_CTX_free(newseed);
  708|      0|            ERR_clear_last_mark();
  709|      0|            return NULL;
  710|      0|        }
  711|    596|        ERR_pop_to_mark();
  712|    596|    }
  713|    596|#endif /* !FIPS_MODULE || !OPENSSL_NO_FIPS_JITTER */
  714|       |
  715|       |#if defined(FIPS_MODULE)
  716|       |    /* The FIPS provider has entropy health tests instead of the primary */
  717|       |    ret = rand_new_crngt(ctx, seed);
  718|       |#else /* FIPS_MODULE */
  719|    596|    ret = rand_new_drbg(ctx, seed, PRIMARY_RESEED_INTERVAL,
  ------------------
  |  |   23|    596|#define PRIMARY_RESEED_INTERVAL (1 << 8)
  ------------------
  720|    596|        PRIMARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   25|    596|#define PRIMARY_RESEED_TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  721|    596|#endif /* FIPS_MODULE */
  722|       |
  723|       |    /*
  724|       |     * The primary DRBG may be shared between multiple threads so we must
  725|       |     * enable locking.
  726|       |     */
  727|    596|    if (ret == NULL || !EVP_RAND_enable_locking(ret)) {
  ------------------
  |  Branch (727:9): [True: 0, False: 596]
  |  Branch (727:24): [True: 0, False: 596]
  ------------------
  728|      0|        if (ret != NULL) {
  ------------------
  |  Branch (728:13): [True: 0, False: 0]
  ------------------
  729|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UNABLE_TO_ENABLE_LOCKING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  730|      0|            EVP_RAND_CTX_free(ret);
  731|      0|        }
  732|      0|        if (newseed == NULL)
  ------------------
  |  Branch (732:13): [True: 0, False: 0]
  ------------------
  733|      0|            return NULL;
  734|       |        /* else carry on and store seed */
  735|      0|        ret = NULL;
  736|      0|    }
  737|       |
  738|    596|    if (!CRYPTO_THREAD_write_lock(dgbl->lock))
  ------------------
  |  Branch (738:9): [True: 0, False: 596]
  ------------------
  739|      0|        return NULL;
  740|       |
  741|    596|    primary = dgbl->primary;
  742|    596|    if (primary != NULL) {
  ------------------
  |  Branch (742:9): [True: 0, False: 596]
  ------------------
  743|      0|        CRYPTO_THREAD_unlock(dgbl->lock);
  744|      0|        EVP_RAND_CTX_free(ret);
  745|      0|        EVP_RAND_CTX_free(newseed);
  746|      0|        return primary;
  747|      0|    }
  748|    596|    if (newseed != NULL)
  ------------------
  |  Branch (748:9): [True: 596, False: 0]
  ------------------
  749|    596|        dgbl->seed = newseed;
  750|    596|    dgbl->primary = ret;
  751|    596|    CRYPTO_THREAD_unlock(dgbl->lock);
  752|       |
  753|    596|    return ret;
  754|    596|}
rand_lib.c:rand_new_seed:
  525|    596|{
  526|    596|    EVP_RAND *rand;
  527|    596|    const char *propq;
  528|    596|    char *name;
  529|    596|    EVP_RAND_CTX *ctx = NULL;
  530|    596|    int fallback = 0;
  531|    596|#ifdef OPENSSL_NO_FIPS_JITTER
  532|    596|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  533|       |
  534|    596|    if (dgbl == NULL)
  ------------------
  |  Branch (534:9): [True: 0, False: 596]
  ------------------
  535|      0|        return NULL;
  536|    596|    propq = dgbl->seed_propq;
  537|    596|    if (dgbl->seed_name != NULL) {
  ------------------
  |  Branch (537:9): [True: 0, False: 596]
  ------------------
  538|      0|        name = dgbl->seed_name;
  539|    596|    } else {
  540|    596|        fallback = 1;
  541|    596|        name = OPENSSL_MSTR(OPENSSL_DEFAULT_SEED_SRC);
  ------------------
  |  |   19|    596|#define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
  |  |  ------------------
  |  |  |  |   18|    596|#define OPENSSL_MSTR_HELPER(x) #x
  |  |  ------------------
  ------------------
  542|    596|    }
  543|       |#else /* !OPENSSL_NO_FIPS_JITTER */
  544|       |    name = "JITTER";
  545|       |    propq = "";
  546|       |#endif /* OPENSSL_NO_FIPS_JITTER */
  547|       |
  548|    596|    ERR_set_mark();
  549|    596|    rand = EVP_RAND_fetch(libctx, name, propq);
  550|    596|    ERR_pop_to_mark();
  551|    596|    if (rand == NULL) {
  ------------------
  |  Branch (551:9): [True: 0, False: 596]
  ------------------
  552|      0|        if (!fallback)
  ------------------
  |  Branch (552:13): [True: 0, False: 0]
  ------------------
  553|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_FETCH_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  554|      0|        goto err;
  555|      0|    }
  556|    596|    ctx = EVP_RAND_CTX_new(rand, NULL);
  557|    596|    EVP_RAND_free(rand);
  558|    596|    if (ctx == NULL) {
  ------------------
  |  Branch (558:9): [True: 0, False: 596]
  ------------------
  559|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_CREATE_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  560|      0|        goto err;
  561|      0|    }
  562|    596|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) {
  ------------------
  |  Branch (562:9): [True: 0, False: 596]
  ------------------
  563|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|        goto err;
  565|      0|    }
  566|    596|    return ctx;
  567|      0|err:
  568|      0|    EVP_RAND_CTX_free(ctx);
  569|       |    return NULL;
  570|    596|}
rand_lib.c:rand_new_drbg:
  593|  1.78k|{
  594|  1.78k|    EVP_RAND *rand;
  595|  1.78k|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  596|  1.78k|    EVP_RAND_CTX *ctx;
  597|  1.78k|    OSSL_PARAM params[9], *p = params;
  598|  1.78k|    const OSSL_PARAM *settables;
  599|  1.78k|    const char *prov_name;
  600|  1.78k|    char *name, *cipher;
  601|  1.78k|    int use_df = 1;
  602|       |
  603|  1.78k|    if (dgbl == NULL)
  ------------------
  |  Branch (603:9): [True: 0, False: 1.78k]
  ------------------
  604|      0|        return NULL;
  605|  1.78k|    name = dgbl->rng_name != NULL ? dgbl->rng_name : "CTR-DRBG";
  ------------------
  |  Branch (605:12): [True: 0, False: 1.78k]
  ------------------
  606|  1.78k|    rand = EVP_RAND_fetch(libctx, name, dgbl->rng_propq);
  607|  1.78k|    if (rand == NULL) {
  ------------------
  |  Branch (607:9): [True: 0, False: 1.78k]
  ------------------
  608|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_FETCH_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  609|      0|        return NULL;
  610|      0|    }
  611|  1.78k|    prov_name = ossl_provider_name(EVP_RAND_get0_provider(rand));
  612|  1.78k|    ctx = EVP_RAND_CTX_new(rand, parent);
  613|  1.78k|    EVP_RAND_free(rand);
  614|  1.78k|    if (ctx == NULL) {
  ------------------
  |  Branch (614:9): [True: 0, False: 1.78k]
  ------------------
  615|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_CREATE_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  616|      0|        return NULL;
  617|      0|    }
  618|       |
  619|  1.78k|    settables = EVP_RAND_CTX_settable_params(ctx);
  620|  1.78k|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_CIPHER)) {
  ------------------
  |  |  237|  1.78k|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  126|  1.78k|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  |  Branch (620:9): [True: 1.78k, False: 0]
  ------------------
  621|  1.78k|        cipher = dgbl->rng_cipher != NULL ? dgbl->rng_cipher : "AES-256-CTR";
  ------------------
  |  Branch (621:18): [True: 0, False: 1.78k]
  ------------------
  622|  1.78k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_CIPHER,
  ------------------
  |  |  237|  1.78k|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  126|  1.78k|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  623|  1.78k|            cipher, 0);
  624|  1.78k|    }
  625|  1.78k|    if (dgbl->rng_digest != NULL
  ------------------
  |  Branch (625:9): [True: 0, False: 1.78k]
  ------------------
  626|      0|        && OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_DIGEST))
  ------------------
  |  |  238|      0|# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  127|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  |  Branch (626:12): [True: 0, False: 0]
  ------------------
  627|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_DIGEST,
  ------------------
  |  |  238|      0|# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  127|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  628|      0|            dgbl->rng_digest, 0);
  629|  1.78k|    if (prov_name != NULL)
  ------------------
  |  Branch (629:9): [True: 1.78k, False: 0]
  ------------------
  630|  1.78k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_PROV_PARAM_CORE_PROV_NAME,
  ------------------
  |  |  513|  1.78k|# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
  ------------------
  631|  1.78k|            (char *)prov_name, 0);
  632|  1.78k|    if (dgbl->rng_propq != NULL)
  ------------------
  |  Branch (632:9): [True: 0, False: 1.78k]
  ------------------
  633|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_PROPERTIES,
  ------------------
  |  |  252|      0|# define OSSL_DRBG_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  130|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  ------------------
  ------------------
  634|      0|            dgbl->rng_propq, 0);
  635|  1.78k|    if (OSSL_PARAM_locate_const(settables, OSSL_ALG_PARAM_MAC))
  ------------------
  |  |  129|  1.78k|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  |  Branch (635:9): [True: 0, False: 1.78k]
  ------------------
  636|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_ALG_PARAM_MAC, "HMAC", 0);
  ------------------
  |  |  129|      0|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  637|  1.78k|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_USE_DF))
  ------------------
  |  |  259|  1.78k|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  |  Branch (637:9): [True: 1.78k, False: 0]
  ------------------
  638|  1.78k|        *p++ = OSSL_PARAM_construct_int(OSSL_DRBG_PARAM_USE_DF, &use_df);
  ------------------
  |  |  259|  1.78k|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  639|  1.78k|    *p++ = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_REQUESTS,
  ------------------
  |  |  255|  1.78k|# define OSSL_DRBG_PARAM_RESEED_REQUESTS "reseed_requests"
  ------------------
  640|  1.78k|        &reseed_interval);
  641|  1.78k|    *p++ = OSSL_PARAM_construct_time_t(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL,
  ------------------
  |  |  257|  1.78k|# define OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL "reseed_time_interval"
  ------------------
  642|  1.78k|        &reseed_time_interval);
  643|  1.78k|    *p = OSSL_PARAM_construct_end();
  644|  1.78k|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, params)) {
  ------------------
  |  Branch (644:9): [True: 0, False: 1.78k]
  ------------------
  645|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  646|      0|        EVP_RAND_CTX_free(ctx);
  647|      0|        return NULL;
  648|      0|    }
  649|  1.78k|    return ctx;
  650|  1.78k|}
rand_lib.c:rand_get0_public:
  769|  12.5k|{
  770|  12.5k|    EVP_RAND_CTX *rand, *primary;
  771|  12.5k|    OSSL_LIB_CTX *origctx = ctx;
  772|       |
  773|  12.5k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  774|       |
  775|  12.5k|    if (ctx == NULL)
  ------------------
  |  Branch (775:9): [True: 0, False: 12.5k]
  ------------------
  776|      0|        return NULL;
  777|       |
  778|  12.5k|    if (dgbl == NULL)
  ------------------
  |  Branch (778:9): [True: 0, False: 12.5k]
  ------------------
  779|      0|        return NULL;
  780|       |
  781|  12.5k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx);
  782|  12.5k|    if (rand == NULL) {
  ------------------
  |  Branch (782:9): [True: 596, False: 11.9k]
  ------------------
  783|    596|        primary = rand_get0_primary(origctx, dgbl);
  784|    596|        if (primary == NULL)
  ------------------
  |  Branch (784:13): [True: 0, False: 596]
  ------------------
  785|      0|            return NULL;
  786|       |
  787|       |        /*
  788|       |         * If the private is also NULL then this is the first time we've
  789|       |         * used this thread.
  790|       |         */
  791|    596|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx) == NULL
  ------------------
  |  Branch (791:13): [True: 596, False: 0]
  ------------------
  792|    596|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (792:16): [True: 0, False: 596]
  ------------------
  793|      0|            return NULL;
  794|    596|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|    596|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  795|    596|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|    596|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  796|    596|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx, rand)) {
  ------------------
  |  Branch (796:13): [True: 0, False: 596]
  ------------------
  797|      0|            EVP_RAND_CTX_free(rand);
  798|      0|            rand = NULL;
  799|      0|        }
  800|    596|    }
  801|  12.5k|    return rand;
  802|  12.5k|}
rand_lib.c:rand_delete_thread_state:
  506|    595|{
  507|    595|    OSSL_LIB_CTX *ctx = arg;
  508|    595|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  509|    595|    EVP_RAND_CTX *rand;
  510|       |
  511|    595|    if (dgbl == NULL)
  ------------------
  |  Branch (511:9): [True: 0, False: 595]
  ------------------
  512|      0|        return;
  513|       |
  514|    595|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx);
  515|    595|    CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx, NULL);
  516|    595|    EVP_RAND_CTX_free(rand);
  517|       |
  518|    595|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx);
  519|       |    CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx, NULL);
  520|    595|    EVP_RAND_CTX_free(rand);
  521|    595|}
rand_lib.c:rand_get0_private:
  816|  17.6k|{
  817|  17.6k|    EVP_RAND_CTX *rand, *primary;
  818|  17.6k|    OSSL_LIB_CTX *origctx = ctx;
  819|       |
  820|  17.6k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  821|  17.6k|    if (ctx == NULL)
  ------------------
  |  Branch (821:9): [True: 0, False: 17.6k]
  ------------------
  822|      0|        return NULL;
  823|       |
  824|  17.6k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx);
  825|  17.6k|    if (rand == NULL) {
  ------------------
  |  Branch (825:9): [True: 596, False: 17.0k]
  ------------------
  826|    596|        primary = rand_get0_primary(origctx, dgbl);
  827|    596|        if (primary == NULL)
  ------------------
  |  Branch (827:13): [True: 0, False: 596]
  ------------------
  828|      0|            return NULL;
  829|       |
  830|       |        /*
  831|       |         * If the public is also NULL then this is the first time we've
  832|       |         * used this thread.
  833|       |         */
  834|    596|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx) == NULL
  ------------------
  |  Branch (834:13): [True: 0, False: 596]
  ------------------
  835|      0|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (835:16): [True: 0, False: 0]
  ------------------
  836|      0|            return NULL;
  837|    596|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|    596|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  838|    596|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|    596|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  839|    596|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx, rand)) {
  ------------------
  |  Branch (839:13): [True: 0, False: 596]
  ------------------
  840|      0|            EVP_RAND_CTX_free(rand);
  841|      0|            rand = NULL;
  842|      0|        }
  843|    596|    }
  844|  17.6k|    return rand;
  845|  17.6k|}

RAND_OpenSSL:
   63|  37.7k|{
   64|  37.7k|    return &ossl_rand_meth;
   65|  37.7k|}

ossl_rand_pool_new:
   23|    596|{
   24|    596|    RAND_POOL *pool = OPENSSL_zalloc(sizeof(*pool));
  ------------------
  |  |  109|    596|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|    596|    size_t min_alloc_size = RAND_POOL_MIN_ALLOCATION(secure);
  ------------------
  |  |   59|    596|#define RAND_POOL_MIN_ALLOCATION(secure) ((secure) ? 16 : 48)
  |  |  ------------------
  |  |  |  Branch (59:43): [True: 596, False: 0]
  |  |  ------------------
  ------------------
   26|       |
   27|    596|    if (pool == NULL)
  ------------------
  |  Branch (27:9): [True: 0, False: 596]
  ------------------
   28|      0|        return NULL;
   29|       |
   30|    596|    pool->min_len = min_len;
   31|    596|    pool->max_len = (max_len > RAND_POOL_MAX_LENGTH) ? RAND_POOL_MAX_LENGTH : max_len;
  ------------------
  |  |   36|    596|#define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   35|    596|#define RAND_POOL_FACTOR 256
  |  |  ------------------
  |  |               #define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   37|    596|#define RAND_DRBG_STRENGTH 256
  |  |  ------------------
  ------------------
                  pool->max_len = (max_len > RAND_POOL_MAX_LENGTH) ? RAND_POOL_MAX_LENGTH : max_len;
  ------------------
  |  |   36|    596|#define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   35|    596|#define RAND_POOL_FACTOR 256
  |  |  ------------------
  |  |               #define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   37|    596|#define RAND_DRBG_STRENGTH 256
  |  |  ------------------
  ------------------
  |  Branch (31:21): [True: 596, False: 0]
  ------------------
   32|    596|    pool->alloc_len = min_len < min_alloc_size ? min_alloc_size : min_len;
  ------------------
  |  Branch (32:23): [True: 0, False: 596]
  ------------------
   33|    596|    if (pool->alloc_len > pool->max_len)
  ------------------
  |  Branch (33:9): [True: 0, False: 596]
  ------------------
   34|      0|        pool->alloc_len = pool->max_len;
   35|       |
   36|    596|    if (secure)
  ------------------
  |  Branch (36:9): [True: 596, False: 0]
  ------------------
   37|    596|        pool->buffer = OPENSSL_secure_zalloc(pool->alloc_len);
  ------------------
  |  |  142|    596|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|      0|    else
   39|      0|        pool->buffer = OPENSSL_zalloc(pool->alloc_len);
  ------------------
  |  |  109|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|       |
   41|    596|    if (pool->buffer == NULL)
  ------------------
  |  Branch (41:9): [True: 0, False: 596]
  ------------------
   42|      0|        goto err;
   43|       |
   44|    596|    pool->entropy_requested = entropy_requested;
   45|    596|    pool->secure = secure;
   46|    596|    return pool;
   47|       |
   48|      0|err:
   49|      0|    OPENSSL_free(pool);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   50|       |    return NULL;
   51|    596|}
ossl_rand_pool_free:
   87|    596|{
   88|    596|    if (pool == NULL)
  ------------------
  |  Branch (88:9): [True: 0, False: 596]
  ------------------
   89|      0|        return;
   90|       |
   91|       |    /*
   92|       |     * Although it would be advisable from a cryptographical viewpoint,
   93|       |     * we are not allowed to clear attached buffers, since they are passed
   94|       |     * to ossl_rand_pool_attach() as `const unsigned char*`.
   95|       |     * (see corresponding comment in ossl_rand_pool_attach()).
   96|       |     */
   97|    596|    if (!pool->attached) {
  ------------------
  |  Branch (97:9): [True: 596, False: 0]
  ------------------
   98|    596|        if (pool->secure)
  ------------------
  |  Branch (98:13): [True: 596, False: 0]
  ------------------
   99|    596|            OPENSSL_secure_clear_free(pool->buffer, pool->alloc_len);
  ------------------
  |  |  150|    596|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  100|      0|        else
  101|      0|            OPENSSL_clear_free(pool->buffer, pool->alloc_len);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  102|    596|    }
  103|       |
  104|    596|    OPENSSL_free(pool);
  ------------------
  |  |  132|    596|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  105|    596|}
ossl_rand_pool_length:
  127|    596|{
  128|    596|    return pool->len;
  129|    596|}
ossl_rand_pool_detach:
  138|    596|{
  139|    596|    unsigned char *ret = pool->buffer;
  140|       |    pool->buffer = NULL;
  141|    596|    pool->entropy = 0;
  142|    596|    return ret;
  143|    596|}
ossl_rand_pool_entropy_available:
  172|    596|{
  173|    596|    if (pool->entropy < pool->entropy_requested)
  ------------------
  |  Branch (173:9): [True: 0, False: 596]
  ------------------
  174|      0|        return 0;
  175|       |
  176|    596|    if (pool->len < pool->min_len)
  ------------------
  |  Branch (176:9): [True: 0, False: 596]
  ------------------
  177|      0|        return 0;
  178|       |
  179|    596|    return pool->entropy;
  180|    596|}
ossl_rand_pool_entropy_needed:
  188|    596|{
  189|    596|    if (pool->entropy < pool->entropy_requested)
  ------------------
  |  Branch (189:9): [True: 596, False: 0]
  ------------------
  190|    596|        return pool->entropy_requested - pool->entropy;
  191|       |
  192|      0|    return 0;
  193|    596|}
ossl_rand_pool_bytes_needed:
  236|    596|{
  237|    596|    size_t bytes_needed;
  238|    596|    size_t entropy_needed = ossl_rand_pool_entropy_needed(pool);
  239|       |
  240|    596|    if (entropy_factor < 1) {
  ------------------
  |  Branch (240:9): [True: 0, False: 596]
  ------------------
  241|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  242|      0|        return 0;
  243|      0|    }
  244|       |
  245|    596|    bytes_needed = ENTROPY_TO_BYTES(entropy_needed, entropy_factor);
  ------------------
  |  |  161|    596|    (((bits) * (entropy_factor) + 7) / 8)
  ------------------
  246|       |
  247|    596|    if (bytes_needed > pool->max_len - pool->len) {
  ------------------
  |  Branch (247:9): [True: 0, False: 596]
  ------------------
  248|       |        /* not enough space left */
  249|      0|        ERR_raise_data(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW,
  ------------------
  |  |   80|      0|#define ERR_LIB_RAND 36
  ------------------
                      ERR_raise_data(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW,
  ------------------
  |  |   53|      0|#define RAND_R_RANDOM_POOL_OVERFLOW 125
  ------------------
  250|      0|            "entropy_factor=%u, entropy_needed=%zu, bytes_needed=%zu,"
  251|      0|            "pool->max_len=%zu, pool->len=%zu",
  252|      0|            entropy_factor, entropy_needed, bytes_needed,
  253|      0|            pool->max_len, pool->len);
  254|      0|        return 0;
  255|      0|    }
  256|       |
  257|    596|    if (pool->len < pool->min_len && bytes_needed < pool->min_len - pool->len)
  ------------------
  |  Branch (257:9): [True: 596, False: 0]
  |  Branch (257:38): [True: 0, False: 596]
  ------------------
  258|       |        /* to meet the min_len requirement */
  259|      0|        bytes_needed = pool->min_len - pool->len;
  260|       |
  261|       |    /*
  262|       |     * Make sure the buffer is large enough for the requested amount
  263|       |     * of data. This guarantees that existing code patterns where
  264|       |     * ossl_rand_pool_add_begin, ossl_rand_pool_add_end or ossl_rand_pool_add
  265|       |     * are used to collect entropy data without any error handling
  266|       |     * whatsoever, continue to be valid.
  267|       |     * Furthermore if the allocation here fails once, make sure that
  268|       |     * we don't fall back to a less secure or even blocking random source,
  269|       |     * as that could happen by the existing code patterns.
  270|       |     * This is not a concern for additional data, therefore that
  271|       |     * is not needed if rand_pool_grow fails in other places.
  272|       |     */
  273|    596|    if (!rand_pool_grow(pool, bytes_needed)) {
  ------------------
  |  Branch (273:9): [True: 0, False: 596]
  ------------------
  274|       |        /* persistent error for this pool */
  275|      0|        pool->max_len = pool->len = 0;
  276|      0|        return 0;
  277|      0|    }
  278|       |
  279|    596|    return bytes_needed;
  280|    596|}
ossl_rand_pool_add_begin:
  353|    596|{
  354|    596|    if (len == 0)
  ------------------
  |  Branch (354:9): [True: 0, False: 596]
  ------------------
  355|      0|        return NULL;
  356|       |
  357|    596|    if (len > pool->max_len - pool->len) {
  ------------------
  |  Branch (357:9): [True: 0, False: 596]
  ------------------
  358|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  359|      0|        return NULL;
  360|      0|    }
  361|       |
  362|    596|    if (pool->buffer == NULL) {
  ------------------
  |  Branch (362:9): [True: 0, False: 596]
  ------------------
  363|      0|        ERR_raise(ERR_LIB_RAND, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  364|      0|        return NULL;
  365|      0|    }
  366|       |
  367|       |    /*
  368|       |     * As long as the allocation request stays within the limits given
  369|       |     * by ossl_rand_pool_bytes_needed this rand_pool_grow below is guaranteed
  370|       |     * to succeed, thus no allocation happens.
  371|       |     * We have that only for cases when a pool is used to collect
  372|       |     * additional data. Then the buffer might need to grow here,
  373|       |     * and of course the caller is responsible to check the return
  374|       |     * value of this function.
  375|       |     */
  376|    596|    if (!rand_pool_grow(pool, len))
  ------------------
  |  Branch (376:9): [True: 0, False: 596]
  ------------------
  377|      0|        return NULL;
  378|       |
  379|    596|    return pool->buffer + pool->len;
  380|    596|}
ossl_rand_pool_add_end:
  392|    596|{
  393|    596|    if (len > pool->alloc_len - pool->len) {
  ------------------
  |  Branch (393:9): [True: 0, False: 596]
  ------------------
  394|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  395|      0|        return 0;
  396|      0|    }
  397|       |
  398|    596|    if (len > 0) {
  ------------------
  |  Branch (398:9): [True: 596, False: 0]
  ------------------
  399|    596|        pool->len += len;
  400|    596|        pool->entropy += entropy;
  401|    596|    }
  402|       |
  403|    596|    return 1;
  404|    596|}
ossl_rand_pool_adin_mix_in:
  419|    596|{
  420|    596|    if (adin == NULL || adin_len == 0)
  ------------------
  |  Branch (420:9): [True: 0, False: 596]
  |  Branch (420:25): [True: 0, False: 596]
  ------------------
  421|       |        /* Nothing to mix in -> success */
  422|      0|        return 1;
  423|       |
  424|    596|    if (pool->buffer == NULL) {
  ------------------
  |  Branch (424:9): [True: 0, False: 596]
  ------------------
  425|      0|        ERR_raise(ERR_LIB_RAND, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  426|      0|        return 0;
  427|      0|    }
  428|       |
  429|    596|    if (pool->len == 0) {
  ------------------
  |  Branch (429:9): [True: 0, False: 596]
  ------------------
  430|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_RANDOM_POOL_IS_EMPTY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  431|      0|        return 0;
  432|      0|    }
  433|       |
  434|    596|    if (adin != NULL && adin_len > 0) {
  ------------------
  |  Branch (434:9): [True: 596, False: 0]
  |  Branch (434:25): [True: 596, False: 0]
  ------------------
  435|    596|        size_t i;
  436|       |
  437|       |        /* xor the additional data into the pool */
  438|  5.36k|        for (i = 0; i < adin_len; ++i)
  ------------------
  |  Branch (438:21): [True: 4.76k, False: 596]
  ------------------
  439|  4.76k|            pool->buffer[i % pool->len] ^= adin[i];
  440|    596|    }
  441|       |
  442|    596|    return 1;
  443|    596|}
rand_pool.c:rand_pool_grow:
  197|  1.19k|{
  198|  1.19k|    if (len > pool->alloc_len - pool->len) {
  ------------------
  |  Branch (198:9): [True: 0, False: 1.19k]
  ------------------
  199|      0|        unsigned char *p;
  200|      0|        const size_t limit = pool->max_len / 2;
  201|      0|        size_t newlen = pool->alloc_len;
  202|       |
  203|      0|        if (pool->attached || len > pool->max_len - pool->len) {
  ------------------
  |  Branch (203:13): [True: 0, False: 0]
  |  Branch (203:31): [True: 0, False: 0]
  ------------------
  204|      0|            ERR_raise(ERR_LIB_RAND, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  205|      0|            return 0;
  206|      0|        }
  207|       |
  208|      0|        do
  209|      0|            newlen = newlen < limit ? newlen * 2 : pool->max_len;
  ------------------
  |  Branch (209:22): [True: 0, False: 0]
  ------------------
  210|      0|        while (len > newlen - pool->len);
  ------------------
  |  Branch (210:16): [True: 0, False: 0]
  ------------------
  211|       |
  212|      0|        if (pool->secure)
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            p = OPENSSL_secure_zalloc(newlen);
  ------------------
  |  |  142|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  214|      0|        else
  215|      0|            p = OPENSSL_zalloc(newlen);
  ------------------
  |  |  109|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  216|      0|        if (p == NULL)
  ------------------
  |  Branch (216:13): [True: 0, False: 0]
  ------------------
  217|      0|            return 0;
  218|      0|        memcpy(p, pool->buffer, pool->len);
  219|      0|        if (pool->secure)
  ------------------
  |  Branch (219:13): [True: 0, False: 0]
  ------------------
  220|      0|            OPENSSL_secure_clear_free(pool->buffer, pool->alloc_len);
  ------------------
  |  |  150|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  221|      0|        else
  222|      0|            OPENSSL_clear_free(pool->buffer, pool->alloc_len);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  223|      0|        pool->buffer = p;
  224|      0|        pool->alloc_len = newlen;
  225|      0|    }
  226|  1.19k|    return 1;
  227|  1.19k|}

rsa_ameth.c:rsa_pub_decode:
   77|   341k|{
   78|   341k|    const unsigned char *p;
   79|   341k|    int pklen;
   80|   341k|    X509_ALGOR *alg;
   81|   341k|    RSA *rsa = NULL;
   82|       |
   83|   341k|    if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, &alg, pubkey))
  ------------------
  |  Branch (83:9): [True: 0, False: 341k]
  ------------------
   84|      0|        return 0;
   85|   341k|    if ((rsa = d2i_RSAPublicKey(NULL, &p, pklen)) == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 341k]
  ------------------
   86|      0|        return 0;
   87|   341k|    if (!ossl_rsa_param_decode(rsa, alg)) {
  ------------------
  |  Branch (87:9): [True: 0, False: 341k]
  ------------------
   88|      0|        RSA_free(rsa);
   89|      0|        return 0;
   90|      0|    }
   91|       |
   92|   341k|    RSA_clear_flags(rsa, RSA_FLAG_TYPE_MASK);
  ------------------
  |  |  117|   341k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
   93|   341k|    switch (pkey->ameth->pkey_id) {
   94|   341k|    case EVP_PKEY_RSA:
  ------------------
  |  |   63|   341k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   341k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (94:5): [True: 341k, False: 0]
  ------------------
   95|   341k|        RSA_set_flags(rsa, RSA_FLAG_TYPE_RSA);
  ------------------
  |  |  118|   341k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
   96|   341k|        break;
   97|      0|    case EVP_PKEY_RSA_PSS:
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (97:5): [True: 0, False: 341k]
  ------------------
   98|      0|        RSA_set_flags(rsa, RSA_FLAG_TYPE_RSASSAPSS);
  ------------------
  |  |  119|      0|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
   99|      0|        break;
  100|      0|    default:
  ------------------
  |  Branch (100:5): [True: 0, False: 341k]
  ------------------
  101|       |        /* Leave the type bits zero */
  102|      0|        break;
  103|   341k|    }
  104|       |
  105|   341k|    if (!EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, rsa)) {
  ------------------
  |  Branch (105:9): [True: 0, False: 341k]
  ------------------
  106|      0|        RSA_free(rsa);
  107|      0|        return 0;
  108|      0|    }
  109|   341k|    return 1;
  110|   341k|}
rsa_ameth.c:int_rsa_free:
  201|   341k|{
  202|   341k|    RSA_free(pkey->pkey.rsa);
  203|   341k|}

rsa_asn1.c:rsa_cb:
   30|  1.02M|{
   31|  1.02M|    if (operation == ASN1_OP_NEW_PRE) {
  ------------------
  |  |  731|  1.02M|#define ASN1_OP_NEW_PRE 0
  ------------------
  |  Branch (31:9): [True: 341k, False: 682k]
  ------------------
   32|   341k|        *pval = (ASN1_VALUE *)RSA_new();
   33|   341k|        if (*pval != NULL)
  ------------------
  |  Branch (33:13): [True: 341k, False: 0]
  ------------------
   34|   341k|            return 2;
   35|      0|        return 0;
   36|   682k|    } else if (operation == ASN1_OP_FREE_PRE) {
  ------------------
  |  |  733|   682k|#define ASN1_OP_FREE_PRE 2
  ------------------
  |  Branch (36:16): [True: 0, False: 682k]
  ------------------
   37|      0|        RSA_free((RSA *)*pval);
   38|      0|        *pval = NULL;
   39|      0|        return 2;
   40|   682k|    } else if (operation == ASN1_OP_D2I_POST) {
  ------------------
  |  |  736|   682k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (40:16): [True: 341k, False: 341k]
  ------------------
   41|   341k|        if (((RSA *)*pval)->version != RSA_ASN1_VERSION_MULTI) {
  ------------------
  |  |   60|   341k|#define RSA_ASN1_VERSION_MULTI 1
  ------------------
  |  Branch (41:13): [True: 341k, False: 0]
  ------------------
   42|       |            /* not a multi-prime key, skip */
   43|   341k|            return 1;
   44|   341k|        }
   45|      0|        return (ossl_rsa_multip_calc_product((RSA *)*pval) == 1) ? 2 : 0;
  ------------------
  |  Branch (45:16): [True: 0, False: 0]
  ------------------
   46|   341k|    }
   47|   341k|    return 1;
   48|  1.02M|}

ossl_rsa_todata:
  262|   341k|{
  263|   341k|    int ret = 0;
  264|   341k|    const BIGNUM *rsa_d = NULL, *rsa_n = NULL, *rsa_e = NULL;
  265|   341k|    STACK_OF(BIGNUM_const) *factors = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   341k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  266|   341k|    STACK_OF(BIGNUM_const) *exps = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   341k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  267|   341k|    STACK_OF(BIGNUM_const) *coeffs = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   341k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  268|       |
  269|   341k|    if (rsa == NULL || factors == NULL || exps == NULL || coeffs == NULL)
  ------------------
  |  Branch (269:9): [True: 0, False: 341k]
  |  Branch (269:24): [True: 0, False: 341k]
  |  Branch (269:43): [True: 0, False: 341k]
  |  Branch (269:59): [True: 0, False: 341k]
  ------------------
  270|      0|        goto err;
  271|       |
  272|   341k|    RSA_get0_key(rsa, &rsa_n, &rsa_e, &rsa_d);
  273|   341k|    ossl_rsa_get0_all_params(rsa, factors, exps, coeffs);
  274|       |
  275|   341k|    if (!ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_RSA_N, rsa_n)
  ------------------
  |  |  493|   341k|# define OSSL_PKEY_PARAM_RSA_N "n"
  ------------------
  |  Branch (275:9): [True: 0, False: 341k]
  ------------------
  276|   341k|        || !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_RSA_E, rsa_e))
  ------------------
  |  |  468|   341k|# define OSSL_PKEY_PARAM_RSA_E "e"
  ------------------
  |  Branch (276:12): [True: 0, False: 341k]
  ------------------
  277|      0|        goto err;
  278|       |
  279|       |    /* Check private key data integrity */
  280|   341k|    if (include_private && rsa_d != NULL) {
  ------------------
  |  Branch (280:9): [True: 341k, False: 0]
  |  Branch (280:28): [True: 0, False: 341k]
  ------------------
  281|       |
  282|      0|        if (!ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_RSA_D,
  ------------------
  |  |  464|      0|# define OSSL_PKEY_PARAM_RSA_D "d"
  ------------------
  |  Branch (282:13): [True: 0, False: 0]
  ------------------
  283|      0|                rsa_d)
  284|      0|            || !ossl_param_build_set_multi_key_bn(bld, params,
  ------------------
  |  Branch (284:16): [True: 0, False: 0]
  ------------------
  285|      0|                ossl_rsa_mp_factor_names,
  286|      0|                factors)
  287|      0|            || !ossl_param_build_set_multi_key_bn(bld, params,
  ------------------
  |  Branch (287:16): [True: 0, False: 0]
  ------------------
  288|      0|                ossl_rsa_mp_exp_names, exps)
  289|      0|            || !ossl_param_build_set_multi_key_bn(bld, params,
  ------------------
  |  Branch (289:16): [True: 0, False: 0]
  ------------------
  290|      0|                ossl_rsa_mp_coeff_names,
  291|      0|                coeffs))
  292|      0|            goto err;
  293|      0|    }
  294|       |
  295|       |#if defined(FIPS_MODULE) && !defined(OPENSSL_NO_ACVP_TESTS)
  296|       |    /* The acvp test results are not meant for export so check for bld == NULL */
  297|       |    if (bld == NULL)
  298|       |        ossl_rsa_acvp_test_get_params(rsa, params);
  299|       |#endif
  300|   341k|    ret = 1;
  301|   341k|err:
  302|   341k|    sk_BIGNUM_const_free(factors);
  303|   341k|    sk_BIGNUM_const_free(exps);
  304|   341k|    sk_BIGNUM_const_free(coeffs);
  305|   341k|    return ret;
  306|   341k|}
ossl_rsa_is_foreign:
  452|   341k|{
  453|   341k|#ifndef FIPS_MODULE
  454|   341k|    if (RSA_get_method(rsa) != RSA_PKCS1_OpenSSL())
  ------------------
  |  Branch (454:9): [True: 0, False: 341k]
  ------------------
  455|      0|        return 1;
  456|   341k|#endif
  457|   341k|    return 0;
  458|   341k|}
ossl_rsa_param_decode:
  653|   341k|{
  654|   341k|    RSA_PSS_PARAMS *pss;
  655|   341k|    const ASN1_OBJECT *algoid;
  656|   341k|    const void *algp;
  657|   341k|    int algptype;
  658|       |
  659|   341k|    X509_ALGOR_get0(&algoid, &algptype, &algp, alg);
  660|   341k|    if (OBJ_obj2nid(algoid) != EVP_PKEY_RSA_PSS)
  ------------------
  |  |   65|   341k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|   341k|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (660:9): [True: 341k, False: 0]
  ------------------
  661|   341k|        return 1;
  662|      0|    if (algptype == V_ASN1_UNDEF)
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
  |  Branch (662:9): [True: 0, False: 0]
  ------------------
  663|      0|        return 1;
  664|      0|    if (algptype != V_ASN1_SEQUENCE) {
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (664:9): [True: 0, False: 0]
  ------------------
  665|      0|        ERR_raise(ERR_LIB_RSA, RSA_R_INVALID_PSS_PARAMETERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  666|      0|        return 0;
  667|      0|    }
  668|      0|    if ((pss = ossl_rsa_pss_decode(alg)) == NULL
  ------------------
  |  Branch (668:9): [True: 0, False: 0]
  ------------------
  669|      0|        || !ossl_rsa_set0_pss_params(rsa, pss)) {
  ------------------
  |  Branch (669:12): [True: 0, False: 0]
  ------------------
  670|      0|        RSA_PSS_PARAMS_free(pss);
  671|      0|        return 0;
  672|      0|    }
  673|      0|    if (!ossl_rsa_sync_to_pss_params_30(rsa))
  ------------------
  |  Branch (673:9): [True: 0, False: 0]
  ------------------
  674|      0|        return 0;
  675|      0|    return 1;
  676|      0|}

RSA_bits:
   24|   341k|{
   25|   341k|    return BN_num_bits(r->n);
   26|   341k|}
RSA_size:
   29|   341k|{
   30|   341k|    return BN_num_bytes(r->n);
  ------------------
  |  |  188|   341k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
   31|   341k|}

ossl_err_load_RSA_strings:
  158|      1|{
  159|      1|#ifndef OPENSSL_NO_ERR
  160|      1|    if (ERR_reason_error_string(RSA_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (160:9): [True: 1, False: 0]
  ------------------
  161|      1|        ERR_load_strings_const(RSA_str_reasons);
  162|      1|#endif
  163|      1|    return 1;
  164|      1|}

RSA_new:
   34|   341k|{
   35|       |    return rsa_new_intern(NULL);
   36|   341k|}
RSA_get_method:
   39|   341k|{
   40|   341k|    return rsa->meth;
   41|   341k|}
RSA_free:
  118|  1.02M|{
  119|  1.02M|    int i;
  120|       |
  121|  1.02M|    if (r == NULL)
  ------------------
  |  Branch (121:9): [True: 341k, False: 682k]
  ------------------
  122|   341k|        return;
  123|       |
  124|   682k|    CRYPTO_DOWN_REF(&r->references, &i);
  125|   682k|    REF_PRINT_COUNT("RSA", i, r);
  ------------------
  |  |  301|   682k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   682k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   682k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   682k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|   682k|    if (i > 0)
  ------------------
  |  Branch (126:9): [True: 341k, False: 341k]
  ------------------
  127|   341k|        return;
  128|   341k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   341k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 341k]
  |  |  ------------------
  ------------------
  129|       |
  130|   341k|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (130:9): [True: 341k, False: 0]
  |  Branch (130:28): [True: 341k, False: 0]
  ------------------
  131|   341k|        r->meth->finish(r);
  132|       |
  133|   341k|#ifndef FIPS_MODULE
  134|   341k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, r, &r->ex_data);
  ------------------
  |  |  260|   341k|#define CRYPTO_EX_INDEX_RSA 9
  ------------------
  135|   341k|#endif
  136|       |
  137|   341k|    CRYPTO_THREAD_lock_free(r->lock);
  138|   341k|    CRYPTO_FREE_REF(&r->references);
  139|       |
  140|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
  141|       |    BN_clear_free(r->n);
  142|       |    BN_clear_free(r->e);
  143|       |#else
  144|   341k|    BN_free(r->n);
  145|   341k|    BN_free(r->e);
  146|   341k|#endif
  147|   341k|    BN_clear_free(r->d);
  148|   341k|    BN_clear_free(r->p);
  149|   341k|    BN_clear_free(r->q);
  150|   341k|    BN_clear_free(r->dmp1);
  151|   341k|    BN_clear_free(r->dmq1);
  152|   341k|    BN_clear_free(r->iqmp);
  153|       |
  154|       |#if defined(FIPS_MODULE) && !defined(OPENSSL_NO_ACVP_TESTS)
  155|       |    ossl_rsa_acvp_test_free(r->acvp_test);
  156|       |#endif
  157|       |
  158|   341k|#ifndef FIPS_MODULE
  159|   341k|    RSA_PSS_PARAMS_free(r->pss);
  160|   341k|    sk_RSA_PRIME_INFO_pop_free(r->prime_infos, ossl_rsa_multip_info_free);
  161|   341k|#endif
  162|   341k|    ossl_rsa_free_blinding(r);
  163|   341k|    OPENSSL_free(r);
  ------------------
  |  |  132|   341k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  164|   341k|}
RSA_up_ref:
  167|   341k|{
  168|   341k|    int i;
  169|       |
  170|   341k|    if (CRYPTO_UP_REF(&r->references, &i) <= 0)
  ------------------
  |  Branch (170:9): [True: 0, False: 341k]
  ------------------
  171|      0|        return 0;
  172|       |
  173|   341k|    REF_PRINT_COUNT("RSA", i, r);
  ------------------
  |  |  301|   341k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   341k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   341k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   341k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  174|   341k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   341k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 341k]
  |  |  ------------------
  ------------------
  175|   341k|    return i > 1 ? 1 : 0;
  ------------------
  |  Branch (175:12): [True: 341k, False: 0]
  ------------------
  176|   341k|}
ossl_rsa_set0_libctx:
  184|   341k|{
  185|   341k|    r->libctx = libctx;
  186|   341k|}
ossl_ifc_ffc_compute_security_bits:
  300|   341k|{
  301|   341k|    uint64_t x;
  302|   341k|    uint32_t lx;
  303|   341k|    uint16_t y, cap;
  304|       |
  305|       |    /*
  306|       |     * Look for common values as listed in standards.
  307|       |     * These values are not exactly equal to the results from the formulae in
  308|       |     * the standards but are defined to be canonical.
  309|       |     */
  310|   341k|    switch (n) {
  ------------------
  |  Branch (310:13): [True: 341k, False: 0]
  ------------------
  311|  99.9k|    case 2048: /* SP 800-56B rev 2 Appendix D and FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (311:5): [True: 99.9k, False: 241k]
  ------------------
  312|  99.9k|        return 112;
  313|     31|    case 3072: /* SP 800-56B rev 2 Appendix D and FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (313:5): [True: 31, False: 341k]
  ------------------
  314|     31|        return 128;
  315|   241k|    case 4096: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (315:5): [True: 241k, False: 100k]
  ------------------
  316|   241k|        return 152;
  317|      7|    case 6144: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (317:5): [True: 7, False: 341k]
  ------------------
  318|      7|        return 176;
  319|      0|    case 7680: /* FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (319:5): [True: 0, False: 341k]
  ------------------
  320|      0|        return 192;
  321|     69|    case 8192: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (321:5): [True: 69, False: 341k]
  ------------------
  322|     69|        return 200;
  323|      0|    case 15360: /* FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (323:5): [True: 0, False: 341k]
  ------------------
  324|      0|        return 256;
  325|   341k|    }
  326|       |
  327|       |    /*
  328|       |     * The first incorrect result (i.e. not accurate or off by one low) occurs
  329|       |     * for n = 699668.  The true value here is 1200.  Instead of using this n
  330|       |     * as the check threshold, the smallest n such that the correct result is
  331|       |     * 1200 is used instead.
  332|       |     */
  333|      0|    if (n >= 687737)
  ------------------
  |  Branch (333:9): [True: 0, False: 0]
  ------------------
  334|      0|        return 1200;
  335|      0|    if (n < 8)
  ------------------
  |  Branch (335:9): [True: 0, False: 0]
  ------------------
  336|      0|        return 0;
  337|       |
  338|       |    /*
  339|       |     * To ensure that the output is non-decreasing with respect to n,
  340|       |     * a cap needs to be applied to the two values where the function over
  341|       |     * estimates the strength (according to the above fast path).
  342|       |     */
  343|      0|    if (n <= 7680)
  ------------------
  |  Branch (343:9): [True: 0, False: 0]
  ------------------
  344|      0|        cap = 192;
  345|      0|    else if (n <= 15360)
  ------------------
  |  Branch (345:14): [True: 0, False: 0]
  ------------------
  346|      0|        cap = 256;
  347|      0|    else
  348|      0|        cap = 1200;
  349|       |
  350|      0|    x = n * (uint64_t)log_2;
  351|      0|    lx = ilog_e(x);
  352|      0|    y = (uint16_t)((mul2(c1_923, icbrt64(mul2(mul2(x, lx), lx))) - c4_690)
  353|      0|        / log_2);
  354|      0|    y = (y + 4) & ~7;
  355|      0|    if (y > cap)
  ------------------
  |  Branch (355:9): [True: 0, False: 0]
  ------------------
  356|      0|        y = cap;
  357|      0|    return y;
  358|      0|}
RSA_security_bits:
  361|   341k|{
  362|   341k|    int bits = BN_num_bits(rsa->n);
  363|       |
  364|   341k|#ifndef FIPS_MODULE
  365|   341k|    if (rsa->version == RSA_ASN1_VERSION_MULTI) {
  ------------------
  |  |   60|   341k|#define RSA_ASN1_VERSION_MULTI 1
  ------------------
  |  Branch (365:9): [True: 0, False: 341k]
  ------------------
  366|       |        /* This ought to mean that we have private key at hand. */
  367|      0|        int ex_primes = sk_RSA_PRIME_INFO_num(rsa->prime_infos);
  368|       |
  369|      0|        if (ex_primes <= 0 || (ex_primes + 2) > ossl_rsa_multip_cap(bits))
  ------------------
  |  Branch (369:13): [True: 0, False: 0]
  |  Branch (369:31): [True: 0, False: 0]
  ------------------
  370|      0|            return 0;
  371|      0|    }
  372|   341k|#endif
  373|   341k|    return ossl_ifc_ffc_compute_security_bits(bits);
  374|   341k|}
RSA_get0_key:
  531|   341k|{
  532|   341k|    if (n != NULL)
  ------------------
  |  Branch (532:9): [True: 341k, False: 0]
  ------------------
  533|   341k|        *n = r->n;
  534|   341k|    if (e != NULL)
  ------------------
  |  Branch (534:9): [True: 341k, False: 0]
  ------------------
  535|   341k|        *e = r->e;
  536|   341k|    if (d != NULL)
  ------------------
  |  Branch (536:9): [True: 341k, False: 0]
  ------------------
  537|   341k|        *d = r->d;
  538|   341k|}
RSA_get0_n:
  621|  1.02M|{
  622|  1.02M|    return r->n;
  623|  1.02M|}
RSA_get0_d:
  631|   341k|{
  632|   341k|    return r->d;
  633|   341k|}
RSA_get0_p:
  636|   682k|{
  637|   682k|    return r->p;
  638|   682k|}
ossl_rsa_get0_pss_params_30:
  683|   341k|{
  684|   341k|    return &r->pss_params;
  685|   341k|}
RSA_clear_flags:
  688|   341k|{
  689|   341k|    r->flags &= ~flags;
  690|   341k|}
RSA_test_flags:
  693|  1.02M|{
  694|  1.02M|    return r->flags & flags;
  695|  1.02M|}
RSA_set_flags:
  698|   341k|{
  699|   341k|    r->flags |= flags;
  700|   341k|}
ossl_rsa_get0_all_params:
  847|   682k|{
  848|   682k|#ifndef FIPS_MODULE
  849|   682k|    RSA_PRIME_INFO *pinfo;
  850|   682k|    int i, pnum;
  851|   682k|#endif
  852|       |
  853|   682k|    if (r == NULL)
  ------------------
  |  Branch (853:9): [True: 0, False: 682k]
  ------------------
  854|      0|        return 0;
  855|       |
  856|       |    /* If |p| is NULL, there are no CRT parameters */
  857|   682k|    if (RSA_get0_p(r) == NULL)
  ------------------
  |  Branch (857:9): [True: 682k, False: 0]
  ------------------
  858|   682k|        return 1;
  859|       |
  860|      0|    sk_BIGNUM_const_push(primes, RSA_get0_p(r));
  861|      0|    sk_BIGNUM_const_push(primes, RSA_get0_q(r));
  862|      0|    sk_BIGNUM_const_push(exps, RSA_get0_dmp1(r));
  863|      0|    sk_BIGNUM_const_push(exps, RSA_get0_dmq1(r));
  864|      0|    sk_BIGNUM_const_push(coeffs, RSA_get0_iqmp(r));
  865|       |
  866|      0|#ifndef FIPS_MODULE
  867|      0|    pnum = RSA_get_multi_prime_extra_count(r);
  868|      0|    for (i = 0; i < pnum; i++) {
  ------------------
  |  Branch (868:17): [True: 0, False: 0]
  ------------------
  869|      0|        pinfo = sk_RSA_PRIME_INFO_value(r->prime_infos, i);
  870|      0|        sk_BIGNUM_const_push(primes, pinfo->r);
  871|      0|        sk_BIGNUM_const_push(exps, pinfo->d);
  872|      0|        sk_BIGNUM_const_push(coeffs, pinfo->t);
  873|      0|    }
  874|      0|#endif
  875|       |
  876|      0|    return 1;
  877|   682k|}
ossl_rsa_check_factors:
  881|   341k|{
  882|   341k|    int valid = 0;
  883|   341k|    int n, i, bits;
  884|   341k|    STACK_OF(BIGNUM_const) *factors = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   341k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  885|   341k|    STACK_OF(BIGNUM_const) *exps = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   341k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  886|   341k|    STACK_OF(BIGNUM_const) *coeffs = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   341k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  887|       |
  888|   341k|    if (factors == NULL || exps == NULL || coeffs == NULL)
  ------------------
  |  Branch (888:9): [True: 0, False: 341k]
  |  Branch (888:28): [True: 0, False: 341k]
  |  Branch (888:44): [True: 0, False: 341k]
  ------------------
  889|      0|        goto done;
  890|       |
  891|       |    /*
  892|       |     * Simple sanity check for RSA key. All RSA key parameters
  893|       |     * must be less-than/equal-to RSA parameter n.
  894|       |     */
  895|   341k|    ossl_rsa_get0_all_params(r, factors, exps, coeffs);
  896|   341k|    n = safe_BN_num_bits(RSA_get0_n(r));
  ------------------
  |  |  879|   341k|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (879:32): [True: 0, False: 341k]
  |  |  ------------------
  ------------------
  897|       |
  898|   341k|    if (safe_BN_num_bits(RSA_get0_d(r)) > n)
  ------------------
  |  |  879|   341k|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (879:32): [True: 341k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (898:9): [True: 0, False: 341k]
  ------------------
  899|      0|        goto done;
  900|       |
  901|   341k|    for (i = 0; i < sk_BIGNUM_const_num(exps); i++) {
  ------------------
  |  Branch (901:17): [True: 0, False: 341k]
  ------------------
  902|      0|        bits = safe_BN_num_bits(sk_BIGNUM_const_value(exps, i));
  ------------------
  |  |  879|      0|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (879:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  903|      0|        if (bits > n)
  ------------------
  |  Branch (903:13): [True: 0, False: 0]
  ------------------
  904|      0|            goto done;
  905|      0|    }
  906|       |
  907|   341k|    for (i = 0; i < sk_BIGNUM_const_num(factors); i++) {
  ------------------
  |  Branch (907:17): [True: 0, False: 341k]
  ------------------
  908|      0|        bits = safe_BN_num_bits(sk_BIGNUM_const_value(factors, i));
  ------------------
  |  |  879|      0|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (879:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  909|      0|        if (bits > n)
  ------------------
  |  Branch (909:13): [True: 0, False: 0]
  ------------------
  910|      0|            goto done;
  911|      0|    }
  912|       |
  913|   341k|    for (i = 0; i < sk_BIGNUM_const_num(coeffs); i++) {
  ------------------
  |  Branch (913:17): [True: 0, False: 341k]
  ------------------
  914|      0|        bits = safe_BN_num_bits(sk_BIGNUM_const_value(coeffs, i));
  ------------------
  |  |  879|      0|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (879:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  915|      0|        if (bits > n)
  ------------------
  |  Branch (915:13): [True: 0, False: 0]
  ------------------
  916|      0|            goto done;
  917|      0|    }
  918|       |
  919|   341k|    valid = 1;
  920|       |
  921|   341k|done:
  922|   341k|    sk_BIGNUM_const_free(factors);
  923|   341k|    sk_BIGNUM_const_free(exps);
  924|   341k|    sk_BIGNUM_const_free(coeffs);
  925|       |
  926|   341k|    return valid;
  927|   341k|}
rsa_lib.c:rsa_new_intern:
   73|   341k|{
   74|   341k|    RSA *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   341k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|       |
   76|   341k|    if (ret == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 341k]
  ------------------
   77|      0|        return NULL;
   78|       |
   79|   341k|    ret->lock = CRYPTO_THREAD_lock_new();
   80|   341k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (80:9): [True: 0, False: 341k]
  ------------------
   81|      0|        ERR_raise(ERR_LIB_RSA, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   82|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   83|      0|        return NULL;
   84|      0|    }
   85|       |
   86|   341k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 341k]
  ------------------
   87|      0|        CRYPTO_THREAD_lock_free(ret->lock);
   88|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   89|      0|        return NULL;
   90|      0|    }
   91|       |
   92|   341k|    ret->blindings_sa = ossl_rsa_alloc_blinding();
   93|   341k|    if (ret->blindings_sa == NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 341k]
  ------------------
   94|      0|        goto err;
   95|       |
   96|   341k|    ret->libctx = libctx;
   97|   341k|    ret->meth = RSA_get_default_method();
   98|   341k|    ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
  ------------------
  |  |  475|   341k|#define RSA_FLAG_NON_FIPS_ALLOW 0x0400
  ------------------
   99|   341k|#ifndef FIPS_MODULE
  100|   341k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data)) {
  ------------------
  |  |  260|   341k|#define CRYPTO_EX_INDEX_RSA 9
  ------------------
  |  Branch (100:9): [True: 0, False: 341k]
  ------------------
  101|      0|        goto err;
  102|      0|    }
  103|   341k|#endif
  104|       |
  105|   341k|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (105:9): [True: 341k, False: 0]
  |  Branch (105:38): [True: 0, False: 341k]
  ------------------
  106|      0|        ERR_raise(ERR_LIB_RSA, ERR_R_INIT_FAIL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  107|      0|        goto err;
  108|      0|    }
  109|       |
  110|   341k|    return ret;
  111|       |
  112|      0|err:
  113|      0|    RSA_free(ret);
  114|       |    return NULL;
  115|   341k|}

RSA_get_default_method:
   92|   341k|{
   93|   341k|    return default_RSA_meth;
   94|   341k|}
RSA_PKCS1_OpenSSL:
   97|   341k|{
   98|   341k|    return &rsa_pkcs1_ossl_meth;
   99|   341k|}
ossl_rsa_free_blinding:
  243|   341k|{
  244|   341k|    SPARSE_ARRAY_OF(BN_BLINDING) *blindings = rsa->blindings_sa;
  ------------------
  |  |   21|   341k|#define SPARSE_ARRAY_OF(type) struct sparse_array_st_##type
  ------------------
  245|       |
  246|       |    ossl_sa_BN_BLINDING_doall_arg(blindings, free_bn_blinding, NULL);
  247|   341k|    ossl_sa_BN_BLINDING_free(blindings);
  248|   341k|}
ossl_rsa_alloc_blinding:
  251|   341k|{
  252|   341k|    return ossl_sa_BN_BLINDING_new();
  253|   341k|}
rsa_ossl.c:rsa_ossl_init:
 1160|   341k|{
 1161|   341k|    rsa->flags |= RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE;
  ------------------
  |  |   65|   341k|#define RSA_FLAG_CACHE_PUBLIC 0x0002
  ------------------
                  rsa->flags |= RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE;
  ------------------
  |  |   66|   341k|#define RSA_FLAG_CACHE_PRIVATE 0x0004
  ------------------
 1162|   341k|    return 1;
 1163|   341k|}
rsa_ossl.c:rsa_ossl_finish:
 1166|   341k|{
 1167|   341k|#ifndef FIPS_MODULE
 1168|   341k|    int i;
 1169|   341k|    RSA_PRIME_INFO *pinfo;
 1170|       |
 1171|   341k|    for (i = 0; i < sk_RSA_PRIME_INFO_num(rsa->prime_infos); i++) {
  ------------------
  |  Branch (1171:17): [True: 0, False: 341k]
  ------------------
 1172|      0|        pinfo = sk_RSA_PRIME_INFO_value(rsa->prime_infos, i);
 1173|      0|        BN_MONT_CTX_free(pinfo->m);
 1174|      0|    }
 1175|   341k|#endif
 1176|       |
 1177|   341k|    BN_MONT_CTX_free(rsa->_method_mod_n);
 1178|   341k|    BN_MONT_CTX_free(rsa->_method_mod_p);
 1179|   341k|    BN_MONT_CTX_free(rsa->_method_mod_q);
 1180|   341k|    return 1;
 1181|   341k|}

ossl_self_test_set_callback_new:
   35|    809|{
   36|    809|    SELF_TEST_CB *stcb;
   37|       |
   38|    809|    stcb = OPENSSL_zalloc(sizeof(*stcb));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|    809|    return stcb;
   40|    809|}
ossl_self_test_set_callback_free:
   43|    808|{
   44|    808|    OPENSSL_free(stcb);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|    808|}

SHA256_Init:
   43|  12.8k|{
   44|  12.8k|    memset(c, 0, sizeof(*c));
   45|  12.8k|    c->h[0] = 0x6a09e667UL;
   46|  12.8k|    c->h[1] = 0xbb67ae85UL;
   47|  12.8k|    c->h[2] = 0x3c6ef372UL;
   48|  12.8k|    c->h[3] = 0xa54ff53aUL;
   49|  12.8k|    c->h[4] = 0x510e527fUL;
   50|  12.8k|    c->h[5] = 0x9b05688cUL;
   51|  12.8k|    c->h[6] = 0x1f83d9abUL;
   52|  12.8k|    c->h[7] = 0x5be0cd19UL;
   53|  12.8k|    c->md_len = SHA256_DIGEST_LENGTH;
  ------------------
  |  |   87|  12.8k|#define SHA256_DIGEST_LENGTH 32
  ------------------
   54|  12.8k|    return 1;
   55|  12.8k|}

ossl_sha3_reset:
   30|  44.0k|{
   31|       |#if defined(__s390x__) && defined(OPENSSL_CPUID_OBJ)
   32|       |    if (!(OPENSSL_s390xcap_P.stfle[1] & S390X_CAPBIT(S390X_MSA12)))
   33|       |#endif
   34|  44.0k|        memset(ctx->A, 0, sizeof(ctx->A));
   35|  44.0k|    ctx->bufsz = 0;
   36|  44.0k|    ctx->xof_state = XOF_STATE_INIT;
  ------------------
  |  |   35|  44.0k|#define XOF_STATE_INIT 0
  ------------------
   37|  44.0k|}
ossl_sha3_init:
   40|  8.38k|{
   41|  8.38k|    size_t bsz = SHA3_BLOCKSIZE(bitlen);
  ------------------
  |  |   21|  8.38k|#define SHA3_BLOCKSIZE(bitlen) (KECCAK1600_WIDTH - bitlen * 2) / 8
  |  |  ------------------
  |  |  |  |   18|  8.38k|#define KECCAK1600_WIDTH 1600
  |  |  ------------------
  ------------------
   42|       |
   43|  8.38k|    if (bsz <= sizeof(ctx->buf)) {
  ------------------
  |  Branch (43:9): [True: 8.38k, False: 0]
  ------------------
   44|  8.38k|        ossl_sha3_reset(ctx);
   45|  8.38k|        ctx->block_size = bsz;
   46|  8.38k|        ctx->md_size = bitlen / 8;
   47|  8.38k|        ctx->pad = pad;
   48|  8.38k|        return 1;
   49|  8.38k|    }
   50|       |
   51|      0|    return 0;
   52|  8.38k|}
ossl_keccak_init:
   55|  4.19k|{
   56|  4.19k|    int ret = ossl_sha3_init(ctx, pad, bitlen);
   57|       |
   58|  4.19k|    if (ret)
  ------------------
  |  Branch (58:9): [True: 4.19k, False: 0]
  ------------------
   59|  4.19k|        ctx->md_size = mdlen / 8;
   60|  4.19k|    return ret;
   61|  4.19k|}
ossl_sha3_absorb:
   68|  41.9k|{
   69|  41.9k|    const size_t bsz = ctx->block_size;
   70|  41.9k|    size_t num, rem;
   71|       |
   72|  41.9k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|  41.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 41.9k]
  |  |  ------------------
  ------------------
   73|      0|        return 1;
   74|       |
   75|  41.9k|    if (!(ctx->xof_state == XOF_STATE_INIT || ctx->xof_state == XOF_STATE_ABSORB))
  ------------------
  |  |   35|  83.8k|#define XOF_STATE_INIT 0
  ------------------
                  if (!(ctx->xof_state == XOF_STATE_INIT || ctx->xof_state == XOF_STATE_ABSORB))
  ------------------
  |  |   36|  6.28k|#define XOF_STATE_ABSORB 1
  ------------------
  |  Branch (75:11): [True: 35.6k, False: 6.28k]
  |  Branch (75:47): [True: 6.28k, False: 0]
  ------------------
   76|      0|        return 0;
   77|       |
   78|       |    /* Is there anything in the buffer already ? */
   79|  41.9k|    if ((num = ctx->bufsz) != 0) {
  ------------------
  |  Branch (79:9): [True: 6.28k, False: 35.6k]
  ------------------
   80|       |        /* Calculate how much space is left in the buffer */
   81|  6.28k|        rem = bsz - num;
   82|       |        /* If the new input does not fill the buffer then just add it */
   83|  6.28k|        if (len < rem) {
  ------------------
  |  Branch (83:13): [True: 2.09k, False: 4.19k]
  ------------------
   84|  2.09k|            memcpy(ctx->buf + num, inp, len);
   85|  2.09k|            ctx->bufsz += len;
   86|  2.09k|            return 1;
   87|  2.09k|        }
   88|       |        /* otherwise fill up the buffer and absorb the buffer */
   89|  4.19k|        memcpy(ctx->buf + num, inp, rem);
   90|       |        /* Update the input pointer */
   91|  4.19k|        inp += rem;
   92|  4.19k|        len -= rem;
   93|  4.19k|        ctx->meth.absorb(ctx, ctx->buf, bsz);
   94|  4.19k|        ctx->bufsz = 0;
   95|  4.19k|        ctx->xof_state = XOF_STATE_ABSORB;
  ------------------
  |  |   36|  4.19k|#define XOF_STATE_ABSORB 1
  ------------------
   96|  4.19k|    }
   97|       |    /* Absorb the input - rem = leftover part of the input < blocksize) */
   98|  39.8k|    rem = ctx->meth.absorb(ctx, inp, len);
   99|  39.8k|    if (len >= bsz)
  ------------------
  |  Branch (99:9): [True: 6.28k, False: 33.5k]
  ------------------
  100|  6.28k|        ctx->xof_state = XOF_STATE_ABSORB;
  ------------------
  |  |   36|  6.28k|#define XOF_STATE_ABSORB 1
  ------------------
  101|       |    /* Copy the leftover bit of the input into the buffer */
  102|  39.8k|    if (ossl_likely(rem > 0)) {
  ------------------
  |  |   22|  39.8k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 39.8k, False: 0]
  |  |  ------------------
  ------------------
  103|  39.8k|        memcpy(ctx->buf, inp + len - rem, rem);
  104|  39.8k|        ctx->bufsz = rem;
  105|  39.8k|    }
  106|  39.8k|    return 1;
  107|  41.9k|}
ossl_sha3_final:
  115|  16.7k|{
  116|  16.7k|    int ret;
  117|       |
  118|  16.7k|    if (ctx->xof_state == XOF_STATE_SQUEEZE
  ------------------
  |  |   38|  33.5k|#define XOF_STATE_SQUEEZE 3
  ------------------
  |  Branch (118:9): [True: 0, False: 16.7k]
  ------------------
  119|  16.7k|        || ctx->xof_state == XOF_STATE_FINAL)
  ------------------
  |  |   37|  16.7k|#define XOF_STATE_FINAL 2
  ------------------
  |  Branch (119:12): [True: 0, False: 16.7k]
  ------------------
  120|      0|        return 0;
  121|  16.7k|    if (outlen == 0)
  ------------------
  |  Branch (121:9): [True: 0, False: 16.7k]
  ------------------
  122|      0|        return 1;
  123|       |
  124|  16.7k|    ret = ctx->meth.final(ctx, out, outlen);
  125|  16.7k|    ctx->xof_state = XOF_STATE_FINAL;
  ------------------
  |  |   37|  16.7k|#define XOF_STATE_FINAL 2
  ------------------
  126|  16.7k|    return ret;
  127|  16.7k|}
ossl_sha3_squeeze:
  131|  56.7k|{
  132|  56.7k|    int ret = 0;
  133|       |
  134|  56.7k|    if (ctx->xof_state == XOF_STATE_FINAL)
  ------------------
  |  |   37|  56.7k|#define XOF_STATE_FINAL 2
  ------------------
  |  Branch (134:9): [True: 0, False: 56.7k]
  ------------------
  135|      0|        return 0;
  136|  56.7k|    ret = ctx->meth.squeeze(ctx, out, outlen);
  137|  56.7k|    ctx->xof_state = XOF_STATE_SQUEEZE;
  ------------------
  |  |   38|  56.7k|#define XOF_STATE_SQUEEZE 3
  ------------------
  138|  56.7k|    return ret;
  139|  56.7k|}
ossl_sha3_absorb_default:
  143|  44.0k|{
  144|  44.0k|    return SHA3_absorb(ctx->A, inp, len, ctx->block_size);
  145|  44.0k|}
ossl_sha3_final_default:
  152|  16.7k|{
  153|  16.7k|    size_t bsz = ctx->block_size;
  154|  16.7k|    size_t num = ctx->bufsz;
  155|       |
  156|       |    /*
  157|       |     * Pad the data with 10*1. Note that |num| can be |bsz - 1|
  158|       |     * in which case both byte operations below are performed on
  159|       |     * same byte...
  160|       |     */
  161|  16.7k|    memset(ctx->buf + num, 0, bsz - num);
  162|  16.7k|    ctx->buf[num] = ctx->pad;
  163|  16.7k|    ctx->buf[bsz - 1] |= 0x80;
  164|       |
  165|  16.7k|    (void)SHA3_absorb(ctx->A, ctx->buf, bsz, bsz);
  166|       |
  167|  16.7k|    SHA3_squeeze(ctx->A, out, outlen, bsz, 0);
  168|  16.7k|    return 1;
  169|  16.7k|}
ossl_shake_squeeze_default:
  182|  56.7k|{
  183|  56.7k|    size_t bsz = ctx->block_size;
  184|  56.7k|    size_t num = ctx->bufsz;
  185|  56.7k|    size_t len;
  186|  56.7k|    int next = 1;
  187|       |
  188|       |    /*
  189|       |     * On the first squeeze call, finish the absorb process,
  190|       |     * by adding the trailing padding and then doing
  191|       |     * a final absorb.
  192|       |     */
  193|  56.7k|    if (ctx->xof_state != XOF_STATE_SQUEEZE) {
  ------------------
  |  |   38|  56.7k|#define XOF_STATE_SQUEEZE 3
  ------------------
  |  Branch (193:9): [True: 18.8k, False: 37.9k]
  ------------------
  194|       |        /*
  195|       |         * Pad the data with 10*1. Note that |num| can be |bsz - 1|
  196|       |         * in which case both byte operations below are performed on
  197|       |         * same byte...
  198|       |         */
  199|  18.8k|        memset(ctx->buf + num, 0, bsz - num);
  200|  18.8k|        ctx->buf[num] = ctx->pad;
  201|  18.8k|        ctx->buf[bsz - 1] |= 0x80;
  202|  18.8k|        (void)SHA3_absorb(ctx->A, ctx->buf, bsz, bsz);
  203|  18.8k|        num = ctx->bufsz = 0;
  204|  18.8k|        next = 0;
  205|  18.8k|    }
  206|       |
  207|       |    /*
  208|       |     * Step 1. Consume any bytes left over from a previous squeeze
  209|       |     * (See Step 4 below).
  210|       |     */
  211|  56.7k|    if (num != 0) {
  ------------------
  |  Branch (211:9): [True: 0, False: 56.7k]
  ------------------
  212|      0|        if (outlen > ctx->bufsz)
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            len = ctx->bufsz;
  214|      0|        else
  215|      0|            len = outlen;
  216|      0|        memcpy(out, ctx->buf + bsz - ctx->bufsz, len);
  217|      0|        out += len;
  218|      0|        outlen -= len;
  219|      0|        ctx->bufsz -= len;
  220|      0|    }
  221|  56.7k|    if (outlen == 0)
  ------------------
  |  Branch (221:9): [True: 0, False: 56.7k]
  ------------------
  222|      0|        return 1;
  223|       |
  224|       |    /* Step 2. Copy full sized squeezed blocks to the output buffer directly */
  225|  56.7k|    if (outlen >= bsz) {
  ------------------
  |  Branch (225:9): [True: 56.7k, False: 0]
  ------------------
  226|  56.7k|        len = bsz * (outlen / bsz);
  227|  56.7k|        SHA3_squeeze(ctx->A, out, len, bsz, next);
  228|  56.7k|        next = 1;
  229|  56.7k|        out += len;
  230|  56.7k|        outlen -= len;
  231|  56.7k|    }
  232|  56.7k|    if (outlen > 0) {
  ------------------
  |  Branch (232:9): [True: 0, False: 56.7k]
  ------------------
  233|       |        /* Step 3. Squeeze one more block into a buffer */
  234|      0|        SHA3_squeeze(ctx->A, ctx->buf, bsz, bsz, next);
  235|      0|        memcpy(out, ctx->buf, outlen);
  236|       |        /* Step 4. Remember the leftover part of the squeezed block */
  237|      0|        ctx->bufsz = bsz - outlen;
  238|      0|    }
  239|  56.7k|    return 1;
  240|  56.7k|}

SHA1_Init:
   67|   441k|{
   68|   441k|    memset(c, 0, sizeof(*c));
   69|   441k|    c->h0 = INIT_DATA_h0;
  ------------------
  |  |   60|   441k|#define INIT_DATA_h0 0x67452301UL
  ------------------
   70|   441k|    c->h1 = INIT_DATA_h1;
  ------------------
  |  |   61|   441k|#define INIT_DATA_h1 0xefcdab89UL
  ------------------
   71|   441k|    c->h2 = INIT_DATA_h2;
  ------------------
  |  |   62|   441k|#define INIT_DATA_h2 0x98badcfeUL
  ------------------
   72|   441k|    c->h3 = INIT_DATA_h3;
  ------------------
  |  |   63|   441k|#define INIT_DATA_h3 0x10325476UL
  ------------------
   73|   441k|    c->h4 = INIT_DATA_h4;
  ------------------
  |  |   64|   441k|#define INIT_DATA_h4 0xc3d2e1f0UL
  ------------------
   74|   441k|    return 1;
   75|   441k|}

ossl_err_load_SM2_strings:
   41|      1|{
   42|      1|#ifndef OPENSSL_NO_ERR
   43|      1|    if (ERR_reason_error_string(SM2_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (43:9): [True: 1, False: 0]
  ------------------
   44|      1|        ERR_load_strings_const(SM2_str_reasons);
   45|      1|#endif
   46|      1|    return 1;
   47|      1|}

EVP_sm3:
   24|      1|{
   25|      1|    return &sm3_md;
   26|      1|}

ossl_sa_new:
   59|   354k|{
   60|   354k|    OPENSSL_SA *res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  109|   354k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|       |
   62|   354k|    return res;
   63|   354k|}
ossl_sa_free:
  111|   354k|{
  112|   354k|    if (sa != NULL) {
  ------------------
  |  Branch (112:9): [True: 354k, False: 0]
  ------------------
  113|   354k|        sa_doall(sa, &sa_free_node, NULL, NULL);
  114|   354k|        OPENSSL_free(sa);
  ------------------
  |  |  132|   354k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  115|   354k|    }
  116|   354k|}
ossl_sa_doall:
  135|  14.3k|{
  136|  14.3k|    struct trampoline_st tramp;
  137|       |
  138|  14.3k|    tramp.func = leaf;
  139|  14.3k|    if (sa != NULL)
  ------------------
  |  Branch (139:9): [True: 14.3k, False: 0]
  ------------------
  140|  14.3k|        sa_doall(sa, NULL, &trampoline, &tramp);
  141|  14.3k|}
ossl_sa_doall_arg:
  146|   368k|{
  147|   368k|    if (sa != NULL)
  ------------------
  |  Branch (147:9): [True: 368k, False: 0]
  ------------------
  148|   368k|        sa_doall(sa, NULL, leaf, arg);
  149|   368k|}
ossl_sa_num:
  152|     24|{
  153|     24|    return sa == NULL ? 0 : sa->nelem;
  ------------------
  |  Branch (153:12): [True: 0, False: 24]
  ------------------
  154|     24|}
ossl_sa_get:
  157|  25.6M|{
  158|  25.6M|    int level;
  159|  25.6M|    void **p, *r = NULL;
  160|       |
  161|  25.6M|    if (sa == NULL || sa->nelem == 0)
  ------------------
  |  Branch (161:9): [True: 0, False: 25.6M]
  |  Branch (161:23): [True: 8.51k, False: 25.6M]
  ------------------
  162|  8.51k|        return NULL;
  163|       |
  164|  25.6M|    if (n <= sa->top) {
  ------------------
  |  Branch (164:9): [True: 25.3M, False: 207k]
  ------------------
  165|  25.3M|        p = sa->nodes;
  166|  28.9M|        for (level = sa->levels - 1; p != NULL && level > 0; level--)
  ------------------
  |  Branch (166:38): [True: 28.7M, False: 207k]
  |  Branch (166:51): [True: 3.55M, False: 25.1M]
  ------------------
  167|  3.55M|            p = (void **)p[(n >> (OPENSSL_SA_BLOCK_BITS * level))
  ------------------
  |  |   34|  3.55M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  168|  3.55M|                & SA_BLOCK_MASK];
  ------------------
  |  |   46|  3.55M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  3.55M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.55M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  25.3M|        r = p == NULL ? NULL : p[n & SA_BLOCK_MASK];
  ------------------
  |  |   46|  25.1M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  25.1M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  25.1M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (169:13): [True: 207k, False: 25.1M]
  ------------------
  170|  25.3M|    }
  171|  25.6M|    return r;
  172|  25.6M|}
ossl_sa_set:
  180|   388k|{
  181|   388k|    int i, level = 1;
  182|   388k|    ossl_uintmax_t n = posn;
  183|   388k|    void **p;
  184|       |
  185|   388k|    if (sa == NULL)
  ------------------
  |  Branch (185:9): [True: 0, False: 388k]
  ------------------
  186|      0|        return 0;
  187|       |
  188|  1.55M|    for (level = 1; level < SA_BLOCK_MAX_LEVELS; level++)
  ------------------
  |  |   47|  1.55M|#define SA_BLOCK_MAX_LEVELS (((int)sizeof(ossl_uintmax_t) * 8 \
  |  |   48|  1.55M|                                 + OPENSSL_SA_BLOCK_BITS - 1) \
  |  |  ------------------
  |  |  |  |   34|  1.55M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  |  |   49|  1.55M|    / OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  1.55M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (188:21): [True: 1.55M, False: 0]
  ------------------
  189|  1.55M|        if ((n >>= OPENSSL_SA_BLOCK_BITS) == 0)
  ------------------
  |  |   34|  1.55M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  |  Branch (189:13): [True: 388k, False: 1.16M]
  ------------------
  190|   388k|            break;
  191|       |
  192|   400k|    for (; sa->levels < level; sa->levels++) {
  ------------------
  |  Branch (192:12): [True: 11.9k, False: 388k]
  ------------------
  193|  11.9k|        p = alloc_node();
  194|  11.9k|        if (p == NULL)
  ------------------
  |  Branch (194:13): [True: 0, False: 11.9k]
  ------------------
  195|      0|            return 0;
  196|  11.9k|        p[0] = sa->nodes;
  197|  11.9k|        sa->nodes = p;
  198|  11.9k|    }
  199|   388k|    if (sa->top < posn)
  ------------------
  |  Branch (199:9): [True: 106k, False: 281k]
  ------------------
  200|   106k|        sa->top = posn;
  201|       |
  202|   388k|    p = sa->nodes;
  203|  1.59M|    for (level = sa->levels - 1; level > 0; level--) {
  ------------------
  |  Branch (203:34): [True: 1.20M, False: 388k]
  ------------------
  204|  1.20M|        i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   34|  1.20M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
                      i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   46|  1.20M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.20M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.20M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|  1.20M|        if (p[i] == NULL && (p[i] = alloc_node()) == NULL)
  ------------------
  |  Branch (205:13): [True: 408k, False: 798k]
  |  Branch (205:29): [True: 0, False: 408k]
  ------------------
  206|      0|            return 0;
  207|  1.20M|        p = p[i];
  208|  1.20M|    }
  209|   388k|    p += posn & SA_BLOCK_MASK;
  ------------------
  |  |   46|   388k|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|   388k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   388k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|   388k|    if (val == NULL && *p != NULL)
  ------------------
  |  Branch (210:9): [True: 193k, False: 194k]
  |  Branch (210:24): [True: 193k, False: 0]
  ------------------
  211|   193k|        sa->nelem--;
  212|   194k|    else if (val != NULL && *p == NULL)
  ------------------
  |  Branch (212:14): [True: 194k, False: 0]
  |  Branch (212:29): [True: 194k, False: 3]
  ------------------
  213|   194k|        sa->nelem++;
  214|   388k|    *p = val;
  215|   388k|    return 1;
  216|   388k|}
sparse_array.c:sa_doall:
   67|   736k|{
   68|   736k|    int i[SA_BLOCK_MAX_LEVELS];
   69|   736k|    void *nodes[SA_BLOCK_MAX_LEVELS];
   70|   736k|    ossl_uintmax_t idx = 0;
   71|   736k|    int l = 0;
   72|       |
   73|   736k|    i[0] = 0;
   74|   736k|    nodes[0] = sa->nodes;
   75|  36.3M|    while (l >= 0) {
  ------------------
  |  Branch (75:12): [True: 35.5M, False: 736k]
  ------------------
   76|  35.5M|        const int n = i[l];
   77|  35.5M|        void **const p = nodes[l];
   78|       |
   79|  35.5M|        if (n >= SA_BLOCK_MAX) {
  ------------------
  |  |   45|  35.5M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  35.5M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (79:13): [True: 2.09M, False: 33.4M]
  ------------------
   80|  2.09M|            if (p != NULL && node != NULL)
  ------------------
  |  Branch (80:17): [True: 1.36M, False: 727k]
  |  Branch (80:30): [True: 418k, False: 946k]
  ------------------
   81|   418k|                (*node)(p);
   82|  2.09M|            l--;
   83|  2.09M|            idx >>= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  2.09M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   84|  33.4M|        } else {
   85|  33.4M|            i[l] = n + 1;
   86|  33.4M|            if (p != NULL && p[n] != NULL) {
  ------------------
  |  Branch (86:17): [True: 21.8M, False: 11.6M]
  |  Branch (86:30): [True: 1.79M, False: 20.0M]
  ------------------
   87|  1.79M|                idx = (idx & ~SA_BLOCK_MASK) | n;
  ------------------
  |  |   46|  1.79M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.79M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.79M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|  1.79M|                if (l < sa->levels - 1) {
  ------------------
  |  Branch (88:21): [True: 1.35M, False: 435k]
  ------------------
   89|  1.35M|                    i[++l] = 0;
   90|  1.35M|                    nodes[l] = p[n];
   91|  1.35M|                    idx <<= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  1.35M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   92|  1.35M|                } else if (leaf != NULL) {
  ------------------
  |  Branch (92:28): [True: 435k, False: 0]
  ------------------
   93|   435k|                    (*leaf)(idx, p[n], arg);
   94|   435k|                }
   95|  1.79M|            }
   96|  33.4M|        }
   97|  35.5M|    }
   98|   736k|}
sparse_array.c:sa_free_node:
  101|   418k|{
  102|   418k|    OPENSSL_free(p);
  ------------------
  |  |  132|   418k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|   418k|}
sparse_array.c:alloc_node:
  175|   420k|{
  176|   420k|    return OPENSSL_calloc(SA_BLOCK_MAX, sizeof(void *));
  ------------------
  |  |  113|   420k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  177|   420k|}

ossl_err_load_SSL_strings:
  629|      1|{
  630|      1|#ifndef OPENSSL_NO_ERR
  631|      1|    if (ERR_reason_error_string(SSL_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (631:9): [True: 1, False: 0]
  ------------------
  632|      1|        ERR_load_strings_const(SSL_str_reasons);
  633|      1|#endif
  634|      1|    return 1;
  635|      1|}

OPENSSL_sk_set_cmp_func:
   40|  4.03k|{
   41|  4.03k|    OPENSSL_sk_compfunc old = sk->comp;
   42|       |
   43|  4.03k|    if (sk->comp != c && sk->num > 1)
  ------------------
  |  Branch (43:9): [True: 4.03k, False: 0]
  |  Branch (43:26): [True: 3.91k, False: 117]
  ------------------
   44|  3.91k|        sk->sorted = 0;
   45|  4.03k|    sk->comp = c;
   46|       |
   47|  4.03k|    return old;
   48|  4.03k|}
OPENSSL_sk_deep_copy:
  101|  1.00M|{
  102|  1.00M|    return internal_copy(sk, copy_func, free_func);
  103|  1.00M|}
OPENSSL_sk_dup:
  106|   764k|{
  107|   764k|    return internal_copy(sk, NULL, NULL);
  108|   764k|}
OPENSSL_sk_new_null:
  111|  16.0M|{
  112|       |    return OPENSSL_sk_new_reserve(NULL, 0);
  113|  16.0M|}
OPENSSL_sk_new:
  116|   334k|{
  117|   334k|    return OPENSSL_sk_new_reserve(c, 0);
  118|   334k|}
OPENSSL_sk_new_reserve:
  212|  16.3M|{
  213|  16.3M|    OPENSSL_STACK *st = OPENSSL_zalloc(sizeof(OPENSSL_STACK));
  ------------------
  |  |  109|  16.3M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  214|       |
  215|  16.3M|    if (st == NULL)
  ------------------
  |  Branch (215:9): [True: 0, False: 16.3M]
  ------------------
  216|      0|        return NULL;
  217|       |
  218|  16.3M|    st->comp = c;
  219|  16.3M|    st->sorted = 1; /* empty or single-element stack is considered sorted */
  220|       |
  221|  16.3M|    if (n <= 0)
  ------------------
  |  Branch (221:9): [True: 16.3M, False: 24]
  ------------------
  222|  16.3M|        return st;
  223|       |
  224|     24|    if (!sk_reserve(st, n, 1)) {
  ------------------
  |  Branch (224:9): [True: 0, False: 24]
  ------------------
  225|      0|        OPENSSL_sk_free(st);
  226|      0|        return NULL;
  227|      0|    }
  228|       |
  229|     24|    return st;
  230|     24|}
OPENSSL_sk_set_thunks:
  245|  18.9M|{
  246|  18.9M|    if (st != NULL)
  ------------------
  |  Branch (246:9): [True: 17.5M, False: 1.41M]
  ------------------
  247|  17.5M|        st->free_thunk = f_thunk;
  248|       |
  249|  18.9M|    return st;
  250|  18.9M|}
OPENSSL_sk_set_cmp_thunks:
  253|   334k|{
  254|   334k|    if (st != NULL)
  ------------------
  |  Branch (254:9): [True: 334k, False: 0]
  ------------------
  255|   334k|        st->cmp_thunk = c_thunk;
  256|       |
  257|   334k|    return st;
  258|   334k|}
OPENSSL_sk_insert:
  261|  21.8M|{
  262|  21.8M|    int cmp_ret;
  263|       |
  264|  21.8M|    if (st == NULL) {
  ------------------
  |  Branch (264:9): [True: 0, False: 21.8M]
  ------------------
  265|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  266|      0|        return 0;
  267|      0|    }
  268|  21.8M|    if (st->num == max_nodes) {
  ------------------
  |  Branch (268:9): [True: 0, False: 21.8M]
  ------------------
  269|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return 0;
  271|      0|    }
  272|       |
  273|  21.8M|    if (!sk_reserve(st, 1, 0))
  ------------------
  |  Branch (273:9): [True: 0, False: 21.8M]
  ------------------
  274|      0|        return 0;
  275|       |
  276|  21.8M|    if ((loc >= st->num) || (loc < 0)) {
  ------------------
  |  Branch (276:9): [True: 21.8M, False: 22]
  |  Branch (276:29): [True: 0, False: 22]
  ------------------
  277|  21.8M|        loc = st->num;
  278|  21.8M|        st->data[loc] = data;
  279|  21.8M|    } else {
  280|     22|        memmove(&st->data[loc + 1], &st->data[loc],
  281|     22|            sizeof(st->data[0]) * (st->num - loc));
  282|     22|        st->data[loc] = data;
  283|     22|    }
  284|  21.8M|    st->num++;
  285|  21.8M|    if (st->sorted && st->num > 1) {
  ------------------
  |  Branch (285:9): [True: 15.2M, False: 6.59M]
  |  Branch (285:23): [True: 3.75M, False: 11.4M]
  ------------------
  286|  3.75M|        if (st->comp != NULL) {
  ------------------
  |  Branch (286:13): [True: 48.2k, False: 3.70M]
  ------------------
  287|  48.2k|            if (loc > 0) {
  ------------------
  |  Branch (287:17): [True: 48.2k, False: 0]
  ------------------
  288|  48.2k|                cmp_ret = cmp_with_thunk(st, &st->data[loc - 1], &st->data[loc]);
  289|  48.2k|                if (cmp_ret > 0)
  ------------------
  |  Branch (289:21): [True: 6.59k, False: 41.7k]
  ------------------
  290|  6.59k|                    st->sorted = 0;
  291|  48.2k|            }
  292|  48.2k|            if (loc < st->num - 1) {
  ------------------
  |  Branch (292:17): [True: 0, False: 48.2k]
  ------------------
  293|      0|                cmp_ret = cmp_with_thunk(st, &st->data[loc + 1], &st->data[loc]);
  294|      0|                if (cmp_ret < 0)
  ------------------
  |  Branch (294:21): [True: 0, False: 0]
  ------------------
  295|      0|                    st->sorted = 0;
  296|      0|            }
  297|  3.70M|        } else {
  298|  3.70M|            st->sorted = 0;
  299|  3.70M|        }
  300|  3.75M|    }
  301|  21.8M|    return st->num;
  302|  21.8M|}
OPENSSL_sk_delete:
  331|  1.07k|{
  332|  1.07k|    if (st == NULL || loc < 0 || loc >= st->num)
  ------------------
  |  Branch (332:9): [True: 0, False: 1.07k]
  |  Branch (332:23): [True: 0, False: 1.07k]
  |  Branch (332:34): [True: 0, False: 1.07k]
  ------------------
  333|      0|        return NULL;
  334|       |
  335|  1.07k|    return internal_delete(st, loc);
  336|  1.07k|}
OPENSSL_sk_find:
  408|   228k|{
  409|   228k|    return internal_find(st, data, OSSL_BSEARCH_FIRST_VALUE_ON_MATCH, NULL);
  ------------------
  |  |  150|   228k|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  410|   228k|}
OPENSSL_sk_push:
  423|  21.8M|{
  424|  21.8M|    if (st == NULL)
  ------------------
  |  Branch (424:9): [True: 0, False: 21.8M]
  ------------------
  425|      0|        return 0;
  426|  21.8M|    return OPENSSL_sk_insert(st, data, st->num);
  427|  21.8M|}
OPENSSL_sk_unshift:
  430|     22|{
  431|     22|    return OPENSSL_sk_insert(st, data, 0);
  432|     22|}
OPENSSL_sk_pop:
  442|  4.62k|{
  443|  4.62k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (443:9): [True: 0, False: 4.62k]
  |  Branch (443:23): [True: 0, False: 4.62k]
  ------------------
  444|      0|        return NULL;
  445|  4.62k|    return internal_delete(st, st->num - 1);
  446|  4.62k|}
OPENSSL_sk_pop_free:
  457|  14.2M|{
  458|  14.2M|    int i;
  459|       |
  460|  14.2M|    if (st == NULL)
  ------------------
  |  Branch (460:9): [True: 4.89M, False: 9.34M]
  ------------------
  461|  4.89M|        return;
  462|       |
  463|  28.8M|    for (i = 0; i < st->num; i++) {
  ------------------
  |  Branch (463:17): [True: 19.4M, False: 9.34M]
  ------------------
  464|  19.4M|        if (st->data[i] != NULL) {
  ------------------
  |  Branch (464:13): [True: 19.4M, False: 0]
  ------------------
  465|  19.4M|            if (st->free_thunk != NULL)
  ------------------
  |  Branch (465:17): [True: 19.2M, False: 282k]
  ------------------
  466|  19.2M|                st->free_thunk(func, (void *)st->data[i]);
  467|   282k|            else
  468|   282k|                func((void *)st->data[i]);
  469|  19.4M|        }
  470|  19.4M|    }
  471|  9.34M|    OPENSSL_sk_free(st);
  472|  9.34M|}
OPENSSL_sk_free:
  475|  24.2M|{
  476|  24.2M|    if (st == NULL)
  ------------------
  |  Branch (476:9): [True: 7.88M, False: 16.3M]
  ------------------
  477|  7.88M|        return;
  478|  16.3M|    OPENSSL_free(st->data);
  ------------------
  |  |  132|  16.3M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  479|  16.3M|    OPENSSL_free(st);
  ------------------
  |  |  132|  16.3M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  480|  16.3M|}
OPENSSL_sk_num:
  483|   103M|{
  484|   103M|    return st == NULL ? -1 : st->num;
  ------------------
  |  Branch (484:12): [True: 14.2M, False: 88.9M]
  ------------------
  485|   103M|}
OPENSSL_sk_value:
  488|  60.0M|{
  489|  60.0M|    if (st == NULL || i < 0 || i >= st->num)
  ------------------
  |  Branch (489:9): [True: 0, False: 60.0M]
  |  Branch (489:23): [True: 1.73k, False: 60.0M]
  |  Branch (489:32): [True: 0, False: 60.0M]
  ------------------
  490|  1.73k|        return NULL;
  491|  60.0M|    return (void *)st->data[i];
  492|  60.0M|}
OPENSSL_sk_set:
  495|  3.57M|{
  496|  3.57M|    if (st == NULL) {
  ------------------
  |  Branch (496:9): [True: 0, False: 3.57M]
  ------------------
  497|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  498|      0|        return NULL;
  499|      0|    }
  500|  3.57M|    if (i < 0 || i >= st->num) {
  ------------------
  |  Branch (500:9): [True: 0, False: 3.57M]
  |  Branch (500:18): [True: 0, False: 3.57M]
  ------------------
  501|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  502|      0|            "i=%d", i);
  503|      0|        return NULL;
  504|      0|    }
  505|  3.57M|    st->data[i] = data;
  506|  3.57M|    st->sorted = st->num <= 1;
  507|  3.57M|    return (void *)st->data[i];
  508|  3.57M|}
OPENSSL_sk_sort:
  511|  22.7k|{
  512|  22.7k|    if (st != NULL && !st->sorted && st->comp != NULL) {
  ------------------
  |  Branch (512:9): [True: 22.7k, False: 0]
  |  Branch (512:23): [True: 7.58k, False: 15.2k]
  |  Branch (512:38): [True: 7.58k, False: 0]
  ------------------
  513|  7.58k|        if (st->num > 1)
  ------------------
  |  Branch (513:13): [True: 7.58k, False: 0]
  ------------------
  514|  7.58k|            qsort(st->data, st->num, sizeof(void *), st->comp);
  515|  7.58k|        st->sorted = 1; /* empty or single-element stack is considered sorted */
  516|  7.58k|    }
  517|  22.7k|}
OPENSSL_sk_is_sorted:
  520|  4.63k|{
  521|  4.63k|    return st == NULL ? 1 : st->sorted;
  ------------------
  |  Branch (521:12): [True: 0, False: 4.63k]
  ------------------
  522|  4.63k|}
stack.c:internal_copy:
   53|  1.77M|{
   54|  1.77M|    OPENSSL_STACK *ret;
   55|  1.77M|    int i;
   56|       |
   57|  1.77M|    if ((ret = OPENSSL_sk_new_null()) == NULL)
  ------------------
  |  Branch (57:9): [True: 0, False: 1.77M]
  ------------------
   58|      0|        goto err;
   59|       |
   60|  1.77M|    if (sk == NULL)
  ------------------
  |  Branch (60:9): [True: 1.80k, False: 1.77M]
  ------------------
   61|  1.80k|        goto done;
   62|       |
   63|       |    /* direct structure assignment */
   64|  1.77M|    *ret = *sk;
   65|  1.77M|    ret->data = NULL;
   66|  1.77M|    ret->num_alloc = 0;
   67|       |
   68|  1.77M|    if (ret->num == 0)
  ------------------
  |  Branch (68:9): [True: 159, False: 1.77M]
  ------------------
   69|    159|        goto done; /* nothing to copy */
   70|       |
   71|  1.77M|    ret->num_alloc = ret->num > min_nodes ? ret->num : min_nodes;
  ------------------
  |  Branch (71:22): [True: 508k, False: 1.26M]
  ------------------
   72|  1.77M|    ret->data = OPENSSL_calloc(ret->num_alloc, sizeof(*ret->data));
  ------------------
  |  |  113|  1.77M|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   73|  1.77M|    if (ret->data == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 1.77M]
  ------------------
   74|      0|        goto err;
   75|  1.77M|    if (copy_func == NULL) {
  ------------------
  |  Branch (75:9): [True: 764k, False: 1.00M]
  ------------------
   76|   764k|        memcpy(ret->data, sk->data, sizeof(*ret->data) * ret->num);
   77|  1.00M|    } else {
   78|  4.53M|        for (i = 0; i < ret->num; ++i) {
  ------------------
  |  Branch (78:21): [True: 3.52M, False: 1.00M]
  ------------------
   79|  3.52M|            if (sk->data[i] == NULL)
  ------------------
  |  Branch (79:17): [True: 0, False: 3.52M]
  ------------------
   80|      0|                continue;
   81|  3.52M|            if ((ret->data[i] = copy_func(sk->data[i])) == NULL) {
  ------------------
  |  Branch (81:17): [True: 0, False: 3.52M]
  ------------------
   82|      0|                while (--i >= 0)
  ------------------
  |  Branch (82:24): [True: 0, False: 0]
  ------------------
   83|      0|                    if (ret->data[i] != NULL)
  ------------------
  |  Branch (83:25): [True: 0, False: 0]
  ------------------
   84|      0|                        free_func((void *)ret->data[i]);
   85|      0|                goto err;
   86|      0|            }
   87|  3.52M|        }
   88|  1.00M|    }
   89|       |
   90|  1.77M|done:
   91|  1.77M|    return ret;
   92|       |
   93|      0|err:
   94|      0|    OPENSSL_sk_free(ret);
   95|       |    return NULL;
   96|  1.77M|}
stack.c:sk_reserve:
  158|  21.8M|{
  159|  21.8M|    const void **tmpdata;
  160|  21.8M|    int num_alloc;
  161|       |
  162|       |    /* Check to see the reservation isn't exceeding the hard limit */
  163|  21.8M|    if (n > max_nodes - st->num) {
  ------------------
  |  Branch (163:9): [True: 0, False: 21.8M]
  ------------------
  164|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  165|      0|        return 0;
  166|      0|    }
  167|       |
  168|       |    /* Figure out the new size */
  169|  21.8M|    num_alloc = st->num + n;
  170|  21.8M|    if (num_alloc < min_nodes)
  ------------------
  |  Branch (170:9): [True: 18.7M, False: 3.03M]
  ------------------
  171|  18.7M|        num_alloc = min_nodes;
  172|       |
  173|       |    /* If |st->data| allocation was postponed */
  174|  21.8M|    if (st->data == NULL) {
  ------------------
  |  Branch (174:9): [True: 11.4M, False: 10.3M]
  ------------------
  175|       |        /*
  176|       |         * At this point, |st->num_alloc| and |st->num| are 0;
  177|       |         * so |num_alloc| value is |n| or |min_nodes| if greater than |n|.
  178|       |         */
  179|  11.4M|        if ((st->data = OPENSSL_calloc(num_alloc, sizeof(void *))) == NULL)
  ------------------
  |  |  113|  11.4M|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (179:13): [True: 0, False: 11.4M]
  ------------------
  180|      0|            return 0;
  181|  11.4M|        st->num_alloc = num_alloc;
  182|  11.4M|        return 1;
  183|  11.4M|    }
  184|       |
  185|  10.3M|    if (!exact) {
  ------------------
  |  Branch (185:9): [True: 10.3M, False: 0]
  ------------------
  186|  10.3M|        if (num_alloc <= st->num_alloc)
  ------------------
  |  Branch (186:13): [True: 9.70M, False: 646k]
  ------------------
  187|  9.70M|            return 1;
  188|   646k|        num_alloc = compute_growth(num_alloc, st->num_alloc);
  189|   646k|        if (num_alloc == 0) {
  ------------------
  |  Branch (189:13): [True: 0, False: 646k]
  ------------------
  190|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  191|      0|            return 0;
  192|      0|        }
  193|   646k|    } else if (num_alloc == st->num_alloc) {
  ------------------
  |  Branch (193:16): [True: 0, False: 0]
  ------------------
  194|      0|        return 1;
  195|      0|    }
  196|       |
  197|   646k|    tmpdata = OPENSSL_realloc_array((void *)st->data, num_alloc, sizeof(void *));
  ------------------
  |  |  125|   646k|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  198|   646k|    if (tmpdata == NULL)
  ------------------
  |  Branch (198:9): [True: 0, False: 646k]
  ------------------
  199|      0|        return 0;
  200|       |
  201|   646k|    st->data = tmpdata;
  202|   646k|    st->num_alloc = num_alloc;
  203|   646k|    return 1;
  204|   646k|}
stack.c:compute_growth:
  140|   646k|{
  141|   646k|    int err = 0;
  142|       |
  143|  1.29M|    while (current < target) {
  ------------------
  |  Branch (143:12): [True: 646k, False: 646k]
  ------------------
  144|   646k|        if (current >= max_nodes)
  ------------------
  |  Branch (144:13): [True: 0, False: 646k]
  ------------------
  145|      0|            return 0;
  146|       |
  147|   646k|        current = safe_muldiv_int(current, 8, 5, &err);
  148|   646k|        if (err != 0)
  ------------------
  |  Branch (148:13): [True: 0, False: 646k]
  ------------------
  149|      0|            return 0;
  150|   646k|        if (current >= max_nodes)
  ------------------
  |  Branch (150:13): [True: 0, False: 646k]
  ------------------
  151|      0|            current = max_nodes;
  152|   646k|    }
  153|   646k|    return current;
  154|   646k|}
stack.c:cmp_with_thunk:
  207|  48.2k|{
  208|  48.2k|    return (st->cmp_thunk == NULL) ? st->comp(a, b) : st->cmp_thunk(st->comp, a, b);
  ------------------
  |  Branch (208:12): [True: 0, False: 48.2k]
  ------------------
  209|  48.2k|}
stack.c:internal_delete:
  305|  5.70k|{
  306|  5.70k|    const void *ret = st->data[loc];
  307|       |
  308|  5.70k|    if (loc != st->num - 1)
  ------------------
  |  Branch (308:9): [True: 783, False: 4.91k]
  ------------------
  309|    783|        memmove(&st->data[loc], &st->data[loc + 1],
  310|    783|            sizeof(st->data[0]) * (st->num - loc - 1));
  311|  5.70k|    st->num--;
  312|  5.70k|    st->sorted = st->sorted || st->num <= 1;
  ------------------
  |  Branch (312:18): [True: 4.74k, False: 960]
  |  Branch (312:32): [True: 674, False: 286]
  ------------------
  313|       |
  314|  5.70k|    return (void *)ret;
  315|  5.70k|}
stack.c:internal_find:
  340|   228k|{
  341|   228k|    const void *r;
  342|   228k|    int i, count = 0;
  343|   228k|    int cmp_ret;
  344|   228k|    int *pnum = pnum_matched;
  345|       |
  346|   228k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (346:9): [True: 0, False: 228k]
  |  Branch (346:23): [True: 0, False: 228k]
  ------------------
  347|      0|        return -1;
  348|       |
  349|   228k|    if (pnum == NULL)
  ------------------
  |  Branch (349:9): [True: 228k, False: 0]
  ------------------
  350|   228k|        pnum = &count;
  351|       |
  352|   228k|    if (st->comp == NULL) {
  ------------------
  |  Branch (352:9): [True: 0, False: 228k]
  ------------------
  353|      0|        for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (353:21): [True: 0, False: 0]
  ------------------
  354|      0|            if (st->data[i] == data) {
  ------------------
  |  Branch (354:17): [True: 0, False: 0]
  ------------------
  355|      0|                *pnum = 1;
  356|      0|                return i;
  357|      0|            }
  358|      0|        *pnum = 0;
  359|      0|        return -1;
  360|      0|    }
  361|       |
  362|   228k|    if (data == NULL)
  ------------------
  |  Branch (362:9): [True: 0, False: 228k]
  ------------------
  363|      0|        return -1;
  364|       |
  365|   228k|    if (!st->sorted) {
  ------------------
  |  Branch (365:9): [True: 0, False: 228k]
  ------------------
  366|      0|        int res = -1;
  367|       |
  368|      0|        for (i = 0; i < st->num; i++) {
  ------------------
  |  Branch (368:21): [True: 0, False: 0]
  ------------------
  369|      0|            cmp_ret = cmp_with_thunk(st, &data, st->data + i);
  370|      0|            if (cmp_ret == 0) {
  ------------------
  |  Branch (370:17): [True: 0, False: 0]
  ------------------
  371|      0|                if (res == -1)
  ------------------
  |  Branch (371:21): [True: 0, False: 0]
  ------------------
  372|      0|                    res = i;
  373|      0|                ++*pnum;
  374|       |                /* Check if only one result is wanted and exit if so */
  375|      0|                if (pnum_matched == NULL)
  ------------------
  |  Branch (375:21): [True: 0, False: 0]
  ------------------
  376|      0|                    return i;
  377|      0|            }
  378|      0|        }
  379|      0|        if (res == -1)
  ------------------
  |  Branch (379:13): [True: 0, False: 0]
  ------------------
  380|      0|            *pnum = 0;
  381|      0|        return res;
  382|      0|    }
  383|       |
  384|   228k|    if (pnum_matched != NULL)
  ------------------
  |  Branch (384:9): [True: 0, False: 228k]
  ------------------
  385|      0|        ret_val_options |= OSSL_BSEARCH_FIRST_VALUE_ON_MATCH;
  ------------------
  |  |  150|      0|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  386|   228k|    r = ossl_bsearch(&data, st->data, st->num, sizeof(void *), st->comp, st->cmp_thunk,
  387|   228k|        ret_val_options);
  388|       |
  389|   228k|    if (pnum_matched != NULL) {
  ------------------
  |  Branch (389:9): [True: 0, False: 228k]
  ------------------
  390|      0|        *pnum = 0;
  391|      0|        if (r != NULL) {
  ------------------
  |  Branch (391:13): [True: 0, False: 0]
  ------------------
  392|      0|            const void **p = (const void **)r;
  393|       |
  394|      0|            while (p < st->data + st->num) {
  ------------------
  |  Branch (394:20): [True: 0, False: 0]
  ------------------
  395|      0|                cmp_ret = cmp_with_thunk(st, &data, p);
  396|      0|                if (cmp_ret != 0)
  ------------------
  |  Branch (396:21): [True: 0, False: 0]
  ------------------
  397|      0|                    break;
  398|      0|                ++*pnum;
  399|      0|                ++p;
  400|      0|            }
  401|      0|        }
  402|      0|    }
  403|       |
  404|   228k|    return r == NULL ? -1 : (int)((const void **)r - st->data);
  ------------------
  |  Branch (404:12): [True: 2.65k, False: 226k]
  ------------------
  405|   228k|}

ossl_err_load_OSSL_STORE_strings:
   71|      1|{
   72|      1|#ifndef OPENSSL_NO_ERR
   73|      1|    if (ERR_reason_error_string(OSSL_STORE_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (73:9): [True: 1, False: 0]
  ------------------
   74|      1|        ERR_load_strings_const(OSSL_STORE_str_reasons);
   75|      1|#endif
   76|      1|    return 1;
   77|      1|}

ossl_store_loader_store_cache_flush:
  388|    899|{
  389|    899|    OSSL_METHOD_STORE *store = get_loader_store(libctx);
  390|       |
  391|    899|    if (store != NULL)
  ------------------
  |  Branch (391:9): [True: 899, False: 0]
  ------------------
  392|    899|        return ossl_method_store_cache_flush_all(store);
  393|      0|    return 1;
  394|    899|}
ossl_store_loader_store_remove_all_provided:
  397|    899|{
  398|    899|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  399|    899|    OSSL_METHOD_STORE *store = get_loader_store(libctx);
  400|       |
  401|    899|    if (store != NULL)
  ------------------
  |  Branch (401:9): [True: 899, False: 0]
  ------------------
  402|    899|        return ossl_method_store_remove_all_provided(store, prov);
  403|      0|    return 1;
  404|    899|}
store_meth.c:get_loader_store:
  109|  1.79k|{
  110|  1.79k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX);
  ------------------
  |  |  112|  1.79k|#define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX 15
  ------------------
  111|  1.79k|}

ossl_crypto_mutex_new:
   97|    809|{
   98|    809|    pthread_mutex_t *mutex;
   99|       |
  100|    809|    if ((mutex = OPENSSL_zalloc(sizeof(*mutex))) == NULL)
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (100:9): [True: 0, False: 809]
  ------------------
  101|      0|        return NULL;
  102|    809|    if (pthread_mutex_init(mutex, NULL) != 0) {
  ------------------
  |  Branch (102:9): [True: 0, False: 809]
  ------------------
  103|      0|        OPENSSL_free(mutex);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  104|      0|        return NULL;
  105|      0|    }
  106|    809|    return (CRYPTO_MUTEX *)mutex;
  107|    809|}
ossl_crypto_mutex_free:
  142|    808|{
  143|    808|    pthread_mutex_t **mutex_p;
  144|       |
  145|    808|    if (mutex == NULL)
  ------------------
  |  Branch (145:9): [True: 0, False: 808]
  ------------------
  146|      0|        return;
  147|       |
  148|    808|    mutex_p = (pthread_mutex_t **)mutex;
  149|    808|    if (*mutex_p != NULL)
  ------------------
  |  Branch (149:9): [True: 808, False: 0]
  ------------------
  150|    808|        pthread_mutex_destroy(*mutex_p);
  151|    808|    OPENSSL_free(*mutex_p);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|       |    *mutex = NULL;
  153|    808|}
ossl_crypto_condvar_new:
  156|    809|{
  157|    809|    pthread_cond_t *cv_p;
  158|       |
  159|    809|    if ((cv_p = OPENSSL_zalloc(sizeof(*cv_p))) == NULL)
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (159:9): [True: 0, False: 809]
  ------------------
  160|      0|        return NULL;
  161|    809|    if (pthread_cond_init(cv_p, NULL) != 0) {
  ------------------
  |  Branch (161:9): [True: 0, False: 809]
  ------------------
  162|      0|        OPENSSL_free(cv_p);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  163|      0|        return NULL;
  164|      0|    }
  165|    809|    return (CRYPTO_CONDVAR *)cv_p;
  166|    809|}
ossl_crypto_condvar_free:
  220|    808|{
  221|    808|    pthread_cond_t **cv_p;
  222|       |
  223|    808|    if (cv == NULL)
  ------------------
  |  Branch (223:9): [True: 0, False: 808]
  ------------------
  224|      0|        return;
  225|       |
  226|    808|    cv_p = (pthread_cond_t **)cv;
  227|    808|    if (*cv_p != NULL)
  ------------------
  |  Branch (227:9): [True: 808, False: 0]
  ------------------
  228|    808|        pthread_cond_destroy(*cv_p);
  229|    808|    OPENSSL_free(*cv_p);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  230|       |    *cv_p = NULL;
  231|    808|}

ossl_threads_ctx_new:
  128|    809|{
  129|    809|    struct openssl_threads_st *t = OPENSSL_zalloc(sizeof(*t));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  130|       |
  131|    809|    if (t == NULL)
  ------------------
  |  Branch (131:9): [True: 0, False: 809]
  ------------------
  132|      0|        return NULL;
  133|       |
  134|    809|    t->lock = ossl_crypto_mutex_new();
  135|    809|    t->cond_finished = ossl_crypto_condvar_new();
  136|       |
  137|    809|    if (t->lock == NULL || t->cond_finished == NULL)
  ------------------
  |  Branch (137:9): [True: 0, False: 809]
  |  Branch (137:28): [True: 0, False: 809]
  ------------------
  138|      0|        goto fail;
  139|       |
  140|    809|    return t;
  141|       |
  142|      0|fail:
  143|      0|    ossl_threads_ctx_free((void *)t);
  144|       |    return NULL;
  145|    809|}
ossl_threads_ctx_free:
  148|    808|{
  149|    808|    OSSL_LIB_CTX_THREADS *t = (OSSL_LIB_CTX_THREADS *)vdata;
  150|       |
  151|    808|    if (t == NULL)
  ------------------
  |  Branch (151:9): [True: 0, False: 808]
  ------------------
  152|      0|        return;
  153|       |
  154|    808|    ossl_crypto_mutex_free(&t->lock);
  155|    808|    ossl_crypto_condvar_free(&t->cond_finished);
  156|    808|    OPENSSL_free(t);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  157|    808|}

CRYPTO_THREAD_get_local_ex:
  259|  24.3M|{
  260|  24.3M|    MASTER_KEY_ENTRY *mkey;
  261|  24.3M|    CTX_TABLE_ENTRY ctxd;
  262|       |
  263|  24.3M|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   42|  24.3M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (263:11): [True: 24.3M, False: 32.6k]
  ------------------
  264|       |    /*
  265|       |     * Make sure the master key has been initialized
  266|       |     * NOTE: We use CRYPTO_THREAD_run_once here, rather than the
  267|       |     * RUN_ONCE macros.  We do this because this code is included both in
  268|       |     * libcrypto, and in fips.[dll|dylib|so].  FIPS attempts to avoid doing
  269|       |     * one time initialization of global data, and so suppresses the definition
  270|       |     * of RUN_ONCE, etc, meaning the build breaks if we were to use that with
  271|       |     * fips-enabled.  However, this is a special case in which we want/need
  272|       |     * this one bit of global data to be initialized in both the fips provider
  273|       |     * and in libcrypto, so we use CRYPTO_THREAD_run_one directly, which is
  274|       |     * always defined.
  275|       |     */
  276|  24.3M|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (276:9): [True: 0, False: 24.3M]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  24.3M|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  24.3M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  24.3M|    __FILE__, __LINE__)
  ------------------
  |  Branch (279:9): [True: 0, False: 24.3M]
  ------------------
  280|      0|        return NULL;
  281|       |
  282|       |    /*
  283|       |     * Get our master table sparse array, indexed by key id
  284|       |     */
  285|  24.3M|    mkey = CRYPTO_THREAD_get_local(&master_key);
  286|  24.3M|    if (mkey == NULL)
  ------------------
  |  Branch (286:9): [True: 1, False: 24.3M]
  ------------------
  287|      1|        return NULL;
  288|       |
  289|       |    /*
  290|       |     * Get the specific data entry in the master key
  291|       |     * table for the key id we are searching for
  292|       |     */
  293|  24.3M|    if (mkey[id].ctx_table == NULL)
  ------------------
  |  Branch (293:9): [True: 3, False: 24.3M]
  ------------------
  294|      3|        return NULL;
  295|       |
  296|       |    /*
  297|       |     * If we find an entry above, that will be a sparse array,
  298|       |     * indexed by OSSL_LIB_CTX.
  299|       |     * Note: Because we're using sparse arrays here, we can do an easy
  300|       |     * trick, since we know all OSSL_LIB_CTX pointers are unique.  By casting
  301|       |     * the pointer to a unitptr_t, we can use that as an ordinal index into
  302|       |     * the sparse array.
  303|       |     */
  304|  24.3M|    ctxd = ossl_sa_CTX_TABLE_ENTRY_get(mkey[id].ctx_table, (uintptr_t)ctx);
  305|       |
  306|       |    /*
  307|       |     * If we find an entry for the passed in context, return its data pointer
  308|       |     */
  309|  24.3M|    return ctxd;
  310|  24.3M|}
CRYPTO_THREAD_set_local_ex:
  338|  2.38k|{
  339|  2.38k|    MASTER_KEY_ENTRY *mkey;
  340|       |
  341|  2.38k|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   42|  2.38k|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (341:11): [True: 4, False: 2.38k]
  ------------------
  342|       |    /*
  343|       |     * Make sure our master key is initialized
  344|       |     * See notes above on the use of CRYPTO_THREAD_run_once here
  345|       |     */
  346|  2.38k|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (346:9): [True: 0, False: 2.38k]
  ------------------
  347|      0|        return 0;
  348|       |
  349|  2.38k|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  2.38k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.38k|    __FILE__, __LINE__)
  ------------------
  |  Branch (349:9): [True: 0, False: 2.38k]
  ------------------
  350|      0|        return 0;
  351|       |
  352|       |    /*
  353|       |     * Get our local master key data, which will be
  354|       |     * a sparse array indexed by the id parameter
  355|       |     */
  356|  2.38k|    mkey = CRYPTO_THREAD_get_local(&master_key);
  357|  2.38k|    if (mkey == NULL) {
  ------------------
  |  Branch (357:9): [True: 1, False: 2.38k]
  ------------------
  358|       |        /*
  359|       |         * we didn't find one, but that's ok, just initialize it now
  360|       |         */
  361|      1|        mkey = OPENSSL_calloc(CRYPTO_THREAD_LOCAL_KEY_MAX,
  ------------------
  |  |  113|      1|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|      1|            sizeof(MASTER_KEY_ENTRY));
  363|      1|        if (mkey == NULL)
  ------------------
  |  Branch (363:13): [True: 0, False: 1]
  ------------------
  364|      0|            return 0;
  365|       |        /*
  366|       |         * make sure to assign it to our master key thread-local storage
  367|       |         */
  368|      1|        if (!CRYPTO_THREAD_set_local(&master_key, mkey)) {
  ------------------
  |  Branch (368:13): [True: 0, False: 1]
  ------------------
  369|      0|            OPENSSL_free(mkey);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|      0|            return 0;
  371|      0|        }
  372|      1|    }
  373|       |
  374|       |    /*
  375|       |     * Find the entry that we are looking for using our id index
  376|       |     */
  377|  2.38k|    if (mkey[id].ctx_table == NULL) {
  ------------------
  |  Branch (377:9): [True: 3, False: 2.38k]
  ------------------
  378|       |
  379|       |        /*
  380|       |         * Didn't find it, that's ok, just add it now
  381|       |         */
  382|      3|        mkey[id].ctx_table = ossl_sa_CTX_TABLE_ENTRY_new();
  383|      3|        if (mkey[id].ctx_table == NULL)
  ------------------
  |  Branch (383:13): [True: 0, False: 3]
  ------------------
  384|      0|            return 0;
  385|      3|    }
  386|       |
  387|       |    /*
  388|       |     * Now go look up our per context entry, using the OSSL_LIB_CTX pointer
  389|       |     * that we've been provided.  Note we cast the pointer to a uintptr_t so
  390|       |     * as to use it as an index in the sparse array
  391|       |     *
  392|       |     * Assign to the entry in the table so that we can find it later
  393|       |     */
  394|  2.38k|    return ossl_sa_CTX_TABLE_ENTRY_set(mkey[id].ctx_table,
  395|  2.38k|        (uintptr_t)ctx, data);
  396|  2.38k|}
threads_common.c:init_master_key:
  216|      1|{
  217|       |    /*
  218|       |     * Note: We assign a cleanup function here, which is atypical for
  219|       |     * uses of CRYPTO_THREAD_init_local.  This is because, nominally
  220|       |     * we expect that the use of ossl_init_thread_start will be used
  221|       |     * to notify openssl of exiting threads.  However, in this case
  222|       |     * we want the metadata for this interface (the sparse arrays) to
  223|       |     * stay valid until the thread actually exits, which is what the
  224|       |     * clean_master_key function does.  Data held in the sparse arrays
  225|       |     * (that is assigned via CRYPTO_THREAD_set_local_ex), are still expected
  226|       |     * to be cleaned via the ossl_init_thread_start/stop api.
  227|       |     */
  228|      1|    if (!CRYPTO_THREAD_init_local(&master_key, clean_master_key))
  ------------------
  |  Branch (228:9): [True: 0, False: 1]
  ------------------
  229|      0|        return;
  230|       |
  231|       |    /*
  232|       |     * Indicate that the key has been set up.
  233|       |     */
  234|      1|    master_key_init = 1;
  235|      1|}

ossl_rcu_write_lock:
  475|    808|{
  476|    808|    pthread_mutex_lock(&lock->write_lock);
  477|    808|    TSAN_FAKE_UNLOCK(&lock->write_lock);
  478|    808|}
ossl_rcu_write_unlock:
  481|    808|{
  482|    808|    TSAN_FAKE_LOCK(&lock->write_lock);
  483|    808|    pthread_mutex_unlock(&lock->write_lock);
  484|    808|}
ossl_synchronize_rcu:
  487|  1.61k|{
  488|  1.61k|    struct rcu_qp *qp;
  489|  1.61k|    uint64_t count;
  490|  1.61k|    uint32_t curr_id;
  491|  1.61k|    struct rcu_cb_item *cb_items, *tmpcb;
  492|       |
  493|  1.61k|    pthread_mutex_lock(&lock->write_lock);
  494|  1.61k|    cb_items = lock->cb_items;
  495|  1.61k|    lock->cb_items = NULL;
  496|  1.61k|    pthread_mutex_unlock(&lock->write_lock);
  497|       |
  498|  1.61k|    qp = update_qp(lock, &curr_id);
  499|       |
  500|       |    /* retire in order */
  501|  1.61k|    pthread_mutex_lock(&lock->prior_lock);
  502|  1.61k|    while (lock->next_to_retire != curr_id)
  ------------------
  |  Branch (502:12): [True: 0, False: 1.61k]
  ------------------
  503|      0|        pthread_cond_wait(&lock->prior_signal, &lock->prior_lock);
  504|       |
  505|       |    /*
  506|       |     * wait for the reader count to reach zero
  507|       |     * Note the use of __ATOMIC_ACQUIRE here to ensure that any
  508|       |     * prior __ATOMIC_RELEASE write operation in ossl_rcu_read_unlock
  509|       |     * is visible prior to our read
  510|       |     * however this is likely just necessary to silence a tsan warning
  511|       |     * because the read side should not do any write operation
  512|       |     * outside the atomic itself
  513|       |     */
  514|  1.61k|    do {
  515|  1.61k|        count = ATOMIC_LOAD_N(uint64_t, &qp->users, __ATOMIC_ACQUIRE);
  ------------------
  |  |  122|  1.61k|#define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  516|  1.61k|    } while (count != (uint64_t)0);
  ------------------
  |  Branch (516:14): [True: 0, False: 1.61k]
  ------------------
  517|       |
  518|  1.61k|    lock->next_to_retire++;
  519|  1.61k|    pthread_cond_broadcast(&lock->prior_signal);
  520|  1.61k|    pthread_mutex_unlock(&lock->prior_lock);
  521|       |
  522|  1.61k|    retire_qp(lock, qp);
  523|       |
  524|       |    /* handle any callbacks that we have */
  525|  2.42k|    while (cb_items != NULL) {
  ------------------
  |  Branch (525:12): [True: 808, False: 1.61k]
  ------------------
  526|    808|        tmpcb = cb_items;
  527|    808|        cb_items = cb_items->next;
  528|    808|        tmpcb->fn(tmpcb->data);
  529|    808|        OPENSSL_free(tmpcb);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  530|    808|    }
  531|  1.61k|}
ossl_rcu_cb_item_new:
  534|    808|{
  535|    808|    return OPENSSL_zalloc(sizeof(CRYPTO_RCU_CB_ITEM));
  ------------------
  |  |  109|    808|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  536|    808|}
ossl_rcu_call:
  549|    808|{
  550|    808|    item->fn = cb;
  551|    808|    item->data = data;
  552|    808|    item->next = lock->cb_items;
  553|    808|    lock->cb_items = item;
  554|    808|}
ossl_rcu_uptr_deref:
  557|  18.4M|{
  558|  18.4M|    return ATOMIC_LOAD_N(pvoid, p, __ATOMIC_ACQUIRE);
  ------------------
  |  |  122|  18.4M|#define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  559|  18.4M|}
ossl_rcu_assign_uptr:
  562|   424k|{
  563|   424k|    ATOMIC_STORE(pvoid, p, v, __ATOMIC_RELEASE);
  ------------------
  |  |  124|   424k|#define ATOMIC_STORE(t, p, v, o) __atomic_store(p, v, o)
  ------------------
  564|   424k|}
ossl_rcu_lock_new:
  567|    809|{
  568|    809|    struct rcu_lock_st *new;
  569|    809|    pthread_mutex_t *mutexes[3] = { NULL };
  570|    809|    pthread_cond_t *conds[2] = { NULL };
  571|    809|    int i;
  572|       |
  573|       |    /*
  574|       |     * We need a minimum of 2 qp's
  575|       |     */
  576|    809|    if (num_writers < 2)
  ------------------
  |  Branch (576:9): [True: 809, False: 0]
  ------------------
  577|    809|        num_writers = 2;
  578|       |
  579|    809|    ctx = ossl_lib_ctx_get_concrete(ctx);
  580|    809|    if (ctx == NULL)
  ------------------
  |  Branch (580:9): [True: 0, False: 809]
  ------------------
  581|      0|        return 0;
  582|       |
  583|    809|    new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  584|    809|    if (new == NULL)
  ------------------
  |  Branch (584:9): [True: 0, False: 809]
  ------------------
  585|      0|        return NULL;
  586|       |
  587|    809|    new->ctx = ctx;
  588|    809|    i = 0;
  589|    809|    mutexes[i] = pthread_mutex_init(&new->write_lock, NULL) == 0 ? &new->write_lock : NULL;
  ------------------
  |  Branch (589:18): [True: 809, False: 0]
  ------------------
  590|    809|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (590:9): [True: 0, False: 809]
  ------------------
  591|      0|        goto err;
  592|    809|    mutexes[i] = pthread_mutex_init(&new->prior_lock, NULL) == 0 ? &new->prior_lock : NULL;
  ------------------
  |  Branch (592:18): [True: 809, False: 0]
  ------------------
  593|    809|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (593:9): [True: 0, False: 809]
  ------------------
  594|      0|        goto err;
  595|    809|    mutexes[i] = pthread_mutex_init(&new->alloc_lock, NULL) == 0 ? &new->alloc_lock : NULL;
  ------------------
  |  Branch (595:18): [True: 809, False: 0]
  ------------------
  596|    809|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (596:9): [True: 0, False: 809]
  ------------------
  597|      0|        goto err;
  598|    809|    conds[i - 3] = pthread_cond_init(&new->prior_signal, NULL) == 0 ? &new->prior_signal : NULL;
  ------------------
  |  Branch (598:20): [True: 809, False: 0]
  ------------------
  599|    809|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (599:9): [True: 0, False: 809]
  ------------------
  600|      0|        goto err;
  601|    809|    i++;
  602|    809|    conds[i - 3] = pthread_cond_init(&new->alloc_signal, NULL) == 0 ? &new->alloc_signal : NULL;
  ------------------
  |  Branch (602:20): [True: 809, False: 0]
  ------------------
  603|    809|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (603:9): [True: 0, False: 809]
  ------------------
  604|      0|        goto err;
  605|    809|    i++;
  606|    809|    new->qp_group = allocate_new_qp_group(new, num_writers);
  607|    809|    if (new->qp_group == NULL)
  ------------------
  |  Branch (607:9): [True: 0, False: 809]
  ------------------
  608|      0|        goto err;
  609|       |
  610|    809|    return new;
  611|       |
  612|      0|err:
  613|      0|    for (i = 0; i < 3; i++)
  ------------------
  |  Branch (613:17): [True: 0, False: 0]
  ------------------
  614|      0|        if (mutexes[i] != NULL)
  ------------------
  |  Branch (614:13): [True: 0, False: 0]
  ------------------
  615|      0|            pthread_mutex_destroy(mutexes[i]);
  616|      0|    for (i = 0; i < 2; i++)
  ------------------
  |  Branch (616:17): [True: 0, False: 0]
  ------------------
  617|      0|        if (conds[i] != NULL)
  ------------------
  |  Branch (617:13): [True: 0, False: 0]
  ------------------
  618|      0|            pthread_cond_destroy(conds[i]);
  619|      0|    OPENSSL_free(new->qp_group);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  620|      0|    OPENSSL_free(new);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  621|       |    return NULL;
  622|    809|}
ossl_rcu_lock_free:
  625|    808|{
  626|    808|    struct rcu_lock_st *rlock = (struct rcu_lock_st *)lock;
  627|       |
  628|    808|    if (lock == NULL)
  ------------------
  |  Branch (628:9): [True: 0, False: 808]
  ------------------
  629|      0|        return;
  630|       |
  631|       |    /* make sure we're synchronized */
  632|    808|    ossl_synchronize_rcu(rlock);
  633|       |
  634|    808|    OPENSSL_free(rlock->qp_group);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  635|       |    /*
  636|       |     * Some targets (BSD) allocate heap when initializing
  637|       |     * a mutex or condition, to prevent leaks, those need
  638|       |     * to be destroyed here
  639|       |     */
  640|    808|    pthread_mutex_destroy(&rlock->write_lock);
  641|    808|    pthread_mutex_destroy(&rlock->prior_lock);
  642|    808|    pthread_mutex_destroy(&rlock->alloc_lock);
  643|    808|    pthread_cond_destroy(&rlock->prior_signal);
  644|    808|    pthread_cond_destroy(&rlock->alloc_signal);
  645|       |
  646|       |    /* There should only be a single qp left now */
  647|    808|    OPENSSL_free(rlock);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  648|    808|}
CRYPTO_THREAD_lock_new:
  909|  1.90M|{
  910|  1.90M|#ifdef USE_RWLOCK
  911|  1.90M|    CRYPTO_RWLOCK *lock;
  912|       |
  913|  1.90M|    ossl_init_rwlock_contention_data();
  914|       |
  915|  1.90M|    if ((lock = OPENSSL_zalloc(sizeof(pthread_rwlock_t))) == NULL)
  ------------------
  |  |  109|  1.90M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (915:9): [True: 0, False: 1.90M]
  ------------------
  916|       |        /* Don't set error, to avoid recursion blowup. */
  917|      0|        return NULL;
  918|       |
  919|  1.90M|    if (pthread_rwlock_init(lock, NULL) != 0) {
  ------------------
  |  Branch (919:9): [True: 0, False: 1.90M]
  ------------------
  920|      0|        OPENSSL_free(lock);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  921|      0|        return NULL;
  922|      0|    }
  923|       |#else
  924|       |    pthread_mutexattr_t attr;
  925|       |    CRYPTO_RWLOCK *lock;
  926|       |
  927|       |    if ((lock = OPENSSL_zalloc(sizeof(pthread_mutex_t))) == NULL)
  928|       |        /* Don't set error, to avoid recursion blowup. */
  929|       |        return NULL;
  930|       |
  931|       |    /*
  932|       |     * We don't use recursive mutexes, but try to catch errors if we do.
  933|       |     */
  934|       |    pthread_mutexattr_init(&attr);
  935|       |#if !defined(__TANDEM) && !defined(_SPT_MODEL_)
  936|       |#if !defined(NDEBUG) && !defined(OPENSSL_NO_MUTEX_ERRORCHECK)
  937|       |    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
  938|       |#endif
  939|       |#else
  940|       |    /* The SPT Thread Library does not define MUTEX attributes. */
  941|       |#endif
  942|       |
  943|       |    if (pthread_mutex_init(lock, &attr) != 0) {
  944|       |        pthread_mutexattr_destroy(&attr);
  945|       |        OPENSSL_free(lock);
  946|       |        return NULL;
  947|       |    }
  948|       |
  949|       |    pthread_mutexattr_destroy(&attr);
  950|       |#endif
  951|       |
  952|  1.90M|    return lock;
  953|  1.90M|}
CRYPTO_THREAD_read_lock:
  956|  15.8M|{
  957|  15.8M|#ifdef USE_RWLOCK
  958|  15.8M|    if (!ossl_assert(ossl_rwlock_rdlock(lock) == 0))
  ------------------
  |  |   52|  15.8M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  15.8M|    __FILE__, __LINE__)
  ------------------
  |  Branch (958:9): [True: 0, False: 15.8M]
  ------------------
  959|      0|        return 0;
  960|       |#else
  961|       |    if (pthread_mutex_lock(lock) != 0) {
  962|       |        assert(errno != EDEADLK && errno != EBUSY);
  963|       |        return 0;
  964|       |    }
  965|       |#endif
  966|       |
  967|  15.8M|    return 1;
  968|  15.8M|}
CRYPTO_THREAD_write_lock:
  971|  2.06M|{
  972|  2.06M|#ifdef USE_RWLOCK
  973|  2.06M|    if (!ossl_assert(ossl_rwlock_wrlock(lock) == 0))
  ------------------
  |  |   52|  2.06M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.06M|    __FILE__, __LINE__)
  ------------------
  |  Branch (973:9): [True: 0, False: 2.06M]
  ------------------
  974|      0|        return 0;
  975|       |#else
  976|       |    if (pthread_mutex_lock(lock) != 0) {
  977|       |        assert(errno != EDEADLK && errno != EBUSY);
  978|       |        return 0;
  979|       |    }
  980|       |#endif
  981|       |
  982|  2.06M|    return 1;
  983|  2.06M|}
CRYPTO_THREAD_unlock:
  986|  17.8M|{
  987|  17.8M|#ifdef USE_RWLOCK
  988|  17.8M|    if (ossl_rwlock_unlock(lock) != 0)
  ------------------
  |  Branch (988:9): [True: 0, False: 17.8M]
  ------------------
  989|      0|        return 0;
  990|       |#else
  991|       |    if (pthread_mutex_unlock(lock) != 0) {
  992|       |        assert(errno != EPERM);
  993|       |        return 0;
  994|       |    }
  995|       |#endif
  996|       |
  997|  17.8M|    return 1;
  998|  17.8M|}
CRYPTO_THREAD_lock_free:
 1001|  1.90M|{
 1002|  1.90M|    if (lock == NULL)
  ------------------
  |  Branch (1002:9): [True: 1.99k, False: 1.90M]
  ------------------
 1003|  1.99k|        return;
 1004|       |
 1005|  1.90M|#ifdef USE_RWLOCK
 1006|  1.90M|    pthread_rwlock_destroy(lock);
 1007|       |#else
 1008|       |    pthread_mutex_destroy(lock);
 1009|       |#endif
 1010|  1.90M|    OPENSSL_free(lock);
  ------------------
  |  |  132|  1.90M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1011|       |
 1012|  1.90M|    return;
 1013|  1.90M|}
CRYPTO_THREAD_run_once:
 1016|  78.0M|{
 1017|  78.0M|    if (ossl_unlikely(pthread_once(once, init) != 0))
  ------------------
  |  |   23|  78.0M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 78.0M]
  |  |  ------------------
  ------------------
 1018|      0|        return 0;
 1019|       |
 1020|  78.0M|    return 1;
 1021|  78.0M|}
CRYPTO_THREAD_init_local:
 1024|      4|{
 1025|      4|    if (pthread_key_create(key, cleanup) != 0)
  ------------------
  |  Branch (1025:9): [True: 0, False: 4]
  ------------------
 1026|      0|        return 0;
 1027|       |
 1028|      4|    return 1;
 1029|      4|}
CRYPTO_THREAD_get_local:
 1032|  38.3M|{
 1033|  38.3M|    return pthread_getspecific(*key);
 1034|  38.3M|}
CRYPTO_THREAD_set_local:
 1037|      3|{
 1038|      3|    if (pthread_setspecific(*key, val) != 0)
  ------------------
  |  Branch (1038:9): [True: 0, False: 3]
  ------------------
 1039|      0|        return 0;
 1040|       |
 1041|      3|    return 1;
 1042|      3|}
CRYPTO_atomic_add:
 1063|   338k|{
 1064|   338k|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1065|   338k|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1065:9): [True: 338k, Folded]
  ------------------
 1066|   338k|        *ret = __atomic_add_fetch(val, amount, __ATOMIC_ACQ_REL);
 1067|   338k|        return 1;
 1068|   338k|    }
 1069|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1070|       |    /* This will work for all future Solaris versions. */
 1071|       |    if (ret != NULL) {
 1072|       |        *ret = atomic_add_int_nv((volatile unsigned int *)val, amount);
 1073|       |        return 1;
 1074|       |    }
 1075|       |#endif
 1076|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1076:9): [True: 0, False: 0]
  |  Branch (1076:25): [True: 0, False: 0]
  ------------------
 1077|      0|        return 0;
 1078|       |
 1079|      0|    *val += amount;
 1080|      0|    *ret = *val;
 1081|       |
 1082|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1082:9): [True: 0, False: 0]
  ------------------
 1083|      0|        return 0;
 1084|       |
 1085|      0|    return 1;
 1086|      0|}
CRYPTO_atomic_or:
 1142|      3|{
 1143|      3|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1144|      3|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1144:9): [True: 3, Folded]
  ------------------
 1145|      3|        *ret = __atomic_or_fetch(val, op, __ATOMIC_ACQ_REL);
 1146|      3|        return 1;
 1147|      3|    }
 1148|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1149|       |    /* This will work for all future Solaris versions. */
 1150|       |    if (ret != NULL) {
 1151|       |        *ret = atomic_or_64_nv(val, op);
 1152|       |        return 1;
 1153|       |    }
 1154|       |#endif
 1155|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1155:9): [True: 0, False: 0]
  |  Branch (1155:25): [True: 0, False: 0]
  ------------------
 1156|      0|        return 0;
 1157|      0|    *val |= op;
 1158|      0|    *ret = *val;
 1159|       |
 1160|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1160:9): [True: 0, False: 0]
  ------------------
 1161|      0|        return 0;
 1162|       |
 1163|      0|    return 1;
 1164|      0|}
CRYPTO_atomic_load:
 1167|  35.3M|{
 1168|  35.3M|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1169|  35.3M|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1169:9): [True: 35.3M, Folded]
  ------------------
 1170|  35.3M|        __atomic_load(val, ret, __ATOMIC_ACQUIRE);
 1171|  35.3M|        return 1;
 1172|  35.3M|    }
 1173|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1174|       |    /* This will work for all future Solaris versions. */
 1175|       |    if (ret != NULL) {
 1176|       |        *ret = atomic_or_64_nv(val, 0);
 1177|       |        return 1;
 1178|       |    }
 1179|       |#endif
 1180|      0|    if (lock == NULL || !CRYPTO_THREAD_read_lock(lock))
  ------------------
  |  Branch (1180:9): [True: 0, False: 0]
  |  Branch (1180:25): [True: 0, False: 0]
  ------------------
 1181|      0|        return 0;
 1182|      0|    *ret = *val;
 1183|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1183:9): [True: 0, False: 0]
  ------------------
 1184|      0|        return 0;
 1185|       |
 1186|      0|    return 1;
 1187|      0|}
CRYPTO_atomic_store:
 1190|   423k|{
 1191|   423k|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1192|   423k|    if (__atomic_is_lock_free(sizeof(*dst), dst)) {
  ------------------
  |  Branch (1192:9): [True: 423k, Folded]
  ------------------
 1193|   423k|        __atomic_store(dst, &val, __ATOMIC_RELEASE);
 1194|   423k|        return 1;
 1195|   423k|    }
 1196|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1197|       |    /* This will work for all future Solaris versions. */
 1198|       |    if (dst != NULL) {
 1199|       |        atomic_swap_64(dst, val);
 1200|       |        return 1;
 1201|       |    }
 1202|       |#endif
 1203|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1203:9): [True: 0, False: 0]
  |  Branch (1203:25): [True: 0, False: 0]
  ------------------
 1204|      0|        return 0;
 1205|      0|    *dst = val;
 1206|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1206:9): [True: 0, False: 0]
  ------------------
 1207|      0|        return 0;
 1208|       |
 1209|      0|    return 1;
 1210|      0|}
openssl_get_fork_id:
 1266|  34.4k|{
 1267|  34.4k|    return getpid();
 1268|  34.4k|}
threads_pthread.c:update_qp:
  412|  1.61k|{
  413|  1.61k|    uint32_t current_idx;
  414|       |
  415|  1.61k|    pthread_mutex_lock(&lock->alloc_lock);
  416|       |
  417|       |    /*
  418|       |     * we need at least one qp to be available with one
  419|       |     * left over, so that readers can start working on
  420|       |     * one that isn't yet being waited on
  421|       |     */
  422|  1.61k|    while (lock->group_count - lock->writers_alloced < 2)
  ------------------
  |  Branch (422:12): [True: 0, False: 1.61k]
  ------------------
  423|       |        /* we have to wait for one to be free */
  424|      0|        pthread_cond_wait(&lock->alloc_signal, &lock->alloc_lock);
  425|       |
  426|  1.61k|    current_idx = lock->current_alloc_idx;
  427|       |
  428|       |    /* Allocate the qp */
  429|  1.61k|    lock->writers_alloced++;
  430|       |
  431|       |    /* increment the allocation index */
  432|  1.61k|    lock->current_alloc_idx = (lock->current_alloc_idx + 1) % lock->group_count;
  433|       |
  434|  1.61k|    *curr_id = lock->id_ctr;
  435|  1.61k|    lock->id_ctr++;
  436|       |
  437|       |    /*
  438|       |     * make the current state of everything visible by this release
  439|       |     * when get_hold_current_qp acquires the next qp
  440|       |     */
  441|  1.61k|    ATOMIC_STORE_N(uint32_t, &lock->reader_idx, lock->current_alloc_idx,
  ------------------
  |  |  123|  1.61k|#define ATOMIC_STORE_N(t, p, v, o) __atomic_store_n(p, v, o)
  ------------------
  442|  1.61k|        __ATOMIC_RELEASE);
  443|       |
  444|       |    /*
  445|       |     * this should make sure that the new value of reader_idx is visible in
  446|       |     * get_hold_current_qp, directly after incrementing the users count
  447|       |     */
  448|  1.61k|    ATOMIC_ADD_FETCH(&lock->qp_group[current_idx].users, (uint64_t)0,
  ------------------
  |  |  125|  1.61k|#define ATOMIC_ADD_FETCH(p, v, o) __atomic_add_fetch(p, v, o)
  ------------------
  449|  1.61k|        __ATOMIC_RELEASE);
  450|       |
  451|       |    /* wake up any waiters */
  452|  1.61k|    pthread_cond_signal(&lock->alloc_signal);
  453|  1.61k|    pthread_mutex_unlock(&lock->alloc_lock);
  454|  1.61k|    return &lock->qp_group[current_idx];
  455|  1.61k|}
threads_pthread.c:retire_qp:
  458|  1.61k|{
  459|  1.61k|    pthread_mutex_lock(&lock->alloc_lock);
  460|  1.61k|    lock->writers_alloced--;
  461|  1.61k|    pthread_cond_signal(&lock->alloc_signal);
  462|  1.61k|    pthread_mutex_unlock(&lock->alloc_lock);
  463|  1.61k|}
threads_pthread.c:allocate_new_qp_group:
  467|    809|{
  468|    809|    struct rcu_qp *new = OPENSSL_calloc(count, sizeof(*new));
  ------------------
  |  |  113|    809|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  469|       |
  470|    809|    lock->group_count = count;
  471|    809|    return new;
  472|    809|}
threads_pthread.c:ossl_init_rwlock_contention_data:
  888|  1.90M|{
  889|  1.90M|}
threads_pthread.c:ossl_rwlock_rdlock:
  892|  15.8M|{
  893|  15.8M|    return pthread_rwlock_rdlock(rwlock);
  894|  15.8M|}
threads_pthread.c:ossl_rwlock_wrlock:
  897|  2.06M|{
  898|  2.06M|    return pthread_rwlock_wrlock(rwlock);
  899|  2.06M|}
threads_pthread.c:ossl_rwlock_unlock:
  902|  17.8M|{
  903|  17.8M|    return pthread_rwlock_unlock(rwlock);
  904|  17.8M|}

ossl_time_now:
   16|  5.05k|{
   17|  5.05k|    OSSL_TIME r;
   18|       |
   19|       |#if defined(_WIN32) && !defined(OPENSSL_SYS_UEFI)
   20|       |    SYSTEMTIME st;
   21|       |    union {
   22|       |        unsigned __int64 ul;
   23|       |        FILETIME ft;
   24|       |    } now;
   25|       |
   26|       |    GetSystemTime(&st);
   27|       |    SystemTimeToFileTime(&st, &now.ft);
   28|       |    /* re-bias to 1/1/1970 */
   29|       |#ifdef __MINGW32__
   30|       |    now.ul -= 116444736000000000ULL;
   31|       |#else
   32|       |    now.ul -= 116444736000000000UI64;
   33|       |#endif
   34|       |    r.t = ((uint64_t)now.ul) * (OSSL_TIME_SECOND / 10000000);
   35|       |#else /* defined(_WIN32) */
   36|  5.05k|    struct timeval t;
   37|       |
   38|  5.05k|    if (gettimeofday(&t, NULL) < 0) {
  ------------------
  |  Branch (38:9): [True: 0, False: 5.05k]
  ------------------
   39|      0|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
   40|      0|            "calling gettimeofday()");
   41|      0|        return ossl_time_zero();
   42|      0|    }
   43|  5.05k|    if (t.tv_sec <= 0)
  ------------------
  |  Branch (43:9): [True: 0, False: 5.05k]
  ------------------
   44|      0|        r.t = t.tv_usec <= 0 ? 0 : t.tv_usec * OSSL_TIME_US;
  ------------------
  |  |   37|      0|#define OSSL_TIME_US (OSSL_TIME_MS / 1000)
  |  |  ------------------
  |  |  |  |   34|      0|#define OSSL_TIME_MS (OSSL_TIME_SECOND / 1000)
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|      0|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (44:15): [True: 0, False: 0]
  ------------------
   45|  5.05k|    else
   46|  5.05k|        r.t = ((uint64_t)t.tv_sec * 1000000 + t.tv_usec) * OSSL_TIME_US;
  ------------------
  |  |   37|  5.05k|#define OSSL_TIME_US (OSSL_TIME_MS / 1000)
  |  |  ------------------
  |  |  |  |   34|  5.05k|#define OSSL_TIME_MS (OSSL_TIME_SECOND / 1000)
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  5.05k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   47|  5.05k|#endif /* defined(_WIN32) */
   48|  5.05k|    return r;
   49|  5.05k|}

ossl_err_load_TS_strings:
   82|      1|{
   83|      1|#ifndef OPENSSL_NO_ERR
   84|      1|    if (ERR_reason_error_string(TS_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (84:9): [True: 1, False: 0]
  ------------------
   85|      1|        ERR_load_strings_const(TS_str_reasons);
   86|      1|#endif
   87|      1|    return 1;
   88|      1|}

ossl_err_load_UI_strings:
   41|      1|{
   42|      1|#ifndef OPENSSL_NO_ERR
   43|      1|    if (ERR_reason_error_string(UI_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (43:9): [True: 1, False: 0]
  ------------------
   44|      1|        ERR_load_strings_const(UI_str_reasons);
   45|      1|#endif
   46|      1|    return 1;
   47|      1|}

X509_LOOKUP_hash_dir:
   78|  4.16k|{
   79|  4.16k|    return &x509_dir_lookup;
   80|  4.16k|}
by_dir.c:new_dir:
  109|  2.33k|{
  110|  2.33k|    BY_DIR *a = OPENSSL_malloc(sizeof(*a));
  ------------------
  |  |  107|  2.33k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|       |
  112|  2.33k|    if (a == NULL)
  ------------------
  |  Branch (112:9): [True: 0, False: 2.33k]
  ------------------
  113|      0|        return 0;
  114|       |
  115|  2.33k|    if ((a->buffer = BUF_MEM_new()) == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 2.33k]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_X509, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|  2.33k|    a->dirs = NULL;
  120|  2.33k|    a->lock = CRYPTO_THREAD_lock_new();
  121|  2.33k|    if (a->lock == NULL) {
  ------------------
  |  Branch (121:9): [True: 0, False: 2.33k]
  ------------------
  122|      0|        BUF_MEM_free(a->buffer);
  123|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|        goto err;
  125|      0|    }
  126|  2.33k|    lu->method_data = a;
  127|  2.33k|    return 1;
  128|       |
  129|      0|err:
  130|      0|    OPENSSL_free(a);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  131|      0|    return 0;
  132|  2.33k|}
by_dir.c:free_dir:
  157|  2.33k|{
  158|  2.33k|    BY_DIR *a = (BY_DIR *)lu->method_data;
  159|       |
  160|  2.33k|    sk_BY_DIR_ENTRY_pop_free(a->dirs, by_dir_entry_free);
  161|  2.33k|    BUF_MEM_free(a->buffer);
  162|  2.33k|    CRYPTO_THREAD_lock_free(a->lock);
  163|  2.33k|    OPENSSL_free(a);
  ------------------
  |  |  132|  2.33k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  164|  2.33k|}
by_dir.c:by_dir_entry_free:
  150|  4.79k|{
  151|  4.79k|    OPENSSL_free(ent->dir);
  ------------------
  |  |  132|  4.79k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|  4.79k|    sk_BY_DIR_HASH_pop_free(ent->hashes, by_dir_hash_free);
  153|  4.79k|    OPENSSL_free(ent);
  ------------------
  |  |  132|  4.79k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|  4.79k|}
by_dir.c:dir_ctrl:
   84|  4.16k|{
   85|  4.16k|    int ret = 0;
   86|  4.16k|    BY_DIR *ld = (BY_DIR *)ctx->method_data;
   87|       |
   88|  4.16k|    switch (cmd) {
  ------------------
  |  Branch (88:13): [True: 4.16k, False: 0]
  ------------------
   89|  4.16k|    case X509_L_ADD_DIR:
  ------------------
  |  |  284|  4.16k|#define X509_L_ADD_DIR 2
  ------------------
  |  Branch (89:5): [True: 4.16k, False: 0]
  ------------------
   90|  4.16k|        if (argl == X509_FILETYPE_DEFAULT) {
  ------------------
  |  |  170|  4.16k|#define X509_FILETYPE_DEFAULT 3
  ------------------
  |  Branch (90:13): [True: 0, False: 4.16k]
  ------------------
   91|      0|            const char *dir = ossl_safe_getenv(X509_get_default_cert_dir_env());
   92|       |
   93|      0|            if (dir)
  ------------------
  |  Branch (93:17): [True: 0, False: 0]
  ------------------
   94|      0|                ret = add_cert_dir(ld, dir, X509_FILETYPE_PEM);
  ------------------
  |  |  168|      0|#define X509_FILETYPE_PEM 1
  ------------------
   95|      0|            else
   96|      0|                ret = add_cert_dir(ld, X509_get_default_cert_dir(),
   97|      0|                    X509_FILETYPE_PEM);
  ------------------
  |  |  168|      0|#define X509_FILETYPE_PEM 1
  ------------------
   98|      0|            if (!ret) {
  ------------------
  |  Branch (98:17): [True: 0, False: 0]
  ------------------
   99|      0|                ERR_raise(ERR_LIB_X509, X509_R_LOADING_CERT_DIR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|            }
  101|      0|        } else
  102|  4.16k|            ret = add_cert_dir(ld, argp, (int)argl);
  103|  4.16k|        break;
  104|  4.16k|    }
  105|  4.16k|    return ret;
  106|  4.16k|}
by_dir.c:add_cert_dir:
  167|  4.16k|{
  168|  4.16k|    int j;
  169|  4.16k|    size_t len;
  170|  4.16k|    const char *s, *ss, *p;
  171|       |
  172|  4.16k|    if (dir == NULL || *dir == '\0') {
  ------------------
  |  Branch (172:9): [True: 0, False: 4.16k]
  |  Branch (172:24): [True: 9, False: 4.15k]
  ------------------
  173|      9|        ERR_raise(ERR_LIB_X509, X509_R_INVALID_DIRECTORY);
  ------------------
  |  |  357|      9|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      9|    (ERR_new(),                                                  \
  |  |  |  |  360|      9|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      9|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      9|        ERR_set_error)
  |  |  ------------------
  ------------------
  174|      9|        return 0;
  175|      9|    }
  176|       |
  177|  4.15k|    s = dir;
  178|  4.15k|    p = s;
  179|   151k|    do {
  180|   151k|        if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0')) {
  ------------------
  |  |  226|   151k|#define LIST_SEPARATOR_CHAR ':'
  ------------------
  |  Branch (180:13): [True: 19.4k, False: 132k]
  |  Branch (180:44): [True: 4.15k, False: 128k]
  ------------------
  181|  23.6k|            BY_DIR_ENTRY *ent;
  182|       |
  183|  23.6k|            ss = s;
  184|  23.6k|            s = p + 1;
  185|  23.6k|            len = p - ss;
  186|  23.6k|            if (len == 0)
  ------------------
  |  Branch (186:17): [True: 9.68k, False: 13.9k]
  ------------------
  187|  9.68k|                continue;
  188|   429k|            for (j = 0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++) {
  ------------------
  |  Branch (188:25): [True: 424k, False: 4.79k]
  ------------------
  189|   424k|                ent = sk_BY_DIR_ENTRY_value(ctx->dirs, j);
  190|   424k|                if (strlen(ent->dir) == len && strncmp(ent->dir, ss, len) == 0)
  ------------------
  |  Branch (190:21): [True: 56.5k, False: 368k]
  |  Branch (190:48): [True: 9.14k, False: 47.4k]
  ------------------
  191|  9.14k|                    break;
  192|   424k|            }
  193|  13.9k|            if (j < sk_BY_DIR_ENTRY_num(ctx->dirs))
  ------------------
  |  Branch (193:17): [True: 9.14k, False: 4.79k]
  ------------------
  194|  9.14k|                continue;
  195|  4.79k|            if (ctx->dirs == NULL) {
  ------------------
  |  Branch (195:17): [True: 2.33k, False: 2.46k]
  ------------------
  196|  2.33k|                ctx->dirs = sk_BY_DIR_ENTRY_new_null();
  197|  2.33k|                if (!ctx->dirs) {
  ------------------
  |  Branch (197:21): [True: 0, False: 2.33k]
  ------------------
  198|      0|                    ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  199|      0|                    return 0;
  200|      0|                }
  201|  2.33k|            }
  202|  4.79k|            ent = OPENSSL_malloc(sizeof(*ent));
  ------------------
  |  |  107|  4.79k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  203|  4.79k|            if (ent == NULL)
  ------------------
  |  Branch (203:17): [True: 0, False: 4.79k]
  ------------------
  204|      0|                return 0;
  205|  4.79k|            ent->dir_type = type;
  206|  4.79k|            ent->hashes = sk_BY_DIR_HASH_new(by_dir_hash_cmp);
  207|  4.79k|            ent->dir = OPENSSL_strndup(ss, len);
  ------------------
  |  |  138|  4.79k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|  4.79k|            if (ent->dir == NULL || ent->hashes == NULL) {
  ------------------
  |  Branch (208:17): [True: 0, False: 4.79k]
  |  Branch (208:37): [True: 0, False: 4.79k]
  ------------------
  209|      0|                by_dir_entry_free(ent);
  210|      0|                return 0;
  211|      0|            }
  212|  4.79k|            if (!sk_BY_DIR_ENTRY_push(ctx->dirs, ent)) {
  ------------------
  |  Branch (212:17): [True: 0, False: 4.79k]
  ------------------
  213|      0|                by_dir_entry_free(ent);
  214|      0|                ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  215|      0|                return 0;
  216|      0|            }
  217|  4.79k|        }
  218|   151k|    } while (*p++ != '\0');
  ------------------
  |  Branch (218:14): [True: 147k, False: 4.15k]
  ------------------
  219|  4.15k|    return 1;
  220|  4.15k|}

X509_LOOKUP_file:
   44|  8.25k|{
   45|  8.25k|    return &x509_file_lookup;
   46|  8.25k|}
X509_load_crl_file:
  175|  3.73k|{
  176|  3.73k|    BIO *in = NULL;
  177|  3.73k|    int count = 0;
  178|  3.73k|    X509_CRL *x = NULL;
  179|       |
  180|  3.73k|    if (file == NULL) {
  ------------------
  |  Branch (180:9): [True: 0, False: 3.73k]
  ------------------
  181|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  182|      0|        goto err;
  183|      0|    }
  184|       |
  185|  3.73k|    in = BIO_new(BIO_s_file());
  186|       |
  187|  3.73k|    if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) {
  ------------------
  |  |  596|  3.73k|#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
  |  |  ------------------
  |  |  |  |  451|  3.73k|#define BIO_C_SET_FILENAME 108
  |  |  ------------------
  |  |  597|  3.73k|    BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |   85|  3.73k|#define BIO_CLOSE 0x01
  |  |  ------------------
  |  |                   BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |  217|  3.73k|#define BIO_FP_READ 0x02
  |  |  ------------------
  ------------------
  |  Branch (187:9): [True: 0, False: 3.73k]
  |  Branch (187:25): [True: 2, False: 3.72k]
  ------------------
  188|      2|        ERR_raise(ERR_LIB_X509, ERR_R_BIO_LIB);
  ------------------
  |  |  357|      2|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      2|    (ERR_new(),                                                  \
  |  |  |  |  360|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      2|        ERR_set_error)
  |  |  ------------------
  ------------------
  189|      2|        goto err;
  190|      2|    }
  191|       |
  192|  3.72k|    if (type == X509_FILETYPE_PEM) {
  ------------------
  |  |  168|  3.72k|#define X509_FILETYPE_PEM 1
  ------------------
  |  Branch (192:9): [True: 3.72k, False: 0]
  ------------------
  193|  3.72k|        for (;;) {
  194|  3.72k|            x = PEM_read_bio_X509_CRL(in, NULL, NULL, "");
  195|  3.72k|            if (x == NULL) {
  ------------------
  |  Branch (195:17): [True: 3.72k, False: 0]
  ------------------
  196|  3.72k|                if ((ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE) && (count > 0)) {
  ------------------
  |  |   44|  3.72k|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (196:21): [True: 3.72k, False: 0]
  |  Branch (196:87): [True: 0, False: 3.72k]
  ------------------
  197|      0|                    ERR_clear_error();
  198|      0|                    break;
  199|  3.72k|                } else {
  200|  3.72k|                    if (count == 0) {
  ------------------
  |  Branch (200:25): [True: 3.72k, False: 0]
  ------------------
  201|  3.72k|                        ERR_raise(ERR_LIB_X509, X509_R_NO_CRL_FOUND);
  ------------------
  |  |  357|  3.72k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  3.72k|    (ERR_new(),                                                  \
  |  |  |  |  360|  3.72k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  3.72k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  3.72k|        ERR_set_error)
  |  |  ------------------
  ------------------
  202|  3.72k|                    } else {
  203|      0|                        ERR_raise(ERR_LIB_X509, ERR_R_PEM_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  204|      0|                        count = 0;
  205|      0|                    }
  206|  3.72k|                    goto err;
  207|  3.72k|                }
  208|  3.72k|            }
  209|      0|            if (!X509_STORE_add_crl(ctx->store_ctx, x)) {
  ------------------
  |  Branch (209:17): [True: 0, False: 0]
  ------------------
  210|      0|                count = 0;
  211|      0|                goto err;
  212|      0|            }
  213|      0|            count++;
  214|      0|            X509_CRL_free(x);
  215|      0|            x = NULL;
  216|      0|        }
  217|  3.72k|    } else if (type == X509_FILETYPE_ASN1) {
  ------------------
  |  |  169|      0|#define X509_FILETYPE_ASN1 2
  ------------------
  |  Branch (217:16): [True: 0, False: 0]
  ------------------
  218|      0|        x = d2i_X509_CRL_bio(in, NULL);
  219|      0|        if (x == NULL) {
  ------------------
  |  Branch (219:13): [True: 0, False: 0]
  ------------------
  220|      0|            ERR_raise(ERR_LIB_X509, X509_R_NO_CRL_FOUND);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  221|      0|            goto err;
  222|      0|        }
  223|      0|        count = X509_STORE_add_crl(ctx->store_ctx, x);
  224|      0|    } else {
  225|      0|        ERR_raise(ERR_LIB_X509, X509_R_BAD_X509_FILETYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  226|      0|        goto err;
  227|      0|    }
  228|  3.73k|err:
  229|  3.73k|    X509_CRL_free(x);
  230|  3.73k|    BIO_free(in);
  231|  3.73k|    return count;
  232|  3.72k|}
X509_load_cert_crl_file_ex:
  236|  4.52k|{
  237|  4.52k|    STACK_OF(X509_INFO) *inf = NULL;
  ------------------
  |  |   33|  4.52k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  238|  4.52k|    X509_INFO *itmp = NULL;
  239|  4.52k|    BIO *in = NULL;
  240|  4.52k|    int i, count = 0;
  241|       |
  242|  4.52k|    if (type != X509_FILETYPE_PEM)
  ------------------
  |  |  168|  4.52k|#define X509_FILETYPE_PEM 1
  ------------------
  |  Branch (242:9): [True: 0, False: 4.52k]
  ------------------
  243|      0|        return X509_load_cert_file_ex(ctx, file, type, libctx, propq);
  244|       |#if defined(OPENSSL_SYS_WINDOWS)
  245|       |    in = BIO_new_file(file, "rb");
  246|       |#else
  247|  4.52k|    in = BIO_new_file(file, "r");
  248|  4.52k|#endif
  249|  4.52k|    if (in == NULL) {
  ------------------
  |  Branch (249:9): [True: 335, False: 4.18k]
  ------------------
  250|    335|        ERR_raise(ERR_LIB_X509, ERR_R_BIO_LIB);
  ------------------
  |  |  357|    335|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|    335|    (ERR_new(),                                                  \
  |  |  |  |  360|    335|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    335|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|    335|        ERR_set_error)
  |  |  ------------------
  ------------------
  251|    335|        return 0;
  252|    335|    }
  253|  4.18k|    inf = PEM_X509_INFO_read_bio_ex(in, NULL, NULL, "", libctx, propq);
  254|  4.18k|    BIO_free(in);
  255|  4.18k|    if (inf == NULL) {
  ------------------
  |  Branch (255:9): [True: 0, False: 4.18k]
  ------------------
  256|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PEM_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  257|      0|        return 0;
  258|      0|    }
  259|   507k|    for (i = 0; i < sk_X509_INFO_num(inf); i++) {
  ------------------
  |  |  397|   507k|#define sk_X509_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_X509_INFO_sk_type(sk))
  ------------------
  |  Branch (259:17): [True: 503k, False: 4.18k]
  ------------------
  260|   503k|        itmp = sk_X509_INFO_value(inf, i);
  ------------------
  |  |  398|   503k|#define sk_X509_INFO_value(sk, idx) ((X509_INFO *)OPENSSL_sk_value(ossl_check_const_X509_INFO_sk_type(sk), (idx)))
  ------------------
  261|   503k|        if (itmp->x509) {
  ------------------
  |  Branch (261:13): [True: 503k, False: 0]
  ------------------
  262|   503k|            if (!X509_STORE_add_cert(ctx->store_ctx, itmp->x509)) {
  ------------------
  |  Branch (262:17): [True: 0, False: 503k]
  ------------------
  263|      0|                count = 0;
  264|      0|                goto err;
  265|      0|            }
  266|   503k|            count++;
  267|   503k|        }
  268|   503k|        if (itmp->crl) {
  ------------------
  |  Branch (268:13): [True: 0, False: 503k]
  ------------------
  269|      0|            if (!X509_STORE_add_crl(ctx->store_ctx, itmp->crl)) {
  ------------------
  |  Branch (269:17): [True: 0, False: 0]
  ------------------
  270|      0|                count = 0;
  271|      0|                goto err;
  272|      0|            }
  273|      0|            count++;
  274|      0|        }
  275|   503k|    }
  276|  4.18k|    if (count == 0)
  ------------------
  |  Branch (276:9): [True: 29, False: 4.16k]
  ------------------
  277|  4.18k|        ERR_raise(ERR_LIB_X509, X509_R_NO_CERTIFICATE_OR_CRL_FOUND);
  ------------------
  |  |  357|     29|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     29|    (ERR_new(),                                                  \
  |  |  |  |  360|     29|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     29|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     29|        ERR_set_error)
  |  |  ------------------
  ------------------
  278|  4.18k|err:
  279|  4.18k|    sk_X509_INFO_pop_free(inf, X509_INFO_free);
  ------------------
  |  |  411|  4.18k|#define sk_X509_INFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_freefunc_type(freefunc))
  ------------------
  280|  4.18k|    return count;
  281|  4.18k|}
by_file.c:by_file_ctrl_ex:
   51|  4.52k|{
   52|  4.52k|    int ok = 0;
   53|  4.52k|    const char *file;
   54|       |
   55|  4.52k|    switch (cmd) {
  ------------------
  |  Branch (55:13): [True: 4.52k, False: 0]
  ------------------
   56|  4.52k|    case X509_L_FILE_LOAD:
  ------------------
  |  |  283|  4.52k|#define X509_L_FILE_LOAD 1
  ------------------
  |  Branch (56:5): [True: 4.52k, False: 0]
  ------------------
   57|  4.52k|        if (argl == X509_FILETYPE_DEFAULT) {
  ------------------
  |  |  170|  4.52k|#define X509_FILETYPE_DEFAULT 3
  ------------------
  |  Branch (57:13): [True: 0, False: 4.52k]
  ------------------
   58|      0|            file = ossl_safe_getenv(X509_get_default_cert_file_env());
   59|      0|            if (file)
  ------------------
  |  Branch (59:17): [True: 0, False: 0]
  ------------------
   60|      0|                ok = (X509_load_cert_crl_file_ex(ctx, file, X509_FILETYPE_PEM,
  ------------------
  |  |  168|      0|#define X509_FILETYPE_PEM 1
  ------------------
   61|      0|                          libctx, propq)
   62|      0|                    != 0);
   63|      0|            else
   64|      0|                ok = (X509_load_cert_crl_file_ex(
   65|      0|                          ctx, X509_get_default_cert_file(),
   66|      0|                          X509_FILETYPE_PEM, libctx, propq)
  ------------------
  |  |  168|      0|#define X509_FILETYPE_PEM 1
  ------------------
   67|      0|                    != 0);
   68|       |
   69|      0|            if (!ok)
  ------------------
  |  Branch (69:17): [True: 0, False: 0]
  ------------------
   70|      0|                ERR_raise(ERR_LIB_X509, X509_R_LOADING_DEFAULTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|  4.52k|        } else {
   72|  4.52k|            if (argl == X509_FILETYPE_PEM)
  ------------------
  |  |  168|  4.52k|#define X509_FILETYPE_PEM 1
  ------------------
  |  Branch (72:17): [True: 4.52k, False: 0]
  ------------------
   73|  4.52k|                ok = (X509_load_cert_crl_file_ex(ctx, argp, X509_FILETYPE_PEM,
  ------------------
  |  |  168|  4.52k|#define X509_FILETYPE_PEM 1
  ------------------
   74|  4.52k|                          libctx, propq)
   75|  4.52k|                    != 0);
   76|      0|            else
   77|      0|                ok = (X509_load_cert_file_ex(ctx, argp, (int)argl, libctx,
   78|      0|                          propq)
   79|      0|                    != 0);
   80|  4.52k|        }
   81|  4.52k|        break;
   82|  4.52k|    }
   83|  4.52k|    return ok;
   84|  4.52k|}

ossl_policy_cache_free:
  178|  1.00M|{
  179|  1.00M|    if (!cache)
  ------------------
  |  Branch (179:9): [True: 1.00M, False: 0]
  ------------------
  180|  1.00M|        return;
  181|      0|    ossl_policy_data_free(cache->anyPolicy);
  182|      0|    sk_X509_POLICY_DATA_pop_free(cache->data, ossl_policy_data_free);
  183|      0|    OPENSSL_free(cache);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|      0|}

OSSL_STACK_OF_X509_free:
   22|  89.4k|{
   23|  89.4k|    sk_X509_pop_free(certs, X509_free);
  ------------------
  |  |   96|  89.4k|#define sk_X509_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_sk_type(sk), ossl_check_X509_freefunc_type(freefunc))
  ------------------
   24|  89.4k|}

v3_crld.c:dpn_cb:
  308|   284k|{
  309|   284k|    DIST_POINT_NAME *dpn = (DIST_POINT_NAME *)*pval;
  310|       |
  311|   284k|    switch (operation) {
  ------------------
  |  Branch (311:13): [True: 94.7k, False: 189k]
  ------------------
  312|  47.3k|    case ASN1_OP_NEW_POST:
  ------------------
  |  |  732|  47.3k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (312:5): [True: 47.3k, False: 236k]
  ------------------
  313|  47.3k|        dpn->dpname = NULL;
  314|  47.3k|        break;
  315|       |
  316|  47.3k|    case ASN1_OP_FREE_POST:
  ------------------
  |  |  734|  47.3k|#define ASN1_OP_FREE_POST 3
  ------------------
  |  Branch (316:5): [True: 47.3k, False: 236k]
  ------------------
  317|  47.3k|        X509_NAME_free(dpn->dpname);
  318|  47.3k|        break;
  319|   284k|    }
  320|   284k|    return 1;
  321|   284k|}

X509V3_EXT_get_nid:
   54|  1.45M|{
   55|  1.45M|    X509V3_EXT_METHOD tmp;
   56|  1.45M|    const X509V3_EXT_METHOD *t = &tmp, *const * ret;
   57|  1.45M|    int idx;
   58|       |
   59|  1.45M|    if (nid < 0)
  ------------------
  |  Branch (59:9): [True: 0, False: 1.45M]
  ------------------
   60|      0|        return NULL;
   61|  1.45M|    tmp.ext_nid = nid;
   62|  1.45M|    ret = OBJ_bsearch_ext(&t, standard_exts, STANDARD_EXTENSION_COUNT);
  ------------------
  |  |   99|  1.45M|#define STANDARD_EXTENSION_COUNT OSSL_NELEM(standard_exts)
  |  |  ------------------
  |  |  |  |   14|  1.45M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
   63|  1.45M|    if (ret)
  ------------------
  |  Branch (63:9): [True: 1.45M, False: 0]
  ------------------
   64|  1.45M|        return *ret;
   65|      0|    if (!ext_list)
  ------------------
  |  Branch (65:9): [True: 0, False: 0]
  ------------------
   66|      0|        return NULL;
   67|       |    /* Ideally, this would be done under a lock */
   68|      0|    sk_X509V3_EXT_METHOD_sort(ext_list);
  ------------------
  |  |  135|      0|#define sk_X509V3_EXT_METHOD_sort(sk) OPENSSL_sk_sort(ossl_check_X509V3_EXT_METHOD_sk_type(sk))
  ------------------
   69|      0|    idx = sk_X509V3_EXT_METHOD_find(ext_list, &tmp);
  ------------------
  |  |  132|      0|#define sk_X509V3_EXT_METHOD_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_type(ptr))
  ------------------
   70|       |    /* A failure to locate the item is handled by the value method */
   71|      0|    return sk_X509V3_EXT_METHOD_value(ext_list, idx);
  ------------------
  |  |  116|      0|#define sk_X509V3_EXT_METHOD_value(sk, idx) ((X509V3_EXT_METHOD *)OPENSSL_sk_value(ossl_check_const_X509V3_EXT_METHOD_sk_type(sk), (idx)))
  ------------------
   72|      0|}
X509V3_EXT_get:
   75|  1.45M|{
   76|  1.45M|    int nid;
   77|  1.45M|    if ((nid = OBJ_obj2nid(X509_EXTENSION_get_object(ext))) == NID_undef)
  ------------------
  |  |   18|  1.45M|#define NID_undef                       0
  ------------------
  |  Branch (77:9): [True: 0, False: 1.45M]
  ------------------
   78|      0|        return NULL;
   79|  1.45M|    return X509V3_EXT_get_nid(nid);
   80|  1.45M|}
X509V3_EXT_d2i:
  168|  1.45M|{
  169|  1.45M|    const X509V3_EXT_METHOD *method;
  170|  1.45M|    const unsigned char *p;
  171|  1.45M|    const ASN1_STRING *extvalue;
  172|  1.45M|    int extlen;
  173|       |
  174|  1.45M|    if ((method = X509V3_EXT_get(ext)) == NULL)
  ------------------
  |  Branch (174:9): [True: 0, False: 1.45M]
  ------------------
  175|      0|        return NULL;
  176|  1.45M|    extvalue = X509_EXTENSION_get_data(ext);
  177|  1.45M|    p = ASN1_STRING_get0_data(extvalue);
  178|  1.45M|    extlen = ASN1_STRING_length(extvalue);
  179|  1.45M|    if (method->it)
  ------------------
  |  Branch (179:9): [True: 1.45M, False: 0]
  ------------------
  180|  1.45M|        return ASN1_item_d2i(NULL, &p, extlen, ASN1_ITEM_ptr(method->it));
  ------------------
  |  |  394|  1.45M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  181|      0|    return method->d2i(NULL, &p, extlen);
  182|  1.45M|}
X509V3_get_d2i:
  202|  5.29M|{
  203|  5.29M|    int lastpos, i;
  204|  5.29M|    X509_EXTENSION *ex, *found_ex = NULL;
  205|       |
  206|  5.29M|    if (!x) {
  ------------------
  |  Branch (206:9): [True: 0, False: 5.29M]
  ------------------
  207|      0|        if (idx)
  ------------------
  |  Branch (207:13): [True: 0, False: 0]
  ------------------
  208|      0|            *idx = -1;
  209|      0|        if (crit)
  ------------------
  |  Branch (209:13): [True: 0, False: 0]
  ------------------
  210|      0|            *crit = -1;
  211|      0|        return NULL;
  212|      0|    }
  213|  5.29M|    if (idx)
  ------------------
  |  Branch (213:9): [True: 0, False: 5.29M]
  ------------------
  214|      0|        lastpos = *idx + 1;
  215|  5.29M|    else
  216|  5.29M|        lastpos = 0;
  217|  5.29M|    if (lastpos < 0)
  ------------------
  |  Branch (217:9): [True: 0, False: 5.29M]
  ------------------
  218|      0|        lastpos = 0;
  219|  23.3M|    for (i = lastpos; i < sk_X509_EXTENSION_num(x); i++) {
  ------------------
  |  |  242|  23.3M|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
  |  Branch (219:23): [True: 18.0M, False: 5.29M]
  ------------------
  220|  18.0M|        ex = sk_X509_EXTENSION_value(x, i);
  ------------------
  |  |  243|  18.0M|#define sk_X509_EXTENSION_value(sk, idx) ((X509_EXTENSION *)OPENSSL_sk_value(ossl_check_const_X509_EXTENSION_sk_type(sk), (idx)))
  ------------------
  221|  18.0M|        if (OBJ_obj2nid(X509_EXTENSION_get_object(ex)) == nid) {
  ------------------
  |  Branch (221:13): [True: 1.45M, False: 16.5M]
  ------------------
  222|  1.45M|            if (idx) {
  ------------------
  |  Branch (222:17): [True: 0, False: 1.45M]
  ------------------
  223|      0|                *idx = i;
  224|      0|                found_ex = ex;
  225|      0|                break;
  226|  1.45M|            } else if (found_ex) {
  ------------------
  |  Branch (226:24): [True: 0, False: 1.45M]
  ------------------
  227|       |                /* Found more than one */
  228|      0|                if (crit)
  ------------------
  |  Branch (228:21): [True: 0, False: 0]
  ------------------
  229|      0|                    *crit = -2;
  230|      0|                return NULL;
  231|      0|            }
  232|  1.45M|            found_ex = ex;
  233|  1.45M|        }
  234|  18.0M|    }
  235|  5.29M|    if (found_ex) {
  ------------------
  |  Branch (235:9): [True: 1.45M, False: 3.83M]
  ------------------
  236|       |        /* Found it */
  237|  1.45M|        if (crit)
  ------------------
  |  Branch (237:13): [True: 1.45M, False: 0]
  ------------------
  238|  1.45M|            *crit = X509_EXTENSION_get_critical(found_ex);
  239|  1.45M|        return X509V3_EXT_d2i(found_ex);
  240|  1.45M|    }
  241|       |
  242|       |    /* Extension not found */
  243|  3.83M|    if (idx)
  ------------------
  |  Branch (243:9): [True: 0, False: 3.83M]
  ------------------
  244|      0|        *idx = -1;
  245|  3.83M|    if (crit)
  ------------------
  |  Branch (245:9): [True: 3.83M, False: 0]
  ------------------
  246|  3.83M|        *crit = -1;
  247|       |    return NULL;
  248|  5.29M|}
v3_lib.c:ext_cmp:
   42|  7.31M|{
   43|  7.31M|    return ((*a)->ext_nid - (*b)->ext_nid);
   44|  7.31M|}

X509_check_purpose:
   83|   441k|{
   84|   441k|    int idx;
   85|   441k|    const X509_PURPOSE *pt;
   86|       |
   87|       |    /*
   88|       |     * TODO: This cast can be dropped when https://github.com/openssl/openssl/pull/30067
   89|       |     * gets merged
   90|       |     */
   91|   441k|    if (!ossl_x509v3_cache_extensions((X509 *)x))
  ------------------
  |  Branch (91:9): [True: 0, False: 441k]
  ------------------
   92|      0|        return -1;
   93|   441k|    if (id == -1)
  ------------------
  |  Branch (93:9): [True: 441k, False: 0]
  ------------------
   94|   441k|        return 1;
   95|       |
   96|      0|    idx = X509_PURPOSE_get_by_id(id);
   97|      0|    if (idx == -1)
  ------------------
  |  Branch (97:9): [True: 0, False: 0]
  ------------------
   98|      0|        return -1;
   99|      0|    pt = X509_PURPOSE_get0(idx);
  100|      0|    return pt->check_purpose(pt, x, non_leaf);
  101|      0|}
X509_supported_extension:
  308|   871k|{
  309|       |    /*
  310|       |     * This table is a list of the NIDs of supported extensions: that is
  311|       |     * those which are used by the verify process. If an extension is
  312|       |     * critical and doesn't appear in this list then the verify process will
  313|       |     * normally reject the certificate. The list must be kept in numerical
  314|       |     * order because it will be searched using bsearch.
  315|       |     */
  316|   871k|    static const int supported_nids[] = {
  317|   871k|        NID_netscape_cert_type, /* 71 */
  ------------------
  |  | 2949|   871k|#define NID_netscape_cert_type          71
  ------------------
  318|   871k|        NID_key_usage, /* 83 */
  ------------------
  |  | 2689|   871k|#define NID_key_usage           83
  ------------------
  319|   871k|        NID_subject_alt_name, /* 85 */
  ------------------
  |  | 2699|   871k|#define NID_subject_alt_name            85
  ------------------
  320|   871k|        NID_basic_constraints, /* 87 */
  ------------------
  |  | 2709|   871k|#define NID_basic_constraints           87
  ------------------
  321|   871k|        NID_certificate_policies, /* 89 */
  ------------------
  |  | 2754|   871k|#define NID_certificate_policies                89
  ------------------
  322|   871k|        NID_crl_distribution_points, /* 103 */
  ------------------
  |  | 2749|   871k|#define NID_crl_distribution_points             103
  ------------------
  323|   871k|        NID_ext_key_usage, /* 126 */
  ------------------
  |  | 2779|   871k|#define NID_ext_key_usage               126
  ------------------
  324|   871k|#ifndef OPENSSL_NO_RFC3779
  325|   871k|        NID_sbgp_ipAddrBlock, /* 290 */
  ------------------
  |  | 1630|   871k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  326|   871k|        NID_sbgp_autonomousSysNum, /* 291 */
  ------------------
  |  | 1634|   871k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  327|   871k|#endif
  328|   871k|        NID_id_pkix_OCSP_noCheck, /* 369 */
  ------------------
  |  | 2228|   871k|#define NID_id_pkix_OCSP_noCheck                369
  ------------------
  329|   871k|        NID_policy_constraints, /* 401 */
  ------------------
  |  | 2774|   871k|#define NID_policy_constraints          401
  ------------------
  330|   871k|        NID_proxyCertInfo, /* 663 */
  ------------------
  |  | 1652|   871k|#define NID_proxyCertInfo               663
  ------------------
  331|   871k|        NID_name_constraints, /* 666 */
  ------------------
  |  | 2744|   871k|#define NID_name_constraints            666
  ------------------
  332|   871k|        NID_policy_mappings, /* 747 */
  ------------------
  |  | 2764|   871k|#define NID_policy_mappings             747
  ------------------
  333|   871k|        NID_inhibit_any_policy /* 748 */
  ------------------
  |  | 2834|   871k|#define NID_inhibit_any_policy          748
  ------------------
  334|   871k|    };
  335|       |
  336|   871k|    int ex_nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  337|       |
  338|   871k|    if (ex_nid == NID_undef)
  ------------------
  |  |   18|   871k|#define NID_undef                       0
  ------------------
  |  Branch (338:9): [True: 0, False: 871k]
  ------------------
  339|      0|        return 0;
  340|       |
  341|   871k|    if (OBJ_bsearch_nid(&ex_nid, supported_nids, OSSL_NELEM(supported_nids)))
  ------------------
  |  |   14|   871k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (341:9): [True: 871k, False: 0]
  ------------------
  342|   871k|        return 1;
  343|      0|    return 0;
  344|   871k|}
ossl_x509v3_cache_extensions:
  444|   441k|{
  445|   441k|    BASIC_CONSTRAINTS *bs;
  446|   441k|    PROXY_CERT_INFO_EXTENSION *pci;
  447|   441k|    ASN1_BIT_STRING *usage;
  448|   441k|    ASN1_BIT_STRING *ns;
  449|   441k|    EXTENDED_KEY_USAGE *extusage;
  450|   441k|    int i;
  451|   441k|    int res;
  452|   441k|    uint32_t tmp_ex_flags;
  453|   441k|    unsigned char tmp_sha1_hash[SHA_DIGEST_LENGTH];
  454|   441k|    long tmp_ex_pathlen;
  455|   441k|    long tmp_ex_pcpathlen;
  456|   441k|    uint32_t tmp_ex_kusage;
  457|   441k|    uint32_t tmp_ex_xkusage;
  458|   441k|    uint32_t tmp_ex_nscert;
  459|   441k|    ASN1_OCTET_STRING *tmp_skid;
  460|   441k|    AUTHORITY_KEYID *tmp_akid;
  461|   441k|    STACK_OF(GENERAL_NAME) *tmp_altname;
  ------------------
  |  |   33|   441k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  462|   441k|    NAME_CONSTRAINTS *tmp_nc;
  463|   441k|    STACK_OF(DIST_POINT) *tmp_crldp = NULL;
  ------------------
  |  |   33|   441k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  464|   441k|    X509_SIG_INFO tmp_siginf;
  465|       |
  466|   441k|#ifdef tsan_ld_acq
  467|       |    /* Fast lock-free check, see end of the function for details. */
  468|   441k|    if (tsan_ld_acq((TSAN_QUALIFIER int *)&const_x->ex_cached))
  ------------------
  |  |   64|   441k|#define tsan_ld_acq(ptr) atomic_load_explicit((ptr), memory_order_acquire)
  |  |  ------------------
  |  |  |  Branch (64:26): [True: 0, False: 441k]
  |  |  ------------------
  ------------------
  469|      0|        return (const_x->ex_flags & EXFLAG_INVALID) == 0;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  470|   441k|#endif
  471|       |
  472|   441k|    if (!CRYPTO_THREAD_read_lock(const_x->lock))
  ------------------
  |  Branch (472:9): [True: 0, False: 441k]
  ------------------
  473|      0|        return 0;
  474|   441k|    tmp_ex_flags = const_x->ex_flags;
  475|   441k|    tmp_ex_pcpathlen = const_x->ex_pcpathlen;
  476|   441k|    tmp_ex_kusage = const_x->ex_kusage;
  477|   441k|    tmp_ex_nscert = const_x->ex_nscert;
  478|       |
  479|   441k|    if ((tmp_ex_flags & EXFLAG_SET) != 0) { /* Cert has already been processed */
  ------------------
  |  |  678|   441k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (479:9): [True: 0, False: 441k]
  ------------------
  480|      0|        CRYPTO_THREAD_unlock(const_x->lock);
  481|      0|        return (tmp_ex_flags & EXFLAG_INVALID) == 0;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  482|      0|    }
  483|       |
  484|   441k|    ERR_set_mark();
  485|       |
  486|       |    /* Cache the SHA1 digest of the cert */
  487|   441k|    if (!X509_digest(const_x, EVP_sha1(), tmp_sha1_hash, NULL))
  ------------------
  |  Branch (487:9): [True: 0, False: 441k]
  ------------------
  488|      0|        tmp_ex_flags |= EXFLAG_NO_FINGERPRINT;
  ------------------
  |  |  686|      0|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  489|       |
  490|       |    /* V1 should mean no extensions ... */
  491|   441k|    if (X509_get_version(const_x) == X509_VERSION_1)
  ------------------
  |  |  850|   441k|#define X509_VERSION_1 0
  ------------------
  |  Branch (491:9): [True: 0, False: 441k]
  ------------------
  492|      0|        tmp_ex_flags |= EXFLAG_V1;
  ------------------
  |  |  675|      0|#define EXFLAG_V1 0x40
  ------------------
  493|       |
  494|       |    /* Handle basic constraints */
  495|   441k|    tmp_ex_pathlen = -1;
  496|   441k|    if ((bs = X509_get_ext_d2i(const_x, NID_basic_constraints, &i, NULL)) != NULL) {
  ------------------
  |  | 2709|   441k|#define NID_basic_constraints           87
  ------------------
  |  Branch (496:9): [True: 441k, False: 0]
  ------------------
  497|   441k|        if (bs->ca)
  ------------------
  |  Branch (497:13): [True: 441k, False: 0]
  ------------------
  498|   441k|            tmp_ex_flags |= EXFLAG_CA;
  ------------------
  |  |  673|   441k|#define EXFLAG_CA 0x10
  ------------------
  499|   441k|        if (bs->pathlen != NULL) {
  ------------------
  |  Branch (499:13): [True: 7.29k, False: 433k]
  ------------------
  500|       |            /*
  501|       |             * The error case !bs->ca is checked by check_chain()
  502|       |             * in case ctx->param->flags & X509_V_FLAG_X509_STRICT
  503|       |             */
  504|  7.29k|            if (bs->pathlen->type == V_ASN1_NEG_INTEGER) {
  ------------------
  |  |  100|  7.29k|#define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
  |  |  ------------------
  |  |  |  |   99|  7.29k|#define V_ASN1_NEG 0x100
  |  |  ------------------
  ------------------
  |  Branch (504:17): [True: 0, False: 7.29k]
  ------------------
  505|      0|                ERR_raise(ERR_LIB_X509V3, X509V3_R_NEGATIVE_PATHLEN);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  506|      0|                tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  507|  7.29k|            } else {
  508|  7.29k|                tmp_ex_pathlen = ASN1_INTEGER_get(bs->pathlen);
  509|  7.29k|            }
  510|  7.29k|        }
  511|   441k|        BASIC_CONSTRAINTS_free(bs);
  512|   441k|        tmp_ex_flags |= EXFLAG_BCONS;
  ------------------
  |  |  668|   441k|#define EXFLAG_BCONS 0x1
  ------------------
  513|   441k|    } else if (i != -1) {
  ------------------
  |  Branch (513:16): [True: 0, False: 0]
  ------------------
  514|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  515|      0|    }
  516|       |
  517|       |    /* Handle proxy certificates */
  518|   441k|    if ((pci = X509_get_ext_d2i(const_x, NID_proxyCertInfo, &i, NULL)) != NULL) {
  ------------------
  |  | 1652|   441k|#define NID_proxyCertInfo               663
  ------------------
  |  Branch (518:9): [True: 0, False: 441k]
  ------------------
  519|      0|        if ((tmp_ex_flags & EXFLAG_CA) != 0
  ------------------
  |  |  673|      0|#define EXFLAG_CA 0x10
  ------------------
  |  Branch (519:13): [True: 0, False: 0]
  ------------------
  520|      0|            || X509_get_ext_by_NID(const_x, NID_subject_alt_name, -1) >= 0
  ------------------
  |  | 2699|      0|#define NID_subject_alt_name            85
  ------------------
  |  Branch (520:16): [True: 0, False: 0]
  ------------------
  521|      0|            || X509_get_ext_by_NID(const_x, NID_issuer_alt_name, -1) >= 0) {
  ------------------
  |  | 2704|      0|#define NID_issuer_alt_name             86
  ------------------
  |  Branch (521:16): [True: 0, False: 0]
  ------------------
  522|      0|            tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  523|      0|        }
  524|      0|        if (pci->pcPathLengthConstraint != NULL)
  ------------------
  |  Branch (524:13): [True: 0, False: 0]
  ------------------
  525|      0|            tmp_ex_pcpathlen = ASN1_INTEGER_get(pci->pcPathLengthConstraint);
  526|      0|        else
  527|      0|            tmp_ex_pcpathlen = -1;
  528|      0|        PROXY_CERT_INFO_EXTENSION_free(pci);
  529|      0|        tmp_ex_flags |= EXFLAG_PROXY;
  ------------------
  |  |  680|      0|#define EXFLAG_PROXY 0x400
  ------------------
  530|   441k|    } else if (i != -1) {
  ------------------
  |  Branch (530:16): [True: 0, False: 441k]
  ------------------
  531|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  532|      0|    }
  533|       |
  534|       |    /* Handle (basic) key usage */
  535|   441k|    if ((usage = X509_get_ext_d2i(const_x, NID_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2689|   441k|#define NID_key_usage           83
  ------------------
  |  Branch (535:9): [True: 437k, False: 3.64k]
  ------------------
  536|   437k|        tmp_ex_kusage = 0;
  537|   437k|        if (usage->length > 0) {
  ------------------
  |  Branch (537:13): [True: 437k, False: 0]
  ------------------
  538|   437k|            tmp_ex_kusage = usage->data[0];
  539|   437k|            if (usage->length > 1)
  ------------------
  |  Branch (539:17): [True: 0, False: 437k]
  ------------------
  540|      0|                tmp_ex_kusage |= usage->data[1] << 8;
  541|   437k|        }
  542|   437k|        tmp_ex_flags |= EXFLAG_KUSAGE;
  ------------------
  |  |  669|   437k|#define EXFLAG_KUSAGE 0x2
  ------------------
  543|   437k|        ASN1_BIT_STRING_free(usage);
  544|       |        /* Check for empty key usage according to RFC 5280 section 4.2.1.3 */
  545|   437k|        if (tmp_ex_kusage == 0) {
  ------------------
  |  Branch (545:13): [True: 0, False: 437k]
  ------------------
  546|      0|            ERR_raise(ERR_LIB_X509V3, X509V3_R_EMPTY_KEY_USAGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  547|      0|            tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  548|      0|        }
  549|   437k|    } else if (i != -1) {
  ------------------
  |  Branch (549:16): [True: 0, False: 3.64k]
  ------------------
  550|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  551|      0|    }
  552|       |
  553|       |    /* Handle extended key usage */
  554|   441k|    tmp_ex_xkusage = 0;
  555|   441k|    if ((extusage = X509_get_ext_d2i(const_x, NID_ext_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2779|   441k|#define NID_ext_key_usage               126
  ------------------
  |  Branch (555:9): [True: 0, False: 441k]
  ------------------
  556|      0|        tmp_ex_flags |= EXFLAG_XKUSAGE;
  ------------------
  |  |  670|      0|#define EXFLAG_XKUSAGE 0x4
  ------------------
  557|      0|        for (i = 0; i < sk_ASN1_OBJECT_num(extusage); i++) {
  ------------------
  |  |  588|      0|#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
  ------------------
  |  Branch (557:21): [True: 0, False: 0]
  ------------------
  558|      0|            switch (OBJ_obj2nid(sk_ASN1_OBJECT_value(extusage, i))) {
  ------------------
  |  |  589|      0|#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
  ------------------
  559|      0|            case NID_server_auth:
  ------------------
  |  | 1684|      0|#define NID_server_auth         129
  ------------------
  |  Branch (559:13): [True: 0, False: 0]
  ------------------
  560|      0|                tmp_ex_xkusage |= XKU_SSL_SERVER;
  ------------------
  |  |  718|      0|#define XKU_SSL_SERVER 0x1
  ------------------
  561|      0|                break;
  562|      0|            case NID_client_auth:
  ------------------
  |  | 1689|      0|#define NID_client_auth         130
  ------------------
  |  Branch (562:13): [True: 0, False: 0]
  ------------------
  563|      0|                tmp_ex_xkusage |= XKU_SSL_CLIENT;
  ------------------
  |  |  719|      0|#define XKU_SSL_CLIENT 0x2
  ------------------
  564|      0|                break;
  565|      0|            case NID_email_protect:
  ------------------
  |  | 1699|      0|#define NID_email_protect               132
  ------------------
  |  Branch (565:13): [True: 0, False: 0]
  ------------------
  566|      0|                tmp_ex_xkusage |= XKU_SMIME;
  ------------------
  |  |  720|      0|#define XKU_SMIME 0x4
  ------------------
  567|      0|                break;
  568|      0|            case NID_code_sign:
  ------------------
  |  | 1694|      0|#define NID_code_sign           131
  ------------------
  |  Branch (568:13): [True: 0, False: 0]
  ------------------
  569|      0|                tmp_ex_xkusage |= XKU_CODE_SIGN;
  ------------------
  |  |  721|      0|#define XKU_CODE_SIGN 0x8
  ------------------
  570|      0|                break;
  571|      0|            case NID_ms_sgc:
  ------------------
  |  | 1383|      0|#define NID_ms_sgc              137
  ------------------
  |  Branch (571:13): [True: 0, False: 0]
  ------------------
  572|      0|            case NID_ns_sgc:
  ------------------
  |  | 2994|      0|#define NID_ns_sgc              139
  ------------------
  |  Branch (572:13): [True: 0, False: 0]
  ------------------
  573|      0|                tmp_ex_xkusage |= XKU_SGC;
  ------------------
  |  |  722|      0|#define XKU_SGC 0x10 /* Netscape or MS Server-Gated Crypto */
  ------------------
  574|      0|                break;
  575|      0|            case NID_OCSP_sign:
  ------------------
  |  | 1724|      0|#define NID_OCSP_sign           180
  ------------------
  |  Branch (575:13): [True: 0, False: 0]
  ------------------
  576|      0|                tmp_ex_xkusage |= XKU_OCSP_SIGN;
  ------------------
  |  |  723|      0|#define XKU_OCSP_SIGN 0x20
  ------------------
  577|      0|                break;
  578|      0|            case NID_time_stamp:
  ------------------
  |  | 1719|      0|#define NID_time_stamp          133
  ------------------
  |  Branch (578:13): [True: 0, False: 0]
  ------------------
  579|      0|                tmp_ex_xkusage |= XKU_TIMESTAMP;
  ------------------
  |  |  724|      0|#define XKU_TIMESTAMP 0x40
  ------------------
  580|      0|                break;
  581|      0|            case NID_dvcs:
  ------------------
  |  | 1729|      0|#define NID_dvcs                297
  ------------------
  |  Branch (581:13): [True: 0, False: 0]
  ------------------
  582|      0|                tmp_ex_xkusage |= XKU_DVCS;
  ------------------
  |  |  725|      0|#define XKU_DVCS 0x80
  ------------------
  583|      0|                break;
  584|      0|            case NID_anyExtendedKeyUsage:
  ------------------
  |  | 2929|      0|#define NID_anyExtendedKeyUsage         910
  ------------------
  |  Branch (584:13): [True: 0, False: 0]
  ------------------
  585|      0|                tmp_ex_xkusage |= XKU_ANYEKU;
  ------------------
  |  |  726|      0|#define XKU_ANYEKU 0x100
  ------------------
  586|      0|                break;
  587|      0|            default:
  ------------------
  |  Branch (587:13): [True: 0, False: 0]
  ------------------
  588|       |                /* Ignore unknown extended key usage */
  589|      0|                break;
  590|      0|            }
  591|      0|        }
  592|      0|        sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free);
  ------------------
  |  |  602|      0|#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
  ------------------
  593|   441k|    } else if (i != -1) {
  ------------------
  |  Branch (593:16): [True: 0, False: 441k]
  ------------------
  594|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  595|      0|    }
  596|       |
  597|       |    /* Handle legacy Netscape extension */
  598|   441k|    if ((ns = X509_get_ext_d2i(const_x, NID_netscape_cert_type, &i, NULL)) != NULL) {
  ------------------
  |  | 2949|   441k|#define NID_netscape_cert_type          71
  ------------------
  |  Branch (598:9): [True: 0, False: 441k]
  ------------------
  599|      0|        if (ns->length > 0)
  ------------------
  |  Branch (599:13): [True: 0, False: 0]
  ------------------
  600|      0|            tmp_ex_nscert = ns->data[0];
  601|      0|        else
  602|      0|            tmp_ex_nscert = 0;
  603|      0|        tmp_ex_flags |= EXFLAG_NSCERT;
  ------------------
  |  |  671|      0|#define EXFLAG_NSCERT 0x8
  ------------------
  604|      0|        ASN1_BIT_STRING_free(ns);
  605|   441k|    } else if (i != -1) {
  ------------------
  |  Branch (605:16): [True: 0, False: 441k]
  ------------------
  606|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  607|      0|    }
  608|       |
  609|       |    /* Handle subject key identifier and issuer/authority key identifier */
  610|   441k|    tmp_skid = X509_get_ext_d2i(const_x, NID_subject_key_identifier, &i, NULL);
  ------------------
  |  | 2684|   441k|#define NID_subject_key_identifier              82
  ------------------
  611|   441k|    if (tmp_skid == NULL && i != -1)
  ------------------
  |  Branch (611:9): [True: 3.64k, False: 437k]
  |  Branch (611:29): [True: 0, False: 3.64k]
  ------------------
  612|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  613|       |
  614|   441k|    tmp_akid = X509_get_ext_d2i(const_x, NID_authority_key_identifier, &i, NULL);
  ------------------
  |  | 2769|   441k|#define NID_authority_key_identifier            90
  ------------------
  615|   441k|    if (tmp_akid == NULL && i != -1)
  ------------------
  |  Branch (615:9): [True: 342k, False: 98.4k]
  |  Branch (615:29): [True: 0, False: 342k]
  ------------------
  616|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  617|       |
  618|       |    /* Setting EXFLAG_SS is equivalent to ossl_x509_likely_issued(const_x, const_x) == X509_V_OK */
  619|   441k|    if (X509_NAME_cmp(X509_get_subject_name(const_x), X509_get_issuer_name(const_x)) == 0) {
  ------------------
  |  Branch (619:9): [True: 441k, False: 0]
  ------------------
  620|   441k|        tmp_ex_flags |= EXFLAG_SI; /* Certificate is self-issued: subject == issuer */
  ------------------
  |  |  674|   441k|#define EXFLAG_SI 0x20 /* self-issued, maybe not self-signed */
  ------------------
  621|       |        /*
  622|       |         * When the SKID is missing, which is rare for self-issued certs,
  623|       |         * we could afford doing the (accurate) actual self-signature check, but
  624|       |         * decided against it for efficiency reasons and according to RFC 5280,
  625|       |         * CA certs MUST have an SKID and non-root certs MUST have an AKID.
  626|       |         */
  627|   441k|        if (X509_check_akid(const_x, tmp_akid) == X509_V_OK
  ------------------
  |  |  312|   882k|#define X509_V_OK 0
  ------------------
  |  Branch (627:13): [True: 441k, False: 0]
  ------------------
  628|   441k|            && check_sig_alg_match(X509_get0_pubkey(const_x), const_x) == X509_V_OK) {
  ------------------
  |  |  312|   441k|#define X509_V_OK 0
  ------------------
  |  Branch (628:16): [True: 441k, False: 0]
  ------------------
  629|       |            /*
  630|       |             * Assume self-signed if the signature alg matches the pkey alg and
  631|       |             * AKID is missing or matches respective fields in the same cert
  632|       |             * Not checking if any given key usage extension allows signing.
  633|       |             */
  634|   441k|            tmp_ex_flags |= EXFLAG_SS;
  ------------------
  |  |  684|   441k|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  635|   441k|        }
  636|   441k|    }
  637|       |
  638|       |    /* Handle subject alternative names and various other extensions */
  639|   441k|    tmp_altname = X509_get_ext_d2i(const_x, NID_subject_alt_name, &i, NULL);
  ------------------
  |  | 2699|   441k|#define NID_subject_alt_name            85
  ------------------
  640|   441k|    if (tmp_altname == NULL && i != -1)
  ------------------
  |  Branch (640:9): [True: 430k, False: 10.9k]
  |  Branch (640:32): [True: 0, False: 430k]
  ------------------
  641|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  642|   441k|    tmp_nc = X509_get_ext_d2i(const_x, NID_name_constraints, &i, NULL);
  ------------------
  |  | 2744|   441k|#define NID_name_constraints            666
  ------------------
  643|   441k|    if (tmp_nc == NULL && i != -1)
  ------------------
  |  Branch (643:9): [True: 441k, False: 0]
  |  Branch (643:27): [True: 0, False: 441k]
  ------------------
  644|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  645|       |
  646|       |    /* Handle CRL distribution point entries */
  647|   441k|    res = setup_crldp(const_x, &tmp_crldp);
  648|   441k|    if (res == 0)
  ------------------
  |  Branch (648:9): [True: 0, False: 441k]
  ------------------
  649|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  650|       |
  651|   441k|#ifndef OPENSSL_NO_RFC3779
  652|   441k|    STACK_OF(IPAddressFamily) *tmp_rfc3779_addr
  ------------------
  |  |   33|   441k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  653|   441k|        = X509_get_ext_d2i(const_x, NID_sbgp_ipAddrBlock, &i, NULL);
  ------------------
  |  | 1630|   441k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  654|   441k|    if (tmp_rfc3779_addr == NULL && i != -1)
  ------------------
  |  Branch (654:9): [True: 441k, False: 0]
  |  Branch (654:37): [True: 0, False: 441k]
  ------------------
  655|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  656|       |
  657|   441k|    struct ASIdentifiers_st *tmp_rfc3779_asid
  658|   441k|        = X509_get_ext_d2i(const_x, NID_sbgp_autonomousSysNum, &i, NULL);
  ------------------
  |  | 1634|   441k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  659|   441k|    if (tmp_rfc3779_asid == NULL && i != -1)
  ------------------
  |  Branch (659:9): [True: 441k, False: 0]
  |  Branch (659:37): [True: 0, False: 441k]
  ------------------
  660|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  661|   441k|#endif
  662|       |
  663|  1.94M|    for (i = 0; i < X509_get_ext_count(const_x); i++) {
  ------------------
  |  Branch (663:17): [True: 1.50M, False: 441k]
  ------------------
  664|  1.50M|        const X509_EXTENSION *ex = X509_get_ext(const_x, i);
  665|  1.50M|        int nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  666|       |
  667|  1.50M|        if (nid == NID_freshest_crl)
  ------------------
  |  | 2809|  1.50M|#define NID_freshest_crl                857
  ------------------
  |  Branch (667:13): [True: 0, False: 1.50M]
  ------------------
  668|      0|            tmp_ex_flags |= EXFLAG_FRESHEST;
  ------------------
  |  |  683|      0|#define EXFLAG_FRESHEST 0x1000
  ------------------
  669|  1.50M|        if (!X509_EXTENSION_get_critical(ex))
  ------------------
  |  Branch (669:13): [True: 630k, False: 871k]
  ------------------
  670|   630k|            continue;
  671|   871k|        if (!X509_supported_extension(ex)) {
  ------------------
  |  Branch (671:13): [True: 0, False: 871k]
  ------------------
  672|      0|            tmp_ex_flags |= EXFLAG_CRITICAL;
  ------------------
  |  |  679|      0|#define EXFLAG_CRITICAL 0x200
  ------------------
  673|      0|            break;
  674|      0|        }
  675|   871k|    }
  676|       |
  677|       |    /* Set x->siginf, ignoring errors due to unsupported algos */
  678|   441k|    (void)ossl_x509_init_sig_info(const_x, &tmp_siginf);
  679|       |
  680|   441k|    tmp_ex_flags |= EXFLAG_SET; /* Indicate that cert has been processed */
  ------------------
  |  |  678|   441k|#define EXFLAG_SET 0x100
  ------------------
  681|   441k|    ERR_pop_to_mark();
  682|       |
  683|   441k|    CRYPTO_THREAD_unlock(const_x->lock);
  684|       |    /*
  685|       |     * Now that we've done all the compute intensive work under read lock
  686|       |     * do all the updating under a write lock
  687|       |     */
  688|   441k|    if (!CRYPTO_THREAD_write_lock(const_x->lock))
  ------------------
  |  Branch (688:9): [True: 0, False: 441k]
  ------------------
  689|      0|        return 0;
  690|   441k|    ((X509 *)const_x)->ex_flags = tmp_ex_flags;
  691|   441k|    ((X509 *)const_x)->ex_pathlen = tmp_ex_pathlen;
  692|   441k|    ((X509 *)const_x)->ex_pcpathlen = tmp_ex_pcpathlen;
  693|   441k|    if (!(tmp_ex_flags & EXFLAG_NO_FINGERPRINT))
  ------------------
  |  |  686|   441k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (693:9): [True: 441k, False: 0]
  ------------------
  694|   441k|        memcpy(((X509 *)const_x)->sha1_hash, tmp_sha1_hash, SHA_DIGEST_LENGTH);
  ------------------
  |  |   26|   441k|#define SHA_DIGEST_LENGTH 20
  ------------------
  695|   441k|    if (tmp_ex_flags & EXFLAG_KUSAGE)
  ------------------
  |  |  669|   441k|#define EXFLAG_KUSAGE 0x2
  ------------------
  |  Branch (695:9): [True: 437k, False: 3.64k]
  ------------------
  696|   437k|        ((X509 *)const_x)->ex_kusage = tmp_ex_kusage;
  697|   441k|    ((X509 *)const_x)->ex_xkusage = tmp_ex_xkusage;
  698|   441k|    if (tmp_ex_flags & EXFLAG_NSCERT)
  ------------------
  |  |  671|   441k|#define EXFLAG_NSCERT 0x8
  ------------------
  |  Branch (698:9): [True: 0, False: 441k]
  ------------------
  699|      0|        ((X509 *)const_x)->ex_nscert = tmp_ex_nscert;
  700|   441k|    ASN1_OCTET_STRING_free(((X509 *)const_x)->skid);
  701|   441k|    ((X509 *)const_x)->skid = tmp_skid;
  702|   441k|    AUTHORITY_KEYID_free(((X509 *)const_x)->akid);
  703|   441k|    ((X509 *)const_x)->akid = tmp_akid;
  704|   441k|    sk_GENERAL_NAME_pop_free(((X509 *)const_x)->altname, GENERAL_NAME_free);
  ------------------
  |  |  256|   441k|#define sk_GENERAL_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_freefunc_type(freefunc))
  ------------------
  705|   441k|    ((X509 *)const_x)->altname = tmp_altname;
  706|   441k|    NAME_CONSTRAINTS_free(((X509 *)const_x)->nc);
  707|   441k|    ((X509 *)const_x)->nc = tmp_nc;
  708|   441k|    sk_DIST_POINT_pop_free(((X509 *)const_x)->crldp, DIST_POINT_free);
  ------------------
  |  |  353|   441k|#define sk_DIST_POINT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_freefunc_type(freefunc))
  ------------------
  709|   441k|    ((X509 *)const_x)->crldp = tmp_crldp;
  710|   441k|#ifndef OPENSSL_NO_RFC3779
  711|   441k|    sk_IPAddressFamily_pop_free(((X509 *)const_x)->rfc3779_addr, IPAddressFamily_free);
  ------------------
  |  | 1269|   441k|#define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_freefunc_type(freefunc))
  ------------------
  712|   441k|    ((X509 *)const_x)->rfc3779_addr = tmp_rfc3779_addr;
  713|   441k|    ASIdentifiers_free(((X509 *)const_x)->rfc3779_asid);
  714|   441k|    ((X509 *)const_x)->rfc3779_asid = tmp_rfc3779_asid;
  715|   441k|#endif
  716|   441k|    ((X509 *)const_x)->siginf = tmp_siginf;
  717|       |
  718|   441k|#ifdef tsan_st_rel
  719|   441k|    tsan_st_rel((TSAN_QUALIFIER int *)&const_x->ex_cached, 1);
  ------------------
  |  |   65|   441k|#define tsan_st_rel(ptr, val) atomic_store_explicit((ptr), (val), memory_order_release)
  ------------------
  720|       |    /*
  721|       |     * Above store triggers fast lock-free check in the beginning of the
  722|       |     * function. But one has to ensure that the structure is "stable", i.e.
  723|       |     * all stores are visible on all processors. Hence the release fence.
  724|       |     */
  725|   441k|#endif
  726|   441k|    CRYPTO_THREAD_unlock(const_x->lock);
  727|   441k|    if (tmp_ex_flags & EXFLAG_INVALID) {
  ------------------
  |  |  676|   441k|#define EXFLAG_INVALID 0x80
  ------------------
  |  Branch (727:9): [True: 0, False: 441k]
  ------------------
  728|      0|        ERR_raise(ERR_LIB_X509V3, X509V3_R_INVALID_CERTIFICATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  729|      0|        return 0;
  730|      0|    }
  731|   441k|    return 1;
  732|   441k|}
X509_check_akid:
 1123|   441k|{
 1124|   441k|    if (akid == NULL)
  ------------------
  |  Branch (1124:9): [True: 342k, False: 98.4k]
  ------------------
 1125|   342k|        return X509_V_OK;
  ------------------
  |  |  312|   342k|#define X509_V_OK 0
  ------------------
 1126|       |
 1127|       |    /* Check key ids (if present) */
 1128|  98.4k|    if (akid->keyid && issuer->skid && ASN1_OCTET_STRING_cmp(akid->keyid, issuer->skid))
  ------------------
  |  Branch (1128:9): [True: 98.4k, False: 0]
  |  Branch (1128:24): [True: 0, False: 98.4k]
  |  Branch (1128:40): [True: 0, False: 0]
  ------------------
 1129|      0|        return X509_V_ERR_AKID_SKID_MISMATCH;
  ------------------
  |  |  344|      0|#define X509_V_ERR_AKID_SKID_MISMATCH 30
  ------------------
 1130|       |    /* Check serial number */
 1131|  98.4k|    if (akid->serial && ASN1_INTEGER_cmp(X509_get0_serialNumber(issuer), akid->serial))
  ------------------
  |  Branch (1131:9): [True: 0, False: 98.4k]
  |  Branch (1131:25): [True: 0, False: 0]
  ------------------
 1132|      0|        return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
  ------------------
  |  |  345|      0|#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31
  ------------------
 1133|       |    /* Check issuer name */
 1134|  98.4k|    if (akid->issuer) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 98.4k]
  ------------------
 1135|       |        /*
 1136|       |         * Ugh, for some peculiar reason AKID includes SEQUENCE OF
 1137|       |         * GeneralName. So look for a DirName. There may be more than one but
 1138|       |         * we only take any notice of the first.
 1139|       |         */
 1140|      0|        GENERAL_NAMES *gens = akid->issuer;
 1141|      0|        GENERAL_NAME *gen;
 1142|      0|        X509_NAME *nm = NULL;
 1143|      0|        int i;
 1144|       |
 1145|      0|        for (i = 0; i < sk_GENERAL_NAME_num(gens); i++) {
  ------------------
  |  |  242|      0|#define sk_GENERAL_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAME_sk_type(sk))
  ------------------
  |  Branch (1145:21): [True: 0, False: 0]
  ------------------
 1146|      0|            gen = sk_GENERAL_NAME_value(gens, i);
  ------------------
  |  |  243|      0|#define sk_GENERAL_NAME_value(sk, idx) ((GENERAL_NAME *)OPENSSL_sk_value(ossl_check_const_GENERAL_NAME_sk_type(sk), (idx)))
  ------------------
 1147|      0|            if (gen->type == GEN_DIRNAME) {
  ------------------
  |  |  180|      0|#define GEN_DIRNAME 4
  ------------------
  |  Branch (1147:17): [True: 0, False: 0]
  ------------------
 1148|      0|                nm = gen->d.dirn;
 1149|      0|                break;
 1150|      0|            }
 1151|      0|        }
 1152|      0|        if (nm != NULL && X509_NAME_cmp(nm, X509_get_issuer_name(issuer)) != 0)
  ------------------
  |  Branch (1152:13): [True: 0, False: 0]
  |  Branch (1152:27): [True: 0, False: 0]
  ------------------
 1153|      0|            return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
  ------------------
  |  |  345|      0|#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31
  ------------------
 1154|      0|    }
 1155|  98.4k|    return X509_V_OK;
  ------------------
  |  |  312|  98.4k|#define X509_V_OK 0
  ------------------
 1156|  98.4k|}
v3_purp.c:nid_cmp:
  300|  2.17M|{
  301|  2.17M|    return *a - *b;
  302|  2.17M|}
v3_purp.c:check_sig_alg_match:
  408|   441k|{
  409|   441k|    int subj_sig_nid;
  410|       |
  411|   441k|    if (issuer_key == NULL)
  ------------------
  |  Branch (411:9): [True: 0, False: 441k]
  ------------------
  412|      0|        return X509_V_ERR_NO_ISSUER_PUBLIC_KEY;
  ------------------
  |  |  336|      0|#define X509_V_ERR_NO_ISSUER_PUBLIC_KEY 24
  ------------------
  413|   441k|    if (OBJ_find_sigid_algs(OBJ_obj2nid(subject->cert_info.signature.algorithm),
  ------------------
  |  Branch (413:9): [True: 0, False: 441k]
  ------------------
  414|   441k|            NULL, &subj_sig_nid)
  415|   441k|        == 0)
  416|      0|        return X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM;
  ------------------
  |  |  402|      0|#define X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM 76
  ------------------
  417|   441k|    if (EVP_PKEY_is_a(issuer_key, OBJ_nid2sn(subj_sig_nid))
  ------------------
  |  Branch (417:9): [True: 441k, False: 0]
  ------------------
  418|      0|        || (EVP_PKEY_is_a(issuer_key, "RSA") && subj_sig_nid == NID_rsassaPss))
  ------------------
  |  |  583|      0|#define NID_rsassaPss           912
  ------------------
  |  Branch (418:13): [True: 0, False: 0]
  |  Branch (418:49): [True: 0, False: 0]
  ------------------
  419|   441k|        return X509_V_OK;
  ------------------
  |  |  312|   441k|#define X509_V_OK 0
  ------------------
  420|      0|    return X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH;
  ------------------
  |  |  403|      0|#define X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH 77
  ------------------
  421|   441k|}
v3_purp.c:setup_crldp:
  390|   441k|{
  391|   441k|    int i;
  392|       |
  393|   441k|    *tmp_crldp = X509_get_ext_d2i(x, NID_crl_distribution_points, &i, NULL);
  ------------------
  |  | 2749|   441k|#define NID_crl_distribution_points             103
  ------------------
  394|   441k|    if (*tmp_crldp == NULL && i != -1)
  ------------------
  |  Branch (394:9): [True: 411k, False: 29.1k]
  |  Branch (394:31): [True: 0, False: 411k]
  ------------------
  395|      0|        return 0;
  396|       |
  397|   488k|    for (i = 0; i < sk_DIST_POINT_num(*tmp_crldp); i++) {
  ------------------
  |  |  339|   488k|#define sk_DIST_POINT_num(sk) OPENSSL_sk_num(ossl_check_const_DIST_POINT_sk_type(sk))
  ------------------
  |  Branch (397:17): [True: 47.3k, False: 441k]
  ------------------
  398|  47.3k|        int res = setup_dp(x, sk_DIST_POINT_value(*tmp_crldp, i));
  ------------------
  |  |  340|  47.3k|#define sk_DIST_POINT_value(sk, idx) ((DIST_POINT *)OPENSSL_sk_value(ossl_check_const_DIST_POINT_sk_type(sk), (idx)))
  ------------------
  399|       |
  400|  47.3k|        if (res < 1)
  ------------------
  |  Branch (400:13): [True: 0, False: 47.3k]
  ------------------
  401|      0|            return res;
  402|  47.3k|    }
  403|   441k|    return 1;
  404|   441k|}
v3_purp.c:setup_dp:
  348|  47.3k|{
  349|  47.3k|    const X509_NAME *iname = NULL;
  350|  47.3k|    int i;
  351|       |
  352|  47.3k|    if (dp->distpoint == NULL && sk_GENERAL_NAME_num(dp->CRLissuer) <= 0) {
  ------------------
  |  |  242|      0|#define sk_GENERAL_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAME_sk_type(sk))
  ------------------
  |  Branch (352:9): [True: 0, False: 47.3k]
  |  Branch (352:34): [True: 0, False: 0]
  ------------------
  353|      0|        ERR_raise(ERR_LIB_X509, X509_R_INVALID_DISTPOINT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  354|      0|        return 0;
  355|      0|    }
  356|  47.3k|    if (dp->reasons != NULL) {
  ------------------
  |  Branch (356:9): [True: 0, False: 47.3k]
  ------------------
  357|      0|        if (dp->reasons->length > 0)
  ------------------
  |  Branch (357:13): [True: 0, False: 0]
  ------------------
  358|      0|            dp->dp_reasons = dp->reasons->data[0];
  359|      0|        if (dp->reasons->length > 1)
  ------------------
  |  Branch (359:13): [True: 0, False: 0]
  ------------------
  360|      0|            dp->dp_reasons |= (dp->reasons->data[1] << 8);
  361|      0|        dp->dp_reasons &= CRLDP_ALL_REASONS;
  ------------------
  |  |  316|      0|#define CRLDP_ALL_REASONS 0x807f
  ------------------
  362|  47.3k|    } else {
  363|  47.3k|        dp->dp_reasons = CRLDP_ALL_REASONS;
  ------------------
  |  |  316|  47.3k|#define CRLDP_ALL_REASONS 0x807f
  ------------------
  364|  47.3k|    }
  365|  47.3k|    if (dp->distpoint == NULL || dp->distpoint->type != 1)
  ------------------
  |  Branch (365:9): [True: 0, False: 47.3k]
  |  Branch (365:34): [True: 47.3k, False: 0]
  ------------------
  366|  47.3k|        return 1;
  367|       |
  368|       |    /* Handle name fragment given by nameRelativeToCRLIssuer */
  369|       |    /*
  370|       |     * Note that the below way of determining iname is not really compliant
  371|       |     * with https://tools.ietf.org/html/rfc5280#section-4.2.1.13
  372|       |     * According to it, sk_GENERAL_NAME_num(dp->CRLissuer) MUST be <= 1
  373|       |     * and any CRLissuer could be of type different to GEN_DIRNAME.
  374|       |     */
  375|      0|    for (i = 0; i < sk_GENERAL_NAME_num(dp->CRLissuer); i++) {
  ------------------
  |  |  242|      0|#define sk_GENERAL_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAME_sk_type(sk))
  ------------------
  |  Branch (375:17): [True: 0, False: 0]
  ------------------
  376|      0|        GENERAL_NAME *gen = sk_GENERAL_NAME_value(dp->CRLissuer, i);
  ------------------
  |  |  243|      0|#define sk_GENERAL_NAME_value(sk, idx) ((GENERAL_NAME *)OPENSSL_sk_value(ossl_check_const_GENERAL_NAME_sk_type(sk), (idx)))
  ------------------
  377|       |
  378|      0|        if (gen->type == GEN_DIRNAME) {
  ------------------
  |  |  180|      0|#define GEN_DIRNAME 4
  ------------------
  |  Branch (378:13): [True: 0, False: 0]
  ------------------
  379|      0|            iname = gen->d.directoryName;
  380|      0|            break;
  381|      0|        }
  382|      0|    }
  383|      0|    if (iname == NULL)
  ------------------
  |  Branch (383:9): [True: 0, False: 0]
  ------------------
  384|      0|        iname = X509_get_issuer_name(x);
  385|      0|    return DIST_POINT_set_dpname(dp->distpoint, iname) ? 1 : -1;
  ------------------
  |  Branch (385:12): [True: 0, False: 0]
  ------------------
  386|  47.3k|}

ossl_err_load_X509V3_strings:
  146|      1|{
  147|      1|#ifndef OPENSSL_NO_ERR
  148|      1|    if (ERR_reason_error_string(X509V3_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (148:9): [True: 1, False: 0]
  ------------------
  149|      1|        ERR_load_strings_const(X509V3_str_reasons);
  150|      1|#endif
  151|      1|    return 1;
  152|      1|}

X509_subject_name_cmp:
   78|   441k|{
   79|   441k|    return X509_NAME_cmp(a->cert_info.subject, b->cert_info.subject);
   80|   441k|}
X509_get_issuer_name:
  101|   441k|{
  102|   441k|    return a->cert_info.issuer;
  103|   441k|}
X509_get_subject_name:
  118|   441k|{
  119|   441k|    return a->cert_info.subject;
  120|   441k|}
X509_cmp:
  153|   220k|{
  154|   220k|    int rv = 0;
  155|       |
  156|   220k|    if (a == b) /* for efficiency */
  ------------------
  |  Branch (156:9): [True: 0, False: 220k]
  ------------------
  157|      0|        return 0;
  158|       |
  159|       |    /* attempt to compute cert hash */
  160|   220k|    (void)X509_check_purpose((X509 *)a, -1, 0);
  161|   220k|    (void)X509_check_purpose((X509 *)b, -1, 0);
  162|       |
  163|   220k|    if ((a->ex_flags & EXFLAG_NO_FINGERPRINT) == 0
  ------------------
  |  |  686|   220k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (163:9): [True: 220k, False: 0]
  ------------------
  164|   220k|        && (b->ex_flags & EXFLAG_NO_FINGERPRINT) == 0)
  ------------------
  |  |  686|   220k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (164:12): [True: 220k, False: 0]
  ------------------
  165|   220k|        rv = memcmp(a->sha1_hash, b->sha1_hash, SHA_DIGEST_LENGTH);
  ------------------
  |  |   26|   220k|#define SHA_DIGEST_LENGTH 20
  ------------------
  166|   220k|    if (rv != 0)
  ------------------
  |  Branch (166:9): [True: 0, False: 220k]
  ------------------
  167|      0|        return rv < 0 ? -1 : 1;
  ------------------
  |  Branch (167:16): [True: 0, False: 0]
  ------------------
  168|       |
  169|       |    /* Check for match against stored encoding too */
  170|   220k|    if (!a->cert_info.enc.modified && !b->cert_info.enc.modified) {
  ------------------
  |  Branch (170:9): [True: 220k, False: 0]
  |  Branch (170:39): [True: 220k, False: 0]
  ------------------
  171|   220k|        if (a->cert_info.enc.len < b->cert_info.enc.len)
  ------------------
  |  Branch (171:13): [True: 0, False: 220k]
  ------------------
  172|      0|            return -1;
  173|   220k|        if (a->cert_info.enc.len > b->cert_info.enc.len)
  ------------------
  |  Branch (173:13): [True: 0, False: 220k]
  ------------------
  174|      0|            return 1;
  175|   220k|        rv = memcmp(a->cert_info.enc.enc,
  176|   220k|            b->cert_info.enc.enc, a->cert_info.enc.len);
  177|   220k|    }
  178|   220k|    return rv < 0 ? -1 : rv > 0;
  ------------------
  |  Branch (178:12): [True: 0, False: 220k]
  ------------------
  179|   220k|}
X509_NAME_cmp:
  259|   882k|{
  260|   882k|    int ret;
  261|       |
  262|   882k|    if (b == NULL)
  ------------------
  |  Branch (262:9): [True: 0, False: 882k]
  ------------------
  263|      0|        return a != NULL;
  264|   882k|    if (a == NULL)
  ------------------
  |  Branch (264:9): [True: 0, False: 882k]
  ------------------
  265|      0|        return -1;
  266|       |
  267|       |    /* Ensure canonical encoding is present and up to date */
  268|   882k|    if (a->canon_enc == NULL || a->modified) {
  ------------------
  |  Branch (268:9): [True: 0, False: 882k]
  |  Branch (268:33): [True: 0, False: 882k]
  ------------------
  269|      0|        ret = i2d_X509_NAME((X509_NAME *)a, NULL);
  270|      0|        if (ret < 0)
  ------------------
  |  Branch (270:13): [True: 0, False: 0]
  ------------------
  271|      0|            return -2;
  272|      0|    }
  273|       |
  274|   882k|    if (b->canon_enc == NULL || b->modified) {
  ------------------
  |  Branch (274:9): [True: 0, False: 882k]
  |  Branch (274:33): [True: 0, False: 882k]
  ------------------
  275|      0|        ret = i2d_X509_NAME((X509_NAME *)b, NULL);
  276|      0|        if (ret < 0)
  ------------------
  |  Branch (276:13): [True: 0, False: 0]
  ------------------
  277|      0|            return -2;
  278|      0|    }
  279|       |
  280|   882k|    ret = a->canon_enclen - b->canon_enclen;
  281|   882k|    if (ret == 0 && a->canon_enclen == 0)
  ------------------
  |  Branch (281:9): [True: 882k, False: 0]
  |  Branch (281:21): [True: 0, False: 882k]
  ------------------
  282|      0|        return 0;
  283|       |
  284|   882k|    if (ret == 0) {
  ------------------
  |  Branch (284:9): [True: 882k, False: 0]
  ------------------
  285|   882k|        if (a->canon_enc == NULL || b->canon_enc == NULL)
  ------------------
  |  Branch (285:13): [True: 0, False: 882k]
  |  Branch (285:37): [True: 0, False: 882k]
  ------------------
  286|      0|            return -2;
  287|   882k|        ret = memcmp(a->canon_enc, b->canon_enc, a->canon_enclen);
  288|   882k|    }
  289|       |
  290|   882k|    return ret < 0 ? -1 : ret > 0;
  ------------------
  |  Branch (290:12): [True: 0, False: 882k]
  ------------------
  291|   882k|}
X509_get0_pubkey:
  382|   441k|{
  383|   441k|    if (x == NULL)
  ------------------
  |  Branch (383:9): [True: 0, False: 441k]
  ------------------
  384|      0|        return NULL;
  385|   441k|    return X509_PUBKEY_get0(x->cert_info.key);
  386|   441k|}

X509_STORE_load_file_ex:
   52|  4.52k|{
   53|  4.52k|    X509_LOOKUP *lookup;
   54|       |
   55|  4.52k|    if (file == NULL
  ------------------
  |  Branch (55:9): [True: 0, False: 4.52k]
  ------------------
   56|  4.52k|        || (lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_file())) == NULL
  ------------------
  |  Branch (56:12): [True: 0, False: 4.52k]
  ------------------
   57|  4.52k|        || X509_LOOKUP_load_file_ex(lookup, file, X509_FILETYPE_PEM, libctx,
  ------------------
  |  |  301|  4.52k|    X509_LOOKUP_ctrl_ex((x), X509_L_FILE_LOAD, (name), (long)(type), NULL, \
  |  |  ------------------
  |  |  |  |  283|  4.52k|#define X509_L_FILE_LOAD 1
  |  |  ------------------
  |  |  302|  4.52k|        (libctx), (propq))
  ------------------
  |  Branch (57:12): [True: 364, False: 4.16k]
  ------------------
   58|  4.52k|               propq)
   59|  4.52k|            <= 0)
   60|    364|        return 0;
   61|       |
   62|  4.16k|    return 1;
   63|  4.52k|}
X509_STORE_load_file:
   66|  4.52k|{
   67|  4.52k|    return X509_STORE_load_file_ex(ctx, file, NULL, NULL);
   68|  4.52k|}
X509_STORE_load_path:
   71|  4.16k|{
   72|  4.16k|    X509_LOOKUP *lookup;
   73|       |
   74|  4.16k|    if (path == NULL
  ------------------
  |  Branch (74:9): [True: 0, False: 4.16k]
  ------------------
   75|  4.16k|        || (lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_hash_dir())) == NULL
  ------------------
  |  Branch (75:12): [True: 0, False: 4.16k]
  ------------------
   76|  4.16k|        || X509_LOOKUP_add_dir(lookup, path, X509_FILETYPE_PEM) <= 0)
  ------------------
  |  |  292|  4.16k|    X509_LOOKUP_ctrl((x), X509_L_ADD_DIR, (name), (long)(type), NULL)
  |  |  ------------------
  |  |  |  |  284|  4.16k|#define X509_L_ADD_DIR 2
  |  |  ------------------
  ------------------
  |  Branch (76:12): [True: 9, False: 4.15k]
  ------------------
   77|      9|        return 0;
   78|       |
   79|  4.15k|    return 1;
   80|  4.16k|}

X509_get_default_cert_area:
   79|    809|{
   80|       |#if defined(_WIN32)
   81|       |    RUN_ONCE(&openssldir_setup_init, do_openssldir_setup);
   82|       |    return x509_cert_areaptr;
   83|       |#else
   84|    809|    return X509_CERT_AREA;
  ------------------
  |  |   83|    809|#define X509_CERT_AREA OPENSSLDIR
  ------------------
   85|    809|#endif
   86|    809|}

ossl_err_load_X509_strings:
   93|      1|{
   94|      1|#ifndef OPENSSL_NO_ERR
   95|      1|    if (ERR_reason_error_string(X509_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (95:9): [True: 1, False: 0]
  ------------------
   96|      1|        ERR_load_strings_const(X509_str_reasons);
   97|      1|#endif
   98|      1|    return 1;
   99|      1|}

X509_get_ext_count:
   71|  1.94M|{
   72|  1.94M|    return X509v3_get_ext_count(x->cert_info.extensions);
   73|  1.94M|}
X509_get_ext:
   91|  1.50M|{
   92|  1.50M|    return X509v3_get_ext(x->cert_info.extensions, loc);
   93|  1.50M|}
X509_get_ext_d2i:
  127|  5.29M|{
  128|  5.29M|    return X509V3_get_d2i(x->cert_info.extensions, nid, crit, idx);
  129|  5.29M|}

X509_LOOKUP_new:
   23|  4.86k|{
   24|  4.86k|    X509_LOOKUP *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  4.86k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|       |
   26|  4.86k|    if (ret == NULL)
  ------------------
  |  Branch (26:9): [True: 0, False: 4.86k]
  ------------------
   27|      0|        return NULL;
   28|       |
   29|  4.86k|    ret->method = method;
   30|  4.86k|    if (method->new_item != NULL && method->new_item(ret) == 0) {
  ------------------
  |  Branch (30:9): [True: 2.33k, False: 2.52k]
  |  Branch (30:37): [True: 0, False: 2.33k]
  ------------------
   31|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   32|      0|        return NULL;
   33|      0|    }
   34|  4.86k|    return ret;
   35|  4.86k|}
X509_LOOKUP_free:
   38|  4.86k|{
   39|  4.86k|    if (ctx == NULL)
  ------------------
  |  Branch (39:9): [True: 0, False: 4.86k]
  ------------------
   40|      0|        return;
   41|  4.86k|    if ((ctx->method != NULL) && (ctx->method->free != NULL))
  ------------------
  |  Branch (41:9): [True: 4.86k, False: 0]
  |  Branch (41:34): [True: 2.33k, False: 2.52k]
  ------------------
   42|  2.33k|        (*ctx->method->free)(ctx);
   43|  4.86k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  4.86k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|  4.86k|}
X509_STORE_lock:
   47|   503k|{
   48|   503k|    return CRYPTO_THREAD_write_lock(xs->lock);
   49|   503k|}
X509_STORE_unlock:
   57|   503k|{
   58|   503k|    return CRYPTO_THREAD_unlock(xs->lock);
   59|   503k|}
X509_LOOKUP_shutdown:
   72|  4.86k|{
   73|  4.86k|    if (ctx->method == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 4.86k]
  ------------------
   74|      0|        return 0;
   75|  4.86k|    if (ctx->method->shutdown != NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 4.86k]
  ------------------
   76|      0|        return ctx->method->shutdown(ctx);
   77|  4.86k|    else
   78|  4.86k|        return 1;
   79|  4.86k|}
X509_LOOKUP_ctrl_ex:
   83|  8.68k|{
   84|  8.68k|    if (ctx->method == NULL)
  ------------------
  |  Branch (84:9): [True: 0, False: 8.68k]
  ------------------
   85|      0|        return -1;
   86|  8.68k|    if (ctx->method->ctrl_ex != NULL)
  ------------------
  |  Branch (86:9): [True: 4.52k, False: 4.16k]
  ------------------
   87|  4.52k|        return ctx->method->ctrl_ex(ctx, cmd, argc, argl, ret, libctx, propq);
   88|  4.16k|    if (ctx->method->ctrl != NULL)
  ------------------
  |  Branch (88:9): [True: 4.16k, False: 0]
  ------------------
   89|  4.16k|        return ctx->method->ctrl(ctx, cmd, argc, argl, ret);
   90|      0|    return 1;
   91|  4.16k|}
X509_LOOKUP_ctrl:
   95|  4.16k|{
   96|  4.16k|    return X509_LOOKUP_ctrl_ex(ctx, cmd, argc, argl, ret, NULL, NULL);
   97|  4.16k|}
X509_STORE_new:
  201|  3.47k|{
  202|  3.47k|    X509_STORE *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  3.47k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  203|  3.47k|    HT_CONFIG htconf = {
  204|  3.47k|        .ht_free_fn = objs_ht_free,
  205|  3.47k|        .ht_hash_fn = obj_ht_hash,
  206|  3.47k|        .init_neighborhoods = X509_OBJS_HT_BUCKETS,
  ------------------
  |  |   20|  3.47k|#define X509_OBJS_HT_BUCKETS 8
  ------------------
  207|  3.47k|        .no_rcu = 1,
  208|  3.47k|    };
  209|       |
  210|  3.47k|    if (ret == NULL)
  ------------------
  |  Branch (210:9): [True: 0, False: 3.47k]
  ------------------
  211|      0|        return NULL;
  212|  3.47k|    if ((ret->objs_ht = ossl_ht_new(&htconf)) == NULL) {
  ------------------
  |  Branch (212:9): [True: 0, False: 3.47k]
  ------------------
  213|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  214|      0|        goto err;
  215|      0|    }
  216|  3.47k|    if ((ret->objs = sk_X509_OBJECT_new(x509_object_cmp)) == NULL) {
  ------------------
  |  |  103|  3.47k|#define sk_X509_OBJECT_new(cmp) ((STACK_OF(X509_OBJECT) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_X509_OBJECT_compfunc_type(cmp)), sk_X509_OBJECT_cmpfunc_thunk))
  ------------------
  |  Branch (216:9): [True: 0, False: 3.47k]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        goto err;
  219|      0|    }
  220|  3.47k|    ret->cache = 1;
  221|  3.47k|    if ((ret->get_cert_methods = sk_X509_LOOKUP_new_null()) == NULL) {
  ------------------
  |  |   78|  3.47k|#define sk_X509_LOOKUP_new_null() ((STACK_OF(X509_LOOKUP) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_LOOKUP_freefunc_thunk))
  ------------------
  |  Branch (221:9): [True: 0, False: 3.47k]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        goto err;
  224|      0|    }
  225|       |
  226|  3.47k|    if ((ret->param = X509_VERIFY_PARAM_new()) == NULL) {
  ------------------
  |  Branch (226:9): [True: 0, False: 3.47k]
  ------------------
  227|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|        goto err;
  229|      0|    }
  230|  3.47k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE, ret, &ret->ex_data)) {
  ------------------
  |  |  255|  3.47k|#define CRYPTO_EX_INDEX_X509_STORE 4
  ------------------
  |  Branch (230:9): [True: 0, False: 3.47k]
  ------------------
  231|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  232|      0|        goto err;
  233|      0|    }
  234|       |
  235|  3.47k|    ret->lock = CRYPTO_THREAD_lock_new();
  236|  3.47k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (236:9): [True: 0, False: 3.47k]
  ------------------
  237|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  238|      0|        goto err;
  239|      0|    }
  240|       |
  241|  3.47k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (241:9): [True: 0, False: 3.47k]
  ------------------
  242|      0|        goto err;
  243|  3.47k|    return ret;
  244|       |
  245|      0|err:
  246|      0|    X509_VERIFY_PARAM_free(ret->param);
  247|      0|    sk_X509_OBJECT_free(ret->objs);
  ------------------
  |  |  107|      0|#define sk_X509_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_X509_OBJECT_sk_type(sk))
  ------------------
  248|      0|    sk_X509_LOOKUP_free(ret->get_cert_methods);
  ------------------
  |  |   81|      0|#define sk_X509_LOOKUP_free(sk) OPENSSL_sk_free(ossl_check_X509_LOOKUP_sk_type(sk))
  ------------------
  249|      0|    ossl_ht_free(ret->objs_ht);
  250|      0|    CRYPTO_THREAD_lock_free(ret->lock);
  251|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  252|       |    return NULL;
  253|  3.47k|}
X509_STORE_free:
  256|  15.5k|{
  257|  15.5k|    int i;
  258|  15.5k|    STACK_OF(X509_LOOKUP) *sk;
  ------------------
  |  |   33|  15.5k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  259|  15.5k|    X509_LOOKUP *lu;
  260|       |
  261|  15.5k|    if (xs == NULL)
  ------------------
  |  Branch (261:9): [True: 12.1k, False: 3.47k]
  ------------------
  262|  12.1k|        return;
  263|  3.47k|    CRYPTO_DOWN_REF(&xs->references, &i);
  264|  3.47k|    REF_PRINT_COUNT("X509_STORE", i, xs);
  ------------------
  |  |  301|  3.47k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  3.47k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  3.47k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  3.47k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  265|  3.47k|    if (i > 0)
  ------------------
  |  Branch (265:9): [True: 0, False: 3.47k]
  ------------------
  266|      0|        return;
  267|  3.47k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  3.47k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 3.47k]
  |  |  ------------------
  ------------------
  268|       |
  269|  3.47k|    sk = xs->get_cert_methods;
  270|  8.33k|    for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
  ------------------
  |  |   75|  8.33k|#define sk_X509_LOOKUP_num(sk) OPENSSL_sk_num(ossl_check_const_X509_LOOKUP_sk_type(sk))
  ------------------
  |  Branch (270:17): [True: 4.86k, False: 3.47k]
  ------------------
  271|  4.86k|        lu = sk_X509_LOOKUP_value(sk, i);
  ------------------
  |  |   76|  4.86k|#define sk_X509_LOOKUP_value(sk, idx) ((X509_LOOKUP *)OPENSSL_sk_value(ossl_check_const_X509_LOOKUP_sk_type(sk), (idx)))
  ------------------
  272|  4.86k|        X509_LOOKUP_shutdown(lu);
  273|  4.86k|        X509_LOOKUP_free(lu);
  274|  4.86k|    }
  275|  3.47k|    sk_X509_LOOKUP_free(sk);
  ------------------
  |  |   81|  3.47k|#define sk_X509_LOOKUP_free(sk) OPENSSL_sk_free(ossl_check_X509_LOOKUP_sk_type(sk))
  ------------------
  276|  3.47k|    sk_X509_OBJECT_pop_free(xs->objs, X509_OBJECT_free);
  ------------------
  |  |  115|  3.47k|#define sk_X509_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_freefunc_type(freefunc))
  ------------------
  277|       |
  278|  3.47k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, xs, &xs->ex_data);
  ------------------
  |  |  255|  3.47k|#define CRYPTO_EX_INDEX_X509_STORE 4
  ------------------
  279|  3.47k|    X509_VERIFY_PARAM_free(xs->param);
  280|  3.47k|    CRYPTO_THREAD_lock_free(xs->lock);
  281|  3.47k|    CRYPTO_FREE_REF(&xs->references);
  282|  3.47k|    ossl_ht_free(xs->objs_ht);
  283|  3.47k|    OPENSSL_free(xs);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  284|  3.47k|}
X509_STORE_add_lookup:
  299|  12.4k|{
  300|  12.4k|    int i;
  301|  12.4k|    STACK_OF(X509_LOOKUP) *sk;
  ------------------
  |  |   33|  12.4k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  302|  12.4k|    X509_LOOKUP *lu;
  303|       |
  304|  12.4k|    sk = xs->get_cert_methods;
  305|  16.5k|    for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
  ------------------
  |  |   75|  16.5k|#define sk_X509_LOOKUP_num(sk) OPENSSL_sk_num(ossl_check_const_X509_LOOKUP_sk_type(sk))
  ------------------
  |  Branch (305:17): [True: 11.7k, False: 4.86k]
  ------------------
  306|  11.7k|        lu = sk_X509_LOOKUP_value(sk, i);
  ------------------
  |  |   76|  11.7k|#define sk_X509_LOOKUP_value(sk, idx) ((X509_LOOKUP *)OPENSSL_sk_value(ossl_check_const_X509_LOOKUP_sk_type(sk), (idx)))
  ------------------
  307|  11.7k|        if (m == lu->method) {
  ------------------
  |  Branch (307:13): [True: 7.55k, False: 4.16k]
  ------------------
  308|  7.55k|            return lu;
  309|  7.55k|        }
  310|  11.7k|    }
  311|       |    /* a new one */
  312|  4.86k|    lu = X509_LOOKUP_new(m);
  313|  4.86k|    if (lu == NULL) {
  ------------------
  |  Branch (313:9): [True: 0, False: 4.86k]
  ------------------
  314|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  315|      0|        return NULL;
  316|      0|    }
  317|       |
  318|  4.86k|    lu->store_ctx = xs;
  319|  4.86k|    if (sk_X509_LOOKUP_push(xs->get_cert_methods, lu))
  ------------------
  |  |   85|  4.86k|#define sk_X509_LOOKUP_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_LOOKUP_sk_type(sk), ossl_check_X509_LOOKUP_type(ptr))
  |  |  ------------------
  |  |  |  Branch (85:38): [True: 4.86k, False: 0]
  |  |  ------------------
  ------------------
  320|  4.86k|        return lu;
  321|       |    /* sk_X509_LOOKUP_push() failed */
  322|  4.86k|    ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  323|      0|    X509_LOOKUP_free(lu);
  324|       |    return NULL;
  325|  4.86k|}
ossl_x509_store_ht_get_by_name:
  345|   503k|{
  346|   503k|    HT_VALUE *v;
  347|   503k|    OBJS_KEY key;
  348|   503k|    int ret;
  349|       |
  350|   503k|    if (xn->canon_enc == NULL || xn->modified) {
  ------------------
  |  Branch (350:9): [True: 0, False: 503k]
  |  Branch (350:34): [True: 0, False: 503k]
  ------------------
  351|      0|        ret = i2d_X509_NAME((X509_NAME *)xn, NULL);
  352|      0|        if (ret < 0)
  ------------------
  |  Branch (352:13): [True: 0, False: 0]
  ------------------
  353|      0|            return NULL;
  354|      0|    }
  355|       |
  356|   503k|    HT_INIT_KEY(&key);
  ------------------
  |  |  112|   503k|    do {                                                                                           \
  |  |  113|   503k|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  114|   503k|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  115|   503k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  116|   503k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (116:14): [Folded, False: 503k]
  |  |  ------------------
  ------------------
  357|   503k|    HT_SET_KEY_FIELD(&key, xn_canon, xn->canon_enc);
  ------------------
  |  |  180|   503k|#define HT_SET_KEY_FIELD(key, member, value) (key)->keyfields.member = value;
  ------------------
  358|   503k|    HT_SET_KEY_FIELD(&key, xn_canon_enclen, xn->canon_enclen);
  ------------------
  |  |  180|   503k|#define HT_SET_KEY_FIELD(key, member, value) (key)->keyfields.member = value;
  ------------------
  359|   503k|    v = ossl_ht_get(store->objs_ht, TO_HT_KEY(&key));
  ------------------
  |  |  237|   503k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  360|   503k|    if (v == NULL)
  ------------------
  |  Branch (360:9): [True: 282k, False: 220k]
  ------------------
  361|   282k|        return NULL;
  362|   220k|    v = ossl_rcu_deref(&v);
  ------------------
  |  |   35|   220k|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  363|       |
  364|   220k|    return v->value;
  365|   503k|}
X509_STORE_add_cert:
  586|   503k|{
  587|   503k|    if (!x509_store_add_x509(xs, x)) {
  ------------------
  |  Branch (587:9): [True: 0, False: 503k]
  ------------------
  588|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  589|      0|        return 0;
  590|      0|    }
  591|   503k|    return 1;
  592|   503k|}
X509_OBJECT_up_ref_count:
  604|   503k|{
  605|   503k|    switch (a->type) {
  ------------------
  |  Branch (605:13): [True: 503k, False: 0]
  ------------------
  606|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (606:5): [True: 0, False: 503k]
  ------------------
  607|      0|        break;
  608|   503k|    case X509_LU_X509:
  ------------------
  |  Branch (608:5): [True: 503k, False: 0]
  ------------------
  609|   503k|        return X509_up_ref(a->data.x509);
  610|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (610:5): [True: 0, False: 503k]
  ------------------
  611|      0|        return X509_CRL_up_ref(a->data.crl);
  612|   503k|    }
  613|      0|    return 1;
  614|   503k|}
X509_OBJECT_new:
  636|   503k|{
  637|   503k|    X509_OBJECT *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  638|       |
  639|   503k|    if (ret == NULL)
  ------------------
  |  Branch (639:9): [True: 0, False: 503k]
  ------------------
  640|      0|        return NULL;
  641|   503k|    ret->type = X509_LU_NONE;
  642|   503k|    return ret;
  643|   503k|}
X509_OBJECT_free:
  684|   503k|{
  685|   503k|    x509_object_free_internal(a);
  686|   503k|    OPENSSL_free(a);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  687|   503k|}
X509_OBJECT_retrieve_match:
  977|   220k|{
  978|   220k|    int idx, i, num;
  979|   220k|    X509_OBJECT *obj;
  980|       |
  981|   220k|    idx = sk_X509_OBJECT_find(h, x);
  ------------------
  |  |  118|   220k|#define sk_X509_OBJECT_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  982|   220k|    if (idx < 0)
  ------------------
  |  Branch (982:9): [True: 0, False: 220k]
  ------------------
  983|      0|        return NULL;
  984|   220k|    if ((x->type != X509_LU_X509) && (x->type != X509_LU_CRL))
  ------------------
  |  Branch (984:9): [True: 0, False: 220k]
  |  Branch (984:38): [True: 0, False: 0]
  ------------------
  985|      0|        return sk_X509_OBJECT_value(h, idx);
  ------------------
  |  |  102|      0|#define sk_X509_OBJECT_value(sk, idx) ((X509_OBJECT *)OPENSSL_sk_value(ossl_check_const_X509_OBJECT_sk_type(sk), (idx)))
  ------------------
  986|   220k|    for (i = idx, num = sk_X509_OBJECT_num(h); i < num; i++) {
  ------------------
  |  |  101|   220k|#define sk_X509_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_X509_OBJECT_sk_type(sk))
  ------------------
  |  Branch (986:48): [True: 220k, False: 0]
  ------------------
  987|   220k|        obj = sk_X509_OBJECT_value(h, i);
  ------------------
  |  |  102|   220k|#define sk_X509_OBJECT_value(sk, idx) ((X509_OBJECT *)OPENSSL_sk_value(ossl_check_const_X509_OBJECT_sk_type(sk), (idx)))
  ------------------
  988|   220k|        if (x509_object_cmp((const X509_OBJECT **)&obj,
  ------------------
  |  Branch (988:13): [True: 0, False: 220k]
  ------------------
  989|   220k|                (const X509_OBJECT **)&x))
  990|      0|            return NULL;
  991|   220k|        if (x->type == X509_LU_X509) {
  ------------------
  |  Branch (991:13): [True: 220k, False: 0]
  ------------------
  992|   220k|            if (!X509_cmp(obj->data.x509, x->data.x509))
  ------------------
  |  Branch (992:17): [True: 220k, False: 0]
  ------------------
  993|   220k|                return obj;
  994|   220k|        } else if (x->type == X509_LU_CRL) {
  ------------------
  |  Branch (994:20): [True: 0, False: 0]
  ------------------
  995|      0|            if (X509_CRL_match(obj->data.crl, x->data.crl) == 0)
  ------------------
  |  Branch (995:17): [True: 0, False: 0]
  ------------------
  996|      0|                return obj;
  997|      0|        } else {
  998|      0|            return obj;
  999|      0|        }
 1000|   220k|    }
 1001|      0|    return NULL;
 1002|   220k|}
X509_STORE_set_flags:
 1005|    429|{
 1006|    429|    return X509_VERIFY_PARAM_set_flags(xs->param, flags);
 1007|    429|}
x509_lu.c:objs_ht_free:
  187|   282k|{
  188|   282k|    STACK_OF(X509_OBJECT) *objs = v->value;
  ------------------
  |  |   33|   282k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  189|       |
  190|   282k|    sk_X509_OBJECT_pop_free(objs, X509_OBJECT_free);
  ------------------
  |  |  115|   282k|#define sk_X509_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_freefunc_type(freefunc))
  ------------------
  191|   282k|}
x509_lu.c:obj_ht_hash:
  194|   786k|{
  195|   786k|    OBJS_KEY *k = (OBJS_KEY *)key;
  196|       |
  197|   786k|    return ossl_fnv1a_hash(k->keyfields.xn_canon, k->keyfields.xn_canon_enclen);
  198|   786k|}
x509_lu.c:x509_object_cmp:
  166|   441k|{
  167|   441k|    int ret;
  168|       |
  169|   441k|    ret = ((*a)->type - (*b)->type);
  170|   441k|    if (ret)
  ------------------
  |  Branch (170:9): [True: 0, False: 441k]
  ------------------
  171|      0|        return ret;
  172|   441k|    switch ((*a)->type) {
  ------------------
  |  Branch (172:13): [True: 441k, False: 0]
  ------------------
  173|   441k|    case X509_LU_X509:
  ------------------
  |  Branch (173:5): [True: 441k, False: 0]
  ------------------
  174|   441k|        ret = X509_subject_name_cmp((*a)->data.x509, (*b)->data.x509);
  175|   441k|        break;
  176|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (176:5): [True: 0, False: 441k]
  ------------------
  177|      0|        ret = X509_CRL_cmp((*a)->data.crl, (*b)->data.crl);
  178|      0|        break;
  179|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (179:5): [True: 0, False: 441k]
  ------------------
  180|       |        /* abort(); */
  181|      0|        return 0;
  182|   441k|    }
  183|   441k|    return ret;
  184|   441k|}
x509_lu.c:x509_store_add_x509:
  550|   503k|{
  551|   503k|    X509_OBJECT *obj;
  552|       |
  553|   503k|    if (x == NULL)
  ------------------
  |  Branch (553:9): [True: 0, False: 503k]
  ------------------
  554|      0|        return 0;
  555|   503k|    obj = X509_OBJECT_new();
  556|   503k|    if (obj == NULL)
  ------------------
  |  Branch (556:9): [True: 0, False: 503k]
  ------------------
  557|      0|        return 0;
  558|       |
  559|   503k|    obj->type = X509_LU_X509;
  560|       |    /*
  561|       |     * XXX Casts away const, get rid of this once we can have the x509
  562|       |     * member of OBJECT be const.
  563|       |     */
  564|   503k|    obj->data.x509 = (X509 *)x;
  565|       |
  566|   503k|    return x509_store_add_obj(store, obj);
  567|   503k|}
x509_lu.c:x509_store_add_obj:
  498|   503k|{
  499|   503k|    const X509_NAME *xn;
  500|   503k|    STACK_OF(X509_OBJECT) *objs = NULL;
  ------------------
  |  |   33|   503k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  501|   503k|    int ret = 0, added = 0;
  502|       |
  503|   503k|    if (obj->type == X509_LU_CRL)
  ------------------
  |  Branch (503:9): [True: 0, False: 503k]
  ------------------
  504|      0|        xn = obj->data.crl->crl.issuer;
  505|   503k|    else
  506|   503k|        xn = obj->data.x509->cert_info.subject;
  507|       |
  508|   503k|    if (xn == NULL) {
  ------------------
  |  Branch (508:9): [True: 0, False: 503k]
  ------------------
  509|      0|        obj->type = X509_LU_NONE;
  510|      0|        X509_OBJECT_free(obj);
  511|      0|        return 0;
  512|      0|    }
  513|       |
  514|   503k|    if (!X509_OBJECT_up_ref_count(obj)) {
  ------------------
  |  Branch (514:9): [True: 0, False: 503k]
  ------------------
  515|      0|        obj->type = X509_LU_NONE;
  516|      0|        X509_OBJECT_free(obj);
  517|      0|        return 0;
  518|      0|    }
  519|       |
  520|   503k|    if (!X509_STORE_lock(store)) {
  ------------------
  |  Branch (520:9): [True: 0, False: 503k]
  ------------------
  521|      0|        X509_OBJECT_free(obj);
  522|      0|        return 0;
  523|      0|    }
  524|       |
  525|   503k|    if (store->objs_ht != NULL) {
  ------------------
  |  Branch (525:9): [True: 503k, False: 0]
  ------------------
  526|   503k|        objs = ossl_x509_store_ht_get_by_name(store, xn);
  527|   503k|        if (objs != NULL && X509_OBJECT_retrieve_match(objs, obj)) {
  ------------------
  |  Branch (527:13): [True: 220k, False: 282k]
  |  Branch (527:29): [True: 220k, False: 0]
  ------------------
  528|   220k|            ret = 1;
  529|   282k|        } else {
  530|   282k|            added = x509_name_objs_ht_insert(store, xn, objs, obj);
  531|   282k|            ret = added != 0;
  532|   282k|        }
  533|   503k|    } else {
  534|      0|        if (X509_OBJECT_retrieve_match(store->objs, obj)) {
  ------------------
  |  Branch (534:13): [True: 0, False: 0]
  ------------------
  535|      0|            ret = 1;
  536|      0|        } else {
  537|      0|            added = sk_X509_OBJECT_push(store->objs, obj);
  ------------------
  |  |  111|      0|#define sk_X509_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  538|      0|            ret = added != 0;
  539|      0|        }
  540|      0|    }
  541|   503k|    X509_STORE_unlock(store);
  542|       |
  543|   503k|    if (added == 0) /* obj not pushed */
  ------------------
  |  Branch (543:9): [True: 220k, False: 282k]
  ------------------
  544|   220k|        X509_OBJECT_free(obj);
  545|       |
  546|   503k|    return ret;
  547|   503k|}
x509_lu.c:x509_name_objs_ht_insert:
  369|   282k|{
  370|   282k|    int ret = 0, added = 0;
  371|   282k|    OBJS_KEY key;
  372|   282k|    HT_VALUE val = { 0 };
  373|       |
  374|   282k|    if (objs != NULL) {
  ------------------
  |  Branch (374:9): [True: 0, False: 282k]
  ------------------
  375|      0|        added = sk_X509_OBJECT_push(objs, obj) != 0;
  ------------------
  |  |  111|      0|#define sk_X509_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  376|      0|        return added;
  377|      0|    }
  378|       |
  379|   282k|    if (xn->canon_enc == NULL || xn->modified) {
  ------------------
  |  Branch (379:9): [True: 0, False: 282k]
  |  Branch (379:34): [True: 0, False: 282k]
  ------------------
  380|      0|        ret = i2d_X509_NAME((X509_NAME *)xn, NULL);
  381|      0|        if (ret < 0)
  ------------------
  |  Branch (381:13): [True: 0, False: 0]
  ------------------
  382|      0|            return 0;
  383|      0|    }
  384|       |
  385|   282k|    objs = sk_X509_OBJECT_new(x509_object_cmp);
  ------------------
  |  |  103|   282k|#define sk_X509_OBJECT_new(cmp) ((STACK_OF(X509_OBJECT) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_X509_OBJECT_compfunc_type(cmp)), sk_X509_OBJECT_cmpfunc_thunk))
  ------------------
  386|   282k|    if (objs == NULL)
  ------------------
  |  Branch (386:9): [True: 0, False: 282k]
  ------------------
  387|      0|        return 0;
  388|       |
  389|   282k|    added = sk_X509_OBJECT_push(objs, obj) != 0;
  ------------------
  |  |  111|   282k|#define sk_X509_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  390|   282k|    if (added == 0) {
  ------------------
  |  Branch (390:9): [True: 0, False: 282k]
  ------------------
  391|      0|        sk_X509_OBJECT_free(objs);
  ------------------
  |  |  107|      0|#define sk_X509_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_X509_OBJECT_sk_type(sk))
  ------------------
  392|      0|        return 0;
  393|      0|    }
  394|       |
  395|   282k|    HT_INIT_KEY(&key);
  ------------------
  |  |  112|   282k|    do {                                                                                           \
  |  |  113|   282k|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  114|   282k|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  115|   282k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  116|   282k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (116:14): [Folded, False: 282k]
  |  |  ------------------
  ------------------
  396|   282k|    HT_SET_KEY_FIELD(&key, xn_canon, xn->canon_enc);
  ------------------
  |  |  180|   282k|#define HT_SET_KEY_FIELD(key, member, value) (key)->keyfields.member = value;
  ------------------
  397|   282k|    HT_SET_KEY_FIELD(&key, xn_canon_enclen, xn->canon_enclen);
  ------------------
  |  |  180|   282k|#define HT_SET_KEY_FIELD(key, member, value) (key)->keyfields.member = value;
  ------------------
  398|   282k|    val.value = (void *)objs;
  399|   282k|    ret = ossl_ht_insert(store->objs_ht, TO_HT_KEY(&key), &val, NULL);
  ------------------
  |  |  237|   282k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  400|   282k|    if (ret != 1) {
  ------------------
  |  Branch (400:9): [True: 0, False: 282k]
  ------------------
  401|      0|        sk_X509_OBJECT_free(objs);
  ------------------
  |  |  107|      0|#define sk_X509_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_X509_OBJECT_sk_type(sk))
  ------------------
  402|      0|        return 0;
  403|      0|    }
  404|       |
  405|   282k|    return 1;
  406|   282k|}
x509_lu.c:x509_object_free_internal:
  646|   503k|{
  647|   503k|    if (a == NULL)
  ------------------
  |  Branch (647:9): [True: 0, False: 503k]
  ------------------
  648|      0|        return;
  649|   503k|    switch (a->type) {
  ------------------
  |  Branch (649:13): [True: 503k, False: 0]
  ------------------
  650|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (650:5): [True: 0, False: 503k]
  ------------------
  651|      0|        break;
  652|   503k|    case X509_LU_X509:
  ------------------
  |  Branch (652:5): [True: 503k, False: 0]
  ------------------
  653|   503k|        X509_free(a->data.x509);
  654|   503k|        break;
  655|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (655:5): [True: 0, False: 503k]
  ------------------
  656|      0|        X509_CRL_free(a->data.crl);
  657|      0|        break;
  658|   503k|    }
  659|   503k|}

X509_up_ref:
  117|   503k|{
  118|   503k|    int i;
  119|       |
  120|   503k|    if (CRYPTO_UP_REF(&x->references, &i) <= 0)
  ------------------
  |  Branch (120:9): [True: 0, False: 503k]
  ------------------
  121|      0|        return 0;
  122|       |
  123|   503k|    REF_PRINT_COUNT("X509", i, x);
  ------------------
  |  |  301|   503k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   503k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   503k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   503k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  124|   503k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   503k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 503k]
  |  |  ------------------
  ------------------
  125|   503k|    return i > 1;
  126|   503k|}
X509_get_version:
  129|   441k|{
  130|   441k|    return ASN1_INTEGER_get(x->cert_info.version);
  131|   441k|}
ossl_x509_init_sig_info:
  302|   441k|{
  303|   441k|    return x509_sig_info_init(info, &x->sig_alg, &x->signature,
  304|   441k|        X509_PUBKEY_get0(x->cert_info.key));
  305|   441k|}
x509_set.c:x509_sig_info_init:
  215|   441k|{
  216|   441k|    int pknid, mdnid, md_size;
  217|   441k|    const EVP_MD *md;
  218|   441k|    const EVP_PKEY_ASN1_METHOD *ameth;
  219|       |
  220|   441k|    siginf->mdnid = NID_undef;
  ------------------
  |  |   18|   441k|#define NID_undef                       0
  ------------------
  221|   441k|    siginf->pknid = NID_undef;
  ------------------
  |  |   18|   441k|#define NID_undef                       0
  ------------------
  222|   441k|    siginf->secbits = -1;
  223|   441k|    siginf->flags = 0;
  224|   441k|    if (!OBJ_find_sigid_algs(OBJ_obj2nid(alg->algorithm), &mdnid, &pknid)
  ------------------
  |  Branch (224:9): [True: 0, False: 441k]
  ------------------
  225|   441k|        || pknid == NID_undef) {
  ------------------
  |  |   18|   441k|#define NID_undef                       0
  ------------------
  |  Branch (225:12): [True: 0, False: 441k]
  ------------------
  226|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNKNOWN_SIGID_ALGS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  227|      0|        return 0;
  228|      0|    }
  229|   441k|    siginf->mdnid = mdnid;
  230|   441k|    siginf->pknid = pknid;
  231|       |
  232|   441k|    switch (mdnid) {
  233|      0|    case NID_undef:
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (233:5): [True: 0, False: 441k]
  ------------------
  234|       |        /* If we have one, use a custom handler for this algorithm */
  235|      0|        ameth = evp_pkey_asn1_find(pknid);
  236|      0|        if (ameth != NULL && ameth->siginf_set != NULL
  ------------------
  |  Branch (236:13): [True: 0, False: 0]
  |  Branch (236:30): [True: 0, False: 0]
  ------------------
  237|      0|            && ameth->siginf_set(siginf, alg, sig))
  ------------------
  |  Branch (237:16): [True: 0, False: 0]
  ------------------
  238|      0|            break;
  239|      0|        if (pubkey != NULL) {
  ------------------
  |  Branch (239:13): [True: 0, False: 0]
  ------------------
  240|      0|            int secbits;
  241|       |
  242|      0|            secbits = EVP_PKEY_get_security_bits(pubkey);
  243|      0|            if (secbits != 0) {
  ------------------
  |  Branch (243:17): [True: 0, False: 0]
  ------------------
  244|      0|                siginf->secbits = secbits;
  245|      0|                break;
  246|      0|            }
  247|      0|        }
  248|      0|        ERR_raise(ERR_LIB_X509, X509_R_ERROR_USING_SIGINF_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  249|      0|        return 0;
  250|       |        /*
  251|       |         * SHA1 and MD5 are known to be broken. Reduce security bits so that
  252|       |         * they're no longer accepted at security level 1.
  253|       |         * The real values don't really matter as long as they're lower than 80,
  254|       |         * which is our security level 1.
  255|       |         */
  256|  18.2k|    case NID_sha1:
  ------------------
  |  | 2348|  18.2k|#define NID_sha1                64
  ------------------
  |  Branch (256:5): [True: 18.2k, False: 422k]
  ------------------
  257|       |        /*
  258|       |         * https://eprint.iacr.org/2020/014 puts a chosen-prefix attack
  259|       |         * for SHA1 at2^63.4
  260|       |         */
  261|  18.2k|        siginf->secbits = 63;
  262|  18.2k|        break;
  263|      0|    case NID_md5:
  ------------------
  |  | 1242|      0|#define NID_md5         4
  ------------------
  |  Branch (263:5): [True: 0, False: 441k]
  ------------------
  264|       |        /*
  265|       |         * https://documents.epfl.ch/users/l/le/lenstra/public/papers/lat.pdf
  266|       |         * puts a chosen-prefix attack for MD5 at 2^39.
  267|       |         */
  268|      0|        siginf->secbits = 39;
  269|      0|        break;
  270|      0|    case NID_id_GostR3411_94:
  ------------------
  |  | 4573|      0|#define NID_id_GostR3411_94             809
  ------------------
  |  Branch (270:5): [True: 0, False: 441k]
  ------------------
  271|       |        /*
  272|       |         * There is a collision attack on GOST R 34.11-94 at 2^105, see
  273|       |         * https://link.springer.com/chapter/10.1007%2F978-3-540-85174-5_10
  274|       |         */
  275|      0|        siginf->secbits = 105;
  276|      0|        break;
  277|   422k|    default:
  ------------------
  |  Branch (277:5): [True: 422k, False: 18.2k]
  ------------------
  278|       |        /* Security bits: half number of bits in digest */
  279|   422k|        if ((md = EVP_get_digestbynid(mdnid)) == NULL) {
  ------------------
  |  |  446|   422k|#define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a))
  ------------------
  |  Branch (279:13): [True: 0, False: 422k]
  ------------------
  280|      0|            ERR_raise(ERR_LIB_X509, X509_R_ERROR_GETTING_MD_BY_NID);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|            return 0;
  282|      0|        }
  283|   422k|        md_size = EVP_MD_get_size(md);
  284|   422k|        if (md_size <= 0)
  ------------------
  |  Branch (284:13): [True: 0, False: 422k]
  ------------------
  285|      0|            return 0;
  286|   422k|        siginf->secbits = md_size * 4;
  287|   422k|        break;
  288|   441k|    }
  289|   441k|    switch (mdnid) {
  ------------------
  |  Branch (289:13): [True: 441k, False: 0]
  ------------------
  290|  18.2k|    case NID_sha1:
  ------------------
  |  | 2348|  18.2k|#define NID_sha1                64
  ------------------
  |  Branch (290:5): [True: 18.2k, False: 422k]
  ------------------
  291|   240k|    case NID_sha256:
  ------------------
  |  | 3291|   240k|#define NID_sha256              672
  ------------------
  |  Branch (291:5): [True: 222k, False: 218k]
  ------------------
  292|   422k|    case NID_sha384:
  ------------------
  |  | 3296|   422k|#define NID_sha384              673
  ------------------
  |  Branch (292:5): [True: 182k, False: 258k]
  ------------------
  293|   441k|    case NID_sha512:
  ------------------
  |  | 3301|   441k|#define NID_sha512              674
  ------------------
  |  Branch (293:5): [True: 18.2k, False: 422k]
  ------------------
  294|   441k|        siginf->flags |= X509_SIG_INFO_TLS;
  ------------------
  |  |  166|   441k|#define X509_SIG_INFO_TLS 0x2
  ------------------
  295|   441k|    }
  296|   441k|    siginf->flags |= X509_SIG_INFO_VALID;
  ------------------
  |  |  164|   441k|#define X509_SIG_INFO_VALID 0x1
  ------------------
  297|   441k|    return 1;
  298|   441k|}

X509v3_get_ext_count:
   23|  1.94M|{
   24|  1.94M|    int ret;
   25|       |
   26|  1.94M|    if (x == NULL)
  ------------------
  |  Branch (26:9): [True: 0, False: 1.94M]
  ------------------
   27|      0|        return 0;
   28|  1.94M|    ret = sk_X509_EXTENSION_num(x);
  ------------------
  |  |  242|  1.94M|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
   29|  1.94M|    return ret > 0 ? ret : 0;
  ------------------
  |  Branch (29:12): [True: 1.94M, False: 0]
  ------------------
   30|  1.94M|}
X509v3_get_ext:
   86|  1.50M|{
   87|  1.50M|    if (x == NULL || sk_X509_EXTENSION_num(x) <= loc || loc < 0)
  ------------------
  |  |  242|  1.50M|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
  |  Branch (87:9): [True: 0, False: 1.50M]
  |  Branch (87:22): [True: 0, False: 1.50M]
  |  Branch (87:57): [True: 0, False: 1.50M]
  ------------------
   88|      0|        return NULL;
   89|  1.50M|    else
   90|  1.50M|        return sk_X509_EXTENSION_value(x, loc);
  ------------------
  |  |  243|  1.50M|#define sk_X509_EXTENSION_value(sk, idx) ((X509_EXTENSION *)OPENSSL_sk_value(ossl_check_const_X509_EXTENSION_sk_type(sk), (idx)))
  ------------------
   91|  1.50M|}
X509_EXTENSION_get_object:
  270|  21.8M|{
  271|  21.8M|    if (ex == NULL)
  ------------------
  |  Branch (271:9): [True: 0, False: 21.8M]
  ------------------
  272|      0|        return NULL;
  273|  21.8M|    return ex->object;
  274|  21.8M|}
X509_EXTENSION_get_data:
  277|  1.45M|{
  278|  1.45M|    if (ex == NULL)
  ------------------
  |  Branch (278:9): [True: 0, False: 1.45M]
  ------------------
  279|      0|        return NULL;
  280|  1.45M|    return &ex->value;
  281|  1.45M|}
X509_EXTENSION_get_critical:
  284|  2.95M|{
  285|  2.95M|    if (ex == NULL)
  ------------------
  |  Branch (285:9): [True: 0, False: 2.95M]
  ------------------
  286|      0|        return 0;
  287|  2.95M|    if (ex->critical > 0)
  ------------------
  |  Branch (287:9): [True: 1.74M, False: 1.21M]
  ------------------
  288|  1.74M|        return 1;
  289|  1.21M|    return 0;
  290|  2.95M|}

X509_VERIFY_PARAM_new:
  353|  9.41k|{
  354|  9.41k|    X509_VERIFY_PARAM *param;
  355|       |
  356|  9.41k|    param = OPENSSL_zalloc(sizeof(*param));
  ------------------
  |  |  109|  9.41k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  357|  9.41k|    if (param == NULL)
  ------------------
  |  Branch (357:9): [True: 0, False: 9.41k]
  ------------------
  358|      0|        return NULL;
  359|  9.41k|    param->trust = X509_TRUST_DEFAULT;
  ------------------
  |  |  195|  9.41k|#define X509_TRUST_DEFAULT 0 /* Only valid in purpose settings */
  ------------------
  360|       |    /* param->inh_flags = X509_VP_FLAG_DEFAULT; */
  361|  9.41k|    param->depth = -1;
  362|  9.41k|    param->auth_level = -1; /* -1 means unset, 0 is explicit */
  363|  9.41k|    return param;
  364|  9.41k|}
X509_VERIFY_PARAM_free:
  367|  9.52k|{
  368|  9.52k|    if (param == NULL)
  ------------------
  |  Branch (368:9): [True: 113, False: 9.41k]
  ------------------
  369|    113|        return;
  370|  9.41k|    sk_ASN1_OBJECT_pop_free(param->policies, ASN1_OBJECT_free);
  ------------------
  |  |  602|  9.41k|#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
  ------------------
  371|  9.41k|    clear_buffer_stack(&param->hosts);
  372|  9.41k|    clear_buffer_stack(&param->ips);
  373|  9.41k|    clear_buffer_stack(&param->rfc822s);
  374|  9.41k|    clear_buffer_stack(&param->smtputf8s);
  375|  9.41k|    OPENSSL_free(param->peername);
  ------------------
  |  |  132|  9.41k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  376|  9.41k|    OPENSSL_free(param);
  ------------------
  |  |  132|  9.41k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  377|  9.41k|}
X509_VERIFY_PARAM_inherit:
  424|  2.58k|{
  425|  2.58k|    unsigned long inh_flags;
  426|  2.58k|    int to_default, to_overwrite;
  427|       |
  428|  2.58k|    if (src == NULL)
  ------------------
  |  Branch (428:9): [True: 0, False: 2.58k]
  ------------------
  429|      0|        return 1;
  430|  2.58k|    inh_flags = dest->inh_flags | src->inh_flags;
  431|       |
  432|  2.58k|    if ((inh_flags & X509_VP_FLAG_ONCE) != 0)
  ------------------
  |  |  497|  2.58k|#define X509_VP_FLAG_ONCE 0x10
  ------------------
  |  Branch (432:9): [True: 0, False: 2.58k]
  ------------------
  433|      0|        dest->inh_flags = 0;
  434|       |
  435|  2.58k|    if ((inh_flags & X509_VP_FLAG_LOCKED) != 0)
  ------------------
  |  |  496|  2.58k|#define X509_VP_FLAG_LOCKED 0x8
  ------------------
  |  Branch (435:9): [True: 0, False: 2.58k]
  ------------------
  436|      0|        return 1;
  437|       |
  438|  2.58k|    to_default = (inh_flags & X509_VP_FLAG_DEFAULT) != 0;
  ------------------
  |  |  493|  2.58k|#define X509_VP_FLAG_DEFAULT 0x1
  ------------------
  439|  2.58k|    to_overwrite = (inh_flags & X509_VP_FLAG_OVERWRITE) != 0;
  ------------------
  |  |  494|  2.58k|#define X509_VP_FLAG_OVERWRITE 0x2
  ------------------
  440|       |
  441|  2.58k|    x509_verify_param_copy(purpose, 0);
  ------------------
  |  |  419|  2.58k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  2.58k|        dest->field = src->field;
  ------------------
  442|  2.58k|    x509_verify_param_copy(trust, X509_TRUST_DEFAULT);
  ------------------
  |  |  419|  2.58k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  2.58k|        dest->field = src->field;
  ------------------
  443|  2.58k|    x509_verify_param_copy(depth, -1);
  ------------------
  |  |  419|  2.58k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  2.58k|        dest->field = src->field;
  ------------------
  444|  2.58k|    x509_verify_param_copy(auth_level, -1);
  ------------------
  |  |  419|  2.58k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  2.58k|        dest->field = src->field;
  ------------------
  445|       |
  446|       |    /* If overwrite or check time not set, copy across */
  447|       |
  448|  2.58k|    if (to_overwrite || (dest->flags & X509_V_FLAG_USE_CHECK_TIME) == 0) {
  ------------------
  |  |  442|  2.58k|#define X509_V_FLAG_USE_CHECK_TIME 0x2
  ------------------
  |  Branch (448:9): [True: 0, False: 2.58k]
  |  Branch (448:25): [True: 2.58k, False: 0]
  ------------------
  449|  2.58k|        dest->check_time = src->check_time;
  450|  2.58k|        dest->flags &= ~X509_V_FLAG_USE_CHECK_TIME;
  ------------------
  |  |  442|  2.58k|#define X509_V_FLAG_USE_CHECK_TIME 0x2
  ------------------
  451|       |        /* Don't need to copy flag: that is done below */
  452|  2.58k|    }
  453|       |
  454|  2.58k|    if ((inh_flags & X509_VP_FLAG_RESET_FLAGS) != 0)
  ------------------
  |  |  495|  2.58k|#define X509_VP_FLAG_RESET_FLAGS 0x4
  ------------------
  |  Branch (454:9): [True: 0, False: 2.58k]
  ------------------
  455|      0|        dest->flags = 0;
  456|       |
  457|  2.58k|    dest->flags |= src->flags;
  458|       |
  459|  2.58k|    if (test_x509_verify_param_copy(policies, NULL)) {
  ------------------
  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  460|      0|        if (!X509_VERIFY_PARAM_set1_policies(dest, src->policies))
  ------------------
  |  Branch (460:13): [True: 0, False: 0]
  ------------------
  461|      0|            return 0;
  462|      0|    }
  463|       |
  464|  2.58k|    x509_verify_param_copy(hostflags, 0);
  ------------------
  |  |  419|  2.58k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  2.58k|        dest->field = src->field;
  ------------------
  465|       |
  466|  2.58k|    if (test_x509_verify_param_copy(hosts, NULL)) {
  ------------------
  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  467|      0|        if (!replace_buffer_stack(&dest->hosts, &src->hosts))
  ------------------
  |  Branch (467:13): [True: 0, False: 0]
  ------------------
  468|      0|            return 0;
  469|      0|    }
  470|  2.58k|    x509_verify_param_copy(validate_host, NULL);
  ------------------
  |  |  419|  2.58k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  2.58k|        dest->field = src->field;
  ------------------
  471|       |
  472|  2.58k|    if (test_x509_verify_param_copy(ips, NULL)) {
  ------------------
  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  473|      0|        if (!replace_buffer_stack(&dest->ips, &src->ips))
  ------------------
  |  Branch (473:13): [True: 0, False: 0]
  ------------------
  474|      0|            return 0;
  475|      0|    }
  476|  2.58k|    x509_verify_param_copy(validate_ip, NULL);
  ------------------
  |  |  419|  2.58k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  2.58k|        dest->field = src->field;
  ------------------
  477|       |
  478|  2.58k|    if (test_x509_verify_param_copy(rfc822s, NULL)) {
  ------------------
  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  479|      0|        if (!replace_buffer_stack(&dest->rfc822s, &src->rfc822s))
  ------------------
  |  Branch (479:13): [True: 0, False: 0]
  ------------------
  480|      0|            return 0;
  481|      0|    }
  482|  2.58k|    x509_verify_param_copy(validate_rfc822, NULL);
  ------------------
  |  |  419|  2.58k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  2.58k|        dest->field = src->field;
  ------------------
  483|       |
  484|  2.58k|    if (test_x509_verify_param_copy(smtputf8s, NULL)) {
  ------------------
  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  485|      0|        if (!replace_buffer_stack(&dest->smtputf8s, &src->smtputf8s))
  ------------------
  |  Branch (485:13): [True: 0, False: 0]
  ------------------
  486|      0|            return 0;
  487|      0|    }
  488|  2.58k|    x509_verify_param_copy(validate_smtputf8, NULL);
  ------------------
  |  |  419|  2.58k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  2.58k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  2.58k|        dest->field = src->field;
  ------------------
  489|       |
  490|  2.58k|    return 1;
  491|  2.58k|}
X509_VERIFY_PARAM_set_flags:
  518|    429|{
  519|    429|    param->flags |= flags;
  520|    429|    if ((flags & X509_V_FLAG_POLICY_MASK) != 0)
  ------------------
  |  |  500|    429|#define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \
  |  |  ------------------
  |  |  |  |  454|    429|#define X509_V_FLAG_POLICY_CHECK 0x80
  |  |  ------------------
  |  |  501|    429|    | X509_V_FLAG_EXPLICIT_POLICY                         \
  |  |  ------------------
  |  |  |  |  456|    429|#define X509_V_FLAG_EXPLICIT_POLICY 0x100
  |  |  ------------------
  |  |  502|    429|    | X509_V_FLAG_INHIBIT_ANY                             \
  |  |  ------------------
  |  |  |  |  458|    429|#define X509_V_FLAG_INHIBIT_ANY 0x200
  |  |  ------------------
  |  |  503|    429|    | X509_V_FLAG_INHIBIT_MAP)
  |  |  ------------------
  |  |  |  |  460|    429|#define X509_V_FLAG_INHIBIT_MAP 0x400
  |  |  ------------------
  ------------------
  |  Branch (520:9): [True: 0, False: 429]
  ------------------
  521|      0|        param->flags |= X509_V_FLAG_POLICY_CHECK;
  ------------------
  |  |  454|      0|#define X509_V_FLAG_POLICY_CHECK 0x80
  ------------------
  522|    429|    return 1;
  523|    429|}
X509_VERIFY_PARAM_move_peername:
  831|  5.17k|{
  832|  5.17k|    char *peername = (from != NULL) ? from->peername : NULL;
  ------------------
  |  Branch (832:22): [True: 0, False: 5.17k]
  ------------------
  833|       |
  834|  5.17k|    if (to->peername != peername) {
  ------------------
  |  Branch (834:9): [True: 0, False: 5.17k]
  ------------------
  835|      0|        OPENSSL_free(to->peername);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  836|      0|        to->peername = peername;
  837|      0|    }
  838|  5.17k|    if (from != NULL)
  ------------------
  |  Branch (838:9): [True: 0, False: 5.17k]
  ------------------
  839|      0|        from->peername = NULL;
  840|  5.17k|}
x509_vpm.c:clear_buffer_stack:
  117|  37.6k|{
  118|  37.6k|    sk_X509_BUFFER_pop_free(*buffer_stack, buffer_free);
  119|       |    *buffer_stack = NULL;
  120|  37.6k|}

X509_digest:
  540|   441k|{
  541|   441k|    if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  | 2346|   441k|#define SN_sha1         "SHA1"
  ------------------
                  if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  |  678|   441k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (541:9): [True: 441k, False: 0]
  |  Branch (541:37): [True: 0, False: 441k]
  ------------------
  542|      0|        && (cert->ex_flags & EXFLAG_NO_FINGERPRINT) == 0) {
  ------------------
  |  |  686|      0|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (542:12): [True: 0, False: 0]
  ------------------
  543|       |        /* Asking for SHA1 and we already computed it. */
  544|      0|        if (len != NULL)
  ------------------
  |  Branch (544:13): [True: 0, False: 0]
  ------------------
  545|      0|            *len = sizeof(cert->sha1_hash);
  546|      0|        memcpy(data, cert->sha1_hash, sizeof(cert->sha1_hash));
  547|      0|        return 1;
  548|      0|    }
  549|   441k|    return ossl_asn1_item_digest_ex(ASN1_ITEM_rptr(X509), md, (char *)cert,
  ------------------
  |  |  399|   441k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  550|   441k|        data, len, cert->libctx, cert->propq);
  551|   441k|}

x_name.c:x509_name_ex_new:
   91|  2.01M|{
   92|  2.01M|    X509_NAME *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  2.01M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|       |
   94|  2.01M|    if (ret == NULL)
  ------------------
  |  Branch (94:9): [True: 0, False: 2.01M]
  ------------------
   95|      0|        return 0;
   96|  2.01M|    if ((ret->entries = sk_X509_NAME_ENTRY_new_null()) == NULL) {
  ------------------
  |  |  212|  2.01M|#define sk_X509_NAME_ENTRY_new_null() ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_NAME_ENTRY_freefunc_thunk))
  ------------------
  |  Branch (96:9): [True: 0, False: 2.01M]
  ------------------
   97|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|        goto err;
   99|      0|    }
  100|  2.01M|    if ((ret->bytes = BUF_MEM_new()) == NULL) {
  ------------------
  |  Branch (100:9): [True: 0, False: 2.01M]
  ------------------
  101|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  102|      0|        goto err;
  103|      0|    }
  104|  2.01M|    ret->modified = 1;
  105|  2.01M|    *val = (ASN1_VALUE *)ret;
  106|  2.01M|    return 1;
  107|       |
  108|      0|err:
  109|      0|    if (ret) {
  ------------------
  |  Branch (109:9): [True: 0, False: 0]
  ------------------
  110|      0|        sk_X509_NAME_ENTRY_free(ret->entries);
  ------------------
  |  |  215|      0|#define sk_X509_NAME_ENTRY_free(sk) OPENSSL_sk_free(ossl_check_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  111|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|      0|    }
  113|      0|    return 0;
  114|  2.01M|}
x_name.c:x509_name_ex_free:
  117|  2.01M|{
  118|  2.01M|    X509_NAME *a;
  119|       |
  120|  2.01M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 2.01M]
  |  Branch (120:25): [True: 0, False: 2.01M]
  ------------------
  121|      0|        return;
  122|  2.01M|    a = (X509_NAME *)*pval;
  123|       |
  124|  2.01M|    BUF_MEM_free(a->bytes);
  125|  2.01M|    sk_X509_NAME_ENTRY_pop_free(a->entries, X509_NAME_ENTRY_free);
  ------------------
  |  |  223|  2.01M|#define sk_X509_NAME_ENTRY_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_freefunc_type(freefunc))
  ------------------
  126|  2.01M|    OPENSSL_free(a->canon_enc);
  ------------------
  |  |  132|  2.01M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  127|  2.01M|    OPENSSL_free(a);
  ------------------
  |  |  132|  2.01M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  128|       |    *pval = NULL;
  129|  2.01M|}
x_name.c:x509_name_ex_d2i:
  145|  1.01M|{
  146|  1.01M|    const unsigned char *p = *in, *q;
  147|  1.01M|    union {
  148|  1.01M|        STACK_OF(STACK_OF_X509_NAME_ENTRY) *s;
  149|  1.01M|        ASN1_VALUE *a;
  150|  1.01M|    } intname = {
  151|  1.01M|        NULL
  152|  1.01M|    };
  153|  1.01M|    union {
  154|  1.01M|        X509_NAME *x;
  155|  1.01M|        ASN1_VALUE *a;
  156|  1.01M|    } nm = {
  157|  1.01M|        NULL
  158|  1.01M|    };
  159|  1.01M|    int i, j, ret;
  160|  1.01M|    STACK_OF(X509_NAME_ENTRY) *entries;
  ------------------
  |  |   33|  1.01M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  161|  1.01M|    X509_NAME_ENTRY *entry;
  162|       |
  163|  1.01M|    if (len > X509_NAME_MAX)
  ------------------
  |  |   24|  1.01M|#define X509_NAME_MAX (1024 * 1024)
  ------------------
  |  Branch (163:9): [True: 0, False: 1.01M]
  ------------------
  164|      0|        len = X509_NAME_MAX;
  ------------------
  |  |   24|      0|#define X509_NAME_MAX (1024 * 1024)
  ------------------
  165|  1.01M|    q = p;
  166|       |
  167|       |    /* Get internal representation of Name */
  168|  1.01M|    ret = ASN1_item_ex_d2i(&intname.a,
  169|  1.01M|        &p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL),
  ------------------
  |  |  399|  1.01M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  170|  1.01M|        tag, aclass, opt, ctx);
  171|       |
  172|  1.01M|    if (ret <= 0)
  ------------------
  |  Branch (172:9): [True: 0, False: 1.01M]
  ------------------
  173|      0|        return ret;
  174|       |
  175|  1.01M|    if (*val)
  ------------------
  |  Branch (175:9): [True: 1.00M, False: 3.64k]
  ------------------
  176|  1.00M|        x509_name_ex_free(val, NULL);
  177|  1.01M|    if (!x509_name_ex_new(&nm.a, NULL))
  ------------------
  |  Branch (177:9): [True: 0, False: 1.01M]
  ------------------
  178|      0|        goto err;
  179|       |    /* We've decoded it: now cache encoding */
  180|  1.01M|    if (!BUF_MEM_grow(nm.x->bytes, p - q))
  ------------------
  |  Branch (180:9): [True: 0, False: 1.01M]
  ------------------
  181|      0|        goto err;
  182|  1.01M|    memcpy(nm.x->bytes->data, q, p - q);
  183|       |
  184|       |    /* Convert internal representation to X509_NAME structure */
  185|  4.57M|    for (i = 0; i < sk_STACK_OF_X509_NAME_ENTRY_num(intname.s); i++) {
  ------------------
  |  Branch (185:17): [True: 3.56M, False: 1.01M]
  ------------------
  186|  3.56M|        entries = sk_STACK_OF_X509_NAME_ENTRY_value(intname.s, i);
  187|  7.13M|        for (j = 0; j < sk_X509_NAME_ENTRY_num(entries); j++) {
  ------------------
  |  |  209|  7.13M|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  |  Branch (187:21): [True: 3.56M, False: 3.56M]
  ------------------
  188|  3.56M|            entry = sk_X509_NAME_ENTRY_value(entries, j);
  ------------------
  |  |  210|  3.56M|#define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
  ------------------
  189|  3.56M|            entry->set = i;
  190|  3.56M|            if (!sk_X509_NAME_ENTRY_push(nm.x->entries, entry))
  ------------------
  |  |  219|  3.56M|#define sk_X509_NAME_ENTRY_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr))
  ------------------
  |  Branch (190:17): [True: 0, False: 3.56M]
  ------------------
  191|      0|                goto err;
  192|  3.56M|            (void)sk_X509_NAME_ENTRY_set(entries, j, NULL);
  ------------------
  |  |  225|  3.56M|#define sk_X509_NAME_ENTRY_set(sk, idx, ptr) ((X509_NAME_ENTRY *)OPENSSL_sk_set(ossl_check_X509_NAME_ENTRY_sk_type(sk), (idx), ossl_check_X509_NAME_ENTRY_type(ptr)))
  ------------------
  193|  3.56M|        }
  194|  3.56M|    }
  195|  1.01M|    ret = x509_name_canon(nm.x);
  196|  1.01M|    if (!ret)
  ------------------
  |  Branch (196:9): [True: 0, False: 1.01M]
  ------------------
  197|      0|        goto err;
  198|  1.01M|    sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,
  199|  1.01M|        local_sk_X509_NAME_ENTRY_free);
  200|  1.01M|    nm.x->modified = 0;
  201|  1.01M|    *val = nm.a;
  202|  1.01M|    *in = p;
  203|  1.01M|    return ret;
  204|       |
  205|      0|err:
  206|      0|    if (nm.x != NULL)
  ------------------
  |  Branch (206:9): [True: 0, False: 0]
  ------------------
  207|      0|        X509_NAME_free(nm.x);
  208|      0|    sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,
  209|      0|        local_sk_X509_NAME_ENTRY_pop_free);
  210|       |    ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  211|      0|    return 0;
  212|  1.01M|}
x_name.c:x509_name_canon:
  312|  1.01M|{
  313|  1.01M|    unsigned char *p;
  314|  1.01M|    STACK_OF(STACK_OF_X509_NAME_ENTRY) *intname;
  ------------------
  |  |   33|  1.01M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  315|  1.01M|    STACK_OF(X509_NAME_ENTRY) *entries = NULL;
  ------------------
  |  |   33|  1.01M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  316|  1.01M|    X509_NAME_ENTRY *entry, *tmpentry = NULL;
  317|  1.01M|    int i, set = -1, ret = 0, len;
  318|       |
  319|  1.01M|    OPENSSL_free(a->canon_enc);
  ------------------
  |  |  132|  1.01M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  320|  1.01M|    a->canon_enc = NULL;
  321|       |    /* Special case: empty X509_NAME => null encoding */
  322|  1.01M|    if (sk_X509_NAME_ENTRY_num(a->entries) == 0) {
  ------------------
  |  |  209|  1.01M|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  |  Branch (322:9): [True: 0, False: 1.01M]
  ------------------
  323|      0|        a->canon_enclen = 0;
  324|      0|        return 1;
  325|      0|    }
  326|  1.01M|    intname = sk_STACK_OF_X509_NAME_ENTRY_new_null();
  327|  1.01M|    if (intname == NULL) {
  ------------------
  |  Branch (327:9): [True: 0, False: 1.01M]
  ------------------
  328|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  329|      0|        goto err;
  330|      0|    }
  331|  4.57M|    for (i = 0; i < sk_X509_NAME_ENTRY_num(a->entries); i++) {
  ------------------
  |  |  209|  4.57M|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  |  Branch (331:17): [True: 3.56M, False: 1.01M]
  ------------------
  332|  3.56M|        entry = sk_X509_NAME_ENTRY_value(a->entries, i);
  ------------------
  |  |  210|  3.56M|#define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
  ------------------
  333|  3.56M|        if (entry->set != set) {
  ------------------
  |  Branch (333:13): [True: 3.56M, False: 0]
  ------------------
  334|  3.56M|            entries = sk_X509_NAME_ENTRY_new_null();
  ------------------
  |  |  212|  3.56M|#define sk_X509_NAME_ENTRY_new_null() ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_NAME_ENTRY_freefunc_thunk))
  ------------------
  335|  3.56M|            if (entries == NULL)
  ------------------
  |  Branch (335:17): [True: 0, False: 3.56M]
  ------------------
  336|      0|                goto err;
  337|  3.56M|            if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)) {
  ------------------
  |  Branch (337:17): [True: 0, False: 3.56M]
  ------------------
  338|      0|                sk_X509_NAME_ENTRY_free(entries);
  ------------------
  |  |  215|      0|#define sk_X509_NAME_ENTRY_free(sk) OPENSSL_sk_free(ossl_check_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  339|      0|                ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  340|      0|                goto err;
  341|      0|            }
  342|  3.56M|            set = entry->set;
  343|  3.56M|        }
  344|  3.56M|        tmpentry = X509_NAME_ENTRY_new();
  345|  3.56M|        if (tmpentry == NULL) {
  ------------------
  |  Branch (345:13): [True: 0, False: 3.56M]
  ------------------
  346|      0|            ERR_raise(ERR_LIB_X509, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  347|      0|            goto err;
  348|      0|        }
  349|  3.56M|        tmpentry->object = OBJ_dup(entry->object);
  350|  3.56M|        if (tmpentry->object == NULL) {
  ------------------
  |  Branch (350:13): [True: 0, False: 3.56M]
  ------------------
  351|      0|            ERR_raise(ERR_LIB_X509, ERR_R_OBJ_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  352|      0|            goto err;
  353|      0|        }
  354|  3.56M|        if (!asn1_string_canon(tmpentry->value, entry->value))
  ------------------
  |  Branch (354:13): [True: 0, False: 3.56M]
  ------------------
  355|      0|            goto err;
  356|  3.56M|        if (!sk_X509_NAME_ENTRY_push(entries, tmpentry)) {
  ------------------
  |  |  219|  3.56M|#define sk_X509_NAME_ENTRY_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr))
  ------------------
  |  Branch (356:13): [True: 0, False: 3.56M]
  ------------------
  357|      0|            ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  358|      0|            goto err;
  359|      0|        }
  360|  3.56M|        tmpentry = NULL;
  361|  3.56M|    }
  362|       |
  363|       |    /* Finally generate encoding */
  364|  1.01M|    len = i2d_name_canon(intname, NULL);
  365|  1.01M|    if (len < 0)
  ------------------
  |  Branch (365:9): [True: 0, False: 1.01M]
  ------------------
  366|      0|        goto err;
  367|  1.01M|    a->canon_enclen = len;
  368|       |
  369|  1.01M|    p = OPENSSL_malloc(a->canon_enclen);
  ------------------
  |  |  107|  1.01M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|  1.01M|    if (p == NULL)
  ------------------
  |  Branch (370:9): [True: 0, False: 1.01M]
  ------------------
  371|      0|        goto err;
  372|       |
  373|  1.01M|    a->canon_enc = p;
  374|       |
  375|  1.01M|    i2d_name_canon(intname, &p);
  376|       |
  377|  1.01M|    ret = 1;
  378|       |
  379|  1.01M|err:
  380|  1.01M|    X509_NAME_ENTRY_free(tmpentry);
  381|  1.01M|    sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname,
  382|  1.01M|        local_sk_X509_NAME_ENTRY_pop_free);
  383|  1.01M|    return ret;
  384|  1.01M|}
x_name.c:asn1_string_canon:
  394|  3.56M|{
  395|  3.56M|    unsigned char *to, *from;
  396|  3.56M|    int len, i;
  397|       |
  398|       |    /* If type not in bitmask just copy string across */
  399|  3.56M|    if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON)) {
  ------------------
  |  |  389|  3.56M|    (B_ASN1_UTF8STRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING     \
  |  |  ------------------
  |  |  |  |  119|  3.56M|#define B_ASN1_UTF8STRING 0x2000
  |  |  ------------------
  |  |                   (B_ASN1_UTF8STRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING     \
  |  |  ------------------
  |  |  |  |  117|  3.56M|#define B_ASN1_BMPSTRING 0x0800
  |  |  ------------------
  |  |                   (B_ASN1_UTF8STRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING     \
  |  |  ------------------
  |  |  |  |  114|  3.56M|#define B_ASN1_UNIVERSALSTRING 0x0100
  |  |  ------------------
  |  |  390|  3.56M|        | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING \
  |  |  ------------------
  |  |  |  |  105|  3.56M|#define B_ASN1_PRINTABLESTRING 0x0002
  |  |  ------------------
  |  |                       | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING \
  |  |  ------------------
  |  |  |  |  106|  3.56M|#define B_ASN1_T61STRING 0x0004
  |  |  ------------------
  |  |                       | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING \
  |  |  ------------------
  |  |  |  |  109|  3.56M|#define B_ASN1_IA5STRING 0x0010
  |  |  ------------------
  |  |  391|  3.56M|        | B_ASN1_VISIBLESTRING)
  |  |  ------------------
  |  |  |  |  112|  3.56M|#define B_ASN1_VISIBLESTRING 0x0040
  |  |  ------------------
  ------------------
  |  Branch (399:9): [True: 0, False: 3.56M]
  ------------------
  400|      0|        if (!ASN1_STRING_copy(out, in))
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|      0|            return 0;
  402|      0|        return 1;
  403|      0|    }
  404|       |
  405|  3.56M|    out->type = V_ASN1_UTF8STRING;
  ------------------
  |  |   75|  3.56M|#define V_ASN1_UTF8STRING 12
  ------------------
  406|  3.56M|    out->length = ASN1_STRING_to_UTF8(&out->data, in);
  407|  3.56M|    if (out->length == -1)
  ------------------
  |  Branch (407:9): [True: 0, False: 3.56M]
  ------------------
  408|      0|        return 0;
  409|       |
  410|  3.56M|    to = out->data;
  411|  3.56M|    from = to;
  412|       |
  413|  3.56M|    len = out->length;
  414|       |
  415|       |    /*
  416|       |     * Convert string in place to canonical form. Ultimately we may need to
  417|       |     * handle a wider range of characters but for now ignore anything with
  418|       |     * MSB set and rely on the ossl_isspace() to fail on bad characters without
  419|       |     * needing isascii or range checks as well.
  420|       |     */
  421|       |
  422|       |    /* Ignore leading spaces */
  423|  3.56M|    while (len > 0 && ossl_isspace(*from)) {
  ------------------
  |  |   82|  3.56M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  3.56M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 3.56M]
  |  |  ------------------
  ------------------
  |  Branch (423:12): [True: 3.56M, False: 0]
  ------------------
  424|      0|        from++;
  425|      0|        len--;
  426|      0|    }
  427|       |
  428|  3.56M|    to = from + len;
  429|       |
  430|       |    /* Ignore trailing spaces */
  431|  3.56M|    while (len > 0 && ossl_isspace(to[-1])) {
  ------------------
  |  |   82|  3.56M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  3.56M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 3.56M]
  |  |  ------------------
  ------------------
  |  Branch (431:12): [True: 3.56M, False: 0]
  ------------------
  432|      0|        to--;
  433|      0|        len--;
  434|      0|    }
  435|       |
  436|  3.56M|    to = out->data;
  437|       |
  438|  3.56M|    i = 0;
  439|  59.8M|    while (i < len) {
  ------------------
  |  Branch (439:12): [True: 56.3M, False: 3.56M]
  ------------------
  440|       |        /* If not ASCII set just copy across */
  441|  56.3M|        if (!ossl_isascii(*from)) {
  ------------------
  |  |   75|  56.3M|#define ossl_isascii(c) (((c) & ~127) == 0)
  ------------------
  |  Branch (441:13): [True: 133k, False: 56.1M]
  ------------------
  442|   133k|            *to++ = *from++;
  443|   133k|            i++;
  444|   133k|        }
  445|       |        /* Collapse multiple spaces */
  446|  56.1M|        else if (ossl_isspace(*from)) {
  ------------------
  |  |   82|  56.1M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  56.1M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 5.78M, False: 50.3M]
  |  |  ------------------
  ------------------
  447|       |            /* Copy one space across */
  448|  5.78M|            *to++ = ' ';
  449|       |            /*
  450|       |             * Ignore subsequent spaces. Note: don't need to check len here
  451|       |             * because we know the last character is a non-space so we can't
  452|       |             * overflow.
  453|       |             */
  454|  5.78M|            do {
  455|  5.78M|                from++;
  456|  5.78M|                i++;
  457|  5.78M|            } while (ossl_isspace(*from));
  ------------------
  |  |   82|  5.78M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  5.78M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 5.78M]
  |  |  ------------------
  ------------------
  458|  50.3M|        } else {
  459|  50.3M|            *to++ = ossl_tolower(*from);
  460|  50.3M|            from++;
  461|  50.3M|            i++;
  462|  50.3M|        }
  463|  56.3M|    }
  464|       |
  465|  3.56M|    out->length = (int)(to - out->data);
  466|       |
  467|  3.56M|    return 1;
  468|  3.56M|}
x_name.c:i2d_name_canon:
  472|  2.02M|{
  473|  2.02M|    int i, len, ltmp;
  474|  2.02M|    const ASN1_VALUE *v;
  475|  2.02M|    STACK_OF(ASN1_VALUE) *intname = (STACK_OF(ASN1_VALUE) *)_intname;
  ------------------
  |  |   33|  2.02M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  476|       |
  477|  2.02M|    len = 0;
  478|  9.15M|    for (i = 0; i < sk_ASN1_VALUE_num(intname); i++) {
  ------------------
  |  |  887|  9.15M|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (478:17): [True: 7.13M, False: 2.02M]
  ------------------
  479|  7.13M|        v = sk_ASN1_VALUE_value(intname, i);
  ------------------
  |  |  888|  7.13M|#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
  ------------------
  480|  7.13M|        ltmp = ASN1_item_ex_i2d(&v, in,
  481|  7.13M|            ASN1_ITEM_rptr(X509_NAME_ENTRIES), -1, -1);
  ------------------
  |  |  399|  7.13M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  482|  7.13M|        if (ltmp < 0 || len > INT_MAX - ltmp)
  ------------------
  |  Branch (482:13): [True: 0, False: 7.13M]
  |  Branch (482:25): [True: 0, False: 7.13M]
  ------------------
  483|      0|            return -1;
  484|  7.13M|        len += ltmp;
  485|  7.13M|    }
  486|  2.02M|    return len;
  487|  2.02M|}
x_name.c:local_sk_X509_NAME_ENTRY_free:
  132|  3.56M|{
  133|  3.56M|    sk_X509_NAME_ENTRY_free(ne);
  ------------------
  |  |  215|  3.56M|#define sk_X509_NAME_ENTRY_free(sk) OPENSSL_sk_free(ossl_check_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  134|  3.56M|}
x_name.c:local_sk_X509_NAME_ENTRY_pop_free:
  137|  3.56M|{
  138|  3.56M|    sk_X509_NAME_ENTRY_pop_free(ne, X509_NAME_ENTRY_free);
  ------------------
  |  |  223|  3.56M|#define sk_X509_NAME_ENTRY_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_freefunc_type(freefunc))
  ------------------
  139|  3.56M|}

ossl_d2i_X509_PUBKEY_INTERNAL:
   68|   503k|{
   69|   503k|    X509_PUBKEY *xpub = OPENSSL_zalloc(sizeof(*xpub));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   70|       |
   71|   503k|    if (xpub == NULL)
  ------------------
  |  Branch (71:9): [True: 0, False: 503k]
  ------------------
   72|      0|        return NULL;
   73|   503k|    return (X509_PUBKEY *)ASN1_item_d2i_ex((ASN1_VALUE **)&xpub, pp, len,
   74|   503k|        ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  399|   503k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   75|   503k|        libctx, propq);
   76|   503k|}
ossl_X509_PUBKEY_INTERNAL_free:
   79|  1.00M|{
   80|  1.00M|    ASN1_item_free((ASN1_VALUE *)xpub, ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL));
  ------------------
  |  |  399|  1.00M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   81|  1.00M|}
X509_PUBKEY_get0:
  446|  1.38M|{
  447|  1.38M|    if (key == NULL) {
  ------------------
  |  Branch (447:9): [True: 0, False: 1.38M]
  ------------------
  448|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  449|      0|        return NULL;
  450|      0|    }
  451|       |
  452|  1.38M|    if (key->pkey == NULL) {
  ------------------
  |  Branch (452:9): [True: 0, False: 1.38M]
  ------------------
  453|       |        /* We failed to decode the key when we loaded it, or it was never set */
  454|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_DECODE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  455|      0|        return NULL;
  456|      0|    }
  457|       |
  458|  1.38M|    return key->pkey;
  459|  1.38M|}
X509_PUBKEY_get:
  462|   503k|{
  463|   503k|    EVP_PKEY *ret = X509_PUBKEY_get0(key);
  464|       |
  465|   503k|    if (ret != NULL && !EVP_PKEY_up_ref(ret)) {
  ------------------
  |  Branch (465:9): [True: 503k, False: 0]
  |  Branch (465:24): [True: 0, False: 503k]
  ------------------
  466|      0|        ERR_raise(ERR_LIB_X509, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|       |        ret = NULL;
  468|      0|    }
  469|   503k|    return ret;
  470|   503k|}
ossl_d2i_PUBKEY_legacy:
  525|   503k|{
  526|   503k|    return d2i_PUBKEY_int(a, pp, length, NULL, NULL, 1, d2i_X509_PUBKEY);
  527|   503k|}
d2i_RSA_PUBKEY:
  594|   341k|{
  595|   341k|    EVP_PKEY *pkey;
  596|   341k|    RSA *key = NULL;
  597|   341k|    const unsigned char *q;
  598|       |
  599|   341k|    q = *pp;
  600|   341k|    pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length);
  601|   341k|    if (pkey == NULL)
  ------------------
  |  Branch (601:9): [True: 0, False: 341k]
  ------------------
  602|      0|        return NULL;
  603|   341k|    key = EVP_PKEY_get1_RSA(pkey);
  604|   341k|    EVP_PKEY_free(pkey);
  605|   341k|    if (key == NULL)
  ------------------
  |  Branch (605:9): [True: 0, False: 341k]
  ------------------
  606|      0|        return NULL;
  607|   341k|    *pp = q;
  608|   341k|    if (a != NULL) {
  ------------------
  |  Branch (608:9): [True: 0, False: 341k]
  ------------------
  609|      0|        RSA_free(*a);
  610|      0|        *a = key;
  611|      0|    }
  612|   341k|    return key;
  613|   341k|}
d2i_EC_PUBKEY:
  785|   162k|{
  786|   162k|    EVP_PKEY *pkey;
  787|   162k|    EC_KEY *key = NULL;
  788|   162k|    const unsigned char *q;
  789|   162k|    int type;
  790|       |
  791|   162k|    q = *pp;
  792|   162k|    pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length);
  793|   162k|    if (pkey == NULL)
  ------------------
  |  Branch (793:9): [True: 0, False: 162k]
  ------------------
  794|      0|        return NULL;
  795|   162k|    type = EVP_PKEY_get_id(pkey);
  796|   162k|    if (type == EVP_PKEY_EC || type == EVP_PKEY_SM2)
  ------------------
  |  |   73|   162k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   324k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
                  if (type == EVP_PKEY_EC || type == EVP_PKEY_SM2)
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (796:9): [True: 162k, False: 0]
  |  Branch (796:32): [True: 0, False: 0]
  ------------------
  797|   162k|        key = EVP_PKEY_get1_EC_KEY(pkey);
  798|   162k|    EVP_PKEY_free(pkey);
  799|   162k|    if (key == NULL)
  ------------------
  |  Branch (799:9): [True: 0, False: 162k]
  ------------------
  800|      0|        return NULL;
  801|   162k|    *pp = q;
  802|   162k|    if (a != NULL) {
  ------------------
  |  Branch (802:9): [True: 0, False: 162k]
  ------------------
  803|      0|        EC_KEY_free(*a);
  804|      0|        *a = key;
  805|      0|    }
  806|   162k|    return key;
  807|   162k|}
X509_PUBKEY_get0_param:
 1019|  1.00M|{
 1020|  1.00M|    if (ppkalg)
  ------------------
  |  Branch (1020:9): [True: 0, False: 1.00M]
  ------------------
 1021|      0|        *ppkalg = pub->algor->algorithm;
 1022|  1.00M|    if (pk) {
  ------------------
  |  Branch (1022:9): [True: 503k, False: 503k]
  ------------------
 1023|   503k|        *pk = pub->public_key->data;
 1024|   503k|        *ppklen = pub->public_key->length;
 1025|   503k|    }
 1026|  1.00M|    if (pa)
  ------------------
  |  Branch (1026:9): [True: 1.00M, False: 0]
  ------------------
 1027|  1.00M|        *pa = pub->algor;
 1028|  1.00M|    return 1;
 1029|  1.00M|}
ossl_x509_PUBKEY_get0_libctx:
 1061|   162k|{
 1062|   162k|    if (plibctx)
  ------------------
  |  Branch (1062:9): [True: 162k, False: 0]
  ------------------
 1063|   162k|        *plibctx = key->libctx;
 1064|   162k|    if (ppropq)
  ------------------
  |  Branch (1064:9): [True: 162k, False: 0]
  ------------------
 1065|   162k|        *ppropq = key->propq;
 1066|   162k|    return 1;
 1067|   162k|}
x_pubkey.c:x509_pubkey_ex_new_ex:
  109|   503k|{
  110|   503k|    X509_PUBKEY *ret;
  111|       |
  112|   503k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (112:9): [True: 0, False: 503k]
  ------------------
  113|      0|        return 0;
  114|   503k|    if (!x509_pubkey_ex_populate((ASN1_VALUE **)&ret, NULL)
  ------------------
  |  Branch (114:9): [True: 0, False: 503k]
  ------------------
  115|   503k|        || !x509_pubkey_set0_libctx(ret, libctx, propq)) {
  ------------------
  |  Branch (115:12): [True: 0, False: 503k]
  ------------------
  116|      0|        x509_pubkey_ex_free((ASN1_VALUE **)&ret, NULL);
  117|      0|        ret = NULL;
  118|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|   503k|    } else {
  120|   503k|        *pval = (ASN1_VALUE *)ret;
  121|   503k|    }
  122|       |
  123|       |    return ret != NULL;
  124|   503k|}
x_pubkey.c:x509_pubkey_ex_populate:
   98|  1.51M|{
   99|  1.51M|    X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval;
  100|       |
  101|  1.51M|    return (pubkey->algor != NULL
  ------------------
  |  Branch (101:13): [True: 503k, False: 1.00M]
  ------------------
  102|  1.00M|               || (pubkey->algor = X509_ALGOR_new()) != NULL)
  ------------------
  |  Branch (102:19): [True: 1.00M, False: 0]
  ------------------
  103|  1.51M|        && (pubkey->public_key != NULL
  ------------------
  |  Branch (103:13): [True: 503k, False: 1.00M]
  ------------------
  104|  1.00M|            || (pubkey->public_key = ASN1_BIT_STRING_new()) != NULL);
  ------------------
  |  Branch (104:16): [True: 1.00M, False: 0]
  ------------------
  105|  1.51M|}
x_pubkey.c:x509_pubkey_ex_d2i_ex:
  131|  1.00M|{
  132|  1.00M|    const unsigned char *in_saved = *in;
  133|  1.00M|    size_t publen;
  134|  1.00M|    X509_PUBKEY *pubkey;
  135|  1.00M|    int ret;
  136|  1.00M|    OSSL_DECODER_CTX *dctx = NULL;
  137|  1.00M|    unsigned char *tmpbuf = NULL;
  138|       |
  139|  1.00M|    if (*pval == NULL && !x509_pubkey_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (139:9): [True: 0, False: 1.00M]
  |  Branch (139:26): [True: 0, False: 0]
  ------------------
  140|      0|        return 0;
  141|  1.00M|    if (!x509_pubkey_ex_populate(pval, NULL)) {
  ------------------
  |  Branch (141:9): [True: 0, False: 1.00M]
  ------------------
  142|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  143|      0|        return 0;
  144|      0|    }
  145|       |
  146|       |    /* This ensures that |*in| advances properly no matter what */
  147|  1.00M|    if ((ret = asn1_item_embed_d2i(pval, in, len,
  ------------------
  |  Branch (147:9): [True: 0, False: 1.00M]
  ------------------
  148|  1.00M|             ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  399|  1.00M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  149|  1.00M|             tag, aclass, opt, ctx, 0,
  150|  1.00M|             NULL, NULL))
  151|  1.00M|        <= 0) {
  152|      0|        x509_pubkey_ex_free(pval, it);
  153|      0|        return ret;
  154|      0|    }
  155|       |
  156|  1.00M|    publen = *in - in_saved;
  157|  1.00M|    if (!ossl_assert(publen > 0)) {
  ------------------
  |  |   52|  1.00M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.00M|    __FILE__, __LINE__)
  ------------------
  |  Branch (157:9): [True: 0, False: 1.00M]
  ------------------
  158|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  159|      0|        return 0;
  160|      0|    }
  161|       |
  162|  1.00M|    pubkey = (X509_PUBKEY *)*pval;
  163|  1.00M|    EVP_PKEY_free(pubkey->pkey);
  164|  1.00M|    pubkey->pkey = NULL;
  165|       |
  166|       |    /*
  167|       |     * Opportunistically decode the key but remove any non fatal errors
  168|       |     * from the queue. Subsequent explicit attempts to decode/use the key
  169|       |     * will return an appropriate error.
  170|       |     */
  171|  1.00M|    ERR_set_mark();
  172|       |
  173|       |    /*
  174|       |     * Try to decode with legacy method first.  This ensures that engines
  175|       |     * aren't overridden by providers.
  176|       |     */
  177|  1.00M|    if ((ret = x509_pubkey_decode(&pubkey->pkey, pubkey)) == -1) {
  ------------------
  |  Branch (177:9): [True: 0, False: 1.00M]
  ------------------
  178|       |        /* -1 indicates a fatal error, like malloc failure */
  179|      0|        ERR_clear_last_mark();
  180|      0|        goto end;
  181|      0|    }
  182|       |
  183|       |    /* Try to decode it into an EVP_PKEY with OSSL_DECODER */
  184|  1.00M|    if (ret <= 0 && !pubkey->flag_force_legacy) {
  ------------------
  |  Branch (184:9): [True: 503k, False: 503k]
  |  Branch (184:21): [True: 503k, False: 0]
  ------------------
  185|   503k|        const unsigned char *p;
  186|   503k|        char txtoidname[OSSL_MAX_NAME_SIZE];
  187|   503k|        size_t slen = publen;
  188|       |
  189|       |        /*
  190|       |         * The decoders don't know how to handle anything other than Universal
  191|       |         * class so we modify the data accordingly.
  192|       |         */
  193|   503k|        if (aclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|   503k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (193:13): [True: 0, False: 503k]
  ------------------
  194|      0|            tmpbuf = OPENSSL_memdup(in_saved, publen);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  195|      0|            if (tmpbuf == NULL)
  ------------------
  |  Branch (195:17): [True: 0, False: 0]
  ------------------
  196|      0|                return 0;
  197|      0|            in_saved = tmpbuf;
  198|      0|            *tmpbuf = V_ASN1_CONSTRUCTED | V_ASN1_SEQUENCE;
  ------------------
  |  |   54|      0|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
                          *tmpbuf = V_ASN1_CONSTRUCTED | V_ASN1_SEQUENCE;
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  199|      0|        }
  200|   503k|        p = in_saved;
  201|       |
  202|   503k|        if (OBJ_obj2txt(txtoidname, sizeof(txtoidname),
  ------------------
  |  Branch (202:13): [True: 0, False: 503k]
  ------------------
  203|   503k|                pubkey->algor->algorithm, 0)
  204|   503k|            <= 0) {
  205|      0|            ERR_clear_last_mark();
  206|      0|            goto end;
  207|      0|        }
  208|   503k|        if ((dctx = OSSL_DECODER_CTX_new_for_pkey(&pubkey->pkey,
  ------------------
  |  Branch (208:13): [True: 503k, False: 0]
  ------------------
  209|   503k|                 "DER", "SubjectPublicKeyInfo",
  210|   503k|                 txtoidname, EVP_PKEY_PUBLIC_KEY,
  ------------------
  |  |  112|   503k|    (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  108|   503k|    (OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  653|   503k|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  648|   503k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  654|   503k|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  649|   503k|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|   503k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  211|   503k|                 pubkey->libctx,
  212|   503k|                 pubkey->propq))
  213|   503k|            != NULL)
  214|       |            /*
  215|       |             * As said higher up, we're being opportunistic.  In other words,
  216|       |             * we don't care if we fail.
  217|       |             */
  218|   503k|            if (OSSL_DECODER_from_data(dctx, &p, &slen)) {
  ------------------
  |  Branch (218:17): [True: 503k, False: 0]
  ------------------
  219|   503k|                if (slen != 0) {
  ------------------
  |  Branch (219:21): [True: 0, False: 503k]
  ------------------
  220|       |                    /*
  221|       |                     * If we successfully decoded then we *must* consume all the
  222|       |                     * bytes.
  223|       |                     */
  224|      0|                    ERR_clear_last_mark();
  225|      0|                    ERR_raise(ERR_LIB_ASN1, EVP_R_DECODE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  226|      0|                    goto end;
  227|      0|                }
  228|   503k|            }
  229|   503k|    }
  230|       |
  231|  1.00M|    ERR_pop_to_mark();
  232|  1.00M|    ret = 1;
  233|  1.00M|end:
  234|  1.00M|    OSSL_DECODER_CTX_free(dctx);
  235|  1.00M|    OPENSSL_free(tmpbuf);
  ------------------
  |  |  132|  1.00M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  236|  1.00M|    return ret;
  237|  1.00M|}
x_pubkey.c:x509_pubkey_set0_libctx:
   48|  1.00M|{
   49|  1.00M|    if (x != NULL) {
  ------------------
  |  Branch (49:9): [True: 1.00M, False: 0]
  ------------------
   50|  1.00M|        x->libctx = libctx;
   51|  1.00M|        OPENSSL_free(x->propq);
  ------------------
  |  |  132|  1.00M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   52|  1.00M|        x->propq = NULL;
   53|  1.00M|        if (propq != NULL) {
  ------------------
  |  Branch (53:13): [True: 1, False: 1.00M]
  ------------------
   54|      1|            x->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      1|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|      1|            if (x->propq == NULL)
  ------------------
  |  Branch (55:17): [True: 0, False: 1]
  ------------------
   56|      0|                return 0;
   57|      1|        }
   58|  1.00M|    }
   59|  1.00M|    return 1;
   60|  1.00M|}
x_pubkey.c:x509_pubkey_ex_free:
   84|  1.00M|{
   85|  1.00M|    X509_PUBKEY *pubkey;
   86|       |
   87|  1.00M|    if (pval != NULL && (pubkey = (X509_PUBKEY *)*pval) != NULL) {
  ------------------
  |  Branch (87:9): [True: 1.00M, False: 0]
  |  Branch (87:25): [True: 1.00M, False: 0]
  ------------------
   88|  1.00M|        X509_ALGOR_free(pubkey->algor);
   89|  1.00M|        ASN1_BIT_STRING_free(pubkey->public_key);
   90|  1.00M|        EVP_PKEY_free(pubkey->pkey);
   91|  1.00M|        OPENSSL_free(pubkey->propq);
  ------------------
  |  |  132|  1.00M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   92|  1.00M|        OPENSSL_free(pubkey);
  ------------------
  |  |  132|  1.00M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|       |        *pval = NULL;
   94|  1.00M|    }
   95|  1.00M|}
x_pubkey.c:x509_pubkey_decode:
  405|  1.00M|{
  406|  1.00M|    EVP_PKEY *pkey;
  407|  1.00M|    int nid;
  408|       |
  409|  1.00M|    nid = OBJ_obj2nid(key->algor->algorithm);
  410|  1.00M|    if (!key->flag_force_legacy)
  ------------------
  |  Branch (410:9): [True: 503k, False: 503k]
  ------------------
  411|   503k|        return 0;
  412|       |
  413|   503k|    pkey = EVP_PKEY_new();
  414|   503k|    if (pkey == NULL) {
  ------------------
  |  Branch (414:9): [True: 0, False: 503k]
  ------------------
  415|      0|        ERR_raise(ERR_LIB_X509, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  416|      0|        return -1;
  417|      0|    }
  418|       |
  419|   503k|    if (!EVP_PKEY_set_type(pkey, nid)) {
  ------------------
  |  Branch (419:9): [True: 0, False: 503k]
  ------------------
  420|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  421|      0|        goto error;
  422|      0|    }
  423|       |
  424|   503k|    if (pkey->ameth->pub_decode) {
  ------------------
  |  Branch (424:9): [True: 503k, False: 0]
  ------------------
  425|       |        /*
  426|       |         * Treat any failure of pub_decode as a decode error. In
  427|       |         * future we could have different return codes for decode
  428|       |         * errors and fatal errors such as malloc failure.
  429|       |         */
  430|   503k|        if (!pkey->ameth->pub_decode(pkey, key))
  ------------------
  |  Branch (430:13): [True: 0, False: 503k]
  ------------------
  431|      0|            goto error;
  432|   503k|    } else {
  433|      0|        ERR_raise(ERR_LIB_X509, X509_R_METHOD_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  434|      0|        goto error;
  435|      0|    }
  436|       |
  437|   503k|    *ppkey = pkey;
  438|   503k|    return 1;
  439|       |
  440|      0|error:
  441|      0|    EVP_PKEY_free(pkey);
  442|      0|    return 0;
  443|   503k|}
x_pubkey.c:d2i_PUBKEY_int:
  483|   503k|{
  484|   503k|    X509_PUBKEY *xpk, *xpk2 = NULL, **pxpk = NULL;
  485|   503k|    EVP_PKEY *pktmp = NULL;
  486|   503k|    const unsigned char *q;
  487|       |
  488|   503k|    q = *pp;
  489|       |
  490|       |    /*
  491|       |     * If libctx or propq are non-NULL, we take advantage of the reuse
  492|       |     * feature.  It's not generally recommended, but is safe enough for
  493|       |     * newly created structures.
  494|       |     */
  495|   503k|    if (libctx != NULL || propq != NULL || force_legacy) {
  ------------------
  |  Branch (495:9): [True: 0, False: 503k]
  |  Branch (495:27): [True: 0, False: 503k]
  |  Branch (495:44): [True: 503k, False: 0]
  ------------------
  496|   503k|        xpk2 = OPENSSL_zalloc(sizeof(*xpk2));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  497|   503k|        if (xpk2 == NULL)
  ------------------
  |  Branch (497:13): [True: 0, False: 503k]
  ------------------
  498|      0|            return NULL;
  499|   503k|        if (!x509_pubkey_set0_libctx(xpk2, libctx, propq))
  ------------------
  |  Branch (499:13): [True: 0, False: 503k]
  ------------------
  500|      0|            goto end;
  501|   503k|        xpk2->flag_force_legacy = !!force_legacy;
  502|   503k|        pxpk = &xpk2;
  503|   503k|    }
  504|   503k|    xpk = d2i_x509_pubkey(pxpk, &q, length);
  505|   503k|    if (xpk == NULL)
  ------------------
  |  Branch (505:9): [True: 0, False: 503k]
  ------------------
  506|      0|        goto end;
  507|   503k|    pktmp = X509_PUBKEY_get(xpk);
  508|   503k|    X509_PUBKEY_free(xpk);
  509|   503k|    xpk2 = NULL; /* We know that xpk == xpk2 */
  510|   503k|    if (pktmp == NULL)
  ------------------
  |  Branch (510:9): [True: 0, False: 503k]
  ------------------
  511|      0|        goto end;
  512|   503k|    *pp = q;
  513|   503k|    if (a != NULL) {
  ------------------
  |  Branch (513:9): [True: 0, False: 503k]
  ------------------
  514|      0|        EVP_PKEY_free(*a);
  515|      0|        *a = pktmp;
  516|      0|    }
  517|   503k|end:
  518|   503k|    X509_PUBKEY_free(xpk2);
  519|   503k|    return pktmp;
  520|   503k|}

ossl_x509_set0_libctx:
  141|   503k|{
  142|   503k|    if (x != NULL) {
  ------------------
  |  Branch (142:9): [True: 503k, False: 0]
  ------------------
  143|   503k|        x->libctx = libctx;
  144|   503k|        OPENSSL_free(x->propq);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  145|   503k|        x->propq = NULL;
  146|   503k|        if (propq != NULL) {
  ------------------
  |  Branch (146:13): [True: 1, False: 503k]
  ------------------
  147|      1|            x->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      1|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|      1|            if (x->propq == NULL)
  ------------------
  |  Branch (148:17): [True: 0, False: 1]
  ------------------
  149|      0|                return 0;
  150|      1|        }
  151|   503k|    }
  152|   503k|    return 1;
  153|   503k|}
X509_new_ex:
  156|   503k|{
  157|   503k|    X509 *cert = NULL;
  158|       |
  159|   503k|    cert = (X509 *)ASN1_item_new_ex(X509_it(), libctx, propq);
  160|   503k|    if (!ossl_x509_set0_libctx(cert, libctx, propq)) {
  ------------------
  |  Branch (160:9): [True: 0, False: 503k]
  ------------------
  161|      0|        X509_free(cert);
  162|       |        cert = NULL;
  163|      0|    }
  164|   503k|    return cert;
  165|   503k|}
x_x509.c:x509_cb:
   38|  4.34M|{
   39|  4.34M|    X509 *ret = (X509 *)*pval;
   40|       |
   41|  4.34M|    switch (operation) {
   42|       |
   43|   503k|    case ASN1_OP_D2I_PRE:
  ------------------
  |  |  735|   503k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (43:5): [True: 503k, False: 3.84M]
  ------------------
   44|   503k|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data);
  ------------------
  |  |  254|   503k|#define CRYPTO_EX_INDEX_X509 3
  ------------------
   45|   503k|        X509_CERT_AUX_free(ret->aux);
   46|   503k|        ASN1_OCTET_STRING_free(ret->skid);
   47|   503k|        AUTHORITY_KEYID_free(ret->akid);
   48|   503k|        CRL_DIST_POINTS_free(ret->crldp);
   49|   503k|        ossl_policy_cache_free(ret->policy_cache);
   50|   503k|        GENERAL_NAMES_free(ret->altname);
   51|   503k|        NAME_CONSTRAINTS_free(ret->nc);
   52|   503k|#ifndef OPENSSL_NO_RFC3779
   53|   503k|        sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free);
  ------------------
  |  | 1269|   503k|#define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_freefunc_type(freefunc))
  ------------------
   54|   503k|        ASIdentifiers_free(ret->rfc3779_asid);
   55|   503k|#endif
   56|   503k|        ASN1_OCTET_STRING_free(ret->distinguishing_id);
   57|       |
   58|       |        /* fall through */
   59|       |
   60|  1.00M|    case ASN1_OP_NEW_POST:
  ------------------
  |  |  732|  1.00M|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (60:5): [True: 503k, False: 3.84M]
  ------------------
   61|  1.00M|        ret->ex_cached = 0;
   62|  1.00M|        ret->ex_kusage = 0;
   63|  1.00M|        ret->ex_xkusage = 0;
   64|  1.00M|        ret->ex_nscert = 0;
   65|  1.00M|        ret->ex_flags = 0;
   66|  1.00M|        ret->ex_pathlen = -1;
   67|  1.00M|        ret->ex_pcpathlen = -1;
   68|  1.00M|        ret->skid = NULL;
   69|  1.00M|        ret->akid = NULL;
   70|  1.00M|        ret->policy_cache = NULL;
   71|  1.00M|        ret->altname = NULL;
   72|  1.00M|        ret->nc = NULL;
   73|  1.00M|#ifndef OPENSSL_NO_RFC3779
   74|  1.00M|        ret->rfc3779_addr = NULL;
   75|  1.00M|        ret->rfc3779_asid = NULL;
   76|  1.00M|#endif
   77|  1.00M|        ret->distinguishing_id = NULL;
   78|  1.00M|        ret->aux = NULL;
   79|  1.00M|        ret->crldp = NULL;
   80|  1.00M|        if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data))
  ------------------
  |  |  254|  1.00M|#define CRYPTO_EX_INDEX_X509 3
  ------------------
  |  Branch (80:13): [True: 0, False: 1.00M]
  ------------------
   81|      0|            return 0;
   82|  1.00M|        break;
   83|       |
   84|  1.00M|    case ASN1_OP_FREE_POST:
  ------------------
  |  |  734|   503k|#define ASN1_OP_FREE_POST 3
  ------------------
  |  Branch (84:5): [True: 503k, False: 3.84M]
  ------------------
   85|   503k|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data);
  ------------------
  |  |  254|   503k|#define CRYPTO_EX_INDEX_X509 3
  ------------------
   86|   503k|        X509_CERT_AUX_free(ret->aux);
   87|   503k|        ASN1_OCTET_STRING_free(ret->skid);
   88|   503k|        AUTHORITY_KEYID_free(ret->akid);
   89|   503k|        CRL_DIST_POINTS_free(ret->crldp);
   90|   503k|        ossl_policy_cache_free(ret->policy_cache);
   91|   503k|        GENERAL_NAMES_free(ret->altname);
   92|   503k|        NAME_CONSTRAINTS_free(ret->nc);
   93|   503k|#ifndef OPENSSL_NO_RFC3779
   94|   503k|        sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free);
  ------------------
  |  | 1269|   503k|#define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_freefunc_type(freefunc))
  ------------------
   95|   503k|        ASIdentifiers_free(ret->rfc3779_asid);
   96|   503k|#endif
   97|   503k|        ASN1_OCTET_STRING_free(ret->distinguishing_id);
   98|   503k|        OPENSSL_free(ret->propq);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|   503k|        break;
  100|       |
  101|      0|    case ASN1_OP_DUP_POST: {
  ------------------
  |  |  746|      0|#define ASN1_OP_DUP_POST 15
  ------------------
  |  Branch (101:5): [True: 0, False: 4.34M]
  ------------------
  102|      0|        X509 *old = exarg;
  103|       |
  104|      0|        if (!ossl_x509_set0_libctx(ret, old->libctx, old->propq))
  ------------------
  |  Branch (104:13): [True: 0, False: 0]
  ------------------
  105|      0|            return 0;
  106|      0|    } break;
  107|      0|    case ASN1_OP_GET0_LIBCTX: {
  ------------------
  |  |  747|      0|#define ASN1_OP_GET0_LIBCTX 16
  ------------------
  |  Branch (107:5): [True: 0, False: 4.34M]
  ------------------
  108|      0|        OSSL_LIB_CTX **libctx = exarg;
  109|       |
  110|      0|        *libctx = ret->libctx;
  111|      0|    } break;
  112|       |
  113|      0|    case ASN1_OP_GET0_PROPQ: {
  ------------------
  |  |  748|      0|#define ASN1_OP_GET0_PROPQ 17
  ------------------
  |  Branch (113:5): [True: 0, False: 4.34M]
  ------------------
  114|      0|        const char **propq = exarg;
  115|       |
  116|      0|        *propq = ret->propq;
  117|      0|    } break;
  118|       |
  119|  2.83M|    default:
  ------------------
  |  Branch (119:5): [True: 2.83M, False: 1.51M]
  ------------------
  120|  2.83M|        break;
  121|  4.34M|    }
  122|       |
  123|  4.34M|    return 1;
  124|  4.34M|}

EVP_aria_128_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_cfb128:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_cfb128:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_cfb128:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_cfb1:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_cfb1:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_cfb1:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_cfb8:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_cfb8:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_cfb8:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_bf_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_bf_cfb64:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_bf_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_bf_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_cast5_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_cast5_cfb64:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_cast5_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_cast5_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_cfb64:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_cfb1:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_cfb8:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede_cfb64:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_cfb64:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_cfb1:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_cfb8:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_idea_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_idea_cfb64:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_idea_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_idea_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc2_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc2_cfb64:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc2_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc2_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc5_32_12_16_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc5_32_12_16_cfb64:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc5_32_12_16_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc5_32_12_16_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_seed_cbc:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_seed_cfb128:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_seed_ofb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_seed_ecb:
  272|      1|    const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }

SHA1_Update_thunk:
  163|   441k|{
  164|   441k|#ifdef HASH_UPDATE_THUNK
  165|   441k|    HASH_CTX *c = (HASH_CTX *)cp;
  ------------------
  |  |   20|   441k|#define HASH_CTX SHA_CTX
  ------------------
  166|   441k|#endif
  167|   441k|    const unsigned char *data = data_;
  168|   441k|    unsigned char *p;
  169|   441k|    HASH_LONG l;
  ------------------
  |  |   19|   441k|#define HASH_LONG SHA_LONG
  ------------------
  170|   441k|    size_t n;
  171|       |
  172|   441k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|   441k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 441k]
  |  |  ------------------
  ------------------
  173|      0|        return 1;
  174|       |
  175|   441k|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  176|   441k|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|   441k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 441k]
  |  |  ------------------
  ------------------
  177|      0|        c->Nh++;
  178|   441k|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  179|       |                                      * 16-bit */
  180|   441k|    c->Nl = l;
  181|       |
  182|   441k|    n = c->num;
  183|   441k|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|   441k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 441k]
  |  |  ------------------
  ------------------
  184|       |        /* Gets here if we already have buffered input data */
  185|      0|        p = (unsigned char *)c->data;
  186|       |
  187|      0|        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (187:13): [True: 0, False: 0]
  |  Branch (187:35): [True: 0, False: 0]
  ------------------
  188|       |            /*
  189|       |             * If there is enough input to fill the buffer then fill the
  190|       |             * buffer and process a single chunk.
  191|       |             */
  192|      0|            memcpy(p + n, data, HASH_CBLOCK - n);
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  193|      0|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   42|      0|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  194|      0|            n = HASH_CBLOCK - n;
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|      0|            data += n;
  196|      0|            len -= n;
  197|      0|            c->num = 0;
  198|       |            /*
  199|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  200|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  201|       |             * will get properly cleansed on finalisation so this isn't a
  202|       |             * security problem.
  203|       |             */
  204|      0|            memset(p, 0, HASH_CBLOCK); /* keep it zeroed */
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      0|        } else {
  206|       |            /* Otherwise just keep filling the buffer */
  207|      0|            memcpy(p + n, data, len);
  208|      0|            c->num += (unsigned int)len;
  209|      0|            return 1;
  210|      0|        }
  211|      0|    }
  212|       |
  213|   441k|    n = len / HASH_CBLOCK; /* Get number of input chunks (e.g. multiple of 512 bits for SHA256) */
  ------------------
  |  |   21|   441k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   441k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   441k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|   441k|    if (n > 0) {
  ------------------
  |  Branch (214:9): [True: 441k, False: 0]
  ------------------
  215|       |        /* Process chunks */
  216|   441k|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |   42|   441k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  217|   441k|        n *= HASH_CBLOCK;
  ------------------
  |  |   21|   441k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   441k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   441k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|   441k|        data += n;
  219|   441k|        len -= n;
  220|   441k|    }
  221|       |    /* Buffer any left over data */
  222|   441k|    if (len != 0) {
  ------------------
  |  Branch (222:9): [True: 441k, False: 0]
  ------------------
  223|   441k|        p = (unsigned char *)c->data;
  224|   441k|        c->num = (unsigned int)len;
  225|   441k|        memcpy(p, data, len);
  226|   441k|    }
  227|   441k|    return 1;
  228|   441k|}
SHA1_Final:
  236|   441k|{
  237|   441k|    unsigned char *p = (unsigned char *)c->data;
  238|   441k|    size_t n = c->num;
  239|       |
  240|       |    /*
  241|       |     * Pad the input by adding a 1 bit + K zero bits + input length (L)
  242|       |     * as a 64 bit value. K must align the data to a chunk boundary.
  243|       |     */
  244|   441k|    p[n] = 0x80; /* there is always room for one */
  245|   441k|    n++;
  246|       |
  247|   441k|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   21|   441k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   441k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   441k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (247:9): [True: 51.0k, False: 390k]
  ------------------
  248|       |        /*
  249|       |         * If there is not enough room in the buffer to add L, then fill the
  250|       |         * current buffer with zeros, and process the chunk
  251|       |         */
  252|  51.0k|        memset(p + n, 0, HASH_CBLOCK - n);
  ------------------
  |  |   21|  51.0k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  51.0k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  51.0k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  253|  51.0k|        n = 0;
  254|  51.0k|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   42|  51.0k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  255|  51.0k|    }
  256|       |    /* Add zero padding - but leave enough room for L */
  257|   441k|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   21|   441k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   441k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   441k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  258|       |
  259|       |    /* Add the 64 bit L value to the end of the buffer */
  260|   441k|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   21|   441k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   441k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   441k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  261|   441k|#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  262|   441k|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  133|   441k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|   441k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|   441k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|   441k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|   441k|    l)
  ------------------
  263|   441k|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  133|   441k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|   441k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|   441k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|   441k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|   441k|    l)
  ------------------
  264|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  265|       |    (void)HOST_l2c(c->Nl, p);
  266|       |    (void)HOST_l2c(c->Nh, p);
  267|       |#endif
  268|   441k|    p -= HASH_CBLOCK;
  ------------------
  |  |   21|   441k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   441k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   441k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  269|       |    /* Process the final padded chunk */
  270|   441k|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   42|   441k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  271|   441k|    c->num = 0;
  272|   441k|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   21|   441k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   441k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   441k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  273|       |
  274|       |#ifndef HASH_MAKE_STRING
  275|       |#error "HASH_MAKE_STRING must be defined!"
  276|       |#else
  277|   441k|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   23|   441k|    do {                         \
  |  |   24|   441k|        unsigned long ll;        \
  |  |   25|   441k|        ll = (c)->h0;            \
  |  |   26|   441k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   441k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   441k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   441k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   441k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   441k|    l)
  |  |  ------------------
  |  |   27|   441k|        ll = (c)->h1;            \
  |  |   28|   441k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   441k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   441k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   441k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   441k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   441k|    l)
  |  |  ------------------
  |  |   29|   441k|        ll = (c)->h2;            \
  |  |   30|   441k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   441k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   441k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   441k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   441k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   441k|    l)
  |  |  ------------------
  |  |   31|   441k|        ll = (c)->h3;            \
  |  |   32|   441k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   441k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   441k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   441k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   441k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   441k|    l)
  |  |  ------------------
  |  |   33|   441k|        ll = (c)->h4;            \
  |  |   34|   441k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|   441k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   441k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   441k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   441k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   441k|    l)
  |  |  ------------------
  |  |   35|   441k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (35:14): [Folded, False: 441k]
  |  |  ------------------
  ------------------
  278|   441k|#endif
  279|       |
  280|   441k|    return 1;
  281|   441k|}
SHA256_Update_thunk:
  163|   696k|{
  164|   696k|#ifdef HASH_UPDATE_THUNK
  165|   696k|    HASH_CTX *c = (HASH_CTX *)cp;
  ------------------
  |  |   77|   696k|#define HASH_CTX SHA256_CTX
  ------------------
  166|   696k|#endif
  167|   696k|    const unsigned char *data = data_;
  168|   696k|    unsigned char *p;
  169|   696k|    HASH_LONG l;
  ------------------
  |  |   76|   696k|#define HASH_LONG SHA_LONG
  ------------------
  170|   696k|    size_t n;
  171|       |
  172|   696k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|   696k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 696k]
  |  |  ------------------
  ------------------
  173|      0|        return 1;
  174|       |
  175|   696k|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  176|   696k|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|   696k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 696k]
  |  |  ------------------
  ------------------
  177|      0|        c->Nh++;
  178|   696k|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  179|       |                                      * 16-bit */
  180|   696k|    c->Nl = l;
  181|       |
  182|   696k|    n = c->num;
  183|   696k|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|   696k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 674k, False: 22.4k]
  |  |  ------------------
  ------------------
  184|       |        /* Gets here if we already have buffered input data */
  185|   674k|        p = (unsigned char *)c->data;
  186|       |
  187|   674k|        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   78|   674k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  1.34M|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   674k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   78|   674k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|   674k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   674k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (187:13): [True: 0, False: 674k]
  |  Branch (187:35): [True: 10.7k, False: 663k]
  ------------------
  188|       |            /*
  189|       |             * If there is enough input to fill the buffer then fill the
  190|       |             * buffer and process a single chunk.
  191|       |             */
  192|  10.7k|            memcpy(p + n, data, HASH_CBLOCK - n);
  ------------------
  |  |   78|  10.7k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.7k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.7k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  193|  10.7k|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  126|  10.7k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  194|  10.7k|            n = HASH_CBLOCK - n;
  ------------------
  |  |   78|  10.7k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.7k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.7k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|  10.7k|            data += n;
  196|  10.7k|            len -= n;
  197|  10.7k|            c->num = 0;
  198|       |            /*
  199|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  200|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  201|       |             * will get properly cleansed on finalisation so this isn't a
  202|       |             * security problem.
  203|       |             */
  204|  10.7k|            memset(p, 0, HASH_CBLOCK); /* keep it zeroed */
  ------------------
  |  |   78|  10.7k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.7k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.7k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|   663k|        } else {
  206|       |            /* Otherwise just keep filling the buffer */
  207|   663k|            memcpy(p + n, data, len);
  208|   663k|            c->num += (unsigned int)len;
  209|   663k|            return 1;
  210|   663k|        }
  211|   674k|    }
  212|       |
  213|  33.1k|    n = len / HASH_CBLOCK; /* Get number of input chunks (e.g. multiple of 512 bits for SHA256) */
  ------------------
  |  |   78|  33.1k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  33.1k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  33.1k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|  33.1k|    if (n > 0) {
  ------------------
  |  Branch (214:9): [True: 2.16k, False: 31.0k]
  ------------------
  215|       |        /* Process chunks */
  216|  2.16k|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |  126|  2.16k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  217|  2.16k|        n *= HASH_CBLOCK;
  ------------------
  |  |   78|  2.16k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  2.16k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  2.16k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|  2.16k|        data += n;
  219|  2.16k|        len -= n;
  220|  2.16k|    }
  221|       |    /* Buffer any left over data */
  222|  33.1k|    if (len != 0) {
  ------------------
  |  Branch (222:9): [True: 22.4k, False: 10.7k]
  ------------------
  223|  22.4k|        p = (unsigned char *)c->data;
  224|  22.4k|        c->num = (unsigned int)len;
  225|  22.4k|        memcpy(p, data, len);
  226|  22.4k|    }
  227|  33.1k|    return 1;
  228|   696k|}
SHA256_Final:
  236|  12.8k|{
  237|  12.8k|    unsigned char *p = (unsigned char *)c->data;
  238|  12.8k|    size_t n = c->num;
  239|       |
  240|       |    /*
  241|       |     * Pad the input by adding a 1 bit + K zero bits + input length (L)
  242|       |     * as a 64 bit value. K must align the data to a chunk boundary.
  243|       |     */
  244|  12.8k|    p[n] = 0x80; /* there is always room for one */
  245|  12.8k|    n++;
  246|       |
  247|  12.8k|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   78|  12.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  12.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (247:9): [True: 1.16k, False: 11.6k]
  ------------------
  248|       |        /*
  249|       |         * If there is not enough room in the buffer to add L, then fill the
  250|       |         * current buffer with zeros, and process the chunk
  251|       |         */
  252|  1.16k|        memset(p + n, 0, HASH_CBLOCK - n);
  ------------------
  |  |   78|  1.16k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  1.16k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.16k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  253|  1.16k|        n = 0;
  254|  1.16k|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  126|  1.16k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  255|  1.16k|    }
  256|       |    /* Add zero padding - but leave enough room for L */
  257|  12.8k|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   78|  12.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  12.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  258|       |
  259|       |    /* Add the 64 bit L value to the end of the buffer */
  260|  12.8k|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   78|  12.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  12.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  261|  12.8k|#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  262|  12.8k|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  133|  12.8k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  12.8k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  12.8k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  12.8k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  12.8k|    l)
  ------------------
  263|  12.8k|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  133|  12.8k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  12.8k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  12.8k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  12.8k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  12.8k|    l)
  ------------------
  264|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  265|       |    (void)HOST_l2c(c->Nl, p);
  266|       |    (void)HOST_l2c(c->Nh, p);
  267|       |#endif
  268|  12.8k|    p -= HASH_CBLOCK;
  ------------------
  |  |   78|  12.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  12.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  269|       |    /* Process the final padded chunk */
  270|  12.8k|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  126|  12.8k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  271|  12.8k|    c->num = 0;
  272|  12.8k|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   78|  12.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  12.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  273|       |
  274|       |#ifndef HASH_MAKE_STRING
  275|       |#error "HASH_MAKE_STRING must be defined!"
  276|       |#else
  277|  12.8k|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   89|  12.8k|    do {                                                            \
  |  |   90|  12.8k|        unsigned long ll;                                           \
  |  |   91|  12.8k|        unsigned int nn;                                            \
  |  |   92|  12.8k|        switch ((c)->md_len) {                                      \
  |  |   93|      0|        case SHA256_192_DIGEST_LENGTH:                              \
  |  |  ------------------
  |  |  |  |   85|      0|#define SHA256_192_DIGEST_LENGTH 24
  |  |  ------------------
  |  |  |  Branch (93:9): [True: 0, False: 12.8k]
  |  |  ------------------
  |  |   94|      0|            for (nn = 0; nn < SHA256_192_DIGEST_LENGTH / 4; nn++) { \
  |  |  ------------------
  |  |  |  |   85|      0|#define SHA256_192_DIGEST_LENGTH 24
  |  |  ------------------
  |  |  |  Branch (94:26): [True: 0, False: 0]
  |  |  ------------------
  |  |   95|      0|                ll = (c)->h[nn];                                    \
  |  |   96|      0|                (void)HOST_l2c(ll, (s));                            \
  |  |  ------------------
  |  |  |  |  133|      0|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|      0|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|      0|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|      0|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|      0|    l)
  |  |  ------------------
  |  |   97|      0|            }                                                       \
  |  |   98|      0|            break;                                                  \
  |  |   99|      0|        case SHA224_DIGEST_LENGTH:                                  \
  |  |  ------------------
  |  |  |  |   86|      0|#define SHA224_DIGEST_LENGTH 28
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 0, False: 12.8k]
  |  |  ------------------
  |  |  100|      0|            for (nn = 0; nn < SHA224_DIGEST_LENGTH / 4; nn++) {     \
  |  |  ------------------
  |  |  |  |   86|      0|#define SHA224_DIGEST_LENGTH 28
  |  |  ------------------
  |  |  |  Branch (100:26): [True: 0, False: 0]
  |  |  ------------------
  |  |  101|      0|                ll = (c)->h[nn];                                    \
  |  |  102|      0|                (void)HOST_l2c(ll, (s));                            \
  |  |  ------------------
  |  |  |  |  133|      0|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|      0|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|      0|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|      0|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|      0|    l)
  |  |  ------------------
  |  |  103|      0|            }                                                       \
  |  |  104|      0|            break;                                                  \
  |  |  105|  12.8k|        case SHA256_DIGEST_LENGTH:                                  \
  |  |  ------------------
  |  |  |  |   87|  12.8k|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (105:9): [True: 12.8k, False: 0]
  |  |  ------------------
  |  |  106|   115k|            for (nn = 0; nn < SHA256_DIGEST_LENGTH / 4; nn++) {     \
  |  |  ------------------
  |  |  |  |   87|   115k|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (106:26): [True: 102k, False: 12.8k]
  |  |  ------------------
  |  |  107|   102k|                ll = (c)->h[nn];                                    \
  |  |  108|   102k|                (void)HOST_l2c(ll, (s));                            \
  |  |  ------------------
  |  |  |  |  133|   102k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   102k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   102k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   102k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   102k|    l)
  |  |  ------------------
  |  |  109|   102k|            }                                                       \
  |  |  110|  12.8k|            break;                                                  \
  |  |  111|      0|        default:                                                    \
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 12.8k]
  |  |  ------------------
  |  |  112|      0|            if ((c)->md_len > SHA256_DIGEST_LENGTH)                 \
  |  |  ------------------
  |  |  |  |   87|      0|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (112:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  113|      0|                return 0;                                           \
  |  |  114|      0|            for (nn = 0; nn < (c)->md_len / 4; nn++) {              \
  |  |  ------------------
  |  |  |  Branch (114:26): [True: 0, False: 0]
  |  |  ------------------
  |  |  115|      0|                ll = (c)->h[nn];                                    \
  |  |  116|      0|                (void)HOST_l2c(ll, (s));                            \
  |  |  ------------------
  |  |  |  |  133|      0|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|      0|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|      0|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|      0|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|      0|    l)
  |  |  ------------------
  |  |  117|      0|            }                                                       \
  |  |  118|      0|            break;                                                  \
  |  |  119|  12.8k|        }                                                           \
  |  |  120|  12.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (120:14): [Folded, False: 12.8k]
  |  |  ------------------
  ------------------
  278|  12.8k|#endif
  279|       |
  280|  12.8k|    return 1;
  281|  12.8k|}

threads_common.c:ossl_sa_CTX_TABLE_ENTRY_get:
   60|  24.3M|    {                                                                                                              \
   61|  24.3M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  24.3M|    }                                                                                                              \
threads_common.c:ossl_sa_CTX_TABLE_ENTRY_new:
   26|      3|    {                                                                                                              \
   27|      3|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|      3|    }                                                                                                              \
threads_common.c:ossl_sa_CTX_TABLE_ENTRY_set:
   66|  2.38k|    {                                                                                                              \
   67|  2.38k|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|  2.38k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_new:
   26|  12.9k|    {                                                                                                              \
   27|  12.9k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|  12.9k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_free:
   31|  12.9k|    {                                                                                                              \
   32|  12.9k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|  12.9k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_get:
   60|  1.27M|    {                                                                                                              \
   61|  1.27M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  1.27M|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_set:
   66|   385k|    {                                                                                                              \
   67|   385k|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|   385k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_doall_arg:
   55|  27.3k|    {                                                                                                              \
   56|  27.3k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|  27.3k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|  27.3k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_num:
   41|     24|    {                                                                                                              \
   42|     24|        return ossl_sa_num((OPENSSL_SA *)sa);                                                                      \
   43|     24|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_doall:
   47|  14.3k|    {                                                                                                              \
   48|  14.3k|        ossl_sa_doall((OPENSSL_SA *)sa,                                                                            \
   49|  14.3k|            (void (*)(ossl_uintmax_t, void *))leaf);                                                               \
   50|  14.3k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_doall_arg:
   55|   341k|    {                                                                                                              \
   56|   341k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|   341k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|   341k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_free:
   31|   341k|    {                                                                                                              \
   32|   341k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|   341k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_new:
   26|   341k|    {                                                                                                              \
   27|   341k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|   341k|    }                                                                                                              \

s3_lib.c:ossl_assert_int:
   45|  5.15k|{
   46|  5.15k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 5.15k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  5.15k|    return expr;
   50|  5.15k|}
ssl_cert.c:ossl_assert_int:
   45|  3.47k|{
   46|  3.47k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.47k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.47k|    return expr;
   50|  3.47k|}
ssl_ciph.c:ossl_assert_int:
   45|  26.8k|{
   46|  26.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 26.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  26.8k|    return expr;
   50|  26.8k|}
ssl_lib.c:ossl_assert_int:
   45|  2.58k|{
   46|  2.58k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.58k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.58k|    return expr;
   50|  2.58k|}
rec_layer_s3.c:ossl_assert_int:
   45|  15.5k|{
   46|  15.5k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 15.5k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  15.5k|    return expr;
   50|  15.5k|}
tls_common.c:ossl_assert_int:
   45|  13.8k|{
   46|  13.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 13.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  13.8k|    return expr;
   50|  13.8k|}
statem.c:ossl_assert_int:
   45|    184|{
   46|    184|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 184]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    184|    return expr;
   50|    184|}
decoder_lib.c:ossl_assert_int:
   45|     17|{
   46|     17|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 17]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|     17|    return expr;
   50|     17|}
decoder_meth.c:ossl_assert_int:
   45|  5.21M|{
   46|  5.21M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 5.21M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  5.21M|    return expr;
   50|  5.21M|}
digest.c:ossl_assert_int:
   45|   964k|{
   46|   964k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 964k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   964k|    return expr;
   50|   964k|}
evp_enc.c:ossl_assert_int:
   45|   242k|{
   46|   242k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 242k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   242k|    return expr;
   50|   242k|}
evp_fetch.c:ossl_assert_int:
   45|  2.98M|{
   46|  2.98M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.98M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.98M|    return expr;
   50|  2.98M|}
p_lib.c:ossl_assert_int:
   45|  3.98M|{
   46|  3.98M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.98M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.98M|    return expr;
   50|  3.98M|}
pmeth_lib.c:ossl_assert_int:
   45|  91.8k|{
   46|  91.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 91.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  91.8k|    return expr;
   50|  91.8k|}
core_algorithm.c:ossl_assert_int:
   45|  1.19k|{
   46|  1.19k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.19k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.19k|    return expr;
   50|  1.19k|}
core_fetch.c:ossl_assert_int:
   45|   168k|{
   46|   168k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 168k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   168k|    return expr;
   50|   168k|}
core_namemap.c:ossl_assert_int:
   45|   433k|{
   46|   433k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 433k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   433k|    return expr;
   50|   433k|}
packet.c:ossl_assert_int:
   45|  3.74M|{
   46|  3.74M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.74M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.74M|    return expr;
   50|  3.74M|}
provider_core.c:ossl_assert_int:
   45|   163k|{
   46|   163k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 163k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   163k|    return expr;
   50|   163k|}
threads_common.c:ossl_assert_int:
   45|  24.3M|{
   46|  24.3M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 24.3M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  24.3M|    return expr;
   50|  24.3M|}
threads_pthread.c:ossl_assert_int:
   45|  17.8M|{
   46|  17.8M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 17.8M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  17.8M|    return expr;
   50|  17.8M|}
defn_cache.c:ossl_assert_int:
   45|   387k|{
   46|   387k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 387k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   387k|    return expr;
   50|   387k|}
property.c:ossl_assert_int:
   45|   227k|{
   46|   227k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 227k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   227k|    return expr;
   50|   227k|}
x_pubkey.c:ossl_assert_int:
   45|  1.00M|{
   46|  1.00M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.00M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.00M|    return expr;
   50|  1.00M|}
dh_kmgmt.c:ossl_assert_int:
   45|    210|{
   46|    210|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 210]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    210|    return expr;
   50|    210|}
drbg_ctr.c:ossl_assert_int:
   45|  7.74k|{
   46|  7.74k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.74k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.74k|    return expr;
   50|  7.74k|}
ml_kem.c:ossl_assert_int:
   45|  4.19k|{
   46|  4.19k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 4.19k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  4.19k|    return expr;
   50|  4.19k|}

bn_lib.c:constant_time_select_int:
  358|   598k|{
  359|   598k|    return (int)constant_time_select(mask, (unsigned)(a), (unsigned)(b));
  360|   598k|}
bn_lib.c:constant_time_select:
  338|   598k|{
  339|   598k|    return (value_barrier(mask) & a) | (value_barrier(~mask) & b);
  340|   598k|}
bn_lib.c:value_barrier:
  277|  1.19M|{
  278|  1.19M|#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__)
  279|  1.19M|    unsigned int r;
  280|  1.19M|    __asm__("" : "=r"(r) : "0"(a));
  281|       |#else
  282|       |    volatile unsigned int r = a;
  283|       |#endif
  284|  1.19M|    return r;
  285|  1.19M|}
bn_lib.c:constant_time_lt_bn:
  167|   598k|{
  168|   598k|    return constant_time_msb_bn(a ^ ((a ^ b) | ((a - b) ^ b)));
  169|   598k|}
bn_lib.c:constant_time_msb_bn:
  162|   598k|{
  163|   598k|    return 0 - (a >> (sizeof(a) * 8 - 1));
  164|   598k|}
bn_lib.c:constant_time_msb:
  103|  10.0k|{
  104|  10.0k|    return 0 - (a >> (sizeof(a) * 8 - 1));
  105|  10.0k|}
bn_lib.c:constant_time_eq_int:
  260|  10.0k|{
  261|  10.0k|    return constant_time_eq((unsigned)(a), (unsigned)(b));
  262|  10.0k|}
bn_lib.c:constant_time_eq:
  239|  10.0k|{
  240|  10.0k|    return constant_time_is_zero(a ^ b);
  241|  10.0k|}
bn_lib.c:constant_time_is_zero:
  213|  10.0k|{
  214|  10.0k|    return constant_time_msb(~a & (a - 1));
  215|  10.0k|}
bn_exp.c:constant_time_eq_int:
  260|   582k|{
  261|   582k|    return constant_time_eq((unsigned)(a), (unsigned)(b));
  262|   582k|}
bn_exp.c:constant_time_eq:
  239|   582k|{
  240|   582k|    return constant_time_is_zero(a ^ b);
  241|   582k|}
bn_exp.c:constant_time_is_zero:
  213|   582k|{
  214|   582k|    return constant_time_msb(~a & (a - 1));
  215|   582k|}
bn_exp.c:constant_time_msb:
  103|   582k|{
  104|   582k|    return 0 - (a >> (sizeof(a) * 8 - 1));
  105|   582k|}
curve448.c:constant_time_lookup:
  458|  2.88k|{
  459|  2.88k|    size_t i, j;
  460|  2.88k|    const unsigned char *tablec = (const unsigned char *)table;
  461|  2.88k|    unsigned char *outc = (unsigned char *)out;
  462|  2.88k|    unsigned char mask;
  463|       |
  464|  2.88k|    memset(out, 0, rowsize);
  465|       |
  466|       |    /* Note idx may underflow - but that is well defined */
  467|  48.9k|    for (i = 0; i < numrows; i++, idx--) {
  ------------------
  |  Branch (467:17): [True: 46.0k, False: 2.88k]
  ------------------
  468|  46.0k|        mask = (unsigned char)constant_time_is_zero_s(idx);
  469|  8.89M|        for (j = 0; j < rowsize; j++)
  ------------------
  |  Branch (469:21): [True: 8.84M, False: 46.0k]
  ------------------
  470|  8.84M|            *(outc + j) |= constant_time_select_8(mask, *(tablec++), 0);
  471|  46.0k|    }
  472|  2.88k|}
curve448.c:constant_time_is_zero_s:
  218|  46.0k|{
  219|  46.0k|    return constant_time_msb_s(~a & (a - 1));
  220|  46.0k|}
curve448.c:constant_time_msb_s:
  118|  46.0k|{
  119|  46.0k|    return 0 - (a >> (sizeof(a) * 8 - 1));
  120|  46.0k|}
curve448.c:constant_time_select_8:
  352|  8.84M|{
  353|  8.84M|    return (unsigned char)constant_time_select(mask, a, b);
  354|  8.84M|}
curve448.c:constant_time_select:
  338|  8.84M|{
  339|  8.84M|    return (value_barrier(mask) & a) | (value_barrier(~mask) & b);
  340|  8.84M|}
curve448.c:value_barrier:
  277|  17.6M|{
  278|  17.6M|#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__)
  279|  17.6M|    unsigned int r;
  280|  17.6M|    __asm__("" : "=r"(r) : "0"(a));
  281|       |#else
  282|       |    volatile unsigned int r = a;
  283|       |#endif
  284|  17.6M|    return r;
  285|  17.6M|}
curve448.c:constant_time_select_64:
  376|  23.0k|{
  377|  23.0k|    return (value_barrier_64(mask) & a) | (value_barrier_64(~mask) & b);
  378|  23.0k|}
curve448.c:value_barrier_64:
  301|  69.1k|{
  302|  69.1k|#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__)
  303|  69.1k|    uint64_t r;
  304|  69.1k|    __asm__("" : "=r"(r) : "0"(a));
  305|       |#else
  306|       |    volatile uint64_t r = a;
  307|       |#endif
  308|  69.1k|    return r;
  309|  69.1k|}
curve448.c:constant_time_cond_swap_64:
  412|  23.0k|{
  413|  23.0k|    uint64_t xor = *a ^ *b;
  414|       |
  415|  23.0k|    xor&= value_barrier_64(mask);
  416|  23.0k|    *a ^= xor;
  417|  23.0k|    *b ^= xor;
  418|  23.0k|}
f_generic.c:constant_time_is_zero_64:
  233|     32|{
  234|     32|    return constant_time_msb_64(~a & (a - 1));
  235|     32|}
f_generic.c:constant_time_msb_64:
  113|     32|{
  114|     32|    return 0 - (a >> 63);
  115|     32|}
scalar.c:value_barrier_64:
  301|     64|{
  302|     64|#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__)
  303|     64|    uint64_t r;
  304|     64|    __asm__("" : "=r"(r) : "0"(a));
  305|       |#else
  306|       |    volatile uint64_t r = a;
  307|       |#endif
  308|     64|    return r;
  309|     64|}

core_namemap.c:ossl_ht_strcase:
  320|  7.36M|{
  321|  7.36M|    size_t i;
  322|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  323|       |    const long int case_adjust = ~0x40;
  324|       |#else
  325|  7.36M|    const long int case_adjust = ~0x20;
  326|  7.36M|#endif
  327|       |
  328|  7.36M|    if (src == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 7.36M]
  ------------------
  329|      0|        return;
  330|       |
  331|       |    /*
  332|       |     * If we're passed a key, we're doing raw key copies
  333|       |     * so check that we don't overflow here, and truncate if
  334|       |     * we copy more space than we have available
  335|       |     */
  336|  7.36M|    if (key != NULL && key->keysize + len > key->bufsize)
  ------------------
  |  Branch (336:9): [True: 7.36M, False: 0]
  |  Branch (336:24): [True: 0, False: 7.36M]
  ------------------
  337|      0|        len = (size_t)(key->bufsize - key->keysize);
  338|       |
  339|  73.4M|    for (i = 0; src[i] != '\0' && i < len; i++)
  ------------------
  |  Branch (339:17): [True: 66.2M, False: 7.23M]
  |  Branch (339:35): [True: 66.0M, False: 133k]
  ------------------
  340|  66.0M|        tgt[i] = case_adjust & src[i];
  341|  7.36M|}

array_alloc.c:ossl_size_mul:
   88|  27.7M|{
   89|  27.7M|    int err = 0;
   90|  27.7M|    *bytes = safe_mul_size_t(num, size, &err);
   91|       |
   92|  27.7M|    if (ossl_unlikely(err != 0)) {
  ------------------
  |  |   23|  27.7M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 27.7M]
  |  |  ------------------
  ------------------
   93|      0|        ossl_report_alloc_err_of(file, line);
   94|       |
   95|      0|        return false;
   96|      0|    }
   97|       |
   98|  27.7M|    return true;
   99|  27.7M|}

rec_layer_s3.c:PACKET_buf_init:
   83|     20|{
   84|       |    /* Sanity check for negative values. */
   85|     20|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 20]
  ------------------
   86|      0|        return 0;
   87|       |
   88|     20|    pkt->curr = pkt->msgstart = buf;
   89|     20|    pkt->remaining = len;
   90|     20|    return 1;
   91|     20|}
rec_layer_s3.c:PACKET_get_1:
  335|     38|{
  336|     38|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 3, False: 35]
  ------------------
  337|      3|        return 0;
  338|       |
  339|     35|    packet_forward(pkt, 1);
  340|       |
  341|     35|    return 1;
  342|     38|}
rec_layer_s3.c:PACKET_peek_1:
  324|     38|{
  325|     38|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 3, False: 35]
  ------------------
  326|      3|        return 0;
  327|       |
  328|     35|    *data = *pkt->curr;
  329|       |
  330|     35|    return 1;
  331|     38|}
rec_layer_s3.c:packet_forward:
   33|     35|{
   34|     35|    pkt->curr += len;
   35|     35|    pkt->remaining -= len;
   36|     35|}
rec_layer_s3.c:PACKET_remaining:
   42|     55|{
   43|     55|    return pkt->remaining;
   44|     55|}
tls_common.c:PACKET_buf_init:
   83|    495|{
   84|       |    /* Sanity check for negative values. */
   85|    495|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 495]
  ------------------
   86|      0|        return 0;
   87|       |
   88|    495|    pkt->curr = pkt->msgstart = buf;
   89|    495|    pkt->remaining = len;
   90|    495|    return 1;
   91|    495|}
tls_common.c:PACKET_get_1:
  335|    495|{
  336|    495|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 495]
  ------------------
  337|      0|        return 0;
  338|       |
  339|    495|    packet_forward(pkt, 1);
  340|       |
  341|    495|    return 1;
  342|    495|}
tls_common.c:PACKET_peek_1:
  324|    495|{
  325|    495|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 495]
  ------------------
  326|      0|        return 0;
  327|       |
  328|    495|    *data = *pkt->curr;
  329|       |
  330|    495|    return 1;
  331|    495|}
tls_common.c:PACKET_remaining:
   42|  1.48k|{
   43|  1.48k|    return pkt->remaining;
   44|  1.48k|}
tls_common.c:packet_forward:
   33|  1.48k|{
   34|  1.48k|    pkt->curr += len;
   35|  1.48k|    pkt->remaining -= len;
   36|  1.48k|}
tls_common.c:PACKET_get_net_2:
  166|    990|{
  167|    990|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 990]
  ------------------
  168|      0|        return 0;
  169|       |
  170|    990|    packet_forward(pkt, 2);
  171|       |
  172|    990|    return 1;
  173|    990|}
tls_common.c:PACKET_peek_net_2:
  153|    990|{
  154|    990|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 990]
  ------------------
  155|      0|        return 0;
  156|       |
  157|    990|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|    990|    *data |= *(pkt->curr + 1);
  159|       |
  160|    990|    return 1;
  161|    990|}
tls_common.c:PACKET_get_net_2_len:
  177|    495|{
  178|    495|    unsigned int i;
  179|    495|    int ret = PACKET_get_net_2(pkt, &i);
  180|       |
  181|    495|    if (ret)
  ------------------
  |  Branch (181:9): [True: 495, False: 0]
  ------------------
  182|    495|        *data = (size_t)i;
  183|       |
  184|    495|    return ret;
  185|    495|}
extensions.c:PACKET_remaining:
   42|     61|{
   43|     61|    return pkt->remaining;
   44|     61|}
statem.c:PACKET_buf_init:
   83|     87|{
   84|       |    /* Sanity check for negative values. */
   85|     87|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 87]
  ------------------
   86|      0|        return 0;
   87|       |
   88|     87|    pkt->curr = pkt->msgstart = buf;
   89|     87|    pkt->remaining = len;
   90|     87|    return 1;
   91|     87|}
statem.c:PACKET_forward:
  531|     87|{
  532|     87|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (532:9): [True: 0, False: 87]
  ------------------
  533|      0|        return 0;
  534|       |
  535|     87|    packet_forward(pkt, len);
  536|       |
  537|     87|    return 1;
  538|     87|}
statem.c:PACKET_remaining:
   42|     87|{
   43|     87|    return pkt->remaining;
   44|     87|}
statem.c:packet_forward:
   33|     87|{
   34|     87|    pkt->curr += len;
   35|     87|    pkt->remaining -= len;
   36|     87|}
statem_clnt.c:PACKET_forward:
  531|      1|{
  532|      1|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (532:9): [True: 0, False: 1]
  ------------------
  533|      0|        return 0;
  534|       |
  535|      1|    packet_forward(pkt, len);
  536|       |
  537|      1|    return 1;
  538|      1|}
statem_clnt.c:packet_forward:
   33|    440|{
   34|    440|    pkt->curr += len;
   35|    440|    pkt->remaining -= len;
   36|    440|}
statem_clnt.c:PACKET_get_length_prefixed_1:
  549|     81|{
  550|     81|    unsigned int length;
  551|     81|    const unsigned char *data;
  552|     81|    PACKET tmp = *pkt;
  553|     81|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (553:9): [True: 1, False: 80]
  |  Branch (553:41): [True: 14, False: 66]
  ------------------
  554|     15|        return 0;
  555|     15|    }
  556|       |
  557|     66|    *pkt = tmp;
  558|     66|    subpkt->curr = data;
  559|     66|    subpkt->msgstart = pkt->msgstart;
  560|     66|    subpkt->remaining = length;
  561|       |
  562|     66|    return 1;
  563|     81|}
statem_clnt.c:PACKET_remaining:
   42|    825|{
   43|    825|    return pkt->remaining;
   44|    825|}
statem_clnt.c:PACKET_copy_bytes:
  444|     84|{
  445|     84|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (445:9): [True: 4, False: 80]
  ------------------
  446|      4|        return 0;
  447|       |
  448|     80|    packet_forward(pkt, len);
  449|       |
  450|     80|    return 1;
  451|     84|}
statem_clnt.c:PACKET_peek_copy_bytes:
  429|     84|{
  430|     84|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (430:9): [True: 4, False: 80]
  ------------------
  431|      4|        return 0;
  432|       |
  433|     80|    memcpy(data, pkt->curr, len);
  434|       |
  435|     80|    return 1;
  436|     84|}
statem_clnt.c:PACKET_peek_bytes:
  398|    233|{
  399|    233|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 15, False: 218]
  ------------------
  400|     15|        return 0;
  401|       |
  402|    218|    *data = pkt->curr;
  403|       |
  404|    218|    return 1;
  405|    233|}
statem_clnt.c:PACKET_get_net_2:
  166|     89|{
  167|     89|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 4, False: 85]
  ------------------
  168|      4|        return 0;
  169|       |
  170|     85|    packet_forward(pkt, 2);
  171|       |
  172|     85|    return 1;
  173|     89|}
statem_clnt.c:PACKET_peek_net_2:
  153|     89|{
  154|     89|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 4, False: 85]
  ------------------
  155|      4|        return 0;
  156|       |
  157|     85|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|     85|    *data |= *(pkt->curr + 1);
  159|       |
  160|     85|    return 1;
  161|     89|}
statem_clnt.c:PACKET_data:
   71|     64|{
   72|     64|    return pkt->curr;
   73|     64|}
statem_clnt.c:PACKET_get_bytes:
  416|    146|{
  417|    146|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 15, False: 131]
  ------------------
  418|     15|        return 0;
  419|       |
  420|    131|    packet_forward(pkt, len);
  421|       |
  422|    131|    return 1;
  423|    146|}
statem_clnt.c:PACKET_get_1:
  335|    146|{
  336|    146|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 3, False: 143]
  ------------------
  337|      3|        return 0;
  338|       |
  339|    143|    packet_forward(pkt, 1);
  340|       |
  341|    143|    return 1;
  342|    146|}
statem_clnt.c:PACKET_peek_1:
  324|    146|{
  325|    146|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 3, False: 143]
  ------------------
  326|      3|        return 0;
  327|       |
  328|    143|    *data = *pkt->curr;
  329|       |
  330|    143|    return 1;
  331|    146|}
statem_clnt.c:PACKET_null_init:
   95|     61|{
   96|       |    pkt->curr = pkt->msgstart = NULL;
   97|     61|    pkt->remaining = 0;
   98|     61|}
statem_clnt.c:PACKET_as_length_prefixed_2:
  619|      2|{
  620|      2|    unsigned int length;
  621|      2|    const unsigned char *data;
  622|      2|    PACKET tmp = *pkt;
  623|       |
  624|      2|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (624:9): [True: 2, False: 0]
  |  Branch (624:45): [True: 0, False: 0]
  |  Branch (624:95): [True: 0, False: 0]
  ------------------
  625|      2|        return 0;
  626|      2|    }
  627|       |
  628|      0|    *pkt = tmp;
  629|      0|    subpkt->curr = data;
  630|      0|    subpkt->msgstart = pkt->msgstart;
  631|      0|    subpkt->remaining = length;
  632|       |
  633|      0|    return 1;
  634|      2|}

ssl_cert.c:CRYPTO_NEW_REF:
  280|  6.05k|{
  281|  6.05k|    refcnt->val = n;
  282|  6.05k|    return 1;
  283|  6.05k|}
ssl_cert.c:CRYPTO_DOWN_REF:
   56|  6.05k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  6.05k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  6.05k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 6.05k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  6.05k|#endif
   68|  6.05k|    return 1;
   69|  6.05k|}
ssl_cert.c:CRYPTO_FREE_REF:
  286|  6.05k|{
  287|  6.05k|}
ssl_lib.c:CRYPTO_NEW_REF:
  280|  6.05k|{
  281|  6.05k|    refcnt->val = n;
  282|  6.05k|    return 1;
  283|  6.05k|}
ssl_lib.c:CRYPTO_FREE_REF:
  286|  6.05k|{
  287|  6.05k|}
ssl_lib.c:CRYPTO_UP_REF:
   40|  5.17k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  5.17k|    return 1;
   43|  5.17k|}
ssl_lib.c:CRYPTO_DOWN_REF:
   56|  11.2k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  11.2k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  11.2k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 6.05k, False: 5.17k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  11.2k|#endif
   68|  11.2k|    return 1;
   69|  11.2k|}
ssl_sess.c:CRYPTO_NEW_REF:
  280|  2.57k|{
  281|  2.57k|    refcnt->val = n;
  282|  2.57k|    return 1;
  283|  2.57k|}
ssl_sess.c:CRYPTO_FREE_REF:
  286|  2.57k|{
  287|  2.57k|}
ssl_sess.c:CRYPTO_DOWN_REF:
   56|  2.57k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  2.57k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.57k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.57k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.57k|#endif
   68|  2.57k|    return 1;
   69|  2.57k|}
tasn_utl.c:CRYPTO_NEW_REF:
  280|   503k|{
  281|   503k|    refcnt->val = n;
  282|   503k|    return 1;
  283|   503k|}
tasn_utl.c:CRYPTO_FREE_REF:
  286|   503k|{
  287|   503k|}
tasn_utl.c:CRYPTO_DOWN_REF:
   56|  1.00M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  1.00M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.00M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 503k, False: 503k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.00M|#endif
   68|  1.00M|    return 1;
   69|  1.00M|}
bio_lib.c:CRYPTO_NEW_REF:
  280|  3.05M|{
  281|  3.05M|    refcnt->val = n;
  282|  3.05M|    return 1;
  283|  3.05M|}
bio_lib.c:CRYPTO_FREE_REF:
  286|  3.05M|{
  287|  3.05M|}
bio_lib.c:CRYPTO_DOWN_REF:
   56|  4.09M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  4.09M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  4.09M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 3.05M, False: 1.03M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  4.09M|#endif
   68|  4.09M|    return 1;
   69|  4.09M|}
bio_lib.c:CRYPTO_UP_REF:
   40|  1.03M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  1.03M|    return 1;
   43|  1.03M|}
bio_lib.c:CRYPTO_GET_REF:
   72|  20.6k|{
   73|       |    *ret = atomic_load_explicit(&refcnt->val, memory_order_acquire);
   74|  20.6k|    return 1;
   75|  20.6k|}
dso_lib.c:CRYPTO_NEW_REF:
  280|     92|{
  281|     92|    refcnt->val = n;
  282|     92|    return 1;
  283|     92|}
dso_lib.c:CRYPTO_DOWN_REF:
   56|     92|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|     92|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|     92|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 92, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|     92|#endif
   68|     92|    return 1;
   69|     92|}
dso_lib.c:CRYPTO_FREE_REF:
  286|     92|{
  287|     92|}
ec_key.c:CRYPTO_DOWN_REF:
   56|   324k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   324k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   324k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 162k, False: 162k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   324k|#endif
   68|   324k|    return 1;
   69|   324k|}
ec_key.c:CRYPTO_FREE_REF:
  286|   162k|{
  287|   162k|}
ec_key.c:CRYPTO_UP_REF:
   40|   162k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   162k|    return 1;
   43|   162k|}
ec_kmeth.c:CRYPTO_NEW_REF:
  280|   162k|{
  281|   162k|    refcnt->val = n;
  282|   162k|    return 1;
  283|   162k|}
decoder_meth.c:CRYPTO_UP_REF:
   40|  2.85M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  2.85M|    return 1;
   43|  2.85M|}
decoder_meth.c:CRYPTO_DOWN_REF:
   56|  2.85M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  2.85M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.85M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 2.85M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.85M|#endif
   68|  2.85M|    return 1;
   69|  2.85M|}
decoder_meth.c:CRYPTO_NEW_REF:
  280|     76|{
  281|     76|    refcnt->val = n;
  282|     76|    return 1;
  283|     76|}
digest.c:CRYPTO_NEW_REF:
  280|  21.2k|{
  281|  21.2k|    refcnt->val = n;
  282|  21.2k|    return 1;
  283|  21.2k|}
digest.c:CRYPTO_UP_REF:
   40|   973k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   973k|    return 1;
   43|   973k|}
digest.c:CRYPTO_DOWN_REF:
   56|   994k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   994k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   994k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 21.2k, False: 973k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   994k|#endif
   68|   994k|    return 1;
   69|   994k|}
digest.c:CRYPTO_FREE_REF:
  286|  21.2k|{
  287|  21.2k|}
evp_enc.c:CRYPTO_NEW_REF:
  280|  92.1k|{
  281|  92.1k|    refcnt->val = n;
  282|  92.1k|    return 1;
  283|  92.1k|}
evp_enc.c:CRYPTO_UP_REF:
   40|   164k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   164k|    return 1;
   43|   164k|}
evp_enc.c:CRYPTO_FREE_REF:
  286|  92.0k|{
  287|  92.0k|}
evp_enc.c:CRYPTO_DOWN_REF:
   56|   256k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   256k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   256k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 92.0k, False: 164k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   256k|#endif
   68|   256k|    return 1;
   69|   256k|}
exchange.c:CRYPTO_DOWN_REF:
   56|  17.8k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  17.8k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  17.8k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.95k, False: 12.8k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  17.8k|#endif
   68|  17.8k|    return 1;
   69|  17.8k|}
exchange.c:CRYPTO_FREE_REF:
  286|  4.95k|{
  287|  4.95k|}
exchange.c:CRYPTO_UP_REF:
   40|  12.8k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  12.8k|    return 1;
   43|  12.8k|}
exchange.c:CRYPTO_NEW_REF:
  280|  4.96k|{
  281|  4.96k|    refcnt->val = n;
  282|  4.96k|    return 1;
  283|  4.96k|}
keymgmt_meth.c:CRYPTO_NEW_REF:
  280|  29.7k|{
  281|  29.7k|    refcnt->val = n;
  282|  29.7k|    return 1;
  283|  29.7k|}
keymgmt_meth.c:CRYPTO_UP_REF:
   40|  1.92M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  1.92M|    return 1;
   43|  1.92M|}
keymgmt_meth.c:CRYPTO_DOWN_REF:
   56|  1.95M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  1.95M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.95M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 29.7k, False: 1.92M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.95M|#endif
   68|  1.95M|    return 1;
   69|  1.95M|}
keymgmt_meth.c:CRYPTO_FREE_REF:
  286|  29.7k|{
  287|  29.7k|}
p_lib.c:CRYPTO_NEW_REF:
  280|  1.01M|{
  281|  1.01M|    refcnt->val = n;
  282|  1.01M|    return 1;
  283|  1.01M|}
p_lib.c:CRYPTO_FREE_REF:
  286|  1.01M|{
  287|  1.01M|}
p_lib.c:CRYPTO_UP_REF:
   40|   590k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   590k|    return 1;
   43|   590k|}
p_lib.c:CRYPTO_DOWN_REF:
   56|  1.60M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  1.60M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.60M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.01M, False: 590k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.60M|#endif
   68|  1.60M|    return 1;
   69|  1.60M|}
signature.c:CRYPTO_DOWN_REF:
   56|  91.5k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  91.5k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  91.5k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 41.7k, False: 49.7k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  91.5k|#endif
   68|  91.5k|    return 1;
   69|  91.5k|}
signature.c:CRYPTO_FREE_REF:
  286|  41.7k|{
  287|  41.7k|}
signature.c:CRYPTO_UP_REF:
   40|  49.7k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  49.7k|    return 1;
   43|  49.7k|}
signature.c:CRYPTO_NEW_REF:
  280|  41.8k|{
  281|  41.8k|    refcnt->val = n;
  282|  41.8k|    return 1;
  283|  41.8k|}
provider_core.c:CRYPTO_UP_REF:
   40|   363k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   363k|    return 1;
   43|   363k|}
provider_core.c:CRYPTO_NEW_REF:
  280|  1.80k|{
  281|  1.80k|    refcnt->val = n;
  282|  1.80k|    return 1;
  283|  1.80k|}
provider_core.c:CRYPTO_DOWN_REF:
   56|   365k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   365k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   365k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.79k, False: 363k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   365k|#endif
   68|   365k|    return 1;
   69|   365k|}
provider_core.c:CRYPTO_FREE_REF:
  286|  1.79k|{
  287|  1.79k|}
rsa_lib.c:CRYPTO_NEW_REF:
  280|   341k|{
  281|   341k|    refcnt->val = n;
  282|   341k|    return 1;
  283|   341k|}
rsa_lib.c:CRYPTO_DOWN_REF:
   56|   682k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   682k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   682k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 341k, False: 341k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   682k|#endif
   68|   682k|    return 1;
   69|   682k|}
rsa_lib.c:CRYPTO_FREE_REF:
  286|   341k|{
  287|   341k|}
rsa_lib.c:CRYPTO_UP_REF:
   40|   341k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   341k|    return 1;
   43|   341k|}
x509_lu.c:CRYPTO_NEW_REF:
  280|  3.47k|{
  281|  3.47k|    refcnt->val = n;
  282|  3.47k|    return 1;
  283|  3.47k|}
x509_lu.c:CRYPTO_DOWN_REF:
   56|  3.47k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  3.47k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  3.47k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 3.47k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  3.47k|#endif
   68|  3.47k|    return 1;
   69|  3.47k|}
x509_lu.c:CRYPTO_FREE_REF:
  286|  3.47k|{
  287|  3.47k|}
x509_set.c:CRYPTO_UP_REF:
   40|   503k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   503k|    return 1;
   43|   503k|}
ossl_core_bio.c:CRYPTO_UP_REF:
   40|  1.00M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  1.00M|    return 1;
   43|  1.00M|}
ossl_core_bio.c:CRYPTO_DOWN_REF:
   56|  2.01M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  2.01M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.01M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.00M, False: 1.00M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.01M|#endif
   68|  2.01M|    return 1;
   69|  2.01M|}
ossl_core_bio.c:CRYPTO_FREE_REF:
  286|  1.00M|{
  287|  1.00M|}
ossl_core_bio.c:CRYPTO_NEW_REF:
  280|  1.00M|{
  281|  1.00M|    refcnt->val = n;
  282|  1.00M|    return 1;
  283|  1.00M|}
dh_lib.c:CRYPTO_NEW_REF:
  280|    210|{
  281|    210|    refcnt->val = n;
  282|    210|    return 1;
  283|    210|}
dh_lib.c:CRYPTO_DOWN_REF:
   56|    210|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|    210|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|    210|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 210, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|    210|#endif
   68|    210|    return 1;
   69|    210|}
dh_lib.c:CRYPTO_FREE_REF:
  286|    210|{
  287|    210|}
ecx_key.c:CRYPTO_NEW_REF:
  280|  4.19k|{
  281|  4.19k|    refcnt->val = n;
  282|  4.19k|    return 1;
  283|  4.19k|}
ecx_key.c:CRYPTO_FREE_REF:
  286|  4.19k|{
  287|  4.19k|}
ecx_key.c:CRYPTO_DOWN_REF:
   56|  4.19k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  4.19k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  4.19k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.19k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  4.19k|#endif
   68|  4.19k|    return 1;
   69|  4.19k|}
evp_rand.c:CRYPTO_UP_REF:
   40|  11.2k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  11.2k|    return 1;
   43|  11.2k|}
evp_rand.c:CRYPTO_NEW_REF:
  280|  5.92k|{
  281|  5.92k|    refcnt->val = n;
  282|  5.92k|    return 1;
  283|  5.92k|}
evp_rand.c:CRYPTO_FREE_REF:
  286|  5.91k|{
  287|  5.91k|}
evp_rand.c:CRYPTO_DOWN_REF:
   56|  17.1k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  17.1k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  17.1k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 5.91k, False: 11.2k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  17.1k|#endif
   68|  17.1k|    return 1;
   69|  17.1k|}

ssl_sess.c:safe_add_time:
   51|  5.15k|    {                                                                \
   52|  5.15k|        type r;                                                      \
   53|  5.15k|                                                                     \
   54|  5.15k|        if (!__builtin_add_overflow(a, b, &r))                       \
  ------------------
  |  Branch (54:13): [True: 5.15k, False: 0]
  ------------------
   55|  5.15k|            return r;                                                \
   56|  5.15k|        *err |= 1;                                                   \
   57|      0|        return a + b;                                                \
   58|  5.15k|    }
array_alloc.c:safe_mul_size_t:
  151|  27.7M|    {                                                                \
  152|  27.7M|        type r;                                                      \
  153|  27.7M|                                                                     \
  154|  27.7M|        if (!__builtin_mul_overflow(a, b, &r))                       \
  ------------------
  |  Branch (154:13): [True: 27.7M, False: 0]
  ------------------
  155|  27.7M|            return r;                                                \
  156|  27.7M|        *err |= 1;                                                   \
  157|      0|        return a * b;                                                \
  158|  27.7M|    }
stack.c:safe_muldiv_int:
  324|   646k|    {                                                                   \
  325|   646k|        int e2 = 0;                                                     \
  326|   646k|        type q, r, x, y;                                                \
  327|   646k|                                                                        \
  328|   646k|        if (c == 0) {                                                   \
  ------------------
  |  Branch (328:13): [True: 0, False: 646k]
  ------------------
  329|      0|            *err |= 1;                                                  \
  330|      0|            return a == 0 || b == 0 ? 0 : max;                          \
  ------------------
  |  Branch (330:20): [True: 0, False: 0]
  |  Branch (330:30): [True: 0, False: 0]
  ------------------
  331|      0|        }                                                               \
  332|   646k|        x = safe_mul_##type_name(a, b, &e2);                            \
  333|   646k|        if (!e2)                                                        \
  ------------------
  |  Branch (333:13): [True: 646k, False: 0]
  ------------------
  334|   646k|            return safe_div_##type_name(x, c, err);                     \
  335|   646k|        if (b > a) {                                                    \
  ------------------
  |  Branch (335:13): [True: 0, False: 0]
  ------------------
  336|      0|            x = b;                                                      \
  337|      0|            b = a;                                                      \
  338|      0|            a = x;                                                      \
  339|      0|        }                                                               \
  340|      0|        q = safe_div_##type_name(a, c, err);                            \
  341|      0|        r = safe_mod_##type_name(a, c, err);                            \
  342|      0|        x = safe_mul_##type_name(r, b, err);                            \
  343|      0|        y = safe_mul_##type_name(q, b, err);                            \
  344|      0|        q = safe_div_##type_name(x, c, err);                            \
  345|      0|        return safe_add_##type_name(y, q, err);                         \
  346|   646k|    }
stack.c:safe_mul_int:
  138|   646k|    {                                                                \
  139|   646k|        type r;                                                      \
  140|   646k|                                                                     \
  141|   646k|        if (!__builtin_mul_overflow(a, b, &r))                       \
  ------------------
  |  Branch (141:13): [True: 646k, False: 0]
  ------------------
  142|   646k|            return r;                                                \
  143|   646k|        *err |= 1;                                                   \
  144|      0|        return (a < 0) ^ (b < 0) ? min : max;                        \
  ------------------
  |  Branch (144:16): [True: 0, False: 0]
  ------------------
  145|   646k|    }
stack.c:safe_div_int:
  201|   646k|    {                                                                \
  202|   646k|        if (b == 0) {                                                \
  ------------------
  |  Branch (202:13): [True: 0, False: 646k]
  ------------------
  203|      0|            *err |= 1;                                               \
  204|      0|            return a < 0 ? min : max;                                \
  ------------------
  |  Branch (204:20): [True: 0, False: 0]
  ------------------
  205|      0|        }                                                            \
  206|   646k|        if (b == -1 && a == min) {                                   \
  ------------------
  |  Branch (206:13): [True: 0, False: 646k]
  |  Branch (206:24): [True: 0, False: 0]
  ------------------
  207|      0|            *err |= 1;                                               \
  208|      0|            return max;                                              \
  209|      0|        }                                                            \
  210|   646k|        return a / b;                                                \
  211|   646k|    }

ssl_cert.c:ssl_x509_store_ctx_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
ssl_init.c:ossl_init_ssl_base_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
err.c:do_err_strings_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
context.c:default_context_do_thread_key_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
context.c:default_context_do_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_base_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_load_crypto_strings_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_load_ssl_strings_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_add_all_ciphers_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_add_all_digests_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_config_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
initthread.c:create_global_tevent_register_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
o_names.c:o_names_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
obj_dat.c:obj_api_initialise_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
obj_xref.c:o_sig_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
rand_lib.c:do_rand_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \

ssl_sess.c:ossl_time_add:
  160|  5.15k|{
  161|  5.15k|    OSSL_TIME r;
  162|  5.15k|    int err = 0;
  163|       |
  164|  5.15k|    r.t = safe_add_time(a.t, b.t, &err);
  165|  5.15k|    return err ? ossl_time_infinite() : r;
  ------------------
  |  Branch (165:12): [True: 0, False: 5.15k]
  ------------------
  166|  5.15k|}
ssl_sess.c:ossl_ticks2time:
   58|  5.15k|{
   59|  5.15k|    OSSL_TIME r;
   60|       |
   61|  5.15k|    r.t = ticks;
   62|  5.15k|    return r;
   63|  5.15k|}
ssl_sess.c:ossl_time_is_zero:
  149|  2.57k|{
  150|  2.57k|    return ossl_time_compare(t, ossl_time_zero()) == 0;
  151|  2.57k|}
ssl_sess.c:ossl_time_compare:
  139|  2.57k|{
  140|  2.57k|    if (a.t > b.t)
  ------------------
  |  Branch (140:9): [True: 2.57k, False: 0]
  ------------------
  141|  2.57k|        return 1;
  142|      0|    if (a.t < b.t)
  ------------------
  |  Branch (142:9): [True: 0, False: 0]
  ------------------
  143|      0|        return -1;
  144|      0|    return 0;
  145|      0|}
ssl_sess.c:ossl_time_zero:
   76|  2.57k|{
   77|  2.57k|    return ossl_ticks2time(0);
   78|  2.57k|}
ssl_sess.c:ossl_time_from_time_t:
  129|  3.47k|{
  130|  3.47k|    OSSL_TIME ot;
  131|       |
  132|  3.47k|    ot.t = t;
  133|  3.47k|    ot.t *= OSSL_TIME_SECOND;
  ------------------
  |  |   31|  3.47k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  ------------------
  134|  3.47k|    return ot;
  135|  3.47k|}
t1_lib.c:ossl_ticks2time:
   58|  3.47k|{
   59|  3.47k|    OSSL_TIME r;
   60|       |
   61|  3.47k|    r.t = ticks;
   62|  3.47k|    return r;
   63|  3.47k|}

extensions_clnt.c:is_ecdhe_group:
   76|  16.9k|{
   77|       |    /* This includes the usual EC groups, and also ECX, GOST ... */
   78|  16.9k|    return group_id < OSSL_TLS_GROUP_ID_FFDHE_START;
  ------------------
  |  |   72|  16.9k|#define OSSL_TLS_GROUP_ID_FFDHE_START 0x0100 /* inclusive */
  ------------------
   79|  16.9k|}
extensions_clnt.c:is_ffdhe_group:
   82|  21.7k|{
   83|  21.7k|    return group_id >= OSSL_TLS_GROUP_ID_FFDHE_START
  ------------------
  |  |   72|  43.4k|#define OSSL_TLS_GROUP_ID_FFDHE_START 0x0100 /* inclusive */
  ------------------
  |  Branch (83:12): [True: 8.50k, False: 13.2k]
  ------------------
   84|  8.50k|        && group_id <= OSSL_TLS_GROUP_ID_FFDHE_END;
  ------------------
  |  |   73|  8.50k|#define OSSL_TLS_GROUP_ID_FFDHE_END 0x01FF /* inclusive */
  ------------------
  |  Branch (84:12): [True: 2.26k, False: 6.24k]
  ------------------
   85|  21.7k|}

a_mbstr.c:is_unicode_valid:
   27|  77.2M|{
   28|  77.2M|    return value <= UNICODE_MAX && !is_unicode_surrogate(value);
  ------------------
  |  Branch (28:12): [True: 77.2M, False: 0]
  |  Branch (28:36): [True: 77.2M, False: 0]
  ------------------
   29|  77.2M|}
a_mbstr.c:is_unicode_surrogate:
   22|  77.2M|{
   23|  77.2M|    return value >= SURROGATE_MIN && value <= SURROGATE_MAX;
  ------------------
  |  Branch (23:12): [True: 0, False: 77.2M]
  |  Branch (23:38): [True: 0, False: 0]
  ------------------
   24|  77.2M|}

ASN1_TYPE_new:
  800|  2.19M|    {                                                               \
  801|  2.19M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  2.19M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  2.19M|    }                                                               \
X509_ALGOR_new:
  800|  1.00M|    {                                                               \
  801|  1.00M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  1.00M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  1.00M|    }                                                               \
X509_ALGOR_free:
  804|  1.00M|    {                                                               \
  805|  1.00M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.00M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.00M|    }
GENERAL_NAMES_free:
  804|  1.00M|    {                                                               \
  805|  1.00M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.00M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.00M|    }
NAME_CONSTRAINTS_free:
  804|  1.44M|    {                                                               \
  805|  1.44M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.44M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.44M|    }
X509_CRL_it:
  241|   507k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   507k|    {                                  \
  |  |   98|   507k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   507k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   507k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   507k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   507k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   507k|        tname##_seq_tt,                                 \
  245|   507k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   507k|        &tname##_aux,                                   \
  247|   507k|        sizeof(stname),                                 \
  248|   507k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   507k|    }                         \
  |  |  105|   507k|    ;                         \
  |  |  106|   507k|    return &local_it;         \
  |  |  107|   507k|    }
  ------------------
X509_CRL_free:
  804|   507k|    {                                                               \
  805|   507k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   507k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   507k|    }
X509_NAME_ENTRY_new:
  800|  3.56M|    {                                                               \
  801|  3.56M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  3.56M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  3.56M|    }                                                               \
X509_NAME_ENTRY_free:
  804|  8.14M|    {                                                               \
  805|  8.14M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  8.14M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  8.14M|    }
X509_NAME_free:
  804|  47.3k|    {                                                               \
  805|  47.3k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  47.3k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  47.3k|    }
d2i_X509_PUBKEY:
  814|   503k|    {                                                                                      \
  815|   503k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|   503k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   503k|    }                                                                                      \
X509_PUBKEY_free:
  804|  1.00M|    {                                                               \
  805|  1.00M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.00M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.00M|    }
X509_CINF_it:
  241|  2.83M|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  2.83M|    {                                  \
  |  |   98|  2.83M|        static const ASN1_ITEM local_it = {
  ------------------
  242|  2.83M|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  2.83M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  2.83M|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  2.83M|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  2.83M|        tname##_seq_tt,                                 \
  245|  2.83M|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  2.83M|        &tname##_aux,                                   \
  247|  2.83M|        sizeof(stname),                                 \
  248|  2.83M|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  2.83M|    }                         \
  |  |  105|  2.83M|    ;                         \
  |  |  106|  2.83M|    return &local_it;         \
  |  |  107|  2.83M|    }
  ------------------
X509_it:
  241|  2.54M|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  2.54M|    {                                  \
  |  |   98|  2.54M|        static const ASN1_ITEM local_it = {
  ------------------
  242|  2.54M|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  2.54M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  2.54M|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  2.54M|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  2.54M|        tname##_seq_tt,                                 \
  245|  2.54M|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  2.54M|        &tname##_aux,                                   \
  247|  2.54M|        sizeof(stname),                                 \
  248|  2.54M|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  2.54M|    }                         \
  |  |  105|  2.54M|    ;                         \
  |  |  106|  2.54M|    return &local_it;         \
  |  |  107|  2.54M|    }
  ------------------
d2i_X509:
  814|   503k|    {                                                                                      \
  815|   503k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|   503k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   503k|    }                                                                                      \
X509_free:
  804|  1.09M|    {                                                               \
  805|  1.09M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.09M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.09M|    }
X509_CERT_AUX_free:
  804|  1.00M|    {                                                               \
  805|  1.00M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.00M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.00M|    }
RSAPublicKey_it:
  241|   341k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   341k|    {                                  \
  |  |   98|   341k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   341k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   341k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   341k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   341k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   341k|        tname##_seq_tt,                                 \
  245|   341k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   341k|        &tname##_aux,                                   \
  247|   341k|        sizeof(stname),                                 \
  248|   341k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   341k|    }                         \
  |  |  105|   341k|    ;                         \
  |  |  106|   341k|    return &local_it;         \
  |  |  107|   341k|    }
  ------------------
RSA_PSS_PARAMS_it:
  241|   341k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   341k|    {                                  \
  |  |   98|   341k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   341k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   341k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   341k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   341k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   341k|        tname##_seq_tt,                                 \
  245|   341k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   341k|        &tname##_aux,                                   \
  247|   341k|        sizeof(stname),                                 \
  248|   341k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   341k|    }                         \
  |  |  105|   341k|    ;                         \
  |  |  106|   341k|    return &local_it;         \
  |  |  107|   341k|    }
  ------------------
RSA_PSS_PARAMS_free:
  804|   341k|    {                                                               \
  805|   341k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   341k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   341k|    }
d2i_RSAPublicKey:
  814|   341k|    {                                                                                      \
  815|   341k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|   341k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   341k|    }                                                                                      \
AUTHORITY_KEYID_free:
  804|  1.44M|    {                                                               \
  805|  1.44M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.44M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.44M|    }
ASIdentifiers_free:
  804|  1.44M|    {                                                               \
  805|  1.44M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.44M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.44M|    }
BASIC_CONSTRAINTS_free:
  804|   441k|    {                                                               \
  805|   441k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   441k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   441k|    }
CRL_DIST_POINTS_free:
  804|  1.00M|    {                                                               \
  805|  1.00M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.00M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.00M|    }

ml_kem.c:OPENSSL_store_u64_le:
  160|   603k|{
  161|   603k|#ifdef OSSL_HTOLE64
  162|   603k|    uint64_t t = OSSL_HTOLE64(val);
  ------------------
  |  |   52|   603k|#define OSSL_HTOLE64(x) htole64(x)
  ------------------
  163|       |
  164|   603k|    memcpy(out, (unsigned char *)&t, 8);
  165|   603k|    return out + 8;
  166|       |#else
  167|       |    *out++ = (val & 0xff);
  168|       |    *out++ = (val >> 8) & 0xff;
  169|       |    *out++ = (val >> 16) & 0xff;
  170|       |    *out++ = (val >> 24) & 0xff;
  171|       |    *out++ = (val >> 32) & 0xff;
  172|       |    *out++ = (val >> 40) & 0xff;
  173|       |    *out++ = (val >> 48) & 0xff;
  174|       |    *out++ = (val >> 56) & 0xff;
  175|       |    return out;
  176|       |#endif
  177|   603k|}

tls_common.c:OSSL_FUNC_rlayer_skip_early_data:
   60|  15.5k|    {                                                  \
   61|  15.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  15.5k|    }
tls_common.c:OSSL_FUNC_rlayer_security:
   60|  15.5k|    {                                                  \
   61|  15.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  15.5k|    }
decoder_meth.c:OSSL_FUNC_decoder_newctx:
   60|     76|    {                                                  \
   61|     76|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     76|    }
decoder_meth.c:OSSL_FUNC_decoder_freectx:
   60|     76|    {                                                  \
   61|     76|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     76|    }
decoder_meth.c:OSSL_FUNC_decoder_set_ctx_params:
   60|     74|    {                                                  \
   61|     74|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     74|    }
decoder_meth.c:OSSL_FUNC_decoder_settable_ctx_params:
   60|     74|    {                                                  \
   61|     74|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     74|    }
decoder_meth.c:OSSL_FUNC_decoder_does_selection:
   60|     73|    {                                                  \
   61|     73|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     73|    }
decoder_meth.c:OSSL_FUNC_decoder_decode:
   60|     76|    {                                                  \
   61|     76|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     76|    }
decoder_meth.c:OSSL_FUNC_decoder_export_object:
   60|     73|    {                                                  \
   61|     73|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     73|    }
digest.c:OSSL_FUNC_digest_newctx:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
digest.c:OSSL_FUNC_digest_init:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
digest.c:OSSL_FUNC_digest_update:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
digest.c:OSSL_FUNC_digest_final:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
digest.c:OSSL_FUNC_digest_squeeze:
   60|  4.25k|    {                                                  \
   61|  4.25k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.25k|    }
digest.c:OSSL_FUNC_digest_freectx:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
digest.c:OSSL_FUNC_digest_dupctx:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
digest.c:OSSL_FUNC_digest_get_params:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
digest.c:OSSL_FUNC_digest_set_ctx_params:
   60|  7.79k|    {                                                  \
   61|  7.79k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  7.79k|    }
digest.c:OSSL_FUNC_digest_get_ctx_params:
   60|  6.38k|    {                                                  \
   61|  6.38k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  6.38k|    }
digest.c:OSSL_FUNC_digest_gettable_params:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
digest.c:OSSL_FUNC_digest_settable_ctx_params:
   60|  7.79k|    {                                                  \
   61|  7.79k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  7.79k|    }
digest.c:OSSL_FUNC_digest_gettable_ctx_params:
   60|  6.38k|    {                                                  \
   61|  6.38k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  6.38k|    }
digest.c:OSSL_FUNC_digest_copyctx:
   60|  19.1k|    {                                                  \
   61|  19.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.1k|    }
digest.c:OSSL_FUNC_digest_serialize:
   60|  13.4k|    {                                                  \
   61|  13.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  13.4k|    }
digest.c:OSSL_FUNC_digest_deserialize:
   60|  13.4k|    {                                                  \
   61|  13.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  13.4k|    }
evp_enc.c:OSSL_FUNC_cipher_newctx:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_init:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_init:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_skey_init:
   60|  48.2k|    {                                                  \
   61|  48.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  48.2k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_skey_init:
   60|  48.2k|    {                                                  \
   61|  48.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  48.2k|    }
evp_enc.c:OSSL_FUNC_cipher_update:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_final:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_cipher:
   60|  83.6k|    {                                                  \
   61|  83.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  83.6k|    }
evp_enc.c:OSSL_FUNC_cipher_freectx:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_dupctx:
   60|  91.4k|    {                                                  \
   61|  91.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  91.4k|    }
evp_enc.c:OSSL_FUNC_cipher_get_params:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_get_ctx_params:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_set_ctx_params:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_params:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_ctx_params:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
evp_enc.c:OSSL_FUNC_cipher_settable_ctx_params:
   60|  92.1k|    {                                                  \
   61|  92.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  92.1k|    }
exchange.c:OSSL_FUNC_keyexch_newctx:
   60|  4.96k|    {                                                  \
   61|  4.96k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.96k|    }
exchange.c:OSSL_FUNC_keyexch_init:
   60|  4.96k|    {                                                  \
   61|  4.96k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.96k|    }
exchange.c:OSSL_FUNC_keyexch_set_peer:
   60|  2.83k|    {                                                  \
   61|  2.83k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.83k|    }
exchange.c:OSSL_FUNC_keyexch_derive:
   60|  4.96k|    {                                                  \
   61|  4.96k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.96k|    }
exchange.c:OSSL_FUNC_keyexch_freectx:
   60|  4.96k|    {                                                  \
   61|  4.96k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.96k|    }
exchange.c:OSSL_FUNC_keyexch_dupctx:
   60|  4.96k|    {                                                  \
   61|  4.96k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.96k|    }
exchange.c:OSSL_FUNC_keyexch_get_ctx_params:
   60|  4.96k|    {                                                  \
   61|  4.96k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.96k|    }
exchange.c:OSSL_FUNC_keyexch_gettable_ctx_params:
   60|  4.96k|    {                                                  \
   61|  4.96k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.96k|    }
exchange.c:OSSL_FUNC_keyexch_set_ctx_params:
   60|  3.54k|    {                                                  \
   61|  3.54k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.54k|    }
exchange.c:OSSL_FUNC_keyexch_settable_ctx_params:
   60|  3.54k|    {                                                  \
   61|  3.54k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.54k|    }
exchange.c:OSSL_FUNC_keyexch_derive_skey:
   60|    709|    {                                                  \
   61|    709|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    709|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new:
   60|  29.7k|    {                                                  \
   61|  29.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  29.7k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new_ex:
   60|  4.25k|    {                                                  \
   61|  4.25k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.25k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_init:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_template:
   60|  4.25k|    {                                                  \
   61|  4.25k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.25k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_params:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_settable_params:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_get_params:
   60|  1.41k|    {                                                  \
   61|  1.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.41k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_gettable_params:
   60|  1.41k|    {                                                  \
   61|  1.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.41k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_cleanup:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_free:
   60|  29.7k|    {                                                  \
   61|  29.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  29.7k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_load:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_get_params:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gettable_params:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_set_params:
   60|  14.8k|    {                                                  \
   61|  14.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.8k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_settable_params:
   60|  14.8k|    {                                                  \
   61|  14.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.8k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_query_operation_name:
   60|  3.54k|    {                                                  \
   61|  3.54k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.54k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_has:
   60|  29.7k|    {                                                  \
   61|  29.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  29.7k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_dup:
   60|  24.8k|    {                                                  \
   61|  24.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.8k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_validate:
   60|  21.2k|    {                                                  \
   61|  21.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_match:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import_types:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export_types:
   60|  27.6k|    {                                                  \
   61|  27.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  27.6k|    }
signature.c:OSSL_FUNC_signature_newctx:
   60|  41.8k|    {                                                  \
   61|  41.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  41.8k|    }
signature.c:OSSL_FUNC_signature_sign_init:
   60|  28.3k|    {                                                  \
   61|  28.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  28.3k|    }
signature.c:OSSL_FUNC_signature_sign:
   60|  38.9k|    {                                                  \
   61|  38.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  38.9k|    }
signature.c:OSSL_FUNC_signature_sign_message_init:
   60|  36.1k|    {                                                  \
   61|  36.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  36.1k|    }
signature.c:OSSL_FUNC_signature_sign_message_update:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
signature.c:OSSL_FUNC_signature_sign_message_final:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
signature.c:OSSL_FUNC_signature_verify_init:
   60|  28.3k|    {                                                  \
   61|  28.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  28.3k|    }
signature.c:OSSL_FUNC_signature_verify:
   60|  38.9k|    {                                                  \
   61|  38.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  38.9k|    }
signature.c:OSSL_FUNC_signature_verify_message_init:
   60|  36.1k|    {                                                  \
   61|  36.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  36.1k|    }
signature.c:OSSL_FUNC_signature_verify_message_update:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
signature.c:OSSL_FUNC_signature_verify_message_final:
   60|  24.1k|    {                                                  \
   61|  24.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.1k|    }
signature.c:OSSL_FUNC_signature_verify_recover_init:
   60|  9.92k|    {                                                  \
   61|  9.92k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  9.92k|    }
signature.c:OSSL_FUNC_signature_verify_recover:
   60|  9.92k|    {                                                  \
   61|  9.92k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  9.92k|    }
signature.c:OSSL_FUNC_signature_digest_sign_init:
   60|  17.7k|    {                                                  \
   61|  17.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.7k|    }
signature.c:OSSL_FUNC_signature_digest_sign_update:
   60|  5.67k|    {                                                  \
   61|  5.67k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.67k|    }
signature.c:OSSL_FUNC_signature_digest_sign_final:
   60|  5.67k|    {                                                  \
   61|  5.67k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.67k|    }
signature.c:OSSL_FUNC_signature_digest_sign:
   60|  12.0k|    {                                                  \
   61|  12.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  12.0k|    }
signature.c:OSSL_FUNC_signature_digest_verify_init:
   60|  14.8k|    {                                                  \
   61|  14.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.8k|    }
signature.c:OSSL_FUNC_signature_digest_verify_update:
   60|  2.83k|    {                                                  \
   61|  2.83k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.83k|    }
signature.c:OSSL_FUNC_signature_digest_verify_final:
   60|  2.83k|    {                                                  \
   61|  2.83k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.83k|    }
signature.c:OSSL_FUNC_signature_digest_verify:
   60|  12.0k|    {                                                  \
   61|  12.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  12.0k|    }
signature.c:OSSL_FUNC_signature_freectx:
   60|  41.8k|    {                                                  \
   61|  41.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  41.8k|    }
signature.c:OSSL_FUNC_signature_dupctx:
   60|  41.8k|    {                                                  \
   61|  41.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  41.8k|    }
signature.c:OSSL_FUNC_signature_get_ctx_params:
   60|  38.9k|    {                                                  \
   61|  38.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  38.9k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_params:
   60|  38.9k|    {                                                  \
   61|  38.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  38.9k|    }
signature.c:OSSL_FUNC_signature_set_ctx_params:
   60|  41.8k|    {                                                  \
   61|  41.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  41.8k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_params:
   60|  41.8k|    {                                                  \
   61|  41.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  41.8k|    }
signature.c:OSSL_FUNC_signature_get_ctx_md_params:
   60|  2.83k|    {                                                  \
   61|  2.83k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.83k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_md_params:
   60|  2.83k|    {                                                  \
   61|  2.83k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.83k|    }
signature.c:OSSL_FUNC_signature_set_ctx_md_params:
   60|  2.83k|    {                                                  \
   61|  2.83k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.83k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_md_params:
   60|  2.83k|    {                                                  \
   61|  2.83k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.83k|    }
signature.c:OSSL_FUNC_signature_query_key_types:
   60|  25.5k|    {                                                  \
   61|  25.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  25.5k|    }
provider_core.c:OSSL_FUNC_provider_teardown:
   60|  1.47k|    {                                                  \
   61|  1.47k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.47k|    }
provider_core.c:OSSL_FUNC_provider_gettable_params:
   60|  1.70k|    {                                                  \
   61|  1.70k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.70k|    }
provider_core.c:OSSL_FUNC_provider_get_params:
   60|  1.70k|    {                                                  \
   61|  1.70k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.70k|    }
provider_core.c:OSSL_FUNC_provider_get_capabilities:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
provider_core.c:OSSL_FUNC_provider_query_operation:
   60|  1.70k|    {                                                  \
   61|  1.70k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.70k|    }
baseprov.c:OSSL_FUNC_core_gettable_params:
   60|    668|    {                                                  \
   61|    668|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    668|    }
baseprov.c:OSSL_FUNC_core_get_params:
   60|    668|    {                                                  \
   61|    668|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    668|    }
baseprov.c:OSSL_FUNC_core_get_libctx:
   60|    668|    {                                                  \
   61|    668|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    668|    }
defltprov.c:OSSL_FUNC_core_gettable_params:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
defltprov.c:OSSL_FUNC_core_get_params:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
defltprov.c:OSSL_FUNC_core_get_libctx:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
bio_prov.c:OSSL_FUNC_BIO_new_file:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_new_membuf:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_read_ex:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_write_ex:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_gets:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_puts:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_ctrl:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_up_ref:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_free:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_vprintf:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_seeding.c:OSSL_FUNC_get_entropy:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
provider_seeding.c:OSSL_FUNC_get_user_entropy:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
provider_seeding.c:OSSL_FUNC_cleanup_entropy:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_entropy:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
provider_seeding.c:OSSL_FUNC_get_nonce:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
provider_seeding.c:OSSL_FUNC_get_user_nonce:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
provider_seeding.c:OSSL_FUNC_cleanup_nonce:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_nonce:
   60|    809|    {                                                  \
   61|    809|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    809|    }
drbg.c:OSSL_FUNC_rand_enable_locking:
   60|  1.78k|    {                                                  \
   61|  1.78k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.78k|    }
drbg.c:OSSL_FUNC_rand_lock:
   60|  1.78k|    {                                                  \
   61|  1.78k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.78k|    }
drbg.c:OSSL_FUNC_rand_unlock:
   60|  1.78k|    {                                                  \
   61|  1.78k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.78k|    }
drbg.c:OSSL_FUNC_rand_get_ctx_params:
   60|  1.78k|    {                                                  \
   61|  1.78k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.78k|    }
drbg.c:OSSL_FUNC_rand_get_seed:
   60|  1.78k|    {                                                  \
   61|  1.78k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.78k|    }
drbg.c:OSSL_FUNC_rand_clear_seed:
   60|  1.78k|    {                                                  \
   61|  1.78k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.78k|    }
evp_rand.c:OSSL_FUNC_rand_newctx:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_freectx:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_instantiate:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_uninstantiate:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_generate:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_reseed:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_nonce:
   60|    596|    {                                                  \
   61|    596|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    596|    }
evp_rand.c:OSSL_FUNC_rand_enable_locking:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_lock:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_unlock:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_gettable_ctx_params:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_settable_ctx_params:
   60|  2.38k|    {                                                  \
   61|  2.38k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.38k|    }
evp_rand.c:OSSL_FUNC_rand_get_ctx_params:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_set_ctx_params:
   60|  2.38k|    {                                                  \
   61|  2.38k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.38k|    }
evp_rand.c:OSSL_FUNC_rand_verify_zeroization:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_get_seed:
   60|  3.53k|    {                                                  \
   61|  3.53k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.53k|    }
evp_rand.c:OSSL_FUNC_rand_clear_seed:
   60|  2.94k|    {                                                  \
   61|  2.94k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.94k|    }

ssl_lib.c:ERR_GET_LIB:
  225|  2.55k|{
  226|  2.55k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  2.55k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  2.55k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 2.55k]
  |  |  ------------------
  ------------------
  227|      0|        return ERR_LIB_SYS;
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
  228|  2.55k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  209|  2.55k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  210|  2.55k|#define ERR_LIB_MASK 0xFF
  ------------------
  229|  2.55k|}
conf_mod.c:ERR_GET_REASON:
  239|      1|{
  240|      1|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|      1|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|      1|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|      1|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|      1|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|      1|}
err.c:ERR_GET_LIB:
  225|  8.27k|{
  226|  8.27k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  8.27k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  8.27k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 76, False: 8.19k]
  |  |  ------------------
  ------------------
  227|     76|        return ERR_LIB_SYS;
  ------------------
  |  |   55|     76|#define ERR_LIB_SYS 2
  ------------------
  228|  8.19k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  209|  8.19k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  210|  8.19k|#define ERR_LIB_MASK 0xFF
  ------------------
  229|  8.27k|}
err.c:ERR_GET_REASON:
  239|  1.39k|{
  240|  1.39k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  1.39k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  1.39k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 38, False: 1.35k]
  |  |  ------------------
  ------------------
  241|     38|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|     38|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  1.35k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  1.35k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  1.39k|}
pem_info.c:ERR_GET_REASON:
  239|  4.18k|{
  240|  4.18k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  4.18k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  4.18k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 4.18k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  4.18k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  4.18k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  4.18k|}
pem_lib.c:ERR_GET_REASON:
  239|  3.73k|{
  240|  3.73k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  3.73k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  3.73k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 3.73k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  3.73k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  3.73k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  3.73k|}
by_file.c:ERR_GET_REASON:
  239|  3.72k|{
  240|  3.72k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  3.72k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  3.72k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 3.72k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  3.72k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  3.72k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  3.72k|}
a_d2i_fp.c:ERR_GET_REASON:
  239|  1.00M|{
  240|  1.00M|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  1.00M|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  1.00M|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 1.00M]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  1.00M|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  1.00M|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  1.00M|}
conf_def.c:ERR_GET_REASON:
  239|    809|{
  240|    809|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|    809|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|    809|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 809]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|    809|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|    809|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|    809|}

ssl_lib.c:lh_SSL_SESSION_new:
  334|  3.47k|    {                                                                                                                      \
  335|  3.47k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  3.47k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  3.47k|            lh_##type##_doall_thunk,                                                                                       \
  338|  3.47k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  3.47k|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_hfn_thunk:
  260|     10|    {                                                                                                                      \
  261|     10|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|     10|        return hfn_conv((const type *)data);                                                                               \
  263|     10|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_free:
  271|  3.47k|    {                                                                                                                      \
  272|  3.47k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  3.47k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_retrieve:
  291|     10|    {                                                                                                                      \
  292|     10|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|     10|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_get_down_load:
  306|  3.47k|    {                                                                                                                      \
  307|  3.47k|        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh);                                                              \
  308|  3.47k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_set_down_load:
  311|  6.94k|    {                                                                                                                      \
  312|  6.94k|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|  6.94k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_new:
  334|    809|    {                                                                                                                      \
  335|    809|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    809|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    809|            lh_##type##_doall_thunk,                                                                                       \
  338|    809|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    809|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_hfn_thunk:
  260|   503k|    {                                                                                                                      \
  261|   503k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   503k|        return hfn_conv((const type *)data);                                                                               \
  263|   503k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_cfn_thunk:
  265|   503k|    {                                                                                                                      \
  266|   503k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   503k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   503k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_doall:
  328|  2.60k|    {                                                                                                                      \
  329|  2.60k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|  2.60k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_free:
  271|    808|    {                                                                                                                      \
  272|    808|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    808|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_flush:
  276|  1.79k|    {                                                                                                                      \
  277|  1.79k|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|  1.79k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_retrieve:
  291|   503k|    {                                                                                                                      \
  292|   503k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   503k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_insert:
  281|      2|    {                                                                                                                      \
  282|      2|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|      2|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_error:
  296|      2|    {                                                                                                                      \
  297|      2|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|      2|    }                                                                                                                      \
err.c:ossl_check_ERR_STRING_DATA_lh_type:
  208|  6.18k|    {                                                                                                          \
  209|  6.18k|        return (OPENSSL_LHASH *)lh;                                                                            \
  210|  6.18k|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type:
  218|      1|    {                                                                                                          \
  219|      1|        return (OPENSSL_LH_HASHFUNC)hfn;                                                                       \
  220|      1|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type:
  213|      1|    {                                                                                                          \
  214|      1|        return (OPENSSL_LH_COMPFUNC)cmp;                                                                       \
  215|      1|    }                                                                                                          \
err.c:lh_ERR_STRING_DATA_hash_thunk:
  172|  6.18k|    {                                                                                                          \
  173|  6.18k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                        \
  174|  6.18k|        return hfn_conv((const type *)data);                                                                   \
  175|  6.18k|    }                                                                                                          \
err.c:lh_ERR_STRING_DATA_comp_thunk:
  177|  4.68k|    {                                                                                                          \
  178|  4.68k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                \
  179|  4.68k|        return cfn_conv((const type *)da, (const type *)db);                                                   \
  180|  4.68k|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_plain_type:
  193|  4.74k|    {                                                                                                          \
  194|  4.74k|        return ptr;                                                                                            \
  195|  4.74k|    }                                                                                                          \
err.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type:
  198|  1.43k|    {                                                                                                          \
  199|  1.43k|        return ptr;                                                                                            \
  200|  1.43k|    }                                                                                                          \
o_names.c:lh_OBJ_NAME_new:
  334|      1|    {                                                                                                                      \
  335|      1|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|      1|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|      1|            lh_##type##_doall_thunk,                                                                                       \
  338|      1|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|      1|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_hfn_thunk:
  260|   889k|    {                                                                                                                      \
  261|   889k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   889k|        return hfn_conv((const type *)data);                                                                               \
  263|   889k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_cfn_thunk:
  265|   773k|    {                                                                                                                      \
  266|   773k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   773k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   773k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_retrieve:
  291|   889k|    {                                                                                                                      \
  292|   889k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   889k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_insert:
  281|    424|    {                                                                                                                      \
  282|    424|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|    424|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_error:
  296|    242|    {                                                                                                                      \
  297|    242|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|    242|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL:
  371|  1.41k|    {                                                                                       \
  372|  1.41k|        OPENSSL_LH_doall_arg_thunk((OPENSSL_LHASH *)lh,                                     \
  373|  1.41k|            lh_##type##_doall_##argtype##_thunk,                                            \
  374|  1.41k|            (OPENSSL_LH_DOALL_FUNCARG)fn,                                                   \
  375|  1.41k|            (void *)arg);                                                                   \
  376|  1.41k|    }                                                                                       \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL_thunk:
  363|   343k|    {                                                                                       \
  364|   343k|        void (*fn_conv)(cbargtype *, argtype *) = (void (*)(cbargtype *, argtype *))fn;     \
  365|   343k|        fn_conv((cbargtype *)node, (argtype *)arg);                                         \
  366|   343k|    }                                                                                       \
obj_dat.c:lh_ADDED_OBJ_new:
  334|      1|    {                                                                                                                      \
  335|      1|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|      1|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|      1|            lh_##type##_doall_thunk,                                                                                       \
  338|      1|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|      1|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_hfn_thunk:
  260|   422k|    {                                                                                                                      \
  261|   422k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   422k|        return hfn_conv((const type *)data);                                                                               \
  263|   422k|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_retrieve:
  291|   422k|    {                                                                                                                      \
  292|   422k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   422k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall:
  328|    808|    {                                                                                                                      \
  329|    808|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|    808|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_free:
  271|    808|    {                                                                                                                      \
  272|    808|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    808|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_new:
  334|    809|    {                                                                                                                      \
  335|    809|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    809|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    809|            lh_##type##_doall_thunk,                                                                                       \
  338|    809|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    809|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_hfn_thunk:
  260|   196k|    {                                                                                                                      \
  261|   196k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   196k|        return hfn_conv((const type *)data);                                                                               \
  263|   196k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_cfn_thunk:
  265|   192k|    {                                                                                                                      \
  266|   192k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   192k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   192k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall_thunk:
  316|  1.26k|    {                                                                                                                      \
  317|  1.26k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  1.26k|        doall_conv((type *)node);                                                                                          \
  319|  1.26k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_retrieve:
  291|   194k|    {                                                                                                                      \
  292|   194k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   194k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_insert:
  281|  1.28k|    {                                                                                                                      \
  282|  1.28k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  1.28k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_error:
  296|  1.28k|    {                                                                                                                      \
  297|  1.28k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  1.28k|    }                                                                                                                      \
property.c:lh_QUERY_new:
  334|   193k|    {                                                                                                                      \
  335|   193k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|   193k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|   193k|            lh_##type##_doall_thunk,                                                                                       \
  338|   193k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|   193k|    }                                                                                                                      \
property.c:lh_QUERY_hfn_thunk:
  260|   806k|    {                                                                                                                      \
  261|   806k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   806k|        return hfn_conv((const type *)data);                                                                               \
  263|   806k|    }                                                                                                                      \
property.c:lh_QUERY_cfn_thunk:
  265|   735k|    {                                                                                                                      \
  266|   735k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   735k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   735k|    }                                                                                                                      \
property.c:lh_QUERY_doall_thunk:
  316|  33.4k|    {                                                                                                                      \
  317|  33.4k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  33.4k|        doall_conv((type *)node);                                                                                          \
  319|  33.4k|    }                                                                                                                      \
property.c:lh_QUERY_doall:
  328|   193k|    {                                                                                                                      \
  329|   193k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|   193k|    }                                                                                                                      \
property.c:lh_QUERY_free:
  271|   192k|    {                                                                                                                      \
  272|   192k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|   192k|    }                                                                                                                      \
property.c:lh_QUERY_num_items:
  301|  1.16k|    {                                                                                                                      \
  302|  1.16k|        return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh);                                                                  \
  303|  1.16k|    }                                                                                                                      \
property.c:lh_QUERY_flush:
  276|  1.16k|    {                                                                                                                      \
  277|  1.16k|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|  1.16k|    }                                                                                                                      \
property.c:lh_QUERY_retrieve:
  291|   772k|    {                                                                                                                      \
  292|   772k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   772k|    }                                                                                                                      \
property.c:lh_QUERY_insert:
  281|  33.5k|    {                                                                                                                      \
  282|  33.5k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  33.5k|    }                                                                                                                      \
property.c:lh_QUERY_error:
  296|  33.5k|    {                                                                                                                      \
  297|  33.5k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  33.5k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall:
  328|  1.61k|    {                                                                                                                      \
  329|  1.61k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|  1.61k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_free:
  271|  1.61k|    {                                                                                                                      \
  272|  1.61k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  1.61k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_new:
  334|  1.61k|    {                                                                                                                      \
  335|  1.61k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  1.61k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  1.61k|            lh_##type##_doall_thunk,                                                                                       \
  338|  1.61k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  1.61k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_hfn_thunk:
  260|   133k|    {                                                                                                                      \
  261|   133k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   133k|        return hfn_conv((const type *)data);                                                                               \
  263|   133k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_cfn_thunk:
  265|  39.6k|    {                                                                                                                      \
  266|  39.6k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|  39.6k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|  39.6k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall_thunk:
  316|  8.41k|    {                                                                                                                      \
  317|  8.41k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  8.41k|        doall_conv((type *)node);                                                                                          \
  319|  8.41k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_retrieve:
  291|   125k|    {                                                                                                                      \
  292|   125k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   125k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_insert:
  281|  8.43k|    {                                                                                                                      \
  282|  8.43k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  8.43k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_error:
  296|  8.43k|    {                                                                                                                      \
  297|  8.43k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  8.43k|    }                                                                                                                      \

OBJ_bsearch_ssl_cipher_id:
  142|     93|    {                                                                  \
  143|     93|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),    \
  144|     93|            nm##_cmp_BSEARCH_CMP_FN);                                  \
  145|     93|    }                                                                  \
ssl_lib.c:ssl_cipher_id_cmp_BSEARCH_CMP_FN:
  136|    377|    {                                                                  \
  137|    377|        type1 const *a = a_;                                           \
  138|    377|        type2 const *b = b_;                                           \
  139|    377|        return nm##_cmp(a, b);                                         \
  140|    377|    }                                                                  \
obj_dat.c:OBJ_bsearch_ln:
  128|   128k|    {                                                                      \
  129|   128k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   128k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   128k|    }                                                                      \
obj_dat.c:ln_cmp_BSEARCH_CMP_FN:
  122|  1.27M|    {                                                                      \
  123|  1.27M|        type1 const *a = a_;                                               \
  124|  1.27M|        type2 const *b = b_;                                               \
  125|  1.27M|        return nm##_cmp(a, b);                                             \
  126|  1.27M|    }                                                                      \
obj_dat.c:OBJ_bsearch_sn:
  128|   167k|    {                                                                      \
  129|   167k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   167k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   167k|    }                                                                      \
obj_dat.c:sn_cmp_BSEARCH_CMP_FN:
  122|  1.75M|    {                                                                      \
  123|  1.75M|        type1 const *a = a_;                                               \
  124|  1.75M|        type2 const *b = b_;                                               \
  125|  1.75M|        return nm##_cmp(a, b);                                             \
  126|  1.75M|    }                                                                      \
obj_dat.c:OBJ_bsearch_obj:
  128|  8.53M|    {                                                                      \
  129|  8.53M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  8.53M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  8.53M|    }                                                                      \
obj_dat.c:obj_cmp_BSEARCH_CMP_FN:
  122|  82.7M|    {                                                                      \
  123|  82.7M|        type1 const *a = a_;                                               \
  124|  82.7M|        type2 const *b = b_;                                               \
  125|  82.7M|        return nm##_cmp(a, b);                                             \
  126|  82.7M|    }                                                                      \
obj_xref.c:OBJ_bsearch_sig:
  128|   895k|    {                                                                      \
  129|   895k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   895k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   895k|    }                                                                      \
obj_xref.c:sig_cmp_BSEARCH_CMP_FN:
  122|  4.48M|    {                                                                      \
  123|  4.48M|        type1 const *a = a_;                                               \
  124|  4.48M|        type2 const *b = b_;                                               \
  125|  4.48M|        return nm##_cmp(a, b);                                             \
  126|  4.48M|    }                                                                      \
v3_lib.c:OBJ_bsearch_ext:
  128|  1.45M|    {                                                                      \
  129|  1.45M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  1.45M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  1.45M|    }                                                                      \
v3_lib.c:ext_cmp_BSEARCH_CMP_FN:
  122|  7.31M|    {                                                                      \
  123|  7.31M|        type1 const *a = a_;                                               \
  124|  7.31M|        type2 const *b = b_;                                               \
  125|  7.31M|        return nm##_cmp(a, b);                                             \
  126|  7.31M|    }                                                                      \
v3_purp.c:OBJ_bsearch_nid:
  128|   871k|    {                                                                      \
  129|   871k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   871k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   871k|    }                                                                      \
v3_purp.c:nid_cmp_BSEARCH_CMP_FN:
  122|  2.17M|    {                                                                      \
  123|  2.17M|        type1 const *a = a_;                                               \
  124|  2.17M|        type2 const *b = b_;                                               \
  125|  2.17M|        return nm##_cmp(a, b);                                             \
  126|  2.17M|    }                                                                      \
ameth_lib.c:OBJ_bsearch_ameth:
  128|  1.31M|    {                                                                      \
  129|  1.31M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  1.31M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  1.31M|    }                                                                      \
ameth_lib.c:ameth_cmp_BSEARCH_CMP_FN:
  122|  3.75M|    {                                                                      \
  123|  3.75M|        type1 const *a = a_;                                               \
  124|  3.75M|        type2 const *b = b_;                                               \
  125|  3.75M|        return nm##_cmp(a, b);                                             \
  126|  3.75M|    }                                                                      \

PEM_read_bio_X509_AUX:
  152|      3|    {                                                                \
  153|      3|        return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str, bp, \
  154|      3|            (void **)x, cb, u);                                      \
  155|      3|    }
PEM_read_bio_X509_CRL:
  152|  3.72k|    {                                                                \
  153|  3.72k|        return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str, bp, \
  154|  3.72k|            (void **)x, cb, u);                                      \
  155|  3.72k|    }

s3_lib.c:ossl_check_X509_NAME_sk_type:
   63|  12.9k|    {                                                                                                                    \
   64|  12.9k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  12.9k|    }                                                                                                                    \
s3_lib.c:ossl_check_X509_NAME_freefunc_type:
   75|  12.9k|    {                                                                                                                    \
   76|  12.9k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  12.9k|    }
ssl_ciph.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|   378k|    {                                                                                                                    \
   60|   378k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   378k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_sk_type:
   63|   250k|    {                                                                                                                    \
   64|   250k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   250k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_type:
   55|   230k|    {                                                                                                                    \
   56|   230k|        return ptr;                                                                                                      \
   57|   230k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_compfunc_type:
   67|  4.02k|    {                                                                                                                    \
   68|  4.02k|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|  4.02k|    }                                                                                                                    \
ssl_lib.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|   961k|    {                                                                                                                    \
   60|   961k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   961k|    }                                                                                                                    \
ssl_lib.c:sk_danetls_record_pop_free:
  170|  2.58k|    {                                                                                                                      \
  171|  2.58k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  2.58k|                                                                                                                           \
  173|  2.58k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  2.58k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  2.58k|                                                                                                                           \
  176|  2.58k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  2.58k|    }                                                                                                                      \
ssl_lib.c:ossl_check_SSL_CIPHER_sk_type:
   63|   245k|    {                                                                                                                    \
   64|   245k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   245k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_EXTENSION_sk_type:
   63|  2.58k|    {                                                                                                                    \
   64|  2.58k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.58k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_EXTENSION_freefunc_type:
   75|  2.58k|    {                                                                                                                    \
   76|  2.58k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  2.58k|    }
ssl_lib.c:ossl_check_OCSP_RESPID_sk_type:
   63|  2.58k|    {                                                                                                                    \
   64|  2.58k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.58k|    }                                                                                                                    \
ssl_lib.c:ossl_check_OCSP_RESPID_freefunc_type:
   75|  2.58k|    {                                                                                                                    \
   76|  2.58k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  2.58k|    }
ssl_lib.c:sk_OCSP_RESPONSE_pop_free:
  170|  2.58k|    {                                                                                                                      \
  171|  2.58k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  2.58k|                                                                                                                           \
  173|  2.58k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  2.58k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  2.58k|                                                                                                                           \
  176|  2.58k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  2.58k|    }                                                                                                                      \
ssl_lib.c:ossl_check_X509_NAME_sk_type:
   63|  12.1k|    {                                                                                                                    \
   64|  12.1k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  12.1k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_NAME_freefunc_type:
   75|  12.1k|    {                                                                                                                    \
   76|  12.1k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  12.1k|    }
ssl_lib.c:ossl_check_SRTP_PROTECTION_PROFILE_sk_type:
   63|  6.05k|    {                                                                                                                    \
   64|  6.05k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  6.05k|    }                                                                                                                    \
ssl_lib.c:ossl_check_SSL_CIPHER_type:
   55|   224k|    {                                                                                                                    \
   56|   224k|        return ptr;                                                                                                      \
   57|   224k|    }                                                                                                                    \
ssl_sess.c:sk_SSL_SESSION_new_null:
  115|  3.47k|    {                                                                                                                      \
  116|  3.47k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  3.47k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  3.47k|                                                                                                                           \
  119|  3.47k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  3.47k|                                                                                                                           \
  121|  3.47k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  3.47k|    }                                                                                                                      \
ssl_sess.c:sk_SSL_SESSION_pop_free:
  170|  3.47k|    {                                                                                                                      \
  171|  3.47k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  3.47k|                                                                                                                           \
  173|  3.47k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  3.47k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  3.47k|                                                                                                                           \
  176|  3.47k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  3.47k|    }                                                                                                                      \
extensions.c:sk_OCSP_RESPONSE_pop_free:
  170|     61|    {                                                                                                                      \
  171|     61|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|     61|                                                                                                                           \
  173|     61|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|     61|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|     61|                                                                                                                           \
  176|     61|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|     61|    }                                                                                                                      \
extensions.c:ossl_check_const_X509_NAME_sk_type:
   59|  2.43k|    {                                                                                                                    \
   60|  2.43k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  2.43k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|  24.9k|    {                                                                                                                    \
   60|  24.9k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  24.9k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   63|  7.55k|    {                                                                                                                    \
   64|  7.55k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  7.55k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_const_OCSP_RESPID_sk_type:
   59|      1|    {                                                                                                                    \
   60|      1|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|      1|    }                                                                                                                    \
statem_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   63|      5|    {                                                                                                                    \
   64|      5|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|      5|    }                                                                                                                    \
statem_clnt.c:ossl_check_SSL_CIPHER_type:
   55|      5|    {                                                                                                                    \
   56|      5|        return ptr;                                                                                                      \
   57|      5|    }                                                                                                                    \
tasn_dec.c:ossl_check_ASN1_VALUE_sk_type:
   63|  8.95M|    {                                                                                                                    \
   64|  8.95M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  8.95M|    }                                                                                                                    \
tasn_dec.c:ossl_check_ASN1_VALUE_type:
   55|  8.95M|    {                                                                                                                    \
   56|  8.95M|        return ptr;                                                                                                      \
   57|  8.95M|    }                                                                                                                    \
tasn_enc.c:sk_const_ASN1_VALUE_num:
   98|  24.9M|    {                                                                                                                      \
   99|  24.9M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  24.9M|    }                                                                                                                      \
tasn_enc.c:sk_const_ASN1_VALUE_value:
  102|  10.7M|    {                                                                                                                      \
  103|  10.7M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  10.7M|    }                                                                                                                      \
tasn_fre.c:ossl_check_const_ASN1_VALUE_sk_type:
   59|  6.50M|    {                                                                                                                    \
   60|  6.50M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  6.50M|    }                                                                                                                    \
tasn_fre.c:ossl_check_ASN1_VALUE_sk_type:
   63|  2.85M|    {                                                                                                                    \
   64|  2.85M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.85M|    }                                                                                                                    \
ct_log.c:ossl_check_CTLOG_sk_type:
   63|  3.47k|    {                                                                                                                    \
   64|  3.47k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  3.47k|    }                                                                                                                    \
ct_log.c:ossl_check_CTLOG_freefunc_type:
   75|  3.47k|    {                                                                                                                    \
   76|  3.47k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  3.47k|    }
ct_sct.c:ossl_check_SCT_sk_type:
   63|  2.58k|    {                                                                                                                    \
   64|  2.58k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.58k|    }                                                                                                                    \
ct_sct.c:ossl_check_SCT_freefunc_type:
   75|  2.58k|    {                                                                                                                    \
   76|  2.58k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  2.58k|    }
dso_lib.c:ossl_check_void_sk_type:
   63|     92|    {                                                                                                                    \
   64|     92|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|     92|    }                                                                                                                    \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_push:
  154|     11|    {                                                                                                                      \
  155|     11|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|     11|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_freefunc_thunk:
   85|    152|    {                                                                                                                      \
   86|    152|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|    152|        freefunc((t3 *)ptr);                                                                                               \
   88|    152|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_push:
  154|    152|    {                                                                                                                      \
  155|    152|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|    152|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_num:
   98|      2|    {                                                                                                                      \
   99|      2|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_num:
   98|  1.00M|    {                                                                                                                      \
   99|  1.00M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  1.00M|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_set_cmp_func:
  220|      4|    {                                                                                                                      \
  221|      4|        return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare);             \
  222|      4|    }
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_value:
  102|  3.86M|    {                                                                                                                      \
  103|  3.86M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  3.86M|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_sort:
  200|      2|    {                                                                                                                      \
  201|      2|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_value:
  102|  1.67k|    {                                                                                                                      \
  103|  1.67k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  1.67k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_pop_free:
  170|      2|    {                                                                                                                      \
  171|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|      2|                                                                                                                           \
  173|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|      2|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|      2|                                                                                                                           \
  176|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|      2|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_pop_free:
  170|   503k|    {                                                                                                                      \
  171|   503k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   503k|                                                                                                                           \
  173|   503k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   503k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   503k|                                                                                                                           \
  176|   503k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   503k|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_freefunc_thunk:
   85|  2.85M|    {                                                                                                                      \
   86|  2.85M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  2.85M|        freefunc((t3 *)ptr);                                                                                               \
   88|  2.85M|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_freefunc_thunk:
   85|   665k|    {                                                                                                                      \
   86|   665k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   665k|        freefunc((t3 *)ptr);                                                                                               \
   88|   665k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_push:
  154|      3|    {                                                                                                                      \
  155|      3|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      3|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_num:
   98|   503k|    {                                                                                                                      \
   99|   503k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   503k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_value:
  102|   503k|    {                                                                                                                      \
  103|   503k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   503k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_pop_free:
  170|   503k|    {                                                                                                                      \
  171|   503k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   503k|                                                                                                                           \
  173|   503k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   503k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   503k|                                                                                                                           \
  176|   503k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   503k|    }                                                                                                                      \
decoder_pkey.c:sk_OSSL_DECODER_INSTANCE_deep_copy:
  214|   503k|    {                                                                                                                      \
  215|   503k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|   503k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|   503k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|   503k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_deep_copy:
  214|   503k|    {                                                                                                                      \
  215|   503k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|   503k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|   503k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|   503k|    }                                                                                                                      \
keymgmt_lib.c:sk_OP_CACHE_ELEM_pop_free:
  170|  1.01M|    {                                                                                                                      \
  171|  1.01M|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  1.01M|                                                                                                                           \
  173|  1.01M|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  1.01M|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  1.01M|                                                                                                                           \
  176|  1.01M|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  1.01M|    }                                                                                                                      \
p_lib.c:ossl_check_X509_ATTRIBUTE_sk_type:
   63|  1.01M|    {                                                                                                                    \
   64|  1.01M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  1.01M|    }                                                                                                                    \
p_lib.c:ossl_check_X509_ATTRIBUTE_freefunc_type:
   75|  1.01M|    {                                                                                                                    \
   76|  1.01M|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  1.01M|    }
core_namemap.c:sk_NAMES_value:
  102|   895k|    {                                                                                                                      \
  103|   895k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   895k|    }                                                                                                                      \
core_namemap.c:ossl_check_const_OPENSSL_STRING_sk_type:
   59|  5.66M|    {                                                                                                                    \
   60|  5.66M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  5.66M|    }                                                                                                                    \
core_namemap.c:ossl_check_OPENSSL_STRING_sk_type:
   63|  1.26M|    {                                                                                                                    \
   64|  1.26M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  1.26M|    }                                                                                                                    \
core_namemap.c:sk_OPENSSL_STRING_freefunc_thunk:
   42|   422k|    {                                                                                                                    \
   43|   422k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|   422k|        freefunc((t3 *)ptr);                                                                                             \
   45|   422k|    }                                                                                                                    \
core_namemap.c:ossl_check_OPENSSL_STRING_type:
   55|   423k|    {                                                                                                                    \
   56|   423k|        return ptr;                                                                                                      \
   57|   423k|    }                                                                                                                    \
core_namemap.c:sk_NAMES_push:
  154|   183k|    {                                                                                                                      \
  155|   183k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|   183k|    }                                                                                                                      \
core_namemap.c:sk_NAMES_num:
   98|   183k|    {                                                                                                                      \
   99|   183k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   183k|    }                                                                                                                      \
core_namemap.c:ossl_check_OPENSSL_STRING_freefunc_type:
   75|   182k|    {                                                                                                                    \
   76|   182k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   182k|    }
core_namemap.c:sk_NAMES_new_null:
  115|    809|    {                                                                                                                      \
  116|    809|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|    809|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|    809|                                                                                                                           \
  119|    809|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|    809|                                                                                                                           \
  121|    809|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|    809|    }                                                                                                                      \
core_namemap.c:sk_NAMES_freefunc_thunk:
   85|   182k|    {                                                                                                                      \
   86|   182k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   182k|        freefunc((t3 *)ptr);                                                                                               \
   88|   182k|    }                                                                                                                      \
core_namemap.c:sk_NAMES_pop_free:
  170|    808|    {                                                                                                                      \
  171|    808|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    808|                                                                                                                           \
  173|    808|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    808|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    808|                                                                                                                           \
  176|    808|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    808|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_pop_free:
  170|  14.5k|    {                                                                                                                      \
  171|  14.5k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  14.5k|                                                                                                                           \
  173|  14.5k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  14.5k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  14.5k|                                                                                                                           \
  176|  14.5k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  14.5k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_num:
   98|  11.2M|    {                                                                                                                      \
   99|  11.2M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  11.2M|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_new_null:
  115|      1|    {                                                                                                                      \
  116|      1|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      1|                                                                                                                           \
  119|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      1|                                                                                                                           \
  121|      1|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      1|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_push:
  154|      2|    {                                                                                                                      \
  155|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      2|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_set:
  183|      1|    {                                                                                                                      \
  184|      1|        return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr);                                          \
  185|      1|    }                                                                                                                      \
ex_data.c:ossl_check_const_void_sk_type:
   59|  2.58k|    {                                                                                                                    \
   60|  2.58k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  2.58k|    }                                                                                                                    \
ex_data.c:ossl_check_void_sk_type:
   63|  5.60M|    {                                                                                                                    \
   64|  5.60M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  5.60M|    }                                                                                                                    \
ex_data.c:ossl_check_void_type:
   55|  5.17k|    {                                                                                                                    \
   56|  5.17k|        return ptr;                                                                                                      \
   57|  5.17k|    }                                                                                                                    \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_new_null:
  115|      1|    {                                                                                                                      \
  116|      1|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      1|                                                                                                                           \
  119|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      1|                                                                                                                           \
  121|      1|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_push:
  154|      1|    {                                                                                                                      \
  155|      1|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_num:
   98|  3.59k|    {                                                                                                                      \
   99|  3.59k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  3.59k|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_value:
  102|  1.79k|    {                                                                                                                      \
  103|  1.79k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  1.79k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_new_null:
  115|  4.62k|    {                                                                                                                      \
  116|  4.62k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  4.62k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  4.62k|                                                                                                                           \
  119|  4.62k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  4.62k|                                                                                                                           \
  121|  4.62k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  4.62k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_pop:
  162|  4.62k|    {                                                                                                                      \
  163|  4.62k|        return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk);                                                                  \
  164|  4.62k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_free:
  137|  4.62k|    {                                                                                                                      \
  138|  4.62k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|  4.62k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_push:
  154|  4.62k|    {                                                                                                                      \
  155|  4.62k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  4.62k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_num:
   98|  18.5k|    {                                                                                                                      \
   99|  18.5k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  18.5k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_value:
  102|  4.62k|    {                                                                                                                      \
  103|  4.62k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  4.62k|    }                                                                                                                      \
provider_conf.c:sk_OSSL_PROVIDER_pop_free:
  170|    808|    {                                                                                                                      \
  171|    808|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    808|                                                                                                                           \
  173|    808|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    808|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    808|                                                                                                                           \
  176|    808|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    808|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_pop_free:
  170|  1.79k|    {                                                                                                                      \
  171|  1.79k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  1.79k|                                                                                                                           \
  173|  1.79k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  1.79k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  1.79k|                                                                                                                           \
  176|  1.79k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  1.79k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_pop_free:
  170|    808|    {                                                                                                                      \
  171|    808|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    808|                                                                                                                           \
  173|    808|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    808|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    808|                                                                                                                           \
  176|    808|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    808|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_freefunc_thunk:
   85|  1.70k|    {                                                                                                                      \
   86|  1.70k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  1.70k|        freefunc((t3 *)ptr);                                                                                               \
   88|  1.70k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_pop_free:
  170|    808|    {                                                                                                                      \
  171|    808|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    808|                                                                                                                           \
  173|    808|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    808|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    808|                                                                                                                           \
  176|    808|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    808|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_new:
  106|    809|    {                                                                                                                      \
  107|    809|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|    809|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|    809|                                                                                                                           \
  110|    809|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|    809|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|    809|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|    809|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_cmpfunc_thunk:
   90|  8.39k|    {                                                                                                                      \
   91|  8.39k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  8.39k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  8.39k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  8.39k|                                                                                                                           \
   95|  8.39k|        return realcmp(at, bt);                                                                                            \
   96|  8.39k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_new_null:
  115|    809|    {                                                                                                                      \
  116|    809|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|    809|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|    809|                                                                                                                           \
  119|    809|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|    809|                                                                                                                           \
  121|    809|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|    809|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_is_sorted:
  204|  4.63k|    {                                                                                                                      \
  205|  4.63k|        return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk);                                                            \
  206|  4.63k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_sort:
  200|    614|    {                                                                                                                      \
  201|    614|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|    614|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_find:
  187|  4.92k|    {                                                                                                                      \
  188|  4.92k|        return OPENSSL_sk_find((const OPENSSL_STACK *)sk, (const void *)ptr);                                              \
  189|  4.92k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_value:
  102|   503k|    {                                                                                                                      \
  103|   503k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   503k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_deep_copy:
  214|  1.80k|    {                                                                                                                      \
  215|  1.80k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|  1.80k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|  1.80k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|  1.80k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_push:
  154|  1.70k|    {                                                                                                                      \
  155|  1.70k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  1.70k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_num:
   98|  6.28k|    {                                                                                                                      \
   99|  6.28k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  6.28k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_dup:
  208|   101k|    {                                                                                                                      \
  209|   101k|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  210|   101k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_num:
   98|   101k|    {                                                                                                                      \
   99|   101k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   101k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_free:
  137|   101k|    {                                                                                                                      \
  138|   101k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|   101k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_num:
   98|  2.60k|    {                                                                                                                      \
   99|  2.60k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  2.60k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_find:
  187|  3.35k|    {                                                                                                                      \
  188|  3.35k|        return OPENSSL_sk_find((const OPENSSL_STACK *)sk, (const void *)ptr);                                              \
  189|  3.35k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_value:
  102|  3.35k|    {                                                                                                                      \
  103|  3.35k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  3.35k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_new:
  106|      2|    {                                                                                                                      \
  107|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|      2|                                                                                                                           \
  110|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|      2|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|      2|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_cmpfunc_thunk:
   90|  3.35k|    {                                                                                                                      \
   91|  3.35k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  3.35k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  3.35k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  3.35k|                                                                                                                           \
   95|  3.35k|        return realcmp(at, bt);                                                                                            \
   96|  3.35k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_push:
  154|      2|    {                                                                                                                      \
  155|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      2|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_sort:
  200|      2|    {                                                                                                                      \
  201|      2|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|      2|    }                                                                                                                      \
pem_info.c:sk_X509_INFO_freefunc_thunk:
   42|   503k|    {                                                                                                                    \
   43|   503k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|   503k|        freefunc((t3 *)ptr);                                                                                             \
   45|   503k|    }                                                                                                                    \
pem_info.c:ossl_check_X509_INFO_sk_type:
   63|   503k|    {                                                                                                                    \
   64|   503k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   503k|    }                                                                                                                    \
pem_info.c:ossl_check_X509_INFO_type:
   55|   503k|    {                                                                                                                    \
   56|   503k|        return ptr;                                                                                                      \
   57|   503k|    }                                                                                                                    \
property.c:sk_IMPLEMENTATION_new_null:
  115|   193k|    {                                                                                                                      \
  116|   193k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|   193k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|   193k|                                                                                                                           \
  119|   193k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|   193k|                                                                                                                           \
  121|   193k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|   193k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_freefunc_thunk:
   85|   192k|    {                                                                                                                      \
   86|   192k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   192k|        freefunc((t3 *)ptr);                                                                                               \
   88|   192k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_num:
   98|   678k|    {                                                                                                                      \
   99|   678k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   678k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_value:
  102|   284k|    {                                                                                                                      \
  103|   284k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   284k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_push:
  154|   193k|    {                                                                                                                      \
  155|   193k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|   193k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_pop_free:
  170|   192k|    {                                                                                                                      \
  171|   192k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   192k|                                                                                                                           \
  173|   192k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   192k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   192k|                                                                                                                           \
  176|   192k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   192k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_delete:
  145|    557|    {                                                                                                                      \
  146|    557|        return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);                                                            \
  147|    557|    }                                                                                                                      \
property.c:sk_ALGORITHM_new_reserve:
  124|     24|    {                                                                                                                      \
  125|     24|        OPENSSL_STACK *ret = OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n);                                      \
  126|     24|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  127|     24|                                                                                                                           \
  128|     24|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  129|     24|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  130|     24|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  131|     24|    }                                                                                                                      \
property.c:sk_ALGORITHM_freefunc_thunk:
   85|    666|    {                                                                                                                      \
   86|    666|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|    666|        freefunc((t3 *)ptr);                                                                                               \
   88|    666|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_dup:
  208|    666|    {                                                                                                                      \
  209|    666|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  210|    666|    }                                                                                                                      \
property.c:sk_ALGORITHM_push:
  154|    666|    {                                                                                                                      \
  155|    666|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|    666|    }                                                                                                                      \
property.c:sk_ALGORITHM_num:
   98|     24|    {                                                                                                                      \
   99|     24|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|     24|    }                                                                                                                      \
property.c:sk_ALGORITHM_value:
  102|    666|    {                                                                                                                      \
  103|    666|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|    666|    }                                                                                                                      \
property.c:sk_ALGORITHM_pop_free:
  170|     24|    {                                                                                                                      \
  171|     24|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|     24|                                                                                                                           \
  173|     24|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|     24|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|     24|                                                                                                                           \
  176|     24|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|     24|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_free:
  137|    666|    {                                                                                                                      \
  138|    666|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|    666|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_new:
  106|  41.7k|    {                                                                                                                      \
  107|  41.7k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|  41.7k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|  41.7k|                                                                                                                           \
  110|  41.7k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|  41.7k|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|  41.7k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|  41.7k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_freefunc_thunk:
   85|   100k|    {                                                                                                                      \
   86|   100k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   100k|        freefunc((t3 *)ptr);                                                                                               \
   88|   100k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_cmpfunc_thunk:
   90|  47.3k|    {                                                                                                                      \
   91|  47.3k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  47.3k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  47.3k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  47.3k|                                                                                                                           \
   95|  47.3k|        return realcmp(at, bt);                                                                                            \
   96|  47.3k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_push:
  154|   100k|    {                                                                                                                      \
  155|   100k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|   100k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_num:
   98|  18.1k|    {                                                                                                                      \
   99|  18.1k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  18.1k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_sort:
  200|  18.1k|    {                                                                                                                      \
  201|  18.1k|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|  18.1k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_value:
  102|  32.7k|    {                                                                                                                      \
  103|  32.7k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  32.7k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_pop_free:
  170|  41.7k|    {                                                                                                                      \
  171|  41.7k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  41.7k|                                                                                                                           \
  173|  41.7k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  41.7k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  41.7k|                                                                                                                           \
  176|  41.7k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  41.7k|    }                                                                                                                      \
property_string.c:ossl_check_OPENSSL_CSTRING_sk_type:
   63|  10.0k|    {                                                                                                                    \
   64|  10.0k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.0k|    }                                                                                                                    \
property_string.c:ossl_check_OPENSSL_CSTRING_type:
   55|  8.43k|    {                                                                                                                    \
   56|  8.43k|        return ptr;                                                                                                      \
   57|  8.43k|    }                                                                                                                    \
property_string.c:ossl_check_const_OPENSSL_CSTRING_sk_type:
   59|  2.04k|    {                                                                                                                    \
   60|  2.04k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  2.04k|    }                                                                                                                    \
rsa_backend.c:sk_BIGNUM_const_new_null:
  115|  1.02M|    {                                                                                                                      \
  116|  1.02M|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  1.02M|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  1.02M|                                                                                                                           \
  119|  1.02M|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  1.02M|                                                                                                                           \
  121|  1.02M|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  1.02M|    }                                                                                                                      \
rsa_backend.c:sk_BIGNUM_const_free:
  137|  1.02M|    {                                                                                                                      \
  138|  1.02M|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|  1.02M|    }                                                                                                                      \
rsa_lib.c:sk_RSA_PRIME_INFO_pop_free:
  170|   341k|    {                                                                                                                      \
  171|   341k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   341k|                                                                                                                           \
  173|   341k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   341k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   341k|                                                                                                                           \
  176|   341k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   341k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_new_null:
  115|  1.02M|    {                                                                                                                      \
  116|  1.02M|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  1.02M|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  1.02M|                                                                                                                           \
  119|  1.02M|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  1.02M|                                                                                                                           \
  121|  1.02M|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  1.02M|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_num:
   98|  1.02M|    {                                                                                                                      \
   99|  1.02M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  1.02M|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_free:
  137|  1.02M|    {                                                                                                                      \
  138|  1.02M|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|  1.02M|    }                                                                                                                      \
rsa_ossl.c:sk_RSA_PRIME_INFO_num:
   98|   341k|    {                                                                                                                      \
   99|   341k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   341k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_pop_free:
  170|  2.33k|    {                                                                                                                      \
  171|  2.33k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  2.33k|                                                                                                                           \
  173|  2.33k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  2.33k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  2.33k|                                                                                                                           \
  176|  2.33k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  2.33k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_freefunc_thunk:
   85|  4.79k|    {                                                                                                                      \
   86|  4.79k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  4.79k|        freefunc((t3 *)ptr);                                                                                               \
   88|  4.79k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_pop_free:
  170|  4.79k|    {                                                                                                                      \
  171|  4.79k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  4.79k|                                                                                                                           \
  173|  4.79k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  4.79k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  4.79k|                                                                                                                           \
  176|  4.79k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  4.79k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_num:
   98|   443k|    {                                                                                                                      \
   99|   443k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   443k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_value:
  102|   424k|    {                                                                                                                      \
  103|   424k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   424k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_new_null:
  115|  2.33k|    {                                                                                                                      \
  116|  2.33k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  2.33k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  2.33k|                                                                                                                           \
  119|  2.33k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  2.33k|                                                                                                                           \
  121|  2.33k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  2.33k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_new:
  106|  4.79k|    {                                                                                                                      \
  107|  4.79k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|  4.79k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|  4.79k|                                                                                                                           \
  110|  4.79k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|  4.79k|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|  4.79k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|  4.79k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_push:
  154|  4.79k|    {                                                                                                                      \
  155|  4.79k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  4.79k|    }                                                                                                                      \
by_file.c:ossl_check_const_X509_INFO_sk_type:
   59|  1.01M|    {                                                                                                                    \
   60|  1.01M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  1.01M|    }                                                                                                                    \
by_file.c:ossl_check_X509_INFO_sk_type:
   63|  4.18k|    {                                                                                                                    \
   64|  4.18k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  4.18k|    }                                                                                                                    \
by_file.c:ossl_check_X509_INFO_freefunc_type:
   75|  4.18k|    {                                                                                                                    \
   76|  4.18k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  4.18k|    }
t_x509.c:ossl_check_X509_sk_type:
   63|  89.4k|    {                                                                                                                    \
   64|  89.4k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  89.4k|    }                                                                                                                    \
t_x509.c:ossl_check_X509_freefunc_type:
   75|  89.4k|    {                                                                                                                    \
   76|  89.4k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  89.4k|    }
v3_lib.c:ossl_check_const_X509_EXTENSION_sk_type:
   59|  41.3M|    {                                                                                                                    \
   60|  41.3M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  41.3M|    }                                                                                                                    \
v3_purp.c:ossl_check_const_DIST_POINT_sk_type:
   59|   535k|    {                                                                                                                    \
   60|   535k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   535k|    }                                                                                                                    \
v3_purp.c:ossl_check_GENERAL_NAME_sk_type:
   63|   441k|    {                                                                                                                    \
   64|   441k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   441k|    }                                                                                                                    \
v3_purp.c:ossl_check_GENERAL_NAME_freefunc_type:
   75|   441k|    {                                                                                                                    \
   76|   441k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   441k|    }
v3_purp.c:ossl_check_DIST_POINT_sk_type:
   63|   441k|    {                                                                                                                    \
   64|   441k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   441k|    }                                                                                                                    \
v3_purp.c:ossl_check_DIST_POINT_freefunc_type:
   75|   441k|    {                                                                                                                    \
   76|   441k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   441k|    }
v3_purp.c:ossl_check_IPAddressFamily_sk_type:
   63|   441k|    {                                                                                                                    \
   64|   441k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   441k|    }                                                                                                                    \
v3_purp.c:ossl_check_IPAddressFamily_freefunc_type:
   75|   441k|    {                                                                                                                    \
   76|   441k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   441k|    }
x509_lu.c:ossl_check_X509_OBJECT_compfunc_type:
   67|   286k|    {                                                                                                                    \
   68|   286k|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|   286k|    }                                                                                                                    \
x509_lu.c:sk_X509_OBJECT_cmpfunc_thunk:
   47|   220k|    {                                                                                                                    \
   48|   220k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp); \
   49|   220k|        const t3 *const *at = (const t3 *const *)a;                                                                      \
   50|   220k|        const t3 *const *bt = (const t3 *const *)b;                                                                      \
   51|   220k|                                                                                                                         \
   52|   220k|        return realcmp(at, bt);                                                                                          \
   53|   220k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_sk_type:
   63|   789k|    {                                                                                                                    \
   64|   789k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   789k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_LOOKUP_sk_type:
   63|  8.33k|    {                                                                                                                    \
   64|  8.33k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  8.33k|    }                                                                                                                    \
x509_lu.c:ossl_check_const_X509_LOOKUP_sk_type:
   59|  41.4k|    {                                                                                                                    \
   60|  41.4k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  41.4k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_freefunc_type:
   75|   286k|    {                                                                                                                    \
   76|   286k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   286k|    }
x509_lu.c:ossl_check_X509_LOOKUP_type:
   55|  4.86k|    {                                                                                                                    \
   56|  4.86k|        return ptr;                                                                                                      \
   57|  4.86k|    }                                                                                                                    \
x509_lu.c:ossl_check_const_X509_OBJECT_sk_type:
   59|   441k|    {                                                                                                                    \
   60|   441k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   441k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_type:
   55|   503k|    {                                                                                                                    \
   56|   503k|        return ptr;                                                                                                      \
   57|   503k|    }                                                                                                                    \
x509_v3.c:ossl_check_const_X509_EXTENSION_sk_type:
   59|  4.94M|    {                                                                                                                    \
   60|  4.94M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  4.94M|    }                                                                                                                    \
x509_vpm.c:ossl_check_ASN1_OBJECT_sk_type:
   63|  9.41k|    {                                                                                                                    \
   64|  9.41k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  9.41k|    }                                                                                                                    \
x509_vpm.c:ossl_check_ASN1_OBJECT_freefunc_type:
   75|  9.41k|    {                                                                                                                    \
   76|  9.41k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  9.41k|    }
x509_vpm.c:sk_X509_BUFFER_pop_free:
  170|  37.6k|    {                                                                                                                      \
  171|  37.6k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  37.6k|                                                                                                                           \
  173|  37.6k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  37.6k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  37.6k|                                                                                                                           \
  176|  37.6k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  37.6k|    }                                                                                                                      \
x_name.c:sk_X509_NAME_ENTRY_freefunc_thunk:
   42|  7.13M|    {                                                                                                                    \
   43|  7.13M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|  7.13M|        freefunc((t3 *)ptr);                                                                                             \
   45|  7.13M|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_sk_type:
   63|  19.8M|    {                                                                                                                    \
   64|  19.8M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  19.8M|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_freefunc_type:
   75|  5.58M|    {                                                                                                                    \
   76|  5.58M|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  5.58M|    }
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_num:
   98|  4.57M|    {                                                                                                                      \
   99|  4.57M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  4.57M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_value:
  102|  3.56M|    {                                                                                                                      \
  103|  3.56M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  3.56M|    }                                                                                                                      \
x_name.c:ossl_check_const_X509_NAME_ENTRY_sk_type:
   59|  19.8M|    {                                                                                                                    \
   60|  19.8M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  19.8M|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_type:
   55|  10.7M|    {                                                                                                                    \
   56|  10.7M|        return ptr;                                                                                                      \
   57|  10.7M|    }                                                                                                                    \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_new_null:
  115|  1.01M|    {                                                                                                                      \
  116|  1.01M|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  1.01M|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  1.01M|                                                                                                                           \
  119|  1.01M|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  1.01M|                                                                                                                           \
  121|  1.01M|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  1.01M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_freefunc_thunk:
   85|  7.13M|    {                                                                                                                      \
   86|  7.13M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  7.13M|        freefunc((t3 *)ptr);                                                                                               \
   88|  7.13M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_push:
  154|  3.56M|    {                                                                                                                      \
  155|  3.56M|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  3.56M|    }                                                                                                                      \
x_name.c:ossl_check_const_ASN1_VALUE_sk_type:
   59|  16.2M|    {                                                                                                                    \
   60|  16.2M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  16.2M|    }                                                                                                                    \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_pop_free:
  170|  2.02M|    {                                                                                                                      \
  171|  2.02M|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  2.02M|                                                                                                                           \
  173|  2.02M|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  2.02M|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  2.02M|                                                                                                                           \
  176|  2.02M|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  2.02M|    }                                                                                                                      \
x_x509.c:ossl_check_IPAddressFamily_sk_type:
   63|  1.00M|    {                                                                                                                    \
   64|  1.00M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  1.00M|    }                                                                                                                    \
x_x509.c:ossl_check_IPAddressFamily_freefunc_type:
   75|  1.00M|    {                                                                                                                    \
   76|  1.00M|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  1.00M|    }
dso_dlfcn.c:ossl_check_const_void_sk_type:
   59|     92|    {                                                                                                                    \
   60|     92|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|     92|    }                                                                                                                    \
comp_methods.c:ossl_check_SSL_COMP_compfunc_type:
   67|    809|    {                                                                                                                    \
   68|    809|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|    809|    }                                                                                                                    \
comp_methods.c:ossl_check_SSL_COMP_sk_type:
   63|    808|    {                                                                                                                    \
   64|    808|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|    808|    }                                                                                                                    \
comp_methods.c:ossl_check_SSL_COMP_freefunc_type:
   75|    808|    {                                                                                                                    \
   76|    808|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|    808|    }

ossl_base_provider_init:
  140|    668|{
  141|    668|    OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;
  142|    668|    BIO_METHOD *corebiometh;
  143|       |
  144|    668|    if (!ossl_prov_bio_from_dispatch(in))
  ------------------
  |  Branch (144:9): [True: 0, False: 668]
  ------------------
  145|      0|        return 0;
  146|  36.0k|    for (; in->function_id != 0; in++) {
  ------------------
  |  Branch (146:12): [True: 35.4k, False: 668]
  ------------------
  147|  35.4k|        switch (in->function_id) {
  148|    668|        case OSSL_FUNC_CORE_GETTABLE_PARAMS:
  ------------------
  |  |   72|    668|#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
  ------------------
  |  Branch (148:9): [True: 668, False: 34.7k]
  ------------------
  149|    668|            c_gettable_params = OSSL_FUNC_core_gettable_params(in);
  150|    668|            break;
  151|    668|        case OSSL_FUNC_CORE_GET_PARAMS:
  ------------------
  |  |   75|    668|#define OSSL_FUNC_CORE_GET_PARAMS 2
  ------------------
  |  Branch (151:9): [True: 668, False: 34.7k]
  ------------------
  152|    668|            c_get_params = OSSL_FUNC_core_get_params(in);
  153|    668|            break;
  154|    668|        case OSSL_FUNC_CORE_GET_LIBCTX:
  ------------------
  |  |   79|    668|#define OSSL_FUNC_CORE_GET_LIBCTX 4
  ------------------
  |  Branch (154:9): [True: 668, False: 34.7k]
  ------------------
  155|    668|            c_get_libctx = OSSL_FUNC_core_get_libctx(in);
  156|    668|            break;
  157|  33.4k|        default:
  ------------------
  |  Branch (157:9): [True: 33.4k, False: 2.00k]
  ------------------
  158|       |            /* Just ignore anything we don't understand */
  159|  33.4k|            break;
  160|  35.4k|        }
  161|  35.4k|    }
  162|       |
  163|    668|    if (c_get_libctx == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 668]
  ------------------
  164|      0|        return 0;
  165|       |
  166|       |    /*
  167|       |     * We want to make sure that all calls from this provider that requires
  168|       |     * a library context use the same context as the one used to call our
  169|       |     * functions.  We do that by passing it along in the provider context.
  170|       |     *
  171|       |     * This only works for built-in providers.  Most providers should
  172|       |     * create their own library context.
  173|       |     */
  174|    668|    if ((*provctx = ossl_prov_ctx_new()) == NULL
  ------------------
  |  Branch (174:9): [True: 0, False: 668]
  ------------------
  175|    668|        || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) {
  ------------------
  |  Branch (175:12): [True: 0, False: 668]
  ------------------
  176|      0|        ossl_prov_ctx_free(*provctx);
  177|      0|        *provctx = NULL;
  178|      0|        return 0;
  179|      0|    }
  180|    668|    ossl_prov_ctx_set0_libctx(*provctx,
  181|    668|        (OSSL_LIB_CTX *)c_get_libctx(handle));
  182|    668|    ossl_prov_ctx_set0_handle(*provctx, handle);
  183|    668|    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
  184|    668|    ossl_prov_ctx_set0_core_get_params(*provctx, c_get_params);
  185|       |
  186|    668|    *out = base_dispatch_table;
  187|       |
  188|    668|    return 1;
  189|    668|}
baseprov.c:base_teardown:
  120|    668|{
  121|    668|    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
  122|    668|    ossl_prov_ctx_free(provctx);
  123|    668|}
baseprov.c:base_query:
  104|  47.1k|{
  105|  47.1k|    *no_cache = 0;
  106|  47.1k|    switch (operation_id) {
  ------------------
  |  Branch (106:13): [True: 1.11k, False: 46.0k]
  ------------------
  107|      0|    case OSSL_OP_ENCODER:
  ------------------
  |  |  295|      0|#define OSSL_OP_ENCODER 20
  ------------------
  |  Branch (107:5): [True: 0, False: 47.1k]
  ------------------
  108|      0|        return base_encoder;
  109|      0|    case OSSL_OP_DECODER:
  ------------------
  |  |  296|      0|#define OSSL_OP_DECODER 21
  ------------------
  |  Branch (109:5): [True: 0, False: 47.1k]
  ------------------
  110|      0|        return base_decoder;
  111|      0|    case OSSL_OP_STORE:
  ------------------
  |  |  297|      0|#define OSSL_OP_STORE 22
  ------------------
  |  Branch (111:5): [True: 0, False: 47.1k]
  ------------------
  112|      0|        return base_store;
  113|  1.11k|    case OSSL_OP_RAND:
  ------------------
  |  |  287|  1.11k|#define OSSL_OP_RAND 5
  ------------------
  |  Branch (113:5): [True: 1.11k, False: 46.0k]
  ------------------
  114|  1.11k|        return base_rands;
  115|  47.1k|    }
  116|  46.0k|    return NULL;
  117|  47.1k|}

ossl_prov_bio_from_dispatch:
   27|  1.47k|{
   28|  79.7k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (28:12): [True: 78.2k, False: 1.47k]
  ------------------
   29|  78.2k|        switch (fns->function_id) {
  ------------------
  |  Branch (29:17): [True: 14.7k, False: 63.5k]
  ------------------
   30|  1.47k|        case OSSL_FUNC_BIO_NEW_FILE:
  ------------------
  |  |  151|  1.47k|#define OSSL_FUNC_BIO_NEW_FILE 40
  ------------------
  |  Branch (30:9): [True: 1.47k, False: 76.8k]
  ------------------
   31|  1.47k|            if (c_bio_new_file == NULL)
  ------------------
  |  Branch (31:17): [True: 1, False: 1.47k]
  ------------------
   32|      1|                c_bio_new_file = OSSL_FUNC_BIO_new_file(fns);
   33|  1.47k|            break;
   34|  1.47k|        case OSSL_FUNC_BIO_NEW_MEMBUF:
  ------------------
  |  |  152|  1.47k|#define OSSL_FUNC_BIO_NEW_MEMBUF 41
  ------------------
  |  Branch (34:9): [True: 1.47k, False: 76.8k]
  ------------------
   35|  1.47k|            if (c_bio_new_membuf == NULL)
  ------------------
  |  Branch (35:17): [True: 1, False: 1.47k]
  ------------------
   36|      1|                c_bio_new_membuf = OSSL_FUNC_BIO_new_membuf(fns);
   37|  1.47k|            break;
   38|  1.47k|        case OSSL_FUNC_BIO_READ_EX:
  ------------------
  |  |  153|  1.47k|#define OSSL_FUNC_BIO_READ_EX 42
  ------------------
  |  Branch (38:9): [True: 1.47k, False: 76.8k]
  ------------------
   39|  1.47k|            if (c_bio_read_ex == NULL)
  ------------------
  |  Branch (39:17): [True: 1, False: 1.47k]
  ------------------
   40|      1|                c_bio_read_ex = OSSL_FUNC_BIO_read_ex(fns);
   41|  1.47k|            break;
   42|  1.47k|        case OSSL_FUNC_BIO_WRITE_EX:
  ------------------
  |  |  154|  1.47k|#define OSSL_FUNC_BIO_WRITE_EX 43
  ------------------
  |  Branch (42:9): [True: 1.47k, False: 76.8k]
  ------------------
   43|  1.47k|            if (c_bio_write_ex == NULL)
  ------------------
  |  Branch (43:17): [True: 1, False: 1.47k]
  ------------------
   44|      1|                c_bio_write_ex = OSSL_FUNC_BIO_write_ex(fns);
   45|  1.47k|            break;
   46|  1.47k|        case OSSL_FUNC_BIO_GETS:
  ------------------
  |  |  160|  1.47k|#define OSSL_FUNC_BIO_GETS 49
  ------------------
  |  Branch (46:9): [True: 1.47k, False: 76.8k]
  ------------------
   47|  1.47k|            if (c_bio_gets == NULL)
  ------------------
  |  Branch (47:17): [True: 1, False: 1.47k]
  ------------------
   48|      1|                c_bio_gets = OSSL_FUNC_BIO_gets(fns);
   49|  1.47k|            break;
   50|  1.47k|        case OSSL_FUNC_BIO_PUTS:
  ------------------
  |  |  159|  1.47k|#define OSSL_FUNC_BIO_PUTS 48
  ------------------
  |  Branch (50:9): [True: 1.47k, False: 76.8k]
  ------------------
   51|  1.47k|            if (c_bio_puts == NULL)
  ------------------
  |  Branch (51:17): [True: 1, False: 1.47k]
  ------------------
   52|      1|                c_bio_puts = OSSL_FUNC_BIO_puts(fns);
   53|  1.47k|            break;
   54|  1.47k|        case OSSL_FUNC_BIO_CTRL:
  ------------------
  |  |  161|  1.47k|#define OSSL_FUNC_BIO_CTRL 50
  ------------------
  |  Branch (54:9): [True: 1.47k, False: 76.8k]
  ------------------
   55|  1.47k|            if (c_bio_ctrl == NULL)
  ------------------
  |  Branch (55:17): [True: 1, False: 1.47k]
  ------------------
   56|      1|                c_bio_ctrl = OSSL_FUNC_BIO_ctrl(fns);
   57|  1.47k|            break;
   58|  1.47k|        case OSSL_FUNC_BIO_UP_REF:
  ------------------
  |  |  155|  1.47k|#define OSSL_FUNC_BIO_UP_REF 44
  ------------------
  |  Branch (58:9): [True: 1.47k, False: 76.8k]
  ------------------
   59|  1.47k|            if (c_bio_up_ref == NULL)
  ------------------
  |  Branch (59:17): [True: 1, False: 1.47k]
  ------------------
   60|      1|                c_bio_up_ref = OSSL_FUNC_BIO_up_ref(fns);
   61|  1.47k|            break;
   62|  1.47k|        case OSSL_FUNC_BIO_FREE:
  ------------------
  |  |  156|  1.47k|#define OSSL_FUNC_BIO_FREE 45
  ------------------
  |  Branch (62:9): [True: 1.47k, False: 76.8k]
  ------------------
   63|  1.47k|            if (c_bio_free == NULL)
  ------------------
  |  Branch (63:17): [True: 1, False: 1.47k]
  ------------------
   64|      1|                c_bio_free = OSSL_FUNC_BIO_free(fns);
   65|  1.47k|            break;
   66|  1.47k|        case OSSL_FUNC_BIO_VPRINTF:
  ------------------
  |  |  157|  1.47k|#define OSSL_FUNC_BIO_VPRINTF 46
  ------------------
  |  Branch (66:9): [True: 1.47k, False: 76.8k]
  ------------------
   67|  1.47k|            if (c_bio_vprintf == NULL)
  ------------------
  |  Branch (67:17): [True: 1, False: 1.47k]
  ------------------
   68|      1|                c_bio_vprintf = OSSL_FUNC_BIO_vprintf(fns);
   69|  1.47k|            break;
   70|  78.2k|        }
   71|  78.2k|    }
   72|       |
   73|  1.47k|    return 1;
   74|  1.47k|}
ossl_prov_bio_read_ex:
   92|  2.70M|{
   93|  2.70M|    if (c_bio_read_ex == NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 2.70M]
  ------------------
   94|      0|        return 0;
   95|  2.70M|    return c_bio_read_ex(bio, data, data_len, bytes_read);
   96|  2.70M|}
ossl_prov_bio_up_ref:
  128|  1.00M|{
  129|  1.00M|    if (c_bio_up_ref == NULL)
  ------------------
  |  Branch (129:9): [True: 0, False: 1.00M]
  ------------------
  130|      0|        return 0;
  131|  1.00M|    return c_bio_up_ref(bio);
  132|  1.00M|}
ossl_prov_bio_free:
  135|  1.00M|{
  136|  1.00M|    if (c_bio_free == NULL)
  ------------------
  |  Branch (136:9): [True: 0, False: 1.00M]
  ------------------
  137|      0|        return 0;
  138|  1.00M|    return c_bio_free(bio);
  139|  1.00M|}
ossl_bio_prov_init_bio_method:
  207|  1.47k|{
  208|  1.47k|    BIO_METHOD *corebiometh = NULL;
  209|       |
  210|  1.47k|    corebiometh = BIO_meth_new(BIO_TYPE_CORE_TO_PROV, "BIO to Core filter");
  ------------------
  |  |   71|  1.47k|#define BIO_TYPE_CORE_TO_PROV (25 | BIO_TYPE_SOURCE_SINK)
  |  |  ------------------
  |  |  |  |   43|  1.47k|#define BIO_TYPE_SOURCE_SINK 0x0400
  |  |  ------------------
  ------------------
  211|  1.47k|    if (corebiometh == NULL
  ------------------
  |  Branch (211:9): [True: 0, False: 1.47k]
  ------------------
  212|  1.47k|        || !BIO_meth_set_write_ex(corebiometh, bio_core_write_ex)
  ------------------
  |  Branch (212:12): [True: 0, False: 1.47k]
  ------------------
  213|  1.47k|        || !BIO_meth_set_read_ex(corebiometh, bio_core_read_ex)
  ------------------
  |  Branch (213:12): [True: 0, False: 1.47k]
  ------------------
  214|  1.47k|        || !BIO_meth_set_puts(corebiometh, bio_core_puts)
  ------------------
  |  Branch (214:12): [True: 0, False: 1.47k]
  ------------------
  215|  1.47k|        || !BIO_meth_set_gets(corebiometh, bio_core_gets)
  ------------------
  |  Branch (215:12): [True: 0, False: 1.47k]
  ------------------
  216|  1.47k|        || !BIO_meth_set_ctrl(corebiometh, bio_core_ctrl)
  ------------------
  |  Branch (216:12): [True: 0, False: 1.47k]
  ------------------
  217|  1.47k|        || !BIO_meth_set_create(corebiometh, bio_core_new)
  ------------------
  |  Branch (217:12): [True: 0, False: 1.47k]
  ------------------
  218|  1.47k|        || !BIO_meth_set_destroy(corebiometh, bio_core_free)) {
  ------------------
  |  Branch (218:12): [True: 0, False: 1.47k]
  ------------------
  219|      0|        BIO_meth_free(corebiometh);
  220|      0|        return NULL;
  221|      0|    }
  222|       |
  223|  1.47k|    return corebiometh;
  224|  1.47k|}
ossl_bio_new_from_core_bio:
  227|  1.00M|{
  228|  1.00M|    BIO *outbio;
  229|  1.00M|    BIO_METHOD *corebiometh = ossl_prov_ctx_get0_core_bio_method(provctx);
  230|       |
  231|  1.00M|    if (corebiometh == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 1.00M]
  ------------------
  232|      0|        return NULL;
  233|       |
  234|  1.00M|    if ((outbio = BIO_new(corebiometh)) == NULL)
  ------------------
  |  Branch (234:9): [True: 0, False: 1.00M]
  ------------------
  235|      0|        return NULL;
  236|  1.00M|    if (!ossl_prov_bio_up_ref(corebio)) {
  ------------------
  |  Branch (236:9): [True: 0, False: 1.00M]
  ------------------
  237|      0|        BIO_free(outbio);
  238|      0|        return NULL;
  239|      0|    }
  240|  1.00M|    BIO_set_data(outbio, corebio);
  241|  1.00M|    return outbio;
  242|  1.00M|}
bio_prov.c:bio_core_read_ex:
  166|  2.70M|{
  167|  2.70M|    return ossl_prov_bio_read_ex(BIO_get_data(bio), data, data_len, bytes_read);
  168|  2.70M|}
bio_prov.c:bio_core_new:
  192|  1.00M|{
  193|  1.00M|    BIO_set_init(bio, 1);
  194|       |
  195|  1.00M|    return 1;
  196|  1.00M|}
bio_prov.c:bio_core_free:
  199|  1.00M|{
  200|  1.00M|    BIO_set_init(bio, 0);
  201|  1.00M|    ossl_prov_bio_free(BIO_get_data(bio));
  202|       |
  203|  1.00M|    return 1;
  204|  1.00M|}

ossl_prov_get_capabilities:
  352|  6.94k|{
  353|  6.94k|    if (OPENSSL_strcasecmp(capability, "TLS-GROUP") == 0)
  ------------------
  |  Branch (353:9): [True: 3.47k, False: 3.47k]
  ------------------
  354|  3.47k|        return tls_group_capability(cb, arg);
  355|  3.47k|    if (OPENSSL_strcasecmp(capability, "TLS-SIGALG") == 0)
  ------------------
  |  Branch (355:9): [True: 3.47k, False: 0]
  ------------------
  356|  3.47k|        return tls_sigalg_capability(cb, arg);
  357|       |
  358|       |    /* We don't support this capability */
  359|      0|    return 0;
  360|  3.47k|}
capabilities.c:tls_group_capability:
  270|  3.47k|{
  271|  3.47k|#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ML_KEM)
  272|  3.47k|    size_t i;
  273|       |
  274|  97.1k|    for (i = 0; i < OSSL_NELEM(param_group_list); i++)
  ------------------
  |  |   14|  97.1k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (274:17): [True: 93.6k, False: 3.47k]
  ------------------
  275|  93.6k|        if (!cb(param_group_list[i], arg))
  ------------------
  |  Branch (275:13): [True: 0, False: 93.6k]
  ------------------
  276|      0|            return 0;
  277|  3.47k|#endif
  278|       |
  279|  3.47k|    return 1;
  280|  3.47k|}
capabilities.c:tls_sigalg_capability:
  339|  3.47k|{
  340|  3.47k|#if defined(TLS_SIGALG_ENTRY)
  341|  3.47k|    size_t i;
  342|       |
  343|  17.3k|    for (i = 0; i < OSSL_NELEM(param_sigalg_list); i++)
  ------------------
  |  |   14|  17.3k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (343:17): [True: 13.8k, False: 3.47k]
  ------------------
  344|  13.8k|        if (!cb(param_sigalg_list[i], arg))
  ------------------
  |  Branch (344:13): [True: 0, False: 13.8k]
  ------------------
  345|      0|            return 0;
  346|  3.47k|#endif
  347|  3.47k|    return 1;
  348|  3.47k|}

ciphercommon.c:ossl_param_is_empty:
   30|   121k|{
   31|   121k|    return params == NULL || params->key == NULL;
  ------------------
  |  Branch (31:12): [True: 121k, False: 0]
  |  Branch (31:30): [True: 0, False: 0]
  ------------------
   32|   121k|}

ossl_prov_ctx_new:
   16|  1.47k|{
   17|  1.47k|    return OPENSSL_zalloc(sizeof(PROV_CTX));
  ------------------
  |  |  109|  1.47k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   18|  1.47k|}
ossl_prov_ctx_free:
   21|  1.47k|{
   22|  1.47k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  1.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   23|  1.47k|}
ossl_prov_ctx_set0_libctx:
   26|  1.47k|{
   27|  1.47k|    if (ctx != NULL)
  ------------------
  |  Branch (27:9): [True: 1.47k, False: 0]
  ------------------
   28|  1.47k|        ctx->libctx = libctx;
   29|  1.47k|}
ossl_prov_ctx_set0_handle:
   32|  1.47k|{
   33|  1.47k|    if (ctx != NULL)
  ------------------
  |  Branch (33:9): [True: 1.47k, False: 0]
  ------------------
   34|  1.47k|        ctx->handle = handle;
   35|  1.47k|}
ossl_prov_ctx_set0_core_bio_method:
   38|  1.47k|{
   39|  1.47k|    if (ctx != NULL)
  ------------------
  |  Branch (39:9): [True: 1.47k, False: 0]
  ------------------
   40|  1.47k|        ctx->corebiometh = corebiometh;
   41|  1.47k|}
ossl_prov_ctx_set0_core_get_params:
   45|  1.47k|{
   46|  1.47k|    if (ctx != NULL)
  ------------------
  |  Branch (46:9): [True: 1.47k, False: 0]
  ------------------
   47|  1.47k|        ctx->core_get_params = c_get_params;
   48|  1.47k|}
ossl_prov_ctx_get0_libctx:
   51|  1.02M|{
   52|  1.02M|    if (ctx == NULL)
  ------------------
  |  Branch (52:9): [True: 0, False: 1.02M]
  ------------------
   53|      0|        return NULL;
   54|  1.02M|    return ctx->libctx;
   55|  1.02M|}
ossl_prov_ctx_get0_core_bio_method:
   65|  1.00M|{
   66|  1.00M|    if (ctx == NULL)
  ------------------
  |  Branch (66:9): [True: 0, False: 1.00M]
  ------------------
   67|      0|        return NULL;
   68|  1.00M|    return ctx->corebiometh;
   69|  1.00M|}
ossl_prov_ctx_get_param:
   80|  6.28k|{
   81|  6.28k|    char *val = NULL;
   82|  6.28k|    OSSL_PARAM param[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  6.28k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM param[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  6.28k|    { NULL, 0, NULL, 0, 0 }
  ------------------
   83|       |
   84|  6.28k|    if (ctx == NULL
  ------------------
  |  Branch (84:9): [True: 0, False: 6.28k]
  ------------------
   85|  6.28k|        || ctx->handle == NULL
  ------------------
  |  Branch (85:12): [True: 0, False: 6.28k]
  ------------------
   86|  6.28k|        || ctx->core_get_params == NULL)
  ------------------
  |  Branch (86:12): [True: 0, False: 6.28k]
  ------------------
   87|      0|        return defval;
   88|       |
   89|  6.28k|    param[0].key = (char *)name;
   90|  6.28k|    param[0].data_type = OSSL_PARAM_UTF8_PTR;
  ------------------
  |  |  141|  6.28k|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
   91|  6.28k|    param[0].data = (void *)&val;
   92|  6.28k|    param[0].data_size = sizeof(val);
   93|  6.28k|    param[0].return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  6.28k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
   94|       |
   95|       |    /* Errors are ignored, returning the default value */
   96|  6.28k|    if (ctx->core_get_params(ctx->handle, param)
  ------------------
  |  Branch (96:9): [True: 6.28k, False: 0]
  ------------------
   97|  6.28k|        && OSSL_PARAM_modified(param)
  ------------------
  |  Branch (97:12): [True: 0, False: 6.28k]
  ------------------
   98|      0|        && val != NULL)
  ------------------
  |  Branch (98:12): [True: 0, False: 0]
  ------------------
   99|      0|        return val;
  100|  6.28k|    return defval;
  101|  6.28k|}
ossl_prov_ctx_get_bool_param:
  104|  4.19k|{
  105|  4.19k|    const char *val = ossl_prov_ctx_get_param(ctx, name, NULL);
  106|       |
  107|  4.19k|    if (val != NULL) {
  ------------------
  |  Branch (107:9): [True: 0, False: 4.19k]
  ------------------
  108|      0|        if ((strcmp(val, "1") == 0)
  ------------------
  |  Branch (108:13): [True: 0, False: 0]
  ------------------
  109|      0|            || (OPENSSL_strcasecmp(val, "yes") == 0)
  ------------------
  |  Branch (109:16): [True: 0, False: 0]
  ------------------
  110|      0|            || (OPENSSL_strcasecmp(val, "true") == 0)
  ------------------
  |  Branch (110:16): [True: 0, False: 0]
  ------------------
  111|      0|            || (OPENSSL_strcasecmp(val, "on") == 0))
  ------------------
  |  Branch (111:16): [True: 0, False: 0]
  ------------------
  112|      0|            return 1;
  113|      0|        else if ((strcmp(val, "0") == 0)
  ------------------
  |  Branch (113:18): [True: 0, False: 0]
  ------------------
  114|      0|            || (OPENSSL_strcasecmp(val, "no") == 0)
  ------------------
  |  Branch (114:16): [True: 0, False: 0]
  ------------------
  115|      0|            || (OPENSSL_strcasecmp(val, "false") == 0)
  ------------------
  |  Branch (115:16): [True: 0, False: 0]
  ------------------
  116|      0|            || (OPENSSL_strcasecmp(val, "off") == 0))
  ------------------
  |  Branch (116:16): [True: 0, False: 0]
  ------------------
  117|      0|            return 0;
  118|      0|    }
  119|  4.19k|    return defval;
  120|  4.19k|}

ossl_err_load_PROV_strings:
  273|      1|{
  274|      1|#ifndef OPENSSL_NO_ERR
  275|      1|    if (ERR_reason_error_string(PROV_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (275:9): [True: 1, False: 0]
  ------------------
  276|      1|        ERR_load_strings_const(PROV_str_reasons);
  277|      1|#endif
  278|      1|    return 1;
  279|      1|}

ossl_prov_seeding_from_dispatch:
   42|    809|{
   43|  43.6k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (43:12): [True: 42.8k, False: 809]
  ------------------
   44|       |        /*
   45|       |         * We do not support the scenario of an application linked against
   46|       |         * multiple versions of libcrypto (e.g. one static and one dynamic), but
   47|       |         * sharing a single fips.so. We do a simple sanity check here.
   48|       |         */
   49|  42.8k|#define set_func(c, f)   \
   50|  42.8k|    do {                 \
   51|  42.8k|        if (c == NULL)   \
   52|  42.8k|            c = f;       \
   53|  42.8k|        else if (c != f) \
   54|  42.8k|            return 0;    \
   55|  42.8k|    } while (0)
   56|  42.8k|        switch (fns->function_id) {
  ------------------
  |  Branch (56:17): [True: 6.47k, False: 36.4k]
  ------------------
   57|    809|        case OSSL_FUNC_GET_ENTROPY:
  ------------------
  |  |  188|    809|#define OSSL_FUNC_GET_ENTROPY 101
  ------------------
  |  Branch (57:9): [True: 809, False: 42.0k]
  ------------------
   58|    809|            set_func(c_get_entropy, OSSL_FUNC_get_entropy(fns));
  ------------------
  |  |   50|    809|    do {                 \
  |  |   51|    809|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 808]
  |  |  ------------------
  |  |   52|    809|            c = f;       \
  |  |   53|    809|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 808]
  |  |  ------------------
  |  |   54|    808|            return 0;    \
  |  |   55|    809|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 809]
  |  |  ------------------
  ------------------
   59|    809|            break;
   60|    809|        case OSSL_FUNC_GET_USER_ENTROPY:
  ------------------
  |  |  179|    809|#define OSSL_FUNC_GET_USER_ENTROPY 98
  ------------------
  |  Branch (60:9): [True: 809, False: 42.0k]
  ------------------
   61|    809|            set_func(c_get_user_entropy, OSSL_FUNC_get_user_entropy(fns));
  ------------------
  |  |   50|    809|    do {                 \
  |  |   51|    809|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 808]
  |  |  ------------------
  |  |   52|    809|            c = f;       \
  |  |   53|    809|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 808]
  |  |  ------------------
  |  |   54|    808|            return 0;    \
  |  |   55|    809|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 809]
  |  |  ------------------
  ------------------
   62|    809|            break;
   63|    809|        case OSSL_FUNC_CLEANUP_ENTROPY:
  ------------------
  |  |  189|    809|#define OSSL_FUNC_CLEANUP_ENTROPY 102
  ------------------
  |  Branch (63:9): [True: 809, False: 42.0k]
  ------------------
   64|    809|            set_func(c_cleanup_entropy, OSSL_FUNC_cleanup_entropy(fns));
  ------------------
  |  |   50|    809|    do {                 \
  |  |   51|    809|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 808]
  |  |  ------------------
  |  |   52|    809|            c = f;       \
  |  |   53|    809|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 808]
  |  |  ------------------
  |  |   54|    808|            return 0;    \
  |  |   55|    809|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 809]
  |  |  ------------------
  ------------------
   65|    809|            break;
   66|    809|        case OSSL_FUNC_CLEANUP_USER_ENTROPY:
  ------------------
  |  |  177|    809|#define OSSL_FUNC_CLEANUP_USER_ENTROPY 96
  ------------------
  |  Branch (66:9): [True: 809, False: 42.0k]
  ------------------
   67|    809|            set_func(c_cleanup_user_entropy, OSSL_FUNC_cleanup_user_entropy(fns));
  ------------------
  |  |   50|    809|    do {                 \
  |  |   51|    809|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 808]
  |  |  ------------------
  |  |   52|    809|            c = f;       \
  |  |   53|    809|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 808]
  |  |  ------------------
  |  |   54|    808|            return 0;    \
  |  |   55|    809|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 809]
  |  |  ------------------
  ------------------
   68|    809|            break;
   69|    809|        case OSSL_FUNC_GET_NONCE:
  ------------------
  |  |  190|    809|#define OSSL_FUNC_GET_NONCE 103
  ------------------
  |  Branch (69:9): [True: 809, False: 42.0k]
  ------------------
   70|    809|            set_func(c_get_nonce, OSSL_FUNC_get_nonce(fns));
  ------------------
  |  |   50|    809|    do {                 \
  |  |   51|    809|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 808]
  |  |  ------------------
  |  |   52|    809|            c = f;       \
  |  |   53|    809|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 808]
  |  |  ------------------
  |  |   54|    808|            return 0;    \
  |  |   55|    809|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 809]
  |  |  ------------------
  ------------------
   71|    809|            break;
   72|    809|        case OSSL_FUNC_GET_USER_NONCE:
  ------------------
  |  |  180|    809|#define OSSL_FUNC_GET_USER_NONCE 99
  ------------------
  |  Branch (72:9): [True: 809, False: 42.0k]
  ------------------
   73|    809|            set_func(c_get_user_nonce, OSSL_FUNC_get_user_nonce(fns));
  ------------------
  |  |   50|    809|    do {                 \
  |  |   51|    809|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 808]
  |  |  ------------------
  |  |   52|    809|            c = f;       \
  |  |   53|    809|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 808]
  |  |  ------------------
  |  |   54|    808|            return 0;    \
  |  |   55|    809|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 809]
  |  |  ------------------
  ------------------
   74|    809|            break;
   75|    809|        case OSSL_FUNC_CLEANUP_NONCE:
  ------------------
  |  |  191|    809|#define OSSL_FUNC_CLEANUP_NONCE 104
  ------------------
  |  Branch (75:9): [True: 809, False: 42.0k]
  ------------------
   76|    809|            set_func(c_cleanup_nonce, OSSL_FUNC_cleanup_nonce(fns));
  ------------------
  |  |   50|    809|    do {                 \
  |  |   51|    809|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 808]
  |  |  ------------------
  |  |   52|    809|            c = f;       \
  |  |   53|    809|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 808]
  |  |  ------------------
  |  |   54|    808|            return 0;    \
  |  |   55|    809|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 809]
  |  |  ------------------
  ------------------
   77|    809|            break;
   78|    809|        case OSSL_FUNC_CLEANUP_USER_NONCE:
  ------------------
  |  |  178|    809|#define OSSL_FUNC_CLEANUP_USER_NONCE 97
  ------------------
  |  Branch (78:9): [True: 809, False: 42.0k]
  ------------------
   79|    809|            set_func(c_cleanup_user_nonce, OSSL_FUNC_cleanup_user_nonce(fns));
  ------------------
  |  |   50|    809|    do {                 \
  |  |   51|    809|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 808]
  |  |  ------------------
  |  |   52|    809|            c = f;       \
  |  |   53|    809|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 808]
  |  |  ------------------
  |  |   54|    808|            return 0;    \
  |  |   55|    809|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 809]
  |  |  ------------------
  ------------------
   80|    809|            break;
   81|  42.8k|        }
   82|  42.8k|#undef set_func
   83|  42.8k|    }
   84|    809|    return 1;
   85|    809|}

ossl_prov_cache_exported_algorithms:
  221|    809|{
  222|    809|    int i, j;
  223|       |
  224|    809|    if (out[0].algorithm_names == NULL) {
  ------------------
  |  Branch (224:9): [True: 1, False: 808]
  ------------------
  225|    140|        for (i = j = 0; in[i].alg.algorithm_names != NULL; ++i) {
  ------------------
  |  Branch (225:25): [True: 139, False: 1]
  ------------------
  226|    139|            if (in[i].capable == NULL || in[i].capable())
  ------------------
  |  Branch (226:17): [True: 126, False: 13]
  |  Branch (226:42): [True: 4, False: 9]
  ------------------
  227|    130|                out[j++] = in[i].alg;
  228|    139|        }
  229|      1|        out[j++] = in[i].alg;
  230|      1|    }
  231|    809|}

ossl_default_provider_init:
  797|    809|{
  798|    809|    OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;
  799|    809|    BIO_METHOD *corebiometh;
  800|       |
  801|    809|    if (!ossl_prov_bio_from_dispatch(in)
  ------------------
  |  Branch (801:9): [True: 0, False: 809]
  ------------------
  802|    809|        || !ossl_prov_seeding_from_dispatch(in))
  ------------------
  |  Branch (802:12): [True: 0, False: 809]
  ------------------
  803|      0|        return 0;
  804|  43.6k|    for (; in->function_id != 0; in++) {
  ------------------
  |  Branch (804:12): [True: 42.8k, False: 809]
  ------------------
  805|  42.8k|        switch (in->function_id) {
  806|    809|        case OSSL_FUNC_CORE_GETTABLE_PARAMS:
  ------------------
  |  |   72|    809|#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
  ------------------
  |  Branch (806:9): [True: 809, False: 42.0k]
  ------------------
  807|    809|            c_gettable_params = OSSL_FUNC_core_gettable_params(in);
  808|    809|            break;
  809|    809|        case OSSL_FUNC_CORE_GET_PARAMS:
  ------------------
  |  |   75|    809|#define OSSL_FUNC_CORE_GET_PARAMS 2
  ------------------
  |  Branch (809:9): [True: 809, False: 42.0k]
  ------------------
  810|    809|            c_get_params = OSSL_FUNC_core_get_params(in);
  811|    809|            break;
  812|    809|        case OSSL_FUNC_CORE_GET_LIBCTX:
  ------------------
  |  |   79|    809|#define OSSL_FUNC_CORE_GET_LIBCTX 4
  ------------------
  |  Branch (812:9): [True: 809, False: 42.0k]
  ------------------
  813|    809|            c_get_libctx = OSSL_FUNC_core_get_libctx(in);
  814|    809|            break;
  815|  40.4k|        default:
  ------------------
  |  Branch (815:9): [True: 40.4k, False: 2.42k]
  ------------------
  816|       |            /* Just ignore anything we don't understand */
  817|  40.4k|            break;
  818|  42.8k|        }
  819|  42.8k|    }
  820|       |
  821|    809|    if (c_get_libctx == NULL)
  ------------------
  |  Branch (821:9): [True: 0, False: 809]
  ------------------
  822|      0|        return 0;
  823|       |
  824|       |    /*
  825|       |     * We want to make sure that all calls from this provider that requires
  826|       |     * a library context use the same context as the one used to call our
  827|       |     * functions.  We do that by passing it along in the provider context.
  828|       |     *
  829|       |     * This only works for built-in providers.  Most providers should
  830|       |     * create their own library context.
  831|       |     */
  832|    809|    if ((*provctx = ossl_prov_ctx_new()) == NULL
  ------------------
  |  Branch (832:9): [True: 0, False: 809]
  ------------------
  833|    809|        || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) {
  ------------------
  |  Branch (833:12): [True: 0, False: 809]
  ------------------
  834|      0|        ossl_prov_ctx_free(*provctx);
  835|      0|        *provctx = NULL;
  836|      0|        return 0;
  837|      0|    }
  838|    809|    ossl_prov_ctx_set0_libctx(*provctx,
  839|    809|        (OSSL_LIB_CTX *)c_get_libctx(handle));
  840|    809|    ossl_prov_ctx_set0_handle(*provctx, handle);
  841|    809|    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
  842|    809|    ossl_prov_ctx_set0_core_get_params(*provctx, c_get_params);
  843|       |
  844|    809|    *out = deflt_dispatch_table;
  845|    809|    ossl_prov_cache_exported_algorithms(deflt_ciphers, exported_ciphers);
  846|       |
  847|    809|    return 1;
  848|    809|}
defltprov.c:deflt_teardown:
  775|    808|{
  776|    808|    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
  777|    808|    ossl_prov_ctx_free(provctx);
  778|    808|}
defltprov.c:deflt_query:
  739|  95.9k|{
  740|  95.9k|    *no_cache = 0;
  741|  95.9k|    switch (operation_id) {
  ------------------
  |  Branch (741:13): [True: 95.9k, False: 0]
  ------------------
  742|  32.0k|    case OSSL_OP_DIGEST:
  ------------------
  |  |  283|  32.0k|#define OSSL_OP_DIGEST 1
  ------------------
  |  Branch (742:5): [True: 32.0k, False: 63.8k]
  ------------------
  743|  32.0k|        return deflt_digests;
  744|  42.5k|    case OSSL_OP_CIPHER:
  ------------------
  |  |  284|  42.5k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
  |  Branch (744:5): [True: 42.5k, False: 53.3k]
  ------------------
  745|  42.5k|        return exported_ciphers;
  746|      0|    case OSSL_OP_MAC:
  ------------------
  |  |  285|      0|#define OSSL_OP_MAC 3
  ------------------
  |  Branch (746:5): [True: 0, False: 95.9k]
  ------------------
  747|      0|        return deflt_macs;
  748|      0|    case OSSL_OP_KDF:
  ------------------
  |  |  286|      0|#define OSSL_OP_KDF 4
  ------------------
  |  Branch (748:5): [True: 0, False: 95.9k]
  ------------------
  749|      0|        return deflt_kdfs;
  750|  1.19k|    case OSSL_OP_RAND:
  ------------------
  |  |  287|  1.19k|#define OSSL_OP_RAND 5
  ------------------
  |  Branch (750:5): [True: 1.19k, False: 94.7k]
  ------------------
  751|  1.19k|        return deflt_rands;
  752|  17.2k|    case OSSL_OP_KEYMGMT:
  ------------------
  |  |  288|  17.2k|#define OSSL_OP_KEYMGMT 10
  ------------------
  |  Branch (752:5): [True: 17.2k, False: 78.6k]
  ------------------
  753|  17.2k|        return deflt_keymgmt;
  754|  1.41k|    case OSSL_OP_KEYEXCH:
  ------------------
  |  |  289|  1.41k|#define OSSL_OP_KEYEXCH 11
  ------------------
  |  Branch (754:5): [True: 1.41k, False: 94.5k]
  ------------------
  755|  1.41k|        return deflt_keyexch;
  756|  1.41k|    case OSSL_OP_SIGNATURE:
  ------------------
  |  |  290|  1.41k|#define OSSL_OP_SIGNATURE 12
  ------------------
  |  Branch (756:5): [True: 1.41k, False: 94.5k]
  ------------------
  757|  1.41k|        return deflt_signature;
  758|      0|    case OSSL_OP_ASYM_CIPHER:
  ------------------
  |  |  291|      0|#define OSSL_OP_ASYM_CIPHER 13
  ------------------
  |  Branch (758:5): [True: 0, False: 95.9k]
  ------------------
  759|      0|        return deflt_asym_cipher;
  760|      0|    case OSSL_OP_KEM:
  ------------------
  |  |  292|      0|#define OSSL_OP_KEM 14
  ------------------
  |  Branch (760:5): [True: 0, False: 95.9k]
  ------------------
  761|      0|        return deflt_asym_kem;
  762|      0|    case OSSL_OP_ENCODER:
  ------------------
  |  |  295|      0|#define OSSL_OP_ENCODER 20
  ------------------
  |  Branch (762:5): [True: 0, False: 95.9k]
  ------------------
  763|      0|        return deflt_encoder;
  764|      4|    case OSSL_OP_DECODER:
  ------------------
  |  |  296|      4|#define OSSL_OP_DECODER 21
  ------------------
  |  Branch (764:5): [True: 4, False: 95.9k]
  ------------------
  765|      4|        return deflt_decoder;
  766|      0|    case OSSL_OP_STORE:
  ------------------
  |  |  297|      0|#define OSSL_OP_STORE 22
  ------------------
  |  Branch (766:5): [True: 0, False: 95.9k]
  ------------------
  767|      0|        return deflt_store;
  768|      0|    case OSSL_OP_SKEYMGMT:
  ------------------
  |  |  293|      0|#define OSSL_OP_SKEYMGMT 15
  ------------------
  |  Branch (768:5): [True: 0, False: 95.9k]
  ------------------
  769|      0|        return deflt_skeymgmt;
  770|  95.9k|    }
  771|      0|    return NULL;
  772|  95.9k|}

cipher_aes.c:aes_freectx:
   28|  5.35k|{
   29|  5.35k|    PROV_AES_CTX *ctx = (PROV_AES_CTX *)vctx;
   30|       |
   31|  5.35k|    ossl_cipher_generic_reset_ctx((PROV_CIPHER_CTX *)vctx);
   32|  5.35k|    OPENSSL_clear_free(ctx, sizeof(*ctx));
  ------------------
  |  |  130|  5.35k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|  5.35k|}

cipher_aes_cbc_hmac_sha.c:aes_128_cbc_hmac_sha1_get_params:
  384|    709|    {                                                                               \
  385|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  386|    709|            flags, kbits, blkbits, ivbits);                                         \
  387|    709|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_gettable_ctx_params:
  266|  2.83k|{
  267|  2.83k|    return aes_cbc_hmac_sha_get_ctx_params_list;
  268|  2.83k|}
cipher_aes_cbc_hmac_sha.c:aes_256_cbc_hmac_sha1_get_params:
  384|    709|    {                                                                               \
  385|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  386|    709|            flags, kbits, blkbits, ivbits);                                         \
  387|    709|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_128_cbc_hmac_sha256_get_params:
  384|    709|    {                                                                               \
  385|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  386|    709|            flags, kbits, blkbits, ivbits);                                         \
  387|    709|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_256_cbc_hmac_sha256_get_params:
  384|    709|    {                                                                               \
  385|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  386|    709|            flags, kbits, blkbits, ivbits);                                         \
  387|    709|    }                                                                               \

ossl_cipher_capable_aes_cbc_hmac_sha1_etm:
   14|      3|{
   15|      3|    return 0;
   16|      3|}

ossl_cipher_capable_aes_cbc_hmac_sha1:
   41|      2|{
   42|      2|    return AESNI_CBC_HMAC_SHA_CAPABLE;
  ------------------
  |  |  171|      2|#define AESNI_CBC_HMAC_SHA_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  ------------------
   43|      2|}

ossl_cipher_capable_aes_cbc_hmac_sha256_etm:
   14|      3|{
   15|      3|    return 0;
   16|      3|}

ossl_cipher_capable_aes_cbc_hmac_sha256:
   41|      2|{
   42|      2|    return AESNI_CBC_HMAC_SHA_CAPABLE
  ------------------
  |  |  171|      4|#define AESNI_CBC_HMAC_SHA_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (171:36): [True: 2, False: 0]
  |  |  ------------------
  ------------------
   43|      2|        && aesni_cbc_sha256_enc(NULL, NULL, 0, NULL, NULL, NULL, NULL);
  ------------------
  |  Branch (43:12): [True: 2, False: 0]
  ------------------
   44|      2|}

ossl_cipher_capable_aes_cbc_hmac_sha512_etm:
   20|      3|{
   21|      3|    return 0;
   22|      3|}

cipher_aes_gcm_siv.c:ossl_aes_128_gcm_siv_get_params:
  278|    709|    {                                                                                                      \
  279|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  221|    709|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  280|    709|            flags, kbits, blkbits, ivbits);                                                                \
  281|    709|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_gcm_siv_gettable_ctx_params:
  208|  2.12k|{
  209|  2.12k|    return ossl_aes_gcm_siv_get_ctx_params_list;
  210|  2.12k|}
cipher_aes_gcm_siv.c:ossl_aes_192_gcm_siv_get_params:
  278|    709|    {                                                                                                      \
  279|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  221|    709|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  280|    709|            flags, kbits, blkbits, ivbits);                                                                \
  281|    709|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_256_gcm_siv_get_params:
  278|    709|    {                                                                                                      \
  279|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  221|    709|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  280|    709|            flags, kbits, blkbits, ivbits);                                                                \
  281|    709|    }                                                                                                      \

ossl_prov_cipher_hw_aes_ecb:
  139|  3.57k|    {                                                   \
  140|  3.57k|        PROV_CIPHER_HW_select(mode) return &aes_##mode; \
  ------------------
  |  |   79|  3.57k|#define PROV_CIPHER_HW_select(mode)                                            \
  |  |   80|  3.57k|if (AESNI_CAPABLE)                                                             \
  |  |  ------------------
  |  |  |  |  185|  3.57k|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (185:23): [True: 3.57k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|  3.57k|    return &aesni_##mode;
  ------------------
  141|  3.57k|    }
ossl_prov_cipher_hw_aes_ctr:
  139|  1.78k|    {                                                   \
  140|  1.78k|        PROV_CIPHER_HW_select(mode) return &aes_##mode; \
  ------------------
  |  |   79|  1.78k|#define PROV_CIPHER_HW_select(mode)                                            \
  |  |   80|  1.78k|if (AESNI_CAPABLE)                                                             \
  |  |  ------------------
  |  |  |  |  185|  1.78k|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (185:23): [True: 1.78k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|  1.78k|    return &aesni_##mode;
  ------------------
  141|  1.78k|    }

cipher_aes_hw.c:cipher_hw_aesni_initkey:
   20|  84.8k|{
   21|  84.8k|    int ret;
   22|  84.8k|    PROV_AES_CTX *adat = (PROV_AES_CTX *)dat;
   23|  84.8k|    AES_KEY *ks = &adat->ks.ks;
   24|       |
   25|  84.8k|    dat->ks = ks;
   26|       |
   27|  84.8k|    if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  210|   169k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
                  if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  211|  37.9k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (27:10): [True: 46.9k, False: 37.9k]
  |  Branch (27:44): [True: 0, False: 37.9k]
  ------------------
   28|  46.9k|        && !dat->enc) {
  ------------------
  |  Branch (28:12): [True: 0, False: 46.9k]
  ------------------
   29|      0|        ret = aesni_set_decrypt_key(key, (int)(keylen * 8), ks);
   30|      0|        dat->block = (block128_f) aesni_decrypt;
   31|      0|        dat->stream.cbc = dat->mode == EVP_CIPH_CBC_MODE ?
  ------------------
  |  |  211|      0|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (31:27): [True: 0, False: 0]
  ------------------
   32|      0|            (cbc128_f) aesni_cbc_encrypt : NULL;
   33|  84.8k|    } else {
   34|  84.8k|        ret = aesni_set_encrypt_key(key, (int)(keylen * 8), ks);
   35|  84.8k|        dat->block = (block128_f) aesni_encrypt;
   36|  84.8k|        if (dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  211|  84.8k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (36:13): [True: 0, False: 84.8k]
  ------------------
   37|      0|            dat->stream.cbc = (cbc128_f) aesni_cbc_encrypt;
   38|  84.8k|        else if (dat->mode == EVP_CIPH_CTR_MODE)
  ------------------
  |  |  214|  84.8k|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  |  Branch (38:18): [True: 37.9k, False: 46.9k]
  ------------------
   39|  37.9k|            dat->stream.ctr = (ctr128_f) aesni_ctr32_encrypt_blocks;
   40|  46.9k|        else
   41|  46.9k|            dat->stream.cbc = NULL;
   42|  84.8k|    }
   43|       |
   44|  84.8k|    if (ret < 0) {
  ------------------
  |  Branch (44:9): [True: 0, False: 84.8k]
  ------------------
   45|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_KEY_SETUP_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   46|      0|        return 0;
   47|      0|    }
   48|       |
   49|  84.8k|    return 1;
   50|  84.8k|}
cipher_aes_hw.c:cipher_hw_aesni_ecb:
   64|  78.5k|{
   65|  78.5k|    if (len < ctx->blocksize)
  ------------------
  |  Branch (65:9): [True: 0, False: 78.5k]
  ------------------
   66|      0|        return 1;
   67|       |
   68|  78.5k|    aesni_ecb_encrypt(in, out, len, ctx->ks, ctx->enc);
   69|       |
   70|  78.5k|    return 1;
   71|  78.5k|}

cipher_aes_ocb.c:aes_256_ocb_get_params:
  526|    709|    {                                                                           \
  527|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  219|    709|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  528|    709|            flags, kbits, blkbits, ivbits);                                     \
  529|    709|    }                                                                           \
cipher_aes_ocb.c:cipher_ocb_gettable_ctx_params:
  421|  2.12k|{
  422|  2.12k|    return aes_ocb_get_ctx_params_list;
  423|  2.12k|}
cipher_aes_ocb.c:aes_192_ocb_get_params:
  526|    709|    {                                                                           \
  527|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  219|    709|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  528|    709|            flags, kbits, blkbits, ivbits);                                     \
  529|    709|    }                                                                           \
cipher_aes_ocb.c:aes_128_ocb_get_params:
  526|    709|    {                                                                           \
  527|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  219|    709|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  528|    709|            flags, kbits, blkbits, ivbits);                                     \
  529|    709|    }                                                                           \

cipher_aes_siv.c:aes_128_siv_get_params:
  258|    709|    {                                                                            \
  259|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  220|    709|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  260|    709|            flags, 2 * kbits, blkbits, ivbits);                                  \
  261|    709|    }                                                                            \
cipher_aes_siv.c:aes_siv_gettable_ctx_params:
  187|  2.12k|{
  188|  2.12k|    return aes_siv_get_ctx_params_list;
  189|  2.12k|}
cipher_aes_siv.c:aes_192_siv_get_params:
  258|    709|    {                                                                            \
  259|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  220|    709|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  260|    709|            flags, 2 * kbits, blkbits, ivbits);                                  \
  261|    709|    }                                                                            \
cipher_aes_siv.c:aes_256_siv_get_params:
  258|    709|    {                                                                            \
  259|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  220|    709|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  260|    709|            flags, 2 * kbits, blkbits, ivbits);                                  \
  261|    709|    }                                                                            \

cipher_aes_wrp.c:aes_256_wrap_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrap_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrap_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrappad_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrappad_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrappad_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrapinv_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrapinv_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrapinv_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrappadinv_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrappadinv_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrappadinv_get_params:
  309|    709|    {                                                                           \
  310|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|    709|            flags, kbits, blkbits, ivbits);                                     \
  312|    709|    }                                                                           \

cipher_aes_xts.c:aes_256_xts_get_params:
  275|    709|    {                                                                              \
  276|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  217|    709|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  277|    709|            flags, 2 * kbits, AES_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   26|    709|#define AES_XTS_BLOCK_BITS 8
  ------------------
  278|    709|            AES_XTS_IV_BITS);                                                      \
  ------------------
  |  |   25|    709|#define AES_XTS_IV_BITS 128
  ------------------
  279|    709|    }                                                                              \
cipher_aes_xts.c:aes_128_xts_get_params:
  275|    709|    {                                                                              \
  276|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  217|    709|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  277|    709|            flags, 2 * kbits, AES_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   26|    709|#define AES_XTS_BLOCK_BITS 8
  ------------------
  278|    709|            AES_XTS_IV_BITS);                                                      \
  ------------------
  |  |   25|    709|#define AES_XTS_IV_BITS 128
  ------------------
  279|    709|    }                                                                              \

cipher_chacha20.c:chacha20_get_params:
   97|    709|{
   98|    709|    return ossl_cipher_generic_get_params(params, 0, CHACHA20_FLAGS,
  ------------------
  |  |   22|    709|#define CHACHA20_FLAGS (PROV_CIPHER_FLAG_CUSTOM_IV)
  |  |  ------------------
  |  |  |  |   40|    709|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  |  |  ------------------
  ------------------
   99|    709|        CHACHA20_KEYLEN * 8,
  ------------------
  |  |   19|    709|#define CHACHA20_KEYLEN (CHACHA_KEY_SIZE)
  |  |  ------------------
  |  |  |  |   44|    709|#define CHACHA_KEY_SIZE 32
  |  |  ------------------
  ------------------
  100|    709|        CHACHA20_BLKLEN * 8,
  ------------------
  |  |   20|    709|#define CHACHA20_BLKLEN (1)
  ------------------
  101|    709|        CHACHA20_IVLEN * 8);
  ------------------
  |  |   21|    709|#define CHACHA20_IVLEN (CHACHA_CTR_SIZE)
  |  |  ------------------
  |  |  |  |   45|    709|#define CHACHA_CTR_SIZE 16
  |  |  ------------------
  ------------------
  102|    709|}
cipher_chacha20.c:chacha20_gettable_ctx_params:
  138|    709|{
  139|    709|    return chacha20_get_ctx_params_list;
  140|    709|}

cipher_chacha20_poly1305.c:chacha20_poly1305_get_params:
   93|  4.06k|{
   94|  4.06k|    return ossl_cipher_generic_get_params(params, 0, CHACHA20_POLY1305_FLAGS,
  ------------------
  |  |   23|  4.06k|#define CHACHA20_POLY1305_FLAGS (PROV_CIPHER_FLAG_AEAD \
  |  |  ------------------
  |  |  |  |   39|  4.06k|#define PROV_CIPHER_FLAG_AEAD 0x0001
  |  |  ------------------
  |  |   24|  4.06k|    | PROV_CIPHER_FLAG_CUSTOM_IV)
  |  |  ------------------
  |  |  |  |   40|  4.06k|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  |  |  ------------------
  ------------------
   95|  4.06k|        CHACHA20_POLY1305_KEYLEN * 8,
  ------------------
  |  |   19|  4.06k|#define CHACHA20_POLY1305_KEYLEN CHACHA_KEY_SIZE
  |  |  ------------------
  |  |  |  |   44|  4.06k|#define CHACHA_KEY_SIZE 32
  |  |  ------------------
  ------------------
   96|  4.06k|        CHACHA20_POLY1305_BLKLEN * 8,
  ------------------
  |  |   20|  4.06k|#define CHACHA20_POLY1305_BLKLEN 1
  ------------------
   97|  4.06k|        CHACHA20_POLY1305_IVLEN * 8);
  ------------------
  |  |   16|  4.06k|#define CHACHA20_POLY1305_IVLEN 12
  ------------------
   98|  4.06k|}
cipher_chacha20_poly1305.c:chacha20_poly1305_gettable_ctx_params:
  151|    709|{
  152|    709|    return chacha20_poly1305_get_ctx_params_list;
  153|    709|}

cipher_aes.c:aes_cts_256_cbc_get_params:
   17|    709|    {                                                                            \
   18|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    709|            flags, kbits, blkbits, ivbits);                                      \
   20|    709|    }                                                                            \
cipher_aes.c:aes_cts_192_cbc_get_params:
   17|    709|    {                                                                            \
   18|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    709|            flags, kbits, blkbits, ivbits);                                      \
   20|    709|    }                                                                            \
cipher_aes.c:aes_cts_128_cbc_get_params:
   17|    709|    {                                                                            \
   18|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    709|            flags, kbits, blkbits, ivbits);                                      \
   20|    709|    }                                                                            \
cipher_camellia.c:camellia_cts_256_cbc_get_params:
   17|    709|    {                                                                            \
   18|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    709|            flags, kbits, blkbits, ivbits);                                      \
   20|    709|    }                                                                            \
cipher_camellia.c:camellia_cts_192_cbc_get_params:
   17|    709|    {                                                                            \
   18|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    709|            flags, kbits, blkbits, ivbits);                                      \
   20|    709|    }                                                                            \
cipher_camellia.c:camellia_cts_128_cbc_get_params:
   17|    709|    {                                                                            \
   18|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    709|            flags, kbits, blkbits, ivbits);                                      \
   20|    709|    }                                                                            \

cipher_null.c:null_get_params:
  105|    709|{
  106|    709|    return ossl_cipher_generic_get_params(params, 0, 0, 0, 8, 0);
  107|    709|}
cipher_null.c:null_gettable_ctx_params:
  112|    709|{
  113|    709|    return null_get_ctx_params_list;
  114|    709|}

cipher_sm4_xts.c:sm4_128_xts_get_params:
  239|    709|    {                                                                              \
  240|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  217|    709|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  241|    709|            flags, 2 * kbits, SM4_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   20|    709|#define SM4_XTS_BLOCK_BITS 8
  ------------------
  242|    709|            SM4_XTS_IV_BITS);                                                      \
  ------------------
  |  |   19|    709|#define SM4_XTS_IV_BITS 128
  ------------------
  243|    709|    }                                                                              \

cipher_tdes.c:tdes_ede3_ecb_get_params:
   44|    709|    {                                                                              \
   45|    709|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
   46|    709|            flags, kbits, blkbits, ivbits);                                        \
   47|    709|    }                                                                              \
cipher_tdes.c:tdes_ede3_cbc_get_params:
   44|  4.06k|    {                                                                              \
   45|  4.06k|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  211|  4.06k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   46|  4.06k|            flags, kbits, blkbits, ivbits);                                        \
   47|  4.06k|    }                                                                              \
cipher_tdes_default.c:tdes_ede3_ofb_get_params:
   44|    709|    {                                                                              \
   45|    709|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
   46|    709|            flags, kbits, blkbits, ivbits);                                        \
   47|    709|    }                                                                              \
cipher_tdes_default.c:tdes_ede3_cfb_get_params:
   44|    709|    {                                                                              \
   45|    709|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
   46|    709|            flags, kbits, blkbits, ivbits);                                        \
   47|    709|    }                                                                              \
cipher_tdes_default.c:tdes_ede3_cfb1_get_params:
   44|    709|    {                                                                              \
   45|    709|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
   46|    709|            flags, kbits, blkbits, ivbits);                                        \
   47|    709|    }                                                                              \
cipher_tdes_default.c:tdes_ede3_cfb8_get_params:
   44|    709|    {                                                                              \
   45|    709|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
   46|    709|            flags, kbits, blkbits, ivbits);                                        \
   47|    709|    }                                                                              \
cipher_tdes_default.c:tdes_ede2_ecb_get_params:
   44|    709|    {                                                                              \
   45|    709|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
   46|    709|            flags, kbits, blkbits, ivbits);                                        \
   47|    709|    }                                                                              \
cipher_tdes_default.c:tdes_ede2_cbc_get_params:
   44|    709|    {                                                                              \
   45|    709|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   46|    709|            flags, kbits, blkbits, ivbits);                                        \
   47|    709|    }                                                                              \
cipher_tdes_default.c:tdes_ede2_ofb_get_params:
   44|    709|    {                                                                              \
   45|    709|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
   46|    709|            flags, kbits, blkbits, ivbits);                                        \
   47|    709|    }                                                                              \
cipher_tdes_default.c:tdes_ede2_cfb_get_params:
   44|    709|    {                                                                              \
   45|    709|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
   46|    709|            flags, kbits, blkbits, ivbits);                                        \
   47|    709|    }                                                                              \

ossl_tdes_get_params:
  184|  10.4k|{
  185|       |#ifdef FIPS_MODULE
  186|       |    const int decrypt_only = 1;
  187|       |#else
  188|  10.4k|    const int decrypt_only = 0;
  189|  10.4k|#endif
  190|  10.4k|    OSSL_PARAM *p;
  191|       |
  192|  10.4k|    p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_DECRYPT_ONLY);
  ------------------
  |  |  190|  10.4k|# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
  ------------------
  193|  10.4k|    if (p != NULL && !OSSL_PARAM_set_int(p, decrypt_only)) {
  ------------------
  |  Branch (193:9): [True: 3.35k, False: 7.09k]
  |  Branch (193:22): [True: 0, False: 3.35k]
  ------------------
  194|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  195|      0|        return 0;
  196|      0|    }
  197|       |
  198|  10.4k|    return ossl_cipher_generic_get_params(params, md, flags,
  199|  10.4k|        kbits, blkbits, ivbits);
  200|  10.4k|}

cipher_tdes_wrap.c:tdes_wrap_get_params:
  181|    709|    {                                                                            \
  182|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_WRAP_MODE, flags, \
  ------------------
  |  |  218|    709|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  183|    709|            kbits, blkbits, ivbits);                                             \
  184|    709|    }                                                                            \

ossl_cipher_generic_get_params:
   43|   145k|{
   44|   145k|    struct ossl_cipher_generic_get_params_st p;
   45|       |
   46|   145k|    if (!ossl_cipher_generic_get_params_decoder(params, &p))
  ------------------
  |  Branch (46:9): [True: 0, False: 145k]
  ------------------
   47|      0|        return 0;
   48|       |
   49|   145k|    if (p.mode != NULL && !OSSL_PARAM_set_uint(p.mode, md)) {
  ------------------
  |  Branch (49:9): [True: 92.1k, False: 53.7k]
  |  Branch (49:27): [True: 0, False: 92.1k]
  ------------------
   50|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   51|      0|        return 0;
   52|      0|    }
   53|   145k|    if (p.aead != NULL
  ------------------
  |  Branch (53:9): [True: 92.1k, False: 53.7k]
  ------------------
   54|  92.1k|        && !OSSL_PARAM_set_int(p.aead, (flags & PROV_CIPHER_FLAG_AEAD) != 0)) {
  ------------------
  |  |   39|  92.1k|#define PROV_CIPHER_FLAG_AEAD 0x0001
  ------------------
  |  Branch (54:12): [True: 0, False: 92.1k]
  ------------------
   55|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   56|      0|        return 0;
   57|      0|    }
   58|   145k|    if (p.custiv != NULL
  ------------------
  |  Branch (58:9): [True: 92.1k, False: 53.7k]
  ------------------
   59|  92.1k|        && !OSSL_PARAM_set_int(p.custiv, (flags & PROV_CIPHER_FLAG_CUSTOM_IV) != 0)) {
  ------------------
  |  |   40|  92.1k|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  ------------------
  |  Branch (59:12): [True: 0, False: 92.1k]
  ------------------
   60|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   61|      0|        return 0;
   62|      0|    }
   63|   145k|    if (p.cts != NULL
  ------------------
  |  Branch (63:9): [True: 92.1k, False: 53.7k]
  ------------------
   64|  92.1k|        && !OSSL_PARAM_set_int(p.cts, (flags & PROV_CIPHER_FLAG_CTS) != 0)) {
  ------------------
  |  |   41|  92.1k|#define PROV_CIPHER_FLAG_CTS 0x0004
  ------------------
  |  Branch (64:12): [True: 0, False: 92.1k]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|   145k|    if (p.mb != NULL
  ------------------
  |  Branch (68:9): [True: 92.1k, False: 53.7k]
  ------------------
   69|  92.1k|        && !OSSL_PARAM_set_int(p.mb, (flags & PROV_CIPHER_FLAG_TLS1_MULTIBLOCK) != 0)) {
  ------------------
  |  |   42|  92.1k|#define PROV_CIPHER_FLAG_TLS1_MULTIBLOCK 0x0008
  ------------------
  |  Branch (69:12): [True: 0, False: 92.1k]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|   145k|    if (p.rand != NULL
  ------------------
  |  Branch (73:9): [True: 92.1k, False: 53.7k]
  ------------------
   74|  92.1k|        && !OSSL_PARAM_set_int(p.rand, (flags & PROV_CIPHER_FLAG_RAND_KEY) != 0)) {
  ------------------
  |  |   43|  92.1k|#define PROV_CIPHER_FLAG_RAND_KEY 0x0010
  ------------------
  |  Branch (74:12): [True: 0, False: 92.1k]
  ------------------
   75|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   76|      0|        return 0;
   77|      0|    }
   78|   145k|    if (p.etm != NULL
  ------------------
  |  Branch (78:9): [True: 92.1k, False: 53.7k]
  ------------------
   79|  92.1k|        && !OSSL_PARAM_set_int(p.etm, (flags & EVP_CIPH_FLAG_ENC_THEN_MAC) != 0)) {
  ------------------
  |  |  267|  92.1k|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  |  Branch (79:12): [True: 0, False: 92.1k]
  ------------------
   80|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   81|      0|        return 0;
   82|      0|    }
   83|   145k|    if (p.keylen != NULL && !OSSL_PARAM_set_size_t(p.keylen, kbits / 8)) {
  ------------------
  |  Branch (83:9): [True: 92.1k, False: 53.7k]
  |  Branch (83:29): [True: 0, False: 92.1k]
  ------------------
   84|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   85|      0|        return 0;
   86|      0|    }
   87|   145k|    if (p.bsize != NULL && !OSSL_PARAM_set_size_t(p.bsize, blkbits / 8)) {
  ------------------
  |  Branch (87:9): [True: 92.1k, False: 53.7k]
  |  Branch (87:28): [True: 0, False: 92.1k]
  ------------------
   88|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   89|      0|        return 0;
   90|      0|    }
   91|   145k|    if (p.ivlen != NULL && !OSSL_PARAM_set_size_t(p.ivlen, ivbits / 8)) {
  ------------------
  |  Branch (91:9): [True: 92.1k, False: 53.7k]
  |  Branch (91:28): [True: 0, False: 92.1k]
  ------------------
   92|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   93|      0|        return 0;
   94|      0|    }
   95|   145k|    return 1;
   96|   145k|}
ossl_cipher_generic_gettable_ctx_params:
   99|  58.8k|{
  100|  58.8k|    return cipher_generic_get_ctx_params_list;
  101|  58.8k|}
ossl_cipher_generic_reset_ctx:
  143|  5.35k|{
  144|  5.35k|    if (ctx != NULL && ctx->alloced) {
  ------------------
  |  Branch (144:9): [True: 5.35k, False: 0]
  |  Branch (144:24): [True: 0, False: 5.35k]
  ------------------
  145|      0|        OPENSSL_free(ctx->tlsmac);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  146|      0|        ctx->alloced = 0;
  147|       |        ctx->tlsmac = NULL;
  148|      0|    }
  149|  5.35k|}
ossl_cipher_generic_einit:
  194|   121k|{
  195|   121k|    return cipher_generic_init_internal((PROV_CIPHER_CTX *)vctx, key, keylen,
  196|   121k|        iv, ivlen, params, 1);
  197|   121k|}
ossl_cipher_generic_block_update:
  235|  78.5k|{
  236|  78.5k|    size_t outlint = 0;
  237|  78.5k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  238|  78.5k|    size_t blksz = ctx->blocksize;
  239|  78.5k|    size_t nextblocks;
  240|       |
  241|  78.5k|    if (!ctx->key_set) {
  ------------------
  |  Branch (241:9): [True: 0, False: 78.5k]
  ------------------
  242|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  243|      0|        return 0;
  244|      0|    }
  245|       |
  246|  78.5k|    if (ctx->tlsversion > 0) {
  ------------------
  |  Branch (246:9): [True: 0, False: 78.5k]
  ------------------
  247|       |        /*
  248|       |         * Each update call corresponds to a TLS record and is individually
  249|       |         * padded
  250|       |         */
  251|       |
  252|       |        /* Sanity check inputs */
  253|      0|        if (in == NULL
  ------------------
  |  Branch (253:13): [True: 0, False: 0]
  ------------------
  254|      0|            || in != out
  ------------------
  |  Branch (254:16): [True: 0, False: 0]
  ------------------
  255|      0|            || outsize < inl
  ------------------
  |  Branch (255:16): [True: 0, False: 0]
  ------------------
  256|      0|            || !ctx->pad) {
  ------------------
  |  Branch (256:16): [True: 0, False: 0]
  ------------------
  257|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  258|      0|            return 0;
  259|      0|        }
  260|       |
  261|      0|        if (ctx->enc) {
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      0|            unsigned char padval;
  263|      0|            size_t padnum, loop;
  264|       |
  265|       |            /* Add padding */
  266|       |
  267|      0|            padnum = blksz - (inl % blksz);
  268|       |
  269|      0|            if (outsize < inl + padnum) {
  ------------------
  |  Branch (269:17): [True: 0, False: 0]
  ------------------
  270|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|                return 0;
  272|      0|            }
  273|       |
  274|      0|            if (padnum > MAX_PADDING) {
  ------------------
  |  |  230|      0|#define MAX_PADDING 256
  ------------------
  |  Branch (274:17): [True: 0, False: 0]
  ------------------
  275|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|      0|                return 0;
  277|      0|            }
  278|      0|            padval = (unsigned char)(padnum - 1);
  279|      0|            if (ctx->tlsversion == SSL3_VERSION) {
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (279:17): [True: 0, False: 0]
  ------------------
  280|      0|                if (padnum > 1)
  ------------------
  |  Branch (280:21): [True: 0, False: 0]
  ------------------
  281|      0|                    memset(out + inl, 0, padnum - 1);
  282|      0|                *(out + inl + padnum - 1) = padval;
  283|      0|            } else {
  284|       |                /* we need to add 'padnum' padding bytes of value padval */
  285|      0|                for (loop = inl; loop < inl + padnum; loop++)
  ------------------
  |  Branch (285:34): [True: 0, False: 0]
  ------------------
  286|      0|                    out[loop] = padval;
  287|      0|            }
  288|      0|            inl += padnum;
  289|      0|        }
  290|       |
  291|      0|        if ((inl % blksz) != 0) {
  ------------------
  |  Branch (291:13): [True: 0, False: 0]
  ------------------
  292|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  293|      0|            return 0;
  294|      0|        }
  295|       |
  296|       |        /* Shouldn't normally fail */
  297|      0|        if (!ctx->hw->cipher(ctx, out, in, inl)) {
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|            return 0;
  300|      0|        }
  301|       |
  302|      0|        if (ctx->alloced) {
  ------------------
  |  Branch (302:13): [True: 0, False: 0]
  ------------------
  303|      0|            OPENSSL_free(ctx->tlsmac);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  304|      0|            ctx->alloced = 0;
  305|      0|            ctx->tlsmac = NULL;
  306|      0|        }
  307|       |
  308|       |        /* This only fails if padding is publicly invalid */
  309|      0|        *outl = inl;
  310|      0|        if (!ctx->enc
  ------------------
  |  Branch (310:13): [True: 0, False: 0]
  ------------------
  311|      0|            && !ossl_cipher_tlsunpadblock(ctx->libctx, ctx->tlsversion,
  ------------------
  |  Branch (311:16): [True: 0, False: 0]
  ------------------
  312|      0|                out, outl,
  313|      0|                blksz, &ctx->tlsmac, &ctx->alloced,
  314|      0|                ctx->tlsmacsize, 0)) {
  315|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|            return 0;
  317|      0|        }
  318|      0|        return 1;
  319|      0|    }
  320|       |
  321|  78.5k|    if (ctx->bufsz != 0)
  ------------------
  |  Branch (321:9): [True: 0, False: 78.5k]
  ------------------
  322|      0|        nextblocks = ossl_cipher_fillblock(ctx->buf, &ctx->bufsz, blksz,
  323|      0|            &in, &inl);
  324|  78.5k|    else
  325|  78.5k|        nextblocks = inl & ~(blksz - 1);
  326|       |
  327|       |    /*
  328|       |     * If we're decrypting and we end an update on a block boundary we hold
  329|       |     * the last block back in case this is the last update call and the last
  330|       |     * block is padded.
  331|       |     */
  332|  78.5k|    if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) {
  ------------------
  |  Branch (332:9): [True: 0, False: 78.5k]
  |  Branch (332:33): [True: 0, False: 0]
  |  Branch (332:45): [True: 0, False: 0]
  |  Branch (332:56): [True: 0, False: 0]
  ------------------
  333|      0|        if (outsize < blksz) {
  ------------------
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  335|      0|            return 0;
  336|      0|        }
  337|      0|        if (!ctx->hw->cipher(ctx, out, ctx->buf, blksz)) {
  ------------------
  |  Branch (337:13): [True: 0, False: 0]
  ------------------
  338|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  339|      0|            return 0;
  340|      0|        }
  341|      0|        ctx->bufsz = 0;
  342|      0|        outlint = blksz;
  343|      0|        out += blksz;
  344|      0|    }
  345|  78.5k|    if (nextblocks > 0) {
  ------------------
  |  Branch (345:9): [True: 78.5k, False: 0]
  ------------------
  346|  78.5k|        if (!ctx->enc && ctx->pad && nextblocks == inl) {
  ------------------
  |  Branch (346:13): [True: 0, False: 78.5k]
  |  Branch (346:26): [True: 0, False: 0]
  |  Branch (346:38): [True: 0, False: 0]
  ------------------
  347|      0|            if (!ossl_assert(inl >= blksz)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (347:17): [True: 0, False: 0]
  ------------------
  348|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|                return 0;
  350|      0|            }
  351|      0|            nextblocks -= blksz;
  352|      0|        }
  353|  78.5k|        outlint += nextblocks;
  354|  78.5k|        if (outsize < outlint) {
  ------------------
  |  Branch (354:13): [True: 0, False: 78.5k]
  ------------------
  355|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  356|      0|            return 0;
  357|      0|        }
  358|  78.5k|    }
  359|  78.5k|    if (nextblocks > 0) {
  ------------------
  |  Branch (359:9): [True: 78.5k, False: 0]
  ------------------
  360|  78.5k|        if (!ctx->hw->cipher(ctx, out, in, nextblocks)) {
  ------------------
  |  Branch (360:13): [True: 0, False: 78.5k]
  ------------------
  361|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  362|      0|            return 0;
  363|      0|        }
  364|  78.5k|        in += nextblocks;
  365|  78.5k|        inl -= nextblocks;
  366|  78.5k|    }
  367|  78.5k|    if (inl != 0
  ------------------
  |  Branch (367:9): [True: 0, False: 78.5k]
  ------------------
  368|      0|        && !ossl_cipher_trailingdata(ctx->buf, &ctx->bufsz, blksz, &in, &inl)) {
  ------------------
  |  Branch (368:12): [True: 0, False: 0]
  ------------------
  369|       |        /* ERR_raise already called */
  370|      0|        return 0;
  371|      0|    }
  372|       |
  373|  78.5k|    *outl = outlint;
  374|  78.5k|    return inl == 0;
  375|  78.5k|}
ossl_cipher_generic_stream_update:
  454|  32.6k|{
  455|  32.6k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  456|       |
  457|  32.6k|    if (!ctx->key_set) {
  ------------------
  |  Branch (457:9): [True: 0, False: 32.6k]
  ------------------
  458|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  459|      0|        return 0;
  460|      0|    }
  461|       |
  462|  32.6k|    if (inl == 0) {
  ------------------
  |  Branch (462:9): [True: 0, False: 32.6k]
  ------------------
  463|      0|        *outl = 0;
  464|      0|        return 1;
  465|      0|    }
  466|       |
  467|  32.6k|    if (outsize < inl) {
  ------------------
  |  Branch (467:9): [True: 0, False: 32.6k]
  ------------------
  468|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  469|      0|        return 0;
  470|      0|    }
  471|       |
  472|  32.6k|    if (!ctx->hw->cipher(ctx, out, in, inl)) {
  ------------------
  |  Branch (472:9): [True: 0, False: 32.6k]
  ------------------
  473|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  474|      0|        return 0;
  475|      0|    }
  476|       |
  477|  32.6k|    *outl = inl;
  478|  32.6k|    if (!ctx->enc && ctx->tlsversion > 0) {
  ------------------
  |  Branch (478:9): [True: 0, False: 32.6k]
  |  Branch (478:22): [True: 0, False: 0]
  ------------------
  479|       |        /*
  480|       |         * Remove any TLS padding. Only used by cipher_aes_cbc_hmac_sha1_hw.c and
  481|       |         * cipher_aes_cbc_hmac_sha256_hw.c
  482|       |         */
  483|      0|        if (ctx->removetlspad) {
  ------------------
  |  Branch (483:13): [True: 0, False: 0]
  ------------------
  484|       |            /*
  485|       |             * We should have already failed in the cipher() call above if this
  486|       |             * isn't true.
  487|       |             */
  488|      0|            if (!ossl_assert(*outl >= (size_t)(out[inl - 1] + 1)))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (488:17): [True: 0, False: 0]
  ------------------
  489|      0|                return 0;
  490|       |            /* The actual padding length */
  491|      0|            *outl -= out[inl - 1] + 1;
  492|      0|        }
  493|       |
  494|       |        /* TLS MAC and explicit IV if relevant. We should have already failed
  495|       |         * in the cipher() call above if *outl is too short.
  496|       |         */
  497|      0|        if (!ossl_assert(*outl >= ctx->removetlsfixed))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (497:13): [True: 0, False: 0]
  ------------------
  498|      0|            return 0;
  499|      0|        *outl -= ctx->removetlsfixed;
  500|       |
  501|       |        /* Extract the MAC if there is one */
  502|      0|        if (ctx->tlsmacsize > 0) {
  ------------------
  |  Branch (502:13): [True: 0, False: 0]
  ------------------
  503|      0|            if (*outl < ctx->tlsmacsize)
  ------------------
  |  Branch (503:17): [True: 0, False: 0]
  ------------------
  504|      0|                return 0;
  505|       |
  506|      0|            ctx->tlsmac = out + *outl - ctx->tlsmacsize;
  507|      0|            *outl -= ctx->tlsmacsize;
  508|      0|        }
  509|      0|    }
  510|       |
  511|  32.6k|    return 1;
  512|  32.6k|}
ossl_cipher_common_get_ctx_params:
  559|  7.15k|{
  560|  7.15k|    if (p->ivlen != NULL && !OSSL_PARAM_set_size_t(p->ivlen, ctx->ivlen)) {
  ------------------
  |  Branch (560:9): [True: 1.78k, False: 5.36k]
  |  Branch (560:29): [True: 0, False: 1.78k]
  ------------------
  561|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  562|      0|        return 0;
  563|      0|    }
  564|       |
  565|  7.15k|    if (p->pad != NULL && !OSSL_PARAM_set_uint(p->pad, ctx->pad)) {
  ------------------
  |  Branch (565:9): [True: 0, False: 7.15k]
  |  Branch (565:27): [True: 0, False: 0]
  ------------------
  566|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  567|      0|        return 0;
  568|      0|    }
  569|       |
  570|  7.15k|    if (p->iv != NULL
  ------------------
  |  Branch (570:9): [True: 0, False: 7.15k]
  ------------------
  571|      0|        && !OSSL_PARAM_set_octet_string_or_ptr(p->iv, ctx->oiv, ctx->ivlen)) {
  ------------------
  |  Branch (571:12): [True: 0, False: 0]
  ------------------
  572|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  573|      0|        return 0;
  574|      0|    }
  575|       |
  576|  7.15k|    if (p->updiv != NULL
  ------------------
  |  Branch (576:9): [True: 0, False: 7.15k]
  ------------------
  577|      0|        && !OSSL_PARAM_set_octet_string_or_ptr(p->updiv, ctx->iv, ctx->ivlen)) {
  ------------------
  |  Branch (577:12): [True: 0, False: 0]
  ------------------
  578|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  579|      0|        return 0;
  580|      0|    }
  581|       |
  582|  7.15k|    if (p->num != NULL && !OSSL_PARAM_set_uint(p->num, ctx->num)) {
  ------------------
  |  Branch (582:9): [True: 0, False: 7.15k]
  |  Branch (582:27): [True: 0, False: 0]
  ------------------
  583|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  584|      0|        return 0;
  585|      0|    }
  586|       |
  587|  7.15k|    if (p->keylen != NULL && !OSSL_PARAM_set_size_t(p->keylen, ctx->keylen)) {
  ------------------
  |  Branch (587:9): [True: 5.36k, False: 1.78k]
  |  Branch (587:30): [True: 0, False: 5.36k]
  ------------------
  588|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  589|      0|        return 0;
  590|      0|    }
  591|       |
  592|  7.15k|    if (p->tlsmac != NULL
  ------------------
  |  Branch (592:9): [True: 0, False: 7.15k]
  ------------------
  593|      0|        && !OSSL_PARAM_set_octet_ptr(p->tlsmac, ctx->tlsmac, ctx->tlsmacsize)) {
  ------------------
  |  Branch (593:12): [True: 0, False: 0]
  ------------------
  594|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  595|      0|        return 0;
  596|      0|    }
  597|  7.15k|    return 1;
  598|  7.15k|}
ossl_cipher_generic_get_ctx_params:
  601|  7.15k|{
  602|  7.15k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  603|  7.15k|    struct ossl_cipher_get_ctx_param_list_st p;
  604|       |
  605|  7.15k|    if (ctx == NULL || !cipher_generic_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (605:9): [True: 0, False: 7.15k]
  |  Branch (605:24): [True: 0, False: 7.15k]
  ------------------
  606|      0|        return 0;
  607|  7.15k|    return ossl_cipher_common_get_ctx_params(ctx, &p);
  608|  7.15k|}
ossl_cipher_generic_set_ctx_params:
  663|   121k|{
  664|   121k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  665|   121k|    struct ossl_cipher_set_ctx_param_list_st p;
  666|       |
  667|   121k|    if (ossl_param_is_empty(params))
  ------------------
  |  Branch (667:9): [True: 121k, False: 0]
  ------------------
  668|   121k|        return 1;
  669|       |
  670|      0|    if (ctx == NULL || !cipher_generic_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (670:9): [True: 0, False: 0]
  |  Branch (670:24): [True: 0, False: 0]
  ------------------
  671|      0|        return 0;
  672|      0|    return ossl_cipher_common_set_ctx_params(ctx, &p);
  673|      0|}
ossl_cipher_generic_initiv:
  677|  32.6k|{
  678|  32.6k|    if (ivlen != ctx->ivlen
  ------------------
  |  Branch (678:9): [True: 0, False: 32.6k]
  ------------------
  679|  32.6k|        || ivlen > sizeof(ctx->iv)) {
  ------------------
  |  Branch (679:12): [True: 0, False: 32.6k]
  ------------------
  680|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  681|      0|        return 0;
  682|      0|    }
  683|  32.6k|    ctx->iv_set = 1;
  684|  32.6k|    memcpy(ctx->iv, iv, ivlen);
  685|  32.6k|    memcpy(ctx->oiv, iv, ivlen);
  686|  32.6k|    return 1;
  687|  32.6k|}
ossl_cipher_generic_initkey:
  693|  5.36k|{
  694|  5.36k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  695|       |
  696|  5.36k|    if ((flags & PROV_CIPHER_FLAG_INVERSE_CIPHER) != 0)
  ------------------
  |  |   46|  5.36k|#define PROV_CIPHER_FLAG_INVERSE_CIPHER 0x0200
  ------------------
  |  Branch (696:9): [True: 0, False: 5.36k]
  ------------------
  697|      0|        ctx->inverse_cipher = 1;
  698|  5.36k|    if ((flags & PROV_CIPHER_FLAG_VARIABLE_LENGTH) != 0)
  ------------------
  |  |   45|  5.36k|#define PROV_CIPHER_FLAG_VARIABLE_LENGTH 0x0100
  ------------------
  |  Branch (698:9): [True: 0, False: 5.36k]
  ------------------
  699|      0|        ctx->variable_keylength = 1;
  700|       |
  701|  5.36k|    ctx->pad = 1;
  702|  5.36k|    ctx->keylen = ((kbits) / 8);
  703|  5.36k|    ctx->ivlen = ((ivbits) / 8);
  704|  5.36k|    ctx->hw = hw;
  705|  5.36k|    ctx->mode = mode;
  706|  5.36k|    ctx->blocksize = blkbits / 8;
  707|  5.36k|    if (provctx != NULL)
  ------------------
  |  Branch (707:9): [True: 5.36k, False: 0]
  ------------------
  708|  5.36k|        ctx->libctx = PROV_LIBCTX_OF(provctx); /* used for rand */
  ------------------
  |  |   31|  5.36k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  709|  5.36k|}
ciphercommon.c:cipher_generic_init_internal:
  155|   121k|{
  156|   121k|    ctx->num = 0;
  157|   121k|    ctx->bufsz = 0;
  158|   121k|    ctx->updated = 0;
  159|   121k|    ctx->enc = enc ? 1 : 0;
  ------------------
  |  Branch (159:16): [True: 121k, False: 0]
  ------------------
  160|       |
  161|   121k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (161:9): [True: 0, False: 121k]
  ------------------
  162|      0|        return 0;
  163|       |
  164|   121k|    if (iv != NULL && ctx->mode != EVP_CIPH_ECB_MODE) {
  ------------------
  |  |  210|  32.6k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  |  Branch (164:9): [True: 32.6k, False: 88.4k]
  |  Branch (164:23): [True: 32.6k, False: 0]
  ------------------
  165|  32.6k|        if (!ossl_cipher_generic_initiv(ctx, iv, ivlen))
  ------------------
  |  Branch (165:13): [True: 0, False: 32.6k]
  ------------------
  166|      0|            return 0;
  167|  32.6k|    }
  168|   121k|    if (iv == NULL && ctx->iv_set
  ------------------
  |  Branch (168:9): [True: 88.4k, False: 32.6k]
  |  Branch (168:23): [True: 34.4k, False: 54.0k]
  ------------------
  169|  34.4k|        && (ctx->mode == EVP_CIPH_CBC_MODE
  ------------------
  |  |  211|  68.8k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (169:13): [True: 0, False: 34.4k]
  ------------------
  170|  34.4k|            || ctx->mode == EVP_CIPH_CFB_MODE
  ------------------
  |  |  212|  68.8k|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  |  Branch (170:16): [True: 0, False: 34.4k]
  ------------------
  171|  34.4k|            || ctx->mode == EVP_CIPH_OFB_MODE))
  ------------------
  |  |  213|  34.4k|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  |  Branch (171:16): [True: 0, False: 34.4k]
  ------------------
  172|       |        /* reset IV for these modes to keep compatibility with 1.1.1 */
  173|      0|        memcpy(ctx->iv, ctx->oiv, ctx->ivlen);
  174|       |
  175|   121k|    if (key != NULL) {
  ------------------
  |  Branch (175:9): [True: 84.8k, False: 36.1k]
  ------------------
  176|  84.8k|        if (ctx->variable_keylength == 0) {
  ------------------
  |  Branch (176:13): [True: 84.8k, False: 0]
  ------------------
  177|  84.8k|            if (keylen != ctx->keylen) {
  ------------------
  |  Branch (177:17): [True: 0, False: 84.8k]
  ------------------
  178|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|                return 0;
  180|      0|            }
  181|  84.8k|        } else {
  182|      0|            ctx->keylen = keylen;
  183|      0|        }
  184|  84.8k|        if (!ctx->hw->init(ctx, key, ctx->keylen))
  ------------------
  |  Branch (184:13): [True: 0, False: 84.8k]
  ------------------
  185|      0|            return 0;
  186|  84.8k|        ctx->key_set = 1;
  187|  84.8k|    }
  188|   121k|    return ossl_cipher_generic_set_ctx_params(ctx, params);
  189|   121k|}

ciphercommon.c:ossl_cipher_generic_get_params_decoder:
   47|   145k|{
   48|   145k|    const char *s;
   49|       |
   50|   145k|    memset(r, 0, sizeof(*r));
   51|   145k|    if (p != NULL)
  ------------------
  |  Branch (51:9): [True: 145k, False: 0]
  ------------------
   52|  1.12M|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (52:16): [True: 975k, False: 145k]
  ------------------
   53|   975k|            switch(s[0]) {
   54|  53.7k|            default:
  ------------------
  |  Branch (54:13): [True: 53.7k, False: 921k]
  ------------------
   55|  53.7k|                break;
   56|  92.1k|            case 'a':
  ------------------
  |  Branch (56:13): [True: 92.1k, False: 883k]
  ------------------
   57|  92.1k|                if (ossl_likely(strcmp("ead", s + 1) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
   58|       |                    /* OSSL_CIPHER_PARAM_AEAD */
   59|  92.1k|                    if (ossl_unlikely(r->aead != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
   60|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   61|      0|                                       "param %s is repeated", s);
   62|      0|                        return 0;
   63|      0|                    }
   64|  92.1k|                    r->aead = (OSSL_PARAM *)p;
   65|  92.1k|                }
   66|  92.1k|                break;
   67|  92.1k|            case 'b':
  ------------------
  |  Branch (67:13): [True: 92.1k, False: 883k]
  ------------------
   68|  92.1k|                if (ossl_likely(strcmp("locksize", s + 1) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
   69|       |                    /* OSSL_CIPHER_PARAM_BLOCK_SIZE */
   70|  92.1k|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
   71|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   72|      0|                                       "param %s is repeated", s);
   73|      0|                        return 0;
   74|      0|                    }
   75|  92.1k|                    r->bsize = (OSSL_PARAM *)p;
   76|  92.1k|                }
   77|  92.1k|                break;
   78|   184k|            case 'c':
  ------------------
  |  Branch (78:13): [True: 184k, False: 791k]
  ------------------
   79|   184k|                switch(s[1]) {
   80|      0|                default:
  ------------------
  |  Branch (80:17): [True: 0, False: 184k]
  ------------------
   81|      0|                    break;
   82|  92.1k|                case 't':
  ------------------
  |  Branch (82:17): [True: 92.1k, False: 92.1k]
  ------------------
   83|  92.1k|                    if (ossl_likely(strcmp("s", s + 2) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
   84|       |                        /* OSSL_CIPHER_PARAM_CTS */
   85|  92.1k|                        if (ossl_unlikely(r->cts != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
   86|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   87|      0|                                           "param %s is repeated", s);
   88|      0|                            return 0;
   89|      0|                        }
   90|  92.1k|                        r->cts = (OSSL_PARAM *)p;
   91|  92.1k|                    }
   92|  92.1k|                    break;
   93|  92.1k|                case 'u':
  ------------------
  |  Branch (93:17): [True: 92.1k, False: 92.1k]
  ------------------
   94|  92.1k|                    if (ossl_likely(strcmp("stom-iv", s + 2) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
   95|       |                        /* OSSL_CIPHER_PARAM_CUSTOM_IV */
   96|  92.1k|                        if (ossl_unlikely(r->custiv != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
   97|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   98|      0|                                           "param %s is repeated", s);
   99|      0|                            return 0;
  100|      0|                        }
  101|  92.1k|                        r->custiv = (OSSL_PARAM *)p;
  102|  92.1k|                    }
  103|   184k|                }
  104|   184k|                break;
  105|   184k|            case 'e':
  ------------------
  |  Branch (105:13): [True: 92.1k, False: 883k]
  ------------------
  106|  92.1k|                if (ossl_likely(strcmp("ncrypt-then-mac", s + 1) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
  107|       |                    /* OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC */
  108|  92.1k|                    if (ossl_unlikely(r->etm != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
  109|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  110|      0|                                       "param %s is repeated", s);
  111|      0|                        return 0;
  112|      0|                    }
  113|  92.1k|                    r->etm = (OSSL_PARAM *)p;
  114|  92.1k|                }
  115|  92.1k|                break;
  116|  92.1k|            case 'h':
  ------------------
  |  Branch (116:13): [True: 92.1k, False: 883k]
  ------------------
  117|  92.1k|                if (ossl_likely(strcmp("as-randkey", s + 1) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
  118|       |                    /* OSSL_CIPHER_PARAM_HAS_RAND_KEY */
  119|  92.1k|                    if (ossl_unlikely(r->rand != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
  120|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  121|      0|                                       "param %s is repeated", s);
  122|      0|                        return 0;
  123|      0|                    }
  124|  92.1k|                    r->rand = (OSSL_PARAM *)p;
  125|  92.1k|                }
  126|  92.1k|                break;
  127|  92.1k|            case 'i':
  ------------------
  |  Branch (127:13): [True: 92.1k, False: 883k]
  ------------------
  128|  92.1k|                if (ossl_likely(strcmp("vlen", s + 1) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
  129|       |                    /* OSSL_CIPHER_PARAM_IVLEN */
  130|  92.1k|                    if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
  131|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  132|      0|                                       "param %s is repeated", s);
  133|      0|                        return 0;
  134|      0|                    }
  135|  92.1k|                    r->ivlen = (OSSL_PARAM *)p;
  136|  92.1k|                }
  137|  92.1k|                break;
  138|  92.1k|            case 'k':
  ------------------
  |  Branch (138:13): [True: 92.1k, False: 883k]
  ------------------
  139|  92.1k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
  140|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  141|  92.1k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
  142|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  143|      0|                                       "param %s is repeated", s);
  144|      0|                        return 0;
  145|      0|                    }
  146|  92.1k|                    r->keylen = (OSSL_PARAM *)p;
  147|  92.1k|                }
  148|  92.1k|                break;
  149|  92.1k|            case 'm':
  ------------------
  |  Branch (149:13): [True: 92.1k, False: 883k]
  ------------------
  150|  92.1k|                if (ossl_likely(strcmp("ode", s + 1) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
  151|       |                    /* OSSL_CIPHER_PARAM_MODE */
  152|  92.1k|                    if (ossl_unlikely(r->mode != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
  153|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  154|      0|                                       "param %s is repeated", s);
  155|      0|                        return 0;
  156|      0|                    }
  157|  92.1k|                    r->mode = (OSSL_PARAM *)p;
  158|  92.1k|                }
  159|  92.1k|                break;
  160|  92.1k|            case 't':
  ------------------
  |  Branch (160:13): [True: 92.1k, False: 883k]
  ------------------
  161|  92.1k|                if (ossl_likely(strcmp("ls-multi", s + 1) == 0)) {
  ------------------
  |  |   22|  92.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 92.1k, False: 0]
  |  |  ------------------
  ------------------
  162|       |                    /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK */
  163|  92.1k|                    if (ossl_unlikely(r->mb != NULL)) {
  ------------------
  |  |   23|  92.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 92.1k]
  |  |  ------------------
  ------------------
  164|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  165|      0|                                       "param %s is repeated", s);
  166|      0|                        return 0;
  167|      0|                    }
  168|  92.1k|                    r->mb = (OSSL_PARAM *)p;
  169|  92.1k|                }
  170|   975k|            }
  171|   145k|    return 1;
  172|   145k|}
ciphercommon.c:cipher_generic_get_ctx_params_decoder:
  205|  7.15k|{
  206|  7.15k|    const char *s;
  207|       |
  208|  7.15k|    memset(r, 0, sizeof(*r));
  209|  7.15k|    if (p != NULL)
  ------------------
  |  Branch (209:9): [True: 7.15k, False: 0]
  ------------------
  210|  14.3k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (210:16): [True: 7.15k, False: 7.15k]
  ------------------
  211|  7.15k|            switch(s[0]) {
  212|      0|            default:
  ------------------
  |  Branch (212:13): [True: 0, False: 7.15k]
  ------------------
  213|      0|                break;
  214|  1.78k|            case 'i':
  ------------------
  |  Branch (214:13): [True: 1.78k, False: 5.36k]
  ------------------
  215|  1.78k|                switch(s[1]) {
  216|      0|                default:
  ------------------
  |  Branch (216:17): [True: 0, False: 1.78k]
  ------------------
  217|      0|                    break;
  218|  1.78k|                case 'v':
  ------------------
  |  Branch (218:17): [True: 1.78k, False: 0]
  ------------------
  219|  1.78k|                    switch(s[2]) {
  220|      0|                    default:
  ------------------
  |  Branch (220:21): [True: 0, False: 1.78k]
  ------------------
  221|      0|                        break;
  222|  1.78k|                    case 'l':
  ------------------
  |  Branch (222:21): [True: 1.78k, False: 0]
  ------------------
  223|  1.78k|                        if (ossl_likely(strcmp("en", s + 3) == 0)) {
  ------------------
  |  |   22|  1.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.78k, False: 0]
  |  |  ------------------
  ------------------
  224|       |                            /* OSSL_CIPHER_PARAM_IVLEN */
  225|  1.78k|                            if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  1.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78k]
  |  |  ------------------
  ------------------
  226|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  227|      0|                                               "param %s is repeated", s);
  228|      0|                                return 0;
  229|      0|                            }
  230|  1.78k|                            r->ivlen = (OSSL_PARAM *)p;
  231|  1.78k|                        }
  232|  1.78k|                        break;
  233|  1.78k|                    case '\0':
  ------------------
  |  Branch (233:21): [True: 0, False: 1.78k]
  ------------------
  234|      0|                        if (ossl_unlikely(r->iv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  235|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  236|      0|                                           "param %s is repeated", s);
  237|      0|                            return 0;
  238|      0|                        }
  239|      0|                        r->iv = (OSSL_PARAM *)p;
  240|  1.78k|                    }
  241|  1.78k|                }
  242|  1.78k|                break;
  243|  5.36k|            case 'k':
  ------------------
  |  Branch (243:13): [True: 5.36k, False: 1.78k]
  ------------------
  244|  5.36k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  5.36k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 5.36k, False: 0]
  |  |  ------------------
  ------------------
  245|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  246|  5.36k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  5.36k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 5.36k]
  |  |  ------------------
  ------------------
  247|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  248|      0|                                       "param %s is repeated", s);
  249|      0|                        return 0;
  250|      0|                    }
  251|  5.36k|                    r->keylen = (OSSL_PARAM *)p;
  252|  5.36k|                }
  253|  5.36k|                break;
  254|  5.36k|            case 'n':
  ------------------
  |  Branch (254:13): [True: 0, False: 7.15k]
  ------------------
  255|      0|                if (ossl_likely(strcmp("um", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  256|       |                    /* OSSL_CIPHER_PARAM_NUM */
  257|      0|                    if (ossl_unlikely(r->num != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  258|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  259|      0|                                       "param %s is repeated", s);
  260|      0|                        return 0;
  261|      0|                    }
  262|      0|                    r->num = (OSSL_PARAM *)p;
  263|      0|                }
  264|      0|                break;
  265|      0|            case 'p':
  ------------------
  |  Branch (265:13): [True: 0, False: 7.15k]
  ------------------
  266|      0|                if (ossl_likely(strcmp("adding", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  267|       |                    /* OSSL_CIPHER_PARAM_PADDING */
  268|      0|                    if (ossl_unlikely(r->pad != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  269|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  270|      0|                                       "param %s is repeated", s);
  271|      0|                        return 0;
  272|      0|                    }
  273|      0|                    r->pad = (OSSL_PARAM *)p;
  274|      0|                }
  275|      0|                break;
  276|      0|            case 't':
  ------------------
  |  Branch (276:13): [True: 0, False: 7.15k]
  ------------------
  277|      0|                if (ossl_likely(strcmp("ls-mac", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  278|       |                    /* OSSL_CIPHER_PARAM_TLS_MAC */
  279|      0|                    if (ossl_unlikely(r->tlsmac != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  280|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  281|      0|                                       "param %s is repeated", s);
  282|      0|                        return 0;
  283|      0|                    }
  284|      0|                    r->tlsmac = (OSSL_PARAM *)p;
  285|      0|                }
  286|      0|                break;
  287|      0|            case 'u':
  ------------------
  |  Branch (287:13): [True: 0, False: 7.15k]
  ------------------
  288|      0|                if (ossl_likely(strcmp("pdated-iv", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  289|       |                    /* OSSL_CIPHER_PARAM_UPDATED_IV */
  290|      0|                    if (ossl_unlikely(r->updiv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  291|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  292|      0|                                       "param %s is repeated", s);
  293|      0|                        return 0;
  294|      0|                    }
  295|      0|                    r->updiv = (OSSL_PARAM *)p;
  296|      0|                }
  297|  7.15k|            }
  298|  7.15k|    return 1;
  299|  7.15k|}

ossl_ccm_gettable_ctx_params:
  150|  4.96k|{
  151|  4.96k|    return ossl_cipher_ccm_get_ctx_params_list;
  152|  4.96k|}

ossl_gcm_gettable_ctx_params:
  149|  4.96k|{
  150|  4.96k|    return ossl_cipher_gcm_get_ctx_params_list;
  151|  4.96k|}

ossl_cipher_hw_generic_ctr:
  112|  32.6k|{
  113|  32.6k|    unsigned int num = dat->num;
  114|       |
  115|  32.6k|    if (dat->stream.ctr)
  ------------------
  |  Branch (115:9): [True: 32.6k, False: 0]
  ------------------
  116|  32.6k|        CRYPTO_ctr128_encrypt_ctr32(in, out, len, dat->ks, dat->iv, dat->buf,
  117|  32.6k|            &num, dat->stream.ctr);
  118|      0|    else
  119|      0|        CRYPTO_ctr128_encrypt(in, out, len, dat->ks, dat->iv, dat->buf,
  120|      0|            &num, dat->block);
  121|  32.6k|    dat->num = num;
  122|       |
  123|  32.6k|    return 1;
  124|  32.6k|}

blake2_prov.c:blake2s256_get_params:
  166|    709|    {                                                                                                             \
  167|    709|        return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, BLAKE##VARIANT##_OUTBYTES, 0); \
  ------------------
  |  |   19|    709|#define BLAKE2S_BLOCKBYTES 64
  ------------------
                      return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, BLAKE##VARIANT##_OUTBYTES, 0); \
  ------------------
  |  |   20|    709|#define BLAKE2S_OUTBYTES 32
  ------------------
  168|    709|    }                                                                                                             \
blake2_prov.c:blake2b512_get_params:
  166|    709|    {                                                                                                             \
  167|    709|        return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, BLAKE##VARIANT##_OUTBYTES, 0); \
  ------------------
  |  |   25|    709|#define BLAKE2B_BLOCKBYTES 128
  ------------------
                      return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, BLAKE##VARIANT##_OUTBYTES, 0); \
  ------------------
  |  |   26|    709|#define BLAKE2B_OUTBYTES 64
  ------------------
  168|    709|    }                                                                                                             \

ossl_digest_default_get_params:
   20|  21.2k|{
   21|  21.2k|    struct digest_default_get_params_st p;
   22|       |
   23|  21.2k|    if (!digest_default_get_params_decoder(params, &p))
  ------------------
  |  Branch (23:9): [True: 0, False: 21.2k]
  ------------------
   24|      0|        return 0;
   25|       |
   26|  21.2k|    if (p.bsize != NULL && !OSSL_PARAM_set_size_t(p.bsize, blksz)) {
  ------------------
  |  Branch (26:9): [True: 21.2k, False: 0]
  |  Branch (26:28): [True: 0, False: 21.2k]
  ------------------
   27|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   28|      0|        return 0;
   29|      0|    }
   30|  21.2k|    if (p.size != NULL && !OSSL_PARAM_set_size_t(p.size, paramsz)) {
  ------------------
  |  Branch (30:9): [True: 21.2k, False: 0]
  |  Branch (30:27): [True: 0, False: 21.2k]
  ------------------
   31|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   32|      0|        return 0;
   33|      0|    }
   34|  21.2k|    if (p.xof != NULL
  ------------------
  |  Branch (34:9): [True: 21.2k, False: 0]
  ------------------
   35|  21.2k|        && !OSSL_PARAM_set_int(p.xof, (flags & PROV_DIGEST_FLAG_XOF) != 0)) {
  ------------------
  |  |   19|  21.2k|#define PROV_DIGEST_FLAG_XOF 0x0001
  ------------------
  |  Branch (35:12): [True: 0, False: 21.2k]
  ------------------
   36|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   37|      0|        return 0;
   38|      0|    }
   39|  21.2k|    if (p.aldid != NULL
  ------------------
  |  Branch (39:9): [True: 21.2k, False: 0]
  ------------------
   40|  21.2k|        && !OSSL_PARAM_set_int(p.aldid, (flags & PROV_DIGEST_FLAG_ALGID_ABSENT) != 0)) {
  ------------------
  |  |   20|  21.2k|#define PROV_DIGEST_FLAG_ALGID_ABSENT 0x0002
  ------------------
  |  Branch (40:12): [True: 0, False: 21.2k]
  ------------------
   41|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   42|      0|        return 0;
   43|      0|    }
   44|  21.2k|    return 1;
   45|  21.2k|}

digestcommon.c:digest_default_get_params_decoder:
   35|  21.2k|{
   36|  21.2k|    const char *s;
   37|       |
   38|  21.2k|    memset(r, 0, sizeof(*r));
   39|  21.2k|    if (p != NULL)
  ------------------
  |  Branch (39:9): [True: 21.2k, False: 0]
  ------------------
   40|   106k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (40:16): [True: 85.0k, False: 21.2k]
  ------------------
   41|  85.0k|            switch(s[0]) {
   42|      0|            default:
  ------------------
  |  Branch (42:13): [True: 0, False: 85.0k]
  ------------------
   43|      0|                break;
   44|  21.2k|            case 'a':
  ------------------
  |  Branch (44:13): [True: 21.2k, False: 63.8k]
  ------------------
   45|  21.2k|                if (ossl_likely(strcmp("lgid-absent", s + 1) == 0)) {
  ------------------
  |  |   22|  21.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 21.2k, False: 0]
  |  |  ------------------
  ------------------
   46|       |                    /* OSSL_DIGEST_PARAM_ALGID_ABSENT */
   47|  21.2k|                    if (ossl_unlikely(r->aldid != NULL)) {
  ------------------
  |  |   23|  21.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 21.2k]
  |  |  ------------------
  ------------------
   48|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   49|      0|                                       "param %s is repeated", s);
   50|      0|                        return 0;
   51|      0|                    }
   52|  21.2k|                    r->aldid = (OSSL_PARAM *)p;
   53|  21.2k|                }
   54|  21.2k|                break;
   55|  21.2k|            case 'b':
  ------------------
  |  Branch (55:13): [True: 21.2k, False: 63.8k]
  ------------------
   56|  21.2k|                if (ossl_likely(strcmp("locksize", s + 1) == 0)) {
  ------------------
  |  |   22|  21.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 21.2k, False: 0]
  |  |  ------------------
  ------------------
   57|       |                    /* OSSL_DIGEST_PARAM_BLOCK_SIZE */
   58|  21.2k|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|  21.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 21.2k]
  |  |  ------------------
  ------------------
   59|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   60|      0|                                       "param %s is repeated", s);
   61|      0|                        return 0;
   62|      0|                    }
   63|  21.2k|                    r->bsize = (OSSL_PARAM *)p;
   64|  21.2k|                }
   65|  21.2k|                break;
   66|  21.2k|            case 's':
  ------------------
  |  Branch (66:13): [True: 21.2k, False: 63.8k]
  ------------------
   67|  21.2k|                if (ossl_likely(strcmp("ize", s + 1) == 0)) {
  ------------------
  |  |   22|  21.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 21.2k, False: 0]
  |  |  ------------------
  ------------------
   68|       |                    /* OSSL_DIGEST_PARAM_SIZE */
   69|  21.2k|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|  21.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 21.2k]
  |  |  ------------------
  ------------------
   70|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   71|      0|                                       "param %s is repeated", s);
   72|      0|                        return 0;
   73|      0|                    }
   74|  21.2k|                    r->size = (OSSL_PARAM *)p;
   75|  21.2k|                }
   76|  21.2k|                break;
   77|  21.2k|            case 'x':
  ------------------
  |  Branch (77:13): [True: 21.2k, False: 63.8k]
  ------------------
   78|  21.2k|                if (ossl_likely(strcmp("of", s + 1) == 0)) {
  ------------------
  |  |   22|  21.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 21.2k, False: 0]
  |  |  ------------------
  ------------------
   79|       |                    /* OSSL_DIGEST_PARAM_XOF */
   80|  21.2k|                    if (ossl_unlikely(r->xof != NULL)) {
  ------------------
  |  |   23|  21.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 21.2k]
  |  |  ------------------
  ------------------
   81|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   82|      0|                                       "param %s is repeated", s);
   83|      0|                        return 0;
   84|      0|                    }
   85|  21.2k|                    r->xof = (OSSL_PARAM *)p;
   86|  21.2k|                }
   87|  85.0k|            }
   88|  21.2k|    return 1;
   89|  21.2k|}

ml_dsa_mu_prov.c:mu_get_params:
  136|    709|{
  137|    709|    return ossl_digest_default_get_params(params, SHA3_BLOCKSIZE(256),
  ------------------
  |  |   21|    709|#define SHA3_BLOCKSIZE(bitlen) (KECCAK1600_WIDTH - bitlen * 2) / 8
  |  |  ------------------
  |  |  |  |   18|    709|#define KECCAK1600_WIDTH 1600
  |  |  ------------------
  ------------------
  138|    709|        SHAKE256_SIZE, SHAKE_FLAGS);
  ------------------
  |  |   36|    709|#define SHAKE256_SIZE 64
  ------------------
                      SHAKE256_SIZE, SHAKE_FLAGS);
  ------------------
  |  |   37|    709|#define SHAKE_FLAGS (PROV_DIGEST_FLAG_ALGID_ABSENT)
  |  |  ------------------
  |  |  |  |   20|    709|#define PROV_DIGEST_FLAG_ALGID_ABSENT 0x0002
  |  |  ------------------
  ------------------
  139|    709|}

sha2_prov.c:sha1_set_ctx_params:
   39|   441k|{
   40|   441k|    struct sha1_set_ctx_params_st p;
   41|   441k|    SHA_CTX *ctx = (SHA_CTX *)vctx;
   42|       |
   43|   441k|    if (ossl_unlikely(ctx == NULL || !sha1_set_ctx_params_decoder(params, &p)))
  ------------------
  |  |   23|   882k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 441k]
  |  |  |  Branch (23:46): [True: 0, False: 441k]
  |  |  |  Branch (23:46): [True: 0, False: 441k]
  |  |  ------------------
  ------------------
   44|      0|        return 0;
   45|       |
   46|   441k|    if (p.ssl3_ms != NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 441k]
  ------------------
   47|      0|        return ossl_sha1_ctrl(ctx, EVP_CTRL_SSL3_MASTER_SECRET,
  ------------------
  |  |  318|      0|#define EVP_CTRL_SSL3_MASTER_SECRET 0x1d
  ------------------
   48|      0|            (int)p.ssl3_ms->data_size, p.ssl3_ms->data);
   49|       |
   50|   441k|    return 1;
   51|   441k|}

sha2_prov.c:sha1_set_ctx_params_decoder:
   29|   441k|{
   30|   441k|    const char *s;
   31|       |
   32|   441k|    memset(r, 0, sizeof(*r));
   33|   441k|    if (p != NULL)
  ------------------
  |  Branch (33:9): [True: 0, False: 441k]
  ------------------
   34|      0|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (34:16): [True: 0, False: 0]
  ------------------
   35|      0|            if (ossl_likely(strcmp("ssl3-ms", s + 0) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   36|       |                /* OSSL_DIGEST_PARAM_SSL3_MS */
   37|      0|                if (ossl_unlikely(r->ssl3_ms != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   38|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   39|      0|                                   "param %s is repeated", s);
   40|      0|                    return 0;
   41|      0|                }
   42|      0|                r->ssl3_ms = (OSSL_PARAM *)p;
   43|      0|            }
   44|   441k|    return 1;
   45|   441k|}

sha3_prov.c:keccak_update:
  115|  41.9k|{
  116|  41.9k|    return ossl_sha3_absorb((KECCAK1600_CTX *)vctx, inp, len);
  117|  41.9k|}
sha3_prov.c:keccak_final:
  121|  16.7k|{
  122|  16.7k|    int ret = 1;
  123|  16.7k|    KECCAK1600_CTX *ctx = vctx;
  124|       |
  125|  16.7k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|  16.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 16.7k]
  |  |  ------------------
  ------------------
  126|      0|        return 0;
  127|  16.7k|    if (ossl_unlikely(ctx->md_size == SIZE_MAX)) {
  ------------------
  |  |   23|  16.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 16.7k]
  |  |  ------------------
  ------------------
  128|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_DIGEST_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  129|      0|        return 0;
  130|      0|    }
  131|  16.7k|    ret = ossl_sha3_final(ctx, out, ctx->md_size);
  132|  16.7k|    *outl = ctx->md_size;
  133|  16.7k|    return ret;
  134|  16.7k|}
sha3_prov.c:keccak_freectx:
  503|  8.38k|{
  504|  8.38k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  505|       |
  506|  8.38k|    OPENSSL_clear_free(ctx, sizeof(*ctx));
  ------------------
  |  |  130|  8.38k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  507|  8.38k|}
sha3_prov.c:keccak_init:
  100|  35.6k|{
  101|  35.6k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|  35.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 35.6k]
  |  |  ------------------
  ------------------
  102|      0|        return 0;
  103|       |    /* The newctx() handles most of the ctx fixed setup. */
  104|  35.6k|    ossl_sha3_reset((KECCAK1600_CTX *)vctx);
  105|  35.6k|    return 1;
  106|  35.6k|}
sha3_prov.c:shake_squeeze:
  138|  56.7k|{
  139|  56.7k|    int ret = 1;
  140|  56.7k|    KECCAK1600_CTX *ctx = vctx;
  141|       |
  142|  56.7k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (142:9): [True: 0, False: 56.7k]
  ------------------
  143|      0|        return 0;
  144|  56.7k|    if (ctx->meth.squeeze == NULL)
  ------------------
  |  Branch (144:9): [True: 0, False: 56.7k]
  ------------------
  145|      0|        return 0;
  146|  56.7k|    if (outlen > 0)
  ------------------
  |  Branch (146:9): [True: 56.7k, False: 0]
  ------------------
  147|  56.7k|        ret = ossl_sha3_squeeze(ctx, out, outlen);
  148|  56.7k|    if (outl != NULL)
  ------------------
  |  Branch (148:9): [True: 56.7k, False: 0]
  ------------------
  149|  56.7k|        *outl = outlen;
  150|  56.7k|    return ret;
  151|  56.7k|}
sha3_prov.c:keccak_init_params:
  109|  31.4k|{
  110|  31.4k|    return keccak_init(vctx, NULL)
  ------------------
  |  Branch (110:12): [True: 31.4k, False: 0]
  ------------------
  111|  31.4k|        && shake_set_ctx_params(vctx, params);
  ------------------
  |  Branch (111:12): [True: 31.4k, False: 0]
  ------------------
  112|  31.4k|}
sha3_prov.c:shake_set_ctx_params:
  692|  44.0k|{
  693|  44.0k|    struct shake_set_ctx_params_st p;
  694|  44.0k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  695|       |
  696|  44.0k|    if (ossl_unlikely(ctx == NULL || !shake_set_ctx_params_decoder(params, &p)))
  ------------------
  |  |   23|  88.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 44.0k]
  |  |  |  Branch (23:46): [True: 0, False: 44.0k]
  |  |  |  Branch (23:46): [True: 0, False: 44.0k]
  |  |  ------------------
  ------------------
  697|      0|        return 0;
  698|       |
  699|  44.0k|    if (ossl_unlikely(p.xoflen != NULL
  ------------------
  |  |   23|  56.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 44.0k]
  |  |  |  Branch (23:46): [True: 12.5k, False: 31.4k]
  |  |  |  Branch (23:46): [True: 0, False: 12.5k]
  |  |  ------------------
  ------------------
  700|  44.0k|            && !OSSL_PARAM_get_size_t(p.xoflen, &ctx->md_size))) {
  701|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  702|      0|        return 0;
  703|      0|    }
  704|  44.0k|    return 1;
  705|  44.0k|}

sha3_prov.c:shake_set_ctx_params_decoder:
   85|  44.0k|{
   86|  44.0k|    const char *s;
   87|       |
   88|  44.0k|    memset(r, 0, sizeof(*r));
   89|  44.0k|    if (p != NULL)
  ------------------
  |  Branch (89:9): [True: 12.5k, False: 31.4k]
  ------------------
   90|  25.1k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (90:16): [True: 12.5k, False: 12.5k]
  ------------------
   91|  12.5k|            switch(s[0]) {
   92|      0|            default:
  ------------------
  |  Branch (92:13): [True: 0, False: 12.5k]
  ------------------
   93|      0|                break;
   94|      0|            case 's':
  ------------------
  |  Branch (94:13): [True: 0, False: 12.5k]
  ------------------
   95|      0|                if (ossl_likely(strcmp("ize", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   96|       |                    /* OSSL_DIGEST_PARAM_SIZE */
   97|      0|                    if (ossl_unlikely(r->xoflen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   98|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   99|      0|                                       "param %s is repeated", s);
  100|      0|                        return 0;
  101|      0|                    }
  102|      0|                    r->xoflen = (OSSL_PARAM *)p;
  103|      0|                }
  104|      0|                break;
  105|  12.5k|            case 'x':
  ------------------
  |  Branch (105:13): [True: 12.5k, False: 0]
  ------------------
  106|  12.5k|                if (ossl_likely(strcmp("oflen", s + 1) == 0)) {
  ------------------
  |  |   22|  12.5k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 12.5k, False: 0]
  |  |  ------------------
  ------------------
  107|       |                    /* OSSL_DIGEST_PARAM_XOFLEN */
  108|  12.5k|                    if (ossl_unlikely(r->xoflen != NULL)) {
  ------------------
  |  |   23|  12.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 12.5k]
  |  |  ------------------
  ------------------
  109|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  110|      0|                                       "param %s is repeated", s);
  111|      0|                        return 0;
  112|      0|                    }
  113|  12.5k|                    r->xoflen = (OSSL_PARAM *)p;
  114|  12.5k|                }
  115|  12.5k|            }
  116|  44.0k|    return 1;
  117|  44.0k|}

decode_der2key.c:der2key_newctx:
  164|  1.34M|{
  165|  1.34M|    struct der2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  1.34M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  166|       |
  167|  1.34M|    if (ctx != NULL) {
  ------------------
  |  Branch (167:9): [True: 1.34M, False: 0]
  ------------------
  168|  1.34M|        ctx->provctx = provctx;
  169|  1.34M|        ctx->desc = desc;
  170|  1.34M|    }
  171|  1.34M|    return ctx;
  172|  1.34M|}
decode_der2key.c:der2key_freectx:
  197|  1.34M|{
  198|  1.34M|    struct der2key_ctx_st *ctx = vctx;
  199|       |
  200|  1.34M|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  1.34M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  201|  1.34M|}
decode_der2key.c:PrivateKeyInfo_der2dh_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:der2key_check_selection:
  205|    138|{
  206|       |    /*
  207|       |     * The selections are kinda sorta "levels", i.e. each selection given
  208|       |     * here is assumed to include those following.
  209|       |     */
  210|    138|    int checks[] = {
  211|    138|        OSSL_KEYMGMT_SELECT_PRIVATE_KEY,
  ------------------
  |  |  646|    138|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  212|    138|        OSSL_KEYMGMT_SELECT_PUBLIC_KEY,
  ------------------
  |  |  647|    138|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  213|    138|        OSSL_KEYMGMT_SELECT_ALL_PARAMETERS
  ------------------
  |  |  653|    138|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  648|    138|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  654|    138|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  649|    138|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
  214|    138|    };
  215|    138|    size_t i;
  216|       |
  217|       |    /* The decoder implementations made here support guessing */
  218|    138|    if (selection == 0)
  ------------------
  |  Branch (218:9): [True: 0, False: 138]
  ------------------
  219|      0|        return 1;
  220|       |
  221|    276|    for (i = 0; i < OSSL_NELEM(checks); i++) {
  ------------------
  |  |   14|    276|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (221:17): [True: 276, False: 0]
  ------------------
  222|    276|        int check1 = (selection & checks[i]) != 0;
  223|    276|        int check2 = (desc->selection_mask & checks[i]) != 0;
  224|       |
  225|       |        /*
  226|       |         * If the caller asked for the currently checked bit(s), return
  227|       |         * whether the decoder description says it's supported.
  228|       |         */
  229|    276|        if (check1)
  ------------------
  |  Branch (229:13): [True: 138, False: 138]
  ------------------
  230|    138|            return check2;
  231|    276|    }
  232|       |
  233|       |    /* This should be dead code, but just to be safe... */
  234|      0|    return 0;
  235|    138|}
decode_der2key.c:der2key_decode:
  240|   503k|{
  241|   503k|    struct der2key_ctx_st *ctx = vctx;
  242|   503k|    unsigned char *der = NULL;
  243|   503k|    const unsigned char *derp;
  244|   503k|    long der_len = 0;
  245|   503k|    void *key = NULL;
  246|   503k|    int ok = 0;
  247|       |
  248|   503k|    ctx->selection = selection;
  249|       |    /*
  250|       |     * The caller is allowed to specify 0 as a selection mask, to have the
  251|       |     * structure and key type guessed.  For type-specific structures, this
  252|       |     * is not recommended, as some structures are very similar.
  253|       |     * Note that 0 isn't the same as OSSL_KEYMGMT_SELECT_ALL, as the latter
  254|       |     * signifies a private key structure, where everything else is assumed
  255|       |     * to be present as well.
  256|       |     */
  257|   503k|    if (selection == 0)
  ------------------
  |  Branch (257:9): [True: 0, False: 503k]
  ------------------
  258|      0|        selection = ctx->desc->selection_mask;
  259|   503k|    if ((selection & ctx->desc->selection_mask) == 0) {
  ------------------
  |  Branch (259:9): [True: 0, False: 503k]
  ------------------
  260|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  261|      0|        return 0;
  262|      0|    }
  263|       |
  264|   503k|    ok = ossl_read_der(ctx->provctx, cin, &der, &der_len);
  265|   503k|    if (!ok)
  ------------------
  |  Branch (265:9): [True: 0, False: 503k]
  ------------------
  266|      0|        goto next;
  267|       |
  268|   503k|    ok = 0; /* Assume that we fail */
  269|       |
  270|   503k|    ERR_set_mark();
  271|   503k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  646|   503k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (271:9): [True: 0, False: 503k]
  ------------------
  272|      0|        derp = der;
  273|      0|        if (ctx->desc->d2i_PKCS8 != NULL) {
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  ------------------
  274|      0|            key = ctx->desc->d2i_PKCS8(&derp, der_len, ctx);
  275|      0|            if (ctx->flag_fatal) {
  ------------------
  |  Branch (275:17): [True: 0, False: 0]
  ------------------
  276|      0|                ERR_clear_last_mark();
  277|      0|                goto end;
  278|      0|            }
  279|      0|        } else if (ctx->desc->d2i_private_key != NULL) {
  ------------------
  |  Branch (279:20): [True: 0, False: 0]
  ------------------
  280|      0|            key = ctx->desc->d2i_private_key(NULL, &derp, der_len);
  281|      0|        }
  282|      0|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (282:13): [True: 0, False: 0]
  |  Branch (282:28): [True: 0, False: 0]
  ------------------
  283|      0|            ERR_clear_last_mark();
  284|      0|            goto next;
  285|      0|        }
  286|      0|    }
  287|   503k|    if (key == NULL && (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  647|   503k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (287:9): [True: 503k, False: 0]
  |  Branch (287:24): [True: 503k, False: 0]
  ------------------
  288|   503k|        derp = der;
  289|   503k|        if (ctx->desc->d2i_PUBKEY != NULL)
  ------------------
  |  Branch (289:13): [True: 503k, False: 0]
  ------------------
  290|   503k|            key = ctx->desc->d2i_PUBKEY(&derp, der_len, ctx);
  291|      0|        else if (ctx->desc->d2i_public_key != NULL)
  ------------------
  |  Branch (291:18): [True: 0, False: 0]
  ------------------
  292|      0|            key = ctx->desc->d2i_public_key(NULL, &derp, der_len);
  293|   503k|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (293:13): [True: 0, False: 503k]
  |  Branch (293:28): [True: 0, False: 0]
  ------------------
  294|      0|            ERR_clear_last_mark();
  295|      0|            goto next;
  296|      0|        }
  297|   503k|    }
  298|   503k|    if (key == NULL && (selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) {
  ------------------
  |  |  653|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  648|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  654|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  649|      0|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
  |  Branch (298:9): [True: 0, False: 503k]
  |  Branch (298:24): [True: 0, False: 0]
  ------------------
  299|      0|        derp = der;
  300|      0|        if (ctx->desc->d2i_key_params != NULL)
  ------------------
  |  Branch (300:13): [True: 0, False: 0]
  ------------------
  301|      0|            key = ctx->desc->d2i_key_params(NULL, &derp, der_len);
  302|      0|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (302:13): [True: 0, False: 0]
  |  Branch (302:28): [True: 0, False: 0]
  ------------------
  303|      0|            ERR_clear_last_mark();
  304|      0|            goto next;
  305|      0|        }
  306|      0|    }
  307|   503k|    if (key == NULL)
  ------------------
  |  Branch (307:9): [True: 0, False: 503k]
  ------------------
  308|      0|        ERR_clear_last_mark();
  309|   503k|    else
  310|   503k|        ERR_pop_to_mark();
  311|       |
  312|       |    /*
  313|       |     * Last minute check to see if this was the correct type of key.  This
  314|       |     * should never lead to a fatal error, i.e. the decoding itself was
  315|       |     * correct, it was just an unexpected key type.  This is generally for
  316|       |     * classes of key types that have subtle variants, like RSA-PSS keys as
  317|       |     * opposed to plain RSA keys.
  318|       |     */
  319|   503k|    if (key != NULL
  ------------------
  |  Branch (319:9): [True: 503k, False: 0]
  ------------------
  320|   503k|        && ctx->desc->check_key != NULL
  ------------------
  |  Branch (320:12): [True: 503k, False: 0]
  ------------------
  321|   503k|        && !ctx->desc->check_key(key, ctx)) {
  ------------------
  |  Branch (321:12): [True: 0, False: 503k]
  ------------------
  322|      0|        ctx->desc->free_key(key);
  323|      0|        key = NULL;
  324|      0|    }
  325|       |
  326|   503k|    if (key != NULL && ctx->desc->adjust_key != NULL)
  ------------------
  |  Branch (326:9): [True: 503k, False: 0]
  |  Branch (326:24): [True: 503k, False: 0]
  ------------------
  327|   503k|        ctx->desc->adjust_key(key, ctx);
  328|       |
  329|   503k|next:
  330|       |    /*
  331|       |     * Indicated that we successfully decoded something, or not at all.
  332|       |     * Ending up "empty handed" is not an error.
  333|       |     */
  334|   503k|    ok = 1;
  335|       |
  336|       |    /*
  337|       |     * We free memory here so it's not held up during the callback, because
  338|       |     * we know the process is recursive and the allocated chunks of memory
  339|       |     * add up.
  340|       |     */
  341|   503k|    OPENSSL_free(der);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  342|   503k|    der = NULL;
  343|       |
  344|   503k|    if (key != NULL) {
  ------------------
  |  Branch (344:9): [True: 503k, False: 0]
  ------------------
  345|   503k|        OSSL_PARAM params[4];
  346|   503k|        int object_type = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|   503k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  347|       |
  348|   503k|        params[0] = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &object_type);
  ------------------
  |  |  370|   503k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  349|       |
  350|   503k|#ifndef OPENSSL_NO_SM2
  351|   503k|        if (strcmp(ctx->desc->keytype_name, "EC") == 0
  ------------------
  |  Branch (351:13): [True: 162k, False: 341k]
  ------------------
  352|   162k|            && (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0)
  ------------------
  |  |  962|   162k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  |  Branch (352:16): [True: 0, False: 162k]
  ------------------
  353|      0|            params[1] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|      0|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  354|      0|                "SM2", 0);
  355|   503k|        else
  356|   503k|#endif
  357|   503k|            params[1] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|   503k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  358|   503k|                (char *)ctx->desc->keytype_name,
  359|   503k|                0);
  360|       |        /* The address of the key becomes the octet string */
  361|   503k|        params[2] = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_REFERENCE,
  ------------------
  |  |  369|   503k|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  362|   503k|            &key, sizeof(key));
  363|   503k|        params[3] = OSSL_PARAM_construct_end();
  364|       |
  365|   503k|        ok = data_cb(params, data_cbarg);
  366|   503k|    }
  367|       |
  368|   503k|end:
  369|   503k|    ctx->desc->free_key(key);
  370|   503k|    OPENSSL_free(der);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  371|       |
  372|   503k|    return ok;
  373|   503k|}
decode_der2key.c:SubjectPublicKeyInfo_der2dh_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_params_der2dh_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:DH_der2dh_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dhx_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2dhx_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_params_der2dhx_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:DHX_der2dhx_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2dsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_der2dsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:DSA_der2dsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:ec_check:
  483|   162k|{
  484|       |    /* We're trying to be clever by comparing two truths */
  485|   162k|    int ret = 0;
  486|   162k|    int sm2 = (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0;
  ------------------
  |  |  962|   162k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  487|       |
  488|   162k|    if (sm2)
  ------------------
  |  Branch (488:9): [True: 0, False: 162k]
  ------------------
  489|      0|        ret = ctx->desc->evp_type == EVP_PKEY_SM2
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (489:15): [True: 0, False: 0]
  ------------------
  490|      0|            || ctx->desc->evp_type == NID_X9_62_id_ecPublicKey;
  ------------------
  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (490:16): [True: 0, False: 0]
  ------------------
  491|   162k|    else
  492|   162k|        ret = ctx->desc->evp_type != EVP_PKEY_SM2;
  ------------------
  |  |   74|   162k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|   162k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  493|       |
  494|   162k|    return ret;
  495|   162k|}
decode_der2key.c:ec_adjust:
  498|   162k|{
  499|   162k|    ossl_ec_key_set0_libctx(key, PROV_LIBCTX_OF(ctx->provctx));
  ------------------
  |  |   31|   162k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  500|   162k|}
decode_der2key.c:PrivateKeyInfo_der2ec_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ec_newctx:
 1210|   162k|    {                                                                                                                 \
 1211|   162k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   162k|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ec_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2ec_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:EC_der2ec_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x25519_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2x25519_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x448_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2x448_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed25519_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ed25519_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed448_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ed448_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2sm2_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2sm2_newctx:
 1210|   162k|    {                                                                                                                 \
 1211|   162k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   162k|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2sm2_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2sm2_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_512_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_512_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_768_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_768_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_1024_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_1024_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_128s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_128f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_192s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_192f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_256s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_256f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_128s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_128f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_192s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_192f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_256s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_256f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:rsa_check:
  909|   341k|{
  910|   341k|    int valid;
  911|       |
  912|   341k|    switch (RSA_test_flags(key, RSA_FLAG_TYPE_MASK)) {
  ------------------
  |  |  117|   341k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  913|   341k|    case RSA_FLAG_TYPE_RSA:
  ------------------
  |  |  118|   341k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
  |  Branch (913:5): [True: 341k, False: 0]
  ------------------
  914|   341k|        valid = (ctx->desc->evp_type == EVP_PKEY_RSA);
  ------------------
  |  |   63|   341k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   341k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  915|   341k|        break;
  916|      0|    case RSA_FLAG_TYPE_RSASSAPSS:
  ------------------
  |  |  119|      0|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (916:5): [True: 0, False: 341k]
  ------------------
  917|      0|        valid = (ctx->desc->evp_type == EVP_PKEY_RSA_PSS);
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  918|      0|        break;
  919|      0|    default:
  ------------------
  |  Branch (919:5): [True: 0, False: 341k]
  ------------------
  920|       |        /* Currently unsupported RSA key type */
  921|      0|        valid = 0;
  922|   341k|    }
  923|       |
  924|   341k|    valid = (valid && ossl_rsa_check_factors(key));
  ------------------
  |  Branch (924:14): [True: 341k, False: 0]
  |  Branch (924:23): [True: 341k, False: 0]
  ------------------
  925|       |
  926|   341k|    return valid;
  927|   341k|}
decode_der2key.c:rsa_adjust:
  930|   341k|{
  931|   341k|    ossl_rsa_set0_libctx(key, PROV_LIBCTX_OF(ctx->provctx));
  ------------------
  |  |   31|   341k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  932|   341k|}
decode_der2key.c:PrivateKeyInfo_der2rsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2rsa_newctx:
 1210|   341k|    {                                                                                                                 \
 1211|   341k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   341k|    }                                                                                                                 \
decode_der2key.c:rsa_d2i_PUBKEY:
  904|   341k|{
  905|       |    return d2i_RSA_PUBKEY(NULL, der, der_len);
  906|   341k|}
decode_der2key.c:SubjectPublicKeyInfo_der2rsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_keypair_der2rsa_newctx:
 1210|   341k|    {                                                                                                                 \
 1211|   341k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   341k|    }                                                                                                                 \
decode_der2key.c:type_specific_keypair_der2rsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:RSA_der2rsa_newctx:
 1210|   341k|    {                                                                                                                 \
 1211|   341k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   341k|    }                                                                                                                 \
decode_der2key.c:RSA_der2rsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2rsapss_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2rsapss_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_44_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_44_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_65_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_65_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_87_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_87_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \

decode_epki2pki.c:epki2pki_newctx:
   46|   503k|{
   47|   503k|    struct epki2pki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|       |
   49|   503k|    if (ctx != NULL)
  ------------------
  |  Branch (49:9): [True: 503k, False: 0]
  ------------------
   50|   503k|        ctx->provctx = provctx;
   51|   503k|    return ctx;
   52|   503k|}
decode_epki2pki.c:epki2pki_freectx:
   55|   503k|{
   56|   503k|    struct epki2pki_ctx_st *ctx = vctx;
   57|       |
   58|   503k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|   503k|}
decode_epki2pki.c:epki2pki_set_ctx_params:
   67|      2|{
   68|      2|    struct epki2pki_ctx_st *ctx = vctx;
   69|      2|    struct epki2pki_set_ctx_params_st p;
   70|      2|    char *str;
   71|       |
   72|      2|    if (ctx == NULL || !epki2pki_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (72:9): [True: 0, False: 2]
  |  Branch (72:24): [True: 0, False: 2]
  ------------------
   73|      0|        return 0;
   74|       |
   75|      2|    str = ctx->propq;
   76|      2|    if (p.propq != NULL
  ------------------
  |  Branch (76:9): [True: 0, False: 2]
  ------------------
   77|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (77:12): [True: 0, False: 0]
  ------------------
   78|      0|        return 0;
   79|       |
   80|      2|    return 1;
   81|      2|}

decode_epki2pki.c:epki2pki_set_ctx_params_decoder:
   29|      2|{
   30|      2|    const char *s;
   31|       |
   32|      2|    memset(r, 0, sizeof(*r));
   33|      2|    if (p != NULL)
  ------------------
  |  Branch (33:9): [True: 2, False: 0]
  ------------------
   34|      4|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (34:16): [True: 2, False: 2]
  ------------------
   35|      2|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|      2|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 2]
  |  |  ------------------
  ------------------
   36|       |                /* OSSL_DECODER_PARAM_PROPERTIES */
   37|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   38|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   39|      0|                                   "param %s is repeated", s);
   40|      0|                    return 0;
   41|      0|                }
   42|      0|                r->propq = (OSSL_PARAM *)p;
   43|      0|            }
   44|      2|    return 1;
   45|      2|}

decode_msblob2key.c:msblob2key_newctx:
   65|      1|{
   66|      1|    struct msblob2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|       |
   68|      1|    if (ctx != NULL) {
  ------------------
  |  Branch (68:9): [True: 1, False: 0]
  ------------------
   69|      1|        ctx->provctx = provctx;
   70|      1|        ctx->desc = desc;
   71|      1|    }
   72|      1|    return ctx;
   73|      1|}
decode_msblob2key.c:msblob2key_freectx:
   76|      1|{
   77|      1|    struct msblob2key_ctx_st *ctx = vctx;
   78|       |
   79|      1|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|      1|}
decode_msblob2key.c:msblob2key_does_selection:
   83|      4|{
   84|      4|    if (selection == 0)
  ------------------
  |  Branch (84:9): [True: 0, False: 4]
  ------------------
   85|      0|        return 1;
   86|       |
   87|      4|    if ((selection & (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)) != 0)
  ------------------
  |  |  646|      4|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
                  if ((selection & (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)) != 0)
  ------------------
  |  |  647|      4|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (87:9): [True: 4, False: 0]
  ------------------
   88|      4|        return 1;
   89|       |
   90|      0|    return 0;
   91|      4|}
decode_msblob2key.c:msblob2rsa_newctx:
  262|      1|    {                                                                  \
  263|      1|        return msblob2key_newctx(provctx, &mstype##2##keytype##_desc); \
  264|      1|    }                                                                  \

decode_pem2der.c:pem2der_newctx:
   64|   503k|{
   65|   503k|    struct pem2der_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|       |
   67|   503k|    if (ctx != NULL)
  ------------------
  |  Branch (67:9): [True: 503k, False: 0]
  ------------------
   68|   503k|        ctx->provctx = provctx;
   69|   503k|    return ctx;
   70|   503k|}
decode_pem2der.c:pem2der_freectx:
   73|   503k|{
   74|   503k|    struct pem2der_ctx_st *ctx = vctx;
   75|       |
   76|   503k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|   503k|}
decode_pem2der.c:pem2der_set_ctx_params:
   85|      7|{
   86|      7|    struct pem2der_ctx_st *ctx = vctx;
   87|      7|    struct pem2der_set_ctx_params_st p;
   88|      7|    char *str;
   89|       |
   90|      7|    if (ctx == NULL || !pem2der_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (90:9): [True: 0, False: 7]
  |  Branch (90:24): [True: 0, False: 7]
  ------------------
   91|      0|        return 0;
   92|       |
   93|      7|    str = ctx->propq;
   94|      7|    if (p.propq != NULL
  ------------------
  |  Branch (94:9): [True: 0, False: 7]
  ------------------
   95|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (95:12): [True: 0, False: 0]
  ------------------
   96|      0|        return 0;
   97|       |
   98|      7|    str = ctx->data_structure;
   99|      7|    if (p.ds != NULL
  ------------------
  |  Branch (99:9): [True: 7, False: 0]
  ------------------
  100|      7|        && !OSSL_PARAM_get_utf8_string(p.ds, &str, sizeof(ctx->data_structure)))
  ------------------
  |  Branch (100:12): [True: 0, False: 7]
  ------------------
  101|      0|        return 0;
  102|       |
  103|      7|    return 1;
  104|      7|}

decode_pem2der.c:pem2der_set_ctx_params_decoder:
   31|      7|{
   32|      7|    const char *s;
   33|       |
   34|      7|    memset(r, 0, sizeof(*r));
   35|      7|    if (p != NULL)
  ------------------
  |  Branch (35:9): [True: 7, False: 0]
  ------------------
   36|     14|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (36:16): [True: 7, False: 7]
  ------------------
   37|      7|            switch(s[0]) {
   38|      0|            default:
  ------------------
  |  Branch (38:13): [True: 0, False: 7]
  ------------------
   39|      0|                break;
   40|      7|            case 'd':
  ------------------
  |  Branch (40:13): [True: 7, False: 0]
  ------------------
   41|      7|                if (ossl_likely(strcmp("ata-structure", s + 1) == 0)) {
  ------------------
  |  |   22|      7|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7, False: 0]
  |  |  ------------------
  ------------------
   42|       |                    /* OSSL_OBJECT_PARAM_DATA_STRUCTURE */
   43|      7|                    if (ossl_unlikely(r->ds != NULL)) {
  ------------------
  |  |   23|      7|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7]
  |  |  ------------------
  ------------------
   44|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   45|      0|                                       "param %s is repeated", s);
   46|      0|                        return 0;
   47|      0|                    }
   48|      7|                    r->ds = (OSSL_PARAM *)p;
   49|      7|                }
   50|      7|                break;
   51|      7|            case 'p':
  ------------------
  |  Branch (51:13): [True: 0, False: 7]
  ------------------
   52|      0|                if (ossl_likely(strcmp("roperties", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   53|       |                    /* OSSL_DECODER_PARAM_PROPERTIES */
   54|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   55|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   56|      0|                                       "param %s is repeated", s);
   57|      0|                        return 0;
   58|      0|                    }
   59|      0|                    r->propq = (OSSL_PARAM *)p;
   60|      0|                }
   61|      7|            }
   62|      7|    return 1;
   63|      7|}

decode_pvk2key.c:pvk2key_does_selection:
  112|      4|{
  113|      4|    if (selection == 0)
  ------------------
  |  Branch (113:9): [True: 0, False: 4]
  ------------------
  114|      0|        return 1;
  115|       |
  116|      4|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
  ------------------
  |  |  646|      4|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (116:9): [True: 0, False: 4]
  ------------------
  117|      0|        return 1;
  118|       |
  119|      4|    return 0;
  120|      4|}

ossl_spki2typespki_der_decode:
  103|   503k|{
  104|   503k|    const unsigned char *derp = der;
  105|   503k|    X509_PUBKEY *xpub = NULL;
  106|   503k|    X509_ALGOR *algor = NULL;
  107|   503k|    const ASN1_OBJECT *oid = NULL;
  108|   503k|    char dataname[OSSL_MAX_NAME_SIZE];
  109|   503k|    OSSL_PARAM params[6], *p = params;
  110|   503k|    int objtype = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|   503k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  111|   503k|    int ok = 0;
  112|       |
  113|   503k|    xpub = ossl_d2i_X509_PUBKEY_INTERNAL(&derp, len, libctx, propq);
  114|       |
  115|   503k|    if (xpub == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 503k]
  ------------------
  116|       |        /* We return "empty handed".  This is not an error. */
  117|      0|        ok = 1;
  118|      0|        goto end;
  119|      0|    }
  120|       |
  121|   503k|    if (!X509_PUBKEY_get0_param(NULL, NULL, NULL, &algor, xpub))
  ------------------
  |  Branch (121:9): [True: 0, False: 503k]
  ------------------
  122|      0|        goto end;
  123|   503k|    X509_ALGOR_get0(&oid, NULL, NULL, algor);
  124|       |
  125|   503k|#ifndef OPENSSL_NO_EC
  126|       |    /* SM2 abuses the EC oid, so this could actually be SM2 */
  127|   503k|    if (OBJ_obj2nid(oid) == NID_X9_62_id_ecPublicKey
  ------------------
  |  |  178|  1.00M|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (127:9): [True: 162k, False: 341k]
  ------------------
  128|   162k|        && ossl_x509_algor_is_sm2(algor))
  ------------------
  |  Branch (128:12): [True: 0, False: 162k]
  ------------------
  129|      0|        strcpy(dataname, "SM2");
  130|   503k|    else
  131|   503k|#endif
  132|   503k|        if (OBJ_obj2txt(dataname, sizeof(dataname), oid, 0) <= 0)
  ------------------
  |  Branch (132:13): [True: 0, False: 503k]
  ------------------
  133|      0|        goto end;
  134|       |
  135|   503k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  136|   503k|    xpub = NULL;
  137|       |
  138|   503k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|   503k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  139|   503k|        dataname, 0);
  140|       |
  141|   503k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_INPUT_TYPE,
  ------------------
  |  |  368|   503k|# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
  ------------------
  142|   503k|        "DER", 0);
  143|       |
  144|   503k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  365|   503k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  145|   503k|        "SubjectPublicKeyInfo",
  146|   503k|        0);
  147|   503k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_DATA, der, len);
  ------------------
  |  |  364|   503k|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  148|   503k|    *p++ = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &objtype);
  ------------------
  |  |  370|   503k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  149|       |
  150|   503k|    *p = OSSL_PARAM_construct_end();
  151|       |
  152|   503k|    ok = data_cb(params, data_cbarg);
  153|       |
  154|   503k|end:
  155|   503k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  156|   503k|    return ok;
  157|   503k|}
decode_spki2typespki.c:spki2typespki_newctx:
   43|   503k|{
   44|   503k|    struct spki2typespki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|   503k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|       |
   46|   503k|    if (ctx != NULL)
  ------------------
  |  Branch (46:9): [True: 503k, False: 0]
  ------------------
   47|   503k|        ctx->provctx = provctx;
   48|   503k|    return ctx;
   49|   503k|}
decode_spki2typespki.c:spki2typespki_freectx:
   52|   503k|{
   53|   503k|    struct spki2typespki_ctx_st *ctx = vctx;
   54|       |
   55|   503k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   56|   503k|}
decode_spki2typespki.c:spki2typespki_decode:
   83|   503k|{
   84|   503k|    struct spki2typespki_ctx_st *ctx = vctx;
   85|   503k|    unsigned char *der;
   86|   503k|    long len;
   87|   503k|    int ok = 0;
   88|       |
   89|   503k|    if (!ossl_read_der(ctx->provctx, cin, &der, &len))
  ------------------
  |  Branch (89:9): [True: 0, False: 503k]
  ------------------
   90|      0|        return 1;
   91|       |
   92|   503k|    ok = ossl_spki2typespki_der_decode(der, len, selection, data_cb, data_cbarg,
   93|   503k|        pw_cb, pw_cbarg,
   94|   503k|        PROV_LIBCTX_OF(ctx->provctx), ctx->propq);
  ------------------
  |  |   31|   503k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
   95|   503k|    OPENSSL_free(der);
  ------------------
  |  |  132|   503k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   96|   503k|    return ok;
   97|   503k|}
decode_spki2typespki.c:spki2typespki_set_ctx_params:
   64|      2|{
   65|      2|    struct spki2typespki_ctx_st *ctx = vctx;
   66|      2|    struct spki2typespki_set_ctx_params_st p;
   67|      2|    char *str;
   68|       |
   69|      2|    if (ctx == NULL || !spki2typespki_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (69:9): [True: 0, False: 2]
  |  Branch (69:24): [True: 0, False: 2]
  ------------------
   70|      0|        return 0;
   71|       |
   72|      2|    str = ctx->propq;
   73|      2|    if (p.propq != NULL
  ------------------
  |  Branch (73:9): [True: 0, False: 2]
  ------------------
   74|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (74:12): [True: 0, False: 0]
  ------------------
   75|      0|        return 0;
   76|       |
   77|      2|    return 1;
   78|      2|}

decode_spki2typespki.c:spki2typespki_set_ctx_params_decoder:
   29|      2|{
   30|      2|    const char *s;
   31|       |
   32|      2|    memset(r, 0, sizeof(*r));
   33|      2|    if (p != NULL)
  ------------------
  |  Branch (33:9): [True: 2, False: 0]
  ------------------
   34|      4|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (34:16): [True: 2, False: 2]
  ------------------
   35|      2|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|      2|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 2]
  |  |  ------------------
  ------------------
   36|       |                /* OSSL_DECODER_PARAM_PROPERTIES */
   37|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   38|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   39|      0|                                   "param %s is repeated", s);
   40|      0|                    return 0;
   41|      0|                }
   42|      0|                r->propq = (OSSL_PARAM *)p;
   43|      0|            }
   44|      2|    return 1;
   45|      2|}

ossl_read_der:
   88|  1.00M|{
   89|  1.00M|    BUF_MEM *mem = NULL;
   90|  1.00M|    BIO *in = ossl_bio_new_from_core_bio(provctx, cin);
   91|  1.00M|    int ok;
   92|       |
   93|  1.00M|    if (in == NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 1.00M]
  ------------------
   94|      0|        return 0;
   95|  1.00M|    ok = (asn1_d2i_read_bio(in, &mem) >= 0);
   96|  1.00M|    if (ok) {
  ------------------
  |  Branch (96:9): [True: 1.00M, False: 0]
  ------------------
   97|  1.00M|        *data = (unsigned char *)mem->data;
   98|  1.00M|        *len = (long)mem->length;
   99|  1.00M|        OPENSSL_free(mem);
  ------------------
  |  |  132|  1.00M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  100|  1.00M|    }
  101|  1.00M|    BIO_free(in);
  102|  1.00M|    return ok;
  103|  1.00M|}

cipher_aes.c:aes_256_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_192_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_128_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_256_cbc_get_params:
  213|  4.06k|    {                                                                            \
  214|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|  4.06k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|  4.06k|            flags, kbits, blkbits, ivbits);                                      \
  216|  4.06k|    }                                                                            \
cipher_aes.c:aes_192_cbc_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_128_cbc_get_params:
  213|  4.06k|    {                                                                            \
  214|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|  4.06k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|  4.06k|            flags, kbits, blkbits, ivbits);                                      \
  216|  4.06k|    }                                                                            \
cipher_aes.c:aes_256_ofb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_192_ofb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_128_ofb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_256_cfb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_192_cfb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_128_cfb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_256_cfb1_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_192_cfb1_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_128_cfb1_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_256_cfb8_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_192_cfb8_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_128_cfb8_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_256_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_192_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_128_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aes.c:aes_cbc_cts_gettable_ctx_params:
  364|  2.12k|    {                                                                    \
  365|  2.12k|        return name##_known_gettable_ctx_params;                         \
  366|  2.12k|    }
cipher_aria.c:aria_256_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_192_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_128_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_256_cbc_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_192_cbc_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_128_cbc_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_256_ofb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_192_ofb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_128_ofb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_256_cfb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_192_cfb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_128_cfb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_256_cfb1_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_192_cfb1_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_128_cfb1_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_256_cfb8_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_192_cfb8_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_128_cfb8_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_256_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_192_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_aria.c:aria_128_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_256_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_192_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_128_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_256_cbc_get_params:
  213|  4.06k|    {                                                                            \
  214|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|  4.06k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|  4.06k|            flags, kbits, blkbits, ivbits);                                      \
  216|  4.06k|    }                                                                            \
cipher_camellia.c:camellia_192_cbc_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_128_cbc_get_params:
  213|  4.06k|    {                                                                            \
  214|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|  4.06k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|  4.06k|            flags, kbits, blkbits, ivbits);                                      \
  216|  4.06k|    }                                                                            \
cipher_camellia.c:camellia_256_ofb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_192_ofb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_128_ofb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_256_cfb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_192_cfb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_128_cfb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_256_cfb1_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_192_cfb1_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_128_cfb1_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_256_cfb8_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_192_cfb8_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_128_cfb8_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_256_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_192_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_128_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_camellia.c:camellia_cbc_cts_gettable_ctx_params:
  364|  2.12k|    {                                                                    \
  365|  2.12k|        return name##_known_gettable_ctx_params;                         \
  366|  2.12k|    }
cipher_sm4.c:sm4_128_ecb_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|    709|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_sm4.c:sm4_128_cbc_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|    709|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_sm4.c:sm4_128_ctr_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|    709|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_sm4.c:sm4_128_ofb128_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|    709|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
cipher_sm4.c:sm4_128_cfb128_get_params:
  213|    709|    {                                                                            \
  214|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|    709|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|    709|            flags, kbits, blkbits, ivbits);                                      \
  216|    709|    }                                                                            \
ossl_tdes_gettable_ctx_params:
  364|  7.79k|    {                                                                    \
  365|  7.79k|        return name##_known_gettable_ctx_params;                         \
  366|  7.79k|    }

cipher_aes_ccm.c:aes_128_ccm_get_params:
   21|  7.42k|    {                                                                           \
   22|  7.42k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|  7.42k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|  7.42k|            flags, kbits, blkbits, ivbits);                                     \
   24|  7.42k|    }                                                                           \
cipher_aes_ccm.c:aes_192_ccm_get_params:
   21|    709|    {                                                                           \
   22|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|    709|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|    709|            flags, kbits, blkbits, ivbits);                                     \
   24|    709|    }                                                                           \
cipher_aes_ccm.c:aes_256_ccm_get_params:
   21|  7.42k|    {                                                                           \
   22|  7.42k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|  7.42k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|  7.42k|            flags, kbits, blkbits, ivbits);                                     \
   24|  7.42k|    }                                                                           \
cipher_aes_gcm.c:aes_128_gcm_get_params:
   21|  4.06k|    {                                                                           \
   22|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  4.06k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  4.06k|            flags, kbits, blkbits, ivbits);                                     \
   24|  4.06k|    }                                                                           \
cipher_aes_gcm.c:aes_192_gcm_get_params:
   21|    709|    {                                                                           \
   22|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|    709|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|    709|            flags, kbits, blkbits, ivbits);                                     \
   24|    709|    }                                                                           \
cipher_aes_gcm.c:aes_256_gcm_get_params:
   21|  4.06k|    {                                                                           \
   22|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  4.06k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  4.06k|            flags, kbits, blkbits, ivbits);                                     \
   24|  4.06k|    }                                                                           \
cipher_aria_ccm.c:aria_128_ccm_get_params:
   21|    709|    {                                                                           \
   22|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|    709|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|    709|            flags, kbits, blkbits, ivbits);                                     \
   24|    709|    }                                                                           \
cipher_aria_ccm.c:aria_192_ccm_get_params:
   21|    709|    {                                                                           \
   22|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|    709|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|    709|            flags, kbits, blkbits, ivbits);                                     \
   24|    709|    }                                                                           \
cipher_aria_ccm.c:aria_256_ccm_get_params:
   21|    709|    {                                                                           \
   22|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|    709|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|    709|            flags, kbits, blkbits, ivbits);                                     \
   24|    709|    }                                                                           \
cipher_aria_gcm.c:aria_128_gcm_get_params:
   21|  4.06k|    {                                                                           \
   22|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  4.06k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  4.06k|            flags, kbits, blkbits, ivbits);                                     \
   24|  4.06k|    }                                                                           \
cipher_aria_gcm.c:aria_192_gcm_get_params:
   21|    709|    {                                                                           \
   22|    709|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|    709|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|    709|            flags, kbits, blkbits, ivbits);                                     \
   24|    709|    }                                                                           \
cipher_aria_gcm.c:aria_256_gcm_get_params:
   21|  4.06k|    {                                                                           \
   22|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  4.06k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  4.06k|            flags, kbits, blkbits, ivbits);                                     \
   24|  4.06k|    }                                                                           \
cipher_sm4_ccm.c:sm4_128_ccm_get_params:
   21|  4.06k|    {                                                                           \
   22|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|  4.06k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|  4.06k|            flags, kbits, blkbits, ivbits);                                     \
   24|  4.06k|    }                                                                           \
cipher_sm4_gcm.c:sm4_128_gcm_get_params:
   21|  4.06k|    {                                                                           \
   22|  4.06k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  4.06k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  4.06k|            flags, kbits, blkbits, ivbits);                                     \
   24|  4.06k|    }                                                                           \

cshake_prov.c:cshake_128_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
cshake_prov.c:cshake_256_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
md5_prov.c:md5_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
md5_sha1_prov.c:md5_sha1_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
null_prov.c:nullmd_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
ripemd_prov.c:ripemd160_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha2_prov.c:sha1_internal_final:
   44|   441k|    {                                                                             \
   45|   441k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 441k, False: 0]
  |  Branch (45:39): [True: 441k, False: 0]
  |  Branch (45:60): [True: 441k, False: 0]
  ------------------
   46|   441k|            *outl = dgstsize;                                                     \
   47|   441k|            return 1;                                                             \
   48|   441k|        }                                                                         \
   49|   441k|        return 0;                                                                 \
   50|   441k|    }
sha2_prov.c:sha1_freectx:
   78|   441k|    {                                                                            \
   79|   441k|        CTX *ctx = (CTX *)vctx;                                                  \
   80|   441k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  130|   441k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|   441k|    }                                                                            \
sha2_prov.c:sha1_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha2_prov.c:sha1_internal_init:
  132|   441k|    {                                                                                  \
  133|   441k|        return ossl_prov_is_running()                                                  \
  ------------------
  |  Branch (133:16): [True: 441k, False: 0]
  ------------------
  134|   441k|            && init(ctx)                                                               \
  ------------------
  |  Branch (134:16): [True: 441k, False: 0]
  ------------------
  135|   441k|            && set_ctx_params(ctx, params);                                            \
  ------------------
  |  Branch (135:16): [True: 441k, False: 0]
  ------------------
  136|   441k|    }                                                                                  \
sha2_prov.c:sha224_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha2_prov.c:sha256_internal_final:
   44|  12.8k|    {                                                                             \
   45|  12.8k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 12.8k, False: 0]
  |  Branch (45:39): [True: 12.8k, False: 0]
  |  Branch (45:60): [True: 12.8k, False: 0]
  ------------------
   46|  12.8k|            *outl = dgstsize;                                                     \
   47|  12.8k|            return 1;                                                             \
   48|  12.8k|        }                                                                         \
   49|  12.8k|        return 0;                                                                 \
   50|  12.8k|    }
sha2_prov.c:sha256_freectx:
   78|  12.8k|    {                                                                            \
   79|  12.8k|        CTX *ctx = (CTX *)vctx;                                                  \
   80|  12.8k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  130|  12.8k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|  12.8k|    }                                                                            \
sha2_prov.c:sha256_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha2_prov.c:sha256_internal_init:
  149|  12.8k|    {                                                                              \
  150|  12.8k|        return ossl_prov_is_running() && init(ctx);                                \
  ------------------
  |  Branch (150:16): [True: 12.8k, False: 0]
  |  Branch (150:42): [True: 12.8k, False: 0]
  ------------------
  151|  12.8k|    }                                                                              \
sha2_prov.c:sha256_192_internal_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha2_prov.c:sha384_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha2_prov.c:sha512_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha2_prov.c:sha512_224_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha2_prov.c:sha512_256_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:sha3_224_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:sha3_256_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:sha3_384_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:sha3_512_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:keccak_224_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:keccak_256_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:keccak_384_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:keccak_512_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:shake_128_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:shake_256_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:cshake_keccak_128_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sha3_prov.c:cshake_keccak_256_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }
sm3_prov.c:sm3_get_params:
   29|    709|    {                                                                            \
   30|    709|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    709|    }

dh_kmgmt.c:dh_gen_init:
  583|    210|{
  584|    210|    return dh_gen_init_base(provctx, selection, params, DH_FLAG_TYPE_DH);
  ------------------
  |  |  111|    210|#define DH_FLAG_TYPE_DH 0x0000
  ------------------
  585|    210|}
dh_kmgmt.c:dh_gen_init_base:
  543|    210|{
  544|    210|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|    210|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  545|    210|    struct dh_gen_ctx *gctx = NULL;
  546|       |
  547|    210|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (547:9): [True: 0, False: 210]
  ------------------
  548|      0|        return NULL;
  549|       |
  550|    210|    if ((selection & (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS)) == 0)
  ------------------
  |  |  656|    210|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|    210|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|    210|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                  if ((selection & (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS)) == 0)
  ------------------
  |  |  648|    210|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  |  Branch (550:9): [True: 0, False: 210]
  ------------------
  551|      0|        return NULL;
  552|       |
  553|    210|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  109|    210|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (553:9): [True: 210, False: 0]
  ------------------
  554|    210|        gctx->selection = selection;
  555|    210|        gctx->libctx = libctx;
  556|    210|        gctx->pbits = 2048;
  557|    210|        gctx->qbits = 224;
  558|    210|        gctx->mdname = NULL;
  559|       |#ifdef FIPS_MODULE
  560|       |        gctx->gen_type = (type == DH_FLAG_TYPE_DHX)
  561|       |            ? DH_PARAMGEN_TYPE_FIPS_186_4
  562|       |            : DH_PARAMGEN_TYPE_GROUP;
  563|       |#else
  564|    210|        gctx->gen_type = (type == DH_FLAG_TYPE_DHX)
  ------------------
  |  |  112|    210|#define DH_FLAG_TYPE_DHX 0x1000
  ------------------
  |  Branch (564:26): [True: 0, False: 210]
  ------------------
  565|    210|            ? DH_PARAMGEN_TYPE_FIPS_186_2
  ------------------
  |  |   34|      0|#define DH_PARAMGEN_TYPE_FIPS_186_2 1 /* Use FIPS186-2 standard */
  ------------------
  566|    210|            : DH_PARAMGEN_TYPE_GENERATOR;
  ------------------
  |  |   33|    420|#define DH_PARAMGEN_TYPE_GENERATOR 0 /* Use a safe prime generator */
  ------------------
  567|    210|#endif
  568|    210|        gctx->gindex = -1;
  569|    210|        gctx->hindex = 0;
  570|    210|        gctx->pcounter = -1;
  571|    210|        gctx->generator = DH_GENERATOR_2;
  ------------------
  |  |  147|    210|#define DH_GENERATOR_2 2
  ------------------
  572|    210|        gctx->dh_type = type;
  573|    210|    }
  574|    210|    if (!dh_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (574:9): [True: 0, False: 210]
  ------------------
  575|      0|        OPENSSL_free(gctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  576|       |        gctx = NULL;
  577|      0|    }
  578|    210|    return gctx;
  579|    210|}
dh_kmgmt.c:dh_gen_set_params:
  717|    420|{
  718|    420|    struct dh_gen_ctx *gctx = genctx;
  719|    420|    struct dhx_gen_set_params_st p;
  720|       |
  721|    420|    if (gctx == NULL || !dh_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (721:9): [True: 0, False: 420]
  |  Branch (721:25): [True: 0, False: 420]
  ------------------
  722|      0|        return 0;
  723|       |
  724|    420|    if (!dh_gen_common_set_params(gctx, &p))
  ------------------
  |  Branch (724:9): [True: 0, False: 420]
  ------------------
  725|      0|        return 0;
  726|       |
  727|    420|    if (p.generator != NULL && !OSSL_PARAM_get_int(p.generator, &gctx->generator))
  ------------------
  |  Branch (727:9): [True: 0, False: 420]
  |  Branch (727:32): [True: 0, False: 0]
  ------------------
  728|      0|        return 0;
  729|       |
  730|    420|    return 1;
  731|    420|}
dh_kmgmt.c:dh_gen_common_set_params:
  621|    420|{
  622|    420|    int gen_type = -1;
  623|       |
  624|    420|    if (p->type != NULL) {
  ------------------
  |  Branch (624:9): [True: 0, False: 420]
  ------------------
  625|      0|        if (p->type->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (625:13): [True: 0, False: 0]
  ------------------
  626|      0|            || ((gen_type = dh_gen_type_name2id_w_default(p->type->data, gctx->dh_type)) == -1)) {
  ------------------
  |  Branch (626:16): [True: 0, False: 0]
  ------------------
  627|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  628|      0|            return 0;
  629|      0|        }
  630|      0|        if (gen_type != -1)
  ------------------
  |  Branch (630:13): [True: 0, False: 0]
  ------------------
  631|      0|            gctx->gen_type = gen_type;
  632|      0|    }
  633|       |
  634|    420|    if (p->group_name != NULL) {
  ------------------
  |  Branch (634:9): [True: 210, False: 210]
  ------------------
  635|    210|        const DH_NAMED_GROUP *group = NULL;
  636|       |
  637|    210|        if (p->group_name->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|    420|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (637:13): [True: 0, False: 210]
  ------------------
  638|    210|            || p->group_name->data == NULL
  ------------------
  |  Branch (638:16): [True: 0, False: 210]
  ------------------
  639|    210|            || (group = ossl_ffc_name_to_dh_named_group(p->group_name->data)) == NULL
  ------------------
  |  Branch (639:16): [True: 0, False: 210]
  ------------------
  640|    210|            || ((gctx->group_nid = ossl_ffc_named_group_get_uid(group)) == NID_undef)) {
  ------------------
  |  |   18|    210|#define NID_undef                       0
  ------------------
  |  Branch (640:16): [True: 0, False: 210]
  ------------------
  641|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  642|      0|            return 0;
  643|      0|        }
  644|    210|    }
  645|       |
  646|    420|    if (p->pbits != NULL && !OSSL_PARAM_get_size_t(p->pbits, &gctx->pbits))
  ------------------
  |  Branch (646:9): [True: 0, False: 420]
  |  Branch (646:29): [True: 0, False: 0]
  ------------------
  647|      0|        return 0;
  648|       |
  649|    420|    if (p->privlen != NULL && !OSSL_PARAM_get_int(p->privlen, &gctx->priv_len))
  ------------------
  |  Branch (649:9): [True: 0, False: 420]
  |  Branch (649:31): [True: 0, False: 0]
  ------------------
  650|      0|        return 0;
  651|    420|    return 1;
  652|    420|}
dh_kmgmt.c:dh_gen:
  745|    210|{
  746|    210|    int ret = 0;
  747|    210|    struct dh_gen_ctx *gctx = genctx;
  748|    210|    DH *dh = NULL;
  749|    210|    BN_GENCB *gencb = NULL;
  750|    210|    FFC_PARAMS *ffc;
  751|       |
  752|    210|    if (!ossl_prov_is_running() || gctx == NULL)
  ------------------
  |  Branch (752:9): [True: 0, False: 210]
  |  Branch (752:36): [True: 0, False: 210]
  ------------------
  753|      0|        return NULL;
  754|       |
  755|       |    /*
  756|       |     * If a group name is selected then the type is group regardless of what
  757|       |     * the user selected. This overrides rather than errors for backwards
  758|       |     * compatibility.
  759|       |     */
  760|    210|    if (gctx->group_nid != NID_undef)
  ------------------
  |  |   18|    210|#define NID_undef                       0
  ------------------
  |  Branch (760:9): [True: 210, False: 0]
  ------------------
  761|    210|        gctx->gen_type = DH_PARAMGEN_TYPE_GROUP;
  ------------------
  |  |   36|    210|#define DH_PARAMGEN_TYPE_GROUP 3 /* Use a named safe prime group */
  ------------------
  762|       |
  763|       |    /*
  764|       |     * Do a bounds check on context gen_type. Must be in range:
  765|       |     * DH_PARAMGEN_TYPE_GENERATOR <= gen_type <= DH_PARAMGEN_TYPE_GROUP
  766|       |     * Noted here as this needs to be adjusted if a new group type is
  767|       |     * added.
  768|       |     */
  769|    210|    if (!ossl_assert((gctx->gen_type >= DH_PARAMGEN_TYPE_GENERATOR)
  ------------------
  |  |   52|    420|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 210, False: 0]
  |  |  |  Branch (52:41): [True: 210, False: 0]
  |  |  ------------------
  |  |   53|    210|    __FILE__, __LINE__)
  ------------------
  |  Branch (769:9): [True: 0, False: 210]
  ------------------
  770|    210|            && (gctx->gen_type <= DH_PARAMGEN_TYPE_GROUP))) {
  771|      0|        ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  772|      0|            "gen_type set to unsupported value %d", gctx->gen_type);
  773|      0|        return NULL;
  774|      0|    }
  775|       |
  776|       |    /* For parameter generation - If there is a group name just create it */
  777|    210|    if (gctx->gen_type == DH_PARAMGEN_TYPE_GROUP
  ------------------
  |  |   36|    420|#define DH_PARAMGEN_TYPE_GROUP 3 /* Use a named safe prime group */
  ------------------
  |  Branch (777:9): [True: 210, False: 0]
  ------------------
  778|    210|        && gctx->ffc_params == NULL) {
  ------------------
  |  Branch (778:12): [True: 210, False: 0]
  ------------------
  779|       |        /* Select a named group if there is not one already */
  780|    210|        if (gctx->group_nid == NID_undef)
  ------------------
  |  |   18|    210|#define NID_undef                       0
  ------------------
  |  Branch (780:13): [True: 0, False: 210]
  ------------------
  781|      0|            gctx->group_nid = ossl_dh_get_named_group_uid_from_size((int)gctx->pbits);
  782|    210|        if (gctx->group_nid == NID_undef)
  ------------------
  |  |   18|    210|#define NID_undef                       0
  ------------------
  |  Branch (782:13): [True: 0, False: 210]
  ------------------
  783|      0|            return NULL;
  784|    210|        dh = ossl_dh_new_by_nid_ex(gctx->libctx, gctx->group_nid);
  785|    210|        if (dh == NULL)
  ------------------
  |  Branch (785:13): [True: 0, False: 210]
  ------------------
  786|      0|            return NULL;
  787|    210|        ffc = ossl_dh_get0_params(dh);
  788|    210|    } else {
  789|      0|        dh = ossl_dh_new_ex(gctx->libctx);
  790|      0|        if (dh == NULL)
  ------------------
  |  Branch (790:13): [True: 0, False: 0]
  ------------------
  791|      0|            return NULL;
  792|      0|        ffc = ossl_dh_get0_params(dh);
  793|       |
  794|       |        /* Copy the template value if one was passed */
  795|      0|        if (gctx->ffc_params != NULL
  ------------------
  |  Branch (795:13): [True: 0, False: 0]
  ------------------
  796|      0|            && !ossl_ffc_params_copy(ffc, gctx->ffc_params))
  ------------------
  |  Branch (796:16): [True: 0, False: 0]
  ------------------
  797|      0|            goto end;
  798|       |
  799|      0|        if (!ossl_ffc_params_set_seed(ffc, gctx->seed, gctx->seedlen))
  ------------------
  |  Branch (799:13): [True: 0, False: 0]
  ------------------
  800|      0|            goto end;
  801|      0|        if (gctx->gindex != -1) {
  ------------------
  |  Branch (801:13): [True: 0, False: 0]
  ------------------
  802|      0|            ossl_ffc_params_set_gindex(ffc, gctx->gindex);
  803|      0|            if (gctx->pcounter != -1)
  ------------------
  |  Branch (803:17): [True: 0, False: 0]
  ------------------
  804|      0|                ossl_ffc_params_set_pcounter(ffc, gctx->pcounter);
  805|      0|        } else if (gctx->hindex != 0) {
  ------------------
  |  Branch (805:20): [True: 0, False: 0]
  ------------------
  806|      0|            ossl_ffc_params_set_h(ffc, gctx->hindex);
  807|      0|        }
  808|      0|        if (gctx->mdname != NULL)
  ------------------
  |  Branch (808:13): [True: 0, False: 0]
  ------------------
  809|      0|            ossl_ffc_set_digest(ffc, gctx->mdname, gctx->mdprops);
  810|      0|        gctx->cb = osslcb;
  811|      0|        gctx->cbarg = cbarg;
  812|      0|        gencb = BN_GENCB_new();
  813|      0|        if (gencb != NULL)
  ------------------
  |  Branch (813:13): [True: 0, False: 0]
  ------------------
  814|      0|            BN_GENCB_set(gencb, dh_gencb, genctx);
  815|       |
  816|      0|        if ((gctx->selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
  ------------------
  |  |  648|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  |  Branch (816:13): [True: 0, False: 0]
  ------------------
  817|       |            /*
  818|       |             * NOTE: The old safe prime generator code is not used in fips mode,
  819|       |             * (i.e internally it ignores the generator and chooses a named
  820|       |             * group based on pbits.
  821|       |             */
  822|      0|            if (gctx->gen_type == DH_PARAMGEN_TYPE_GENERATOR)
  ------------------
  |  |   33|      0|#define DH_PARAMGEN_TYPE_GENERATOR 0 /* Use a safe prime generator */
  ------------------
  |  Branch (822:17): [True: 0, False: 0]
  ------------------
  823|      0|                ret = DH_generate_parameters_ex(dh, (int)gctx->pbits,
  824|      0|                    gctx->generator, gencb);
  825|      0|            else
  826|      0|                ret = ossl_dh_generate_ffc_parameters(dh, gctx->gen_type,
  827|      0|                    (int)gctx->pbits,
  828|      0|                    (int)gctx->qbits, gencb);
  829|      0|            if (ret <= 0)
  ------------------
  |  Branch (829:17): [True: 0, False: 0]
  ------------------
  830|      0|                goto end;
  831|      0|        }
  832|      0|    }
  833|       |
  834|    210|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  656|    210|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|    210|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|    210|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (834:9): [True: 210, False: 0]
  ------------------
  835|    210|        if (ffc->p == NULL || ffc->g == NULL)
  ------------------
  |  Branch (835:13): [True: 0, False: 210]
  |  Branch (835:31): [True: 0, False: 210]
  ------------------
  836|      0|            goto end;
  837|    210|        if (gctx->priv_len > 0)
  ------------------
  |  Branch (837:13): [True: 0, False: 210]
  ------------------
  838|      0|            DH_set_length(dh, (long)gctx->priv_len);
  839|    210|        ossl_ffc_params_enable_flags(ffc, FFC_PARAM_FLAG_VALIDATE_LEGACY,
  ------------------
  |  |   47|    210|#define FFC_PARAM_FLAG_VALIDATE_LEGACY 0x04
  ------------------
  840|    210|            gctx->gen_type == DH_PARAMGEN_TYPE_FIPS_186_2);
  ------------------
  |  |   34|    210|#define DH_PARAMGEN_TYPE_FIPS_186_2 1 /* Use FIPS186-2 standard */
  ------------------
  841|    210|        if (DH_generate_key(dh) <= 0)
  ------------------
  |  Branch (841:13): [True: 0, False: 210]
  ------------------
  842|      0|            goto end;
  843|       |#ifdef FIPS_MODULE
  844|       |        if (!ossl_fips_self_testing()) {
  845|       |            ret = ossl_dh_check_pairwise(dh, 0);
  846|       |            if (ret <= 0) {
  847|       |                ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
  848|       |                goto end;
  849|       |            }
  850|       |        }
  851|       |#endif /* FIPS_MODULE */
  852|    210|    }
  853|    210|    DH_clear_flags(dh, DH_FLAG_TYPE_MASK);
  ------------------
  |  |  110|    210|#define DH_FLAG_TYPE_MASK 0xF000
  ------------------
  854|    210|    DH_set_flags(dh, gctx->dh_type);
  855|       |
  856|    210|    ret = 1;
  857|    210|end:
  858|    210|    if (ret <= 0) {
  ------------------
  |  Branch (858:9): [True: 0, False: 210]
  ------------------
  859|      0|        DH_free(dh);
  860|       |        dh = NULL;
  861|      0|    }
  862|    210|    BN_GENCB_free(gencb);
  863|    210|    return dh;
  864|    210|}
dh_kmgmt.c:dh_gen_cleanup:
  867|    210|{
  868|    210|    struct dh_gen_ctx *gctx = genctx;
  869|       |
  870|    210|    if (gctx == NULL)
  ------------------
  |  Branch (870:9): [True: 0, False: 210]
  ------------------
  871|      0|        return;
  872|       |
  873|    210|    OPENSSL_free(gctx->mdname);
  ------------------
  |  |  132|    210|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  874|    210|    OPENSSL_free(gctx->mdprops);
  ------------------
  |  |  132|    210|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  875|    210|    OPENSSL_clear_free(gctx->seed, gctx->seedlen);
  ------------------
  |  |  130|    210|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  876|    210|    OPENSSL_free(gctx);
  ------------------
  |  |  132|    210|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  877|    210|}
dh_kmgmt.c:dh_freedata:
  192|    210|{
  193|    210|    DH_free(keydata);
  194|    210|}
dh_kmgmt.c:dh_get_params:
  416|    630|{
  417|    630|    DH *dh = key;
  418|    630|    struct dh_params_st p;
  419|       |
  420|    630|    if (key == NULL || !dh_get_params_decoder(params, &p))
  ------------------
  |  Branch (420:9): [True: 0, False: 630]
  |  Branch (420:24): [True: 0, False: 630]
  ------------------
  421|      0|        return 0;
  422|       |
  423|    630|    if (p.bits != NULL && !OSSL_PARAM_set_int(p.bits, DH_bits(dh)))
  ------------------
  |  Branch (423:9): [True: 210, False: 420]
  |  Branch (423:27): [True: 0, False: 210]
  ------------------
  424|      0|        return 0;
  425|       |
  426|    630|    if (p.secbits != NULL && !OSSL_PARAM_set_int(p.secbits, DH_security_bits(dh)))
  ------------------
  |  Branch (426:9): [True: 210, False: 420]
  |  Branch (426:30): [True: 0, False: 210]
  ------------------
  427|      0|        return 0;
  428|       |
  429|    630|    if (p.maxsize != NULL && !OSSL_PARAM_set_int(p.maxsize, DH_size(dh)))
  ------------------
  |  Branch (429:9): [True: 210, False: 420]
  |  Branch (429:30): [True: 0, False: 210]
  ------------------
  430|      0|        return 0;
  431|       |
  432|    630|    if (p.encpubkey != NULL) {
  ------------------
  |  Branch (432:9): [True: 420, False: 210]
  ------------------
  433|    420|        if (p.encpubkey->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|    420|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (433:13): [True: 0, False: 420]
  ------------------
  434|      0|            return 0;
  435|    420|        p.encpubkey->return_size = ossl_dh_key2buf(dh, (unsigned char **)&p.encpubkey->data,
  436|    420|            p.encpubkey->data_size, 0);
  437|    420|        if (p.encpubkey->return_size == 0)
  ------------------
  |  Branch (437:13): [True: 0, False: 420]
  ------------------
  438|      0|            return 0;
  439|    420|    }
  440|       |
  441|    630|    if (p.seccat != NULL)
  ------------------
  |  Branch (441:9): [True: 210, False: 420]
  ------------------
  442|    210|        if (!OSSL_PARAM_set_int(p.seccat, 0))
  ------------------
  |  Branch (442:13): [True: 0, False: 210]
  ------------------
  443|      0|            return 0;
  444|       |
  445|    630|    return ossl_dh_params_todata(dh, NULL, p.privlen, &p.ffp)
  ------------------
  |  Branch (445:12): [True: 630, False: 0]
  ------------------
  446|    630|        && ossl_dh_key_todata(dh, NULL, p.pubkey, p.privkey, 1);
  ------------------
  |  Branch (446:12): [True: 630, False: 0]
  ------------------
  447|    630|}

dh_kmgmt.c:dh_gen_set_params_decoder:
  589|    420|{
  590|    420|    const char *s;
  591|       |
  592|    420|    memset(r, 0, sizeof(*r));
  593|    420|    if (p != NULL)
  ------------------
  |  Branch (593:9): [True: 210, False: 210]
  ------------------
  594|    420|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (594:16): [True: 210, False: 210]
  ------------------
  595|    210|            switch(s[0]) {
  596|      0|            default:
  ------------------
  |  Branch (596:13): [True: 0, False: 210]
  ------------------
  597|      0|                break;
  598|      0|            case 'd':
  ------------------
  |  Branch (598:13): [True: 0, False: 210]
  ------------------
  599|      0|                if (ossl_likely(strcmp("igest", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  600|       |                    /* OSSL_PKEY_PARAM_FFC_DIGEST */
  601|      0|                    ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  602|      0|                                   "param %s is unsupported", s);
  603|      0|                    return 0;
  604|      0|                }
  605|      0|                break;
  606|    210|            case 'g':
  ------------------
  |  Branch (606:13): [True: 210, False: 0]
  ------------------
  607|    210|                switch(s[1]) {
  608|      0|                default:
  ------------------
  |  Branch (608:17): [True: 0, False: 210]
  ------------------
  609|      0|                    break;
  610|      0|                case 'i':
  ------------------
  |  Branch (610:17): [True: 0, False: 210]
  ------------------
  611|      0|                    if (ossl_likely(strcmp("ndex", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  612|       |                        /* OSSL_PKEY_PARAM_FFC_GINDEX */
  613|      0|                        ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  614|      0|                                       "param %s is unsupported", s);
  615|      0|                        return 0;
  616|      0|                    }
  617|      0|                    break;
  618|    210|                case 'r':
  ------------------
  |  Branch (618:17): [True: 210, False: 0]
  ------------------
  619|    210|                    if (ossl_likely(strcmp("oup", s + 2) == 0)) {
  ------------------
  |  |   22|    210|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 210, False: 0]
  |  |  ------------------
  ------------------
  620|       |                        /* OSSL_PKEY_PARAM_GROUP_NAME */
  621|    210|                        if (ossl_unlikely(r->group_name != NULL)) {
  ------------------
  |  |   23|    210|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 210]
  |  |  ------------------
  ------------------
  622|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  623|      0|                                           "param %s is repeated", s);
  624|      0|                            return 0;
  625|      0|                        }
  626|    210|                        r->group_name = (OSSL_PARAM *)p;
  627|    210|                    }
  628|    210|                }
  629|    210|                break;
  630|    210|            case 'h':
  ------------------
  |  Branch (630:13): [True: 0, False: 210]
  ------------------
  631|      0|                if (ossl_likely(strcmp("index", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  632|       |                    /* OSSL_PKEY_PARAM_FFC_H */
  633|      0|                    ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  634|      0|                                   "param %s is unsupported", s);
  635|      0|                    return 0;
  636|      0|                }
  637|      0|                break;
  638|      0|            case 'p':
  ------------------
  |  Branch (638:13): [True: 0, False: 210]
  ------------------
  639|      0|                switch(s[1]) {
  640|      0|                default:
  ------------------
  |  Branch (640:17): [True: 0, False: 0]
  ------------------
  641|      0|                    break;
  642|      0|                case 'b':
  ------------------
  |  Branch (642:17): [True: 0, False: 0]
  ------------------
  643|      0|                    if (ossl_likely(strcmp("its", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  644|       |                        /* OSSL_PKEY_PARAM_FFC_PBITS */
  645|      0|                        if (ossl_unlikely(r->pbits != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  646|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  647|      0|                                           "param %s is repeated", s);
  648|      0|                            return 0;
  649|      0|                        }
  650|      0|                        r->pbits = (OSSL_PARAM *)p;
  651|      0|                    }
  652|      0|                    break;
  653|      0|                case 'c':
  ------------------
  |  Branch (653:17): [True: 0, False: 0]
  ------------------
  654|      0|                    if (ossl_likely(strcmp("ounter", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  655|       |                        /* OSSL_PKEY_PARAM_FFC_PCOUNTER */
  656|      0|                        ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  657|      0|                                       "param %s is unsupported", s);
  658|      0|                        return 0;
  659|      0|                    }
  660|      0|                    break;
  661|      0|                case 'r':
  ------------------
  |  Branch (661:17): [True: 0, False: 0]
  ------------------
  662|      0|                    switch(s[2]) {
  663|      0|                    default:
  ------------------
  |  Branch (663:21): [True: 0, False: 0]
  ------------------
  664|      0|                        break;
  665|      0|                    case 'i':
  ------------------
  |  Branch (665:21): [True: 0, False: 0]
  ------------------
  666|      0|                        if (ossl_likely(strcmp("v_len", s + 3) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  667|       |                            /* OSSL_PKEY_PARAM_DH_PRIV_LEN */
  668|      0|                            if (ossl_unlikely(r->privlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  669|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  670|      0|                                               "param %s is repeated", s);
  671|      0|                                return 0;
  672|      0|                            }
  673|      0|                            r->privlen = (OSSL_PARAM *)p;
  674|      0|                        }
  675|      0|                        break;
  676|      0|                    case 'o':
  ------------------
  |  Branch (676:21): [True: 0, False: 0]
  ------------------
  677|      0|                        if (ossl_likely(strcmp("perties", s + 3) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  678|       |                            /* OSSL_PKEY_PARAM_FFC_DIGEST_PROPS */
  679|      0|                            ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  680|      0|                                           "param %s is unsupported", s);
  681|      0|                            return 0;
  682|      0|                        }
  683|      0|                    }
  684|      0|                }
  685|      0|                break;
  686|      0|            case 'q':
  ------------------
  |  Branch (686:13): [True: 0, False: 210]
  ------------------
  687|      0|                if (ossl_likely(strcmp("bits", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  688|       |                    /* OSSL_PKEY_PARAM_FFC_QBITS */
  689|      0|                    ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  690|      0|                                   "param %s is unsupported", s);
  691|      0|                    return 0;
  692|      0|                }
  693|      0|                break;
  694|      0|            case 's':
  ------------------
  |  Branch (694:13): [True: 0, False: 210]
  ------------------
  695|      0|                switch(s[1]) {
  696|      0|                default:
  ------------------
  |  Branch (696:17): [True: 0, False: 0]
  ------------------
  697|      0|                    break;
  698|      0|                case 'a':
  ------------------
  |  Branch (698:17): [True: 0, False: 0]
  ------------------
  699|      0|                    if (ossl_likely(strcmp("feprime-generator", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  700|       |                        /* OSSL_PKEY_PARAM_DH_GENERATOR */
  701|      0|                        if (ossl_unlikely(r->generator != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  702|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  703|      0|                                           "param %s is repeated", s);
  704|      0|                            return 0;
  705|      0|                        }
  706|      0|                        r->generator = (OSSL_PARAM *)p;
  707|      0|                    }
  708|      0|                    break;
  709|      0|                case 'e':
  ------------------
  |  Branch (709:17): [True: 0, False: 0]
  ------------------
  710|      0|                    if (ossl_likely(strcmp("ed", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  711|       |                        /* OSSL_PKEY_PARAM_FFC_SEED */
  712|      0|                        ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  713|      0|                                       "param %s is unsupported", s);
  714|      0|                        return 0;
  715|      0|                    }
  716|      0|                }
  717|      0|                break;
  718|      0|            case 't':
  ------------------
  |  Branch (718:13): [True: 0, False: 210]
  ------------------
  719|      0|                if (ossl_likely(strcmp("ype", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  720|       |                    /* OSSL_PKEY_PARAM_FFC_TYPE */
  721|      0|                    if (ossl_unlikely(r->type != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  722|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  723|      0|                                       "param %s is repeated", s);
  724|      0|                        return 0;
  725|      0|                    }
  726|      0|                    r->type = (OSSL_PARAM *)p;
  727|      0|                }
  728|    210|            }
  729|    420|    return 1;
  730|    420|}
dh_kmgmt.c:dh_get_params_decoder:
   61|    630|{
   62|    630|    const char *s;
   63|       |
   64|    630|    memset(r, 0, sizeof(*r));
   65|    630|    if (p != NULL)
  ------------------
  |  Branch (65:9): [True: 630, False: 0]
  ------------------
   66|  1.89k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (66:16): [True: 1.26k, False: 630]
  ------------------
   67|  1.26k|            switch(s[0]) {
   68|      0|            default:
  ------------------
  |  Branch (68:13): [True: 0, False: 1.26k]
  ------------------
   69|      0|                break;
   70|    210|            case 'b':
  ------------------
  |  Branch (70:13): [True: 210, False: 1.05k]
  ------------------
   71|    210|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|    210|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 210, False: 0]
  |  |  ------------------
  ------------------
   72|       |                    /* OSSL_PKEY_PARAM_BITS */
   73|    210|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|    210|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 210]
  |  |  ------------------
  ------------------
   74|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   75|      0|                                       "param %s is repeated", s);
   76|      0|                        return 0;
   77|      0|                    }
   78|    210|                    r->bits = (OSSL_PARAM *)p;
   79|    210|                }
   80|    210|                break;
   81|    420|            case 'e':
  ------------------
  |  Branch (81:13): [True: 420, False: 840]
  ------------------
   82|    420|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|    420|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 420, False: 0]
  |  |  ------------------
  ------------------
   83|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
   84|    420|                    if (ossl_unlikely(r->encpubkey != NULL)) {
  ------------------
  |  |   23|    420|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 420]
  |  |  ------------------
  ------------------
   85|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   86|      0|                                       "param %s is repeated", s);
   87|      0|                        return 0;
   88|      0|                    }
   89|    420|                    r->encpubkey = (OSSL_PARAM *)p;
   90|    420|                }
   91|    420|                break;
   92|    420|            case 'g':
  ------------------
  |  Branch (92:13): [True: 0, False: 1.26k]
  ------------------
   93|      0|                switch(s[1]) {
   94|      0|                default:
  ------------------
  |  Branch (94:17): [True: 0, False: 0]
  ------------------
   95|      0|                    break;
   96|      0|                case 'i':
  ------------------
  |  Branch (96:17): [True: 0, False: 0]
  ------------------
   97|      0|                    if (ossl_likely(strcmp("ndex", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   98|       |                        /* OSSL_PKEY_PARAM_FFC_GINDEX */
   99|      0|                        if (ossl_unlikely(r->ffp.g_index != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  100|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  101|      0|                                           "param %s is repeated", s);
  102|      0|                            return 0;
  103|      0|                        }
  104|      0|                        r->ffp.g_index = (OSSL_PARAM *)p;
  105|      0|                    }
  106|      0|                    break;
  107|      0|                case 'r':
  ------------------
  |  Branch (107:17): [True: 0, False: 0]
  ------------------
  108|      0|                    if (ossl_likely(strcmp("oup", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  109|       |                        /* OSSL_PKEY_PARAM_GROUP_NAME */
  110|      0|                        if (ossl_unlikely(r->ffp.group_name != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  111|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  112|      0|                                           "param %s is repeated", s);
  113|      0|                            return 0;
  114|      0|                        }
  115|      0|                        r->ffp.group_name = (OSSL_PARAM *)p;
  116|      0|                    }
  117|      0|                    break;
  118|      0|                case '\0':
  ------------------
  |  Branch (118:17): [True: 0, False: 0]
  ------------------
  119|      0|                    if (ossl_unlikely(r->ffp.g != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  120|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  121|      0|                                       "param %s is repeated", s);
  122|      0|                        return 0;
  123|      0|                    }
  124|      0|                    r->ffp.g = (OSSL_PARAM *)p;
  125|      0|                }
  126|      0|                break;
  127|      0|            case 'h':
  ------------------
  |  Branch (127:13): [True: 0, False: 1.26k]
  ------------------
  128|      0|                if (ossl_likely(strcmp("index", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  129|       |                    /* OSSL_PKEY_PARAM_FFC_H */
  130|      0|                    if (ossl_unlikely(r->ffp.h != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  131|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  132|      0|                                       "param %s is repeated", s);
  133|      0|                        return 0;
  134|      0|                    }
  135|      0|                    r->ffp.h = (OSSL_PARAM *)p;
  136|      0|                }
  137|      0|                break;
  138|      0|            case 'j':
  ------------------
  |  Branch (138:13): [True: 0, False: 1.26k]
  ------------------
  139|      0|                switch(s[1]) {
  140|      0|                default:
  ------------------
  |  Branch (140:17): [True: 0, False: 0]
  ------------------
  141|      0|                    break;
  142|      0|                case '\0':
  ------------------
  |  Branch (142:17): [True: 0, False: 0]
  ------------------
  143|      0|                    if (ossl_unlikely(r->ffp.cofactor != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  144|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  145|      0|                                       "param %s is repeated", s);
  146|      0|                        return 0;
  147|      0|                    }
  148|      0|                    r->ffp.cofactor = (OSSL_PARAM *)p;
  149|      0|                }
  150|      0|                break;
  151|    210|            case 'm':
  ------------------
  |  Branch (151:13): [True: 210, False: 1.05k]
  ------------------
  152|    210|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|    210|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 210, False: 0]
  |  |  ------------------
  ------------------
  153|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  154|    210|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|    210|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 210]
  |  |  ------------------
  ------------------
  155|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  156|      0|                                       "param %s is repeated", s);
  157|      0|                        return 0;
  158|      0|                    }
  159|    210|                    r->maxsize = (OSSL_PARAM *)p;
  160|    210|                }
  161|    210|                break;
  162|    210|            case 'p':
  ------------------
  |  Branch (162:13): [True: 0, False: 1.26k]
  ------------------
  163|      0|                switch(s[1]) {
  164|      0|                default:
  ------------------
  |  Branch (164:17): [True: 0, False: 0]
  ------------------
  165|      0|                    break;
  166|      0|                case 'c':
  ------------------
  |  Branch (166:17): [True: 0, False: 0]
  ------------------
  167|      0|                    if (ossl_likely(strcmp("ounter", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  168|       |                        /* OSSL_PKEY_PARAM_FFC_PCOUNTER */
  169|      0|                        if (ossl_unlikely(r->ffp.p_counter != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  170|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  171|      0|                                           "param %s is repeated", s);
  172|      0|                            return 0;
  173|      0|                        }
  174|      0|                        r->ffp.p_counter = (OSSL_PARAM *)p;
  175|      0|                    }
  176|      0|                    break;
  177|      0|                case 'r':
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      0|                    switch(s[2]) {
  179|      0|                    default:
  ------------------
  |  Branch (179:21): [True: 0, False: 0]
  ------------------
  180|      0|                        break;
  181|      0|                    case 'i':
  ------------------
  |  Branch (181:21): [True: 0, False: 0]
  ------------------
  182|      0|                        switch(s[3]) {
  183|      0|                        default:
  ------------------
  |  Branch (183:25): [True: 0, False: 0]
  ------------------
  184|      0|                            break;
  185|      0|                        case 'v':
  ------------------
  |  Branch (185:25): [True: 0, False: 0]
  ------------------
  186|      0|                            switch(s[4]) {
  187|      0|                            default:
  ------------------
  |  Branch (187:29): [True: 0, False: 0]
  ------------------
  188|      0|                                break;
  189|      0|                            case '_':
  ------------------
  |  Branch (189:29): [True: 0, False: 0]
  ------------------
  190|      0|                                if (ossl_likely(strcmp("len", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  191|       |                                    /* OSSL_PKEY_PARAM_DH_PRIV_LEN */
  192|      0|                                    if (ossl_unlikely(r->privlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  193|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  194|      0|                                                       "param %s is repeated", s);
  195|      0|                                        return 0;
  196|      0|                                    }
  197|      0|                                    r->privlen = (OSSL_PARAM *)p;
  198|      0|                                }
  199|      0|                                break;
  200|      0|                            case '\0':
  ------------------
  |  Branch (200:29): [True: 0, False: 0]
  ------------------
  201|      0|                                if (ossl_unlikely(r->privkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  202|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  203|      0|                                                   "param %s is repeated", s);
  204|      0|                                    return 0;
  205|      0|                                }
  206|      0|                                r->privkey = (OSSL_PARAM *)p;
  207|      0|                            }
  208|      0|                        }
  209|      0|                    }
  210|      0|                    break;
  211|      0|                case 'u':
  ------------------
  |  Branch (211:17): [True: 0, False: 0]
  ------------------
  212|      0|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  213|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  214|      0|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  215|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  216|      0|                                           "param %s is repeated", s);
  217|      0|                            return 0;
  218|      0|                        }
  219|      0|                        r->pubkey = (OSSL_PARAM *)p;
  220|      0|                    }
  221|      0|                    break;
  222|      0|                case '\0':
  ------------------
  |  Branch (222:17): [True: 0, False: 0]
  ------------------
  223|      0|                    if (ossl_unlikely(r->ffp.p != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  224|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  225|      0|                                       "param %s is repeated", s);
  226|      0|                        return 0;
  227|      0|                    }
  228|      0|                    r->ffp.p = (OSSL_PARAM *)p;
  229|      0|                }
  230|      0|                break;
  231|      0|            case 'q':
  ------------------
  |  Branch (231:13): [True: 0, False: 1.26k]
  ------------------
  232|      0|                switch(s[1]) {
  233|      0|                default:
  ------------------
  |  Branch (233:17): [True: 0, False: 0]
  ------------------
  234|      0|                    break;
  235|      0|                case '\0':
  ------------------
  |  Branch (235:17): [True: 0, False: 0]
  ------------------
  236|      0|                    if (ossl_unlikely(r->ffp.q != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  237|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  238|      0|                                       "param %s is repeated", s);
  239|      0|                        return 0;
  240|      0|                    }
  241|      0|                    r->ffp.q = (OSSL_PARAM *)p;
  242|      0|                }
  243|      0|                break;
  244|    420|            case 's':
  ------------------
  |  Branch (244:13): [True: 420, False: 840]
  ------------------
  245|    420|                switch(s[1]) {
  246|      0|                default:
  ------------------
  |  Branch (246:17): [True: 0, False: 420]
  ------------------
  247|      0|                    break;
  248|    420|                case 'e':
  ------------------
  |  Branch (248:17): [True: 420, False: 0]
  ------------------
  249|    420|                    switch(s[2]) {
  250|      0|                    default:
  ------------------
  |  Branch (250:21): [True: 0, False: 420]
  ------------------
  251|      0|                        break;
  252|    420|                    case 'c':
  ------------------
  |  Branch (252:21): [True: 420, False: 0]
  ------------------
  253|    420|                        switch(s[3]) {
  254|      0|                        default:
  ------------------
  |  Branch (254:25): [True: 0, False: 420]
  ------------------
  255|      0|                            break;
  256|    420|                        case 'u':
  ------------------
  |  Branch (256:25): [True: 420, False: 0]
  ------------------
  257|    420|                            switch(s[4]) {
  258|      0|                            default:
  ------------------
  |  Branch (258:29): [True: 0, False: 420]
  ------------------
  259|      0|                                break;
  260|    420|                            case 'r':
  ------------------
  |  Branch (260:29): [True: 420, False: 0]
  ------------------
  261|    420|                                switch(s[5]) {
  262|      0|                                default:
  ------------------
  |  Branch (262:33): [True: 0, False: 420]
  ------------------
  263|      0|                                    break;
  264|    420|                                case 'i':
  ------------------
  |  Branch (264:33): [True: 420, False: 0]
  ------------------
  265|    420|                                    switch(s[6]) {
  266|      0|                                    default:
  ------------------
  |  Branch (266:37): [True: 0, False: 420]
  ------------------
  267|      0|                                        break;
  268|    420|                                    case 't':
  ------------------
  |  Branch (268:37): [True: 420, False: 0]
  ------------------
  269|    420|                                        switch(s[7]) {
  270|      0|                                        default:
  ------------------
  |  Branch (270:41): [True: 0, False: 420]
  ------------------
  271|      0|                                            break;
  272|    420|                                        case 'y':
  ------------------
  |  Branch (272:41): [True: 420, False: 0]
  ------------------
  273|    420|                                            switch(s[8]) {
  274|      0|                                            default:
  ------------------
  |  Branch (274:45): [True: 0, False: 420]
  ------------------
  275|      0|                                                break;
  276|    420|                                            case '-':
  ------------------
  |  Branch (276:45): [True: 420, False: 0]
  ------------------
  277|    420|                                                switch(s[9]) {
  278|      0|                                                default:
  ------------------
  |  Branch (278:49): [True: 0, False: 420]
  ------------------
  279|      0|                                                    break;
  280|    210|                                                case 'b':
  ------------------
  |  Branch (280:49): [True: 210, False: 210]
  ------------------
  281|    210|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|    210|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 210, False: 0]
  |  |  ------------------
  ------------------
  282|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  283|    210|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|    210|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 210]
  |  |  ------------------
  ------------------
  284|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  285|      0|                                                                           "param %s is repeated", s);
  286|      0|                                                            return 0;
  287|      0|                                                        }
  288|    210|                                                        r->secbits = (OSSL_PARAM *)p;
  289|    210|                                                    }
  290|    210|                                                    break;
  291|    210|                                                case 'c':
  ------------------
  |  Branch (291:49): [True: 210, False: 210]
  ------------------
  292|    210|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|    210|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 210, False: 0]
  |  |  ------------------
  ------------------
  293|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  294|    210|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|    210|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 210]
  |  |  ------------------
  ------------------
  295|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  296|      0|                                                                           "param %s is repeated", s);
  297|      0|                                                            return 0;
  298|      0|                                                        }
  299|    210|                                                        r->seccat = (OSSL_PARAM *)p;
  300|    210|                                                    }
  301|    420|                                                }
  302|    420|                                            }
  303|    420|                                        }
  304|    420|                                    }
  305|    420|                                }
  306|    420|                            }
  307|    420|                        }
  308|    420|                        break;
  309|    420|                    case 'e':
  ------------------
  |  Branch (309:21): [True: 0, False: 420]
  ------------------
  310|      0|                        if (ossl_likely(strcmp("d", s + 3) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  311|       |                            /* OSSL_PKEY_PARAM_FFC_SEED */
  312|      0|                            if (ossl_unlikely(r->ffp.seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  313|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  314|      0|                                               "param %s is repeated", s);
  315|      0|                                return 0;
  316|      0|                            }
  317|      0|                            r->ffp.seed = (OSSL_PARAM *)p;
  318|      0|                        }
  319|    420|                    }
  320|    420|                }
  321|  1.26k|            }
  322|    630|    return 1;
  323|    630|}

ec_kmgmt.c:ec_gen_init:
  989|    441|{
  990|    441|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|    441|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  991|    441|    struct ec_gen_ctx *gctx = NULL;
  992|       |
  993|    441|    if (!ossl_prov_is_running() || (selection & (EC_POSSIBLE_SELECTIONS)) == 0)
  ------------------
  |  |   81|    441|    (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  656|    441|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  646|    441|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|    441|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  653|    441|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  ------------------
  |  |  |  |  |  |  648|    441|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  ------------------
  |  |  |  |  654|    441|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  649|    441|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (993:9): [True: 0, False: 441]
  |  Branch (993:36): [True: 0, False: 441]
  ------------------
  994|      0|        return NULL;
  995|       |
  996|    441|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  109|    441|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (996:9): [True: 441, False: 0]
  ------------------
  997|    441|        gctx->libctx = libctx;
  998|    441|        gctx->selection = selection;
  999|    441|        gctx->ecdh_mode = 0;
 1000|    441|        OSSL_FIPS_IND_INIT(gctx)
 1001|    441|        if (!ec_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (1001:13): [True: 0, False: 441]
  ------------------
 1002|      0|            ec_gen_cleanup(gctx);
 1003|       |            gctx = NULL;
 1004|      0|        }
 1005|    441|    }
 1006|    441|    return gctx;
 1007|    441|}
ec_kmgmt.c:ec_gen_set_params:
 1094|    882|{
 1095|    882|    int ret = 0;
 1096|    882|    struct ec_gen_ctx *gctx = genctx;
 1097|    882|    const OSSL_PARAM *p;
 1098|       |
 1099|    882|    if (!OSSL_FIPS_IND_SET_CTX_PARAM(gctx, OSSL_FIPS_IND_SETTABLE0, params,
  ------------------
  |  |  157|    882|#define OSSL_FIPS_IND_SET_CTX_PARAM(ctx, id, params, name) 1
  ------------------
  |  Branch (1099:9): [Folded, False: 882]
  ------------------
 1100|    882|            OSSL_PKEY_PARAM_FIPS_KEY_CHECK))
 1101|      0|        goto err;
 1102|       |
 1103|    882|    COPY_INT_PARAM(params, OSSL_PKEY_PARAM_USE_COFACTOR_ECDH, gctx->ecdh_mode);
  ------------------
  |  | 1057|    882|    p = OSSL_PARAM_locate_const(params, key);      \
  |  | 1058|    882|    if (p != NULL && !OSSL_PARAM_get_int(p, &val)) \
  |  |  ------------------
  |  |  |  Branch (1058:9): [True: 0, False: 882]
  |  |  |  Branch (1058:22): [True: 0, False: 0]
  |  |  ------------------
  |  | 1059|    882|        goto err;
  ------------------
 1104|       |
 1105|    882|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_GROUP_NAME, gctx->group_name);
  ------------------
  |  | 1062|    882|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    882|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 441, False: 441]
  |  |  ------------------
  |  | 1064|    441|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|    441|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1064:13): [True: 0, False: 441]
  |  |  ------------------
  |  | 1065|    441|            goto err;                               \
  |  | 1066|    441|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  132|    441|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1067|    441|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  136|    441|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1068|    441|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1068:13): [True: 0, False: 441]
  |  |  ------------------
  |  | 1069|    441|            goto err;                               \
  |  | 1070|    441|    }
  ------------------
 1106|    882|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_FIELD_TYPE, gctx->field_type);
  ------------------
  |  | 1062|    882|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    882|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1064|      0|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1064:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1065|      0|            goto err;                               \
  |  | 1066|      0|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1067|      0|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1068|      0|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1068:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1069|      0|            goto err;                               \
  |  | 1070|      0|    }
  ------------------
 1107|    882|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_ENCODING, gctx->encoding);
  ------------------
  |  | 1062|    882|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    882|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1064|      0|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1064:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1065|      0|            goto err;                               \
  |  | 1066|      0|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1067|      0|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1068|      0|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1068:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1069|      0|            goto err;                               \
  |  | 1070|      0|    }
  ------------------
 1108|    882|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT, gctx->pt_format);
  ------------------
  |  | 1062|    882|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    882|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1064|      0|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1064:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1065|      0|            goto err;                               \
  |  | 1066|      0|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1067|      0|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1068|      0|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1068:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1069|      0|            goto err;                               \
  |  | 1070|      0|    }
  ------------------
 1109|    882|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE, gctx->group_check);
  ------------------
  |  | 1062|    882|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    882|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1064|      0|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1064:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1065|      0|            goto err;                               \
  |  | 1066|      0|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1067|      0|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1068|      0|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1068:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1069|      0|            goto err;                               \
  |  | 1070|      0|    }
  ------------------
 1110|       |
 1111|    882|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_P, gctx->p);
  ------------------
  |  | 1085|    882|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    882|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1087|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1087:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1088|      0|            bn = BN_new();                            \
  |  | 1089|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1089:13): [True: 0, False: 0]
  |  |  |  Branch (1089:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1090|      0|            goto err;                                 \
  |  | 1091|      0|    }
  ------------------
 1112|    882|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_A, gctx->a);
  ------------------
  |  | 1085|    882|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    882|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1087|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1087:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1088|      0|            bn = BN_new();                            \
  |  | 1089|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1089:13): [True: 0, False: 0]
  |  |  |  Branch (1089:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1090|      0|            goto err;                                 \
  |  | 1091|      0|    }
  ------------------
 1113|    882|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_B, gctx->b);
  ------------------
  |  | 1085|    882|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    882|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1087|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1087:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1088|      0|            bn = BN_new();                            \
  |  | 1089|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1089:13): [True: 0, False: 0]
  |  |  |  Branch (1089:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1090|      0|            goto err;                                 \
  |  | 1091|      0|    }
  ------------------
 1114|    882|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_ORDER, gctx->order);
  ------------------
  |  | 1085|    882|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    882|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1087|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1087:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1088|      0|            bn = BN_new();                            \
  |  | 1089|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1089:13): [True: 0, False: 0]
  |  |  |  Branch (1089:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1090|      0|            goto err;                                 \
  |  | 1091|      0|    }
  ------------------
 1115|    882|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_COFACTOR, gctx->cofactor);
  ------------------
  |  | 1085|    882|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    882|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1087|      0|        if (bn == NULL)                               \
  |  |  ------------------
  |  |  |  Branch (1087:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1088|      0|            bn = BN_new();                            \
  |  | 1089|      0|        if (bn == NULL || !OSSL_PARAM_get_BN(p, &bn)) \
  |  |  ------------------
  |  |  |  Branch (1089:13): [True: 0, False: 0]
  |  |  |  Branch (1089:27): [True: 0, False: 0]
  |  |  ------------------
  |  | 1090|      0|            goto err;                                 \
  |  | 1091|      0|    }
  ------------------
 1116|       |
 1117|    882|    COPY_OCTET_PARAM(params, OSSL_PKEY_PARAM_EC_SEED, gctx->seed, gctx->seed_len);
  ------------------
  |  | 1073|    882|    p = OSSL_PARAM_locate_const(params, key);        \
  |  | 1074|    882|    if (p != NULL) {                                 \
  |  |  ------------------
  |  |  |  Branch (1074:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1075|      0|        if (p->data_type != OSSL_PARAM_OCTET_STRING) \
  |  |  ------------------
  |  |  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  |  |  ------------------
  |  |  |  Branch (1075:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1076|      0|            goto err;                                \
  |  | 1077|      0|        OPENSSL_free(val);                           \
  |  |  ------------------
  |  |  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1078|      0|        len = p->data_size;                          \
  |  | 1079|      0|        val = OPENSSL_memdup(p->data, p->data_size); \
  |  |  ------------------
  |  |  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1080|      0|        if (val == NULL)                             \
  |  |  ------------------
  |  |  |  Branch (1080:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1081|      0|            goto err;                                \
  |  | 1082|      0|    }
  ------------------
 1118|    882|    COPY_OCTET_PARAM(params, OSSL_PKEY_PARAM_EC_GENERATOR, gctx->gen,
  ------------------
  |  | 1073|    882|    p = OSSL_PARAM_locate_const(params, key);        \
  |  | 1074|    882|    if (p != NULL) {                                 \
  |  |  ------------------
  |  |  |  Branch (1074:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1075|      0|        if (p->data_type != OSSL_PARAM_OCTET_STRING) \
  |  |  ------------------
  |  |  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  |  |  ------------------
  |  |  |  Branch (1075:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1076|      0|            goto err;                                \
  |  | 1077|      0|        OPENSSL_free(val);                           \
  |  |  ------------------
  |  |  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1078|      0|        len = p->data_size;                          \
  |  | 1079|      0|        val = OPENSSL_memdup(p->data, p->data_size); \
  |  |  ------------------
  |  |  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1080|      0|        if (val == NULL)                             \
  |  |  ------------------
  |  |  |  Branch (1080:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1081|      0|            goto err;                                \
  |  | 1082|      0|    }
  ------------------
 1119|    882|        gctx->gen_len);
 1120|       |
 1121|    882|    COPY_OCTET_PARAM(params, OSSL_PKEY_PARAM_DHKEM_IKM, gctx->dhkem_ikm,
  ------------------
  |  | 1073|    882|    p = OSSL_PARAM_locate_const(params, key);        \
  |  | 1074|    882|    if (p != NULL) {                                 \
  |  |  ------------------
  |  |  |  Branch (1074:9): [True: 0, False: 882]
  |  |  ------------------
  |  | 1075|      0|        if (p->data_type != OSSL_PARAM_OCTET_STRING) \
  |  |  ------------------
  |  |  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  |  |  ------------------
  |  |  |  Branch (1075:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1076|      0|            goto err;                                \
  |  | 1077|      0|        OPENSSL_free(val);                           \
  |  |  ------------------
  |  |  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1078|      0|        len = p->data_size;                          \
  |  | 1079|      0|        val = OPENSSL_memdup(p->data, p->data_size); \
  |  |  ------------------
  |  |  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1080|      0|        if (val == NULL)                             \
  |  |  ------------------
  |  |  |  Branch (1080:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1081|      0|            goto err;                                \
  |  | 1082|      0|    }
  ------------------
 1122|    882|        gctx->dhkem_ikmlen);
 1123|       |
 1124|    882|    ret = 1;
 1125|    882|err:
 1126|    882|    return ret;
 1127|    882|}
ec_kmgmt.c:ec_gen:
 1265|    153|{
 1266|    153|    struct ec_gen_ctx *gctx = genctx;
 1267|    153|    EC_KEY *ec = NULL;
 1268|    153|    int ret = 0;
 1269|       |
 1270|    153|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (1270:9): [True: 0, False: 153]
  ------------------
 1271|    153|        || gctx == NULL
  ------------------
  |  Branch (1271:12): [True: 0, False: 153]
  ------------------
 1272|    153|        || (ec = EC_KEY_new_ex(gctx->libctx, NULL)) == NULL)
  ------------------
  |  Branch (1272:12): [True: 0, False: 153]
  ------------------
 1273|      0|        return NULL;
 1274|       |
 1275|    153|    if (gctx->gen_group == NULL) {
  ------------------
  |  Branch (1275:9): [True: 153, False: 0]
  ------------------
 1276|    153|        if (!ec_gen_set_group_from_params(gctx))
  ------------------
  |  Branch (1276:13): [True: 0, False: 153]
  ------------------
 1277|      0|            goto err;
 1278|    153|    } else {
 1279|      0|        if (gctx->encoding != NULL) {
  ------------------
  |  Branch (1279:13): [True: 0, False: 0]
  ------------------
 1280|      0|            int flags = ossl_ec_encoding_name2id(gctx->encoding);
 1281|       |
 1282|      0|            if (flags < 0)
  ------------------
  |  Branch (1282:17): [True: 0, False: 0]
  ------------------
 1283|      0|                goto err;
 1284|      0|            EC_GROUP_set_asn1_flag(gctx->gen_group, flags);
 1285|      0|        }
 1286|      0|        if (gctx->pt_format != NULL) {
  ------------------
  |  Branch (1286:13): [True: 0, False: 0]
  ------------------
 1287|      0|            int format = ossl_ec_pt_format_name2id(gctx->pt_format);
 1288|       |
 1289|      0|            if (format < 0)
  ------------------
  |  Branch (1289:17): [True: 0, False: 0]
  ------------------
 1290|      0|                goto err;
 1291|      0|            EC_GROUP_set_point_conversion_form(gctx->gen_group, format);
 1292|      0|        }
 1293|      0|    }
 1294|       |#ifdef FIPS_MODULE
 1295|       |    if (!ossl_fips_ind_ec_key_check(OSSL_FIPS_IND_GET(gctx),
 1296|       |            OSSL_FIPS_IND_SETTABLE0, gctx->libctx,
 1297|       |            gctx->gen_group, "EC KeyGen", 1))
 1298|       |        goto err;
 1299|       |#endif
 1300|       |
 1301|       |    /* We must always assign a group, no matter what */
 1302|    153|    ret = ec_gen_assign_group(ec, gctx->gen_group);
 1303|       |
 1304|       |    /* Whether you want it or not, you get a keypair, not just one half */
 1305|    153|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  656|    153|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|    153|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|    153|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (1305:9): [True: 153, False: 0]
  ------------------
 1306|    153|#ifndef FIPS_MODULE
 1307|    153|        if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0)
  ------------------
  |  Branch (1307:13): [True: 0, False: 153]
  |  Branch (1307:40): [True: 0, False: 0]
  ------------------
 1308|      0|            ret = ret && ossl_ec_generate_key_dhkem(ec, gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  Branch (1308:19): [True: 0, False: 0]
  |  Branch (1308:26): [True: 0, False: 0]
  ------------------
 1309|    153|        else
 1310|    153|#endif
 1311|    153|            ret = ret && EC_KEY_generate_key(ec);
  ------------------
  |  Branch (1311:19): [True: 153, False: 0]
  |  Branch (1311:26): [True: 153, False: 0]
  ------------------
 1312|    153|    }
 1313|       |
 1314|    153|    if (gctx->ecdh_mode != -1)
  ------------------
  |  Branch (1314:9): [True: 153, False: 0]
  ------------------
 1315|    153|        ret = ret && ossl_ec_set_ecdh_cofactor_mode(ec, gctx->ecdh_mode);
  ------------------
  |  Branch (1315:15): [True: 153, False: 0]
  |  Branch (1315:22): [True: 153, False: 0]
  ------------------
 1316|       |
 1317|    153|    if (gctx->group_check != NULL)
  ------------------
  |  Branch (1317:9): [True: 0, False: 153]
  ------------------
 1318|      0|        ret = ret && ossl_ec_set_check_group_type_from_name(ec, gctx->group_check);
  ------------------
  |  Branch (1318:15): [True: 0, False: 0]
  |  Branch (1318:22): [True: 0, False: 0]
  ------------------
 1319|       |#ifdef FIPS_MODULE
 1320|       |    if (ret > 0
 1321|       |        && !ossl_fips_self_testing()
 1322|       |        && EC_KEY_get0_public_key(ec) != NULL
 1323|       |        && EC_KEY_get0_private_key(ec) != NULL
 1324|       |        && EC_KEY_get0_group(ec) != NULL) {
 1325|       |        BN_CTX *bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(ec));
 1326|       |
 1327|       |        ret = bnctx != NULL && ossl_ec_key_pairwise_check(ec, bnctx);
 1328|       |        BN_CTX_free(bnctx);
 1329|       |        if (ret <= 0)
 1330|       |            ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
 1331|       |    }
 1332|       |#endif /* FIPS_MODULE */
 1333|       |
 1334|    153|    if (ret)
  ------------------
  |  Branch (1334:9): [True: 153, False: 0]
  ------------------
 1335|    153|        return ec;
 1336|      0|err:
 1337|       |    /* Something went wrong, throw the key away */
 1338|      0|    EC_KEY_free(ec);
 1339|       |    return NULL;
 1340|    153|}
ec_kmgmt.c:ec_gen_set_group_from_params:
 1130|    441|{
 1131|    441|    int ret = 0;
 1132|    441|    OSSL_PARAM_BLD *bld;
 1133|    441|    OSSL_PARAM *params = NULL;
 1134|    441|    EC_GROUP *group = NULL;
 1135|       |
 1136|    441|    bld = OSSL_PARAM_BLD_new();
 1137|    441|    if (bld == NULL)
  ------------------
  |  Branch (1137:9): [True: 0, False: 441]
  ------------------
 1138|      0|        return 0;
 1139|       |
 1140|    441|    if (gctx->encoding != NULL
  ------------------
  |  Branch (1140:9): [True: 0, False: 441]
  ------------------
 1141|      0|        && !OSSL_PARAM_BLD_push_utf8_string(bld, OSSL_PKEY_PARAM_EC_ENCODING,
  ------------------
  |  |  395|      0|# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
  ------------------
  |  Branch (1141:12): [True: 0, False: 0]
  ------------------
 1142|      0|            gctx->encoding, 0))
 1143|      0|        goto err;
 1144|       |
 1145|    441|    if (gctx->pt_format != NULL
  ------------------
  |  Branch (1145:9): [True: 0, False: 441]
  ------------------
 1146|      0|        && !OSSL_PARAM_BLD_push_utf8_string(bld,
  ------------------
  |  Branch (1146:12): [True: 0, False: 0]
  ------------------
 1147|      0|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT,
  ------------------
  |  |  403|      0|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
 1148|      0|            gctx->pt_format, 0))
 1149|      0|        goto err;
 1150|       |
 1151|    441|    if (gctx->group_name != NULL) {
  ------------------
  |  Branch (1151:9): [True: 441, False: 0]
  ------------------
 1152|    441|        if (!OSSL_PARAM_BLD_push_utf8_string(bld, OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|    441|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  |  Branch (1152:13): [True: 0, False: 441]
  ------------------
 1153|    441|                gctx->group_name, 0))
 1154|      0|            goto err;
 1155|       |        /* Ignore any other parameters if there is a group name */
 1156|    441|        goto build;
 1157|    441|    } else if (gctx->field_type != NULL) {
  ------------------
  |  Branch (1157:16): [True: 0, False: 0]
  ------------------
 1158|      0|        if (!OSSL_PARAM_BLD_push_utf8_string(bld, OSSL_PKEY_PARAM_EC_FIELD_TYPE,
  ------------------
  |  |  397|      0|# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
  ------------------
  |  Branch (1158:13): [True: 0, False: 0]
  ------------------
 1159|      0|                gctx->field_type, 0))
 1160|      0|            goto err;
 1161|      0|    } else {
 1162|      0|        goto err;
 1163|      0|    }
 1164|      0|    if (gctx->p == NULL
  ------------------
  |  Branch (1164:9): [True: 0, False: 0]
  ------------------
 1165|      0|        || gctx->a == NULL
  ------------------
  |  Branch (1165:12): [True: 0, False: 0]
  ------------------
 1166|      0|        || gctx->b == NULL
  ------------------
  |  Branch (1166:12): [True: 0, False: 0]
  ------------------
 1167|      0|        || gctx->order == NULL
  ------------------
  |  Branch (1167:12): [True: 0, False: 0]
  ------------------
 1168|      0|        || !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_P, gctx->p)
  ------------------
  |  |  402|      0|# define OSSL_PKEY_PARAM_EC_P "p"
  ------------------
  |  Branch (1168:12): [True: 0, False: 0]
  ------------------
 1169|      0|        || !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_A, gctx->a)
  ------------------
  |  |  385|      0|# define OSSL_PKEY_PARAM_EC_A "a"
  ------------------
  |  Branch (1169:12): [True: 0, False: 0]
  ------------------
 1170|      0|        || !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_B, gctx->b)
  ------------------
  |  |  386|      0|# define OSSL_PKEY_PARAM_EC_B "b"
  ------------------
  |  Branch (1170:12): [True: 0, False: 0]
  ------------------
 1171|      0|        || !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_ORDER, gctx->order))
  ------------------
  |  |  401|      0|# define OSSL_PKEY_PARAM_EC_ORDER "order"
  ------------------
  |  Branch (1171:12): [True: 0, False: 0]
  ------------------
 1172|      0|        goto err;
 1173|       |
 1174|      0|    if (gctx->cofactor != NULL
  ------------------
  |  Branch (1174:9): [True: 0, False: 0]
  ------------------
 1175|      0|        && !OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_EC_COFACTOR,
  ------------------
  |  |  393|      0|# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
  ------------------
  |  Branch (1175:12): [True: 0, False: 0]
  ------------------
 1176|      0|            gctx->cofactor))
 1177|      0|        goto err;
 1178|       |
 1179|      0|    if (gctx->seed != NULL
  ------------------
  |  Branch (1179:9): [True: 0, False: 0]
  ------------------
 1180|      0|        && !OSSL_PARAM_BLD_push_octet_string(bld, OSSL_PKEY_PARAM_EC_SEED,
  ------------------
  |  |  406|      0|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
  |  Branch (1180:12): [True: 0, False: 0]
  ------------------
 1181|      0|            gctx->seed, gctx->seed_len))
 1182|      0|        goto err;
 1183|       |
 1184|      0|    if (gctx->gen == NULL
  ------------------
  |  Branch (1184:9): [True: 0, False: 0]
  ------------------
 1185|      0|        || !OSSL_PARAM_BLD_push_octet_string(bld, OSSL_PKEY_PARAM_EC_GENERATOR,
  ------------------
  |  |  398|      0|# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
  ------------------
  |  Branch (1185:12): [True: 0, False: 0]
  ------------------
 1186|      0|            gctx->gen, gctx->gen_len))
 1187|      0|        goto err;
 1188|    441|build:
 1189|    441|    params = OSSL_PARAM_BLD_to_param(bld);
 1190|    441|    if (params == NULL)
  ------------------
  |  Branch (1190:9): [True: 0, False: 441]
  ------------------
 1191|      0|        goto err;
 1192|    441|    group = EC_GROUP_new_from_params(params, gctx->libctx, NULL);
 1193|    441|    if (group == NULL)
  ------------------
  |  Branch (1193:9): [True: 0, False: 441]
  ------------------
 1194|      0|        goto err;
 1195|       |
 1196|    441|    EC_GROUP_free(gctx->gen_group);
 1197|    441|    gctx->gen_group = group;
 1198|       |
 1199|    441|    ret = 1;
 1200|    441|err:
 1201|    441|    OSSL_PARAM_free(params);
 1202|    441|    OSSL_PARAM_BLD_free(bld);
 1203|    441|    return ret;
 1204|    441|}
ec_kmgmt.c:ec_gen_assign_group:
 1253|    441|{
 1254|    441|    if (group == NULL) {
  ------------------
  |  Branch (1254:9): [True: 0, False: 441]
  ------------------
 1255|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_PARAMETERS_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1256|      0|        return 0;
 1257|      0|    }
 1258|    441|    return EC_KEY_set_group(ec, group) > 0;
 1259|    441|}
ec_kmgmt.c:ec_gen_cleanup:
 1395|    441|{
 1396|    441|    struct ec_gen_ctx *gctx = genctx;
 1397|       |
 1398|    441|    if (gctx == NULL)
  ------------------
  |  Branch (1398:9): [True: 0, False: 441]
  ------------------
 1399|      0|        return;
 1400|       |
 1401|    441|    OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  |  130|    441|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1402|    441|    EC_GROUP_free(gctx->gen_group);
 1403|    441|    BN_free(gctx->p);
 1404|    441|    BN_free(gctx->a);
 1405|    441|    BN_free(gctx->b);
 1406|    441|    BN_free(gctx->order);
 1407|    441|    BN_free(gctx->cofactor);
 1408|    441|    OPENSSL_free(gctx->group_name);
  ------------------
  |  |  132|    441|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1409|    441|    OPENSSL_free(gctx->field_type);
  ------------------
  |  |  132|    441|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1410|    441|    OPENSSL_free(gctx->pt_format);
  ------------------
  |  |  132|    441|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1411|    441|    OPENSSL_free(gctx->encoding);
  ------------------
  |  |  132|    441|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1412|    441|    OPENSSL_free(gctx->seed);
  ------------------
  |  |  132|    441|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1413|    441|    OPENSSL_free(gctx->gen);
  ------------------
  |  |  132|    441|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1414|    441|    OPENSSL_free(gctx);
  ------------------
  |  |  132|    441|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1415|    441|}
ec_kmgmt.c:ec_load:
 1437|   162k|{
 1438|   162k|    return common_load(reference, reference_sz, 0);
 1439|   162k|}
ec_kmgmt.c:common_load:
 1419|   162k|{
 1420|   162k|    EC_KEY *ec = NULL;
 1421|       |
 1422|   162k|    if (ossl_prov_is_running() && reference_sz == sizeof(ec)) {
  ------------------
  |  Branch (1422:9): [True: 162k, False: 0]
  |  Branch (1422:35): [True: 162k, False: 0]
  ------------------
 1423|       |        /* The contents of the reference is the address to our object */
 1424|   162k|        ec = *(EC_KEY **)reference;
 1425|       |
 1426|   162k|        if (!common_check_sm2(ec, sm2_wanted))
  ------------------
  |  Branch (1426:13): [True: 0, False: 162k]
  ------------------
 1427|      0|            return NULL;
 1428|       |
 1429|       |        /* We grabbed, so we detach it */
 1430|   162k|        *(EC_KEY **)reference = NULL;
 1431|   162k|        return ec;
 1432|   162k|    }
 1433|      0|    return NULL;
 1434|   162k|}
ec_kmgmt.c:common_check_sm2:
  415|   162k|{
  416|   162k|    const EC_GROUP *ecg = NULL;
  417|       |
  418|       |    /*
  419|       |     * sm2_wanted: import the keys or domparams only on SM2 Curve
  420|       |     * !sm2_wanted: import the keys or domparams only not on SM2 Curve
  421|       |     */
  422|   162k|    if ((ecg = EC_KEY_get0_group(ec)) == NULL
  ------------------
  |  Branch (422:9): [True: 0, False: 162k]
  ------------------
  423|   162k|        || (sm2_wanted ^ (EC_GROUP_get_curve_name(ecg) == NID_sm2)))
  ------------------
  |  | 1259|   162k|#define NID_sm2         1172
  ------------------
  |  Branch (423:12): [True: 0, False: 162k]
  ------------------
  424|      0|        return 0;
  425|   162k|    return 1;
  426|   162k|}
ec_kmgmt.c:ec_freedata:
  339|   162k|{
  340|   162k|    EC_KEY_free(keydata);
  341|   162k|}
ec_kmgmt.c:ec_get_params:
  765|   162k|{
  766|   162k|    return common_get_params(key, params, 0);
  767|   162k|}
ec_kmgmt.c:common_get_params:
  663|   163k|{
  664|   163k|    int ret = 0;
  665|   163k|    EC_KEY *eck = key;
  666|   163k|    const EC_GROUP *ecg = NULL;
  667|   163k|    OSSL_PARAM *p;
  668|   163k|    unsigned char *pub_key = NULL, *genbuf = NULL;
  669|   163k|    OSSL_LIB_CTX *libctx;
  670|   163k|    const char *propq;
  671|   163k|    BN_CTX *bnctx = NULL;
  672|       |
  673|   163k|    ecg = EC_KEY_get0_group(eck);
  674|   163k|    if (ecg == NULL) {
  ------------------
  |  Branch (674:9): [True: 0, False: 163k]
  ------------------
  675|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_PARAMETERS_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  676|      0|        return 0;
  677|      0|    }
  678|       |
  679|   163k|    libctx = ossl_ec_key_get_libctx(eck);
  680|   163k|    propq = ossl_ec_key_get0_propq(eck);
  681|       |
  682|   163k|    bnctx = BN_CTX_new_ex(libctx);
  683|   163k|    if (bnctx == NULL)
  ------------------
  |  Branch (683:9): [True: 0, False: 163k]
  ------------------
  684|      0|        return 0;
  685|   163k|    BN_CTX_start(bnctx);
  686|       |
  687|   163k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  432|   163k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (687:9): [True: 162k, False: 882]
  ------------------
  688|   162k|        && !OSSL_PARAM_set_int(p, ECDSA_size(eck)))
  ------------------
  |  Branch (688:12): [True: 0, False: 162k]
  ------------------
  689|      0|        goto err;
  690|   163k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  374|   163k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (690:9): [True: 162k, False: 882]
  ------------------
  691|   162k|        && !OSSL_PARAM_set_int(p, EC_GROUP_order_bits(ecg)))
  ------------------
  |  Branch (691:12): [True: 0, False: 162k]
  ------------------
  692|      0|        goto err;
  693|   163k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_FIELD_DEGREE)) != NULL
  ------------------
  |  |  396|   163k|# define OSSL_PKEY_PARAM_EC_FIELD_DEGREE "field-degree"
  ------------------
  |  Branch (693:9): [True: 0, False: 163k]
  ------------------
  694|      0|        && !OSSL_PARAM_set_int(p, EC_GROUP_get_degree(ecg)))
  ------------------
  |  Branch (694:12): [True: 0, False: 0]
  ------------------
  695|      0|        goto err;
  696|   163k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL
  ------------------
  |  |  506|   163k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (696:9): [True: 162k, False: 882]
  ------------------
  697|   162k|        && !OSSL_PARAM_set_int(p, EC_GROUP_security_bits(ecg)))
  ------------------
  |  Branch (697:12): [True: 0, False: 162k]
  ------------------
  698|      0|        goto err;
  699|   163k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  507|   163k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  131|   163k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (699:9): [True: 162k, False: 882]
  ------------------
  700|   162k|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (700:13): [True: 0, False: 162k]
  ------------------
  701|      0|            goto err;
  702|       |
  703|   163k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (703:9): [True: 0, False: 163k]
  ------------------
  704|   163k|             OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS))
  ------------------
  |  |  394|   163k|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
  705|   163k|        != NULL) {
  706|      0|        int explicitparams = EC_KEY_decoded_from_explicit_params(eck);
  707|       |
  708|      0|        if (explicitparams < 0
  ------------------
  |  Branch (708:13): [True: 0, False: 0]
  ------------------
  709|      0|            || !OSSL_PARAM_set_int(p, explicitparams))
  ------------------
  |  Branch (709:16): [True: 0, False: 0]
  ------------------
  710|      0|            goto err;
  711|      0|    }
  712|       |
  713|   163k|    if (!sm2) {
  ------------------
  |  Branch (713:9): [True: 162k, False: 864]
  ------------------
  714|   162k|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  378|   162k|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (714:13): [True: 0, False: 162k]
  ------------------
  715|      0|            && !OSSL_PARAM_set_utf8_string(p, EC_DEFAULT_MD))
  ------------------
  |  |   79|      0|#define EC_DEFAULT_MD "SHA256"
  ------------------
  |  Branch (715:16): [True: 0, False: 0]
  ------------------
  716|      0|            goto err;
  717|   162k|    } else {
  718|    864|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  378|    864|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (718:13): [True: 0, False: 864]
  ------------------
  719|      0|            && !OSSL_PARAM_set_utf8_string(p, SM2_DEFAULT_MD))
  ------------------
  |  |   82|      0|#define SM2_DEFAULT_MD "SM3"
  ------------------
  |  Branch (719:16): [True: 0, False: 0]
  ------------------
  720|      0|            goto err;
  721|    864|    }
  722|       |
  723|       |    /* SM2 doesn't support this PARAM */
  724|   163k|    if (!sm2) {
  ------------------
  |  Branch (724:9): [True: 162k, False: 864]
  ------------------
  725|   162k|        p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_USE_COFACTOR_ECDH);
  ------------------
  |  |  509|   162k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  510|   162k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  726|   162k|        if (p != NULL) {
  ------------------
  |  Branch (726:13): [True: 0, False: 162k]
  ------------------
  727|      0|            int ecdh_cofactor_mode = 0;
  728|       |
  729|      0|            ecdh_cofactor_mode = (EC_KEY_get_flags(eck) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
  ------------------
  |  |  963|      0|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  |  Branch (729:34): [True: 0, False: 0]
  ------------------
  730|       |
  731|      0|            if (!OSSL_PARAM_set_int(p, ecdh_cofactor_mode))
  ------------------
  |  Branch (731:17): [True: 0, False: 0]
  ------------------
  732|      0|                goto err;
  733|      0|        }
  734|   162k|    }
  735|   163k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (735:9): [True: 882, False: 162k]
  ------------------
  736|   163k|             OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY))
  ------------------
  |  |  407|   163k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
  737|   163k|        != NULL) {
  738|    882|        const EC_POINT *ecp = EC_KEY_get0_public_key(key);
  739|       |
  740|    882|        if (ecp == NULL) {
  ------------------
  |  Branch (740:13): [True: 0, False: 882]
  ------------------
  741|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_NOT_A_PUBLIC_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  742|      0|            goto err;
  743|      0|        }
  744|    882|        p->return_size = EC_POINT_point2oct(ecg, ecp,
  745|    882|            POINT_CONVERSION_UNCOMPRESSED,
  746|    882|            p->data, p->data_size, bnctx);
  747|    882|        if (p->return_size == 0)
  ------------------
  |  Branch (747:13): [True: 0, False: 882]
  ------------------
  748|      0|            goto err;
  749|    882|    }
  750|       |
  751|   163k|    ret = ec_get_ecm_params(ecg, params)
  ------------------
  |  Branch (751:11): [True: 163k, False: 0]
  ------------------
  752|   163k|        && ossl_ec_group_todata(ecg, NULL, params, libctx, propq, bnctx,
  ------------------
  |  Branch (752:12): [True: 163k, False: 0]
  ------------------
  753|   163k|            &genbuf)
  754|   163k|        && key_to_params(eck, NULL, params, 1, &pub_key)
  ------------------
  |  Branch (754:12): [True: 163k, False: 0]
  ------------------
  755|   163k|        && otherparams_to_params(eck, NULL, params);
  ------------------
  |  Branch (755:12): [True: 163k, False: 0]
  ------------------
  756|   163k|err:
  757|   163k|    OPENSSL_free(genbuf);
  ------------------
  |  |  132|   163k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  758|   163k|    OPENSSL_free(pub_key);
  ------------------
  |  |  132|   163k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  759|   163k|    BN_CTX_end(bnctx);
  760|   163k|    BN_CTX_free(bnctx);
  761|   163k|    return ret;
  762|   163k|}
ec_kmgmt.c:ec_get_ecm_params:
  612|   163k|{
  613|       |#ifdef OPENSSL_NO_EC2M
  614|       |    return 1;
  615|       |#else
  616|   163k|    int ret = 0, m;
  617|   163k|    unsigned int k1 = 0, k2 = 0, k3 = 0;
  618|   163k|    int basis_nid;
  619|   163k|    const char *basis_name = NULL;
  620|   163k|    int fid = EC_GROUP_get_field_type(group);
  621|       |
  622|   163k|    if (fid != NID_X9_62_characteristic_two_field)
  ------------------
  |  |  156|   163k|#define NID_X9_62_characteristic_two_field              407
  ------------------
  |  Branch (622:9): [True: 163k, False: 0]
  ------------------
  623|   163k|        return 1;
  624|       |
  625|      0|    basis_nid = EC_GROUP_get_basis_type(group);
  626|      0|    if (basis_nid == NID_X9_62_tpBasis)
  ------------------
  |  |  168|      0|#define NID_X9_62_tpBasis               682
  ------------------
  |  Branch (626:9): [True: 0, False: 0]
  ------------------
  627|      0|        basis_name = SN_X9_62_tpBasis;
  ------------------
  |  |  167|      0|#define SN_X9_62_tpBasis                "tpBasis"
  ------------------
  628|      0|    else if (basis_nid == NID_X9_62_ppBasis)
  ------------------
  |  |  172|      0|#define NID_X9_62_ppBasis               683
  ------------------
  |  Branch (628:14): [True: 0, False: 0]
  ------------------
  629|      0|        basis_name = SN_X9_62_ppBasis;
  ------------------
  |  |  171|      0|#define SN_X9_62_ppBasis                "ppBasis"
  ------------------
  630|      0|    else
  631|      0|        goto err;
  632|       |
  633|      0|    m = EC_GROUP_get_degree(group);
  634|      0|    if (!ossl_param_build_set_int(NULL, params, OSSL_PKEY_PARAM_EC_CHAR2_M, m)
  ------------------
  |  |  387|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_M "m"
  ------------------
  |  Branch (634:9): [True: 0, False: 0]
  ------------------
  635|      0|        || !ossl_param_build_set_utf8_string(NULL, params,
  ------------------
  |  Branch (635:12): [True: 0, False: 0]
  ------------------
  636|      0|            OSSL_PKEY_PARAM_EC_CHAR2_TYPE,
  ------------------
  |  |  392|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_TYPE "basis-type"
  ------------------
  637|      0|            basis_name))
  638|      0|        goto err;
  639|       |
  640|      0|    if (basis_nid == NID_X9_62_tpBasis) {
  ------------------
  |  |  168|      0|#define NID_X9_62_tpBasis               682
  ------------------
  |  Branch (640:9): [True: 0, False: 0]
  ------------------
  641|      0|        if (!EC_GROUP_get_trinomial_basis(group, &k1)
  ------------------
  |  Branch (641:13): [True: 0, False: 0]
  ------------------
  642|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (642:16): [True: 0, False: 0]
  ------------------
  643|      0|                OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS,
  ------------------
  |  |  391|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS "tp"
  ------------------
  644|      0|                (int)k1))
  645|      0|            goto err;
  646|      0|    } else {
  647|      0|        if (!EC_GROUP_get_pentanomial_basis(group, &k1, &k2, &k3)
  ------------------
  |  Branch (647:13): [True: 0, False: 0]
  ------------------
  648|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (648:16): [True: 0, False: 0]
  ------------------
  649|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K1, (int)k1)
  ------------------
  |  |  388|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K1 "k1"
  ------------------
  650|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (650:16): [True: 0, False: 0]
  ------------------
  651|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K2, (int)k2)
  ------------------
  |  |  389|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K2 "k2"
  ------------------
  652|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (652:16): [True: 0, False: 0]
  ------------------
  653|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K3, (int)k3))
  ------------------
  |  |  390|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K3 "k3"
  ------------------
  654|      0|            goto err;
  655|      0|    }
  656|      0|    ret = 1;
  657|      0|err:
  658|      0|    return ret;
  659|      0|#endif /* OPENSSL_NO_EC2M */
  660|      0|}
ec_kmgmt.c:key_to_params:
  124|   163k|{
  125|   163k|    BIGNUM *x = NULL, *y = NULL;
  126|   163k|    const BIGNUM *priv_key = NULL;
  127|   163k|    const EC_POINT *pub_point = NULL;
  128|   163k|    const EC_GROUP *ecg = NULL;
  129|   163k|    size_t pub_key_len = 0;
  130|   163k|    int ret = 0;
  131|   163k|    BN_CTX *bnctx = NULL;
  132|       |
  133|   163k|    if (eckey == NULL
  ------------------
  |  Branch (133:9): [True: 0, False: 163k]
  ------------------
  134|   163k|        || (ecg = EC_KEY_get0_group(eckey)) == NULL)
  ------------------
  |  Branch (134:12): [True: 0, False: 163k]
  ------------------
  135|      0|        return 0;
  136|       |
  137|   163k|    priv_key = EC_KEY_get0_private_key(eckey);
  138|   163k|    pub_point = EC_KEY_get0_public_key(eckey);
  139|       |
  140|   163k|    if (pub_point != NULL) {
  ------------------
  |  Branch (140:9): [True: 163k, False: 0]
  ------------------
  141|   163k|        OSSL_PARAM *p = NULL, *px = NULL, *py = NULL;
  142|       |        /*
  143|       |         * EC_POINT_point2buf() can generate random numbers in some
  144|       |         * implementations so we need to ensure we use the correct libctx.
  145|       |         */
  146|   163k|        bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey));
  147|   163k|        if (bnctx == NULL)
  ------------------
  |  Branch (147:13): [True: 0, False: 163k]
  ------------------
  148|      0|            goto err;
  149|       |
  150|       |        /* If we are doing a get then check first before decoding the point */
  151|   163k|        if (tmpl == NULL) {
  ------------------
  |  Branch (151:13): [True: 163k, False: 0]
  ------------------
  152|   163k|            p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_PUB_KEY);
  ------------------
  |  |  450|   163k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  153|   163k|            px = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_X);
  ------------------
  |  |  404|   163k|# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
  ------------------
  154|   163k|            py = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_Y);
  ------------------
  |  |  405|   163k|# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
  ------------------
  155|   163k|        }
  156|       |
  157|   163k|        if (p != NULL || tmpl != NULL) {
  ------------------
  |  Branch (157:13): [True: 0, False: 163k]
  |  Branch (157:26): [True: 0, False: 163k]
  ------------------
  158|       |            /* convert pub_point to a octet string according to the SECG standard */
  159|      0|            point_conversion_form_t format = EC_KEY_get_conv_form(eckey);
  160|       |
  161|      0|            if ((pub_key_len = EC_POINT_point2buf(ecg, pub_point,
  ------------------
  |  Branch (161:17): [True: 0, False: 0]
  ------------------
  162|      0|                     format,
  163|      0|                     pub_key, bnctx))
  164|      0|                    == 0
  165|      0|                || !ossl_param_build_set_octet_string(tmpl, p,
  ------------------
  |  Branch (165:20): [True: 0, False: 0]
  ------------------
  166|      0|                    OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  450|      0|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  167|      0|                    *pub_key, pub_key_len))
  168|      0|                goto err;
  169|      0|        }
  170|   163k|        if (px != NULL || py != NULL) {
  ------------------
  |  Branch (170:13): [True: 0, False: 163k]
  |  Branch (170:27): [True: 0, False: 163k]
  ------------------
  171|      0|            if (px != NULL) {
  ------------------
  |  Branch (171:17): [True: 0, False: 0]
  ------------------
  172|      0|                x = BN_CTX_get(bnctx);
  173|      0|                if (x == NULL)
  ------------------
  |  Branch (173:21): [True: 0, False: 0]
  ------------------
  174|      0|                    goto err;
  175|      0|            }
  176|      0|            if (py != NULL) {
  ------------------
  |  Branch (176:17): [True: 0, False: 0]
  ------------------
  177|      0|                y = BN_CTX_get(bnctx);
  178|      0|                if (y == NULL)
  ------------------
  |  Branch (178:21): [True: 0, False: 0]
  ------------------
  179|      0|                    goto err;
  180|      0|            }
  181|       |
  182|      0|            if (!EC_POINT_get_affine_coordinates(ecg, pub_point, x, y, bnctx))
  ------------------
  |  Branch (182:17): [True: 0, False: 0]
  ------------------
  183|      0|                goto err;
  184|      0|            if (px != NULL
  ------------------
  |  Branch (184:17): [True: 0, False: 0]
  ------------------
  185|      0|                && !ossl_param_build_set_bn(tmpl, px,
  ------------------
  |  Branch (185:20): [True: 0, False: 0]
  ------------------
  186|      0|                    OSSL_PKEY_PARAM_EC_PUB_X, x))
  ------------------
  |  |  404|      0|# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
  ------------------
  187|      0|                goto err;
  188|      0|            if (py != NULL
  ------------------
  |  Branch (188:17): [True: 0, False: 0]
  ------------------
  189|      0|                && !ossl_param_build_set_bn(tmpl, py,
  ------------------
  |  Branch (189:20): [True: 0, False: 0]
  ------------------
  190|      0|                    OSSL_PKEY_PARAM_EC_PUB_Y, y))
  ------------------
  |  |  405|      0|# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
  ------------------
  191|      0|                goto err;
  192|      0|        }
  193|   163k|    }
  194|       |
  195|   163k|    if (priv_key != NULL && include_private) {
  ------------------
  |  Branch (195:9): [True: 1.32k, False: 162k]
  |  Branch (195:29): [True: 1.32k, False: 0]
  ------------------
  196|  1.32k|        size_t sz;
  197|  1.32k|        int ecbits;
  198|       |
  199|       |        /*
  200|       |         * Key import/export should never leak the bit length of the secret
  201|       |         * scalar in the key.
  202|       |         *
  203|       |         * For this reason, on export we use padded BIGNUMs with fixed length.
  204|       |         *
  205|       |         * When importing we also should make sure that, even if short lived,
  206|       |         * the newly created BIGNUM is marked with the BN_FLG_CONSTTIME flag as
  207|       |         * soon as possible, so that any processing of this BIGNUM might opt for
  208|       |         * constant time implementations in the backend.
  209|       |         *
  210|       |         * Setting the BN_FLG_CONSTTIME flag alone is never enough, we also have
  211|       |         * to preallocate the BIGNUM internal buffer to a fixed public size big
  212|       |         * enough that operations performed during the processing never trigger
  213|       |         * a realloc which would leak the size of the scalar through memory
  214|       |         * accesses.
  215|       |         *
  216|       |         * Fixed Length
  217|       |         * ------------
  218|       |         *
  219|       |         * The order of the large prime subgroup of the curve is our choice for
  220|       |         * a fixed public size, as that is generally the upper bound for
  221|       |         * generating a private key in EC cryptosystems and should fit all valid
  222|       |         * secret scalars.
  223|       |         *
  224|       |         * For padding on export we just use the bit length of the order
  225|       |         * converted to bytes (rounding up).
  226|       |         *
  227|       |         * For preallocating the BIGNUM storage we look at the number of "words"
  228|       |         * required for the internal representation of the order, and we
  229|       |         * preallocate 2 extra "words" in case any of the subsequent processing
  230|       |         * might temporarily overflow the order length.
  231|       |         */
  232|  1.32k|        ecbits = EC_GROUP_order_bits(ecg);
  233|  1.32k|        if (ecbits <= 0)
  ------------------
  |  Branch (233:13): [True: 0, False: 1.32k]
  ------------------
  234|      0|            goto err;
  235|  1.32k|        sz = (ecbits + 7) / 8;
  236|       |
  237|  1.32k|        if (!ossl_param_build_set_bn_pad(tmpl, params,
  ------------------
  |  Branch (237:13): [True: 0, False: 1.32k]
  ------------------
  238|  1.32k|                OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  448|  1.32k|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  239|  1.32k|                priv_key, sz))
  240|      0|            goto err;
  241|  1.32k|    }
  242|   163k|    ret = 1;
  243|   163k|err:
  244|   163k|    BN_CTX_free(bnctx);
  245|   163k|    return ret;
  246|   163k|}
ec_kmgmt.c:otherparams_to_params:
  250|   163k|{
  251|   163k|    int ecdh_cofactor_mode = 0, group_check = 0;
  252|   163k|    const char *name = NULL;
  253|   163k|    point_conversion_form_t format;
  254|       |
  255|   163k|    if (ec == NULL)
  ------------------
  |  Branch (255:9): [True: 0, False: 163k]
  ------------------
  256|      0|        return 0;
  257|       |
  258|   163k|    format = EC_KEY_get_conv_form(ec);
  259|   163k|    name = ossl_ec_pt_format_id2name((int)format);
  260|   163k|    if (name != NULL
  ------------------
  |  Branch (260:9): [True: 163k, False: 0]
  ------------------
  261|   163k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (261:12): [True: 0, False: 163k]
  ------------------
  262|   163k|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT,
  ------------------
  |  |  403|   163k|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
  263|   163k|            name))
  264|      0|        return 0;
  265|       |
  266|   163k|    group_check = EC_KEY_get_flags(ec) & EC_FLAG_CHECK_NAMED_GROUP_MASK;
  ------------------
  |  |  967|   163k|    (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  964|   163k|#define EC_FLAG_CHECK_NAMED_GROUP 0x2000
  |  |  ------------------
  |  |                   (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  965|   163k|#define EC_FLAG_CHECK_NAMED_GROUP_NIST 0x4000
  |  |  ------------------
  ------------------
  267|   163k|    name = ossl_ec_check_group_type_id2name(group_check);
  268|   163k|    if (name != NULL
  ------------------
  |  Branch (268:9): [True: 163k, False: 0]
  ------------------
  269|   163k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (269:12): [True: 0, False: 163k]
  ------------------
  270|   163k|            OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE,
  ------------------
  |  |  399|   163k|# define OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE "group-check"
  ------------------
  271|   163k|            name))
  272|      0|        return 0;
  273|       |
  274|   163k|    if ((EC_KEY_get_enc_flags(ec) & EC_PKEY_NO_PUBKEY) != 0
  ------------------
  |  |  959|   163k|#define EC_PKEY_NO_PUBKEY 0x002
  ------------------
  |  Branch (274:9): [True: 0, False: 163k]
  ------------------
  275|      0|        && !ossl_param_build_set_int(tmpl, params,
  ------------------
  |  Branch (275:12): [True: 0, False: 0]
  ------------------
  276|      0|            OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC, 0))
  ------------------
  |  |  400|      0|# define OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC "include-public"
  ------------------
  277|      0|        return 0;
  278|       |
  279|   163k|    ecdh_cofactor_mode = (EC_KEY_get_flags(ec) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
  ------------------
  |  |  963|   163k|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  |  Branch (279:26): [True: 0, False: 163k]
  ------------------
  280|   163k|    return ossl_param_build_set_int(tmpl, params,
  281|   163k|        OSSL_PKEY_PARAM_USE_COFACTOR_ECDH,
  ------------------
  |  |  509|   163k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  510|   163k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  282|   163k|        ecdh_cofactor_mode);
  283|   163k|}
ec_kmgmt.c:sm2_gen_init:
 1013|    288|{
 1014|    288|    struct ec_gen_ctx *gctx = ec_gen_init(provctx, selection, params);
 1015|       |
 1016|    288|    if (gctx != NULL) {
  ------------------
  |  Branch (1016:9): [True: 288, False: 0]
  ------------------
 1017|    288|        if (gctx->group_name != NULL)
  ------------------
  |  Branch (1017:13): [True: 0, False: 288]
  ------------------
 1018|      0|            return gctx;
 1019|    288|        if ((gctx->group_name = OPENSSL_strdup("sm2")) != NULL)
  ------------------
  |  |  136|    288|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1019:13): [True: 288, False: 0]
  ------------------
 1020|    288|            return gctx;
 1021|      0|        ec_gen_cleanup(gctx);
 1022|      0|    }
 1023|      0|    return NULL;
 1024|    288|}
ec_kmgmt.c:sm2_gen:
 1348|    288|{
 1349|    288|    struct ec_gen_ctx *gctx = genctx;
 1350|    288|    EC_KEY *ec = NULL;
 1351|    288|    int ret = 1;
 1352|       |
 1353|    288|    if (gctx == NULL
  ------------------
  |  Branch (1353:9): [True: 0, False: 288]
  ------------------
 1354|    288|        || (ec = EC_KEY_new_ex(gctx->libctx, NULL)) == NULL)
  ------------------
  |  Branch (1354:12): [True: 0, False: 288]
  ------------------
 1355|      0|        return NULL;
 1356|       |
 1357|    288|    if (gctx->gen_group == NULL) {
  ------------------
  |  Branch (1357:9): [True: 288, False: 0]
  ------------------
 1358|    288|        if (!ec_gen_set_group_from_params(gctx))
  ------------------
  |  Branch (1358:13): [True: 0, False: 288]
  ------------------
 1359|      0|            goto err;
 1360|    288|    } else {
 1361|      0|        if (gctx->encoding) {
  ------------------
  |  Branch (1361:13): [True: 0, False: 0]
  ------------------
 1362|      0|            int flags = ossl_ec_encoding_name2id(gctx->encoding);
 1363|       |
 1364|      0|            if (flags < 0)
  ------------------
  |  Branch (1364:17): [True: 0, False: 0]
  ------------------
 1365|      0|                goto err;
 1366|      0|            EC_GROUP_set_asn1_flag(gctx->gen_group, flags);
 1367|      0|        }
 1368|      0|        if (gctx->pt_format != NULL) {
  ------------------
  |  Branch (1368:13): [True: 0, False: 0]
  ------------------
 1369|      0|            int format = ossl_ec_pt_format_name2id(gctx->pt_format);
 1370|       |
 1371|      0|            if (format < 0)
  ------------------
  |  Branch (1371:17): [True: 0, False: 0]
  ------------------
 1372|      0|                goto err;
 1373|      0|            EC_GROUP_set_point_conversion_form(gctx->gen_group, format);
 1374|      0|        }
 1375|      0|    }
 1376|       |
 1377|       |    /* We must always assign a group, no matter what */
 1378|    288|    ret = ec_gen_assign_group(ec, gctx->gen_group);
 1379|       |
 1380|       |    /* Whether you want it or not, you get a keypair, not just one half */
 1381|    288|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0)
  ------------------
  |  |  656|    288|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|    288|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|    288|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (1381:9): [True: 288, False: 0]
  ------------------
 1382|    288|        ret = ret && EC_KEY_generate_key(ec);
  ------------------
  |  Branch (1382:15): [True: 288, False: 0]
  |  Branch (1382:22): [True: 288, False: 0]
  ------------------
 1383|       |
 1384|    288|    if (ret)
  ------------------
  |  Branch (1384:9): [True: 288, False: 0]
  ------------------
 1385|    288|        return ec;
 1386|      0|err:
 1387|       |    /* Something went wrong, throw the key away */
 1388|      0|    EC_KEY_free(ec);
 1389|       |    return NULL;
 1390|    288|}
ec_kmgmt.c:sm2_get_params:
  854|    864|{
  855|    864|    return common_get_params(key, params, 1);
  856|    864|}

ecx_kmgmt.c:ecx_free_key:
  998|  4.19k|{
  999|  4.19k|    ossl_ecx_key_free((ECX_KEY *)keydata);
 1000|  4.19k|}
ecx_kmgmt.c:x25519_get_params:
  367|  8.29k|{
  368|  8.29k|    return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   33|  8.29k|#define X25519_BITS 253
  ------------------
                  return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   34|  8.29k|#define X25519_SECURITY_BITS 128
  ------------------
  369|  8.29k|        X25519_KEYLEN);
  ------------------
  |  |   26|  8.29k|#define X25519_KEYLEN 32
  ------------------
  370|  8.29k|}
ecx_kmgmt.c:ecx_get_params:
  330|  8.39k|{
  331|  8.39k|    ECX_KEY *ecx = key;
  332|  8.39k|    struct ecx_ed_common_get_params_st p;
  333|       |
  334|  8.39k|    if (key == NULL || !ecx_get_params_decoder(params, &p))
  ------------------
  |  Branch (334:9): [True: 0, False: 8.39k]
  |  Branch (334:24): [True: 0, False: 8.39k]
  ------------------
  335|      0|        return 0;
  336|       |
  337|  8.39k|    if (p.encpub != NULL
  ------------------
  |  Branch (337:9): [True: 4.19k, False: 4.19k]
  ------------------
  338|  4.19k|        && !OSSL_PARAM_set_octet_string(p.encpub, ecx->pubkey, ecx->keylen))
  ------------------
  |  Branch (338:12): [True: 0, False: 4.19k]
  ------------------
  339|      0|        return 0;
  340|       |#ifdef FIPS_MODULE
  341|       |    {
  342|       |        /* Currently X25519 and X448 are not approved */
  343|       |        int approved = 0;
  344|       |
  345|       |        if (p.ind != NULL && !OSSL_PARAM_set_int(p.ind, approved))
  346|       |            return 0;
  347|       |    }
  348|       |#endif
  349|       |
  350|  8.39k|    return ecx_ed_common_get_params(key, &p, bits, secbits, size);
  351|  8.39k|}
ecx_kmgmt.c:ecx_ed_common_get_params:
  313|  8.39k|{
  314|  8.39k|    ECX_KEY *ecx = key;
  315|       |
  316|  8.39k|    if (p->bits != NULL && !OSSL_PARAM_set_int(p->bits, bits))
  ------------------
  |  Branch (316:9): [True: 4.19k, False: 4.19k]
  |  Branch (316:28): [True: 0, False: 4.19k]
  ------------------
  317|      0|        return 0;
  318|  8.39k|    if (p->secbits != NULL && !OSSL_PARAM_set_int(p->secbits, secbits))
  ------------------
  |  Branch (318:9): [True: 4.19k, False: 4.19k]
  |  Branch (318:31): [True: 0, False: 4.19k]
  ------------------
  319|      0|        return 0;
  320|  8.39k|    if (p->size != NULL && !OSSL_PARAM_set_int(p->size, size))
  ------------------
  |  Branch (320:9): [True: 4.19k, False: 4.19k]
  |  Branch (320:28): [True: 0, False: 4.19k]
  ------------------
  321|      0|        return 0;
  322|  8.39k|    if (p->seccat != NULL && !OSSL_PARAM_set_int(p->seccat, 0))
  ------------------
  |  Branch (322:9): [True: 4.19k, False: 4.19k]
  |  Branch (322:30): [True: 0, False: 4.19k]
  ------------------
  323|      0|        return 0;
  324|  8.39k|    return key_to_params(ecx, NULL, p->pub, p->priv, 1);
  325|  8.39k|}
ecx_kmgmt.c:key_to_params:
  247|  10.4k|{
  248|  10.4k|    if (key == NULL)
  ------------------
  |  Branch (248:9): [True: 0, False: 10.4k]
  ------------------
  249|      0|        return 0;
  250|       |
  251|  10.4k|    if (!ossl_param_build_set_octet_string(tmpl, pub,
  ------------------
  |  Branch (251:9): [True: 0, False: 10.4k]
  ------------------
  252|  10.4k|            OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  450|  10.4k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  253|  10.4k|            key->pubkey, key->keylen))
  254|      0|        return 0;
  255|       |
  256|  10.4k|    if (include_private
  ------------------
  |  Branch (256:9): [True: 8.39k, False: 2.09k]
  ------------------
  257|  8.39k|        && key->privkey != NULL
  ------------------
  |  Branch (257:12): [True: 8.39k, False: 0]
  ------------------
  258|  8.39k|        && !ossl_param_build_set_octet_string(tmpl, priv,
  ------------------
  |  Branch (258:12): [True: 0, False: 8.39k]
  ------------------
  259|  8.39k|            OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  448|  8.39k|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  260|  8.39k|            key->privkey, key->keylen))
  261|      0|        return 0;
  262|       |
  263|  10.4k|    return 1;
  264|  10.4k|}
ecx_kmgmt.c:ecx_export:
  268|  2.09k|{
  269|  2.09k|    ECX_KEY *key = keydata;
  270|  2.09k|    OSSL_PARAM_BLD *tmpl;
  271|  2.09k|    OSSL_PARAM *params = NULL;
  272|  2.09k|    int ret = 0;
  273|       |
  274|  2.09k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 2.09k]
  |  Branch (274:36): [True: 0, False: 2.09k]
  ------------------
  275|      0|        return 0;
  276|       |
  277|  2.09k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  2.09k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (277:9): [True: 0, False: 2.09k]
  ------------------
  278|      0|        return 0;
  279|       |
  280|  2.09k|    tmpl = OSSL_PARAM_BLD_new();
  281|  2.09k|    if (tmpl == NULL)
  ------------------
  |  Branch (281:9): [True: 0, False: 2.09k]
  ------------------
  282|      0|        return 0;
  283|       |
  284|  2.09k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  656|  2.09k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (284:9): [True: 2.09k, False: 0]
  ------------------
  285|  2.09k|        int include_private = ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0);
  ------------------
  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  286|       |
  287|  2.09k|        if (!key_to_params(key, tmpl, NULL, NULL, include_private))
  ------------------
  |  Branch (287:13): [True: 0, False: 2.09k]
  ------------------
  288|      0|            goto err;
  289|  2.09k|    }
  290|       |
  291|  2.09k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  292|  2.09k|    if (params == NULL)
  ------------------
  |  Branch (292:9): [True: 0, False: 2.09k]
  ------------------
  293|      0|        goto err;
  294|       |
  295|  2.09k|    ret = param_cb(params, cbarg);
  296|  2.09k|    OSSL_PARAM_clear_free(params);
  297|  2.09k|err:
  298|  2.09k|    OSSL_PARAM_BLD_free(tmpl);
  299|  2.09k|    return ret;
  300|  2.09k|}
ecx_kmgmt.c:x25519_gen_init:
  528|  4.16k|{
  529|  4.16k|    return ecx_gen_init(provctx, selection, params, ECX_KEY_TYPE_X25519, "X25519");
  530|  4.16k|}
ecx_kmgmt.c:ecx_gen_init:
  497|  4.19k|{
  498|  4.19k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|  4.19k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  499|  4.19k|    struct ecx_gen_ctx *gctx = NULL;
  500|       |
  501|  4.19k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (501:9): [True: 0, False: 4.19k]
  ------------------
  502|      0|        return NULL;
  503|       |
  504|  4.19k|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  109|  4.19k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (504:9): [True: 4.19k, False: 0]
  ------------------
  505|  4.19k|        gctx->libctx = libctx;
  506|  4.19k|        gctx->type = type;
  507|  4.19k|        gctx->selection = selection;
  508|       |#ifdef FIPS_MODULE
  509|       |        /* X25519/X448 are not FIPS approved, (ED25519/ED448 are approved) */
  510|       |        if (algdesc != NULL
  511|       |            && !ossl_FIPS_IND_callback(libctx, algdesc, "KeyGen Init")) {
  512|       |            OPENSSL_free(gctx);
  513|       |            return NULL;
  514|       |        }
  515|       |#endif
  516|  4.19k|    } else {
  517|      0|        return NULL;
  518|      0|    }
  519|  4.19k|    if (!ecx_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (519:9): [True: 0, False: 4.19k]
  ------------------
  520|      0|        ecx_gen_cleanup(gctx);
  521|       |        gctx = NULL;
  522|      0|    }
  523|  4.19k|    return gctx;
  524|  4.19k|}
ecx_kmgmt.c:ecx_gen_set_params:
  551|  8.38k|{
  552|  8.38k|    struct ecx_gen_ctx *gctx = genctx;
  553|  8.38k|    struct ecx_gen_set_params_st p;
  554|       |
  555|  8.38k|    if (gctx == NULL || !ecx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (555:9): [True: 0, False: 8.38k]
  |  Branch (555:25): [True: 0, False: 8.38k]
  ------------------
  556|      0|        return 0;
  557|       |
  558|  8.38k|    if (p.group != NULL) {
  ------------------
  |  Branch (558:9): [True: 2.09k, False: 6.28k]
  ------------------
  559|  2.09k|        const char *groupname = NULL;
  560|       |
  561|       |        /*
  562|       |         * We optionally allow setting a group name - but each algorithm only
  563|       |         * support one such name, so all we do is verify that it is the one we
  564|       |         * expected.
  565|       |         */
  566|  2.09k|        switch (gctx->type) {
  567|  2.06k|        case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (567:9): [True: 2.06k, False: 32]
  ------------------
  568|  2.06k|            groupname = "x25519";
  569|  2.06k|            break;
  570|     32|        case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (570:9): [True: 32, False: 2.06k]
  ------------------
  571|     32|            groupname = "x448";
  572|     32|            break;
  573|      0|        default:
  ------------------
  |  Branch (573:9): [True: 0, False: 2.09k]
  ------------------
  574|       |            /* We only support this for key exchange at the moment */
  575|      0|            break;
  576|  2.09k|        }
  577|  2.09k|        if (p.group->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|  4.19k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (577:13): [True: 0, False: 2.09k]
  ------------------
  578|  2.09k|            || groupname == NULL
  ------------------
  |  Branch (578:16): [True: 0, False: 2.09k]
  ------------------
  579|  2.09k|            || OPENSSL_strcasecmp(p.group->data, groupname) != 0) {
  ------------------
  |  Branch (579:16): [True: 0, False: 2.09k]
  ------------------
  580|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  581|      0|            return 0;
  582|      0|        }
  583|  2.09k|    }
  584|       |
  585|  8.38k|    if (p.kdfpropq != NULL) {
  ------------------
  |  Branch (585:9): [True: 0, False: 8.38k]
  ------------------
  586|      0|        if (p.kdfpropq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (586:13): [True: 0, False: 0]
  ------------------
  587|      0|            return 0;
  588|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  589|      0|        gctx->propq = OPENSSL_strdup(p.kdfpropq->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  590|      0|        if (gctx->propq == NULL)
  ------------------
  |  Branch (590:13): [True: 0, False: 0]
  ------------------
  591|      0|            return 0;
  592|      0|    }
  593|       |
  594|  8.38k|    if (p.ikm != NULL) {
  ------------------
  |  Branch (594:9): [True: 0, False: 8.38k]
  ------------------
  595|      0|        if (p.ikm->data_size != 0 && p.ikm->data != NULL) {
  ------------------
  |  Branch (595:13): [True: 0, False: 0]
  |  Branch (595:38): [True: 0, False: 0]
  ------------------
  596|      0|            OPENSSL_free(gctx->dhkem_ikm);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  597|      0|            gctx->dhkem_ikm = NULL;
  598|      0|            if (!OSSL_PARAM_get_octet_string(p.ikm, (void **)&gctx->dhkem_ikm, 0,
  ------------------
  |  Branch (598:17): [True: 0, False: 0]
  ------------------
  599|      0|                    &gctx->dhkem_ikmlen))
  600|      0|                return 0;
  601|      0|        }
  602|      0|    }
  603|       |
  604|  8.38k|    return 1;
  605|  8.38k|}
ecx_kmgmt.c:x25519_gen:
  748|  4.16k|{
  749|  4.16k|    struct ecx_gen_ctx *gctx = genctx;
  750|       |
  751|  4.16k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (751:9): [True: 0, False: 4.16k]
  ------------------
  752|      0|        return 0;
  753|       |
  754|       |#ifdef S390X_EC_ASM
  755|       |    if (OPENSSL_s390xcap_P.pcc[1] & S390X_CAPBIT(S390X_SCALAR_MULTIPLY_X25519))
  756|       |        return s390x_ecx_keygen25519(gctx);
  757|       |#endif
  758|  4.16k|    return ecx_gen(gctx);
  759|  4.16k|}
ecx_kmgmt.c:ecx_gen:
  682|  4.19k|{
  683|  4.19k|    ECX_KEY *key;
  684|  4.19k|    unsigned char *privkey;
  685|       |
  686|  4.19k|    if (gctx == NULL)
  ------------------
  |  Branch (686:9): [True: 0, False: 4.19k]
  ------------------
  687|      0|        return NULL;
  688|  4.19k|    if ((key = ossl_ecx_key_new(gctx->libctx, gctx->type, 0,
  ------------------
  |  Branch (688:9): [True: 0, False: 4.19k]
  ------------------
  689|  4.19k|             gctx->propq))
  690|  4.19k|        == NULL) {
  691|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  692|      0|        return NULL;
  693|      0|    }
  694|       |
  695|       |    /* If we're doing parameter generation then we just return a blank key */
  696|  4.19k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  4.19k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  4.19k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  4.19k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (696:9): [True: 0, False: 4.19k]
  ------------------
  697|      0|        return key;
  698|       |
  699|  4.19k|    if ((privkey = ossl_ecx_key_allocate_privkey(key)) == NULL) {
  ------------------
  |  Branch (699:9): [True: 0, False: 4.19k]
  ------------------
  700|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  701|      0|        goto err;
  702|      0|    }
  703|  4.19k|#ifndef FIPS_MODULE
  704|  4.19k|    if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0) {
  ------------------
  |  Branch (704:9): [True: 0, False: 4.19k]
  |  Branch (704:36): [True: 0, False: 0]
  ------------------
  705|      0|        if (ecx_key_type_is_ed(gctx->type))
  ------------------
  |  Branch (705:13): [True: 0, False: 0]
  ------------------
  706|      0|            goto err;
  707|      0|        if (!ossl_ecx_dhkem_derive_private(key, privkey,
  ------------------
  |  Branch (707:13): [True: 0, False: 0]
  ------------------
  708|      0|                gctx->dhkem_ikm, gctx->dhkem_ikmlen))
  709|      0|            goto err;
  710|      0|    } else
  711|  4.19k|#endif
  712|  4.19k|    {
  713|  4.19k|        if (RAND_priv_bytes_ex(gctx->libctx, privkey, key->keylen, 0) <= 0)
  ------------------
  |  Branch (713:13): [True: 0, False: 4.19k]
  ------------------
  714|      0|            goto err;
  715|  4.19k|    }
  716|       |
  717|  4.19k|    switch (gctx->type) {
  ------------------
  |  Branch (717:13): [True: 4.19k, False: 0]
  ------------------
  718|  4.16k|    case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (718:5): [True: 4.16k, False: 32]
  ------------------
  719|  4.16k|        privkey[0] &= 248;
  720|  4.16k|        privkey[X25519_KEYLEN - 1] &= 127;
  ------------------
  |  |   26|  4.16k|#define X25519_KEYLEN 32
  ------------------
  721|  4.16k|        privkey[X25519_KEYLEN - 1] |= 64;
  ------------------
  |  |   26|  4.16k|#define X25519_KEYLEN 32
  ------------------
  722|  4.16k|        ossl_x25519_public_from_private(key->pubkey, privkey);
  723|  4.16k|        break;
  724|     32|    case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (724:5): [True: 32, False: 4.16k]
  ------------------
  725|     32|        privkey[0] &= 252;
  726|     32|        privkey[X448_KEYLEN - 1] |= 128;
  ------------------
  |  |   27|     32|#define X448_KEYLEN 56
  ------------------
  727|     32|        ossl_x448_public_from_private(key->pubkey, privkey);
  728|     32|        break;
  729|      0|    case ECX_KEY_TYPE_ED25519:
  ------------------
  |  Branch (729:5): [True: 0, False: 4.19k]
  ------------------
  730|      0|        if (!ossl_ed25519_public_from_private(gctx->libctx, key->pubkey, privkey,
  ------------------
  |  Branch (730:13): [True: 0, False: 0]
  ------------------
  731|      0|                gctx->propq))
  732|      0|            goto err;
  733|      0|        break;
  734|      0|    case ECX_KEY_TYPE_ED448:
  ------------------
  |  Branch (734:5): [True: 0, False: 4.19k]
  ------------------
  735|      0|        if (!ossl_ed448_public_from_private(gctx->libctx, key->pubkey, privkey,
  ------------------
  |  Branch (735:13): [True: 0, False: 0]
  ------------------
  736|      0|                gctx->propq))
  737|      0|            goto err;
  738|      0|        break;
  739|  4.19k|    }
  740|  4.19k|    key->haspubkey = 1;
  741|  4.19k|    return key;
  742|      0|err:
  743|      0|    ossl_ecx_key_free(key);
  744|       |    return NULL;
  745|  4.19k|}
ecx_kmgmt.c:ecx_gen_cleanup:
  843|  4.19k|{
  844|  4.19k|    struct ecx_gen_ctx *gctx = genctx;
  845|       |
  846|  4.19k|    if (gctx == NULL)
  ------------------
  |  Branch (846:9): [True: 0, False: 4.19k]
  ------------------
  847|      0|        return;
  848|       |
  849|  4.19k|    OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  |  130|  4.19k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  850|  4.19k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|  4.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  851|  4.19k|    OPENSSL_free(gctx);
  ------------------
  |  |  132|  4.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  852|  4.19k|}
ecx_kmgmt.c:x448_get_params:
  373|     96|{
  374|     96|    return ecx_get_params(key, params, X448_BITS, X448_SECURITY_BITS,
  ------------------
  |  |   36|     96|#define X448_BITS 448
  ------------------
                  return ecx_get_params(key, params, X448_BITS, X448_SECURITY_BITS,
  ------------------
  |  |   37|     96|#define X448_SECURITY_BITS 224
  ------------------
  375|     96|        X448_KEYLEN);
  ------------------
  |  |   27|     96|#define X448_KEYLEN 56
  ------------------
  376|     96|}
ecx_kmgmt.c:x448_gen_init:
  534|     32|{
  535|     32|    return ecx_gen_init(provctx, selection, params, ECX_KEY_TYPE_X448, "X448");
  536|     32|}
ecx_kmgmt.c:x448_gen:
  762|     32|{
  763|     32|    struct ecx_gen_ctx *gctx = genctx;
  764|       |
  765|     32|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (765:9): [True: 0, False: 32]
  ------------------
  766|      0|        return 0;
  767|       |
  768|       |#ifdef S390X_EC_ASM
  769|       |    if (OPENSSL_s390xcap_P.pcc[1] & S390X_CAPBIT(S390X_SCALAR_MULTIPLY_X448))
  770|       |        return s390x_ecx_keygen448(gctx);
  771|       |#endif
  772|     32|    return ecx_gen(gctx);
  773|     32|}

ecx_kmgmt.c:ecx_get_params_decoder:
  107|  8.39k|{
  108|  8.39k|    const char *s;
  109|       |
  110|  8.39k|    memset(r, 0, sizeof(*r));
  111|  8.39k|    if (p != NULL)
  ------------------
  |  Branch (111:9): [True: 8.39k, False: 0]
  ------------------
  112|  29.3k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (112:16): [True: 20.9k, False: 8.39k]
  ------------------
  113|  20.9k|            switch(s[0]) {
  114|      0|            default:
  ------------------
  |  Branch (114:13): [True: 0, False: 20.9k]
  ------------------
  115|      0|                break;
  116|  4.19k|            case 'b':
  ------------------
  |  Branch (116:13): [True: 4.19k, False: 16.7k]
  ------------------
  117|  4.19k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  4.19k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.19k, False: 0]
  |  |  ------------------
  ------------------
  118|       |                    /* OSSL_PKEY_PARAM_BITS */
  119|  4.19k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  4.19k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.19k]
  |  |  ------------------
  ------------------
  120|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  121|      0|                                       "param %s is repeated", s);
  122|      0|                        return 0;
  123|      0|                    }
  124|  4.19k|                    r->bits = (OSSL_PARAM *)p;
  125|  4.19k|                }
  126|  4.19k|                break;
  127|  4.19k|            case 'e':
  ------------------
  |  Branch (127:13): [True: 4.19k, False: 16.7k]
  ------------------
  128|  4.19k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  4.19k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.19k, False: 0]
  |  |  ------------------
  ------------------
  129|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  130|  4.19k|                    if (ossl_unlikely(r->encpub != NULL)) {
  ------------------
  |  |   23|  4.19k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.19k]
  |  |  ------------------
  ------------------
  131|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  132|      0|                                       "param %s is repeated", s);
  133|      0|                        return 0;
  134|      0|                    }
  135|  4.19k|                    r->encpub = (OSSL_PARAM *)p;
  136|  4.19k|                }
  137|  4.19k|                break;
  138|  4.19k|            case 'f':
  ------------------
  |  Branch (138:13): [True: 0, False: 20.9k]
  ------------------
  139|       |# if defined(FIPS_MODULE)
  140|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
  141|       |                    /* OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR */
  142|       |                    if (ossl_unlikely(r->ind != NULL)) {
  143|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  144|       |                                       "param %s is repeated", s);
  145|       |                        return 0;
  146|       |                    }
  147|       |                    r->ind = (OSSL_PARAM *)p;
  148|       |                }
  149|       |# endif
  150|      0|                break;
  151|  4.19k|            case 'm':
  ------------------
  |  Branch (151:13): [True: 4.19k, False: 16.7k]
  ------------------
  152|  4.19k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  4.19k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.19k, False: 0]
  |  |  ------------------
  ------------------
  153|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  154|  4.19k|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|  4.19k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.19k]
  |  |  ------------------
  ------------------
  155|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  156|      0|                                       "param %s is repeated", s);
  157|      0|                        return 0;
  158|      0|                    }
  159|  4.19k|                    r->size = (OSSL_PARAM *)p;
  160|  4.19k|                }
  161|  4.19k|                break;
  162|  4.19k|            case 'p':
  ------------------
  |  Branch (162:13): [True: 0, False: 20.9k]
  ------------------
  163|      0|                switch(s[1]) {
  164|      0|                default:
  ------------------
  |  Branch (164:17): [True: 0, False: 0]
  ------------------
  165|      0|                    break;
  166|      0|                case 'r':
  ------------------
  |  Branch (166:17): [True: 0, False: 0]
  ------------------
  167|      0|                    if (ossl_likely(strcmp("iv", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  168|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  169|      0|                        if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  170|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  171|      0|                                           "param %s is repeated", s);
  172|      0|                            return 0;
  173|      0|                        }
  174|      0|                        r->priv = (OSSL_PARAM *)p;
  175|      0|                    }
  176|      0|                    break;
  177|      0|                case 'u':
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      0|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  179|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  180|      0|                        if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  181|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  182|      0|                                           "param %s is repeated", s);
  183|      0|                            return 0;
  184|      0|                        }
  185|      0|                        r->pub = (OSSL_PARAM *)p;
  186|      0|                    }
  187|      0|                }
  188|      0|                break;
  189|  8.38k|            case 's':
  ------------------
  |  Branch (189:13): [True: 8.38k, False: 12.5k]
  ------------------
  190|  8.38k|                switch(s[1]) {
  191|      0|                default:
  ------------------
  |  Branch (191:17): [True: 0, False: 8.38k]
  ------------------
  192|      0|                    break;
  193|  8.38k|                case 'e':
  ------------------
  |  Branch (193:17): [True: 8.38k, False: 0]
  ------------------
  194|  8.38k|                    switch(s[2]) {
  195|      0|                    default:
  ------------------
  |  Branch (195:21): [True: 0, False: 8.38k]
  ------------------
  196|      0|                        break;
  197|  8.38k|                    case 'c':
  ------------------
  |  Branch (197:21): [True: 8.38k, False: 0]
  ------------------
  198|  8.38k|                        switch(s[3]) {
  199|      0|                        default:
  ------------------
  |  Branch (199:25): [True: 0, False: 8.38k]
  ------------------
  200|      0|                            break;
  201|  8.38k|                        case 'u':
  ------------------
  |  Branch (201:25): [True: 8.38k, False: 0]
  ------------------
  202|  8.38k|                            switch(s[4]) {
  203|      0|                            default:
  ------------------
  |  Branch (203:29): [True: 0, False: 8.38k]
  ------------------
  204|      0|                                break;
  205|  8.38k|                            case 'r':
  ------------------
  |  Branch (205:29): [True: 8.38k, False: 0]
  ------------------
  206|  8.38k|                                switch(s[5]) {
  207|      0|                                default:
  ------------------
  |  Branch (207:33): [True: 0, False: 8.38k]
  ------------------
  208|      0|                                    break;
  209|  8.38k|                                case 'i':
  ------------------
  |  Branch (209:33): [True: 8.38k, False: 0]
  ------------------
  210|  8.38k|                                    switch(s[6]) {
  211|      0|                                    default:
  ------------------
  |  Branch (211:37): [True: 0, False: 8.38k]
  ------------------
  212|      0|                                        break;
  213|  8.38k|                                    case 't':
  ------------------
  |  Branch (213:37): [True: 8.38k, False: 0]
  ------------------
  214|  8.38k|                                        switch(s[7]) {
  215|      0|                                        default:
  ------------------
  |  Branch (215:41): [True: 0, False: 8.38k]
  ------------------
  216|      0|                                            break;
  217|  8.38k|                                        case 'y':
  ------------------
  |  Branch (217:41): [True: 8.38k, False: 0]
  ------------------
  218|  8.38k|                                            switch(s[8]) {
  219|      0|                                            default:
  ------------------
  |  Branch (219:45): [True: 0, False: 8.38k]
  ------------------
  220|      0|                                                break;
  221|  8.38k|                                            case '-':
  ------------------
  |  Branch (221:45): [True: 8.38k, False: 0]
  ------------------
  222|  8.38k|                                                switch(s[9]) {
  223|      0|                                                default:
  ------------------
  |  Branch (223:49): [True: 0, False: 8.38k]
  ------------------
  224|      0|                                                    break;
  225|  4.19k|                                                case 'b':
  ------------------
  |  Branch (225:49): [True: 4.19k, False: 4.19k]
  ------------------
  226|  4.19k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  4.19k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.19k, False: 0]
  |  |  ------------------
  ------------------
  227|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  228|  4.19k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  4.19k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.19k]
  |  |  ------------------
  ------------------
  229|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  230|      0|                                                                           "param %s is repeated", s);
  231|      0|                                                            return 0;
  232|      0|                                                        }
  233|  4.19k|                                                        r->secbits = (OSSL_PARAM *)p;
  234|  4.19k|                                                    }
  235|  4.19k|                                                    break;
  236|  4.19k|                                                case 'c':
  ------------------
  |  Branch (236:49): [True: 4.19k, False: 4.19k]
  ------------------
  237|  4.19k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  4.19k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.19k, False: 0]
  |  |  ------------------
  ------------------
  238|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  239|  4.19k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  4.19k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.19k]
  |  |  ------------------
  ------------------
  240|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  241|      0|                                                                           "param %s is repeated", s);
  242|      0|                                                            return 0;
  243|      0|                                                        }
  244|  4.19k|                                                        r->seccat = (OSSL_PARAM *)p;
  245|  4.19k|                                                    }
  246|  8.38k|                                                }
  247|  8.38k|                                            }
  248|  8.38k|                                        }
  249|  8.38k|                                    }
  250|  8.38k|                                }
  251|  8.38k|                            }
  252|  8.38k|                        }
  253|  8.38k|                    }
  254|  8.38k|                }
  255|  20.9k|            }
  256|  8.39k|    return 1;
  257|  8.39k|}
ecx_kmgmt.c:ecx_gen_set_params_decoder:
  517|  8.38k|{
  518|  8.38k|    const char *s;
  519|       |
  520|  8.38k|    memset(r, 0, sizeof(*r));
  521|  8.38k|    if (p != NULL)
  ------------------
  |  Branch (521:9): [True: 4.19k, False: 4.19k]
  ------------------
  522|  6.29k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (522:16): [True: 2.09k, False: 4.19k]
  ------------------
  523|  2.09k|            switch(s[0]) {
  524|      0|            default:
  ------------------
  |  Branch (524:13): [True: 0, False: 2.09k]
  ------------------
  525|      0|                break;
  526|      0|            case 'd':
  ------------------
  |  Branch (526:13): [True: 0, False: 2.09k]
  ------------------
  527|      0|                if (ossl_likely(strcmp("hkem-ikm", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  528|       |                    /* OSSL_PKEY_PARAM_DHKEM_IKM */
  529|      0|                    if (ossl_unlikely(r->ikm != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  530|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  531|      0|                                       "param %s is repeated", s);
  532|      0|                        return 0;
  533|      0|                    }
  534|      0|                    r->ikm = (OSSL_PARAM *)p;
  535|      0|                }
  536|      0|                break;
  537|  2.09k|            case 'g':
  ------------------
  |  Branch (537:13): [True: 2.09k, False: 0]
  ------------------
  538|  2.09k|                if (ossl_likely(strcmp("roup", s + 1) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  539|       |                    /* OSSL_PKEY_PARAM_GROUP_NAME */
  540|  2.09k|                    if (ossl_unlikely(r->group != NULL)) {
  ------------------
  |  |   23|  2.09k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  541|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  542|      0|                                       "param %s is repeated", s);
  543|      0|                        return 0;
  544|      0|                    }
  545|  2.09k|                    r->group = (OSSL_PARAM *)p;
  546|  2.09k|                }
  547|  2.09k|                break;
  548|  2.09k|            case 'p':
  ------------------
  |  Branch (548:13): [True: 0, False: 2.09k]
  ------------------
  549|      0|                if (ossl_likely(strcmp("roperties", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  550|       |                    /* OSSL_KDF_PARAM_PROPERTIES */
  551|      0|                    if (ossl_unlikely(r->kdfpropq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  552|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  553|      0|                                       "param %s is repeated", s);
  554|      0|                        return 0;
  555|      0|                    }
  556|      0|                    r->kdfpropq = (OSSL_PARAM *)p;
  557|      0|                }
  558|  2.09k|            }
  559|  8.38k|    return 1;
  560|  8.38k|}

ossl_prov_ml_kem_new:
  162|  2.09k|{
  163|  2.09k|    ML_KEM_KEY *key;
  164|       |
  165|  2.09k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (165:9): [True: 0, False: 2.09k]
  ------------------
  166|      0|        return NULL;
  167|       |
  168|       |#ifdef FIPS_MODULE
  169|       |    if (!ossl_deferred_self_test(PROV_LIBCTX_OF(ctx),
  170|       |            ST_ID_ASYM_KEYGEN_ML_KEM))
  171|       |        return NULL;
  172|       |#endif
  173|       |
  174|       |    /*
  175|       |     * When decoding, if the key ends up "loaded" into the same provider, these
  176|       |     * are the correct config settings, otherwise, new values will be assigned
  177|       |     * on import into a different provider.  The "load" API does not pass along
  178|       |     * the provider context.
  179|       |     */
  180|  2.09k|    if ((key = ossl_ml_kem_key_new(PROV_LIBCTX_OF(ctx), propq, evp_type)) != NULL) {
  ------------------
  |  |   31|  2.09k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  |  Branch (180:9): [True: 2.09k, False: 0]
  ------------------
  181|  2.09k|        const char *pct_type = ossl_prov_ctx_get_param(
  182|  2.09k|            ctx, OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE, "random");
  ------------------
  |  |  440|  2.09k|# define OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE "ml-kem.import_pct_type"
  ------------------
  183|       |
  184|  2.09k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (184:13): [True: 2.09k, False: 0]
  ------------------
  185|  2.09k|                ctx, OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED, 1))
  ------------------
  |  |  444|  2.09k|# define OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED "ml-kem.retain_seed"
  ------------------
  186|  2.09k|            key->prov_flags |= ML_KEM_KEY_RETAIN_SEED;
  ------------------
  |  |  126|  2.09k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  187|      0|        else
  188|      0|            key->prov_flags &= ~ML_KEM_KEY_RETAIN_SEED;
  ------------------
  |  |  126|      0|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  189|  2.09k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (189:13): [True: 2.09k, False: 0]
  ------------------
  190|  2.09k|                ctx, OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED, 1))
  ------------------
  |  |  443|  2.09k|# define OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED "ml-kem.prefer_seed"
  ------------------
  191|  2.09k|            key->prov_flags |= ML_KEM_KEY_PREFER_SEED;
  ------------------
  |  |  125|  2.09k|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  ------------------
  192|      0|        else
  193|      0|            key->prov_flags &= ~ML_KEM_KEY_PREFER_SEED;
  ------------------
  |  |  125|      0|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  ------------------
  194|  2.09k|        if (OPENSSL_strcasecmp(pct_type, "random") == 0)
  ------------------
  |  Branch (194:13): [True: 2.09k, False: 0]
  ------------------
  195|  2.09k|            key->prov_flags |= ML_KEM_KEY_RANDOM_PCT;
  ------------------
  |  |  123|  2.09k|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  ------------------
  196|      0|        else if (OPENSSL_strcasecmp(pct_type, "fixed") == 0)
  ------------------
  |  Branch (196:18): [True: 0, False: 0]
  ------------------
  197|      0|            key->prov_flags |= ML_KEM_KEY_FIXED_PCT;
  ------------------
  |  |  124|      0|#define ML_KEM_KEY_FIXED_PCT (1 << 1)
  ------------------
  198|      0|        else
  199|      0|            key->prov_flags &= ~ML_KEM_KEY_PCT_TYPE;
  ------------------
  |  |  129|      0|    (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_FIXED_PCT)
  |  |  ------------------
  |  |  |  |  123|      0|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_FIXED_PCT)
  |  |  ------------------
  |  |  |  |  124|      0|#define ML_KEM_KEY_FIXED_PCT (1 << 1)
  |  |  ------------------
  ------------------
  200|  2.09k|    }
  201|  2.09k|    return key;
  202|  2.09k|}
ml_kem_kmgmt.c:ml_kem_free_key:
  817|  2.09k|{
  818|  2.09k|    ossl_ml_kem_key_free((ML_KEM_KEY *)keydata);
  819|  2.09k|}
ml_kem_kmgmt.c:ml_kem_get_params:
  569|  2.10k|{
  570|  2.10k|    ML_KEM_KEY *key = vkey;
  571|  2.10k|    const ML_KEM_VINFO *v;
  572|  2.10k|    struct ml_kem_get_params_st p;
  573|       |
  574|  2.10k|    if (key == NULL || !ml_kem_get_params_decoder(params, &p))
  ------------------
  |  Branch (574:9): [True: 0, False: 2.10k]
  |  Branch (574:24): [True: 0, False: 2.10k]
  ------------------
  575|      0|        return 0;
  576|       |
  577|  2.10k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  2.10k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  578|       |
  579|  2.10k|    if (p.bits != NULL && !OSSL_PARAM_set_size_t(p.bits, v->bits))
  ------------------
  |  Branch (579:9): [True: 2.09k, False: 4]
  |  Branch (579:27): [True: 0, False: 2.09k]
  ------------------
  580|      0|        return 0;
  581|       |
  582|  2.10k|    if (p.secbits != NULL && !OSSL_PARAM_set_size_t(p.secbits, v->secbits))
  ------------------
  |  Branch (582:9): [True: 2.09k, False: 4]
  |  Branch (582:30): [True: 0, False: 2.09k]
  ------------------
  583|      0|        return 0;
  584|       |
  585|  2.10k|    if (p.maxsize != NULL && !OSSL_PARAM_set_size_t(p.maxsize, v->ctext_bytes))
  ------------------
  |  Branch (585:9): [True: 2.09k, False: 4]
  |  Branch (585:30): [True: 0, False: 2.09k]
  ------------------
  586|      0|        return 0;
  587|       |
  588|  2.10k|    if (p.seccat != NULL && !OSSL_PARAM_set_int(p.seccat, v->security_category))
  ------------------
  |  Branch (588:9): [True: 2.09k, False: 4]
  |  Branch (588:29): [True: 0, False: 2.09k]
  ------------------
  589|      0|        return 0;
  590|       |
  591|  2.10k|    if (p.pubkey != NULL && ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|      0|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (591:9): [True: 0, False: 2.10k]
  ------------------
  592|       |        /* Exported to EVP_PKEY_get_raw_public_key() */
  593|      0|        if (!ml_kem_get_key_param(key, p.pubkey, v->pubkey_bytes,
  ------------------
  |  Branch (593:13): [True: 0, False: 0]
  ------------------
  594|      0|                &ossl_ml_kem_encode_public_key))
  595|      0|            return 0;
  596|      0|    }
  597|       |
  598|  2.10k|    if (p.encpubkey != NULL && ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|      4|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 4, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (598:9): [True: 4, False: 2.09k]
  ------------------
  599|       |        /* Needed by EVP_PKEY_get1_encoded_public_key() */
  600|      4|        if (!ml_kem_get_key_param(key, p.encpubkey, v->pubkey_bytes,
  ------------------
  |  Branch (600:13): [True: 0, False: 4]
  ------------------
  601|      4|                &ossl_ml_kem_encode_public_key))
  602|      0|            return 0;
  603|      4|    }
  604|       |
  605|  2.10k|    if (p.privkey != NULL && ossl_ml_kem_have_prvkey(key)) {
  ------------------
  |  |  208|      0|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  |  |  ------------------
  |  |  |  Branch (208:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (605:9): [True: 0, False: 2.10k]
  ------------------
  606|       |        /* Exported to EVP_PKEY_get_raw_private_key() */
  607|      0|        if (!ml_kem_get_key_param(key, p.privkey, v->prvkey_bytes,
  ------------------
  |  Branch (607:13): [True: 0, False: 0]
  ------------------
  608|      0|                &ossl_ml_kem_encode_private_key))
  609|      0|            return 0;
  610|      0|    }
  611|       |
  612|  2.10k|    if (p.seed != NULL && ossl_ml_kem_have_seed(key)) {
  ------------------
  |  |  209|      0|#define ossl_ml_kem_have_seed(key) ((key)->d != NULL)
  |  |  ------------------
  |  |  |  Branch (209:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (612:9): [True: 0, False: 2.10k]
  ------------------
  613|       |        /* Exported for import */
  614|      0|        if (!ml_kem_get_key_param(key, p.seed, ML_KEM_SEED_BYTES,
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (614:13): [True: 0, False: 0]
  ------------------
  615|      0|                &ossl_ml_kem_encode_seed))
  616|      0|            return 0;
  617|      0|    }
  618|       |
  619|  2.10k|#ifndef OPENSSL_NO_CMS
  620|  2.10k|    if (p.ri_type != NULL && !OSSL_PARAM_set_int(p.ri_type, CMS_RECIPINFO_KEM))
  ------------------
  |  |  175|      0|#define CMS_RECIPINFO_KEM 5
  ------------------
  |  Branch (620:9): [True: 0, False: 2.10k]
  |  Branch (620:30): [True: 0, False: 0]
  ------------------
  621|      0|        return 0;
  622|       |
  623|  2.10k|    if (p.kemri_kdf_alg != NULL) {
  ------------------
  |  Branch (623:9): [True: 0, False: 2.10k]
  ------------------
  624|      0|        uint8_t aid_buf[OSSL_MAX_ALGORITHM_ID_SIZE];
  625|      0|        int ret;
  626|      0|        size_t aid_len = 0;
  627|      0|        WPACKET pkt;
  628|      0|        uint8_t *aid = NULL;
  629|       |
  630|      0|        ret = WPACKET_init_der(&pkt, aid_buf, sizeof(aid_buf));
  631|      0|        ret &= ossl_DER_w_begin_sequence(&pkt, -1)
  ------------------
  |  Branch (631:16): [True: 0, False: 0]
  ------------------
  632|      0|            && ossl_DER_w_precompiled(&pkt, -1, ossl_der_oid_id_alg_hkdf_with_sha256,
  ------------------
  |  Branch (632:16): [True: 0, False: 0]
  ------------------
  633|      0|                sizeof(ossl_der_oid_id_alg_hkdf_with_sha256))
  634|      0|            && ossl_DER_w_end_sequence(&pkt, -1);
  ------------------
  |  Branch (634:16): [True: 0, False: 0]
  ------------------
  635|      0|        if (ret && WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (635:13): [True: 0, False: 0]
  |  Branch (635:20): [True: 0, False: 0]
  ------------------
  636|      0|            WPACKET_get_total_written(&pkt, &aid_len);
  637|      0|            aid = WPACKET_get_curr(&pkt);
  638|      0|        }
  639|      0|        WPACKET_cleanup(&pkt);
  640|      0|        if (!ret)
  ------------------
  |  Branch (640:13): [True: 0, False: 0]
  ------------------
  641|      0|            return 0;
  642|      0|        if (aid != NULL && aid_len != 0 && !OSSL_PARAM_set_octet_string(p.kemri_kdf_alg, aid, aid_len))
  ------------------
  |  Branch (642:13): [True: 0, False: 0]
  |  Branch (642:28): [True: 0, False: 0]
  |  Branch (642:44): [True: 0, False: 0]
  ------------------
  643|      0|            return 0;
  644|      0|    }
  645|  2.10k|#endif
  646|       |
  647|  2.10k|    return 1;
  648|  2.10k|}
ml_kem_kmgmt.c:ml_kem_get_key_param:
  554|      4|{
  555|      4|    if (p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|      4|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (555:9): [True: 0, False: 4]
  ------------------
  556|      0|        return 0;
  557|      4|    p->return_size = bytes;
  558|      4|    if (p->data != NULL)
  ------------------
  |  Branch (558:9): [True: 2, False: 2]
  ------------------
  559|      2|        if (p->data_size < p->return_size
  ------------------
  |  Branch (559:13): [True: 0, False: 2]
  ------------------
  560|      2|            || !(*get_f)(p->data, p->return_size, key))
  ------------------
  |  Branch (560:16): [True: 0, False: 2]
  ------------------
  561|      0|            return 0;
  562|      4|    return 1;
  563|      4|}
ml_kem_kmgmt.c:ml_kem_gen_init:
  722|  2.09k|{
  723|  2.09k|    PROV_ML_KEM_GEN_CTX *gctx = NULL;
  724|       |
  725|       |    /*
  726|       |     * We can only generate private keys, check that the selection is
  727|       |     * appropriate.
  728|       |     */
  729|  2.09k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (729:9): [True: 0, False: 2.09k]
  ------------------
  730|  2.09k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (730:12): [True: 0, False: 2.09k]
  ------------------
  731|  2.09k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  109|  2.09k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (731:12): [True: 0, False: 2.09k]
  ------------------
  732|      0|        return NULL;
  733|       |
  734|  2.09k|    gctx->selection = selection;
  735|  2.09k|    gctx->evp_type = evp_type;
  736|  2.09k|    gctx->provctx = provctx;
  737|  2.09k|    if (ml_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (737:9): [True: 2.09k, False: 0]
  ------------------
  738|  2.09k|        return gctx;
  739|       |
  740|      0|    ml_kem_gen_cleanup(gctx);
  741|       |    return NULL;
  742|  2.09k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params:
  688|  4.19k|{
  689|  4.19k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  690|  4.19k|    struct ml_kem_gen_set_params_st p;
  691|       |
  692|  4.19k|    if (gctx == NULL || !ml_kem_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (692:9): [True: 0, False: 4.19k]
  |  Branch (692:25): [True: 0, False: 4.19k]
  ------------------
  693|      0|        return 0;
  694|       |
  695|  4.19k|    if (p.propq != NULL) {
  ------------------
  |  Branch (695:9): [True: 0, False: 4.19k]
  ------------------
  696|      0|        if (p.propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (696:13): [True: 0, False: 0]
  ------------------
  697|      0|            return 0;
  698|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  699|      0|        if ((gctx->propq = OPENSSL_strdup(p.propq->data)) == NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (699:13): [True: 0, False: 0]
  ------------------
  700|      0|            return 0;
  701|      0|    }
  702|       |
  703|  4.19k|    if (p.seed != NULL) {
  ------------------
  |  Branch (703:9): [True: 0, False: 4.19k]
  ------------------
  704|      0|        size_t len = ML_KEM_SEED_BYTES;
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  705|       |
  706|      0|        gctx->seed = gctx->seedbuf;
  707|      0|        if (OSSL_PARAM_get_octet_string(p.seed, (void **)&gctx->seed, len, &len)
  ------------------
  |  Branch (707:13): [True: 0, False: 0]
  ------------------
  708|      0|            && len == ML_KEM_SEED_BYTES)
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (708:16): [True: 0, False: 0]
  ------------------
  709|      0|            return 1;
  710|       |
  711|       |        /* Possibly, but less likely wrong data type */
  712|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_SEED_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  713|      0|        gctx->seed = NULL;
  714|      0|        return 0;
  715|      0|    }
  716|       |
  717|  4.19k|    return 1;
  718|  4.19k|}
ml_kem_kmgmt.c:ml_kem_gen:
  751|  2.09k|{
  752|  2.09k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  753|  2.09k|    ML_KEM_KEY *key;
  754|  2.09k|    uint8_t *nopub = NULL;
  755|  2.09k|    uint8_t *seed;
  756|  2.09k|    int genok = 0;
  757|       |
  758|  2.09k|    if (gctx == NULL
  ------------------
  |  Branch (758:9): [True: 0, False: 2.09k]
  ------------------
  759|  2.09k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  656|  2.09k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (759:12): [True: 0, False: 2.09k]
  ------------------
  760|      0|        return NULL;
  761|  2.09k|    seed = gctx->seed;
  762|  2.09k|    key = ossl_prov_ml_kem_new(gctx->provctx, gctx->propq, gctx->evp_type);
  763|  2.09k|    if (key == NULL)
  ------------------
  |  Branch (763:9): [True: 0, False: 2.09k]
  ------------------
  764|      0|        return NULL;
  765|       |
  766|  2.09k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  2.09k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (766:9): [True: 0, False: 2.09k]
  ------------------
  767|      0|        return key;
  768|       |
  769|  2.09k|    if (seed != NULL && !ossl_ml_kem_set_seed(seed, ML_KEM_SEED_BYTES, key))
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (769:9): [True: 0, False: 2.09k]
  |  Branch (769:25): [True: 0, False: 0]
  ------------------
  770|      0|        return NULL;
  771|  2.09k|    genok = ossl_ml_kem_genkey(nopub, 0, key);
  772|       |
  773|       |    /* Erase the single-use seed */
  774|  2.09k|    if (seed != NULL)
  ------------------
  |  Branch (774:9): [True: 0, False: 2.09k]
  ------------------
  775|      0|        OPENSSL_cleanse(seed, ML_KEM_SEED_BYTES);
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  776|  2.09k|    gctx->seed = NULL;
  777|       |
  778|  2.09k|    if (genok) {
  ------------------
  |  Branch (778:9): [True: 2.09k, False: 0]
  ------------------
  779|       |#ifdef FIPS_MODULE
  780|       |        if (!ml_kem_pairwise_test(key, ML_KEM_KEY_FIXED_PCT)) {
  781|       |            ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
  782|       |            ossl_ml_kem_key_free(key);
  783|       |            return NULL;
  784|       |        }
  785|       |#endif /* FIPS_MODULE */
  786|  2.09k|        return key;
  787|  2.09k|    }
  788|       |
  789|      0|    ossl_ml_kem_key_free(key);
  790|       |    return NULL;
  791|  2.09k|}
ml_kem_kmgmt.c:ml_kem_gen_cleanup:
  794|  2.09k|{
  795|  2.09k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  796|       |
  797|  2.09k|    if (gctx == NULL)
  ------------------
  |  Branch (797:9): [True: 0, False: 2.09k]
  ------------------
  798|      0|        return;
  799|       |
  800|  2.09k|    if (gctx->seed != NULL)
  ------------------
  |  Branch (800:9): [True: 0, False: 2.09k]
  ------------------
  801|      0|        OPENSSL_cleanse(gctx->seed, ML_KEM_SEED_BYTES);
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  802|  2.09k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  803|  2.09k|    OPENSSL_free(gctx);
  ------------------
  |  |  132|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  804|  2.09k|}
ml_kem_kmgmt.c:ml_kem_export:
  251|  2.09k|{
  252|  2.09k|    ML_KEM_KEY *key = vkey;
  253|  2.09k|    OSSL_PARAM_BLD *tmpl = NULL;
  254|  2.09k|    OSSL_PARAM *params = NULL;
  255|  2.09k|    const ML_KEM_VINFO *v;
  256|  2.09k|    uint8_t *pubenc = NULL, *prvenc = NULL, *seedenc = NULL;
  257|  2.09k|    size_t prvlen = 0, seedlen = 0;
  258|  2.09k|    int ret = 0;
  259|       |
  260|  2.09k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (260:9): [True: 0, False: 2.09k]
  |  Branch (260:36): [True: 0, False: 2.09k]
  ------------------
  261|      0|        return 0;
  262|       |
  263|  2.09k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  2.09k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (263:9): [True: 0, False: 2.09k]
  ------------------
  264|      0|        return 0;
  265|       |
  266|  2.09k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  2.09k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  267|  2.09k|    if (!ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|  2.09k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (267:9): [True: 0, False: 2.09k]
  ------------------
  268|       |        /* Fail when no key material can be returned */
  269|      0|        if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) == 0
  ------------------
  |  |  646|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (269:13): [True: 0, False: 0]
  ------------------
  270|      0|            || !ossl_ml_kem_decoded_key(key)) {
  ------------------
  |  |  211|      0|#define ossl_ml_kem_decoded_key(key) ((key)->encoded_dk != NULL \
  |  |  ------------------
  |  |  |  Branch (211:39): [True: 0, False: 0]
  |  |  ------------------
  |  |  212|      0|    || ((key)->s == NULL && (key)->d != NULL))
  |  |  ------------------
  |  |  |  Branch (212:9): [True: 0, False: 0]
  |  |  |  Branch (212:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  271|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|            return 0;
  273|      0|        }
  274|  2.09k|    } else if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (274:16): [True: 2.09k, False: 0]
  ------------------
  275|  2.09k|        pubenc = OPENSSL_malloc(v->pubkey_bytes);
  ------------------
  |  |  107|  2.09k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  276|  2.09k|        if (pubenc == NULL
  ------------------
  |  Branch (276:13): [True: 0, False: 2.09k]
  ------------------
  277|  2.09k|            || !ossl_ml_kem_encode_public_key(pubenc, v->pubkey_bytes, key))
  ------------------
  |  Branch (277:16): [True: 0, False: 2.09k]
  ------------------
  278|      0|            goto err;
  279|  2.09k|    }
  280|       |
  281|  2.09k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (281:9): [True: 0, False: 2.09k]
  ------------------
  282|       |        /*
  283|       |         * The seed and/or private key material are allocated on the secure
  284|       |         * heap if configured, ossl_param_build_set_octet_string(), will then
  285|       |         * also use the secure heap.
  286|       |         */
  287|      0|        if (ossl_ml_kem_have_seed(key)) {
  ------------------
  |  |  209|      0|#define ossl_ml_kem_have_seed(key) ((key)->d != NULL)
  |  |  ------------------
  |  |  |  Branch (209:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  288|      0|            seedlen = ML_KEM_SEED_BYTES;
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  289|      0|            if ((seedenc = OPENSSL_secure_zalloc(seedlen)) == NULL
  ------------------
  |  |  142|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (289:17): [True: 0, False: 0]
  ------------------
  290|      0|                || !ossl_ml_kem_encode_seed(seedenc, seedlen, key))
  ------------------
  |  Branch (290:20): [True: 0, False: 0]
  ------------------
  291|      0|                goto err;
  292|      0|        }
  293|      0|        if (ossl_ml_kem_have_prvkey(key)) {
  ------------------
  |  |  208|      0|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  |  |  ------------------
  |  |  |  Branch (208:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  294|      0|            prvlen = v->prvkey_bytes;
  295|      0|            if ((prvenc = OPENSSL_secure_zalloc(prvlen)) == NULL
  ------------------
  |  |  142|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (295:17): [True: 0, False: 0]
  ------------------
  296|      0|                || !ossl_ml_kem_encode_private_key(prvenc, prvlen, key))
  ------------------
  |  Branch (296:20): [True: 0, False: 0]
  ------------------
  297|      0|                goto err;
  298|      0|        } else if (ossl_ml_kem_have_dkenc(key)) {
  ------------------
  |  |  210|      0|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  299|      0|            prvlen = v->prvkey_bytes;
  300|      0|            if ((prvenc = OPENSSL_secure_zalloc(prvlen)) == NULL)
  ------------------
  |  |  142|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (300:17): [True: 0, False: 0]
  ------------------
  301|      0|                goto err;
  302|      0|            memcpy(prvenc, key->encoded_dk, prvlen);
  303|      0|        }
  304|      0|    }
  305|       |
  306|  2.09k|    tmpl = OSSL_PARAM_BLD_new();
  307|  2.09k|    if (tmpl == NULL)
  ------------------
  |  Branch (307:9): [True: 0, False: 2.09k]
  ------------------
  308|      0|        goto err;
  309|       |
  310|       |    /* The (d, z) seed, when available and private keys are requested. */
  311|  2.09k|    if (seedenc != NULL
  ------------------
  |  Branch (311:9): [True: 0, False: 2.09k]
  ------------------
  312|      0|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (312:12): [True: 0, False: 0]
  ------------------
  313|      0|            tmpl, params, OSSL_PKEY_PARAM_ML_KEM_SEED, seedenc, seedlen))
  ------------------
  |  |  445|      0|# define OSSL_PKEY_PARAM_ML_KEM_SEED "seed"
  ------------------
  314|      0|        goto err;
  315|       |
  316|       |    /* The private key in the FIPS 203 |dk| format, when requested. */
  317|  2.09k|    if (prvenc != NULL
  ------------------
  |  Branch (317:9): [True: 0, False: 2.09k]
  ------------------
  318|      0|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (318:12): [True: 0, False: 0]
  ------------------
  319|      0|            tmpl, params, OSSL_PKEY_PARAM_PRIV_KEY, prvenc, prvlen))
  ------------------
  |  |  448|      0|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  320|      0|        goto err;
  321|       |
  322|       |    /* The public key on request; it is always available when either is */
  323|  2.09k|    if (pubenc != NULL
  ------------------
  |  Branch (323:9): [True: 2.09k, False: 0]
  ------------------
  324|  2.09k|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (324:12): [True: 0, False: 2.09k]
  ------------------
  325|  2.09k|            tmpl, params, OSSL_PKEY_PARAM_PUB_KEY, pubenc, v->pubkey_bytes))
  ------------------
  |  |  450|  2.09k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  326|      0|        goto err;
  327|       |
  328|  2.09k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  329|  2.09k|    if (params == NULL)
  ------------------
  |  Branch (329:9): [True: 0, False: 2.09k]
  ------------------
  330|      0|        goto err;
  331|       |
  332|  2.09k|    ret = param_cb(params, cbarg);
  333|  2.09k|    OSSL_PARAM_clear_free(params);
  334|       |
  335|  2.09k|err:
  336|  2.09k|    OSSL_PARAM_BLD_free(tmpl);
  337|  2.09k|    OPENSSL_secure_clear_free(seedenc, seedlen);
  ------------------
  |  |  150|  2.09k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  338|  2.09k|    OPENSSL_secure_clear_free(prvenc, prvlen);
  ------------------
  |  |  150|  2.09k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  339|  2.09k|    OPENSSL_free(pubenc);
  ------------------
  |  |  132|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  340|  2.09k|    return ret;
  341|  2.09k|}
ml_kem_kmgmt.c:ml_kem_768_gen_init:
  837|  2.09k|    {                                                                                     \
  838|  2.09k|        return ml_kem_gen_init(provctx, selection, params,                                \
  839|  2.09k|            EVP_PKEY_ML_KEM_##bits);                                                      \
  ------------------
  |  |  103|  2.09k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6645|  2.09k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  840|  2.09k|    }                                                                                     \

ml_kem_kmgmt.c:ml_kem_get_params_decoder:
  120|  2.10k|{
  121|  2.10k|    const char *s;
  122|       |
  123|  2.10k|    memset(r, 0, sizeof(*r));
  124|  2.10k|    if (p != NULL)
  ------------------
  |  Branch (124:9): [True: 2.10k, False: 0]
  ------------------
  125|  10.4k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (125:16): [True: 8.38k, False: 2.10k]
  ------------------
  126|  8.38k|            switch(s[0]) {
  127|      0|            default:
  ------------------
  |  Branch (127:13): [True: 0, False: 8.38k]
  ------------------
  128|      0|                break;
  129|  2.09k|            case 'b':
  ------------------
  |  Branch (129:13): [True: 2.09k, False: 6.29k]
  ------------------
  130|  2.09k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  131|       |                    /* OSSL_PKEY_PARAM_BITS */
  132|  2.09k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  2.09k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  133|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  134|      0|                                       "param %s is repeated", s);
  135|      0|                        return 0;
  136|      0|                    }
  137|  2.09k|                    r->bits = (OSSL_PARAM *)p;
  138|  2.09k|                }
  139|  2.09k|                break;
  140|  2.09k|            case 'e':
  ------------------
  |  Branch (140:13): [True: 4, False: 8.38k]
  ------------------
  141|      4|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|      4|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4, False: 0]
  |  |  ------------------
  ------------------
  142|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  143|      4|                    if (ossl_unlikely(r->encpubkey != NULL)) {
  ------------------
  |  |   23|      4|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4]
  |  |  ------------------
  ------------------
  144|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  145|      0|                                       "param %s is repeated", s);
  146|      0|                        return 0;
  147|      0|                    }
  148|      4|                    r->encpubkey = (OSSL_PARAM *)p;
  149|      4|                }
  150|      4|                break;
  151|      4|            case 'k':
  ------------------
  |  Branch (151:13): [True: 0, False: 8.38k]
  ------------------
  152|      0|                if (ossl_likely(strcmp("emri-kdf-alg", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  153|       |                    /* OSSL_PKEY_PARAM_CMS_KEMRI_KDF_ALGORITHM */
  154|      0|                    if (ossl_unlikely(r->kemri_kdf_alg != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  155|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  156|      0|                                       "param %s is repeated", s);
  157|      0|                        return 0;
  158|      0|                    }
  159|      0|                    r->kemri_kdf_alg = (OSSL_PARAM *)p;
  160|      0|                }
  161|      0|                break;
  162|  2.09k|            case 'm':
  ------------------
  |  Branch (162:13): [True: 2.09k, False: 6.29k]
  ------------------
  163|  2.09k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  164|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  165|  2.09k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  2.09k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  166|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  167|      0|                                       "param %s is repeated", s);
  168|      0|                        return 0;
  169|      0|                    }
  170|  2.09k|                    r->maxsize = (OSSL_PARAM *)p;
  171|  2.09k|                }
  172|  2.09k|                break;
  173|  2.09k|            case 'p':
  ------------------
  |  Branch (173:13): [True: 0, False: 8.38k]
  ------------------
  174|      0|                switch(s[1]) {
  175|      0|                default:
  ------------------
  |  Branch (175:17): [True: 0, False: 0]
  ------------------
  176|      0|                    break;
  177|      0|                case 'r':
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      0|                    if (ossl_likely(strcmp("iv", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  179|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  180|      0|                        if (ossl_unlikely(r->privkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  181|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  182|      0|                                           "param %s is repeated", s);
  183|      0|                            return 0;
  184|      0|                        }
  185|      0|                        r->privkey = (OSSL_PARAM *)p;
  186|      0|                    }
  187|      0|                    break;
  188|      0|                case 'u':
  ------------------
  |  Branch (188:17): [True: 0, False: 0]
  ------------------
  189|      0|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  190|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  191|      0|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  192|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  193|      0|                                           "param %s is repeated", s);
  194|      0|                            return 0;
  195|      0|                        }
  196|      0|                        r->pubkey = (OSSL_PARAM *)p;
  197|      0|                    }
  198|      0|                }
  199|      0|                break;
  200|      0|            case 'r':
  ------------------
  |  Branch (200:13): [True: 0, False: 8.38k]
  ------------------
  201|      0|                if (ossl_likely(strcmp("i-type", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  202|       |                    /* OSSL_PKEY_PARAM_CMS_RI_TYPE */
  203|      0|                    if (ossl_unlikely(r->ri_type != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  204|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  205|      0|                                       "param %s is repeated", s);
  206|      0|                        return 0;
  207|      0|                    }
  208|      0|                    r->ri_type = (OSSL_PARAM *)p;
  209|      0|                }
  210|      0|                break;
  211|  4.19k|            case 's':
  ------------------
  |  Branch (211:13): [True: 4.19k, False: 4.19k]
  ------------------
  212|  4.19k|                switch(s[1]) {
  213|      0|                default:
  ------------------
  |  Branch (213:17): [True: 0, False: 4.19k]
  ------------------
  214|      0|                    break;
  215|  4.19k|                case 'e':
  ------------------
  |  Branch (215:17): [True: 4.19k, False: 0]
  ------------------
  216|  4.19k|                    switch(s[2]) {
  217|      0|                    default:
  ------------------
  |  Branch (217:21): [True: 0, False: 4.19k]
  ------------------
  218|      0|                        break;
  219|  4.19k|                    case 'c':
  ------------------
  |  Branch (219:21): [True: 4.19k, False: 0]
  ------------------
  220|  4.19k|                        switch(s[3]) {
  221|      0|                        default:
  ------------------
  |  Branch (221:25): [True: 0, False: 4.19k]
  ------------------
  222|      0|                            break;
  223|  4.19k|                        case 'u':
  ------------------
  |  Branch (223:25): [True: 4.19k, False: 0]
  ------------------
  224|  4.19k|                            switch(s[4]) {
  225|      0|                            default:
  ------------------
  |  Branch (225:29): [True: 0, False: 4.19k]
  ------------------
  226|      0|                                break;
  227|  4.19k|                            case 'r':
  ------------------
  |  Branch (227:29): [True: 4.19k, False: 0]
  ------------------
  228|  4.19k|                                switch(s[5]) {
  229|      0|                                default:
  ------------------
  |  Branch (229:33): [True: 0, False: 4.19k]
  ------------------
  230|      0|                                    break;
  231|  4.19k|                                case 'i':
  ------------------
  |  Branch (231:33): [True: 4.19k, False: 0]
  ------------------
  232|  4.19k|                                    switch(s[6]) {
  233|      0|                                    default:
  ------------------
  |  Branch (233:37): [True: 0, False: 4.19k]
  ------------------
  234|      0|                                        break;
  235|  4.19k|                                    case 't':
  ------------------
  |  Branch (235:37): [True: 4.19k, False: 0]
  ------------------
  236|  4.19k|                                        switch(s[7]) {
  237|      0|                                        default:
  ------------------
  |  Branch (237:41): [True: 0, False: 4.19k]
  ------------------
  238|      0|                                            break;
  239|  4.19k|                                        case 'y':
  ------------------
  |  Branch (239:41): [True: 4.19k, False: 0]
  ------------------
  240|  4.19k|                                            switch(s[8]) {
  241|      0|                                            default:
  ------------------
  |  Branch (241:45): [True: 0, False: 4.19k]
  ------------------
  242|      0|                                                break;
  243|  4.19k|                                            case '-':
  ------------------
  |  Branch (243:45): [True: 4.19k, False: 0]
  ------------------
  244|  4.19k|                                                switch(s[9]) {
  245|      0|                                                default:
  ------------------
  |  Branch (245:49): [True: 0, False: 4.19k]
  ------------------
  246|      0|                                                    break;
  247|  2.09k|                                                case 'b':
  ------------------
  |  Branch (247:49): [True: 2.09k, False: 2.09k]
  ------------------
  248|  2.09k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  249|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  250|  2.09k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  2.09k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  251|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  252|      0|                                                                           "param %s is repeated", s);
  253|      0|                                                            return 0;
  254|      0|                                                        }
  255|  2.09k|                                                        r->secbits = (OSSL_PARAM *)p;
  256|  2.09k|                                                    }
  257|  2.09k|                                                    break;
  258|  2.09k|                                                case 'c':
  ------------------
  |  Branch (258:49): [True: 2.09k, False: 2.09k]
  ------------------
  259|  2.09k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  260|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  261|  2.09k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  2.09k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  262|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  263|      0|                                                                           "param %s is repeated", s);
  264|      0|                                                            return 0;
  265|      0|                                                        }
  266|  2.09k|                                                        r->seccat = (OSSL_PARAM *)p;
  267|  2.09k|                                                    }
  268|  4.19k|                                                }
  269|  4.19k|                                            }
  270|  4.19k|                                        }
  271|  4.19k|                                    }
  272|  4.19k|                                }
  273|  4.19k|                            }
  274|  4.19k|                        }
  275|  4.19k|                        break;
  276|  4.19k|                    case 'e':
  ------------------
  |  Branch (276:21): [True: 0, False: 4.19k]
  ------------------
  277|      0|                        if (ossl_likely(strcmp("d", s + 3) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  278|       |                            /* OSSL_PKEY_PARAM_ML_KEM_SEED */
  279|      0|                            if (ossl_unlikely(r->seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  280|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  281|      0|                                               "param %s is repeated", s);
  282|      0|                                return 0;
  283|      0|                            }
  284|      0|                            r->seed = (OSSL_PARAM *)p;
  285|      0|                        }
  286|  4.19k|                    }
  287|  4.19k|                }
  288|  8.38k|            }
  289|  2.10k|    return 1;
  290|  2.10k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params_decoder:
  350|  4.19k|{
  351|  4.19k|    const char *s;
  352|       |
  353|  4.19k|    memset(r, 0, sizeof(*r));
  354|  4.19k|    if (p != NULL)
  ------------------
  |  Branch (354:9): [True: 2.09k, False: 2.09k]
  ------------------
  355|  2.09k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (355:16): [True: 2, False: 2.09k]
  ------------------
  356|      2|            switch(s[0]) {
  357|      2|            default:
  ------------------
  |  Branch (357:13): [True: 2, False: 0]
  ------------------
  358|      2|                break;
  359|      2|            case 'p':
  ------------------
  |  Branch (359:13): [True: 0, False: 2]
  ------------------
  360|      0|                if (ossl_likely(strcmp("roperties", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  361|       |                    /* OSSL_PKEY_PARAM_PROPERTIES */
  362|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  363|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  364|      0|                                       "param %s is repeated", s);
  365|      0|                        return 0;
  366|      0|                    }
  367|      0|                    r->propq = (OSSL_PARAM *)p;
  368|      0|                }
  369|      0|                break;
  370|      0|            case 's':
  ------------------
  |  Branch (370:13): [True: 0, False: 2]
  ------------------
  371|      0|                if (ossl_likely(strcmp("eed", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  372|       |                    /* OSSL_PKEY_PARAM_ML_KEM_SEED */
  373|      0|                    if (ossl_unlikely(r->seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  374|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  375|      0|                                       "param %s is repeated", s);
  376|      0|                        return 0;
  377|      0|                    }
  378|      0|                    r->seed = (OSSL_PARAM *)p;
  379|      0|                }
  380|      2|            }
  381|  4.19k|    return 1;
  382|  4.19k|}

mlx_kmgmt.c:mlx_kem_key_new:
   86|  2.09k|{
   87|  2.09k|    MLX_KEY *key = NULL;
   88|  2.09k|    unsigned int ml_kem_variant;
   89|       |
   90|  2.09k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (90:9): [True: 0, False: 2.09k]
  ------------------
   91|  2.09k|        || v >= OSSL_NELEM(hybrid_vtable)
  ------------------
  |  |   14|  4.18k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (91:12): [True: 0, False: 2.09k]
  ------------------
   92|  2.09k|        || (key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  107|  2.09k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (92:12): [True: 0, False: 2.09k]
  ------------------
   93|      0|        goto err;
   94|       |
   95|  2.09k|    ml_kem_variant = hybrid_vtable[v].ml_kem_variant;
   96|  2.09k|    key->libctx = libctx;
   97|  2.09k|    key->minfo = ossl_ml_kem_get_vinfo(ml_kem_variant);
   98|  2.09k|    key->xinfo = &hybrid_vtable[v];
   99|  2.09k|    key->xkey = key->mkey = NULL;
  100|  2.09k|    key->state = MLX_HAVE_NOKEYS;
  ------------------
  |  |   39|  2.09k|#define MLX_HAVE_NOKEYS 0
  ------------------
  101|  2.09k|    key->propq = propq;
  102|  2.09k|    return key;
  103|       |
  104|      0|err:
  105|      0|    OPENSSL_free(propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  106|       |    return NULL;
  107|  2.09k|}
mlx_kmgmt.c:mlx_kem_key_free:
   72|  2.09k|{
   73|  2.09k|    MLX_KEY *key = vkey;
   74|       |
   75|  2.09k|    if (key == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 2.09k]
  ------------------
   76|      0|        return;
   77|  2.09k|    OPENSSL_free(key->propq);
  ------------------
  |  |  132|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   78|  2.09k|    EVP_PKEY_free(key->mkey);
   79|  2.09k|    EVP_PKEY_free(key->xkey);
   80|  2.09k|    OPENSSL_free(key);
  ------------------
  |  |  132|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|  2.09k|}
mlx_kmgmt.c:mlx_kem_get_params:
  486|  6.28k|{
  487|  6.28k|    MLX_KEY *key = vkey;
  488|  6.28k|    OSSL_PARAM *pub, *prv = NULL;
  489|  6.28k|    EXPORT_CB_ARG sub_arg;
  490|  6.28k|    int selection;
  491|  6.28k|    struct mlx_get_params_st p;
  492|       |
  493|  6.28k|    if (key == NULL || !mlx_get_params_decoder(params, &p))
  ------------------
  |  Branch (493:9): [True: 0, False: 6.28k]
  |  Branch (493:24): [True: 0, False: 6.28k]
  ------------------
  494|      0|        return 0;
  495|       |
  496|       |    /* The reported "bit" count is those of the ML-KEM key */
  497|  6.28k|    if (p.bits != NULL)
  ------------------
  |  Branch (497:9): [True: 2.09k, False: 4.18k]
  ------------------
  498|  2.09k|        if (!OSSL_PARAM_set_int(p.bits, key->minfo->bits))
  ------------------
  |  Branch (498:13): [True: 0, False: 2.09k]
  ------------------
  499|      0|            return 0;
  500|       |
  501|       |    /* The reported security bits are those of the ML-KEM key */
  502|  6.28k|    if (p.secbits != NULL)
  ------------------
  |  Branch (502:9): [True: 2.09k, False: 4.18k]
  ------------------
  503|  2.09k|        if (!OSSL_PARAM_set_int(p.secbits, key->minfo->secbits))
  ------------------
  |  Branch (503:13): [True: 0, False: 2.09k]
  ------------------
  504|      0|            return 0;
  505|       |
  506|       |    /* The reported security category are those of the ML-KEM key */
  507|  6.28k|    if (p.seccat != NULL)
  ------------------
  |  Branch (507:9): [True: 2.09k, False: 4.18k]
  ------------------
  508|  2.09k|        if (!OSSL_PARAM_set_int(p.seccat, key->minfo->security_category))
  ------------------
  |  Branch (508:13): [True: 0, False: 2.09k]
  ------------------
  509|      0|            return 0;
  510|       |
  511|       |    /* The ciphertext sizes are additive */
  512|  6.28k|    if (p.maxsize != NULL)
  ------------------
  |  Branch (512:9): [True: 2.09k, False: 4.18k]
  ------------------
  513|  2.09k|        if (!OSSL_PARAM_set_size_t(p.maxsize, key->minfo->ctext_bytes + key->xinfo->pubkey_bytes))
  ------------------
  |  Branch (513:13): [True: 0, False: 2.09k]
  ------------------
  514|      0|            return 0;
  515|       |
  516|  6.28k|    if (!mlx_kem_have_pubkey(key))
  ------------------
  |  |   44|  6.28k|#define mlx_kem_have_pubkey(key) ((key)->state > 0)
  ------------------
  |  Branch (516:9): [True: 0, False: 6.28k]
  ------------------
  517|      0|        return 1;
  518|       |
  519|  6.28k|    memset(&sub_arg, 0, sizeof(sub_arg));
  520|  6.28k|    if ((pub = p.pub) != NULL) {
  ------------------
  |  Branch (520:9): [True: 4.18k, False: 2.09k]
  ------------------
  521|  4.18k|        size_t publen = key->minfo->pubkey_bytes + key->xinfo->pubkey_bytes;
  522|       |
  523|  4.18k|        if (pub->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|  4.18k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (523:13): [True: 0, False: 4.18k]
  ------------------
  524|      0|            return 0;
  525|  4.18k|        pub->return_size = publen;
  526|  4.18k|        if (pub->data == NULL) {
  ------------------
  |  Branch (526:13): [True: 2.09k, False: 2.09k]
  ------------------
  527|  2.09k|            pub = NULL;
  528|  2.09k|        } else if (pub->data_size < publen) {
  ------------------
  |  Branch (528:20): [True: 0, False: 2.09k]
  ------------------
  529|      0|            ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  530|      0|                "public key output buffer too short: %lu < %lu",
  531|      0|                (unsigned long)pub->data_size,
  532|      0|                (unsigned long)publen);
  533|      0|            return 0;
  534|  2.09k|        } else {
  535|  2.09k|            sub_arg.pubenc = pub->data;
  536|  2.09k|        }
  537|  4.18k|    }
  538|  6.28k|    if (mlx_kem_have_prvkey(key)) {
  ------------------
  |  |   45|  6.28k|#define mlx_kem_have_prvkey(key) ((key)->state > 1)
  |  |  ------------------
  |  |  |  Branch (45:34): [True: 6.28k, False: 0]
  |  |  ------------------
  ------------------
  539|  6.28k|        if ((prv = p.priv) != NULL) {
  ------------------
  |  Branch (539:13): [True: 0, False: 6.28k]
  ------------------
  540|      0|            size_t prvlen = key->minfo->prvkey_bytes + key->xinfo->prvkey_bytes;
  541|       |
  542|      0|            if (prv->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (542:17): [True: 0, False: 0]
  ------------------
  543|      0|                return 0;
  544|      0|            prv->return_size = prvlen;
  545|      0|            if (prv->data == NULL) {
  ------------------
  |  Branch (545:17): [True: 0, False: 0]
  ------------------
  546|      0|                prv = NULL;
  547|      0|            } else if (prv->data_size < prvlen) {
  ------------------
  |  Branch (547:24): [True: 0, False: 0]
  ------------------
  548|      0|                ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                              ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  549|      0|                    "private key output buffer too short: %lu < %lu",
  550|      0|                    (unsigned long)prv->data_size,
  551|      0|                    (unsigned long)prvlen);
  552|      0|                return 0;
  553|      0|            } else {
  554|      0|                sub_arg.prvenc = prv->data;
  555|      0|            }
  556|      0|        }
  557|  6.28k|    }
  558|  6.28k|    if (pub == NULL && prv == NULL)
  ------------------
  |  Branch (558:9): [True: 4.18k, False: 2.09k]
  |  Branch (558:24): [True: 4.18k, False: 0]
  ------------------
  559|  4.18k|        return 1;
  560|       |
  561|  2.09k|    selection = prv == NULL ? 0 : OSSL_KEYMGMT_SELECT_PRIVATE_KEY;
  ------------------
  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (561:17): [True: 2.09k, False: 0]
  ------------------
  562|  2.09k|    selection |= pub == NULL ? 0 : OSSL_KEYMGMT_SELECT_PUBLIC_KEY;
  ------------------
  |  |  647|  4.18k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (562:18): [True: 0, False: 2.09k]
  ------------------
  563|  2.09k|    if (key->xinfo->group_name != NULL)
  ------------------
  |  Branch (563:9): [True: 0, False: 2.09k]
  ------------------
  564|      0|        selection |= OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS;
  ------------------
  |  |  648|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  565|       |
  566|       |    /* Extract sub-component key material */
  567|  2.09k|    if (!export_sub(&sub_arg, selection, key))
  ------------------
  |  Branch (567:9): [True: 0, False: 2.09k]
  ------------------
  568|      0|        return 0;
  569|       |
  570|  2.09k|    if ((pub != NULL && sub_arg.pubcount != 2)
  ------------------
  |  Branch (570:10): [True: 2.09k, False: 0]
  |  Branch (570:25): [True: 0, False: 2.09k]
  ------------------
  571|  2.09k|        || (prv != NULL && sub_arg.prvcount != 2))
  ------------------
  |  Branch (571:13): [True: 0, False: 2.09k]
  |  Branch (571:28): [True: 0, False: 0]
  ------------------
  572|      0|        return 0;
  573|       |
  574|  2.09k|    return 1;
  575|  2.09k|}
mlx_kmgmt.c:export_sub:
  215|  2.09k|{
  216|  2.09k|    int slot;
  217|       |
  218|       |    /*
  219|       |     * The caller is responsible for initialising only the pubenc and prvenc
  220|       |     * pointer fields, the rest are set here or in the callback.
  221|       |     */
  222|  2.09k|    sub_arg->pubcount = 0;
  223|  2.09k|    sub_arg->prvcount = 0;
  224|       |
  225|  6.28k|    for (slot = 0; slot < 2; ++slot) {
  ------------------
  |  Branch (225:20): [True: 4.18k, False: 2.09k]
  ------------------
  226|  4.18k|        int ml_kem_slot = key->xinfo->ml_kem_slot;
  227|  4.18k|        EVP_PKEY *pkey;
  228|       |
  229|       |        /* Export the parts of each component into its storage slot */
  230|  4.18k|        if (slot == ml_kem_slot) {
  ------------------
  |  Branch (230:13): [True: 2.09k, False: 2.09k]
  ------------------
  231|  2.09k|            pkey = key->mkey;
  232|  2.09k|            sub_arg->algorithm_name = key->minfo->algorithm_name;
  233|  2.09k|            sub_arg->puboff = slot * key->xinfo->pubkey_bytes;
  234|  2.09k|            sub_arg->prvoff = slot * key->xinfo->prvkey_bytes;
  235|  2.09k|            sub_arg->publen = key->minfo->pubkey_bytes;
  236|  2.09k|            sub_arg->prvlen = key->minfo->prvkey_bytes;
  237|  2.09k|        } else {
  238|  2.09k|            pkey = key->xkey;
  239|  2.09k|            sub_arg->algorithm_name = key->xinfo->algorithm_name;
  240|  2.09k|            sub_arg->puboff = (1 - ml_kem_slot) * key->minfo->pubkey_bytes;
  241|  2.09k|            sub_arg->prvoff = (1 - ml_kem_slot) * key->minfo->prvkey_bytes;
  242|  2.09k|            sub_arg->publen = key->xinfo->pubkey_bytes;
  243|  2.09k|            sub_arg->prvlen = key->xinfo->prvkey_bytes;
  244|  2.09k|        }
  245|  4.18k|        if (!EVP_PKEY_export(pkey, selection, export_sub_cb, (void *)sub_arg))
  ------------------
  |  Branch (245:13): [True: 0, False: 4.18k]
  ------------------
  246|      0|            return 0;
  247|  4.18k|    }
  248|  2.09k|    return 1;
  249|  2.09k|}
mlx_kmgmt.c:export_sub_cb:
  169|  4.18k|{
  170|  4.18k|    EXPORT_CB_ARG *sub_arg = varg;
  171|  4.18k|    struct ml_kem_import_export_st p;
  172|  4.18k|    size_t len;
  173|       |
  174|  4.18k|    if (!ml_kem_import_export_decoder(params, &p))
  ------------------
  |  Branch (174:9): [True: 0, False: 4.18k]
  ------------------
  175|      0|        return 0;
  176|       |
  177|       |    /*
  178|       |     * The caller will decide whether anything essential is missing, but, if
  179|       |     * some key material was returned, it should have the right (parameter)
  180|       |     * data type and length.
  181|       |     */
  182|  4.18k|    if (sub_arg->pubenc != NULL && p.pubkey != NULL) {
  ------------------
  |  Branch (182:9): [True: 4.18k, False: 0]
  |  Branch (182:36): [True: 4.18k, False: 0]
  ------------------
  183|  4.18k|        void *pub = sub_arg->pubenc + sub_arg->puboff;
  184|       |
  185|  4.18k|        if (OSSL_PARAM_get_octet_string(p.pubkey, &pub, sub_arg->publen, &len) != 1)
  ------------------
  |  Branch (185:13): [True: 0, False: 4.18k]
  ------------------
  186|      0|            return 0;
  187|  4.18k|        if (len != sub_arg->publen) {
  ------------------
  |  Branch (187:13): [True: 0, False: 4.18k]
  ------------------
  188|      0|            ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  189|      0|                "Unexpected %s public key length %lu != %lu",
  190|      0|                sub_arg->algorithm_name, (unsigned long)len,
  191|      0|                sub_arg->publen);
  192|      0|            return 0;
  193|      0|        }
  194|  4.18k|        ++sub_arg->pubcount;
  195|  4.18k|    }
  196|  4.18k|    if (sub_arg->prvenc != NULL && p.privkey != NULL) {
  ------------------
  |  Branch (196:9): [True: 0, False: 4.18k]
  |  Branch (196:36): [True: 0, False: 0]
  ------------------
  197|      0|        void *prv = sub_arg->prvenc + sub_arg->prvoff;
  198|       |
  199|      0|        if (OSSL_PARAM_get_octet_string(p.privkey, &prv, sub_arg->prvlen, &len) != 1)
  ------------------
  |  Branch (199:13): [True: 0, False: 0]
  ------------------
  200|      0|            return 0;
  201|      0|        if (len != sub_arg->prvlen) {
  ------------------
  |  Branch (201:13): [True: 0, False: 0]
  ------------------
  202|      0|            ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|      0|                "Unexpected %s private key length %lu != %lu",
  204|      0|                sub_arg->algorithm_name, (unsigned long)len,
  205|      0|                (unsigned long)sub_arg->publen);
  206|      0|            return 0;
  207|      0|        }
  208|      0|        ++sub_arg->prvcount;
  209|      0|    }
  210|  4.18k|    return 1;
  211|  4.18k|}
mlx_kmgmt.c:mlx_kem_gen_init:
  641|  2.09k|{
  642|  2.09k|    PROV_ML_KEM_GEN_CTX *gctx = NULL;
  643|       |
  644|       |    /*
  645|       |     * We can only generate private keys, check that the selection is
  646|       |     * appropriate.
  647|       |     */
  648|  2.09k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (648:9): [True: 0, False: 2.09k]
  ------------------
  649|  2.09k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (649:12): [True: 0, False: 2.09k]
  ------------------
  650|  2.09k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  109|  2.09k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (650:12): [True: 0, False: 2.09k]
  ------------------
  651|      0|        return NULL;
  652|       |
  653|  2.09k|    gctx->evp_type = evp_type;
  654|  2.09k|    gctx->libctx = libctx;
  655|  2.09k|    gctx->selection = selection;
  656|  2.09k|    if (mlx_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (656:9): [True: 2.09k, False: 0]
  ------------------
  657|  2.09k|        return gctx;
  658|       |
  659|      0|    mlx_kem_gen_cleanup(gctx);
  660|       |    return NULL;
  661|  2.09k|}
mlx_kmgmt.c:mlx_kem_gen_set_params:
  622|  4.18k|{
  623|  4.18k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  624|  4.18k|    struct mlx_gen_set_params_st p;
  625|       |
  626|  4.18k|    if (gctx == NULL || !mlx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (626:9): [True: 0, False: 4.18k]
  |  Branch (626:25): [True: 0, False: 4.18k]
  ------------------
  627|      0|        return 0;
  628|       |
  629|  4.18k|    if (p.propq != NULL) {
  ------------------
  |  Branch (629:9): [True: 0, False: 4.18k]
  ------------------
  630|      0|        if (p.propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (630:13): [True: 0, False: 0]
  ------------------
  631|      0|            return 0;
  632|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  633|      0|        if ((gctx->propq = OPENSSL_strdup(p.propq->data)) == NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (633:13): [True: 0, False: 0]
  ------------------
  634|      0|            return 0;
  635|      0|    }
  636|  4.18k|    return 1;
  637|  4.18k|}
mlx_kmgmt.c:mlx_kem_gen:
  670|  2.09k|{
  671|  2.09k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  672|  2.09k|    MLX_KEY *key;
  673|  2.09k|    char *propq;
  674|       |
  675|  2.09k|    if (gctx == NULL
  ------------------
  |  Branch (675:9): [True: 0, False: 2.09k]
  ------------------
  676|  2.09k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  656|  2.09k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (676:12): [True: 0, False: 2.09k]
  ------------------
  677|      0|        return NULL;
  678|       |
  679|       |    /* Lose ownership of propq */
  680|  2.09k|    propq = gctx->propq;
  681|  2.09k|    gctx->propq = NULL;
  682|  2.09k|    if ((key = mlx_kem_key_new(gctx->evp_type, gctx->libctx, propq)) == NULL)
  ------------------
  |  Branch (682:9): [True: 0, False: 2.09k]
  ------------------
  683|      0|        return NULL;
  684|       |
  685|  2.09k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  2.09k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  2.09k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  2.09k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (685:9): [True: 0, False: 2.09k]
  ------------------
  686|      0|        return key;
  687|       |
  688|       |    /* For now, using the same "propq" for all components */
  689|  2.09k|    key->mkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  690|  2.09k|        key->minfo->algorithm_name);
  691|  2.09k|    key->xkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  692|  2.09k|        key->xinfo->algorithm_name,
  693|  2.09k|        key->xinfo->group_name);
  694|  2.09k|    if (key->mkey != NULL && key->xkey != NULL) {
  ------------------
  |  Branch (694:9): [True: 2.09k, False: 0]
  |  Branch (694:30): [True: 2.09k, False: 0]
  ------------------
  695|  2.09k|        key->state = MLX_HAVE_PRVKEY;
  ------------------
  |  |   41|  2.09k|#define MLX_HAVE_PRVKEY 2
  ------------------
  696|  2.09k|        return key;
  697|  2.09k|    }
  698|       |
  699|      0|    mlx_kem_key_free(key);
  700|       |    return NULL;
  701|  2.09k|}
mlx_kmgmt.c:mlx_kem_gen_cleanup:
  704|  2.09k|{
  705|  2.09k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  706|       |
  707|  2.09k|    if (gctx == NULL)
  ------------------
  |  Branch (707:9): [True: 0, False: 2.09k]
  ------------------
  708|      0|        return;
  709|  2.09k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  710|  2.09k|    OPENSSL_free(gctx);
  ------------------
  |  |  132|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  711|  2.09k|}

mlx_kmgmt.c:mlx_get_params_decoder:
   99|  6.28k|{
  100|  6.28k|    const char *s;
  101|       |
  102|  6.28k|    memset(r, 0, sizeof(*r));
  103|  6.28k|    if (p != NULL)
  ------------------
  |  Branch (103:9): [True: 6.28k, False: 0]
  ------------------
  104|  18.8k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (104:16): [True: 12.5k, False: 6.28k]
  ------------------
  105|  12.5k|            switch(s[0]) {
  106|      0|            default:
  ------------------
  |  Branch (106:13): [True: 0, False: 12.5k]
  ------------------
  107|      0|                break;
  108|  2.09k|            case 'b':
  ------------------
  |  Branch (108:13): [True: 2.09k, False: 10.4k]
  ------------------
  109|  2.09k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  110|       |                    /* OSSL_PKEY_PARAM_BITS */
  111|  2.09k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  2.09k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  112|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  113|      0|                                       "param %s is repeated", s);
  114|      0|                        return 0;
  115|      0|                    }
  116|  2.09k|                    r->bits = (OSSL_PARAM *)p;
  117|  2.09k|                }
  118|  2.09k|                break;
  119|  4.18k|            case 'e':
  ------------------
  |  Branch (119:13): [True: 4.18k, False: 8.37k]
  ------------------
  120|  4.18k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  4.18k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.18k, False: 0]
  |  |  ------------------
  ------------------
  121|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  122|  4.18k|                    if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|  4.18k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.18k]
  |  |  ------------------
  ------------------
  123|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  124|      0|                                       "param %s is repeated", s);
  125|      0|                        return 0;
  126|      0|                    }
  127|  4.18k|                    r->pub = (OSSL_PARAM *)p;
  128|  4.18k|                }
  129|  4.18k|                break;
  130|  4.18k|            case 'm':
  ------------------
  |  Branch (130:13): [True: 2.09k, False: 10.4k]
  ------------------
  131|  2.09k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  132|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  133|  2.09k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  2.09k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  134|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  135|      0|                                       "param %s is repeated", s);
  136|      0|                        return 0;
  137|      0|                    }
  138|  2.09k|                    r->maxsize = (OSSL_PARAM *)p;
  139|  2.09k|                }
  140|  2.09k|                break;
  141|  2.09k|            case 'p':
  ------------------
  |  Branch (141:13): [True: 0, False: 12.5k]
  ------------------
  142|      0|                if (ossl_likely(strcmp("riv", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  143|       |                    /* OSSL_PKEY_PARAM_PRIV_KEY */
  144|      0|                    if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  145|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  146|      0|                                       "param %s is repeated", s);
  147|      0|                        return 0;
  148|      0|                    }
  149|      0|                    r->priv = (OSSL_PARAM *)p;
  150|      0|                }
  151|      0|                break;
  152|  4.18k|            case 's':
  ------------------
  |  Branch (152:13): [True: 4.18k, False: 8.37k]
  ------------------
  153|  4.18k|                switch(s[1]) {
  154|      0|                default:
  ------------------
  |  Branch (154:17): [True: 0, False: 4.18k]
  ------------------
  155|      0|                    break;
  156|  4.18k|                case 'e':
  ------------------
  |  Branch (156:17): [True: 4.18k, False: 0]
  ------------------
  157|  4.18k|                    switch(s[2]) {
  158|      0|                    default:
  ------------------
  |  Branch (158:21): [True: 0, False: 4.18k]
  ------------------
  159|      0|                        break;
  160|  4.18k|                    case 'c':
  ------------------
  |  Branch (160:21): [True: 4.18k, False: 0]
  ------------------
  161|  4.18k|                        switch(s[3]) {
  162|      0|                        default:
  ------------------
  |  Branch (162:25): [True: 0, False: 4.18k]
  ------------------
  163|      0|                            break;
  164|  4.18k|                        case 'u':
  ------------------
  |  Branch (164:25): [True: 4.18k, False: 0]
  ------------------
  165|  4.18k|                            switch(s[4]) {
  166|      0|                            default:
  ------------------
  |  Branch (166:29): [True: 0, False: 4.18k]
  ------------------
  167|      0|                                break;
  168|  4.18k|                            case 'r':
  ------------------
  |  Branch (168:29): [True: 4.18k, False: 0]
  ------------------
  169|  4.18k|                                switch(s[5]) {
  170|      0|                                default:
  ------------------
  |  Branch (170:33): [True: 0, False: 4.18k]
  ------------------
  171|      0|                                    break;
  172|  4.18k|                                case 'i':
  ------------------
  |  Branch (172:33): [True: 4.18k, False: 0]
  ------------------
  173|  4.18k|                                    switch(s[6]) {
  174|      0|                                    default:
  ------------------
  |  Branch (174:37): [True: 0, False: 4.18k]
  ------------------
  175|      0|                                        break;
  176|  4.18k|                                    case 't':
  ------------------
  |  Branch (176:37): [True: 4.18k, False: 0]
  ------------------
  177|  4.18k|                                        switch(s[7]) {
  178|      0|                                        default:
  ------------------
  |  Branch (178:41): [True: 0, False: 4.18k]
  ------------------
  179|      0|                                            break;
  180|  4.18k|                                        case 'y':
  ------------------
  |  Branch (180:41): [True: 4.18k, False: 0]
  ------------------
  181|  4.18k|                                            switch(s[8]) {
  182|      0|                                            default:
  ------------------
  |  Branch (182:45): [True: 0, False: 4.18k]
  ------------------
  183|      0|                                                break;
  184|  4.18k|                                            case '-':
  ------------------
  |  Branch (184:45): [True: 4.18k, False: 0]
  ------------------
  185|  4.18k|                                                switch(s[9]) {
  186|      0|                                                default:
  ------------------
  |  Branch (186:49): [True: 0, False: 4.18k]
  ------------------
  187|      0|                                                    break;
  188|  2.09k|                                                case 'b':
  ------------------
  |  Branch (188:49): [True: 2.09k, False: 2.09k]
  ------------------
  189|  2.09k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  190|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  191|  2.09k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  2.09k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  192|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  193|      0|                                                                           "param %s is repeated", s);
  194|      0|                                                            return 0;
  195|      0|                                                        }
  196|  2.09k|                                                        r->secbits = (OSSL_PARAM *)p;
  197|  2.09k|                                                    }
  198|  2.09k|                                                    break;
  199|  2.09k|                                                case 'c':
  ------------------
  |  Branch (199:49): [True: 2.09k, False: 2.09k]
  ------------------
  200|  2.09k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  201|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  202|  2.09k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  2.09k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  203|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  204|      0|                                                                           "param %s is repeated", s);
  205|      0|                                                            return 0;
  206|      0|                                                        }
  207|  2.09k|                                                        r->seccat = (OSSL_PARAM *)p;
  208|  2.09k|                                                    }
  209|  4.18k|                                                }
  210|  4.18k|                                            }
  211|  4.18k|                                        }
  212|  4.18k|                                    }
  213|  4.18k|                                }
  214|  4.18k|                            }
  215|  4.18k|                        }
  216|  4.18k|                    }
  217|  4.18k|                }
  218|  12.5k|            }
  219|  6.28k|    return 1;
  220|  6.28k|}
mlx_kmgmt.c:ml_kem_import_export_decoder:
   31|  4.18k|{
   32|  4.18k|    const char *s;
   33|       |
   34|  4.18k|    memset(r, 0, sizeof(*r));
   35|  4.18k|    if (p != NULL)
  ------------------
  |  Branch (35:9): [True: 4.18k, False: 0]
  ------------------
   36|  8.37k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (36:16): [True: 4.18k, False: 4.18k]
  ------------------
   37|  4.18k|            switch(s[0]) {
   38|      0|            default:
  ------------------
  |  Branch (38:13): [True: 0, False: 4.18k]
  ------------------
   39|      0|                break;
   40|  4.18k|            case 'p':
  ------------------
  |  Branch (40:13): [True: 4.18k, False: 0]
  ------------------
   41|  4.18k|                switch(s[1]) {
   42|      0|                default:
  ------------------
  |  Branch (42:17): [True: 0, False: 4.18k]
  ------------------
   43|      0|                    break;
   44|      0|                case 'r':
  ------------------
  |  Branch (44:17): [True: 0, False: 4.18k]
  ------------------
   45|      0|                    if (ossl_likely(strcmp("iv", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   46|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
   47|      0|                        if (ossl_unlikely(r->privkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   48|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   49|      0|                                           "param %s is repeated", s);
   50|      0|                            return 0;
   51|      0|                        }
   52|      0|                        r->privkey = (OSSL_PARAM *)p;
   53|      0|                    }
   54|      0|                    break;
   55|  4.18k|                case 'u':
  ------------------
  |  Branch (55:17): [True: 4.18k, False: 0]
  ------------------
   56|  4.18k|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|  4.18k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.18k, False: 0]
  |  |  ------------------
  ------------------
   57|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
   58|  4.18k|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|  4.18k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.18k]
  |  |  ------------------
  ------------------
   59|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   60|      0|                                           "param %s is repeated", s);
   61|      0|                            return 0;
   62|      0|                        }
   63|  4.18k|                        r->pubkey = (OSSL_PARAM *)p;
   64|  4.18k|                    }
   65|  4.18k|                }
   66|  4.18k|            }
   67|  4.18k|    return 1;
   68|  4.18k|}
mlx_kmgmt.c:mlx_gen_set_params_decoder:
  296|  4.18k|{
  297|  4.18k|    const char *s;
  298|       |
  299|  4.18k|    memset(r, 0, sizeof(*r));
  300|  4.18k|    if (p != NULL)
  ------------------
  |  Branch (300:9): [True: 2.09k, False: 2.09k]
  ------------------
  301|  4.18k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (301:16): [True: 2.09k, False: 2.09k]
  ------------------
  302|  2.09k|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|  2.09k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  303|       |                /* OSSL_PKEY_PARAM_PROPERTIES */
  304|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  305|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  306|      0|                                   "param %s is repeated", s);
  307|      0|                    return 0;
  308|      0|                }
  309|      0|                r->propq = (OSSL_PARAM *)p;
  310|      0|            }
  311|  4.18k|    return 1;
  312|  4.18k|}

rsa_kmgmt.c:rsa_load:
  750|   341k|{
  751|   341k|    return common_load(reference, reference_sz, RSA_FLAG_TYPE_RSA);
  ------------------
  |  |  118|   341k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
  752|   341k|}
rsa_kmgmt.c:common_load:
  732|   341k|{
  733|   341k|    RSA *rsa = NULL;
  734|       |
  735|   341k|    if (ossl_prov_is_running() && reference_sz == sizeof(rsa)) {
  ------------------
  |  Branch (735:9): [True: 341k, False: 0]
  |  Branch (735:35): [True: 341k, False: 0]
  ------------------
  736|       |        /* The contents of the reference is the address to our object */
  737|   341k|        rsa = *(RSA **)reference;
  738|       |
  739|   341k|        if (RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK) != expected_rsa_type)
  ------------------
  |  |  117|   341k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  |  Branch (739:13): [True: 0, False: 341k]
  ------------------
  740|      0|            return NULL;
  741|       |
  742|       |        /* We grabbed, so we detach it */
  743|   341k|        *(RSA **)reference = NULL;
  744|   341k|        return rsa;
  745|   341k|    }
  746|      0|    return NULL;
  747|   341k|}
rsa_kmgmt.c:rsa_freedata:
  168|   341k|{
  169|   341k|    RSA_free(keydata);
  170|   341k|}
rsa_kmgmt.c:rsa_get_params:
  382|   341k|{
  383|   341k|    RSA *rsa = key;
  384|   341k|    const RSA_PSS_PARAMS_30 *pss_params = ossl_rsa_get0_pss_params_30(rsa);
  385|   341k|    int rsa_type = RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK);
  ------------------
  |  |  117|   341k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  386|   341k|    OSSL_PARAM *p;
  387|   341k|    int empty = RSA_get0_n(rsa) == NULL;
  388|       |
  389|   341k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  374|   341k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (389:9): [True: 341k, False: 0]
  ------------------
  390|   341k|        && (empty || !OSSL_PARAM_set_int(p, RSA_bits(rsa))))
  ------------------
  |  Branch (390:13): [True: 0, False: 341k]
  |  Branch (390:22): [True: 0, False: 341k]
  ------------------
  391|      0|        return 0;
  392|   341k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL
  ------------------
  |  |  506|   341k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (392:9): [True: 341k, False: 0]
  ------------------
  393|   341k|        && (empty || !OSSL_PARAM_set_int(p, RSA_security_bits(rsa))))
  ------------------
  |  Branch (393:13): [True: 0, False: 341k]
  |  Branch (393:22): [True: 0, False: 341k]
  ------------------
  394|      0|        return 0;
  395|   341k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  432|   341k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (395:9): [True: 341k, False: 0]
  ------------------
  396|   341k|        && (empty || !OSSL_PARAM_set_int(p, RSA_size(rsa))))
  ------------------
  |  Branch (396:13): [True: 0, False: 341k]
  |  Branch (396:22): [True: 0, False: 341k]
  ------------------
  397|      0|        return 0;
  398|   341k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  507|   341k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  131|   341k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (398:9): [True: 341k, False: 0]
  ------------------
  399|   341k|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (399:13): [True: 0, False: 341k]
  ------------------
  400|      0|            return 0;
  401|       |
  402|       |    /*
  403|       |     * For restricted RSA-PSS keys, we ignore the default digest request.
  404|       |     * With RSA-OAEP keys, this may need to be amended.
  405|       |     */
  406|   341k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  378|   341k|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (406:9): [True: 0, False: 341k]
  ------------------
  407|      0|        && (rsa_type != RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|      0|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (407:13): [True: 0, False: 0]
  ------------------
  408|      0|            || ossl_rsa_pss_params_30_is_unrestricted(pss_params))) {
  ------------------
  |  Branch (408:16): [True: 0, False: 0]
  ------------------
  409|      0|        if (!OSSL_PARAM_set_utf8_string(p, RSA_DEFAULT_MD))
  ------------------
  |  |   57|      0|#define RSA_DEFAULT_MD "SHA256"
  ------------------
  |  Branch (409:13): [True: 0, False: 0]
  ------------------
  410|      0|            return 0;
  411|      0|    }
  412|       |
  413|       |    /*
  414|       |     * For non-RSA-PSS keys, we ignore the mandatory digest request.
  415|       |     * With RSA-OAEP keys, this may need to be amended.
  416|       |     */
  417|   341k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (417:9): [True: 0, False: 341k]
  ------------------
  418|   341k|             OSSL_PKEY_PARAM_MANDATORY_DIGEST))
  ------------------
  |  |  430|   341k|# define OSSL_PKEY_PARAM_MANDATORY_DIGEST "mandatory-digest"
  ------------------
  419|   341k|            != NULL
  420|      0|        && rsa_type == RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|   341k|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (420:12): [True: 0, False: 0]
  ------------------
  421|      0|        && !ossl_rsa_pss_params_30_is_unrestricted(pss_params)) {
  ------------------
  |  Branch (421:12): [True: 0, False: 0]
  ------------------
  422|      0|        const char *mdname = ossl_rsa_oaeppss_nid2name(ossl_rsa_pss_params_30_hashalg(pss_params));
  423|       |
  424|      0|        if (mdname == NULL || !OSSL_PARAM_set_utf8_string(p, mdname))
  ------------------
  |  Branch (424:13): [True: 0, False: 0]
  |  Branch (424:31): [True: 0, False: 0]
  ------------------
  425|      0|            return 0;
  426|      0|    }
  427|   341k|    return (rsa_type != RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|   682k|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (427:13): [True: 341k, False: 0]
  ------------------
  428|      0|               || ossl_rsa_pss_params_30_todata(pss_params, NULL, params))
  ------------------
  |  Branch (428:19): [True: 0, False: 0]
  ------------------
  429|   341k|        && ossl_rsa_todata(rsa, NULL, params, 1);
  ------------------
  |  Branch (429:12): [True: 341k, False: 0]
  ------------------
  430|   341k|}

ossl_drbg_lock:
   54|  79.3k|{
   55|  79.3k|    return 1;
   56|  79.3k|}
ossl_drbg_unlock:
   60|  79.3k|{
   61|  79.3k|}
ossl_drbg_get_seed:
  148|  2.38k|{
  149|  2.38k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  150|  2.38k|    size_t bytes_needed;
  151|  2.38k|    unsigned char *buffer;
  152|       |
  153|       |    /* Figure out how many bytes we need */
  154|  2.38k|    bytes_needed = entropy >= 0 ? (entropy + 7) / 8 : 0;
  ------------------
  |  Branch (154:20): [True: 2.38k, False: 0]
  ------------------
  155|  2.38k|    if (bytes_needed < min_len)
  ------------------
  |  Branch (155:9): [True: 0, False: 2.38k]
  ------------------
  156|      0|        bytes_needed = min_len;
  157|  2.38k|    if (bytes_needed > max_len)
  ------------------
  |  Branch (157:9): [True: 0, False: 2.38k]
  ------------------
  158|      0|        bytes_needed = max_len;
  159|       |
  160|       |    /* Allocate storage */
  161|  2.38k|    buffer = OPENSSL_secure_malloc(bytes_needed);
  ------------------
  |  |  140|  2.38k|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  162|  2.38k|    if (buffer == NULL)
  ------------------
  |  Branch (162:9): [True: 0, False: 2.38k]
  ------------------
  163|      0|        return 0;
  164|       |
  165|       |    /*
  166|       |     * Get random data.  Include our DRBG address as
  167|       |     * additional input, in order to provide a distinction between
  168|       |     * different DRBG child instances.
  169|       |     *
  170|       |     * Note: using the sizeof() operator on a pointer triggers
  171|       |     *       a warning in some static code analyzers, but it's
  172|       |     *       intentional and correct here.
  173|       |     */
  174|  2.38k|    if (!ossl_prov_drbg_generate(drbg, buffer, bytes_needed,
  ------------------
  |  Branch (174:9): [True: 0, False: 2.38k]
  ------------------
  175|  2.38k|            drbg->strength, prediction_resistance,
  176|  2.38k|            (unsigned char *)&drbg, sizeof(drbg))) {
  177|      0|        OPENSSL_secure_clear_free(buffer, bytes_needed);
  ------------------
  |  |  150|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  178|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_GENERATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|        return 0;
  180|      0|    }
  181|  2.38k|    *pout = buffer;
  182|  2.38k|    return bytes_needed;
  183|  2.38k|}
ossl_drbg_clear_seed:
  188|  2.38k|{
  189|  2.38k|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  150|  2.38k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  190|  2.38k|}
ossl_prov_drbg_nonce_ctx_new:
  272|    809|{
  273|    809|    PROV_DRBG_NONCE_GLOBAL *dngbl = OPENSSL_zalloc(sizeof(*dngbl));
  ------------------
  |  |  109|    809|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  274|       |
  275|    809|    if (dngbl == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 809]
  ------------------
  276|      0|        return NULL;
  277|       |
  278|    809|    dngbl->rand_nonce_lock = CRYPTO_THREAD_lock_new();
  279|    809|    if (dngbl->rand_nonce_lock == NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 809]
  ------------------
  280|      0|        OPENSSL_free(dngbl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|      0|    }
  283|       |
  284|    809|    return dngbl;
  285|    809|}
ossl_prov_drbg_nonce_ctx_free:
  288|    808|{
  289|    808|    PROV_DRBG_NONCE_GLOBAL *dngbl = vdngbl;
  290|       |
  291|    808|    if (dngbl == NULL)
  ------------------
  |  Branch (291:9): [True: 0, False: 808]
  ------------------
  292|      0|        return;
  293|       |
  294|    808|    CRYPTO_THREAD_lock_free(dngbl->rand_nonce_lock);
  295|       |
  296|    808|    OPENSSL_free(dngbl);
  ------------------
  |  |  132|    808|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|    808|}
ossl_prov_drbg_instantiate:
  352|  1.78k|{
  353|  1.78k|    unsigned char *nonce = NULL, *entropy = NULL;
  354|  1.78k|    size_t noncelen = 0, entropylen = 0;
  355|  1.78k|    unsigned int min_entropy;
  356|  1.78k|    size_t min_entropylen, max_entropylen;
  357|       |
  358|  1.78k|    if (strength > drbg->strength) {
  ------------------
  |  Branch (358:9): [True: 0, False: 1.78k]
  ------------------
  359|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INSUFFICIENT_DRBG_STRENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  360|      0|        goto end;
  361|      0|    }
  362|  1.78k|    min_entropy = drbg->strength;
  363|  1.78k|    min_entropylen = drbg->min_entropylen;
  364|  1.78k|    max_entropylen = drbg->max_entropylen;
  365|       |
  366|  1.78k|    if (pers == NULL) {
  ------------------
  |  Branch (366:9): [True: 1.78k, False: 0]
  ------------------
  367|  1.78k|        pers = (const unsigned char *)ossl_pers_string;
  368|  1.78k|        perslen = sizeof(ossl_pers_string);
  369|  1.78k|    }
  370|  1.78k|    if (perslen > drbg->max_perslen) {
  ------------------
  |  Branch (370:9): [True: 0, False: 1.78k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PERSONALISATION_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        goto end;
  373|      0|    }
  374|       |
  375|  1.78k|    if (drbg->state != EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1249|  1.78k|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
  |  Branch (375:9): [True: 0, False: 1.78k]
  ------------------
  376|      0|        if (drbg->state == EVP_RAND_STATE_ERROR)
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  |  Branch (376:13): [True: 0, False: 0]
  ------------------
  377|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_IN_ERROR_STATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  378|      0|        else
  379|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_ALREADY_INSTANTIATED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  380|      0|        goto end;
  381|      0|    }
  382|       |
  383|  1.78k|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|  1.78k|#define EVP_RAND_STATE_ERROR 2
  ------------------
  384|       |
  385|  1.78k|    if (drbg->min_noncelen > 0) {
  ------------------
  |  Branch (385:9): [True: 1.78k, False: 0]
  ------------------
  386|  1.78k|        if (drbg->parent_nonce != NULL) {
  ------------------
  |  Branch (386:13): [True: 0, False: 1.78k]
  ------------------
  387|      0|            noncelen = drbg->parent_nonce(drbg->parent, NULL, drbg->strength,
  388|      0|                drbg->min_noncelen,
  389|      0|                drbg->max_noncelen);
  390|      0|            if (noncelen == 0) {
  ------------------
  |  Branch (390:17): [True: 0, False: 0]
  ------------------
  391|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_NONCE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  392|      0|                goto end;
  393|      0|            }
  394|      0|            nonce = OPENSSL_malloc(noncelen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  395|      0|            if (nonce == NULL) {
  ------------------
  |  Branch (395:17): [True: 0, False: 0]
  ------------------
  396|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_NONCE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  397|      0|                goto end;
  398|      0|            }
  399|      0|            if (noncelen != drbg->parent_nonce(drbg->parent, nonce, drbg->strength, drbg->min_noncelen, drbg->max_noncelen)) {
  ------------------
  |  Branch (399:17): [True: 0, False: 0]
  ------------------
  400|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_NONCE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  401|      0|                goto end;
  402|      0|            }
  403|      0|#ifndef PROV_RAND_GET_RANDOM_NONCE
  404|  1.78k|        } else if (drbg->parent != NULL) {
  ------------------
  |  Branch (404:20): [True: 1.78k, False: 0]
  ------------------
  405|  1.78k|#endif
  406|       |            /*
  407|       |             * NIST SP800-90Ar1 section 9.1 says you can combine getting
  408|       |             * the entropy and nonce in 1 call by increasing the entropy
  409|       |             * with 50% and increasing the minimum length to accommodate
  410|       |             * the length of the nonce. We do this in case a nonce is
  411|       |             * required and there is no parental nonce capability.
  412|       |             */
  413|  1.78k|            min_entropy += drbg->strength / 2;
  414|  1.78k|            min_entropylen += drbg->min_noncelen;
  415|  1.78k|            max_entropylen += drbg->max_noncelen;
  416|  1.78k|        }
  417|      0|#ifndef PROV_RAND_GET_RANDOM_NONCE
  418|      0|        else { /* parent == NULL */
  419|      0|            noncelen = prov_drbg_get_nonce(drbg, &nonce, drbg->min_noncelen,
  420|      0|                drbg->max_noncelen);
  421|      0|            if (noncelen < drbg->min_noncelen
  ------------------
  |  Branch (421:17): [True: 0, False: 0]
  ------------------
  422|      0|                || noncelen > drbg->max_noncelen) {
  ------------------
  |  Branch (422:20): [True: 0, False: 0]
  ------------------
  423|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_NONCE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  424|      0|                goto end;
  425|      0|            }
  426|      0|        }
  427|  1.78k|#endif
  428|  1.78k|    }
  429|       |
  430|  1.78k|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|  1.78k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  431|  1.78k|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (431:9): [True: 1.78k, False: 0]
  ------------------
  432|  1.78k|        drbg->reseed_next_counter++;
  433|  1.78k|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (433:13): [True: 0, False: 1.78k]
  ------------------
  434|      0|            drbg->reseed_next_counter = 1;
  435|  1.78k|    }
  436|       |
  437|  1.78k|    entropylen = get_entropy(drbg, &entropy, min_entropy,
  438|  1.78k|        min_entropylen, max_entropylen,
  439|  1.78k|        prediction_resistance);
  440|  1.78k|    if (entropylen < min_entropylen
  ------------------
  |  Branch (440:9): [True: 0, False: 1.78k]
  ------------------
  441|  1.78k|        || entropylen > max_entropylen) {
  ------------------
  |  Branch (441:12): [True: 0, False: 1.78k]
  ------------------
  442|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_ENTROPY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  443|      0|        goto end;
  444|      0|    }
  445|       |
  446|  1.78k|    if (!drbg->instantiate(drbg, entropy, entropylen, nonce, noncelen,
  ------------------
  |  Branch (446:9): [True: 0, False: 1.78k]
  ------------------
  447|  1.78k|            pers, perslen)) {
  448|      0|        cleanup_entropy(drbg, entropy, entropylen);
  449|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  450|      0|        goto end;
  451|      0|    }
  452|  1.78k|    cleanup_entropy(drbg, entropy, entropylen);
  453|       |
  454|  1.78k|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|  1.78k|#define EVP_RAND_STATE_READY 1
  ------------------
  455|  1.78k|    drbg->generate_counter = 1;
  456|  1.78k|    drbg->reseed_time = time(NULL);
  457|  1.78k|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|  1.78k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  458|       |
  459|  1.78k|end:
  460|  1.78k|    if (nonce != NULL)
  ------------------
  |  Branch (460:9): [True: 0, False: 1.78k]
  ------------------
  461|      0|        ossl_prov_cleanup_nonce(drbg->provctx, nonce, noncelen);
  462|  1.78k|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1250|  1.78k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (462:9): [True: 1.78k, False: 0]
  ------------------
  463|  1.78k|        return 1;
  464|      0|    return 0;
  465|  1.78k|}
ossl_prov_drbg_generate:
  625|  32.6k|{
  626|  32.6k|    int fork_id;
  627|  32.6k|    int reseed_required = 0;
  628|  32.6k|    int ret = 0;
  629|  32.6k|    time_t reseed_time_interval = drbg->reseed_time_interval;
  630|  32.6k|    time_t now = 0;
  631|       |
  632|  32.6k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (632:9): [True: 0, False: 32.6k]
  ------------------
  633|      0|        return 0;
  634|       |
  635|  32.6k|    fork_id = openssl_get_fork_id();
  636|       |
  637|  32.6k|    if (reseed_time_interval > 0)
  ------------------
  |  Branch (637:9): [True: 32.6k, False: 0]
  ------------------
  638|  32.6k|        now = time(NULL);
  639|       |
  640|  32.6k|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (640:9): [True: 2.38k, False: 30.2k]
  |  Branch (640:31): [True: 0, False: 2.38k]
  ------------------
  641|      0|        return 0;
  642|       |
  643|  32.6k|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1250|  32.6k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (643:9): [True: 0, False: 32.6k]
  ------------------
  644|       |        /* try to recover from previous errors */
  645|      0|        rand_drbg_restart(drbg);
  646|       |
  647|      0|        if (drbg->state == EVP_RAND_STATE_ERROR) {
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  |  Branch (647:13): [True: 0, False: 0]
  ------------------
  648|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_IN_ERROR_STATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  649|      0|            goto err;
  650|      0|        }
  651|      0|        if (drbg->state == EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1249|      0|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
  |  Branch (651:13): [True: 0, False: 0]
  ------------------
  652|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_NOT_INSTANTIATED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  653|      0|            goto err;
  654|      0|        }
  655|      0|    }
  656|  32.6k|    if (strength > drbg->strength) {
  ------------------
  |  Branch (656:9): [True: 0, False: 32.6k]
  ------------------
  657|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INSUFFICIENT_DRBG_STRENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  658|      0|        goto err;
  659|      0|    }
  660|       |
  661|  32.6k|    if (outlen > drbg->max_request) {
  ------------------
  |  Branch (661:9): [True: 0, False: 32.6k]
  ------------------
  662|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_REQUEST_TOO_LARGE_FOR_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  663|      0|        goto err;
  664|      0|    }
  665|  32.6k|    if (adinlen > drbg->max_adinlen) {
  ------------------
  |  Branch (665:9): [True: 0, False: 32.6k]
  ------------------
  666|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ADDITIONAL_INPUT_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  667|      0|        goto err;
  668|      0|    }
  669|       |
  670|  32.6k|    if (drbg->fork_id != fork_id) {
  ------------------
  |  Branch (670:9): [True: 0, False: 32.6k]
  ------------------
  671|      0|        drbg->fork_id = fork_id;
  672|      0|        reseed_required = 1;
  673|      0|    }
  674|       |
  675|  32.6k|    if (drbg->reseed_interval > 0) {
  ------------------
  |  Branch (675:9): [True: 32.6k, False: 0]
  ------------------
  676|  32.6k|        if (drbg->generate_counter >= drbg->reseed_interval)
  ------------------
  |  Branch (676:13): [True: 0, False: 32.6k]
  ------------------
  677|      0|            reseed_required = 1;
  678|  32.6k|    }
  679|  32.6k|    if (reseed_time_interval > 0) {
  ------------------
  |  Branch (679:9): [True: 32.6k, False: 0]
  ------------------
  680|  32.6k|        if (now < drbg->reseed_time
  ------------------
  |  Branch (680:13): [True: 0, False: 32.6k]
  ------------------
  681|  32.6k|            || now - drbg->reseed_time >= reseed_time_interval)
  ------------------
  |  Branch (681:16): [True: 0, False: 32.6k]
  ------------------
  682|      0|            reseed_required = 1;
  683|  32.6k|    }
  684|  32.6k|    if (drbg->parent != NULL
  ------------------
  |  Branch (684:9): [True: 32.6k, False: 0]
  ------------------
  685|  32.6k|        && get_parent_reseed_count(drbg) != drbg->parent_reseed_counter)
  ------------------
  |  Branch (685:12): [True: 1.19k, False: 31.4k]
  ------------------
  686|  1.19k|        reseed_required = 1;
  687|       |
  688|  32.6k|    if (reseed_required || prediction_resistance) {
  ------------------
  |  Branch (688:9): [True: 1.19k, False: 31.4k]
  |  Branch (688:28): [True: 0, False: 31.4k]
  ------------------
  689|  1.19k|        if (!ossl_prov_drbg_reseed_unlocked(drbg, prediction_resistance, NULL,
  ------------------
  |  Branch (689:13): [True: 0, False: 1.19k]
  ------------------
  690|  1.19k|                0, adin, adinlen)) {
  691|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_RESEED_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  692|      0|            goto err;
  693|      0|        }
  694|  1.19k|        adin = NULL;
  695|  1.19k|        adinlen = 0;
  696|  1.19k|    }
  697|       |
  698|  32.6k|    if (!drbg->generate(drbg, out, outlen, adin, adinlen)) {
  ------------------
  |  Branch (698:9): [True: 0, False: 32.6k]
  ------------------
  699|      0|        drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  700|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_GENERATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  701|      0|        goto err;
  702|      0|    }
  703|       |
  704|  32.6k|    drbg->generate_counter++;
  705|       |
  706|  32.6k|    ret = 1;
  707|  32.6k|err:
  708|  32.6k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (708:9): [True: 2.38k, False: 30.2k]
  ------------------
  709|  2.38k|        CRYPTO_THREAD_unlock(drbg->lock);
  710|       |
  711|  32.6k|    return ret;
  712|  32.6k|}
ossl_drbg_enable_locking:
  759|    596|{
  760|    596|    PROV_DRBG *drbg = vctx;
  761|       |
  762|    596|    if (drbg != NULL && drbg->lock == NULL) {
  ------------------
  |  Branch (762:9): [True: 596, False: 0]
  |  Branch (762:25): [True: 596, False: 0]
  ------------------
  763|    596|        if (drbg->parent_enable_locking != NULL)
  ------------------
  |  Branch (763:13): [True: 596, False: 0]
  ------------------
  764|    596|            if (!drbg->parent_enable_locking(drbg->parent)) {
  ------------------
  |  Branch (764:17): [True: 0, False: 596]
  ------------------
  765|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_LOCKING_NOT_ENABLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  766|      0|                return 0;
  767|      0|            }
  768|    596|        drbg->lock = CRYPTO_THREAD_lock_new();
  769|    596|        if (drbg->lock == NULL) {
  ------------------
  |  Branch (769:13): [True: 0, False: 596]
  ------------------
  770|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_CREATE_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  771|      0|            return 0;
  772|      0|        }
  773|    596|    }
  774|    596|    return 1;
  775|    596|}
ossl_rand_drbg_new:
  797|  1.78k|{
  798|  1.78k|    PROV_DRBG *drbg;
  799|  1.78k|    unsigned int p_str;
  800|  1.78k|    const OSSL_DISPATCH *pfunc;
  801|       |
  802|  1.78k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (802:9): [True: 0, False: 1.78k]
  ------------------
  803|      0|        return NULL;
  804|       |
  805|  1.78k|    drbg = OPENSSL_zalloc(sizeof(*drbg));
  ------------------
  |  |  109|  1.78k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  806|  1.78k|    if (drbg == NULL)
  ------------------
  |  Branch (806:9): [True: 0, False: 1.78k]
  ------------------
  807|      0|        return NULL;
  808|       |
  809|  1.78k|    drbg->provctx = provctx;
  810|  1.78k|    drbg->instantiate = instantiate;
  811|  1.78k|    drbg->uninstantiate = uninstantiate;
  812|  1.78k|    drbg->reseed = reseed;
  813|  1.78k|    drbg->generate = generate;
  814|  1.78k|    drbg->fork_id = openssl_get_fork_id();
  815|       |
  816|       |    /* Extract parent's functions */
  817|  1.78k|    drbg->parent = parent;
  818|  1.78k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_ENABLE_LOCKING)) != NULL)
  ------------------
  |  |  548|  1.78k|#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
  ------------------
  |  Branch (818:9): [True: 1.78k, False: 0]
  ------------------
  819|  1.78k|        drbg->parent_enable_locking = OSSL_FUNC_rand_enable_locking(pfunc);
  820|  1.78k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_LOCK)) != NULL)
  ------------------
  |  |  549|  1.78k|#define OSSL_FUNC_RAND_LOCK 9
  ------------------
  |  Branch (820:9): [True: 1.78k, False: 0]
  ------------------
  821|  1.78k|        drbg->parent_lock = OSSL_FUNC_rand_lock(pfunc);
  822|  1.78k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_UNLOCK)) != NULL)
  ------------------
  |  |  550|  1.78k|#define OSSL_FUNC_RAND_UNLOCK 10
  ------------------
  |  Branch (822:9): [True: 1.78k, False: 0]
  ------------------
  823|  1.78k|        drbg->parent_unlock = OSSL_FUNC_rand_unlock(pfunc);
  824|  1.78k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_CTX_PARAMS)) != NULL)
  ------------------
  |  |  555|  1.78k|#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
  ------------------
  |  Branch (824:9): [True: 1.78k, False: 0]
  ------------------
  825|  1.78k|        drbg->parent_get_ctx_params = OSSL_FUNC_rand_get_ctx_params(pfunc);
  826|  1.78k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_NONCE)) != NULL)
  ------------------
  |  |  547|  1.78k|#define OSSL_FUNC_RAND_NONCE 7
  ------------------
  |  Branch (826:9): [True: 0, False: 1.78k]
  ------------------
  827|      0|        drbg->parent_nonce = OSSL_FUNC_rand_nonce(pfunc);
  828|  1.78k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_SEED)) != NULL)
  ------------------
  |  |  558|  1.78k|#define OSSL_FUNC_RAND_GET_SEED 18
  ------------------
  |  Branch (828:9): [True: 1.78k, False: 0]
  ------------------
  829|  1.78k|        drbg->parent_get_seed = OSSL_FUNC_rand_get_seed(pfunc);
  830|  1.78k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_CLEAR_SEED)) != NULL)
  ------------------
  |  |  559|  1.78k|#define OSSL_FUNC_RAND_CLEAR_SEED 19
  ------------------
  |  Branch (830:9): [True: 1.78k, False: 0]
  ------------------
  831|  1.78k|        drbg->parent_clear_seed = OSSL_FUNC_rand_clear_seed(pfunc);
  832|       |
  833|       |    /* Set some default maximums up */
  834|  1.78k|    drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.78k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  835|  1.78k|    drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.78k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  836|  1.78k|    drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.78k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  837|  1.78k|    drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.78k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  838|  1.78k|    drbg->generate_counter = 1;
  839|  1.78k|    drbg->reseed_counter = 1;
  840|  1.78k|    drbg->reseed_interval = RESEED_INTERVAL;
  ------------------
  |  |   31|  1.78k|#define RESEED_INTERVAL (1 << 8)
  ------------------
  841|  1.78k|    drbg->reseed_time_interval = TIME_INTERVAL;
  ------------------
  |  |   32|  1.78k|#define TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  842|       |
  843|  1.78k|    if (!dnew(drbg))
  ------------------
  |  Branch (843:9): [True: 0, False: 1.78k]
  ------------------
  844|      0|        goto err;
  845|       |
  846|  1.78k|    if (parent != NULL) {
  ------------------
  |  Branch (846:9): [True: 1.78k, False: 0]
  ------------------
  847|  1.78k|        if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (847:13): [True: 0, False: 1.78k]
  ------------------
  848|      0|            goto err;
  849|  1.78k|        if (drbg->strength > p_str) {
  ------------------
  |  Branch (849:13): [True: 0, False: 1.78k]
  ------------------
  850|       |            /*
  851|       |             * We currently don't support the algorithm from NIST SP 800-90C
  852|       |             * 10.1.2 to use a weaker DRBG as source
  853|       |             */
  854|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_STRENGTH_TOO_WEAK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  855|      0|            goto err;
  856|      0|        }
  857|  1.78k|    }
  858|       |#ifdef TSAN_REQUIRES_LOCKING
  859|       |    if (!ossl_drbg_enable_locking(drbg))
  860|       |        goto err;
  861|       |#endif
  862|  1.78k|    return drbg;
  863|       |
  864|      0|err:
  865|      0|    dfree(drbg);
  866|       |    return NULL;
  867|  1.78k|}
ossl_rand_drbg_free:
  870|  1.78k|{
  871|  1.78k|    if (drbg == NULL)
  ------------------
  |  Branch (871:9): [True: 0, False: 1.78k]
  ------------------
  872|      0|        return;
  873|       |
  874|  1.78k|    CRYPTO_THREAD_lock_free(drbg->lock);
  875|  1.78k|    OPENSSL_free(drbg);
  ------------------
  |  |  132|  1.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  876|  1.78k|}
ossl_drbg_get_ctx_params:
  884|  11.1k|{
  885|  11.1k|    if (p->state != NULL && !OSSL_PARAM_set_int(p->state, drbg->state))
  ------------------
  |  Branch (885:9): [True: 7.55k, False: 3.57k]
  |  Branch (885:29): [True: 0, False: 7.55k]
  ------------------
  886|      0|        return 0;
  887|       |
  888|  11.1k|    if (p->str != NULL && !OSSL_PARAM_set_int(p->str, drbg->strength))
  ------------------
  |  Branch (888:9): [True: 3.57k, False: 7.55k]
  |  Branch (888:27): [True: 0, False: 3.57k]
  ------------------
  889|      0|        return 0;
  890|       |
  891|  11.1k|    if (p->minentlen != NULL
  ------------------
  |  Branch (891:9): [True: 0, False: 11.1k]
  ------------------
  892|      0|        && !OSSL_PARAM_set_size_t(p->minentlen, drbg->min_entropylen))
  ------------------
  |  Branch (892:12): [True: 0, False: 0]
  ------------------
  893|      0|        return 0;
  894|       |
  895|  11.1k|    if (p->maxentlen != NULL
  ------------------
  |  Branch (895:9): [True: 0, False: 11.1k]
  ------------------
  896|      0|        && !OSSL_PARAM_set_size_t(p->maxentlen, drbg->max_entropylen))
  ------------------
  |  Branch (896:12): [True: 0, False: 0]
  ------------------
  897|      0|        return 0;
  898|       |
  899|  11.1k|    if (p->minnonlen != NULL
  ------------------
  |  Branch (899:9): [True: 0, False: 11.1k]
  ------------------
  900|      0|        && !OSSL_PARAM_set_size_t(p->minnonlen, drbg->min_noncelen))
  ------------------
  |  Branch (900:12): [True: 0, False: 0]
  ------------------
  901|      0|        return 0;
  902|       |
  903|  11.1k|    if (p->maxnonlen != NULL
  ------------------
  |  Branch (903:9): [True: 0, False: 11.1k]
  ------------------
  904|      0|        && !OSSL_PARAM_set_size_t(p->maxnonlen, drbg->max_noncelen))
  ------------------
  |  Branch (904:12): [True: 0, False: 0]
  ------------------
  905|      0|        return 0;
  906|       |
  907|  11.1k|    if (p->maxperlen != NULL
  ------------------
  |  Branch (907:9): [True: 0, False: 11.1k]
  ------------------
  908|      0|        && !OSSL_PARAM_set_size_t(p->maxperlen, drbg->max_perslen))
  ------------------
  |  Branch (908:12): [True: 0, False: 0]
  ------------------
  909|      0|        return 0;
  910|       |
  911|  11.1k|    if (p->maxadlen != NULL
  ------------------
  |  Branch (911:9): [True: 0, False: 11.1k]
  ------------------
  912|      0|        && !OSSL_PARAM_set_size_t(p->maxadlen, drbg->max_adinlen))
  ------------------
  |  Branch (912:12): [True: 0, False: 0]
  ------------------
  913|      0|        return 0;
  914|       |
  915|  11.1k|    if (p->reseed_req != NULL
  ------------------
  |  Branch (915:9): [True: 0, False: 11.1k]
  ------------------
  916|      0|        && !OSSL_PARAM_set_uint(p->reseed_req, drbg->reseed_interval))
  ------------------
  |  Branch (916:12): [True: 0, False: 0]
  ------------------
  917|      0|        return 0;
  918|       |
  919|  11.1k|    if (p->reseed_time != NULL
  ------------------
  |  Branch (919:9): [True: 0, False: 11.1k]
  ------------------
  920|      0|        && !OSSL_PARAM_set_time_t(p->reseed_time, drbg->reseed_time))
  ------------------
  |  Branch (920:12): [True: 0, False: 0]
  ------------------
  921|      0|        return 0;
  922|       |
  923|  11.1k|    if (p->reseed_int != NULL
  ------------------
  |  Branch (923:9): [True: 0, False: 11.1k]
  ------------------
  924|      0|        && !OSSL_PARAM_set_time_t(p->reseed_int, drbg->reseed_time_interval))
  ------------------
  |  Branch (924:12): [True: 0, False: 0]
  ------------------
  925|      0|        return 0;
  926|       |
  927|  11.1k|    if (!OSSL_FIPS_IND_GET_CTX_FROM_PARAM(drbg, p->ind))
  ------------------
  |  |  161|  11.1k|#define OSSL_FIPS_IND_GET_CTX_FROM_PARAM(ctx, params) 1
  ------------------
  |  Branch (927:9): [Folded, False: 11.1k]
  ------------------
  928|      0|        return 0;
  929|       |
  930|  11.1k|    return 1;
  931|  11.1k|}
ossl_drbg_get_ctx_params_no_lock:
  940|  72.7k|{
  941|  72.7k|    size_t cnt = 0;
  942|       |
  943|       |    /* This value never changes once set */
  944|  72.7k|    if (p->maxreq != NULL) {
  ------------------
  |  Branch (944:9): [True: 30.2k, False: 42.5k]
  ------------------
  945|  30.2k|        if (!OSSL_PARAM_set_size_t(p->maxreq, drbg->max_request))
  ------------------
  |  Branch (945:13): [True: 0, False: 30.2k]
  ------------------
  946|      0|            return 0;
  947|  30.2k|        cnt++;
  948|  30.2k|    }
  949|       |
  950|       |    /*
  951|       |     * Can be changed by multiple threads, but we tolerate inaccuracies in this
  952|       |     * value.
  953|       |     */
  954|  72.7k|    if (p->reseed_cnt != NULL) {
  ------------------
  |  Branch (954:9): [True: 31.4k, False: 41.3k]
  ------------------
  955|  31.4k|        if (!OSSL_PARAM_set_uint(p->reseed_cnt, tsan_load(&drbg->reseed_counter)))
  ------------------
  |  |   61|  31.4k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (955:13): [True: 0, False: 31.4k]
  ------------------
  956|      0|            return 0;
  957|  31.4k|        cnt++;
  958|  31.4k|    }
  959|       |
  960|  72.7k|    if (params[cnt].key == NULL)
  ------------------
  |  Branch (960:9): [True: 61.6k, False: 11.1k]
  ------------------
  961|  61.6k|        *complete = 1;
  962|  11.1k|    else
  963|  11.1k|        *complete = 0;
  964|       |
  965|  72.7k|    return 1;
  966|  72.7k|}
ossl_drbg_set_ctx_params:
  970|  1.78k|{
  971|  1.78k|    if (p->reseed_req != NULL
  ------------------
  |  Branch (971:9): [True: 1.78k, False: 0]
  ------------------
  972|  1.78k|        && !OSSL_PARAM_get_uint(p->reseed_req, &drbg->reseed_interval))
  ------------------
  |  Branch (972:12): [True: 0, False: 1.78k]
  ------------------
  973|      0|        return 0;
  974|       |
  975|  1.78k|    if (p->reseed_time != NULL
  ------------------
  |  Branch (975:9): [True: 1.78k, False: 0]
  ------------------
  976|  1.78k|        && !OSSL_PARAM_get_time_t(p->reseed_time, &drbg->reseed_time_interval))
  ------------------
  |  Branch (976:12): [True: 0, False: 1.78k]
  ------------------
  977|      0|        return 0;
  978|       |
  979|  1.78k|    return 1;
  980|  1.78k|}
drbg.c:get_entropy:
  195|  2.98k|{
  196|  2.98k|    size_t bytes;
  197|  2.98k|    unsigned int p_str;
  198|       |
  199|  2.98k|    if (drbg->parent == NULL)
  ------------------
  |  Branch (199:9): [True: 0, False: 2.98k]
  ------------------
  200|       |        /*
  201|       |         * In normal use (i.e. OpenSSL's own uses), this is never called.
  202|       |         * This remains purely for legacy reasons.
  203|       |         */
  204|      0|        return ossl_prov_get_entropy(drbg->provctx, pout, entropy, min_len,
  205|      0|            max_len);
  206|       |
  207|  2.98k|    if (drbg->parent_get_seed == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 2.98k]
  ------------------
  208|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_CANNOT_SUPPLY_ENTROPY_SEED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  209|      0|        return 0;
  210|      0|    }
  211|  2.98k|    if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (211:9): [True: 0, False: 2.98k]
  ------------------
  212|      0|        return 0;
  213|  2.98k|    if (drbg->strength > p_str) {
  ------------------
  |  Branch (213:9): [True: 0, False: 2.98k]
  ------------------
  214|       |        /*
  215|       |         * We currently don't support the algorithm from NIST SP 800-90C
  216|       |         * 10.1.2 to use a weaker DRBG as source
  217|       |         */
  218|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_STRENGTH_TOO_WEAK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  219|      0|        return 0;
  220|      0|    }
  221|       |
  222|       |    /*
  223|       |     * Our lock is already held, but we need to lock our parent before
  224|       |     * generating bits from it.  Note: taking the lock will be a no-op
  225|       |     * if locking is not required (while drbg->parent->lock == NULL).
  226|       |     */
  227|  2.98k|    if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (227:9): [True: 0, False: 2.98k]
  ------------------
  228|      0|        return 0;
  229|       |    /*
  230|       |     * Get random data from parent.  Include our DRBG address as
  231|       |     * additional input, in order to provide a distinction between
  232|       |     * different DRBG child instances.
  233|       |     *
  234|       |     * Note: using the sizeof() operator on a pointer triggers
  235|       |     *       a warning in some static code analyzers, but it's
  236|       |     *       intentional and correct here.
  237|       |     */
  238|  2.98k|    bytes = drbg->parent_get_seed(drbg->parent, pout,
  239|  2.98k|        entropy > 0 ? entropy : (int)drbg->strength,
  ------------------
  |  Branch (239:9): [True: 2.98k, False: 0]
  ------------------
  240|  2.98k|        min_len, max_len, prediction_resistance,
  241|  2.98k|        (unsigned char *)&drbg, sizeof(drbg));
  242|  2.98k|    ossl_drbg_unlock_parent(drbg);
  243|  2.98k|    return bytes;
  244|  2.98k|}
drbg.c:ossl_drbg_lock_parent:
   64|  44.5k|{
   65|  44.5k|    void *parent = drbg->parent;
   66|       |
   67|  44.5k|    if (parent != NULL
  ------------------
  |  Branch (67:9): [True: 44.5k, False: 0]
  ------------------
   68|  44.5k|        && drbg->parent_lock != NULL
  ------------------
  |  Branch (68:12): [True: 44.5k, False: 0]
  ------------------
   69|  44.5k|        && !drbg->parent_lock(parent)) {
  ------------------
  |  Branch (69:12): [True: 0, False: 44.5k]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_LOCKING_NOT_ENABLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|  44.5k|    return 1;
   74|  44.5k|}
drbg.c:ossl_drbg_unlock_parent:
   77|  44.5k|{
   78|  44.5k|    void *parent = drbg->parent;
   79|       |
   80|  44.5k|    if (parent != NULL && drbg->parent_unlock != NULL)
  ------------------
  |  Branch (80:9): [True: 44.5k, False: 0]
  |  Branch (80:27): [True: 44.5k, False: 0]
  ------------------
   81|  44.5k|        drbg->parent_unlock(parent);
   82|  44.5k|}
drbg.c:cleanup_entropy:
  247|  2.98k|{
  248|  2.98k|    if (drbg->parent == NULL) {
  ------------------
  |  Branch (248:9): [True: 0, False: 2.98k]
  ------------------
  249|      0|        ossl_prov_cleanup_entropy(drbg->provctx, out, outlen);
  250|  2.98k|    } else if (drbg->parent_clear_seed != NULL) {
  ------------------
  |  Branch (250:16): [True: 2.98k, False: 0]
  ------------------
  251|  2.98k|        if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (251:13): [True: 0, False: 2.98k]
  ------------------
  252|      0|            return;
  253|  2.98k|        drbg->parent_clear_seed(drbg->parent, out, outlen);
  254|  2.98k|        ossl_drbg_unlock_parent(drbg);
  255|  2.98k|    }
  256|  2.98k|}
drbg.c:ossl_prov_drbg_reseed_unlocked:
  486|  1.19k|{
  487|  1.19k|    unsigned char *entropy = NULL;
  488|  1.19k|    size_t entropylen = 0;
  489|       |
  490|  1.19k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (490:9): [True: 0, False: 1.19k]
  ------------------
  491|      0|        return 0;
  492|       |
  493|  1.19k|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1250|  1.19k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (493:9): [True: 0, False: 1.19k]
  ------------------
  494|       |        /* try to recover from previous errors */
  495|      0|        rand_drbg_restart(drbg);
  496|       |
  497|      0|        if (drbg->state == EVP_RAND_STATE_ERROR) {
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  |  Branch (497:13): [True: 0, False: 0]
  ------------------
  498|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_IN_ERROR_STATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|      0|            return 0;
  500|      0|        }
  501|      0|        if (drbg->state == EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1249|      0|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
  |  Branch (501:13): [True: 0, False: 0]
  ------------------
  502|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_NOT_INSTANTIATED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  503|      0|            return 0;
  504|      0|        }
  505|      0|    }
  506|       |
  507|  1.19k|    if (ent != NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 1.19k]
  ------------------
  508|      0|        if (ent_len < drbg->min_entropylen) {
  ------------------
  |  Branch (508:13): [True: 0, False: 0]
  ------------------
  509|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ENTROPY_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  510|      0|            drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  511|      0|            return 0;
  512|      0|        }
  513|      0|        if (ent_len > drbg->max_entropylen) {
  ------------------
  |  Branch (513:13): [True: 0, False: 0]
  ------------------
  514|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ENTROPY_INPUT_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  515|      0|            drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  516|      0|            return 0;
  517|      0|        }
  518|      0|    }
  519|       |
  520|  1.19k|    if (adin == NULL) {
  ------------------
  |  Branch (520:9): [True: 1.19k, False: 0]
  ------------------
  521|  1.19k|        adinlen = 0;
  522|  1.19k|    } else if (adinlen > drbg->max_adinlen) {
  ------------------
  |  Branch (522:16): [True: 0, False: 0]
  ------------------
  523|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ADDITIONAL_INPUT_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  524|      0|        return 0;
  525|      0|    }
  526|       |
  527|  1.19k|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|  1.19k|#define EVP_RAND_STATE_ERROR 2
  ------------------
  528|       |
  529|  1.19k|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|  1.19k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  530|  1.19k|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (530:9): [True: 1.19k, False: 0]
  ------------------
  531|  1.19k|        drbg->reseed_next_counter++;
  532|  1.19k|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (532:13): [True: 0, False: 1.19k]
  ------------------
  533|      0|            drbg->reseed_next_counter = 1;
  534|  1.19k|    }
  535|       |
  536|  1.19k|    if (ent != NULL) {
  ------------------
  |  Branch (536:9): [True: 0, False: 1.19k]
  ------------------
  537|       |#ifdef FIPS_MODULE
  538|       |        /*
  539|       |         * NIST SP-800-90A mandates that entropy *shall not* be provided
  540|       |         * by the consuming application. Instead the data is added as additional
  541|       |         * input.
  542|       |         *
  543|       |         * (NIST SP-800-90Ar1, Sections 9.1 and 9.2)
  544|       |         */
  545|       |        if (!drbg->reseed(drbg, NULL, 0, ent, ent_len)) {
  546|       |            ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_RESEED);
  547|       |            return 0;
  548|       |        }
  549|       |#else
  550|      0|        if (!drbg->reseed(drbg, ent, ent_len, adin, adinlen)) {
  ------------------
  |  Branch (550:13): [True: 0, False: 0]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_RESEED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            return 0;
  553|      0|        }
  554|       |        /* There isn't much point adding the same additional input twice */
  555|      0|        adin = NULL;
  556|      0|        adinlen = 0;
  557|      0|#endif
  558|      0|    }
  559|       |
  560|       |    /* Reseed using our sources in addition */
  561|  1.19k|    entropylen = get_entropy(drbg, &entropy, drbg->strength,
  562|  1.19k|        drbg->min_entropylen, drbg->max_entropylen,
  563|  1.19k|        prediction_resistance);
  564|  1.19k|    if (entropylen < drbg->min_entropylen
  ------------------
  |  Branch (564:9): [True: 0, False: 1.19k]
  ------------------
  565|  1.19k|        || entropylen > drbg->max_entropylen) {
  ------------------
  |  Branch (565:12): [True: 0, False: 1.19k]
  ------------------
  566|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_ENTROPY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  567|      0|        goto end;
  568|      0|    }
  569|       |
  570|  1.19k|    if (!drbg->reseed(drbg, entropy, entropylen, adin, adinlen))
  ------------------
  |  Branch (570:9): [True: 0, False: 1.19k]
  ------------------
  571|      0|        goto end;
  572|       |
  573|  1.19k|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|  1.19k|#define EVP_RAND_STATE_READY 1
  ------------------
  574|  1.19k|    drbg->generate_counter = 1;
  575|  1.19k|    drbg->reseed_time = time(NULL);
  576|  1.19k|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|  1.19k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  577|  1.19k|    if (drbg->parent != NULL)
  ------------------
  |  Branch (577:9): [True: 1.19k, False: 0]
  ------------------
  578|  1.19k|        drbg->parent_reseed_counter = get_parent_reseed_count(drbg);
  579|       |
  580|  1.19k|end:
  581|  1.19k|    cleanup_entropy(drbg, entropy, entropylen);
  582|  1.19k|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1250|  1.19k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (582:9): [True: 1.19k, False: 0]
  ------------------
  583|  1.19k|        return 1;
  584|      0|    return 0;
  585|  1.19k|}
drbg.c:get_parent_reseed_count:
  110|  33.8k|{
  111|  33.8k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  33.8k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  33.8k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  112|  33.8k|    void *parent = drbg->parent;
  113|  33.8k|    unsigned int r = 0;
  114|       |
  115|  33.8k|    *params = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_COUNTER, &r);
  ------------------
  |  |  254|  33.8k|# define OSSL_DRBG_PARAM_RESEED_COUNTER "reseed_counter"
  ------------------
  116|  33.8k|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (116:9): [True: 0, False: 33.8k]
  ------------------
  117|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_LOCK_PARENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  118|      0|        goto err;
  119|      0|    }
  120|  33.8k|    if (!drbg->parent_get_ctx_params(parent, params))
  ------------------
  |  Branch (120:9): [True: 0, False: 33.8k]
  ------------------
  121|      0|        r = 0;
  122|  33.8k|    ossl_drbg_unlock_parent(drbg);
  123|  33.8k|    return r;
  124|       |
  125|      0|err:
  126|      0|    r = tsan_load(&drbg->reseed_counter) - 2;
  ------------------
  |  |   61|      0|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  127|      0|    if (r == 0)
  ------------------
  |  Branch (127:9): [True: 0, False: 0]
  ------------------
  128|      0|        r = UINT_MAX;
  129|      0|    return r;
  130|  33.8k|}
drbg.c:find_call:
  748|  12.5k|{
  749|  12.5k|    if (dispatch != NULL)
  ------------------
  |  Branch (749:9): [True: 12.5k, False: 0]
  ------------------
  750|   147k|        while (dispatch->function_id != 0) {
  ------------------
  |  Branch (750:16): [True: 145k, False: 1.78k]
  ------------------
  751|   145k|            if (dispatch->function_id == function)
  ------------------
  |  Branch (751:17): [True: 10.7k, False: 134k]
  ------------------
  752|  10.7k|                return dispatch;
  753|   134k|            dispatch++;
  754|   134k|        }
  755|  1.78k|    return NULL;
  756|  12.5k|}
drbg.c:get_parent_strength:
   85|  4.76k|{
   86|  4.76k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.76k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.76k|    { NULL, 0, NULL, 0, 0 }
  ------------------
   87|  4.76k|    void *parent = drbg->parent;
   88|  4.76k|    int res;
   89|       |
   90|  4.76k|    if (drbg->parent_get_ctx_params == NULL) {
  ------------------
  |  Branch (90:9): [True: 0, False: 4.76k]
  ------------------
   91|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   92|      0|        return 0;
   93|      0|    }
   94|       |
   95|  4.76k|    *params = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_STRENGTH, str);
  ------------------
  |  |  553|  4.76k|# define OSSL_RAND_PARAM_STRENGTH "strength"
  ------------------
   96|  4.76k|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (96:9): [True: 0, False: 4.76k]
  ------------------
   97|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_LOCK_PARENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|        return 0;
   99|      0|    }
  100|  4.76k|    res = drbg->parent_get_ctx_params(parent, params);
  101|  4.76k|    ossl_drbg_unlock_parent(drbg);
  102|  4.76k|    if (!res) {
  ------------------
  |  Branch (102:9): [True: 0, False: 4.76k]
  ------------------
  103|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  104|      0|        return 0;
  105|      0|    }
  106|  4.76k|    return 1;
  107|  4.76k|}

drbg_ctr.c:drbg_ctr_new_wrapper:
  649|  1.78k|{
  650|       |#ifdef FIPS_MODULE
  651|       |    if (!ossl_deferred_self_test(PROV_LIBCTX_OF(provctx),
  652|       |            ST_ID_DRBG_CTR))
  653|       |        return NULL;
  654|       |#endif
  655|       |
  656|  1.78k|    return ossl_rand_drbg_new(provctx, parent, parent_dispatch,
  657|  1.78k|        &drbg_ctr_new, &drbg_ctr_free,
  658|  1.78k|        &drbg_ctr_instantiate, &drbg_ctr_uninstantiate,
  659|  1.78k|        &drbg_ctr_reseed, &drbg_ctr_generate);
  660|  1.78k|}
drbg_ctr.c:drbg_ctr_new:
  634|  1.78k|{
  635|  1.78k|    PROV_DRBG_CTR *ctr;
  636|       |
  637|  1.78k|    ctr = OPENSSL_secure_zalloc(sizeof(*ctr));
  ------------------
  |  |  142|  1.78k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  638|  1.78k|    if (ctr == NULL)
  ------------------
  |  Branch (638:9): [True: 0, False: 1.78k]
  ------------------
  639|      0|        return 0;
  640|       |
  641|  1.78k|    ctr->use_df = 1;
  642|  1.78k|    drbg->data = ctr;
  643|  1.78k|    OSSL_FIPS_IND_INIT(drbg)
  644|  1.78k|    return drbg_ctr_init_lengths(drbg);
  645|  1.78k|}
drbg_ctr.c:drbg_ctr_init_lengths:
  540|  3.57k|{
  541|  3.57k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  542|  3.57k|    int res = 1;
  543|       |
  544|       |    /* Maximum number of bits per request = 2^19  = 2^16 bytes */
  545|  3.57k|    drbg->max_request = 1 << 16;
  546|  3.57k|    if (ctr->use_df) {
  ------------------
  |  Branch (546:9): [True: 3.57k, False: 0]
  ------------------
  547|  3.57k|        drbg->min_entropylen = 0;
  548|  3.57k|        drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.57k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  549|  3.57k|        drbg->min_noncelen = 0;
  550|  3.57k|        drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.57k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  551|  3.57k|        drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.57k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  552|  3.57k|        drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.57k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  553|       |
  554|  3.57k|        if (ctr->keylen > 0) {
  ------------------
  |  Branch (554:13): [True: 1.78k, False: 1.78k]
  ------------------
  555|  1.78k|            drbg->min_entropylen = ctr->keylen;
  556|  1.78k|            drbg->min_noncelen = drbg->min_entropylen / 2;
  557|  1.78k|        }
  558|  3.57k|    } else {
  559|      0|        const size_t len = ctr->keylen > 0 ? drbg->seedlen : DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      0|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  |  Branch (559:28): [True: 0, False: 0]
  ------------------
  560|       |
  561|      0|        drbg->min_entropylen = len;
  562|      0|        drbg->max_entropylen = len;
  563|       |        /* Nonce not used */
  564|      0|        drbg->min_noncelen = 0;
  565|      0|        drbg->max_noncelen = 0;
  566|      0|        drbg->max_perslen = len;
  567|      0|        drbg->max_adinlen = len;
  568|      0|    }
  569|  3.57k|    return res;
  570|  3.57k|}
drbg_ctr.c:drbg_ctr_instantiate:
  323|  1.78k|{
  324|  1.78k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  325|       |
  326|  1.78k|    if (entropy == NULL)
  ------------------
  |  Branch (326:9): [True: 0, False: 1.78k]
  ------------------
  327|      0|        return 0;
  328|       |
  329|  1.78k|    memset(ctr->K, 0, sizeof(ctr->K));
  330|  1.78k|    memset(ctr->V, 0, sizeof(ctr->V));
  331|  1.78k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (331:9): [True: 0, False: 1.78k]
  ------------------
  332|      0|        return 0;
  333|       |
  334|  1.78k|    inc_128(ctr);
  335|  1.78k|    if (!ctr_update(drbg, entropy, entropylen, pers, perslen, nonce, noncelen))
  ------------------
  |  Branch (335:9): [True: 0, False: 1.78k]
  ------------------
  336|      0|        return 0;
  337|  1.78k|    return 1;
  338|  1.78k|}
drbg_ctr.c:inc_128:
   72|   113k|{
   73|   113k|    unsigned char *p = &ctr->V[0];
   74|   113k|    u32 n = 16, c = 1;
   75|       |
   76|  1.82M|    do {
   77|  1.82M|        --n;
   78|  1.82M|        c += p[n];
   79|  1.82M|        p[n] = (u8)c;
   80|  1.82M|        c >>= 8;
   81|  1.82M|    } while (n);
  ------------------
  |  Branch (81:14): [True: 1.70M, False: 113k]
  ------------------
   82|   113k|}
drbg_ctr.c:ctr_update:
  277|  37.9k|{
  278|  37.9k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  279|  37.9k|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  37.9k|#define AES_BLOCK_SIZE 16
  ------------------
  280|  37.9k|    unsigned char V_tmp[48], out[48];
  281|  37.9k|    unsigned char len;
  282|       |
  283|       |    /* correct key is already set up. */
  284|  37.9k|    memcpy(V_tmp, ctr->V, 16);
  285|  37.9k|    inc_128(ctr);
  286|  37.9k|    memcpy(V_tmp + 16, ctr->V, 16);
  287|  37.9k|    if (ctr->keylen == 16) {
  ------------------
  |  Branch (287:9): [True: 0, False: 37.9k]
  ------------------
  288|      0|        len = 32;
  289|  37.9k|    } else {
  290|  37.9k|        inc_128(ctr);
  291|  37.9k|        memcpy(V_tmp + 32, ctr->V, 16);
  292|  37.9k|        len = 48;
  293|  37.9k|    }
  294|  37.9k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, out, &outlen, V_tmp, len)
  ------------------
  |  Branch (294:9): [True: 0, False: 37.9k]
  ------------------
  295|  37.9k|        || outlen != len)
  ------------------
  |  Branch (295:12): [True: 0, False: 37.9k]
  ------------------
  296|      0|        return 0;
  297|  37.9k|    memcpy(ctr->K, out, ctr->keylen);
  298|  37.9k|    memcpy(ctr->V, out + ctr->keylen, 16);
  299|       |
  300|  37.9k|    if (ctr->use_df) {
  ------------------
  |  Branch (300:9): [True: 37.9k, False: 0]
  ------------------
  301|       |        /* If no input reuse existing derived value */
  302|  37.9k|        if (in1 != NULL || nonce != NULL || in2 != NULL)
  ------------------
  |  Branch (302:13): [True: 5.36k, False: 32.6k]
  |  Branch (302:28): [True: 0, False: 32.6k]
  |  Branch (302:45): [True: 0, False: 32.6k]
  ------------------
  303|  5.36k|            if (!ctr_df(ctr, in1, in1len, nonce, noncelen, in2, in2len))
  ------------------
  |  Branch (303:17): [True: 0, False: 5.36k]
  ------------------
  304|      0|                return 0;
  305|       |        /* If this a reuse input in1len != 0 */
  306|  37.9k|        if (in1len)
  ------------------
  |  Branch (306:13): [True: 7.74k, False: 30.2k]
  ------------------
  307|  7.74k|            ctr_XOR(ctr, ctr->KX, drbg->seedlen);
  308|  37.9k|    } else {
  309|      0|        ctr_XOR(ctr, in1, in1len);
  310|      0|        ctr_XOR(ctr, in2, in2len);
  311|      0|    }
  312|       |
  313|  37.9k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1)
  ------------------
  |  Branch (313:9): [True: 0, False: 37.9k]
  ------------------
  314|  37.9k|        || !EVP_CipherInit_ex(ctr->ctx_ctr, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (314:12): [True: 0, False: 37.9k]
  ------------------
  315|      0|        return 0;
  316|  37.9k|    return 1;
  317|  37.9k|}
drbg_ctr.c:ctr_df:
  214|  5.36k|{
  215|  5.36k|    static unsigned char c80 = 0x80;
  216|  5.36k|    size_t inlen;
  217|  5.36k|    unsigned char *p = ctr->bltmp;
  218|  5.36k|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  219|       |
  220|  5.36k|    if (!ctr_BCC_init(ctr))
  ------------------
  |  Branch (220:9): [True: 0, False: 5.36k]
  ------------------
  221|      0|        return 0;
  222|  5.36k|    if (in1 == NULL)
  ------------------
  |  Branch (222:9): [True: 0, False: 5.36k]
  ------------------
  223|      0|        in1len = 0;
  224|  5.36k|    if (in2 == NULL)
  ------------------
  |  Branch (224:9): [True: 5.36k, False: 0]
  ------------------
  225|  5.36k|        in2len = 0;
  226|  5.36k|    if (in3 == NULL)
  ------------------
  |  Branch (226:9): [True: 3.57k, False: 1.78k]
  ------------------
  227|  3.57k|        in3len = 0;
  228|  5.36k|    inlen = in1len + in2len + in3len;
  229|       |    /* Initialise L||N in temporary block */
  230|  5.36k|    *p++ = (inlen >> 24) & 0xff;
  231|  5.36k|    *p++ = (inlen >> 16) & 0xff;
  232|  5.36k|    *p++ = (inlen >> 8) & 0xff;
  233|  5.36k|    *p++ = inlen & 0xff;
  234|       |
  235|       |    /* NB keylen is at most 32 bytes */
  236|  5.36k|    *p++ = 0;
  237|  5.36k|    *p++ = 0;
  238|  5.36k|    *p++ = 0;
  239|  5.36k|    *p = (unsigned char)((ctr->keylen + 16) & 0xff);
  240|  5.36k|    ctr->bltmp_pos = 8;
  241|  5.36k|    if (!ctr_BCC_update(ctr, in1, in1len)
  ------------------
  |  Branch (241:9): [True: 0, False: 5.36k]
  ------------------
  242|  5.36k|        || !ctr_BCC_update(ctr, in2, in2len)
  ------------------
  |  Branch (242:12): [True: 0, False: 5.36k]
  ------------------
  243|  5.36k|        || !ctr_BCC_update(ctr, in3, in3len)
  ------------------
  |  Branch (243:12): [True: 0, False: 5.36k]
  ------------------
  244|  5.36k|        || !ctr_BCC_update(ctr, &c80, 1)
  ------------------
  |  Branch (244:12): [True: 0, False: 5.36k]
  ------------------
  245|  5.36k|        || !ctr_BCC_final(ctr))
  ------------------
  |  Branch (245:12): [True: 0, False: 5.36k]
  ------------------
  246|      0|        return 0;
  247|       |    /* Set up key K */
  248|  5.36k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->KX, NULL, -1))
  ------------------
  |  Branch (248:9): [True: 0, False: 5.36k]
  ------------------
  249|      0|        return 0;
  250|       |    /* X follows key K */
  251|  5.36k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX, &outlen, ctr->KX + ctr->keylen,
  ------------------
  |  Branch (251:9): [True: 0, False: 5.36k]
  ------------------
  252|  5.36k|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  253|  5.36k|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (253:12): [True: 0, False: 5.36k]
  ------------------
  254|      0|        return 0;
  255|  5.36k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 16, &outlen, ctr->KX,
  ------------------
  |  Branch (255:9): [True: 0, False: 5.36k]
  ------------------
  256|  5.36k|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  257|  5.36k|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (257:12): [True: 0, False: 5.36k]
  ------------------
  258|      0|        return 0;
  259|  5.36k|    if (ctr->keylen != 16)
  ------------------
  |  Branch (259:9): [True: 5.36k, False: 0]
  ------------------
  260|  5.36k|        if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 32, &outlen,
  ------------------
  |  Branch (260:13): [True: 0, False: 5.36k]
  ------------------
  261|  5.36k|                ctr->KX + 16, AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  262|  5.36k|            || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (262:16): [True: 0, False: 5.36k]
  ------------------
  263|      0|            return 0;
  264|  5.36k|    return 1;
  265|  5.36k|}
drbg_ctr.c:ctr_BCC_init:
  151|  5.36k|{
  152|  5.36k|    unsigned char bltmp[48] = { 0 };
  153|  5.36k|    unsigned char num_of_blk;
  154|       |
  155|  5.36k|    memset(ctr->KX, 0, 48);
  156|  5.36k|    num_of_blk = ctr->keylen == 16 ? 2 : 3;
  ------------------
  |  Branch (156:18): [True: 0, False: 5.36k]
  ------------------
  157|  5.36k|    bltmp[(AES_BLOCK_SIZE * 1) + 3] = 1;
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  158|  5.36k|    bltmp[(AES_BLOCK_SIZE * 2) + 3] = 2;
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  159|  5.36k|    return ctr_BCC_block(ctr, ctr->KX, bltmp, num_of_blk * AES_BLOCK_SIZE);
  ------------------
  |  |   26|  5.36k|#define AES_BLOCK_SIZE 16
  ------------------
  160|  5.36k|}
drbg_ctr.c:ctr_BCC_block:
  117|  24.4k|{
  118|  24.4k|    int i, outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  24.4k|#define AES_BLOCK_SIZE 16
  ------------------
  119|       |
  120|  1.19M|    for (i = 0; i < len; i++)
  ------------------
  |  Branch (120:17): [True: 1.17M, False: 24.4k]
  ------------------
  121|  1.17M|        out[i] ^= in[i];
  122|       |
  123|  24.4k|    if (!EVP_CipherUpdate(ctr->ctx_df, out, &outlen, out, len)
  ------------------
  |  Branch (123:9): [True: 0, False: 24.4k]
  ------------------
  124|  24.4k|        || outlen != len)
  ------------------
  |  Branch (124:12): [True: 0, False: 24.4k]
  ------------------
  125|      0|        return 0;
  126|  24.4k|    return 1;
  127|  24.4k|}
drbg_ctr.c:ctr_BCC_update:
  167|  21.4k|{
  168|  21.4k|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (168:9): [True: 8.94k, False: 12.5k]
  |  Branch (168:23): [True: 0, False: 12.5k]
  ------------------
  169|  8.94k|        return 1;
  170|       |
  171|       |    /* If we have partial block handle it first */
  172|  12.5k|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (172:9): [True: 10.1k, False: 2.38k]
  ------------------
  173|  10.1k|        size_t left = 16 - ctr->bltmp_pos;
  174|       |
  175|       |        /* If we now have a complete block process it */
  176|  10.1k|        if (inlen >= left) {
  ------------------
  |  Branch (176:13): [True: 7.15k, False: 2.98k]
  ------------------
  177|  7.15k|            memcpy(ctr->bltmp + ctr->bltmp_pos, in, left);
  178|  7.15k|            if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (178:17): [True: 0, False: 7.15k]
  ------------------
  179|      0|                return 0;
  180|  7.15k|            ctr->bltmp_pos = 0;
  181|  7.15k|            inlen -= left;
  182|  7.15k|            in += left;
  183|  7.15k|        }
  184|  10.1k|    }
  185|       |
  186|       |    /* Process zero or more complete blocks */
  187|  19.0k|    for (; inlen >= 16; in += 16, inlen -= 16) {
  ------------------
  |  Branch (187:12): [True: 6.55k, False: 12.5k]
  ------------------
  188|  6.55k|        if (!ctr_BCC_blocks(ctr, in))
  ------------------
  |  Branch (188:13): [True: 0, False: 6.55k]
  ------------------
  189|      0|            return 0;
  190|  6.55k|    }
  191|       |
  192|       |    /* Copy any remaining partial block to the temporary buffer */
  193|  12.5k|    if (inlen > 0) {
  ------------------
  |  Branch (193:9): [True: 10.1k, False: 2.38k]
  ------------------
  194|  10.1k|        memcpy(ctr->bltmp + ctr->bltmp_pos, in, inlen);
  195|  10.1k|        ctr->bltmp_pos += inlen;
  196|  10.1k|    }
  197|  12.5k|    return 1;
  198|  12.5k|}
drbg_ctr.c:ctr_BCC_blocks:
  133|  19.0k|{
  134|  19.0k|    unsigned char in_tmp[48];
  135|  19.0k|    unsigned char num_of_blk = 2;
  136|       |
  137|  19.0k|    memcpy(in_tmp, in, 16);
  138|  19.0k|    memcpy(in_tmp + 16, in, 16);
  139|  19.0k|    if (ctr->keylen != 16) {
  ------------------
  |  Branch (139:9): [True: 19.0k, False: 0]
  ------------------
  140|  19.0k|        memcpy(in_tmp + 32, in, 16);
  141|  19.0k|        num_of_blk = 3;
  142|  19.0k|    }
  143|  19.0k|    return ctr_BCC_block(ctr, ctr->KX, in_tmp, AES_BLOCK_SIZE * num_of_blk);
  ------------------
  |  |   26|  19.0k|#define AES_BLOCK_SIZE 16
  ------------------
  144|  19.0k|}
drbg_ctr.c:ctr_BCC_final:
  201|  5.36k|{
  202|  5.36k|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (202:9): [True: 5.36k, False: 0]
  ------------------
  203|  5.36k|        memset(ctr->bltmp + ctr->bltmp_pos, 0, 16 - ctr->bltmp_pos);
  204|  5.36k|        if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (204:13): [True: 0, False: 5.36k]
  ------------------
  205|      0|            return 0;
  206|  5.36k|    }
  207|  5.36k|    return 1;
  208|  5.36k|}
drbg_ctr.c:ctr_XOR:
   85|  7.74k|{
   86|  7.74k|    size_t i, n;
   87|       |
   88|  7.74k|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (88:9): [True: 0, False: 7.74k]
  |  Branch (88:23): [True: 0, False: 7.74k]
  ------------------
   89|      0|        return;
   90|       |
   91|       |    /*
   92|       |     * Any zero padding will have no effect on the result as we
   93|       |     * are XORing. So just process however much input we have.
   94|       |     */
   95|  7.74k|    n = inlen < ctr->keylen ? inlen : ctr->keylen;
  ------------------
  |  Branch (95:9): [True: 0, False: 7.74k]
  ------------------
   96|  7.74k|    if (!ossl_assert(n <= sizeof(ctr->K)))
  ------------------
  |  |   52|  7.74k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.74k|    __FILE__, __LINE__)
  ------------------
  |  Branch (96:9): [True: 0, False: 7.74k]
  ------------------
   97|      0|        return;
   98|   255k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (98:17): [True: 247k, False: 7.74k]
  ------------------
   99|   247k|        ctr->K[i] ^= in[i];
  100|  7.74k|    if (inlen <= ctr->keylen)
  ------------------
  |  Branch (100:9): [True: 0, False: 7.74k]
  ------------------
  101|      0|        return;
  102|       |
  103|  7.74k|    n = inlen - ctr->keylen;
  104|  7.74k|    if (n > 16) {
  ------------------
  |  Branch (104:9): [True: 0, False: 7.74k]
  ------------------
  105|       |        /* Should never happen */
  106|      0|        n = 16;
  107|      0|    }
  108|   131k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (108:17): [True: 123k, False: 7.74k]
  ------------------
  109|   123k|        ctr->V[i] ^= in[i + ctr->keylen];
  110|  7.74k|}
drbg_ctr.c:drbg_ctr_reseed:
  370|  1.19k|{
  371|  1.19k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  372|       |
  373|  1.19k|    if (entropy == NULL)
  ------------------
  |  Branch (373:9): [True: 0, False: 1.19k]
  ------------------
  374|      0|        return 0;
  375|       |
  376|  1.19k|    inc_128(ctr);
  377|  1.19k|    if (!ctr_update(drbg, entropy, entropylen, adin, adinlen, NULL, 0))
  ------------------
  |  Branch (377:9): [True: 0, False: 1.19k]
  ------------------
  378|      0|        return 0;
  379|  1.19k|    return 1;
  380|  1.19k|}
drbg_ctr.c:drbg_ctr_generate:
  407|  32.6k|{
  408|  32.6k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  409|  32.6k|    unsigned int ctr32, blocks;
  410|  32.6k|    int outl, buflen;
  411|       |
  412|  32.6k|    if (adin != NULL && adinlen != 0) {
  ------------------
  |  Branch (412:9): [True: 2.38k, False: 30.2k]
  |  Branch (412:25): [True: 2.38k, False: 0]
  ------------------
  413|  2.38k|        inc_128(ctr);
  414|       |
  415|  2.38k|        if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (415:13): [True: 0, False: 2.38k]
  ------------------
  416|      0|            return 0;
  417|       |        /* This means we reuse derived value */
  418|  2.38k|        if (ctr->use_df) {
  ------------------
  |  Branch (418:13): [True: 2.38k, False: 0]
  ------------------
  419|  2.38k|            adin = NULL;
  420|  2.38k|            adinlen = 1;
  421|  2.38k|        }
  422|  30.2k|    } else {
  423|  30.2k|        adinlen = 0;
  424|  30.2k|    }
  425|       |
  426|  32.6k|    inc_128(ctr);
  427|       |
  428|  32.6k|    if (outlen == 0) {
  ------------------
  |  Branch (428:9): [True: 0, False: 32.6k]
  ------------------
  429|      0|        inc_128(ctr);
  430|       |
  431|      0|        if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (431:13): [True: 0, False: 0]
  ------------------
  432|      0|            return 0;
  433|      0|        return 1;
  434|      0|    }
  435|       |
  436|  32.6k|    memset(out, 0, outlen);
  437|       |
  438|  32.6k|    do {
  439|  32.6k|        if (!EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (439:13): [True: 0, False: 32.6k]
  ------------------
  440|  32.6k|                NULL, NULL, NULL, ctr->V, -1))
  441|      0|            return 0;
  442|       |
  443|       |        /*-
  444|       |         * outlen has type size_t while EVP_CipherUpdate takes an
  445|       |         * int argument and thus cannot be guaranteed to process more
  446|       |         * than 2^31-1 bytes at a time. We process such huge generate
  447|       |         * requests in 2^30 byte chunks, which is the greatest multiple
  448|       |         * of AES block size lower than or equal to 2^31-1.
  449|       |         */
  450|  32.6k|        buflen = outlen > (1U << 30) ? (1 << 30) : (int)outlen;
  ------------------
  |  Branch (450:18): [True: 0, False: 32.6k]
  ------------------
  451|  32.6k|        blocks = (buflen + 15) / 16;
  452|       |
  453|  32.6k|        ctr32 = GETU32(ctr->V + 12) + blocks;
  ------------------
  |  |   98|  32.6k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  454|  32.6k|        if (ctr32 < blocks) {
  ------------------
  |  Branch (454:13): [True: 0, False: 32.6k]
  ------------------
  455|       |            /* 32-bit counter overflow into V. */
  456|      0|            if (ctr32 != 0) {
  ------------------
  |  Branch (456:17): [True: 0, False: 0]
  ------------------
  457|      0|                blocks -= ctr32;
  458|      0|                buflen = blocks * 16;
  459|      0|                ctr32 = 0;
  460|      0|            }
  461|      0|            ctr96_inc(ctr->V);
  462|      0|        }
  463|  32.6k|        PUTU32(ctr->V + 12, ctr32);
  ------------------
  |  |   99|  32.6k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  464|       |
  465|  32.6k|        if (!EVP_CipherUpdate(ctr->ctx_ctr, out, &outl, out, buflen)
  ------------------
  |  Branch (465:13): [True: 0, False: 32.6k]
  ------------------
  466|  32.6k|            || outl != buflen)
  ------------------
  |  Branch (466:16): [True: 0, False: 32.6k]
  ------------------
  467|      0|            return 0;
  468|       |
  469|  32.6k|        out += buflen;
  470|  32.6k|        outlen -= buflen;
  471|  32.6k|    } while (outlen);
  ------------------
  |  Branch (471:14): [True: 0, False: 32.6k]
  ------------------
  472|       |
  473|  32.6k|    if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (473:9): [True: 0, False: 32.6k]
  ------------------
  474|      0|        return 0;
  475|  32.6k|    return 1;
  476|  32.6k|}
drbg_ctr.c:drbg_ctr_free:
  663|  1.78k|{
  664|  1.78k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  665|  1.78k|    PROV_DRBG_CTR *ctr;
  666|       |
  667|  1.78k|    if (drbg != NULL && (ctr = (PROV_DRBG_CTR *)drbg->data) != NULL) {
  ------------------
  |  Branch (667:9): [True: 1.78k, False: 0]
  |  Branch (667:25): [True: 1.78k, False: 0]
  ------------------
  668|  1.78k|        EVP_CIPHER_CTX_free(ctr->ctx_ecb);
  669|  1.78k|        EVP_CIPHER_CTX_free(ctr->ctx_ctr);
  670|  1.78k|        EVP_CIPHER_CTX_free(ctr->ctx_df);
  671|  1.78k|        EVP_CIPHER_free(ctr->cipher_ecb);
  672|  1.78k|        EVP_CIPHER_free(ctr->cipher_ctr);
  673|       |
  674|  1.78k|        OPENSSL_secure_clear_free(ctr, sizeof(*ctr));
  ------------------
  |  |  150|  1.78k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  675|  1.78k|    }
  676|  1.78k|    ossl_rand_drbg_free(drbg);
  677|  1.78k|}
drbg_ctr.c:drbg_ctr_instantiate_wrapper:
  345|  1.78k|{
  346|  1.78k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  347|  1.78k|    struct drbg_set_ctx_params_st p;
  348|  1.78k|    int ret = 0;
  349|       |
  350|  1.78k|    if (drbg == NULL || !drbg_ctr_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (350:9): [True: 0, False: 1.78k]
  |  Branch (350:25): [True: 0, False: 1.78k]
  ------------------
  351|      0|        return 0;
  352|       |
  353|  1.78k|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (353:9): [True: 0, False: 1.78k]
  |  Branch (353:31): [True: 0, False: 0]
  ------------------
  354|      0|        return 0;
  355|       |
  356|  1.78k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (356:9): [True: 0, False: 1.78k]
  ------------------
  357|  1.78k|        || !drbg_ctr_set_ctx_params_locked(drbg, &p))
  ------------------
  |  Branch (357:12): [True: 0, False: 1.78k]
  ------------------
  358|      0|        goto err;
  359|  1.78k|    ret = ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
  360|  1.78k|        pstr, pstr_len);
  361|  1.78k|err:
  362|  1.78k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (362:9): [True: 0, False: 1.78k]
  ------------------
  363|      0|        CRYPTO_THREAD_unlock(drbg->lock);
  364|  1.78k|    return ret;
  365|  1.78k|}
drbg_ctr.c:drbg_ctr_set_ctx_params_locked:
  726|  1.78k|{
  727|  1.78k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)ctx->data;
  728|  1.78k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
  ------------------
  |  |   31|  1.78k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  729|  1.78k|    OSSL_PROVIDER *prov = NULL;
  730|  1.78k|    char *ecb;
  731|  1.78k|    const char *propquery = NULL;
  732|  1.78k|    int i, cipher_init = 0;
  733|       |
  734|  1.78k|    if (p->df != NULL && OSSL_PARAM_get_int(p->df, &i)) {
  ------------------
  |  Branch (734:9): [True: 1.78k, False: 0]
  |  Branch (734:26): [True: 1.78k, False: 0]
  ------------------
  735|       |        /* FIPS errors out in the drbg_ctr_init() call later */
  736|  1.78k|        ctr->use_df = i != 0;
  737|  1.78k|        cipher_init = 1;
  738|  1.78k|    }
  739|       |
  740|  1.78k|    if (p->propq != NULL) {
  ------------------
  |  Branch (740:9): [True: 0, False: 1.78k]
  ------------------
  741|      0|        if (p->propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (741:13): [True: 0, False: 0]
  ------------------
  742|      0|            return 0;
  743|      0|        propquery = (const char *)p->propq->data;
  744|      0|    }
  745|       |
  746|  1.78k|    if (p->prov != NULL) {
  ------------------
  |  Branch (746:9): [True: 1.78k, False: 0]
  ------------------
  747|  1.78k|        if (p->prov->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|  1.78k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (747:13): [True: 0, False: 1.78k]
  ------------------
  748|      0|            return 0;
  749|  1.78k|        if ((prov = ossl_provider_find(libctx,
  ------------------
  |  Branch (749:13): [True: 0, False: 1.78k]
  ------------------
  750|  1.78k|                 (const char *)p->prov->data, 1))
  751|  1.78k|            == NULL)
  752|      0|            return 0;
  753|  1.78k|    }
  754|       |
  755|  1.78k|    if (p->cipher != NULL) {
  ------------------
  |  Branch (755:9): [True: 1.78k, False: 0]
  ------------------
  756|  1.78k|        const char *base = (const char *)p->cipher->data;
  757|  1.78k|        size_t ctr_str_len = sizeof("CTR") - 1;
  758|  1.78k|        size_t ecb_str_len = sizeof("ECB") - 1;
  759|       |
  760|  1.78k|        if (p->cipher->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|  3.57k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (760:13): [True: 0, False: 1.78k]
  ------------------
  761|  1.78k|            || p->cipher->data_size < ctr_str_len) {
  ------------------
  |  Branch (761:16): [True: 0, False: 1.78k]
  ------------------
  762|      0|            ossl_provider_free(prov);
  763|      0|            return 0;
  764|      0|        }
  765|  1.78k|        if (OPENSSL_strcasecmp("CTR", base + p->cipher->data_size - ctr_str_len) != 0) {
  ------------------
  |  Branch (765:13): [True: 0, False: 1.78k]
  ------------------
  766|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_REQUIRE_CTR_MODE_CIPHER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  767|      0|            ossl_provider_free(prov);
  768|      0|            return 0;
  769|      0|        }
  770|  1.78k|        if ((ecb = OPENSSL_strndup(base, p->cipher->data_size)) == NULL) {
  ------------------
  |  |  138|  1.78k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (770:13): [True: 0, False: 1.78k]
  ------------------
  771|      0|            ossl_provider_free(prov);
  772|      0|            return 0;
  773|      0|        }
  774|  1.78k|        strcpy(ecb + p->cipher->data_size - ecb_str_len, "ECB");
  775|  1.78k|        EVP_CIPHER_free(ctr->cipher_ecb);
  776|  1.78k|        EVP_CIPHER_free(ctr->cipher_ctr);
  777|       |        /*
  778|       |         * Try to fetch algorithms from our own provider code, fallback
  779|       |         * to generic fetch only if that fails
  780|       |         */
  781|  1.78k|        (void)ERR_set_mark();
  782|  1.78k|        ctr->cipher_ctr = evp_cipher_fetch_from_prov(prov, base, NULL);
  783|  1.78k|        if (ctr->cipher_ctr == NULL) {
  ------------------
  |  Branch (783:13): [True: 0, False: 1.78k]
  ------------------
  784|      0|            (void)ERR_pop_to_mark();
  785|      0|            ctr->cipher_ctr = EVP_CIPHER_fetch(libctx, base, propquery);
  786|  1.78k|        } else {
  787|  1.78k|            (void)ERR_clear_last_mark();
  788|  1.78k|        }
  789|  1.78k|        (void)ERR_set_mark();
  790|  1.78k|        ctr->cipher_ecb = evp_cipher_fetch_from_prov(prov, ecb, NULL);
  791|  1.78k|        if (ctr->cipher_ecb == NULL) {
  ------------------
  |  Branch (791:13): [True: 0, False: 1.78k]
  ------------------
  792|      0|            (void)ERR_pop_to_mark();
  793|      0|            ctr->cipher_ecb = EVP_CIPHER_fetch(libctx, ecb, propquery);
  794|  1.78k|        } else {
  795|  1.78k|            (void)ERR_clear_last_mark();
  796|  1.78k|        }
  797|  1.78k|        OPENSSL_free(ecb);
  ------------------
  |  |  132|  1.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  798|  1.78k|        if (ctr->cipher_ctr == NULL || ctr->cipher_ecb == NULL) {
  ------------------
  |  Branch (798:13): [True: 0, False: 1.78k]
  |  Branch (798:40): [True: 0, False: 1.78k]
  ------------------
  799|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_FIND_CIPHERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  800|      0|            ossl_provider_free(prov);
  801|      0|            return 0;
  802|      0|        }
  803|  1.78k|        cipher_init = 1;
  804|  1.78k|    }
  805|  1.78k|    ossl_provider_free(prov);
  806|       |
  807|  1.78k|    if (cipher_init && !drbg_ctr_init(ctx))
  ------------------
  |  Branch (807:9): [True: 1.78k, False: 0]
  |  Branch (807:24): [True: 0, False: 1.78k]
  ------------------
  808|      0|        return 0;
  809|       |
  810|  1.78k|    return ossl_drbg_set_ctx_params(ctx, p);
  811|  1.78k|}
drbg_ctr.c:drbg_ctr_init:
  573|  1.78k|{
  574|  1.78k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  575|  1.78k|    size_t keylen;
  576|       |
  577|  1.78k|    if (ctr->cipher_ctr == NULL) {
  ------------------
  |  Branch (577:9): [True: 0, False: 1.78k]
  ------------------
  578|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_CIPHER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  579|      0|        return 0;
  580|      0|    }
  581|  1.78k|    ctr->keylen = keylen = EVP_CIPHER_get_key_length(ctr->cipher_ctr);
  582|  1.78k|    if (ctr->ctx_ecb == NULL)
  ------------------
  |  Branch (582:9): [True: 1.78k, False: 0]
  ------------------
  583|  1.78k|        ctr->ctx_ecb = EVP_CIPHER_CTX_new();
  584|  1.78k|    if (ctr->ctx_ctr == NULL)
  ------------------
  |  Branch (584:9): [True: 1.78k, False: 0]
  ------------------
  585|  1.78k|        ctr->ctx_ctr = EVP_CIPHER_CTX_new();
  586|  1.78k|    if (ctr->ctx_ecb == NULL || ctr->ctx_ctr == NULL) {
  ------------------
  |  Branch (586:9): [True: 0, False: 1.78k]
  |  Branch (586:33): [True: 0, False: 1.78k]
  ------------------
  587|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  588|      0|        goto err;
  589|      0|    }
  590|       |
  591|  1.78k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb,
  ------------------
  |  Branch (591:9): [True: 0, False: 1.78k]
  ------------------
  592|  1.78k|            ctr->cipher_ecb, NULL, NULL, NULL, 1)
  593|  1.78k|        || !EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (593:12): [True: 0, False: 1.78k]
  ------------------
  594|  1.78k|            ctr->cipher_ctr, NULL, NULL, NULL, 1)) {
  595|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_INITIALISE_CIPHERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  596|      0|        goto err;
  597|      0|    }
  598|       |
  599|  1.78k|    drbg->strength = (unsigned int)(keylen * 8);
  600|  1.78k|    drbg->seedlen = keylen + 16;
  601|       |
  602|  1.78k|    if (ctr->use_df) {
  ------------------
  |  Branch (602:9): [True: 1.78k, False: 0]
  ------------------
  603|       |        /* df initialisation */
  604|  1.78k|        static const unsigned char df_key[32] = {
  605|  1.78k|            0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  606|  1.78k|            0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
  607|  1.78k|            0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
  608|  1.78k|            0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
  609|  1.78k|        };
  610|       |
  611|  1.78k|        if (ctr->ctx_df == NULL)
  ------------------
  |  Branch (611:13): [True: 1.78k, False: 0]
  ------------------
  612|  1.78k|            ctr->ctx_df = EVP_CIPHER_CTX_new();
  613|  1.78k|        if (ctr->ctx_df == NULL) {
  ------------------
  |  Branch (613:13): [True: 0, False: 1.78k]
  ------------------
  614|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  615|      0|            goto err;
  616|      0|        }
  617|       |        /* Set key schedule for df_key */
  618|  1.78k|        if (!EVP_CipherInit_ex(ctr->ctx_df,
  ------------------
  |  Branch (618:13): [True: 0, False: 1.78k]
  ------------------
  619|  1.78k|                ctr->cipher_ecb, NULL, df_key, NULL, 1)) {
  620|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_DERIVATION_FUNCTION_INIT_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  621|      0|            goto err;
  622|      0|        }
  623|  1.78k|    }
  624|  1.78k|    return drbg_ctr_init_lengths(drbg);
  625|       |
  626|      0|err:
  627|      0|    EVP_CIPHER_CTX_free(ctr->ctx_ecb);
  628|      0|    EVP_CIPHER_CTX_free(ctr->ctx_ctr);
  629|       |    ctr->ctx_ecb = ctr->ctx_ctr = NULL;
  630|      0|    return 0;
  631|  1.78k|}
drbg_ctr.c:drbg_ctr_generate_wrapper:
  481|  30.2k|{
  482|  30.2k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  483|       |
  484|  30.2k|    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
  485|  30.2k|        prediction_resistance, adin, adin_len);
  486|  30.2k|}
drbg_ctr.c:drbg_ctr_settable_ctx_params:
  835|  1.78k|{
  836|  1.78k|    return drbg_ctr_set_ctx_params_list;
  837|  1.78k|}
drbg_ctr.c:drbg_ctr_get_ctx_params:
  680|  72.7k|{
  681|  72.7k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  682|  72.7k|    PROV_DRBG_CTR *ctr;
  683|  72.7k|    struct drbg_ctr_get_ctx_params_st p;
  684|  72.7k|    int ret = 0, complete = 0;
  685|       |
  686|  72.7k|    if (drbg == NULL || !drbg_ctr_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (686:9): [True: 0, False: 72.7k]
  |  Branch (686:25): [True: 0, False: 72.7k]
  ------------------
  687|      0|        return 0;
  688|       |
  689|  72.7k|    if (!ossl_drbg_get_ctx_params_no_lock(drbg, &p, params, &complete))
  ------------------
  |  Branch (689:9): [True: 0, False: 72.7k]
  ------------------
  690|      0|        return 0;
  691|       |
  692|  72.7k|    if (complete)
  ------------------
  |  Branch (692:9): [True: 61.6k, False: 11.1k]
  ------------------
  693|  61.6k|        return 1;
  694|       |
  695|  11.1k|    ctr = (PROV_DRBG_CTR *)drbg->data;
  696|       |
  697|  11.1k|    if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock))
  ------------------
  |  Branch (697:9): [True: 11.1k, False: 0]
  |  Branch (697:31): [True: 0, False: 11.1k]
  ------------------
  698|      0|        return 0;
  699|       |
  700|  11.1k|    if (p.df != NULL && !OSSL_PARAM_set_int(p.df, ctr->use_df))
  ------------------
  |  Branch (700:9): [True: 0, False: 11.1k]
  |  Branch (700:25): [True: 0, False: 0]
  ------------------
  701|      0|        goto err;
  702|       |
  703|  11.1k|    if (p.cipher != NULL) {
  ------------------
  |  Branch (703:9): [True: 0, False: 11.1k]
  ------------------
  704|      0|        if (ctr->cipher_ctr == NULL
  ------------------
  |  Branch (704:13): [True: 0, False: 0]
  ------------------
  705|      0|            || !OSSL_PARAM_set_utf8_string(p.cipher,
  ------------------
  |  Branch (705:16): [True: 0, False: 0]
  ------------------
  706|      0|                EVP_CIPHER_get0_name(ctr->cipher_ctr)))
  707|      0|            goto err;
  708|      0|    }
  709|       |
  710|  11.1k|    ret = ossl_drbg_get_ctx_params(drbg, &p);
  711|  11.1k|err:
  712|  11.1k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (712:9): [True: 11.1k, False: 0]
  ------------------
  713|  11.1k|        CRYPTO_THREAD_unlock(drbg->lock);
  714|       |
  715|  11.1k|    return ret;
  716|  11.1k|}

drbg_ctr.c:drbg_ctr_set_ctx_params_decoder:
  379|  1.78k|{
  380|  1.78k|    const char *s;
  381|       |
  382|  1.78k|    memset(r, 0, sizeof(*r));
  383|  1.78k|    if (p != NULL)
  ------------------
  |  Branch (383:9): [True: 1.78k, False: 0]
  ------------------
  384|  10.7k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (384:16): [True: 8.94k, False: 1.78k]
  ------------------
  385|  8.94k|            switch(s[0]) {
  386|      0|            default:
  ------------------
  |  Branch (386:13): [True: 0, False: 8.94k]
  ------------------
  387|      0|                break;
  388|  1.78k|            case 'c':
  ------------------
  |  Branch (388:13): [True: 1.78k, False: 7.15k]
  ------------------
  389|  1.78k|                if (ossl_likely(strcmp("ipher", s + 1) == 0)) {
  ------------------
  |  |   22|  1.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.78k, False: 0]
  |  |  ------------------
  ------------------
  390|       |                    /* OSSL_DRBG_PARAM_CIPHER */
  391|  1.78k|                    if (ossl_unlikely(r->cipher != NULL)) {
  ------------------
  |  |   23|  1.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78k]
  |  |  ------------------
  ------------------
  392|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  393|      0|                                       "param %s is repeated", s);
  394|      0|                        return 0;
  395|      0|                    }
  396|  1.78k|                    r->cipher = (OSSL_PARAM *)p;
  397|  1.78k|                }
  398|  1.78k|                break;
  399|  1.78k|            case 'p':
  ------------------
  |  Branch (399:13): [True: 1.78k, False: 7.15k]
  ------------------
  400|  1.78k|                switch(s[1]) {
  401|      0|                default:
  ------------------
  |  Branch (401:17): [True: 0, False: 1.78k]
  ------------------
  402|      0|                    break;
  403|  1.78k|                case 'r':
  ------------------
  |  Branch (403:17): [True: 1.78k, False: 0]
  ------------------
  404|  1.78k|                    switch(s[2]) {
  405|      0|                    default:
  ------------------
  |  Branch (405:21): [True: 0, False: 1.78k]
  ------------------
  406|      0|                        break;
  407|  1.78k|                    case 'o':
  ------------------
  |  Branch (407:21): [True: 1.78k, False: 0]
  ------------------
  408|  1.78k|                        switch(s[3]) {
  409|      0|                        default:
  ------------------
  |  Branch (409:25): [True: 0, False: 1.78k]
  ------------------
  410|      0|                            break;
  411|      0|                        case 'p':
  ------------------
  |  Branch (411:25): [True: 0, False: 1.78k]
  ------------------
  412|      0|                            if (ossl_likely(strcmp("erties", s + 4) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  413|       |                                /* OSSL_DRBG_PARAM_PROPERTIES */
  414|      0|                                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  415|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  416|      0|                                                   "param %s is repeated", s);
  417|      0|                                    return 0;
  418|      0|                                }
  419|      0|                                r->propq = (OSSL_PARAM *)p;
  420|      0|                            }
  421|      0|                            break;
  422|  1.78k|                        case 'v':
  ------------------
  |  Branch (422:25): [True: 1.78k, False: 0]
  ------------------
  423|  1.78k|                            if (ossl_likely(strcmp("ider-name", s + 4) == 0)) {
  ------------------
  |  |   22|  1.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.78k, False: 0]
  |  |  ------------------
  ------------------
  424|       |                                /* OSSL_PROV_PARAM_CORE_PROV_NAME */
  425|  1.78k|                                if (ossl_unlikely(r->prov != NULL)) {
  ------------------
  |  |   23|  1.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78k]
  |  |  ------------------
  ------------------
  426|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  427|      0|                                                   "param %s is repeated", s);
  428|      0|                                    return 0;
  429|      0|                                }
  430|  1.78k|                                r->prov = (OSSL_PARAM *)p;
  431|  1.78k|                            }
  432|  1.78k|                        }
  433|  1.78k|                    }
  434|  1.78k|                }
  435|  1.78k|                break;
  436|  3.57k|            case 'r':
  ------------------
  |  Branch (436:13): [True: 3.57k, False: 5.36k]
  ------------------
  437|  3.57k|                switch(s[1]) {
  438|      0|                default:
  ------------------
  |  Branch (438:17): [True: 0, False: 3.57k]
  ------------------
  439|      0|                    break;
  440|  3.57k|                case 'e':
  ------------------
  |  Branch (440:17): [True: 3.57k, False: 0]
  ------------------
  441|  3.57k|                    switch(s[2]) {
  442|      0|                    default:
  ------------------
  |  Branch (442:21): [True: 0, False: 3.57k]
  ------------------
  443|      0|                        break;
  444|  3.57k|                    case 's':
  ------------------
  |  Branch (444:21): [True: 3.57k, False: 0]
  ------------------
  445|  3.57k|                        switch(s[3]) {
  446|      0|                        default:
  ------------------
  |  Branch (446:25): [True: 0, False: 3.57k]
  ------------------
  447|      0|                            break;
  448|  3.57k|                        case 'e':
  ------------------
  |  Branch (448:25): [True: 3.57k, False: 0]
  ------------------
  449|  3.57k|                            switch(s[4]) {
  450|      0|                            default:
  ------------------
  |  Branch (450:29): [True: 0, False: 3.57k]
  ------------------
  451|      0|                                break;
  452|  3.57k|                            case 'e':
  ------------------
  |  Branch (452:29): [True: 3.57k, False: 0]
  ------------------
  453|  3.57k|                                switch(s[5]) {
  454|      0|                                default:
  ------------------
  |  Branch (454:33): [True: 0, False: 3.57k]
  ------------------
  455|      0|                                    break;
  456|  3.57k|                                case 'd':
  ------------------
  |  Branch (456:33): [True: 3.57k, False: 0]
  ------------------
  457|  3.57k|                                    switch(s[6]) {
  458|      0|                                    default:
  ------------------
  |  Branch (458:37): [True: 0, False: 3.57k]
  ------------------
  459|      0|                                        break;
  460|  3.57k|                                    case '_':
  ------------------
  |  Branch (460:37): [True: 3.57k, False: 0]
  ------------------
  461|  3.57k|                                        switch(s[7]) {
  462|      0|                                        default:
  ------------------
  |  Branch (462:41): [True: 0, False: 3.57k]
  ------------------
  463|      0|                                            break;
  464|  1.78k|                                        case 'r':
  ------------------
  |  Branch (464:41): [True: 1.78k, False: 1.78k]
  ------------------
  465|  1.78k|                                            if (ossl_likely(strcmp("equests", s + 8) == 0)) {
  ------------------
  |  |   22|  1.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.78k, False: 0]
  |  |  ------------------
  ------------------
  466|       |                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
  467|  1.78k|                                                if (ossl_unlikely(r->reseed_req != NULL)) {
  ------------------
  |  |   23|  1.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78k]
  |  |  ------------------
  ------------------
  468|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  469|      0|                                                                   "param %s is repeated", s);
  470|      0|                                                    return 0;
  471|      0|                                                }
  472|  1.78k|                                                r->reseed_req = (OSSL_PARAM *)p;
  473|  1.78k|                                            }
  474|  1.78k|                                            break;
  475|  1.78k|                                        case 't':
  ------------------
  |  Branch (475:41): [True: 1.78k, False: 1.78k]
  ------------------
  476|  1.78k|                                            if (ossl_likely(strcmp("ime_interval", s + 8) == 0)) {
  ------------------
  |  |   22|  1.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.78k, False: 0]
  |  |  ------------------
  ------------------
  477|       |                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
  478|  1.78k|                                                if (ossl_unlikely(r->reseed_time != NULL)) {
  ------------------
  |  |   23|  1.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78k]
  |  |  ------------------
  ------------------
  479|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  480|      0|                                                                   "param %s is repeated", s);
  481|      0|                                                    return 0;
  482|      0|                                                }
  483|  1.78k|                                                r->reseed_time = (OSSL_PARAM *)p;
  484|  1.78k|                                            }
  485|  3.57k|                                        }
  486|  3.57k|                                    }
  487|  3.57k|                                }
  488|  3.57k|                            }
  489|  3.57k|                        }
  490|  3.57k|                    }
  491|  3.57k|                }
  492|  3.57k|                break;
  493|  3.57k|            case 'u':
  ------------------
  |  Branch (493:13): [True: 1.78k, False: 7.15k]
  ------------------
  494|  1.78k|                if (ossl_likely(strcmp("se_derivation_function", s + 1) == 0)) {
  ------------------
  |  |   22|  1.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.78k, False: 0]
  |  |  ------------------
  ------------------
  495|       |                    /* OSSL_DRBG_PARAM_USE_DF */
  496|  1.78k|                    if (ossl_unlikely(r->df != NULL)) {
  ------------------
  |  |   23|  1.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78k]
  |  |  ------------------
  ------------------
  497|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  498|      0|                                       "param %s is repeated", s);
  499|      0|                        return 0;
  500|      0|                    }
  501|  1.78k|                    r->df = (OSSL_PARAM *)p;
  502|  1.78k|                }
  503|  8.94k|            }
  504|  1.78k|    return 1;
  505|  1.78k|}
drbg_ctr.c:drbg_ctr_get_ctx_params_decoder:
   63|  72.7k|{
   64|  72.7k|    const char *s;
   65|       |
   66|  72.7k|    memset(r, 0, sizeof(*r));
   67|  72.7k|    if (p != NULL)
  ------------------
  |  Branch (67:9): [True: 72.7k, False: 0]
  ------------------
   68|   145k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (68:16): [True: 72.7k, False: 72.7k]
  ------------------
   69|  72.7k|            switch(s[0]) {
   70|      0|            default:
  ------------------
  |  Branch (70:13): [True: 0, False: 72.7k]
  ------------------
   71|      0|                break;
   72|      0|            case 'c':
  ------------------
  |  Branch (72:13): [True: 0, False: 72.7k]
  ------------------
   73|      0|                if (ossl_likely(strcmp("ipher", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   74|       |                    /* OSSL_DRBG_PARAM_CIPHER */
   75|      0|                    if (ossl_unlikely(r->cipher != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   76|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   77|      0|                                       "param %s is repeated", s);
   78|      0|                        return 0;
   79|      0|                    }
   80|      0|                    r->cipher = (OSSL_PARAM *)p;
   81|      0|                }
   82|      0|                break;
   83|      0|            case 'f':
  ------------------
  |  Branch (83:13): [True: 0, False: 72.7k]
  ------------------
   84|       |# if defined(FIPS_MODULE)
   85|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
   86|       |                    /* OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR */
   87|       |                    if (ossl_unlikely(r->ind != NULL)) {
   88|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
   89|       |                                       "param %s is repeated", s);
   90|       |                        return 0;
   91|       |                    }
   92|       |                    r->ind = (OSSL_PARAM *)p;
   93|       |                }
   94|       |# endif
   95|      0|                break;
   96|  30.2k|            case 'm':
  ------------------
  |  Branch (96:13): [True: 30.2k, False: 42.5k]
  ------------------
   97|  30.2k|                switch(s[1]) {
   98|      0|                default:
  ------------------
  |  Branch (98:17): [True: 0, False: 30.2k]
  ------------------
   99|      0|                    break;
  100|  30.2k|                case 'a':
  ------------------
  |  Branch (100:17): [True: 30.2k, False: 0]
  ------------------
  101|  30.2k|                    switch(s[2]) {
  102|      0|                    default:
  ------------------
  |  Branch (102:21): [True: 0, False: 30.2k]
  ------------------
  103|      0|                        break;
  104|  30.2k|                    case 'x':
  ------------------
  |  Branch (104:21): [True: 30.2k, False: 0]
  ------------------
  105|  30.2k|                        switch(s[3]) {
  106|      0|                        default:
  ------------------
  |  Branch (106:25): [True: 0, False: 30.2k]
  ------------------
  107|      0|                            break;
  108|  30.2k|                        case '_':
  ------------------
  |  Branch (108:25): [True: 30.2k, False: 0]
  ------------------
  109|  30.2k|                            switch(s[4]) {
  110|      0|                            default:
  ------------------
  |  Branch (110:29): [True: 0, False: 30.2k]
  ------------------
  111|      0|                                break;
  112|      0|                            case 'a':
  ------------------
  |  Branch (112:29): [True: 0, False: 30.2k]
  ------------------
  113|      0|                                if (ossl_likely(strcmp("dinlen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  114|       |                                    /* OSSL_DRBG_PARAM_MAX_ADINLEN */
  115|      0|                                    if (ossl_unlikely(r->maxadlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  116|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  117|      0|                                                       "param %s is repeated", s);
  118|      0|                                        return 0;
  119|      0|                                    }
  120|      0|                                    r->maxadlen = (OSSL_PARAM *)p;
  121|      0|                                }
  122|      0|                                break;
  123|      0|                            case 'e':
  ------------------
  |  Branch (123:29): [True: 0, False: 30.2k]
  ------------------
  124|      0|                                if (ossl_likely(strcmp("ntropylen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  125|       |                                    /* OSSL_DRBG_PARAM_MAX_ENTROPYLEN */
  126|      0|                                    if (ossl_unlikely(r->maxentlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  127|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  128|      0|                                                       "param %s is repeated", s);
  129|      0|                                        return 0;
  130|      0|                                    }
  131|      0|                                    r->maxentlen = (OSSL_PARAM *)p;
  132|      0|                                }
  133|      0|                                break;
  134|      0|                            case 'n':
  ------------------
  |  Branch (134:29): [True: 0, False: 30.2k]
  ------------------
  135|      0|                                if (ossl_likely(strcmp("oncelen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  136|       |                                    /* OSSL_DRBG_PARAM_MAX_NONCELEN */
  137|      0|                                    if (ossl_unlikely(r->maxnonlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  138|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  139|      0|                                                       "param %s is repeated", s);
  140|      0|                                        return 0;
  141|      0|                                    }
  142|      0|                                    r->maxnonlen = (OSSL_PARAM *)p;
  143|      0|                                }
  144|      0|                                break;
  145|      0|                            case 'p':
  ------------------
  |  Branch (145:29): [True: 0, False: 30.2k]
  ------------------
  146|      0|                                if (ossl_likely(strcmp("erslen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  147|       |                                    /* OSSL_DRBG_PARAM_MAX_PERSLEN */
  148|      0|                                    if (ossl_unlikely(r->maxperlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  149|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  150|      0|                                                       "param %s is repeated", s);
  151|      0|                                        return 0;
  152|      0|                                    }
  153|      0|                                    r->maxperlen = (OSSL_PARAM *)p;
  154|      0|                                }
  155|      0|                                break;
  156|  30.2k|                            case 'r':
  ------------------
  |  Branch (156:29): [True: 30.2k, False: 0]
  ------------------
  157|  30.2k|                                if (ossl_likely(strcmp("equest", s + 5) == 0)) {
  ------------------
  |  |   22|  30.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 30.2k, False: 0]
  |  |  ------------------
  ------------------
  158|       |                                    /* OSSL_RAND_PARAM_MAX_REQUEST */
  159|  30.2k|                                    if (ossl_unlikely(r->maxreq != NULL)) {
  ------------------
  |  |   23|  30.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 30.2k]
  |  |  ------------------
  ------------------
  160|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  161|      0|                                                       "param %s is repeated", s);
  162|      0|                                        return 0;
  163|      0|                                    }
  164|  30.2k|                                    r->maxreq = (OSSL_PARAM *)p;
  165|  30.2k|                                }
  166|  30.2k|                            }
  167|  30.2k|                        }
  168|  30.2k|                    }
  169|  30.2k|                    break;
  170|  30.2k|                case 'i':
  ------------------
  |  Branch (170:17): [True: 0, False: 30.2k]
  ------------------
  171|      0|                    switch(s[2]) {
  172|      0|                    default:
  ------------------
  |  Branch (172:21): [True: 0, False: 0]
  ------------------
  173|      0|                        break;
  174|      0|                    case 'n':
  ------------------
  |  Branch (174:21): [True: 0, False: 0]
  ------------------
  175|      0|                        switch(s[3]) {
  176|      0|                        default:
  ------------------
  |  Branch (176:25): [True: 0, False: 0]
  ------------------
  177|      0|                            break;
  178|      0|                        case '_':
  ------------------
  |  Branch (178:25): [True: 0, False: 0]
  ------------------
  179|      0|                            switch(s[4]) {
  180|      0|                            default:
  ------------------
  |  Branch (180:29): [True: 0, False: 0]
  ------------------
  181|      0|                                break;
  182|      0|                            case 'e':
  ------------------
  |  Branch (182:29): [True: 0, False: 0]
  ------------------
  183|      0|                                if (ossl_likely(strcmp("ntropylen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  184|       |                                    /* OSSL_DRBG_PARAM_MIN_ENTROPYLEN */
  185|      0|                                    if (ossl_unlikely(r->minentlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  186|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  187|      0|                                                       "param %s is repeated", s);
  188|      0|                                        return 0;
  189|      0|                                    }
  190|      0|                                    r->minentlen = (OSSL_PARAM *)p;
  191|      0|                                }
  192|      0|                                break;
  193|      0|                            case 'n':
  ------------------
  |  Branch (193:29): [True: 0, False: 0]
  ------------------
  194|      0|                                if (ossl_likely(strcmp("oncelen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  195|       |                                    /* OSSL_DRBG_PARAM_MIN_NONCELEN */
  196|      0|                                    if (ossl_unlikely(r->minnonlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  197|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  198|      0|                                                       "param %s is repeated", s);
  199|      0|                                        return 0;
  200|      0|                                    }
  201|      0|                                    r->minnonlen = (OSSL_PARAM *)p;
  202|      0|                                }
  203|      0|                            }
  204|      0|                        }
  205|      0|                    }
  206|  30.2k|                }
  207|  30.2k|                break;
  208|  31.4k|            case 'r':
  ------------------
  |  Branch (208:13): [True: 31.4k, False: 41.3k]
  ------------------
  209|  31.4k|                switch(s[1]) {
  210|      0|                default:
  ------------------
  |  Branch (210:17): [True: 0, False: 31.4k]
  ------------------
  211|      0|                    break;
  212|  31.4k|                case 'e':
  ------------------
  |  Branch (212:17): [True: 31.4k, False: 0]
  ------------------
  213|  31.4k|                    switch(s[2]) {
  214|      0|                    default:
  ------------------
  |  Branch (214:21): [True: 0, False: 31.4k]
  ------------------
  215|      0|                        break;
  216|  31.4k|                    case 's':
  ------------------
  |  Branch (216:21): [True: 31.4k, False: 0]
  ------------------
  217|  31.4k|                        switch(s[3]) {
  218|      0|                        default:
  ------------------
  |  Branch (218:25): [True: 0, False: 31.4k]
  ------------------
  219|      0|                            break;
  220|  31.4k|                        case 'e':
  ------------------
  |  Branch (220:25): [True: 31.4k, False: 0]
  ------------------
  221|  31.4k|                            switch(s[4]) {
  222|      0|                            default:
  ------------------
  |  Branch (222:29): [True: 0, False: 31.4k]
  ------------------
  223|      0|                                break;
  224|  31.4k|                            case 'e':
  ------------------
  |  Branch (224:29): [True: 31.4k, False: 0]
  ------------------
  225|  31.4k|                                switch(s[5]) {
  226|      0|                                default:
  ------------------
  |  Branch (226:33): [True: 0, False: 31.4k]
  ------------------
  227|      0|                                    break;
  228|  31.4k|                                case 'd':
  ------------------
  |  Branch (228:33): [True: 31.4k, False: 0]
  ------------------
  229|  31.4k|                                    switch(s[6]) {
  230|      0|                                    default:
  ------------------
  |  Branch (230:37): [True: 0, False: 31.4k]
  ------------------
  231|      0|                                        break;
  232|  31.4k|                                    case '_':
  ------------------
  |  Branch (232:37): [True: 31.4k, False: 0]
  ------------------
  233|  31.4k|                                        switch(s[7]) {
  234|      0|                                        default:
  ------------------
  |  Branch (234:41): [True: 0, False: 31.4k]
  ------------------
  235|      0|                                            break;
  236|  31.4k|                                        case 'c':
  ------------------
  |  Branch (236:41): [True: 31.4k, False: 0]
  ------------------
  237|  31.4k|                                            if (ossl_likely(strcmp("ounter", s + 8) == 0)) {
  ------------------
  |  |   22|  31.4k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 31.4k, False: 0]
  |  |  ------------------
  ------------------
  238|       |                                                /* OSSL_DRBG_PARAM_RESEED_COUNTER */
  239|  31.4k|                                                if (ossl_unlikely(r->reseed_cnt != NULL)) {
  ------------------
  |  |   23|  31.4k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 31.4k]
  |  |  ------------------
  ------------------
  240|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  241|      0|                                                                   "param %s is repeated", s);
  242|      0|                                                    return 0;
  243|      0|                                                }
  244|  31.4k|                                                r->reseed_cnt = (OSSL_PARAM *)p;
  245|  31.4k|                                            }
  246|  31.4k|                                            break;
  247|  31.4k|                                        case 'r':
  ------------------
  |  Branch (247:41): [True: 0, False: 31.4k]
  ------------------
  248|      0|                                            if (ossl_likely(strcmp("equests", s + 8) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  249|       |                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
  250|      0|                                                if (ossl_unlikely(r->reseed_req != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  251|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  252|      0|                                                                   "param %s is repeated", s);
  253|      0|                                                    return 0;
  254|      0|                                                }
  255|      0|                                                r->reseed_req = (OSSL_PARAM *)p;
  256|      0|                                            }
  257|      0|                                            break;
  258|      0|                                        case 't':
  ------------------
  |  Branch (258:41): [True: 0, False: 31.4k]
  ------------------
  259|      0|                                            switch(s[8]) {
  260|      0|                                            default:
  ------------------
  |  Branch (260:45): [True: 0, False: 0]
  ------------------
  261|      0|                                                break;
  262|      0|                                            case 'i':
  ------------------
  |  Branch (262:45): [True: 0, False: 0]
  ------------------
  263|      0|                                                switch(s[9]) {
  264|      0|                                                default:
  ------------------
  |  Branch (264:49): [True: 0, False: 0]
  ------------------
  265|      0|                                                    break;
  266|      0|                                                case 'm':
  ------------------
  |  Branch (266:49): [True: 0, False: 0]
  ------------------
  267|      0|                                                    switch(s[10]) {
  268|      0|                                                    default:
  ------------------
  |  Branch (268:53): [True: 0, False: 0]
  ------------------
  269|      0|                                                        break;
  270|      0|                                                    case 'e':
  ------------------
  |  Branch (270:53): [True: 0, False: 0]
  ------------------
  271|      0|                                                        switch(s[11]) {
  272|      0|                                                        default:
  ------------------
  |  Branch (272:57): [True: 0, False: 0]
  ------------------
  273|      0|                                                            break;
  274|      0|                                                        case '_':
  ------------------
  |  Branch (274:57): [True: 0, False: 0]
  ------------------
  275|      0|                                                            if (ossl_likely(strcmp("interval", s + 12) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  276|       |                                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
  277|      0|                                                                if (ossl_unlikely(r->reseed_int != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  278|      0|                                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  279|      0|                                                                                   "param %s is repeated", s);
  280|      0|                                                                    return 0;
  281|      0|                                                                }
  282|      0|                                                                r->reseed_int = (OSSL_PARAM *)p;
  283|      0|                                                            }
  284|      0|                                                            break;
  285|      0|                                                        case '\0':
  ------------------
  |  Branch (285:57): [True: 0, False: 0]
  ------------------
  286|      0|                                                            if (ossl_unlikely(r->reseed_time != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  287|      0|                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  288|      0|                                                                               "param %s is repeated", s);
  289|      0|                                                                return 0;
  290|      0|                                                            }
  291|      0|                                                            r->reseed_time = (OSSL_PARAM *)p;
  292|      0|                                                        }
  293|      0|                                                    }
  294|      0|                                                }
  295|      0|                                            }
  296|  31.4k|                                        }
  297|  31.4k|                                    }
  298|  31.4k|                                }
  299|  31.4k|                            }
  300|  31.4k|                        }
  301|  31.4k|                    }
  302|  31.4k|                }
  303|  31.4k|                break;
  304|  31.4k|            case 's':
  ------------------
  |  Branch (304:13): [True: 11.1k, False: 61.6k]
  ------------------
  305|  11.1k|                switch(s[1]) {
  306|      0|                default:
  ------------------
  |  Branch (306:17): [True: 0, False: 11.1k]
  ------------------
  307|      0|                    break;
  308|  11.1k|                case 't':
  ------------------
  |  Branch (308:17): [True: 11.1k, False: 0]
  ------------------
  309|  11.1k|                    switch(s[2]) {
  310|      0|                    default:
  ------------------
  |  Branch (310:21): [True: 0, False: 11.1k]
  ------------------
  311|      0|                        break;
  312|  7.55k|                    case 'a':
  ------------------
  |  Branch (312:21): [True: 7.55k, False: 3.57k]
  ------------------
  313|  7.55k|                        if (ossl_likely(strcmp("te", s + 3) == 0)) {
  ------------------
  |  |   22|  7.55k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.55k, False: 0]
  |  |  ------------------
  ------------------
  314|       |                            /* OSSL_RAND_PARAM_STATE */
  315|  7.55k|                            if (ossl_unlikely(r->state != NULL)) {
  ------------------
  |  |   23|  7.55k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.55k]
  |  |  ------------------
  ------------------
  316|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  317|      0|                                               "param %s is repeated", s);
  318|      0|                                return 0;
  319|      0|                            }
  320|  7.55k|                            r->state = (OSSL_PARAM *)p;
  321|  7.55k|                        }
  322|  7.55k|                        break;
  323|  7.55k|                    case 'r':
  ------------------
  |  Branch (323:21): [True: 3.57k, False: 7.55k]
  ------------------
  324|  3.57k|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|  3.57k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.57k, False: 0]
  |  |  ------------------
  ------------------
  325|       |                            /* OSSL_RAND_PARAM_STRENGTH */
  326|  3.57k|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|  3.57k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.57k]
  |  |  ------------------
  ------------------
  327|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  328|      0|                                               "param %s is repeated", s);
  329|      0|                                return 0;
  330|      0|                            }
  331|  3.57k|                            r->str = (OSSL_PARAM *)p;
  332|  3.57k|                        }
  333|  11.1k|                    }
  334|  11.1k|                }
  335|  11.1k|                break;
  336|  11.1k|            case 'u':
  ------------------
  |  Branch (336:13): [True: 0, False: 72.7k]
  ------------------
  337|      0|                if (ossl_likely(strcmp("se_derivation_function", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  338|       |                    /* OSSL_DRBG_PARAM_USE_DF */
  339|      0|                    if (ossl_unlikely(r->df != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  340|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  341|      0|                                       "param %s is repeated", s);
  342|      0|                        return 0;
  343|      0|                    }
  344|      0|                    r->df = (OSSL_PARAM *)p;
  345|      0|                }
  346|  72.7k|            }
  347|  72.7k|    return 1;
  348|  72.7k|}

seed_src.c:seed_src_new:
   49|    596|{
   50|    596|    PROV_SEED_SRC *s;
   51|       |
   52|    596|    if (parent != NULL) {
  ------------------
  |  Branch (52:9): [True: 0, False: 596]
  ------------------
   53|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_SEED_SOURCES_MUST_NOT_HAVE_A_PARENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   54|      0|        return NULL;
   55|      0|    }
   56|       |
   57|    596|    s = OPENSSL_zalloc(sizeof(*s));
  ------------------
  |  |  109|    596|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   58|    596|    if (s == NULL)
  ------------------
  |  Branch (58:9): [True: 0, False: 596]
  ------------------
   59|      0|        return NULL;
   60|       |
   61|    596|    s->provctx = provctx;
   62|    596|    s->state = EVP_RAND_STATE_UNINITIALISED;
  ------------------
  |  | 1249|    596|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
   63|    596|    return s;
   64|    596|}
seed_src.c:seed_src_free:
   67|    595|{
   68|    595|    OPENSSL_free(vseed);
  ------------------
  |  |  132|    595|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   69|    595|}
seed_src.c:seed_src_instantiate:
   75|    596|{
   76|    596|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
   77|       |
   78|    596|    s->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|    596|#define EVP_RAND_STATE_READY 1
  ------------------
   79|    596|    return 1;
   80|    596|}
seed_src.c:seed_src_enable_locking:
  212|    596|{
  213|    596|    return 1;
  214|    596|}
seed_src.c:seed_src_lock:
  217|  5.36k|{
  218|  5.36k|    return 1;
  219|  5.36k|}
seed_src.c:seed_src_unlock:
  222|  5.36k|{
  223|  5.36k|}
seed_src.c:seed_src_get_ctx_params:
  147|  3.57k|{
  148|  3.57k|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
  149|  3.57k|    struct seed_src_get_ctx_params_st p;
  150|       |
  151|  3.57k|    if (s == NULL || !seed_src_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (151:9): [True: 0, False: 3.57k]
  |  Branch (151:22): [True: 0, False: 3.57k]
  ------------------
  152|      0|        return 0;
  153|       |
  154|  3.57k|    if (p.state != NULL && !OSSL_PARAM_set_int(p.state, s->state))
  ------------------
  |  Branch (154:9): [True: 0, False: 3.57k]
  |  Branch (154:28): [True: 0, False: 0]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  3.57k|    if (p.str != NULL && !OSSL_PARAM_set_uint(p.str, 1024))
  ------------------
  |  Branch (157:9): [True: 1.19k, False: 2.38k]
  |  Branch (157:26): [True: 0, False: 1.19k]
  ------------------
  158|      0|        return 0;
  159|       |
  160|  3.57k|    if (p.maxreq != NULL && !OSSL_PARAM_set_size_t(p.maxreq, 128))
  ------------------
  |  Branch (160:9): [True: 0, False: 3.57k]
  |  Branch (160:29): [True: 0, False: 0]
  ------------------
  161|      0|        return 0;
  162|  3.57k|    return 1;
  163|  3.57k|}
seed_src.c:seed_get_seed:
  180|    596|{
  181|    596|    size_t ret = 0;
  182|    596|    size_t entropy_available = 0;
  183|    596|    RAND_POOL *pool;
  184|       |
  185|    596|    pool = ossl_rand_pool_new(entropy, 1, min_len, max_len);
  186|    596|    if (pool == NULL) {
  ------------------
  |  Branch (186:9): [True: 0, False: 596]
  ------------------
  187|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_RAND_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  188|      0|        return 0;
  189|      0|    }
  190|       |
  191|       |    /* Get entropy by polling system entropy sources. */
  192|    596|    entropy_available = ossl_pool_acquire_entropy(pool);
  193|       |
  194|    596|    if (entropy_available > 0
  ------------------
  |  Branch (194:9): [True: 596, False: 0]
  ------------------
  195|    596|        && ossl_rand_pool_adin_mix_in(pool, adin, adin_len)) {
  ------------------
  |  Branch (195:12): [True: 596, False: 0]
  ------------------
  196|    596|        ret = ossl_rand_pool_length(pool);
  197|    596|        *pout = ossl_rand_pool_detach(pool);
  198|    596|    } else {
  199|       |        ERR_raise(ERR_LIB_PROV, PROV_R_ENTROPY_SOURCE_STRENGTH_TOO_WEAK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  200|      0|    }
  201|    596|    ossl_rand_pool_free(pool);
  202|    596|    return ret;
  203|    596|}
seed_src.c:seed_clear_seed:
  207|    596|{
  208|    596|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  150|    596|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  209|    596|}

seed_src.c:seed_src_get_ctx_params_decoder:
   33|  3.57k|{
   34|  3.57k|    const char *s;
   35|       |
   36|  3.57k|    memset(r, 0, sizeof(*r));
   37|  3.57k|    if (p != NULL)
  ------------------
  |  Branch (37:9): [True: 3.57k, False: 0]
  ------------------
   38|  7.15k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (38:16): [True: 3.57k, False: 3.57k]
  ------------------
   39|  3.57k|            switch(s[0]) {
   40|  2.38k|            default:
  ------------------
  |  Branch (40:13): [True: 2.38k, False: 1.19k]
  ------------------
   41|  2.38k|                break;
   42|  2.38k|            case 'm':
  ------------------
  |  Branch (42:13): [True: 0, False: 3.57k]
  ------------------
   43|      0|                if (ossl_likely(strcmp("ax_request", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   44|       |                    /* OSSL_RAND_PARAM_MAX_REQUEST */
   45|      0|                    if (ossl_unlikely(r->maxreq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   46|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   47|      0|                                       "param %s is repeated", s);
   48|      0|                        return 0;
   49|      0|                    }
   50|      0|                    r->maxreq = (OSSL_PARAM *)p;
   51|      0|                }
   52|      0|                break;
   53|  1.19k|            case 's':
  ------------------
  |  Branch (53:13): [True: 1.19k, False: 2.38k]
  ------------------
   54|  1.19k|                switch(s[1]) {
   55|      0|                default:
  ------------------
  |  Branch (55:17): [True: 0, False: 1.19k]
  ------------------
   56|      0|                    break;
   57|  1.19k|                case 't':
  ------------------
  |  Branch (57:17): [True: 1.19k, False: 0]
  ------------------
   58|  1.19k|                    switch(s[2]) {
   59|      0|                    default:
  ------------------
  |  Branch (59:21): [True: 0, False: 1.19k]
  ------------------
   60|      0|                        break;
   61|      0|                    case 'a':
  ------------------
  |  Branch (61:21): [True: 0, False: 1.19k]
  ------------------
   62|      0|                        if (ossl_likely(strcmp("te", s + 3) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   63|       |                            /* OSSL_RAND_PARAM_STATE */
   64|      0|                            if (ossl_unlikely(r->state != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   65|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   66|      0|                                               "param %s is repeated", s);
   67|      0|                                return 0;
   68|      0|                            }
   69|      0|                            r->state = (OSSL_PARAM *)p;
   70|      0|                        }
   71|      0|                        break;
   72|  1.19k|                    case 'r':
  ------------------
  |  Branch (72:21): [True: 1.19k, False: 0]
  ------------------
   73|  1.19k|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|  1.19k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.19k, False: 0]
  |  |  ------------------
  ------------------
   74|       |                            /* OSSL_RAND_PARAM_STRENGTH */
   75|  1.19k|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|  1.19k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.19k]
  |  |  ------------------
  ------------------
   76|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   77|      0|                                               "param %s is repeated", s);
   78|      0|                                return 0;
   79|      0|                            }
   80|  1.19k|                            r->str = (OSSL_PARAM *)p;
   81|  1.19k|                        }
   82|  1.19k|                    }
   83|  1.19k|                }
   84|  3.57k|            }
   85|  3.57k|    return 1;
   86|  3.57k|}

ossl_rand_pool_init:
  566|      1|{
  567|      1|    size_t i;
  568|       |
  569|      5|    for (i = 0; i < OSSL_NELEM(random_devices); i++)
  ------------------
  |  |   14|      5|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (569:17): [True: 4, False: 1]
  ------------------
  570|      4|        random_devices[i].fd = -1;
  571|       |
  572|      1|    return 1;
  573|      1|}
ossl_pool_acquire_entropy:
  634|    596|{
  635|       |#if defined(OPENSSL_RAND_SEED_NONE)
  636|       |    return ossl_rand_pool_entropy_available(pool);
  637|       |#else
  638|    596|    size_t entropy_available = 0;
  639|       |
  640|    596|    (void)entropy_available; /* avoid compiler warning */
  641|       |
  642|    596|#if defined(OPENSSL_RAND_SEED_GETRANDOM)
  643|    596|    {
  644|    596|        size_t bytes_needed;
  645|    596|        unsigned char *buffer;
  646|    596|        ssize_t bytes;
  647|       |        /* Maximum allowed number of consecutive unsuccessful attempts */
  648|    596|        int attempts = 3;
  649|       |
  650|    596|        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  651|  1.19k|        while (bytes_needed != 0 && attempts-- > 0) {
  ------------------
  |  Branch (651:16): [True: 596, False: 596]
  |  Branch (651:37): [True: 596, False: 0]
  ------------------
  652|    596|            buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  653|    596|            bytes = syscall_random(buffer, bytes_needed);
  654|    596|            if (bytes > 0) {
  ------------------
  |  Branch (654:17): [True: 596, False: 0]
  ------------------
  655|    596|                ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  656|    596|                bytes_needed -= bytes;
  657|    596|                attempts = 3; /* reset counter after successful attempt */
  658|    596|            } else if (bytes < 0 && errno != EINTR) {
  ------------------
  |  Branch (658:24): [True: 0, False: 0]
  |  Branch (658:37): [True: 0, False: 0]
  ------------------
  659|      0|                break;
  660|      0|            }
  661|    596|        }
  662|    596|    }
  663|    596|    entropy_available = ossl_rand_pool_entropy_available(pool);
  664|    596|    if (entropy_available > 0)
  ------------------
  |  Branch (664:9): [True: 596, False: 0]
  ------------------
  665|    596|        return entropy_available;
  666|      0|#endif
  667|       |
  668|      0|#if defined(OPENSSL_RAND_SEED_DEVRANDOM)
  669|      0|    if (wait_random_seeded()) {
  ------------------
  |  Branch (669:9): [True: 0, False: 0]
  ------------------
  670|      0|        size_t bytes_needed;
  671|      0|        unsigned char *buffer;
  672|      0|        size_t i;
  673|       |
  674|      0|        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  675|      0|        for (i = 0; bytes_needed > 0 && i < OSSL_NELEM(random_device_paths);
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (675:21): [True: 0, False: 0]
  |  Branch (675:41): [True: 0, False: 0]
  ------------------
  676|      0|            i++) {
  677|      0|            ssize_t bytes = 0;
  678|       |            /* Maximum number of consecutive unsuccessful attempts */
  679|      0|            int attempts = 3;
  680|      0|            const int fd = get_random_device(i);
  681|       |
  682|      0|            if (fd == -1)
  ------------------
  |  Branch (682:17): [True: 0, False: 0]
  ------------------
  683|      0|                continue;
  684|       |
  685|      0|            while (bytes_needed != 0 && attempts-- > 0) {
  ------------------
  |  Branch (685:20): [True: 0, False: 0]
  |  Branch (685:41): [True: 0, False: 0]
  ------------------
  686|      0|                buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  687|      0|                bytes = read(fd, buffer, bytes_needed);
  688|       |
  689|      0|                if (bytes > 0) {
  ------------------
  |  Branch (689:21): [True: 0, False: 0]
  ------------------
  690|      0|                    ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  691|      0|                    bytes_needed -= bytes;
  692|      0|                    attempts = 3; /* reset counter on successful attempt */
  693|      0|                } else if (bytes < 0 && errno != EINTR) {
  ------------------
  |  Branch (693:28): [True: 0, False: 0]
  |  Branch (693:41): [True: 0, False: 0]
  ------------------
  694|      0|                    break;
  695|      0|                }
  696|      0|            }
  697|      0|            if (bytes < 0 || !keep_random_devices_open)
  ------------------
  |  Branch (697:17): [True: 0, False: 0]
  |  Branch (697:30): [True: 0, False: 0]
  ------------------
  698|      0|                close_random_device(i);
  699|       |
  700|      0|            bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
  701|      0|        }
  702|      0|        entropy_available = ossl_rand_pool_entropy_available(pool);
  703|      0|        if (entropy_available > 0)
  ------------------
  |  Branch (703:13): [True: 0, False: 0]
  ------------------
  704|      0|            return entropy_available;
  705|      0|    }
  706|      0|#endif
  707|       |
  708|       |#if defined(OPENSSL_RAND_SEED_RDTSC)
  709|       |    entropy_available = ossl_prov_acquire_entropy_from_tsc(pool);
  710|       |    if (entropy_available > 0)
  711|       |        return entropy_available;
  712|       |#endif
  713|       |
  714|       |#if defined(OPENSSL_RAND_SEED_RDCPU)
  715|       |    entropy_available = ossl_prov_acquire_entropy_from_cpu(pool);
  716|       |    if (entropy_available > 0)
  717|       |        return entropy_available;
  718|       |#endif
  719|       |
  720|       |#if defined(OPENSSL_RAND_SEED_EGD)
  721|       |    {
  722|       |        static const char *paths[] = { DEVRANDOM_EGD, NULL };
  723|       |        size_t bytes_needed;
  724|       |        unsigned char *buffer;
  725|       |        int i;
  726|       |
  727|       |        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  728|       |        for (i = 0; bytes_needed > 0 && paths[i] != NULL; i++) {
  729|       |            size_t bytes = 0;
  730|       |            int num;
  731|       |
  732|       |            buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  733|       |            num = RAND_query_egd_bytes(paths[i],
  734|       |                buffer, (int)bytes_needed);
  735|       |            if (num == (int)bytes_needed)
  736|       |                bytes = bytes_needed;
  737|       |
  738|       |            ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  739|       |            bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
  740|       |        }
  741|       |        entropy_available = ossl_rand_pool_entropy_available(pool);
  742|       |        if (entropy_available > 0)
  743|       |            return entropy_available;
  744|       |    }
  745|       |#endif
  746|       |
  747|      0|    return ossl_rand_pool_entropy_available(pool);
  748|      0|#endif
  749|      0|}
rand_unix.c:syscall_random:
  333|    596|{
  334|       |    /*
  335|       |     * Note: 'buflen' equals the size of the buffer which is used by the
  336|       |     * get_entropy() callback of the RAND_DRBG. It is roughly bounded by
  337|       |     *
  338|       |     *   2 * RAND_POOL_FACTOR * (RAND_DRBG_STRENGTH / 8) = 2^14
  339|       |     *
  340|       |     * which is way below the OSSL_SSIZE_MAX limit. Therefore sign conversion
  341|       |     * between size_t and ssize_t is safe even without a range check.
  342|       |     */
  343|       |
  344|       |    /*
  345|       |     * Do runtime detection to find getentropy().
  346|       |     *
  347|       |     * Known OSs that should support this:
  348|       |     * - Darwin since 16 (OSX 10.12, IOS 10.0).
  349|       |     * - Solaris since 11.3
  350|       |     * - OpenBSD since 5.6
  351|       |     * - Linux since 3.17 with glibc 2.25
  352|       |     *
  353|       |     * Note: Sometimes getentropy() can be provided but not implemented
  354|       |     * internally. So we need to check errno for ENOSYS
  355|       |     */
  356|    596|#if !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
  357|    596|#if defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__) && !defined(__hpux)
  358|    596|    extern int getentropy(void *buffer, size_t length) __attribute__((weak));
  359|       |
  360|    596|    if (getentropy != NULL) {
  ------------------
  |  Branch (360:9): [True: 596, False: 0]
  ------------------
  361|    596|        if (getentropy(buf, buflen) == 0)
  ------------------
  |  Branch (361:13): [True: 596, False: 0]
  ------------------
  362|    596|            return (ssize_t)buflen;
  363|      0|        if (errno != ENOSYS)
  ------------------
  |  Branch (363:13): [True: 0, False: 0]
  ------------------
  364|      0|            return -1;
  365|      0|    }
  366|       |#elif defined(OPENSSL_APPLE_CRYPTO_RANDOM)
  367|       |
  368|       |    if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
  369|       |        return (ssize_t)buflen;
  370|       |
  371|       |    return -1;
  372|       |#else
  373|       |    union {
  374|       |        void *p;
  375|       |        int (*f)(void *buffer, size_t length);
  376|       |    } p_getentropy;
  377|       |
  378|       |    /*
  379|       |     * We could cache the result of the lookup, but we normally don't
  380|       |     * call this function often.
  381|       |     */
  382|       |    ERR_set_mark();
  383|       |    p_getentropy.p = DSO_global_lookup("getentropy");
  384|       |    ERR_pop_to_mark();
  385|       |    if (p_getentropy.p != NULL)
  386|       |        return p_getentropy.f(buf, buflen) == 0 ? (ssize_t)buflen : -1;
  387|       |#endif
  388|      0|#endif /* !__DragonFly__ && !__NetBSD__ && !__FreeBSD__ */
  389|       |
  390|       |    /* Linux supports this since version 3.17 */
  391|      0|#if defined(__linux) && defined(__NR_getrandom)
  392|      0|    return syscall(__NR_getrandom, buf, buflen, 0);
  393|       |#elif (defined(__DragonFly__) && __DragonFly_version >= 500700) \
  394|       |    || (defined(__NetBSD__) && __NetBSD_Version >= 1000000000)  \
  395|       |    || (defined(__FreeBSD__) && __FreeBSD_version >= 1200061)
  396|       |    return getrandom(buf, buflen, 0);
  397|       |#elif (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND)
  398|       |    return sysctl_random(buf, buflen);
  399|       |#elif defined(__wasi__)
  400|       |    if (getentropy(buf, buflen) == 0)
  401|       |        return (ssize_t)buflen;
  402|       |    return -1;
  403|       |#else
  404|       |    errno = ENOSYS;
  405|       |    return -1;
  406|       |#endif
  407|    596|}

ossl_null_provider_init:
   74|    231|{
   75|    231|    *out = null_dispatch_table;
   76|       |
   77|       |    /* Could be anything - we don't use it */
   78|    231|    *provctx = (void *)handle;
   79|    231|    return 1;
   80|    231|}
nullprov.c:null_query:
   57|  16.3k|{
   58|  16.3k|    *no_cache = 0;
   59|       |    return NULL;
   60|  16.3k|}

ossl_prov_is_running:
   20|  2.16M|{
   21|  2.16M|    return 1;
   22|  2.16M|}

SSL_get_srtp_profiles:
  162|  2.48k|{
  163|  2.48k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  2.48k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  2.48k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  |  |   18|  2.48k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.48k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 2.48k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  2.48k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  2.48k|                             : NULL))
  |  |  ------------------
  ------------------
  164|       |
  165|  2.48k|    if (sc != NULL) {
  ------------------
  |  Branch (165:9): [True: 2.48k, False: 0]
  ------------------
  166|  2.48k|        if (sc->srtp_profiles != NULL) {
  ------------------
  |  Branch (166:13): [True: 0, False: 2.48k]
  ------------------
  167|      0|            return sc->srtp_profiles;
  168|  2.48k|        } else if ((s->ctx != NULL) && (s->ctx->srtp_profiles != NULL)) {
  ------------------
  |  Branch (168:20): [True: 2.48k, False: 0]
  |  Branch (168:40): [True: 0, False: 2.48k]
  ------------------
  169|      0|            return s->ctx->srtp_profiles;
  170|      0|        }
  171|  2.48k|    }
  172|       |
  173|  2.48k|    return NULL;
  174|  2.48k|}

ossl_ech_ctx_clear:
  158|  3.47k|{
  159|  3.47k|    if (ce == NULL)
  ------------------
  |  Branch (159:9): [True: 0, False: 3.47k]
  ------------------
  160|      0|        return;
  161|  3.47k|    OSSL_ECHSTORE_free(ce->es);
  162|  3.47k|    OPENSSL_free(ce->alpn_outer);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  163|  3.47k|    return;
  164|  3.47k|}
ossl_ech_conn_clear:
  181|  2.58k|{
  182|  2.58k|    if (ec == NULL)
  ------------------
  |  Branch (182:9): [True: 0, False: 2.58k]
  ------------------
  183|      0|        return;
  184|  2.58k|    OSSL_ECHSTORE_free(ec->es);
  185|  2.58k|    OPENSSL_free(ec->outer_hostname);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  186|  2.58k|    OPENSSL_free(ec->alpn_outer);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  187|  2.58k|    OPENSSL_free(ec->former_inner);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  188|  2.58k|    OPENSSL_free(ec->transbuf);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  189|  2.58k|    OPENSSL_free(ec->innerch);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  190|  2.58k|    OPENSSL_free(ec->grease_suite);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  191|  2.58k|    OPENSSL_free(ec->sent);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  192|  2.58k|    OPENSSL_free(ec->returned);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  193|  2.58k|    OPENSSL_free(ec->pub);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  194|  2.58k|    OSSL_HPKE_CTX_free(ec->hpke_ctx);
  195|  2.58k|    OPENSSL_free(ec->encoded_inner);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  196|  2.58k|    ech_free_stashed_key_shares(ec);
  197|  2.58k|    return;
  198|  2.58k|}
ossl_ech_conn_init:
  203|  2.58k|{
  204|  2.58k|    memset(&s->ext.ech, 0, sizeof(s->ext.ech));
  205|  2.58k|    if (ctx->ext.ech.es != NULL
  ------------------
  |  Branch (205:9): [True: 0, False: 2.58k]
  ------------------
  206|      0|        && (s->ext.ech.es = ossl_echstore_dup(ctx->ext.ech.es)) == NULL)
  ------------------
  |  Branch (206:12): [True: 0, False: 0]
  ------------------
  207|      0|        goto err;
  208|  2.58k|    s->ext.ech.cb = ctx->ext.ech.cb;
  209|  2.58k|    if (ctx->ext.ech.alpn_outer != NULL) {
  ------------------
  |  Branch (209:9): [True: 0, False: 2.58k]
  ------------------
  210|      0|        s->ext.ech.alpn_outer = OPENSSL_memdup(ctx->ext.ech.alpn_outer,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  211|      0|            ctx->ext.ech.alpn_outer_len);
  212|      0|        if (s->ext.ech.alpn_outer == NULL)
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            goto err;
  214|      0|        s->ext.ech.alpn_outer_len = ctx->ext.ech.alpn_outer_len;
  215|      0|    }
  216|       |    /* initialise type/cid to unknown */
  217|  2.58k|    s->ext.ech.attempted_type = OSSL_ECH_type_unknown;
  ------------------
  |  |   40|  2.58k|#define OSSL_ECH_type_unknown 0xffff
  ------------------
  218|  2.58k|    s->ext.ech.attempted_cid = OSSL_ECH_config_id_unset;
  ------------------
  |  |   42|  2.58k|#define OSSL_ECH_config_id_unset -1
  ------------------
  219|  2.58k|    if (s->ext.ech.es != NULL)
  ------------------
  |  Branch (219:9): [True: 0, False: 2.58k]
  ------------------
  220|      0|        s->ext.ech.attempted = 1;
  221|  2.58k|    if ((ctx->options & SSL_OP_ECH_GREASE) != 0)
  ------------------
  |  |  460|  2.58k|#define SSL_OP_ECH_GREASE SSL_OP_BIT(37)
  |  |  ------------------
  |  |  |  |  351|  2.58k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (221:9): [True: 0, False: 2.58k]
  ------------------
  222|      0|        s->options |= SSL_OP_ECH_GREASE;
  ------------------
  |  |  460|      0|#define SSL_OP_ECH_GREASE SSL_OP_BIT(37)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  223|  2.58k|    return 1;
  224|      0|err:
  225|      0|    OSSL_ECHSTORE_free(s->ext.ech.es);
  226|      0|    s->ext.ech.es = NULL;
  227|      0|    OPENSSL_free(s->ext.ech.alpn_outer);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  228|       |    s->ext.ech.alpn_outer = NULL;
  229|      0|    s->ext.ech.alpn_outer_len = 0;
  230|      0|    return 0;
  231|  2.58k|}
ech_internal.c:ech_free_stashed_key_shares:
  167|  2.58k|{
  168|  2.58k|    size_t i;
  169|       |
  170|  2.58k|    if (ec == NULL)
  ------------------
  |  Branch (170:9): [True: 0, False: 2.58k]
  ------------------
  171|      0|        return;
  172|  2.58k|    for (i = 0; i != ec->num_ks_pkey; i++) {
  ------------------
  |  Branch (172:17): [True: 0, False: 2.58k]
  ------------------
  173|      0|        EVP_PKEY_free(ec->ks_pkey[i]);
  174|       |        ec->ks_pkey[i] = NULL;
  175|      0|    }
  176|  2.58k|    ec->num_ks_pkey = 0;
  177|  2.58k|    return;
  178|  2.58k|}

OSSL_ECHSTORE_free:
  670|  6.05k|{
  671|  6.05k|    if (es == NULL)
  ------------------
  |  Branch (671:9): [True: 6.05k, False: 0]
  ------------------
  672|  6.05k|        return;
  673|      0|    sk_OSSL_ECHSTORE_ENTRY_pop_free(es->entries, ossl_echstore_entry_free);
  674|      0|    OPENSSL_free(es->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  675|      0|    OPENSSL_free(es);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  676|      0|    return;
  677|  6.05k|}

ossl_quic_free_token_store:
 4955|  3.47k|{
 4956|  3.47k|    int refs;
 4957|       |
 4958|  3.47k|    if (hdl == NULL)
  ------------------
  |  Branch (4958:9): [True: 3.47k, False: 0]
  ------------------
 4959|  3.47k|        return;
 4960|       |
 4961|      0|    if (!CRYPTO_DOWN_REF(&hdl->references, &refs))
  ------------------
  |  Branch (4961:9): [True: 0, False: 0]
  ------------------
 4962|      0|        return;
 4963|       |
 4964|      0|    if (refs > 0)
  ------------------
  |  Branch (4964:9): [True: 0, False: 0]
  ------------------
 4965|      0|        return;
 4966|       |
 4967|       |    /* last reference, we can clean up */
 4968|      0|    ossl_crypto_mutex_free(&hdl->mutex);
 4969|      0|    lh_QUIC_TOKEN_doall(hdl->cache, free_this_token);
 4970|      0|    lh_QUIC_TOKEN_free(hdl->cache);
 4971|      0|    CRYPTO_FREE_REF(&hdl->references);
 4972|      0|    OPENSSL_free(hdl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4973|      0|    return;
 4974|      0|}

ossl_quic_tls_free:
  658|  2.58k|{
  659|  2.58k|    if (qtls == NULL)
  ------------------
  |  Branch (659:9): [True: 2.58k, False: 0]
  ------------------
  660|  2.58k|        return;
  661|      0|    OSSL_ERR_STATE_free(qtls->error_state);
  662|      0|    OPENSSL_free(qtls);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  663|      0|}
ossl_quic_tls_clear:
  864|  5.17k|{
  865|  5.17k|    if (qtls == NULL)
  ------------------
  |  Branch (865:9): [True: 5.17k, False: 0]
  ------------------
  866|  5.17k|        return;
  867|      0|    qtls->local_transport_params_consumed = 0;
  868|      0|}

ossl_tls_buffer_release:
   27|  15.5k|{
   28|  15.5k|    OPENSSL_free(b->buf);
  ------------------
  |  |  132|  15.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   29|       |    b->buf = NULL;
   30|  15.5k|}
ossl_rlayer_fatal:
   50|    252|{
   51|    252|    va_list args;
   52|       |
   53|    252|    va_start(args, fmt);
   54|    252|    ERR_vset_error(ERR_LIB_SSL, reason, fmt, args);
  ------------------
  |  |   70|    252|#define ERR_LIB_SSL 20
  ------------------
   55|    252|    va_end(args);
   56|       |
   57|    252|    rl->alert = al;
   58|    252|}
tls_setup_write_buffer:
  144|  4.79k|{
  145|  4.79k|    unsigned char *p;
  146|  4.79k|    size_t maxalign = 0, headerlen;
  147|  4.79k|    TLS_BUFFER *wb;
  148|  4.79k|    size_t currpipe;
  149|  4.79k|    size_t defltlen = 0;
  150|  4.79k|    size_t contenttypelen = 0;
  151|       |
  152|  4.79k|    if (firstlen == 0 || (numwpipes > 1 && nextlen == 0)) {
  ------------------
  |  Branch (152:9): [True: 4.79k, False: 0]
  |  Branch (152:27): [True: 0, False: 0]
  |  Branch (152:44): [True: 0, False: 0]
  ------------------
  153|  4.79k|        if (rl->isdtls)
  ------------------
  |  Branch (153:13): [True: 0, False: 4.79k]
  ------------------
  154|      0|            headerlen = DTLS1_RT_HEADER_LENGTH + 1;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  155|  4.79k|        else
  156|  4.79k|            headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  4.79k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  157|       |
  158|       |        /* TLSv1.3 adds an extra content type byte after payload data */
  159|  4.79k|        if (rl->version == TLS1_3_VERSION)
  ------------------
  |  |   27|  4.79k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (159:13): [True: 3, False: 4.79k]
  ------------------
  160|      3|            contenttypelen = 1;
  161|       |
  162|  4.79k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  163|  4.79k|        maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  4.79k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  164|  4.79k|#endif
  165|       |
  166|  4.79k|        defltlen = maxalign + headerlen + rl->eivlen + rl->max_frag_len
  167|  4.79k|            + contenttypelen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  4.79k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  4.79k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  4.79k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  168|  4.79k|#ifndef OPENSSL_NO_COMP
  169|  4.79k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (169:13): [True: 0, False: 4.79k]
  ------------------
  170|      0|            defltlen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  171|  4.79k|#endif
  172|       |        /*
  173|       |         * We don't need to add eivlen here since empty fragments only occur
  174|       |         * when we don't have an explicit IV. The contenttype byte will also
  175|       |         * always be 0 in these protocol versions
  176|       |         */
  177|  4.79k|        if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0)
  ------------------
  |  |  378|  4.79k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  351|  4.79k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (177:13): [True: 4.78k, False: 7]
  ------------------
  178|  4.78k|            defltlen += headerlen + maxalign + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  4.78k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  4.78k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  4.78k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  179|  4.79k|    }
  180|       |
  181|  4.79k|    wb = rl->wbuf;
  182|  9.59k|    for (currpipe = 0; currpipe < numwpipes; currpipe++) {
  ------------------
  |  Branch (182:24): [True: 4.79k, False: 4.79k]
  ------------------
  183|  4.79k|        TLS_BUFFER *thiswb = &wb[currpipe];
  184|  4.79k|        size_t len = (currpipe == 0) ? firstlen : nextlen;
  ------------------
  |  Branch (184:22): [True: 4.79k, False: 0]
  ------------------
  185|       |
  186|  4.79k|        if (len == 0)
  ------------------
  |  Branch (186:13): [True: 4.79k, False: 0]
  ------------------
  187|  4.79k|            len = defltlen;
  188|       |
  189|  4.79k|        if (thiswb->len != len) {
  ------------------
  |  Branch (189:13): [True: 2.58k, False: 2.20k]
  ------------------
  190|  2.58k|            OPENSSL_free(thiswb->buf);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  191|  2.58k|            thiswb->buf = NULL; /* force reallocation */
  192|  2.58k|        }
  193|       |
  194|  4.79k|        p = thiswb->buf;
  195|  4.79k|        if (p == NULL) {
  ------------------
  |  Branch (195:13): [True: 2.58k, False: 2.20k]
  ------------------
  196|  2.58k|            p = OPENSSL_malloc(len);
  ------------------
  |  |  107|  2.58k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  197|  2.58k|            if (p == NULL) {
  ------------------
  |  Branch (197:17): [True: 0, False: 2.58k]
  ------------------
  198|      0|                if (rl->numwpipes < currpipe)
  ------------------
  |  Branch (198:21): [True: 0, False: 0]
  ------------------
  199|      0|                    rl->numwpipes = currpipe;
  200|       |                /*
  201|       |                 * We've got a malloc failure, and we're still initialising
  202|       |                 * buffers. We assume we're so doomed that we won't even be able
  203|       |                 * to send an alert.
  204|       |                 */
  205|      0|                RLAYERfatal(rl, SSL_AD_NO_ALERT, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  206|      0|                return 0;
  207|      0|            }
  208|  2.58k|        }
  209|  4.79k|        memset(thiswb, 0, sizeof(TLS_BUFFER));
  210|  4.79k|        thiswb->buf = p;
  211|  4.79k|        thiswb->len = len;
  212|  4.79k|    }
  213|       |
  214|       |    /* Free any previously allocated buffers that we are no longer using */
  215|  4.79k|    tls_release_write_buffer_int(rl, currpipe);
  216|       |
  217|  4.79k|    rl->numwpipes = numwpipes;
  218|       |
  219|  4.79k|    return 1;
  220|  4.79k|}
tls_setup_read_buffer:
  230|  2.48k|{
  231|  2.48k|    unsigned char *p;
  232|  2.48k|    size_t len, maxalign = 0, headerlen;
  233|  2.48k|    TLS_BUFFER *b;
  234|       |
  235|  2.48k|    b = &rl->rbuf;
  236|       |
  237|  2.48k|    if (rl->isdtls)
  ------------------
  |  Branch (237:9): [True: 0, False: 2.48k]
  ------------------
  238|      0|        headerlen = DTLS1_RT_HEADER_LENGTH;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  239|  2.48k|    else
  240|  2.48k|        headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  2.48k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  241|       |
  242|  2.48k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  243|  2.48k|    maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  2.48k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  244|  2.48k|#endif
  245|       |
  246|  2.48k|    if (b->buf == NULL) {
  ------------------
  |  Branch (246:9): [True: 2.48k, False: 0]
  ------------------
  247|  2.48k|        len = rl->max_frag_len
  248|  2.48k|            + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + maxalign;
  ------------------
  |  |  186|  2.48k|#define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  2.48k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  249|  2.48k|#ifndef OPENSSL_NO_COMP
  250|  2.48k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (250:13): [True: 0, False: 2.48k]
  ------------------
  251|      0|            len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  252|  2.48k|#endif
  253|       |
  254|       |        /* Ensure our buffer is large enough to support all our pipelines */
  255|  2.48k|        if (rl->max_pipelines > 1)
  ------------------
  |  Branch (255:13): [True: 0, False: 2.48k]
  ------------------
  256|      0|            len *= rl->max_pipelines;
  257|       |
  258|  2.48k|        if (b->default_len > len)
  ------------------
  |  Branch (258:13): [True: 2.48k, False: 0]
  ------------------
  259|  2.48k|            len = b->default_len;
  260|       |
  261|  2.48k|        if ((p = OPENSSL_malloc(len)) == NULL) {
  ------------------
  |  |  107|  2.48k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (261:13): [True: 0, False: 2.48k]
  ------------------
  262|       |            /*
  263|       |             * We've got a malloc failure, and we're still initialising buffers.
  264|       |             * We assume we're so doomed that we won't even be able to send an
  265|       |             * alert.
  266|       |             */
  267|      0|            RLAYERfatal(rl, SSL_AD_NO_ALERT, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  268|      0|            return 0;
  269|      0|        }
  270|  2.48k|        b->buf = p;
  271|  2.48k|        b->len = len;
  272|  2.48k|    }
  273|       |
  274|  2.48k|    return 1;
  275|  2.48k|}
tls_default_read_n:
  296|  3.25k|{
  297|       |    /*
  298|       |     * If extend == 0, obtain new n-byte packet; if extend == 1, increase
  299|       |     * packet by another n bytes. The packet will be in the sub-array of
  300|       |     * rl->rbuf.buf specified by rl->packet and rl->packet_length. (If
  301|       |     * rl->read_ahead is set, 'max' bytes may be stored in rbuf [plus
  302|       |     * rl->packet_length bytes if extend == 1].) if clearold == 1, move the
  303|       |     * packet to the start of the buffer; if clearold == 0 then leave any old
  304|       |     * packets where they were
  305|       |     */
  306|  3.25k|    size_t len, left, align = 0;
  307|  3.25k|    unsigned char *pkt;
  308|  3.25k|    TLS_BUFFER *rb;
  309|       |
  310|  3.25k|    if (n == 0)
  ------------------
  |  Branch (310:9): [True: 0, False: 3.25k]
  ------------------
  311|      0|        return OSSL_RECORD_RETURN_NON_FATAL_ERR;
  ------------------
  |  |   47|      0|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  312|       |
  313|  3.25k|    rb = &rl->rbuf;
  314|  3.25k|    left = rb->left;
  315|  3.25k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  316|  3.25k|    align = (size_t)rb->buf + SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  3.25k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  317|  3.25k|    align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  3.25k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
                  align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  3.25k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  318|  3.25k|#endif
  319|       |
  320|  3.25k|    if (!extend) {
  ------------------
  |  Branch (320:9): [True: 3.03k, False: 225]
  ------------------
  321|       |        /* start with empty packet ... */
  322|  3.03k|        if (left == 0)
  ------------------
  |  Branch (322:13): [True: 3.02k, False: 5]
  ------------------
  323|  3.02k|            rb->offset = align;
  324|       |
  325|  3.03k|        rl->packet = rb->buf + rb->offset;
  326|  3.03k|        rl->packet_length = 0;
  327|       |        /* ... now we can act as if 'extend' was set */
  328|  3.03k|    }
  329|       |
  330|  3.25k|    if (!ossl_assert(rl->packet != NULL)) {
  ------------------
  |  |   52|  3.25k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (330:9): [True: 0, False: 3.25k]
  ------------------
  331|       |        /* does not happen */
  332|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  333|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  334|      0|    }
  335|       |
  336|  3.25k|    len = rl->packet_length;
  337|  3.25k|    pkt = rb->buf + align;
  338|       |    /*
  339|       |     * Move any available bytes to front of buffer: 'len' bytes already
  340|       |     * pointed to by 'packet', 'left' extra ones at the end
  341|       |     */
  342|  3.25k|    if (rl->packet != pkt && clearold == 1) {
  ------------------
  |  Branch (342:9): [True: 0, False: 3.25k]
  |  Branch (342:30): [True: 0, False: 0]
  ------------------
  343|      0|        memmove(pkt, rl->packet, len + left);
  344|      0|        rl->packet = pkt;
  345|      0|        rb->offset = len + align;
  346|      0|    }
  347|       |
  348|       |    /*
  349|       |     * For DTLS/UDP reads should not span multiple packets because the read
  350|       |     * operation returns the whole packet at once (as long as it fits into
  351|       |     * the buffer).
  352|       |     */
  353|  3.25k|    if (rl->isdtls) {
  ------------------
  |  Branch (353:9): [True: 0, False: 3.25k]
  ------------------
  354|      0|        if (left == 0 && extend) {
  ------------------
  |  Branch (354:13): [True: 0, False: 0]
  |  Branch (354:26): [True: 0, False: 0]
  ------------------
  355|       |            /*
  356|       |             * We received a record with a header but no body data. This will
  357|       |             * get dumped.
  358|       |             */
  359|      0|            return OSSL_RECORD_RETURN_NON_FATAL_ERR;
  ------------------
  |  |   47|      0|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  360|      0|        }
  361|      0|        if (left > 0 && n > left)
  ------------------
  |  Branch (361:13): [True: 0, False: 0]
  |  Branch (361:25): [True: 0, False: 0]
  ------------------
  362|      0|            n = left;
  363|      0|    }
  364|       |
  365|       |    /* if there is enough in the buffer from a previous read, take some */
  366|  3.25k|    if (left >= n) {
  ------------------
  |  Branch (366:9): [True: 0, False: 3.25k]
  ------------------
  367|      0|        rl->packet_length += n;
  368|      0|        rb->left = left - n;
  369|      0|        rb->offset += n;
  370|      0|        *readbytes = n;
  371|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  372|      0|    }
  373|       |
  374|       |    /* else we need to read more data */
  375|       |
  376|  3.25k|    if (n > rb->len - rb->offset) {
  ------------------
  |  Branch (376:9): [True: 0, False: 3.25k]
  ------------------
  377|       |        /* does not happen */
  378|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  379|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  380|      0|    }
  381|       |
  382|       |    /* We always act like read_ahead is set for DTLS */
  383|  3.25k|    if (!rl->read_ahead && !rl->isdtls) {
  ------------------
  |  Branch (383:9): [True: 3.25k, False: 0]
  |  Branch (383:28): [True: 3.25k, False: 0]
  ------------------
  384|       |        /* ignore max parameter */
  385|  3.25k|        max = n;
  386|  3.25k|    } else {
  387|      0|        if (max < n)
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  ------------------
  388|      0|            max = n;
  389|      0|        if (max > rb->len - rb->offset)
  ------------------
  |  Branch (389:13): [True: 0, False: 0]
  ------------------
  390|      0|            max = rb->len - rb->offset;
  391|      0|    }
  392|       |
  393|  4.00k|    while (left < n) {
  ------------------
  |  Branch (393:12): [True: 3.31k, False: 694]
  ------------------
  394|  3.31k|        size_t bioread = 0;
  395|  3.31k|        int ret;
  396|  3.31k|        BIO *bio = rl->prev != NULL ? rl->prev : rl->bio;
  ------------------
  |  Branch (396:20): [True: 0, False: 3.31k]
  ------------------
  397|       |
  398|       |        /*
  399|       |         * Now we have len+left bytes at the front of rl->rbuf.buf and
  400|       |         * need to read in more until we have len + n (up to len + max if
  401|       |         * possible)
  402|       |         */
  403|       |
  404|  3.31k|        clear_sys_error();
  ------------------
  |  |   31|  3.31k|#define clear_sys_error() errno = 0
  ------------------
  405|  3.31k|        if (bio != NULL) {
  ------------------
  |  Branch (405:13): [True: 3.31k, False: 0]
  ------------------
  406|  3.31k|            ret = BIO_read(bio, pkt + len + left, (int)(max - left));
  407|  3.31k|            if (ret > 0) {
  ------------------
  |  Branch (407:17): [True: 748, False: 2.56k]
  ------------------
  408|    748|                bioread = ret;
  409|    748|                ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    748|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  410|  2.56k|            } else if (BIO_should_retry(bio)) {
  ------------------
  |  |  281|  2.56k|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|  2.56k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (281:29): [True: 484, False: 2.07k]
  |  |  ------------------
  ------------------
  411|    484|                if (rl->prev != NULL) {
  ------------------
  |  Branch (411:21): [True: 0, False: 484]
  ------------------
  412|       |                    /*
  413|       |                     * We were reading from the previous epoch. Now there is no
  414|       |                     * more data, so swap to the actual transport BIO
  415|       |                     */
  416|      0|                    BIO_free(rl->prev);
  417|      0|                    rl->prev = NULL;
  418|      0|                    continue;
  419|      0|                }
  420|    484|                ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|    484|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  421|  2.07k|            } else if (BIO_eof(bio)) {
  ------------------
  |  Branch (421:24): [True: 2.05k, False: 23]
  ------------------
  422|  2.05k|                ret = OSSL_RECORD_RETURN_EOF;
  ------------------
  |  |   49|  2.05k|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  423|  2.05k|            } else {
  424|     23|                ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|     23|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  425|     23|            }
  426|  3.31k|        } else {
  427|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_READ_BIO_NOT_SET);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  428|      0|            ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  429|      0|        }
  430|       |
  431|  3.31k|        if (ret <= OSSL_RECORD_RETURN_RETRY) {
  ------------------
  |  |   46|  3.31k|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  |  Branch (431:13): [True: 2.56k, False: 748]
  ------------------
  432|  2.56k|            rb->left = left;
  433|  2.56k|            if ((rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0 && !rl->isdtls)
  ------------------
  |  |  537|  2.56k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (433:17): [True: 0, False: 2.56k]
  |  Branch (433:63): [True: 0, False: 0]
  ------------------
  434|      0|                if (len + left == 0)
  ------------------
  |  Branch (434:21): [True: 0, False: 0]
  ------------------
  435|      0|                    tls_release_read_buffer(rl);
  436|  2.56k|            return ret;
  437|  2.56k|        }
  438|    748|        left += bioread;
  439|       |        /*
  440|       |         * reads should *never* span multiple packets for DTLS because the
  441|       |         * underlying transport protocol is message oriented as opposed to
  442|       |         * byte oriented as in the TLS case.
  443|       |         */
  444|    748|        if (rl->isdtls) {
  ------------------
  |  Branch (444:13): [True: 0, False: 748]
  ------------------
  445|      0|            if (n > left)
  ------------------
  |  Branch (445:17): [True: 0, False: 0]
  ------------------
  446|      0|                n = left; /* makes the while condition false */
  447|      0|        }
  448|    748|    }
  449|       |
  450|       |    /* done reading, now the book-keeping */
  451|    694|    rb->offset += n;
  452|    694|    rb->left = left - n;
  453|    694|    rl->packet_length += n;
  454|    694|    *readbytes = n;
  455|    694|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    694|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  456|  3.25k|}
tls_get_more_records:
  544|  3.03k|{
  545|  3.03k|    int enc_err, rret;
  546|  3.03k|    int i;
  547|  3.03k|    size_t more, n;
  548|  3.03k|    TLS_RL_RECORD *rr, *thisrr;
  549|  3.03k|    TLS_BUFFER *rbuf;
  550|  3.03k|    unsigned char *p;
  551|  3.03k|    unsigned char md[EVP_MAX_MD_SIZE];
  552|  3.03k|    unsigned int version;
  553|  3.03k|    size_t mac_size = 0;
  554|  3.03k|    int imac_size;
  555|  3.03k|    size_t num_recs = 0, max_recs, j;
  556|  3.03k|    PACKET pkt;
  557|  3.03k|    SSL_MAC_BUF *macbufs = NULL;
  558|  3.03k|    int ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|  3.03k|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  559|       |
  560|  3.03k|    rr = rl->rrec;
  561|  3.03k|    rbuf = &rl->rbuf;
  562|  3.03k|    if (rbuf->buf == NULL) {
  ------------------
  |  Branch (562:9): [True: 2.48k, False: 552]
  ------------------
  563|  2.48k|        if (!tls_setup_read_buffer(rl)) {
  ------------------
  |  Branch (563:13): [True: 0, False: 2.48k]
  ------------------
  564|       |            /* RLAYERfatal() already called */
  565|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  566|      0|        }
  567|  2.48k|    }
  568|       |
  569|  3.03k|    max_recs = rl->max_pipelines;
  570|       |
  571|  3.03k|    if (max_recs == 0)
  ------------------
  |  Branch (571:9): [True: 3.03k, False: 0]
  ------------------
  572|  3.03k|        max_recs = 1;
  573|       |
  574|  3.03k|    do {
  575|  3.03k|        thisrr = &rr[num_recs];
  576|       |
  577|       |        /* check if we have the header */
  578|  3.03k|        if ((rl->rstate != SSL_ST_READ_BODY) || (rl->packet_length < SSL3_RT_HEADER_LENGTH)) {
  ------------------
  |  | 1184|  3.03k|#define SSL_ST_READ_BODY 0xF1
  ------------------
                      if ((rl->rstate != SSL_ST_READ_BODY) || (rl->packet_length < SSL3_RT_HEADER_LENGTH)) {
  ------------------
  |  |  139|      1|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (578:13): [True: 3.03k, False: 1]
  |  Branch (578:49): [True: 0, False: 1]
  ------------------
  579|  3.03k|            unsigned int type;
  580|       |
  581|  3.03k|            rret = rl->funcs->read_n(rl, SSL3_RT_HEADER_LENGTH,
  ------------------
  |  |  139|  3.03k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  582|  3.03k|                TLS_BUFFER_get_len(rbuf), 0,
  ------------------
  |  |  526|  3.03k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
  583|  3.03k|                num_recs == 0 ? 1 : 0, &n);
  ------------------
  |  Branch (583:17): [True: 3.03k, False: 0]
  ------------------
  584|       |
  585|  3.03k|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  3.03k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (585:17): [True: 2.53k, False: 495]
  ------------------
  586|  2.53k|                return rret; /* error or non-blocking */
  587|       |
  588|    495|            rl->rstate = SSL_ST_READ_BODY;
  ------------------
  |  | 1184|    495|#define SSL_ST_READ_BODY 0xF1
  ------------------
  589|       |
  590|    495|            p = rl->packet;
  591|    495|            if (!PACKET_buf_init(&pkt, p, rl->packet_length)) {
  ------------------
  |  Branch (591:17): [True: 0, False: 495]
  ------------------
  592|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  593|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  594|      0|            }
  595|       |
  596|       |            /* Pull apart the header into the TLS_RL_RECORD */
  597|    495|            if (!PACKET_get_1(&pkt, &type)
  ------------------
  |  Branch (597:17): [True: 0, False: 495]
  ------------------
  598|    495|                || !PACKET_get_net_2(&pkt, &version)
  ------------------
  |  Branch (598:20): [True: 0, False: 495]
  ------------------
  599|    495|                || !PACKET_get_net_2_len(&pkt, &thisrr->length)) {
  ------------------
  |  Branch (599:20): [True: 0, False: 495]
  ------------------
  600|      0|                if (rl->msg_callback != NULL)
  ------------------
  |  Branch (600:21): [True: 0, False: 0]
  ------------------
  601|      0|                    rl->msg_callback(0, 0, SSL3_RT_HEADER, p, 5, rl->cbarg);
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
  602|      0|                RLAYERfatal(rl, SSL_AD_DECODE_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  603|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  604|      0|            }
  605|    495|            thisrr->type = type;
  606|    495|            thisrr->rec_version = version;
  607|       |
  608|    495|            if (rl->msg_callback != NULL)
  ------------------
  |  Branch (608:17): [True: 0, False: 495]
  ------------------
  609|      0|                rl->msg_callback(0, version, SSL3_RT_HEADER, p, 5, rl->cbarg);
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
  610|       |
  611|    495|            if (!rl->funcs->validate_record_header(rl, thisrr)) {
  ------------------
  |  Branch (611:17): [True: 252, False: 243]
  ------------------
  612|       |                /* RLAYERfatal already called */
  613|    252|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|    252|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  614|    252|            }
  615|       |
  616|    243|            if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  526|    243|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
                          if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  139|    243|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (616:17): [True: 0, False: 243]
  ------------------
  617|      0|                RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  618|      0|                    SSL_R_PACKET_LENGTH_TOO_LONG);
  619|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  620|      0|            }
  621|       |
  622|       |            /* now rl->rstate == SSL_ST_READ_BODY */
  623|    243|        }
  624|       |
  625|       |        /*
  626|       |         * rl->rstate == SSL_ST_READ_BODY, get and decode the data. Calculate
  627|       |         * how much more data we need to read for the rest of the record
  628|       |         */
  629|    244|        if (thisrr->rec_version == SSL2_VERSION) {
  ------------------
  |  |   23|    244|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (629:13): [True: 0, False: 244]
  ------------------
  630|      0|            more = thisrr->length + SSL2_RT_HEADER_LENGTH
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  631|      0|                - SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|      0|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  632|    244|        } else {
  633|    244|            more = thisrr->length;
  634|    244|        }
  635|       |
  636|    244|        if (more > 0) {
  ------------------
  |  Branch (636:13): [True: 225, False: 19]
  ------------------
  637|       |            /* now rl->packet_length == SSL3_RT_HEADER_LENGTH */
  638|       |
  639|    225|            rret = rl->funcs->read_n(rl, more, more, 1, 0, &n);
  640|    225|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|    225|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (640:17): [True: 26, False: 199]
  ------------------
  641|     26|                return rret; /* error or non-blocking io */
  642|    225|        }
  643|       |
  644|       |        /* set state for later operations */
  645|    218|        rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1183|    218|#define SSL_ST_READ_HEADER 0xF0
  ------------------
  646|       |
  647|       |        /*
  648|       |         * At this point, rl->packet_length == SSL3_RT_HEADER_LENGTH
  649|       |         * + thisrr->length, or rl->packet_length == SSL2_RT_HEADER_LENGTH
  650|       |         * + thisrr->length and we have that many bytes in rl->packet
  651|       |         */
  652|    218|        if (thisrr->rec_version == SSL2_VERSION)
  ------------------
  |  |   23|    218|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (652:13): [True: 0, False: 218]
  ------------------
  653|      0|            thisrr->input = &(rl->packet[SSL2_RT_HEADER_LENGTH]);
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  654|    218|        else
  655|    218|            thisrr->input = &(rl->packet[SSL3_RT_HEADER_LENGTH]);
  ------------------
  |  |  139|    218|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  656|       |
  657|       |        /*
  658|       |         * ok, we can now read from 'rl->packet' data into 'thisrr'.
  659|       |         * thisrr->input points at thisrr->length bytes, which need to be copied
  660|       |         * into thisrr->data by either the decryption or by the decompression.
  661|       |         * When the data is 'copied' into the thisrr->data buffer,
  662|       |         * thisrr->input will be updated to point at the new buffer
  663|       |         */
  664|       |
  665|       |        /*
  666|       |         * We now have - encrypted [ MAC [ compressed [ plain ] ] ]
  667|       |         * thisrr->length bytes of encrypted compressed stuff.
  668|       |         */
  669|       |
  670|       |        /* decrypt in place in 'thisrr->input' */
  671|    218|        thisrr->data = thisrr->input;
  672|    218|        thisrr->orig_len = thisrr->length;
  673|       |
  674|    218|        num_recs++;
  675|       |
  676|       |        /* we have pulled in a full packet so zero things */
  677|    218|        rl->packet_length = 0;
  678|    218|        rl->is_first_record = 0;
  679|    218|    } while (num_recs < max_recs
  ------------------
  |  Branch (679:14): [True: 0, False: 218]
  ------------------
  680|      0|        && thisrr->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    218|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (680:12): [True: 0, False: 0]
  ------------------
  681|      0|        && RLAYER_USE_EXPLICIT_IV(rl)
  ------------------
  |  |  396|    218|#define RLAYER_USE_EXPLICIT_IV(rl) ((rl)->version == TLS1_1_VERSION \
  |  |  ------------------
  |  |  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  |  |  ------------------
  |  |  |  Branch (396:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  397|      0|    || (rl)->version == TLS1_2_VERSION                              \
  |  |  ------------------
  |  |  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  |  |  ------------------
  |  |  |  Branch (397:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  398|      0|    || (rl)->version == DTLS1_BAD_VER                               \
  |  |  ------------------
  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  ------------------
  |  |  |  Branch (398:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  399|      0|    || (rl)->version == DTLS1_VERSION                               \
  |  |  ------------------
  |  |  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  |  |  ------------------
  |  |  |  Branch (399:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  400|    218|    || (rl)->version == DTLS1_2_VERSION)
  |  |  ------------------
  |  |  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  |  |  ------------------
  |  |  |  Branch (400:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  682|      0|        && rl->enc_ctx != NULL
  ------------------
  |  Branch (682:12): [True: 0, False: 0]
  ------------------
  683|      0|        && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx))
  ------------------
  |  Branch (683:12): [True: 0, False: 0]
  ------------------
  684|      0|               & EVP_CIPH_FLAG_PIPELINE)
  ------------------
  |  |  259|      0|#define EVP_CIPH_FLAG_PIPELINE 0X800000
  ------------------
  685|      0|            != 0
  686|      0|        && tls_record_app_data_waiting(rl));
  ------------------
  |  Branch (686:12): [True: 0, False: 0]
  ------------------
  687|       |
  688|    218|    if (num_recs == 1
  ------------------
  |  Branch (688:9): [True: 218, False: 0]
  ------------------
  689|    218|        && thisrr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|    436|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (689:12): [True: 11, False: 207]
  ------------------
  690|       |        /* The following can happen in tlsany_meth after HRR */
  691|     11|        && rl->version == TLS1_3_VERSION
  ------------------
  |  |   27|    229|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (691:12): [True: 0, False: 11]
  ------------------
  692|      0|        && rl->is_first_handshake) {
  ------------------
  |  Branch (692:12): [True: 0, False: 0]
  ------------------
  693|       |        /*
  694|       |         * CCS messages must be exactly 1 byte long, containing the value 0x01
  695|       |         */
  696|      0|        if (thisrr->length != 1 || thisrr->data[0] != 0x01) {
  ------------------
  |  Branch (696:13): [True: 0, False: 0]
  |  Branch (696:36): [True: 0, False: 0]
  ------------------
  697|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  698|      0|                SSL_R_INVALID_CCS_MESSAGE);
  699|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  700|      0|        }
  701|       |        /*
  702|       |         * CCS messages are ignored in TLSv1.3. We treat it like an empty
  703|       |         * handshake record - but we still call the msg_callback
  704|       |         */
  705|      0|        if (rl->msg_callback != NULL)
  ------------------
  |  Branch (705:13): [True: 0, False: 0]
  ------------------
  706|      0|            rl->msg_callback(0, TLS1_3_VERSION, SSL3_RT_CHANGE_CIPHER_SPEC,
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
                          rl->msg_callback(0, TLS1_3_VERSION, SSL3_RT_CHANGE_CIPHER_SPEC,
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  707|      0|                thisrr->data, 1, rl->cbarg);
  708|      0|        thisrr->type = SSL3_RT_HANDSHAKE;
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  709|      0|        if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|      0|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (709:13): [True: 0, False: 0]
  ------------------
  710|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  711|      0|                SSL_R_UNEXPECTED_CCS_MESSAGE);
  712|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  713|      0|        }
  714|      0|        rl->num_recs = 0;
  715|      0|        rl->curr_rec = 0;
  716|      0|        rl->num_released = 0;
  717|       |
  718|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  719|      0|    }
  720|       |
  721|    218|    if (rl->md_ctx != NULL) {
  ------------------
  |  Branch (721:9): [True: 0, False: 218]
  ------------------
  722|      0|        const EVP_MD *tmpmd = EVP_MD_CTX_get0_md(rl->md_ctx);
  723|       |
  724|      0|        if (tmpmd != NULL) {
  ------------------
  |  Branch (724:13): [True: 0, False: 0]
  ------------------
  725|      0|            imac_size = EVP_MD_get_size(tmpmd);
  726|      0|            if (!ossl_assert(imac_size > 0 && imac_size <= EVP_MAX_MD_SIZE)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (726:17): [True: 0, False: 0]
  ------------------
  727|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  728|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  729|      0|            }
  730|      0|            mac_size = (size_t)imac_size;
  731|      0|        }
  732|      0|    }
  733|       |
  734|       |    /*
  735|       |     * If in encrypt-then-mac mode calculate mac from encrypted record. All
  736|       |     * the details below are public so no timing details can leak.
  737|       |     */
  738|    218|    if (rl->use_etm && rl->md_ctx != NULL) {
  ------------------
  |  Branch (738:9): [True: 0, False: 218]
  |  Branch (738:24): [True: 0, False: 0]
  ------------------
  739|      0|        unsigned char *mac;
  740|       |
  741|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (741:21): [True: 0, False: 0]
  ------------------
  742|      0|            thisrr = &rr[j];
  743|       |
  744|      0|            if (thisrr->length < mac_size) {
  ------------------
  |  Branch (744:17): [True: 0, False: 0]
  ------------------
  745|      0|                RLAYERfatal(rl, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_TOO_SHORT);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  746|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  747|      0|            }
  748|      0|            thisrr->length -= mac_size;
  749|      0|            mac = thisrr->data + thisrr->length;
  750|      0|            i = rl->funcs->mac(rl, thisrr, md, 0 /* not send */);
  751|      0|            if (i == 0 || CRYPTO_memcmp(md, mac, mac_size) != 0) {
  ------------------
  |  |  332|      0|#define CRYPTO_memcmp memcmp
  ------------------
  |  Branch (751:17): [True: 0, False: 0]
  |  Branch (751:27): [True: 0, False: 0]
  ------------------
  752|      0|                RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  753|      0|                    SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  754|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  755|      0|            }
  756|      0|        }
  757|       |        /*
  758|       |         * We've handled the mac now - there is no MAC inside the encrypted
  759|       |         * record
  760|       |         */
  761|      0|        mac_size = 0;
  762|      0|    }
  763|       |
  764|    218|    if (mac_size > 0) {
  ------------------
  |  Branch (764:9): [True: 0, False: 218]
  ------------------
  765|      0|        macbufs = OPENSSL_calloc(num_recs, sizeof(*macbufs));
  ------------------
  |  |  113|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  766|      0|        if (macbufs == NULL) {
  ------------------
  |  Branch (766:13): [True: 0, False: 0]
  ------------------
  767|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  768|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  769|      0|        }
  770|      0|    }
  771|       |
  772|    218|    ERR_set_mark();
  773|    218|    enc_err = rl->funcs->cipher(rl, rr, num_recs, 0, macbufs, mac_size);
  774|       |
  775|       |    /*-
  776|       |     * enc_err is:
  777|       |     *    0: if the record is publicly invalid, or an internal error, or AEAD
  778|       |     *       decryption failed, or ETM decryption failed.
  779|       |     *    1: Success or MTE decryption failed (MAC will be randomised)
  780|       |     */
  781|    218|    if (enc_err == 0) {
  ------------------
  |  Branch (781:9): [True: 0, False: 218]
  ------------------
  782|      0|        if (rl->alert != SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (782:13): [True: 0, False: 0]
  ------------------
  783|       |            /* RLAYERfatal() already got called */
  784|      0|            ERR_clear_last_mark();
  785|      0|            goto end;
  786|      0|        }
  787|      0|        if (num_recs == 1
  ------------------
  |  Branch (787:13): [True: 0, False: 0]
  ------------------
  788|      0|            && rl->skip_early_data != NULL
  ------------------
  |  Branch (788:16): [True: 0, False: 0]
  ------------------
  789|      0|            && rl->skip_early_data(rl->cbarg)) {
  ------------------
  |  Branch (789:16): [True: 0, False: 0]
  ------------------
  790|       |            /*
  791|       |             * Valid early_data that we cannot decrypt will fail here. We treat
  792|       |             * it like an empty record.
  793|       |             */
  794|       |
  795|       |            /*
  796|       |             * Remove any errors from the stack. Decryption failures are normal
  797|       |             * behaviour.
  798|       |             */
  799|      0|            ERR_pop_to_mark();
  800|       |
  801|      0|            thisrr = &rr[0];
  802|       |
  803|      0|            if (!rlayer_early_data_count_ok(rl, thisrr->length,
  ------------------
  |  Branch (803:17): [True: 0, False: 0]
  ------------------
  804|      0|                    EARLY_DATA_CIPHERTEXT_OVERHEAD, 0)) {
  ------------------
  |  |  626|      0|#define EARLY_DATA_CIPHERTEXT_OVERHEAD ((6 * (EVP_GCM_TLS_TAG_LEN + 1)) + 2)
  |  |  ------------------
  |  |  |  |  375|      0|#define EVP_GCM_TLS_TAG_LEN 16
  |  |  ------------------
  ------------------
  805|       |                /* RLAYERfatal() already called */
  806|      0|                goto end;
  807|      0|            }
  808|       |
  809|      0|            thisrr->length = 0;
  810|      0|            rl->num_recs = 0;
  811|      0|            rl->curr_rec = 0;
  812|      0|            rl->num_released = 0;
  813|       |            /* Reset the read sequence */
  814|      0|            memset(rl->sequence, 0, sizeof(rl->sequence));
  815|      0|            ret = 1;
  816|      0|            goto end;
  817|      0|        }
  818|      0|        ERR_clear_last_mark();
  819|      0|        RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  820|      0|            SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  821|      0|        goto end;
  822|    218|    } else {
  823|    218|        ERR_clear_last_mark();
  824|    218|    }
  825|    218|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|    218|    do {                           \
  |  |  220|    218|        BIO *trc_out = NULL;       \
  |  |  221|    218|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 218]
  |  |  ------------------
  ------------------
  826|      0|    {
  827|      0|        BIO_printf(trc_out, "dec %lu\n", (unsigned long)rr[0].length);
  828|      0|        BIO_dump_indent(trc_out, rr[0].data, (int)rr[0].length, 4);
  829|      0|    }
  830|    218|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|    218|    }                            \
  |  |  225|    218|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 218]
  |  |  ------------------
  ------------------
  831|       |
  832|       |    /* r->length is now the compressed data plus mac */
  833|    218|    if (rl->enc_ctx != NULL
  ------------------
  |  Branch (833:9): [True: 0, False: 218]
  ------------------
  834|      0|        && !rl->use_etm
  ------------------
  |  Branch (834:12): [True: 0, False: 0]
  ------------------
  835|      0|        && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) {
  ------------------
  |  Branch (835:12): [True: 0, False: 0]
  ------------------
  836|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (836:21): [True: 0, False: 0]
  ------------------
  837|      0|            SSL_MAC_BUF *thismb = &macbufs[j];
  838|       |
  839|      0|            thisrr = &rr[j];
  840|       |
  841|      0|            i = rl->funcs->mac(rl, thisrr, md, 0 /* not send */);
  842|      0|            if (i == 0 || thismb == NULL || thismb->mac == NULL
  ------------------
  |  Branch (842:17): [True: 0, False: 0]
  |  Branch (842:27): [True: 0, False: 0]
  |  Branch (842:45): [True: 0, False: 0]
  ------------------
  843|      0|                || CRYPTO_memcmp(md, thismb->mac, (size_t)mac_size) != 0)
  ------------------
  |  |  332|      0|#define CRYPTO_memcmp memcmp
  ------------------
  |  Branch (843:20): [True: 0, False: 0]
  ------------------
  844|      0|                enc_err = 0;
  845|      0|            if (thisrr->length > SSL3_RT_MAX_COMPRESSED_LENGTH + mac_size)
  ------------------
  |  |  203|      0|    (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_COMPRESSED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  |  |  ------------------
  |  |                   (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_COMPRESSED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  |  |  ------------------
  ------------------
  |  Branch (845:17): [True: 0, False: 0]
  ------------------
  846|      0|                enc_err = 0;
  847|      0|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  848|      0|            if (enc_err == 0 && mac_size > 0 && thismb != NULL && thismb->mac != NULL && (md[0] ^ thismb->mac[0]) != 0xFF) {
  ------------------
  |  Branch (848:17): [True: 0, False: 0]
  |  Branch (848:33): [True: 0, False: 0]
  |  Branch (848:49): [True: 0, False: 0]
  |  Branch (848:67): [True: 0, False: 0]
  |  Branch (848:90): [True: 0, False: 0]
  ------------------
  849|      0|                enc_err = 1;
  850|      0|            }
  851|      0|#endif
  852|      0|        }
  853|      0|    }
  854|       |
  855|    218|    if (enc_err == 0) {
  ------------------
  |  Branch (855:9): [True: 0, False: 218]
  ------------------
  856|      0|        if (rl->alert != SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (856:13): [True: 0, False: 0]
  ------------------
  857|       |            /* We already called RLAYERfatal() */
  858|      0|            goto end;
  859|      0|        }
  860|       |        /*
  861|       |         * A separate 'decryption_failed' alert was introduced with TLS 1.0,
  862|       |         * SSL 3.0 only has 'bad_record_mac'.  But unless a decryption
  863|       |         * failure is directly visible from the ciphertext anyway, we should
  864|       |         * not reveal which kind of error occurred -- this might become
  865|       |         * visible to an attacker (e.g. via a logfile)
  866|       |         */
  867|      0|        RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  868|      0|            SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  869|      0|        goto end;
  870|      0|    }
  871|       |
  872|    436|    for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (872:17): [True: 218, False: 218]
  ------------------
  873|    218|        thisrr = &rr[j];
  874|       |
  875|    218|        if (!rl->funcs->post_process_record(rl, thisrr)) {
  ------------------
  |  Branch (875:13): [True: 0, False: 218]
  ------------------
  876|       |            /* RLAYERfatal already called */
  877|      0|            goto end;
  878|      0|        }
  879|       |
  880|       |        /*
  881|       |         * Record overflow checking (e.g. checking if
  882|       |         * thisrr->length > SSL3_RT_MAX_PLAIN_LENGTH) is the responsibility of
  883|       |         * the post_process_record() function above. However we check here if
  884|       |         * the received packet overflows the current Max Fragment Length setting
  885|       |         * if there is one.
  886|       |         * Note: rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH and KTLS are
  887|       |         * mutually exclusive. Also note that with KTLS thisrr->length can
  888|       |         * be > SSL3_RT_MAX_PLAIN_LENGTH (and rl->max_frag_len must be ignored)
  889|       |         */
  890|    218|        if (rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH
  ------------------
  |  |  177|    436|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (890:13): [True: 0, False: 218]
  ------------------
  891|      0|            && thisrr->length > rl->max_frag_len) {
  ------------------
  |  Branch (891:16): [True: 0, False: 0]
  ------------------
  892|      0|            RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  893|      0|            goto end;
  894|      0|        }
  895|       |
  896|    218|        thisrr->off = 0;
  897|       |        /*-
  898|       |         * So at this point the following is true
  899|       |         * thisrr->type   is the type of record
  900|       |         * thisrr->length == number of bytes in record
  901|       |         * thisrr->off    == offset to first valid byte
  902|       |         * thisrr->data   == where to take bytes from, increment after use :-).
  903|       |         */
  904|       |
  905|       |        /* just read a 0 length packet */
  906|    218|        if (thisrr->length == 0) {
  ------------------
  |  Branch (906:13): [True: 19, False: 199]
  ------------------
  907|     19|            if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|     19|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (907:17): [True: 0, False: 19]
  ------------------
  908|      0|                RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  909|      0|                    SSL_R_RECORD_TOO_SMALL);
  910|      0|                goto end;
  911|      0|            }
  912|    199|        } else {
  913|    199|            rl->empty_record_count = 0;
  914|    199|        }
  915|    218|    }
  916|       |
  917|    218|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_EARLY) {
  ------------------
  |  | 2924|    218|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
  |  Branch (917:9): [True: 0, False: 218]
  ------------------
  918|      0|        thisrr = &rr[0];
  919|      0|        if (thisrr->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (919:13): [True: 0, False: 0]
  ------------------
  920|      0|            && !rlayer_early_data_count_ok(rl, thisrr->length, 0, 0)) {
  ------------------
  |  Branch (920:16): [True: 0, False: 0]
  ------------------
  921|       |            /* RLAYERfatal already called */
  922|      0|            goto end;
  923|      0|        }
  924|      0|    }
  925|       |
  926|    218|    rl->num_recs = num_recs;
  927|    218|    rl->curr_rec = 0;
  928|    218|    rl->num_released = 0;
  929|    218|    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    218|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  930|    218|end:
  931|    218|    if (macbufs != NULL) {
  ------------------
  |  Branch (931:9): [True: 0, False: 218]
  ------------------
  932|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (932:21): [True: 0, False: 0]
  ------------------
  933|      0|            if (macbufs[j].alloced)
  ------------------
  |  Branch (933:17): [True: 0, False: 0]
  ------------------
  934|      0|                OPENSSL_free(macbufs[j].mac);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  935|      0|        }
  936|      0|        OPENSSL_free(macbufs);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  937|      0|    }
  938|    218|    return ret;
  939|    218|}
tls_default_post_process_record:
 1015|    218|{
 1016|    218|    if (rl->compctx != NULL) {
  ------------------
  |  Branch (1016:9): [True: 0, False: 218]
  ------------------
 1017|      0|        if (rec->length > SSL3_RT_MAX_COMPRESSED_LENGTH) {
  ------------------
  |  |  203|      0|    (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_COMPRESSED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  |  |  ------------------
  |  |                   (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_COMPRESSED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  |  |  ------------------
  ------------------
  |  Branch (1017:13): [True: 0, False: 0]
  ------------------
 1018|      0|            RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1019|      0|                SSL_R_COMPRESSED_LENGTH_TOO_LONG);
 1020|      0|            return 0;
 1021|      0|        }
 1022|      0|        if (!tls_do_uncompress(rl, rec)) {
  ------------------
  |  Branch (1022:13): [True: 0, False: 0]
  ------------------
 1023|      0|            RLAYERfatal(rl, SSL_AD_DECOMPRESSION_FAILURE,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1024|      0|                SSL_R_BAD_DECOMPRESSION);
 1025|      0|            return 0;
 1026|      0|        }
 1027|      0|    }
 1028|       |
 1029|    218|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|    218|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1029:9): [True: 0, False: 218]
  ------------------
 1030|      0|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1031|      0|        return 0;
 1032|      0|    }
 1033|       |
 1034|    218|    return 1;
 1035|    218|}
tls_read_record:
 1070|  3.03k|{
 1071|  3.03k|    TLS_RL_RECORD *rec;
 1072|       |
 1073|       |    /*
 1074|       |     * tls_get_more_records() can return success without actually reading
 1075|       |     * anything useful (i.e. if empty records are read). We loop here until
 1076|       |     * we have something useful. tls_get_more_records() will eventually fail if
 1077|       |     * too many sequential empty records are read.
 1078|       |     */
 1079|  3.25k|    while (rl->curr_rec >= rl->num_recs) {
  ------------------
  |  Branch (1079:12): [True: 3.03k, False: 218]
  ------------------
 1080|  3.03k|        int ret;
 1081|       |
 1082|  3.03k|        if (rl->num_released != rl->num_recs) {
  ------------------
  |  Branch (1082:13): [True: 0, False: 3.03k]
  ------------------
 1083|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_RECORDS_NOT_RELEASED);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1084|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1085|      0|        }
 1086|       |
 1087|  3.03k|        ret = rl->funcs->get_more_records(rl);
 1088|       |
 1089|  3.03k|        if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  3.03k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1089:13): [True: 2.81k, False: 218]
  ------------------
 1090|  2.81k|            return ret;
 1091|  3.03k|    }
 1092|       |
 1093|       |    /*
 1094|       |     * We have now got rl->num_recs records buffered in rl->rrec. rl->curr_rec
 1095|       |     * points to the next one to read.
 1096|       |     */
 1097|    218|    rec = &rl->rrec[rl->curr_rec++];
 1098|       |
 1099|    218|    *rechandle = rec;
 1100|    218|    *rversion = rec->rec_version;
 1101|    218|    *type = rec->type;
 1102|    218|    *data = rec->data + rec->off;
 1103|    218|    *datalen = rec->length;
 1104|    218|    if (rl->isdtls) {
  ------------------
  |  Branch (1104:9): [True: 0, False: 218]
  ------------------
 1105|      0|        *epoch = rec->epoch;
 1106|      0|        memcpy(seq_num, rec->seq_num, sizeof(rec->seq_num));
 1107|      0|    }
 1108|       |
 1109|    218|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    218|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1110|  3.03k|}
tls_release_record:
 1113|    477|{
 1114|    477|    TLS_RL_RECORD *rec = &rl->rrec[rl->num_released];
 1115|       |
 1116|    477|    if (!ossl_assert(rl->num_released < rl->curr_rec)
  ------------------
  |  |   52|    954|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    954|    __FILE__, __LINE__)
  ------------------
  |  Branch (1116:9): [True: 0, False: 477]
  ------------------
 1117|    477|        || !ossl_assert(rechandle == rec)) {
  ------------------
  |  |   52|    477|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    477|    __FILE__, __LINE__)
  ------------------
  |  Branch (1117:12): [True: 0, False: 477]
  ------------------
 1118|       |        /* Should not happen */
 1119|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_INVALID_RECORD);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1120|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1121|      0|    }
 1122|       |
 1123|    477|    if (rec->length < length) {
  ------------------
  |  Branch (1123:9): [True: 0, False: 477]
  ------------------
 1124|       |        /* Should not happen */
 1125|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1126|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1127|      0|    }
 1128|       |
 1129|    477|    if ((rl->options & SSL_OP_CLEANSE_PLAINTEXT) != 0)
  ------------------
  |  |  359|    477|#define SSL_OP_CLEANSE_PLAINTEXT SSL_OP_BIT(1)
  |  |  ------------------
  |  |  |  |  351|    477|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1129:9): [True: 0, False: 477]
  ------------------
 1130|      0|        OPENSSL_cleanse(rec->data + rec->off, length);
 1131|       |
 1132|    477|    rec->off += length;
 1133|    477|    rec->length -= length;
 1134|       |
 1135|    477|    if (rec->length > 0)
  ------------------
  |  Branch (1135:9): [True: 259, False: 218]
  ------------------
 1136|    259|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    259|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1137|       |
 1138|    218|    rl->num_released++;
 1139|       |
 1140|    218|    if (rl->curr_rec == rl->num_released
  ------------------
  |  Branch (1140:9): [True: 218, False: 0]
  ------------------
 1141|    218|        && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0
  ------------------
  |  |  537|    218|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1141:12): [True: 0, False: 218]
  ------------------
 1142|      0|        && TLS_BUFFER_get_left(&rl->rbuf) == 0)
  ------------------
  |  |  527|      0|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
  |  Branch (1142:12): [True: 0, False: 0]
  ------------------
 1143|      0|        tls_release_read_buffer(rl);
 1144|       |
 1145|    218|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    218|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1146|    477|}
tls_set_options:
 1149|  15.5k|{
 1150|  15.5k|    const OSSL_PARAM *p;
 1151|       |
 1152|  15.5k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS);
  ------------------
  |  |  340|  15.5k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
  ------------------
 1153|  15.5k|    if (p != NULL && !OSSL_PARAM_get_uint64(p, &rl->options)) {
  ------------------
  |  Branch (1153:9): [True: 15.5k, False: 0]
  |  Branch (1153:22): [True: 0, False: 15.5k]
  ------------------
 1154|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1155|      0|        return 0;
 1156|      0|    }
 1157|       |
 1158|  15.5k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE);
  ------------------
  |  |  339|  15.5k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 1159|  15.5k|    if (p != NULL && !OSSL_PARAM_get_uint32(p, &rl->mode)) {
  ------------------
  |  Branch (1159:9): [True: 15.5k, False: 0]
  |  Branch (1159:22): [True: 0, False: 15.5k]
  ------------------
 1160|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1161|      0|        return 0;
 1162|      0|    }
 1163|       |
 1164|  15.5k|    if (rl->direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  15.5k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1164:9): [True: 7.75k, False: 7.75k]
  ------------------
 1165|  7.75k|        p = OSSL_PARAM_locate_const(options,
 1166|  7.75k|            OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN);
  ------------------
  |  |  345|  7.75k|# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
  ------------------
 1167|  7.75k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->rbuf.default_len)) {
  ------------------
  |  Branch (1167:13): [True: 7.75k, False: 0]
  |  Branch (1167:26): [True: 0, False: 7.75k]
  ------------------
 1168|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1169|      0|            return 0;
 1170|      0|        }
 1171|  7.75k|    } else {
 1172|  7.75k|        p = OSSL_PARAM_locate_const(options,
 1173|  7.75k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING);
  ------------------
  |  |  335|  7.75k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
  ------------------
 1174|  7.75k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->block_padding)) {
  ------------------
  |  Branch (1174:13): [True: 7.75k, False: 0]
  |  Branch (1174:26): [True: 0, False: 7.75k]
  ------------------
 1175|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1176|      0|            return 0;
 1177|      0|        }
 1178|  7.75k|        p = OSSL_PARAM_locate_const(options,
 1179|  7.75k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING);
  ------------------
  |  |  336|  7.75k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
  ------------------
 1180|  7.75k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->hs_padding)) {
  ------------------
  |  Branch (1180:13): [True: 7.75k, False: 0]
  |  Branch (1180:26): [True: 0, False: 7.75k]
  ------------------
 1181|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1182|      0|            return 0;
 1183|      0|        }
 1184|  7.75k|    }
 1185|       |
 1186|  15.5k|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_APPLICATION) {
  ------------------
  |  | 2926|  15.5k|#define OSSL_RECORD_PROTECTION_LEVEL_APPLICATION 3
  ------------------
  |  Branch (1186:9): [True: 0, False: 15.5k]
  ------------------
 1187|       |        /*
 1188|       |         * We ignore any read_ahead setting prior to the application protection
 1189|       |         * level. Otherwise we may read ahead data in a lower protection level
 1190|       |         * that is destined for a higher protection level. To simplify the logic
 1191|       |         * we don't support that at this stage.
 1192|       |         */
 1193|      0|        p = OSSL_PARAM_locate_const(options,
 1194|      0|            OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD);
  ------------------
  |  |  341|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
  ------------------
 1195|      0|        if (p != NULL && !OSSL_PARAM_get_int(p, &rl->read_ahead)) {
  ------------------
  |  Branch (1195:13): [True: 0, False: 0]
  |  Branch (1195:26): [True: 0, False: 0]
  ------------------
 1196|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1197|      0|            return 0;
 1198|      0|        }
 1199|      0|    }
 1200|       |
 1201|  15.5k|    return 1;
 1202|  15.5k|}
tls_int_new_record_layer:
 1212|  15.5k|{
 1213|  15.5k|    OSSL_RECORD_LAYER *rl = OPENSSL_zalloc(sizeof(*rl));
  ------------------
  |  |  109|  15.5k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1214|  15.5k|    const OSSL_PARAM *p;
 1215|       |
 1216|  15.5k|    *retrl = NULL;
 1217|       |
 1218|  15.5k|    if (rl == NULL)
  ------------------
  |  Branch (1218:9): [True: 0, False: 15.5k]
  ------------------
 1219|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1220|       |
 1221|       |    /*
 1222|       |     * Default the value for max_frag_len. This may be overridden by the
 1223|       |     * settings
 1224|       |     */
 1225|  15.5k|    rl->max_frag_len = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  15.5k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1226|       |
 1227|       |    /* Loop through all the settings since they must all be understood */
 1228|  15.5k|    if (settings != NULL) {
  ------------------
  |  Branch (1228:9): [True: 15.5k, False: 0]
  ------------------
 1229|  15.5k|        for (p = settings; p->key != NULL; p++) {
  ------------------
  |  Branch (1229:28): [True: 0, False: 15.5k]
  ------------------
 1230|      0|            if (strcmp(p->key, OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM) == 0) {
  ------------------
  |  |  344|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
  ------------------
  |  Branch (1230:17): [True: 0, False: 0]
  ------------------
 1231|      0|                if (!OSSL_PARAM_get_int(p, &rl->use_etm)) {
  ------------------
  |  Branch (1231:21): [True: 0, False: 0]
  ------------------
 1232|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1233|      0|                    goto err;
 1234|      0|                }
 1235|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1235:24): [True: 0, False: 0]
  ------------------
 1236|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN)
  ------------------
  |  |  338|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
  ------------------
 1237|      0|                == 0) {
 1238|      0|                if (!OSSL_PARAM_get_uint(p, &rl->max_frag_len)) {
  ------------------
  |  Branch (1238:21): [True: 0, False: 0]
  ------------------
 1239|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1240|      0|                    goto err;
 1241|      0|                }
 1242|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1242:24): [True: 0, False: 0]
  ------------------
 1243|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA)
  ------------------
  |  |  337|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
  ------------------
 1244|      0|                == 0) {
 1245|      0|                if (!OSSL_PARAM_get_uint32(p, &rl->max_early_data)) {
  ------------------
  |  Branch (1245:21): [True: 0, False: 0]
  ------------------
 1246|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1247|      0|                    goto err;
 1248|      0|                }
 1249|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1249:24): [True: 0, False: 0]
  ------------------
 1250|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC)
  ------------------
  |  |  342|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
  ------------------
 1251|      0|                == 0) {
 1252|      0|                if (!OSSL_PARAM_get_int(p, &rl->stream_mac)) {
  ------------------
  |  Branch (1252:21): [True: 0, False: 0]
  ------------------
 1253|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1254|      0|                    goto err;
 1255|      0|                }
 1256|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1256:24): [True: 0, False: 0]
  ------------------
 1257|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE)
  ------------------
  |  |  343|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
  ------------------
 1258|      0|                == 0) {
 1259|      0|                if (!OSSL_PARAM_get_int(p, &rl->tlstree)) {
  ------------------
  |  Branch (1259:21): [True: 0, False: 0]
  ------------------
 1260|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1261|      0|                    goto err;
 1262|      0|                }
 1263|      0|            } else {
 1264|      0|                ERR_raise(ERR_LIB_SSL, SSL_R_UNKNOWN_MANDATORY_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1265|      0|                goto err;
 1266|      0|            }
 1267|      0|        }
 1268|  15.5k|    }
 1269|       |
 1270|  15.5k|    rl->libctx = libctx;
 1271|  15.5k|    rl->propq = propq;
 1272|       |
 1273|  15.5k|    rl->version = vers;
 1274|  15.5k|    rl->role = role;
 1275|  15.5k|    rl->direction = direction;
 1276|  15.5k|    rl->level = level;
 1277|  15.5k|    rl->taglen = taglen;
 1278|  15.5k|    rl->md = md;
 1279|       |
 1280|  15.5k|    rl->alert = SSL_AD_NO_ALERT;
  ------------------
  |  |   67|  15.5k|#define SSL_AD_NO_ALERT -1
  ------------------
 1281|  15.5k|    rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1183|  15.5k|#define SSL_ST_READ_HEADER 0xF0
  ------------------
 1282|       |
 1283|  15.5k|    if (level == OSSL_RECORD_PROTECTION_LEVEL_NONE)
  ------------------
  |  | 2923|  15.5k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1283:9): [True: 15.5k, False: 0]
  ------------------
 1284|  15.5k|        rl->is_first_record = 1;
 1285|       |
 1286|  15.5k|    if (!tls_set1_bio(rl, transport))
  ------------------
  |  Branch (1286:9): [True: 0, False: 15.5k]
  ------------------
 1287|      0|        goto err;
 1288|       |
 1289|  15.5k|    if (prev != NULL && !BIO_up_ref(prev))
  ------------------
  |  Branch (1289:9): [True: 0, False: 15.5k]
  |  Branch (1289:25): [True: 0, False: 0]
  ------------------
 1290|      0|        goto err;
 1291|  15.5k|    rl->prev = prev;
 1292|       |
 1293|  15.5k|    if (next != NULL && !BIO_up_ref(next))
  ------------------
  |  Branch (1293:9): [True: 7.75k, False: 7.75k]
  |  Branch (1293:25): [True: 0, False: 7.75k]
  ------------------
 1294|      0|        goto err;
 1295|  15.5k|    rl->next = next;
 1296|       |
 1297|  15.5k|    rl->cbarg = cbarg;
 1298|  15.5k|    if (fns != NULL) {
  ------------------
  |  Branch (1298:9): [True: 15.5k, False: 0]
  ------------------
 1299|  46.5k|        for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1299:16): [True: 31.0k, False: 15.5k]
  ------------------
 1300|  31.0k|            switch (fns->function_id) {
 1301|  15.5k|            case OSSL_FUNC_RLAYER_SKIP_EARLY_DATA:
  ------------------
  |  |  184|  15.5k|#define OSSL_FUNC_RLAYER_SKIP_EARLY_DATA 1
  ------------------
  |  Branch (1301:13): [True: 15.5k, False: 15.5k]
  ------------------
 1302|  15.5k|                rl->skip_early_data = OSSL_FUNC_rlayer_skip_early_data(fns);
 1303|  15.5k|                break;
 1304|      0|            case OSSL_FUNC_RLAYER_MSG_CALLBACK:
  ------------------
  |  |  186|      0|#define OSSL_FUNC_RLAYER_MSG_CALLBACK 2
  ------------------
  |  Branch (1304:13): [True: 0, False: 31.0k]
  ------------------
 1305|      0|                rl->msg_callback = OSSL_FUNC_rlayer_msg_callback(fns);
 1306|      0|                break;
 1307|  15.5k|            case OSSL_FUNC_RLAYER_SECURITY:
  ------------------
  |  |  188|  15.5k|#define OSSL_FUNC_RLAYER_SECURITY 3
  ------------------
  |  Branch (1307:13): [True: 15.5k, False: 15.5k]
  ------------------
 1308|  15.5k|                rl->security = OSSL_FUNC_rlayer_security(fns);
 1309|  15.5k|                break;
 1310|      0|            case OSSL_FUNC_RLAYER_PADDING:
  ------------------
  |  |  190|      0|#define OSSL_FUNC_RLAYER_PADDING 4
  ------------------
  |  Branch (1310:13): [True: 0, False: 31.0k]
  ------------------
 1311|      0|                rl->padding = OSSL_FUNC_rlayer_padding(fns);
 1312|      0|            default:
  ------------------
  |  Branch (1312:13): [True: 0, False: 31.0k]
  ------------------
 1313|       |                /* Just ignore anything we don't understand */
 1314|      0|                break;
 1315|  31.0k|            }
 1316|  31.0k|        }
 1317|  15.5k|    }
 1318|       |
 1319|  15.5k|    if (!tls_set_options(rl, options)) {
  ------------------
  |  Branch (1319:9): [True: 0, False: 15.5k]
  ------------------
 1320|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1321|      0|        goto err;
 1322|      0|    }
 1323|       |
 1324|  15.5k|    if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0
  ------------------
  |  |  378|  15.5k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  351|  15.5k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1324:9): [True: 15.4k, False: 24]
  ------------------
 1325|  15.4k|        && rl->version <= TLS1_VERSION
  ------------------
  |  |   24|  31.0k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1325:12): [True: 0, False: 15.4k]
  ------------------
 1326|      0|        && !EVP_CIPHER_is_a(ciph, "NULL")
  ------------------
  |  Branch (1326:12): [True: 0, False: 0]
  ------------------
 1327|      0|        && !EVP_CIPHER_is_a(ciph, "RC4")) {
  ------------------
  |  Branch (1327:12): [True: 0, False: 0]
  ------------------
 1328|       |        /*
 1329|       |         * Enable vulnerability countermeasure for CBC ciphers with known-IV
 1330|       |         * problem (http://www.openssl.org/~bodo/tls-cbc.txt)
 1331|       |         */
 1332|      0|        rl->need_empty_fragments = 1;
 1333|      0|    }
 1334|       |
 1335|  15.5k|    *retrl = rl;
 1336|  15.5k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  15.5k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1337|      0|err:
 1338|      0|    tls_int_free(rl);
 1339|      0|    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1340|  15.5k|}
tls_free:
 1424|  15.5k|{
 1425|  15.5k|    TLS_BUFFER *rbuf;
 1426|  15.5k|    size_t left, written;
 1427|  15.5k|    int ret = 1;
 1428|       |
 1429|  15.5k|    if (rl == NULL)
  ------------------
  |  Branch (1429:9): [True: 0, False: 15.5k]
  ------------------
 1430|      0|        return 1;
 1431|       |
 1432|  15.5k|    rbuf = &rl->rbuf;
 1433|       |
 1434|  15.5k|    left = TLS_BUFFER_get_left(rbuf);
  ------------------
  |  |  527|  15.5k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1435|  15.5k|    if (left > 0) {
  ------------------
  |  Branch (1435:9): [True: 53, False: 15.4k]
  ------------------
 1436|       |        /*
 1437|       |         * This record layer is closing but we still have data left in our
 1438|       |         * buffer. It must be destined for the next epoch - so push it there.
 1439|       |         */
 1440|     53|        ret = BIO_write_ex(rl->next, rbuf->buf + rbuf->offset, left, &written);
 1441|     53|    }
 1442|  15.5k|    tls_int_free(rl);
 1443|       |
 1444|  15.5k|    return ret;
 1445|  15.5k|}
tls_processed_read_pending:
 1453|    218|{
 1454|    218|    return rl->curr_rec < rl->num_recs;
 1455|    218|}
tls_get_max_records_default:
 1473|  2.48k|{
 1474|       |    /*
 1475|       |     * If we have a pipeline capable cipher, and we have been configured to use
 1476|       |     * it, then return the preferred number of pipelines.
 1477|       |     */
 1478|  2.48k|    if (rl->max_pipelines > 0
  ------------------
  |  Branch (1478:9): [True: 0, False: 2.48k]
  ------------------
 1479|      0|        && rl->enc_ctx != NULL
  ------------------
  |  Branch (1479:12): [True: 0, False: 0]
  ------------------
 1480|      0|        && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx))
  ------------------
  |  Branch (1480:12): [True: 0, False: 0]
  ------------------
 1481|      0|               & EVP_CIPH_FLAG_PIPELINE)
  ------------------
  |  |  259|      0|#define EVP_CIPH_FLAG_PIPELINE 0X800000
  ------------------
 1482|      0|            != 0
 1483|      0|        && RLAYER_USE_EXPLICIT_IV(rl)) {
  ------------------
  |  |  396|      0|#define RLAYER_USE_EXPLICIT_IV(rl) ((rl)->version == TLS1_1_VERSION \
  |  |  ------------------
  |  |  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  |  |  ------------------
  |  |  |  Branch (396:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  397|      0|    || (rl)->version == TLS1_2_VERSION                              \
  |  |  ------------------
  |  |  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  |  |  ------------------
  |  |  |  Branch (397:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  398|      0|    || (rl)->version == DTLS1_BAD_VER                               \
  |  |  ------------------
  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  ------------------
  |  |  |  Branch (398:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  399|      0|    || (rl)->version == DTLS1_VERSION                               \
  |  |  ------------------
  |  |  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  |  |  ------------------
  |  |  |  Branch (399:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  400|      0|    || (rl)->version == DTLS1_2_VERSION)
  |  |  ------------------
  |  |  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  |  |  ------------------
  |  |  |  Branch (400:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1484|      0|        size_t pipes;
 1485|       |
 1486|      0|        if (len == 0)
  ------------------
  |  Branch (1486:13): [True: 0, False: 0]
  ------------------
 1487|      0|            return 1;
 1488|      0|        pipes = ((len - 1) / *preffrag) + 1;
 1489|       |
 1490|      0|        return (pipes < rl->max_pipelines) ? pipes : rl->max_pipelines;
  ------------------
  |  Branch (1490:16): [True: 0, False: 0]
  ------------------
 1491|      0|    }
 1492|       |
 1493|  2.48k|    return 1;
 1494|  2.48k|}
tls_get_max_records:
 1498|  2.48k|{
 1499|  2.48k|    return rl->funcs->get_max_records(rl, type, len, maxfrag, preffrag);
 1500|  2.48k|}
tls_allocate_write_buffers_default:
 1506|  4.79k|{
 1507|  4.79k|    if (!tls_setup_write_buffer(rl, numtempl, 0, 0)) {
  ------------------
  |  Branch (1507:9): [True: 0, False: 4.79k]
  ------------------
 1508|       |        /* RLAYERfatal() already called */
 1509|      0|        return 0;
 1510|      0|    }
 1511|       |
 1512|  4.79k|    return 1;
 1513|  4.79k|}
tls_initialise_write_packets_default:
 1522|  4.79k|{
 1523|  4.79k|    WPACKET *thispkt;
 1524|  4.79k|    size_t j, align;
 1525|  4.79k|    TLS_BUFFER *wb;
 1526|       |
 1527|  9.59k|    for (j = 0; j < numtempl; j++) {
  ------------------
  |  Branch (1527:17): [True: 4.79k, False: 4.79k]
  ------------------
 1528|  4.79k|        thispkt = &pkt[j];
 1529|  4.79k|        wb = &bufs[j];
 1530|       |
 1531|  4.79k|        wb->type = templates[j].type;
 1532|       |
 1533|  4.79k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
 1534|  4.79k|        align = (size_t)TLS_BUFFER_get_buf(wb);
  ------------------
  |  |  524|  4.79k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
 1535|  4.79k|        align += rl->isdtls ? DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
                      align += rl->isdtls ? DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  9.59k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (1535:18): [True: 0, False: 4.79k]
  ------------------
 1536|  4.79k|        align = SSL3_ALIGN_PAYLOAD - 1
  ------------------
  |  |  152|  4.79k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1537|  4.79k|            - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  4.79k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1538|  4.79k|#endif
 1539|  4.79k|        TLS_BUFFER_set_offset(wb, align);
  ------------------
  |  |  531|  4.79k|#define TLS_BUFFER_set_offset(b, o) ((b)->offset = (o))
  ------------------
 1540|       |
 1541|  4.79k|        if (!WPACKET_init_static_len(thispkt, TLS_BUFFER_get_buf(wb),
  ------------------
  |  |  524|  4.79k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
  |  Branch (1541:13): [True: 0, False: 4.79k]
  ------------------
 1542|  4.79k|                TLS_BUFFER_get_len(wb), 0)) {
  ------------------
  |  |  526|  4.79k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
 1543|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1544|      0|            return 0;
 1545|      0|        }
 1546|  4.79k|        (*wpinited)++;
 1547|  4.79k|        if (!WPACKET_allocate_bytes(thispkt, align, NULL)) {
  ------------------
  |  Branch (1547:13): [True: 0, False: 4.79k]
  ------------------
 1548|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1549|      0|            return 0;
 1550|      0|        }
 1551|  4.79k|    }
 1552|       |
 1553|  4.79k|    return 1;
 1554|  4.79k|}
tls_prepare_record_header_default:
 1561|  4.79k|{
 1562|  4.79k|    size_t maxcomplen;
 1563|       |
 1564|  4.79k|    *recdata = NULL;
 1565|       |
 1566|  4.79k|    maxcomplen = templ->buflen;
 1567|  4.79k|    if (rl->compctx != NULL)
  ------------------
  |  Branch (1567:9): [True: 0, False: 4.79k]
  ------------------
 1568|      0|        maxcomplen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
 1569|       |
 1570|  4.79k|    if (!WPACKET_put_bytes_u8(thispkt, rectype)
  ------------------
  |  |  909|  9.59k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1570:9): [True: 0, False: 4.79k]
  ------------------
 1571|  4.79k|        || !WPACKET_put_bytes_u16(thispkt, templ->version)
  ------------------
  |  |  911|  9.59k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1571:12): [True: 0, False: 4.79k]
  ------------------
 1572|  4.79k|        || !WPACKET_start_sub_packet_u16(thispkt)
  ------------------
  |  |  812|  9.59k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1572:12): [True: 0, False: 4.79k]
  ------------------
 1573|  4.79k|        || (rl->eivlen > 0
  ------------------
  |  Branch (1573:13): [True: 0, False: 4.79k]
  ------------------
 1574|      0|            && !WPACKET_allocate_bytes(thispkt, rl->eivlen, NULL))
  ------------------
  |  Branch (1574:16): [True: 0, False: 0]
  ------------------
 1575|  4.79k|        || (maxcomplen > 0
  ------------------
  |  Branch (1575:13): [True: 4.79k, False: 0]
  ------------------
 1576|  4.79k|            && !WPACKET_reserve_bytes(thispkt, maxcomplen,
  ------------------
  |  Branch (1576:16): [True: 0, False: 4.79k]
  ------------------
 1577|  4.79k|                recdata))) {
 1578|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1579|      0|        return 0;
 1580|      0|    }
 1581|       |
 1582|  4.79k|    return 1;
 1583|  4.79k|}
tls_post_encryption_processing_default:
 1639|  4.79k|{
 1640|  4.79k|    size_t origlen, len;
 1641|  4.79k|    size_t headerlen = rl->isdtls ? DTLS1_RT_HEADER_LENGTH
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  |  Branch (1641:24): [True: 0, False: 4.79k]
  ------------------
 1642|  4.79k|                                  : SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  9.59k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
 1643|       |
 1644|       |    /* Allocate bytes for the encryption overhead */
 1645|  4.79k|    if (!WPACKET_get_length(thispkt, &origlen)
  ------------------
  |  Branch (1645:9): [True: 0, False: 4.79k]
  ------------------
 1646|       |        /* Check we allowed enough room for the encryption growth */
 1647|  4.79k|        || !ossl_assert(origlen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD
  ------------------
  |  |   52|  9.59k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  9.59k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1647:12): [True: 0, False: 4.79k]
  ------------------
 1648|  4.79k|                - mac_size
 1649|  4.79k|            >= thiswr->length)
 1650|       |        /* Encryption should never shrink the data! */
 1651|  4.79k|        || origlen > thiswr->length
  ------------------
  |  Branch (1651:12): [True: 0, False: 4.79k]
  ------------------
 1652|  4.79k|        || (thiswr->length > origlen
  ------------------
  |  Branch (1652:13): [True: 0, False: 4.79k]
  ------------------
 1653|      0|            && !WPACKET_allocate_bytes(thispkt,
  ------------------
  |  Branch (1653:16): [True: 0, False: 0]
  ------------------
 1654|      0|                thiswr->length - origlen,
 1655|      0|                NULL))) {
 1656|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1657|      0|        return 0;
 1658|      0|    }
 1659|  4.79k|    if (rl->use_etm && mac_size != 0) {
  ------------------
  |  Branch (1659:9): [True: 0, False: 4.79k]
  |  Branch (1659:24): [True: 0, False: 0]
  ------------------
 1660|      0|        unsigned char *mac;
 1661|       |
 1662|      0|        if (!WPACKET_allocate_bytes(thispkt, mac_size, &mac)
  ------------------
  |  Branch (1662:13): [True: 0, False: 0]
  ------------------
 1663|      0|            || !rl->funcs->mac(rl, thiswr, mac, 1)) {
  ------------------
  |  Branch (1663:16): [True: 0, False: 0]
  ------------------
 1664|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1665|      0|            return 0;
 1666|      0|        }
 1667|       |
 1668|      0|        TLS_RL_RECORD_add_length(thiswr, mac_size);
  ------------------
  |  |   87|      0|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1669|      0|    }
 1670|       |
 1671|  4.79k|    if (!WPACKET_get_length(thispkt, &len)
  ------------------
  |  Branch (1671:9): [True: 0, False: 4.79k]
  ------------------
 1672|  4.79k|        || !WPACKET_close(thispkt)) {
  ------------------
  |  Branch (1672:12): [True: 0, False: 4.79k]
  ------------------
 1673|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1674|      0|        return 0;
 1675|      0|    }
 1676|       |
 1677|  4.79k|    if (rl->msg_callback != NULL) {
  ------------------
  |  Branch (1677:9): [True: 0, False: 4.79k]
  ------------------
 1678|      0|        unsigned char *recordstart;
 1679|       |
 1680|      0|        recordstart = WPACKET_get_curr(thispkt) - len - headerlen;
 1681|      0|        rl->msg_callback(1, thiswr->rec_version, SSL3_RT_HEADER, recordstart,
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
 1682|      0|            headerlen, rl->cbarg);
 1683|       |
 1684|      0|        if (rl->version == TLS1_3_VERSION && rl->enc_ctx != NULL) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1684:13): [True: 0, False: 0]
  |  Branch (1684:46): [True: 0, False: 0]
  ------------------
 1685|      0|            unsigned char ctype = thistempl->type;
 1686|       |
 1687|      0|            rl->msg_callback(1, thiswr->rec_version, SSL3_RT_INNER_CONTENT_TYPE,
  ------------------
  |  |  240|      0|#define SSL3_RT_INNER_CONTENT_TYPE 0x101
  ------------------
 1688|      0|                &ctype, 1, rl->cbarg);
 1689|      0|        }
 1690|      0|    }
 1691|       |
 1692|  4.79k|    if (!WPACKET_finish(thispkt)) {
  ------------------
  |  Branch (1692:9): [True: 0, False: 4.79k]
  ------------------
 1693|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1694|      0|        return 0;
 1695|      0|    }
 1696|       |
 1697|  4.79k|    TLS_RL_RECORD_add_length(thiswr, headerlen);
  ------------------
  |  |   87|  4.79k|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1698|       |
 1699|  4.79k|    return 1;
 1700|  4.79k|}
tls_write_records_default:
 1705|  4.79k|{
 1706|  4.79k|    WPACKET pkt[SSL_MAX_PIPELINES + 1];
 1707|  4.79k|    TLS_RL_RECORD wr[SSL_MAX_PIPELINES + 1];
 1708|  4.79k|    WPACKET *thispkt;
 1709|  4.79k|    TLS_RL_RECORD *thiswr;
 1710|  4.79k|    int mac_size = 0, ret = 0;
 1711|  4.79k|    size_t wpinited = 0;
 1712|  4.79k|    size_t j, prefix = 0;
 1713|  4.79k|    OSSL_RECORD_TEMPLATE prefixtempl;
 1714|  4.79k|    OSSL_RECORD_TEMPLATE *thistempl;
 1715|       |
 1716|  4.79k|    if (rl->md_ctx != NULL && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) {
  ------------------
  |  Branch (1716:9): [True: 0, False: 4.79k]
  |  Branch (1716:31): [True: 0, False: 0]
  ------------------
 1717|      0|        mac_size = EVP_MD_CTX_get_size(rl->md_ctx);
  ------------------
  |  |  482|      0|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
 1718|      0|        if (mac_size < 0) {
  ------------------
  |  Branch (1718:13): [True: 0, False: 0]
  ------------------
 1719|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1720|      0|            goto err;
 1721|      0|        }
 1722|      0|    }
 1723|       |
 1724|  4.79k|    if (!rl->funcs->allocate_write_buffers(rl, templates, numtempl, &prefix)) {
  ------------------
  |  Branch (1724:9): [True: 0, False: 4.79k]
  ------------------
 1725|       |        /* RLAYERfatal() already called */
 1726|      0|        goto err;
 1727|      0|    }
 1728|       |
 1729|  4.79k|    if (!rl->funcs->initialise_write_packets(rl, templates, numtempl,
  ------------------
  |  Branch (1729:9): [True: 0, False: 4.79k]
  ------------------
 1730|  4.79k|            &prefixtempl, pkt, rl->wbuf,
 1731|  4.79k|            &wpinited)) {
 1732|       |        /* RLAYERfatal() already called */
 1733|      0|        goto err;
 1734|      0|    }
 1735|       |
 1736|       |    /* Clear our TLS_RL_RECORD structures */
 1737|  4.79k|    memset(wr, 0, sizeof(wr));
 1738|  9.59k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1738:17): [True: 4.79k, False: 4.79k]
  ------------------
 1739|  4.79k|        unsigned char *compressdata = NULL;
 1740|  4.79k|        uint8_t rectype;
 1741|       |
 1742|  4.79k|        thispkt = &pkt[j];
 1743|  4.79k|        thiswr = &wr[j];
 1744|  4.79k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1744:21): [True: 0, False: 4.79k]
  ------------------
 1745|       |
 1746|       |        /*
 1747|       |         * Default to the record type as specified in the template unless the
 1748|       |         * protocol implementation says differently.
 1749|       |         */
 1750|  4.79k|        if (rl->funcs->get_record_type != NULL)
  ------------------
  |  Branch (1750:13): [True: 0, False: 4.79k]
  ------------------
 1751|      0|            rectype = rl->funcs->get_record_type(rl, thistempl);
 1752|  4.79k|        else
 1753|  4.79k|            rectype = thistempl->type;
 1754|       |
 1755|  4.79k|        TLS_RL_RECORD_set_type(thiswr, rectype);
  ------------------
  |  |   83|  4.79k|#define TLS_RL_RECORD_set_type(r, t) ((r)->type = (t))
  ------------------
 1756|  4.79k|        TLS_RL_RECORD_set_rec_version(thiswr, thistempl->version);
  ------------------
  |  |   84|  4.79k|#define TLS_RL_RECORD_set_rec_version(r, v) ((r)->rec_version = (v))
  ------------------
 1757|       |
 1758|  4.79k|        if (!rl->funcs->prepare_record_header(rl, thispkt, thistempl, rectype,
  ------------------
  |  Branch (1758:13): [True: 0, False: 4.79k]
  ------------------
 1759|  4.79k|                &compressdata)) {
 1760|       |            /* RLAYERfatal() already called */
 1761|      0|            goto err;
 1762|      0|        }
 1763|       |
 1764|       |        /* lets setup the record stuff. */
 1765|  4.79k|        TLS_RL_RECORD_set_data(thiswr, compressdata);
  ------------------
  |  |   88|  4.79k|#define TLS_RL_RECORD_set_data(r, d) ((r)->data = (d))
  ------------------
 1766|  4.79k|        TLS_RL_RECORD_set_length(thiswr, thistempl->buflen);
  ------------------
  |  |   86|  4.79k|#define TLS_RL_RECORD_set_length(r, l) ((r)->length = (l))
  ------------------
 1767|       |
 1768|  4.79k|        TLS_RL_RECORD_set_input(thiswr, (unsigned char *)thistempl->buf);
  ------------------
  |  |   89|  4.79k|#define TLS_RL_RECORD_set_input(r, i) ((r)->input = (i))
  ------------------
 1769|       |
 1770|       |        /*
 1771|       |         * we now 'read' from thiswr->input, thiswr->length bytes into
 1772|       |         * thiswr->data
 1773|       |         */
 1774|       |
 1775|       |        /* first we compress */
 1776|  4.79k|        if (rl->compctx != NULL) {
  ------------------
  |  Branch (1776:13): [True: 0, False: 4.79k]
  ------------------
 1777|      0|            if (!tls_do_compress(rl, thiswr)
  ------------------
  |  Branch (1777:17): [True: 0, False: 0]
  ------------------
 1778|      0|                || !WPACKET_allocate_bytes(thispkt, thiswr->length, NULL)) {
  ------------------
  |  Branch (1778:20): [True: 0, False: 0]
  ------------------
 1779|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_COMPRESSION_FAILURE);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1780|      0|                goto err;
 1781|      0|            }
 1782|  4.79k|        } else if (compressdata != NULL) {
  ------------------
  |  Branch (1782:20): [True: 4.79k, False: 0]
  ------------------
 1783|  4.79k|            if (!WPACKET_memcpy(thispkt, thiswr->input, thiswr->length)) {
  ------------------
  |  Branch (1783:17): [True: 0, False: 4.79k]
  ------------------
 1784|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1785|      0|                goto err;
 1786|      0|            }
 1787|  4.79k|            TLS_RL_RECORD_reset_input(&wr[j]);
  ------------------
  |  |   90|  4.79k|#define TLS_RL_RECORD_reset_input(r) ((r)->input = (r)->data)
  ------------------
 1788|  4.79k|        }
 1789|       |
 1790|  4.79k|        if (rl->funcs->add_record_padding != NULL
  ------------------
  |  Branch (1790:13): [True: 0, False: 4.79k]
  ------------------
 1791|      0|            && !rl->funcs->add_record_padding(rl, thistempl, thispkt,
  ------------------
  |  Branch (1791:16): [True: 0, False: 0]
  ------------------
 1792|      0|                thiswr)) {
 1793|       |            /* RLAYERfatal() already called */
 1794|      0|            goto err;
 1795|      0|        }
 1796|       |
 1797|  4.79k|        if (!rl->funcs->prepare_for_encryption(rl, mac_size, thispkt, thiswr)) {
  ------------------
  |  Branch (1797:13): [True: 0, False: 4.79k]
  ------------------
 1798|       |            /* RLAYERfatal() already called */
 1799|      0|            goto err;
 1800|      0|        }
 1801|  4.79k|    }
 1802|       |
 1803|  4.79k|    if (prefix) {
  ------------------
  |  Branch (1803:9): [True: 0, False: 4.79k]
  ------------------
 1804|      0|        if (rl->funcs->cipher(rl, wr, 1, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1804:13): [True: 0, False: 0]
  ------------------
 1805|      0|            if (rl->alert == SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (1805:17): [True: 0, False: 0]
  ------------------
 1806|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1807|      0|            }
 1808|      0|            goto err;
 1809|      0|        }
 1810|      0|    }
 1811|       |
 1812|  4.79k|    if (rl->funcs->cipher(rl, wr + prefix, numtempl, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1812:9): [True: 0, False: 4.79k]
  ------------------
 1813|      0|        if (rl->alert == SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (1813:13): [True: 0, False: 0]
  ------------------
 1814|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1815|      0|        }
 1816|      0|        goto err;
 1817|      0|    }
 1818|       |
 1819|  9.59k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1819:17): [True: 4.79k, False: 4.79k]
  ------------------
 1820|  4.79k|        thispkt = &pkt[j];
 1821|  4.79k|        thiswr = &wr[j];
 1822|  4.79k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1822:21): [True: 0, False: 4.79k]
  ------------------
 1823|       |
 1824|  4.79k|        if (!rl->funcs->post_encryption_processing(rl, mac_size, thistempl,
  ------------------
  |  Branch (1824:13): [True: 0, False: 4.79k]
  ------------------
 1825|  4.79k|                thispkt, thiswr)) {
 1826|       |            /* RLAYERfatal() already called */
 1827|      0|            goto err;
 1828|      0|        }
 1829|       |
 1830|       |        /* now let's set up wb */
 1831|  4.79k|        TLS_BUFFER_set_left(&rl->wbuf[j], TLS_RL_RECORD_get_length(thiswr));
  ------------------
  |  |  528|  4.79k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1832|  4.79k|    }
 1833|       |
 1834|  4.79k|    ret = 1;
 1835|  4.79k|err:
 1836|  9.59k|    for (j = 0; j < wpinited; j++)
  ------------------
  |  Branch (1836:17): [True: 4.79k, False: 4.79k]
  ------------------
 1837|  4.79k|        WPACKET_cleanup(&pkt[j]);
 1838|  4.79k|    return ret;
 1839|  4.79k|}
tls_write_records:
 1843|  4.79k|{
 1844|       |    /* Check we don't have pending data waiting to write */
 1845|  4.79k|    if (!ossl_assert(rl->nextwbuf >= rl->numwpipes
  ------------------
  |  |   52|  4.79k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 4.79k, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  4.79k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1845:9): [True: 0, False: 4.79k]
  ------------------
 1846|  4.79k|            || TLS_BUFFER_get_left(&rl->wbuf[rl->nextwbuf]) == 0)) {
 1847|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1848|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1849|      0|    }
 1850|       |
 1851|  4.79k|    if (!rl->funcs->write_records(rl, templates, numtempl)) {
  ------------------
  |  Branch (1851:9): [True: 0, False: 4.79k]
  ------------------
 1852|       |        /* RLAYERfatal already called */
 1853|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1854|      0|    }
 1855|       |
 1856|  4.79k|    rl->nextwbuf = 0;
 1857|       |    /* we now just need to write the buffers */
 1858|  4.79k|    return tls_retry_write_records(rl);
 1859|  4.79k|}
tls_retry_write_records:
 1862|  4.79k|{
 1863|  4.79k|    int i, ret;
 1864|  4.79k|    TLS_BUFFER *thiswb;
 1865|  4.79k|    size_t tmpwrit = 0;
 1866|       |
 1867|  4.79k|    if (rl->nextwbuf >= rl->numwpipes)
  ------------------
  |  Branch (1867:9): [True: 0, False: 4.79k]
  ------------------
 1868|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1869|       |
 1870|  4.79k|    for (;;) {
 1871|  4.79k|        thiswb = &rl->wbuf[rl->nextwbuf];
 1872|       |
 1873|  4.79k|        clear_sys_error();
  ------------------
  |  |   31|  4.79k|#define clear_sys_error() errno = 0
  ------------------
 1874|  4.79k|        if (rl->bio != NULL) {
  ------------------
  |  Branch (1874:13): [True: 4.79k, False: 0]
  ------------------
 1875|  4.79k|            if (rl->funcs->prepare_write_bio != NULL) {
  ------------------
  |  Branch (1875:17): [True: 0, False: 4.79k]
  ------------------
 1876|      0|                ret = rl->funcs->prepare_write_bio(rl, thiswb->type);
 1877|      0|                if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1877:21): [True: 0, False: 0]
  ------------------
 1878|      0|                    return ret;
 1879|      0|            }
 1880|  4.79k|            i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  524|  4.79k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
                          i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  530|  4.79k|#define TLS_BUFFER_get_offset(b) ((b)->offset)
  ------------------
 1881|  4.79k|                (unsigned int)TLS_BUFFER_get_left(thiswb));
  ------------------
  |  |  527|  4.79k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1882|  4.79k|            if (i >= 0) {
  ------------------
  |  Branch (1882:17): [True: 4.79k, False: 0]
  ------------------
 1883|  4.79k|                tmpwrit = i;
 1884|  4.79k|                if (i == 0 && BIO_should_retry(rl->bio))
  ------------------
  |  |  281|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (281:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1884:21): [True: 0, False: 4.79k]
  ------------------
 1885|      0|                    ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1886|  4.79k|                else
 1887|  4.79k|                    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  4.79k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1888|  4.79k|            } else {
 1889|      0|                if (BIO_should_retry(rl->bio)) {
  ------------------
  |  |  281|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (281:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1890|      0|                    ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1891|      0|                } else {
 1892|      0|                    ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
 1893|      0|                        "tls_retry_write_records failure");
 1894|      0|                    ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1895|      0|                }
 1896|      0|            }
 1897|  4.79k|        } else {
 1898|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_BIO_NOT_SET);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1899|      0|            ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1900|      0|            i = -1;
 1901|      0|        }
 1902|       |
 1903|       |        /*
 1904|       |         * When an empty fragment is sent on a connection using KTLS,
 1905|       |         * it is sent as a write of zero bytes.  If this zero byte
 1906|       |         * write succeeds, i will be 0 rather than a non-zero value.
 1907|       |         * Treat i == 0 as success rather than an error for zero byte
 1908|       |         * writes to permit this case.
 1909|       |         */
 1910|  4.79k|        if (i >= 0 && tmpwrit == TLS_BUFFER_get_left(thiswb)) {
  ------------------
  |  |  527|  4.79k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
  |  Branch (1910:13): [True: 4.79k, False: 0]
  |  Branch (1910:23): [True: 4.79k, False: 0]
  ------------------
 1911|  4.79k|            TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  528|  4.79k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1912|  4.79k|            TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  532|  4.79k|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1913|  4.79k|            if (++(rl->nextwbuf) < rl->numwpipes)
  ------------------
  |  Branch (1913:17): [True: 0, False: 4.79k]
  ------------------
 1914|      0|                continue;
 1915|       |
 1916|  4.79k|            if (rl->nextwbuf == rl->numwpipes
  ------------------
  |  Branch (1916:17): [True: 4.79k, False: 0]
  ------------------
 1917|  4.79k|                && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  537|  4.79k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1917:20): [True: 0, False: 4.79k]
  ------------------
 1918|      0|                tls_release_write_buffer(rl);
 1919|  4.79k|            return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  4.79k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1920|  4.79k|        } else if (i <= 0) {
  ------------------
  |  Branch (1920:20): [True: 0, False: 0]
  ------------------
 1921|       |            /*
 1922|       |             * If the app buffer is used directly (kTLS) and the caller is
 1923|       |             * allowed to move it, copy the unsent data so the original
 1924|       |             * buffer can be safely released.
 1925|       |             */
 1926|      0|            if (TLS_BUFFER_is_app_buffer(thiswb)
  ------------------
  |  |  534|      0|#define TLS_BUFFER_is_app_buffer(b) ((b)->app_buffer)
  |  |  ------------------
  |  |  |  Branch (534:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1927|      0|                && (rl->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER) != 0) {
  ------------------
  |  |  526|      0|#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002U
  ------------------
  |  Branch (1927:20): [True: 0, False: 0]
  ------------------
 1928|      0|                size_t left = TLS_BUFFER_get_left(thiswb);
  ------------------
  |  |  527|      0|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1929|      0|                unsigned char *buf;
 1930|       |
 1931|      0|                buf = OPENSSL_malloc(left);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1932|      0|                if (buf == NULL) {
  ------------------
  |  Branch (1932:21): [True: 0, False: 0]
  ------------------
 1933|      0|                    RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1934|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1935|      0|                }
 1936|      0|                memcpy(buf,
 1937|      0|                    TLS_BUFFER_get_buf(thiswb) + TLS_BUFFER_get_offset(thiswb),
  ------------------
  |  |  524|      0|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
                                  TLS_BUFFER_get_buf(thiswb) + TLS_BUFFER_get_offset(thiswb),
  ------------------
  |  |  530|      0|#define TLS_BUFFER_get_offset(b) ((b)->offset)
  ------------------
 1938|      0|                    left);
 1939|      0|                TLS_BUFFER_set_buf(thiswb, buf);
  ------------------
  |  |  525|      0|#define TLS_BUFFER_set_buf(b, n) ((b)->buf = (n))
  ------------------
 1940|      0|                TLS_BUFFER_set_offset(thiswb, 0);
  ------------------
  |  |  531|      0|#define TLS_BUFFER_set_offset(b, o) ((b)->offset = (o))
  ------------------
 1941|      0|                TLS_BUFFER_set_app_buffer(thiswb, 0);
  ------------------
  |  |  533|      0|#define TLS_BUFFER_set_app_buffer(b, l) ((b)->app_buffer = (l))
  ------------------
 1942|      0|            }
 1943|      0|            if (rl->isdtls) {
  ------------------
  |  Branch (1943:17): [True: 0, False: 0]
  ------------------
 1944|       |                /*
 1945|       |                 * For DTLS, just drop it. That's kind of the whole point in
 1946|       |                 * using a datagram service
 1947|       |                 */
 1948|      0|                TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  528|      0|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1949|      0|                if (++(rl->nextwbuf) == rl->numwpipes
  ------------------
  |  Branch (1949:21): [True: 0, False: 0]
  ------------------
 1950|      0|                    && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  537|      0|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1950:24): [True: 0, False: 0]
  ------------------
 1951|      0|                    tls_release_write_buffer(rl);
 1952|      0|            }
 1953|      0|            return ret;
 1954|      0|        }
 1955|      0|        TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  532|      0|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1956|      0|        TLS_BUFFER_sub_left(thiswb, tmpwrit);
  ------------------
  |  |  529|      0|#define TLS_BUFFER_sub_left(b, l) ((b)->left -= (l))
  ------------------
 1957|      0|    }
 1958|  4.79k|}
tls_get_alert_code:
 1961|    275|{
 1962|    275|    return rl->alert;
 1963|    275|}
tls_set1_bio:
 1966|  25.8k|{
 1967|  25.8k|    if (bio != NULL && !BIO_up_ref(bio))
  ------------------
  |  Branch (1967:9): [True: 15.5k, False: 10.3k]
  |  Branch (1967:24): [True: 0, False: 15.5k]
  ------------------
 1968|      0|        return 0;
 1969|  25.8k|    BIO_free_all(rl->bio);
 1970|  25.8k|    rl->bio = bio;
 1971|       |
 1972|  25.8k|    return 1;
 1973|  25.8k|}
tls_set_protocol_version:
 1985|     78|{
 1986|     78|    return rl->funcs->set_protocol_version(rl, version);
 1987|     78|}
tls_set_first_handshake:
 1995|  15.5k|{
 1996|  15.5k|    rl->is_first_handshake = first;
 1997|  15.5k|}
tls_common.c:tls_allow_compression:
  114|  7.27k|{
  115|  7.27k|    if (rl->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  395|  7.27k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  351|  7.27k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 7.27k, False: 0]
  ------------------
  116|  7.27k|        return 0;
  117|       |
  118|      0|    return rl->security == NULL
  ------------------
  |  Branch (118:12): [True: 0, False: 0]
  ------------------
  119|      0|        || rl->security(rl->cbarg, SSL_SECOP_COMPRESSION, 0, 0, NULL);
  ------------------
  |  | 2769|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (119:12): [True: 0, False: 0]
  ------------------
  120|  7.27k|}
tls_common.c:tls_release_write_buffer_int:
  124|  20.3k|{
  125|  20.3k|    TLS_BUFFER *wb;
  126|  20.3k|    size_t pipes;
  127|       |
  128|  20.3k|    pipes = rl->numwpipes;
  129|       |
  130|  22.8k|    while (pipes > start) {
  ------------------
  |  Branch (130:12): [True: 2.58k, False: 20.3k]
  ------------------
  131|  2.58k|        wb = &rl->wbuf[pipes - 1];
  132|       |
  133|  2.58k|        if (TLS_BUFFER_is_app_buffer(wb))
  ------------------
  |  |  534|  2.58k|#define TLS_BUFFER_is_app_buffer(b) ((b)->app_buffer)
  |  |  ------------------
  |  |  |  Branch (534:37): [True: 0, False: 2.58k]
  |  |  ------------------
  ------------------
  134|      0|            TLS_BUFFER_set_app_buffer(wb, 0);
  ------------------
  |  |  533|      0|#define TLS_BUFFER_set_app_buffer(b, l) ((b)->app_buffer = (l))
  ------------------
  135|  2.58k|        else
  136|  2.58k|            OPENSSL_free(wb->buf);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|       |        wb->buf = NULL;
  138|  2.58k|        pipes--;
  139|  2.58k|    }
  140|  20.3k|}
tls_common.c:tls_int_free:
 1399|  15.5k|{
 1400|  15.5k|    BIO_free(rl->prev);
 1401|  15.5k|    BIO_free_all(rl->bio);
 1402|  15.5k|    BIO_free(rl->next);
 1403|  15.5k|    ossl_tls_buffer_release(&rl->rbuf);
 1404|       |
 1405|  15.5k|    tls_release_write_buffer(rl);
 1406|       |
 1407|  15.5k|    EVP_CIPHER_CTX_free(rl->enc_ctx);
 1408|  15.5k|    EVP_MAC_CTX_free(rl->mac_ctx);
 1409|  15.5k|    EVP_MD_CTX_free(rl->md_ctx);
 1410|  15.5k|#ifndef OPENSSL_NO_COMP
 1411|  15.5k|    COMP_CTX_free(rl->compctx);
 1412|  15.5k|#endif
 1413|  15.5k|    OPENSSL_free(rl->iv);
  ------------------
  |  |  132|  15.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1414|  15.5k|    OPENSSL_free(rl->nonce);
  ------------------
  |  |  132|  15.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1415|  15.5k|    if (rl->version == SSL3_VERSION)
  ------------------
  |  |   23|  15.5k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (1415:9): [True: 0, False: 15.5k]
  ------------------
 1416|      0|        OPENSSL_cleanse(rl->mac_secret, sizeof(rl->mac_secret));
 1417|       |
 1418|  15.5k|    TLS_RL_RECORD_release(rl->rrec, SSL_MAX_PIPELINES);
  ------------------
  |  |   74|  15.5k|#define SSL_MAX_PIPELINES 32
  ------------------
 1419|       |
 1420|  15.5k|    OPENSSL_free(rl);
  ------------------
  |  |  132|  15.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1421|  15.5k|}
tls_common.c:TLS_RL_RECORD_release:
   33|  15.5k|{
   34|  15.5k|    size_t i;
   35|       |
   36|   511k|    for (i = 0; i < num_recs; i++) {
  ------------------
  |  Branch (36:17): [True: 496k, False: 15.5k]
  ------------------
   37|   496k|        OPENSSL_free(r[i].comp);
  ------------------
  |  |  132|   496k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|       |        r[i].comp = NULL;
   39|   496k|    }
   40|  15.5k|}
tls_common.c:tls_release_write_buffer:
  223|  15.5k|{
  224|  15.5k|    tls_release_write_buffer_int(rl, 0);
  225|       |
  226|  15.5k|    rl->numwpipes = 0;
  227|  15.5k|}
tls_common.c:tls_new_record_layer:
 1356|  15.5k|{
 1357|  15.5k|    int ret;
 1358|       |
 1359|  15.5k|    ret = tls_int_new_record_layer(libctx, propq, vers, role, direction, level,
 1360|  15.5k|        ciph, taglen, md, comp, prev,
 1361|  15.5k|        transport, next, settings,
 1362|  15.5k|        options, fns, cbarg, retrl);
 1363|       |
 1364|  15.5k|    if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  15.5k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1364:9): [True: 0, False: 15.5k]
  ------------------
 1365|      0|        return ret;
 1366|       |
 1367|  15.5k|    switch (vers) {
 1368|  15.5k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  15.5k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (1368:5): [True: 15.5k, False: 0]
  ------------------
 1369|  15.5k|        (*retrl)->funcs = &tls_any_funcs;
 1370|  15.5k|        break;
 1371|      0|    case TLS1_3_VERSION:
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1371:5): [True: 0, False: 15.5k]
  ------------------
 1372|      0|        (*retrl)->funcs = &tls_1_3_funcs;
 1373|      0|        break;
 1374|      0|    case TLS1_2_VERSION:
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (1374:5): [True: 0, False: 15.5k]
  ------------------
 1375|      0|    case TLS1_1_VERSION:
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1375:5): [True: 0, False: 15.5k]
  ------------------
 1376|      0|    case TLS1_VERSION:
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1376:5): [True: 0, False: 15.5k]
  ------------------
 1377|      0|        (*retrl)->funcs = &tls_1_funcs;
 1378|      0|        break;
 1379|      0|    default:
  ------------------
  |  Branch (1379:5): [True: 0, False: 15.5k]
  ------------------
 1380|       |        /* Should not happen */
 1381|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1382|      0|        ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1383|      0|        goto err;
 1384|  15.5k|    }
 1385|       |
 1386|  15.5k|    ret = (*retrl)->funcs->set_crypto_state(*retrl, level, key, keylen, iv,
 1387|  15.5k|        ivlen, mackey, mackeylen, ciph,
 1388|  15.5k|        taglen, mactype, md, comp);
 1389|       |
 1390|  15.5k|err:
 1391|  15.5k|    if (ret != OSSL_RECORD_RETURN_SUCCESS) {
  ------------------
  |  |   45|  15.5k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1391:9): [True: 0, False: 15.5k]
  ------------------
 1392|      0|        tls_int_free(*retrl);
 1393|       |        *retrl = NULL;
 1394|      0|    }
 1395|  15.5k|    return ret;
 1396|  15.5k|}

tlsany_meth.c:tls_any_set_crypto_state:
   26|  15.5k|{
   27|  15.5k|    if (level != OSSL_RECORD_PROTECTION_LEVEL_NONE) {
  ------------------
  |  | 2923|  15.5k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (27:9): [True: 0, False: 15.5k]
  ------------------
   28|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   29|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
   30|      0|    }
   31|       |
   32|       |    /* No crypto protection at the "NONE" level so nothing to be done */
   33|       |
   34|  15.5k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  15.5k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
   35|  15.5k|}
tlsany_meth.c:tls_any_cipher:
   40|  5.01k|{
   41|  5.01k|    return 1;
   42|  5.01k|}
tlsany_meth.c:tls_any_set_protocol_version:
  117|     78|{
  118|     78|    if (rl->version != TLS_ANY_VERSION && rl->version != vers)
  ------------------
  |  |   40|    156|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (118:9): [True: 0, False: 78]
  |  Branch (118:43): [True: 0, False: 0]
  ------------------
  119|      0|        return 0;
  120|     78|    rl->version = vers;
  121|       |
  122|     78|    return 1;
  123|     78|}
tlsany_meth.c:tls_validate_record_header:
   45|    495|{
   46|    495|    if (rl->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|    495|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (46:9): [True: 495, False: 0]
  ------------------
   47|    495|        if ((rec->rec_version >> 8) != SSL3_VERSION_MAJOR) {
  ------------------
  |  |  216|    495|#define SSL3_VERSION_MAJOR 0x03
  ------------------
  |  Branch (47:13): [True: 250, False: 245]
  ------------------
   48|    250|            if (rl->is_first_record) {
  ------------------
  |  Branch (48:17): [True: 233, False: 17]
  ------------------
   49|    233|                unsigned char *p;
   50|       |
   51|       |                /*
   52|       |                 * Go back to start of packet, look at the five bytes that
   53|       |                 * we have.
   54|       |                 */
   55|    233|                p = rl->packet;
   56|    233|                if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    466|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 232]
  |  |  ------------------
  ------------------
                              if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    465|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 231]
  |  |  ------------------
  ------------------
                              if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    464|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 230]
  |  |  ------------------
  ------------------
                              if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    463|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 229]
  |  |  ------------------
  ------------------
                              if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    462|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 228]
  |  |  ------------------
  ------------------
                              if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    461|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 227]
  |  |  ------------------
  ------------------
                              if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    460|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 226]
  |  |  ------------------
  ------------------
                              if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    226|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 225]
  |  |  ------------------
  ------------------
   57|      8|                    RLAYERfatal(rl, SSL_AD_NO_ALERT, SSL_R_HTTP_REQUEST);
  ------------------
  |  |  390|      8|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      8|    (ERR_new(),                                                  \
  |  |  |  |  393|      8|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      8|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      8|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   58|      8|                    return 0;
   59|    225|                } else if (HAS_PREFIX((char *)p, "CONNE")) {
  ------------------
  |  |   58|    225|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 224]
  |  |  ------------------
  ------------------
   60|      1|                    RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  390|      1|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      1|    (ERR_new(),                                                  \
  |  |  |  |  393|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      1|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   61|      1|                        SSL_R_HTTPS_PROXY_REQUEST);
   62|      1|                    return 0;
   63|      1|                }
   64|       |
   65|       |                /* Doesn't look like TLS - don't send an alert */
   66|    233|                RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  390|    224|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|    224|    (ERR_new(),                                                  \
  |  |  |  |  393|    224|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    224|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|    224|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   67|    224|                    SSL_R_WRONG_VERSION_NUMBER);
   68|    224|                return 0;
   69|    233|            } else {
   70|     17|                RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  390|     17|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|     17|    (ERR_new(),                                                  \
  |  |  |  |  393|     17|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     17|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|     17|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   71|     17|                    SSL_R_WRONG_VERSION_NUMBER);
   72|     17|                return 0;
   73|     17|            }
   74|    250|        }
   75|    495|    } else if (rl->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (75:16): [True: 0, False: 0]
  ------------------
   76|       |        /*
   77|       |         * In this case we know we are going to negotiate TLSv1.3, but we've
   78|       |         * had an HRR, so we haven't actually done so yet. In TLSv1.3 we
   79|       |         * must ignore the legacy record version in plaintext records.
   80|       |         */
   81|      0|    } else if (rec->rec_version != rl->version) {
  ------------------
  |  Branch (81:16): [True: 0, False: 0]
  ------------------
   82|      0|        if ((rl->version & 0xFF00) == (rec->rec_version & 0xFF00)) {
  ------------------
  |  Branch (82:13): [True: 0, False: 0]
  ------------------
   83|      0|            if (rec->type == SSL3_RT_ALERT) {
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (83:17): [True: 0, False: 0]
  ------------------
   84|       |                /*
   85|       |                 * The record is using an incorrect version number,
   86|       |                 * but what we've got appears to be an alert. We
   87|       |                 * haven't read the body yet to check whether its a
   88|       |                 * fatal or not - but chances are it is. We probably
   89|       |                 * shouldn't send a fatal alert back. We'll just
   90|       |                 * end.
   91|       |                 */
   92|      0|                RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   93|      0|                    SSL_R_WRONG_VERSION_NUMBER);
   94|      0|                return 0;
   95|      0|            }
   96|       |            /* Send back error using their minor version number */
   97|      0|            rl->version = (unsigned short)rec->rec_version;
   98|      0|        }
   99|      0|        RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  100|      0|            SSL_R_WRONG_VERSION_NUMBER);
  101|      0|        return 0;
  102|      0|    }
  103|       |
  104|    245|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|    245|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (104:9): [True: 2, False: 243]
  ------------------
  105|       |        /*
  106|       |         * We use SSL_R_DATA_LENGTH_TOO_LONG instead of
  107|       |         * SSL_R_ENCRYPTED_LENGTH_TOO_LONG here because we are the "any" method
  108|       |         * and we know that we are dealing with plaintext data
  109|       |         */
  110|      2|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  390|      2|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      2|    (ERR_new(),                                                  \
  |  |  |  |  393|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      2|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  111|      2|        return 0;
  112|      2|    }
  113|    243|    return 1;
  114|    245|}
tlsany_meth.c:tls_any_prepare_for_encryption:
  129|  4.79k|{
  130|       |    /* No encryption, so nothing to do */
  131|  4.79k|    return 1;
  132|  4.79k|}

RECORD_LAYER_init:
   28|  2.58k|{
   29|  2.58k|    rl->s = s;
   30|  2.58k|}
RECORD_LAYER_clear:
   33|  10.3k|{
   34|  10.3k|    int ret = 1;
   35|       |
   36|       |    /* Clear any buffered records we no longer need */
   37|  10.4k|    while (rl->curr_rec < rl->num_recs)
  ------------------
  |  Branch (37:12): [True: 112, False: 10.3k]
  ------------------
   38|    112|        ret &= ssl_release_record(rl->s,
   39|    112|            &(rl->tlsrecs[rl->curr_rec++]),
   40|    112|            0);
   41|       |
   42|  10.3k|    rl->wnum = 0;
   43|  10.3k|    memset(rl->handshake_fragment, 0, sizeof(rl->handshake_fragment));
   44|  10.3k|    rl->handshake_fragment_len = 0;
   45|  10.3k|    rl->wpend_tot = 0;
   46|  10.3k|    rl->wpend_type = 0;
   47|  10.3k|    rl->wpend_buf = NULL;
   48|  10.3k|    rl->alert_count = 0;
   49|  10.3k|    rl->num_recs = 0;
   50|  10.3k|    rl->curr_rec = 0;
   51|       |
   52|  10.3k|    BIO_free(rl->rrlnext);
   53|  10.3k|    rl->rrlnext = NULL;
   54|       |
   55|  10.3k|    if (rl->rrlmethod != NULL)
  ------------------
  |  Branch (55:9): [True: 7.75k, False: 2.58k]
  ------------------
   56|  7.75k|        rl->rrlmethod->free(rl->rrl); /* Ignore return value */
   57|  10.3k|    if (rl->wrlmethod != NULL)
  ------------------
  |  Branch (57:9): [True: 7.75k, False: 2.58k]
  ------------------
   58|  7.75k|        rl->wrlmethod->free(rl->wrl); /* Ignore return value */
   59|       |
   60|  10.3k|    rl->rrlmethod = NULL;
   61|  10.3k|    rl->wrlmethod = NULL;
   62|       |
   63|  10.3k|    rl->rrl = NULL;
   64|  10.3k|    rl->wrl = NULL;
   65|       |
   66|  10.3k|    if (rl->d)
  ------------------
  |  Branch (66:9): [True: 0, False: 10.3k]
  ------------------
   67|      0|        DTLS_RECORD_LAYER_clear(rl);
   68|       |
   69|  10.3k|    return ret;
   70|  10.3k|}
RECORD_LAYER_reset:
   73|  7.75k|{
   74|  7.75k|    int ret;
   75|       |
   76|  7.75k|    ret = RECORD_LAYER_clear(rl);
   77|       |
   78|       |    /* We try and reset both record layers even if one fails */
   79|  7.75k|    ret &= ssl_set_new_record_layer(rl->s,
   80|  7.75k|        SSL_CONNECTION_IS_DTLS(rl->s)
  ------------------
  |  |  266|  7.75k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.75k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.75k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 7.75k]
  |  |  ------------------
  ------------------
   81|  7.75k|            ? DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
   82|  7.75k|            : TLS_ANY_VERSION,
  ------------------
  |  |   40|  7.75k|#define TLS_ANY_VERSION 0x10000
  ------------------
   83|  7.75k|        OSSL_RECORD_DIRECTION_READ,
  ------------------
  |  |   42|  7.75k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
   84|  7.75k|        OSSL_RECORD_PROTECTION_LEVEL_NONE, NULL, 0,
  ------------------
  |  | 2923|  7.75k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
   85|  7.75k|        NULL, 0, NULL, 0, NULL, 0, NULL, 0,
   86|  7.75k|        NID_undef, NULL, NULL, NULL);
  ------------------
  |  |   18|  7.75k|#define NID_undef                       0
  ------------------
   87|       |
   88|  7.75k|    ret &= ssl_set_new_record_layer(rl->s,
   89|  7.75k|        SSL_CONNECTION_IS_DTLS(rl->s)
  ------------------
  |  |  266|  7.75k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.75k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.75k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 7.75k]
  |  |  ------------------
  ------------------
   90|  7.75k|            ? DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
   91|  7.75k|            : TLS_ANY_VERSION,
  ------------------
  |  |   40|  7.75k|#define TLS_ANY_VERSION 0x10000
  ------------------
   92|  7.75k|        OSSL_RECORD_DIRECTION_WRITE,
  ------------------
  |  |   43|  7.75k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
   93|  7.75k|        OSSL_RECORD_PROTECTION_LEVEL_NONE, NULL, 0,
  ------------------
  |  | 2923|  7.75k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
   94|  7.75k|        NULL, 0, NULL, 0, NULL, 0, NULL, 0,
   95|  7.75k|        NID_undef, NULL, NULL, NULL);
  ------------------
  |  |   18|  7.75k|#define NID_undef                       0
  ------------------
   96|       |
   97|       |    /* SSLfatal already called in the event of failure */
   98|  7.75k|    return ret;
   99|  7.75k|}
RECORD_LAYER_write_pending:
  115|  4.63k|{
  116|  4.63k|    return rl->wpend_tot > 0;
  117|  4.63k|}
SSL_CTX_set_default_read_buffer_len:
  207|  3.35k|{
  208|  3.35k|    ctx->default_read_buf_len = len;
  209|  3.35k|}
ssl3_write_bytes:
  275|  2.48k|{
  276|  2.48k|    const unsigned char *buf = buf_;
  277|  2.48k|    size_t tot;
  278|  2.48k|    size_t n, max_send_fragment, split_send_fragment, maxpipes;
  279|  2.48k|    int i;
  280|  2.48k|    SSL_CONNECTION *s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  2.48k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  2.48k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  |  |   18|  2.48k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.48k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 2.48k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  2.48k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  2.48k|                             : NULL))
  |  |  ------------------
  ------------------
  281|  2.48k|    OSSL_RECORD_TEMPLATE tmpls[SSL_MAX_PIPELINES];
  282|  2.48k|    unsigned int recversion;
  283|       |
  284|  2.48k|    if (s == NULL)
  ------------------
  |  Branch (284:9): [True: 0, False: 2.48k]
  ------------------
  285|      0|        return -1;
  286|       |
  287|  2.48k|    s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  2.48k|#define SSL_NOTHING 1
  ------------------
  288|  2.48k|    tot = s->rlayer.wnum;
  289|       |    /*
  290|       |     * ensure that if we end up with a smaller value of data to write out
  291|       |     * than the original len from a write which didn't complete for
  292|       |     * non-blocking I/O and also somehow ended up avoiding the check for
  293|       |     * this in tls_write_check_pending/SSL_R_BAD_WRITE_RETRY as it must never be
  294|       |     * possible to end up with (len-tot) as a large number that will then
  295|       |     * promptly send beyond the end of the users buffer ... so we trap and
  296|       |     * report the error in a way the user will notice
  297|       |     */
  298|  2.48k|    if ((len < s->rlayer.wnum)
  ------------------
  |  Branch (298:9): [True: 0, False: 2.48k]
  ------------------
  299|  2.48k|        || ((s->rlayer.wpend_tot != 0)
  ------------------
  |  Branch (299:13): [True: 0, False: 2.48k]
  ------------------
  300|      0|            && (len < (s->rlayer.wnum + s->rlayer.wpend_tot)))) {
  ------------------
  |  Branch (300:16): [True: 0, False: 0]
  ------------------
  301|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  302|      0|        return -1;
  303|      0|    }
  304|       |
  305|  2.48k|    if (s->early_data_state == SSL_EARLY_DATA_WRITING
  ------------------
  |  Branch (305:9): [True: 0, False: 2.48k]
  ------------------
  306|      0|        && !ossl_early_data_count_ok(s, len, 0, 1)) {
  ------------------
  |  Branch (306:12): [True: 0, False: 0]
  ------------------
  307|       |        /* SSLfatal() already called */
  308|      0|        return -1;
  309|      0|    }
  310|       |
  311|  2.48k|    s->rlayer.wnum = 0;
  312|       |
  313|       |    /*
  314|       |     * If we are supposed to be sending a KeyUpdate or NewSessionTicket then go
  315|       |     * into init unless we have writes pending - in which case we should finish
  316|       |     * doing that first.
  317|       |     */
  318|  2.48k|    if (s->rlayer.wpend_tot == 0 && (s->key_update != SSL_KEY_UPDATE_NONE || s->ext.extra_tickets_expected > 0))
  ------------------
  |  | 1071|  4.96k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  |  Branch (318:9): [True: 2.48k, False: 0]
  |  Branch (318:38): [True: 0, False: 2.48k]
  |  Branch (318:78): [True: 0, False: 2.48k]
  ------------------
  319|      0|        ossl_statem_set_in_init(s, 1);
  320|       |
  321|       |    /*
  322|       |     * When writing early data on the server side we could be "in_init" in
  323|       |     * between receiving the EoED and the CF - but we don't want to handle those
  324|       |     * messages yet.
  325|       |     */
  326|  2.48k|    if (SSL_in_init(ssl) && !ossl_statem_get_in_handshake(s)
  ------------------
  |  Branch (326:9): [True: 2.48k, False: 0]
  |  Branch (326:29): [True: 0, False: 2.48k]
  ------------------
  327|      0|        && s->early_data_state != SSL_EARLY_DATA_UNAUTH_WRITING) {
  ------------------
  |  Branch (327:12): [True: 0, False: 0]
  ------------------
  328|      0|        i = s->handshake_func(ssl);
  329|       |        /* SSLfatal() already called */
  330|      0|        if (i < 0)
  ------------------
  |  Branch (330:13): [True: 0, False: 0]
  ------------------
  331|      0|            return i;
  332|      0|        if (i == 0) {
  ------------------
  |  Branch (332:13): [True: 0, False: 0]
  ------------------
  333|      0|            return -1;
  334|      0|        }
  335|      0|    }
  336|       |
  337|  2.48k|    i = tls_write_check_pending(s, type, buf, len);
  338|  2.48k|    if (i < 0) {
  ------------------
  |  Branch (338:9): [True: 0, False: 2.48k]
  ------------------
  339|       |        /* SSLfatal() already called */
  340|      0|        return i;
  341|  2.48k|    } else if (i > 0) {
  ------------------
  |  Branch (341:16): [True: 0, False: 2.48k]
  ------------------
  342|       |        /* Retry needed */
  343|      0|        i = HANDLE_RLAYER_WRITE_RETURN(s,
  ------------------
  |  |  168|      0|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  344|      0|            s->rlayer.wrlmethod->retry_write_records(s->rlayer.wrl));
  345|      0|        if (i <= 0) {
  ------------------
  |  Branch (345:13): [True: 0, False: 0]
  ------------------
  346|      0|            s->rlayer.wnum = tot;
  347|      0|            return i;
  348|      0|        }
  349|      0|        tot += s->rlayer.wpend_tot;
  350|      0|        s->rlayer.wpend_tot = 0;
  351|      0|    } /* else no retry required */
  352|       |
  353|  2.48k|    if (tot == 0) {
  ------------------
  |  Branch (353:9): [True: 2.48k, False: 0]
  ------------------
  354|       |        /*
  355|       |         * We've not previously sent any data for this write so memorize
  356|       |         * arguments so that we can detect bad write retries later
  357|       |         */
  358|  2.48k|        s->rlayer.wpend_tot = 0;
  359|  2.48k|        s->rlayer.wpend_type = type;
  360|  2.48k|        s->rlayer.wpend_buf = buf;
  361|  2.48k|    }
  362|       |
  363|  2.48k|    if (tot == len) { /* done? */
  ------------------
  |  Branch (363:9): [True: 0, False: 2.48k]
  ------------------
  364|      0|        *written = tot;
  365|      0|        return 1;
  366|      0|    }
  367|       |
  368|       |    /* If we have an alert to send, lets send it */
  369|  2.48k|    if (s->s3.alert_dispatch > 0) {
  ------------------
  |  Branch (369:9): [True: 0, False: 2.48k]
  ------------------
  370|      0|        i = ssl->method->ssl_dispatch_alert(ssl);
  371|      0|        if (i <= 0) {
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  ------------------
  372|       |            /* SSLfatal() already called if appropriate */
  373|      0|            s->rlayer.wnum = tot;
  374|      0|            return i;
  375|      0|        }
  376|       |        /* if it went, fall through and send more stuff */
  377|      0|    }
  378|       |
  379|  2.48k|    n = (len - tot);
  380|       |
  381|  2.48k|    max_send_fragment = ssl_get_max_send_fragment(s);
  382|  2.48k|    split_send_fragment = ssl_get_split_send_fragment(s);
  383|       |
  384|  2.48k|    if (max_send_fragment == 0
  ------------------
  |  Branch (384:9): [True: 0, False: 2.48k]
  ------------------
  385|  2.48k|        || split_send_fragment == 0
  ------------------
  |  Branch (385:12): [True: 0, False: 2.48k]
  ------------------
  386|  2.48k|        || split_send_fragment > max_send_fragment) {
  ------------------
  |  Branch (386:12): [True: 0, False: 2.48k]
  ------------------
  387|       |        /*
  388|       |         * We should have prevented this when we set/get the split and max send
  389|       |         * fragments so we shouldn't get here
  390|       |         */
  391|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  392|      0|        return -1;
  393|      0|    }
  394|       |
  395|       |    /*
  396|       |     * Some servers hang if initial client hello is larger than 256 bytes
  397|       |     * and record version number > TLS 1.0
  398|       |     */
  399|  2.48k|    recversion = (s->version == TLS1_3_VERSION) ? TLS1_2_VERSION : s->version;
  ------------------
  |  |   27|  2.48k|#define TLS1_3_VERSION 0x0304
  ------------------
                  recversion = (s->version == TLS1_3_VERSION) ? TLS1_2_VERSION : s->version;
  ------------------
  |  |   26|  2.43k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (399:18): [True: 2.43k, False: 49]
  ------------------
  400|  2.48k|    if (SSL_get_state(ssl) == TLS_ST_CW_CLNT_HELLO
  ------------------
  |  Branch (400:9): [True: 2.48k, False: 0]
  ------------------
  401|  2.48k|        && !s->renegotiate
  ------------------
  |  Branch (401:12): [True: 2.48k, False: 0]
  ------------------
  402|  2.48k|        && TLS1_get_version(ssl) > TLS1_VERSION
  ------------------
  |  |   52|  2.48k|    ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
  |  |  ------------------
  |  |  |  |   42|  2.48k|#define TLS1_VERSION_MAJOR 0x03
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 2.48k, False: 0]
  |  |  ------------------
  ------------------
                      && TLS1_get_version(ssl) > TLS1_VERSION
  ------------------
  |  |   24|  4.96k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (402:12): [True: 2.48k, False: 1]
  ------------------
  403|  2.48k|        && s->hello_retry_request == SSL_HRR_NONE)
  ------------------
  |  Branch (403:12): [True: 2.48k, False: 0]
  ------------------
  404|  2.48k|        recversion = TLS1_VERSION;
  ------------------
  |  |   24|  2.48k|#define TLS1_VERSION 0x0301
  ------------------
  405|       |
  406|  2.48k|    for (;;) {
  407|  2.48k|        size_t tmppipelen, remain;
  408|  2.48k|        size_t j, lensofar = 0;
  409|       |
  410|       |        /*
  411|       |         * Ask the record layer how it would like to split the amount of data
  412|       |         * that we have, and how many of those records it would like in one go.
  413|       |         */
  414|  2.48k|        maxpipes = s->rlayer.wrlmethod->get_max_records(s->rlayer.wrl, type, n,
  415|  2.48k|            max_send_fragment,
  416|  2.48k|            &split_send_fragment);
  417|       |        /*
  418|       |         * If max_pipelines is 0 then this means "undefined" and we default to
  419|       |         * whatever the record layer wants to do. Otherwise we use the smallest
  420|       |         * value from the number requested by the record layer, and max number
  421|       |         * configured by the user.
  422|       |         */
  423|  2.48k|        if (s->max_pipelines > 0 && maxpipes > s->max_pipelines)
  ------------------
  |  Branch (423:13): [True: 0, False: 2.48k]
  |  Branch (423:37): [True: 0, False: 0]
  ------------------
  424|      0|            maxpipes = s->max_pipelines;
  425|       |
  426|  2.48k|        if (maxpipes > SSL_MAX_PIPELINES)
  ------------------
  |  |   74|  2.48k|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (426:13): [True: 0, False: 2.48k]
  ------------------
  427|      0|            maxpipes = SSL_MAX_PIPELINES;
  ------------------
  |  |   74|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  428|       |
  429|  2.48k|        if (split_send_fragment > max_send_fragment) {
  ------------------
  |  Branch (429:13): [True: 0, False: 2.48k]
  ------------------
  430|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  431|      0|            return -1;
  432|      0|        }
  433|       |
  434|  2.48k|        if (n / maxpipes >= split_send_fragment) {
  ------------------
  |  Branch (434:13): [True: 0, False: 2.48k]
  ------------------
  435|       |            /*
  436|       |             * We have enough data to completely fill all available
  437|       |             * pipelines
  438|       |             */
  439|      0|            for (j = 0; j < maxpipes; j++) {
  ------------------
  |  Branch (439:25): [True: 0, False: 0]
  ------------------
  440|      0|                tmpls[j].type = type;
  441|      0|                tmpls[j].version = recversion;
  442|      0|                tmpls[j].buf = &(buf[tot]) + (j * split_send_fragment);
  443|      0|                tmpls[j].buflen = split_send_fragment;
  444|      0|            }
  445|       |            /* Remember how much data we are going to be sending */
  446|      0|            s->rlayer.wpend_tot = maxpipes * split_send_fragment;
  447|  2.48k|        } else {
  448|       |            /* We can partially fill all available pipelines */
  449|  2.48k|            tmppipelen = n / maxpipes;
  450|  2.48k|            remain = n % maxpipes;
  451|       |            /*
  452|       |             * If there is a remainder we add an extra byte to the first few
  453|       |             * pipelines
  454|       |             */
  455|  2.48k|            if (remain > 0)
  ------------------
  |  Branch (455:17): [True: 0, False: 2.48k]
  ------------------
  456|      0|                tmppipelen++;
  457|  4.96k|            for (j = 0; j < maxpipes; j++) {
  ------------------
  |  Branch (457:25): [True: 2.48k, False: 2.48k]
  ------------------
  458|  2.48k|                tmpls[j].type = type;
  459|  2.48k|                tmpls[j].version = recversion;
  460|  2.48k|                tmpls[j].buf = &(buf[tot]) + lensofar;
  461|  2.48k|                tmpls[j].buflen = tmppipelen;
  462|  2.48k|                lensofar += tmppipelen;
  463|  2.48k|                if (j + 1 == remain)
  ------------------
  |  Branch (463:21): [True: 0, False: 2.48k]
  ------------------
  464|      0|                    tmppipelen--;
  465|  2.48k|            }
  466|       |            /* Remember how much data we are going to be sending */
  467|  2.48k|            s->rlayer.wpend_tot = n;
  468|  2.48k|        }
  469|       |
  470|  2.48k|        i = HANDLE_RLAYER_WRITE_RETURN(s,
  ------------------
  |  |  168|  2.48k|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  471|  2.48k|            s->rlayer.wrlmethod->write_records(s->rlayer.wrl, tmpls, maxpipes));
  472|  2.48k|        if (i <= 0) {
  ------------------
  |  Branch (472:13): [True: 0, False: 2.48k]
  ------------------
  473|       |            /* SSLfatal() already called if appropriate */
  474|      0|            s->rlayer.wnum = tot;
  475|      0|            return i;
  476|      0|        }
  477|       |
  478|  2.48k|        if (s->rlayer.wpend_tot == n
  ------------------
  |  Branch (478:13): [True: 2.48k, False: 0]
  ------------------
  479|      0|            || (type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (479:17): [True: 0, False: 0]
  ------------------
  480|  2.48k|                && (s->mode & SSL_MODE_ENABLE_PARTIAL_WRITE) != 0)) {
  ------------------
  |  |  519|      0|#define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001U
  ------------------
  |  Branch (480:20): [True: 0, False: 0]
  ------------------
  481|  2.48k|            *written = tot + s->rlayer.wpend_tot;
  482|  2.48k|            s->rlayer.wpend_tot = 0;
  483|  2.48k|            return 1;
  484|  2.48k|        }
  485|       |
  486|      0|        n -= s->rlayer.wpend_tot;
  487|      0|        tot += s->rlayer.wpend_tot;
  488|      0|    }
  489|  2.48k|}
ossl_tls_handle_rlayer_return:
  493|  8.30k|{
  494|  8.30k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  8.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  495|       |
  496|  8.30k|    if (ret == OSSL_RECORD_RETURN_RETRY) {
  ------------------
  |  |   46|  8.30k|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  |  Branch (496:9): [True: 484, False: 7.82k]
  ------------------
  497|    484|        s->rwstate = writing ? SSL_WRITING : SSL_READING;
  ------------------
  |  |  956|      0|#define SSL_WRITING 2
  ------------------
                      s->rwstate = writing ? SSL_WRITING : SSL_READING;
  ------------------
  |  |  957|    968|#define SSL_READING 3
  ------------------
  |  Branch (497:22): [True: 0, False: 484]
  ------------------
  498|    484|        ret = -1;
  499|  7.82k|    } else {
  500|  7.82k|        s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  7.82k|#define SSL_NOTHING 1
  ------------------
  501|  7.82k|        if (ret == OSSL_RECORD_RETURN_EOF) {
  ------------------
  |  |   49|  7.82k|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  |  Branch (501:13): [True: 2.05k, False: 5.76k]
  ------------------
  502|  2.05k|            if (writing) {
  ------------------
  |  Branch (502:17): [True: 0, False: 2.05k]
  ------------------
  503|       |                /*
  504|       |                 * This shouldn't happen with a writing operation. We treat it
  505|       |                 * as fatal.
  506|       |                 */
  507|      0|                ERR_new();
  508|      0|                ERR_set_debug(file, line, 0);
  509|      0|                ossl_statem_fatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  | 1266|      0|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|      0|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
  510|      0|                    ERR_R_INTERNAL_ERROR, NULL);
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  511|      0|                ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  512|  2.05k|            } else if ((s->options & SSL_OP_IGNORE_UNEXPECTED_EOF) != 0) {
  ------------------
  |  |  366|  2.05k|#define SSL_OP_IGNORE_UNEXPECTED_EOF SSL_OP_BIT(7)
  |  |  ------------------
  |  |  |  |  351|  2.05k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (512:24): [True: 0, False: 2.05k]
  ------------------
  513|      0|                SSL_set_shutdown(ssl, SSL_RECEIVED_SHUTDOWN);
  ------------------
  |  |  217|      0|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  514|      0|                s->s3.warn_alert = SSL_AD_CLOSE_NOTIFY;
  ------------------
  |  | 1232|      0|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  515|  2.05k|            } else {
  516|  2.05k|                ERR_new();
  517|  2.05k|                ERR_set_debug(file, line, 0);
  518|       |                /*
  519|       |                 * This reason code is part of the API and may be used by
  520|       |                 * applications for control flow decisions.
  521|       |                 */
  522|  2.05k|                ossl_statem_fatal(s, SSL_AD_DECODE_ERROR,
  ------------------
  |  | 1257|  2.05k|#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR
  |  |  ------------------
  |  |  |  |   61|  2.05k|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  |  |  ------------------
  ------------------
  523|  2.05k|                    SSL_R_UNEXPECTED_EOF_WHILE_READING, NULL);
  ------------------
  |  |  338|  2.05k|#define SSL_R_UNEXPECTED_EOF_WHILE_READING 294
  ------------------
  524|  2.05k|            }
  525|  5.76k|        } else if (ret == OSSL_RECORD_RETURN_FATAL) {
  ------------------
  |  |   48|  5.76k|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  |  Branch (525:20): [True: 275, False: 5.49k]
  ------------------
  526|    275|            int al = s->rlayer.rrlmethod->get_alert_code(s->rlayer.rrl);
  527|       |
  528|    275|            if (al != SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|    275|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (528:17): [True: 19, False: 256]
  ------------------
  529|     19|                ERR_new();
  530|     19|                ERR_set_debug(file, line, 0);
  531|     19|                ossl_statem_fatal(s, al, SSL_R_RECORD_LAYER_FAILURE, NULL);
  ------------------
  |  |  249|     19|#define SSL_R_RECORD_LAYER_FAILURE 313
  ------------------
  532|    256|            } else {
  533|       |                /*
  534|       |                 * Some failure but there is no alert code. We don't log an
  535|       |                 * error for this. The record layer should have logged an error
  536|       |                 * already or, if not, its due to some sys call error which will be
  537|       |                 * reported via SSL_ERROR_SYSCALL and errno. We do still set the
  538|       |                 * state machine into an error state via ossl_statem_send_fatal().
  539|       |                 * This doesn't actually send an alert because we are using
  540|       |                 * SSL_AD_NO_ALERT.
  541|       |                 */
  542|    256|                ossl_statem_send_fatal(s, SSL_AD_NO_ALERT);
  ------------------
  |  |   67|    256|#define SSL_AD_NO_ALERT -1
  ------------------
  543|    256|            }
  544|    275|        }
  545|       |        /*
  546|       |         * The record layer distinguishes the cases of EOF, non-fatal
  547|       |         * err and retry. Upper layers do not.
  548|       |         * If we got a retry or success then *ret is already correct,
  549|       |         * otherwise we need to convert the return value.
  550|       |         */
  551|  7.82k|        if (ret == OSSL_RECORD_RETURN_NON_FATAL_ERR || ret == OSSL_RECORD_RETURN_EOF)
  ------------------
  |  |   47|  15.6k|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
                      if (ret == OSSL_RECORD_RETURN_NON_FATAL_ERR || ret == OSSL_RECORD_RETURN_EOF)
  ------------------
  |  |   49|  7.82k|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  |  Branch (551:13): [True: 0, False: 7.82k]
  |  Branch (551:56): [True: 2.05k, False: 5.76k]
  ------------------
  552|  2.05k|            ret = 0;
  553|  5.76k|        else if (ret < OSSL_RECORD_RETURN_NON_FATAL_ERR)
  ------------------
  |  |   47|  5.76k|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  |  Branch (553:18): [True: 275, False: 5.49k]
  ------------------
  554|    275|            ret = -1;
  555|  7.82k|    }
  556|       |
  557|  8.30k|    return ret;
  558|  8.30k|}
ssl_release_record:
  565|    477|{
  566|    477|    assert(rr->length >= length);
  ------------------
  |  Branch (566:5): [True: 0, False: 477]
  |  Branch (566:5): [True: 477, False: 0]
  ------------------
  567|    477|    if (rr->rechandle != NULL) {
  ------------------
  |  Branch (567:9): [True: 477, False: 0]
  ------------------
  568|    477|        if (length == 0)
  ------------------
  |  Branch (568:13): [True: 135, False: 342]
  ------------------
  569|    135|            length = rr->length;
  570|       |        /* The record layer allocated the buffers for this record */
  571|    477|        if (HANDLE_RLAYER_READ_RETURN(s,
  ------------------
  |  |  165|    477|    ossl_tls_handle_rlayer_return(s, 0, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 0, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (571:13): [True: 0, False: 477]
  ------------------
  572|    477|                s->rlayer.rrlmethod->release_record(s->rlayer.rrl,
  573|    477|                    rr->rechandle,
  574|    477|                    length))
  575|    477|            <= 0) {
  576|       |            /* RLAYER_fatal already called */
  577|      0|            return 0;
  578|      0|        }
  579|       |
  580|    477|        if (length == rr->length)
  ------------------
  |  Branch (580:13): [True: 218, False: 259]
  ------------------
  581|    218|            s->rlayer.curr_rec++;
  582|    477|    } else if (length == 0 || length == rr->length) {
  ------------------
  |  Branch (582:16): [True: 0, False: 0]
  |  Branch (582:31): [True: 0, False: 0]
  ------------------
  583|       |        /* We allocated the buffers for this record (only happens with DTLS) */
  584|      0|        OPENSSL_free(rr->allocdata);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  585|      0|        rr->allocdata = NULL;
  586|      0|        s->rlayer.curr_rec++;
  587|      0|    }
  588|    477|    rr->length -= length;
  589|    477|    if (rr->length > 0)
  ------------------
  |  Branch (589:9): [True: 259, False: 218]
  ------------------
  590|    259|        rr->off += length;
  591|    218|    else
  592|    218|        rr->off = 0;
  593|       |
  594|    477|    return 1;
  595|    477|}
ssl3_read_bytes:
  630|  3.18k|{
  631|  3.18k|    int i, j, ret;
  632|  3.18k|    size_t n, curr_rec, totalbytes;
  633|  3.18k|    TLS_RECORD *rr;
  634|  3.18k|    void (*cb)(const SSL *ssl, int type2, int val) = NULL;
  635|  3.18k|    int is_tls13;
  636|  3.18k|    SSL_CONNECTION *s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  3.18k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  3.18k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 3.18k]
  |  |  |  |  ------------------
  |  |  |  |   18|  3.18k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.18k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 3.18k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  3.18k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  3.18k|                             : NULL))
  |  |  ------------------
  ------------------
  637|       |
  638|  3.18k|    is_tls13 = SSL_CONNECTION_IS_TLS13(s);
  ------------------
  |  |  273|  3.18k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  6.36k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.18k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.18k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.18k, False: 0]
  |  |  ------------------
  |  |  274|  3.18k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.18k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  6.36k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.18k, False: 0]
  |  |  ------------------
  |  |  275|  3.18k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.18k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.18k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 3.18k]
  |  |  ------------------
  ------------------
  639|       |
  640|  3.18k|    if ((type != 0
  ------------------
  |  Branch (640:10): [True: 3.18k, False: 0]
  ------------------
  641|  3.18k|            && (type != SSL3_RT_APPLICATION_DATA)
  ------------------
  |  |  222|  3.18k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (641:16): [True: 3.18k, False: 0]
  ------------------
  642|  3.18k|            && (type != SSL3_RT_HANDSHAKE))
  ------------------
  |  |  221|  3.18k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (642:16): [True: 0, False: 3.18k]
  ------------------
  643|  3.18k|        || (peek && (type != SSL3_RT_APPLICATION_DATA))) {
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (643:13): [True: 0, False: 3.18k]
  |  Branch (643:21): [True: 0, False: 0]
  ------------------
  644|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  645|      0|        return -1;
  646|      0|    }
  647|       |
  648|  3.18k|    if ((type == SSL3_RT_HANDSHAKE) && (s->rlayer.handshake_fragment_len > 0))
  ------------------
  |  |  221|  3.18k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (648:9): [True: 3.18k, False: 0]
  |  Branch (648:40): [True: 0, False: 3.18k]
  ------------------
  649|       |    /* (partially) satisfy request from storage */
  650|      0|    {
  651|      0|        unsigned char *src = s->rlayer.handshake_fragment;
  652|      0|        unsigned char *dst = buf;
  653|      0|        unsigned int k;
  654|       |
  655|       |        /* peek == 0 */
  656|      0|        n = 0;
  657|      0|        while ((len > 0) && (s->rlayer.handshake_fragment_len > 0)) {
  ------------------
  |  Branch (657:16): [True: 0, False: 0]
  |  Branch (657:29): [True: 0, False: 0]
  ------------------
  658|      0|            *dst++ = *src++;
  659|      0|            len--;
  660|      0|            s->rlayer.handshake_fragment_len--;
  661|      0|            n++;
  662|      0|        }
  663|       |        /* move any remaining fragment bytes: */
  664|      0|        for (k = 0; k < s->rlayer.handshake_fragment_len; k++)
  ------------------
  |  Branch (664:21): [True: 0, False: 0]
  ------------------
  665|      0|            s->rlayer.handshake_fragment[k] = *src++;
  666|       |
  667|      0|        if (recvd_type != NULL)
  ------------------
  |  Branch (667:13): [True: 0, False: 0]
  ------------------
  668|      0|            *recvd_type = SSL3_RT_HANDSHAKE;
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  669|       |
  670|      0|        *readbytes = n;
  671|      0|        return 1;
  672|      0|    }
  673|       |
  674|       |    /*
  675|       |     * Now s->rlayer.handshake_fragment_len == 0 if type == SSL3_RT_HANDSHAKE.
  676|       |     */
  677|       |
  678|  3.18k|    if (!ossl_statem_get_in_handshake(s) && SSL_in_init(ssl)) {
  ------------------
  |  Branch (678:9): [True: 0, False: 3.18k]
  |  Branch (678:45): [True: 0, False: 0]
  ------------------
  679|       |        /* type == SSL3_RT_APPLICATION_DATA */
  680|      0|        i = s->handshake_func(ssl);
  681|       |        /* SSLfatal() already called */
  682|      0|        if (i < 0)
  ------------------
  |  Branch (682:13): [True: 0, False: 0]
  ------------------
  683|      0|            return i;
  684|      0|        if (i == 0)
  ------------------
  |  Branch (684:13): [True: 0, False: 0]
  ------------------
  685|      0|            return -1;
  686|      0|    }
  687|  3.20k|start:
  688|  3.20k|    s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  3.20k|#define SSL_NOTHING 1
  ------------------
  689|       |
  690|       |    /*-
  691|       |     * For each record 'i' up to |num_recs]
  692|       |     * rr[i].type     - is the type of record
  693|       |     * rr[i].data,    - data
  694|       |     * rr[i].off,     - offset into 'data' for next read
  695|       |     * rr[i].length,  - number of bytes.
  696|       |     */
  697|       |    /* get new records if necessary */
  698|  3.20k|    if (s->rlayer.curr_rec >= s->rlayer.num_recs) {
  ------------------
  |  Branch (698:9): [True: 3.03k, False: 168]
  ------------------
  699|  3.03k|        s->rlayer.curr_rec = s->rlayer.num_recs = 0;
  700|  3.03k|        do {
  701|  3.03k|            rr = &s->rlayer.tlsrecs[s->rlayer.num_recs];
  702|       |
  703|  3.03k|            ret = HANDLE_RLAYER_READ_RETURN(s,
  ------------------
  |  |  165|  3.03k|    ossl_tls_handle_rlayer_return(s, 0, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 0, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  704|  3.03k|                s->rlayer.rrlmethod->read_record(s->rlayer.rrl,
  705|  3.03k|                    &rr->rechandle,
  706|  3.03k|                    &rr->version, &rr->type,
  707|  3.03k|                    &rr->data, &rr->length,
  708|  3.03k|                    NULL, NULL));
  709|  3.03k|            if (ret <= 0) {
  ------------------
  |  Branch (709:17): [True: 2.81k, False: 218]
  ------------------
  710|       |                /* SSLfatal() already called if appropriate */
  711|  2.81k|                return ret;
  712|  2.81k|            }
  713|    218|            rr->off = 0;
  714|    218|            s->rlayer.num_recs++;
  715|    218|        } while (s->rlayer.rrlmethod->processed_read_pending(s->rlayer.rrl)
  ------------------
  |  Branch (715:18): [True: 0, False: 218]
  ------------------
  716|      0|            && s->rlayer.num_recs < SSL_MAX_PIPELINES);
  ------------------
  |  |   74|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (716:16): [True: 0, False: 0]
  ------------------
  717|  3.03k|    }
  718|    386|    rr = &s->rlayer.tlsrecs[s->rlayer.curr_rec];
  719|       |
  720|    386|    if (s->rlayer.handshake_fragment_len > 0
  ------------------
  |  Branch (720:9): [True: 0, False: 386]
  ------------------
  721|      0|        && rr->type != SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|    386|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (721:12): [True: 0, False: 0]
  ------------------
  722|      0|        && SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  723|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  724|      0|            SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA);
  725|      0|        return -1;
  726|      0|    }
  727|       |
  728|       |    /*
  729|       |     * Reset the count of consecutive warning alerts if we've got a non-empty
  730|       |     * record that isn't an alert.
  731|       |     */
  732|    386|    if (rr->type != SSL3_RT_ALERT && rr->length != 0)
  ------------------
  |  |  220|    772|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (732:9): [True: 366, False: 20]
  |  Branch (732:38): [True: 349, False: 17]
  ------------------
  733|    349|        s->rlayer.alert_count = 0;
  734|       |
  735|       |    /* we now have a packet which can be read and processed */
  736|       |
  737|    386|    if (s->s3.change_cipher_spec /* set when we receive ChangeCipherSpec,
  ------------------
  |  Branch (737:9): [True: 0, False: 386]
  ------------------
  738|       |                                  * reset by ssl3_get_finished */
  739|      0|        && (rr->type != SSL3_RT_HANDSHAKE)) {
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (739:12): [True: 0, False: 0]
  ------------------
  740|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  741|      0|            SSL_R_DATA_BETWEEN_CCS_AND_FINISHED);
  742|      0|        return -1;
  743|      0|    }
  744|       |
  745|       |    /*
  746|       |     * If the other end has shut down, throw anything we read away (even in
  747|       |     * 'peek' mode)
  748|       |     */
  749|    386|    if (s->shutdown & SSL_RECEIVED_SHUTDOWN) {
  ------------------
  |  |  217|    386|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  |  Branch (749:9): [True: 0, False: 386]
  ------------------
  750|      0|        s->rlayer.curr_rec++;
  751|      0|        s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|      0|#define SSL_NOTHING 1
  ------------------
  752|      0|        return 0;
  753|      0|    }
  754|       |
  755|    386|    if (type == rr->type
  ------------------
  |  Branch (755:9): [True: 344, False: 42]
  ------------------
  756|     42|        || (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|     84|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (756:13): [True: 11, False: 31]
  ------------------
  757|     11|            && type == SSL3_RT_HANDSHAKE && recvd_type != NULL
  ------------------
  |  |  221|     53|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (757:16): [True: 11, False: 0]
  |  Branch (757:45): [True: 10, False: 1]
  ------------------
  758|    354|            && !is_tls13)) {
  ------------------
  |  Branch (758:16): [True: 10, False: 0]
  ------------------
  759|       |        /*
  760|       |         * SSL3_RT_APPLICATION_DATA or
  761|       |         * SSL3_RT_HANDSHAKE or
  762|       |         * SSL3_RT_CHANGE_CIPHER_SPEC
  763|       |         */
  764|       |        /*
  765|       |         * make sure that we are not getting application data when we are
  766|       |         * doing a handshake for the first time
  767|       |         */
  768|    354|        if (SSL_in_init(ssl) && type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    708|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (768:13): [True: 354, False: 0]
  |  Branch (768:33): [True: 0, False: 354]
  ------------------
  769|      0|            && SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  770|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_APP_DATA_IN_HANDSHAKE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  771|      0|            return -1;
  772|      0|        }
  773|       |
  774|    354|        if (type == SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|    708|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (774:13): [True: 354, False: 0]
  ------------------
  775|    354|            && rr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|    708|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (775:16): [True: 10, False: 344]
  ------------------
  776|     10|            && s->rlayer.handshake_fragment_len > 0) {
  ------------------
  |  Branch (776:16): [True: 0, False: 10]
  ------------------
  777|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_CCS_RECEIVED_EARLY);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  778|      0|            return -1;
  779|      0|        }
  780|       |
  781|    354|        if (recvd_type != NULL)
  ------------------
  |  Branch (781:13): [True: 214, False: 140]
  ------------------
  782|    214|            *recvd_type = rr->type;
  783|       |
  784|    354|        if (len == 0) {
  ------------------
  |  Branch (784:13): [True: 0, False: 354]
  ------------------
  785|       |            /*
  786|       |             * Skip a zero length record. This ensures multiple calls to
  787|       |             * SSL_read() with a zero length buffer will eventually cause
  788|       |             * SSL_pending() to report data as being available.
  789|       |             */
  790|      0|            if (rr->length == 0 && !ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (790:17): [True: 0, False: 0]
  |  Branch (790:36): [True: 0, False: 0]
  ------------------
  791|      0|                return -1;
  792|       |
  793|      0|            return 0;
  794|      0|        }
  795|       |
  796|    354|        totalbytes = 0;
  797|    354|        curr_rec = s->rlayer.curr_rec;
  798|    354|        do {
  799|    354|            if (len - totalbytes > rr->length)
  ------------------
  |  Branch (799:17): [True: 74, False: 280]
  ------------------
  800|     74|                n = rr->length;
  801|    280|            else
  802|    280|                n = len - totalbytes;
  803|       |
  804|    354|            memcpy(buf, &(rr->data[rr->off]), n);
  805|    354|            buf += n;
  806|    354|            if (peek) {
  ------------------
  |  Branch (806:17): [True: 0, False: 354]
  ------------------
  807|       |                /* Mark any zero length record as consumed CVE-2016-6305 */
  808|      0|                if (rr->length == 0 && !ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (808:21): [True: 0, False: 0]
  |  Branch (808:40): [True: 0, False: 0]
  ------------------
  809|      0|                    return -1;
  810|    354|            } else {
  811|    354|                if (!ssl_release_record(s, rr, n))
  ------------------
  |  Branch (811:21): [True: 0, False: 354]
  ------------------
  812|      0|                    return -1;
  813|    354|            }
  814|    354|            if (rr->length == 0
  ------------------
  |  Branch (814:17): [True: 95, False: 259]
  ------------------
  815|    259|                || (peek && n == rr->length)) {
  ------------------
  |  Branch (815:21): [True: 0, False: 259]
  |  Branch (815:29): [True: 0, False: 0]
  ------------------
  816|     95|                rr++;
  817|     95|                curr_rec++;
  818|     95|            }
  819|    354|            totalbytes += n;
  820|    354|        } while (type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    708|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (820:18): [True: 0, False: 354]
  ------------------
  821|      0|            && curr_rec < s->rlayer.num_recs
  ------------------
  |  Branch (821:16): [True: 0, False: 0]
  ------------------
  822|      0|            && totalbytes < len);
  ------------------
  |  Branch (822:16): [True: 0, False: 0]
  ------------------
  823|    354|        if (totalbytes == 0) {
  ------------------
  |  Branch (823:13): [True: 12, False: 342]
  ------------------
  824|       |            /* We must have read empty records. Get more data */
  825|     12|            goto start;
  826|     12|        }
  827|    342|        *readbytes = totalbytes;
  828|    342|        return 1;
  829|    354|    }
  830|       |
  831|       |    /*
  832|       |     * If we get here, then type != rr->type; if we have a handshake message,
  833|       |     * then it was unexpected (Hello Request or Client Hello) or invalid (we
  834|       |     * were actually expecting a CCS).
  835|       |     */
  836|       |
  837|       |    /*
  838|       |     * Lets just double check that we've not got an SSLv2 record
  839|       |     */
  840|     32|    if (rr->version == SSL2_VERSION) {
  ------------------
  |  |   23|     32|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (840:9): [True: 0, False: 32]
  ------------------
  841|       |        /*
  842|       |         * Should never happen. ssl3_get_record() should only give us an SSLv2
  843|       |         * record back if this is the first packet and we are looking for an
  844|       |         * initial ClientHello. Therefore |type| should always be equal to
  845|       |         * |rr->type|. If not then something has gone horribly wrong
  846|       |         */
  847|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  848|      0|        return -1;
  849|      0|    }
  850|       |
  851|     32|    if (ssl->method->version == TLS_ANY_VERSION
  ------------------
  |  |   40|     64|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (851:9): [True: 32, False: 0]
  ------------------
  852|     32|        && (s->server || rr->type != SSL3_RT_ALERT)) {
  ------------------
  |  |  220|     32|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (852:13): [True: 0, False: 32]
  |  Branch (852:26): [True: 12, False: 20]
  ------------------
  853|       |        /*
  854|       |         * If we've got this far and still haven't decided on what version
  855|       |         * we're using then this must be a client side alert we're dealing
  856|       |         * with. We shouldn't be receiving anything other than a ClientHello
  857|       |         * if we are a server.
  858|       |         */
  859|     12|        s->version = rr->version;
  860|     12|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  155|     12|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|     12|    (ERR_new(),                                                  \
  |  |  |  |  158|     12|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     12|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|     12|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  861|     12|        return -1;
  862|     12|    }
  863|       |
  864|       |    /*-
  865|       |     * s->rlayer.handshake_fragment_len == 4  iff  rr->type == SSL3_RT_HANDSHAKE;
  866|       |     * (Possibly rr is 'empty' now, i.e. rr->length may be 0.)
  867|       |     */
  868|       |
  869|     20|    if (rr->type == SSL3_RT_ALERT) {
  ------------------
  |  |  220|     20|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (869:9): [True: 20, False: 0]
  ------------------
  870|     20|        unsigned int alert_level, alert_descr;
  871|     20|        const unsigned char *alert_bytes = rr->data + rr->off;
  872|     20|        PACKET alert;
  873|       |
  874|     20|        if (!PACKET_buf_init(&alert, alert_bytes, rr->length)
  ------------------
  |  Branch (874:13): [True: 0, False: 20]
  ------------------
  875|     20|            || !PACKET_get_1(&alert, &alert_level)
  ------------------
  |  Branch (875:16): [True: 2, False: 18]
  ------------------
  876|     18|            || !PACKET_get_1(&alert, &alert_descr)
  ------------------
  |  Branch (876:16): [True: 1, False: 17]
  ------------------
  877|     17|            || PACKET_remaining(&alert) != 0) {
  ------------------
  |  Branch (877:16): [True: 1, False: 16]
  ------------------
  878|      4|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_INVALID_ALERT);
  ------------------
  |  |  155|      4|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      4|    (ERR_new(),                                                  \
  |  |  |  |  158|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      4|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  879|      4|            return -1;
  880|      4|        }
  881|       |
  882|     16|        if (s->msg_callback)
  ------------------
  |  Branch (882:13): [True: 0, False: 16]
  ------------------
  883|      0|            s->msg_callback(0, s->version, SSL3_RT_ALERT, alert_bytes, 2, ssl,
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  884|      0|                s->msg_callback_arg);
  885|       |
  886|     16|        if (s->info_callback != NULL)
  ------------------
  |  Branch (886:13): [True: 0, False: 16]
  ------------------
  887|      0|            cb = s->info_callback;
  888|     16|        else if (ssl->ctx->info_callback != NULL)
  ------------------
  |  Branch (888:18): [True: 0, False: 16]
  ------------------
  889|      0|            cb = ssl->ctx->info_callback;
  890|       |
  891|     16|        if (cb != NULL) {
  ------------------
  |  Branch (891:13): [True: 0, False: 16]
  ------------------
  892|      0|            j = (alert_level << 8) | alert_descr;
  893|      0|            cb(ssl, SSL_CB_READ_ALERT, j);
  ------------------
  |  | 1163|      0|#define SSL_CB_READ_ALERT (SSL_CB_ALERT | SSL_CB_READ)
  |  |  ------------------
  |  |  |  | 1162|      0|#define SSL_CB_ALERT 0x4000 /* used in callback */
  |  |  ------------------
  |  |               #define SSL_CB_READ_ALERT (SSL_CB_ALERT | SSL_CB_READ)
  |  |  ------------------
  |  |  |  | 1160|      0|#define SSL_CB_READ 0x04
  |  |  ------------------
  ------------------
  894|      0|        }
  895|       |
  896|     16|        if ((!is_tls13 && alert_level == SSL3_AL_WARNING)
  ------------------
  |  |  249|     16|#define SSL3_AL_WARNING 1
  ------------------
  |  Branch (896:14): [True: 16, False: 0]
  |  Branch (896:27): [True: 7, False: 9]
  ------------------
  897|      9|            || (is_tls13 && alert_descr == SSL_AD_USER_CANCELLED)) {
  ------------------
  |  | 1267|      0|#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
  |  |  ------------------
  |  |  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  |  |  ------------------
  ------------------
  |  Branch (897:17): [True: 0, False: 9]
  |  Branch (897:29): [True: 0, False: 0]
  ------------------
  898|      7|            s->s3.warn_alert = alert_descr;
  899|      7|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (899:17): [True: 0, False: 7]
  ------------------
  900|      0|                return -1;
  901|       |
  902|      7|            s->rlayer.alert_count++;
  903|      7|            if (s->rlayer.alert_count == MAX_WARN_ALERT_COUNT) {
  ------------------
  |  |   17|      7|#define MAX_WARN_ALERT_COUNT 5
  ------------------
  |  Branch (903:17): [True: 0, False: 7]
  ------------------
  904|      0|                SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  905|      0|                    SSL_R_TOO_MANY_WARN_ALERTS);
  906|      0|                return -1;
  907|      0|            }
  908|      7|        }
  909|       |
  910|       |        /*
  911|       |         * Apart from close_notify the only other warning alert in TLSv1.3
  912|       |         * is user_cancelled - which we just ignore.
  913|       |         */
  914|     16|        if (is_tls13 && alert_descr == SSL_AD_USER_CANCELLED) {
  ------------------
  |  | 1267|      0|#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
  |  |  ------------------
  |  |  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  |  |  ------------------
  ------------------
  |  Branch (914:13): [True: 0, False: 16]
  |  Branch (914:25): [True: 0, False: 0]
  ------------------
  915|      0|            goto start;
  916|     16|        } else if (alert_descr == SSL_AD_CLOSE_NOTIFY
  ------------------
  |  | 1232|     16|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|     32|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (916:20): [True: 2, False: 14]
  ------------------
  917|      2|            && (is_tls13 || alert_level == SSL3_AL_WARNING)) {
  ------------------
  |  |  249|      2|#define SSL3_AL_WARNING 1
  ------------------
  |  Branch (917:17): [True: 0, False: 2]
  |  Branch (917:29): [True: 1, False: 1]
  ------------------
  918|      1|            s->shutdown |= SSL_RECEIVED_SHUTDOWN;
  ------------------
  |  |  217|      1|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  919|      1|            return 0;
  920|     15|        } else if (alert_level == SSL3_AL_FATAL || is_tls13) {
  ------------------
  |  |  250|     30|#define SSL3_AL_FATAL 2
  ------------------
  |  Branch (920:20): [True: 4, False: 11]
  |  Branch (920:52): [True: 0, False: 11]
  ------------------
  921|      4|            s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|      4|#define SSL_NOTHING 1
  ------------------
  922|      4|            s->s3.fatal_alert = alert_descr;
  923|      4|            SSLfatal_data(s, SSL_AD_NO_ALERT,
  ------------------
  |  |  157|      4|    (ERR_new(),                                                  \
  |  |  158|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      4|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      4|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_NO_ALERT,
  ------------------
  |  |   67|      4|#define SSL_AD_NO_ALERT -1
  ------------------
  924|      4|                SSL_AD_REASON_OFFSET + alert_descr,
  ------------------
  |  | 1229|      4|#define SSL_AD_REASON_OFFSET 1000 /* offset to get SSL_R_... value \
  ------------------
  925|      4|                "SSL alert number %d", alert_descr);
  926|      4|            s->shutdown |= SSL_RECEIVED_SHUTDOWN;
  ------------------
  |  |  217|      4|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  927|      4|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (927:17): [True: 0, False: 4]
  ------------------
  928|      0|                return -1;
  929|      4|            SSL_CTX_remove_session(s->session_ctx, s->session);
  930|      4|            return 0;
  931|     11|        } else if (alert_descr == SSL_AD_NO_RENEGOTIATION) {
  ------------------
  |  | 1268|     11|#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
  |  |  ------------------
  |  |  |  |   69|     11|#define TLS1_AD_NO_RENEGOTIATION 100
  |  |  ------------------
  ------------------
  |  Branch (931:20): [True: 1, False: 10]
  ------------------
  932|       |            /*
  933|       |             * This is a warning but we receive it if we requested
  934|       |             * renegotiation and the peer denied it. Terminate with a fatal
  935|       |             * alert because if the application tried to renegotiate it
  936|       |             * presumably had a good reason and expects it to succeed. In
  937|       |             * the future we might have a renegotiation where we don't care
  938|       |             * if the peer refused it where we carry on.
  939|       |             */
  940|      1|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_NO_RENEGOTIATION);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  941|      1|            return -1;
  942|     10|        } else if (alert_level == SSL3_AL_WARNING) {
  ------------------
  |  |  249|     10|#define SSL3_AL_WARNING 1
  ------------------
  |  Branch (942:20): [True: 6, False: 4]
  ------------------
  943|       |            /* We ignore any other warning alert in TLSv1.2 and below */
  944|      6|            goto start;
  945|      6|        }
  946|       |
  947|     16|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_UNKNOWN_ALERT_TYPE);
  ------------------
  |  |  155|      4|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      4|    (ERR_new(),                                                  \
  |  |  |  |  158|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      4|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  948|      4|        return -1;
  949|     16|    }
  950|       |
  951|      0|    if ((s->shutdown & SSL_SENT_SHUTDOWN) != 0) {
  ------------------
  |  |  216|      0|#define SSL_SENT_SHUTDOWN 1
  ------------------
  |  Branch (951:9): [True: 0, False: 0]
  ------------------
  952|      0|        if (rr->type == SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (952:13): [True: 0, False: 0]
  ------------------
  953|      0|            BIO *rbio;
  954|       |
  955|       |            /*
  956|       |             * We ignore any handshake messages sent to us unless they are
  957|       |             * TLSv1.3 in which case we want to process them. For all other
  958|       |             * handshake messages we can't do anything reasonable with them
  959|       |             * because we are unable to write any response due to having already
  960|       |             * sent close_notify.
  961|       |             */
  962|      0|            if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  963|      0|                if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (963:21): [True: 0, False: 0]
  ------------------
  964|      0|                    return -1;
  965|       |
  966|      0|                if ((s->mode & SSL_MODE_AUTO_RETRY) != 0)
  ------------------
  |  |  530|      0|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
  |  Branch (966:21): [True: 0, False: 0]
  ------------------
  967|      0|                    goto start;
  968|       |
  969|      0|                s->rwstate = SSL_READING;
  ------------------
  |  |  957|      0|#define SSL_READING 3
  ------------------
  970|      0|                rbio = SSL_get_rbio(ssl);
  971|      0|                BIO_clear_retry_flags(rbio);
  ------------------
  |  |  272|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  972|      0|                BIO_set_retry_read(rbio);
  ------------------
  |  |  266|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  973|      0|                return -1;
  974|      0|            }
  975|      0|        } else {
  976|       |            /*
  977|       |             * The peer is continuing to send application data, but we have
  978|       |             * already sent close_notify. If this was expected we should have
  979|       |             * been called via SSL_read() and this would have been handled
  980|       |             * above.
  981|       |             * No alert sent because we already sent close_notify
  982|       |             */
  983|      0|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (983:17): [True: 0, False: 0]
  ------------------
  984|      0|                return -1;
  985|      0|            SSLfatal(s, SSL_AD_NO_ALERT,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  986|      0|                SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY);
  987|      0|            return -1;
  988|      0|        }
  989|      0|    }
  990|       |
  991|       |    /*
  992|       |     * For handshake data we have 'fragment' storage, so fill that so that we
  993|       |     * can process the header at a fixed place. This is done after the
  994|       |     * "SHUTDOWN" code above to avoid filling the fragment storage with data
  995|       |     * that we're just going to discard.
  996|       |     */
  997|      0|    if (rr->type == SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (997:9): [True: 0, False: 0]
  ------------------
  998|      0|        size_t dest_maxlen = sizeof(s->rlayer.handshake_fragment);
  999|      0|        unsigned char *dest = s->rlayer.handshake_fragment;
 1000|      0|        size_t *dest_len = &s->rlayer.handshake_fragment_len;
 1001|       |
 1002|      0|        n = dest_maxlen - *dest_len; /* available space in 'dest' */
 1003|      0|        if (rr->length < n)
  ------------------
  |  Branch (1003:13): [True: 0, False: 0]
  ------------------
 1004|      0|            n = rr->length; /* available bytes */
 1005|       |
 1006|       |        /* now move 'n' bytes: */
 1007|      0|        if (n > 0) {
  ------------------
  |  Branch (1007:13): [True: 0, False: 0]
  ------------------
 1008|      0|            memcpy(dest + *dest_len, rr->data + rr->off, n);
 1009|      0|            *dest_len += n;
 1010|      0|        }
 1011|       |        /*
 1012|       |         * We release the number of bytes consumed, or the whole record if it
 1013|       |         * is zero length
 1014|       |         */
 1015|      0|        if ((n > 0 || rr->length == 0) && !ssl_release_record(s, rr, n))
  ------------------
  |  Branch (1015:14): [True: 0, False: 0]
  |  Branch (1015:23): [True: 0, False: 0]
  |  Branch (1015:43): [True: 0, False: 0]
  ------------------
 1016|      0|            return -1;
 1017|       |
 1018|      0|        if (*dest_len < dest_maxlen)
  ------------------
  |  Branch (1018:13): [True: 0, False: 0]
  ------------------
 1019|      0|            goto start; /* fragment was too small */
 1020|      0|    }
 1021|       |
 1022|      0|    if (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1022:9): [True: 0, False: 0]
  ------------------
 1023|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_CCS_RECEIVED_EARLY);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1024|      0|        return -1;
 1025|      0|    }
 1026|       |
 1027|       |    /*
 1028|       |     * Unexpected handshake message (ClientHello, NewSessionTicket (TLS1.3) or
 1029|       |     * protocol violation)
 1030|       |     */
 1031|      0|    if ((s->rlayer.handshake_fragment_len >= 4)
  ------------------
  |  Branch (1031:9): [True: 0, False: 0]
  ------------------
 1032|      0|        && !ossl_statem_get_in_handshake(s)) {
  ------------------
  |  Branch (1032:12): [True: 0, False: 0]
  ------------------
 1033|      0|        int ined = (s->early_data_state == SSL_EARLY_DATA_READING);
 1034|       |
 1035|       |        /* We found handshake data, so we're going back into init */
 1036|      0|        ossl_statem_set_in_init(s, 1);
 1037|       |
 1038|      0|        i = s->handshake_func(ssl);
 1039|       |        /* SSLfatal() already called if appropriate */
 1040|      0|        if (i < 0)
  ------------------
  |  Branch (1040:13): [True: 0, False: 0]
  ------------------
 1041|      0|            return i;
 1042|      0|        if (i == 0) {
  ------------------
  |  Branch (1042:13): [True: 0, False: 0]
  ------------------
 1043|      0|            return -1;
 1044|      0|        }
 1045|       |
 1046|       |        /*
 1047|       |         * If we were actually trying to read early data and we found a
 1048|       |         * handshake message, then we don't want to continue to try and read
 1049|       |         * the application data any more. It won't be "early" now.
 1050|       |         */
 1051|      0|        if (ined)
  ------------------
  |  Branch (1051:13): [True: 0, False: 0]
  ------------------
 1052|      0|            return -1;
 1053|       |
 1054|      0|        if (!(s->mode & SSL_MODE_AUTO_RETRY)) {
  ------------------
  |  |  530|      0|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
  |  Branch (1054:13): [True: 0, False: 0]
  ------------------
 1055|      0|            if (!RECORD_LAYER_read_pending(&s->rlayer)) {
  ------------------
  |  Branch (1055:17): [True: 0, False: 0]
  ------------------
 1056|      0|                BIO *bio;
 1057|       |                /*
 1058|       |                 * In the case where we try to read application data, but we
 1059|       |                 * trigger an SSL handshake, we return -1 with the retry
 1060|       |                 * option set.  Otherwise renegotiation may cause nasty
 1061|       |                 * problems in the blocking world
 1062|       |                 */
 1063|      0|                s->rwstate = SSL_READING;
  ------------------
  |  |  957|      0|#define SSL_READING 3
  ------------------
 1064|      0|                bio = SSL_get_rbio(ssl);
 1065|      0|                BIO_clear_retry_flags(bio);
  ------------------
  |  |  272|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
 1066|      0|                BIO_set_retry_read(bio);
  ------------------
  |  |  266|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
 1067|      0|                return -1;
 1068|      0|            }
 1069|      0|        }
 1070|      0|        goto start;
 1071|      0|    }
 1072|       |
 1073|      0|    switch (rr->type) {
 1074|      0|    default:
  ------------------
  |  Branch (1074:5): [True: 0, False: 0]
  ------------------
 1075|       |        /*
 1076|       |         * TLS 1.0 and 1.1 say you SHOULD ignore unrecognised record types, but
 1077|       |         * TLS 1.2 says you MUST send an unexpected message alert. We use the
 1078|       |         * TLS 1.2 behaviour for all protocol versions to prevent issues where
 1079|       |         * no progress is being made and the peer continually sends unrecognised
 1080|       |         * record types, using up resources processing them.
 1081|       |         */
 1082|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_RECORD);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1083|      0|        return -1;
 1084|      0|    case SSL3_RT_CHANGE_CIPHER_SPEC:
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1084:5): [True: 0, False: 0]
  ------------------
 1085|      0|    case SSL3_RT_ALERT:
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (1085:5): [True: 0, False: 0]
  ------------------
 1086|      0|    case SSL3_RT_HANDSHAKE:
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (1086:5): [True: 0, False: 0]
  ------------------
 1087|       |        /*
 1088|       |         * we already handled all of these, with the possible exception of
 1089|       |         * SSL3_RT_HANDSHAKE when ossl_statem_get_in_handshake(s) is true, but
 1090|       |         * that should not happen when type != rr->type
 1091|       |         */
 1092|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1093|      0|        return -1;
 1094|      0|    case SSL3_RT_APPLICATION_DATA:
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (1094:5): [True: 0, False: 0]
  ------------------
 1095|       |        /*
 1096|       |         * At this point, we were expecting handshake data, but have
 1097|       |         * application data.  If the library was running inside ssl3_read()
 1098|       |         * (i.e. in_read_app_data is set) and it makes sense to read
 1099|       |         * application data at this point (session renegotiation not yet
 1100|       |         * started), we will indulge it.
 1101|       |         */
 1102|      0|        if (ossl_statem_app_data_allowed(s)) {
  ------------------
  |  Branch (1102:13): [True: 0, False: 0]
  ------------------
 1103|      0|            s->s3.in_read_app_data = 2;
 1104|      0|            return -1;
 1105|      0|        } else if (ossl_statem_skip_early_data(s)) {
  ------------------
  |  Branch (1105:20): [True: 0, False: 0]
  ------------------
 1106|       |            /*
 1107|       |             * This can happen after a client sends a CH followed by early_data,
 1108|       |             * but the server responds with a HelloRetryRequest. The server
 1109|       |             * reads the next record from the client expecting to find a
 1110|       |             * plaintext ClientHello but gets a record which appears to be
 1111|       |             * application data. The trial decrypt "works" because null
 1112|       |             * decryption was applied. We just skip it and move on to the next
 1113|       |             * record.
 1114|       |             */
 1115|      0|            if (!ossl_early_data_count_ok(s, rr->length,
  ------------------
  |  Branch (1115:17): [True: 0, False: 0]
  ------------------
 1116|      0|                    EARLY_DATA_CIPHERTEXT_OVERHEAD, 0)) {
  ------------------
  |  |  626|      0|#define EARLY_DATA_CIPHERTEXT_OVERHEAD ((6 * (EVP_GCM_TLS_TAG_LEN + 1)) + 2)
  |  |  ------------------
  |  |  |  |  375|      0|#define EVP_GCM_TLS_TAG_LEN 16
  |  |  ------------------
  ------------------
 1117|       |                /* SSLfatal() already called */
 1118|      0|                return -1;
 1119|      0|            }
 1120|      0|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (1120:17): [True: 0, False: 0]
  ------------------
 1121|      0|                return -1;
 1122|      0|            goto start;
 1123|      0|        } else {
 1124|       |            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_RECORD);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1125|      0|            return -1;
 1126|      0|        }
 1127|      0|    }
 1128|      0|}
ssl_set_new_record_layer:
 1246|  15.5k|{
 1247|  15.5k|    OSSL_PARAM options[5], *opts = options;
 1248|  15.5k|    OSSL_PARAM settings[6], *set = settings;
 1249|  15.5k|    const OSSL_RECORD_METHOD **thismethod;
 1250|  15.5k|    OSSL_RECORD_LAYER **thisrl, *newrl = NULL;
 1251|  15.5k|    BIO *thisbio;
 1252|  15.5k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  15.5k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1253|  15.5k|    const OSSL_RECORD_METHOD *meth;
 1254|  15.5k|    int use_etm, stream_mac = 0, tlstree = 0;
 1255|  15.5k|    unsigned int maxfrag = (direction == OSSL_RECORD_DIRECTION_WRITE)
  ------------------
  |  |   43|  15.5k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  |  Branch (1255:28): [True: 7.75k, False: 7.75k]
  ------------------
 1256|  15.5k|        ? ssl_get_max_send_fragment(s)
 1257|  15.5k|        : SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  7.75k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1258|  15.5k|    int use_early_data = 0;
 1259|  15.5k|    uint32_t max_early_data;
 1260|  15.5k|    COMP_METHOD *compm = (comp == NULL) ? NULL : comp->method;
  ------------------
  |  Branch (1260:26): [True: 15.5k, False: 0]
  ------------------
 1261|       |
 1262|  15.5k|    meth = ssl_select_next_record_layer(s, direction, level);
 1263|       |
 1264|  15.5k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  15.5k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1264:9): [True: 7.75k, False: 7.75k]
  ------------------
 1265|  7.75k|        thismethod = &s->rlayer.rrlmethod;
 1266|  7.75k|        thisrl = &s->rlayer.rrl;
 1267|  7.75k|        thisbio = s->rbio;
 1268|  7.75k|    } else {
 1269|  7.75k|        thismethod = &s->rlayer.wrlmethod;
 1270|  7.75k|        thisrl = &s->rlayer.wrl;
 1271|  7.75k|        thisbio = s->wbio;
 1272|  7.75k|    }
 1273|       |
 1274|  15.5k|    if (meth == NULL)
  ------------------
  |  Branch (1274:9): [True: 0, False: 15.5k]
  ------------------
 1275|      0|        meth = *thismethod;
 1276|       |
 1277|  15.5k|    if (!ossl_assert(meth != NULL)) {
  ------------------
  |  |   52|  15.5k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  15.5k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1277:9): [True: 0, False: 15.5k]
  ------------------
 1278|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1279|      0|        return 0;
 1280|      0|    }
 1281|       |
 1282|       |    /* Parameters that *may* be supported by a record layer if passed */
 1283|  15.5k|    *opts++ = OSSL_PARAM_construct_uint64(OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS,
  ------------------
  |  |  340|  15.5k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
  ------------------
 1284|  15.5k|        &s->options);
 1285|  15.5k|    *opts++ = OSSL_PARAM_construct_uint32(OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE,
  ------------------
  |  |  339|  15.5k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 1286|  15.5k|        &s->mode);
 1287|  15.5k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  15.5k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1287:9): [True: 7.75k, False: 7.75k]
  ------------------
 1288|  7.75k|        *opts++ = OSSL_PARAM_construct_size_t(OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN,
  ------------------
  |  |  345|  7.75k|# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
  ------------------
 1289|  7.75k|            &s->rlayer.default_read_buf_len);
 1290|  7.75k|        *opts++ = OSSL_PARAM_construct_int(OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD,
  ------------------
  |  |  341|  7.75k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
  ------------------
 1291|  7.75k|            &s->rlayer.read_ahead);
 1292|  7.75k|    } else {
 1293|  7.75k|        *opts++ = OSSL_PARAM_construct_size_t(OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING,
  ------------------
  |  |  335|  7.75k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
  ------------------
 1294|  7.75k|            &s->rlayer.block_padding);
 1295|  7.75k|        *opts++ = OSSL_PARAM_construct_size_t(OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING,
  ------------------
  |  |  336|  7.75k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
  ------------------
 1296|  7.75k|            &s->rlayer.hs_padding);
 1297|  7.75k|    }
 1298|  15.5k|    *opts = OSSL_PARAM_construct_end();
 1299|       |
 1300|       |    /* Parameters that *must* be supported by a record layer if passed */
 1301|  15.5k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  15.5k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1301:9): [True: 7.75k, False: 7.75k]
  ------------------
 1302|  7.75k|        use_etm = SSL_READ_ETM(s) ? 1 : 0;
  ------------------
  |  |  308|  7.75k|#define SSL_READ_ETM(s) (s->s3.flags & TLS1_FLAGS_ENCRYPT_THEN_MAC_READ)
  |  |  ------------------
  |  |  |  |  296|  7.75k|#define TLS1_FLAGS_ENCRYPT_THEN_MAC_READ 0x0100
  |  |  ------------------
  |  |  |  Branch (308:25): [True: 0, False: 7.75k]
  |  |  ------------------
  ------------------
 1303|  7.75k|        if ((s->mac_flags & SSL_MAC_FLAG_READ_MAC_STREAM) != 0)
  ------------------
  |  |  974|  7.75k|#define SSL_MAC_FLAG_READ_MAC_STREAM 1
  ------------------
  |  Branch (1303:13): [True: 0, False: 7.75k]
  ------------------
 1304|      0|            stream_mac = 1;
 1305|       |
 1306|  7.75k|        if ((s->mac_flags & SSL_MAC_FLAG_READ_MAC_TLSTREE) != 0)
  ------------------
  |  |  976|  7.75k|#define SSL_MAC_FLAG_READ_MAC_TLSTREE 4
  ------------------
  |  Branch (1306:13): [True: 0, False: 7.75k]
  ------------------
 1307|      0|            tlstree = 1;
 1308|  7.75k|    } else {
 1309|  7.75k|        use_etm = SSL_WRITE_ETM(s) ? 1 : 0;
  ------------------
  |  |  309|  7.75k|#define SSL_WRITE_ETM(s) (s->s3.flags & TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE)
  |  |  ------------------
  |  |  |  |  302|  7.75k|#define TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE 0x0400
  |  |  ------------------
  |  |  |  Branch (309:26): [True: 0, False: 7.75k]
  |  |  ------------------
  ------------------
 1310|  7.75k|        if ((s->mac_flags & SSL_MAC_FLAG_WRITE_MAC_STREAM) != 0)
  ------------------
  |  |  975|  7.75k|#define SSL_MAC_FLAG_WRITE_MAC_STREAM 2
  ------------------
  |  Branch (1310:13): [True: 0, False: 7.75k]
  ------------------
 1311|      0|            stream_mac = 1;
 1312|       |
 1313|  7.75k|        if ((s->mac_flags & SSL_MAC_FLAG_WRITE_MAC_TLSTREE) != 0)
  ------------------
  |  |  977|  7.75k|#define SSL_MAC_FLAG_WRITE_MAC_TLSTREE 8
  ------------------
  |  Branch (1313:13): [True: 0, False: 7.75k]
  ------------------
 1314|      0|            tlstree = 1;
 1315|  7.75k|    }
 1316|       |
 1317|  15.5k|    if (use_etm)
  ------------------
  |  Branch (1317:9): [True: 0, False: 15.5k]
  ------------------
 1318|      0|        *set++ = OSSL_PARAM_construct_int(OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM,
  ------------------
  |  |  344|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
  ------------------
 1319|      0|            &use_etm);
 1320|       |
 1321|  15.5k|    if (stream_mac)
  ------------------
  |  Branch (1321:9): [True: 0, False: 15.5k]
  ------------------
 1322|      0|        *set++ = OSSL_PARAM_construct_int(OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC,
  ------------------
  |  |  342|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
  ------------------
 1323|      0|            &stream_mac);
 1324|       |
 1325|  15.5k|    if (tlstree)
  ------------------
  |  Branch (1325:9): [True: 0, False: 15.5k]
  ------------------
 1326|      0|        *set++ = OSSL_PARAM_construct_int(OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE,
  ------------------
  |  |  343|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
  ------------------
 1327|      0|            &tlstree);
 1328|       |
 1329|       |    /*
 1330|       |     * We only need to do this for the read side. The write side should already
 1331|       |     * have the correct value due to the ssl_get_max_send_fragment() call above
 1332|       |     */
 1333|  15.5k|    if (direction == OSSL_RECORD_DIRECTION_READ
  ------------------
  |  |   42|  31.0k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1333:9): [True: 7.75k, False: 7.75k]
  ------------------
 1334|  7.75k|        && s->session != NULL
  ------------------
  |  Branch (1334:12): [True: 0, False: 7.75k]
  ------------------
 1335|      0|        && USE_MAX_FRAGMENT_LENGTH_EXT(s->session))
  ------------------
  |  |  304|      0|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  302|      0|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  240|      0|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (302:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (302:53): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1336|      0|        maxfrag = GET_MAX_FRAGMENT_LENGTH(s->session);
  ------------------
  |  |  306|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 1337|       |
 1338|  15.5k|    if (maxfrag != SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|  15.5k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1338:9): [True: 0, False: 15.5k]
  ------------------
 1339|      0|        *set++ = OSSL_PARAM_construct_uint(OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN,
  ------------------
  |  |  338|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
  ------------------
 1340|      0|            &maxfrag);
 1341|       |
 1342|       |    /*
 1343|       |     * The record layer must check the amount of early data sent or received
 1344|       |     * using the early keys. A server also needs to worry about rejected early
 1345|       |     * data that might arrive when the handshake keys are in force.
 1346|       |     */
 1347|  15.5k|    if (s->server && direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|      0|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1347:9): [True: 0, False: 15.5k]
  |  Branch (1347:22): [True: 0, False: 0]
  ------------------
 1348|      0|        use_early_data = (level == OSSL_RECORD_PROTECTION_LEVEL_EARLY
  ------------------
  |  | 2924|      0|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
  |  Branch (1348:27): [True: 0, False: 0]
  ------------------
 1349|      0|            || level == OSSL_RECORD_PROTECTION_LEVEL_HANDSHAKE);
  ------------------
  |  | 2925|      0|#define OSSL_RECORD_PROTECTION_LEVEL_HANDSHAKE 2
  ------------------
  |  Branch (1349:16): [True: 0, False: 0]
  ------------------
 1350|  15.5k|    } else if (!s->server && direction == OSSL_RECORD_DIRECTION_WRITE) {
  ------------------
  |  |   43|  15.5k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  |  Branch (1350:16): [True: 15.5k, False: 0]
  |  Branch (1350:30): [True: 7.75k, False: 7.75k]
  ------------------
 1351|  7.75k|        use_early_data = (level == OSSL_RECORD_PROTECTION_LEVEL_EARLY);
  ------------------
  |  | 2924|  7.75k|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
 1352|  7.75k|    }
 1353|  15.5k|    if (use_early_data) {
  ------------------
  |  Branch (1353:9): [True: 0, False: 15.5k]
  ------------------
 1354|      0|        max_early_data = ossl_get_max_early_data(s);
 1355|       |
 1356|      0|        if (max_early_data != 0)
  ------------------
  |  Branch (1356:13): [True: 0, False: 0]
  ------------------
 1357|      0|            *set++ = OSSL_PARAM_construct_uint32(OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA,
  ------------------
  |  |  337|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
  ------------------
 1358|      0|                &max_early_data);
 1359|      0|    }
 1360|       |
 1361|  15.5k|    *set = OSSL_PARAM_construct_end();
 1362|       |
 1363|  15.5k|    for (;;) {
 1364|  15.5k|        int rlret;
 1365|  15.5k|        BIO *prev = NULL;
 1366|  15.5k|        BIO *next = NULL;
 1367|  15.5k|        unsigned int epoch = 0;
 1368|  15.5k|        OSSL_DISPATCH rlayer_dispatch_tmp[OSSL_NELEM(rlayer_dispatch)];
 1369|  15.5k|        size_t i, j;
 1370|       |
 1371|  15.5k|        if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  15.5k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1371:13): [True: 7.75k, False: 7.75k]
  ------------------
 1372|  7.75k|            prev = s->rlayer.rrlnext;
 1373|  7.75k|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  15.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.75k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.75k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 7.75k]
  |  |  ------------------
  ------------------
 1374|      0|                && level != OSSL_RECORD_PROTECTION_LEVEL_NONE)
  ------------------
  |  | 2923|      0|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1374:20): [True: 0, False: 0]
  ------------------
 1375|      0|                epoch = dtls1_get_epoch(s, SSL3_CC_READ); /* new epoch */
  ------------------
  |  |  342|      0|#define SSL3_CC_READ 0x001
  ------------------
 1376|       |
 1377|  7.75k|#ifndef OPENSSL_NO_DGRAM
 1378|  7.75k|            if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  7.75k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.75k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.75k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 7.75k]
  |  |  ------------------
  ------------------
 1379|      0|                next = BIO_new(BIO_s_dgram_mem());
 1380|  7.75k|            else
 1381|  7.75k|#endif
 1382|  7.75k|                next = BIO_new(BIO_s_mem());
 1383|       |
 1384|  7.75k|            if (next == NULL) {
  ------------------
  |  Branch (1384:17): [True: 0, False: 7.75k]
  ------------------
 1385|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1386|      0|                return 0;
 1387|      0|            }
 1388|  7.75k|            s->rlayer.rrlnext = next;
 1389|  7.75k|        } else {
 1390|  7.75k|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  15.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.75k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.75k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 7.75k]
  |  |  ------------------
  ------------------
 1391|      0|                && level != OSSL_RECORD_PROTECTION_LEVEL_NONE)
  ------------------
  |  | 2923|      0|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1391:20): [True: 0, False: 0]
  ------------------
 1392|      0|                epoch = dtls1_get_epoch(s, SSL3_CC_WRITE); /* new epoch */
  ------------------
  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  ------------------
 1393|  7.75k|        }
 1394|       |
 1395|       |        /*
 1396|       |         * Create a copy of the dispatch array, missing out wrappers for
 1397|       |         * callbacks that we don't need.
 1398|       |         */
 1399|  93.0k|        for (i = 0, j = 0; i < OSSL_NELEM(rlayer_dispatch); i++) {
  ------------------
  |  |   14|  93.0k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1399:28): [True: 77.5k, False: 15.5k]
  ------------------
 1400|  77.5k|            switch (rlayer_dispatch[i].function_id) {
 1401|  15.5k|            case OSSL_FUNC_RLAYER_MSG_CALLBACK:
  ------------------
  |  |  186|  15.5k|#define OSSL_FUNC_RLAYER_MSG_CALLBACK 2
  ------------------
  |  Branch (1401:13): [True: 15.5k, False: 62.0k]
  ------------------
 1402|  15.5k|                if (s->msg_callback == NULL)
  ------------------
  |  Branch (1402:21): [True: 15.5k, False: 0]
  ------------------
 1403|  15.5k|                    continue;
 1404|      0|                break;
 1405|  15.5k|            case OSSL_FUNC_RLAYER_PADDING:
  ------------------
  |  |  190|  15.5k|#define OSSL_FUNC_RLAYER_PADDING 4
  ------------------
  |  Branch (1405:13): [True: 15.5k, False: 62.0k]
  ------------------
 1406|  15.5k|                if (s->rlayer.record_padding_cb == NULL)
  ------------------
  |  Branch (1406:21): [True: 15.5k, False: 0]
  ------------------
 1407|  15.5k|                    continue;
 1408|      0|                break;
 1409|  46.5k|            default:
  ------------------
  |  Branch (1409:13): [True: 46.5k, False: 31.0k]
  ------------------
 1410|  46.5k|                break;
 1411|  77.5k|            }
 1412|  46.5k|            rlayer_dispatch_tmp[j++] = rlayer_dispatch[i];
 1413|  46.5k|        }
 1414|       |
 1415|  15.5k|        rlret = meth->new_record_layer(sctx->libctx, sctx->propq, version,
 1416|  15.5k|            s->server, direction, level, epoch,
 1417|  15.5k|            secret, secretlen, key, keylen, iv,
 1418|  15.5k|            ivlen, mackey, mackeylen, ciph, taglen,
 1419|  15.5k|            mactype, md, compm, kdfdigest, prev,
 1420|  15.5k|            thisbio, next, NULL, NULL, settings,
 1421|  15.5k|            options, rlayer_dispatch_tmp, s,
 1422|  15.5k|            s->rlayer.rlarg, &newrl);
 1423|  15.5k|        BIO_free(prev);
 1424|  15.5k|        switch (rlret) {
 1425|      0|        case OSSL_RECORD_RETURN_FATAL:
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  |  Branch (1425:9): [True: 0, False: 15.5k]
  ------------------
 1426|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_RECORD_LAYER_FAILURE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1427|      0|            return 0;
 1428|       |
 1429|      0|        case OSSL_RECORD_RETURN_NON_FATAL_ERR:
  ------------------
  |  |   47|      0|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  |  Branch (1429:9): [True: 0, False: 15.5k]
  ------------------
 1430|      0|            if (*thismethod != meth && *thismethod != NULL) {
  ------------------
  |  Branch (1430:17): [True: 0, False: 0]
  |  Branch (1430:40): [True: 0, False: 0]
  ------------------
 1431|       |                /*
 1432|       |                 * We tried a new record layer method, but it didn't work out,
 1433|       |                 * so we fallback to the original method and try again
 1434|       |                 */
 1435|      0|                meth = *thismethod;
 1436|      0|                continue;
 1437|      0|            }
 1438|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_RECORD_LAYER);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1439|      0|            return 0;
 1440|       |
 1441|  15.5k|        case OSSL_RECORD_RETURN_SUCCESS:
  ------------------
  |  |   45|  15.5k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1441:9): [True: 15.5k, False: 0]
  ------------------
 1442|  15.5k|            break;
 1443|       |
 1444|      0|        default:
  ------------------
  |  Branch (1444:9): [True: 0, False: 15.5k]
  ------------------
 1445|       |            /* Should not happen */
 1446|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1447|      0|            return 0;
 1448|  15.5k|        }
 1449|  15.5k|        break;
 1450|  15.5k|    }
 1451|       |
 1452|       |    /*
 1453|       |     * Free the old record layer if we have one except in the case of DTLS when
 1454|       |     * writing and there are still buffered sent messages in our queue. In that
 1455|       |     * case the record layer is still referenced by those buffered messages for
 1456|       |     * potential retransmit. Only when those buffered messages get freed do we
 1457|       |     * free the record layer object (see dtls1_hm_fragment_free)
 1458|       |     */
 1459|  15.5k|    if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  31.0k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  15.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  15.5k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (1459:9): [True: 15.5k, False: 0]
  ------------------
 1460|      0|        || direction == OSSL_RECORD_DIRECTION_READ
  ------------------
  |  |   42|  15.5k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1460:12): [True: 0, False: 0]
  ------------------
 1461|  15.5k|        || pqueue_peek(s->d1->sent_messages) == NULL) {
  ------------------
  |  Branch (1461:12): [True: 0, False: 0]
  ------------------
 1462|  15.5k|        if (*thismethod != NULL && !(*thismethod)->free(*thisrl)) {
  ------------------
  |  Branch (1462:13): [True: 0, False: 15.5k]
  |  Branch (1462:36): [True: 0, False: 0]
  ------------------
 1463|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1464|      0|            return 0;
 1465|      0|        }
 1466|  15.5k|    }
 1467|       |
 1468|  15.5k|    *thisrl = newrl;
 1469|  15.5k|    *thismethod = meth;
 1470|       |
 1471|  15.5k|    return ssl_post_record_layer_select(s, direction);
 1472|  15.5k|}
ssl_set_record_protocol_version:
 1475|     39|{
 1476|     39|    if (!ossl_assert(s->rlayer.rrlmethod != NULL)
  ------------------
  |  |   52|     78|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     78|    __FILE__, __LINE__)
  ------------------
  |  Branch (1476:9): [True: 0, False: 39]
  ------------------
 1477|     39|        || !ossl_assert(s->rlayer.wrlmethod != NULL))
  ------------------
  |  |   52|     39|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     39|    __FILE__, __LINE__)
  ------------------
  |  Branch (1477:12): [True: 0, False: 39]
  ------------------
 1478|      0|        return 0;
 1479|     39|    s->rlayer.rrlmethod->set_protocol_version(s->rlayer.rrl, s->version);
 1480|     39|    s->rlayer.wrlmethod->set_protocol_version(s->rlayer.wrl, s->version);
 1481|       |
 1482|     39|    return 1;
 1483|     39|}
rec_layer_s3.c:tls_write_check_pending:
  254|  2.48k|{
  255|  2.48k|    if (s->rlayer.wpend_tot == 0)
  ------------------
  |  Branch (255:9): [True: 2.48k, False: 0]
  ------------------
  256|  2.48k|        return 0;
  257|       |
  258|       |    /* We have pending data, so do some sanity checks */
  259|      0|    if ((s->rlayer.wpend_tot > len)
  ------------------
  |  Branch (259:9): [True: 0, False: 0]
  ------------------
  260|      0|        || (!(s->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER)
  ------------------
  |  |  526|      0|#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002U
  ------------------
  |  Branch (260:13): [True: 0, False: 0]
  ------------------
  261|      0|            && (s->rlayer.wpend_buf != buf))
  ------------------
  |  Branch (261:16): [True: 0, False: 0]
  ------------------
  262|      0|        || (s->rlayer.wpend_type != type)) {
  ------------------
  |  Branch (262:12): [True: 0, False: 0]
  ------------------
  263|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_WRITE_RETRY);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  264|      0|        return -1;
  265|      0|    }
  266|      0|    return 1;
  267|      0|}
rec_layer_s3.c:ssl_select_next_record_layer:
 1181|  15.5k|{
 1182|  15.5k|    if (s->rlayer.custom_rlmethod != NULL)
  ------------------
  |  Branch (1182:9): [True: 0, False: 15.5k]
  ------------------
 1183|      0|        return s->rlayer.custom_rlmethod;
 1184|       |
 1185|  15.5k|    if (level == OSSL_RECORD_PROTECTION_LEVEL_NONE) {
  ------------------
  |  | 2923|  15.5k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1185:9): [True: 15.5k, False: 0]
  ------------------
 1186|  15.5k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  15.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  15.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  15.5k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 15.5k]
  |  |  ------------------
  ------------------
 1187|      0|            return &ossl_dtls_record_method;
 1188|       |
 1189|  15.5k|        return &ossl_tls_record_method;
 1190|  15.5k|    }
 1191|       |
 1192|       |#ifndef OPENSSL_NO_KTLS
 1193|       |    /* KTLS does not support renegotiation */
 1194|       |    if (level == OSSL_RECORD_PROTECTION_LEVEL_APPLICATION
 1195|       |        && (s->options & SSL_OP_ENABLE_KTLS) != 0
 1196|       |        && (SSL_CONNECTION_IS_TLS13(s) || SSL_IS_FIRST_HANDSHAKE(s)))
 1197|       |        return &ossl_ktls_record_method;
 1198|       |#endif
 1199|       |
 1200|       |    /* Default to the current OSSL_RECORD_METHOD */
 1201|      0|    return direction == OSSL_RECORD_DIRECTION_READ ? s->rlayer.rrlmethod
  ------------------
  |  |   42|      0|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1201:12): [True: 0, False: 0]
  ------------------
 1202|      0|                                                   : s->rlayer.wrlmethod;
 1203|  15.5k|}
rec_layer_s3.c:ssl_post_record_layer_select:
 1206|  15.5k|{
 1207|  15.5k|    const OSSL_RECORD_METHOD *thismethod;
 1208|  15.5k|    OSSL_RECORD_LAYER *thisrl;
 1209|       |
 1210|  15.5k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  15.5k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1210:9): [True: 7.75k, False: 7.75k]
  ------------------
 1211|  7.75k|        thismethod = s->rlayer.rrlmethod;
 1212|  7.75k|        thisrl = s->rlayer.rrl;
 1213|  7.75k|    } else {
 1214|  7.75k|        thismethod = s->rlayer.wrlmethod;
 1215|  7.75k|        thisrl = s->rlayer.wrl;
 1216|  7.75k|    }
 1217|       |
 1218|       |#ifndef OPENSSL_NO_KTLS
 1219|       |    {
 1220|       |        SSL *ssl = SSL_CONNECTION_GET_SSL(s);
 1221|       |
 1222|       |        if (s->rlayer.rrlmethod == &ossl_ktls_record_method) {
 1223|       |            /* KTLS does not support renegotiation so disallow it */
 1224|       |            SSL_set_options(ssl, SSL_OP_NO_RENEGOTIATION);
 1225|       |        }
 1226|       |    }
 1227|       |#endif
 1228|  15.5k|    if (SSL_IS_FIRST_HANDSHAKE(s) && thismethod->set_first_handshake != NULL)
  ------------------
  |  |  285|  31.0k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 15.5k, False: 0]
  |  |  ------------------
  |  |  286|  31.0k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1228:38): [True: 15.5k, False: 0]
  ------------------
 1229|  15.5k|        thismethod->set_first_handshake(thisrl, 1);
 1230|       |
 1231|  15.5k|    if (s->max_pipelines != 0 && thismethod->set_max_pipelines != NULL)
  ------------------
  |  Branch (1231:9): [True: 0, False: 15.5k]
  |  Branch (1231:34): [True: 0, False: 0]
  ------------------
 1232|      0|        thismethod->set_max_pipelines(thisrl, s->max_pipelines);
 1233|       |
 1234|  15.5k|    return 1;
 1235|  15.5k|}

ssl3_cleanup_key_block:
   19|  12.9k|{
   20|  12.9k|    OPENSSL_clear_free(s->s3.tmp.key_block, s->s3.tmp.key_block_length);
  ------------------
  |  |  130|  12.9k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   21|       |    s->s3.tmp.key_block = NULL;
   22|  12.9k|    s->s3.tmp.key_block_length = 0;
   23|  12.9k|}
ssl3_init_finished_mac:
   26|  2.58k|{
   27|  2.58k|    BIO *buf = BIO_new(BIO_s_mem());
   28|       |
   29|  2.58k|    if (buf == NULL) {
  ------------------
  |  Branch (29:9): [True: 0, False: 2.58k]
  ------------------
   30|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BIO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   31|      0|        return 0;
   32|      0|    }
   33|  2.58k|    ssl3_free_digest_list(s);
   34|  2.58k|    s->s3.handshake_buffer = buf;
   35|       |    (void)BIO_set_close(s->s3.handshake_buffer, BIO_CLOSE);
  ------------------
  |  |  643|  2.58k|#define BIO_set_close(b, c) (int)BIO_ctrl(b, BIO_CTRL_SET_CLOSE, (c), NULL)
  |  |  ------------------
  |  |  |  |   98|  2.58k|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  |  |  ------------------
  ------------------
   36|  2.58k|    return 1;
   37|  2.58k|}
ssl3_free_digest_list:
   45|  15.5k|{
   46|  15.5k|    BIO_free(s->s3.handshake_buffer);
   47|  15.5k|    s->s3.handshake_buffer = NULL;
   48|  15.5k|    EVP_MD_CTX_free(s->s3.handshake_dgst);
   49|       |    s->s3.handshake_dgst = NULL;
   50|  15.5k|}
ssl3_finish_mac:
   53|  2.56k|{
   54|  2.56k|    int ret;
   55|       |
   56|  2.56k|    if (s->s3.handshake_dgst == NULL) {
  ------------------
  |  Branch (56:9): [True: 2.56k, False: 0]
  ------------------
   57|       |        /* Note: this writes to a memory BIO so a failure is a fatal error */
   58|  2.56k|        if (len > INT_MAX) {
  ------------------
  |  Branch (58:13): [True: 0, False: 2.56k]
  ------------------
   59|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_OVERFLOW_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   60|      0|            return 0;
   61|      0|        }
   62|  2.56k|        ret = BIO_write(s->s3.handshake_buffer, (void *)buf, (int)len);
   63|  2.56k|        if (ret <= 0 || ret != (int)len) {
  ------------------
  |  Branch (63:13): [True: 0, False: 2.56k]
  |  Branch (63:25): [True: 0, False: 2.56k]
  ------------------
   64|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   65|      0|            return 0;
   66|      0|        }
   67|  2.56k|    } else {
   68|      0|        ret = EVP_DigestUpdate(s->s3.handshake_dgst, buf, len);
   69|      0|        if (!ret) {
  ------------------
  |  Branch (69:13): [True: 0, False: 0]
  ------------------
   70|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   71|      0|            return 0;
   72|      0|        }
   73|      0|    }
   74|  2.56k|    return 1;
   75|  2.56k|}

ssl_sort_cipher_list:
 3766|      1|{
 3767|      1|    qsort(tls13_ciphers, TLS13_NUM_CIPHERS, sizeof(tls13_ciphers[0]),
  ------------------
  |  |   27|      1|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3768|      1|        cipher_compare);
 3769|      1|    qsort(ssl3_ciphers, SSL3_NUM_CIPHERS, sizeof(ssl3_ciphers[0]),
  ------------------
  |  |   28|      1|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3770|      1|        cipher_compare);
 3771|      1|    qsort(ssl3_scsvs, SSL3_NUM_SCSVS, sizeof(ssl3_scsvs[0]), cipher_compare);
  ------------------
  |  |   29|      1|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3772|      1|}
ssl3_num_ciphers:
 3775|  4.82k|{
 3776|  4.82k|    return SSL3_NUM_CIPHERS;
  ------------------
  |  |   28|  4.82k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  4.82k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3777|  4.82k|}
ssl3_get_cipher:
 3780|   826k|{
 3781|   826k|    if (u < SSL3_NUM_CIPHERS)
  ------------------
  |  |   28|   826k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|   826k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (3781:9): [True: 826k, False: 0]
  ------------------
 3782|   826k|        return &(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u]);
  ------------------
  |  |   28|   826k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|   826k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3783|      0|    else
 3784|      0|        return NULL;
 3785|   826k|}
ssl3_set_handshake_header:
 3788|  2.57k|{
 3789|       |    /* No header in the event of a CCS */
 3790|  2.57k|    if (htype == SSL3_MT_CHANGE_CIPHER_SPEC)
  ------------------
  |  |  337|  2.57k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (3790:9): [True: 0, False: 2.57k]
  ------------------
 3791|      0|        return 1;
 3792|       |
 3793|       |    /* Set the content type and 3 bytes for the message len */
 3794|  2.57k|    if (!WPACKET_put_bytes_u8(pkt, htype)
  ------------------
  |  |  909|  5.15k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (3794:9): [True: 0, False: 2.57k]
  ------------------
 3795|  2.57k|        || !WPACKET_start_sub_packet_u24(pkt))
  ------------------
  |  |  814|  2.57k|    WPACKET_start_sub_packet_len__((pkt), 3)
  ------------------
  |  Branch (3795:12): [True: 0, False: 2.57k]
  ------------------
 3796|      0|        return 0;
 3797|       |
 3798|  2.57k|    return 1;
 3799|  2.57k|}
ssl3_handshake_write:
 3802|  2.48k|{
 3803|  2.48k|    return ssl3_do_write(s, SSL3_RT_HANDSHAKE);
  ------------------
  |  |  221|  2.48k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 3804|  2.48k|}
ssl3_new:
 3807|  2.58k|{
 3808|  2.58k|#ifndef OPENSSL_NO_SRP
 3809|  2.58k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.58k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.58k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.58k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.58k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.58k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.58k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3810|       |
 3811|  2.58k|    if (sc == NULL)
  ------------------
  |  Branch (3811:9): [True: 0, False: 2.58k]
  ------------------
 3812|      0|        return 0;
 3813|       |
 3814|  2.58k|    if (!ssl_srp_ctx_init_intern(sc))
  ------------------
  |  Branch (3814:9): [True: 0, False: 2.58k]
  ------------------
 3815|      0|        return 0;
 3816|  2.58k|#endif
 3817|       |
 3818|  2.58k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (3818:9): [True: 0, False: 2.58k]
  ------------------
 3819|      0|        return 0;
 3820|       |
 3821|  2.58k|    return 1;
 3822|  2.58k|}
ssl3_free:
 3825|  2.58k|{
 3826|  2.58k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.58k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.58k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.58k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.58k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.58k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.58k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3827|  2.58k|    size_t i;
 3828|       |
 3829|  2.58k|    if (sc == NULL)
  ------------------
  |  Branch (3829:9): [True: 0, False: 2.58k]
  ------------------
 3830|      0|        return;
 3831|       |
 3832|  2.58k|    ssl3_cleanup_key_block(sc);
 3833|       |
 3834|  2.58k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3835|  2.58k|    sc->s3.peer_tmp = NULL;
 3836|       |
 3837|  7.43k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3837:17): [True: 4.84k, False: 2.58k]
  ------------------
 3838|  4.84k|        if (sc->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (3838:13): [True: 4.84k, False: 0]
  ------------------
 3839|  4.84k|            if (sc->s3.tmp.pkey == sc->s3.tmp.ks_pkey[i])
  ------------------
  |  Branch (3839:17): [True: 2.43k, False: 2.41k]
  ------------------
 3840|  2.43k|                sc->s3.tmp.pkey = NULL;
 3841|       |
 3842|  4.84k|            EVP_PKEY_free(sc->s3.tmp.ks_pkey[i]);
 3843|  4.84k|            sc->s3.tmp.ks_pkey[i] = NULL;
 3844|  4.84k|        }
 3845|  2.58k|    sc->s3.tmp.num_ks_pkey = 0;
 3846|       |
 3847|  2.58k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3847:9): [True: 0, False: 2.58k]
  ------------------
 3848|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3849|      0|        sc->s3.tmp.pkey = NULL;
 3850|      0|    }
 3851|       |
 3852|  2.58k|    ssl_evp_cipher_free(sc->s3.tmp.new_sym_enc);
 3853|  2.58k|    ssl_evp_md_free(sc->s3.tmp.new_hash);
 3854|       |
 3855|  2.58k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3856|  2.58k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  2.58k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 3857|  2.58k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3858|  2.58k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  130|  2.58k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3859|  2.58k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3860|  2.58k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3861|  2.58k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3862|  2.58k|    ssl3_free_digest_list(sc);
 3863|  2.58k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3864|  2.58k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3865|  2.58k|    ossl_quic_tls_free(sc->qtls);
 3866|       |
 3867|  2.58k|#ifndef OPENSSL_NO_PSK
 3868|  2.58k|    OPENSSL_free(sc->s3.tmp.psk);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3869|  2.58k|#endif
 3870|       |
 3871|  2.58k|#ifndef OPENSSL_NO_SRP
 3872|  2.58k|    ssl_srp_ctx_free_intern(sc);
 3873|  2.58k|#endif
 3874|  2.58k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3875|  2.58k|}
ssl3_clear:
 3878|  10.3k|{
 3879|  10.3k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  10.3k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  10.3k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 10.3k]
  |  |  |  |  ------------------
  |  |  |  |   33|  10.3k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  10.3k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 10.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  10.3k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  10.3k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3880|  10.3k|    int flags;
 3881|  10.3k|    size_t i;
 3882|       |
 3883|  10.3k|    if (sc == NULL)
  ------------------
  |  Branch (3883:9): [True: 0, False: 10.3k]
  ------------------
 3884|      0|        return 0;
 3885|       |
 3886|  10.3k|    ssl3_cleanup_key_block(sc);
 3887|  10.3k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  132|  10.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3888|  10.3k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  10.3k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 3889|  10.3k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  132|  10.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3890|  10.3k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  130|  10.3k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3891|  10.3k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  132|  10.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3892|  10.3k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  132|  10.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3893|  10.3k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  132|  10.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3894|       |
 3895|  10.3k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3896|       |
 3897|  10.3k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3897:17): [True: 0, False: 10.3k]
  ------------------
 3898|      0|        if (sc->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (3898:13): [True: 0, False: 0]
  ------------------
 3899|      0|            if (sc->s3.tmp.pkey == sc->s3.tmp.ks_pkey[i])
  ------------------
  |  Branch (3899:17): [True: 0, False: 0]
  ------------------
 3900|      0|                sc->s3.tmp.pkey = NULL;
 3901|       |
 3902|      0|            EVP_PKEY_free(sc->s3.tmp.ks_pkey[i]);
 3903|      0|            sc->s3.tmp.ks_pkey[i] = NULL;
 3904|      0|        }
 3905|  10.3k|    sc->s3.tmp.num_ks_pkey = 0;
 3906|       |
 3907|  10.3k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3907:9): [True: 0, False: 10.3k]
  ------------------
 3908|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3909|      0|        sc->s3.tmp.pkey = NULL;
 3910|      0|    }
 3911|       |
 3912|  10.3k|    ssl3_free_digest_list(sc);
 3913|       |
 3914|  10.3k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  132|  10.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3915|  10.3k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  132|  10.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3916|       |
 3917|       |    /*
 3918|       |     * NULL/zero-out everything in the s3 struct, but remember if we are doing
 3919|       |     * QUIC.
 3920|       |     */
 3921|  10.3k|    flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   22|  10.3k|#define TLS1_FLAGS_QUIC 0x2000
  ------------------
                  flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   24|  10.3k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  ------------------
 3922|  10.3k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3923|  10.3k|    sc->s3.flags |= flags;
 3924|       |
 3925|  10.3k|    if (!ssl_free_wbio_buffer(sc))
  ------------------
  |  Branch (3925:9): [True: 0, False: 10.3k]
  ------------------
 3926|      0|        return 0;
 3927|       |
 3928|  10.3k|    sc->version = TLS1_VERSION;
  ------------------
  |  |   24|  10.3k|#define TLS1_VERSION 0x0301
  ------------------
 3929|       |
 3930|  10.3k|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 3931|  10.3k|    OPENSSL_free(sc->ext.npn);
  ------------------
  |  |  132|  10.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3932|  10.3k|    sc->ext.npn = NULL;
 3933|  10.3k|    sc->ext.npn_len = 0;
 3934|  10.3k|#endif
 3935|       |
 3936|  10.3k|    return 1;
 3937|  10.3k|}
ssl3_ctrl:
 3954|  1.05k|{
 3955|  1.05k|    int ret = 0;
 3956|  1.05k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.05k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.05k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.05k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  1.05k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.05k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.05k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.05k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3957|  1.05k|#ifndef OPENSSL_NO_OCSP
 3958|  1.05k|    unsigned char *p = NULL;
 3959|  1.05k|    OCSP_RESPONSE *resp = NULL;
 3960|  1.05k|#endif
 3961|       |
 3962|  1.05k|    if (sc == NULL)
  ------------------
  |  Branch (3962:9): [True: 0, False: 1.05k]
  ------------------
 3963|      0|        return ret;
 3964|       |
 3965|  1.05k|    switch (cmd) {
 3966|      0|    case SSL_CTRL_GET_CLIENT_CERT_REQUEST:
  ------------------
  |  | 1305|      0|#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9
  ------------------
  |  Branch (3966:5): [True: 0, False: 1.05k]
  ------------------
 3967|      0|        break;
 3968|      0|    case SSL_CTRL_GET_NUM_RENEGOTIATIONS:
  ------------------
  |  | 1306|      0|#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10
  ------------------
  |  Branch (3968:5): [True: 0, False: 1.05k]
  ------------------
 3969|      0|        ret = sc->s3.num_renegotiations;
 3970|      0|        break;
 3971|      0|    case SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS:
  ------------------
  |  | 1307|      0|#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11
  ------------------
  |  Branch (3971:5): [True: 0, False: 1.05k]
  ------------------
 3972|      0|        ret = sc->s3.num_renegotiations;
 3973|      0|        sc->s3.num_renegotiations = 0;
 3974|      0|        break;
 3975|      0|    case SSL_CTRL_GET_TOTAL_RENEGOTIATIONS:
  ------------------
  |  | 1308|      0|#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12
  ------------------
  |  Branch (3975:5): [True: 0, False: 1.05k]
  ------------------
 3976|      0|        ret = sc->s3.total_renegotiations;
 3977|      0|        break;
 3978|      0|    case SSL_CTRL_GET_FLAGS:
  ------------------
  |  | 1309|      0|#define SSL_CTRL_GET_FLAGS 13
  ------------------
  |  Branch (3978:5): [True: 0, False: 1.05k]
  ------------------
 3979|      0|        ret = (int)(sc->s3.flags);
 3980|      0|        break;
 3981|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 3982|      0|    case SSL_CTRL_SET_TMP_DH: {
  ------------------
  |  | 1300|      0|#define SSL_CTRL_SET_TMP_DH 3
  ------------------
  |  Branch (3982:5): [True: 0, False: 1.05k]
  ------------------
 3983|      0|        EVP_PKEY *pkdh = NULL;
 3984|      0|        if (parg == NULL) {
  ------------------
  |  Branch (3984:13): [True: 0, False: 0]
  ------------------
 3985|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3986|      0|            return 0;
 3987|      0|        }
 3988|      0|        pkdh = ssl_dh_to_pkey(parg);
 3989|      0|        if (pkdh == NULL) {
  ------------------
  |  Branch (3989:13): [True: 0, False: 0]
  ------------------
 3990|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_DH_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3991|      0|            return 0;
 3992|      0|        }
 3993|      0|        if (!SSL_set0_tmp_dh_pkey(s, pkdh)) {
  ------------------
  |  Branch (3993:13): [True: 0, False: 0]
  ------------------
 3994|      0|            EVP_PKEY_free(pkdh);
 3995|      0|            return 0;
 3996|      0|        }
 3997|      0|        return 1;
 3998|      0|    } break;
 3999|      0|    case SSL_CTRL_SET_TMP_DH_CB: {
  ------------------
  |  | 1302|      0|#define SSL_CTRL_SET_TMP_DH_CB 6
  ------------------
  |  Branch (3999:5): [True: 0, False: 1.05k]
  ------------------
 4000|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4001|      0|        return ret;
 4002|      0|    }
 4003|      0|#endif
 4004|      0|    case SSL_CTRL_SET_DH_AUTO:
  ------------------
  |  | 1399|      0|#define SSL_CTRL_SET_DH_AUTO 118
  ------------------
  |  Branch (4004:5): [True: 0, False: 1.05k]
  ------------------
 4005|      0|        sc->cert->dh_tmp_auto = larg;
 4006|      0|        return 1;
 4007|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4008|      0|    case SSL_CTRL_SET_TMP_ECDH: {
  ------------------
  |  | 1301|      0|#define SSL_CTRL_SET_TMP_ECDH 4
  ------------------
  |  Branch (4008:5): [True: 0, False: 1.05k]
  ------------------
 4009|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4009:13): [True: 0, False: 0]
  ------------------
 4010|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4011|      0|            return 0;
 4012|      0|        }
 4013|      0|        return ssl_set_tmp_ecdh_groups(&sc->ext.supportedgroups,
 4014|      0|            &sc->ext.supportedgroups_len,
 4015|      0|            &sc->ext.keyshares,
 4016|      0|            &sc->ext.keyshares_len,
 4017|      0|            &sc->ext.tuples,
 4018|      0|            &sc->ext.tuples_len,
 4019|      0|            parg);
 4020|      0|    }
 4021|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
 4022|  1.05k|    case SSL_CTRL_SET_TLSEXT_HOSTNAME:
  ------------------
  |  | 1341|  1.05k|#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55
  ------------------
  |  Branch (4022:5): [True: 1.05k, False: 1]
  ------------------
 4023|       |        /*
 4024|       |         * This API is only used for a client to set what SNI it will request
 4025|       |         * from the server, but we currently allow it to be used on servers
 4026|       |         * as well, which is a programming error.  Currently we just clear
 4027|       |         * the field in SSL_do_handshake() for server SSLs, but when we can
 4028|       |         * make ABI-breaking changes, we may want to make use of this API
 4029|       |         * an error on server SSLs.
 4030|       |         */
 4031|  1.05k|        if (larg == TLSEXT_NAMETYPE_host_name) {
  ------------------
  |  |  179|  1.05k|#define TLSEXT_NAMETYPE_host_name 0
  ------------------
  |  Branch (4031:13): [True: 1.05k, False: 0]
  ------------------
 4032|  1.05k|            size_t len;
 4033|       |
 4034|  1.05k|            OPENSSL_free(sc->ext.hostname);
  ------------------
  |  |  132|  1.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4035|  1.05k|            sc->ext.hostname = NULL;
 4036|       |
 4037|  1.05k|            ret = 1;
 4038|  1.05k|            if (parg == NULL)
  ------------------
  |  Branch (4038:17): [True: 0, False: 1.05k]
  ------------------
 4039|      0|                break;
 4040|  1.05k|            len = strlen((char *)parg);
 4041|  1.05k|            if (len == 0 || len > TLSEXT_MAXLEN_host_name) {
  ------------------
  |  |  256|  1.05k|#define TLSEXT_MAXLEN_host_name 255
  ------------------
  |  Branch (4041:17): [True: 0, False: 1.05k]
  |  Branch (4041:29): [True: 1, False: 1.05k]
  ------------------
 4042|      1|                ERR_raise(ERR_LIB_SSL, SSL_R_TLS_EXT_INVALID_SERVERNAME);
  ------------------
  |  |  357|      1|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      1|    (ERR_new(),                                                  \
  |  |  |  |  360|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      1|        ERR_set_error)
  |  |  ------------------
  ------------------
 4043|      1|                return 0;
 4044|      1|            }
 4045|  1.05k|            if ((sc->ext.hostname = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  136|  1.05k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4045:17): [True: 0, False: 1.05k]
  ------------------
 4046|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4047|      0|                return 0;
 4048|      0|            }
 4049|  1.05k|        } else {
 4050|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_TLS_EXT_INVALID_SERVERNAME_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4051|      0|            return 0;
 4052|      0|        }
 4053|  1.05k|        break;
 4054|  1.05k|    case SSL_CTRL_SET_TLSEXT_DEBUG_ARG:
  ------------------
  |  | 1343|      0|#define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57
  ------------------
  |  Branch (4054:5): [True: 0, False: 1.05k]
  ------------------
 4055|      0|        sc->ext.debug_arg = parg;
 4056|      0|        ret = 1;
 4057|      0|        break;
 4058|       |
 4059|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1407|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127
  ------------------
  |  Branch (4059:5): [True: 0, False: 1.05k]
  ------------------
 4060|      0|        ret = sc->ext.status_type;
 4061|      0|        break;
 4062|       |
 4063|      1|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1351|      1|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  ------------------
  |  Branch (4063:5): [True: 1, False: 1.05k]
  ------------------
 4064|      1|        sc->ext.status_type = larg;
 4065|      1|        ret = 1;
 4066|      1|        break;
 4067|       |
 4068|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS:
  ------------------
  |  | 1352|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66
  ------------------
  |  Branch (4068:5): [True: 0, False: 1.05k]
  ------------------
 4069|      0|        *(STACK_OF(X509_EXTENSION) **)parg = sc->ext.ocsp.exts;
 4070|      0|        ret = 1;
 4071|      0|        break;
 4072|       |
 4073|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS:
  ------------------
  |  | 1353|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67
  ------------------
  |  Branch (4073:5): [True: 0, False: 1.05k]
  ------------------
 4074|      0|        sc->ext.ocsp.exts = parg;
 4075|      0|        ret = 1;
 4076|      0|        break;
 4077|       |
 4078|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS:
  ------------------
  |  | 1354|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68
  ------------------
  |  Branch (4078:5): [True: 0, False: 1.05k]
  ------------------
 4079|      0|        *(STACK_OF(OCSP_RESPID) **)parg = sc->ext.ocsp.ids;
 4080|      0|        ret = 1;
 4081|      0|        break;
 4082|       |
 4083|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS:
  ------------------
  |  | 1355|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69
  ------------------
  |  Branch (4083:5): [True: 0, False: 1.05k]
  ------------------
 4084|      0|        sc->ext.ocsp.ids = parg;
 4085|      0|        ret = 1;
 4086|      0|        break;
 4087|       |
 4088|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP:
  ------------------
  |  | 1356|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70
  ------------------
  |  Branch (4088:5): [True: 0, False: 1.05k]
  ------------------
 4089|      0|        *(unsigned char **)parg = NULL;
 4090|      0|        ret = -1;
 4091|       |
 4092|      0|#ifndef OPENSSL_NO_OCSP
 4093|      0|        resp = sk_OCSP_RESPONSE_value(sc->ext.ocsp.resp_ex, 0);
 4094|       |
 4095|      0|        if (resp != NULL) {
  ------------------
  |  Branch (4095:13): [True: 0, False: 0]
  ------------------
 4096|      0|            int resp_len = i2d_OCSP_RESPONSE(resp, &p);
 4097|       |
 4098|      0|            if (resp_len > 0) {
  ------------------
  |  Branch (4098:17): [True: 0, False: 0]
  ------------------
 4099|      0|                OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4100|      0|                *(unsigned char **)parg = sc->ext.ocsp.resp = p;
 4101|      0|                sc->ext.ocsp.resp_len = (size_t)resp_len;
 4102|      0|                ret = resp_len;
 4103|      0|            }
 4104|      0|        }
 4105|      0|#endif
 4106|      0|        break;
 4107|       |
 4108|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP:
  ------------------
  |  | 1357|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71
  ------------------
  |  Branch (4108:5): [True: 0, False: 1.05k]
  ------------------
 4109|      0|        ret = 1;
 4110|      0|#ifndef OPENSSL_NO_OCSP
 4111|       |        /*
 4112|       |         * In case of success keep the single value so we do not need to
 4113|       |         * free it immediately.
 4114|       |         * However in the handshake code we only use the extended values.
 4115|       |         */
 4116|      0|        OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4117|      0|        sc->ext.ocsp.resp = NULL;
 4118|      0|        sc->ext.ocsp.resp_len = 0;
 4119|       |
 4120|      0|        sk_OCSP_RESPONSE_pop_free(sc->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 4121|      0|        sc->ext.ocsp.resp_ex = NULL;
 4122|       |
 4123|      0|        if (parg != NULL) {
  ------------------
  |  Branch (4123:13): [True: 0, False: 0]
  ------------------
 4124|      0|            sc->ext.ocsp.resp_ex = sk_OCSP_RESPONSE_new_reserve(NULL, 1);
 4125|      0|            if (sc->ext.ocsp.resp_ex == NULL)
  ------------------
  |  Branch (4125:17): [True: 0, False: 0]
  ------------------
 4126|      0|                return 0;
 4127|       |
 4128|      0|            p = parg;
 4129|      0|            resp = d2i_OCSP_RESPONSE(NULL, (const unsigned char **)&p, larg);
 4130|      0|            if (resp != NULL)
  ------------------
  |  Branch (4130:17): [True: 0, False: 0]
  ------------------
 4131|      0|                sk_OCSP_RESPONSE_push(sc->ext.ocsp.resp_ex, resp);
 4132|       |
 4133|      0|            sc->ext.ocsp.resp = parg;
 4134|      0|            sc->ext.ocsp.resp_len = larg;
 4135|      0|        }
 4136|      0|#endif
 4137|      0|        break;
 4138|       |
 4139|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP_EX:
  ------------------
  |  | 1422|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP_EX 142
  ------------------
  |  Branch (4139:5): [True: 0, False: 1.05k]
  ------------------
 4140|      0|#ifndef OPENSSL_NO_OCSP
 4141|      0|        *(STACK_OF(OCSP_RESPONSE) **)parg = sc->ext.ocsp.resp_ex;
 4142|      0|        ret = sk_OCSP_RESPONSE_num(sc->ext.ocsp.resp_ex);
 4143|       |#else
 4144|       |        *(unsigned char **)parg = NULL;
 4145|       |        ret = -1;
 4146|       |#endif
 4147|      0|        break;
 4148|       |
 4149|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP_EX:
  ------------------
  |  | 1423|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP_EX 143
  ------------------
  |  Branch (4149:5): [True: 0, False: 1.05k]
  ------------------
 4150|      0|#ifndef OPENSSL_NO_OCSP
 4151|       |        /*
 4152|       |         * cleanup single values, which might be set somewhere else
 4153|       |         * we only use the extended values
 4154|       |         */
 4155|      0|        if (sc->ext.ocsp.resp != NULL) {
  ------------------
  |  Branch (4155:13): [True: 0, False: 0]
  ------------------
 4156|      0|            OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4157|      0|            sc->ext.ocsp.resp = NULL;
 4158|      0|            sc->ext.ocsp.resp_len = 0;
 4159|      0|        }
 4160|       |
 4161|      0|        sk_OCSP_RESPONSE_pop_free(sc->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 4162|      0|        sc->ext.ocsp.resp_ex = (STACK_OF(OCSP_RESPONSE) *)parg;
 4163|      0|#endif
 4164|      0|        ret = 1;
 4165|      0|        break;
 4166|       |
 4167|      0|    case SSL_CTRL_CHAIN:
  ------------------
  |  | 1375|      0|#define SSL_CTRL_CHAIN 88
  ------------------
  |  Branch (4167:5): [True: 0, False: 1.05k]
  ------------------
 4168|      0|        if (larg)
  ------------------
  |  Branch (4168:13): [True: 0, False: 0]
  ------------------
 4169|      0|            return ssl_cert_set1_chain(sc, NULL, (STACK_OF(X509) *)parg);
 4170|      0|        else
 4171|      0|            return ssl_cert_set0_chain(sc, NULL, (STACK_OF(X509) *)parg);
 4172|       |
 4173|      0|    case SSL_CTRL_CHAIN_CERT:
  ------------------
  |  | 1376|      0|#define SSL_CTRL_CHAIN_CERT 89
  ------------------
  |  Branch (4173:5): [True: 0, False: 1.05k]
  ------------------
 4174|      0|        if (larg)
  ------------------
  |  Branch (4174:13): [True: 0, False: 0]
  ------------------
 4175|      0|            return ssl_cert_add1_chain_cert(sc, NULL, (X509 *)parg);
 4176|      0|        else
 4177|      0|            return ssl_cert_add0_chain_cert(sc, NULL, (X509 *)parg);
 4178|       |
 4179|      0|    case SSL_CTRL_GET_CHAIN_CERTS:
  ------------------
  |  | 1396|      0|#define SSL_CTRL_GET_CHAIN_CERTS 115
  ------------------
  |  Branch (4179:5): [True: 0, False: 1.05k]
  ------------------
 4180|      0|        *(STACK_OF(X509) **)parg = sc->cert->key->chain;
 4181|      0|        ret = 1;
 4182|      0|        break;
 4183|       |
 4184|      0|    case SSL_CTRL_SELECT_CURRENT_CERT:
  ------------------
  |  | 1397|      0|#define SSL_CTRL_SELECT_CURRENT_CERT 116
  ------------------
  |  Branch (4184:5): [True: 0, False: 1.05k]
  ------------------
 4185|      0|        return ssl_cert_select_current(sc->cert, (X509 *)parg);
 4186|       |
 4187|      0|    case SSL_CTRL_SET_CURRENT_CERT:
  ------------------
  |  | 1398|      0|#define SSL_CTRL_SET_CURRENT_CERT 117
  ------------------
  |  Branch (4187:5): [True: 0, False: 1.05k]
  ------------------
 4188|      0|        if (larg == SSL_CERT_SET_SERVER) {
  ------------------
  |  | 1426|      0|#define SSL_CERT_SET_SERVER 3
  ------------------
  |  Branch (4188:13): [True: 0, False: 0]
  ------------------
 4189|      0|            const SSL_CIPHER *cipher;
 4190|      0|            if (!sc->server)
  ------------------
  |  Branch (4190:17): [True: 0, False: 0]
  ------------------
 4191|      0|                return 0;
 4192|      0|            cipher = sc->s3.tmp.new_cipher;
 4193|      0|            if (cipher == NULL)
  ------------------
  |  Branch (4193:17): [True: 0, False: 0]
  ------------------
 4194|      0|                return 0;
 4195|       |            /*
 4196|       |             * No certificate for unauthenticated ciphersuites or using SRP
 4197|       |             * authentication
 4198|       |             */
 4199|      0|            if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  ------------------
  |  |  116|      0|#define SSL_aNULL 0x00000004U
  ------------------
                          if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  ------------------
  |  |  124|      0|#define SSL_aSRP 0x00000040U
  ------------------
  |  Branch (4199:17): [True: 0, False: 0]
  ------------------
 4200|      0|                return 2;
 4201|      0|            if (sc->s3.tmp.cert == NULL)
  ------------------
  |  Branch (4201:17): [True: 0, False: 0]
  ------------------
 4202|      0|                return 0;
 4203|      0|            sc->cert->key = sc->s3.tmp.cert;
 4204|      0|            return 1;
 4205|      0|        }
 4206|      0|        return ssl_cert_set_current(sc->cert, larg);
 4207|       |
 4208|      0|    case SSL_CTRL_GET_GROUPS: {
  ------------------
  |  | 1377|      0|#define SSL_CTRL_GET_GROUPS 90
  ------------------
  |  Branch (4208:5): [True: 0, False: 1.05k]
  ------------------
 4209|      0|        uint16_t *clist;
 4210|      0|        size_t clistlen;
 4211|       |
 4212|      0|        if (!sc->session)
  ------------------
  |  Branch (4212:13): [True: 0, False: 0]
  ------------------
 4213|      0|            return 0;
 4214|      0|        clist = sc->ext.peer_supportedgroups;
 4215|      0|        clistlen = sc->ext.peer_supportedgroups_len;
 4216|      0|        if (parg) {
  ------------------
  |  Branch (4216:13): [True: 0, False: 0]
  ------------------
 4217|      0|            size_t i;
 4218|      0|            int *cptr = parg;
 4219|       |
 4220|      0|            for (i = 0; i < clistlen; i++) {
  ------------------
  |  Branch (4220:25): [True: 0, False: 0]
  ------------------
 4221|      0|                const TLS_GROUP_INFO *cinf
 4222|      0|                    = tls1_group_id_lookup(s->ctx, clist[i]);
 4223|       |
 4224|      0|                if (cinf != NULL)
  ------------------
  |  Branch (4224:21): [True: 0, False: 0]
  ------------------
 4225|      0|                    cptr[i] = tls1_group_id2nid(cinf->group_id, 1);
 4226|      0|                else
 4227|      0|                    cptr[i] = TLSEXT_nid_unknown | clist[i];
  ------------------
  |  |  227|      0|#define TLSEXT_nid_unknown 0x1000000
  ------------------
 4228|      0|            }
 4229|      0|        }
 4230|      0|        return (int)clistlen;
 4231|      0|    }
 4232|       |
 4233|      0|    case SSL_CTRL_SET_GROUPS:
  ------------------
  |  | 1378|      0|#define SSL_CTRL_SET_GROUPS 91
  ------------------
  |  Branch (4233:5): [True: 0, False: 1.05k]
  ------------------
 4234|      0|        return tls1_set_groups(&sc->ext.supportedgroups,
 4235|      0|            &sc->ext.supportedgroups_len,
 4236|      0|            &sc->ext.keyshares,
 4237|      0|            &sc->ext.keyshares_len,
 4238|      0|            &sc->ext.tuples,
 4239|      0|            &sc->ext.tuples_len,
 4240|      0|            parg, larg);
 4241|       |
 4242|      0|    case SSL_CTRL_SET_GROUPS_LIST:
  ------------------
  |  | 1379|      0|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (4242:5): [True: 0, False: 1.05k]
  ------------------
 4243|      0|        return tls1_set_groups_list(s->ctx,
 4244|      0|            &sc->ext.supportedgroups,
 4245|      0|            &sc->ext.supportedgroups_len,
 4246|      0|            &sc->ext.keyshares,
 4247|      0|            &sc->ext.keyshares_len,
 4248|      0|            &sc->ext.tuples,
 4249|      0|            &sc->ext.tuples_len,
 4250|      0|            parg);
 4251|       |
 4252|      0|    case SSL_CTRL_GET_SHARED_GROUP: {
  ------------------
  |  | 1380|      0|#define SSL_CTRL_GET_SHARED_GROUP 93
  ------------------
  |  Branch (4252:5): [True: 0, False: 1.05k]
  ------------------
 4253|      0|        uint16_t id = tls1_shared_group(sc, larg, TLS1_GROUPS_ALL_GROUPS);
  ------------------
  |  | 2717|      0|#define TLS1_GROUPS_ALL_GROUPS 2
  ------------------
 4254|       |
 4255|      0|        if (larg != -1)
  ------------------
  |  Branch (4255:13): [True: 0, False: 0]
  ------------------
 4256|      0|            return tls1_group_id2nid(id, 1);
 4257|      0|        return id;
 4258|      0|    }
 4259|      0|    case SSL_CTRL_GET_NEGOTIATED_GROUP: {
  ------------------
  |  | 1414|      0|#define SSL_CTRL_GET_NEGOTIATED_GROUP 134
  ------------------
  |  Branch (4259:5): [True: 0, False: 1.05k]
  ------------------
 4260|      0|        unsigned int id;
 4261|       |
 4262|      0|        if (SSL_CONNECTION_IS_TLS13(sc) && sc->s3.did_kex)
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4262:44): [True: 0, False: 0]
  ------------------
 4263|      0|            id = sc->s3.group_id;
 4264|      0|        else
 4265|      0|            id = (sc->session != NULL) ? sc->session->kex_group : NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (4265:18): [True: 0, False: 0]
  ------------------
 4266|      0|        ret = tls1_group_id2nid(id, 1);
 4267|      0|        break;
 4268|      0|    }
 4269|      0|    case SSL_CTRL_SET_SIGALGS:
  ------------------
  |  | 1381|      0|#define SSL_CTRL_SET_SIGALGS 97
  ------------------
  |  Branch (4269:5): [True: 0, False: 1.05k]
  ------------------
 4270|      0|        return tls1_set_sigalgs(sc->cert, parg, larg, 0);
 4271|       |
 4272|      0|    case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1382|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (4272:5): [True: 0, False: 1.05k]
  ------------------
 4273|      0|        return tls1_set_sigalgs_list(s->ctx, sc->cert, parg, 0);
 4274|       |
 4275|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS:
  ------------------
  |  | 1385|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS 101
  ------------------
  |  Branch (4275:5): [True: 0, False: 1.05k]
  ------------------
 4276|      0|        return tls1_set_sigalgs(sc->cert, parg, larg, 1);
 4277|       |
 4278|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1386|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (4278:5): [True: 0, False: 1.05k]
  ------------------
 4279|      0|        return tls1_set_sigalgs_list(s->ctx, sc->cert, parg, 1);
 4280|       |
 4281|      0|    case SSL_CTRL_GET_CLIENT_CERT_TYPES: {
  ------------------
  |  | 1387|      0|#define SSL_CTRL_GET_CLIENT_CERT_TYPES 103
  ------------------
  |  Branch (4281:5): [True: 0, False: 1.05k]
  ------------------
 4282|      0|        const unsigned char **pctype = parg;
 4283|      0|        if (sc->server || !sc->s3.tmp.cert_req)
  ------------------
  |  Branch (4283:13): [True: 0, False: 0]
  |  Branch (4283:27): [True: 0, False: 0]
  ------------------
 4284|      0|            return 0;
 4285|      0|        if (pctype)
  ------------------
  |  Branch (4285:13): [True: 0, False: 0]
  ------------------
 4286|      0|            *pctype = sc->s3.tmp.ctype;
 4287|      0|        return (long)sc->s3.tmp.ctype_len;
 4288|      0|    }
 4289|       |
 4290|      0|    case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  ------------------
  |  | 1388|      0|#define SSL_CTRL_SET_CLIENT_CERT_TYPES 104
  ------------------
  |  Branch (4290:5): [True: 0, False: 1.05k]
  ------------------
 4291|      0|        if (!sc->server)
  ------------------
  |  Branch (4291:13): [True: 0, False: 0]
  ------------------
 4292|      0|            return 0;
 4293|      0|        return ssl3_set_req_cert_type(sc->cert, parg, larg);
 4294|       |
 4295|      0|    case SSL_CTRL_BUILD_CERT_CHAIN:
  ------------------
  |  | 1389|      0|#define SSL_CTRL_BUILD_CERT_CHAIN 105
  ------------------
  |  Branch (4295:5): [True: 0, False: 1.05k]
  ------------------
 4296|      0|        return ssl_build_cert_chain(sc, NULL, larg);
 4297|       |
 4298|      0|    case SSL_CTRL_SET_VERIFY_CERT_STORE:
  ------------------
  |  | 1390|      0|#define SSL_CTRL_SET_VERIFY_CERT_STORE 106
  ------------------
  |  Branch (4298:5): [True: 0, False: 1.05k]
  ------------------
 4299|      0|        return ssl_cert_set_cert_store(sc->cert, parg, 0, larg);
 4300|       |
 4301|      0|    case SSL_CTRL_SET_CHAIN_CERT_STORE:
  ------------------
  |  | 1391|      0|#define SSL_CTRL_SET_CHAIN_CERT_STORE 107
  ------------------
  |  Branch (4301:5): [True: 0, False: 1.05k]
  ------------------
 4302|      0|        return ssl_cert_set_cert_store(sc->cert, parg, 1, larg);
 4303|       |
 4304|      0|    case SSL_CTRL_GET_VERIFY_CERT_STORE:
  ------------------
  |  | 1417|      0|#define SSL_CTRL_GET_VERIFY_CERT_STORE 137
  ------------------
  |  Branch (4304:5): [True: 0, False: 1.05k]
  ------------------
 4305|      0|        return ssl_cert_get_cert_store(sc->cert, parg, 0);
 4306|       |
 4307|      0|    case SSL_CTRL_GET_CHAIN_CERT_STORE:
  ------------------
  |  | 1418|      0|#define SSL_CTRL_GET_CHAIN_CERT_STORE 138
  ------------------
  |  Branch (4307:5): [True: 0, False: 1.05k]
  ------------------
 4308|      0|        return ssl_cert_get_cert_store(sc->cert, parg, 1);
 4309|       |
 4310|      0|    case SSL_CTRL_GET_PEER_SIGNATURE_NAME:
  ------------------
  |  | 1421|      0|#define SSL_CTRL_GET_PEER_SIGNATURE_NAME 141
  ------------------
  |  Branch (4310:5): [True: 0, False: 1.05k]
  ------------------
 4311|      0|        if (parg == NULL || sc->s3.tmp.peer_sigalg == NULL)
  ------------------
  |  Branch (4311:13): [True: 0, False: 0]
  |  Branch (4311:29): [True: 0, False: 0]
  ------------------
 4312|      0|            return 0;
 4313|      0|        *(const char **)parg = sc->s3.tmp.peer_sigalg->name;
 4314|      0|        return 1;
 4315|       |
 4316|      0|    case SSL_CTRL_GET_PEER_SIGNATURE_NID:
  ------------------
  |  | 1392|      0|#define SSL_CTRL_GET_PEER_SIGNATURE_NID 108
  ------------------
  |  Branch (4316:5): [True: 0, False: 1.05k]
  ------------------
 4317|      0|        if (sc->s3.tmp.peer_sigalg == NULL)
  ------------------
  |  Branch (4317:13): [True: 0, False: 0]
  ------------------
 4318|      0|            return 0;
 4319|      0|        *(int *)parg = sc->s3.tmp.peer_sigalg->hash;
 4320|      0|        return 1;
 4321|       |
 4322|      0|    case SSL_CTRL_GET_SIGNATURE_NAME:
  ------------------
  |  | 1420|      0|#define SSL_CTRL_GET_SIGNATURE_NAME 140
  ------------------
  |  Branch (4322:5): [True: 0, False: 1.05k]
  ------------------
 4323|      0|        if (parg == NULL || sc->s3.tmp.sigalg == NULL)
  ------------------
  |  Branch (4323:13): [True: 0, False: 0]
  |  Branch (4323:29): [True: 0, False: 0]
  ------------------
 4324|      0|            return 0;
 4325|      0|        *(const char **)parg = sc->s3.tmp.sigalg->name;
 4326|      0|        return 1;
 4327|       |
 4328|      0|    case SSL_CTRL_GET_SIGNATURE_NID:
  ------------------
  |  | 1412|      0|#define SSL_CTRL_GET_SIGNATURE_NID 132
  ------------------
  |  Branch (4328:5): [True: 0, False: 1.05k]
  ------------------
 4329|      0|        if (sc->s3.tmp.sigalg == NULL)
  ------------------
  |  Branch (4329:13): [True: 0, False: 0]
  ------------------
 4330|      0|            return 0;
 4331|      0|        *(int *)parg = sc->s3.tmp.sigalg->hash;
 4332|      0|        return 1;
 4333|       |
 4334|      0|    case SSL_CTRL_GET_PEER_TMP_KEY:
  ------------------
  |  | 1393|      0|#define SSL_CTRL_GET_PEER_TMP_KEY 109
  ------------------
  |  Branch (4334:5): [True: 0, False: 1.05k]
  ------------------
 4335|      0|        if (sc->session == NULL || sc->s3.peer_tmp == NULL) {
  ------------------
  |  Branch (4335:13): [True: 0, False: 0]
  |  Branch (4335:36): [True: 0, False: 0]
  ------------------
 4336|      0|            return 0;
 4337|      0|        } else {
 4338|      0|            if (!EVP_PKEY_up_ref(sc->s3.peer_tmp))
  ------------------
  |  Branch (4338:17): [True: 0, False: 0]
  ------------------
 4339|      0|                return 0;
 4340|       |
 4341|      0|            *(EVP_PKEY **)parg = sc->s3.peer_tmp;
 4342|      0|            return 1;
 4343|      0|        }
 4344|       |
 4345|      0|    case SSL_CTRL_GET_TMP_KEY:
  ------------------
  |  | 1413|      0|#define SSL_CTRL_GET_TMP_KEY 133
  ------------------
  |  Branch (4345:5): [True: 0, False: 1.05k]
  ------------------
 4346|      0|        if (sc->session == NULL || sc->s3.tmp.pkey == NULL) {
  ------------------
  |  Branch (4346:13): [True: 0, False: 0]
  |  Branch (4346:36): [True: 0, False: 0]
  ------------------
 4347|      0|            return 0;
 4348|      0|        } else {
 4349|      0|            if (!EVP_PKEY_up_ref(sc->s3.tmp.pkey))
  ------------------
  |  Branch (4349:17): [True: 0, False: 0]
  ------------------
 4350|      0|                return 0;
 4351|       |
 4352|      0|            *(EVP_PKEY **)parg = sc->s3.tmp.pkey;
 4353|      0|            return 1;
 4354|      0|        }
 4355|       |
 4356|      0|    case SSL_CTRL_GET_EC_POINT_FORMATS: {
  ------------------
  |  | 1395|      0|#define SSL_CTRL_GET_EC_POINT_FORMATS 111
  ------------------
  |  Branch (4356:5): [True: 0, False: 1.05k]
  ------------------
 4357|      0|        const unsigned char **pformat = parg;
 4358|       |
 4359|      0|        if (sc->ext.peer_ecpointformats == NULL)
  ------------------
  |  Branch (4359:13): [True: 0, False: 0]
  ------------------
 4360|      0|            return 0;
 4361|      0|        *pformat = sc->ext.peer_ecpointformats;
 4362|      0|        return (int)sc->ext.peer_ecpointformats_len;
 4363|      0|    }
 4364|       |
 4365|      0|    case SSL_CTRL_GET_IANA_GROUPS: {
  ------------------
  |  | 1415|      0|#define SSL_CTRL_GET_IANA_GROUPS 135
  ------------------
  |  Branch (4365:5): [True: 0, False: 1.05k]
  ------------------
 4366|      0|        if (parg != NULL) {
  ------------------
  |  Branch (4366:13): [True: 0, False: 0]
  ------------------
 4367|      0|            *(uint16_t **)parg = (uint16_t *)sc->ext.peer_supportedgroups;
 4368|      0|        }
 4369|      0|        return (int)sc->ext.peer_supportedgroups_len;
 4370|      0|    }
 4371|       |
 4372|      0|    case SSL_CTRL_SET_MSG_CALLBACK_ARG:
  ------------------
  |  | 1312|      0|#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
  ------------------
  |  Branch (4372:5): [True: 0, False: 1.05k]
  ------------------
 4373|      0|        sc->msg_callback_arg = parg;
 4374|      0|        return 1;
 4375|       |
 4376|      0|    default:
  ------------------
  |  Branch (4376:5): [True: 0, False: 1.05k]
  ------------------
 4377|      0|        break;
 4378|  1.05k|    }
 4379|  1.05k|    return ret;
 4380|  1.05k|}
ssl3_ctx_ctrl:
 4418|  4.13k|{
 4419|  4.13k|    switch (cmd) {
 4420|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4421|      0|    case SSL_CTRL_SET_TMP_DH: {
  ------------------
  |  | 1300|      0|#define SSL_CTRL_SET_TMP_DH 3
  ------------------
  |  Branch (4421:5): [True: 0, False: 4.13k]
  ------------------
 4422|      0|        EVP_PKEY *pkdh = NULL;
 4423|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4423:13): [True: 0, False: 0]
  ------------------
 4424|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4425|      0|            return 0;
 4426|      0|        }
 4427|      0|        pkdh = ssl_dh_to_pkey(parg);
 4428|      0|        if (pkdh == NULL) {
  ------------------
  |  Branch (4428:13): [True: 0, False: 0]
  ------------------
 4429|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_DH_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4430|      0|            return 0;
 4431|      0|        }
 4432|      0|        if (!SSL_CTX_set0_tmp_dh_pkey(ctx, pkdh)) {
  ------------------
  |  Branch (4432:13): [True: 0, False: 0]
  ------------------
 4433|      0|            EVP_PKEY_free(pkdh);
 4434|      0|            return 0;
 4435|      0|        }
 4436|      0|        return 1;
 4437|      0|    }
 4438|      0|    case SSL_CTRL_SET_TMP_DH_CB: {
  ------------------
  |  | 1302|      0|#define SSL_CTRL_SET_TMP_DH_CB 6
  ------------------
  |  Branch (4438:5): [True: 0, False: 4.13k]
  ------------------
 4439|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4440|      0|        return 0;
 4441|      0|    }
 4442|      0|#endif
 4443|      0|    case SSL_CTRL_SET_DH_AUTO:
  ------------------
  |  | 1399|      0|#define SSL_CTRL_SET_DH_AUTO 118
  ------------------
  |  Branch (4443:5): [True: 0, False: 4.13k]
  ------------------
 4444|      0|        ctx->cert->dh_tmp_auto = larg;
 4445|      0|        return 1;
 4446|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4447|      0|    case SSL_CTRL_SET_TMP_ECDH: {
  ------------------
  |  | 1301|      0|#define SSL_CTRL_SET_TMP_ECDH 4
  ------------------
  |  Branch (4447:5): [True: 0, False: 4.13k]
  ------------------
 4448|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4448:13): [True: 0, False: 0]
  ------------------
 4449|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4450|      0|            return 0;
 4451|      0|        }
 4452|      0|        return ssl_set_tmp_ecdh_groups(&ctx->ext.supportedgroups,
 4453|      0|            &ctx->ext.supportedgroups_len,
 4454|      0|            &ctx->ext.keyshares,
 4455|      0|            &ctx->ext.keyshares_len,
 4456|      0|            &ctx->ext.tuples,
 4457|      0|            &ctx->ext.tuples_len,
 4458|      0|            parg);
 4459|      0|    }
 4460|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
 4461|      0|    case SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG:
  ------------------
  |  | 1340|      0|#define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54
  ------------------
  |  Branch (4461:5): [True: 0, False: 4.13k]
  ------------------
 4462|      0|        ctx->ext.servername_arg = parg;
 4463|      0|        break;
 4464|      0|    case SSL_CTRL_SET_TLSEXT_TICKET_KEYS:
  ------------------
  |  | 1345|      0|#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
  ------------------
  |  Branch (4464:5): [True: 0, False: 4.13k]
  ------------------
 4465|      0|    case SSL_CTRL_GET_TLSEXT_TICKET_KEYS: {
  ------------------
  |  | 1344|      0|#define SSL_CTRL_GET_TLSEXT_TICKET_KEYS 58
  ------------------
  |  Branch (4465:5): [True: 0, False: 4.13k]
  ------------------
 4466|      0|        unsigned char *keys = parg;
 4467|      0|        long tick_keylen = (sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key) + sizeof(ctx->ext.secure->tick_aes_key));
 4468|      0|        if (keys == NULL)
  ------------------
  |  Branch (4468:13): [True: 0, False: 0]
  ------------------
 4469|      0|            return tick_keylen;
 4470|      0|        if (larg != tick_keylen) {
  ------------------
  |  Branch (4470:13): [True: 0, False: 0]
  ------------------
 4471|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_TICKET_KEYS_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4472|      0|            return 0;
 4473|      0|        }
 4474|      0|        if (cmd == SSL_CTRL_SET_TLSEXT_TICKET_KEYS) {
  ------------------
  |  | 1345|      0|#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
  ------------------
  |  Branch (4474:13): [True: 0, False: 0]
  ------------------
 4475|      0|            memcpy(ctx->ext.tick_key_name, keys,
 4476|      0|                sizeof(ctx->ext.tick_key_name));
 4477|      0|            memcpy(ctx->ext.secure->tick_hmac_key,
 4478|      0|                keys + sizeof(ctx->ext.tick_key_name),
 4479|      0|                sizeof(ctx->ext.secure->tick_hmac_key));
 4480|      0|            memcpy(ctx->ext.secure->tick_aes_key,
 4481|      0|                keys + sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key),
 4482|      0|                sizeof(ctx->ext.secure->tick_aes_key));
 4483|      0|        } else {
 4484|      0|            memcpy(keys, ctx->ext.tick_key_name,
 4485|      0|                sizeof(ctx->ext.tick_key_name));
 4486|      0|            memcpy(keys + sizeof(ctx->ext.tick_key_name),
 4487|      0|                ctx->ext.secure->tick_hmac_key,
 4488|      0|                sizeof(ctx->ext.secure->tick_hmac_key));
 4489|      0|            memcpy(keys + sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key),
 4490|      0|                ctx->ext.secure->tick_aes_key,
 4491|      0|                sizeof(ctx->ext.secure->tick_aes_key));
 4492|      0|        }
 4493|      0|        return 1;
 4494|      0|    }
 4495|       |
 4496|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1407|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127
  ------------------
  |  Branch (4496:5): [True: 0, False: 4.13k]
  ------------------
 4497|      0|        return ctx->ext.status_type;
 4498|       |
 4499|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1351|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  ------------------
  |  Branch (4499:5): [True: 0, False: 4.13k]
  ------------------
 4500|      0|        ctx->ext.status_type = larg;
 4501|      0|        break;
 4502|       |
 4503|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG:
  ------------------
  |  | 1350|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64
  ------------------
  |  Branch (4503:5): [True: 0, False: 4.13k]
  ------------------
 4504|      0|        ctx->ext.status_arg = parg;
 4505|      0|        return 1;
 4506|       |
 4507|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG:
  ------------------
  |  | 1409|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG 129
  ------------------
  |  Branch (4507:5): [True: 0, False: 4.13k]
  ------------------
 4508|      0|        *(void **)parg = ctx->ext.status_arg;
 4509|      0|        break;
 4510|       |
 4511|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB:
  ------------------
  |  | 1408|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB 128
  ------------------
  |  Branch (4511:5): [True: 0, False: 4.13k]
  ------------------
 4512|      0|        *(int (**)(SSL *, void *))parg = ctx->ext.status_cb;
 4513|      0|        break;
 4514|       |
 4515|      0|#ifndef OPENSSL_NO_SRP
 4516|      0|    case SSL_CTRL_SET_TLS_EXT_SRP_USERNAME:
  ------------------
  |  | 1365|      0|#define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME 79
  ------------------
  |  Branch (4516:5): [True: 0, False: 4.13k]
  ------------------
 4517|      0|        ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  ------------------
  |  |   95|      0|#define SSL_kSRP 0x00000020U
  ------------------
 4518|      0|        OPENSSL_free(ctx->srp_ctx.login);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4519|      0|        ctx->srp_ctx.login = NULL;
 4520|      0|        if (parg == NULL)
  ------------------
  |  Branch (4520:13): [True: 0, False: 0]
  ------------------
 4521|      0|            break;
 4522|      0|        if (strlen((const char *)parg) > 255 || strlen((const char *)parg) < 1) {
  ------------------
  |  Branch (4522:13): [True: 0, False: 0]
  |  Branch (4522:49): [True: 0, False: 0]
  ------------------
 4523|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_SRP_USERNAME);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4524|      0|            return 0;
 4525|      0|        }
 4526|      0|        if ((ctx->srp_ctx.login = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4526:13): [True: 0, False: 0]
  ------------------
 4527|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4528|      0|            return 0;
 4529|      0|        }
 4530|      0|        break;
 4531|      0|    case SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD:
  ------------------
  |  | 1367|      0|#define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD 81
  ------------------
  |  Branch (4531:5): [True: 0, False: 4.13k]
  ------------------
 4532|      0|        ctx->srp_ctx.SRP_give_srp_client_pwd_callback = srp_password_from_info_cb;
 4533|      0|        if (ctx->srp_ctx.info != NULL)
  ------------------
  |  Branch (4533:13): [True: 0, False: 0]
  ------------------
 4534|      0|            OPENSSL_free(ctx->srp_ctx.info);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4535|      0|        if ((ctx->srp_ctx.info = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4535:13): [True: 0, False: 0]
  ------------------
 4536|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4537|      0|            return 0;
 4538|      0|        }
 4539|      0|        break;
 4540|      0|    case SSL_CTRL_SET_SRP_ARG:
  ------------------
  |  | 1364|      0|#define SSL_CTRL_SET_SRP_ARG 78
  ------------------
  |  Branch (4540:5): [True: 0, False: 4.13k]
  ------------------
 4541|      0|        ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  ------------------
  |  |   95|      0|#define SSL_kSRP 0x00000020U
  ------------------
 4542|      0|        ctx->srp_ctx.SRP_cb_arg = parg;
 4543|      0|        break;
 4544|       |
 4545|      0|    case SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH:
  ------------------
  |  | 1366|      0|#define SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH 80
  ------------------
  |  Branch (4545:5): [True: 0, False: 4.13k]
  ------------------
 4546|      0|        ctx->srp_ctx.strength = larg;
 4547|      0|        break;
 4548|      0|#endif
 4549|       |
 4550|      0|    case SSL_CTRL_SET_GROUPS:
  ------------------
  |  | 1378|      0|#define SSL_CTRL_SET_GROUPS 91
  ------------------
  |  Branch (4550:5): [True: 0, False: 4.13k]
  ------------------
 4551|      0|        return tls1_set_groups(&ctx->ext.supportedgroups,
 4552|      0|            &ctx->ext.supportedgroups_len,
 4553|      0|            &ctx->ext.keyshares,
 4554|      0|            &ctx->ext.keyshares_len,
 4555|      0|            &ctx->ext.tuples,
 4556|      0|            &ctx->ext.tuples_len,
 4557|      0|            parg, larg);
 4558|       |
 4559|  4.13k|    case SSL_CTRL_SET_GROUPS_LIST:
  ------------------
  |  | 1379|  4.13k|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (4559:5): [True: 4.13k, False: 0]
  ------------------
 4560|  4.13k|        return tls1_set_groups_list(ctx,
 4561|  4.13k|            &ctx->ext.supportedgroups,
 4562|  4.13k|            &ctx->ext.supportedgroups_len,
 4563|  4.13k|            &ctx->ext.keyshares,
 4564|  4.13k|            &ctx->ext.keyshares_len,
 4565|  4.13k|            &ctx->ext.tuples,
 4566|  4.13k|            &ctx->ext.tuples_len,
 4567|  4.13k|            parg);
 4568|       |
 4569|      0|    case SSL_CTRL_GET0_IMPLEMENTED_GROUPS:
  ------------------
  |  | 1419|      0|#define SSL_CTRL_GET0_IMPLEMENTED_GROUPS 139
  ------------------
  |  Branch (4569:5): [True: 0, False: 4.13k]
  ------------------
 4570|      0|        return tls1_get0_implemented_groups(ctx->min_proto_version,
 4571|      0|            ctx->max_proto_version,
 4572|      0|            ctx->group_list,
 4573|      0|            ctx->group_list_len, larg, parg);
 4574|       |
 4575|      0|    case SSL_CTRL_SET_SIGALGS:
  ------------------
  |  | 1381|      0|#define SSL_CTRL_SET_SIGALGS 97
  ------------------
  |  Branch (4575:5): [True: 0, False: 4.13k]
  ------------------
 4576|      0|        return tls1_set_sigalgs(ctx->cert, parg, larg, 0);
 4577|       |
 4578|      0|    case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1382|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (4578:5): [True: 0, False: 4.13k]
  ------------------
 4579|      0|        return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 0);
 4580|       |
 4581|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS:
  ------------------
  |  | 1385|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS 101
  ------------------
  |  Branch (4581:5): [True: 0, False: 4.13k]
  ------------------
 4582|      0|        return tls1_set_sigalgs(ctx->cert, parg, larg, 1);
 4583|       |
 4584|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1386|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (4584:5): [True: 0, False: 4.13k]
  ------------------
 4585|      0|        return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 1);
 4586|       |
 4587|      0|    case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  ------------------
  |  | 1388|      0|#define SSL_CTRL_SET_CLIENT_CERT_TYPES 104
  ------------------
  |  Branch (4587:5): [True: 0, False: 4.13k]
  ------------------
 4588|      0|        return ssl3_set_req_cert_type(ctx->cert, parg, larg);
 4589|       |
 4590|      0|    case SSL_CTRL_BUILD_CERT_CHAIN:
  ------------------
  |  | 1389|      0|#define SSL_CTRL_BUILD_CERT_CHAIN 105
  ------------------
  |  Branch (4590:5): [True: 0, False: 4.13k]
  ------------------
 4591|      0|        return ssl_build_cert_chain(NULL, ctx, larg);
 4592|       |
 4593|      0|    case SSL_CTRL_SET_VERIFY_CERT_STORE:
  ------------------
  |  | 1390|      0|#define SSL_CTRL_SET_VERIFY_CERT_STORE 106
  ------------------
  |  Branch (4593:5): [True: 0, False: 4.13k]
  ------------------
 4594|      0|        return ssl_cert_set_cert_store(ctx->cert, parg, 0, larg);
 4595|       |
 4596|      0|    case SSL_CTRL_SET_CHAIN_CERT_STORE:
  ------------------
  |  | 1391|      0|#define SSL_CTRL_SET_CHAIN_CERT_STORE 107
  ------------------
  |  Branch (4596:5): [True: 0, False: 4.13k]
  ------------------
 4597|      0|        return ssl_cert_set_cert_store(ctx->cert, parg, 1, larg);
 4598|       |
 4599|      0|    case SSL_CTRL_GET_VERIFY_CERT_STORE:
  ------------------
  |  | 1417|      0|#define SSL_CTRL_GET_VERIFY_CERT_STORE 137
  ------------------
  |  Branch (4599:5): [True: 0, False: 4.13k]
  ------------------
 4600|      0|        return ssl_cert_get_cert_store(ctx->cert, parg, 0);
 4601|       |
 4602|      0|    case SSL_CTRL_GET_CHAIN_CERT_STORE:
  ------------------
  |  | 1418|      0|#define SSL_CTRL_GET_CHAIN_CERT_STORE 138
  ------------------
  |  Branch (4602:5): [True: 0, False: 4.13k]
  ------------------
 4603|      0|        return ssl_cert_get_cert_store(ctx->cert, parg, 1);
 4604|       |
 4605|       |        /* A Thawte special :-) */
 4606|      0|    case SSL_CTRL_EXTRA_CHAIN_CERT:
  ------------------
  |  | 1310|      0|#define SSL_CTRL_EXTRA_CHAIN_CERT 14
  ------------------
  |  Branch (4606:5): [True: 0, False: 4.13k]
  ------------------
 4607|      0|        if (ctx->extra_certs == NULL) {
  ------------------
  |  Branch (4607:13): [True: 0, False: 0]
  ------------------
 4608|      0|            if ((ctx->extra_certs = sk_X509_new_null()) == NULL) {
  ------------------
  |  |   85|      0|#define sk_X509_new_null() ((STACK_OF(X509) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_freefunc_thunk))
  ------------------
  |  Branch (4608:17): [True: 0, False: 0]
  ------------------
 4609|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4610|      0|                return 0;
 4611|      0|            }
 4612|      0|        }
 4613|      0|        if (!sk_X509_push(ctx->extra_certs, (X509 *)parg)) {
  ------------------
  |  |   92|      0|#define sk_X509_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr))
  ------------------
  |  Branch (4613:13): [True: 0, False: 0]
  ------------------
 4614|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4615|      0|            return 0;
 4616|      0|        }
 4617|      0|        break;
 4618|       |
 4619|      0|    case SSL_CTRL_GET_EXTRA_CHAIN_CERTS:
  ------------------
  |  | 1373|      0|#define SSL_CTRL_GET_EXTRA_CHAIN_CERTS 82
  ------------------
  |  Branch (4619:5): [True: 0, False: 4.13k]
  ------------------
 4620|      0|        if (ctx->extra_certs == NULL && larg == 0)
  ------------------
  |  Branch (4620:13): [True: 0, False: 0]
  |  Branch (4620:41): [True: 0, False: 0]
  ------------------
 4621|      0|            *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
 4622|      0|        else
 4623|      0|            *(STACK_OF(X509) **)parg = ctx->extra_certs;
 4624|      0|        break;
 4625|       |
 4626|      0|    case SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS:
  ------------------
  |  | 1374|      0|#define SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS 83
  ------------------
  |  Branch (4626:5): [True: 0, False: 4.13k]
  ------------------
 4627|      0|        OSSL_STACK_OF_X509_free(ctx->extra_certs);
 4628|      0|        ctx->extra_certs = NULL;
 4629|      0|        break;
 4630|       |
 4631|      0|    case SSL_CTRL_CHAIN:
  ------------------
  |  | 1375|      0|#define SSL_CTRL_CHAIN 88
  ------------------
  |  Branch (4631:5): [True: 0, False: 4.13k]
  ------------------
 4632|      0|        if (larg)
  ------------------
  |  Branch (4632:13): [True: 0, False: 0]
  ------------------
 4633|      0|            return ssl_cert_set1_chain(NULL, ctx, (STACK_OF(X509) *)parg);
 4634|      0|        else
 4635|      0|            return ssl_cert_set0_chain(NULL, ctx, (STACK_OF(X509) *)parg);
 4636|       |
 4637|      0|    case SSL_CTRL_CHAIN_CERT:
  ------------------
  |  | 1376|      0|#define SSL_CTRL_CHAIN_CERT 89
  ------------------
  |  Branch (4637:5): [True: 0, False: 4.13k]
  ------------------
 4638|      0|        if (larg)
  ------------------
  |  Branch (4638:13): [True: 0, False: 0]
  ------------------
 4639|      0|            return ssl_cert_add1_chain_cert(NULL, ctx, (X509 *)parg);
 4640|      0|        else
 4641|      0|            return ssl_cert_add0_chain_cert(NULL, ctx, (X509 *)parg);
 4642|       |
 4643|      0|    case SSL_CTRL_GET_CHAIN_CERTS:
  ------------------
  |  | 1396|      0|#define SSL_CTRL_GET_CHAIN_CERTS 115
  ------------------
  |  Branch (4643:5): [True: 0, False: 4.13k]
  ------------------
 4644|      0|        *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
 4645|      0|        break;
 4646|       |
 4647|      0|    case SSL_CTRL_SELECT_CURRENT_CERT:
  ------------------
  |  | 1397|      0|#define SSL_CTRL_SELECT_CURRENT_CERT 116
  ------------------
  |  Branch (4647:5): [True: 0, False: 4.13k]
  ------------------
 4648|      0|        return ssl_cert_select_current(ctx->cert, (X509 *)parg);
 4649|       |
 4650|      0|    case SSL_CTRL_SET_CURRENT_CERT:
  ------------------
  |  | 1398|      0|#define SSL_CTRL_SET_CURRENT_CERT 117
  ------------------
  |  Branch (4650:5): [True: 0, False: 4.13k]
  ------------------
 4651|      0|        return ssl_cert_set_current(ctx->cert, larg);
 4652|       |
 4653|      0|    default:
  ------------------
  |  Branch (4653:5): [True: 0, False: 4.13k]
  ------------------
 4654|      0|        return 0;
 4655|  4.13k|    }
 4656|      0|    return 1;
 4657|  4.13k|}
ssl3_get_cipher_by_id:
 4714|     36|{
 4715|     36|    SSL_CIPHER c;
 4716|     36|    const SSL_CIPHER *cp;
 4717|       |
 4718|     36|    c.id = id;
 4719|     36|    cp = OBJ_bsearch_ssl_cipher_id(&c, tls13_ciphers, TLS13_NUM_CIPHERS);
  ------------------
  |  |   27|     36|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|     36|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4720|     36|    if (cp != NULL)
  ------------------
  |  Branch (4720:9): [True: 3, False: 33]
  ------------------
 4721|      3|        return cp;
 4722|     33|    cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
  ------------------
  |  |   28|     33|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|     33|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4723|     33|    if (cp != NULL)
  ------------------
  |  Branch (4723:9): [True: 9, False: 24]
  ------------------
 4724|      9|        return cp;
 4725|     24|    return OBJ_bsearch_ssl_cipher_id(&c, ssl3_scsvs, SSL3_NUM_SCSVS);
  ------------------
  |  |   29|     24|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|     24|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4726|     33|}
ssl3_get_tls13_cipher_by_std_name:
 4729|  16.4k|{
 4730|  16.4k|    SSL_CIPHER *end = &tls13_ciphers[TLS13_NUM_CIPHERS];
  ------------------
  |  |   27|  16.4k|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|  16.4k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4731|       |
 4732|       |    /* this is not efficient, necessary to optimize this? */
 4733|   101k|    for (SSL_CIPHER *c = tls13_ciphers; c < end; ++c) {
  ------------------
  |  Branch (4733:41): [True: 95.9k, False: 5.97k]
  ------------------
 4734|  95.9k|        if (c->stdname == NULL)
  ------------------
  |  Branch (4734:13): [True: 0, False: 95.9k]
  ------------------
 4735|      0|            continue;
 4736|  95.9k|        if (OPENSSL_strcasecmp(stdname, c->stdname) == 0)
  ------------------
  |  Branch (4736:13): [True: 10.4k, False: 85.4k]
  ------------------
 4737|  10.4k|            return c;
 4738|  95.9k|    }
 4739|  5.97k|    return NULL;
 4740|  16.4k|}
ssl3_get_cipher_by_char:
 4766|     36|{
 4767|     36|    return ssl3_get_cipher_by_id(SSL3_CK_CIPHERSUITE_FLAG
  ------------------
  |  |  262|     36|#define SSL3_CK_CIPHERSUITE_FLAG 0x03000000
  ------------------
 4768|     36|        | ((uint32_t)p[0] << 8L)
 4769|     36|        | (uint32_t)p[1]);
 4770|     36|}
ssl3_put_cipher_by_char:
 4773|  75.6k|{
 4774|  75.6k|    if ((c->id & 0xff000000) != SSL3_CK_CIPHERSUITE_FLAG) {
  ------------------
  |  |  262|  75.6k|#define SSL3_CK_CIPHERSUITE_FLAG 0x03000000
  ------------------
  |  Branch (4774:9): [True: 0, False: 75.6k]
  ------------------
 4775|      0|        *len = 0;
 4776|      0|        return 1;
 4777|      0|    }
 4778|       |
 4779|  75.6k|    if (!WPACKET_put_bytes_u16(pkt, c->id & 0xffff))
  ------------------
  |  |  911|  75.6k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (4779:9): [True: 0, False: 75.6k]
  ------------------
 4780|      0|        return 0;
 4781|       |
 4782|  75.6k|    *len = 2;
 4783|  75.6k|    return 1;
 4784|  75.6k|}
ssl3_renegotiate_check:
 5199|  3.06k|{
 5200|  3.06k|    int ret = 0;
 5201|  3.06k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  3.06k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  3.06k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 3.06k]
  |  |  |  |  ------------------
  |  |  |  |   18|  3.06k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.06k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 3.06k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  3.06k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  3.06k|                             : NULL))
  |  |  ------------------
  ------------------
 5202|       |
 5203|  3.06k|    if (sc == NULL)
  ------------------
  |  Branch (5203:9): [True: 0, False: 3.06k]
  ------------------
 5204|      0|        return 0;
 5205|       |
 5206|  3.06k|    if (sc->s3.renegotiate) {
  ------------------
  |  Branch (5206:9): [True: 0, False: 3.06k]
  ------------------
 5207|      0|        if (!RECORD_LAYER_read_pending(&sc->rlayer)
  ------------------
  |  Branch (5207:13): [True: 0, False: 0]
  ------------------
 5208|      0|            && !RECORD_LAYER_write_pending(&sc->rlayer)
  ------------------
  |  Branch (5208:16): [True: 0, False: 0]
  ------------------
 5209|      0|            && (initok || !SSL_in_init(s))) {
  ------------------
  |  Branch (5209:17): [True: 0, False: 0]
  |  Branch (5209:27): [True: 0, False: 0]
  ------------------
 5210|       |            /*
 5211|       |             * if we are the server, and we have sent a 'RENEGOTIATE'
 5212|       |             * message, we need to set the state machine into the renegotiate
 5213|       |             * state.
 5214|       |             */
 5215|      0|            ossl_statem_set_renegotiate(sc);
 5216|      0|            sc->s3.renegotiate = 0;
 5217|      0|            sc->s3.num_renegotiations++;
 5218|      0|            sc->s3.total_renegotiations++;
 5219|      0|            ret = 1;
 5220|      0|        }
 5221|      0|    }
 5222|  3.06k|    return ret;
 5223|  3.06k|}
ssl_fill_hello_random:
 5256|  2.57k|{
 5257|  2.57k|    int send_time = 0, ret;
 5258|       |
 5259|  2.57k|    if (len < 4)
  ------------------
  |  Branch (5259:9): [True: 0, False: 2.57k]
  ------------------
 5260|      0|        return 0;
 5261|  2.57k|    if (server)
  ------------------
  |  Branch (5261:9): [True: 0, False: 2.57k]
  ------------------
 5262|      0|        send_time = (s->mode & SSL_MODE_SEND_SERVERHELLO_TIME) != 0;
  ------------------
  |  |  544|      0|#define SSL_MODE_SEND_SERVERHELLO_TIME 0x00000040U
  ------------------
 5263|  2.57k|    else
 5264|  2.57k|        send_time = (s->mode & SSL_MODE_SEND_CLIENTHELLO_TIME) != 0;
  ------------------
  |  |  543|  2.57k|#define SSL_MODE_SEND_CLIENTHELLO_TIME 0x00000020U
  ------------------
 5265|  2.57k|    if (send_time) {
  ------------------
  |  Branch (5265:9): [True: 0, False: 2.57k]
  ------------------
 5266|      0|        unsigned long Time = (unsigned long)time(NULL);
 5267|      0|        unsigned char *p = result;
 5268|       |
 5269|      0|        l2n(Time, p);
  ------------------
  |  |  153|      0|#define l2n(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  154|      0|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                \
  |  |  155|      0|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                 \
  |  |  156|      0|    *((c)++) = (unsigned char)(((l)) & 0xff))
  ------------------
 5270|      0|        ret = RAND_bytes_ex(SSL_CONNECTION_GET_CTX(s)->libctx, p, len - 4, 0);
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5271|  2.57k|    } else {
 5272|  2.57k|        ret = RAND_bytes_ex(SSL_CONNECTION_GET_CTX(s)->libctx, result, len, 0);
  ------------------
  |  |   26|  2.57k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5273|  2.57k|    }
 5274|       |
 5275|  2.57k|    if (ret > 0) {
  ------------------
  |  Branch (5275:9): [True: 2.57k, False: 0]
  ------------------
 5276|  2.57k|        if (!ossl_assert(sizeof(tls11downgrade) < len)
  ------------------
  |  |   52|  5.15k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  5.15k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5276:13): [True: 0, False: 2.57k]
  ------------------
 5277|  2.57k|            || !ossl_assert(sizeof(tls12downgrade) < len))
  ------------------
  |  |   52|  2.57k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.57k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5277:16): [True: 0, False: 2.57k]
  ------------------
 5278|      0|            return 0;
 5279|  2.57k|        if (dgrd == DOWNGRADE_TO_1_2)
  ------------------
  |  Branch (5279:13): [True: 0, False: 2.57k]
  ------------------
 5280|      0|            memcpy(result + len - sizeof(tls12downgrade), tls12downgrade,
 5281|      0|                sizeof(tls12downgrade));
 5282|  2.57k|        else if (dgrd == DOWNGRADE_TO_1_1)
  ------------------
  |  Branch (5282:18): [True: 0, False: 2.57k]
  ------------------
 5283|      0|            memcpy(result + len - sizeof(tls11downgrade), tls11downgrade,
 5284|      0|                sizeof(tls11downgrade));
 5285|  2.57k|    }
 5286|       |
 5287|  2.57k|    return ret;
 5288|  2.57k|}
ssl_generate_pkey_group:
 5388|  4.84k|{
 5389|  4.84k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  4.84k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5390|  4.84k|    const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(sctx, id);
 5391|  4.84k|    EVP_PKEY_CTX *pctx = NULL;
 5392|  4.84k|    EVP_PKEY *pkey = NULL;
 5393|       |
 5394|  4.84k|    if (ginf == NULL) {
  ------------------
  |  Branch (5394:9): [True: 0, False: 4.84k]
  ------------------
 5395|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5396|      0|        goto err;
 5397|      0|    }
 5398|       |
 5399|  4.84k|    pctx = EVP_PKEY_CTX_new_from_name(sctx->libctx, ginf->algorithm,
 5400|  4.84k|        sctx->propq);
 5401|       |
 5402|  4.84k|    if (pctx == NULL) {
  ------------------
  |  Branch (5402:9): [True: 0, False: 4.84k]
  ------------------
 5403|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5404|      0|        goto err;
 5405|      0|    }
 5406|  4.84k|    if (EVP_PKEY_keygen_init(pctx) <= 0) {
  ------------------
  |  Branch (5406:9): [True: 0, False: 4.84k]
  ------------------
 5407|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5408|      0|        goto err;
 5409|      0|    }
 5410|  4.84k|    if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
  ------------------
  |  Branch (5410:9): [True: 0, False: 4.84k]
  ------------------
 5411|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5412|      0|        goto err;
 5413|      0|    }
 5414|  4.84k|    if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
  ------------------
  |  Branch (5414:9): [True: 0, False: 4.84k]
  ------------------
 5415|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5416|      0|        EVP_PKEY_free(pkey);
 5417|      0|        pkey = NULL;
 5418|      0|    }
 5419|       |
 5420|  4.84k|err:
 5421|  4.84k|    EVP_PKEY_CTX_free(pctx);
 5422|  4.84k|    return pkey;
 5423|  4.84k|}
s3_lib.c:cipher_compare:
 3756|    982|{
 3757|    982|    const SSL_CIPHER *ap = (const SSL_CIPHER *)a;
 3758|    982|    const SSL_CIPHER *bp = (const SSL_CIPHER *)b;
 3759|       |
 3760|    982|    if (ap->id == bp->id)
  ------------------
  |  Branch (3760:9): [True: 0, False: 982]
  ------------------
 3761|      0|        return 0;
 3762|    982|    return ap->id < bp->id ? -1 : 1;
  ------------------
  |  Branch (3762:12): [True: 629, False: 353]
  ------------------
 3763|    982|}

ssl3_send_alert:
   46|  2.31k|{
   47|  2.31k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
   48|       |
   49|       |    /* Map tls/ssl alert value to correct one */
   50|  2.31k|    if (SSL_CONNECTION_TREAT_AS_TLS13(s))
  ------------------
  |  |  278|  2.31k|    (SSL_CONNECTION_IS_TLS13(s)                                  \
  |  |  ------------------
  |  |  |  |  273|  4.63k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  266|  4.63k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 2196|  2.31k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (273:37): [True: 2.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  274|  2.31k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.63k|#define TLS1_3_VERSION 0x0304
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (274:8): [True: 2.27k, False: 36]
  |  |  |  |  ------------------
  |  |  |  |  275|  4.63k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.27k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|  2.27k|#define TLS_ANY_VERSION 0x10000
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (275:8): [True: 2, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  279|  2.31k|        || (s)->early_data_state == SSL_EARLY_DATA_CONNECTING    \
  |  |  ------------------
  |  |  |  Branch (279:12): [True: 0, False: 2.31k]
  |  |  ------------------
  |  |  280|  2.31k|        || (s)->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY \
  |  |  ------------------
  |  |  |  Branch (280:12): [True: 0, False: 2.31k]
  |  |  ------------------
  |  |  281|  2.31k|        || (s)->early_data_state == SSL_EARLY_DATA_WRITING       \
  |  |  ------------------
  |  |  |  Branch (281:12): [True: 0, False: 2.31k]
  |  |  ------------------
  |  |  282|  2.31k|        || (s)->early_data_state == SSL_EARLY_DATA_WRITE_RETRY   \
  |  |  ------------------
  |  |  |  Branch (282:12): [True: 0, False: 2.31k]
  |  |  ------------------
  |  |  283|  2.31k|        || (s)->hello_retry_request == SSL_HRR_PENDING)
  |  |  ------------------
  |  |  |  Branch (283:12): [True: 1, False: 2.31k]
  |  |  ------------------
  ------------------
   51|      3|        desc = tls13_alert_code(desc);
   52|  2.31k|    else
   53|  2.31k|        desc = ssl->method->ssl3_enc->alert_value(desc);
   54|  2.31k|    if (desc < 0)
  ------------------
  |  Branch (54:9): [True: 0, False: 2.31k]
  ------------------
   55|      0|        return -1;
   56|  2.31k|    if (s->shutdown & SSL_SENT_SHUTDOWN && desc != SSL_AD_CLOSE_NOTIFY)
  ------------------
  |  |  216|  4.63k|#define SSL_SENT_SHUTDOWN 1
  ------------------
                  if (s->shutdown & SSL_SENT_SHUTDOWN && desc != SSL_AD_CLOSE_NOTIFY)
  ------------------
  |  | 1232|      0|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (56:9): [True: 0, False: 2.31k]
  |  Branch (56:44): [True: 0, False: 0]
  ------------------
   57|      0|        return -1;
   58|       |    /* If a fatal one, remove from cache */
   59|  2.31k|    if ((level == SSL3_AL_FATAL) && (s->session != NULL))
  ------------------
  |  |  250|  2.31k|#define SSL3_AL_FATAL 2
  ------------------
  |  Branch (59:9): [True: 2.31k, False: 0]
  |  Branch (59:37): [True: 2.30k, False: 7]
  ------------------
   60|  2.30k|        SSL_CTX_remove_session(s->session_ctx, s->session);
   61|       |
   62|  2.31k|    s->s3.alert_dispatch = SSL_ALERT_DISPATCH_PENDING;
  ------------------
  |  |  322|  2.31k|#define SSL_ALERT_DISPATCH_PENDING 1
  ------------------
   63|  2.31k|    s->s3.send_alert[0] = level;
   64|  2.31k|    s->s3.send_alert[1] = desc;
   65|  2.31k|    if (!RECORD_LAYER_write_pending(&s->rlayer)) {
  ------------------
  |  Branch (65:9): [True: 2.31k, False: 0]
  ------------------
   66|       |        /* data still being written out? */
   67|  2.31k|        return ssl->method->ssl_dispatch_alert(ssl);
   68|  2.31k|    }
   69|       |    /*
   70|       |     * else data is still being written out, we will get written some time in
   71|       |     * the future
   72|       |     */
   73|      0|    return -1;
   74|  2.31k|}
ssl3_dispatch_alert:
   77|  2.31k|{
   78|  2.31k|    int i, j;
   79|  2.31k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
   80|  2.31k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.31k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.31k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.31k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.31k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.31k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
   81|  2.31k|    OSSL_RECORD_TEMPLATE templ;
   82|       |
   83|  2.31k|    if (sc == NULL)
  ------------------
  |  Branch (83:9): [True: 0, False: 2.31k]
  ------------------
   84|      0|        return -1;
   85|       |
   86|  2.31k|    if (sc->rlayer.wrlmethod == NULL) {
  ------------------
  |  Branch (86:9): [True: 0, False: 2.31k]
  ------------------
   87|       |        /* No write record layer so we can't sent and alert. We just ignore it */
   88|      0|        sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_NONE;
  ------------------
  |  |  320|      0|#define SSL_ALERT_DISPATCH_NONE 0
  ------------------
   89|      0|        return 1;
   90|      0|    }
   91|       |
   92|  2.31k|    templ.type = SSL3_RT_ALERT;
  ------------------
  |  |  220|  2.31k|#define SSL3_RT_ALERT 21
  ------------------
   93|  2.31k|    templ.version = (sc->version == TLS1_3_VERSION) ? TLS1_2_VERSION
  ------------------
  |  |   27|  2.31k|#define TLS1_3_VERSION 0x0304
  ------------------
                  templ.version = (sc->version == TLS1_3_VERSION) ? TLS1_2_VERSION
  ------------------
  |  |   26|  2.21k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (93:21): [True: 2.21k, False: 102]
  ------------------
   94|  2.31k|                                                    : sc->version;
   95|  2.31k|    if (SSL_get_state(s) == TLS_ST_CW_CLNT_HELLO
  ------------------
  |  Branch (95:9): [True: 2.16k, False: 152]
  ------------------
   96|  2.16k|        && !sc->renegotiate
  ------------------
  |  Branch (96:12): [True: 2.16k, False: 0]
  ------------------
   97|  2.16k|        && TLS1_get_version(s) > TLS1_VERSION
  ------------------
  |  |   52|  2.16k|    ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
  |  |  ------------------
  |  |  |  |   42|  2.16k|#define TLS1_VERSION_MAJOR 0x03
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 2.16k, False: 0]
  |  |  ------------------
  ------------------
                      && TLS1_get_version(s) > TLS1_VERSION
  ------------------
  |  |   24|  4.47k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (97:12): [True: 2.15k, False: 8]
  ------------------
   98|  2.15k|        && sc->hello_retry_request == SSL_HRR_NONE) {
  ------------------
  |  Branch (98:12): [True: 2.15k, False: 0]
  ------------------
   99|  2.15k|        templ.version = TLS1_VERSION;
  ------------------
  |  |   24|  2.15k|#define TLS1_VERSION 0x0301
  ------------------
  100|  2.15k|    }
  101|  2.31k|    templ.buf = &sc->s3.send_alert[0];
  102|  2.31k|    templ.buflen = 2;
  103|       |
  104|  2.31k|    if (RECORD_LAYER_write_pending(&sc->rlayer)) {
  ------------------
  |  Branch (104:9): [True: 0, False: 2.31k]
  ------------------
  105|      0|        if (sc->s3.alert_dispatch != SSL_ALERT_DISPATCH_RETRY) {
  ------------------
  |  |  324|      0|#define SSL_ALERT_DISPATCH_RETRY 2
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|       |            /*
  107|       |             * We have a write pending but it wasn't from a previous call to
  108|       |             * this function! Can we ever get here? Maybe via API misuse??
  109|       |             * Give up.
  110|       |             */
  111|      0|            sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_NONE;
  ------------------
  |  |  320|      0|#define SSL_ALERT_DISPATCH_NONE 0
  ------------------
  112|      0|            return -1;
  113|      0|        }
  114|       |        /* Retry what we've already got pending */
  115|      0|        i = HANDLE_RLAYER_WRITE_RETURN(sc,
  ------------------
  |  |  168|      0|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  116|      0|            sc->rlayer.wrlmethod->retry_write_records(sc->rlayer.wrl));
  117|      0|        if (i <= 0) {
  ------------------
  |  Branch (117:13): [True: 0, False: 0]
  ------------------
  118|       |            /* Could be NBIO. Keep alert_dispatch as SSL_ALERT_DISPATCH_RETRY */
  119|      0|            return -1;
  120|      0|        }
  121|      0|        sc->rlayer.wpend_tot = 0;
  122|      0|        sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_NONE;
  ------------------
  |  |  320|      0|#define SSL_ALERT_DISPATCH_NONE 0
  ------------------
  123|      0|        return 1;
  124|      0|    }
  125|       |
  126|  2.31k|    i = HANDLE_RLAYER_WRITE_RETURN(sc,
  ------------------
  |  |  168|  2.31k|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  127|  2.31k|        sc->rlayer.wrlmethod->write_records(sc->rlayer.wrl, &templ, 1));
  128|       |
  129|  2.31k|    if (i <= 0) {
  ------------------
  |  Branch (129:9): [True: 0, False: 2.31k]
  ------------------
  130|      0|        sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_RETRY;
  ------------------
  |  |  324|      0|#define SSL_ALERT_DISPATCH_RETRY 2
  ------------------
  131|      0|        sc->rlayer.wpend_tot = templ.buflen;
  132|      0|        sc->rlayer.wpend_type = templ.type;
  133|      0|        sc->rlayer.wpend_buf = templ.buf;
  134|  2.31k|    } else {
  135|       |        /*
  136|       |         * Alert sent to BIO - now flush. If the message does not get sent due
  137|       |         * to non-blocking IO, we will not worry too much.
  138|       |         */
  139|  2.31k|        (void)BIO_flush(sc->wbio);
  ------------------
  |  |  650|  2.31k|#define BIO_flush(b) (int)BIO_ctrl(b, BIO_CTRL_FLUSH, 0, NULL)
  |  |  ------------------
  |  |  |  |  100|  2.31k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  |  |  ------------------
  ------------------
  140|  2.31k|        sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_NONE;
  ------------------
  |  |  320|  2.31k|#define SSL_ALERT_DISPATCH_NONE 0
  ------------------
  141|       |
  142|  2.31k|        if (sc->msg_callback)
  ------------------
  |  Branch (142:13): [True: 0, False: 2.31k]
  ------------------
  143|      0|            sc->msg_callback(1, sc->version, SSL3_RT_ALERT, sc->s3.send_alert,
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  144|      0|                2, s, sc->msg_callback_arg);
  145|       |
  146|  2.31k|        if (sc->info_callback != NULL)
  ------------------
  |  Branch (146:13): [True: 0, False: 2.31k]
  ------------------
  147|      0|            cb = sc->info_callback;
  148|  2.31k|        else if (s->ctx->info_callback != NULL)
  ------------------
  |  Branch (148:18): [True: 0, False: 2.31k]
  ------------------
  149|      0|            cb = s->ctx->info_callback;
  150|       |
  151|  2.31k|        if (cb != NULL) {
  ------------------
  |  Branch (151:13): [True: 0, False: 2.31k]
  ------------------
  152|      0|            j = (sc->s3.send_alert[0] << 8) | sc->s3.send_alert[1];
  153|      0|            cb(s, SSL_CB_WRITE_ALERT, j);
  ------------------
  |  | 1164|      0|#define SSL_CB_WRITE_ALERT (SSL_CB_ALERT | SSL_CB_WRITE)
  |  |  ------------------
  |  |  |  | 1162|      0|#define SSL_CB_ALERT 0x4000 /* used in callback */
  |  |  ------------------
  |  |               #define SSL_CB_WRITE_ALERT (SSL_CB_ALERT | SSL_CB_WRITE)
  |  |  ------------------
  |  |  |  | 1161|      0|#define SSL_CB_WRITE 0x08
  |  |  ------------------
  ------------------
  154|      0|        }
  155|  2.31k|    }
  156|  2.31k|    return i;
  157|  2.31k|}

SSL_get_ex_data_X509_STORE_CTX_idx:
   56|  3.47k|{
   57|       |
   58|  3.47k|    if (!RUN_ONCE(&ssl_x509_store_ctx_once, ssl_x509_store_ctx_init))
  ------------------
  |  |  130|  3.47k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3.47k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (58:9): [True: 0, False: 3.47k]
  ------------------
   59|      0|        return -1;
   60|  3.47k|    return ssl_x509_store_ctx_idx;
   61|  3.47k|}
ssl_cert_new:
   64|  3.47k|{
   65|  3.47k|    CERT *ret = NULL;
   66|       |
   67|       |    /* Should never happen */
   68|  3.47k|    if (!ossl_assert(ssl_pkey_num >= SSL_PKEY_NUM))
  ------------------
  |  |   52|  3.47k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.47k|    __FILE__, __LINE__)
  ------------------
  |  Branch (68:9): [True: 0, False: 3.47k]
  ------------------
   69|      0|        return NULL;
   70|       |
   71|  3.47k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  3.47k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|  3.47k|    if (ret == NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 3.47k]
  ------------------
   73|      0|        return NULL;
   74|       |
   75|  3.47k|    ret->ssl_pkey_num = ssl_pkey_num;
   76|  3.47k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  113|  3.47k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  3.47k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 3.47k]
  ------------------
   78|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|      0|        return NULL;
   80|      0|    }
   81|       |
   82|  3.47k|    ret->key = &(ret->pkeys[SSL_PKEY_RSA]);
  ------------------
  |  |  327|  3.47k|#define SSL_PKEY_RSA 0
  ------------------
   83|  3.47k|    ret->sec_cb = ssl_security_default_callback;
   84|  3.47k|    ret->sec_level = OPENSSL_TLS_SECURITY_LEVEL;
  ------------------
  |  |   31|  3.47k|#define OPENSSL_TLS_SECURITY_LEVEL 2
  ------------------
   85|  3.47k|    ret->sec_ex = NULL;
   86|  3.47k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 3.47k]
  ------------------
   87|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   88|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   89|      0|        return NULL;
   90|      0|    }
   91|       |
   92|  3.47k|    return ret;
   93|  3.47k|}
ssl_cert_dup:
   96|  2.58k|{
   97|  2.58k|    CERT *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  2.58k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   98|  2.58k|    size_t i;
   99|       |#ifndef OPENSSL_NO_COMP_ALG
  100|       |    int j;
  101|       |#endif
  102|       |
  103|  2.58k|    if (ret == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 2.58k]
  ------------------
  104|      0|        return NULL;
  105|       |
  106|  2.58k|    ret->ssl_pkey_num = cert->ssl_pkey_num;
  107|  2.58k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  113|  2.58k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  108|  2.58k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (108:9): [True: 0, False: 2.58k]
  ------------------
  109|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|      0|        return NULL;
  111|      0|    }
  112|       |
  113|  2.58k|    ret->key = &ret->pkeys[cert->key - cert->pkeys];
  114|  2.58k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (114:9): [True: 0, False: 2.58k]
  ------------------
  115|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  116|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|      0|        return NULL;
  118|      0|    }
  119|       |
  120|  2.58k|    if (cert->dh_tmp != NULL) {
  ------------------
  |  Branch (120:9): [True: 0, False: 2.58k]
  ------------------
  121|      0|        if (!EVP_PKEY_up_ref(cert->dh_tmp))
  ------------------
  |  Branch (121:13): [True: 0, False: 0]
  ------------------
  122|      0|            goto err;
  123|      0|        ret->dh_tmp = cert->dh_tmp;
  124|      0|    }
  125|       |
  126|  2.58k|    ret->dh_tmp_cb = cert->dh_tmp_cb;
  127|  2.58k|    ret->dh_tmp_auto = cert->dh_tmp_auto;
  128|       |
  129|  36.2k|    for (i = 0; i < ret->ssl_pkey_num; i++) {
  ------------------
  |  Branch (129:17): [True: 33.6k, False: 2.58k]
  ------------------
  130|  33.6k|        CERT_PKEY *cpk = cert->pkeys + i;
  131|  33.6k|        CERT_PKEY *rpk = ret->pkeys + i;
  132|       |
  133|  33.6k|        if (cpk->x509 != NULL) {
  ------------------
  |  Branch (133:13): [True: 0, False: 33.6k]
  ------------------
  134|      0|            if (!X509_up_ref(cpk->x509))
  ------------------
  |  Branch (134:17): [True: 0, False: 0]
  ------------------
  135|      0|                goto err;
  136|      0|            rpk->x509 = cpk->x509;
  137|      0|        }
  138|       |
  139|  33.6k|        if (cpk->privatekey != NULL) {
  ------------------
  |  Branch (139:13): [True: 0, False: 33.6k]
  ------------------
  140|      0|            if (!EVP_PKEY_up_ref(cpk->privatekey))
  ------------------
  |  Branch (140:17): [True: 0, False: 0]
  ------------------
  141|      0|                goto err;
  142|      0|            rpk->privatekey = cpk->privatekey;
  143|      0|        }
  144|       |
  145|  33.6k|        if (cpk->chain) {
  ------------------
  |  Branch (145:13): [True: 0, False: 33.6k]
  ------------------
  146|      0|            rpk->chain = X509_chain_up_ref(cpk->chain);
  147|      0|            if (!rpk->chain) {
  ------------------
  |  Branch (147:17): [True: 0, False: 0]
  ------------------
  148|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  149|      0|                goto err;
  150|      0|            }
  151|      0|        }
  152|  33.6k|        if (cpk->serverinfo != NULL) {
  ------------------
  |  Branch (152:13): [True: 0, False: 33.6k]
  ------------------
  153|       |            /* Just copy everything. */
  154|      0|            rpk->serverinfo = OPENSSL_memdup(cpk->serverinfo, cpk->serverinfo_length);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  155|      0|            if (rpk->serverinfo == NULL)
  ------------------
  |  Branch (155:17): [True: 0, False: 0]
  ------------------
  156|      0|                goto err;
  157|      0|            rpk->serverinfo_length = cpk->serverinfo_length;
  158|      0|        }
  159|       |#ifndef OPENSSL_NO_COMP_ALG
  160|       |        for (j = TLSEXT_comp_cert_none; j < TLSEXT_comp_cert_limit; j++) {
  161|       |            if (cpk->comp_cert[j] != NULL) {
  162|       |                if (!OSSL_COMP_CERT_up_ref(cpk->comp_cert[j]))
  163|       |                    goto err;
  164|       |                rpk->comp_cert[j] = cpk->comp_cert[j];
  165|       |            }
  166|       |        }
  167|       |#endif
  168|  33.6k|    }
  169|       |
  170|       |    /* Configured sigalgs copied across */
  171|  2.58k|    if (cert->conf_sigalgs) {
  ------------------
  |  Branch (171:9): [True: 0, False: 2.58k]
  ------------------
  172|      0|        ret->conf_sigalgs = OPENSSL_malloc_array(cert->conf_sigalgslen,
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  173|      0|            sizeof(*cert->conf_sigalgs));
  174|      0|        if (ret->conf_sigalgs == NULL)
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|            goto err;
  176|      0|        memcpy(ret->conf_sigalgs, cert->conf_sigalgs,
  177|      0|            cert->conf_sigalgslen * sizeof(*cert->conf_sigalgs));
  178|      0|        ret->conf_sigalgslen = cert->conf_sigalgslen;
  179|      0|    } else
  180|  2.58k|        ret->conf_sigalgs = NULL;
  181|       |
  182|  2.58k|    if (cert->client_sigalgs) {
  ------------------
  |  Branch (182:9): [True: 0, False: 2.58k]
  ------------------
  183|      0|        ret->client_sigalgs = OPENSSL_malloc_array(cert->client_sigalgslen,
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|      0|            sizeof(*cert->client_sigalgs));
  185|      0|        if (ret->client_sigalgs == NULL)
  ------------------
  |  Branch (185:13): [True: 0, False: 0]
  ------------------
  186|      0|            goto err;
  187|      0|        memcpy(ret->client_sigalgs, cert->client_sigalgs,
  188|      0|            cert->client_sigalgslen * sizeof(*cert->client_sigalgs));
  189|      0|        ret->client_sigalgslen = cert->client_sigalgslen;
  190|      0|    } else
  191|  2.58k|        ret->client_sigalgs = NULL;
  192|       |    /* Copy any custom client certificate types */
  193|  2.58k|    if (cert->ctype) {
  ------------------
  |  Branch (193:9): [True: 0, False: 2.58k]
  ------------------
  194|      0|        ret->ctype = OPENSSL_memdup(cert->ctype, cert->ctype_len);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  195|      0|        if (ret->ctype == NULL)
  ------------------
  |  Branch (195:13): [True: 0, False: 0]
  ------------------
  196|      0|            goto err;
  197|      0|        ret->ctype_len = cert->ctype_len;
  198|      0|    }
  199|       |
  200|  2.58k|    ret->cert_flags = cert->cert_flags;
  201|       |
  202|  2.58k|    ret->cert_cb = cert->cert_cb;
  203|  2.58k|    ret->cert_cb_arg = cert->cert_cb_arg;
  204|       |
  205|  2.58k|    if (cert->verify_store) {
  ------------------
  |  Branch (205:9): [True: 0, False: 2.58k]
  ------------------
  206|      0|        if (!X509_STORE_up_ref(cert->verify_store))
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|            goto err;
  208|      0|        ret->verify_store = cert->verify_store;
  209|      0|    }
  210|       |
  211|  2.58k|    if (cert->chain_store) {
  ------------------
  |  Branch (211:9): [True: 0, False: 2.58k]
  ------------------
  212|      0|        if (!X509_STORE_up_ref(cert->chain_store))
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            goto err;
  214|      0|        ret->chain_store = cert->chain_store;
  215|      0|    }
  216|       |
  217|  2.58k|    ret->sec_cb = cert->sec_cb;
  218|  2.58k|    ret->sec_level = cert->sec_level;
  219|  2.58k|    ret->sec_ex = cert->sec_ex;
  220|       |
  221|  2.58k|    if (!custom_exts_copy(&ret->custext, &cert->custext))
  ------------------
  |  Branch (221:9): [True: 0, False: 2.58k]
  ------------------
  222|      0|        goto err;
  223|  2.58k|#ifndef OPENSSL_NO_PSK
  224|  2.58k|    if (cert->psk_identity_hint) {
  ------------------
  |  Branch (224:9): [True: 0, False: 2.58k]
  ------------------
  225|      0|        ret->psk_identity_hint = OPENSSL_strdup(cert->psk_identity_hint);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  226|      0|        if (ret->psk_identity_hint == NULL)
  ------------------
  |  Branch (226:13): [True: 0, False: 0]
  ------------------
  227|      0|            goto err;
  228|      0|    }
  229|  2.58k|#endif
  230|  2.58k|    return ret;
  231|       |
  232|      0|err:
  233|      0|    ssl_cert_free(ret);
  234|       |
  235|       |    return NULL;
  236|  2.58k|}
ssl_cert_clear_certs:
  241|  6.05k|{
  242|  6.05k|    size_t i;
  243|       |#ifndef OPENSSL_NO_COMP_ALG
  244|       |    int j;
  245|       |#endif
  246|       |
  247|  6.05k|    if (c == NULL)
  ------------------
  |  Branch (247:9): [True: 0, False: 6.05k]
  ------------------
  248|      0|        return;
  249|  84.3k|    for (i = 0; i < c->ssl_pkey_num; i++) {
  ------------------
  |  Branch (249:17): [True: 78.2k, False: 6.05k]
  ------------------
  250|  78.2k|        CERT_PKEY *cpk = c->pkeys + i;
  251|  78.2k|        X509_free(cpk->x509);
  252|  78.2k|        cpk->x509 = NULL;
  253|  78.2k|        EVP_PKEY_free(cpk->privatekey);
  254|  78.2k|        cpk->privatekey = NULL;
  255|  78.2k|        OSSL_STACK_OF_X509_free(cpk->chain);
  256|  78.2k|        cpk->chain = NULL;
  257|  78.2k|        OPENSSL_free(cpk->serverinfo);
  ------------------
  |  |  132|  78.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|  78.2k|        cpk->serverinfo = NULL;
  259|  78.2k|        cpk->serverinfo_length = 0;
  260|       |#ifndef OPENSSL_NO_COMP_ALG
  261|       |        for (j = 0; j < TLSEXT_comp_cert_limit; j++) {
  262|       |            OSSL_COMP_CERT_free(cpk->comp_cert[j]);
  263|       |            cpk->comp_cert[j] = NULL;
  264|       |            cpk->cert_comp_used = 0;
  265|       |        }
  266|       |#endif
  267|  78.2k|    }
  268|  6.05k|}
ssl_cert_free:
  271|  6.05k|{
  272|  6.05k|    int i;
  273|       |
  274|  6.05k|    if (c == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 6.05k]
  ------------------
  275|      0|        return;
  276|  6.05k|    CRYPTO_DOWN_REF(&c->references, &i);
  277|  6.05k|    REF_PRINT_COUNT("CERT", i, c);
  ------------------
  |  |  301|  6.05k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  6.05k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  6.05k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  6.05k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|  6.05k|    if (i > 0)
  ------------------
  |  Branch (278:9): [True: 0, False: 6.05k]
  ------------------
  279|      0|        return;
  280|  6.05k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  6.05k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 6.05k]
  |  |  ------------------
  ------------------
  281|       |
  282|  6.05k|    EVP_PKEY_free(c->dh_tmp);
  283|       |
  284|  6.05k|    ssl_cert_clear_certs(c);
  285|  6.05k|    OPENSSL_free(c->conf_sigalgs);
  ------------------
  |  |  132|  6.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  286|  6.05k|    OPENSSL_free(c->client_sigalgs);
  ------------------
  |  |  132|  6.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  287|  6.05k|    OPENSSL_free(c->ctype);
  ------------------
  |  |  132|  6.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  288|  6.05k|    X509_STORE_free(c->verify_store);
  289|  6.05k|    X509_STORE_free(c->chain_store);
  290|  6.05k|    custom_exts_free(&c->custext);
  291|  6.05k|#ifndef OPENSSL_NO_PSK
  292|  6.05k|    OPENSSL_free(c->psk_identity_hint);
  ------------------
  |  |  132|  6.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  293|  6.05k|#endif
  294|  6.05k|    OPENSSL_free(c->pkeys);
  ------------------
  |  |  132|  6.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  295|  6.05k|    CRYPTO_FREE_REF(&c->references);
  296|  6.05k|    OPENSSL_free(c);
  ------------------
  |  |  132|  6.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|  6.05k|}
SSL_get0_CA_list:
  631|  2.43k|{
  632|  2.43k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  2.43k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  2.43k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.43k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.43k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.43k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.43k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.43k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.43k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  633|       |
  634|  2.43k|    if (sc == NULL)
  ------------------
  |  Branch (634:9): [True: 0, False: 2.43k]
  ------------------
  635|      0|        return NULL;
  636|       |
  637|  2.43k|    return sc->ca_names != NULL ? sc->ca_names : s->ctx->ca_names;
  ------------------
  |  Branch (637:12): [True: 0, False: 2.43k]
  ------------------
  638|  2.43k|}
ssl_get_security_level_bits:
 1222|   516k|{
 1223|   516k|    int level;
 1224|       |    /*
 1225|       |     * note that there's a corresponding minbits_table
 1226|       |     * in crypto/x509/x509_vfy.c that's used for checking the security level
 1227|       |     * of RSA and DSA keys
 1228|       |     */
 1229|   516k|    static const int minbits_table[5 + 1] = { 0, 80, 112, 128, 192, 256 };
 1230|       |
 1231|   516k|    if (ctx != NULL)
  ------------------
  |  Branch (1231:9): [True: 0, False: 516k]
  ------------------
 1232|      0|        level = SSL_CTX_get_security_level(ctx);
 1233|   516k|    else
 1234|   516k|        level = SSL_get_security_level(s);
 1235|       |
 1236|   516k|    if (level > 5)
  ------------------
  |  Branch (1236:9): [True: 0, False: 516k]
  ------------------
 1237|      0|        level = 5;
 1238|   516k|    else if (level < 0)
  ------------------
  |  Branch (1238:14): [True: 0, False: 516k]
  ------------------
 1239|      0|        level = 0;
 1240|       |
 1241|   516k|    if (levelp != NULL)
  ------------------
  |  Branch (1241:9): [True: 516k, False: 0]
  ------------------
 1242|   516k|        *levelp = level;
 1243|       |
 1244|   516k|    return minbits_table[level];
 1245|   516k|}
ssl_security:
 1318|   516k|{
 1319|   516k|    return s->cert->sec_cb(SSL_CONNECTION_GET_USER_SSL(s), NULL, op, bits, nid,
  ------------------
  |  |   28|   516k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1320|   516k|        other, s->cert->sec_ex);
 1321|   516k|}
ssl_cert_lookup_by_idx:
 1379|   398k|{
 1380|   398k|    if (idx >= (OSSL_NELEM(ssl_cert_info) + ctx->sigalg_list_len))
  ------------------
  |  |   14|   398k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1380:9): [True: 0, False: 398k]
  ------------------
 1381|      0|        return NULL;
 1382|   398k|    else if (idx >= (OSSL_NELEM(ssl_cert_info)))
  ------------------
  |  |   14|   398k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1382:14): [True: 40.4k, False: 357k]
  ------------------
 1383|  40.4k|        return &(ctx->ssl_cert_info[idx - SSL_PKEY_NUM]);
  ------------------
  |  |  336|  40.4k|#define SSL_PKEY_NUM 9
  ------------------
 1384|   357k|    return &ssl_cert_info[idx];
 1385|   398k|}
ssl_cert.c:ssl_x509_store_ctx_init:
   48|      1|{
   49|      1|    ssl_x509_store_ctx_idx = X509_STORE_CTX_get_ex_new_index(0,
  ------------------
  |  |  781|      1|    CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE_CTX, l, p, newf, dupf, freef)
  |  |  ------------------
  |  |  |  |  256|      1|#define CRYPTO_EX_INDEX_X509_STORE_CTX 5
  |  |  ------------------
  ------------------
   50|      1|        "SSL for verify callback",
   51|      1|        NULL, NULL, NULL);
   52|      1|    return ssl_x509_store_ctx_idx >= 0;
   53|      1|}
ssl_cert.c:ssl_security_default_callback:
 1250|   516k|{
 1251|   516k|    int level, minbits, pfs_mask;
 1252|   516k|    const SSL_CONNECTION *sc;
 1253|       |
 1254|   516k|    minbits = ssl_get_security_level_bits(s, ctx, &level);
 1255|       |
 1256|   516k|    if (level == 0) {
  ------------------
  |  Branch (1256:9): [True: 6.36k, False: 509k]
  ------------------
 1257|       |        /*
 1258|       |         * No EDH keys weaker than 1024-bits even at level 0, otherwise,
 1259|       |         * anything goes.
 1260|       |         */
 1261|  6.36k|        if (op == SSL_SECOP_TMP_DH && bits < 80)
  ------------------
  |  | 2755|  12.7k|#define SSL_SECOP_TMP_DH (7 | SSL_SECOP_OTHER_PKEY)
  |  |  ------------------
  |  |  |  | 2732|  6.36k|#define SSL_SECOP_OTHER_PKEY (4 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1261:13): [True: 0, False: 6.36k]
  |  Branch (1261:39): [True: 0, False: 0]
  ------------------
 1262|      0|            return 0;
 1263|  6.36k|        return 1;
 1264|  6.36k|    }
 1265|   509k|    switch (op) {
 1266|   307k|    case SSL_SECOP_CIPHER_SUPPORTED:
  ------------------
  |  | 2743|   307k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|   307k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1266:5): [True: 307k, False: 202k]
  ------------------
 1267|   307k|    case SSL_SECOP_CIPHER_SHARED:
  ------------------
  |  | 2745|   307k|#define SSL_SECOP_CIPHER_SHARED (2 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|   307k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1267:5): [True: 0, False: 509k]
  ------------------
 1268|   307k|    case SSL_SECOP_CIPHER_CHECK: {
  ------------------
  |  | 2747|   307k|#define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|   307k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1268:5): [True: 8, False: 509k]
  ------------------
 1269|   307k|        const SSL_CIPHER *c = other;
 1270|       |        /* No ciphers below security level */
 1271|   307k|        if (bits < minbits)
  ------------------
  |  Branch (1271:13): [True: 5.91k, False: 301k]
  ------------------
 1272|  5.91k|            return 0;
 1273|       |        /* No unauthenticated ciphersuites */
 1274|   301k|        if (c->algorithm_auth & SSL_aNULL)
  ------------------
  |  |  116|   301k|#define SSL_aNULL 0x00000004U
  ------------------
  |  Branch (1274:13): [True: 4.95k, False: 296k]
  ------------------
 1275|  4.95k|            return 0;
 1276|       |        /* No MD5 mac ciphersuites */
 1277|   296k|        if (c->algorithm_mac & SSL_MD5)
  ------------------
  |  |  174|   296k|#define SSL_MD5 0x00000001U
  ------------------
  |  Branch (1277:13): [True: 0, False: 296k]
  ------------------
 1278|      0|            return 0;
 1279|       |        /* SHA1 HMAC is 160 bits of security */
 1280|   296k|        if (minbits > 160 && c->algorithm_mac & SSL_SHA1)
  ------------------
  |  |  175|  1.64k|#define SSL_SHA1 0x00000002U
  ------------------
  |  Branch (1280:13): [True: 1.64k, False: 294k]
  |  Branch (1280:30): [True: 386, False: 1.25k]
  ------------------
 1281|    386|            return 0;
 1282|       |        /* Level 3: forward secure ciphersuites only */
 1283|   295k|        pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   87|   295k|#define SSL_kDHE 0x00000002U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   89|   295k|#define SSL_kECDHE 0x00000004U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   99|   295k|#define SSL_kDHEPSK 0x00000100U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   98|   295k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
 1284|   295k|        if (level >= 3 && c->min_tls != TLS1_3_VERSION && !(c->algorithm_mkey & pfs_mask))
  ------------------
  |  |   27|   298k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1284:13): [True: 2.16k, False: 293k]
  |  Branch (1284:27): [True: 2.00k, False: 164]
  |  Branch (1284:59): [True: 423, False: 1.58k]
  ------------------
 1285|    423|            return 0;
 1286|   295k|        break;
 1287|   295k|    }
 1288|   295k|    case SSL_SECOP_VERSION:
  ------------------
  |  | 2757|  63.3k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|  63.3k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1288:5): [True: 63.3k, False: 446k]
  ------------------
 1289|  63.3k|        if ((sc = SSL_CONNECTION_FROM_CONST_SSL(s)) == NULL)
  ------------------
  |  |   41|  63.3k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  63.3k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 63.3k]
  |  |  |  |  ------------------
  |  |  |  |   33|  63.3k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  63.3k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 63.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  63.3k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  63.3k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  |  Branch (1289:13): [True: 0, False: 63.3k]
  ------------------
 1290|      0|            return 0;
 1291|  63.3k|        if (!SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  266|  63.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  63.3k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  63.3k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (1291:13): [True: 63.3k, False: 0]
  ------------------
 1292|       |            /* SSLv3, TLS v1.0 and TLS v1.1 only allowed at level 0 */
 1293|  63.3k|            if (nid <= TLS1_1_VERSION && level > 0)
  ------------------
  |  |   25|   126k|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1293:17): [True: 5.42k, False: 57.9k]
  |  Branch (1293:42): [True: 5.42k, False: 0]
  ------------------
 1294|  5.42k|                return 0;
 1295|  63.3k|        } else {
 1296|       |            /* DTLS v1.0 only allowed at level 0 */
 1297|      0|            if (DTLS_VERSION_LT(nid, DTLS1_2_VERSION) && level > 0)
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1297:58): [True: 0, False: 0]
  ------------------
 1298|      0|                return 0;
 1299|      0|        }
 1300|  57.9k|        break;
 1301|       |
 1302|  57.9k|    case SSL_SECOP_COMPRESSION:
  ------------------
  |  | 2769|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1302:5): [True: 0, False: 509k]
  ------------------
 1303|      0|        if (level >= 2)
  ------------------
  |  Branch (1303:13): [True: 0, False: 0]
  ------------------
 1304|      0|            return 0;
 1305|      0|        break;
 1306|      0|    case SSL_SECOP_TICKET:
  ------------------
  |  | 2759|      0|#define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1306:5): [True: 0, False: 509k]
  ------------------
 1307|      0|        if (level >= 3)
  ------------------
  |  Branch (1307:13): [True: 0, False: 0]
  ------------------
 1308|      0|            return 0;
 1309|      0|        break;
 1310|   139k|    default:
  ------------------
  |  Branch (1310:5): [True: 139k, False: 370k]
  ------------------
 1311|   139k|        if (bits < minbits)
  ------------------
  |  Branch (1311:13): [True: 8.54k, False: 130k]
  ------------------
 1312|  8.54k|            return 0;
 1313|   509k|    }
 1314|   484k|    return 1;
 1315|   509k|}

ssl_load_ciphers:
  278|  3.47k|{
  279|  3.47k|    size_t i;
  280|  3.47k|    const ssl_cipher_table *t;
  281|  3.47k|    EVP_KEYEXCH *kex = NULL;
  282|  3.47k|    EVP_SIGNATURE *sig = NULL;
  283|       |
  284|  3.47k|    ctx->disabled_enc_mask = 0;
  285|  93.6k|    for (i = 0, t = ssl_cipher_table_cipher; i < SSL_ENC_NUM_IDX; i++, t++) {
  ------------------
  |  |  364|  93.6k|#define SSL_ENC_NUM_IDX 26
  ------------------
  |  Branch (285:46): [True: 90.2k, False: 3.47k]
  ------------------
  286|  90.2k|        if (t->nid != NID_undef) {
  ------------------
  |  |   18|  90.2k|#define NID_undef                       0
  ------------------
  |  Branch (286:13): [True: 86.7k, False: 3.47k]
  ------------------
  287|  86.7k|            const EVP_CIPHER *cipher = ssl_evp_cipher_fetch(ctx->libctx,
  288|  86.7k|                OBJ_nid2sn(t->nid),
  289|  86.7k|                ctx->propq);
  290|       |
  291|  86.7k|            ctx->ssl_cipher_methods[i] = cipher;
  292|  86.7k|            if (cipher == NULL)
  ------------------
  |  Branch (292:17): [True: 33.0k, False: 53.7k]
  ------------------
  293|  33.0k|                ctx->disabled_enc_mask |= t->mask;
  294|  86.7k|        }
  295|  90.2k|    }
  296|  3.47k|    ctx->disabled_mac_mask = 0;
  297|  55.5k|    for (i = 0, t = ssl_cipher_table_mac; i < SSL_MD_NUM_IDX; i++, t++) {
  ------------------
  |  |  210|  55.5k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|  55.5k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (297:43): [True: 52.0k, False: 3.47k]
  ------------------
  298|       |        /*
  299|       |         * We ignore any errors from the fetch below. It is expected to fail
  300|       |         * if these algorithms are not available.
  301|       |         */
  302|  52.0k|        ERR_set_mark();
  303|  52.0k|        const EVP_MD *md = EVP_MD_fetch(ctx->libctx,
  304|  52.0k|            OBJ_nid2sn(t->nid),
  305|  52.0k|            ctx->propq);
  306|  52.0k|        ERR_pop_to_mark();
  307|       |
  308|  52.0k|        ctx->ssl_digest_methods[i] = md;
  309|  52.0k|        if (md == NULL) {
  ------------------
  |  Branch (309:13): [True: 25.1k, False: 26.8k]
  ------------------
  310|  25.1k|            ctx->disabled_mac_mask |= t->mask;
  311|  26.8k|        } else {
  312|  26.8k|            int tmpsize = EVP_MD_get_size(md);
  313|       |
  314|  26.8k|            if (!ossl_assert(tmpsize > 0))
  ------------------
  |  |   52|  26.8k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  26.8k|    __FILE__, __LINE__)
  ------------------
  |  Branch (314:17): [True: 0, False: 26.8k]
  ------------------
  315|      0|                return 0;
  316|  26.8k|            ctx->ssl_mac_secret_size[i] = tmpsize;
  317|  26.8k|        }
  318|  52.0k|    }
  319|       |
  320|  3.47k|    ctx->disabled_mkey_mask = 0;
  321|  3.47k|    ctx->disabled_auth_mask = 0;
  322|       |
  323|       |    /*
  324|       |     * We ignore any errors from the fetches below. They are expected to fail
  325|       |     * if these algorithms are not available.
  326|       |     */
  327|  3.47k|    ERR_set_mark();
  328|  3.47k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "DSA", ctx->propq);
  329|  3.47k|    if (sig == NULL)
  ------------------
  |  Branch (329:9): [True: 113, False: 3.35k]
  ------------------
  330|    113|        ctx->disabled_auth_mask |= SSL_aDSS;
  ------------------
  |  |  114|    113|#define SSL_aDSS 0x00000002U
  ------------------
  331|  3.35k|    else
  332|  3.35k|        EVP_SIGNATURE_free(sig);
  333|  3.47k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "DH", ctx->propq);
  334|  3.47k|    if (kex == NULL)
  ------------------
  |  Branch (334:9): [True: 113, False: 3.35k]
  ------------------
  335|    113|        ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   87|    113|#define SSL_kDHE 0x00000002U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   99|    113|#define SSL_kDHEPSK 0x00000100U
  ------------------
  336|  3.35k|    else
  337|  3.35k|        EVP_KEYEXCH_free(kex);
  338|  3.47k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "ECDH", ctx->propq);
  339|  3.47k|    if (kex == NULL)
  ------------------
  |  Branch (339:9): [True: 113, False: 3.35k]
  ------------------
  340|    113|        ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   89|    113|#define SSL_kECDHE 0x00000004U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   98|    113|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  341|  3.35k|    else
  342|  3.35k|        EVP_KEYEXCH_free(kex);
  343|  3.47k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "ECDSA", ctx->propq);
  344|  3.47k|    if (sig == NULL)
  ------------------
  |  Branch (344:9): [True: 113, False: 3.35k]
  ------------------
  345|    113|        ctx->disabled_auth_mask |= SSL_aECDSA;
  ------------------
  |  |  118|    113|#define SSL_aECDSA 0x00000008U
  ------------------
  346|  3.35k|    else
  347|  3.35k|        EVP_SIGNATURE_free(sig);
  348|  3.47k|    ERR_pop_to_mark();
  349|       |
  350|       |#ifdef OPENSSL_NO_PSK
  351|       |    ctx->disabled_mkey_mask |= SSL_PSK;
  352|       |    ctx->disabled_auth_mask |= SSL_aPSK;
  353|       |#endif
  354|       |#ifdef OPENSSL_NO_SRP
  355|       |    ctx->disabled_mkey_mask |= SSL_kSRP;
  356|       |#endif
  357|       |
  358|       |    /*
  359|       |     * Check for presence of GOST 34.10 algorithms, and if they are not
  360|       |     * present, disable appropriate auth and key exchange
  361|       |     */
  362|  3.47k|    memcpy(ctx->ssl_mac_pkey_id, default_mac_pkey_id,
  363|  3.47k|        sizeof(ctx->ssl_mac_pkey_id));
  364|       |
  365|  3.47k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX] = 0;
  ------------------
  |  |  196|  3.47k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  366|  3.47k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX])
  ------------------
  |  |  196|  3.47k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  |  Branch (366:9): [True: 0, False: 3.47k]
  ------------------
  367|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC_IDX] = 32;
  ------------------
  |  |  196|      0|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  368|  3.47k|    else
  369|  3.47k|        ctx->disabled_mac_mask |= SSL_GOST89MAC;
  ------------------
  |  |  177|  3.47k|#define SSL_GOST89MAC 0x00000008U
  ------------------
  370|       |
  371|  3.47k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX] = 0;
  ------------------
  |  |  200|  3.47k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  372|  3.47k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX])
  ------------------
  |  |  200|  3.47k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  |  Branch (372:9): [True: 0, False: 3.47k]
  ------------------
  373|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC12_IDX] = 32;
  ------------------
  |  |  200|      0|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  374|  3.47k|    else
  375|  3.47k|        ctx->disabled_mac_mask |= SSL_GOST89MAC12;
  ------------------
  |  |  183|  3.47k|#define SSL_GOST89MAC12 0x00000100U
  ------------------
  376|       |
  377|  3.47k|    ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX] = 0;
  ------------------
  |  |  205|  3.47k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  378|  3.47k|    if (ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX])
  ------------------
  |  |  205|  3.47k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  |  Branch (378:9): [True: 0, False: 3.47k]
  ------------------
  379|      0|        ctx->ssl_mac_secret_size[SSL_MD_MAGMAOMAC_IDX] = 32;
  ------------------
  |  |  205|      0|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  380|  3.47k|    else
  381|  3.47k|        ctx->disabled_mac_mask |= SSL_MAGMAOMAC;
  ------------------
  |  |  185|  3.47k|#define SSL_MAGMAOMAC 0x00000400U
  ------------------
  382|       |
  383|  3.47k|    ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX] = 0;
  ------------------
  |  |  206|  3.47k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  384|  3.47k|    if (ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX])
  ------------------
  |  |  206|  3.47k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  |  Branch (384:9): [True: 0, False: 3.47k]
  ------------------
  385|      0|        ctx->ssl_mac_secret_size[SSL_MD_KUZNYECHIKOMAC_IDX] = 32;
  ------------------
  |  |  206|      0|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  386|  3.47k|    else
  387|  3.47k|        ctx->disabled_mac_mask |= SSL_KUZNYECHIKOMAC;
  ------------------
  |  |  186|  3.47k|#define SSL_KUZNYECHIKOMAC 0x00000800U
  ------------------
  388|       |
  389|  3.47k|    ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  122|  3.47k|#define SSL_aGOST01 0x00000020U
  ------------------
                  ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  126|  3.47k|#define SSL_aGOST12 0x00000080U
  ------------------
  390|  3.47k|    ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  126|  3.47k|#define SSL_aGOST12 0x00000080U
  ------------------
  391|  3.47k|    ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  126|  3.47k|#define SSL_aGOST12 0x00000080U
  ------------------
  392|       |    /*
  393|       |     * Disable GOST key exchange if no GOST signature algs are available *
  394|       |     */
  395|  3.47k|    if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  3.47k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  126|  3.47k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  3.47k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  126|  3.47k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (395:9): [True: 3.47k, False: 0]
  ------------------
  396|  3.47k|        ctx->disabled_mkey_mask |= SSL_kGOST;
  ------------------
  |  |   93|  3.47k|#define SSL_kGOST 0x00000010U
  ------------------
  397|       |
  398|  3.47k|    if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  126|  3.47k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  126|  3.47k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (398:9): [True: 3.47k, False: 0]
  ------------------
  399|  3.47k|        ctx->disabled_mkey_mask |= SSL_kGOST18;
  ------------------
  |  |  101|  3.47k|#define SSL_kGOST18 0x00000200U
  ------------------
  400|       |
  401|  3.47k|    return 1;
  402|  3.47k|}
ssl_md:
  551|  90.2k|{
  552|  90.2k|    idx &= SSL_HANDSHAKE_MAC_MASK;
  ------------------
  |  |  215|  90.2k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
  553|  90.2k|    if (idx < 0 || idx >= SSL_MD_NUM_IDX)
  ------------------
  |  |  210|  90.2k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|  90.2k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (553:9): [True: 0, False: 90.2k]
  |  Branch (553:20): [True: 0, False: 90.2k]
  ------------------
  554|      0|        return NULL;
  555|  90.2k|    return ctx->ssl_digest_methods[idx];
  556|  90.2k|}
SSL_CTX_set_ciphersuites:
 1352|  3.59k|{
 1353|  3.59k|    int ret = set_ciphersuites(&(ctx->tls13_ciphersuites), str);
 1354|       |
 1355|  3.59k|    if (ret && ctx->cipher_list != NULL)
  ------------------
  |  Branch (1355:9): [True: 3.52k, False: 70]
  |  Branch (1355:16): [True: 59, False: 3.47k]
  ------------------
 1356|     59|        return update_cipher_list(ctx, &ctx->cipher_list, &ctx->cipher_list_by_id,
 1357|     59|            ctx->tls13_ciphersuites);
 1358|       |
 1359|  3.54k|    return ret;
 1360|  3.59k|}
ssl_create_cipher_list:
 1391|  4.32k|{
 1392|  4.32k|    int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases, i;
 1393|  4.32k|    uint32_t disabled_mkey, disabled_auth, disabled_enc, disabled_mac;
 1394|  4.32k|    STACK_OF(SSL_CIPHER) *cipherstack;
  ------------------
  |  |   33|  4.32k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1395|  4.32k|    const char *rule_p;
 1396|  4.32k|    CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr;
 1397|  4.32k|    const SSL_CIPHER **ca_list = NULL;
 1398|  4.32k|    const SSL_METHOD *ssl_method = ctx->method;
 1399|       |
 1400|       |    /*
 1401|       |     * Return with error if nothing to do.
 1402|       |     */
 1403|  4.32k|    if (rule_str == NULL || cipher_list == NULL || cipher_list_by_id == NULL)
  ------------------
  |  Branch (1403:9): [True: 0, False: 4.32k]
  |  Branch (1403:29): [True: 0, False: 4.32k]
  |  Branch (1403:52): [True: 0, False: 4.32k]
  ------------------
 1404|      0|        return NULL;
 1405|       |
 1406|  4.32k|    if (!check_suiteb_cipher_list(ssl_method, c, &rule_str))
  ------------------
  |  Branch (1406:9): [True: 0, False: 4.32k]
  ------------------
 1407|      0|        return NULL;
 1408|       |
 1409|       |    /*
 1410|       |     * To reduce the work to do we only want to process the compiled
 1411|       |     * in algorithms, so we first get the mask of disabled ciphers.
 1412|       |     */
 1413|       |
 1414|  4.32k|    disabled_mkey = ctx->disabled_mkey_mask;
 1415|  4.32k|    disabled_auth = ctx->disabled_auth_mask;
 1416|  4.32k|    disabled_enc = ctx->disabled_enc_mask;
 1417|  4.32k|    disabled_mac = ctx->disabled_mac_mask;
 1418|       |
 1419|       |    /*
 1420|       |     * Now we have to collect the available ciphers from the compiled
 1421|       |     * in ciphers. We cannot get more than the number compiled in, so
 1422|       |     * it is used for allocation.
 1423|       |     */
 1424|  4.32k|    num_of_ciphers = ssl_method->num_ciphers();
 1425|       |
 1426|  4.32k|    if (num_of_ciphers > 0) {
  ------------------
  |  Branch (1426:9): [True: 4.32k, False: 0]
  ------------------
 1427|  4.32k|        co_list = OPENSSL_malloc_array(num_of_ciphers, sizeof(*co_list));
  ------------------
  |  |  111|  4.32k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1428|  4.32k|        if (co_list == NULL)
  ------------------
  |  Branch (1428:13): [True: 0, False: 4.32k]
  ------------------
 1429|      0|            return NULL; /* Failure */
 1430|  4.32k|    }
 1431|       |
 1432|  4.32k|    ssl_cipher_collect_ciphers(ssl_method, num_of_ciphers,
 1433|  4.32k|        disabled_mkey, disabled_auth, disabled_enc,
 1434|  4.32k|        disabled_mac, co_list, &head, &tail);
 1435|       |
 1436|       |    /* Now arrange all ciphers by preference. */
 1437|       |
 1438|       |    /*
 1439|       |     * Everything else being equal, prefer ephemeral ECDH over other key
 1440|       |     * exchange mechanisms.
 1441|       |     * For consistency, prefer ECDSA over RSA (though this only matters if the
 1442|       |     * server has both certificates, and is using the DEFAULT, or a client
 1443|       |     * preference).
 1444|       |     */
 1445|  4.32k|    ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |   89|  4.32k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  118|  4.32k|#define SSL_aECDSA 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  141|  4.32k|#define CIPHER_ADD 1
  ------------------
 1446|  4.32k|        -1, &head, &tail);
 1447|  4.32k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |   89|  4.32k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |  141|  4.32k|#define CIPHER_ADD 1
  ------------------
 1448|  4.32k|        &tail);
 1449|  4.32k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |   89|  4.32k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |  143|  4.32k|#define CIPHER_DEL 3
  ------------------
 1450|  4.32k|        &tail);
 1451|       |
 1452|       |    /* Within each strength group, we prefer GCM over CHACHA... */
 1453|  4.32k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  161|  4.32k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  146|  4.32k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  147|  4.32k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  141|  4.32k|#define CIPHER_ADD 1
  ------------------
 1454|  4.32k|        &head, &tail);
 1455|  4.32k|    ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  165|  4.32k|#define SSL_CHACHA20 (SSL_CHACHA20POLY1305)
  |  |  ------------------
  |  |  |  |  153|  4.32k|#define SSL_CHACHA20POLY1305 0x00080000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  141|  4.32k|#define CIPHER_ADD 1
  ------------------
 1456|  4.32k|        &head, &tail);
 1457|       |
 1458|       |    /*
 1459|       |     * ...and generally, our preferred cipher is AES.
 1460|       |     * Note that AEADs will be bumped to take preference after sorting by
 1461|       |     * strength.
 1462|       |     */
 1463|  4.32k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  163|  4.32k|#define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  140|  4.32k|#define SSL_AES128 0x00000040U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  141|  4.32k|#define SSL_AES256 0x00000080U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  161|  4.32k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  4.32k|#define SSL_AES128GCM 0x00001000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  4.32k|#define SSL_AES256GCM 0x00002000U
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  162|  4.32k|#define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  148|  4.32k|#define SSL_AES128CCM 0x00004000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  149|  4.32k|#define SSL_AES256CCM 0x00008000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|  4.32k|#define SSL_AES128CCM8 0x00010000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  151|  4.32k|#define SSL_AES256CCM8 0x00020000U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  161|  4.32k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  146|  4.32k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  147|  4.32k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  141|  4.32k|#define CIPHER_ADD 1
  ------------------
 1464|  4.32k|        -1, &head, &tail);
 1465|       |
 1466|       |    /* Temporarily enable everything else for sorting */
 1467|  4.32k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head, &tail);
  ------------------
  |  |  141|  4.32k|#define CIPHER_ADD 1
  ------------------
 1468|       |
 1469|       |    /* Low priority for MD5 */
 1470|  4.32k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  174|  4.32k|#define SSL_MD5 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  4.32k|#define CIPHER_ORD 4
  ------------------
 1471|  4.32k|        &tail);
 1472|       |
 1473|       |    /*
 1474|       |     * Move anonymous ciphers to the end.  Usually, these will remain
 1475|       |     * disabled. (For applications that allow them, they aren't too bad, but
 1476|       |     * we prefer authenticated ciphers.)
 1477|       |     */
 1478|  4.32k|    ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  116|  4.32k|#define SSL_aNULL 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  4.32k|#define CIPHER_ORD 4
  ------------------
 1479|  4.32k|        &tail);
 1480|       |
 1481|  4.32k|    ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   85|  4.32k|#define SSL_kRSA 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  4.32k|#define CIPHER_ORD 4
  ------------------
 1482|  4.32k|        &tail);
 1483|  4.32k|    ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   91|  4.32k|#define SSL_kPSK 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  4.32k|#define CIPHER_ORD 4
  ------------------
 1484|  4.32k|        &tail);
 1485|       |
 1486|       |    /* RC4 is sort-of broken -- move to the end */
 1487|  4.32k|    ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  136|  4.32k|#define SSL_RC4 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  4.32k|#define CIPHER_ORD 4
  ------------------
 1488|  4.32k|        &tail);
 1489|       |
 1490|       |    /*
 1491|       |     * Now sort by symmetric encryption strength.  The above ordering remains
 1492|       |     * in force within each class
 1493|       |     */
 1494|  4.32k|    if (!ssl_cipher_strength_sort(&head, &tail)) {
  ------------------
  |  Branch (1494:9): [True: 0, False: 4.32k]
  ------------------
 1495|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1496|      0|        return NULL;
 1497|      0|    }
 1498|       |
 1499|       |    /*
 1500|       |     * Partially overrule strength sort to prefer TLS 1.2 ciphers/PRFs.
 1501|       |     */
 1502|  4.32k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |   26|  4.32k|#define TLS1_2_VERSION 0x0303
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  150|  4.32k|#define CIPHER_BUMP 6
  ------------------
 1503|  4.32k|        &head, &tail);
 1504|       |
 1505|       |    /*
 1506|       |     * Irrespective of strength, enforce the following order:
 1507|       |     * (EC)DHE + AEAD > (EC)DHE > rest of AEAD > rest.
 1508|       |     * Within each group, ciphers remain sorted by strength and previous
 1509|       |     * preference, i.e.,
 1510|       |     * 1) ECDHE > DHE
 1511|       |     * 2) GCM > CHACHA
 1512|       |     * 3) AES > rest
 1513|       |     * 4) TLS 1.2 > legacy
 1514|       |     *
 1515|       |     * Because we now bump ciphers to the top of the list, we proceed in
 1516|       |     * reverse order of preference.
 1517|       |     */
 1518|  4.32k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  181|  4.32k|#define SSL_AEAD 0x00000040U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  150|  4.32k|#define CIPHER_BUMP 6
  ------------------
 1519|  4.32k|        &head, &tail);
 1520|  4.32k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   87|  4.32k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   89|  4.32k|#define SSL_kECDHE 0x00000004U
  ------------------
 1521|  4.32k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  150|  4.32k|#define CIPHER_BUMP 6
  ------------------
 1522|  4.32k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   87|  4.32k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   89|  4.32k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |  181|  4.32k|#define SSL_AEAD 0x00000040U
  ------------------
 1523|  4.32k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  150|  4.32k|#define CIPHER_BUMP 6
  ------------------
 1524|       |
 1525|       |    /* Now disable everything (maintaining the ordering!) */
 1526|  4.32k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head, &tail);
  ------------------
  |  |  143|  4.32k|#define CIPHER_DEL 3
  ------------------
 1527|       |
 1528|       |    /*
 1529|       |     * We also need cipher aliases for selecting based on the rule_str.
 1530|       |     * There might be two types of entries in the rule_str: 1) names
 1531|       |     * of ciphers themselves 2) aliases for groups of ciphers.
 1532|       |     * For 1) we need the available ciphers and for 2) the cipher
 1533|       |     * groups of cipher_aliases added together in one list (otherwise
 1534|       |     * we would be happy with just the cipher_aliases table).
 1535|       |     */
 1536|  4.32k|    num_of_group_aliases = OSSL_NELEM(cipher_aliases);
  ------------------
  |  |   14|  4.32k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1537|  4.32k|    num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1;
 1538|  4.32k|    ca_list = OPENSSL_malloc_array(num_of_alias_max, sizeof(*ca_list));
  ------------------
  |  |  111|  4.32k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1539|  4.32k|    if (ca_list == NULL) {
  ------------------
  |  Branch (1539:9): [True: 0, False: 4.32k]
  ------------------
 1540|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1541|      0|        return NULL; /* Failure */
 1542|      0|    }
 1543|  4.32k|    ssl_cipher_collect_aliases(ca_list, num_of_group_aliases,
 1544|  4.32k|        disabled_mkey, disabled_auth, disabled_enc,
 1545|  4.32k|        disabled_mac, head);
 1546|       |
 1547|       |    /*
 1548|       |     * If the rule_string begins with DEFAULT, apply the default rule
 1549|       |     * before using the (possibly available) additional rules.
 1550|       |     */
 1551|  4.32k|    ok = 1;
 1552|  4.32k|    rule_p = rule_str;
 1553|  4.32k|    if (HAS_CASE_PREFIX(rule_str, "DEFAULT")) {
  ------------------
  |  |   63|  4.32k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 21, False: 4.30k]
  |  |  ------------------
  ------------------
 1554|     21|        ok = ssl_cipher_process_rulestr(OSSL_default_cipher_list(),
 1555|     21|            &head, &tail, ca_list, c);
 1556|     21|        rule_p += 7;
 1557|     21|        if (*rule_p == ':')
  ------------------
  |  Branch (1557:13): [True: 1, False: 20]
  ------------------
 1558|      1|            rule_p++;
 1559|     21|    }
 1560|       |
 1561|  4.32k|    if (ok && (rule_p[0] != '\0'))
  ------------------
  |  Branch (1561:9): [True: 4.32k, False: 0]
  |  Branch (1561:15): [True: 4.32k, False: 5]
  ------------------
 1562|  4.32k|        ok = ssl_cipher_process_rulestr(rule_p, &head, &tail, ca_list, c);
 1563|       |
 1564|  4.32k|    OPENSSL_free(ca_list); /* Not needed anymore */
  ------------------
  |  |  132|  4.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1565|       |
 1566|  4.32k|    if (!ok) { /* Rule processing failure */
  ------------------
  |  Branch (1566:9): [True: 355, False: 3.97k]
  ------------------
 1567|    355|        OPENSSL_free(co_list);
  ------------------
  |  |  132|    355|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1568|    355|        return NULL;
 1569|    355|    }
 1570|       |
 1571|       |    /*
 1572|       |     * Allocate new "cipherstack" for the result, return with error
 1573|       |     * if we cannot get one.
 1574|       |     */
 1575|  3.97k|    if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL) {
  ------------------
  |  | 1031|  3.97k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
  |  Branch (1575:9): [True: 0, False: 3.97k]
  ------------------
 1576|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1577|      0|        return NULL;
 1578|      0|    }
 1579|       |
 1580|       |    /* Add TLSv1.3 ciphers first - we always prefer those if possible */
 1581|  15.8k|    for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++) {
  ------------------
  |  | 1028|  15.8k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1581:17): [True: 11.9k, False: 3.97k]
  ------------------
 1582|  11.9k|        const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
  ------------------
  |  | 1029|  11.9k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 1583|       |
 1584|       |        /* Don't include any TLSv1.3 ciphers that are disabled */
 1585|  11.9k|        if ((sslc->algorithm_enc & disabled_enc) != 0
  ------------------
  |  Branch (1585:13): [True: 339, False: 11.5k]
  ------------------
 1586|  11.5k|            || (ssl_cipher_table_mac[sslc->algorithm2
  ------------------
  |  Branch (1586:16): [True: 0, False: 11.5k]
  ------------------
 1587|  11.5k|                    & SSL_HANDSHAKE_MAC_MASK]
  ------------------
  |  |  215|  11.5k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
 1588|  11.5k|                       .mask
 1589|  11.5k|                   & ctx->disabled_mac_mask)
 1590|  11.5k|                != 0) {
 1591|    339|            sk_SSL_CIPHER_delete(tls13_ciphersuites, i);
  ------------------
  |  | 1036|    339|#define sk_SSL_CIPHER_delete(sk, i) ((const SSL_CIPHER *)OPENSSL_sk_delete(ossl_check_SSL_CIPHER_sk_type(sk), (i)))
  ------------------
 1592|    339|            i--;
 1593|    339|            continue;
 1594|    339|        }
 1595|       |
 1596|  11.5k|        if (!sk_SSL_CIPHER_push(cipherstack, sslc)) {
  ------------------
  |  | 1038|  11.5k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1596:13): [True: 0, False: 11.5k]
  ------------------
 1597|      0|            OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1598|      0|            sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1599|      0|            return NULL;
 1600|      0|        }
 1601|  11.5k|    }
 1602|       |
 1603|  3.97k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  219|  3.97k|    do {                           \
  |  |  220|  3.97k|        BIO *trc_out = NULL;       \
  |  |  221|  3.97k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 3.97k]
  |  |  ------------------
  ------------------
 1604|      0|    {
 1605|      0|        BIO_printf(trc_out, "cipher selection:\n");
 1606|      0|    }
 1607|       |    /*
 1608|       |     * The cipher selection for the list is done. The ciphers are added
 1609|       |     * to the resulting precedence to the STACK_OF(SSL_CIPHER).
 1610|       |     */
 1611|   269k|    for (curr = head; curr != NULL; curr = curr->next) {
  ------------------
  |  Branch (1611:23): [True: 265k, False: 3.97k]
  ------------------
 1612|   265k|        if (curr->active) {
  ------------------
  |  Branch (1612:13): [True: 208k, False: 57.8k]
  ------------------
 1613|   208k|            if (!sk_SSL_CIPHER_push(cipherstack, curr->cipher)) {
  ------------------
  |  | 1038|   208k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1613:17): [True: 0, False: 208k]
  ------------------
 1614|      0|                OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1615|      0|                sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1616|      0|                OSSL_TRACE_CANCEL(TLS_CIPHER);
  ------------------
  |  |  228|      0|    ((void)0)
  ------------------
 1617|      0|                return NULL;
 1618|      0|            }
 1619|   208k|            if (trc_out != NULL)
  ------------------
  |  Branch (1619:17): [True: 0, False: 208k]
  ------------------
 1620|      0|                BIO_printf(trc_out, "<%s>\n", curr->cipher->name);
 1621|   208k|        }
 1622|   265k|    }
 1623|  3.97k|    OPENSSL_free(co_list); /* Not needed any longer */
  ------------------
  |  |  132|  3.97k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1624|  3.97k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  224|  3.97k|    }                            \
  |  |  225|  3.97k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 3.97k]
  |  |  ------------------
  ------------------
 1625|       |
 1626|  3.97k|    if (!update_cipher_list_by_id(cipher_list_by_id, cipherstack)) {
  ------------------
  |  Branch (1626:9): [True: 0, False: 3.97k]
  ------------------
 1627|      0|        sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1628|      0|        return NULL;
 1629|      0|    }
 1630|  3.97k|    sk_SSL_CIPHER_free(*cipher_list);
  ------------------
  |  | 1034|  3.97k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1631|  3.97k|    *cipher_list = cipherstack;
 1632|       |
 1633|  3.97k|    return cipherstack;
 1634|  3.97k|}
SSL_COMP_get_compression_methods:
 1951|  3.35k|{
 1952|  3.35k|    STACK_OF(SSL_COMP) **rv;
  ------------------
  |  |   33|  3.35k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1953|       |
 1954|  3.35k|    rv = (STACK_OF(SSL_COMP) **)OSSL_LIB_CTX_get_data(NULL,
 1955|  3.35k|        OSSL_LIB_CTX_COMP_METHODS);
  ------------------
  |  |  118|  3.35k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
 1956|  3.35k|    if (rv != NULL)
  ------------------
  |  Branch (1956:9): [True: 3.35k, False: 0]
  ------------------
 1957|  3.35k|        return *rv;
 1958|      0|    else
 1959|      0|        return NULL;
 1960|  3.35k|}
ssl_get_cipher_by_char:
 2056|     36|{
 2057|     36|    const SSL_CIPHER *c = SSL_CONNECTION_GET_SSL(s)->method->get_cipher_by_char(ptr);
  ------------------
  |  |   27|     36|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2058|       |
 2059|     36|    if (c == NULL || (!all && c->valid == 0))
  ------------------
  |  Branch (2059:9): [True: 23, False: 13]
  |  Branch (2059:23): [True: 13, False: 0]
  |  Branch (2059:31): [True: 1, False: 12]
  ------------------
 2060|     24|        return NULL;
 2061|     12|    return c;
 2062|     36|}
ssl_get_md_idx:
 2108|  13.4k|{
 2109|  13.4k|    int i;
 2110|       |
 2111|   214k|    for (i = 0; i < SSL_MD_NUM_IDX; i++) {
  ------------------
  |  |  210|   214k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|   214k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (2111:17): [True: 201k, False: 13.4k]
  ------------------
 2112|   201k|        if (md_nid == ssl_cipher_table_mac[i].nid)
  ------------------
  |  Branch (2112:13): [True: 0, False: 201k]
  ------------------
 2113|      0|            return i;
 2114|   201k|    }
 2115|  13.4k|    return -1;
 2116|  13.4k|}
ssl_cert_is_disabled:
 2190|   104k|{
 2191|   104k|    const SSL_CERT_LOOKUP *cl;
 2192|       |
 2193|       |    /* A provider-loaded key type is always enabled */
 2194|   104k|    if (idx >= SSL_PKEY_NUM)
  ------------------
  |  |  336|   104k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2194:9): [True: 9.72k, False: 95.2k]
  ------------------
 2195|  9.72k|        return 0;
 2196|       |
 2197|  95.2k|    cl = ssl_cert_lookup_by_idx(idx, ctx);
 2198|  95.2k|    if (cl == NULL || (cl->amask & ctx->disabled_auth_mask) != 0)
  ------------------
  |  Branch (2198:9): [True: 0, False: 95.2k]
  |  Branch (2198:23): [True: 0, False: 95.2k]
  ------------------
 2199|      0|        return 1;
 2200|  95.2k|    return 0;
 2201|  95.2k|}
OSSL_default_cipher_list:
 2209|  3.49k|{
 2210|  3.49k|    return "ALL:!COMPLEMENTOFDEFAULT:!eNULL";
 2211|  3.49k|}
OSSL_default_ciphersuites:
 2219|  3.47k|{
 2220|  3.47k|    return "TLS_AES_256_GCM_SHA384:"
 2221|  3.47k|           "TLS_CHACHA20_POLY1305_SHA256:"
 2222|  3.47k|           "TLS_AES_128_GCM_SHA256";
 2223|  3.47k|}
ssl_cipher_list_to_bytes:
 2227|  2.57k|{
 2228|  2.57k|    int i;
 2229|  2.57k|    size_t totlen = 0, len, maxlen, maxverok = 0;
 2230|  2.57k|    int empty_reneg_info_scsv = !s->renegotiate
  ------------------
  |  Branch (2230:33): [True: 2.57k, False: 0]
  ------------------
 2231|  2.57k|        && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  5.15k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.57k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.57k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2231:12): [True: 2.57k, False: 0]
  ------------------
 2232|  2.57k|        && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2757|  2.57k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|  2.57k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                      && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  2.57k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2232:12): [True: 28, False: 2.55k]
  ------------------
 2233|     28|        && s->min_proto_version <= TLS1_VERSION;
  ------------------
  |  |   24|     28|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2233:12): [True: 7, False: 21]
  ------------------
 2234|  2.57k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.57k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2235|       |
 2236|       |    /* Set disabled masks for this session */
 2237|  2.57k|    if (!ssl_set_client_disabled(s)) {
  ------------------
  |  Branch (2237:9): [True: 0, False: 2.57k]
  ------------------
 2238|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2239|      0|        return 0;
 2240|      0|    }
 2241|       |
 2242|  2.57k|    if (sk == NULL) {
  ------------------
  |  Branch (2242:9): [True: 0, False: 2.57k]
  ------------------
 2243|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2244|      0|        return 0;
 2245|      0|    }
 2246|       |
 2247|       |#ifdef OPENSSL_MAX_TLS1_2_CIPHER_LENGTH
 2248|       |#if OPENSSL_MAX_TLS1_2_CIPHER_LENGTH < 6
 2249|       |#error Max cipher length too short
 2250|       |#endif
 2251|       |    /*
 2252|       |     * Some servers hang if client hello > 256 bytes as hack workaround
 2253|       |     * chop number of supported ciphers to keep it well below this if we
 2254|       |     * use TLS v1.2
 2255|       |     */
 2256|       |    if (TLS1_get_version(ssl) >= TLS1_2_VERSION)
 2257|       |        maxlen = OPENSSL_MAX_TLS1_2_CIPHER_LENGTH & ~1;
 2258|       |    else
 2259|       |#endif
 2260|       |        /* Maximum length that can be stored in 2 bytes. Length must be even */
 2261|  2.57k|        maxlen = 0xfffe;
 2262|       |
 2263|  2.57k|    if (empty_reneg_info_scsv)
  ------------------
  |  Branch (2263:9): [True: 7, False: 2.57k]
  ------------------
 2264|      7|        maxlen -= 2;
 2265|  2.57k|    if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV)
  ------------------
  |  |  553|  2.57k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2265:9): [True: 0, False: 2.57k]
  ------------------
 2266|      0|        maxlen -= 2;
 2267|       |
 2268|   156k|    for (i = 0; i < sk_SSL_CIPHER_num(sk) && totlen < maxlen; i++) {
  ------------------
  |  | 1028|   313k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (2268:17): [True: 154k, False: 2.57k]
  |  Branch (2268:46): [True: 154k, False: 0]
  ------------------
 2269|   154k|        const SSL_CIPHER *c;
 2270|       |
 2271|   154k|        c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1029|   154k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 2272|       |        /* Skip disabled ciphers */
 2273|   154k|        if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0))
  ------------------
  |  | 2743|   154k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|   154k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2273:13): [True: 78.5k, False: 75.6k]
  ------------------
 2274|  78.5k|            continue;
 2275|       |
 2276|  75.6k|        if (!ssl->method->put_cipher_by_char(c, pkt, &len)) {
  ------------------
  |  Branch (2276:13): [True: 0, False: 75.6k]
  ------------------
 2277|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2278|      0|            return 0;
 2279|      0|        }
 2280|       |
 2281|       |        /* Sanity check that the maximum version we offer has ciphers enabled */
 2282|  75.6k|        if (!maxverok) {
  ------------------
  |  Branch (2282:13): [True: 3.33k, False: 72.2k]
  ------------------
 2283|  3.33k|            int minproto = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  266|  3.33k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.33k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.33k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.33k]
  |  |  ------------------
  ------------------
 2284|  3.33k|            int maxproto = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  266|  3.33k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.33k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.33k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.33k]
  |  |  ------------------
  ------------------
 2285|       |
 2286|  3.33k|            if (ssl_version_cmp(s, maxproto, s->s3.tmp.max_ver) >= 0
  ------------------
  |  Branch (2286:17): [True: 2.51k, False: 820]
  ------------------
 2287|  2.51k|                && ssl_version_cmp(s, minproto, s->s3.tmp.max_ver) <= 0)
  ------------------
  |  Branch (2287:20): [True: 2.51k, False: 0]
  ------------------
 2288|  2.51k|                maxverok = 1;
 2289|  3.33k|        }
 2290|       |
 2291|  75.6k|        totlen += len;
 2292|  75.6k|    }
 2293|       |
 2294|  2.57k|    if (totlen == 0 || !maxverok) {
  ------------------
  |  Branch (2294:9): [True: 18, False: 2.56k]
  |  Branch (2294:24): [True: 41, False: 2.51k]
  ------------------
 2295|     59|        const char *maxvertext = !maxverok
  ------------------
  |  Branch (2295:34): [True: 59, False: 0]
  ------------------
 2296|     59|            ? "No ciphers enabled for max supported SSL/TLS version"
 2297|     59|            : NULL;
 2298|       |
 2299|     59|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  157|     59|    (ERR_new(),                                                  \
  |  |  158|     59|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     59|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|     59|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  | 1266|     59|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|     59|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  198|     59|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
 2300|     59|            maxvertext);
 2301|     59|        return 0;
 2302|     59|    }
 2303|       |
 2304|  2.51k|    if (totlen != 0) {
  ------------------
  |  Branch (2304:9): [True: 2.51k, False: 0]
  ------------------
 2305|  2.51k|        if (empty_reneg_info_scsv) {
  ------------------
  |  Branch (2305:13): [True: 5, False: 2.51k]
  ------------------
 2306|      5|            static const SSL_CIPHER scsv = {
 2307|      5|                0, NULL, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
  ------------------
  |  |   33|      5|#define SSL3_CK_SCSV 0x030000FF
  ------------------
 2308|      5|            };
 2309|      5|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (2309:17): [True: 0, False: 5]
  ------------------
 2310|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2311|      0|                return 0;
 2312|      0|            }
 2313|      5|        }
 2314|  2.51k|        if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV) {
  ------------------
  |  |  553|  2.51k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2314:13): [True: 0, False: 2.51k]
  ------------------
 2315|      0|            static const SSL_CIPHER scsv = {
 2316|      0|                0, NULL, NULL, SSL3_CK_FALLBACK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
  ------------------
  |  |   39|      0|#define SSL3_CK_FALLBACK_SCSV 0x03005600
  ------------------
 2317|      0|            };
 2318|      0|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (2318:17): [True: 0, False: 0]
  ------------------
 2319|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2320|      0|                return 0;
 2321|      0|            }
 2322|      0|        }
 2323|  2.51k|    }
 2324|       |
 2325|  2.51k|    return 1;
 2326|  2.51k|}
ssl_ciph.c:set_ciphersuites:
 1267|  3.59k|{
 1268|  3.59k|    STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  |   33|  3.59k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1031|  3.59k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
 1269|       |
 1270|  3.59k|    if (newciphers == NULL)
  ------------------
  |  Branch (1270:9): [True: 0, False: 3.59k]
  ------------------
 1271|      0|        return 0;
 1272|       |
 1273|       |    /* Parse the list. We explicitly allow an empty list */
 1274|  3.59k|    if (*str != '\0'
  ------------------
  |  Branch (1274:9): [True: 3.55k, False: 47]
  ------------------
 1275|  3.55k|        && (CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers) <= 0
  ------------------
  |  Branch (1275:13): [True: 0, False: 3.55k]
  ------------------
 1276|  3.55k|            || sk_SSL_CIPHER_num(newciphers) == 0)) {
  ------------------
  |  | 1028|  3.55k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1276:16): [True: 70, False: 3.48k]
  ------------------
 1277|     70|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
  ------------------
  |  |  357|     70|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     70|    (ERR_new(),                                                  \
  |  |  |  |  360|     70|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     70|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     70|        ERR_set_error)
  |  |  ------------------
  ------------------
 1278|     70|        sk_SSL_CIPHER_free(newciphers);
  ------------------
  |  | 1034|     70|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1279|     70|        return 0;
 1280|     70|    }
 1281|  3.52k|    sk_SSL_CIPHER_free(*currciphers);
  ------------------
  |  | 1034|  3.52k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1282|  3.52k|    *currciphers = newciphers;
 1283|       |
 1284|  3.52k|    return 1;
 1285|  3.59k|}
ssl_ciph.c:ciphersuite_cb:
 1231|  23.1k|{
 1232|  23.1k|    STACK_OF(SSL_CIPHER) *ciphersuites = (STACK_OF(SSL_CIPHER) *)arg;
  ------------------
  |  |   33|  23.1k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1233|  23.1k|    const SSL_CIPHER *cipher;
 1234|       |    /* Arbitrary sized temp buffer for the cipher name. Should be big enough */
 1235|  23.1k|    char name[80];
 1236|       |
 1237|       |    /* CONF_parse_list signals empty elements with elem == NULL; skip them */
 1238|  23.1k|    if (elem == NULL || len == 0)
  ------------------
  |  Branch (1238:9): [True: 6.58k, False: 16.5k]
  |  Branch (1238:25): [True: 0, False: 16.5k]
  ------------------
 1239|  6.58k|        return 1;
 1240|       |
 1241|  16.5k|    if (len > (int)(sizeof(name) - 1))
  ------------------
  |  Branch (1241:9): [True: 85, False: 16.4k]
  ------------------
 1242|       |        /* Anyway return 1 so we can parse rest of the list */
 1243|     85|        return 1;
 1244|       |
 1245|  16.4k|    memcpy(name, elem, len);
 1246|  16.4k|    name[len] = '\0';
 1247|       |
 1248|  16.4k|    cipher = ssl3_get_tls13_cipher_by_std_name(name);
 1249|  16.4k|    if (cipher == NULL)
  ------------------
  |  Branch (1249:9): [True: 5.97k, False: 10.4k]
  ------------------
 1250|       |        /* Ciphersuite not found but return 1 to parse rest of the list */
 1251|  5.97k|        return 1;
 1252|       |
 1253|       |    /* Suppress duplicates */
 1254|  20.9k|    for (int i = 0; i < sk_SSL_CIPHER_num(ciphersuites); ++i)
  ------------------
  |  | 1028|  20.9k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1254:21): [True: 10.4k, False: 10.4k]
  ------------------
 1255|  10.4k|        if (sk_SSL_CIPHER_value(ciphersuites, i)->id == cipher->id)
  ------------------
  |  | 1029|  10.4k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  |  Branch (1255:13): [True: 58, False: 10.4k]
  ------------------
 1256|     58|            return 1;
 1257|       |
 1258|  10.4k|    if (!sk_SSL_CIPHER_push(ciphersuites, cipher)) {
  ------------------
  |  | 1038|  10.4k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1258:9): [True: 0, False: 10.4k]
  ------------------
 1259|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1260|      0|        return 0;
 1261|      0|    }
 1262|       |
 1263|  10.4k|    return 1;
 1264|  10.4k|}
ssl_ciph.c:update_cipher_list:
 1309|     59|{
 1310|     59|    int i;
 1311|     59|    STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(*cipher_list);
  ------------------
  |  |   33|     59|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(*cipher_list);
  ------------------
  |  | 1050|     59|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 1312|       |
 1313|     59|    if (tmp_cipher_list == NULL)
  ------------------
  |  Branch (1313:9): [True: 0, False: 59]
  ------------------
 1314|      0|        return 0;
 1315|       |
 1316|       |    /*
 1317|       |     * Delete any existing TLSv1.3 ciphersuites. These are always first in the
 1318|       |     * list.
 1319|       |     */
 1320|    236|    while (sk_SSL_CIPHER_num(tmp_cipher_list) > 0
  ------------------
  |  | 1028|    236|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1320:12): [True: 236, False: 0]
  ------------------
 1321|    236|        && sk_SSL_CIPHER_value(tmp_cipher_list, 0)->min_tls
  ------------------
  |  | 1029|    236|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  |  Branch (1321:12): [True: 177, False: 59]
  ------------------
 1322|    236|            == TLS1_3_VERSION)
  ------------------
  |  |   27|    236|#define TLS1_3_VERSION 0x0304
  ------------------
 1323|    177|        (void)sk_SSL_CIPHER_delete(tmp_cipher_list, 0);
  ------------------
  |  | 1036|    236|#define sk_SSL_CIPHER_delete(sk, i) ((const SSL_CIPHER *)OPENSSL_sk_delete(ossl_check_SSL_CIPHER_sk_type(sk), (i)))
  ------------------
 1324|       |
 1325|       |    /* Insert the new TLSv1.3 ciphersuites */
 1326|     81|    for (i = sk_SSL_CIPHER_num(tls13_ciphersuites) - 1; i >= 0; i--) {
  ------------------
  |  | 1028|     59|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1326:57): [True: 22, False: 59]
  ------------------
 1327|     22|        const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
  ------------------
  |  | 1029|     22|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 1328|       |
 1329|       |        /* Don't include any TLSv1.3 ciphersuites that are disabled */
 1330|     22|        if ((sslc->algorithm_enc & ctx->disabled_enc_mask) == 0
  ------------------
  |  Branch (1330:13): [True: 22, False: 0]
  ------------------
 1331|     22|            && (ssl_cipher_table_mac[sslc->algorithm2
  ------------------
  |  Branch (1331:16): [True: 22, False: 0]
  ------------------
 1332|     22|                    & SSL_HANDSHAKE_MAC_MASK]
  ------------------
  |  |  215|     22|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
 1333|     22|                       .mask
 1334|     22|                   & ctx->disabled_mac_mask)
 1335|     22|                == 0) {
 1336|     22|            sk_SSL_CIPHER_unshift(tmp_cipher_list, sslc);
  ------------------
  |  | 1039|     22|#define sk_SSL_CIPHER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 1337|     22|        }
 1338|     22|    }
 1339|       |
 1340|     59|    if (!update_cipher_list_by_id(cipher_list_by_id, tmp_cipher_list)) {
  ------------------
  |  Branch (1340:9): [True: 0, False: 59]
  ------------------
 1341|      0|        sk_SSL_CIPHER_free(tmp_cipher_list);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1342|      0|        return 0;
 1343|      0|    }
 1344|       |
 1345|     59|    sk_SSL_CIPHER_free(*cipher_list);
  ------------------
  |  | 1034|     59|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1346|     59|    *cipher_list = tmp_cipher_list;
 1347|       |
 1348|     59|    return 1;
 1349|     59|}
ssl_ciph.c:check_suiteb_cipher_list:
 1184|  4.32k|{
 1185|  4.32k|    unsigned int suiteb_flags = 0, suiteb_comb2 = 0;
 1186|  4.32k|    if (HAS_CASE_PREFIX(*prule_str, "SUITEB128ONLY")) {
  ------------------
  |  |   63|  4.32k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 2, False: 4.32k]
  |  |  ------------------
  ------------------
 1187|      2|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS_ONLY;
  ------------------
  |  |  580|      2|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
 1188|  4.32k|    } else if (HAS_CASE_PREFIX(*prule_str, "SUITEB128C2")) {
  ------------------
  |  |   63|  4.32k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 1, False: 4.32k]
  |  |  ------------------
  ------------------
 1189|      1|        suiteb_comb2 = 1;
 1190|      1|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|      1|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1191|  4.32k|    } else if (HAS_CASE_PREFIX(*prule_str, "SUITEB128")) {
  ------------------
  |  |   63|  4.32k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 4, False: 4.31k]
  |  |  ------------------
  ------------------
 1192|      4|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|      4|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1193|  4.31k|    } else if (HAS_CASE_PREFIX(*prule_str, "SUITEB192")) {
  ------------------
  |  |   63|  4.31k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 3, False: 4.31k]
  |  |  ------------------
  ------------------
 1194|      3|        suiteb_flags = SSL_CERT_FLAG_SUITEB_192_LOS;
  ------------------
  |  |  582|      3|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
 1195|      3|    }
 1196|       |
 1197|  4.32k|    if (suiteb_flags) {
  ------------------
  |  Branch (1197:9): [True: 10, False: 4.31k]
  ------------------
 1198|     10|        c->cert_flags &= ~SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|     10|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1199|     10|        c->cert_flags |= suiteb_flags;
 1200|  4.31k|    } else {
 1201|  4.31k|        suiteb_flags = c->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|  4.31k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1202|  4.31k|    }
 1203|       |
 1204|  4.32k|    if (!suiteb_flags)
  ------------------
  |  Branch (1204:9): [True: 4.31k, False: 10]
  ------------------
 1205|  4.31k|        return 1;
 1206|       |    /* Check version: if TLS 1.2 ciphers allowed we can use Suite B */
 1207|       |
 1208|     10|    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS)) {
  ------------------
  |  | 2201|     10|#define SSL_ENC_FLAG_TLS1_2_CIPHERS 0x10
  ------------------
  |  Branch (1208:9): [True: 0, False: 10]
  ------------------
 1209|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1210|      0|        return 0;
 1211|      0|    }
 1212|       |
 1213|     10|    switch (suiteb_flags) {
  ------------------
  |  Branch (1213:13): [True: 10, False: 0]
  ------------------
 1214|      5|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  584|      5|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (1214:5): [True: 5, False: 5]
  ------------------
 1215|      5|        if (suiteb_comb2)
  ------------------
  |  Branch (1215:13): [True: 1, False: 4]
  ------------------
 1216|      1|            *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1217|      4|        else
 1218|      4|            *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384";
 1219|      5|        break;
 1220|      2|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  580|      2|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (1220:5): [True: 2, False: 8]
  ------------------
 1221|      2|        *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256";
 1222|      2|        break;
 1223|      3|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  582|      3|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (1223:5): [True: 3, False: 7]
  ------------------
 1224|      3|        *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1225|      3|        break;
 1226|     10|    }
 1227|     10|    return 1;
 1228|     10|}
ssl_ciph.c:ssl_cipher_collect_ciphers:
  615|  4.32k|{
  616|  4.32k|    int i, co_list_num;
  617|  4.32k|    const SSL_CIPHER *c;
  618|       |
  619|       |    /*
  620|       |     * We have num_of_ciphers descriptions compiled in, depending on the
  621|       |     * method selected (SSLv3, TLSv1 etc).
  622|       |     * These will later be sorted in a linked list with at most num
  623|       |     * entries.
  624|       |     */
  625|       |
  626|       |    /* Get the initial list of ciphers */
  627|  4.32k|    co_list_num = 0; /* actual count of ciphers */
  628|   830k|    for (i = 0; i < num_of_ciphers; i++) {
  ------------------
  |  Branch (628:17): [True: 826k, False: 4.32k]
  ------------------
  629|   826k|        c = ssl_method->get_cipher(i);
  630|       |        /* drop those that use any of that is not available */
  631|   826k|        if (c == NULL || !c->valid)
  ------------------
  |  Branch (631:13): [True: 0, False: 826k]
  |  Branch (631:26): [True: 0, False: 826k]
  ------------------
  632|      0|            continue;
  633|   826k|        if ((c->algorithm_mkey & disabled_mkey) || (c->algorithm_auth & disabled_auth) || (c->algorithm_enc & disabled_enc) || (c->algorithm_mac & disabled_mac))
  ------------------
  |  Branch (633:13): [True: 43.2k, False: 782k]
  |  Branch (633:52): [True: 339, False: 782k]
  |  Branch (633:91): [True: 69.6k, False: 712k]
  |  Branch (633:128): [True: 1.01k, False: 711k]
  ------------------
  634|   114k|            continue;
  635|   711k|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) == 0) && c->min_tls == 0)
  ------------------
  |  | 2196|   711k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (635:13): [True: 711k, False: 0]
  |  Branch (635:77): [True: 0, False: 711k]
  ------------------
  636|      0|            continue;
  637|   711k|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) != 0) && c->min_dtls == 0)
  ------------------
  |  | 2196|   711k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (637:13): [True: 0, False: 711k]
  |  Branch (637:77): [True: 0, False: 0]
  ------------------
  638|      0|            continue;
  639|       |
  640|   711k|        co_list[co_list_num].cipher = c;
  641|   711k|        co_list[co_list_num].next = NULL;
  642|   711k|        co_list[co_list_num].prev = NULL;
  643|   711k|        co_list[co_list_num].active = 0;
  644|   711k|        co_list_num++;
  645|   711k|    }
  646|       |
  647|       |    /*
  648|       |     * Prepare linked list from list entries
  649|       |     */
  650|  4.32k|    if (co_list_num > 0) {
  ------------------
  |  Branch (650:9): [True: 4.21k, False: 113]
  ------------------
  651|  4.21k|        co_list[0].prev = NULL;
  652|       |
  653|  4.21k|        if (co_list_num > 1) {
  ------------------
  |  Branch (653:13): [True: 4.21k, False: 0]
  ------------------
  654|  4.21k|            co_list[0].next = &co_list[1];
  655|       |
  656|   707k|            for (i = 1; i < co_list_num - 1; i++) {
  ------------------
  |  Branch (656:25): [True: 703k, False: 4.21k]
  ------------------
  657|   703k|                co_list[i].prev = &co_list[i - 1];
  658|   703k|                co_list[i].next = &co_list[i + 1];
  659|   703k|            }
  660|       |
  661|  4.21k|            co_list[co_list_num - 1].prev = &co_list[co_list_num - 2];
  662|  4.21k|        }
  663|       |
  664|  4.21k|        co_list[co_list_num - 1].next = NULL;
  665|       |
  666|  4.21k|        *head_p = &co_list[0];
  667|  4.21k|        *tail_p = &co_list[co_list_num - 1];
  668|  4.21k|    }
  669|  4.32k|}
ssl_ciph.c:ssl_cipher_apply_rule:
  739|   114k|{
  740|   114k|    CIPHER_ORDER *head, *tail, *curr, *next, *last;
  741|   114k|    const SSL_CIPHER *cp;
  742|   114k|    int reverse = 0;
  743|       |
  744|   114k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  219|   114k|    do {                           \
  |  |  220|   114k|        BIO *trc_out = NULL;       \
  |  |  221|   114k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 114k]
  |  |  ------------------
  ------------------
  745|      0|    {
  746|      0|        BIO_printf(trc_out,
  747|      0|            "Applying rule %d with %08x/%08x/%08x/%08x/%08x %08x (%d)\n",
  748|      0|            rule, (unsigned int)alg_mkey, (unsigned int)alg_auth,
  749|      0|            (unsigned int)alg_enc, (unsigned int)alg_mac, min_tls,
  750|      0|            (unsigned int)algo_strength, (int)strength_bits);
  751|      0|    }
  752|       |
  753|   114k|    if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  143|   229k|#define CIPHER_DEL 3
  ------------------
                  if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  150|   104k|#define CIPHER_BUMP 6
  ------------------
  |  Branch (753:9): [True: 10.1k, False: 104k]
  |  Branch (753:31): [True: 17.3k, False: 87.4k]
  ------------------
  754|  27.4k|        reverse = 1; /* needed to maintain sorting between currently
  755|       |                      * deleted ciphers */
  756|       |
  757|   114k|    head = *head_p;
  758|   114k|    tail = *tail_p;
  759|       |
  760|   114k|    if (reverse) {
  ------------------
  |  Branch (760:9): [True: 27.4k, False: 87.4k]
  ------------------
  761|  27.4k|        next = tail;
  762|  27.4k|        last = head;
  763|  87.4k|    } else {
  764|  87.4k|        next = head;
  765|  87.4k|        last = tail;
  766|  87.4k|    }
  767|       |
  768|   114k|    curr = NULL;
  769|  18.5M|    for (;;) {
  770|  18.5M|        if (curr == last)
  ------------------
  |  Branch (770:13): [True: 114k, False: 18.4M]
  ------------------
  771|   114k|            break;
  772|       |
  773|  18.4M|        curr = next;
  774|       |
  775|  18.4M|        if (curr == NULL)
  ------------------
  |  Branch (775:13): [True: 0, False: 18.4M]
  ------------------
  776|      0|            break;
  777|       |
  778|  18.4M|        next = reverse ? curr->prev : curr->next;
  ------------------
  |  Branch (778:16): [True: 4.47M, False: 13.9M]
  ------------------
  779|       |
  780|  18.4M|        cp = curr->cipher;
  781|       |
  782|       |        /*
  783|       |         * Selection criteria is either the value of strength_bits
  784|       |         * or the algorithms used.
  785|       |         */
  786|  18.4M|        if (strength_bits >= 0) {
  ------------------
  |  Branch (786:13): [True: 3.90M, False: 14.5M]
  ------------------
  787|  3.90M|            if (strength_bits != cp->strength_bits)
  ------------------
  |  Branch (787:17): [True: 3.11M, False: 784k]
  ------------------
  788|  3.11M|                continue;
  789|  14.5M|        } else {
  790|  14.5M|            if (trc_out != NULL) {
  ------------------
  |  Branch (790:17): [True: 0, False: 14.5M]
  ------------------
  791|      0|                BIO_printf(trc_out,
  792|      0|                    "\nName: %s:"
  793|      0|                    "\nAlgo = %08x/%08x/%08x/%08x/%08x Algo_strength = %08x\n",
  794|      0|                    cp->name,
  795|      0|                    (unsigned int)cp->algorithm_mkey,
  796|      0|                    (unsigned int)cp->algorithm_auth,
  797|      0|                    (unsigned int)cp->algorithm_enc,
  798|      0|                    (unsigned int)cp->algorithm_mac,
  799|      0|                    cp->min_tls,
  800|      0|                    (unsigned int)cp->algo_strength);
  801|      0|            }
  802|  14.5M|            if (cipher_id != 0 && (cipher_id != cp->id))
  ------------------
  |  Branch (802:17): [True: 55.6k, False: 14.4M]
  |  Branch (802:35): [True: 55.3k, False: 311]
  ------------------
  803|  55.3k|                continue;
  804|  14.4M|            if (alg_mkey && !(alg_mkey & cp->algorithm_mkey))
  ------------------
  |  Branch (804:17): [True: 5.25M, False: 9.19M]
  |  Branch (804:29): [True: 3.95M, False: 1.30M]
  ------------------
  805|  3.95M|                continue;
  806|  10.4M|            if (alg_auth && !(alg_auth & cp->algorithm_auth))
  ------------------
  |  Branch (806:17): [True: 898k, False: 9.59M]
  |  Branch (806:29): [True: 745k, False: 153k]
  ------------------
  807|   745k|                continue;
  808|  9.74M|            if (alg_enc && !(alg_enc & cp->algorithm_enc))
  ------------------
  |  Branch (808:17): [True: 3.80M, False: 5.94M]
  |  Branch (808:28): [True: 2.77M, False: 1.02M]
  ------------------
  809|  2.77M|                continue;
  810|  6.97M|            if (alg_mac && !(alg_mac & cp->algorithm_mac))
  ------------------
  |  Branch (810:17): [True: 2.14M, False: 4.82M]
  |  Branch (810:28): [True: 1.66M, False: 477k]
  ------------------
  811|  1.66M|                continue;
  812|  5.30M|            if (min_tls && (min_tls != cp->min_tls))
  ------------------
  |  Branch (812:17): [True: 737k, False: 4.56M]
  |  Branch (812:28): [True: 366k, False: 371k]
  ------------------
  813|   366k|                continue;
  814|  4.94M|            if ((algo_strength & SSL_STRONG_MASK)
  ------------------
  |  |  249|  4.94M|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (814:17): [True: 81.4k, False: 4.85M]
  ------------------
  815|  81.4k|                && !(algo_strength & SSL_STRONG_MASK & cp->algo_strength))
  ------------------
  |  |  249|  81.4k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (815:20): [True: 48.2k, False: 33.2k]
  ------------------
  816|  48.2k|                continue;
  817|  4.89M|            if ((algo_strength & SSL_DEFAULT_MASK)
  ------------------
  |  |  250|  4.89M|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (817:17): [True: 600k, False: 4.29M]
  ------------------
  818|   600k|                && !(algo_strength & SSL_DEFAULT_MASK & cp->algo_strength))
  ------------------
  |  |  250|   600k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (818:20): [True: 266k, False: 333k]
  ------------------
  819|   266k|                continue;
  820|  4.89M|        }
  821|       |
  822|  5.41M|        if (trc_out != NULL)
  ------------------
  |  Branch (822:13): [True: 0, False: 5.41M]
  ------------------
  823|      0|            BIO_printf(trc_out, "Action = %d\n", rule);
  824|       |
  825|       |        /* add the cipher if it has not been added yet. */
  826|  5.41M|        if (rule == CIPHER_ADD) {
  ------------------
  |  |  141|  5.41M|#define CIPHER_ADD 1
  ------------------
  |  Branch (826:13): [True: 2.01M, False: 3.39M]
  ------------------
  827|       |            /* reverse == 0 */
  828|  2.01M|            if (!curr->active) {
  ------------------
  |  Branch (828:17): [True: 1.42M, False: 589k]
  ------------------
  829|  1.42M|                ll_append_tail(&head, curr, &tail);
  830|  1.42M|                curr->active = 1;
  831|  1.42M|            }
  832|  2.01M|        }
  833|       |        /* Move the added cipher to this location */
  834|  3.39M|        else if (rule == CIPHER_ORD) {
  ------------------
  |  |  144|  3.39M|#define CIPHER_ORD 4
  ------------------
  |  Branch (834:18): [True: 1.02M, False: 2.36M]
  ------------------
  835|       |            /* reverse == 0 */
  836|  1.02M|            if (curr->active) {
  ------------------
  |  Branch (836:17): [True: 993k, False: 31.5k]
  ------------------
  837|   993k|                ll_append_tail(&head, curr, &tail);
  838|   993k|            }
  839|  2.36M|        } else if (rule == CIPHER_DEL) {
  ------------------
  |  |  143|  2.36M|#define CIPHER_DEL 3
  ------------------
  |  Branch (839:20): [True: 908k, False: 1.45M]
  ------------------
  840|       |            /* reverse == 1 */
  841|   908k|            if (curr->active) {
  ------------------
  |  Branch (841:17): [True: 885k, False: 23.1k]
  ------------------
  842|       |                /*
  843|       |                 * most recently deleted ciphersuites get best positions for
  844|       |                 * any future CIPHER_ADD (note that the CIPHER_DEL loop works
  845|       |                 * in reverse to maintain the order)
  846|       |                 */
  847|   885k|                ll_append_head(&head, curr, &tail);
  848|   885k|                curr->active = 0;
  849|   885k|            }
  850|  1.45M|        } else if (rule == CIPHER_BUMP) {
  ------------------
  |  |  150|  1.45M|#define CIPHER_BUMP 6
  ------------------
  |  Branch (850:20): [True: 1.06M, False: 396k]
  ------------------
  851|  1.06M|            if (curr->active)
  ------------------
  |  Branch (851:17): [True: 1.06M, False: 0]
  ------------------
  852|  1.06M|                ll_append_head(&head, curr, &tail);
  853|  1.06M|        } else if (rule == CIPHER_KILL) {
  ------------------
  |  |  142|   396k|#define CIPHER_KILL 2
  ------------------
  |  Branch (853:20): [True: 396k, False: 0]
  ------------------
  854|       |            /* reverse == 0 */
  855|   396k|            if (head == curr)
  ------------------
  |  Branch (855:17): [True: 66.5k, False: 329k]
  ------------------
  856|  66.5k|                head = curr->next;
  857|   329k|            else
  858|   329k|                curr->prev->next = curr->next;
  859|   396k|            if (tail == curr)
  ------------------
  |  Branch (859:17): [True: 3.48k, False: 393k]
  ------------------
  860|  3.48k|                tail = curr->prev;
  861|   396k|            curr->active = 0;
  862|   396k|            if (curr->next != NULL)
  ------------------
  |  Branch (862:17): [True: 393k, False: 3.48k]
  ------------------
  863|   393k|                curr->next->prev = curr->prev;
  864|   396k|            if (curr->prev != NULL)
  ------------------
  |  Branch (864:17): [True: 329k, False: 66.5k]
  ------------------
  865|   329k|                curr->prev->next = curr->next;
  866|   396k|            curr->next = NULL;
  867|   396k|            curr->prev = NULL;
  868|   396k|        }
  869|  5.41M|    }
  870|       |
  871|   114k|    *head_p = head;
  872|   114k|    *tail_p = tail;
  873|       |
  874|   114k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  224|   114k|    }                            \
  |  |  225|   114k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 114k]
  |  |  ------------------
  ------------------
  875|   114k|}
ssl_ciph.c:ll_append_tail:
  574|  2.42M|{
  575|  2.42M|    if (curr == *tail)
  ------------------
  |  Branch (575:9): [True: 4.33k, False: 2.41M]
  ------------------
  576|  4.33k|        return;
  577|  2.41M|    if (curr == *head)
  ------------------
  |  Branch (577:9): [True: 750k, False: 1.66M]
  ------------------
  578|   750k|        *head = curr->next;
  579|  2.41M|    if (curr->prev != NULL)
  ------------------
  |  Branch (579:9): [True: 1.66M, False: 750k]
  ------------------
  580|  1.66M|        curr->prev->next = curr->next;
  581|  2.41M|    if (curr->next != NULL)
  ------------------
  |  Branch (581:9): [True: 2.41M, False: 0]
  ------------------
  582|  2.41M|        curr->next->prev = curr->prev;
  583|  2.41M|    (*tail)->next = curr;
  584|  2.41M|    curr->prev = *tail;
  585|       |    curr->next = NULL;
  586|  2.41M|    *tail = curr;
  587|  2.41M|}
ssl_ciph.c:ll_append_head:
  591|  1.94M|{
  592|  1.94M|    if (curr == *head)
  ------------------
  |  Branch (592:9): [True: 19, False: 1.94M]
  ------------------
  593|     19|        return;
  594|  1.94M|    if (curr == *tail)
  ------------------
  |  Branch (594:9): [True: 878k, False: 1.06M]
  ------------------
  595|   878k|        *tail = curr->prev;
  596|  1.94M|    if (curr->next != NULL)
  ------------------
  |  Branch (596:9): [True: 1.06M, False: 878k]
  ------------------
  597|  1.06M|        curr->next->prev = curr->prev;
  598|  1.94M|    if (curr->prev != NULL)
  ------------------
  |  Branch (598:9): [True: 1.94M, False: 0]
  ------------------
  599|  1.94M|        curr->prev->next = curr->next;
  600|  1.94M|    (*head)->prev = curr;
  601|  1.94M|    curr->next = *head;
  602|       |    curr->prev = NULL;
  603|  1.94M|    *head = curr;
  604|  1.94M|}
ssl_ciph.c:ssl_cipher_strength_sort:
  879|  5.00k|{
  880|  5.00k|    int32_t max_strength_bits;
  881|  5.00k|    int i, *number_uses;
  882|  5.00k|    CIPHER_ORDER *curr;
  883|       |
  884|       |    /*
  885|       |     * This routine sorts the ciphers with descending strength. The sorting
  886|       |     * must keep the pre-sorted sequence, so we apply the normal sorting
  887|       |     * routine as '+' movement to the end of the list.
  888|       |     */
  889|  5.00k|    max_strength_bits = 0;
  890|  5.00k|    curr = *head_p;
  891|   806k|    while (curr != NULL) {
  ------------------
  |  Branch (891:12): [True: 801k, False: 5.00k]
  ------------------
  892|   801k|        if (curr->active && (curr->cipher->strength_bits > max_strength_bits))
  ------------------
  |  Branch (892:13): [True: 757k, False: 43.6k]
  |  Branch (892:29): [True: 4.74k, False: 752k]
  ------------------
  893|  4.74k|            max_strength_bits = curr->cipher->strength_bits;
  894|   801k|        curr = curr->next;
  895|   801k|    }
  896|       |
  897|  5.00k|    number_uses = OPENSSL_calloc(max_strength_bits + 1, sizeof(int));
  ------------------
  |  |  113|  5.00k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  898|  5.00k|    if (number_uses == NULL)
  ------------------
  |  Branch (898:9): [True: 0, False: 5.00k]
  ------------------
  899|      0|        return 0;
  900|       |
  901|       |    /*
  902|       |     * Now find the strength_bits values actually used
  903|       |     */
  904|  5.00k|    curr = *head_p;
  905|   806k|    while (curr != NULL) {
  ------------------
  |  Branch (905:12): [True: 801k, False: 5.00k]
  ------------------
  906|   801k|        if (curr->active)
  ------------------
  |  Branch (906:13): [True: 757k, False: 43.6k]
  ------------------
  907|   757k|            number_uses[curr->cipher->strength_bits]++;
  908|   801k|        curr = curr->next;
  909|   801k|    }
  910|       |    /*
  911|       |     * Go through the list of used strength_bits values in descending
  912|       |     * order.
  913|       |     */
  914|  1.21M|    for (i = max_strength_bits; i >= 0; i--)
  ------------------
  |  Branch (914:33): [True: 1.20M, False: 5.00k]
  ------------------
  915|  1.20M|        if (number_uses[i] > 0)
  ------------------
  |  Branch (915:13): [True: 23.2k, False: 1.18M]
  ------------------
  916|  23.2k|            ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ORD, i, head_p,
  ------------------
  |  |  144|  23.2k|#define CIPHER_ORD 4
  ------------------
  917|  23.2k|                tail_p);
  918|       |
  919|  5.00k|    OPENSSL_free(number_uses);
  ------------------
  |  |  132|  5.00k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  920|  5.00k|    return 1;
  921|  5.00k|}
ssl_ciph.c:ssl_cipher_collect_aliases:
  678|  4.32k|{
  679|  4.32k|    CIPHER_ORDER *ciph_curr;
  680|  4.32k|    const SSL_CIPHER **ca_curr;
  681|  4.32k|    int i;
  682|  4.32k|    uint32_t mask_mkey = ~disabled_mkey;
  683|  4.32k|    uint32_t mask_auth = ~disabled_auth;
  684|  4.32k|    uint32_t mask_enc = ~disabled_enc;
  685|  4.32k|    uint32_t mask_mac = ~disabled_mac;
  686|       |
  687|       |    /*
  688|       |     * First, add the real ciphers as already collected
  689|       |     */
  690|  4.32k|    ciph_curr = head;
  691|  4.32k|    ca_curr = ca_list;
  692|   716k|    while (ciph_curr != NULL) {
  ------------------
  |  Branch (692:12): [True: 711k, False: 4.32k]
  ------------------
  693|   711k|        *ca_curr = ciph_curr->cipher;
  694|   711k|        ca_curr++;
  695|   711k|        ciph_curr = ciph_curr->next;
  696|   711k|    }
  697|       |
  698|       |    /*
  699|       |     * Now we add the available ones from the cipher_aliases[] table.
  700|       |     * They represent either one or more algorithms, some of which
  701|       |     * in any affected category must be supported (set in enabled_mask),
  702|       |     * or represent a cipher strength value (will be added in any case because algorithms=0).
  703|       |     */
  704|   337k|    for (i = 0; i < num_of_group_aliases; i++) {
  ------------------
  |  Branch (704:17): [True: 333k, False: 4.32k]
  ------------------
  705|   333k|        uint32_t algorithm_mkey = cipher_aliases[i].algorithm_mkey;
  706|   333k|        uint32_t algorithm_auth = cipher_aliases[i].algorithm_auth;
  707|   333k|        uint32_t algorithm_enc = cipher_aliases[i].algorithm_enc;
  708|   333k|        uint32_t algorithm_mac = cipher_aliases[i].algorithm_mac;
  709|       |
  710|   333k|        if (algorithm_mkey)
  ------------------
  |  Branch (710:13): [True: 108k, False: 224k]
  ------------------
  711|   108k|            if ((algorithm_mkey & mask_mkey) == 0)
  ------------------
  |  Branch (711:17): [True: 10.4k, False: 97.6k]
  ------------------
  712|  10.4k|                continue;
  713|       |
  714|   322k|        if (algorithm_auth)
  ------------------
  |  Branch (714:13): [True: 85.5k, False: 236k]
  ------------------
  715|  85.5k|            if ((algorithm_auth & mask_auth) == 0)
  ------------------
  |  Branch (715:17): [True: 13.4k, False: 72.1k]
  ------------------
  716|  13.4k|                continue;
  717|       |
  718|   309k|        if (algorithm_enc)
  ------------------
  |  Branch (718:13): [True: 120k, False: 188k]
  ------------------
  719|   120k|            if ((algorithm_enc & mask_enc) == 0)
  ------------------
  |  Branch (719:17): [True: 27.7k, False: 93.1k]
  ------------------
  720|  27.7k|                continue;
  721|       |
  722|   281k|        if (algorithm_mac)
  ------------------
  |  Branch (722:13): [True: 43.0k, False: 238k]
  ------------------
  723|  43.0k|            if ((algorithm_mac & mask_mac) == 0)
  ------------------
  |  Branch (723:17): [True: 13.5k, False: 29.4k]
  ------------------
  724|  13.5k|                continue;
  725|       |
  726|   267k|        *ca_curr = (SSL_CIPHER *)(cipher_aliases + i);
  727|   267k|        ca_curr++;
  728|   267k|    }
  729|       |
  730|       |    *ca_curr = NULL; /* end of list */
  731|  4.32k|}
ssl_ciph.c:ssl_cipher_process_rulestr:
  927|  4.34k|{
  928|  4.34k|    uint32_t alg_mkey, alg_auth, alg_enc, alg_mac, algo_strength;
  929|  4.34k|    int min_tls;
  930|  4.34k|    const char *l, *buf;
  931|  4.34k|    int j, multi, found, rule, retval, ok, buflen;
  932|  4.34k|    uint32_t cipher_id = 0;
  933|  4.34k|    char ch;
  934|       |
  935|  4.34k|    retval = 1;
  936|  4.34k|    l = rule_str;
  937|   115k|    for (;;) {
  938|   115k|        ch = *l;
  939|       |
  940|   115k|        if (ch == '\0')
  ------------------
  |  Branch (940:13): [True: 123, False: 115k]
  ------------------
  941|    123|            break; /* done */
  942|   115k|        if (ch == '-') {
  ------------------
  |  Branch (942:13): [True: 4.09k, False: 111k]
  ------------------
  943|  4.09k|            rule = CIPHER_DEL;
  ------------------
  |  |  143|  4.09k|#define CIPHER_DEL 3
  ------------------
  944|  4.09k|            l++;
  945|   111k|        } else if (ch == '+') {
  ------------------
  |  Branch (945:20): [True: 1.80k, False: 109k]
  ------------------
  946|  1.80k|            rule = CIPHER_ORD;
  ------------------
  |  |  144|  1.80k|#define CIPHER_ORD 4
  ------------------
  947|  1.80k|            l++;
  948|   109k|        } else if (ch == '!') {
  ------------------
  |  Branch (948:20): [True: 8.93k, False: 100k]
  ------------------
  949|  8.93k|            rule = CIPHER_KILL;
  ------------------
  |  |  142|  8.93k|#define CIPHER_KILL 2
  ------------------
  950|  8.93k|            l++;
  951|   100k|        } else if (ch == '@') {
  ------------------
  |  Branch (951:20): [True: 4.39k, False: 96.4k]
  ------------------
  952|  4.39k|            rule = CIPHER_SPECIAL;
  ------------------
  |  |  145|  4.39k|#define CIPHER_SPECIAL 5
  ------------------
  953|  4.39k|            l++;
  954|  96.4k|        } else {
  955|  96.4k|            rule = CIPHER_ADD;
  ------------------
  |  |  141|  96.4k|#define CIPHER_ADD 1
  ------------------
  956|  96.4k|        }
  957|       |
  958|   115k|        if (ITEM_SEP(ch)) {
  ------------------
  |  |  570|   115k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (570:6): [True: 11.9k, False: 103k]
  |  |  |  Branch (570:22): [True: 4.55k, False: 99.1k]
  |  |  |  Branch (570:38): [True: 26.2k, False: 72.8k]
  |  |  |  Branch (570:54): [True: 22.1k, False: 50.7k]
  |  |  ------------------
  ------------------
  959|  64.9k|            l++;
  960|  64.9k|            continue;
  961|  64.9k|        }
  962|       |
  963|  50.7k|        alg_mkey = 0;
  964|  50.7k|        alg_auth = 0;
  965|  50.7k|        alg_enc = 0;
  966|  50.7k|        alg_mac = 0;
  967|  50.7k|        min_tls = 0;
  968|  50.7k|        algo_strength = 0;
  969|       |
  970|  54.0k|        for (;;) {
  971|  54.0k|            ch = *l;
  972|  54.0k|            buf = l;
  973|  54.0k|            buflen = 0;
  974|  54.0k|#ifndef CHARSET_EBCDIC
  975|   303k|            while (((ch >= 'A') && (ch <= 'Z')) || ((ch >= '0') && (ch <= '9')) || ((ch >= 'a') && (ch <= 'z')) || (ch == '-') || (ch == '_') || (ch == '.') || (ch == '='))
  ------------------
  |  Branch (975:21): [True: 233k, False: 70.3k]
  |  Branch (975:36): [True: 205k, False: 27.8k]
  |  Branch (975:53): [True: 63.6k, False: 34.4k]
  |  Branch (975:68): [True: 8.62k, False: 55.0k]
  |  Branch (975:85): [True: 24.5k, False: 64.9k]
  |  Branch (975:100): [True: 24.1k, False: 372]
  |  Branch (975:116): [True: 3.45k, False: 61.8k]
  |  Branch (975:131): [True: 1.64k, False: 60.2k]
  |  Branch (975:146): [True: 3.54k, False: 56.6k]
  |  Branch (975:161): [True: 2.65k, False: 54.0k]
  ------------------
  976|       |#else
  977|       |            while (isalnum((unsigned char)ch) || (ch == '-') || (ch == '_') || (ch == '.')
  978|       |                || (ch == '='))
  979|       |#endif
  980|   249k|            {
  981|   249k|                ch = *(++l);
  982|   249k|                buflen++;
  983|   249k|            }
  984|       |
  985|  54.0k|            if (buflen == 0) {
  ------------------
  |  Branch (985:17): [True: 183, False: 53.8k]
  ------------------
  986|       |                /*
  987|       |                 * We hit something we cannot deal with,
  988|       |                 * it is no command or separator nor
  989|       |                 * alphanumeric, so we call this an error.
  990|       |                 */
  991|    183|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  357|    183|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|    183|    (ERR_new(),                                                  \
  |  |  |  |  360|    183|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    183|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|    183|        ERR_set_error)
  |  |  ------------------
  ------------------
  992|    183|                return 0;
  993|    183|            }
  994|       |
  995|  53.8k|            if (rule == CIPHER_SPECIAL) {
  ------------------
  |  |  145|  53.8k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (995:17): [True: 4.38k, False: 49.4k]
  ------------------
  996|  4.38k|                found = 0; /* unused -- avoid compiler warning */
  997|  4.38k|                break; /* special treatment */
  998|  4.38k|            }
  999|       |
 1000|       |            /* check for multi-part specification */
 1001|  49.4k|            if (ch == '+') {
  ------------------
  |  Branch (1001:17): [True: 4.57k, False: 44.8k]
  ------------------
 1002|  4.57k|                multi = 1;
 1003|  4.57k|                l++;
 1004|  44.8k|            } else {
 1005|  44.8k|                multi = 0;
 1006|  44.8k|            }
 1007|       |
 1008|       |            /*
 1009|       |             * Now search for the cipher alias in the ca_list. Be careful
 1010|       |             * with the strncmp, because the "buflen" limitation
 1011|       |             * will make the rule "ADH:SOME" and the cipher
 1012|       |             * "ADH-MY-CIPHER" look like a match for buflen=3.
 1013|       |             * So additionally check whether the cipher name found
 1014|       |             * has the correct length. We can save a strlen() call:
 1015|       |             * just checking for the '\0' at the right place is
 1016|       |             * sufficient, we have to strncmp() anyway. (We cannot
 1017|       |             * use strcasecmp(), because buf is not '\0' terminated.)
 1018|       |             */
 1019|  49.4k|            j = found = 0;
 1020|  49.4k|            cipher_id = 0;
 1021|  10.6M|            while (ca_list[j]) {
  ------------------
  |  Branch (1021:20): [True: 10.5M, False: 27.6k]
  ------------------
 1022|  10.5M|                if (OPENSSL_strncasecmp(buf, ca_list[j]->name, buflen) == 0
  ------------------
  |  Branch (1022:21): [True: 374k, False: 10.2M]
  ------------------
 1023|   374k|                    && (ca_list[j]->name[buflen] == '\0')) {
  ------------------
  |  Branch (1023:24): [True: 21.7k, False: 352k]
  ------------------
 1024|  21.7k|                    found = 1;
 1025|  21.7k|                    break;
 1026|  10.5M|                } else if (ca_list[j]->stdname != NULL
  ------------------
  |  Branch (1026:28): [True: 8.29M, False: 2.27M]
  ------------------
 1027|  8.29M|                    && OPENSSL_strncasecmp(buf, ca_list[j]->stdname, buflen) == 0
  ------------------
  |  Branch (1027:24): [True: 86.0k, False: 8.20M]
  ------------------
 1028|  86.0k|                    && ca_list[j]->stdname[buflen] == '\0') {
  ------------------
  |  Branch (1028:24): [True: 25, False: 86.0k]
  ------------------
 1029|     25|                    found = 1;
 1030|     25|                    break;
 1031|     25|                } else
 1032|  10.5M|                    j++;
 1033|  10.5M|            }
 1034|       |
 1035|  49.4k|            if (!found)
  ------------------
  |  Branch (1035:17): [True: 27.6k, False: 21.7k]
  ------------------
 1036|  27.6k|                break; /* ignore this entry */
 1037|       |
 1038|  21.7k|            if (ca_list[j]->algorithm_mkey) {
  ------------------
  |  Branch (1038:17): [True: 4.05k, False: 17.7k]
  ------------------
 1039|  4.05k|                if (alg_mkey) {
  ------------------
  |  Branch (1039:21): [True: 781, False: 3.27k]
  ------------------
 1040|    781|                    alg_mkey &= ca_list[j]->algorithm_mkey;
 1041|    781|                    if (!alg_mkey) {
  ------------------
  |  Branch (1041:25): [True: 79, False: 702]
  ------------------
 1042|     79|                        found = 0;
 1043|     79|                        break;
 1044|     79|                    }
 1045|  3.27k|                } else {
 1046|  3.27k|                    alg_mkey = ca_list[j]->algorithm_mkey;
 1047|  3.27k|                }
 1048|  4.05k|            }
 1049|       |
 1050|  21.6k|            if (ca_list[j]->algorithm_auth) {
  ------------------
  |  Branch (1050:17): [True: 2.35k, False: 19.3k]
  ------------------
 1051|  2.35k|                if (alg_auth) {
  ------------------
  |  Branch (1051:21): [True: 334, False: 2.01k]
  ------------------
 1052|    334|                    alg_auth &= ca_list[j]->algorithm_auth;
 1053|    334|                    if (!alg_auth) {
  ------------------
  |  Branch (1053:25): [True: 23, False: 311]
  ------------------
 1054|     23|                        found = 0;
 1055|     23|                        break;
 1056|     23|                    }
 1057|  2.01k|                } else {
 1058|  2.01k|                    alg_auth = ca_list[j]->algorithm_auth;
 1059|  2.01k|                }
 1060|  2.35k|            }
 1061|       |
 1062|  21.6k|            if (ca_list[j]->algorithm_enc) {
  ------------------
  |  Branch (1062:17): [True: 8.59k, False: 13.0k]
  ------------------
 1063|  8.59k|                if (alg_enc) {
  ------------------
  |  Branch (1063:21): [True: 42, False: 8.55k]
  ------------------
 1064|     42|                    alg_enc &= ca_list[j]->algorithm_enc;
 1065|     42|                    if (!alg_enc) {
  ------------------
  |  Branch (1065:25): [True: 12, False: 30]
  ------------------
 1066|     12|                        found = 0;
 1067|     12|                        break;
 1068|     12|                    }
 1069|  8.55k|                } else {
 1070|  8.55k|                    alg_enc = ca_list[j]->algorithm_enc;
 1071|  8.55k|                }
 1072|  8.59k|            }
 1073|       |
 1074|  21.6k|            if (ca_list[j]->algorithm_mac) {
  ------------------
  |  Branch (1074:17): [True: 3.71k, False: 17.9k]
  ------------------
 1075|  3.71k|                if (alg_mac) {
  ------------------
  |  Branch (1075:21): [True: 185, False: 3.52k]
  ------------------
 1076|    185|                    alg_mac &= ca_list[j]->algorithm_mac;
 1077|    185|                    if (!alg_mac) {
  ------------------
  |  Branch (1077:25): [True: 19, False: 166]
  ------------------
 1078|     19|                        found = 0;
 1079|     19|                        break;
 1080|     19|                    }
 1081|  3.52k|                } else {
 1082|  3.52k|                    alg_mac = ca_list[j]->algorithm_mac;
 1083|  3.52k|                }
 1084|  3.71k|            }
 1085|       |
 1086|  21.6k|            if (ca_list[j]->algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  249|  21.6k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1086:17): [True: 2.19k, False: 19.4k]
  ------------------
 1087|  2.19k|                if (algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  249|  2.19k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1087:21): [True: 344, False: 1.85k]
  ------------------
 1088|    344|                    algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  249|    344|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  249|    344|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1089|    344|                    if (!(algo_strength & SSL_STRONG_MASK)) {
  ------------------
  |  |  249|    344|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1089:25): [True: 162, False: 182]
  ------------------
 1090|    162|                        found = 0;
 1091|    162|                        break;
 1092|    162|                    }
 1093|  1.85k|                } else {
 1094|  1.85k|                    algo_strength = ca_list[j]->algo_strength & SSL_STRONG_MASK;
  ------------------
  |  |  249|  1.85k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1095|  1.85k|                }
 1096|  2.19k|            }
 1097|       |
 1098|  21.4k|            if (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  250|  21.4k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1098:17): [True: 3.93k, False: 17.5k]
  ------------------
 1099|  3.93k|                if (algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  250|  3.93k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1099:21): [True: 152, False: 3.78k]
  ------------------
 1100|    152|                    algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  250|    152|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  250|    152|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1101|    152|                    if (!(algo_strength & SSL_DEFAULT_MASK)) {
  ------------------
  |  |  250|    152|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1101:25): [True: 0, False: 152]
  ------------------
 1102|      0|                        found = 0;
 1103|      0|                        break;
 1104|      0|                    }
 1105|  3.78k|                } else {
 1106|  3.78k|                    algo_strength |= ca_list[j]->algo_strength & SSL_DEFAULT_MASK;
  ------------------
  |  |  250|  3.78k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1107|  3.78k|                }
 1108|  3.93k|            }
 1109|       |
 1110|  21.4k|            if (ca_list[j]->valid) {
  ------------------
  |  Branch (1110:17): [True: 398, False: 21.0k]
  ------------------
 1111|       |                /*
 1112|       |                 * explicit ciphersuite found; its protocol version does not
 1113|       |                 * become part of the search pattern!
 1114|       |                 */
 1115|       |
 1116|    398|                cipher_id = ca_list[j]->id;
 1117|  21.0k|            } else {
 1118|       |                /*
 1119|       |                 * not an explicit ciphersuite; only in this case, the
 1120|       |                 * protocol version is considered part of the search pattern
 1121|       |                 */
 1122|       |
 1123|  21.0k|                if (ca_list[j]->min_tls) {
  ------------------
  |  Branch (1123:21): [True: 382, False: 20.6k]
  ------------------
 1124|    382|                    if (min_tls != 0 && min_tls != ca_list[j]->min_tls) {
  ------------------
  |  Branch (1124:25): [True: 97, False: 285]
  |  Branch (1124:41): [True: 55, False: 42]
  ------------------
 1125|     55|                        found = 0;
 1126|     55|                        break;
 1127|    327|                    } else {
 1128|    327|                        min_tls = ca_list[j]->min_tls;
 1129|    327|                    }
 1130|    382|                }
 1131|  21.0k|            }
 1132|       |
 1133|  21.4k|            if (!multi)
  ------------------
  |  Branch (1133:17): [True: 18.0k, False: 3.31k]
  ------------------
 1134|  18.0k|                break;
 1135|  21.4k|        }
 1136|       |
 1137|       |        /*
 1138|       |         * Ok, we have the rule, now apply it
 1139|       |         */
 1140|  50.5k|        if (rule == CIPHER_SPECIAL) { /* special command */
  ------------------
  |  |  145|  50.5k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (1140:13): [True: 4.38k, False: 46.1k]
  ------------------
 1141|  4.38k|            ok = 0;
 1142|  4.38k|            if ((buflen == 8) && HAS_CASE_PREFIX(buf, "STRENGTH")) {
  ------------------
  |  |   63|    943|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 682, False: 261]
  |  |  ------------------
  ------------------
  |  Branch (1142:17): [True: 943, False: 3.44k]
  ------------------
 1143|    682|                ok = ssl_cipher_strength_sort(head_p, tail_p);
 1144|  3.70k|            } else if (buflen == 10
  ------------------
  |  Branch (1144:24): [True: 454, False: 3.24k]
  ------------------
 1145|    454|                && CHECK_AND_SKIP_CASE_PREFIX(buf, "SECLEVEL=")) {
  ------------------
  |  |   66|    454|    (HAS_CASE_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   63|    454|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:31): [True: 276, False: 178]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (66:5): [True: 276, False: 178]
  |  |  ------------------
  ------------------
 1146|    276|                int level = *buf - '0';
 1147|    276|                if (level < 0 || level > 5) {
  ------------------
  |  Branch (1147:21): [True: 77, False: 199]
  |  Branch (1147:34): [True: 68, False: 131]
  ------------------
 1148|    145|                    ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  357|    145|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|    145|    (ERR_new(),                                                  \
  |  |  |  |  360|    145|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    145|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|    145|        ERR_set_error)
  |  |  ------------------
  ------------------
 1149|    145|                } else {
 1150|    131|                    c->sec_level = level;
 1151|    131|                    ok = 1;
 1152|    131|                }
 1153|  3.42k|            } else {
 1154|  3.42k|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  357|  3.42k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  3.42k|    (ERR_new(),                                                  \
  |  |  |  |  360|  3.42k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  3.42k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  3.42k|        ERR_set_error)
  |  |  ------------------
  ------------------
 1155|  3.42k|            }
 1156|  4.38k|            if (ok == 0)
  ------------------
  |  Branch (1156:17): [True: 3.57k, False: 813]
  ------------------
 1157|  3.57k|                retval = 0;
 1158|       |            /*
 1159|       |             * We do not support any "multi" options
 1160|       |             * together with "@", so throw away the
 1161|       |             * rest of the command, if any left, until
 1162|       |             * end or ':' is found.
 1163|       |             */
 1164|  23.3k|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  570|  23.2k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (570:6): [True: 740, False: 22.4k]
  |  |  |  Branch (570:22): [True: 488, False: 21.9k]
  |  |  |  Branch (570:38): [True: 1.59k, False: 20.4k]
  |  |  |  Branch (570:54): [True: 1.45k, False: 18.9k]
  |  |  ------------------
  ------------------
  |  Branch (1164:20): [True: 23.2k, False: 102]
  ------------------
 1165|  18.9k|                l++;
 1166|  46.1k|        } else if (found) {
  ------------------
  |  Branch (1166:20): [True: 18.0k, False: 28.0k]
  ------------------
 1167|  18.0k|            ssl_cipher_apply_rule(cipher_id,
 1168|  18.0k|                alg_mkey, alg_auth, alg_enc, alg_mac,
 1169|  18.0k|                min_tls, algo_strength, rule, -1, head_p,
 1170|  18.0k|                tail_p);
 1171|  28.0k|        } else {
 1172|   111k|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  570|   111k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (570:6): [True: 2.92k, False: 108k]
  |  |  |  Branch (570:22): [True: 1.33k, False: 107k]
  |  |  |  Branch (570:38): [True: 15.2k, False: 91.7k]
  |  |  |  Branch (570:54): [True: 8.14k, False: 83.6k]
  |  |  ------------------
  ------------------
  |  Branch (1172:20): [True: 111k, False: 352]
  ------------------
 1173|  83.6k|                l++;
 1174|  28.0k|        }
 1175|  50.5k|        if (*l == '\0')
  ------------------
  |  Branch (1175:13): [True: 4.03k, False: 46.4k]
  ------------------
 1176|  4.03k|            break; /* done */
 1177|  50.5k|    }
 1178|       |
 1179|  4.15k|    return retval;
 1180|  4.34k|}
ssl_ciph.c:update_cipher_list_by_id:
 1289|  4.02k|{
 1290|  4.02k|    STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  |   33|  4.02k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  | 1050|  4.02k|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 1291|       |
 1292|  4.02k|    if (tmp_cipher_list == NULL) {
  ------------------
  |  Branch (1292:9): [True: 0, False: 4.02k]
  ------------------
 1293|      0|        return 0;
 1294|      0|    }
 1295|       |
 1296|  4.02k|    sk_SSL_CIPHER_free(*cipher_list_by_id);
  ------------------
  |  | 1034|  4.02k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1297|  4.02k|    *cipher_list_by_id = tmp_cipher_list;
 1298|       |
 1299|  4.02k|    (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id, ssl_cipher_ptr_id_cmp);
  ------------------
  |  | 1052|  4.02k|#define sk_SSL_CIPHER_set_cmp_func(sk, cmp) ((sk_SSL_CIPHER_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_compfunc_type(cmp)))
  ------------------
 1300|  4.02k|    sk_SSL_CIPHER_sort(*cipher_list_by_id);
  ------------------
  |  | 1048|  4.02k|#define sk_SSL_CIPHER_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1301|       |
 1302|  4.02k|    return 1;
 1303|  4.02k|}

SSL_CONF_CTX_free:
 1115|  3.35k|{
 1116|  3.35k|    if (cctx) {
  ------------------
  |  Branch (1116:9): [True: 0, False: 3.35k]
  ------------------
 1117|      0|        free_cert_filename(cctx);
 1118|      0|        OPENSSL_free(cctx->prefix);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1119|      0|        sk_X509_NAME_pop_free(cctx->canames, X509_NAME_free);
  ------------------
  |  |   70|      0|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 1120|      0|        OPENSSL_free(cctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1121|      0|    }
 1122|  3.35k|}

OPENSSL_init_ssl:
   47|  6.04k|{
   48|  6.04k|    static int stoperrset = 0;
   49|       |
   50|  6.04k|    if (stopped) {
  ------------------
  |  Branch (50:9): [True: 0, False: 6.04k]
  ------------------
   51|      0|        if (!stoperrset) {
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|       |            /*
   53|       |             * We only ever set this once to avoid getting into an infinite
   54|       |             * loop where the error system keeps trying to init and fails so
   55|       |             * sets an error etc
   56|       |             */
   57|      0|            stoperrset = 1;
   58|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INIT_FAIL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   59|      0|        }
   60|      0|        return 0;
   61|      0|    }
   62|       |
   63|  6.04k|    opts |= OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  507|  6.04k|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
   64|  6.04k|        | OPENSSL_INIT_ADD_ALL_DIGESTS;
  ------------------
  |  |  508|  6.04k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
   65|  6.04k|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
   66|  6.04k|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG) == 0)
  ------------------
  |  |  512|  6.04k|#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
  ------------------
  |  Branch (66:9): [True: 6.04k, False: 0]
  ------------------
   67|  6.04k|        opts |= OPENSSL_INIT_LOAD_CONFIG;
  ------------------
  |  |  511|  6.04k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
   68|  6.04k|#endif
   69|       |
   70|  6.04k|    if (!OPENSSL_init_crypto(opts, settings))
  ------------------
  |  Branch (70:9): [True: 0, False: 6.04k]
  ------------------
   71|      0|        return 0;
   72|       |
   73|  6.04k|    if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base))
  ------------------
  |  |  130|  6.04k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 6.04k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (73:9): [True: 0, False: 6.04k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|  6.04k|    return 1;
   77|  6.04k|}
ssl_init.c:ossl_init_ssl_base:
   25|      1|{
   26|      1|#ifndef OPENSSL_NO_COMP
   27|      1|    OSSL_TRACE(INIT, "ossl_init_ssl_base: "
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   28|      1|                     "SSL_COMP_get_compression_methods()\n");
   29|       |    /*
   30|       |     * This will initialise the built-in compression algorithms. The value
   31|       |     * returned is a STACK_OF(SSL_COMP), but that can be discarded safely
   32|       |     */
   33|      1|    SSL_COMP_get_compression_methods();
   34|      1|#endif
   35|      1|    ssl_sort_cipher_list();
   36|      1|    OSSL_TRACE(INIT, "ossl_init_ssl_base: SSL_add_ssl_module()\n");
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   37|      1|    ssl_base_inited = 1;
   38|      1|    return 1;
   39|      1|}

SSL_clear:
  561|  2.58k|{
  562|  2.58k|    if (s->method == NULL) {
  ------------------
  |  Branch (562:9): [True: 0, False: 2.58k]
  ------------------
  563|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_METHOD_SPECIFIED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|        return 0;
  565|      0|    }
  566|       |
  567|  2.58k|    return s->method->ssl_reset(s);
  568|  2.58k|}
ossl_ssl_connection_reset:
  571|  5.17k|{
  572|  5.17k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  5.17k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  5.17k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 5.17k]
  |  |  |  |  ------------------
  |  |  |  |   33|  5.17k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  5.17k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 5.17k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  5.17k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  5.17k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  573|       |
  574|  5.17k|    if (sc == NULL)
  ------------------
  |  Branch (574:9): [True: 0, False: 5.17k]
  ------------------
  575|      0|        return 0;
  576|       |
  577|  5.17k|    if (ssl_clear_bad_session(sc)) {
  ------------------
  |  Branch (577:9): [True: 0, False: 5.17k]
  ------------------
  578|      0|        SSL_SESSION_free(sc->session);
  579|      0|        sc->session = NULL;
  580|      0|    }
  581|  5.17k|    SSL_SESSION_free(sc->psksession);
  582|  5.17k|    sc->psksession = NULL;
  583|  5.17k|    OPENSSL_free(sc->psksession_id);
  ------------------
  |  |  132|  5.17k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  584|  5.17k|    sc->psksession_id = NULL;
  585|  5.17k|    sc->psksession_id_len = 0;
  586|  5.17k|    sc->hello_retry_request = SSL_HRR_NONE;
  587|  5.17k|    sc->sent_tickets = 0;
  588|       |
  589|  5.17k|    sc->error = 0;
  590|  5.17k|    sc->hit = 0;
  591|  5.17k|    sc->shutdown = 0;
  592|       |
  593|  5.17k|    if (sc->renegotiate) {
  ------------------
  |  Branch (593:9): [True: 0, False: 5.17k]
  ------------------
  594|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  595|      0|        return 0;
  596|      0|    }
  597|       |
  598|  5.17k|    ossl_statem_clear(sc);
  599|       |
  600|  5.17k|    sc->version = s->method->version;
  601|  5.17k|    sc->client_version = sc->version;
  602|  5.17k|    sc->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  5.17k|#define SSL_NOTHING 1
  ------------------
  603|       |
  604|  5.17k|    BUF_MEM_free(sc->init_buf);
  605|  5.17k|    sc->init_buf = NULL;
  606|  5.17k|    sc->first_packet = 0;
  607|       |
  608|  5.17k|    sc->key_update = SSL_KEY_UPDATE_NONE;
  ------------------
  |  | 1071|  5.17k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  609|  5.17k|    memset(sc->ext.compress_certificate_from_peer, 0,
  610|  5.17k|        sizeof(sc->ext.compress_certificate_from_peer));
  611|  5.17k|    sc->ext.compress_certificate_sent = 0;
  612|       |
  613|  5.17k|    EVP_MD_CTX_free(sc->pha_dgst);
  614|  5.17k|    sc->pha_dgst = NULL;
  615|       |
  616|       |    /* Reset DANE verification result state */
  617|  5.17k|    sc->dane.mdpth = -1;
  618|  5.17k|    sc->dane.pdpth = -1;
  619|  5.17k|    X509_free(sc->dane.mcert);
  620|  5.17k|    sc->dane.mcert = NULL;
  621|  5.17k|    sc->dane.mtlsa = NULL;
  622|       |
  623|       |    /* Clear the verification result peername */
  624|  5.17k|    X509_VERIFY_PARAM_move_peername(sc->param, NULL);
  625|       |
  626|       |    /* Clear any shared connection state */
  627|  5.17k|    OPENSSL_free(sc->shared_sigalgs);
  ------------------
  |  |  132|  5.17k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  628|  5.17k|    sc->shared_sigalgs = NULL;
  629|  5.17k|    sc->shared_sigalgslen = 0;
  630|       |
  631|       |    /*
  632|       |     * Check to see if we were changed into a different method, if so, revert
  633|       |     * back.
  634|       |     */
  635|  5.17k|    if (s->method != s->defltmeth) {
  ------------------
  |  Branch (635:9): [True: 0, False: 5.17k]
  ------------------
  636|      0|        s->method->ssl_deinit(s);
  637|      0|        s->method = s->defltmeth;
  638|      0|        if (!s->method->ssl_init(s))
  ------------------
  |  Branch (638:13): [True: 0, False: 0]
  ------------------
  639|      0|            return 0;
  640|  5.17k|    } else {
  641|  5.17k|        if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (641:13): [True: 0, False: 5.17k]
  ------------------
  642|      0|            return 0;
  643|  5.17k|    }
  644|       |
  645|  5.17k|    ossl_quic_tls_clear(sc->qtls);
  646|       |
  647|  5.17k|    if (!RECORD_LAYER_reset(&sc->rlayer))
  ------------------
  |  Branch (647:9): [True: 0, False: 5.17k]
  ------------------
  648|      0|        return 0;
  649|       |
  650|  5.17k|    return 1;
  651|  5.17k|}
SSL_new:
  684|  2.58k|{
  685|  2.58k|    if (ctx == NULL) {
  ------------------
  |  Branch (685:9): [True: 0, False: 2.58k]
  ------------------
  686|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NULL_SSL_CTX);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  687|      0|        return NULL;
  688|      0|    }
  689|  2.58k|    if (ctx->method == NULL) {
  ------------------
  |  Branch (689:9): [True: 0, False: 2.58k]
  ------------------
  690|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  691|      0|        return NULL;
  692|      0|    }
  693|  2.58k|    return ctx->method->ssl_new(ctx);
  694|  2.58k|}
ossl_ssl_init:
  697|  2.58k|{
  698|  2.58k|    if (!SSL_CTX_up_ref(ctx))
  ------------------
  |  Branch (698:9): [True: 0, False: 2.58k]
  ------------------
  699|      0|        return 0;
  700|       |
  701|  2.58k|    ssl->lock = CRYPTO_THREAD_lock_new();
  702|       |
  703|  2.58k|    if (ssl->lock == NULL || !CRYPTO_NEW_REF(&ssl->references, 1))
  ------------------
  |  Branch (703:9): [True: 0, False: 2.58k]
  |  Branch (703:30): [True: 0, False: 2.58k]
  ------------------
  704|      0|        goto err;
  705|       |
  706|  2.58k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL, ssl, &ssl->ex_data)) {
  ------------------
  |  |  251|  2.58k|#define CRYPTO_EX_INDEX_SSL 0
  ------------------
  |  Branch (706:9): [True: 0, False: 2.58k]
  ------------------
  707|      0|        CRYPTO_FREE_REF(&ssl->references);
  708|      0|        goto err;
  709|      0|    }
  710|       |
  711|  2.58k|    ssl->ctx = ctx;
  712|  2.58k|    ssl->type = type;
  713|  2.58k|    ssl->defltmeth = ssl->method = method;
  714|       |
  715|  2.58k|    return 1;
  716|       |
  717|      0|err:
  718|      0|    CRYPTO_THREAD_lock_free(ssl->lock);
  719|       |    ssl->lock = NULL;
  720|      0|    SSL_CTX_free(ctx);
  721|      0|    return 0;
  722|  2.58k|}
ossl_ssl_connection_new_int:
  726|  2.58k|{
  727|  2.58k|    SSL_CONNECTION *s;
  728|  2.58k|    SSL *ssl;
  729|       |
  730|  2.58k|    s = OPENSSL_zalloc(sizeof(*s));
  ------------------
  |  |  109|  2.58k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  731|  2.58k|    if (s == NULL)
  ------------------
  |  Branch (731:9): [True: 0, False: 2.58k]
  ------------------
  732|      0|        return NULL;
  733|       |
  734|  2.58k|    ssl = &s->ssl;
  735|  2.58k|    s->user_ssl = (user_ssl == NULL) ? ssl : user_ssl;
  ------------------
  |  Branch (735:19): [True: 2.58k, False: 0]
  ------------------
  736|       |
  737|  2.58k|    if (!ossl_ssl_init(ssl, ctx, method, SSL_TYPE_SSL_CONNECTION)) {
  ------------------
  |  | 1225|  2.58k|#define SSL_TYPE_SSL_CONNECTION 0
  ------------------
  |  Branch (737:9): [True: 0, False: 2.58k]
  ------------------
  738|      0|        OPENSSL_free(s);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  739|      0|        s = NULL;
  740|      0|        ssl = NULL;
  741|      0|        goto sslerr;
  742|      0|    }
  743|       |
  744|  2.58k|    RECORD_LAYER_init(&s->rlayer, s);
  745|       |
  746|  2.58k|    s->options = ctx->options;
  747|       |
  748|  2.58k|    s->dane.flags = ctx->dane.flags;
  749|  2.58k|    if (method->version == ctx->method->version) {
  ------------------
  |  Branch (749:9): [True: 2.58k, False: 0]
  ------------------
  750|  2.58k|        s->min_proto_version = ctx->min_proto_version;
  751|  2.58k|        s->max_proto_version = ctx->max_proto_version;
  752|  2.58k|    }
  753|       |
  754|  2.58k|    s->mode = ctx->mode;
  755|  2.58k|    s->max_cert_list = ctx->max_cert_list;
  756|  2.58k|    s->max_early_data = ctx->max_early_data;
  757|  2.58k|    s->recv_max_early_data = ctx->recv_max_early_data;
  758|       |
  759|  2.58k|    s->num_tickets = ctx->num_tickets;
  760|  2.58k|    s->pha_enabled = ctx->pha_enabled;
  761|       |
  762|       |    /* Shallow copy of the ciphersuites stack */
  763|  2.58k|    s->tls13_ciphersuites = sk_SSL_CIPHER_dup(ctx->tls13_ciphersuites);
  ------------------
  |  | 1050|  2.58k|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
  764|  2.58k|    if (s->tls13_ciphersuites == NULL)
  ------------------
  |  Branch (764:9): [True: 0, False: 2.58k]
  ------------------
  765|      0|        goto cerr;
  766|       |
  767|       |    /*
  768|       |     * Earlier library versions used to copy the pointer to the CERT, not
  769|       |     * its contents; only when setting new parameters for the per-SSL
  770|       |     * copy, ssl_cert_new would be called (and the direct reference to
  771|       |     * the per-SSL_CTX settings would be lost, but those still were
  772|       |     * indirectly accessed for various purposes, and for that reason they
  773|       |     * used to be known as s->ctx->default_cert). Now we don't look at the
  774|       |     * SSL_CTX's CERT after having duplicated it once.
  775|       |     */
  776|  2.58k|    s->cert = ssl_cert_dup(ctx->cert);
  777|  2.58k|    if (s->cert == NULL)
  ------------------
  |  Branch (777:9): [True: 0, False: 2.58k]
  ------------------
  778|      0|        goto sslerr;
  779|       |
  780|  2.58k|    RECORD_LAYER_set_read_ahead(&s->rlayer, ctx->read_ahead);
  ------------------
  |  |  134|  2.58k|#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
  ------------------
  781|  2.58k|    s->msg_callback = ctx->msg_callback;
  782|  2.58k|    s->msg_callback_arg = ctx->msg_callback_arg;
  783|  2.58k|    s->verify_mode = ctx->verify_mode;
  784|  2.58k|    s->not_resumable_session_cb = ctx->not_resumable_session_cb;
  785|  2.58k|    s->rlayer.record_padding_cb = ctx->record_padding_cb;
  786|  2.58k|    s->rlayer.record_padding_arg = ctx->record_padding_arg;
  787|  2.58k|    s->rlayer.block_padding = ctx->block_padding;
  788|  2.58k|    s->rlayer.hs_padding = ctx->hs_padding;
  789|  2.58k|    s->sid_ctx_length = ctx->sid_ctx_length;
  790|  2.58k|    if (!ossl_assert(s->sid_ctx_length <= sizeof(s->sid_ctx)))
  ------------------
  |  |   52|  2.58k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.58k|    __FILE__, __LINE__)
  ------------------
  |  Branch (790:9): [True: 0, False: 2.58k]
  ------------------
  791|      0|        goto err;
  792|  2.58k|    memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx));
  793|  2.58k|    s->verify_callback = ctx->default_verify_callback;
  794|  2.58k|    s->generate_session_id = ctx->generate_session_id;
  795|       |
  796|  2.58k|    s->param = X509_VERIFY_PARAM_new();
  797|  2.58k|    if (s->param == NULL)
  ------------------
  |  Branch (797:9): [True: 0, False: 2.58k]
  ------------------
  798|      0|        goto asn1err;
  799|  2.58k|    X509_VERIFY_PARAM_inherit(s->param, ctx->param);
  800|  2.58k|    s->quiet_shutdown = IS_QUIC_CTX(ctx) ? 0 : ctx->quiet_shutdown;
  ------------------
  |  |   54|  2.58k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  2.58k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method() || (m) == OSSL_QUIC_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (52:121): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  801|       |
  802|  2.58k|    if (!IS_QUIC_CTX(ctx))
  ------------------
  |  |   54|  2.58k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  2.58k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method() || (m) == OSSL_QUIC_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (52:121): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  803|  2.58k|        s->ext.max_fragment_len_mode = ctx->ext.max_fragment_len_mode;
  804|       |
  805|  2.58k|    s->max_send_fragment = ctx->max_send_fragment;
  806|  2.58k|    s->split_send_fragment = ctx->split_send_fragment;
  807|  2.58k|    s->max_pipelines = ctx->max_pipelines;
  808|  2.58k|    s->rlayer.default_read_buf_len = ctx->default_read_buf_len;
  809|       |
  810|  2.58k|    s->ext.debug_cb = 0;
  811|  2.58k|    s->ext.debug_arg = NULL;
  812|  2.58k|    s->ext.ticket_expected = 0;
  813|  2.58k|    s->ext.status_type = ctx->ext.status_type;
  814|  2.58k|    s->ext.status_expected = 0;
  815|  2.58k|    s->ext.ocsp.ids = NULL;
  816|  2.58k|    s->ext.ocsp.exts = NULL;
  817|  2.58k|    s->ext.ocsp.resp = NULL;
  818|  2.58k|    s->ext.ocsp.resp_len = 0;
  819|  2.58k|    s->ext.ocsp.resp_ex = NULL;
  820|       |
  821|  2.58k|    if (!SSL_CTX_up_ref(ctx))
  ------------------
  |  Branch (821:9): [True: 0, False: 2.58k]
  ------------------
  822|      0|        goto err;
  823|       |
  824|  2.58k|    s->session_ctx = ctx;
  825|  2.58k|    if (ctx->ext.ecpointformats != NULL) {
  ------------------
  |  Branch (825:9): [True: 0, False: 2.58k]
  ------------------
  826|      0|        s->ext.ecpointformats = OPENSSL_memdup(ctx->ext.ecpointformats,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  827|      0|            ctx->ext.ecpointformats_len);
  828|      0|        if (s->ext.ecpointformats == NULL) {
  ------------------
  |  Branch (828:13): [True: 0, False: 0]
  ------------------
  829|      0|            s->ext.ecpointformats_len = 0;
  830|      0|            goto err;
  831|      0|        }
  832|      0|        s->ext.ecpointformats_len = ctx->ext.ecpointformats_len;
  833|      0|    }
  834|  2.58k|    if (ctx->ext.supportedgroups != NULL) {
  ------------------
  |  Branch (834:9): [True: 2.58k, False: 0]
  ------------------
  835|  2.58k|        size_t add = 0;
  836|       |
  837|  2.58k|        if (ctx->ext.supportedgroups_len == 0)
  ------------------
  |  Branch (837:13): [True: 33, False: 2.55k]
  ------------------
  838|       |            /* Add 1 so allocation won't fail */
  839|     33|            add = 1;
  840|  2.58k|        s->ext.supportedgroups = OPENSSL_memdup(ctx->ext.supportedgroups,
  ------------------
  |  |  134|  2.58k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  841|  2.58k|            (ctx->ext.supportedgroups_len + add)
  842|  2.58k|                * sizeof(*ctx->ext.supportedgroups));
  843|  2.58k|        if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (843:13): [True: 0, False: 2.58k]
  ------------------
  844|      0|            s->ext.supportedgroups_len = 0;
  845|      0|            goto err;
  846|      0|        }
  847|  2.58k|        s->ext.supportedgroups_len = ctx->ext.supportedgroups_len;
  848|  2.58k|    }
  849|  2.58k|    if (ctx->ext.keyshares != NULL) {
  ------------------
  |  Branch (849:9): [True: 2.58k, False: 0]
  ------------------
  850|  2.58k|        size_t add = 0;
  851|       |
  852|  2.58k|        if (ctx->ext.keyshares_len == 0)
  ------------------
  |  Branch (852:13): [True: 33, False: 2.55k]
  ------------------
  853|       |            /* Add 1 so allocation won't fail */
  854|     33|            add = 1;
  855|  2.58k|        s->ext.keyshares = OPENSSL_memdup(ctx->ext.keyshares,
  ------------------
  |  |  134|  2.58k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  856|  2.58k|            (ctx->ext.keyshares_len + add)
  857|  2.58k|                * sizeof(*ctx->ext.keyshares));
  858|  2.58k|        if (s->ext.keyshares == NULL) {
  ------------------
  |  Branch (858:13): [True: 0, False: 2.58k]
  ------------------
  859|      0|            s->ext.keyshares_len = 0;
  860|      0|            goto err;
  861|      0|        }
  862|  2.58k|        s->ext.keyshares_len = ctx->ext.keyshares_len;
  863|  2.58k|    }
  864|  2.58k|    if (ctx->ext.tuples != NULL) {
  ------------------
  |  Branch (864:9): [True: 2.58k, False: 0]
  ------------------
  865|  2.58k|        size_t add = 0;
  866|       |
  867|  2.58k|        if (ctx->ext.tuples_len == 0)
  ------------------
  |  Branch (867:13): [True: 33, False: 2.55k]
  ------------------
  868|       |            /* Add 1 so allocation won't fail */
  869|     33|            add = 1;
  870|  2.58k|        s->ext.tuples = OPENSSL_memdup(ctx->ext.tuples,
  ------------------
  |  |  134|  2.58k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  871|  2.58k|            (ctx->ext.tuples_len + add)
  872|  2.58k|                * sizeof(*ctx->ext.tuples));
  873|  2.58k|        if (s->ext.tuples == NULL) {
  ------------------
  |  Branch (873:13): [True: 0, False: 2.58k]
  ------------------
  874|      0|            s->ext.tuples_len = 0;
  875|      0|            goto err;
  876|      0|        }
  877|  2.58k|        s->ext.tuples_len = ctx->ext.tuples_len;
  878|  2.58k|    }
  879|       |
  880|  2.58k|#ifndef OPENSSL_NO_NEXTPROTONEG
  881|  2.58k|    s->ext.npn = NULL;
  882|  2.58k|#endif
  883|       |
  884|  2.58k|    if (ctx->ext.alpn != NULL) {
  ------------------
  |  Branch (884:9): [True: 0, False: 2.58k]
  ------------------
  885|      0|        s->ext.alpn = OPENSSL_malloc(ctx->ext.alpn_len);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  886|      0|        if (s->ext.alpn == NULL) {
  ------------------
  |  Branch (886:13): [True: 0, False: 0]
  ------------------
  887|      0|            s->ext.alpn_len = 0;
  888|      0|            goto err;
  889|      0|        }
  890|      0|        memcpy(s->ext.alpn, ctx->ext.alpn, ctx->ext.alpn_len);
  891|      0|        s->ext.alpn_len = ctx->ext.alpn_len;
  892|      0|    }
  893|       |
  894|  2.58k|    s->verified_chain = NULL;
  895|  2.58k|    s->verify_result = X509_V_OK;
  ------------------
  |  |  312|  2.58k|#define X509_V_OK 0
  ------------------
  896|       |
  897|  2.58k|    s->default_passwd_callback = ctx->default_passwd_callback;
  898|  2.58k|    s->default_passwd_callback_userdata = ctx->default_passwd_callback_userdata;
  899|       |
  900|  2.58k|    s->key_update = SSL_KEY_UPDATE_NONE;
  ------------------
  |  | 1071|  2.58k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  901|       |
  902|  2.58k|    if (!IS_QUIC_CTX(ctx)) {
  ------------------
  |  |   54|  2.58k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  2.58k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method() || (m) == OSSL_QUIC_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 2.58k]
  |  |  |  |  |  Branch (52:121): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  903|  2.58k|        s->allow_early_data_cb = ctx->allow_early_data_cb;
  904|  2.58k|        s->allow_early_data_cb_data = ctx->allow_early_data_cb_data;
  905|  2.58k|    }
  906|       |
  907|  2.58k|    if (!method->ssl_init(ssl))
  ------------------
  |  Branch (907:9): [True: 0, False: 2.58k]
  ------------------
  908|      0|        goto sslerr;
  909|       |
  910|  2.58k|    s->server = (method->ssl_accept == ssl_undefined_function) ? 0 : 1;
  ------------------
  |  Branch (910:17): [True: 2.58k, False: 0]
  ------------------
  911|       |
  912|  2.58k|    if (!method->ssl_reset(ssl))
  ------------------
  |  Branch (912:9): [True: 0, False: 2.58k]
  ------------------
  913|      0|        goto sslerr;
  914|       |
  915|  2.58k|#ifndef OPENSSL_NO_PSK
  916|  2.58k|    s->psk_client_callback = ctx->psk_client_callback;
  917|  2.58k|    s->psk_server_callback = ctx->psk_server_callback;
  918|  2.58k|#endif
  919|  2.58k|    s->psk_find_session_cb = ctx->psk_find_session_cb;
  920|  2.58k|    s->psk_use_session_cb = ctx->psk_use_session_cb;
  921|       |
  922|  2.58k|    s->async_cb = ctx->async_cb;
  923|  2.58k|    s->async_cb_arg = ctx->async_cb_arg;
  924|       |
  925|  2.58k|    s->job = NULL;
  926|       |
  927|       |#ifndef OPENSSL_NO_COMP_ALG
  928|       |    memcpy(s->cert_comp_prefs, ctx->cert_comp_prefs, sizeof(s->cert_comp_prefs));
  929|       |#endif
  930|  2.58k|    if (ctx->client_cert_type != NULL) {
  ------------------
  |  Branch (930:9): [True: 0, False: 2.58k]
  ------------------
  931|      0|        s->client_cert_type = OPENSSL_memdup(ctx->client_cert_type,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  932|      0|            ctx->client_cert_type_len);
  933|      0|        if (s->client_cert_type == NULL)
  ------------------
  |  Branch (933:13): [True: 0, False: 0]
  ------------------
  934|      0|            goto sslerr;
  935|      0|        s->client_cert_type_len = ctx->client_cert_type_len;
  936|      0|    }
  937|  2.58k|    if (ctx->server_cert_type != NULL) {
  ------------------
  |  Branch (937:9): [True: 0, False: 2.58k]
  ------------------
  938|      0|        s->server_cert_type = OPENSSL_memdup(ctx->server_cert_type,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  939|      0|            ctx->server_cert_type_len);
  940|      0|        if (s->server_cert_type == NULL)
  ------------------
  |  Branch (940:13): [True: 0, False: 0]
  ------------------
  941|      0|            goto sslerr;
  942|      0|        s->server_cert_type_len = ctx->server_cert_type_len;
  943|      0|    }
  944|       |
  945|  2.58k|#ifndef OPENSSL_NO_CT
  946|  2.58k|    if (!SSL_set_ct_validation_callback(ssl, ctx->ct_validation_callback,
  ------------------
  |  Branch (946:9): [True: 0, False: 2.58k]
  ------------------
  947|  2.58k|            ctx->ct_validation_callback_arg))
  948|      0|        goto sslerr;
  949|  2.58k|#endif
  950|       |
  951|  2.58k|#ifndef OPENSSL_NO_ECH
  952|  2.58k|    if (!ossl_ech_conn_init(s, ctx, method))
  ------------------
  |  Branch (952:9): [True: 0, False: 2.58k]
  ------------------
  953|      0|        goto sslerr;
  954|  2.58k|#endif
  955|       |
  956|  2.58k|    s->ssl_pkey_num = SSL_PKEY_NUM + ctx->sigalg_list_len;
  ------------------
  |  |  336|  2.58k|#define SSL_PKEY_NUM 9
  ------------------
  957|  2.58k|    return ssl;
  958|      0|cerr:
  959|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  960|      0|    goto err;
  961|      0|asn1err:
  962|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  963|      0|    goto err;
  964|      0|sslerr:
  965|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  966|      0|err:
  967|      0|    SSL_free(ssl);
  968|       |    return NULL;
  969|      0|}
ossl_ssl_connection_new:
  972|  2.58k|{
  973|       |    return ossl_ssl_connection_new_int(ctx, NULL, ctx->method);
  974|  2.58k|}
SSL_free:
 1470|  2.58k|{
 1471|  2.58k|    int i;
 1472|       |
 1473|  2.58k|    if (s == NULL)
  ------------------
  |  Branch (1473:9): [True: 0, False: 2.58k]
  ------------------
 1474|      0|        return;
 1475|  2.58k|    CRYPTO_DOWN_REF(&s->references, &i);
 1476|  2.58k|    REF_PRINT_COUNT("SSL", i, s);
  ------------------
  |  |  301|  2.58k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  2.58k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  2.58k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  2.58k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1477|  2.58k|    if (i > 0)
  ------------------
  |  Branch (1477:9): [True: 0, False: 2.58k]
  ------------------
 1478|      0|        return;
 1479|  2.58k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  2.58k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.58k]
  |  |  ------------------
  ------------------
 1480|       |
 1481|  2.58k|    if (s->method != NULL)
  ------------------
  |  Branch (1481:9): [True: 2.58k, False: 0]
  ------------------
 1482|  2.58k|        s->method->ssl_free(s);
 1483|       |
 1484|  2.58k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data);
  ------------------
  |  |  251|  2.58k|#define CRYPTO_EX_INDEX_SSL 0
  ------------------
 1485|  2.58k|    SSL_CTX_free(s->ctx);
 1486|  2.58k|    CRYPTO_THREAD_lock_free(s->lock);
 1487|  2.58k|    CRYPTO_FREE_REF(&s->references);
 1488|       |
 1489|  2.58k|    OPENSSL_free(s);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1490|  2.58k|}
ossl_ssl_connection_free:
 1493|  2.58k|{
 1494|  2.58k|    SSL_CONNECTION *s;
 1495|       |
 1496|  2.58k|    s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  2.58k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  2.58k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  |  |   18|  2.58k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.58k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 2.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  2.58k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  2.58k|                             : NULL))
  |  |  ------------------
  ------------------
 1497|  2.58k|    if (s == NULL)
  ------------------
  |  Branch (1497:9): [True: 0, False: 2.58k]
  ------------------
 1498|      0|        return;
 1499|       |
 1500|       |    /*
 1501|       |     * Ignore return values. This could result in user callbacks being called
 1502|       |     * e.g. for the QUIC TLS record layer. So we do this early before we have
 1503|       |     * freed other things.
 1504|       |     */
 1505|  2.58k|    ssl_free_wbio_buffer(s);
 1506|  2.58k|    RECORD_LAYER_clear(&s->rlayer);
 1507|       |
 1508|  2.58k|    X509_VERIFY_PARAM_free(s->param);
 1509|  2.58k|    dane_final(&s->dane);
 1510|       |
 1511|  2.58k|    BUF_MEM_free(s->init_buf);
 1512|       |
 1513|       |    /* add extra stuff */
 1514|  2.58k|    sk_SSL_CIPHER_free(s->cipher_list);
  ------------------
  |  | 1034|  2.58k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1515|  2.58k|    sk_SSL_CIPHER_free(s->cipher_list_by_id);
  ------------------
  |  | 1034|  2.58k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1516|  2.58k|    sk_SSL_CIPHER_free(s->tls13_ciphersuites);
  ------------------
  |  | 1034|  2.58k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1517|  2.58k|    sk_SSL_CIPHER_free(s->peer_ciphers);
  ------------------
  |  | 1034|  2.58k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1518|       |
 1519|       |    /* Make the next call work :-) */
 1520|  2.58k|    if (s->session != NULL) {
  ------------------
  |  Branch (1520:9): [True: 2.57k, False: 8]
  ------------------
 1521|  2.57k|        ssl_clear_bad_session(s);
 1522|  2.57k|        SSL_SESSION_free(s->session);
 1523|  2.57k|    }
 1524|  2.58k|    SSL_SESSION_free(s->psksession);
 1525|  2.58k|    OPENSSL_free(s->psksession_id);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1526|       |
 1527|  2.58k|    ssl_cert_free(s->cert);
 1528|  2.58k|    OPENSSL_free(s->shared_sigalgs);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1529|       |    /* Free up if allocated */
 1530|       |
 1531|  2.58k|    OPENSSL_free(s->ext.hostname);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1532|  2.58k|    SSL_CTX_free(s->session_ctx);
 1533|  2.58k|    OPENSSL_free(s->ext.ecpointformats);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1534|  2.58k|    OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1535|  2.58k|    OPENSSL_free(s->ext.supportedgroups);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1536|  2.58k|    OPENSSL_free(s->ext.keyshares);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1537|  2.58k|    OPENSSL_free(s->ext.tuples);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1538|  2.58k|    OPENSSL_free(s->ext.peer_supportedgroups);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1539|  2.58k|    sk_X509_EXTENSION_pop_free(s->ext.ocsp.exts, X509_EXTENSION_free);
  ------------------
  |  |  256|  2.58k|#define sk_X509_EXTENSION_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_freefunc_type(freefunc))
  ------------------
 1540|       |
 1541|  2.58k|#ifndef OPENSSL_NO_OCSP
 1542|  2.58k|    OPENSSL_free(s->ext.ocsp.resp);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1543|  2.58k|    s->ext.ocsp.resp = NULL;
 1544|  2.58k|    s->ext.ocsp.resp_len = 0;
 1545|       |
 1546|  2.58k|    sk_OCSP_RESPID_pop_free(s->ext.ocsp.ids, OCSP_RESPID_free);
  ------------------
  |  |  180|  2.58k|#define sk_OCSP_RESPID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_freefunc_type(freefunc))
  ------------------
 1547|  2.58k|    sk_OCSP_RESPONSE_pop_free(s->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 1548|  2.58k|    s->ext.ocsp.resp_ex = NULL;
 1549|  2.58k|#endif
 1550|  2.58k|#ifndef OPENSSL_NO_CT
 1551|  2.58k|    SCT_LIST_free(s->scts);
 1552|  2.58k|    OPENSSL_free(s->ext.scts);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1553|  2.58k|#endif
 1554|  2.58k|    OPENSSL_free(s->ext.alpn);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1555|  2.58k|    OPENSSL_free(s->ext.tls13_cookie);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1556|  2.58k|    if (s->clienthello != NULL)
  ------------------
  |  Branch (1556:9): [True: 0, False: 2.58k]
  ------------------
 1557|      0|        OPENSSL_free(s->clienthello->pre_proc_exts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1558|  2.58k|    OPENSSL_free(s->clienthello);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1559|  2.58k|    OPENSSL_free(s->pha_context);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1560|  2.58k|    EVP_MD_CTX_free(s->pha_dgst);
 1561|       |
 1562|  2.58k|    sk_X509_NAME_pop_free(s->ca_names, X509_NAME_free);
  ------------------
  |  |   70|  2.58k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 1563|  2.58k|    sk_X509_NAME_pop_free(s->client_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  2.58k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 1564|       |
 1565|  2.58k|    OPENSSL_free(s->client_cert_type);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1566|  2.58k|    OPENSSL_free(s->server_cert_type);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1567|       |
 1568|  2.58k|    OSSL_STACK_OF_X509_free(s->verified_chain);
 1569|       |
 1570|  2.58k|    if (ssl->method != NULL)
  ------------------
  |  Branch (1570:9): [True: 2.58k, False: 0]
  ------------------
 1571|  2.58k|        ssl->method->ssl_deinit(ssl);
 1572|       |
 1573|  2.58k|    ASYNC_WAIT_CTX_free(s->waitctx);
 1574|       |
 1575|  2.58k|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 1576|  2.58k|    OPENSSL_free(s->ext.npn);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1577|  2.58k|#endif
 1578|       |
 1579|  2.58k|#ifndef OPENSSL_NO_SRTP
 1580|  2.58k|    sk_SRTP_PROTECTION_PROFILE_free(s->srtp_profiles);
  ------------------
  |  |  257|  2.58k|#define sk_SRTP_PROTECTION_PROFILE_free(sk) OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
 1581|  2.58k|#endif
 1582|       |
 1583|       |    /*
 1584|       |     * We do this late. We want to ensure that any other references we held to
 1585|       |     * these BIOs are freed first *before* we call BIO_free_all(), because
 1586|       |     * BIO_free_all() will only free each BIO in the chain if the number of
 1587|       |     * references to the first BIO have dropped to 0
 1588|       |     */
 1589|  2.58k|    BIO_free_all(s->wbio);
 1590|  2.58k|    s->wbio = NULL;
 1591|  2.58k|    BIO_free_all(s->rbio);
 1592|  2.58k|    s->rbio = NULL;
 1593|  2.58k|    OPENSSL_free(s->s3.tmp.valid_flags);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1594|  2.58k|#ifndef OPENSSL_NO_ECH
 1595|  2.58k|    ossl_ech_conn_clear(&s->ext.ech);
 1596|  2.58k|#endif
 1597|  2.58k|}
SSL_set0_rbio:
 1600|  2.58k|{
 1601|  2.58k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.58k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.58k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.58k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.58k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.58k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.58k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1602|       |
 1603|  2.58k|#ifndef OPENSSL_NO_QUIC
 1604|  2.58k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  2.58k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  2.58k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 2.58k, False: 0]
  |  |  ------------------
  ------------------
 1605|      0|        ossl_quic_conn_set0_net_rbio(s, rbio);
 1606|      0|        return;
 1607|      0|    }
 1608|  2.58k|#endif
 1609|       |
 1610|  2.58k|    if (sc == NULL)
  ------------------
  |  Branch (1610:9): [True: 0, False: 2.58k]
  ------------------
 1611|      0|        return;
 1612|       |
 1613|  2.58k|    BIO_free_all(sc->rbio);
 1614|  2.58k|    sc->rbio = rbio;
 1615|  2.58k|    sc->rlayer.rrlmethod->set1_bio(sc->rlayer.rrl, sc->rbio);
 1616|  2.58k|}
SSL_set0_wbio:
 1619|  2.58k|{
 1620|  2.58k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.58k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.58k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.58k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.58k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.58k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.58k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1621|       |
 1622|  2.58k|#ifndef OPENSSL_NO_QUIC
 1623|  2.58k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  2.58k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  2.58k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 2.58k, False: 0]
  |  |  ------------------
  ------------------
 1624|      0|        ossl_quic_conn_set0_net_wbio(s, wbio);
 1625|      0|        return;
 1626|      0|    }
 1627|  2.58k|#endif
 1628|       |
 1629|  2.58k|    if (sc == NULL)
  ------------------
  |  Branch (1629:9): [True: 0, False: 2.58k]
  ------------------
 1630|      0|        return;
 1631|       |
 1632|       |    /*
 1633|       |     * If the output buffering BIO is still in place, remove it
 1634|       |     */
 1635|  2.58k|    if (sc->bbio != NULL)
  ------------------
  |  Branch (1635:9): [True: 0, False: 2.58k]
  ------------------
 1636|      0|        sc->wbio = BIO_pop(sc->wbio);
 1637|       |
 1638|  2.58k|    BIO_free_all(sc->wbio);
 1639|  2.58k|    sc->wbio = wbio;
 1640|       |
 1641|       |    /* Re-attach |bbio| to the new |wbio|. */
 1642|  2.58k|    if (sc->bbio != NULL)
  ------------------
  |  Branch (1642:9): [True: 0, False: 2.58k]
  ------------------
 1643|      0|        sc->wbio = BIO_push(sc->bbio, sc->wbio);
 1644|       |
 1645|  2.58k|    sc->rlayer.wrlmethod->set1_bio(sc->rlayer.wrl, sc->wbio);
 1646|  2.58k|}
SSL_get_rbio:
 1691|    485|{
 1692|    485|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|    485|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|    485|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 485]
  |  |  |  |  ------------------
  |  |  |  |   33|    485|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|    485|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 485, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    485|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    485|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1693|       |
 1694|    485|#ifndef OPENSSL_NO_QUIC
 1695|    485|    if (IS_QUIC(s))
  ------------------
  |  |   96|    485|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|    485|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 485]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 485, False: 0]
  |  |  ------------------
  ------------------
 1696|      0|        return ossl_quic_conn_get_net_rbio(s);
 1697|    485|#endif
 1698|       |
 1699|    485|    if (sc == NULL)
  ------------------
  |  Branch (1699:9): [True: 0, False: 485]
  ------------------
 1700|      0|        return NULL;
 1701|       |
 1702|    485|    return sc->rbio;
 1703|    485|}
SSL_connect:
 2306|  3.06k|{
 2307|  3.06k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  3.06k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  3.06k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.06k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.06k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.06k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.06k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.06k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.06k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2308|       |
 2309|  3.06k|#ifndef OPENSSL_NO_QUIC
 2310|  3.06k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  3.06k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  3.06k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 3.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 3.06k, False: 0]
  |  |  ------------------
  ------------------
 2311|      0|        return s->method->ssl_connect(s);
 2312|      0|    }
 2313|  3.06k|#endif
 2314|       |
 2315|  3.06k|    if (sc == NULL)
  ------------------
  |  Branch (2315:9): [True: 0, False: 3.06k]
  ------------------
 2316|      0|        return 0;
 2317|       |
 2318|  3.06k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (2318:9): [True: 0, False: 3.06k]
  ------------------
 2319|       |        /* Not properly initialized yet */
 2320|      0|        SSL_set_connect_state(s);
 2321|      0|    }
 2322|       |
 2323|  3.06k|    return SSL_do_handshake(s);
 2324|  3.06k|}
SSL_ctrl:
 3123|  1.05k|{
 3124|  1.05k|    return ossl_ctrl_internal(s, cmd, larg, parg, /*no_quic=*/0);
 3125|  1.05k|}
ossl_ctrl_internal:
 3128|  1.05k|{
 3129|  1.05k|    long l;
 3130|  1.05k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.05k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.05k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.05k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  1.05k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.05k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.05k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.05k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3131|       |
 3132|       |    /*
 3133|       |     * Routing of ctrl calls for QUIC is a little counterintuitive:
 3134|       |     *
 3135|       |     *   - Firstly (no_quic=0), we pass the ctrl directly to our QUIC
 3136|       |     *     implementation in case it wants to handle the ctrl specially.
 3137|       |     *
 3138|       |     *   - If our QUIC implementation does not care about the ctrl, it
 3139|       |     *     will reenter this function with no_quic=1 and we will try to handle
 3140|       |     *     it directly using the QCSO SSL object stub (not the handshake layer
 3141|       |     *     SSL object). This is important for e.g. the version configuration
 3142|       |     *     ctrls below, which must use s->defltmeth (and not sc->defltmeth).
 3143|       |     *
 3144|       |     *   - If we don't handle a ctrl here specially, then processing is
 3145|       |     *     redirected to the handshake layer SSL object.
 3146|       |     */
 3147|  1.05k|    if (!no_quic && IS_QUIC(s))
  ------------------
  |  |   96|  1.05k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  1.05k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 1.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.05k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3147:9): [True: 1.05k, False: 0]
  ------------------
 3148|      0|        return s->method->ssl_ctrl(s, cmd, larg, parg);
 3149|       |
 3150|  1.05k|    if (sc == NULL)
  ------------------
  |  Branch (3150:9): [True: 0, False: 1.05k]
  ------------------
 3151|      0|        return 0;
 3152|       |
 3153|  1.05k|    switch (cmd) {
 3154|      0|    case SSL_CTRL_GET_READ_AHEAD:
  ------------------
  |  | 1329|      0|#define SSL_CTRL_GET_READ_AHEAD 40
  ------------------
  |  Branch (3154:5): [True: 0, False: 1.05k]
  ------------------
 3155|      0|        return RECORD_LAYER_get_read_ahead(&sc->rlayer);
  ------------------
  |  |  135|      0|#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
  ------------------
 3156|      0|    case SSL_CTRL_SET_READ_AHEAD:
  ------------------
  |  | 1330|      0|#define SSL_CTRL_SET_READ_AHEAD 41
  ------------------
  |  Branch (3156:5): [True: 0, False: 1.05k]
  ------------------
 3157|      0|        l = RECORD_LAYER_get_read_ahead(&sc->rlayer);
  ------------------
  |  |  135|      0|#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
  ------------------
 3158|      0|        RECORD_LAYER_set_read_ahead(&sc->rlayer, larg);
  ------------------
  |  |  134|      0|#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
  ------------------
 3159|      0|        return l;
 3160|       |
 3161|      0|    case SSL_CTRL_MODE: {
  ------------------
  |  | 1328|      0|#define SSL_CTRL_MODE 33
  ------------------
  |  Branch (3161:5): [True: 0, False: 1.05k]
  ------------------
 3162|      0|        OSSL_PARAM options[2], *opts = options;
 3163|       |
 3164|      0|        sc->mode |= larg;
 3165|       |
 3166|      0|        *opts++ = OSSL_PARAM_construct_uint32(OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE,
  ------------------
  |  |  339|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 3167|      0|            &sc->mode);
 3168|      0|        *opts = OSSL_PARAM_construct_end();
 3169|       |
 3170|       |        /* Ignore return value */
 3171|      0|        sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
 3172|       |
 3173|      0|        return sc->mode;
 3174|      0|    }
 3175|      0|    case SSL_CTRL_CLEAR_MODE:
  ------------------
  |  | 1371|      0|#define SSL_CTRL_CLEAR_MODE 78
  ------------------
  |  Branch (3175:5): [True: 0, False: 1.05k]
  ------------------
 3176|      0|        return (sc->mode &= ~larg);
 3177|      0|    case SSL_CTRL_GET_MAX_CERT_LIST:
  ------------------
  |  | 1335|      0|#define SSL_CTRL_GET_MAX_CERT_LIST 50
  ------------------
  |  Branch (3177:5): [True: 0, False: 1.05k]
  ------------------
 3178|      0|        return (long)sc->max_cert_list;
 3179|      0|    case SSL_CTRL_SET_MAX_CERT_LIST:
  ------------------
  |  | 1336|      0|#define SSL_CTRL_SET_MAX_CERT_LIST 51
  ------------------
  |  Branch (3179:5): [True: 0, False: 1.05k]
  ------------------
 3180|      0|        if (larg < 0)
  ------------------
  |  Branch (3180:13): [True: 0, False: 0]
  ------------------
 3181|      0|            return 0;
 3182|      0|        l = (long)sc->max_cert_list;
 3183|      0|        sc->max_cert_list = (size_t)larg;
 3184|      0|        return l;
 3185|      0|    case SSL_CTRL_SET_MAX_SEND_FRAGMENT:
  ------------------
  |  | 1337|      0|#define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52
  ------------------
  |  Branch (3185:5): [True: 0, False: 1.05k]
  ------------------
 3186|      0|        if (larg < 512 || larg > SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (3186:13): [True: 0, False: 0]
  |  Branch (3186:27): [True: 0, False: 0]
  ------------------
 3187|      0|            return 0;
 3188|       |#ifndef OPENSSL_NO_KTLS
 3189|       |        if (sc->wbio != NULL && BIO_get_ktls_send(sc->wbio))
 3190|       |            return 0;
 3191|       |#endif /* OPENSSL_NO_KTLS */
 3192|      0|        sc->max_send_fragment = larg;
 3193|      0|        if (sc->max_send_fragment < sc->split_send_fragment)
  ------------------
  |  Branch (3193:13): [True: 0, False: 0]
  ------------------
 3194|      0|            sc->split_send_fragment = sc->max_send_fragment;
 3195|      0|        sc->rlayer.wrlmethod->set_max_frag_len(sc->rlayer.wrl, larg);
 3196|      0|        return 1;
 3197|      0|    case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
  ------------------
  |  | 1405|      0|#define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125
  ------------------
  |  Branch (3197:5): [True: 0, False: 1.05k]
  ------------------
 3198|      0|        if ((size_t)larg > sc->max_send_fragment || larg == 0)
  ------------------
  |  Branch (3198:13): [True: 0, False: 0]
  |  Branch (3198:53): [True: 0, False: 0]
  ------------------
 3199|      0|            return 0;
 3200|      0|        sc->split_send_fragment = larg;
 3201|      0|        return 1;
 3202|      0|    case SSL_CTRL_SET_MAX_PIPELINES:
  ------------------
  |  | 1406|      0|#define SSL_CTRL_SET_MAX_PIPELINES 126
  ------------------
  |  Branch (3202:5): [True: 0, False: 1.05k]
  ------------------
 3203|      0|        if (larg < 1 || larg > SSL_MAX_PIPELINES)
  ------------------
  |  |   74|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (3203:13): [True: 0, False: 0]
  |  Branch (3203:25): [True: 0, False: 0]
  ------------------
 3204|      0|            return 0;
 3205|      0|        sc->max_pipelines = larg;
 3206|      0|        if (sc->rlayer.rrlmethod->set_max_pipelines != NULL)
  ------------------
  |  Branch (3206:13): [True: 0, False: 0]
  ------------------
 3207|      0|            sc->rlayer.rrlmethod->set_max_pipelines(sc->rlayer.rrl, (size_t)larg);
 3208|      0|        return 1;
 3209|      0|    case SSL_CTRL_GET_RI_SUPPORT:
  ------------------
  |  | 1370|      0|#define SSL_CTRL_GET_RI_SUPPORT 76
  ------------------
  |  Branch (3209:5): [True: 0, False: 1.05k]
  ------------------
 3210|      0|        return sc->s3.send_connection_binding;
 3211|      0|    case SSL_CTRL_SET_RETRY_VERIFY:
  ------------------
  |  | 1416|      0|#define SSL_CTRL_SET_RETRY_VERIFY 136
  ------------------
  |  Branch (3211:5): [True: 0, False: 1.05k]
  ------------------
 3212|      0|        sc->rwstate = SSL_RETRY_VERIFY;
  ------------------
  |  |  962|      0|#define SSL_RETRY_VERIFY 8
  ------------------
 3213|      0|        return 1;
 3214|      0|    case SSL_CTRL_CERT_FLAGS:
  ------------------
  |  | 1383|      0|#define SSL_CTRL_CERT_FLAGS 99
  ------------------
  |  Branch (3214:5): [True: 0, False: 1.05k]
  ------------------
 3215|      0|        return (sc->cert->cert_flags |= larg);
 3216|      0|    case SSL_CTRL_CLEAR_CERT_FLAGS:
  ------------------
  |  | 1384|      0|#define SSL_CTRL_CLEAR_CERT_FLAGS 100
  ------------------
  |  Branch (3216:5): [True: 0, False: 1.05k]
  ------------------
 3217|      0|        return (sc->cert->cert_flags &= ~larg);
 3218|       |
 3219|      0|    case SSL_CTRL_GET_RAW_CIPHERLIST:
  ------------------
  |  | 1394|      0|#define SSL_CTRL_GET_RAW_CIPHERLIST 110
  ------------------
  |  Branch (3219:5): [True: 0, False: 1.05k]
  ------------------
 3220|      0|        if (parg) {
  ------------------
  |  Branch (3220:13): [True: 0, False: 0]
  ------------------
 3221|      0|            if (sc->s3.tmp.ciphers_raw == NULL)
  ------------------
  |  Branch (3221:17): [True: 0, False: 0]
  ------------------
 3222|      0|                return 0;
 3223|      0|            *(unsigned char **)parg = sc->s3.tmp.ciphers_raw;
 3224|      0|            return (int)sc->s3.tmp.ciphers_rawlen;
 3225|      0|        } else {
 3226|      0|            return TLS_CIPHER_LEN;
  ------------------
  |  |  389|      0|#define TLS_CIPHER_LEN 2
  ------------------
 3227|      0|        }
 3228|      0|    case SSL_CTRL_GET_EXTMS_SUPPORT:
  ------------------
  |  | 1402|      0|#define SSL_CTRL_GET_EXTMS_SUPPORT 122
  ------------------
  |  Branch (3228:5): [True: 0, False: 1.05k]
  ------------------
 3229|      0|        if (!sc->session || SSL_in_init(s) || ossl_statem_get_in_handshake(sc))
  ------------------
  |  Branch (3229:13): [True: 0, False: 0]
  |  Branch (3229:29): [True: 0, False: 0]
  |  Branch (3229:47): [True: 0, False: 0]
  ------------------
 3230|      0|            return -1;
 3231|      0|        if (sc->session->flags & SSL_SESS_FLAG_EXTMS)
  ------------------
  |  |  577|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  |  Branch (3231:13): [True: 0, False: 0]
  ------------------
 3232|      0|            return 1;
 3233|      0|        else
 3234|      0|            return 0;
 3235|      0|    case SSL_CTRL_SET_MIN_PROTO_VERSION:
  ------------------
  |  | 1403|      0|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  ------------------
  |  Branch (3235:5): [True: 0, False: 1.05k]
  ------------------
 3236|      0|        return ssl_check_allowed_versions(larg, sc->max_proto_version)
  ------------------
  |  Branch (3236:16): [True: 0, False: 0]
  ------------------
 3237|      0|            && ssl_set_version_bound(s->defltmeth->version, (int)larg,
  ------------------
  |  Branch (3237:16): [True: 0, False: 0]
  ------------------
 3238|      0|                &sc->min_proto_version);
 3239|      0|    case SSL_CTRL_GET_MIN_PROTO_VERSION:
  ------------------
  |  | 1410|      0|#define SSL_CTRL_GET_MIN_PROTO_VERSION 130
  ------------------
  |  Branch (3239:5): [True: 0, False: 1.05k]
  ------------------
 3240|      0|        return sc->min_proto_version;
 3241|      0|    case SSL_CTRL_SET_MAX_PROTO_VERSION:
  ------------------
  |  | 1404|      0|#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
  ------------------
  |  Branch (3241:5): [True: 0, False: 1.05k]
  ------------------
 3242|      0|        return ssl_check_allowed_versions(sc->min_proto_version, larg)
  ------------------
  |  Branch (3242:16): [True: 0, False: 0]
  ------------------
 3243|      0|            && ssl_set_version_bound(s->defltmeth->version, (int)larg,
  ------------------
  |  Branch (3243:16): [True: 0, False: 0]
  ------------------
 3244|      0|                &sc->max_proto_version);
 3245|      0|    case SSL_CTRL_GET_MAX_PROTO_VERSION:
  ------------------
  |  | 1411|      0|#define SSL_CTRL_GET_MAX_PROTO_VERSION 131
  ------------------
  |  Branch (3245:5): [True: 0, False: 1.05k]
  ------------------
 3246|      0|        return sc->max_proto_version;
 3247|  1.05k|    default:
  ------------------
  |  Branch (3247:5): [True: 1.05k, False: 0]
  ------------------
 3248|  1.05k|        if (IS_QUIC(s))
  ------------------
  |  |   96|  1.05k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  1.05k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 1.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.05k, False: 0]
  |  |  ------------------
  ------------------
 3249|      0|            return SSL_ctrl((SSL *)sc, cmd, larg, parg);
 3250|  1.05k|        else
 3251|  1.05k|            return s->method->ssl_ctrl(s, cmd, larg, parg);
 3252|  1.05k|    }
 3253|  1.05k|}
SSL_CTX_ctrl:
 3277|  20.1k|{
 3278|  20.1k|    long l;
 3279|       |
 3280|       |    /* For some cases with ctx == NULL or larg == 1 perform syntax checks */
 3281|  20.1k|    if (cmd == SSL_CTRL_SET_GROUPS_LIST && larg == 1)
  ------------------
  |  | 1379|  40.3k|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (3281:9): [True: 4.13k, False: 16.0k]
  |  Branch (3281:44): [True: 0, False: 4.13k]
  ------------------
 3282|      0|        return tls1_set_groups_list(ctx, NULL, NULL, NULL, NULL, NULL, NULL, parg);
 3283|  20.1k|    if (ctx == NULL) {
  ------------------
  |  Branch (3283:9): [True: 0, False: 20.1k]
  ------------------
 3284|      0|        switch (cmd) {
 3285|      0|        case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1382|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (3285:9): [True: 0, False: 0]
  ------------------
 3286|      0|        case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1386|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (3286:9): [True: 0, False: 0]
  ------------------
 3287|      0|            return tls1_set_sigalgs_list(ctx, NULL, parg, 0);
 3288|      0|        default:
  ------------------
  |  Branch (3288:9): [True: 0, False: 0]
  ------------------
 3289|      0|            return 0;
 3290|      0|        }
 3291|      0|    }
 3292|       |
 3293|  20.1k|    switch (cmd) {
 3294|      0|    case SSL_CTRL_GET_READ_AHEAD:
  ------------------
  |  | 1329|      0|#define SSL_CTRL_GET_READ_AHEAD 40
  ------------------
  |  Branch (3294:5): [True: 0, False: 20.1k]
  ------------------
 3295|      0|        return ctx->read_ahead;
 3296|  3.35k|    case SSL_CTRL_SET_READ_AHEAD:
  ------------------
  |  | 1330|  3.35k|#define SSL_CTRL_SET_READ_AHEAD 41
  ------------------
  |  Branch (3296:5): [True: 3.35k, False: 16.7k]
  ------------------
 3297|  3.35k|        l = ctx->read_ahead;
 3298|  3.35k|        ctx->read_ahead = larg;
 3299|  3.35k|        return l;
 3300|       |
 3301|      0|    case SSL_CTRL_SET_MSG_CALLBACK_ARG:
  ------------------
  |  | 1312|      0|#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
  ------------------
  |  Branch (3301:5): [True: 0, False: 20.1k]
  ------------------
 3302|      0|        ctx->msg_callback_arg = parg;
 3303|      0|        return 1;
 3304|       |
 3305|      0|    case SSL_CTRL_GET_MAX_CERT_LIST:
  ------------------
  |  | 1335|      0|#define SSL_CTRL_GET_MAX_CERT_LIST 50
  ------------------
  |  Branch (3305:5): [True: 0, False: 20.1k]
  ------------------
 3306|      0|        return (long)ctx->max_cert_list;
 3307|      0|    case SSL_CTRL_SET_MAX_CERT_LIST:
  ------------------
  |  | 1336|      0|#define SSL_CTRL_SET_MAX_CERT_LIST 51
  ------------------
  |  Branch (3307:5): [True: 0, False: 20.1k]
  ------------------
 3308|      0|        if (larg < 0)
  ------------------
  |  Branch (3308:13): [True: 0, False: 0]
  ------------------
 3309|      0|            return 0;
 3310|      0|        l = (long)ctx->max_cert_list;
 3311|      0|        ctx->max_cert_list = (size_t)larg;
 3312|      0|        return l;
 3313|       |
 3314|      0|    case SSL_CTRL_SET_SESS_CACHE_SIZE:
  ------------------
  |  | 1331|      0|#define SSL_CTRL_SET_SESS_CACHE_SIZE 42
  ------------------
  |  Branch (3314:5): [True: 0, False: 20.1k]
  ------------------
 3315|      0|        if (larg < 0)
  ------------------
  |  Branch (3315:13): [True: 0, False: 0]
  ------------------
 3316|      0|            return 0;
 3317|      0|        l = (long)ctx->session_cache_size;
 3318|      0|        ctx->session_cache_size = (size_t)larg;
 3319|      0|        return l;
 3320|      0|    case SSL_CTRL_GET_SESS_CACHE_SIZE:
  ------------------
  |  | 1332|      0|#define SSL_CTRL_GET_SESS_CACHE_SIZE 43
  ------------------
  |  Branch (3320:5): [True: 0, False: 20.1k]
  ------------------
 3321|      0|        return (long)ctx->session_cache_size;
 3322|  2.58k|    case SSL_CTRL_SET_SESS_CACHE_MODE:
  ------------------
  |  | 1333|  2.58k|#define SSL_CTRL_SET_SESS_CACHE_MODE 44
  ------------------
  |  Branch (3322:5): [True: 2.58k, False: 17.5k]
  ------------------
 3323|  2.58k|        l = ctx->session_cache_mode;
 3324|  2.58k|        ctx->session_cache_mode = larg;
 3325|  2.58k|        return l;
 3326|      0|    case SSL_CTRL_GET_SESS_CACHE_MODE:
  ------------------
  |  | 1334|      0|#define SSL_CTRL_GET_SESS_CACHE_MODE 45
  ------------------
  |  Branch (3326:5): [True: 0, False: 20.1k]
  ------------------
 3327|      0|        return ctx->session_cache_mode;
 3328|       |
 3329|      0|    case SSL_CTRL_SESS_NUMBER:
  ------------------
  |  | 1316|      0|#define SSL_CTRL_SESS_NUMBER 20
  ------------------
  |  Branch (3329:5): [True: 0, False: 20.1k]
  ------------------
 3330|      0|        return lh_SSL_SESSION_num_items(ctx->sessions);
 3331|      0|    case SSL_CTRL_SESS_CONNECT:
  ------------------
  |  | 1317|      0|#define SSL_CTRL_SESS_CONNECT 21
  ------------------
  |  Branch (3331:5): [True: 0, False: 20.1k]
  ------------------
 3332|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect);
 3333|      0|    case SSL_CTRL_SESS_CONNECT_GOOD:
  ------------------
  |  | 1318|      0|#define SSL_CTRL_SESS_CONNECT_GOOD 22
  ------------------
  |  Branch (3333:5): [True: 0, False: 20.1k]
  ------------------
 3334|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect_good);
 3335|      0|    case SSL_CTRL_SESS_CONNECT_RENEGOTIATE:
  ------------------
  |  | 1319|      0|#define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23
  ------------------
  |  Branch (3335:5): [True: 0, False: 20.1k]
  ------------------
 3336|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect_renegotiate);
 3337|      0|    case SSL_CTRL_SESS_ACCEPT:
  ------------------
  |  | 1320|      0|#define SSL_CTRL_SESS_ACCEPT 24
  ------------------
  |  Branch (3337:5): [True: 0, False: 20.1k]
  ------------------
 3338|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept);
 3339|      0|    case SSL_CTRL_SESS_ACCEPT_GOOD:
  ------------------
  |  | 1321|      0|#define SSL_CTRL_SESS_ACCEPT_GOOD 25
  ------------------
  |  Branch (3339:5): [True: 0, False: 20.1k]
  ------------------
 3340|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept_good);
 3341|      0|    case SSL_CTRL_SESS_ACCEPT_RENEGOTIATE:
  ------------------
  |  | 1322|      0|#define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26
  ------------------
  |  Branch (3341:5): [True: 0, False: 20.1k]
  ------------------
 3342|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept_renegotiate);
 3343|      0|    case SSL_CTRL_SESS_HIT:
  ------------------
  |  | 1323|      0|#define SSL_CTRL_SESS_HIT 27
  ------------------
  |  Branch (3343:5): [True: 0, False: 20.1k]
  ------------------
 3344|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_hit);
 3345|      0|    case SSL_CTRL_SESS_CB_HIT:
  ------------------
  |  | 1324|      0|#define SSL_CTRL_SESS_CB_HIT 28
  ------------------
  |  Branch (3345:5): [True: 0, False: 20.1k]
  ------------------
 3346|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_cb_hit);
 3347|      0|    case SSL_CTRL_SESS_MISSES:
  ------------------
  |  | 1325|      0|#define SSL_CTRL_SESS_MISSES 29
  ------------------
  |  Branch (3347:5): [True: 0, False: 20.1k]
  ------------------
 3348|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_miss);
 3349|      0|    case SSL_CTRL_SESS_TIMEOUTS:
  ------------------
  |  | 1326|      0|#define SSL_CTRL_SESS_TIMEOUTS 30
  ------------------
  |  Branch (3349:5): [True: 0, False: 20.1k]
  ------------------
 3350|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_timeout);
 3351|      0|    case SSL_CTRL_SESS_CACHE_FULL:
  ------------------
  |  | 1327|      0|#define SSL_CTRL_SESS_CACHE_FULL 31
  ------------------
  |  Branch (3351:5): [True: 0, False: 20.1k]
  ------------------
 3352|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_cache_full);
 3353|  3.35k|    case SSL_CTRL_MODE:
  ------------------
  |  | 1328|  3.35k|#define SSL_CTRL_MODE 33
  ------------------
  |  Branch (3353:5): [True: 3.35k, False: 16.7k]
  ------------------
 3354|  3.35k|        return (ctx->mode |= larg);
 3355|      0|    case SSL_CTRL_CLEAR_MODE:
  ------------------
  |  | 1371|      0|#define SSL_CTRL_CLEAR_MODE 78
  ------------------
  |  Branch (3355:5): [True: 0, False: 20.1k]
  ------------------
 3356|      0|        return (ctx->mode &= ~larg);
 3357|      0|    case SSL_CTRL_SET_MAX_SEND_FRAGMENT:
  ------------------
  |  | 1337|      0|#define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52
  ------------------
  |  Branch (3357:5): [True: 0, False: 20.1k]
  ------------------
 3358|      0|        if (larg < 512 || larg > SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (3358:13): [True: 0, False: 0]
  |  Branch (3358:27): [True: 0, False: 0]
  ------------------
 3359|      0|            return 0;
 3360|      0|        ctx->max_send_fragment = larg;
 3361|      0|        if (ctx->max_send_fragment < ctx->split_send_fragment)
  ------------------
  |  Branch (3361:13): [True: 0, False: 0]
  ------------------
 3362|      0|            ctx->split_send_fragment = ctx->max_send_fragment;
 3363|      0|        return 1;
 3364|      0|    case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
  ------------------
  |  | 1405|      0|#define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125
  ------------------
  |  Branch (3364:5): [True: 0, False: 20.1k]
  ------------------
 3365|      0|        if ((size_t)larg > ctx->max_send_fragment || larg == 0)
  ------------------
  |  Branch (3365:13): [True: 0, False: 0]
  |  Branch (3365:54): [True: 0, False: 0]
  ------------------
 3366|      0|            return 0;
 3367|      0|        ctx->split_send_fragment = larg;
 3368|      0|        return 1;
 3369|      0|    case SSL_CTRL_SET_MAX_PIPELINES:
  ------------------
  |  | 1406|      0|#define SSL_CTRL_SET_MAX_PIPELINES 126
  ------------------
  |  Branch (3369:5): [True: 0, False: 20.1k]
  ------------------
 3370|      0|        if (larg < 1 || larg > SSL_MAX_PIPELINES)
  ------------------
  |  |   74|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (3370:13): [True: 0, False: 0]
  |  Branch (3370:25): [True: 0, False: 0]
  ------------------
 3371|      0|            return 0;
 3372|      0|        ctx->max_pipelines = larg;
 3373|      0|        return 1;
 3374|      0|    case SSL_CTRL_CERT_FLAGS:
  ------------------
  |  | 1383|      0|#define SSL_CTRL_CERT_FLAGS 99
  ------------------
  |  Branch (3374:5): [True: 0, False: 20.1k]
  ------------------
 3375|      0|        return (ctx->cert->cert_flags |= larg);
 3376|      0|    case SSL_CTRL_CLEAR_CERT_FLAGS:
  ------------------
  |  | 1384|      0|#define SSL_CTRL_CLEAR_CERT_FLAGS 100
  ------------------
  |  Branch (3376:5): [True: 0, False: 20.1k]
  ------------------
 3377|      0|        return (ctx->cert->cert_flags &= ~larg);
 3378|  3.35k|    case SSL_CTRL_SET_MIN_PROTO_VERSION:
  ------------------
  |  | 1403|  3.35k|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  ------------------
  |  Branch (3378:5): [True: 3.35k, False: 16.7k]
  ------------------
 3379|  3.35k|        return ssl_check_allowed_versions(larg, ctx->max_proto_version)
  ------------------
  |  Branch (3379:16): [True: 3.35k, False: 0]
  ------------------
 3380|  3.35k|            && ssl_set_version_bound(ctx->method->version, (int)larg,
  ------------------
  |  Branch (3380:16): [True: 3.35k, False: 0]
  ------------------
 3381|  3.35k|                &ctx->min_proto_version);
 3382|      0|    case SSL_CTRL_GET_MIN_PROTO_VERSION:
  ------------------
  |  | 1410|      0|#define SSL_CTRL_GET_MIN_PROTO_VERSION 130
  ------------------
  |  Branch (3382:5): [True: 0, False: 20.1k]
  ------------------
 3383|      0|        return ctx->min_proto_version;
 3384|  3.35k|    case SSL_CTRL_SET_MAX_PROTO_VERSION:
  ------------------
  |  | 1404|  3.35k|#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
  ------------------
  |  Branch (3384:5): [True: 3.35k, False: 16.7k]
  ------------------
 3385|  3.35k|        return ssl_check_allowed_versions(ctx->min_proto_version, larg)
  ------------------
  |  Branch (3385:16): [True: 3.35k, False: 0]
  ------------------
 3386|  3.35k|            && ssl_set_version_bound(ctx->method->version, (int)larg,
  ------------------
  |  Branch (3386:16): [True: 3.35k, False: 0]
  ------------------
 3387|  3.35k|                &ctx->max_proto_version);
 3388|      0|    case SSL_CTRL_GET_MAX_PROTO_VERSION:
  ------------------
  |  | 1411|      0|#define SSL_CTRL_GET_MAX_PROTO_VERSION 131
  ------------------
  |  Branch (3388:5): [True: 0, False: 20.1k]
  ------------------
 3389|      0|        return ctx->max_proto_version;
 3390|  4.13k|    default:
  ------------------
  |  Branch (3390:5): [True: 4.13k, False: 16.0k]
  ------------------
 3391|  4.13k|        return ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg);
 3392|  20.1k|    }
 3393|  20.1k|}
ssl_cipher_id_cmp:
 3410|    377|{
 3411|    377|    if (a->id > b->id)
  ------------------
  |  Branch (3411:9): [True: 201, False: 176]
  ------------------
 3412|    201|        return 1;
 3413|    176|    if (a->id < b->id)
  ------------------
  |  Branch (3413:9): [True: 163, False: 13]
  ------------------
 3414|    163|        return -1;
 3415|     13|    return 0;
 3416|    176|}
ssl_cipher_ptr_id_cmp:
 3420|   993k|{
 3421|   993k|    if ((*ap)->id > (*bp)->id)
  ------------------
  |  Branch (3421:9): [True: 558k, False: 435k]
  ------------------
 3422|   558k|        return 1;
 3423|   435k|    if ((*ap)->id < (*bp)->id)
  ------------------
  |  Branch (3423:9): [True: 435k, False: 3]
  ------------------
 3424|   435k|        return -1;
 3425|      3|    return 0;
 3426|   435k|}
SSL_get_ciphers:
 3433|  10.1k|{
 3434|  10.1k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  10.1k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  10.1k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 10.1k]
  |  |  |  |  ------------------
  |  |  |  |   33|  10.1k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  10.1k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 10.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  10.1k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  10.1k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3435|       |
 3436|  10.1k|    if (sc != NULL) {
  ------------------
  |  Branch (3436:9): [True: 10.1k, False: 0]
  ------------------
 3437|  10.1k|        if (sc->cipher_list != NULL) {
  ------------------
  |  Branch (3437:13): [True: 0, False: 10.1k]
  ------------------
 3438|      0|            return sc->cipher_list;
 3439|  10.1k|        } else if ((s->ctx != NULL) && (s->ctx->cipher_list != NULL)) {
  ------------------
  |  Branch (3439:20): [True: 10.1k, False: 0]
  |  Branch (3439:40): [True: 10.1k, False: 0]
  ------------------
 3440|  10.1k|            return s->ctx->cipher_list;
 3441|  10.1k|        }
 3442|  10.1k|    }
 3443|      0|    return NULL;
 3444|  10.1k|}
SSL_get1_supported_ciphers:
 3456|  7.55k|{
 3457|  7.55k|    STACK_OF(SSL_CIPHER) *sk = NULL, *ciphers;
  ------------------
  |  |   33|  7.55k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3458|  7.55k|    int i;
 3459|  7.55k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.55k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.55k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.55k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.55k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.55k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.55k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.55k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.55k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3460|       |
 3461|  7.55k|    if (sc == NULL)
  ------------------
  |  Branch (3461:9): [True: 0, False: 7.55k]
  ------------------
 3462|      0|        return NULL;
 3463|       |
 3464|  7.55k|    ciphers = SSL_get_ciphers(s);
 3465|  7.55k|    if (!ciphers)
  ------------------
  |  Branch (3465:9): [True: 0, False: 7.55k]
  ------------------
 3466|      0|        return NULL;
 3467|  7.55k|    if (!ssl_set_client_disabled(sc))
  ------------------
  |  Branch (3467:9): [True: 0, False: 7.55k]
  ------------------
 3468|      0|        return NULL;
 3469|   463k|    for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1028|   463k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3469:17): [True: 455k, False: 7.55k]
  ------------------
 3470|   455k|        const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1029|   455k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3471|   455k|        if (!ssl_cipher_disabled(sc, c, SSL_SECOP_CIPHER_SUPPORTED, 0)) {
  ------------------
  |  | 2743|   455k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|   455k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (3471:13): [True: 224k, False: 231k]
  ------------------
 3472|   224k|            if (!sk)
  ------------------
  |  Branch (3472:17): [True: 7.55k, False: 216k]
  ------------------
 3473|  7.55k|                sk = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1031|  7.55k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
 3474|   224k|            if (!sk)
  ------------------
  |  Branch (3474:17): [True: 0, False: 224k]
  ------------------
 3475|      0|                return NULL;
 3476|   224k|            if (!sk_SSL_CIPHER_push(sk, c)) {
  ------------------
  |  | 1038|   224k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (3476:17): [True: 0, False: 224k]
  ------------------
 3477|      0|                sk_SSL_CIPHER_free(sk);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 3478|      0|                return NULL;
 3479|      0|            }
 3480|   224k|        }
 3481|   455k|    }
 3482|  7.55k|    return sk;
 3483|  7.55k|}
ssl_get_ciphers_by_id:
 3488|      5|{
 3489|      5|    if (s != NULL) {
  ------------------
  |  Branch (3489:9): [True: 5, False: 0]
  ------------------
 3490|      5|        if (s->cipher_list_by_id != NULL)
  ------------------
  |  Branch (3490:13): [True: 0, False: 5]
  ------------------
 3491|      0|            return s->cipher_list_by_id;
 3492|      5|        else if (s->ssl.ctx != NULL
  ------------------
  |  Branch (3492:18): [True: 5, False: 0]
  ------------------
 3493|      5|            && s->ssl.ctx->cipher_list_by_id != NULL)
  ------------------
  |  Branch (3493:16): [True: 5, False: 0]
  ------------------
 3494|      5|            return s->ssl.ctx->cipher_list_by_id;
 3495|      5|    }
 3496|      0|    return NULL;
 3497|      5|}
SSL_CTX_set_cipher_list:
 3547|    855|{
 3548|    855|    STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|    855|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3549|       |
 3550|    855|    sk = ssl_create_cipher_list(ctx, ctx->tls13_ciphersuites,
 3551|    855|        &ctx->cipher_list, &ctx->cipher_list_by_id, str,
 3552|    855|        ctx->cert);
 3553|       |    /*
 3554|       |     * ssl_create_cipher_list may return an empty stack if it was unable to
 3555|       |     * find a cipher matching the given rule string (for example if the rule
 3556|       |     * string specifies a cipher which has been disabled). This is not an
 3557|       |     * error as far as ssl_create_cipher_list is concerned, and hence
 3558|       |     * ctx->cipher_list and ctx->cipher_list_by_id has been updated.
 3559|       |     */
 3560|    855|    if (sk == NULL)
  ------------------
  |  Branch (3560:9): [True: 355, False: 500]
  ------------------
 3561|    355|        return 0;
 3562|    500|    if (ctx->method->num_ciphers() > 0 && cipher_list_tls12_num(sk) == 0) {
  ------------------
  |  Branch (3562:9): [True: 500, False: 0]
  |  Branch (3562:43): [True: 200, False: 300]
  ------------------
 3563|    200|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
  ------------------
  |  |  357|    200|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|    200|    (ERR_new(),                                                  \
  |  |  |  |  360|    200|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    200|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|    200|        ERR_set_error)
  |  |  ------------------
  ------------------
 3564|    200|        return 0;
 3565|    200|    }
 3566|    300|    return 1;
 3567|    500|}
SSL_set_alpn_protos:
 3931|  2.57k|{
 3932|  2.57k|    unsigned char *alpn;
 3933|  2.57k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(ssl);
  ------------------
  |  |   39|  2.57k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.57k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.57k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.57k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.57k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.57k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.57k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.57k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3934|       |
 3935|  2.57k|    if (sc == NULL)
  ------------------
  |  Branch (3935:9): [True: 0, False: 2.57k]
  ------------------
 3936|      0|        return 1;
 3937|       |
 3938|  2.57k|    if (protos_len == 0 || protos == NULL) {
  ------------------
  |  Branch (3938:9): [True: 0, False: 2.57k]
  |  Branch (3938:28): [True: 0, False: 2.57k]
  ------------------
 3939|      0|        OPENSSL_free(sc->ext.alpn);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3940|      0|        sc->ext.alpn = NULL;
 3941|      0|        sc->ext.alpn_len = 0;
 3942|      0|        return 0;
 3943|      0|    }
 3944|       |    /* Not valid per RFC */
 3945|  2.57k|    if (!alpn_value_ok(protos, protos_len))
  ------------------
  |  Branch (3945:9): [True: 0, False: 2.57k]
  ------------------
 3946|      0|        return 1;
 3947|       |
 3948|  2.57k|    alpn = OPENSSL_memdup(protos, protos_len);
  ------------------
  |  |  134|  2.57k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3949|  2.57k|    if (alpn == NULL)
  ------------------
  |  Branch (3949:9): [True: 0, False: 2.57k]
  ------------------
 3950|      0|        return 1;
 3951|  2.57k|    OPENSSL_free(sc->ext.alpn);
  ------------------
  |  |  132|  2.57k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3952|  2.57k|    sc->ext.alpn = alpn;
 3953|  2.57k|    sc->ext.alpn_len = protos_len;
 3954|       |
 3955|  2.57k|    return 0;
 3956|  2.57k|}
SSL_CTX_new_ex:
 4211|  3.47k|{
 4212|  3.47k|    SSL_CTX *ret = NULL;
 4213|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4214|       |    const char *keylogfile = ossl_safe_getenv("SSLKEYLOGFILE");
 4215|       |#endif
 4216|       |#ifndef OPENSSL_NO_COMP_ALG
 4217|       |    int i;
 4218|       |#endif
 4219|       |
 4220|  3.47k|    if (meth == NULL) {
  ------------------
  |  Branch (4220:9): [True: 0, False: 3.47k]
  ------------------
 4221|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NULL_SSL_METHOD_PASSED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4222|      0|        return NULL;
 4223|      0|    }
 4224|       |
 4225|  3.47k|    if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))
  ------------------
  |  | 2813|  3.47k|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (4225:9): [True: 0, False: 3.47k]
  ------------------
 4226|      0|        return NULL;
 4227|       |
 4228|       |    /* Doing this for the run once effect */
 4229|  3.47k|    if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) {
  ------------------
  |  Branch (4229:9): [True: 0, False: 3.47k]
  ------------------
 4230|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4231|      0|        goto err;
 4232|      0|    }
 4233|       |
 4234|  3.47k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  3.47k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4235|  3.47k|    if (ret == NULL)
  ------------------
  |  Branch (4235:9): [True: 0, False: 3.47k]
  ------------------
 4236|      0|        return NULL;
 4237|       |
 4238|       |    /* Init the reference counting before any call to SSL_CTX_free */
 4239|  3.47k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (4239:9): [True: 0, False: 3.47k]
  ------------------
 4240|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4241|      0|        return NULL;
 4242|      0|    }
 4243|       |
 4244|  3.47k|    ret->lock = CRYPTO_THREAD_lock_new();
 4245|  3.47k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (4245:9): [True: 0, False: 3.47k]
  ------------------
 4246|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4247|      0|        goto err;
 4248|      0|    }
 4249|       |
 4250|       |#ifdef TSAN_REQUIRES_LOCKING
 4251|       |    ret->tsan_lock = CRYPTO_THREAD_lock_new();
 4252|       |    if (ret->tsan_lock == NULL) {
 4253|       |        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
 4254|       |        goto err;
 4255|       |    }
 4256|       |#endif
 4257|       |
 4258|  3.47k|    ret->libctx = libctx;
 4259|  3.47k|    if (propq != NULL) {
  ------------------
  |  Branch (4259:9): [True: 677, False: 2.79k]
  ------------------
 4260|    677|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|    677|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4261|    677|        if (ret->propq == NULL)
  ------------------
  |  Branch (4261:13): [True: 0, False: 677]
  ------------------
 4262|      0|            goto err;
 4263|    677|    }
 4264|       |
 4265|  3.47k|    ret->method = meth;
 4266|  3.47k|    ret->min_proto_version = 0;
 4267|  3.47k|    ret->max_proto_version = 0;
 4268|  3.47k|    ret->mode = SSL_MODE_AUTO_RETRY;
  ------------------
  |  |  530|  3.47k|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
 4269|  3.47k|    ret->session_cache_mode = SSL_SESS_CACHE_SERVER;
  ------------------
  |  |  735|  3.47k|#define SSL_SESS_CACHE_SERVER 0x0002
  ------------------
 4270|  3.47k|    ret->session_cache_size = SSL_SESSION_CACHE_MAX_SIZE_DEFAULT;
  ------------------
  |  |  716|  3.47k|#define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024 * 20)
  ------------------
 4271|       |    /* We take the system default. */
 4272|  3.47k|    ret->session_timeout = meth->get_timeout();
 4273|  3.47k|    ret->max_cert_list = SSL_MAX_CERT_LIST_DEFAULT;
  ------------------
  |  |  714|  3.47k|#define SSL_MAX_CERT_LIST_DEFAULT (1024 * 100)
  ------------------
 4274|  3.47k|    ret->verify_mode = SSL_VERIFY_NONE;
  ------------------
  |  | 1200|  3.47k|#define SSL_VERIFY_NONE 0x00
  ------------------
 4275|       |
 4276|  3.47k|    ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
 4277|  3.47k|    if (ret->sessions == NULL) {
  ------------------
  |  Branch (4277:9): [True: 0, False: 3.47k]
  ------------------
 4278|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4279|      0|        goto err;
 4280|      0|    }
 4281|  3.47k|    ret->cert_store = X509_STORE_new();
 4282|  3.47k|    if (ret->cert_store == NULL) {
  ------------------
  |  Branch (4282:9): [True: 0, False: 3.47k]
  ------------------
 4283|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4284|      0|        goto err;
 4285|      0|    }
 4286|  3.47k|#ifndef OPENSSL_NO_CT
 4287|  3.47k|    ret->ctlog_store = CTLOG_STORE_new_ex(libctx, propq);
 4288|  3.47k|    if (ret->ctlog_store == NULL) {
  ------------------
  |  Branch (4288:9): [True: 0, False: 3.47k]
  ------------------
 4289|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CT_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4290|      0|        goto err;
 4291|      0|    }
 4292|  3.47k|#endif
 4293|       |
 4294|       |    /* initialize cipher/digest methods table */
 4295|  3.47k|    if (!ssl_load_ciphers(ret)) {
  ------------------
  |  Branch (4295:9): [True: 0, False: 3.47k]
  ------------------
 4296|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4297|      0|        goto err;
 4298|      0|    }
 4299|       |
 4300|  3.47k|    if (!ssl_load_groups(ret)) {
  ------------------
  |  Branch (4300:9): [True: 0, False: 3.47k]
  ------------------
 4301|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4302|      0|        goto err;
 4303|      0|    }
 4304|       |
 4305|       |    /* load provider sigalgs */
 4306|  3.47k|    if (!ssl_load_sigalgs(ret)) {
  ------------------
  |  Branch (4306:9): [True: 0, False: 3.47k]
  ------------------
 4307|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4308|      0|        goto err;
 4309|      0|    }
 4310|       |
 4311|       |    /* initialise sig algs */
 4312|  3.47k|    if (!ssl_setup_sigalgs(ret)) {
  ------------------
  |  Branch (4312:9): [True: 0, False: 3.47k]
  ------------------
 4313|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4314|      0|        goto err;
 4315|      0|    }
 4316|       |
 4317|  3.47k|    if (!SSL_CTX_set_ciphersuites(ret, OSSL_default_ciphersuites())) {
  ------------------
  |  Branch (4317:9): [True: 0, False: 3.47k]
  ------------------
 4318|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4319|      0|        goto err;
 4320|      0|    }
 4321|       |
 4322|  3.47k|    if ((ret->cert = ssl_cert_new(SSL_PKEY_NUM + ret->sigalg_list_len)) == NULL) {
  ------------------
  |  |  336|  3.47k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (4322:9): [True: 0, False: 3.47k]
  ------------------
 4323|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4324|      0|        goto err;
 4325|      0|    }
 4326|       |
 4327|  3.47k|    if (!ssl_create_cipher_list(ret,
  ------------------
  |  Branch (4327:9): [True: 0, False: 3.47k]
  ------------------
 4328|  3.47k|            ret->tls13_ciphersuites,
 4329|  3.47k|            &ret->cipher_list, &ret->cipher_list_by_id,
 4330|  3.47k|            OSSL_default_cipher_list(), ret->cert)
 4331|  3.47k|        || sk_SSL_CIPHER_num(ret->cipher_list) <= 0) {
  ------------------
  |  | 1028|  3.47k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4331:12): [True: 113, False: 3.35k]
  ------------------
 4332|    113|        ERR_raise(ERR_LIB_SSL, SSL_R_LIBRARY_HAS_NO_CIPHERS);
  ------------------
  |  |  357|    113|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|    113|    (ERR_new(),                                                  \
  |  |  |  |  360|    113|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    113|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|    113|        ERR_set_error)
  |  |  ------------------
  ------------------
 4333|    113|        goto err;
 4334|    113|    }
 4335|       |
 4336|  3.35k|    ret->param = X509_VERIFY_PARAM_new();
 4337|  3.35k|    if (ret->param == NULL) {
  ------------------
  |  Branch (4337:9): [True: 0, False: 3.35k]
  ------------------
 4338|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4339|      0|        goto err;
 4340|      0|    }
 4341|       |
 4342|       |    /*
 4343|       |     * If these aren't available from the provider we'll get NULL returns.
 4344|       |     * That's fine but will cause errors later if SSLv3 is negotiated
 4345|       |     */
 4346|  3.35k|    ERR_set_mark();
 4347|  3.35k|    ret->md5 = EVP_MD_fetch(libctx, "MD5", propq);
 4348|  3.35k|    ret->sha1 = EVP_MD_fetch(libctx, "SHA1", propq);
 4349|  3.35k|    ERR_pop_to_mark();
 4350|       |
 4351|  3.35k|    if ((ret->ca_names = sk_X509_NAME_new_null()) == NULL) {
  ------------------
  |  |   59|  3.35k|#define sk_X509_NAME_new_null() ((STACK_OF(X509_NAME) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_NAME_freefunc_thunk))
  ------------------
  |  Branch (4351:9): [True: 0, False: 3.35k]
  ------------------
 4352|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4353|      0|        goto err;
 4354|      0|    }
 4355|       |
 4356|  3.35k|    if ((ret->client_ca_names = sk_X509_NAME_new_null()) == NULL) {
  ------------------
  |  |   59|  3.35k|#define sk_X509_NAME_new_null() ((STACK_OF(X509_NAME) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_NAME_freefunc_thunk))
  ------------------
  |  Branch (4356:9): [True: 0, False: 3.35k]
  ------------------
 4357|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4358|      0|        goto err;
 4359|      0|    }
 4360|       |
 4361|  3.35k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data)) {
  ------------------
  |  |  252|  3.35k|#define CRYPTO_EX_INDEX_SSL_CTX 1
  ------------------
  |  Branch (4361:9): [True: 0, False: 3.35k]
  ------------------
 4362|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4363|      0|        goto err;
 4364|      0|    }
 4365|       |
 4366|  3.35k|    if ((ret->ext.secure = OPENSSL_secure_zalloc(sizeof(*ret->ext.secure))) == NULL)
  ------------------
  |  |  142|  3.35k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4366:9): [True: 0, False: 3.35k]
  ------------------
 4367|      0|        goto err;
 4368|       |
 4369|       |    /* No compression for DTLS */
 4370|  3.35k|    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS))
  ------------------
  |  | 2196|  3.35k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (4370:9): [True: 3.35k, False: 0]
  ------------------
 4371|  3.35k|        ret->comp_methods = SSL_COMP_get_compression_methods();
 4372|       |
 4373|  3.35k|    ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  3.35k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4374|  3.35k|    ret->split_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  3.35k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4375|       |
 4376|       |    /* Setup RFC5077 ticket keys */
 4377|  3.35k|    if ((RAND_bytes_ex(libctx, ret->ext.tick_key_name,
  ------------------
  |  Branch (4377:9): [True: 0, False: 3.35k]
  ------------------
 4378|  3.35k|             sizeof(ret->ext.tick_key_name), 0)
 4379|  3.35k|            <= 0)
 4380|  3.35k|        || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_hmac_key,
  ------------------
  |  Branch (4380:12): [True: 0, False: 3.35k]
  ------------------
 4381|  3.35k|                sizeof(ret->ext.secure->tick_hmac_key), 0)
 4382|  3.35k|            <= 0)
 4383|  3.35k|        || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_aes_key,
  ------------------
  |  Branch (4383:12): [True: 0, False: 3.35k]
  ------------------
 4384|  3.35k|                sizeof(ret->ext.secure->tick_aes_key), 0)
 4385|  3.35k|            <= 0))
 4386|      0|        ret->options |= SSL_OP_NO_TICKET;
  ------------------
  |  |  384|      0|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 4387|       |
 4388|  3.35k|    if (RAND_priv_bytes_ex(libctx, ret->ext.cookie_hmac_key,
  ------------------
  |  Branch (4388:9): [True: 0, False: 3.35k]
  ------------------
 4389|  3.35k|            sizeof(ret->ext.cookie_hmac_key), 0)
 4390|  3.35k|        <= 0) {
 4391|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_RAND_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4392|      0|        goto err;
 4393|      0|    }
 4394|       |
 4395|  3.35k|#ifndef OPENSSL_NO_SRP
 4396|  3.35k|    if (!ssl_ctx_srp_ctx_init_intern(ret)) {
  ------------------
  |  Branch (4396:9): [True: 0, False: 3.35k]
  ------------------
 4397|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4398|      0|        goto err;
 4399|      0|    }
 4400|  3.35k|#endif
 4401|       |
 4402|       |#ifndef OPENSSL_NO_COMP_ALG
 4403|       |    /*
 4404|       |     * Set the default order: brotli, zlib, zstd
 4405|       |     * Including only those enabled algorithms
 4406|       |     */
 4407|       |    memset(ret->cert_comp_prefs, 0, sizeof(ret->cert_comp_prefs));
 4408|       |    i = 0;
 4409|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_brotli))
 4410|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_brotli;
 4411|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_zlib))
 4412|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_zlib;
 4413|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_zstd))
 4414|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_zstd;
 4415|       |#endif
 4416|       |    /*
 4417|       |     * Disable compression by default to prevent CRIME. Applications can
 4418|       |     * re-enable compression by configuring
 4419|       |     * SSL_CTX_clear_options(ctx, SSL_OP_NO_COMPRESSION);
 4420|       |     * or by using the SSL_CONF library. Similarly we also enable TLSv1.3
 4421|       |     * middlebox compatibility by default. This may be disabled by default in
 4422|       |     * a later OpenSSL version.
 4423|       |     */
 4424|  3.35k|    ret->options |= SSL_OP_NO_COMPRESSION | SSL_OP_ENABLE_MIDDLEBOX_COMPAT;
  ------------------
  |  |  395|  3.35k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  351|  3.35k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
                  ret->options |= SSL_OP_NO_COMPRESSION | SSL_OP_ENABLE_MIDDLEBOX_COMPAT;
  ------------------
  |  |  404|  3.35k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  3.35k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 4425|       |
 4426|  3.35k|    ret->ext.status_type = TLSEXT_STATUSTYPE_nothing;
  ------------------
  |  | 2213|  3.35k|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
 4427|       |
 4428|       |    /*
 4429|       |     * We cannot usefully set a default max_early_data here (which gets
 4430|       |     * propagated in SSL_new(), for the following reason: setting the
 4431|       |     * SSL field causes tls_construct_stoc_early_data() to tell the
 4432|       |     * client that early data will be accepted when constructing a TLS 1.3
 4433|       |     * session ticket, and the client will accordingly send us early data
 4434|       |     * when using that ticket (if the client has early data to send).
 4435|       |     * However, in order for the early data to actually be consumed by
 4436|       |     * the application, the application must also have calls to
 4437|       |     * SSL_read_early_data(); otherwise we'll just skip past the early data
 4438|       |     * and ignore it.  So, since the application must add calls to
 4439|       |     * SSL_read_early_data(), we also require them to add
 4440|       |     * calls to SSL_CTX_set_max_early_data() in order to use early data,
 4441|       |     * eliminating the bandwidth-wasting early data in the case described
 4442|       |     * above.
 4443|       |     */
 4444|  3.35k|    ret->max_early_data = 0;
 4445|       |
 4446|       |    /*
 4447|       |     * Default recv_max_early_data is a fully loaded single record. Could be
 4448|       |     * split across multiple records in practice. We set this differently to
 4449|       |     * max_early_data so that, in the default case, we do not advertise any
 4450|       |     * support for early_data, but if a client were to send us some (e.g.
 4451|       |     * because of an old, stale ticket) then we will tolerate it and skip over
 4452|       |     * it.
 4453|       |     */
 4454|  3.35k|    ret->recv_max_early_data = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  3.35k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4455|       |
 4456|       |    /* By default we send two session tickets automatically in TLSv1.3 */
 4457|  3.35k|    ret->num_tickets = 2;
 4458|       |
 4459|  3.35k|#ifndef OPENSSL_NO_QUIC
 4460|       |    /* only create a cache for client CTX-es */
 4461|  3.35k|    if (meth == OSSL_QUIC_client_method())
  ------------------
  |  Branch (4461:9): [True: 0, False: 3.35k]
  ------------------
 4462|      0|        if ((ret->tokencache = ossl_quic_new_token_store()) == NULL)
  ------------------
  |  Branch (4462:13): [True: 0, False: 0]
  ------------------
 4463|      0|            goto err;
 4464|  3.35k|    ret->domain_flags = 0;
 4465|  3.35k|    if (IS_QUIC_METHOD(meth)) {
  ------------------
  |  |   52|  3.35k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method() || (m) == OSSL_QUIC_method())
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 0, False: 3.35k]
  |  |  |  Branch (52:42): [True: 0, False: 3.35k]
  |  |  |  Branch (52:85): [True: 0, False: 3.35k]
  |  |  |  Branch (52:121): [True: 0, False: 3.35k]
  |  |  ------------------
  ------------------
 4466|      0|#if defined(OPENSSL_THREADS)
 4467|      0|        if (meth == OSSL_QUIC_client_thread_method())
  ------------------
  |  Branch (4467:13): [True: 0, False: 0]
  ------------------
 4468|      0|            ret->domain_flags
 4469|      0|                = SSL_DOMAIN_FLAG_MULTI_THREAD
  ------------------
  |  | 2375|      0|#define SSL_DOMAIN_FLAG_MULTI_THREAD (1U << 1)
  ------------------
 4470|      0|                | SSL_DOMAIN_FLAG_THREAD_ASSISTED
  ------------------
  |  | 2376|      0|#define SSL_DOMAIN_FLAG_THREAD_ASSISTED (1U << 2)
  ------------------
 4471|      0|                | SSL_DOMAIN_FLAG_BLOCKING;
  ------------------
  |  | 2377|      0|#define SSL_DOMAIN_FLAG_BLOCKING (1U << 3)
  ------------------
 4472|      0|        else
 4473|      0|            ret->domain_flags
 4474|      0|                = SSL_DOMAIN_FLAG_MULTI_THREAD
  ------------------
  |  | 2375|      0|#define SSL_DOMAIN_FLAG_MULTI_THREAD (1U << 1)
  ------------------
 4475|      0|                | SSL_DOMAIN_FLAG_LEGACY_BLOCKING;
  ------------------
  |  | 2378|      0|#define SSL_DOMAIN_FLAG_LEGACY_BLOCKING (1U << 4)
  ------------------
 4476|       |#else
 4477|       |        ret->domain_flags
 4478|       |            = SSL_DOMAIN_FLAG_SINGLE_THREAD
 4479|       |            | SSL_DOMAIN_FLAG_LEGACY_BLOCKING;
 4480|       |#endif
 4481|      0|    }
 4482|  3.35k|#endif
 4483|       |
 4484|  3.35k|    if (!ssl_ctx_system_config(ret)) {
  ------------------
  |  Branch (4484:9): [True: 0, False: 3.35k]
  ------------------
 4485|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_ERROR_IN_SYSTEM_DEFAULT_CONFIG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4486|      0|        goto err;
 4487|      0|    }
 4488|       |
 4489|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4490|       |    if (keylogfile != NULL && strlen(keylogfile) != 0) {
 4491|       |        /* Make sure we have a global lock allocated */
 4492|       |        if (!RUN_ONCE(&ssl_keylog_once, ssl_keylog_init)) {
 4493|       |            /* use a trace message as a warning */
 4494|       |            OSSL_TRACE(TLS, "Unable to initialize keylog data\n");
 4495|       |            goto out;
 4496|       |        }
 4497|       |
 4498|       |        /* Grab our global lock */
 4499|       |        if (!CRYPTO_THREAD_write_lock(keylog_lock)) {
 4500|       |            OSSL_TRACE(TLS, "Unable to acquire keylog write lock\n");
 4501|       |            goto out;
 4502|       |        } else {
 4503|       |            /*
 4504|       |             * If the bio for the requested keylog file hasn't been
 4505|       |             * created yet, go ahead and create it, and set it to append
 4506|       |             * if its already there.
 4507|       |             */
 4508|       |            if (keylog_bio == NULL) {
 4509|       |                keylog_bio = get_sslkeylog_bio(keylogfile);
 4510|       |                if (keylog_bio == NULL) {
 4511|       |                    OSSL_TRACE(TLS, "Unable to create keylog bio\n");
 4512|       |                    goto out;
 4513|       |                }
 4514|       |                BIO_set_callback_ex(keylog_bio, check_keylog_bio_free);
 4515|       |            } else {
 4516|       |                /* up our refcount for the already-created case */
 4517|       |                BIO_up_ref(keylog_bio);
 4518|       |            }
 4519|       |            /* If we have a bio now, assign the callback handler */
 4520|       |            if (keylog_bio != NULL)
 4521|       |                ret->do_sslkeylog = 1;
 4522|       |            /* unlock, and we're done */
 4523|       |            CRYPTO_THREAD_unlock(keylog_lock);
 4524|       |        }
 4525|       |    }
 4526|       |out:
 4527|       |#endif
 4528|  3.35k|    return ret;
 4529|    113|err:
 4530|    113|    SSL_CTX_free(ret);
 4531|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4532|       |    BIO_free(keylog_bio);
 4533|       |#endif
 4534|       |    return NULL;
 4535|  3.35k|}
SSL_CTX_new:
 4538|  2.76k|{
 4539|  2.76k|    return SSL_CTX_new_ex(NULL, NULL, meth);
 4540|  2.76k|}
SSL_CTX_up_ref:
 4543|  5.17k|{
 4544|  5.17k|    int i;
 4545|       |
 4546|  5.17k|    if (CRYPTO_UP_REF(&ctx->references, &i) <= 0)
  ------------------
  |  Branch (4546:9): [True: 0, False: 5.17k]
  ------------------
 4547|      0|        return 0;
 4548|       |
 4549|  5.17k|    REF_PRINT_COUNT("SSL_CTX", i, ctx);
  ------------------
  |  |  301|  5.17k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  5.17k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  5.17k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  5.17k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4550|  5.17k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|  5.17k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 5.17k]
  |  |  ------------------
  ------------------
 4551|  5.17k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (4551:13): [True: 5.17k, False: 0]
  ------------------
 4552|  5.17k|}
SSL_CTX_free:
 4555|  8.64k|{
 4556|  8.64k|    int i;
 4557|  8.64k|    size_t j;
 4558|       |
 4559|  8.64k|    if (a == NULL)
  ------------------
  |  Branch (4559:9): [True: 0, False: 8.64k]
  ------------------
 4560|      0|        return;
 4561|       |
 4562|  8.64k|    CRYPTO_DOWN_REF(&a->references, &i);
 4563|  8.64k|    REF_PRINT_COUNT("SSL_CTX", i, a);
  ------------------
  |  |  301|  8.64k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  8.64k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  8.64k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  8.64k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4564|  8.64k|    if (i > 0)
  ------------------
  |  Branch (4564:9): [True: 5.17k, False: 3.47k]
  ------------------
 4565|  5.17k|        return;
 4566|  3.47k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  3.47k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 3.47k]
  |  |  ------------------
  ------------------
 4567|       |
 4568|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4569|       |    if (keylog_lock != NULL && CRYPTO_THREAD_write_lock(keylog_lock)) {
 4570|       |        if (a->do_sslkeylog == 1)
 4571|       |            BIO_free(keylog_bio);
 4572|       |        a->do_sslkeylog = 0;
 4573|       |        CRYPTO_THREAD_unlock(keylog_lock);
 4574|       |    }
 4575|       |#endif
 4576|       |
 4577|  3.47k|    X509_VERIFY_PARAM_free(a->param);
 4578|  3.47k|    dane_ctx_final(&a->dane);
 4579|       |
 4580|       |    /*
 4581|       |     * Free internal session cache. However: the remove_cb() may reference
 4582|       |     * the ex_data of SSL_CTX, thus the ex_data store can only be removed
 4583|       |     * after the sessions were flushed.
 4584|       |     * As the ex_data handling routines might also touch the session cache,
 4585|       |     * the most secure solution seems to be: empty (flush) the cache, then
 4586|       |     * free ex_data, then finally free the cache.
 4587|       |     * (See ticket [openssl.org #212].)
 4588|       |     */
 4589|  3.47k|    if (a->sessions != NULL)
  ------------------
  |  Branch (4589:9): [True: 3.47k, False: 0]
  ------------------
 4590|  3.47k|        SSL_CTX_flush_sessions_ex(a, 0);
 4591|       |
 4592|  3.47k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);
  ------------------
  |  |  252|  3.47k|#define CRYPTO_EX_INDEX_SSL_CTX 1
  ------------------
 4593|  3.47k|    lh_SSL_SESSION_free(a->sessions);
 4594|  3.47k|    X509_STORE_free(a->cert_store);
 4595|  3.47k|#ifndef OPENSSL_NO_CT
 4596|  3.47k|    CTLOG_STORE_free(a->ctlog_store);
 4597|  3.47k|#endif
 4598|  3.47k|    sk_SSL_CIPHER_free(a->cipher_list);
  ------------------
  |  | 1034|  3.47k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4599|  3.47k|    sk_SSL_CIPHER_free(a->cipher_list_by_id);
  ------------------
  |  | 1034|  3.47k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4600|  3.47k|    sk_SSL_CIPHER_free(a->tls13_ciphersuites);
  ------------------
  |  | 1034|  3.47k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4601|  3.47k|    ssl_cert_free(a->cert);
 4602|  3.47k|    sk_X509_NAME_pop_free(a->ca_names, X509_NAME_free);
  ------------------
  |  |   70|  3.47k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 4603|  3.47k|    sk_X509_NAME_pop_free(a->client_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  3.47k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 4604|  3.47k|    OSSL_STACK_OF_X509_free(a->extra_certs);
 4605|  3.47k|    a->comp_methods = NULL;
 4606|  3.47k|#ifndef OPENSSL_NO_SRTP
 4607|  3.47k|    sk_SRTP_PROTECTION_PROFILE_free(a->srtp_profiles);
  ------------------
  |  |  257|  3.47k|#define sk_SRTP_PROTECTION_PROFILE_free(sk) OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
 4608|  3.47k|#endif
 4609|  3.47k|#ifndef OPENSSL_NO_SRP
 4610|  3.47k|    ssl_ctx_srp_ctx_free_intern(a);
 4611|  3.47k|#endif
 4612|       |
 4613|  3.47k|    OPENSSL_free(a->ext.ecpointformats);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4614|  3.47k|    OPENSSL_free(a->ext.supportedgroups);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4615|  3.47k|    OPENSSL_free(a->ext.keyshares);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4616|  3.47k|    OPENSSL_free(a->ext.tuples);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4617|  3.47k|    OPENSSL_free(a->ext.alpn);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4618|  3.47k|    OPENSSL_secure_clear_free(a->ext.secure, sizeof(*a->ext.secure));
  ------------------
  |  |  150|  3.47k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4619|       |
 4620|  3.47k|    ssl_evp_md_free(a->md5);
 4621|  3.47k|    ssl_evp_md_free(a->sha1);
 4622|       |
 4623|  93.6k|    for (j = 0; j < SSL_ENC_NUM_IDX; j++)
  ------------------
  |  |  364|  93.6k|#define SSL_ENC_NUM_IDX 26
  ------------------
  |  Branch (4623:17): [True: 90.2k, False: 3.47k]
  ------------------
 4624|  90.2k|        ssl_evp_cipher_free(a->ssl_cipher_methods[j]);
 4625|  55.5k|    for (j = 0; j < SSL_MD_NUM_IDX; j++)
  ------------------
  |  |  210|  55.5k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|  55.5k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (4625:17): [True: 52.0k, False: 3.47k]
  ------------------
 4626|  52.0k|        ssl_evp_md_free(a->ssl_digest_methods[j]);
 4627|  94.1k|    for (j = 0; j < a->group_list_len; j++) {
  ------------------
  |  Branch (4627:17): [True: 90.6k, False: 3.47k]
  ------------------
 4628|  90.6k|        OPENSSL_free(a->group_list[j].tlsname);
  ------------------
  |  |  132|  90.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4629|  90.6k|        OPENSSL_free(a->group_list[j].realname);
  ------------------
  |  |  132|  90.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4630|  90.6k|        OPENSSL_free(a->group_list[j].algorithm);
  ------------------
  |  |  132|  90.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4631|  90.6k|    }
 4632|  3.47k|    OPENSSL_free(a->group_list);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4633|  16.8k|    for (j = 0; j < a->sigalg_list_len; j++) {
  ------------------
  |  Branch (4633:17): [True: 13.4k, False: 3.47k]
  ------------------
 4634|  13.4k|        OPENSSL_free(a->sigalg_list[j].name);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4635|  13.4k|        OPENSSL_free(a->sigalg_list[j].sigalg_name);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4636|  13.4k|        OPENSSL_free(a->sigalg_list[j].sigalg_oid);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4637|  13.4k|        OPENSSL_free(a->sigalg_list[j].sig_name);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4638|  13.4k|        OPENSSL_free(a->sigalg_list[j].sig_oid);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4639|  13.4k|        OPENSSL_free(a->sigalg_list[j].hash_name);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4640|  13.4k|        OPENSSL_free(a->sigalg_list[j].hash_oid);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4641|  13.4k|        OPENSSL_free(a->sigalg_list[j].keytype);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4642|  13.4k|        OPENSSL_free(a->sigalg_list[j].keytype_oid);
  ------------------
  |  |  132|  13.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4643|  13.4k|    }
 4644|  3.47k|    OPENSSL_free(a->sigalg_list);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4645|  3.47k|    OPENSSL_free(a->ssl_cert_info);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4646|       |
 4647|  3.47k|    OPENSSL_free(a->sigalg_lookup_cache);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4648|  3.47k|    OPENSSL_free(a->tls12_sigalgs);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4649|       |
 4650|  3.47k|    OPENSSL_free(a->client_cert_type);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4651|  3.47k|    OPENSSL_free(a->server_cert_type);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4652|       |
 4653|  3.47k|    CRYPTO_THREAD_lock_free(a->lock);
 4654|  3.47k|    CRYPTO_FREE_REF(&a->references);
 4655|       |#ifdef TSAN_REQUIRES_LOCKING
 4656|       |    CRYPTO_THREAD_lock_free(a->tsan_lock);
 4657|       |#endif
 4658|       |
 4659|  3.47k|    OPENSSL_free(a->propq);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4660|  3.47k|#ifndef OPENSSL_NO_QLOG
 4661|  3.47k|    OPENSSL_free(a->qlog_title);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4662|  3.47k|#endif
 4663|       |
 4664|  3.47k|#ifndef OPENSSL_NO_QUIC
 4665|  3.47k|    ossl_quic_free_token_store(a->tokencache);
 4666|  3.47k|#endif
 4667|       |
 4668|  3.47k|#ifndef OPENSSL_NO_ECH
 4669|  3.47k|    ossl_ech_ctx_clear(&a->ext.ech);
 4670|  3.47k|#endif
 4671|       |
 4672|  3.47k|    OPENSSL_free(a);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4673|  3.47k|}
SSL_CTX_set_default_passwd_cb:
 4676|      1|{
 4677|      1|    ctx->default_passwd_callback = cb;
 4678|      1|}
SSL_CTX_set_default_passwd_cb_userdata:
 4681|      1|{
 4682|      1|    ctx->default_passwd_callback_userdata = u;
 4683|      1|}
SSL_CTX_set_verify:
 4745|  2.58k|{
 4746|  2.58k|    ctx->verify_mode = mode;
 4747|  2.58k|    ctx->default_verify_callback = cb;
 4748|  2.58k|}
SSL_get_error:
 5035|    962|{
 5036|    962|    return ossl_ssl_get_error(s, i, /*check_err=*/1);
 5037|    962|}
ossl_ssl_get_error:
 5040|    962|{
 5041|    962|    int reason;
 5042|    962|    BIO *bio;
 5043|    962|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|    962|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|    962|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 962]
  |  |  |  |  ------------------
  |  |  |  |   33|    962|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|    962|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 962, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    962|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    962|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5044|       |
 5045|    962|    if (i > 0)
  ------------------
  |  Branch (5045:9): [True: 0, False: 962]
  ------------------
 5046|      0|        return SSL_ERROR_NONE;
  ------------------
  |  | 1284|      0|#define SSL_ERROR_NONE 0
  ------------------
 5047|       |
 5048|    962|#ifndef OPENSSL_NO_QUIC
 5049|    962|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|    962|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|    962|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 962]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 962, False: 0]
  |  |  ------------------
  ------------------
 5050|      0|        reason = ossl_quic_get_error(s, i);
 5051|      0|        if (reason != SSL_ERROR_NONE)
  ------------------
  |  | 1284|      0|#define SSL_ERROR_NONE 0
  ------------------
  |  Branch (5051:13): [True: 0, False: 0]
  ------------------
 5052|      0|            return reason;
 5053|      0|    }
 5054|    962|#endif
 5055|       |
 5056|    962|    if (sc == NULL)
  ------------------
  |  Branch (5056:9): [True: 0, False: 962]
  ------------------
 5057|      0|        return SSL_ERROR_SSL;
  ------------------
  |  | 1285|      0|#define SSL_ERROR_SSL 1
  ------------------
 5058|       |
 5059|    962|    if (check_err != 0) {
  ------------------
  |  Branch (5059:9): [True: 962, False: 0]
  ------------------
 5060|    962|        if (sc->statem.error_state == ERROR_STATE_SSL)
  ------------------
  |  Branch (5060:13): [True: 477, False: 485]
  ------------------
 5061|    477|            return SSL_ERROR_SSL;
  ------------------
  |  | 1285|    477|#define SSL_ERROR_SSL 1
  ------------------
 5062|    485|        if (sc->statem.error_state == ERROR_STATE_SYSCALL)
  ------------------
  |  Branch (5062:13): [True: 0, False: 485]
  ------------------
 5063|      0|            return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1289|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 5064|    485|    }
 5065|       |
 5066|    485|#ifndef OPENSSL_NO_QUIC
 5067|    485|    if (!IS_QUIC(s))
  ------------------
  |  |   96|    485|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|    485|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 485]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 485, False: 0]
  |  |  ------------------
  ------------------
 5068|    485|#endif
 5069|    485|    {
 5070|    485|        if (SSL_want_read(s)) {
  ------------------
  |  |  966|    485|#define SSL_want_read(s) (SSL_want(s) == SSL_READING)
  |  |  ------------------
  |  |  |  |  957|    485|#define SSL_READING 3
  |  |  ------------------
  |  |  |  Branch (966:26): [True: 485, False: 0]
  |  |  ------------------
  ------------------
 5071|    485|            bio = SSL_get_rbio(s);
 5072|    485|            if (BIO_should_read(bio))
  ------------------
  |  |  277|    485|#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
  |  |  ------------------
  |  |  |  |  222|    485|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |  |  Branch (277:28): [True: 484, False: 1]
  |  |  ------------------
  ------------------
 5073|    484|                return SSL_ERROR_WANT_READ;
  ------------------
  |  | 1286|    484|#define SSL_ERROR_WANT_READ 2
  ------------------
 5074|      1|            else if (BIO_should_write(bio))
  ------------------
  |  |  278|      1|#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
  |  |  ------------------
  |  |  |  |  223|      1|#define BIO_FLAGS_WRITE 0x02
  |  |  ------------------
  |  |  |  Branch (278:29): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 5075|       |                /*
 5076|       |                 * This one doesn't make too much sense ... We never try to
 5077|       |                 * write to the rbio, and an application program where rbio and
 5078|       |                 * wbio are separate couldn't even know what it should wait for.
 5079|       |                 * However if we ever set s->rwstate incorrectly (so that we
 5080|       |                 * have SSL_want_read(s) instead of SSL_want_write(s)) and rbio
 5081|       |                 * and wbio *are* the same, this test works around that bug; so
 5082|       |                 * it might be safer to keep it.
 5083|       |                 */
 5084|      0|                return SSL_ERROR_WANT_WRITE;
  ------------------
  |  | 1287|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
 5085|      1|            else if (BIO_should_io_special(bio)) {
  ------------------
  |  |  279|      1|#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
  |  |  ------------------
  |  |  |  |  224|      1|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  ------------------
  |  |  |  Branch (279:34): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 5086|      0|                reason = BIO_get_retry_reason(bio);
 5087|      0|                if (reason == BIO_RR_CONNECT)
  ------------------
  |  |  295|      0|#define BIO_RR_CONNECT 0x02
  ------------------
  |  Branch (5087:21): [True: 0, False: 0]
  ------------------
 5088|      0|                    return SSL_ERROR_WANT_CONNECT;
  ------------------
  |  | 1292|      0|#define SSL_ERROR_WANT_CONNECT 7
  ------------------
 5089|      0|                else if (reason == BIO_RR_ACCEPT)
  ------------------
  |  |  297|      0|#define BIO_RR_ACCEPT 0x03
  ------------------
  |  Branch (5089:26): [True: 0, False: 0]
  ------------------
 5090|      0|                    return SSL_ERROR_WANT_ACCEPT;
  ------------------
  |  | 1293|      0|#define SSL_ERROR_WANT_ACCEPT 8
  ------------------
 5091|      0|                else
 5092|      0|                    return SSL_ERROR_SYSCALL; /* unknown */
  ------------------
  |  | 1289|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 5093|      0|            }
 5094|    485|        }
 5095|       |
 5096|      1|        if (SSL_want_write(s)) {
  ------------------
  |  |  967|      1|#define SSL_want_write(s) (SSL_want(s) == SSL_WRITING)
  |  |  ------------------
  |  |  |  |  956|      1|#define SSL_WRITING 2
  |  |  ------------------
  |  |  |  Branch (967:27): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 5097|       |            /*
 5098|       |             * Access wbio directly - in order to use the buffered bio if
 5099|       |             * present
 5100|       |             */
 5101|      0|            bio = sc->wbio;
 5102|      0|            if (BIO_should_write(bio))
  ------------------
  |  |  278|      0|#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
  |  |  ------------------
  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  ------------------
  |  |  |  Branch (278:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5103|      0|                return SSL_ERROR_WANT_WRITE;
  ------------------
  |  | 1287|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
 5104|      0|            else if (BIO_should_read(bio))
  ------------------
  |  |  277|      0|#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |  |  Branch (277:28): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5105|       |                /*
 5106|       |                 * See above (SSL_want_read(s) with BIO_should_write(bio))
 5107|       |                 */
 5108|      0|                return SSL_ERROR_WANT_READ;
  ------------------
  |  | 1286|      0|#define SSL_ERROR_WANT_READ 2
  ------------------
 5109|      0|            else if (BIO_should_io_special(bio)) {
  ------------------
  |  |  279|      0|#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
  |  |  ------------------
  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  ------------------
  |  |  |  Branch (279:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5110|      0|                reason = BIO_get_retry_reason(bio);
 5111|      0|                if (reason == BIO_RR_CONNECT)
  ------------------
  |  |  295|      0|#define BIO_RR_CONNECT 0x02
  ------------------
  |  Branch (5111:21): [True: 0, False: 0]
  ------------------
 5112|      0|                    return SSL_ERROR_WANT_CONNECT;
  ------------------
  |  | 1292|      0|#define SSL_ERROR_WANT_CONNECT 7
  ------------------
 5113|      0|                else if (reason == BIO_RR_ACCEPT)
  ------------------
  |  |  297|      0|#define BIO_RR_ACCEPT 0x03
  ------------------
  |  Branch (5113:26): [True: 0, False: 0]
  ------------------
 5114|      0|                    return SSL_ERROR_WANT_ACCEPT;
  ------------------
  |  | 1293|      0|#define SSL_ERROR_WANT_ACCEPT 8
  ------------------
 5115|      0|                else
 5116|      0|                    return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1289|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 5117|      0|            }
 5118|      0|        }
 5119|      1|    }
 5120|       |
 5121|      1|    if (SSL_want_x509_lookup(s))
  ------------------
  |  |  968|      1|#define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP)
  |  |  ------------------
  |  |  |  |  958|      1|#define SSL_X509_LOOKUP 4
  |  |  ------------------
  |  |  |  Branch (968:33): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 5122|      0|        return SSL_ERROR_WANT_X509_LOOKUP;
  ------------------
  |  | 1288|      0|#define SSL_ERROR_WANT_X509_LOOKUP 4
  ------------------
 5123|      1|    if (SSL_want_retry_verify(s))
  ------------------
  |  |  969|      1|#define SSL_want_retry_verify(s) (SSL_want(s) == SSL_RETRY_VERIFY)
  |  |  ------------------
  |  |  |  |  962|      1|#define SSL_RETRY_VERIFY 8
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 5124|      0|        return SSL_ERROR_WANT_RETRY_VERIFY;
  ------------------
  |  | 1297|      0|#define SSL_ERROR_WANT_RETRY_VERIFY 12
  ------------------
 5125|      1|    if (SSL_want_async(s))
  ------------------
  |  |  970|      1|#define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED)
  |  |  ------------------
  |  |  |  |  959|      1|#define SSL_ASYNC_PAUSED 5
  |  |  ------------------
  |  |  |  Branch (970:27): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 5126|      0|        return SSL_ERROR_WANT_ASYNC;
  ------------------
  |  | 1294|      0|#define SSL_ERROR_WANT_ASYNC 9
  ------------------
 5127|      1|    if (SSL_want_async_job(s))
  ------------------
  |  |  971|      1|#define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS)
  |  |  ------------------
  |  |  |  |  960|      1|#define SSL_ASYNC_NO_JOBS 6
  |  |  ------------------
  |  |  |  Branch (971:31): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 5128|      0|        return SSL_ERROR_WANT_ASYNC_JOB;
  ------------------
  |  | 1295|      0|#define SSL_ERROR_WANT_ASYNC_JOB 10
  ------------------
 5129|      1|    if (SSL_want_client_hello_cb(s))
  ------------------
  |  |  972|      1|#define SSL_want_client_hello_cb(s) (SSL_want(s) == SSL_CLIENT_HELLO_CB)
  |  |  ------------------
  |  |  |  |  961|      1|#define SSL_CLIENT_HELLO_CB 7
  |  |  ------------------
  |  |  |  Branch (972:37): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 5130|      0|        return SSL_ERROR_WANT_CLIENT_HELLO_CB;
  ------------------
  |  | 1296|      0|#define SSL_ERROR_WANT_CLIENT_HELLO_CB 11
  ------------------
 5131|       |
 5132|      1|    if ((sc->shutdown & SSL_RECEIVED_SHUTDOWN) && (sc->s3.warn_alert == SSL_AD_CLOSE_NOTIFY))
  ------------------
  |  |  217|      1|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
                  if ((sc->shutdown & SSL_RECEIVED_SHUTDOWN) && (sc->s3.warn_alert == SSL_AD_CLOSE_NOTIFY))
  ------------------
  |  | 1232|      1|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      1|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (5132:9): [True: 1, False: 0]
  |  Branch (5132:51): [True: 1, False: 0]
  ------------------
 5133|      1|        return SSL_ERROR_ZERO_RETURN;
  ------------------
  |  | 1291|      1|#define SSL_ERROR_ZERO_RETURN 6
  ------------------
 5134|       |
 5135|      0|    return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1289|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 5136|      1|}
SSL_do_handshake:
 5151|  3.06k|{
 5152|  3.06k|    int ret = 1;
 5153|  3.06k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  3.06k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  3.06k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.06k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.06k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.06k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.06k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.06k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.06k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5154|       |
 5155|  3.06k|#ifndef OPENSSL_NO_QUIC
 5156|  3.06k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  3.06k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  3.06k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 3.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 3.06k, False: 0]
  |  |  ------------------
  ------------------
 5157|      0|        return ossl_quic_do_handshake(s);
 5158|  3.06k|#endif
 5159|       |
 5160|  3.06k|    if (sc == NULL)
  ------------------
  |  Branch (5160:9): [True: 0, False: 3.06k]
  ------------------
 5161|      0|        return -1;
 5162|       |
 5163|  3.06k|    if (ssl_reset_error_state(sc) == 0)
  ------------------
  |  Branch (5163:9): [True: 0, False: 3.06k]
  ------------------
 5164|      0|        return -1;
 5165|       |
 5166|  3.06k|    sc->statem.error_state = ERROR_STATE_NOERROR;
 5167|       |
 5168|  3.06k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (5168:9): [True: 0, False: 3.06k]
  ------------------
 5169|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CONNECTION_TYPE_NOT_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 5170|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 5171|      0|        return -1;
 5172|      0|    }
 5173|       |
 5174|  3.06k|    if (!ossl_statem_check_finish_init(sc, -1)) {
  ------------------
  |  Branch (5174:9): [True: 0, False: 3.06k]
  ------------------
 5175|      0|        ssl_update_error_state(sc);
 5176|      0|        return -1;
 5177|      0|    }
 5178|       |
 5179|  3.06k|    s->method->ssl_renegotiate_check(s, 0);
 5180|       |
 5181|  3.06k|    if (SSL_in_init(s) || SSL_in_before(s)) {
  ------------------
  |  Branch (5181:9): [True: 3.06k, False: 0]
  |  Branch (5181:27): [True: 0, False: 0]
  ------------------
 5182|  3.06k|        if ((sc->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
  ------------------
  |  |  557|  3.06k|#define SSL_MODE_ASYNC 0x00000100U
  ------------------
  |  Branch (5182:13): [True: 0, False: 3.06k]
  |  Branch (5182:44): [True: 0, False: 0]
  ------------------
 5183|      0|            struct ssl_async_args args;
 5184|       |
 5185|      0|            memset(&args, 0, sizeof(args));
 5186|      0|            args.s = s;
 5187|       |
 5188|      0|            ret = ssl_start_async_job(s, &args, ssl_do_handshake_intern);
 5189|  3.06k|        } else {
 5190|  3.06k|            ret = sc->handshake_func(s);
 5191|  3.06k|        }
 5192|  3.06k|    }
 5193|       |
 5194|  3.06k|    ssl_update_error_state(sc);
 5195|  3.06k|    return ret;
 5196|  3.06k|}
SSL_set_connect_state:
 5219|  2.58k|{
 5220|  2.58k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  2.58k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  2.58k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  |  |   18|  2.58k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.58k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 2.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  2.58k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  2.58k|                             : NULL))
  |  |  ------------------
  ------------------
 5221|       |
 5222|  2.58k|#ifndef OPENSSL_NO_QUIC
 5223|  2.58k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  2.58k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  2.58k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 2.58k, False: 0]
  |  |  ------------------
  ------------------
 5224|       |        /* We suppress errors because this is a void function */
 5225|      0|        (void)ossl_quic_set_connect_state(s, 0 /* suppress errors */);
 5226|      0|        return;
 5227|      0|    }
 5228|  2.58k|#endif
 5229|       |
 5230|  2.58k|    sc->server = 0;
 5231|  2.58k|    sc->shutdown = 0;
 5232|  2.58k|    ossl_statem_clear(sc);
 5233|  2.58k|    sc->handshake_func = s->method->ssl_connect;
 5234|       |    /* Ignore return value. Its a void public API function */
 5235|  2.58k|    RECORD_LAYER_reset(&sc->rlayer);
 5236|  2.58k|}
ssl_init_wbio_buffer:
 5552|  2.58k|{
 5553|  2.58k|    BIO *bbio;
 5554|       |
 5555|  2.58k|    if (s->bbio != NULL) {
  ------------------
  |  Branch (5555:9): [True: 0, False: 2.58k]
  ------------------
 5556|       |        /* Already buffered. */
 5557|      0|        return 1;
 5558|      0|    }
 5559|       |
 5560|  2.58k|    bbio = BIO_new(BIO_f_buffer());
 5561|  2.58k|    if (bbio == NULL || BIO_set_read_buffer_size(bbio, 1) <= 0) {
  ------------------
  |  |  635|  2.58k|#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
  |  |  ------------------
  |  |  |  |  460|  2.58k|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
  |  Branch (5561:9): [True: 0, False: 2.58k]
  |  Branch (5561:25): [True: 0, False: 2.58k]
  ------------------
 5562|      0|        BIO_free(bbio);
 5563|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 5564|      0|        return 0;
 5565|      0|    }
 5566|  2.58k|    s->bbio = bbio;
 5567|  2.58k|    s->wbio = BIO_push(bbio, s->wbio);
 5568|       |
 5569|  2.58k|    s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
 5570|       |
 5571|  2.58k|    return 1;
 5572|  2.58k|}
ssl_free_wbio_buffer:
 5575|  12.9k|{
 5576|       |    /* callers ensure s is never null */
 5577|  12.9k|    if (s->bbio == NULL)
  ------------------
  |  Branch (5577:9): [True: 10.3k, False: 2.58k]
  ------------------
 5578|  10.3k|        return 1;
 5579|       |
 5580|  2.58k|    s->wbio = BIO_pop(s->wbio);
 5581|  2.58k|    s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
 5582|       |
 5583|  2.58k|    BIO_free(s->bbio);
 5584|  2.58k|    s->bbio = NULL;
 5585|       |
 5586|  2.58k|    return 1;
 5587|  12.9k|}
SSL_version:
 5649|  9.28k|{
 5650|  9.28k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  9.28k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  9.28k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 9.28k]
  |  |  |  |  ------------------
  |  |  |  |   33|  9.28k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  9.28k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 9.28k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  9.28k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  9.28k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5651|       |
 5652|  9.28k|#ifndef OPENSSL_NO_QUIC
 5653|       |    /* We only support QUICv1 - so if its QUIC its QUICv1 */
 5654|  9.28k|    if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1226|  18.5k|#define SSL_TYPE_QUIC_CONNECTION 0x80
  ------------------
                  if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1227|  9.28k|#define SSL_TYPE_QUIC_XSO 0x81
  ------------------
  |  Branch (5654:9): [True: 0, False: 9.28k]
  |  Branch (5654:48): [True: 0, False: 9.28k]
  ------------------
 5655|      0|        return OSSL_QUIC1_VERSION;
  ------------------
  |  |   33|      0|#define OSSL_QUIC1_VERSION 0x0000001
  ------------------
 5656|  9.28k|#endif
 5657|  9.28k|    if (sc == NULL)
  ------------------
  |  Branch (5657:9): [True: 0, False: 9.28k]
  ------------------
 5658|      0|        return 0;
 5659|       |
 5660|  9.28k|    return sc->version;
 5661|  9.28k|}
SSL_get_verify_result:
 5864|      1|{
 5865|      1|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(ssl);
  ------------------
  |  |   41|      1|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|      1|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |   33|      1|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|      1|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|      1|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|      1|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5866|       |
 5867|      1|    if (sc == NULL)
  ------------------
  |  Branch (5867:9): [True: 0, False: 1]
  ------------------
 5868|      0|        return 0;
 5869|       |
 5870|      1|    return sc->verify_result;
 5871|      1|}
SSL_set_ex_data:
 5926|  2.58k|{
 5927|  2.58k|    return CRYPTO_set_ex_data(&s->ex_data, idx, arg);
 5928|  2.58k|}
SSL_CTX_get_cert_store:
 5946|  4.58k|{
 5947|  4.58k|    return ctx->cert_store;
 5948|  4.58k|}
SSL_want:
 5965|    491|{
 5966|    491|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|    491|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|    491|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 491]
  |  |  |  |  ------------------
  |  |  |  |   33|    491|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|    491|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 491, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    491|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    491|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5967|       |
 5968|    491|#ifndef OPENSSL_NO_QUIC
 5969|    491|    if (IS_QUIC(s))
  ------------------
  |  |   96|    491|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|    491|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 491]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 491, False: 0]
  |  |  ------------------
  ------------------
 5970|      0|        return ossl_quic_want(s);
 5971|    491|#endif
 5972|       |
 5973|    491|    if (sc == NULL)
  ------------------
  |  Branch (5973:9): [True: 0, False: 491]
  ------------------
 5974|      0|        return SSL_NOTHING;
  ------------------
  |  |  955|      0|#define SSL_NOTHING 1
  ------------------
 5975|       |
 5976|    491|    return sc->rwstate;
 5977|    491|}
SSL_get_security_level:
 6359|   516k|{
 6360|   516k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|   516k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|   516k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 516k]
  |  |  |  |  ------------------
  |  |  |  |   33|   516k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|   516k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 516k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|   516k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|   516k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6361|       |
 6362|   516k|    if (sc == NULL)
  ------------------
  |  Branch (6362:9): [True: 0, False: 516k]
  ------------------
 6363|      0|        return 0;
 6364|       |
 6365|   516k|    return sc->cert->sec_level;
 6366|   516k|}
SSL_CTX_set_options:
 6473|  3.35k|{
 6474|  3.35k|    return ctx->options |= op;
 6475|  3.35k|}
SSL_set_ct_validation_callback:
 6745|  2.58k|{
 6746|  2.58k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.58k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.58k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.58k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.58k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.58k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.58k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6747|       |
 6748|  2.58k|    if (sc == NULL)
  ------------------
  |  Branch (6748:9): [True: 0, False: 2.58k]
  ------------------
 6749|      0|        return 0;
 6750|       |
 6751|       |    /*
 6752|       |     * Since code exists that uses the custom extension handler for CT, look
 6753|       |     * for this and throw an error if they have already registered to use CT.
 6754|       |     */
 6755|  2.58k|    if (callback != NULL && SSL_CTX_has_client_custom_ext(s->ctx, TLSEXT_TYPE_signed_certificate_timestamp)) {
  ------------------
  |  |  125|      0|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
  |  Branch (6755:9): [True: 0, False: 2.58k]
  |  Branch (6755:29): [True: 0, False: 0]
  ------------------
 6756|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 6757|      0|        return 0;
 6758|      0|    }
 6759|       |
 6760|  2.58k|    if (callback != NULL) {
  ------------------
  |  Branch (6760:9): [True: 0, False: 2.58k]
  ------------------
 6761|       |        /*
 6762|       |         * If we are validating CT, then we MUST accept SCTs served via OCSP
 6763|       |         */
 6764|      0|        if (!SSL_set_tlsext_status_type(s, TLSEXT_STATUSTYPE_ocsp))
  ------------------
  |  |  320|      0|    SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, type, NULL)
  |  |  ------------------
  |  |  |  | 1351|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  |  |  ------------------
  ------------------
  |  Branch (6764:13): [True: 0, False: 0]
  ------------------
 6765|      0|            return 0;
 6766|      0|    }
 6767|       |
 6768|  2.58k|    sc->ct_validation_callback = callback;
 6769|  2.58k|    sc->ct_validation_callback_arg = arg;
 6770|       |
 6771|  2.58k|    return 1;
 6772|  2.58k|}
ssl_get_max_send_fragment:
 7457|  10.2k|{
 7458|       |    /* Return any active Max Fragment Len extension */
 7459|  10.2k|    if (sc->session != NULL && USE_MAX_FRAGMENT_LENGTH_EXT(sc->session))
  ------------------
  |  |  304|  2.48k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  302|  2.48k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  2.48k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  240|  2.48k|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (302:6): [True: 2.48k, False: 0]
  |  |  |  |  |  Branch (302:53): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7459:9): [True: 2.48k, False: 7.75k]
  ------------------
 7460|      0|        return GET_MAX_FRAGMENT_LENGTH(sc->session);
  ------------------
  |  |  306|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 7461|       |
 7462|       |    /* return current SSL connection setting */
 7463|  10.2k|    return (unsigned int)sc->max_send_fragment;
 7464|  10.2k|}
ssl_get_split_send_fragment:
 7467|  2.48k|{
 7468|       |    /* Return a value regarding an active Max Fragment Len extension */
 7469|  2.48k|    if (sc->session != NULL && USE_MAX_FRAGMENT_LENGTH_EXT(sc->session)
  ------------------
  |  |  304|  2.48k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  302|  4.96k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  2.48k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  240|  2.48k|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (302:6): [True: 2.48k, False: 0]
  |  |  |  |  |  Branch (302:53): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7469:9): [True: 2.48k, False: 0]
  ------------------
 7470|      0|        && sc->split_send_fragment > GET_MAX_FRAGMENT_LENGTH(sc->session))
  ------------------
  |  |  306|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
  |  Branch (7470:12): [True: 0, False: 0]
  ------------------
 7471|      0|        return GET_MAX_FRAGMENT_LENGTH(sc->session);
  ------------------
  |  |  306|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 7472|       |
 7473|       |    /* else limit |split_send_fragment| to current |max_send_fragment| */
 7474|  2.48k|    if (sc->split_send_fragment > sc->max_send_fragment)
  ------------------
  |  Branch (7474:9): [True: 0, False: 2.48k]
  ------------------
 7475|      0|        return (unsigned int)sc->max_send_fragment;
 7476|       |
 7477|       |    /* return current SSL connection setting */
 7478|  2.48k|    return (unsigned int)sc->split_send_fragment;
 7479|  2.48k|}
SSL_CTX_set_post_handshake_auth:
 7509|  2.71k|{
 7510|  2.71k|    ctx->pha_enabled = val;
 7511|  2.71k|}
ssl_evp_cipher_fetch:
 7617|  86.7k|{
 7618|  86.7k|    const EVP_CIPHER *ciph;
 7619|       |
 7620|  86.7k|    ERR_set_mark();
 7621|  86.7k|    ciph = EVP_CIPHER_fetch(libctx, name, properties);
 7622|  86.7k|    if (ciph != NULL) {
  ------------------
  |  Branch (7622:9): [True: 53.7k, False: 33.0k]
  ------------------
 7623|  53.7k|        OSSL_PARAM params[2];
 7624|  53.7k|        int decrypt_only = 0;
 7625|       |
 7626|  53.7k|        params[0] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_DECRYPT_ONLY,
  ------------------
  |  |  190|  53.7k|# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
  ------------------
 7627|  53.7k|            &decrypt_only);
 7628|  53.7k|        params[1] = OSSL_PARAM_construct_end();
 7629|  53.7k|        if (EVP_CIPHER_get_params((EVP_CIPHER *)ciph, params)
  ------------------
  |  Branch (7629:13): [True: 53.7k, False: 0]
  ------------------
 7630|  53.7k|            && decrypt_only) {
  ------------------
  |  Branch (7630:16): [True: 0, False: 53.7k]
  ------------------
 7631|       |            /* If a cipher is decrypt-only, it is unusable */
 7632|      0|            EVP_CIPHER_free((EVP_CIPHER *)ciph);
 7633|       |            ciph = NULL;
 7634|      0|        }
 7635|  53.7k|    }
 7636|  86.7k|    ERR_pop_to_mark();
 7637|  86.7k|    return ciph;
 7638|  86.7k|}
ssl_evp_cipher_free:
 7654|  92.8k|{
 7655|  92.8k|    if (cipher == NULL)
  ------------------
  |  Branch (7655:9): [True: 39.0k, False: 53.7k]
  ------------------
 7656|  39.0k|        return;
 7657|       |
 7658|  53.7k|    if (EVP_CIPHER_get0_provider(cipher) != NULL) {
  ------------------
  |  Branch (7658:9): [True: 53.7k, False: 0]
  ------------------
 7659|       |        /*
 7660|       |         * The cipher was explicitly fetched and therefore it is safe to cast
 7661|       |         * away the const
 7662|       |         */
 7663|  53.7k|        EVP_CIPHER_free((EVP_CIPHER *)cipher);
 7664|  53.7k|    }
 7665|  53.7k|}
ssl_evp_md_free:
 7681|  61.5k|{
 7682|  61.5k|    if (md == NULL)
  ------------------
  |  Branch (7682:9): [True: 28.0k, False: 33.5k]
  ------------------
 7683|  28.0k|        return;
 7684|       |
 7685|  33.5k|    if (EVP_MD_get0_provider(md) != NULL) {
  ------------------
  |  Branch (7685:9): [True: 33.5k, False: 0]
  ------------------
 7686|       |        /*
 7687|       |         * The digest was explicitly fetched and therefore it is safe to cast
 7688|       |         * away the const
 7689|       |         */
 7690|  33.5k|        EVP_MD_free((EVP_MD *)md);
 7691|  33.5k|    }
 7692|  33.5k|}
ssl_lib.c:dane_final:
  169|  2.58k|{
  170|  2.58k|    sk_danetls_record_pop_free(dane->trecs, tlsa_free);
  171|  2.58k|    dane->trecs = NULL;
  172|       |
  173|  2.58k|    OSSL_STACK_OF_X509_free(dane->certs);
  174|  2.58k|    dane->certs = NULL;
  175|       |
  176|  2.58k|    X509_free(dane->mcert);
  177|  2.58k|    dane->mcert = NULL;
  178|       |    dane->mtlsa = NULL;
  179|  2.58k|    dane->mdpth = -1;
  180|  2.58k|    dane->pdpth = -1;
  181|  2.58k|}
ssl_lib.c:ssl_reset_error_state:
 2247|  3.06k|{
 2248|  3.06k|    if (sc == NULL)
  ------------------
  |  Branch (2248:9): [True: 0, False: 3.06k]
  ------------------
 2249|      0|        return 1;
 2250|       |
 2251|  3.06k|    if (sc->statem.state == MSG_FLOW_ERROR) {
  ------------------
  |  Branch (2251:9): [True: 0, False: 3.06k]
  ------------------
 2252|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2253|      0|        return 0;
 2254|      0|    }
 2255|       |
 2256|  3.06k|    sc->statem.error_state = ERROR_STATE_NOERROR;
 2257|  3.06k|    return 1;
 2258|  3.06k|}
ssl_lib.c:ssl_update_error_state:
 2268|  3.06k|{
 2269|  3.06k|    unsigned long l;
 2270|       |
 2271|  3.06k|    if (sc == NULL)
  ------------------
  |  Branch (2271:9): [True: 0, False: 3.06k]
  ------------------
 2272|      0|        return;
 2273|       |
 2274|  3.06k|    if (sc->statem.state == MSG_FLOW_ERROR
  ------------------
  |  Branch (2274:9): [True: 2.57k, False: 485]
  ------------------
 2275|  2.57k|        && sc->statem.error_state == ERROR_STATE_NOERROR) {
  ------------------
  |  Branch (2275:12): [True: 2.57k, False: 0]
  ------------------
 2276|  2.57k|        l = ERR_peek_error();
 2277|  2.57k|        if (l == 0 || ERR_GET_LIB(l) == ERR_LIB_SYS)
  ------------------
  |  |   55|  2.55k|#define ERR_LIB_SYS 2
  ------------------
  |  Branch (2277:13): [True: 23, False: 2.55k]
  |  Branch (2277:23): [True: 0, False: 2.55k]
  ------------------
 2278|     23|            sc->statem.error_state = ERROR_STATE_SYSCALL;
 2279|  2.55k|        else
 2280|  2.55k|            sc->statem.error_state = ERROR_STATE_SSL;
 2281|  2.57k|    }
 2282|  3.06k|}
ssl_lib.c:ssl_check_allowed_versions:
  450|  6.71k|{
  451|  6.71k|    int minisdtls = 0, maxisdtls = 0;
  452|       |
  453|       |    /* Figure out if we're doing DTLS versions or TLS versions */
  454|  6.71k|    if (min_version == DTLS1_BAD_VER
  ------------------
  |  |   30|  13.4k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (454:9): [True: 0, False: 6.71k]
  ------------------
  455|  6.71k|        || min_version >> 8 == DTLS1_VERSION_MAJOR)
  ------------------
  |  |   32|  6.71k|#define DTLS1_VERSION_MAJOR 0xFE
  ------------------
  |  Branch (455:12): [True: 0, False: 6.71k]
  ------------------
  456|      0|        minisdtls = 1;
  457|  6.71k|    if (max_version == DTLS1_BAD_VER
  ------------------
  |  |   30|  13.4k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (457:9): [True: 0, False: 6.71k]
  ------------------
  458|  6.71k|        || max_version >> 8 == DTLS1_VERSION_MAJOR)
  ------------------
  |  |   32|  6.71k|#define DTLS1_VERSION_MAJOR 0xFE
  ------------------
  |  Branch (458:12): [True: 0, False: 6.71k]
  ------------------
  459|      0|        maxisdtls = 1;
  460|       |    /* A wildcard version of 0 could be DTLS or TLS. */
  461|  6.71k|    if ((minisdtls && !maxisdtls && max_version != 0)
  ------------------
  |  Branch (461:10): [True: 0, False: 6.71k]
  |  Branch (461:23): [True: 0, False: 0]
  |  Branch (461:37): [True: 0, False: 0]
  ------------------
  462|  6.71k|        || (maxisdtls && !minisdtls && min_version != 0)) {
  ------------------
  |  Branch (462:13): [True: 0, False: 6.71k]
  |  Branch (462:26): [True: 0, False: 0]
  |  Branch (462:40): [True: 0, False: 0]
  ------------------
  463|       |        /* Mixing DTLS and TLS versions will lead to sadness; deny it. */
  464|      0|        return 0;
  465|      0|    }
  466|       |
  467|  6.71k|    if (minisdtls || maxisdtls) {
  ------------------
  |  Branch (467:9): [True: 0, False: 6.71k]
  |  Branch (467:22): [True: 0, False: 6.71k]
  ------------------
  468|       |        /* Do DTLS version checks. */
  469|      0|        if (min_version == 0)
  ------------------
  |  Branch (469:13): [True: 0, False: 0]
  ------------------
  470|       |            /* Ignore DTLS1_BAD_VER */
  471|      0|            min_version = DTLS1_VERSION;
  ------------------
  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  ------------------
  472|      0|        if (max_version == 0)
  ------------------
  |  Branch (472:13): [True: 0, False: 0]
  ------------------
  473|      0|            max_version = DTLS1_2_VERSION;
  ------------------
  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  ------------------
  474|       |#ifdef OPENSSL_NO_DTLS1_2
  475|       |        if (max_version == DTLS1_2_VERSION)
  476|       |            max_version = DTLS1_VERSION;
  477|       |#endif
  478|       |#ifdef OPENSSL_NO_DTLS1
  479|       |        if (min_version == DTLS1_VERSION)
  480|       |            min_version = DTLS1_2_VERSION;
  481|       |#endif
  482|       |        /* Done massaging versions; do the check. */
  483|      0|        if (0
  ------------------
  |  Branch (483:13): [Folded, False: 0]
  ------------------
  484|       |#ifdef OPENSSL_NO_DTLS1
  485|       |            || (DTLS_VERSION_GE(min_version, DTLS1_VERSION)
  486|       |                && DTLS_VERSION_GE(DTLS1_VERSION, max_version))
  487|       |#endif
  488|       |#ifdef OPENSSL_NO_DTLS1_2
  489|       |            || (DTLS_VERSION_GE(min_version, DTLS1_2_VERSION)
  490|       |                && DTLS_VERSION_GE(DTLS1_2_VERSION, max_version))
  491|       |#endif
  492|      0|        )
  493|      0|            return 0;
  494|  6.71k|    } else {
  495|       |        /* Regular TLS version checks. */
  496|  6.71k|        if (min_version == 0)
  ------------------
  |  Branch (496:13): [True: 0, False: 6.71k]
  ------------------
  497|      0|            min_version = TLS1_VERSION;
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  498|  6.71k|        if (max_version == 0)
  ------------------
  |  Branch (498:13): [True: 6.63k, False: 79]
  ------------------
  499|  6.63k|            max_version = TLS1_3_VERSION;
  ------------------
  |  |   27|  6.63k|#define TLS1_3_VERSION 0x0304
  ------------------
  500|       |#ifdef OPENSSL_NO_TLS1_3
  501|       |        if (max_version == TLS1_3_VERSION)
  502|       |            max_version = TLS1_2_VERSION;
  503|       |#endif
  504|       |#ifdef OPENSSL_NO_TLS1_2
  505|       |        if (max_version == TLS1_2_VERSION)
  506|       |            max_version = TLS1_1_VERSION;
  507|       |#endif
  508|       |#ifdef OPENSSL_NO_TLS1_1
  509|       |        if (max_version == TLS1_1_VERSION)
  510|       |            max_version = TLS1_VERSION;
  511|       |#endif
  512|       |#ifdef OPENSSL_NO_TLS1
  513|       |        if (max_version == TLS1_VERSION)
  514|       |            max_version = SSL3_VERSION;
  515|       |#endif
  516|       |#ifdef OPENSSL_NO_TLS1
  517|       |        if (min_version == TLS1_VERSION)
  518|       |            min_version = TLS1_1_VERSION;
  519|       |#endif
  520|       |#ifdef OPENSSL_NO_TLS1_1
  521|       |        if (min_version == TLS1_1_VERSION)
  522|       |            min_version = TLS1_2_VERSION;
  523|       |#endif
  524|       |#ifdef OPENSSL_NO_TLS1_2
  525|       |        if (min_version == TLS1_2_VERSION)
  526|       |            min_version = TLS1_3_VERSION;
  527|       |#endif
  528|       |        /* Done massaging versions; do the check. */
  529|  6.71k|        if (0
  ------------------
  |  Branch (529:13): [Folded, False: 6.71k]
  ------------------
  530|       |#ifdef OPENSSL_NO_TLS1
  531|       |            || (min_version <= TLS1_VERSION && TLS1_VERSION <= max_version)
  532|       |#endif
  533|       |#ifdef OPENSSL_NO_TLS1_1
  534|       |            || (min_version <= TLS1_1_VERSION && TLS1_1_VERSION <= max_version)
  535|       |#endif
  536|       |#ifdef OPENSSL_NO_TLS1_2
  537|       |            || (min_version <= TLS1_2_VERSION && TLS1_2_VERSION <= max_version)
  538|       |#endif
  539|       |#ifdef OPENSSL_NO_TLS1_3
  540|       |            || (min_version <= TLS1_3_VERSION && TLS1_3_VERSION <= max_version)
  541|       |#endif
  542|  6.71k|        )
  543|      0|            return 0;
  544|  6.71k|    }
  545|  6.71k|    return 1;
  546|  6.71k|}
ssl_lib.c:cipher_list_tls12_num:
 3530|    500|{
 3531|    500|    int i, num = 0;
 3532|    500|    const SSL_CIPHER *c;
 3533|       |
 3534|    500|    if (sk == NULL)
  ------------------
  |  Branch (3534:9): [True: 0, False: 500]
  ------------------
 3535|      0|        return 0;
 3536|  18.6k|    for (i = 0; i < sk_SSL_CIPHER_num(sk); ++i) {
  ------------------
  |  | 1028|  18.6k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3536:17): [True: 18.1k, False: 500]
  ------------------
 3537|  18.1k|        c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1029|  18.1k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3538|  18.1k|        if (c->min_tls >= TLS1_3_VERSION)
  ------------------
  |  |   27|  18.1k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3538:13): [True: 1.50k, False: 16.6k]
  ------------------
 3539|  1.50k|            continue;
 3540|  16.6k|        num++;
 3541|  16.6k|    }
 3542|    500|    return num;
 3543|    500|}
ssl_lib.c:alpn_value_ok:
 3882|  2.57k|{
 3883|  2.57k|    unsigned int idx;
 3884|       |
 3885|  2.57k|    if (protos_len < 2 || protos == NULL)
  ------------------
  |  Branch (3885:9): [True: 0, False: 2.57k]
  |  Branch (3885:27): [True: 0, False: 2.57k]
  ------------------
 3886|      0|        return 0;
 3887|       |
 3888|  7.30k|    for (idx = 0; idx < protos_len; idx += protos[idx] + 1) {
  ------------------
  |  Branch (3888:19): [True: 4.72k, False: 2.57k]
  ------------------
 3889|  4.72k|        if (protos[idx] == 0)
  ------------------
  |  Branch (3889:13): [True: 0, False: 4.72k]
  ------------------
 3890|      0|            return 0;
 3891|  4.72k|    }
 3892|  2.57k|    return idx == protos_len;
 3893|  2.57k|}
ssl_lib.c:ssl_session_hash:
 4075|     10|{
 4076|     10|    const unsigned char *session_id = a->session_id;
 4077|     10|    unsigned long l;
 4078|     10|    unsigned char tmp_storage[4];
 4079|       |
 4080|     10|    if (a->session_id_length < sizeof(tmp_storage)) {
  ------------------
  |  Branch (4080:9): [True: 10, False: 0]
  ------------------
 4081|     10|        memset(tmp_storage, 0, sizeof(tmp_storage));
 4082|     10|        memcpy(tmp_storage, a->session_id, a->session_id_length);
 4083|     10|        session_id = tmp_storage;
 4084|     10|    }
 4085|       |
 4086|     10|    l = (unsigned long)((unsigned long)session_id[0]) | ((unsigned long)session_id[1] << 8L) | ((unsigned long)session_id[2] << 16L) | ((unsigned long)session_id[3] << 24L);
 4087|     10|    return l;
 4088|     10|}
ssl_lib.c:dane_ctx_final:
  150|  3.47k|{
  151|  3.47k|    OPENSSL_free(dctx->mdevp);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|  3.47k|    dctx->mdevp = NULL;
  153|       |
  154|  3.47k|    OPENSSL_free(dctx->mdord);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  155|       |    dctx->mdord = NULL;
  156|  3.47k|    dctx->mdmax = 0;
  157|  3.47k|}

TLS_client_method:
 2270|  3.47k|    {                                                                      \
 2271|  3.47k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  3.47k|            version,                                                       \
 2273|  3.47k|            flags,                                                         \
 2274|  3.47k|            mask,                                                          \
 2275|  3.47k|            ossl_ssl_connection_new,                                       \
 2276|  3.47k|            ossl_ssl_connection_free,                                      \
 2277|  3.47k|            ossl_ssl_connection_reset,                                     \
 2278|  3.47k|            tls1_new,                                                      \
 2279|  3.47k|            tls1_clear,                                                    \
 2280|  3.47k|            tls1_free,                                                     \
 2281|  3.47k|            s_accept,                                                      \
 2282|  3.47k|            s_connect,                                                     \
 2283|  3.47k|            ssl3_read,                                                     \
 2284|  3.47k|            ssl3_peek,                                                     \
 2285|  3.47k|            ssl3_write,                                                    \
 2286|  3.47k|            ssl3_shutdown,                                                 \
 2287|  3.47k|            ssl3_renegotiate,                                              \
 2288|  3.47k|            ssl3_renegotiate_check,                                        \
 2289|  3.47k|            ssl3_read_bytes,                                               \
 2290|  3.47k|            ssl3_write_bytes,                                              \
 2291|  3.47k|            ssl3_dispatch_alert,                                           \
 2292|  3.47k|            ssl3_ctrl,                                                     \
 2293|  3.47k|            ssl3_ctx_ctrl,                                                 \
 2294|  3.47k|            ssl3_get_cipher_by_char,                                       \
 2295|  3.47k|            ssl3_put_cipher_by_char,                                       \
 2296|  3.47k|            ssl3_pending,                                                  \
 2297|  3.47k|            ssl3_num_ciphers,                                              \
 2298|  3.47k|            ssl3_get_cipher,                                               \
 2299|  3.47k|            tls1_default_timeout,                                          \
 2300|  3.47k|            &enc_data,                                                     \
 2301|  3.47k|            ssl_undefined_void_function,                                   \
 2302|  3.47k|            ssl3_callback_ctrl,                                            \
 2303|  3.47k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  3.47k|        };                                                                 \
 2305|  3.47k|        return &func_name##_data;                                          \
 2306|  3.47k|    }
tlsv1_3_client_method:
 2270|  27.9k|    {                                                                      \
 2271|  27.9k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  27.9k|            version,                                                       \
 2273|  27.9k|            flags,                                                         \
 2274|  27.9k|            mask,                                                          \
 2275|  27.9k|            ossl_ssl_connection_new,                                       \
 2276|  27.9k|            ossl_ssl_connection_free,                                      \
 2277|  27.9k|            ossl_ssl_connection_reset,                                     \
 2278|  27.9k|            tls1_new,                                                      \
 2279|  27.9k|            tls1_clear,                                                    \
 2280|  27.9k|            tls1_free,                                                     \
 2281|  27.9k|            s_accept,                                                      \
 2282|  27.9k|            s_connect,                                                     \
 2283|  27.9k|            ssl3_read,                                                     \
 2284|  27.9k|            ssl3_peek,                                                     \
 2285|  27.9k|            ssl3_write,                                                    \
 2286|  27.9k|            ssl3_shutdown,                                                 \
 2287|  27.9k|            ssl3_renegotiate,                                              \
 2288|  27.9k|            ssl3_renegotiate_check,                                        \
 2289|  27.9k|            ssl3_read_bytes,                                               \
 2290|  27.9k|            ssl3_write_bytes,                                              \
 2291|  27.9k|            ssl3_dispatch_alert,                                           \
 2292|  27.9k|            ssl3_ctrl,                                                     \
 2293|  27.9k|            ssl3_ctx_ctrl,                                                 \
 2294|  27.9k|            ssl3_get_cipher_by_char,                                       \
 2295|  27.9k|            ssl3_put_cipher_by_char,                                       \
 2296|  27.9k|            ssl3_pending,                                                  \
 2297|  27.9k|            ssl3_num_ciphers,                                              \
 2298|  27.9k|            ssl3_get_cipher,                                               \
 2299|  27.9k|            tls1_default_timeout,                                          \
 2300|  27.9k|            &enc_data,                                                     \
 2301|  27.9k|            ssl_undefined_void_function,                                   \
 2302|  27.9k|            ssl3_callback_ctrl,                                            \
 2303|  27.9k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  27.9k|        };                                                                 \
 2305|  27.9k|        return &func_name##_data;                                          \
 2306|  27.9k|    }
tlsv1_2_client_method:
 2270|  28.0k|    {                                                                      \
 2271|  28.0k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  28.0k|            version,                                                       \
 2273|  28.0k|            flags,                                                         \
 2274|  28.0k|            mask,                                                          \
 2275|  28.0k|            ossl_ssl_connection_new,                                       \
 2276|  28.0k|            ossl_ssl_connection_free,                                      \
 2277|  28.0k|            ossl_ssl_connection_reset,                                     \
 2278|  28.0k|            tls1_new,                                                      \
 2279|  28.0k|            tls1_clear,                                                    \
 2280|  28.0k|            tls1_free,                                                     \
 2281|  28.0k|            s_accept,                                                      \
 2282|  28.0k|            s_connect,                                                     \
 2283|  28.0k|            ssl3_read,                                                     \
 2284|  28.0k|            ssl3_peek,                                                     \
 2285|  28.0k|            ssl3_write,                                                    \
 2286|  28.0k|            ssl3_shutdown,                                                 \
 2287|  28.0k|            ssl3_renegotiate,                                              \
 2288|  28.0k|            ssl3_renegotiate_check,                                        \
 2289|  28.0k|            ssl3_read_bytes,                                               \
 2290|  28.0k|            ssl3_write_bytes,                                              \
 2291|  28.0k|            ssl3_dispatch_alert,                                           \
 2292|  28.0k|            ssl3_ctrl,                                                     \
 2293|  28.0k|            ssl3_ctx_ctrl,                                                 \
 2294|  28.0k|            ssl3_get_cipher_by_char,                                       \
 2295|  28.0k|            ssl3_put_cipher_by_char,                                       \
 2296|  28.0k|            ssl3_pending,                                                  \
 2297|  28.0k|            ssl3_num_ciphers,                                              \
 2298|  28.0k|            ssl3_get_cipher,                                               \
 2299|  28.0k|            tls1_default_timeout,                                          \
 2300|  28.0k|            &enc_data,                                                     \
 2301|  28.0k|            ssl_undefined_void_function,                                   \
 2302|  28.0k|            ssl3_callback_ctrl,                                            \
 2303|  28.0k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  28.0k|        };                                                                 \
 2305|  28.0k|        return &func_name##_data;                                          \
 2306|  28.0k|    }
tlsv1_1_client_method:
 2270|  27.9k|    {                                                                      \
 2271|  27.9k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  27.9k|            version,                                                       \
 2273|  27.9k|            flags,                                                         \
 2274|  27.9k|            mask,                                                          \
 2275|  27.9k|            ossl_ssl_connection_new,                                       \
 2276|  27.9k|            ossl_ssl_connection_free,                                      \
 2277|  27.9k|            ossl_ssl_connection_reset,                                     \
 2278|  27.9k|            tls1_new,                                                      \
 2279|  27.9k|            tls1_clear,                                                    \
 2280|  27.9k|            tls1_free,                                                     \
 2281|  27.9k|            s_accept,                                                      \
 2282|  27.9k|            s_connect,                                                     \
 2283|  27.9k|            ssl3_read,                                                     \
 2284|  27.9k|            ssl3_peek,                                                     \
 2285|  27.9k|            ssl3_write,                                                    \
 2286|  27.9k|            ssl3_shutdown,                                                 \
 2287|  27.9k|            ssl3_renegotiate,                                              \
 2288|  27.9k|            ssl3_renegotiate_check,                                        \
 2289|  27.9k|            ssl3_read_bytes,                                               \
 2290|  27.9k|            ssl3_write_bytes,                                              \
 2291|  27.9k|            ssl3_dispatch_alert,                                           \
 2292|  27.9k|            ssl3_ctrl,                                                     \
 2293|  27.9k|            ssl3_ctx_ctrl,                                                 \
 2294|  27.9k|            ssl3_get_cipher_by_char,                                       \
 2295|  27.9k|            ssl3_put_cipher_by_char,                                       \
 2296|  27.9k|            ssl3_pending,                                                  \
 2297|  27.9k|            ssl3_num_ciphers,                                              \
 2298|  27.9k|            ssl3_get_cipher,                                               \
 2299|  27.9k|            tls1_default_timeout,                                          \
 2300|  27.9k|            &enc_data,                                                     \
 2301|  27.9k|            ssl_undefined_void_function,                                   \
 2302|  27.9k|            ssl3_callback_ctrl,                                            \
 2303|  27.9k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  27.9k|        };                                                                 \
 2305|  27.9k|        return &func_name##_data;                                          \
 2306|  27.9k|    }
tlsv1_client_method:
 2270|  27.9k|    {                                                                      \
 2271|  27.9k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  27.9k|            version,                                                       \
 2273|  27.9k|            flags,                                                         \
 2274|  27.9k|            mask,                                                          \
 2275|  27.9k|            ossl_ssl_connection_new,                                       \
 2276|  27.9k|            ossl_ssl_connection_free,                                      \
 2277|  27.9k|            ossl_ssl_connection_reset,                                     \
 2278|  27.9k|            tls1_new,                                                      \
 2279|  27.9k|            tls1_clear,                                                    \
 2280|  27.9k|            tls1_free,                                                     \
 2281|  27.9k|            s_accept,                                                      \
 2282|  27.9k|            s_connect,                                                     \
 2283|  27.9k|            ssl3_read,                                                     \
 2284|  27.9k|            ssl3_peek,                                                     \
 2285|  27.9k|            ssl3_write,                                                    \
 2286|  27.9k|            ssl3_shutdown,                                                 \
 2287|  27.9k|            ssl3_renegotiate,                                              \
 2288|  27.9k|            ssl3_renegotiate_check,                                        \
 2289|  27.9k|            ssl3_read_bytes,                                               \
 2290|  27.9k|            ssl3_write_bytes,                                              \
 2291|  27.9k|            ssl3_dispatch_alert,                                           \
 2292|  27.9k|            ssl3_ctrl,                                                     \
 2293|  27.9k|            ssl3_ctx_ctrl,                                                 \
 2294|  27.9k|            ssl3_get_cipher_by_char,                                       \
 2295|  27.9k|            ssl3_put_cipher_by_char,                                       \
 2296|  27.9k|            ssl3_pending,                                                  \
 2297|  27.9k|            ssl3_num_ciphers,                                              \
 2298|  27.9k|            ssl3_get_cipher,                                               \
 2299|  27.9k|            tls1_default_timeout,                                          \
 2300|  27.9k|            &enc_data,                                                     \
 2301|  27.9k|            ssl_undefined_void_function,                                   \
 2302|  27.9k|            ssl3_callback_ctrl,                                            \
 2303|  27.9k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  27.9k|        };                                                                 \
 2305|  27.9k|        return &func_name##_data;                                          \
 2306|  27.9k|    }
statem_lib.c:ssl_tsan_counter:
 2947|  2.57k|{
 2948|  2.57k|    if (ssl_tsan_lock(ctx)) {
  ------------------
  |  Branch (2948:9): [True: 2.57k, False: 0]
  ------------------
 2949|       |        tsan_counter(stat);
  ------------------
  |  |  167|  2.57k|#define tsan_counter(ptr) tsan_add((ptr), 1)
  |  |  ------------------
  |  |  |  |   63|  2.57k|#define tsan_add(ptr, n) atomic_fetch_add_explicit((ptr), (n), memory_order_relaxed)
  |  |  ------------------
  ------------------
 2950|  2.57k|        ssl_tsan_unlock(ctx);
 2951|  2.57k|    }
 2952|  2.57k|}
statem_lib.c:ssl_tsan_lock:
 2930|  2.57k|{
 2931|       |#ifdef TSAN_REQUIRES_LOCKING
 2932|       |    if (!CRYPTO_THREAD_write_lock(ctx->tsan_lock))
 2933|       |        return 0;
 2934|       |#endif
 2935|  2.57k|    return 1;
 2936|  2.57k|}
statem_lib.c:ssl_tsan_unlock:
 2939|  2.57k|{
 2940|       |#ifdef TSAN_REQUIRES_LOCKING
 2941|       |    CRYPTO_THREAD_unlock(ctx->tsan_lock);
 2942|       |#endif
 2943|  2.57k|}

ssl_ctx_system_config:
  130|  3.35k|{
  131|  3.35k|    return ssl_do_config(NULL, ctx, NULL, 1);
  132|  3.35k|}
ssl_mcnf.c:ssl_do_config:
   37|  3.35k|{
   38|  3.35k|    SSL_CONF_CTX *cctx = NULL;
   39|  3.35k|    size_t i, idx, cmd_count;
   40|  3.35k|    int err = 1;
   41|  3.35k|    unsigned int flags;
   42|  3.35k|    unsigned int conf_diagnostics = 0;
   43|  3.35k|    const SSL_METHOD *meth;
   44|  3.35k|    const SSL_CONF_CMD *cmds;
   45|  3.35k|    OSSL_LIB_CTX *libctx = NULL, *prev_libctx = NULL;
   46|  3.35k|    CONF_IMODULE *imod = NULL;
   47|       |
   48|  3.35k|    if (s == NULL && ctx == NULL) {
  ------------------
  |  Branch (48:9): [True: 3.35k, False: 0]
  |  Branch (48:22): [True: 0, False: 3.35k]
  ------------------
   49|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   50|      0|        goto err;
   51|      0|    }
   52|  3.35k|    if (name == NULL && system)
  ------------------
  |  Branch (52:9): [True: 3.35k, False: 0]
  |  Branch (52:25): [True: 3.35k, False: 0]
  ------------------
   53|  3.35k|        name = "system_default";
   54|       |
   55|  3.35k|    if (name == NULL) {
  ------------------
  |  Branch (55:9): [True: 0, False: 3.35k]
  ------------------
   56|      0|        ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |   70|      0|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  151|      0|#define SSL_R_INVALID_CONFIGURATION_NAME 113
  ------------------
   57|      0|            "name not specified (name == NULL)");
   58|      0|        goto err;
   59|      0|    }
   60|       |
   61|  3.35k|    libctx = s != NULL ? s->ctx->libctx : ctx->libctx;
  ------------------
  |  Branch (61:14): [True: 0, False: 3.35k]
  ------------------
   62|  3.35k|    imod = ssl_do_lookup_module(libctx);
   63|  3.35k|    if (!conf_ssl_name_find(imod, name, &idx)) {
  ------------------
  |  Branch (63:9): [True: 3.35k, False: 0]
  ------------------
   64|  3.35k|        if (!system)
  ------------------
  |  Branch (64:13): [True: 0, False: 3.35k]
  ------------------
   65|      0|            ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |   70|      0|#define ERR_LIB_SSL 20
  ------------------
                          ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  151|      0|#define SSL_R_INVALID_CONFIGURATION_NAME 113
  ------------------
   66|      0|                "name=%s", name);
   67|  3.35k|        goto err;
   68|  3.35k|    }
   69|       |
   70|      0|    cmds = conf_ssl_get(imod, idx, &name, &cmd_count);
   71|      0|    flags = SSL_CONF_FLAG_FILE;
  ------------------
  |  |  626|      0|#define SSL_CONF_FLAG_FILE 0x2
  ------------------
   72|      0|    if (!system)
  ------------------
  |  Branch (72:9): [True: 0, False: 0]
  ------------------
   73|      0|        flags |= SSL_CONF_FLAG_CERTIFICATE | SSL_CONF_FLAG_REQUIRE_PRIVATE;
  ------------------
  |  |  630|      0|#define SSL_CONF_FLAG_CERTIFICATE 0x20
  ------------------
                      flags |= SSL_CONF_FLAG_CERTIFICATE | SSL_CONF_FLAG_REQUIRE_PRIVATE;
  ------------------
  |  |  631|      0|#define SSL_CONF_FLAG_REQUIRE_PRIVATE 0x40
  ------------------
   74|       |
   75|      0|    cctx = SSL_CONF_CTX_new();
   76|      0|    if (cctx == NULL) {
  ------------------
  |  Branch (76:9): [True: 0, False: 0]
  ------------------
   77|       |        /* this is a fatal error, always report */
   78|      0|        system = 0;
   79|      0|        goto err;
   80|      0|    }
   81|       |
   82|      0|    if (s != NULL) {
  ------------------
  |  Branch (82:9): [True: 0, False: 0]
  ------------------
   83|      0|        meth = s->method;
   84|      0|        SSL_CONF_CTX_set_ssl(cctx, s);
   85|      0|        libctx = s->ctx->libctx;
   86|      0|    } else {
   87|      0|        meth = ctx->method;
   88|      0|        SSL_CONF_CTX_set_ssl_ctx(cctx, ctx);
   89|      0|        libctx = ctx->libctx;
   90|      0|    }
   91|       |
   92|      0|    conf_diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
   93|      0|    if (conf_diagnostics)
  ------------------
  |  Branch (93:9): [True: 0, False: 0]
  ------------------
   94|      0|        flags |= SSL_CONF_FLAG_SHOW_ERRORS;
  ------------------
  |  |  629|      0|#define SSL_CONF_FLAG_SHOW_ERRORS 0x10
  ------------------
   95|      0|    if (meth->ssl_accept != ssl_undefined_function)
  ------------------
  |  Branch (95:9): [True: 0, False: 0]
  ------------------
   96|      0|        flags |= SSL_CONF_FLAG_SERVER;
  ------------------
  |  |  628|      0|#define SSL_CONF_FLAG_SERVER 0x8
  ------------------
   97|      0|    if (meth->ssl_connect != ssl_undefined_function)
  ------------------
  |  Branch (97:9): [True: 0, False: 0]
  ------------------
   98|      0|        flags |= SSL_CONF_FLAG_CLIENT;
  ------------------
  |  |  627|      0|#define SSL_CONF_FLAG_CLIENT 0x4
  ------------------
   99|      0|    SSL_CONF_CTX_set_flags(cctx, flags);
  100|      0|    prev_libctx = OSSL_LIB_CTX_set0_default(libctx);
  101|      0|    err = 0;
  102|      0|    for (i = 0; i < cmd_count; i++) {
  ------------------
  |  Branch (102:17): [True: 0, False: 0]
  ------------------
  103|      0|        char *cmdstr, *arg;
  104|      0|        int rv;
  105|       |
  106|      0|        conf_ssl_get_cmd(cmds, i, &cmdstr, &arg);
  107|      0|        rv = SSL_CONF_cmd(cctx, cmdstr, arg);
  108|      0|        if (rv <= 0)
  ------------------
  |  Branch (108:13): [True: 0, False: 0]
  ------------------
  109|      0|            ++err;
  110|      0|    }
  111|      0|    if (!SSL_CONF_CTX_finish(cctx))
  ------------------
  |  Branch (111:9): [True: 0, False: 0]
  ------------------
  112|      0|        ++err;
  113|  3.35k|err:
  114|  3.35k|    OSSL_LIB_CTX_set0_default(prev_libctx);
  115|  3.35k|    SSL_CONF_CTX_free(cctx);
  116|  3.35k|    return err == 0 || (system && !conf_diagnostics);
  ------------------
  |  Branch (116:12): [True: 0, False: 3.35k]
  |  Branch (116:25): [True: 3.35k, False: 0]
  |  Branch (116:35): [True: 3.35k, False: 0]
  ------------------
  117|      0|}
ssl_mcnf.c:ssl_do_lookup_module:
   26|  3.35k|{
   27|  3.35k|    CONF_IMODULE *m = OSSL_LIB_CTX_get_data(libctx, OSSL_LIB_CTX_SSL_CONF_IMODULE);
  ------------------
  |  |  120|  3.35k|#define OSSL_LIB_CTX_SSL_CONF_IMODULE 23
  ------------------
   28|       |
   29|  3.35k|    if (m != NULL)
  ------------------
  |  Branch (29:9): [True: 0, False: 3.35k]
  ------------------
   30|      0|        return m;
   31|       |
   32|  3.35k|    libctx = OSSL_LIB_CTX_get0_global_default();
   33|  3.35k|    return OSSL_LIB_CTX_get_data(libctx, OSSL_LIB_CTX_SSL_CONF_IMODULE);
  ------------------
  |  |  120|  3.35k|#define OSSL_LIB_CTX_SSL_CONF_IMODULE 23
  ------------------
   34|  3.35k|}

SSL_CTX_use_certificate_file:
  312|      1|{
  313|      1|    int j = SSL_R_BAD_VALUE;
  ------------------
  |  |   61|      1|#define SSL_R_BAD_VALUE 384
  ------------------
  314|      1|    BIO *in = NULL;
  315|      1|    int ret = 0;
  316|      1|    X509 *x = NULL, *cert = NULL;
  317|       |
  318|      1|    if (file == NULL) {
  ------------------
  |  Branch (318:9): [True: 0, False: 1]
  ------------------
  319|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  320|      0|        goto end;
  321|      0|    }
  322|       |
  323|      1|    in = BIO_new(BIO_s_file());
  324|      1|    if (in == NULL) {
  ------------------
  |  Branch (324:9): [True: 0, False: 1]
  ------------------
  325|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  326|      0|        goto end;
  327|      0|    }
  328|       |
  329|      1|    if (BIO_read_filename(in, file) <= 0) {
  ------------------
  |  |  596|      1|#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
  |  |  ------------------
  |  |  |  |  451|      1|#define BIO_C_SET_FILENAME 108
  |  |  ------------------
  |  |  597|      1|    BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |   85|      1|#define BIO_CLOSE 0x01
  |  |  ------------------
  |  |                   BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |  217|      1|#define BIO_FP_READ 0x02
  |  |  ------------------
  ------------------
  |  Branch (329:9): [True: 1, False: 0]
  ------------------
  330|      1|        ERR_raise(ERR_LIB_SSL, ERR_R_SYS_LIB);
  ------------------
  |  |  357|      1|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      1|    (ERR_new(),                                                  \
  |  |  |  |  360|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      1|        ERR_set_error)
  |  |  ------------------
  ------------------
  331|      1|        goto end;
  332|      1|    }
  333|       |
  334|      0|    x = X509_new_ex(ctx->libctx, ctx->propq);
  335|      0|    if (x == NULL) {
  ------------------
  |  Branch (335:9): [True: 0, False: 0]
  ------------------
  336|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  337|      0|        goto end;
  338|      0|    }
  339|      0|    if (type == SSL_FILETYPE_ASN1) {
  ------------------
  |  |  227|      0|#define SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1
  |  |  ------------------
  |  |  |  |  169|      0|#define X509_FILETYPE_ASN1 2
  |  |  ------------------
  ------------------
  |  Branch (339:9): [True: 0, False: 0]
  ------------------
  340|      0|        j = ERR_R_ASN1_LIB;
  ------------------
  |  |  279|      0|#define ERR_R_ASN1_LIB (ERR_LIB_ASN1 /* 13 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   66|      0|#define ERR_LIB_ASN1 13
  |  |  ------------------
  |  |               #define ERR_R_ASN1_LIB (ERR_LIB_ASN1 /* 13 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  341|      0|        cert = d2i_X509_bio(in, &x);
  342|      0|    } else if (type == SSL_FILETYPE_PEM) {
  ------------------
  |  |  228|      0|#define SSL_FILETYPE_PEM X509_FILETYPE_PEM
  |  |  ------------------
  |  |  |  |  168|      0|#define X509_FILETYPE_PEM 1
  |  |  ------------------
  ------------------
  |  Branch (342:16): [True: 0, False: 0]
  ------------------
  343|      0|        j = ERR_R_PEM_LIB;
  ------------------
  |  |  276|      0|#define ERR_R_PEM_LIB (ERR_LIB_PEM /* 9 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   62|      0|#define ERR_LIB_PEM 9
  |  |  ------------------
  |  |               #define ERR_R_PEM_LIB (ERR_LIB_PEM /* 9 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  344|      0|        cert = PEM_read_bio_X509(in, &x, ctx->default_passwd_callback,
  345|      0|            ctx->default_passwd_callback_userdata);
  346|      0|    } else {
  347|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_BAD_SSL_FILETYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  348|      0|        goto end;
  349|      0|    }
  350|      0|    if (cert == NULL) {
  ------------------
  |  Branch (350:9): [True: 0, False: 0]
  ------------------
  351|      0|        ERR_raise(ERR_LIB_SSL, j);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  352|      0|        goto end;
  353|      0|    }
  354|       |
  355|      0|    ret = SSL_CTX_use_certificate(ctx, x);
  356|      1|end:
  357|      1|    X509_free(x);
  358|      1|    BIO_free(in);
  359|      1|    return ret;
  360|      0|}
SSL_CTX_use_certificate_chain_file:
  590|     15|{
  591|       |    return use_certificate_chain_file(ctx, NULL, file);
  592|     15|}
ssl_rsa.c:use_certificate_chain_file:
  464|     15|{
  465|     15|    BIO *in = NULL;
  466|     15|    int ret = 0;
  467|     15|    X509 *x = NULL;
  468|     15|    pem_password_cb *passwd_callback;
  469|     15|    void *passwd_callback_userdata;
  470|     15|    SSL_CTX *real_ctx = (ssl == NULL) ? ctx : ssl->ctx;
  ------------------
  |  Branch (470:25): [True: 15, False: 0]
  ------------------
  471|       |
  472|     15|    if (ctx == NULL && ssl == NULL)
  ------------------
  |  Branch (472:9): [True: 0, False: 15]
  |  Branch (472:24): [True: 0, False: 0]
  ------------------
  473|      0|        return 0;
  474|       |
  475|     15|    ERR_clear_error(); /* clear error stack for
  476|       |                        * SSL_CTX_use_certificate() */
  477|       |
  478|     15|    if (ctx != NULL) {
  ------------------
  |  Branch (478:9): [True: 15, False: 0]
  ------------------
  479|     15|        passwd_callback = ctx->default_passwd_callback;
  480|     15|        passwd_callback_userdata = ctx->default_passwd_callback_userdata;
  481|     15|    } else {
  482|      0|        SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(ssl);
  ------------------
  |  |   39|      0|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|      0|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|      0|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|      0|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|      0|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  483|       |
  484|      0|        if (sc == NULL)
  ------------------
  |  Branch (484:13): [True: 0, False: 0]
  ------------------
  485|      0|            return 0;
  486|       |
  487|      0|        passwd_callback = sc->default_passwd_callback;
  488|      0|        passwd_callback_userdata = sc->default_passwd_callback_userdata;
  489|      0|    }
  490|       |
  491|     15|    if (file == NULL) {
  ------------------
  |  Branch (491:9): [True: 0, False: 15]
  ------------------
  492|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  493|      0|        goto end;
  494|      0|    }
  495|       |
  496|     15|    in = BIO_new(BIO_s_file());
  497|     15|    if (in == NULL) {
  ------------------
  |  Branch (497:9): [True: 0, False: 15]
  ------------------
  498|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|      0|        goto end;
  500|      0|    }
  501|       |
  502|     15|    if (BIO_read_filename(in, file) <= 0) {
  ------------------
  |  |  596|     15|#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
  |  |  ------------------
  |  |  |  |  451|     15|#define BIO_C_SET_FILENAME 108
  |  |  ------------------
  |  |  597|     15|    BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |   85|     15|#define BIO_CLOSE 0x01
  |  |  ------------------
  |  |                   BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |  217|     15|#define BIO_FP_READ 0x02
  |  |  ------------------
  ------------------
  |  Branch (502:9): [True: 12, False: 3]
  ------------------
  503|     12|        ERR_raise(ERR_LIB_SSL, ERR_R_SYS_LIB);
  ------------------
  |  |  357|     12|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     12|    (ERR_new(),                                                  \
  |  |  |  |  360|     12|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     12|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     12|        ERR_set_error)
  |  |  ------------------
  ------------------
  504|     12|        goto end;
  505|     12|    }
  506|       |
  507|      3|    x = X509_new_ex(real_ctx->libctx, real_ctx->propq);
  508|      3|    if (x == NULL) {
  ------------------
  |  Branch (508:9): [True: 0, False: 3]
  ------------------
  509|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  510|      0|        goto end;
  511|      0|    }
  512|      3|    if (PEM_read_bio_X509_AUX(in, &x, passwd_callback,
  ------------------
  |  Branch (512:9): [True: 3, False: 0]
  ------------------
  513|      3|            passwd_callback_userdata)
  514|      3|        == NULL) {
  515|      3|        ERR_raise(ERR_LIB_SSL, ERR_R_PEM_LIB);
  ------------------
  |  |  357|      3|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      3|    (ERR_new(),                                                  \
  |  |  |  |  360|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      3|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      3|        ERR_set_error)
  |  |  ------------------
  ------------------
  516|      3|        goto end;
  517|      3|    }
  518|       |
  519|      0|    if (ctx)
  ------------------
  |  Branch (519:9): [True: 0, False: 0]
  ------------------
  520|      0|        ret = SSL_CTX_use_certificate(ctx, x);
  521|      0|    else
  522|      0|        ret = SSL_use_certificate(ssl, x);
  523|       |
  524|      0|    if (ERR_peek_error() != 0)
  ------------------
  |  Branch (524:9): [True: 0, False: 0]
  ------------------
  525|      0|        ret = 0; /* Key/certificate mismatch doesn't imply
  526|       |                  * ret==0 ... */
  527|      0|    if (ret) {
  ------------------
  |  Branch (527:9): [True: 0, False: 0]
  ------------------
  528|       |        /*
  529|       |         * If we could set up our certificate, now proceed to the CA
  530|       |         * certificates.
  531|       |         */
  532|      0|        X509 *ca;
  533|      0|        int r;
  534|      0|        unsigned long err;
  535|       |
  536|      0|        if (ctx)
  ------------------
  |  Branch (536:13): [True: 0, False: 0]
  ------------------
  537|      0|            r = SSL_CTX_clear_chain_certs(ctx);
  ------------------
  |  | 1474|      0|    SSL_CTX_set0_chain(ctx, NULL)
  |  |  ------------------
  |  |  |  | 1464|      0|    SSL_CTX_ctrl(ctx, SSL_CTRL_CHAIN, 0, (char *)(sk))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1375|      0|#define SSL_CTRL_CHAIN 88
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|      0|        else
  539|      0|            r = SSL_clear_chain_certs(ssl);
  ------------------
  |  | 1504|      0|    SSL_set0_chain(s, NULL)
  |  |  ------------------
  |  |  |  | 1494|      0|    SSL_ctrl(s, SSL_CTRL_CHAIN, 0, (char *)(sk))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1375|      0|#define SSL_CTRL_CHAIN 88
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  540|       |
  541|      0|        if (r == 0) {
  ------------------
  |  Branch (541:13): [True: 0, False: 0]
  ------------------
  542|      0|            ret = 0;
  543|      0|            goto end;
  544|      0|        }
  545|       |
  546|      0|        while (1) {
  ------------------
  |  Branch (546:16): [True: 0, Folded]
  ------------------
  547|      0|            ca = X509_new_ex(real_ctx->libctx, real_ctx->propq);
  548|      0|            if (ca == NULL) {
  ------------------
  |  Branch (548:17): [True: 0, False: 0]
  ------------------
  549|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  550|      0|                goto end;
  551|      0|            }
  552|      0|            if (PEM_read_bio_X509(in, &ca, passwd_callback,
  ------------------
  |  Branch (552:17): [True: 0, False: 0]
  ------------------
  553|      0|                    passwd_callback_userdata)
  554|      0|                != NULL) {
  555|      0|                if (ctx)
  ------------------
  |  Branch (555:21): [True: 0, False: 0]
  ------------------
  556|      0|                    r = SSL_CTX_add0_chain_cert(ctx, ca);
  ------------------
  |  | 1468|      0|    SSL_CTX_ctrl(ctx, SSL_CTRL_CHAIN_CERT, 0, (char *)(x509))
  |  |  ------------------
  |  |  |  | 1376|      0|#define SSL_CTRL_CHAIN_CERT 89
  |  |  ------------------
  ------------------
  557|      0|                else
  558|      0|                    r = SSL_add0_chain_cert(ssl, ca);
  ------------------
  |  | 1498|      0|    SSL_ctrl(s, SSL_CTRL_CHAIN_CERT, 0, (char *)(x509))
  |  |  ------------------
  |  |  |  | 1376|      0|#define SSL_CTRL_CHAIN_CERT 89
  |  |  ------------------
  ------------------
  559|       |                /*
  560|       |                 * Note that we must not free ca if it was successfully added to
  561|       |                 * the chain (while we must free the main certificate, since its
  562|       |                 * reference count is increased by SSL_CTX_use_certificate).
  563|       |                 */
  564|      0|                if (!r) {
  ------------------
  |  Branch (564:21): [True: 0, False: 0]
  ------------------
  565|      0|                    X509_free(ca);
  566|      0|                    ret = 0;
  567|      0|                    goto end;
  568|      0|                }
  569|      0|            } else {
  570|      0|                X509_free(ca);
  571|      0|                break;
  572|      0|            }
  573|      0|        }
  574|       |        /* When the while loop ends, it's usually just EOF. */
  575|      0|        err = ERR_peek_last_error();
  576|      0|        if (ERR_GET_LIB(err) == ERR_LIB_PEM
  ------------------
  |  |   62|      0|#define ERR_LIB_PEM 9
  ------------------
  |  Branch (576:13): [True: 0, False: 0]
  ------------------
  577|      0|            && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)
  ------------------
  |  |   44|      0|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (577:16): [True: 0, False: 0]
  ------------------
  578|      0|            ERR_clear_error();
  579|      0|        else
  580|      0|            ret = 0; /* some real error */
  581|      0|    }
  582|       |
  583|     15|end:
  584|     15|    X509_free(x);
  585|     15|    BIO_free(in);
  586|     15|    return ret;
  587|      0|}

ssl_session_calculate_timeout:
   48|  5.15k|{
   49|  5.15k|    ss->calc_timeout = ossl_time_add(ss->time, ss->timeout);
   50|  5.15k|}
SSL_SESSION_new:
  102|  2.57k|{
  103|  2.57k|    SSL_SESSION *ss;
  104|       |
  105|  2.57k|    if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))
  ------------------
  |  | 2813|  2.57k|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (105:9): [True: 0, False: 2.57k]
  ------------------
  106|      0|        return NULL;
  107|       |
  108|  2.57k|    ss = OPENSSL_zalloc(sizeof(*ss));
  ------------------
  |  |  109|  2.57k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  109|  2.57k|    if (ss == NULL)
  ------------------
  |  Branch (109:9): [True: 0, False: 2.57k]
  ------------------
  110|      0|        return NULL;
  111|       |
  112|  2.57k|    ss->ext.max_fragment_len_mode = TLSEXT_max_fragment_length_UNSPECIFIED;
  ------------------
  |  |  242|  2.57k|#define TLSEXT_max_fragment_length_UNSPECIFIED 255
  ------------------
  113|  2.57k|    ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */
  114|       |    /* 5 minute timeout by default */
  115|  2.57k|    ss->timeout = ossl_seconds2time(60 * 5 + 4);
  ------------------
  |  |   42|  2.57k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  2.57k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  116|  2.57k|    ss->time = ossl_time_now();
  117|  2.57k|    ssl_session_calculate_timeout(ss);
  118|  2.57k|    if (!CRYPTO_NEW_REF(&ss->references, 1)) {
  ------------------
  |  Branch (118:9): [True: 0, False: 2.57k]
  ------------------
  119|      0|        OPENSSL_free(ss);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|      0|        return NULL;
  121|      0|    }
  122|       |
  123|  2.57k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data)) {
  ------------------
  |  |  253|  2.57k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  |  Branch (123:9): [True: 0, False: 2.57k]
  ------------------
  124|      0|        CRYPTO_FREE_REF(&ss->references);
  125|      0|        OPENSSL_free(ss);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  126|      0|        return NULL;
  127|      0|    }
  128|  2.57k|    return ss;
  129|  2.57k|}
ssl_get_new_session:
  434|  2.57k|{
  435|       |    /* This gets used by clients and servers. */
  436|       |
  437|  2.57k|    SSL_SESSION *ss = NULL;
  438|       |
  439|  2.57k|    if ((ss = SSL_SESSION_new()) == NULL) {
  ------------------
  |  Branch (439:9): [True: 0, False: 2.57k]
  ------------------
  440|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_SSL_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  441|      0|        return 0;
  442|      0|    }
  443|       |
  444|       |    /* If the context has a default timeout, use it */
  445|  2.57k|    if (ossl_time_is_zero(s->session_ctx->session_timeout))
  ------------------
  |  Branch (445:9): [True: 0, False: 2.57k]
  ------------------
  446|      0|        ss->timeout = SSL_CONNECTION_GET_SSL(s)->method->get_timeout();
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  447|  2.57k|    else
  448|  2.57k|        ss->timeout = s->session_ctx->session_timeout;
  449|  2.57k|    ssl_session_calculate_timeout(ss);
  450|       |
  451|  2.57k|    SSL_SESSION_free(s->session);
  452|  2.57k|    s->session = NULL;
  453|       |
  454|  2.57k|    if (session) {
  ------------------
  |  Branch (454:9): [True: 0, False: 2.57k]
  ------------------
  455|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  456|       |            /*
  457|       |             * We generate the session id while constructing the
  458|       |             * NewSessionTicket in TLSv1.3.
  459|       |             */
  460|      0|            ss->session_id_length = 0;
  461|      0|        } else if (!ssl_generate_session_id(s, ss)) {
  ------------------
  |  Branch (461:20): [True: 0, False: 0]
  ------------------
  462|       |            /* SSLfatal() already called */
  463|      0|            SSL_SESSION_free(ss);
  464|      0|            return 0;
  465|      0|        }
  466|       |
  467|  2.57k|    } else {
  468|  2.57k|        ss->session_id_length = 0;
  469|  2.57k|    }
  470|       |
  471|  2.57k|    if (s->sid_ctx_length > sizeof(ss->sid_ctx)) {
  ------------------
  |  Branch (471:9): [True: 0, False: 2.57k]
  ------------------
  472|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  473|      0|        SSL_SESSION_free(ss);
  474|      0|        return 0;
  475|      0|    }
  476|  2.57k|    memcpy(ss->sid_ctx, s->sid_ctx, s->sid_ctx_length);
  477|  2.57k|    ss->sid_ctx_length = s->sid_ctx_length;
  478|  2.57k|    s->session = ss;
  479|  2.57k|    ss->ssl_version = s->version;
  480|  2.57k|    ss->verify_result = X509_V_OK;
  ------------------
  |  |  312|  2.57k|#define X509_V_OK 0
  ------------------
  481|       |
  482|       |    /* If client supports extended master secret set it in session */
  483|  2.57k|    if (s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS)
  ------------------
  |  |  300|  2.57k|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (483:9): [True: 0, False: 2.57k]
  ------------------
  484|      0|        ss->flags |= SSL_SESS_FLAG_EXTMS;
  ------------------
  |  |  577|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  485|       |
  486|  2.57k|    return 1;
  487|  2.57k|}
SSL_CTX_remove_session:
  835|  2.31k|{
  836|  2.31k|    return remove_session_lock(ctx, c, 1);
  837|  2.31k|}
SSL_SESSION_free:
  869|  15.3k|{
  870|  15.3k|    int i;
  871|       |
  872|  15.3k|    if (ss == NULL)
  ------------------
  |  Branch (872:9): [True: 12.7k, False: 2.57k]
  ------------------
  873|  12.7k|        return;
  874|  2.57k|    CRYPTO_DOWN_REF(&ss->references, &i);
  875|  2.57k|    REF_PRINT_COUNT("SSL_SESSION", i, ss);
  ------------------
  |  |  301|  2.57k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  2.57k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  2.57k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  2.57k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  876|  2.57k|    if (i > 0)
  ------------------
  |  Branch (876:9): [True: 0, False: 2.57k]
  ------------------
  877|      0|        return;
  878|  2.57k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  2.57k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.57k]
  |  |  ------------------
  ------------------
  879|       |
  880|  2.57k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data);
  ------------------
  |  |  253|  2.57k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  881|       |
  882|  2.57k|    OPENSSL_cleanse(ss->master_key, sizeof(ss->master_key));
  883|  2.57k|    OPENSSL_cleanse(ss->session_id, sizeof(ss->session_id));
  884|  2.57k|    X509_free(ss->peer);
  885|  2.57k|    EVP_PKEY_free(ss->peer_rpk);
  886|  2.57k|    OSSL_STACK_OF_X509_free(ss->peer_chain);
  887|  2.57k|    OPENSSL_free(ss->ext.hostname);
  ------------------
  |  |  132|  2.57k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  888|  2.57k|    OPENSSL_free(ss->ext.tick);
  ------------------
  |  |  132|  2.57k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  889|  2.57k|#ifndef OPENSSL_NO_PSK
  890|  2.57k|    OPENSSL_free(ss->psk_identity_hint);
  ------------------
  |  |  132|  2.57k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  891|  2.57k|    OPENSSL_free(ss->psk_identity);
  ------------------
  |  |  132|  2.57k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  892|  2.57k|#endif
  893|  2.57k|#ifndef OPENSSL_NO_SRP
  894|  2.57k|    OPENSSL_free(ss->srp_username);
  ------------------
  |  |  132|  2.57k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  895|  2.57k|#endif
  896|  2.57k|    OPENSSL_free(ss->ext.alpn_selected);
  ------------------
  |  |  132|  2.57k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  897|  2.57k|    OPENSSL_free(ss->ticket_appdata);
  ------------------
  |  |  132|  2.57k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  898|  2.57k|    CRYPTO_FREE_REF(&ss->references);
  899|  2.57k|    OPENSSL_clear_free(ss, sizeof(*ss));
  ------------------
  |  |  130|  2.57k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  900|  2.57k|}
SSL_CTX_flush_sessions_ex:
 1235|  3.47k|{
 1236|  3.47k|    STACK_OF(SSL_SESSION) *sk;
  ------------------
  |  |   33|  3.47k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1237|  3.47k|    SSL_SESSION *current;
 1238|  3.47k|    unsigned long i;
 1239|  3.47k|    const OSSL_TIME timeout = ossl_time_from_time_t(t);
 1240|       |
 1241|  3.47k|    if (!CRYPTO_THREAD_write_lock(s->lock))
  ------------------
  |  Branch (1241:9): [True: 0, False: 3.47k]
  ------------------
 1242|      0|        return;
 1243|       |
 1244|  3.47k|    sk = sk_SSL_SESSION_new_null();
 1245|  3.47k|    i = lh_SSL_SESSION_get_down_load(s->sessions);
 1246|  3.47k|    lh_SSL_SESSION_set_down_load(s->sessions, 0);
 1247|       |
 1248|       |    /*
 1249|       |     * Iterate over the list from the back (oldest), and stop
 1250|       |     * when a session can no longer be removed.
 1251|       |     * Add the session to a temporary list to be freed outside
 1252|       |     * the SSL_CTX lock.
 1253|       |     * But still do the remove_session_cb() within the lock.
 1254|       |     */
 1255|  3.47k|    while (s->session_cache_tail != NULL) {
  ------------------
  |  Branch (1255:12): [True: 0, False: 3.47k]
  ------------------
 1256|      0|        current = s->session_cache_tail;
 1257|      0|        if (t == 0 || sess_timedout(timeout, current)) {
  ------------------
  |  Branch (1257:13): [True: 0, False: 0]
  |  Branch (1257:23): [True: 0, False: 0]
  ------------------
 1258|      0|            lh_SSL_SESSION_delete(s->sessions, current);
 1259|      0|            SSL_SESSION_list_remove(s, current);
 1260|      0|            current->not_resumable = 1;
 1261|      0|            if (s->remove_session_cb != NULL)
  ------------------
  |  Branch (1261:17): [True: 0, False: 0]
  ------------------
 1262|      0|                s->remove_session_cb(s, current);
 1263|       |            /*
 1264|       |             * Throw the session on a stack, it's entirely plausible
 1265|       |             * that while freeing outside the critical section, the
 1266|       |             * session could be re-added, so avoid using the next/prev
 1267|       |             * pointers. If the stack failed to create, or the session
 1268|       |             * couldn't be put on the stack, just free it here
 1269|       |             */
 1270|      0|            if (sk == NULL || !sk_SSL_SESSION_push(sk, current))
  ------------------
  |  Branch (1270:17): [True: 0, False: 0]
  |  Branch (1270:31): [True: 0, False: 0]
  ------------------
 1271|      0|                SSL_SESSION_free(current);
 1272|      0|        } else {
 1273|      0|            break;
 1274|      0|        }
 1275|      0|    }
 1276|       |
 1277|  3.47k|    lh_SSL_SESSION_set_down_load(s->sessions, i);
 1278|  3.47k|    CRYPTO_THREAD_unlock(s->lock);
 1279|       |
 1280|  3.47k|    sk_SSL_SESSION_pop_free(sk, SSL_SESSION_free);
 1281|  3.47k|}
ssl_clear_bad_session:
 1284|  7.74k|{
 1285|  7.74k|    if ((s->session != NULL) && !(s->shutdown & SSL_SENT_SHUTDOWN) && !(SSL_in_init(SSL_CONNECTION_GET_SSL(s)) || SSL_in_before(SSL_CONNECTION_GET_SSL(s)))) {
  ------------------
  |  |  216|  2.57k|#define SSL_SENT_SHUTDOWN 1
  ------------------
                  if ((s->session != NULL) && !(s->shutdown & SSL_SENT_SHUTDOWN) && !(SSL_in_init(SSL_CONNECTION_GET_SSL(s)) || SSL_in_before(SSL_CONNECTION_GET_SSL(s)))) {
  ------------------
  |  |   27|  2.57k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
                  if ((s->session != NULL) && !(s->shutdown & SSL_SENT_SHUTDOWN) && !(SSL_in_init(SSL_CONNECTION_GET_SSL(s)) || SSL_in_before(SSL_CONNECTION_GET_SSL(s)))) {
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (1285:9): [True: 2.57k, False: 5.17k]
  |  Branch (1285:33): [True: 2.57k, False: 0]
  |  Branch (1285:73): [True: 2.57k, False: 0]
  |  Branch (1285:115): [True: 0, False: 0]
  ------------------
 1286|      0|        SSL_CTX_remove_session(s->session_ctx, s->session);
 1287|      0|        return 1;
 1288|      0|    } else
 1289|  7.74k|        return 0;
 1290|  7.74k|}
SSL_CTX_sess_set_new_cb:
 1374|  2.58k|{
 1375|  2.58k|    ctx->new_session_cb = cb;
 1376|  2.58k|}
ssl_sess.c:remove_session_lock:
  840|  2.31k|{
  841|  2.31k|    SSL_SESSION *r;
  842|  2.31k|    int ret = 0;
  843|       |
  844|  2.31k|    if ((c != NULL) && (c->session_id_length != 0)) {
  ------------------
  |  Branch (844:9): [True: 2.31k, False: 0]
  |  Branch (844:24): [True: 10, False: 2.30k]
  ------------------
  845|     10|        if (lck) {
  ------------------
  |  Branch (845:13): [True: 10, False: 0]
  ------------------
  846|     10|            if (!CRYPTO_THREAD_write_lock(ctx->lock))
  ------------------
  |  Branch (846:17): [True: 0, False: 10]
  ------------------
  847|      0|                return 0;
  848|     10|        }
  849|     10|        if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) != NULL) {
  ------------------
  |  Branch (849:13): [True: 0, False: 10]
  ------------------
  850|      0|            ret = 1;
  851|      0|            r = lh_SSL_SESSION_delete(ctx->sessions, r);
  852|      0|            SSL_SESSION_list_remove(ctx, r);
  853|      0|        }
  854|     10|        c->not_resumable = 1;
  855|       |
  856|     10|        if (lck)
  ------------------
  |  Branch (856:13): [True: 10, False: 0]
  ------------------
  857|     10|            CRYPTO_THREAD_unlock(ctx->lock);
  858|       |
  859|     10|        if (ctx->remove_session_cb != NULL)
  ------------------
  |  Branch (859:13): [True: 0, False: 10]
  ------------------
  860|      0|            ctx->remove_session_cb(ctx, c);
  861|       |
  862|     10|        if (ret)
  ------------------
  |  Branch (862:13): [True: 0, False: 10]
  ------------------
  863|      0|            SSL_SESSION_free(r);
  864|     10|    }
  865|  2.31k|    return ret;
  866|  2.31k|}

ossl_ech_2bcompressed:
  551|   154k|{
  552|   154k|    const size_t nexts = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|   154k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  553|       |
  554|       |#ifdef DUPEMALL
  555|       |    return 0;
  556|       |#endif
  557|   154k|    if (ind >= nexts)
  ------------------
  |  Branch (557:9): [True: 0, False: 154k]
  ------------------
  558|      0|        return -1;
  559|   154k|    return ext_defs[ind].ech_handling == OSSL_ECH_HANDLING_COMPRESS;
  ------------------
  |  |   30|   154k|#define OSSL_ECH_HANDLING_COMPRESS 2 /* compress outer value into inner */
  ------------------
  560|   154k|}
tls_validate_all_contexts:
  646|     36|{
  647|     36|    size_t i, num_exts, builtin_num = OSSL_NELEM(ext_defs), offset;
  ------------------
  |  |   14|     36|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  648|     36|    RAW_EXTENSION *thisext;
  649|     36|    unsigned int context;
  650|     36|    ENDPOINT role = ENDPOINT_BOTH;
  651|       |
  652|     36|    if ((thisctx & SSL_EXT_CLIENT_HELLO) != 0)
  ------------------
  |  |  300|     36|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (652:9): [True: 0, False: 36]
  ------------------
  653|      0|        role = ENDPOINT_SERVER;
  654|     36|    else if ((thisctx & SSL_EXT_TLS1_2_SERVER_HELLO) != 0)
  ------------------
  |  |  302|     36|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (654:14): [True: 36, False: 0]
  ------------------
  655|     36|        role = ENDPOINT_CLIENT;
  656|       |
  657|       |    /* Calculate the number of extensions in the extensions list */
  658|     36|    num_exts = builtin_num + s->cert->custext.meths_count;
  659|       |
  660|  1.15k|    for (thisext = exts, i = 0; i < num_exts; i++, thisext++) {
  ------------------
  |  Branch (660:33): [True: 1.11k, False: 36]
  ------------------
  661|  1.11k|        if (!thisext->present)
  ------------------
  |  Branch (661:13): [True: 1.11k, False: 0]
  ------------------
  662|  1.11k|            continue;
  663|       |
  664|      0|        if (i < builtin_num) {
  ------------------
  |  Branch (664:13): [True: 0, False: 0]
  ------------------
  665|      0|            context = ext_defs[i].context;
  666|      0|        } else {
  667|      0|            custom_ext_method *meth = NULL;
  668|       |
  669|      0|            meth = custom_ext_find(&s->cert->custext, role, thisext->type,
  670|      0|                &offset);
  671|      0|            if (!ossl_assert(meth != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (671:17): [True: 0, False: 0]
  ------------------
  672|      0|                return 0;
  673|      0|            context = meth->context;
  674|      0|        }
  675|       |
  676|      0|        if (!validate_context(s, context, thisctx))
  ------------------
  |  Branch (676:13): [True: 0, False: 0]
  ------------------
  677|      0|            return 0;
  678|      0|    }
  679|       |
  680|     36|    return 1;
  681|     36|}
extension_is_relevant:
  746|  77.8k|{
  747|  77.8k|    int is_tls13;
  748|       |
  749|       |    /*
  750|       |     * For HRR we haven't selected the version yet but we know it will be
  751|       |     * TLSv1.3
  752|       |     */
  753|  77.8k|    if ((thisctx & SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST) != 0)
  ------------------
  |  |  305|  77.8k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (753:9): [True: 0, False: 77.8k]
  ------------------
  754|      0|        is_tls13 = 1;
  755|  77.8k|    else
  756|  77.8k|        is_tls13 = SSL_CONNECTION_IS_TLS13(s);
  ------------------
  |  |  273|  77.8k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|   155k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  77.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  77.8k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 77.8k, False: 0]
  |  |  ------------------
  |  |  274|  77.8k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  77.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   155k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 77.8k, False: 0]
  |  |  ------------------
  |  |  275|  77.8k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  77.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  77.8k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 77.8k]
  |  |  ------------------
  ------------------
  757|       |
  758|  77.8k|    if ((SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|   155k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  77.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  77.8k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 77.8k]
  |  |  ------------------
  ------------------
  759|      0|            && (extctx & SSL_EXT_TLS_IMPLEMENTATION_ONLY) != 0)
  ------------------
  |  |  291|      0|#define SSL_EXT_TLS_IMPLEMENTATION_ONLY 0x00004
  ------------------
  |  Branch (759:16): [True: 0, False: 0]
  ------------------
  760|       |        /*
  761|       |         * Note that SSL_IS_TLS13() means "TLS 1.3 has been negotiated",
  762|       |         * which is never true when generating the ClientHello.
  763|       |         * However, version negotiation *has* occurred by the time the
  764|       |         * ClientHello extensions are being parsed.
  765|       |         * Be careful to allow TLS 1.3-only extensions when generating
  766|       |         * the ClientHello.
  767|       |         */
  768|  77.8k|        || (is_tls13 && (extctx & SSL_EXT_TLS1_2_AND_BELOW_ONLY) != 0)
  ------------------
  |  |  295|      0|#define SSL_EXT_TLS1_2_AND_BELOW_ONLY 0x00010
  ------------------
  |  Branch (768:13): [True: 0, False: 77.8k]
  |  Branch (768:25): [True: 0, False: 0]
  ------------------
  769|  77.8k|        || (!is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  297|  77.8k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (769:13): [True: 77.8k, False: 0]
  |  Branch (769:26): [True: 24.8k, False: 53.0k]
  ------------------
  770|  24.8k|            && (thisctx & SSL_EXT_CLIENT_HELLO) == 0)
  ------------------
  |  |  300|  24.8k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (770:16): [True: 0, False: 24.8k]
  ------------------
  771|  77.8k|        || (s->server && !is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0)
  ------------------
  |  |  297|      0|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (771:13): [True: 0, False: 77.8k]
  |  Branch (771:26): [True: 0, False: 0]
  |  Branch (771:39): [True: 0, False: 0]
  ------------------
  772|  77.8k|        || (s->hit && (extctx & SSL_EXT_IGNORE_ON_RESUMPTION) != 0))
  ------------------
  |  |  299|      0|#define SSL_EXT_IGNORE_ON_RESUMPTION 0x00040
  ------------------
  |  Branch (772:13): [True: 0, False: 77.8k]
  |  Branch (772:23): [True: 0, False: 0]
  ------------------
  773|      0|        return 0;
  774|  77.8k|    return 1;
  775|  77.8k|}
tls_collect_extensions:
  796|     61|{
  797|     61|    PACKET extensions = *packet;
  798|     61|    size_t i = 0;
  799|     61|    size_t num_exts;
  800|     61|    custom_ext_methods *exts = &s->cert->custext;
  801|     61|    RAW_EXTENSION *raw_extensions = NULL;
  802|     61|    const EXTENSION_DEFINITION *thisexd;
  803|       |
  804|     61|    *res = NULL;
  805|       |
  806|       |    /*
  807|       |     * Initialise server side custom extensions. Client side is done during
  808|       |     * construction of extensions for the ClientHello.
  809|       |     */
  810|     61|#ifndef OPENSSL_NO_ECH
  811|     61|    if ((context & SSL_EXT_CLIENT_HELLO) != 0 && s->ext.ech.attempted == 0)
  ------------------
  |  |  300|     61|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (811:9): [True: 0, False: 61]
  |  Branch (811:50): [True: 0, False: 0]
  ------------------
  812|      0|        custom_ext_init(&s->cert->custext);
  813|       |#else
  814|       |    if ((context & SSL_EXT_CLIENT_HELLO) != 0)
  815|       |        custom_ext_init(&s->cert->custext);
  816|       |#endif
  817|       |
  818|     61|    num_exts = OSSL_NELEM(ext_defs) + (exts != NULL ? exts->meths_count : 0);
  ------------------
  |  |   14|     61|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (818:40): [True: 61, False: 0]
  ------------------
  819|     61|    raw_extensions = OPENSSL_calloc(num_exts, sizeof(*raw_extensions));
  ------------------
  |  |  113|     61|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  820|     61|    if (raw_extensions == NULL) {
  ------------------
  |  Branch (820:9): [True: 0, False: 61]
  ------------------
  821|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  822|      0|        return 0;
  823|      0|    }
  824|       |
  825|     61|    i = 0;
  826|     61|    while (PACKET_remaining(&extensions) > 0) {
  ------------------
  |  Branch (826:12): [True: 0, False: 61]
  ------------------
  827|      0|        unsigned int type, idx;
  828|      0|        PACKET extension;
  829|      0|        RAW_EXTENSION *thisex;
  830|       |
  831|      0|        if (!PACKET_get_net_2(&extensions, &type) || !PACKET_get_length_prefixed_2(&extensions, &extension)) {
  ------------------
  |  Branch (831:13): [True: 0, False: 0]
  |  Branch (831:54): [True: 0, False: 0]
  ------------------
  832|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  833|      0|            goto err;
  834|      0|        }
  835|       |        /*
  836|       |         * Verify this extension is allowed. We only check duplicates for
  837|       |         * extensions that we recognise. We also have a special case for the
  838|       |         * PSK extension, which must be the last one in the ClientHello.
  839|       |         */
  840|      0|        if (!verify_extension(s, context, type, exts, raw_extensions, &thisex)
  ------------------
  |  Branch (840:13): [True: 0, False: 0]
  ------------------
  841|      0|            || (thisex != NULL && thisex->present == 1)
  ------------------
  |  Branch (841:17): [True: 0, False: 0]
  |  Branch (841:35): [True: 0, False: 0]
  ------------------
  842|      0|            || (type == TLSEXT_TYPE_psk
  ------------------
  |  |  154|      0|#define TLSEXT_TYPE_psk 41
  ------------------
  |  Branch (842:17): [True: 0, False: 0]
  ------------------
  843|      0|                && (context & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (843:20): [True: 0, False: 0]
  ------------------
  844|      0|                && PACKET_remaining(&extensions) != 0)) {
  ------------------
  |  Branch (844:20): [True: 0, False: 0]
  ------------------
  845|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  846|      0|            goto err;
  847|      0|        }
  848|      0|        idx = (unsigned int)(thisex - raw_extensions);
  849|       |        /*-
  850|       |         * Check that we requested this extension (if appropriate). Requests can
  851|       |         * be sent in the ClientHello and CertificateRequest. Unsolicited
  852|       |         * extensions can be sent in the NewSessionTicket. We only do this for
  853|       |         * the built-in extensions. Custom extensions have a different but
  854|       |         * similar check elsewhere.
  855|       |         * Special cases:
  856|       |         * - The HRR cookie extension is unsolicited
  857|       |         * - The renegotiate extension is unsolicited (the client signals
  858|       |         *   support via an SCSV)
  859|       |         * - The signed_certificate_timestamp extension can be provided by a
  860|       |         * custom extension or by the built-in version. We let the extension
  861|       |         * itself handle unsolicited response checks.
  862|       |         */
  863|      0|        if (idx < OSSL_NELEM(ext_defs)
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (863:13): [True: 0, False: 0]
  ------------------
  864|      0|            && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) == 0
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                          && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) == 0
  ------------------
  |  |  308|      0|#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x04000
  ------------------
                          && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) == 0
  ------------------
  |  |  307|      0|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (864:16): [True: 0, False: 0]
  ------------------
  865|      0|            && type != TLSEXT_TYPE_cookie
  ------------------
  |  |  157|      0|#define TLSEXT_TYPE_cookie 44
  ------------------
  |  Branch (865:16): [True: 0, False: 0]
  ------------------
  866|      0|            && type != TLSEXT_TYPE_renegotiate
  ------------------
  |  |  166|      0|#define TLSEXT_TYPE_renegotiate 0xff01
  ------------------
  |  Branch (866:16): [True: 0, False: 0]
  ------------------
  867|      0|            && type != TLSEXT_TYPE_signed_certificate_timestamp
  ------------------
  |  |  125|      0|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
  |  Branch (867:16): [True: 0, False: 0]
  ------------------
  868|      0|            && (s->ext.extflags[idx] & SSL_EXT_FLAG_SENT) == 0
  ------------------
  |  | 2074|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  |  Branch (868:16): [True: 0, False: 0]
  ------------------
  869|      0|#ifndef OPENSSL_NO_GOST
  870|      0|            && !((context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (870:18): [True: 0, False: 0]
  ------------------
  871|      0|                && type == TLSEXT_TYPE_cryptopro_bug)
  ------------------
  |  |  401|      0|#define TLSEXT_TYPE_cryptopro_bug 0xfde8
  ------------------
  |  Branch (871:20): [True: 0, False: 0]
  ------------------
  872|      0|#endif
  873|      0|        ) {
  874|      0|            SSLfatal(s, SSL_AD_UNSUPPORTED_EXTENSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  875|      0|                SSL_R_UNSOLICITED_EXTENSION);
  876|      0|            goto err;
  877|      0|        }
  878|      0|        if (thisex != NULL) {
  ------------------
  |  Branch (878:13): [True: 0, False: 0]
  ------------------
  879|      0|            thisex->data = extension;
  880|      0|            thisex->present = 1;
  881|      0|            thisex->type = type;
  882|      0|            thisex->received_order = i++;
  883|      0|            if (s->ext.debug_cb)
  ------------------
  |  Branch (883:17): [True: 0, False: 0]
  ------------------
  884|      0|                s->ext.debug_cb(SSL_CONNECTION_GET_USER_SSL(s), !s->server,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  885|      0|                    thisex->type, PACKET_data(&thisex->data),
  886|      0|                    (int)PACKET_remaining(&thisex->data),
  887|      0|                    s->ext.debug_arg);
  888|      0|        }
  889|      0|    }
  890|       |
  891|     61|    if (init) {
  ------------------
  |  Branch (891:9): [True: 61, False: 0]
  ------------------
  892|       |        /*
  893|       |         * Initialise all known extensions relevant to this context,
  894|       |         * whether we have found them or not
  895|       |         */
  896|  1.95k|        for (thisexd = ext_defs, i = 0; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|  1.95k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (896:41): [True: 1.89k, False: 61]
  ------------------
  897|  1.89k|            i++, thisexd++) {
  898|  1.89k|            if (thisexd->init != NULL && (thisexd->context & context) != 0
  ------------------
  |  Branch (898:17): [True: 1.15k, False: 732]
  |  Branch (898:42): [True: 671, False: 488]
  ------------------
  899|    671|                && extension_is_relevant(s, thisexd->context, context)
  ------------------
  |  Branch (899:20): [True: 671, False: 0]
  ------------------
  900|    671|                && !thisexd->init(s, context)) {
  ------------------
  |  Branch (900:20): [True: 0, False: 671]
  ------------------
  901|       |                /* SSLfatal() already called */
  902|      0|                goto err;
  903|      0|            }
  904|  1.89k|        }
  905|     61|    }
  906|       |
  907|     61|    *res = raw_extensions;
  908|     61|    if (len != NULL)
  ------------------
  |  Branch (908:9): [True: 0, False: 61]
  ------------------
  909|      0|        *len = num_exts;
  910|     61|    return 1;
  911|       |
  912|      0|err:
  913|      0|    OPENSSL_free(raw_extensions);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  914|      0|    return 0;
  915|     61|}
tls_parse_extension:
  929|     92|{
  930|     92|    RAW_EXTENSION *currext = &exts[idx];
  931|     92|    int (*parser)(SSL_CONNECTION *s, PACKET *pkt, unsigned int context, X509 *x,
  932|     92|        size_t chainidx)
  933|     92|        = NULL;
  934|       |
  935|       |    /* Skip if the extension is not present */
  936|     92|    if (!currext->present)
  ------------------
  |  Branch (936:9): [True: 92, False: 0]
  ------------------
  937|     92|        return 1;
  938|       |
  939|       |    /* Skip if we've already parsed this extension */
  940|      0|    if (currext->parsed)
  ------------------
  |  Branch (940:9): [True: 0, False: 0]
  ------------------
  941|      0|        return 1;
  942|       |
  943|      0|    currext->parsed = 1;
  944|       |
  945|      0|    if (idx < OSSL_NELEM(ext_defs)) {
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (945:9): [True: 0, False: 0]
  ------------------
  946|       |        /* We are handling a built-in extension */
  947|      0|        const EXTENSION_DEFINITION *extdef = &ext_defs[idx];
  948|       |
  949|       |        /* Check if extension is defined for our protocol. If not, skip */
  950|      0|        if (!extension_is_relevant(s, extdef->context, context))
  ------------------
  |  Branch (950:13): [True: 0, False: 0]
  ------------------
  951|      0|            return 1;
  952|       |
  953|      0|        parser = s->server ? extdef->parse_ctos : extdef->parse_stoc;
  ------------------
  |  Branch (953:18): [True: 0, False: 0]
  ------------------
  954|       |
  955|      0|        if (parser != NULL)
  ------------------
  |  Branch (955:13): [True: 0, False: 0]
  ------------------
  956|      0|            return parser(s, &currext->data, context, x, chainidx);
  957|       |
  958|       |        /*
  959|       |         * If the parser is NULL we fall through to the custom extension
  960|       |         * processing
  961|       |         */
  962|      0|    }
  963|       |
  964|       |    /* Parse custom extensions */
  965|      0|    return custom_ext_parse(s, context, currext->type,
  966|      0|        PACKET_data(&currext->data),
  967|      0|        PACKET_remaining(&currext->data),
  968|      0|        x, chainidx);
  969|      0|}
tls_parse_all_extensions:
  981|      1|{
  982|      1|    size_t i, numexts = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  983|      1|    const EXTENSION_DEFINITION *thisexd;
  984|       |
  985|       |    /* Calculate the number of extensions in the extensions list */
  986|      1|    numexts += s->cert->custext.meths_count;
  987|       |
  988|       |    /* Parse each extension in turn */
  989|     32|    for (i = 0; i < numexts; i++) {
  ------------------
  |  Branch (989:17): [True: 31, False: 1]
  ------------------
  990|     31|        if (!tls_parse_extension(s, i, context, exts, x, chainidx)) {
  ------------------
  |  Branch (990:13): [True: 0, False: 31]
  ------------------
  991|       |            /* SSLfatal() already called */
  992|      0|            return 0;
  993|      0|        }
  994|     31|    }
  995|       |
  996|      1|    if (fin) {
  ------------------
  |  Branch (996:9): [True: 1, False: 0]
  ------------------
  997|       |        /*
  998|       |         * Finalise all known extensions relevant to this context,
  999|       |         * whether we have found them or not
 1000|       |         */
 1001|      1|        for (i = 0, thisexd = ext_defs; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1001:41): [True: 1, False: 0]
  ------------------
 1002|      1|            i++, thisexd++) {
 1003|      1|            if (thisexd->final != NULL && (thisexd->context & context) != 0
  ------------------
  |  Branch (1003:17): [True: 1, False: 0]
  |  Branch (1003:43): [True: 1, False: 0]
  ------------------
 1004|      1|                && !thisexd->final(s, context, exts[i].present)) {
  ------------------
  |  Branch (1004:20): [True: 1, False: 0]
  ------------------
 1005|       |                /* SSLfatal() already called */
 1006|      1|                return 0;
 1007|      1|            }
 1008|      1|        }
 1009|      1|    }
 1010|       |
 1011|      0|    return 1;
 1012|      1|}
should_add_extension:
 1016|  77.1k|{
 1017|       |    /* Skip if not relevant for our context */
 1018|  77.1k|    if ((extctx & thisctx) == 0)
  ------------------
  |  Branch (1018:9): [True: 0, False: 77.1k]
  ------------------
 1019|      0|        return 0;
 1020|       |
 1021|       |    /* Check if this extension is defined for our protocol. If not, skip */
 1022|  77.1k|    if (!extension_is_relevant(s, extctx, thisctx)
  ------------------
  |  Branch (1022:9): [True: 0, False: 77.1k]
  ------------------
 1023|  77.1k|        || ((extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  297|  77.1k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (1023:13): [True: 24.8k, False: 52.3k]
  ------------------
 1024|  24.8k|            && (thisctx & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  300|  24.8k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1024:16): [True: 24.8k, False: 0]
  ------------------
 1025|  24.8k|            && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |  266|  49.6k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  24.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  24.8k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 24.8k]
  |  |  ------------------
  ------------------
                          && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |   27|  24.8k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1025:46): [True: 490, False: 24.3k]
  ------------------
 1026|    490|        return 0;
 1027|       |
 1028|  76.6k|    return 1;
 1029|  77.1k|}
tls_construct_extensions:
 1042|  2.51k|{
 1043|  2.51k|    size_t i;
 1044|  2.51k|    int min_version, max_version = 0, reason;
 1045|  2.51k|    const EXTENSION_DEFINITION *thisexd;
 1046|  2.51k|    int for_comp = (context & SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION) != 0;
  ------------------
  |  |  309|  2.51k|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
 1047|  2.51k|#ifndef OPENSSL_NO_ECH
 1048|  2.51k|    int pass;
 1049|  2.51k|#endif
 1050|       |
 1051|  2.51k|    if (!WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  5.03k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1051:9): [True: 0, False: 2.51k]
  ------------------
 1052|       |        /*
 1053|       |         * If extensions are of zero length then we don't even add the
 1054|       |         * extensions length bytes to a ClientHello/ServerHello
 1055|       |         * (for non-TLSv1.3).
 1056|       |         */
 1057|  2.51k|        || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  300|  2.51k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                      || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  302|  2.51k|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (1057:13): [True: 2.51k, False: 0]
  ------------------
 1058|  2.51k|            && !WPACKET_set_flags(pkt,
  ------------------
  |  Branch (1058:16): [True: 0, False: 2.51k]
  ------------------
 1059|  2.51k|                WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH))) {
  ------------------
  |  |  723|  2.51k|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
 1060|      0|        if (!for_comp)
  ------------------
  |  Branch (1060:13): [True: 0, False: 0]
  ------------------
 1061|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1062|      0|        return 0;
 1063|      0|    }
 1064|       |
 1065|  2.51k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  300|  2.51k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1065:9): [True: 2.51k, False: 0]
  ------------------
 1066|  2.51k|        reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
 1067|  2.51k|        if (reason != 0) {
  ------------------
  |  Branch (1067:13): [True: 0, False: 2.51k]
  ------------------
 1068|      0|            if (!for_comp)
  ------------------
  |  Branch (1068:17): [True: 0, False: 0]
  ------------------
 1069|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1070|      0|            return 0;
 1071|      0|        }
 1072|  2.51k|    }
 1073|       |
 1074|       |    /* Add custom extensions first */
 1075|  2.51k|#ifndef OPENSSL_NO_ECH
 1076|  2.51k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0 && s->ext.ech.attempted == 0)
  ------------------
  |  |  300|  2.51k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1076:9): [True: 2.51k, False: 0]
  |  Branch (1076:50): [True: 2.51k, False: 0]
  ------------------
 1077|       |        /* On the server side with initialise during ClientHello parsing */
 1078|  2.51k|        custom_ext_init(&s->cert->custext);
 1079|       |#else
 1080|       |    if ((context & SSL_EXT_CLIENT_HELLO) != 0)
 1081|       |        /* On the server side with initialise during ClientHello parsing */
 1082|       |        custom_ext_init(&s->cert->custext);
 1083|       |#endif
 1084|  2.51k|    if (!custom_ext_add(s, context, pkt, x, chainidx, max_version)) {
  ------------------
  |  Branch (1084:9): [True: 0, False: 2.51k]
  ------------------
 1085|       |        /* SSLfatal() already called */
 1086|      0|        return 0;
 1087|      0|    }
 1088|       |
 1089|  2.51k|#ifndef OPENSSL_NO_ECH
 1090|       |    /*
 1091|       |     * Two passes if doing real ECH - we first construct the
 1092|       |     * to-be-ECH-compressed extensions, and then go around again
 1093|       |     * constructing those that aren't to be ECH-compressed. We
 1094|       |     * need to ensure this ordering so that all the ECH-compressed
 1095|       |     * extensions are contiguous in the encoding. The actual
 1096|       |     * compression happens later in ech_encode_inner().
 1097|       |     */
 1098|  7.48k|    for (pass = 0; pass <= 1; pass++)
  ------------------
  |  Branch (1098:20): [True: 5.00k, False: 2.48k]
  ------------------
 1099|  5.00k|#endif
 1100|       |
 1101|   159k|        for (i = 0, thisexd = ext_defs; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|   159k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1101:41): [True: 154k, False: 4.96k]
  ------------------
 1102|   154k|            i++, thisexd++) {
 1103|   154k|            EXT_RETURN (*construct)(SSL_CONNECTION *s, WPACKET *pkt,
 1104|   154k|                unsigned int context,
 1105|   154k|                X509 *x, size_t chainidx);
 1106|   154k|            EXT_RETURN ret;
 1107|       |
 1108|   154k|#ifndef OPENSSL_NO_ECH
 1109|       |            /* do compressed in pass 0, non-compressed in pass 1 */
 1110|   154k|            if (ossl_ech_2bcompressed((int)i) == pass)
  ------------------
  |  Branch (1110:17): [True: 76.9k, False: 77.1k]
  ------------------
 1111|  76.9k|                continue;
 1112|       |            /* stash index - needed for COMPRESS ECH handling */
 1113|  77.1k|            s->ext.ech.ext_ind = (int)i;
 1114|  77.1k|#endif
 1115|       |            /* Skip if not relevant for our context */
 1116|  77.1k|            if (!should_add_extension(s, thisexd->context, context, max_version))
  ------------------
  |  Branch (1116:17): [True: 490, False: 76.6k]
  ------------------
 1117|    490|                continue;
 1118|       |
 1119|  76.6k|            construct = s->server ? thisexd->construct_stoc
  ------------------
  |  Branch (1119:25): [True: 0, False: 76.6k]
  ------------------
 1120|  76.6k|                                  : thisexd->construct_ctos;
 1121|       |
 1122|  76.6k|            if (construct == NULL)
  ------------------
  |  Branch (1122:17): [True: 7.39k, False: 69.2k]
  ------------------
 1123|  7.39k|                continue;
 1124|       |
 1125|  69.2k|            ret = construct(s, pkt, context, x, chainidx);
 1126|  69.2k|            if (ret == EXT_RETURN_FAIL) {
  ------------------
  |  Branch (1126:17): [True: 38, False: 69.2k]
  ------------------
 1127|       |                /* SSLfatal() already called */
 1128|     38|                return 0;
 1129|     38|            }
 1130|  69.2k|            if (ret == EXT_RETURN_SENT
  ------------------
  |  Branch (1130:17): [True: 30.4k, False: 38.7k]
  ------------------
 1131|  30.4k|                && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  300|  30.4k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                              && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  308|  30.4k|#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x04000
  ------------------
                              && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  307|  30.4k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (1131:20): [True: 30.4k, False: 0]
  ------------------
 1132|  30.4k|                s->ext.extflags[i] |= SSL_EXT_FLAG_SENT;
  ------------------
  |  | 2074|  30.4k|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
 1133|  69.2k|        }
 1134|       |
 1135|  2.48k|#ifndef OPENSSL_NO_ECH
 1136|       |    /*
 1137|       |     * don't close yet if client in the middle of doing ECH, we'll
 1138|       |     * eventually close this in ech_aad_and_encrypt() after we add
 1139|       |     * the real ECH extension value
 1140|       |     */
 1141|  2.48k|    if (s->server
  ------------------
  |  Branch (1141:9): [True: 0, False: 2.48k]
  ------------------
 1142|  2.48k|        || context != SSL_EXT_CLIENT_HELLO
  ------------------
  |  |  300|  4.96k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1142:12): [True: 0, False: 2.48k]
  ------------------
 1143|  2.48k|        || s->ext.ech.attempted == 0
  ------------------
  |  Branch (1143:12): [True: 2.48k, False: 0]
  ------------------
 1144|      0|        || s->ext.ech.ch_depth == 1
  ------------------
  |  Branch (1144:12): [True: 0, False: 0]
  ------------------
 1145|  2.48k|        || s->ext.ech.grease == OSSL_ECH_IS_GREASE) {
  ------------------
  |  |   37|      0|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (1145:12): [True: 0, False: 0]
  ------------------
 1146|  2.48k|        if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1146:13): [True: 0, False: 2.48k]
  ------------------
 1147|      0|            if (!for_comp)
  ------------------
  |  Branch (1147:17): [True: 0, False: 0]
  ------------------
 1148|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1149|      0|            return 0;
 1150|      0|        }
 1151|  2.48k|    }
 1152|       |#else
 1153|       |    if (!WPACKET_close(pkt)) {
 1154|       |        if (!for_comp)
 1155|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 1156|       |        return 0;
 1157|       |    }
 1158|       |#endif
 1159|  2.48k|    return 1;
 1160|  2.48k|}
extensions.c:final_renegotiate:
 1170|      1|{
 1171|      1|    if (!s->server) {
  ------------------
  |  Branch (1171:9): [True: 1, False: 0]
  ------------------
 1172|       |        /*
 1173|       |         * Check if we can connect to a server that doesn't support safe
 1174|       |         * renegotiation
 1175|       |         */
 1176|      1|        if (!(s->options & SSL_OP_LEGACY_SERVER_CONNECT)
  ------------------
  |  |  361|      1|#define SSL_OP_LEGACY_SERVER_CONNECT SSL_OP_BIT(2)
  |  |  ------------------
  |  |  |  |  351|      1|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1176:13): [True: 1, False: 0]
  ------------------
 1177|      1|            && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)
  ------------------
  |  |  397|      1|#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_BIT(18)
  |  |  ------------------
  |  |  |  |  351|      1|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1177:16): [True: 1, False: 0]
  ------------------
 1178|      1|            && !sent) {
  ------------------
  |  Branch (1178:16): [True: 1, False: 0]
  ------------------
 1179|      1|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1180|      1|                SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED);
 1181|      1|            return 0;
 1182|      1|        }
 1183|       |
 1184|      0|        return 1;
 1185|      1|    }
 1186|       |
 1187|       |    /* Need RI if renegotiating */
 1188|      0|    if (s->renegotiate
  ------------------
  |  Branch (1188:9): [True: 0, False: 0]
  ------------------
 1189|      0|        && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)
  ------------------
  |  |  397|      0|#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_BIT(18)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1189:12): [True: 0, False: 0]
  ------------------
 1190|      0|        && !sent) {
  ------------------
  |  Branch (1190:12): [True: 0, False: 0]
  ------------------
 1191|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1192|      0|            SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED);
 1193|      0|        return 0;
 1194|      0|    }
 1195|       |
 1196|      0|    return 1;
 1197|      0|}
extensions.c:init_server_name:
 1209|     61|{
 1210|     61|    if (s->server) {
  ------------------
  |  Branch (1210:9): [True: 0, False: 61]
  ------------------
 1211|      0|        s->servername_done = 0;
 1212|       |
 1213|      0|        OPENSSL_free(s->ext.hostname);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1214|      0|        s->ext.hostname = NULL;
 1215|      0|    }
 1216|       |
 1217|     61|    return 1;
 1218|     61|}
extensions.c:init_ec_point_formats:
 1494|     61|{
 1495|     61|    OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  132|     61|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1496|     61|    s->ext.peer_ecpointformats = NULL;
 1497|     61|    s->ext.peer_ecpointformats_len = 0;
 1498|       |
 1499|     61|    return 1;
 1500|     61|}
extensions.c:init_session_ticket:
 1391|     61|{
 1392|     61|    if (!s->server)
  ------------------
  |  Branch (1392:9): [True: 61, False: 0]
  ------------------
 1393|     61|        s->ext.ticket_expected = 0;
 1394|       |
 1395|     61|    return 1;
 1396|     61|}
extensions.c:init_status_request:
 1400|     61|{
 1401|     61|    if (s->server) {
  ------------------
  |  Branch (1401:9): [True: 0, False: 61]
  ------------------
 1402|      0|        s->ext.status_type = TLSEXT_STATUSTYPE_nothing;
  ------------------
  |  | 2213|      0|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
 1403|     61|    } else {
 1404|       |        /*
 1405|       |         * Ensure we get sensible values passed to tlsext_status_cb in the event
 1406|       |         * that we don't receive a status message
 1407|       |         */
 1408|     61|        OPENSSL_free(s->ext.ocsp.resp);
  ------------------
  |  |  132|     61|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1409|     61|        s->ext.ocsp.resp = NULL;
 1410|     61|        s->ext.ocsp.resp_len = 0;
 1411|       |
 1412|     61|        sk_OCSP_RESPONSE_pop_free(s->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 1413|     61|        s->ext.ocsp.resp_ex = NULL;
 1414|     61|    }
 1415|       |
 1416|     61|    return 1;
 1417|     61|}
extensions.c:init_npn:
 1422|     61|{
 1423|     61|    s->s3.npn_seen = 0;
 1424|       |
 1425|     61|    return 1;
 1426|     61|}
extensions.c:init_alpn:
 1430|     61|{
 1431|     61|    OPENSSL_free(s->s3.alpn_selected);
  ------------------
  |  |  132|     61|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1432|     61|    s->s3.alpn_selected = NULL;
 1433|     61|    s->s3.alpn_selected_len = 0;
 1434|     61|    if (s->server) {
  ------------------
  |  Branch (1434:9): [True: 0, False: 61]
  ------------------
 1435|      0|        OPENSSL_free(s->s3.alpn_proposed);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1436|       |        s->s3.alpn_proposed = NULL;
 1437|      0|        s->s3.alpn_proposed_len = 0;
 1438|      0|    }
 1439|     61|    return 1;
 1440|     61|}
extensions.c:init_srtp:
 1596|     61|{
 1597|     61|    if (s->server)
  ------------------
  |  Branch (1597:9): [True: 0, False: 61]
  ------------------
 1598|      0|        s->srtp_profile = NULL;
 1599|       |
 1600|     61|    return 1;
 1601|     61|}
extensions.c:init_etm:
 1503|     61|{
 1504|     61|    s->ext.use_etm = 0;
 1505|       |
 1506|     61|    return 1;
 1507|     61|}
extensions.c:init_ems:
 1510|     61|{
 1511|     61|    if (s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS) {
  ------------------
  |  |  300|     61|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (1511:9): [True: 0, False: 61]
  ------------------
 1512|      0|        s->s3.flags &= ~TLS1_FLAGS_RECEIVED_EXTMS;
  ------------------
  |  |  300|      0|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
 1513|      0|        s->s3.flags |= TLS1_FLAGS_REQUIRED_EXTMS;
  ------------------
  |  |  307|      0|#define TLS1_FLAGS_REQUIRED_EXTMS 0x1000
  ------------------
 1514|      0|    }
 1515|       |
 1516|     61|    return 1;
 1517|     61|}
extensions.c:init_client_cert_type:
 2201|     61|{
 2202|       |    /* Only reset when parsing client hello */
 2203|     61|    if (sc->server) {
  ------------------
  |  Branch (2203:9): [True: 0, False: 61]
  ------------------
 2204|      0|        sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|      0|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2205|      0|        sc->ext.client_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  248|      0|#define TLSEXT_cert_type_x509 0
  ------------------
 2206|      0|    }
 2207|     61|    return 1;
 2208|     61|}
extensions.c:init_server_cert_type:
 2191|     61|{
 2192|       |    /* Only reset when parsing client hello */
 2193|     61|    if (sc->server) {
  ------------------
  |  Branch (2193:9): [True: 0, False: 61]
  ------------------
 2194|      0|        sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|      0|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2195|      0|        sc->ext.server_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  248|      0|#define TLSEXT_cert_type_x509 0
  ------------------
 2196|      0|    }
 2197|     61|    return 1;
 2198|     61|}
extensions.c:tls_construct_compress_certificate:
 2067|  2.43k|{
 2068|       |#ifndef OPENSSL_NO_COMP_ALG
 2069|       |    int i;
 2070|       |
 2071|       |    if (!ossl_comp_has_alg(0))
 2072|       |        return EXT_RETURN_NOT_SENT;
 2073|       |
 2074|       |    /* Server: Don't attempt to compress a non-X509 (i.e. an RPK) */
 2075|       |    if (sc->server && sc->ext.server_cert_type != TLSEXT_cert_type_x509) {
 2076|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 2077|       |        return EXT_RETURN_NOT_SENT;
 2078|       |    }
 2079|       |
 2080|       |    /* Client: If we sent a client cert-type extension, don't indicate compression */
 2081|       |    if (!sc->server && sc->ext.client_cert_type_ctos) {
 2082|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 2083|       |        return EXT_RETURN_NOT_SENT;
 2084|       |    }
 2085|       |
 2086|       |    /* Do not indicate we support receiving compressed certificates */
 2087|       |    if ((sc->options & SSL_OP_NO_RX_CERTIFICATE_COMPRESSION) != 0)
 2088|       |        return EXT_RETURN_NOT_SENT;
 2089|       |
 2090|       |    if (sc->cert_comp_prefs[0] == TLSEXT_comp_cert_none)
 2091|       |        return EXT_RETURN_NOT_SENT;
 2092|       |#ifndef OPENSSL_NO_ECH
 2093|       |    ECH_SAME_EXT(sc, context, pkt);
 2094|       |#endif
 2095|       |
 2096|       |    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_compress_certificate)
 2097|       |        || !WPACKET_start_sub_packet_u16(pkt)
 2098|       |        || !WPACKET_start_sub_packet_u8(pkt))
 2099|       |        goto err;
 2100|       |
 2101|       |    for (i = 0; sc->cert_comp_prefs[i] != TLSEXT_comp_cert_none; i++) {
 2102|       |        if (!WPACKET_put_bytes_u16(pkt, sc->cert_comp_prefs[i]))
 2103|       |            goto err;
 2104|       |    }
 2105|       |    if (!WPACKET_close(pkt) || !WPACKET_close(pkt))
 2106|       |        goto err;
 2107|       |
 2108|       |    sc->ext.compress_certificate_sent = 1;
 2109|       |    return EXT_RETURN_SENT;
 2110|       |err:
 2111|       |    SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 2112|       |    return EXT_RETURN_FAIL;
 2113|       |#else
 2114|  2.43k|    return EXT_RETURN_NOT_SENT;
 2115|  2.43k|#endif
 2116|  2.43k|}
extensions.c:tls_construct_certificate_authorities:
 1556|  2.43k|{
 1557|  2.43k|    const STACK_OF(X509_NAME) *ca_sk = get_ca_names(s);
 1558|       |
 1559|  2.43k|    if (ca_sk == NULL || sk_X509_NAME_num(ca_sk) == 0)
  ------------------
  |  |   56|  2.43k|#define sk_X509_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(sk))
  ------------------
  |  Branch (1559:9): [True: 0, False: 2.43k]
  |  Branch (1559:26): [True: 2.43k, False: 0]
  ------------------
 1560|  2.43k|        return EXT_RETURN_NOT_SENT;
 1561|       |
 1562|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_certificate_authorities)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1562:9): [True: 0, False: 0]
  ------------------
 1563|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1563:12): [True: 0, False: 0]
  ------------------
 1564|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1565|      0|        return EXT_RETURN_FAIL;
 1566|      0|    }
 1567|       |
 1568|      0|    if (!construct_ca_names(s, ca_sk, pkt)) {
  ------------------
  |  Branch (1568:9): [True: 0, False: 0]
  ------------------
 1569|       |        /* SSLfatal() already called */
 1570|      0|        return EXT_RETURN_FAIL;
 1571|      0|    }
 1572|       |
 1573|      0|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1573:9): [True: 0, False: 0]
  ------------------
 1574|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1575|      0|        return EXT_RETURN_FAIL;
 1576|      0|    }
 1577|       |
 1578|      0|    return EXT_RETURN_SENT;
 1579|      0|}

tls_construct_ctos_renegotiate:
   31|  2.51k|{
   32|  2.51k|    if (!s->renegotiate) {
  ------------------
  |  Branch (32:9): [True: 2.51k, False: 0]
  ------------------
   33|       |        /* If not renegotiating, send an empty RI extension to indicate support */
   34|       |
   35|       |#if DTLS_MAX_VERSION_INTERNAL != DTLS1_2_VERSION
   36|       |#error Internal DTLS version error
   37|       |#endif
   38|       |
   39|  2.51k|        if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  5.03k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.51k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.51k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (39:13): [True: 2.51k, False: 0]
  ------------------
   40|  2.51k|            && (s->min_proto_version >= TLS1_3_VERSION
  ------------------
  |  |   27|  5.03k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (40:17): [True: 4, False: 2.51k]
  ------------------
   41|  2.51k|                || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2757|  2.51k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|  2.51k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                              || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  2.51k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (41:21): [True: 24, False: 2.49k]
  ------------------
   42|     24|                    && s->min_proto_version <= TLS1_VERSION))) {
  ------------------
  |  |   24|     24|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (42:24): [True: 5, False: 19]
  ------------------
   43|       |            /*
   44|       |             * For TLS <= 1.0 SCSV is used instead, and for TLS 1.3 this
   45|       |             * extension isn't used at all.
   46|       |             */
   47|      9|            return EXT_RETURN_NOT_SENT;
   48|      9|        }
   49|       |
   50|  2.51k|#ifndef OPENSSL_NO_ECH
   51|  2.51k|        ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.51k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  5.02k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.51k, False: 0]
  |  |  |  Branch (317:44): [True: 2.51k, False: 0]
  |  |  ------------------
  |  |  318|  2.51k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.51k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
   52|  2.51k|#endif
   53|       |
   54|  2.51k|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  911|  5.02k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (54:13): [True: 0, False: 2.51k]
  ------------------
   55|  2.51k|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  5.02k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (55:16): [True: 0, False: 2.51k]
  ------------------
   56|  2.51k|            || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  909|  5.02k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (56:16): [True: 0, False: 2.51k]
  ------------------
   57|  2.51k|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (57:16): [True: 0, False: 2.51k]
  ------------------
   58|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   59|      0|            return EXT_RETURN_FAIL;
   60|      0|        }
   61|       |
   62|  2.51k|        return EXT_RETURN_SENT;
   63|  2.51k|    }
   64|       |
   65|      0|#ifndef OPENSSL_NO_ECH
   66|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
   67|      0|#endif
   68|       |
   69|       |    /* Add a complete RI extension if renegotiating */
   70|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (70:9): [True: 0, False: 0]
  ------------------
   71|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (71:12): [True: 0, False: 0]
  ------------------
   72|      0|        || !WPACKET_sub_memcpy_u8(pkt, s->s3.previous_client_finished,
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (72:12): [True: 0, False: 0]
  ------------------
   73|      0|            s->s3.previous_client_finished_len)
   74|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (74:12): [True: 0, False: 0]
  ------------------
   75|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   76|      0|        return EXT_RETURN_FAIL;
   77|      0|    }
   78|       |
   79|      0|    return EXT_RETURN_SENT;
   80|      0|}
tls_construct_ctos_server_name:
   85|  2.48k|{
   86|  2.48k|    char *chosen = s->ext.hostname;
   87|  2.48k|#ifndef OPENSSL_NO_ECH
   88|  2.48k|    OSSL_HPKE_SUITE suite;
   89|  2.48k|    OSSL_ECHSTORE_ENTRY *ee = NULL;
   90|       |
   91|  2.48k|    if (s->ext.ech.es != NULL) {
  ------------------
  |  Branch (91:9): [True: 0, False: 2.48k]
  ------------------
   92|      0|        if (ossl_ech_pick_matching_cfg(s, &ee, &suite) != 1) {
  ------------------
  |  Branch (92:13): [True: 0, False: 0]
  ------------------
   93|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   94|      0|            return EXT_RETURN_NOT_SENT;
   95|      0|        }
   96|       |        /* Don't send outer SNI if external API says so */
   97|      0|        if (s->ext.ech.ch_depth == 0 && s->ext.ech.no_outer == 1)
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  |  Branch (97:41): [True: 0, False: 0]
  ------------------
   98|      0|            return EXT_RETURN_NOT_SENT;
   99|      0|        if (s->ext.ech.ch_depth == 1) /* inner */
  ------------------
  |  Branch (99:13): [True: 0, False: 0]
  ------------------
  100|      0|            chosen = s->ext.hostname;
  101|      0|        if (s->ext.ech.ch_depth == 0) { /* outer */
  ------------------
  |  Branch (101:13): [True: 0, False: 0]
  ------------------
  102|      0|            if (s->ext.ech.outer_hostname != NULL) /* prefer API */
  ------------------
  |  Branch (102:17): [True: 0, False: 0]
  ------------------
  103|      0|                chosen = s->ext.ech.outer_hostname;
  104|      0|            else /* use name from ECHConfig */
  105|      0|                chosen = ee->public_name;
  106|      0|        }
  107|      0|    }
  108|  2.48k|#endif
  109|  2.48k|    if (chosen == NULL)
  ------------------
  |  Branch (109:9): [True: 1.48k, False: 996]
  ------------------
  110|  1.48k|        return EXT_RETURN_NOT_SENT;
  111|       |    /* Add TLS extension servername to the Client Hello message */
  112|    996|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_name)
  ------------------
  |  |  911|  1.99k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (112:9): [True: 0, False: 996]
  ------------------
  113|       |        /* Sub-packet for server_name extension */
  114|    996|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  1.99k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (114:12): [True: 0, False: 996]
  ------------------
  115|       |        /* Sub-packet for servername list (always 1 hostname)*/
  116|    996|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  1.99k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (116:12): [True: 0, False: 996]
  ------------------
  117|    996|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_NAMETYPE_host_name)
  ------------------
  |  |  909|  1.99k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (117:12): [True: 0, False: 996]
  ------------------
  118|    996|        || !WPACKET_sub_memcpy_u16(pkt, chosen, strlen(chosen))
  ------------------
  |  |  940|  1.99k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (118:12): [True: 0, False: 996]
  ------------------
  119|    996|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (119:12): [True: 0, False: 996]
  ------------------
  120|    996|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (120:12): [True: 0, False: 996]
  ------------------
  121|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  122|      0|        return EXT_RETURN_FAIL;
  123|      0|    }
  124|    996|    return EXT_RETURN_SENT;
  125|    996|}
tls_construct_ctos_maxfragmentlen:
  131|  2.51k|{
  132|  2.51k|    if (s->ext.max_fragment_len_mode == TLSEXT_max_fragment_length_DISABLED)
  ------------------
  |  |  235|  2.51k|#define TLSEXT_max_fragment_length_DISABLED 0
  ------------------
  |  Branch (132:9): [True: 2.51k, False: 0]
  ------------------
  133|  2.51k|        return EXT_RETURN_NOT_SENT;
  134|      0|#ifndef OPENSSL_NO_ECH
  135|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  136|      0|#endif
  137|       |
  138|       |    /* Add Max Fragment Length extension if client enabled it. */
  139|       |    /*-
  140|       |     * 4 bytes for this extension type and extension length
  141|       |     * 1 byte for the Max Fragment Length code value.
  142|       |     */
  143|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_max_fragment_length)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (143:9): [True: 0, False: 0]
  ------------------
  144|       |        /* Sub-packet for Max Fragment Length extension (1 byte) */
  145|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (145:12): [True: 0, False: 0]
  ------------------
  146|      0|        || !WPACKET_put_bytes_u8(pkt, s->ext.max_fragment_len_mode)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (146:12): [True: 0, False: 0]
  ------------------
  147|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (147:12): [True: 0, False: 0]
  ------------------
  148|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  149|      0|        return EXT_RETURN_FAIL;
  150|      0|    }
  151|       |
  152|      0|    return EXT_RETURN_SENT;
  153|      0|}
tls_construct_ctos_srp:
  159|  2.51k|{
  160|       |    /* Add SRP username if there is one */
  161|  2.51k|    if (s->srp_ctx.login == NULL)
  ------------------
  |  Branch (161:9): [True: 2.51k, False: 0]
  ------------------
  162|  2.51k|        return EXT_RETURN_NOT_SENT;
  163|      0|#ifndef OPENSSL_NO_ECH
  164|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  165|      0|#endif
  166|       |
  167|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_srp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (167:9): [True: 0, False: 0]
  ------------------
  168|       |        /* Sub-packet for SRP extension */
  169|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (169:12): [True: 0, False: 0]
  ------------------
  170|      0|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  810|      0|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (170:12): [True: 0, False: 0]
  ------------------
  171|       |        /* login must not be zero...internal error if so */
  172|      0|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)
  ------------------
  |  |  717|      0|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (172:12): [True: 0, False: 0]
  ------------------
  173|      0|        || !WPACKET_memcpy(pkt, s->srp_ctx.login,
  ------------------
  |  Branch (173:12): [True: 0, False: 0]
  ------------------
  174|      0|            strlen(s->srp_ctx.login))
  175|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (175:12): [True: 0, False: 0]
  ------------------
  176|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (176:12): [True: 0, False: 0]
  ------------------
  177|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  178|      0|        return EXT_RETURN_FAIL;
  179|      0|    }
  180|       |
  181|      0|    return EXT_RETURN_SENT;
  182|      0|}
tls_construct_ctos_ec_pt_formats:
  263|  2.51k|{
  264|  2.51k|    const unsigned char *pformats;
  265|  2.51k|    size_t num_formats;
  266|  2.51k|    int reason, min_version, max_version;
  267|       |
  268|  2.51k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  269|  2.51k|    if (reason != 0) {
  ------------------
  |  Branch (269:9): [True: 0, False: 2.51k]
  ------------------
  270|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  271|      0|        return EXT_RETURN_FAIL;
  272|      0|    }
  273|  2.51k|    if (!negotiate_dhe(s, ptfmt_check, min_version, max_version))
  ------------------
  |  Branch (273:9): [True: 214, False: 2.30k]
  ------------------
  274|    214|        return EXT_RETURN_NOT_SENT;
  275|       |
  276|  2.30k|    tls1_get_formatlist(s, &pformats, &num_formats);
  277|  2.30k|    if (num_formats == 0)
  ------------------
  |  Branch (277:9): [True: 0, False: 2.30k]
  ------------------
  278|      0|        return EXT_RETURN_NOT_SENT;
  279|  2.30k|#ifndef OPENSSL_NO_ECH
  280|  2.30k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.30k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  4.61k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.30k, False: 0]
  |  |  |  Branch (317:44): [True: 2.30k, False: 0]
  |  |  ------------------
  |  |  318|  2.30k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.30k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  281|  2.30k|#endif
  282|       |
  283|       |    /* Add TLS extension ECPointFormats to the ClientHello message */
  284|  2.30k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ec_point_formats)
  ------------------
  |  |  911|  4.61k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (284:9): [True: 0, False: 2.30k]
  ------------------
  285|       |        /* Sub-packet for formats extension */
  286|  2.30k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  4.61k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (286:12): [True: 0, False: 2.30k]
  ------------------
  287|  2.30k|        || !WPACKET_sub_memcpy_u8(pkt, pformats, num_formats)
  ------------------
  |  |  938|  4.61k|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (287:12): [True: 0, False: 2.30k]
  ------------------
  288|  2.30k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (288:12): [True: 0, False: 2.30k]
  ------------------
  289|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  290|      0|        return EXT_RETURN_FAIL;
  291|      0|    }
  292|       |
  293|  2.30k|    return EXT_RETURN_SENT;
  294|  2.30k|}
tls_construct_ctos_supported_groups:
  299|  2.51k|{
  300|  2.51k|    const uint16_t *pgroups = NULL;
  301|  2.51k|    size_t num_groups = 0, i, tls13added = 0, added = 0;
  302|  2.51k|    int min_version, max_version, reason;
  303|  2.51k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  266|  2.51k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.51k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.51k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  304|  2.51k|    int use_ecdhe, use_ffdhe;
  305|       |
  306|  2.51k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  307|  2.51k|    if (reason != 0) {
  ------------------
  |  Branch (307:9): [True: 0, False: 2.51k]
  ------------------
  308|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  309|      0|        return EXT_RETURN_FAIL;
  310|      0|    }
  311|       |
  312|       |    /*
  313|       |     * If we don't support suitable groups, don't send the extension
  314|       |     */
  315|  2.51k|    use_ecdhe = negotiate_dhe(s, ecdhe_check, min_version, max_version);
  316|  2.51k|    use_ffdhe = negotiate_dhe(s, ffdhe_check, min_version, max_version);
  317|  2.51k|    if (!use_ecdhe && !use_ffdhe
  ------------------
  |  Branch (317:9): [True: 104, False: 2.41k]
  |  Branch (317:23): [True: 39, False: 65]
  ------------------
  318|     39|        && (dtls ? DTLS_VERSION_LE(max_version, DTLS1_2_VERSION)
  ------------------
  |  |   65|      0|#define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (318:12): [True: 5, False: 34]
  |  Branch (318:13): [True: 0, False: 39]
  ------------------
  319|     39|                 : (max_version <= TLS1_2_VERSION)))
  ------------------
  |  |   26|     39|#define TLS1_2_VERSION 0x0303
  ------------------
  320|      5|        return EXT_RETURN_NOT_SENT;
  321|  2.51k|#ifndef OPENSSL_NO_ECH
  322|  2.51k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.51k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  5.02k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.51k, False: 0]
  |  |  |  Branch (317:44): [True: 2.51k, False: 0]
  |  |  ------------------
  |  |  318|  2.51k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.51k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  323|  2.51k|#endif
  324|       |
  325|       |    /*
  326|       |     * Add TLS extension supported_groups to the ClientHello message
  327|       |     */
  328|  2.51k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  329|       |
  330|  2.51k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_groups)
  ------------------
  |  |  911|  5.02k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (330:9): [True: 0, False: 2.51k]
  ------------------
  331|       |        /* Sub-packet for supported_groups extension */
  332|  2.51k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  5.02k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (332:12): [True: 0, False: 2.51k]
  ------------------
  333|  2.51k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  5.02k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (333:12): [True: 0, False: 2.51k]
  ------------------
  334|  2.51k|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)) {
  ------------------
  |  |  717|  2.51k|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (334:12): [True: 0, False: 2.51k]
  ------------------
  335|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  336|      0|        return EXT_RETURN_FAIL;
  337|      0|    }
  338|       |    /* Copy group ID if supported */
  339|  26.1k|    for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (339:17): [True: 23.6k, False: 2.51k]
  ------------------
  340|  23.6k|        const TLS_GROUP_INFO *ginfo = NULL;
  341|  23.6k|        uint16_t ctmp = pgroups[i];
  342|  23.6k|        int okfortls13;
  343|       |
  344|  23.6k|        if (!tls_valid_group(s, ctmp, min_version, max_version, &okfortls13,
  ------------------
  |  Branch (344:13): [True: 168, False: 23.4k]
  ------------------
  345|  23.6k|                &ginfo)
  346|  23.4k|            || (!use_ecdhe && is_ecdhe_group(ginfo->group_id))
  ------------------
  |  Branch (346:17): [True: 105, False: 23.3k]
  |  Branch (346:31): [True: 32, False: 73]
  ------------------
  347|  23.4k|            || (!use_ffdhe && is_ffdhe_group(ginfo->group_id))
  ------------------
  |  Branch (347:17): [True: 525, False: 22.8k]
  |  Branch (347:31): [True: 49, False: 476]
  ------------------
  348|       |            /* Note: SSL_SECOP_CURVE_SUPPORTED covers all key exchange groups */
  349|  23.3k|            || !tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2749|  23.3k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2730|  23.3k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (349:16): [True: 80, False: 23.2k]
  ------------------
  350|    329|            continue;
  351|       |
  352|  23.2k|        if (!WPACKET_put_bytes_u16(pkt, ctmp)) {
  ------------------
  |  |  911|  23.2k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (352:13): [True: 0, False: 23.2k]
  ------------------
  353|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  354|      0|            return EXT_RETURN_FAIL;
  355|      0|        }
  356|  23.2k|        if (okfortls13 && max_version == TLS1_3_VERSION)
  ------------------
  |  |   27|  23.0k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (356:13): [True: 23.0k, False: 226]
  |  Branch (356:27): [True: 23.0k, False: 0]
  ------------------
  357|  23.0k|            tls13added++;
  358|  23.2k|        added++;
  359|  23.2k|    }
  360|  2.51k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (360:9): [True: 33, False: 2.48k]
  |  Branch (360:32): [True: 0, False: 2.48k]
  ------------------
  361|     33|        if (added == 0)
  ------------------
  |  Branch (361:13): [True: 33, False: 0]
  ------------------
  362|     33|            SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  157|     33|    (ERR_new(),                                                  \
  |  |  158|     33|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     33|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|     33|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1266|     33|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|     33|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                          SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  217|     33|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  363|     33|                "No groups enabled for max supported SSL/TLS version");
  364|      0|        else
  365|     33|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  366|     33|        return EXT_RETURN_FAIL;
  367|     33|    }
  368|       |
  369|  2.48k|    if (tls13added == 0 && max_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|     44|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (369:9): [True: 44, False: 2.43k]
  |  Branch (369:28): [True: 0, False: 44]
  ------------------
  370|      0|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1266|      0|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|      0|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  217|      0|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  371|      0|            "No groups enabled for max supported SSL/TLS version");
  372|      0|        return EXT_RETURN_FAIL;
  373|      0|    }
  374|       |
  375|  2.48k|    return EXT_RETURN_SENT;
  376|  2.48k|}
tls_construct_ctos_session_ticket:
  381|  2.48k|{
  382|  2.48k|    size_t ticklen;
  383|       |
  384|  2.48k|    if (!tls_use_ticket(s))
  ------------------
  |  Branch (384:9): [True: 2.48k, False: 0]
  ------------------
  385|  2.48k|        return EXT_RETURN_NOT_SENT;
  386|      0|#ifndef OPENSSL_NO_ECH
  387|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  388|      0|#endif
  389|       |
  390|      0|    if (!s->new_session && s->session != NULL
  ------------------
  |  Branch (390:9): [True: 0, False: 0]
  |  Branch (390:28): [True: 0, False: 0]
  ------------------
  391|      0|        && s->session->ext.tick != NULL
  ------------------
  |  Branch (391:12): [True: 0, False: 0]
  ------------------
  392|      0|        && s->session->ssl_version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (392:12): [True: 0, False: 0]
  ------------------
  393|      0|        ticklen = s->session->ext.ticklen;
  394|      0|    } else if (s->session && s->ext.session_ticket != NULL
  ------------------
  |  Branch (394:16): [True: 0, False: 0]
  |  Branch (394:30): [True: 0, False: 0]
  ------------------
  395|      0|        && s->ext.session_ticket->data != NULL) {
  ------------------
  |  Branch (395:12): [True: 0, False: 0]
  ------------------
  396|      0|        ticklen = s->ext.session_ticket->length;
  397|      0|        s->session->ext.tick = OPENSSL_malloc(ticklen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  398|      0|        if (s->session->ext.tick == NULL) {
  ------------------
  |  Branch (398:13): [True: 0, False: 0]
  ------------------
  399|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  400|      0|            return EXT_RETURN_FAIL;
  401|      0|        }
  402|      0|        memcpy(s->session->ext.tick,
  403|      0|            s->ext.session_ticket->data, ticklen);
  404|      0|        s->session->ext.ticklen = ticklen;
  405|      0|    } else {
  406|      0|        ticklen = 0;
  407|      0|    }
  408|       |
  409|      0|    if (ticklen == 0 && s->ext.session_ticket != NULL && s->ext.session_ticket->data == NULL)
  ------------------
  |  Branch (409:9): [True: 0, False: 0]
  |  Branch (409:25): [True: 0, False: 0]
  |  Branch (409:58): [True: 0, False: 0]
  ------------------
  410|      0|        return EXT_RETURN_NOT_SENT;
  411|       |
  412|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_session_ticket)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (412:9): [True: 0, False: 0]
  ------------------
  413|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick, ticklen)) {
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (413:12): [True: 0, False: 0]
  ------------------
  414|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  415|      0|        return EXT_RETURN_FAIL;
  416|      0|    }
  417|       |
  418|      0|    return EXT_RETURN_SENT;
  419|      0|}
tls_construct_ctos_sig_algs:
  424|  2.48k|{
  425|  2.48k|    size_t salglen;
  426|  2.48k|    const uint16_t *salg;
  427|       |
  428|       |    /*
  429|       |     * This used both in the initial hello and as part of renegotiation,
  430|       |     * in the latter case, the client version may be already set and may
  431|       |     * be lower than that initially offered in `client_version`.
  432|       |     */
  433|  2.48k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.48k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.48k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (433:9): [True: 2.48k, False: 0]
  ------------------
  434|  2.48k|        if (s->client_version < TLS1_2_VERSION
  ------------------
  |  |   26|  4.97k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (434:13): [True: 4, False: 2.48k]
  ------------------
  435|  2.48k|            || (s->ssl.method->version != TLS_ANY_VERSION
  ------------------
  |  |   40|  4.96k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (435:17): [True: 0, False: 2.48k]
  ------------------
  436|      0|                && s->version < TLS1_2_VERSION))
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (436:20): [True: 0, False: 0]
  ------------------
  437|      4|            return EXT_RETURN_NOT_SENT;
  438|  2.48k|    } else {
  439|      0|        if (DTLS_VERSION_LT(s->client_version, DTLS1_2_VERSION)
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  440|      0|            || (s->ssl.method->version != DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (440:17): [True: 0, False: 0]
  ------------------
  441|      0|                && DTLS_VERSION_LT(s->version, DTLS1_2_VERSION)))
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  442|      0|            return EXT_RETURN_NOT_SENT;
  443|      0|    }
  444|       |
  445|  2.48k|#ifndef OPENSSL_NO_ECH
  446|  2.48k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.48k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  4.96k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.48k, False: 0]
  |  |  |  Branch (317:44): [True: 2.48k, False: 0]
  |  |  ------------------
  |  |  318|  2.48k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.48k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  447|  2.48k|#endif
  448|       |
  449|  2.48k|    salglen = tls12_get_psigalgs(s, 1, &salg);
  450|  2.48k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signature_algorithms)
  ------------------
  |  |  911|  4.96k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (450:9): [True: 0, False: 2.48k]
  ------------------
  451|       |        /* Sub-packet for sig-algs extension */
  452|  2.48k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  4.96k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (452:12): [True: 0, False: 2.48k]
  ------------------
  453|       |        /* Sub-packet for the actual list */
  454|  2.48k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  4.96k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (454:12): [True: 0, False: 2.48k]
  ------------------
  455|  2.48k|        || !tls12_copy_sigalgs(s, pkt, salg, salglen)
  ------------------
  |  Branch (455:12): [True: 0, False: 2.48k]
  ------------------
  456|  2.48k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (456:12): [True: 0, False: 2.48k]
  ------------------
  457|  2.48k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (457:12): [True: 0, False: 2.48k]
  ------------------
  458|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  459|      0|        return EXT_RETURN_FAIL;
  460|      0|    }
  461|       |
  462|  2.48k|    return EXT_RETURN_SENT;
  463|  2.48k|}
tls_construct_ctos_status_request:
  469|  2.48k|{
  470|  2.48k|    int i;
  471|       |
  472|       |    /* This extension isn't defined for client Certificates */
  473|  2.48k|    if (x != NULL)
  ------------------
  |  Branch (473:9): [True: 0, False: 2.48k]
  ------------------
  474|      0|        return EXT_RETURN_NOT_SENT;
  475|       |
  476|  2.48k|    if (s->ext.status_type != TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  181|  2.48k|#define TLSEXT_STATUSTYPE_ocsp 1
  ------------------
  |  Branch (476:9): [True: 2.48k, False: 1]
  ------------------
  477|  2.48k|        return EXT_RETURN_NOT_SENT;
  478|      1|#ifndef OPENSSL_NO_ECH
  479|      1|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      1|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      2|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 1, False: 0]
  |  |  |  Branch (317:44): [True: 1, False: 0]
  |  |  ------------------
  |  |  318|      1|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 1]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  480|      1|#endif
  481|       |
  482|      1|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_status_request)
  ------------------
  |  |  911|      2|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (482:9): [True: 0, False: 1]
  ------------------
  483|       |        /* Sub-packet for status request extension */
  484|      1|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      2|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (484:12): [True: 0, False: 1]
  ------------------
  485|      1|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  909|      2|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (485:12): [True: 0, False: 1]
  ------------------
  486|       |        /* Sub-packet for the ids */
  487|      1|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      1|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (487:12): [True: 0, False: 1]
  ------------------
  488|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  489|      0|        return EXT_RETURN_FAIL;
  490|      0|    }
  491|      1|    for (i = 0; i < sk_OCSP_RESPID_num(s->ext.ocsp.ids); i++) {
  ------------------
  |  |  166|      1|#define sk_OCSP_RESPID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_RESPID_sk_type(sk))
  ------------------
  |  Branch (491:17): [True: 0, False: 1]
  ------------------
  492|      0|        unsigned char *idbytes;
  493|      0|        OCSP_RESPID *id = sk_OCSP_RESPID_value(s->ext.ocsp.ids, i);
  ------------------
  |  |  167|      0|#define sk_OCSP_RESPID_value(sk, idx) ((OCSP_RESPID *)OPENSSL_sk_value(ossl_check_const_OCSP_RESPID_sk_type(sk), (idx)))
  ------------------
  494|      0|        int idlen = i2d_OCSP_RESPID(id, NULL);
  495|       |
  496|      0|        if (idlen <= 0
  ------------------
  |  Branch (496:13): [True: 0, False: 0]
  ------------------
  497|       |            /* Sub-packet for an individual id */
  498|      0|            || !WPACKET_sub_allocate_bytes_u16(pkt, idlen, &idbytes)
  ------------------
  |  |  851|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (498:16): [True: 0, False: 0]
  ------------------
  499|      0|            || i2d_OCSP_RESPID(id, &idbytes) != idlen) {
  ------------------
  |  Branch (499:16): [True: 0, False: 0]
  ------------------
  500|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  501|      0|            return EXT_RETURN_FAIL;
  502|      0|        }
  503|      0|    }
  504|      1|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (504:9): [True: 0, False: 1]
  ------------------
  505|      1|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      1|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (505:12): [True: 0, False: 1]
  ------------------
  506|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  507|      0|        return EXT_RETURN_FAIL;
  508|      0|    }
  509|      1|    if (s->ext.ocsp.exts) {
  ------------------
  |  Branch (509:9): [True: 0, False: 1]
  ------------------
  510|      0|        unsigned char *extbytes;
  511|      0|        int extlen = i2d_X509_EXTENSIONS(s->ext.ocsp.exts, NULL);
  512|       |
  513|      0|        if (extlen < 0) {
  ------------------
  |  Branch (513:13): [True: 0, False: 0]
  ------------------
  514|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  515|      0|            return EXT_RETURN_FAIL;
  516|      0|        }
  517|      0|        if (!WPACKET_allocate_bytes(pkt, extlen, &extbytes)
  ------------------
  |  Branch (517:13): [True: 0, False: 0]
  ------------------
  518|      0|            || i2d_X509_EXTENSIONS(s->ext.ocsp.exts, &extbytes)
  ------------------
  |  Branch (518:16): [True: 0, False: 0]
  ------------------
  519|      0|                != extlen) {
  520|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  521|      0|            return EXT_RETURN_FAIL;
  522|      0|        }
  523|      0|    }
  524|      1|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (524:9): [True: 0, False: 1]
  |  Branch (524:32): [True: 0, False: 1]
  ------------------
  525|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  526|      0|        return EXT_RETURN_FAIL;
  527|      0|    }
  528|       |
  529|      1|    return EXT_RETURN_SENT;
  530|      1|}
tls_construct_ctos_npn:
  537|  2.48k|{
  538|  2.48k|    if (SSL_CONNECTION_GET_CTX(s)->ext.npn_select_cb == NULL
  ------------------
  |  |   26|  2.48k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (538:9): [True: 2.48k, False: 0]
  ------------------
  539|      0|        || !SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  540|  2.48k|        return EXT_RETURN_NOT_SENT;
  541|      0|#ifndef OPENSSL_NO_ECH
  542|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  543|      0|#endif
  544|       |
  545|       |    /*
  546|       |     * The client advertises an empty extension to indicate its support
  547|       |     * for Next Protocol Negotiation
  548|       |     */
  549|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_next_proto_neg)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (549:9): [True: 0, False: 0]
  ------------------
  550|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (550:12): [True: 0, False: 0]
  ------------------
  551|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  552|      0|        return EXT_RETURN_FAIL;
  553|      0|    }
  554|       |
  555|      0|    return EXT_RETURN_SENT;
  556|      0|}
tls_construct_ctos_alpn:
  562|  2.48k|{
  563|  2.48k|    unsigned char *aval = s->ext.alpn;
  564|  2.48k|    size_t alen = s->ext.alpn_len;
  565|       |
  566|  2.48k|    s->s3.alpn_sent = 0;
  567|  2.48k|    if (!SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  2.48k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 2.48k, False: 0]
  |  |  ------------------
  |  |  286|  2.48k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  568|      0|        return EXT_RETURN_NOT_SENT;
  569|  2.48k|#ifndef OPENSSL_NO_ECH
  570|       |    /*
  571|       |     * If we have different alpn and alpn_outer values, then we set
  572|       |     * the appropriate one for inner and outer.
  573|       |     * If no alpn is set (for inner or outer), we don't send any.
  574|       |     * If only an inner is set then we send the same in both.
  575|       |     * Logic above is on the basis that alpn's aren't that sensitive,
  576|       |     * usually, so special action is needed to do better.
  577|       |     * We also don't support a way to send alpn only in the inner.
  578|       |     * If you don't want the inner value in the outer, you have to
  579|       |     * pick what to send in the outer and send that.
  580|       |     */
  581|  2.48k|    if (s->ext.ech.ch_depth == 1 && s->ext.alpn == NULL) /* inner */
  ------------------
  |  Branch (581:9): [True: 0, False: 2.48k]
  |  Branch (581:37): [True: 0, False: 0]
  ------------------
  582|      0|        return EXT_RETURN_NOT_SENT;
  583|  2.48k|    if (s->ext.ech.ch_depth == 0 && s->ext.alpn == NULL
  ------------------
  |  Branch (583:9): [True: 2.48k, False: 0]
  |  Branch (583:37): [True: 9, False: 2.47k]
  ------------------
  584|      9|        && s->ext.ech.alpn_outer == NULL) /* outer */
  ------------------
  |  Branch (584:12): [True: 9, False: 0]
  ------------------
  585|      9|        return EXT_RETURN_NOT_SENT;
  586|  2.47k|    if (s->ext.ech.ch_depth == 0 && s->ext.ech.alpn_outer != NULL) {
  ------------------
  |  Branch (586:9): [True: 2.47k, False: 0]
  |  Branch (586:37): [True: 0, False: 2.47k]
  ------------------
  587|      0|        aval = s->ext.ech.alpn_outer;
  588|      0|        alen = s->ext.ech.alpn_outer_len;
  589|      0|    }
  590|  2.47k|#endif
  591|  2.47k|    if (aval == NULL)
  ------------------
  |  Branch (591:9): [True: 0, False: 2.47k]
  ------------------
  592|      0|        return EXT_RETURN_NOT_SENT;
  593|  2.47k|    if (!WPACKET_put_bytes_u16(pkt,
  ------------------
  |  |  911|  4.94k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (593:9): [True: 0, False: 2.47k]
  ------------------
  594|  2.47k|            TLSEXT_TYPE_application_layer_protocol_negotiation)
  595|       |        /* Sub-packet ALPN extension */
  596|  2.47k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  4.94k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (596:12): [True: 0, False: 2.47k]
  ------------------
  597|  2.47k|        || !WPACKET_sub_memcpy_u16(pkt, aval, alen)
  ------------------
  |  |  940|  4.94k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (597:12): [True: 0, False: 2.47k]
  ------------------
  598|  2.47k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (598:12): [True: 0, False: 2.47k]
  ------------------
  599|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  600|      0|        return EXT_RETURN_FAIL;
  601|      0|    }
  602|  2.47k|    s->s3.alpn_sent = 1;
  603|  2.47k|    return EXT_RETURN_SENT;
  604|  2.47k|}
tls_construct_ctos_use_srtp:
  610|  2.48k|{
  611|  2.48k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  612|  2.48k|    STACK_OF(SRTP_PROTECTION_PROFILE) *clnt = SSL_get_srtp_profiles(ssl);
  ------------------
  |  |   33|  2.48k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  613|  2.48k|    int i, end;
  614|       |
  615|  2.48k|    if (clnt == NULL)
  ------------------
  |  Branch (615:9): [True: 2.48k, False: 0]
  ------------------
  616|  2.48k|        return EXT_RETURN_NOT_SENT;
  617|      0|#ifndef OPENSSL_NO_ECH
  618|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  619|      0|#endif
  620|       |
  621|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_use_srtp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (621:9): [True: 0, False: 0]
  ------------------
  622|       |        /* Sub-packet for SRTP extension */
  623|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (623:12): [True: 0, False: 0]
  ------------------
  624|       |        /* Sub-packet for the protection profile list */
  625|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (625:12): [True: 0, False: 0]
  ------------------
  626|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  627|      0|        return EXT_RETURN_FAIL;
  628|      0|    }
  629|       |
  630|      0|    end = sk_SRTP_PROTECTION_PROFILE_num(clnt);
  ------------------
  |  |  251|      0|#define sk_SRTP_PROTECTION_PROFILE_num(sk) OPENSSL_sk_num(ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
  631|      0|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (631:17): [True: 0, False: 0]
  ------------------
  632|      0|        const SRTP_PROTECTION_PROFILE *prof = sk_SRTP_PROTECTION_PROFILE_value(clnt, i);
  ------------------
  |  |  252|      0|#define sk_SRTP_PROTECTION_PROFILE_value(sk, idx) ((SRTP_PROTECTION_PROFILE *)OPENSSL_sk_value(ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(sk), (idx)))
  ------------------
  633|       |
  634|      0|        if (prof == NULL || !WPACKET_put_bytes_u16(pkt, prof->id)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (634:13): [True: 0, False: 0]
  |  Branch (634:29): [True: 0, False: 0]
  ------------------
  635|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  636|      0|            return EXT_RETURN_FAIL;
  637|      0|        }
  638|      0|    }
  639|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (639:9): [True: 0, False: 0]
  ------------------
  640|       |        /* Add an empty use_mki value */
  641|      0|        || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (641:12): [True: 0, False: 0]
  ------------------
  642|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (642:12): [True: 0, False: 0]
  ------------------
  643|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  644|      0|        return EXT_RETURN_FAIL;
  645|      0|    }
  646|       |
  647|      0|    return EXT_RETURN_SENT;
  648|      0|}
tls_construct_ctos_etm:
  654|  2.48k|{
  655|  2.48k|    if (s->options & SSL_OP_NO_ENCRYPT_THEN_MAC)
  ------------------
  |  |  399|  2.48k|#define SSL_OP_NO_ENCRYPT_THEN_MAC SSL_OP_BIT(19)
  |  |  ------------------
  |  |  |  |  351|  2.48k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (655:9): [True: 0, False: 2.48k]
  ------------------
  656|      0|        return EXT_RETURN_NOT_SENT;
  657|  2.48k|#ifndef OPENSSL_NO_ECH
  658|  2.48k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.48k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  4.97k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.48k, False: 0]
  |  |  |  Branch (317:44): [True: 2.48k, False: 0]
  |  |  ------------------
  |  |  318|  2.48k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.48k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  659|  2.48k|#endif
  660|       |
  661|  2.48k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_encrypt_then_mac)
  ------------------
  |  |  911|  4.97k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (661:9): [True: 0, False: 2.48k]
  ------------------
  662|  2.48k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|  2.48k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (662:12): [True: 0, False: 2.48k]
  ------------------
  663|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  664|      0|        return EXT_RETURN_FAIL;
  665|      0|    }
  666|       |
  667|  2.48k|    return EXT_RETURN_SENT;
  668|  2.48k|}
tls_construct_ctos_sct:
  674|  2.48k|{
  675|  2.48k|    if (s->ct_validation_callback == NULL)
  ------------------
  |  Branch (675:9): [True: 2.48k, False: 0]
  ------------------
  676|  2.48k|        return EXT_RETURN_NOT_SENT;
  677|       |
  678|       |    /* Not defined for client Certificates */
  679|      0|    if (x != NULL)
  ------------------
  |  Branch (679:9): [True: 0, False: 0]
  ------------------
  680|      0|        return EXT_RETURN_NOT_SENT;
  681|      0|#ifndef OPENSSL_NO_ECH
  682|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  683|      0|#endif
  684|       |
  685|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signed_certificate_timestamp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (685:9): [True: 0, False: 0]
  ------------------
  686|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (686:12): [True: 0, False: 0]
  ------------------
  687|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  688|      0|        return EXT_RETURN_FAIL;
  689|      0|    }
  690|       |
  691|      0|    return EXT_RETURN_SENT;
  692|      0|}
tls_construct_ctos_ems:
  698|  2.48k|{
  699|  2.48k|    if (s->options & SSL_OP_NO_EXTENDED_MASTER_SECRET)
  ------------------
  |  |  357|  2.48k|#define SSL_OP_NO_EXTENDED_MASTER_SECRET SSL_OP_BIT(0)
  |  |  ------------------
  |  |  |  |  351|  2.48k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (699:9): [True: 0, False: 2.48k]
  ------------------
  700|      0|        return EXT_RETURN_NOT_SENT;
  701|  2.48k|#ifndef OPENSSL_NO_ECH
  702|  2.48k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.48k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  4.97k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.48k, False: 0]
  |  |  |  Branch (317:44): [True: 2.48k, False: 0]
  |  |  ------------------
  |  |  318|  2.48k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.48k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  703|  2.48k|#endif
  704|       |
  705|  2.48k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_extended_master_secret)
  ------------------
  |  |  911|  4.97k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (705:9): [True: 0, False: 2.48k]
  ------------------
  706|  2.48k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|  2.48k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (706:12): [True: 0, False: 2.48k]
  ------------------
  707|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  708|      0|        return EXT_RETURN_FAIL;
  709|      0|    }
  710|       |
  711|  2.48k|    return EXT_RETURN_SENT;
  712|  2.48k|}
tls_construct_ctos_supported_versions:
  717|  2.48k|{
  718|  2.48k|    int currv, min_version, max_version, reason;
  719|       |
  720|  2.48k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  721|  2.48k|    if (reason != 0) {
  ------------------
  |  Branch (721:9): [True: 0, False: 2.48k]
  ------------------
  722|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  723|      0|        return EXT_RETURN_FAIL;
  724|      0|    }
  725|       |
  726|       |    /*
  727|       |     * Don't include this if we can't negotiate TLSv1.3. We can do a straight
  728|       |     * comparison here because we will never be called in DTLS.
  729|       |     */
  730|  2.48k|    if (max_version < TLS1_3_VERSION)
  ------------------
  |  |   27|  2.48k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (730:9): [True: 49, False: 2.43k]
  ------------------
  731|     49|        return EXT_RETURN_NOT_SENT;
  732|  2.43k|#ifndef OPENSSL_NO_ECH
  733|  2.43k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.43k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  4.87k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.43k, False: 0]
  |  |  |  Branch (317:44): [True: 2.43k, False: 0]
  |  |  ------------------
  |  |  318|  2.43k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.43k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  734|  2.43k|#endif
  735|       |
  736|  2.43k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_versions)
  ------------------
  |  |  911|  4.87k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (736:9): [True: 0, False: 2.43k]
  ------------------
  737|  2.43k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  4.87k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (737:12): [True: 0, False: 2.43k]
  ------------------
  738|  2.43k|        || !WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  810|  2.43k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (738:12): [True: 0, False: 2.43k]
  ------------------
  739|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  740|      0|        return EXT_RETURN_FAIL;
  741|      0|    }
  742|       |
  743|  7.31k|    for (currv = max_version; currv >= min_version; currv--) {
  ------------------
  |  Branch (743:31): [True: 4.87k, False: 2.43k]
  ------------------
  744|  4.87k|        if (!WPACKET_put_bytes_u16(pkt, currv)) {
  ------------------
  |  |  911|  4.87k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (744:13): [True: 0, False: 4.87k]
  ------------------
  745|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  746|      0|            return EXT_RETURN_FAIL;
  747|      0|        }
  748|  4.87k|    }
  749|  2.43k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (749:9): [True: 0, False: 2.43k]
  |  Branch (749:32): [True: 0, False: 2.43k]
  ------------------
  750|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  751|      0|        return EXT_RETURN_FAIL;
  752|      0|    }
  753|       |
  754|  2.43k|    return EXT_RETURN_SENT;
  755|  2.43k|}
tls_construct_ctos_psk_kex_modes:
  763|  2.43k|{
  764|  2.43k|#ifndef OPENSSL_NO_TLS1_3
  765|  2.43k|    int nodhe = s->options & SSL_OP_ALLOW_NO_DHE_KEX;
  ------------------
  |  |  370|  2.43k|#define SSL_OP_ALLOW_NO_DHE_KEX SSL_OP_BIT(10)
  |  |  ------------------
  |  |  |  |  351|  2.43k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  766|       |
  767|  2.43k|#ifndef OPENSSL_NO_ECH
  768|  2.43k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.43k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  4.87k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.43k, False: 0]
  |  |  |  Branch (317:44): [True: 2.43k, False: 0]
  |  |  ------------------
  |  |  318|  2.43k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.43k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  769|  2.43k|#endif
  770|       |
  771|  2.43k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk_kex_modes)
  ------------------
  |  |  911|  4.87k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (771:9): [True: 0, False: 2.43k]
  ------------------
  772|  2.43k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  4.87k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (772:12): [True: 0, False: 2.43k]
  ------------------
  773|  2.43k|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  810|  4.87k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (773:12): [True: 0, False: 2.43k]
  ------------------
  774|  2.43k|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE_DHE)
  ------------------
  |  |  909|  4.87k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (774:12): [True: 0, False: 2.43k]
  ------------------
  775|  2.43k|        || (nodhe && !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE))
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (775:13): [True: 0, False: 2.43k]
  |  Branch (775:22): [True: 0, False: 0]
  ------------------
  776|  2.43k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (776:12): [True: 0, False: 2.43k]
  ------------------
  777|  2.43k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (777:12): [True: 0, False: 2.43k]
  ------------------
  778|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  779|      0|        return EXT_RETURN_FAIL;
  780|      0|    }
  781|       |
  782|  2.43k|    s->ext.psk_kex_mode = TLSEXT_KEX_MODE_FLAG_KE_DHE;
  ------------------
  |  | 2224|  2.43k|#define TLSEXT_KEX_MODE_FLAG_KE_DHE 2
  ------------------
  783|  2.43k|    if (nodhe)
  ------------------
  |  Branch (783:9): [True: 0, False: 2.43k]
  ------------------
  784|      0|        s->ext.psk_kex_mode |= TLSEXT_KEX_MODE_FLAG_KE;
  ------------------
  |  | 2223|      0|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  785|  2.43k|#endif
  786|       |
  787|  2.43k|    return EXT_RETURN_SENT;
  788|  2.43k|}
tls_construct_ctos_key_share:
  854|  2.43k|{
  855|  2.43k|#ifndef OPENSSL_NO_TLS1_3
  856|  2.43k|    size_t i, num_groups = 0;
  857|  2.43k|    const uint16_t *pgroups = NULL;
  858|  2.43k|    uint16_t group_id = 0;
  859|  2.43k|    int add_only_one = 0;
  860|  2.43k|    size_t valid_keyshare = 0;
  861|       |
  862|  2.43k|#ifndef OPENSSL_NO_ECH
  863|  2.43k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.43k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  4.87k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.43k, False: 0]
  |  |  |  Branch (317:44): [True: 2.43k, False: 0]
  |  |  ------------------
  |  |  318|  2.43k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.43k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  864|  2.43k|#endif
  865|       |
  866|       |    /* key_share extension */
  867|  2.43k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
  ------------------
  |  |  911|  4.87k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (867:9): [True: 0, False: 2.43k]
  ------------------
  868|       |        /* Extension data sub-packet */
  869|  2.43k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  4.87k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (869:12): [True: 0, False: 2.43k]
  ------------------
  870|       |        /* KeyShare list sub-packet */
  871|  2.43k|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|  2.43k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (871:12): [True: 0, False: 2.43k]
  ------------------
  872|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  873|      0|        return EXT_RETURN_FAIL;
  874|      0|    }
  875|       |
  876|  2.43k|    tls1_get_requested_keyshare_groups(s, &pgroups, &num_groups);
  877|  2.43k|    if (num_groups == 1 && pgroups[0] == 0) { /* Indication that no * prefix was used */
  ------------------
  |  Branch (877:9): [True: 299, False: 2.13k]
  |  Branch (877:28): [True: 262, False: 37]
  ------------------
  878|    262|        tls1_get_supported_groups(s, &pgroups, &num_groups);
  879|    262|        add_only_one = 1;
  880|    262|    }
  881|       |
  882|       |    /* If neither the default nor the keyshares have any entry --> fatal */
  883|  2.43k|    if (num_groups == 0) {
  ------------------
  |  Branch (883:9): [True: 1, False: 2.43k]
  ------------------
  884|      1|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  885|      1|        return EXT_RETURN_FAIL;
  886|      1|    }
  887|       |
  888|       |    /* Add key shares */
  889|       |
  890|  2.43k|    if (s->s3.group_id != 0 && s->s3.tmp.pkey == NULL) {
  ------------------
  |  Branch (890:9): [True: 0, False: 2.43k]
  |  Branch (890:32): [True: 0, False: 0]
  ------------------
  891|       |        /* new, single key share */
  892|      0|        group_id = s->s3.group_id;
  893|      0|        s->s3.tmp.num_ks_pkey = 0;
  894|      0|        if (!add_key_share(s, pkt, group_id, 0)) {
  ------------------
  |  Branch (894:13): [True: 0, False: 0]
  ------------------
  895|       |            /* SSLfatal() already called */
  896|      0|            return EXT_RETURN_FAIL;
  897|      0|        }
  898|      0|        valid_keyshare++;
  899|  2.43k|    } else {
  900|  2.43k|        if (s->ext.supportedgroups == NULL) /* use default */
  ------------------
  |  Branch (900:13): [True: 0, False: 2.43k]
  ------------------
  901|      0|            add_only_one = 1;
  902|       |
  903|  7.03k|        for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (903:21): [True: 4.86k, False: 2.17k]
  ------------------
  904|  4.86k|            if (!tls_group_allowed(s, pgroups[i], SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2749|  4.86k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2730|  4.86k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (904:17): [True: 18, False: 4.84k]
  ------------------
  905|     18|                continue;
  906|  4.84k|            if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  4.84k|#define TLS1_3_VERSION 0x0304
  ------------------
                          if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  4.84k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (906:17): [True: 0, False: 4.84k]
  ------------------
  907|  4.84k|                    NULL, NULL))
  908|      0|                continue;
  909|       |
  910|  4.84k|            group_id = pgroups[i];
  911|       |
  912|  4.84k|            if (group_id == 0) {
  ------------------
  |  Branch (912:17): [True: 0, False: 4.84k]
  ------------------
  913|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  914|      0|                return EXT_RETURN_FAIL;
  915|      0|            }
  916|  4.84k|            if (!add_key_share(s, pkt, group_id, valid_keyshare)) {
  ------------------
  |  Branch (916:17): [True: 0, False: 4.84k]
  ------------------
  917|       |                /* SSLfatal() already called */
  918|      0|                return EXT_RETURN_FAIL;
  919|      0|            }
  920|  4.84k|            valid_keyshare++;
  921|  4.84k|            if (add_only_one)
  ------------------
  |  Branch (921:17): [True: 262, False: 4.58k]
  ------------------
  922|    262|                break;
  923|  4.84k|        }
  924|  2.43k|    }
  925|       |
  926|  2.43k|    if (valid_keyshare == 0) {
  ------------------
  |  Branch (926:9): [True: 4, False: 2.43k]
  ------------------
  927|       |        /* No key shares were allowed */
  928|      4|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      4|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      4|    (ERR_new(),                                                  \
  |  |  |  |  158|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      4|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  929|      4|        return EXT_RETURN_FAIL;
  930|      4|    }
  931|       |
  932|  2.43k|#ifndef OPENSSL_NO_ECH
  933|       |    /* stash inner key shares */
  934|  2.43k|    if (s->ext.ech.ch_depth == 1 && ossl_ech_stash_keyshares(s) != 1) {
  ------------------
  |  Branch (934:9): [True: 0, False: 2.43k]
  |  Branch (934:37): [True: 0, False: 0]
  ------------------
  935|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  936|      0|        return EXT_RETURN_FAIL;
  937|      0|    }
  938|  2.43k|#endif
  939|       |
  940|  2.43k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (940:9): [True: 0, False: 2.43k]
  |  Branch (940:32): [True: 0, False: 2.43k]
  ------------------
  941|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  942|      0|        return EXT_RETURN_FAIL;
  943|      0|    }
  944|  2.43k|    return EXT_RETURN_SENT;
  945|       |#else
  946|       |    return EXT_RETURN_NOT_SENT;
  947|       |#endif
  948|  2.43k|}
tls_construct_ctos_cookie:
  953|  2.43k|{
  954|  2.43k|    EXT_RETURN ret = EXT_RETURN_FAIL;
  955|       |
  956|       |    /* Should only be set if we've had an HRR */
  957|  2.43k|    if (s->ext.tls13_cookie_len == 0)
  ------------------
  |  Branch (957:9): [True: 2.43k, False: 0]
  ------------------
  958|  2.43k|        return EXT_RETURN_NOT_SENT;
  959|      0|#ifndef OPENSSL_NO_ECH
  960|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  961|      0|#endif
  962|       |
  963|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_cookie)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (963:9): [True: 0, False: 0]
  ------------------
  964|       |        /* Extension data sub-packet */
  965|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (965:12): [True: 0, False: 0]
  ------------------
  966|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->ext.tls13_cookie,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (966:12): [True: 0, False: 0]
  ------------------
  967|      0|            s->ext.tls13_cookie_len)
  968|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (968:12): [True: 0, False: 0]
  ------------------
  969|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  970|      0|        goto end;
  971|      0|    }
  972|       |
  973|      0|    ret = EXT_RETURN_SENT;
  974|      0|end:
  975|      0|    OPENSSL_free(s->ext.tls13_cookie);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  976|      0|    s->ext.tls13_cookie = NULL;
  977|      0|    s->ext.tls13_cookie_len = 0;
  978|       |
  979|      0|    return ret;
  980|      0|}
tls_construct_ctos_early_data:
  985|  2.43k|{
  986|  2.43k|#ifndef OPENSSL_NO_PSK
  987|  2.43k|    char identity[PSK_MAX_IDENTITY_LEN + 1];
  988|  2.43k|#endif /* OPENSSL_NO_PSK */
  989|  2.43k|    const unsigned char *id = NULL;
  990|  2.43k|    size_t idlen = 0;
  991|  2.43k|    SSL_SESSION *psksess = NULL;
  992|  2.43k|    SSL_SESSION *edsess = NULL;
  993|  2.43k|    const EVP_MD *handmd = NULL;
  994|  2.43k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  2.43k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  995|       |
  996|  2.43k|#ifndef OPENSSL_NO_ECH
  997|       |    /*
  998|       |     * If we're attempting ECH and processing the outer CH
  999|       |     * then we only need to check if the extension is to be
 1000|       |     * sent or not - any other processing (with side effects)
 1001|       |     * happened already for the inner CH.
 1002|       |     */
 1003|  2.43k|    if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (1003:9): [True: 0, False: 2.43k]
  |  Branch (1003:34): [True: 0, False: 0]
  ------------------
 1004|       |        /*
 1005|       |         * if we called this for inner and did send then
 1006|       |         * the following two things should be set, if so,
 1007|       |         * then send again in the outer CH.
 1008|       |         */
 1009|      0|        if (s->ext.early_data == SSL_EARLY_DATA_REJECTED
  ------------------
  |  | 2073|      0|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  |  Branch (1009:13): [True: 0, False: 0]
  ------------------
 1010|      0|            && s->ext.early_data_ok == 1) {
  ------------------
  |  Branch (1010:16): [True: 0, False: 0]
  ------------------
 1011|      0|            if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1011:17): [True: 0, False: 0]
  ------------------
 1012|      0|                || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1012:20): [True: 0, False: 0]
  ------------------
 1013|      0|                || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1013:20): [True: 0, False: 0]
  ------------------
 1014|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1015|      0|                return EXT_RETURN_FAIL;
 1016|      0|            }
 1017|      0|            return EXT_RETURN_SENT;
 1018|      0|        } else {
 1019|      0|            return EXT_RETURN_NOT_SENT;
 1020|      0|        }
 1021|      0|    }
 1022|  2.43k|#endif
 1023|  2.43k|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (1023:9): [True: 0, False: 2.43k]
  ------------------
 1024|      0|        handmd = ssl_handshake_md(s);
 1025|       |
 1026|  2.43k|    if (s->psk_use_session_cb != NULL
  ------------------
  |  Branch (1026:9): [True: 0, False: 2.43k]
  ------------------
 1027|      0|        && (!s->psk_use_session_cb(ussl, handmd, &id, &idlen, &psksess)
  ------------------
  |  Branch (1027:13): [True: 0, False: 0]
  ------------------
 1028|      0|            || (psksess != NULL
  ------------------
  |  Branch (1028:17): [True: 0, False: 0]
  ------------------
 1029|      0|                && psksess->ssl_version != TLS1_3_VERSION))) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1029:20): [True: 0, False: 0]
  ------------------
 1030|      0|        SSL_SESSION_free(psksess);
 1031|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1032|      0|        return EXT_RETURN_FAIL;
 1033|      0|    }
 1034|       |
 1035|  2.43k|#ifndef OPENSSL_NO_PSK
 1036|  2.43k|    if (psksess == NULL && s->psk_client_callback != NULL) {
  ------------------
  |  Branch (1036:9): [True: 2.43k, False: 0]
  |  Branch (1036:28): [True: 0, False: 2.43k]
  ------------------
 1037|      0|        unsigned char psk[PSK_MAX_PSK_LEN];
 1038|      0|        size_t psklen = 0;
 1039|       |
 1040|      0|        memset(identity, 0, sizeof(identity));
 1041|      0|        psklen = s->psk_client_callback(ussl, NULL,
 1042|      0|            identity, sizeof(identity) - 1,
 1043|      0|            psk, sizeof(psk));
 1044|       |
 1045|      0|        if (psklen > PSK_MAX_PSK_LEN) {
  ------------------
  |  |  885|      0|#define PSK_MAX_PSK_LEN 512
  ------------------
  |  Branch (1045:13): [True: 0, False: 0]
  ------------------
 1046|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1047|      0|            return EXT_RETURN_FAIL;
 1048|      0|        } else if (psklen > 0) {
  ------------------
  |  Branch (1048:20): [True: 0, False: 0]
  ------------------
 1049|      0|            const unsigned char tls13_aes128gcmsha256_id[] = { 0x13, 0x01 };
 1050|      0|            const SSL_CIPHER *cipher;
 1051|       |
 1052|      0|            idlen = strlen(identity);
 1053|      0|            if (idlen > PSK_MAX_IDENTITY_LEN) {
  ------------------
  |  |  884|      0|#define PSK_MAX_IDENTITY_LEN 256
  ------------------
  |  Branch (1053:17): [True: 0, False: 0]
  ------------------
 1054|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1055|      0|                return EXT_RETURN_FAIL;
 1056|      0|            }
 1057|      0|            id = (unsigned char *)identity;
 1058|       |
 1059|       |            /*
 1060|       |             * We found a PSK using an old style callback. We don't know
 1061|       |             * the digest so we default to SHA256 as per the TLSv1.3 spec
 1062|       |             */
 1063|      0|            cipher = SSL_CIPHER_find(SSL_CONNECTION_GET_SSL(s),
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1064|      0|                tls13_aes128gcmsha256_id);
 1065|      0|            if (cipher == NULL) {
  ------------------
  |  Branch (1065:17): [True: 0, False: 0]
  ------------------
 1066|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1067|      0|                return EXT_RETURN_FAIL;
 1068|      0|            }
 1069|       |
 1070|      0|            psksess = SSL_SESSION_new();
 1071|      0|            if (psksess == NULL
  ------------------
  |  Branch (1071:17): [True: 0, False: 0]
  ------------------
 1072|      0|                || !SSL_SESSION_set1_master_key(psksess, psk, psklen)
  ------------------
  |  Branch (1072:20): [True: 0, False: 0]
  ------------------
 1073|      0|                || !SSL_SESSION_set_cipher(psksess, cipher)
  ------------------
  |  Branch (1073:20): [True: 0, False: 0]
  ------------------
 1074|      0|                || !SSL_SESSION_set_protocol_version(psksess, TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1074:20): [True: 0, False: 0]
  ------------------
 1075|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1076|      0|                OPENSSL_cleanse(psk, psklen);
 1077|      0|                return EXT_RETURN_FAIL;
 1078|      0|            }
 1079|      0|            OPENSSL_cleanse(psk, psklen);
 1080|      0|        }
 1081|      0|    }
 1082|  2.43k|#endif /* OPENSSL_NO_PSK */
 1083|       |
 1084|  2.43k|    SSL_SESSION_free(s->psksession);
 1085|  2.43k|    s->psksession = psksess;
 1086|  2.43k|    if (psksess != NULL) {
  ------------------
  |  Branch (1086:9): [True: 0, False: 2.43k]
  ------------------
 1087|      0|        OPENSSL_free(s->psksession_id);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1088|      0|        s->psksession_id = OPENSSL_memdup(id, idlen);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1089|      0|        if (s->psksession_id == NULL) {
  ------------------
  |  Branch (1089:13): [True: 0, False: 0]
  ------------------
 1090|      0|            s->psksession_id_len = 0;
 1091|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1092|      0|            return EXT_RETURN_FAIL;
 1093|      0|        }
 1094|      0|        s->psksession_id_len = idlen;
 1095|      0|    }
 1096|       |
 1097|  2.43k|    if (s->early_data_state != SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (1097:9): [True: 2.43k, False: 0]
  ------------------
 1098|      0|        || (s->session->ext.max_early_data == 0
  ------------------
  |  Branch (1098:13): [True: 0, False: 0]
  ------------------
 1099|  2.43k|            && (psksess == NULL || psksess->ext.max_early_data == 0))) {
  ------------------
  |  Branch (1099:17): [True: 0, False: 0]
  |  Branch (1099:36): [True: 0, False: 0]
  ------------------
 1100|  2.43k|        s->max_early_data = 0;
 1101|  2.43k|        return EXT_RETURN_NOT_SENT;
 1102|  2.43k|    }
 1103|      0|    edsess = s->session->ext.max_early_data != 0 ? s->session : psksess;
  ------------------
  |  Branch (1103:14): [True: 0, False: 0]
  ------------------
 1104|      0|    s->max_early_data = edsess->ext.max_early_data;
 1105|       |
 1106|      0|    if (edsess->ext.hostname != NULL) {
  ------------------
  |  Branch (1106:9): [True: 0, False: 0]
  ------------------
 1107|      0|        if (s->ext.hostname == NULL
  ------------------
  |  Branch (1107:13): [True: 0, False: 0]
  ------------------
 1108|      0|            || (s->ext.hostname != NULL
  ------------------
  |  Branch (1108:17): [True: 0, False: 0]
  ------------------
 1109|      0|                && strcmp(s->ext.hostname, edsess->ext.hostname) != 0)) {
  ------------------
  |  Branch (1109:20): [True: 0, False: 0]
  ------------------
 1110|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1111|      0|                SSL_R_INCONSISTENT_EARLY_DATA_SNI);
 1112|      0|            return EXT_RETURN_FAIL;
 1113|      0|        }
 1114|      0|    }
 1115|       |
 1116|      0|    if ((s->ext.alpn == NULL && edsess->ext.alpn_selected != NULL)) {
  ------------------
  |  Branch (1116:10): [True: 0, False: 0]
  |  Branch (1116:33): [True: 0, False: 0]
  ------------------
 1117|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1118|      0|        return EXT_RETURN_FAIL;
 1119|      0|    }
 1120|       |
 1121|       |    /*
 1122|       |     * Verify that we are offering an ALPN protocol consistent with the early
 1123|       |     * data.
 1124|       |     */
 1125|      0|    if (edsess->ext.alpn_selected != NULL) {
  ------------------
  |  Branch (1125:9): [True: 0, False: 0]
  ------------------
 1126|      0|        PACKET prots, alpnpkt;
 1127|      0|        int found = 0;
 1128|       |
 1129|      0|        if (!PACKET_buf_init(&prots, s->ext.alpn, s->ext.alpn_len)) {
  ------------------
  |  Branch (1129:13): [True: 0, False: 0]
  ------------------
 1130|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1131|      0|            return EXT_RETURN_FAIL;
 1132|      0|        }
 1133|      0|        while (PACKET_get_length_prefixed_1(&prots, &alpnpkt)) {
  ------------------
  |  Branch (1133:16): [True: 0, False: 0]
  ------------------
 1134|      0|            if (PACKET_equal(&alpnpkt, edsess->ext.alpn_selected,
  ------------------
  |  Branch (1134:17): [True: 0, False: 0]
  ------------------
 1135|      0|                    edsess->ext.alpn_selected_len)) {
 1136|      0|                found = 1;
 1137|      0|                break;
 1138|      0|            }
 1139|      0|        }
 1140|      0|        if (!found) {
  ------------------
  |  Branch (1140:13): [True: 0, False: 0]
  ------------------
 1141|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1142|      0|                SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
 1143|      0|            return EXT_RETURN_FAIL;
 1144|      0|        }
 1145|      0|    }
 1146|       |
 1147|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1147:9): [True: 0, False: 0]
  ------------------
 1148|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1148:12): [True: 0, False: 0]
  ------------------
 1149|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1149:12): [True: 0, False: 0]
  ------------------
 1150|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1151|      0|        return EXT_RETURN_FAIL;
 1152|      0|    }
 1153|       |
 1154|       |    /*
 1155|       |     * We set this to rejected here. Later, if the server acknowledges the
 1156|       |     * extension, we set it to accepted.
 1157|       |     */
 1158|      0|    s->ext.early_data = SSL_EARLY_DATA_REJECTED;
  ------------------
  |  | 2073|      0|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
 1159|      0|    s->ext.early_data_ok = 1;
 1160|       |
 1161|      0|    return EXT_RETURN_SENT;
 1162|      0|}
tls_construct_ctos_padding:
 1184|  2.48k|{
 1185|  2.48k|    unsigned char *padbytes;
 1186|  2.48k|    size_t hlen;
 1187|       |
 1188|  2.48k|    if ((s->options & SSL_OP_TLSEXT_PADDING) == 0)
  ------------------
  |  |  364|  2.48k|#define SSL_OP_TLSEXT_PADDING SSL_OP_BIT(4)
  |  |  ------------------
  |  |  |  |  351|  2.48k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1188:9): [True: 0, False: 2.48k]
  ------------------
 1189|      0|        return EXT_RETURN_NOT_SENT;
 1190|  2.48k|#ifndef OPENSSL_NO_ECH
 1191|  2.48k|    ECH_SAME_EXT(s, context, pkt);
  ------------------
  |  |  317|  2.48k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  4.96k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.48k, False: 0]
  |  |  |  Branch (317:44): [True: 2.48k, False: 0]
  |  |  ------------------
  |  |  318|  2.48k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.48k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 1192|  2.48k|#endif
 1193|       |
 1194|       |    /*
 1195|       |     * Add padding to workaround bugs in F5 terminators. See RFC7685.
 1196|       |     * This code calculates the length of all extensions added so far but
 1197|       |     * excludes the PSK extension (because that MUST be written last). Therefore
 1198|       |     * this extension MUST always appear second to last.
 1199|       |     */
 1200|  2.48k|    if (!WPACKET_get_total_written(pkt, &hlen)) {
  ------------------
  |  Branch (1200:9): [True: 0, False: 2.48k]
  ------------------
 1201|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1202|      0|        return EXT_RETURN_FAIL;
 1203|      0|    }
 1204|       |
 1205|       |    /*
 1206|       |     * If we're going to send a PSK then that will be written out after this
 1207|       |     * extension, so we need to calculate how long it is going to be.
 1208|       |     */
 1209|  2.48k|    if (s->session->ssl_version == TLS1_3_VERSION
  ------------------
  |  |   27|  4.96k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1209:9): [True: 2.43k, False: 49]
  ------------------
 1210|  2.43k|        && s->session->ext.ticklen != 0
  ------------------
  |  Branch (1210:12): [True: 0, False: 2.43k]
  ------------------
 1211|      0|        && s->session->cipher != NULL) {
  ------------------
  |  Branch (1211:12): [True: 0, False: 0]
  ------------------
 1212|      0|        const EVP_MD *md = ssl_md(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1213|      0|            s->session->cipher->algorithm2);
 1214|       |
 1215|      0|        if (md != NULL) {
  ------------------
  |  Branch (1215:13): [True: 0, False: 0]
  ------------------
 1216|       |            /*
 1217|       |             * Add the fixed PSK overhead, the identity length and the binder
 1218|       |             * length.
 1219|       |             */
 1220|      0|            int md_size = EVP_MD_get_size(md);
 1221|       |
 1222|      0|            if (md_size <= 0)
  ------------------
  |  Branch (1222:17): [True: 0, False: 0]
  ------------------
 1223|      0|                return EXT_RETURN_FAIL;
 1224|      0|            hlen += PSK_PRE_BINDER_OVERHEAD + s->session->ext.ticklen
  ------------------
  |  | 1179|      0|#define PSK_PRE_BINDER_OVERHEAD (2 + 2 + 2 + 2 + 4 + 2 + 1)
  ------------------
 1225|      0|                + md_size;
 1226|      0|        }
 1227|      0|    }
 1228|       |
 1229|  2.48k|    if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  | 1164|  4.96k|#define F5_WORKAROUND_MIN_MSG_LEN 0xff
  ------------------
                  if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  | 1165|  2.44k|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
  |  Branch (1229:9): [True: 2.44k, False: 39]
  |  Branch (1229:45): [True: 279, False: 2.16k]
  ------------------
 1230|       |        /* Calculate the amount of padding we need to add */
 1231|    279|        hlen = F5_WORKAROUND_MAX_MSG_LEN - hlen;
  ------------------
  |  | 1165|    279|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
 1232|       |
 1233|       |        /*
 1234|       |         * Take off the size of extension header itself (2 bytes for type and
 1235|       |         * 2 bytes for length bytes), but ensure that the extension is at least
 1236|       |         * 1 byte long so as not to have an empty extension last (WebSphere 7.x,
 1237|       |         * 8.x are intolerant of that condition)
 1238|       |         */
 1239|    279|        if (hlen > 4)
  ------------------
  |  Branch (1239:13): [True: 279, False: 0]
  ------------------
 1240|    279|            hlen -= 4;
 1241|      0|        else
 1242|      0|            hlen = 1;
 1243|       |
 1244|    279|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_padding)
  ------------------
  |  |  911|    558|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1244:13): [True: 0, False: 279]
  ------------------
 1245|    279|            || !WPACKET_sub_allocate_bytes_u16(pkt, hlen, &padbytes)) {
  ------------------
  |  |  851|    279|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (1245:16): [True: 0, False: 279]
  ------------------
 1246|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1247|      0|            return EXT_RETURN_FAIL;
 1248|      0|        }
 1249|    279|        memset(padbytes, 0, hlen);
 1250|    279|    }
 1251|       |
 1252|  2.48k|    return EXT_RETURN_SENT;
 1253|  2.48k|}
tls_construct_ctos_psk:
 1261|  2.43k|{
 1262|  2.43k|#ifndef OPENSSL_NO_TLS1_3
 1263|  2.43k|    uint32_t agesec, agems = 0;
 1264|  2.43k|    size_t binderoffset, msglen;
 1265|  2.43k|    int reshashsize = 0, pskhashsize = 0;
 1266|  2.43k|    unsigned char *resbinder = NULL, *pskbinder = NULL, *msgstart = NULL;
 1267|  2.43k|    const EVP_MD *handmd = NULL, *mdres = NULL, *mdpsk = NULL;
 1268|  2.43k|    int dores = 0;
 1269|  2.43k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.43k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1270|  2.43k|    OSSL_TIME t;
 1271|       |
 1272|  2.43k|    s->ext.tick_identity = 0;
 1273|       |
 1274|       |    /*
 1275|       |     * Note: At this stage of the code we only support adding a single
 1276|       |     * resumption PSK. If we add support for multiple PSKs then the length
 1277|       |     * calculations in the padding extension will need to be adjusted.
 1278|       |     */
 1279|       |
 1280|       |    /*
 1281|       |     * If this is an incompatible or new session then we have nothing to resume
 1282|       |     * so don't add this extension.
 1283|       |     */
 1284|  2.43k|    if (s->session->ssl_version != TLS1_3_VERSION
  ------------------
  |  |   27|  4.86k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1284:9): [True: 0, False: 2.43k]
  ------------------
 1285|  2.43k|        || (s->session->ext.ticklen == 0 && s->psksession == NULL))
  ------------------
  |  Branch (1285:13): [True: 2.43k, False: 0]
  |  Branch (1285:45): [True: 2.43k, False: 0]
  ------------------
 1286|  2.43k|        return EXT_RETURN_NOT_SENT;
 1287|       |
 1288|      0|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (1288:9): [True: 0, False: 0]
  ------------------
 1289|      0|        handmd = ssl_handshake_md(s);
 1290|       |
 1291|      0|    if (s->session->ext.ticklen != 0) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 0]
  ------------------
 1292|       |        /* Get the digest associated with the ciphersuite in the session */
 1293|      0|        if (s->session->cipher == NULL) {
  ------------------
  |  Branch (1293:13): [True: 0, False: 0]
  ------------------
 1294|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1295|      0|            return EXT_RETURN_FAIL;
 1296|      0|        }
 1297|      0|        mdres = ssl_md(sctx, s->session->cipher->algorithm2);
 1298|      0|        if (mdres == NULL) {
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  ------------------
 1299|       |            /*
 1300|       |             * Don't recognize this cipher so we can't use the session.
 1301|       |             * Ignore it
 1302|       |             */
 1303|      0|            goto dopsksess;
 1304|      0|        }
 1305|       |
 1306|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdres != handmd) {
  ------------------
  |  Branch (1306:13): [True: 0, False: 0]
  |  Branch (1306:58): [True: 0, False: 0]
  ------------------
 1307|       |            /*
 1308|       |             * Selected ciphersuite hash does not match the hash for the session
 1309|       |             * so we can't use it.
 1310|       |             */
 1311|      0|            goto dopsksess;
 1312|      0|        }
 1313|       |
 1314|      0|#ifndef OPENSSL_NO_ECH
 1315|       |        /*
 1316|       |         * When doing ECH, we get here twice (for inner then outer). The
 1317|       |         * 2nd time (for outer) we can skip some checks as we know how
 1318|       |         * those went last time.
 1319|       |         */
 1320|      0|        if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (1320:13): [True: 0, False: 0]
  |  Branch (1320:38): [True: 0, False: 0]
  ------------------
 1321|      0|            s->ext.tick_identity = s->ext.ech.tick_identity;
 1322|      0|            dores = (s->ext.tick_identity > 0);
 1323|      0|            goto dopsksess;
 1324|      0|        }
 1325|      0|#endif
 1326|       |
 1327|       |        /*
 1328|       |         * Technically the C standard just says time() returns a time_t and says
 1329|       |         * nothing about the encoding of that type. In practice most
 1330|       |         * implementations follow POSIX which holds it as an integral type in
 1331|       |         * seconds since epoch. We've already made the assumption that we can do
 1332|       |         * this in multiple places in the code, so portability shouldn't be an
 1333|       |         * issue.
 1334|       |         */
 1335|      0|        t = ossl_time_subtract(ossl_time_now(), s->session->time);
 1336|      0|        agesec = (uint32_t)ossl_time2seconds(t);
  ------------------
  |  |   43|      0|#define ossl_time2seconds(t) (ossl_time2ticks(t) / OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|      0|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
 1337|       |
 1338|       |        /*
 1339|       |         * We calculate the age in seconds but the server may work in ms. Due to
 1340|       |         * rounding errors we could overestimate the age by up to 1s. It is
 1341|       |         * better to underestimate it. Otherwise, if the RTT is very short, when
 1342|       |         * the server calculates the age reported by the client it could be
 1343|       |         * bigger than the age calculated on the server - which should never
 1344|       |         * happen.
 1345|       |         */
 1346|      0|        if (agesec > 0)
  ------------------
  |  Branch (1346:13): [True: 0, False: 0]
  ------------------
 1347|      0|            agesec--;
 1348|       |
 1349|      0|        if (s->session->ext.tick_lifetime_hint < agesec) {
  ------------------
  |  Branch (1349:13): [True: 0, False: 0]
  ------------------
 1350|       |            /* Ticket is too old. Ignore it. */
 1351|      0|            goto dopsksess;
 1352|      0|        }
 1353|       |
 1354|       |        /*
 1355|       |         * Calculate age in ms. We're just doing it to nearest second. Should be
 1356|       |         * good enough.
 1357|       |         */
 1358|      0|        agems = agesec * (uint32_t)1000;
 1359|       |
 1360|      0|        if (agesec != 0 && agems / (uint32_t)1000 != agesec) {
  ------------------
  |  Branch (1360:13): [True: 0, False: 0]
  |  Branch (1360:28): [True: 0, False: 0]
  ------------------
 1361|       |            /*
 1362|       |             * Overflow. Shouldn't happen unless this is a *really* old session.
 1363|       |             * If so we just ignore it.
 1364|       |             */
 1365|      0|            goto dopsksess;
 1366|      0|        }
 1367|       |
 1368|       |        /*
 1369|       |         * Obfuscate the age. Overflow here is fine, this addition is supposed
 1370|       |         * to be mod 2^32.
 1371|       |         */
 1372|      0|        agems += s->session->ext.tick_age_add;
 1373|       |
 1374|      0|        reshashsize = EVP_MD_get_size(mdres);
 1375|      0|        if (reshashsize <= 0)
  ------------------
  |  Branch (1375:13): [True: 0, False: 0]
  ------------------
 1376|      0|            goto dopsksess;
 1377|      0|        s->ext.tick_identity++;
 1378|      0|#ifndef OPENSSL_NO_ECH
 1379|       |        /* stash this for re-use in outer CH */
 1380|      0|        if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 1)
  ------------------
  |  Branch (1380:13): [True: 0, False: 0]
  |  Branch (1380:38): [True: 0, False: 0]
  ------------------
 1381|      0|            s->ext.ech.tick_identity = s->ext.tick_identity;
 1382|      0|#endif
 1383|      0|        dores = 1;
 1384|      0|    }
 1385|       |
 1386|      0|dopsksess:
 1387|      0|    if (!dores && s->psksession == NULL)
  ------------------
  |  Branch (1387:9): [True: 0, False: 0]
  |  Branch (1387:19): [True: 0, False: 0]
  ------------------
 1388|      0|        return EXT_RETURN_NOT_SENT;
 1389|       |
 1390|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1390:9): [True: 0, False: 0]
  ------------------
 1391|      0|        mdpsk = ssl_md(sctx, s->psksession->cipher->algorithm2);
 1392|      0|        if (mdpsk == NULL) {
  ------------------
  |  Branch (1392:13): [True: 0, False: 0]
  ------------------
 1393|       |            /*
 1394|       |             * Don't recognize this cipher so we can't use the session.
 1395|       |             * If this happens it's an application bug.
 1396|       |             */
 1397|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1398|      0|            return EXT_RETURN_FAIL;
 1399|      0|        }
 1400|       |
 1401|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdpsk != handmd) {
  ------------------
  |  Branch (1401:13): [True: 0, False: 0]
  |  Branch (1401:58): [True: 0, False: 0]
  ------------------
 1402|       |            /*
 1403|       |             * Selected ciphersuite hash does not match the hash for the PSK
 1404|       |             * session. This is an application bug.
 1405|       |             */
 1406|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1407|      0|            return EXT_RETURN_FAIL;
 1408|      0|        }
 1409|       |
 1410|      0|        pskhashsize = EVP_MD_get_size(mdpsk);
 1411|      0|        if (pskhashsize <= 0) {
  ------------------
  |  Branch (1411:13): [True: 0, False: 0]
  ------------------
 1412|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1413|      0|            return EXT_RETURN_FAIL;
 1414|      0|        }
 1415|      0|    }
 1416|       |
 1417|       |    /* Create the extension, but skip over the binder for now */
 1418|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1418:9): [True: 0, False: 0]
  ------------------
 1419|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1419:12): [True: 0, False: 0]
  ------------------
 1420|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1420:12): [True: 0, False: 0]
  ------------------
 1421|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1422|      0|        return EXT_RETURN_FAIL;
 1423|      0|    }
 1424|       |
 1425|      0|#ifndef OPENSSL_NO_ECH
 1426|       |    /*
 1427|       |     * For ECH if we're processing the outer CH and the inner CH
 1428|       |     * has a PSK, then we want to send a GREASE PSK in the outer.
 1429|       |     * We'll do that by just replacing the ticket value itself
 1430|       |     * with random values of the same length.
 1431|       |     */
 1432|      0|    if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (1432:9): [True: 0, False: 0]
  |  Branch (1432:34): [True: 0, False: 0]
  ------------------
 1433|      0|        unsigned char *rndbuf = NULL, *rndbufp = NULL;
 1434|      0|        size_t totalrndsize = 0;
 1435|       |
 1436|      0|        totalrndsize = s->session->ext.ticklen
 1437|      0|            + sizeof(agems)
 1438|      0|            + s->psksession_id_len
 1439|      0|            + reshashsize
 1440|      0|            + pskhashsize;
 1441|      0|        rndbuf = OPENSSL_malloc(totalrndsize);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1442|      0|        if (rndbuf == NULL) {
  ------------------
  |  Branch (1442:13): [True: 0, False: 0]
  ------------------
 1443|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1444|      0|            return EXT_RETURN_FAIL;
 1445|      0|        }
 1446|       |        /* for outer CH allocate a similar sized random value */
 1447|      0|        if (RAND_bytes_ex(sctx->libctx, rndbuf, totalrndsize, 0) <= 0) {
  ------------------
  |  Branch (1447:13): [True: 0, False: 0]
  ------------------
 1448|      0|            OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1449|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1450|      0|            return EXT_RETURN_FAIL;
 1451|      0|        }
 1452|       |        /* set agems from random buffer */
 1453|      0|        rndbufp = rndbuf;
 1454|      0|        memcpy(&agems, rndbufp, sizeof(agems));
 1455|      0|        rndbufp += sizeof(agems);
 1456|      0|        if (dores != 0) {
  ------------------
  |  Branch (1456:13): [True: 0, False: 0]
  ------------------
 1457|      0|            if (!WPACKET_sub_memcpy_u16(pkt, rndbufp,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1457:17): [True: 0, False: 0]
  ------------------
 1458|      0|                    s->session->ext.ticklen)
 1459|      0|                || !WPACKET_put_bytes_u32(pkt, agems)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1459:20): [True: 0, False: 0]
  ------------------
 1460|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1461|      0|                OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1462|      0|                return EXT_RETURN_FAIL;
 1463|      0|            }
 1464|      0|            rndbufp += s->session->ext.ticklen;
 1465|      0|        }
 1466|      0|        if (s->psksession != NULL) {
  ------------------
  |  Branch (1466:13): [True: 0, False: 0]
  ------------------
 1467|      0|            if (!WPACKET_sub_memcpy_u16(pkt, rndbufp, s->psksession_id_len)
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1467:17): [True: 0, False: 0]
  ------------------
 1468|      0|                || !WPACKET_put_bytes_u32(pkt, 0)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1468:20): [True: 0, False: 0]
  ------------------
 1469|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1470|      0|                OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1471|      0|                return EXT_RETURN_FAIL;
 1472|      0|            }
 1473|      0|            rndbufp += s->psksession_id_len;
 1474|      0|        }
 1475|      0|        if (!WPACKET_close(pkt)
  ------------------
  |  Branch (1475:13): [True: 0, False: 0]
  ------------------
 1476|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1476:16): [True: 0, False: 0]
  ------------------
 1477|      0|            || (dores == 1
  ------------------
  |  Branch (1477:17): [True: 0, False: 0]
  ------------------
 1478|      0|                && !WPACKET_sub_memcpy_u8(pkt, rndbufp, reshashsize))
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1478:20): [True: 0, False: 0]
  ------------------
 1479|      0|            || (s->psksession != NULL
  ------------------
  |  Branch (1479:17): [True: 0, False: 0]
  ------------------
 1480|      0|                && !WPACKET_sub_memcpy_u8(pkt, rndbufp, pskhashsize))
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1480:20): [True: 0, False: 0]
  ------------------
 1481|      0|            || !WPACKET_close(pkt)
  ------------------
  |  Branch (1481:16): [True: 0, False: 0]
  ------------------
 1482|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1482:16): [True: 0, False: 0]
  ------------------
 1483|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1484|      0|            OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1485|      0|            return EXT_RETURN_FAIL;
 1486|      0|        }
 1487|      0|        OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1488|      0|        return EXT_RETURN_SENT;
 1489|      0|    }
 1490|      0|#endif /* OPENSSL_NO_ECH */
 1491|      0|    if (dores) {
  ------------------
  |  Branch (1491:9): [True: 0, False: 0]
  ------------------
 1492|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1492:13): [True: 0, False: 0]
  ------------------
 1493|      0|                s->session->ext.ticklen)
 1494|      0|            || !WPACKET_put_bytes_u32(pkt, agems)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1494:16): [True: 0, False: 0]
  ------------------
 1495|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1496|      0|            return EXT_RETURN_FAIL;
 1497|      0|        }
 1498|      0|    }
 1499|       |
 1500|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1500:9): [True: 0, False: 0]
  ------------------
 1501|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->psksession_id,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1501:13): [True: 0, False: 0]
  ------------------
 1502|      0|                s->psksession_id_len)
 1503|      0|            || !WPACKET_put_bytes_u32(pkt, 0)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1503:16): [True: 0, False: 0]
  ------------------
 1504|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1505|      0|            return EXT_RETURN_FAIL;
 1506|      0|        }
 1507|      0|        s->ext.tick_identity++;
 1508|      0|    }
 1509|       |
 1510|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (1510:9): [True: 0, False: 0]
  ------------------
 1511|      0|        || !WPACKET_get_total_written(pkt, &binderoffset)
  ------------------
  |  Branch (1511:12): [True: 0, False: 0]
  ------------------
 1512|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1512:12): [True: 0, False: 0]
  ------------------
 1513|      0|        || (dores
  ------------------
  |  Branch (1513:13): [True: 0, False: 0]
  ------------------
 1514|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, reshashsize, &resbinder))
  ------------------
  |  |  849|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1514:16): [True: 0, False: 0]
  ------------------
 1515|      0|        || (s->psksession != NULL
  ------------------
  |  Branch (1515:13): [True: 0, False: 0]
  ------------------
 1516|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, pskhashsize, &pskbinder))
  ------------------
  |  |  849|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1516:16): [True: 0, False: 0]
  ------------------
 1517|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1517:12): [True: 0, False: 0]
  ------------------
 1518|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1518:12): [True: 0, False: 0]
  ------------------
 1519|      0|        || !WPACKET_get_total_written(pkt, &msglen)
  ------------------
  |  Branch (1519:12): [True: 0, False: 0]
  ------------------
 1520|       |        /*
 1521|       |         * We need to fill in all the sub-packet lengths now so we can
 1522|       |         * calculate the HMAC of the message up to the binders
 1523|       |         */
 1524|      0|        || !WPACKET_fill_lengths(pkt)) {
  ------------------
  |  Branch (1524:12): [True: 0, False: 0]
  ------------------
 1525|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1526|      0|        return EXT_RETURN_FAIL;
 1527|      0|    }
 1528|       |
 1529|      0|    msgstart = WPACKET_get_curr(pkt) - msglen;
 1530|       |
 1531|      0|    if (dores
  ------------------
  |  Branch (1531:9): [True: 0, False: 0]
  ------------------
 1532|      0|        && tls_psk_do_binder(s, mdres, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1532:12): [True: 0, False: 0]
  ------------------
 1533|      0|               resbinder, s->session, 1, 0)
 1534|      0|            != 1) {
 1535|       |        /* SSLfatal() already called */
 1536|      0|        return EXT_RETURN_FAIL;
 1537|      0|    }
 1538|       |
 1539|      0|    if (s->psksession != NULL
  ------------------
  |  Branch (1539:9): [True: 0, False: 0]
  ------------------
 1540|      0|        && tls_psk_do_binder(s, mdpsk, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1540:12): [True: 0, False: 0]
  ------------------
 1541|      0|               pskbinder, s->psksession, 1, 1)
 1542|      0|            != 1) {
 1543|       |        /* SSLfatal() already called */
 1544|      0|        return EXT_RETURN_FAIL;
 1545|      0|    }
 1546|       |
 1547|      0|    return EXT_RETURN_SENT;
 1548|       |#else
 1549|       |    return EXT_RETURN_NOT_SENT;
 1550|       |#endif
 1551|      0|}
tls_construct_ctos_post_handshake_auth:
 1557|  2.43k|{
 1558|  2.43k|#ifndef OPENSSL_NO_TLS1_3
 1559|  2.43k|    if (!s->pha_enabled)
  ------------------
  |  Branch (1559:9): [True: 0, False: 2.43k]
  ------------------
 1560|      0|        return EXT_RETURN_NOT_SENT;
 1561|  2.43k|#ifndef OPENSSL_NO_ECH
 1562|  2.43k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  2.43k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  4.87k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 2.43k, False: 0]
  |  |  |  Branch (317:44): [True: 2.43k, False: 0]
  |  |  ------------------
  |  |  318|  2.43k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 2.43k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 1563|  2.43k|#endif
 1564|       |
 1565|       |    /* construct extension - 0 length, no contents */
 1566|  2.43k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_post_handshake_auth)
  ------------------
  |  |  911|  4.87k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1566:9): [True: 0, False: 2.43k]
  ------------------
 1567|  2.43k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  4.87k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1567:12): [True: 0, False: 2.43k]
  ------------------
 1568|  2.43k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1568:12): [True: 0, False: 2.43k]
  ------------------
 1569|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1570|      0|        return EXT_RETURN_FAIL;
 1571|      0|    }
 1572|       |
 1573|  2.43k|    s->post_handshake_auth = SSL_PHA_EXT_SENT;
 1574|       |
 1575|  2.43k|    return EXT_RETURN_SENT;
 1576|       |#else
 1577|       |    return EXT_RETURN_NOT_SENT;
 1578|       |#endif
 1579|  2.43k|}
tls_construct_ctos_client_cert_type:
 2454|  2.48k|{
 2455|  2.48k|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  2.48k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2456|  2.48k|    if (sc->client_cert_type == NULL)
  ------------------
  |  Branch (2456:9): [True: 2.48k, False: 0]
  ------------------
 2457|  2.48k|        return EXT_RETURN_NOT_SENT;
 2458|      0|#ifndef OPENSSL_NO_ECH
 2459|      0|    ECH_SAME_EXT(sc, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 2460|      0|#endif
 2461|       |
 2462|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_client_cert_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2462:9): [True: 0, False: 0]
  ------------------
 2463|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2463:12): [True: 0, False: 0]
  ------------------
 2464|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->client_cert_type, sc->client_cert_type_len)
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2464:12): [True: 0, False: 0]
  ------------------
 2465|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2465:12): [True: 0, False: 0]
  ------------------
 2466|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2467|      0|        return EXT_RETURN_FAIL;
 2468|      0|    }
 2469|      0|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  376|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2470|      0|    return EXT_RETURN_SENT;
 2471|      0|}
tls_construct_ctos_server_cert_type:
 2509|  2.48k|{
 2510|  2.48k|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  2.48k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2511|  2.48k|    if (sc->server_cert_type == NULL)
  ------------------
  |  Branch (2511:9): [True: 2.48k, False: 0]
  ------------------
 2512|  2.48k|        return EXT_RETURN_NOT_SENT;
 2513|      0|#ifndef OPENSSL_NO_ECH
 2514|      0|    ECH_SAME_EXT(sc, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 2515|      0|#endif
 2516|       |
 2517|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_cert_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2517:9): [True: 0, False: 0]
  ------------------
 2518|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2518:12): [True: 0, False: 0]
  ------------------
 2519|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->server_cert_type, sc->server_cert_type_len)
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2519:12): [True: 0, False: 0]
  ------------------
 2520|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2520:12): [True: 0, False: 0]
  ------------------
 2521|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2522|      0|        return EXT_RETURN_FAIL;
 2523|      0|    }
 2524|      0|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  376|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2525|      0|    return EXT_RETURN_SENT;
 2526|      0|}
tls_construct_ctos_ech:
 2565|  2.43k|{
 2566|  2.43k|    int rv = 0, hpke_mode = OSSL_HPKE_MODE_BASE;
  ------------------
  |  |   18|  2.43k|#define OSSL_HPKE_MODE_BASE 0 /* Base mode  */
  ------------------
 2567|  2.43k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.43k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2568|  2.43k|    OSSL_ECHSTORE_ENTRY *ee = NULL;
 2569|  2.43k|    OSSL_HPKE_SUITE hpke_suite = OSSL_HPKE_SUITE_DEFAULT;
  ------------------
  |  |   92|  2.43k|    {                                 \
  |  |   93|  2.43k|        OSSL_HPKE_KEM_ID_X25519,      \
  |  |  ------------------
  |  |  |  |   41|  2.43k|#define OSSL_HPKE_KEM_ID_X25519 0x0020 /* Curve25519 */
  |  |  ------------------
  |  |   94|  2.43k|        OSSL_HPKE_KDF_ID_HKDF_SHA256, \
  |  |  ------------------
  |  |  |  |   45|  2.43k|#define OSSL_HPKE_KDF_ID_HKDF_SHA256 0x0001 /* HKDF-SHA256 */
  |  |  ------------------
  |  |   95|  2.43k|        OSSL_HPKE_AEAD_ID_AES_GCM_128 \
  |  |  ------------------
  |  |  |  |   50|  2.43k|#define OSSL_HPKE_AEAD_ID_AES_GCM_128 0x0001 /* AES-GCM-128 */
  |  |  ------------------
  |  |   96|  2.43k|    }
  ------------------
 2570|  2.43k|    unsigned char config_id_to_use = 0x00, info[OSSL_ECH_MAX_INFO_LEN];
 2571|  2.43k|    unsigned char *encoded = NULL, *mypub = NULL;
 2572|  2.43k|    size_t cipherlen = 0, aad_len = 0, lenclen = 0, mypub_len = 0;
 2573|  2.43k|    size_t info_len = OSSL_ECH_MAX_INFO_LEN, clear_len = 0, encoded_len = 0;
  ------------------
  |  |   24|  2.43k|#define OSSL_ECH_MAX_INFO_LEN (OSSL_ECH_MAX_ECHCONFIG_LEN + 8)
  |  |  ------------------
  |  |  |  |   33|  2.43k|#define OSSL_ECH_MAX_ECHCONFIG_LEN 1500 /* max for all encodings */
  |  |  ------------------
  ------------------
 2574|       |    /* whether or not we've been asked to GREASE, one way or another */
 2575|  2.43k|    int grease_opt_set = (s->ext.ech.attempted != 1
  ------------------
  |  Branch (2575:27): [True: 2.43k, False: 0]
  ------------------
 2576|  2.43k|        && ((s->ext.ech.grease == OSSL_ECH_IS_GREASE)
  ------------------
  |  |   37|  2.43k|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (2576:13): [True: 0, False: 2.43k]
  ------------------
 2577|  2.43k|            || ((s->options & SSL_OP_ECH_GREASE) != 0)));
  ------------------
  |  |  460|  2.43k|#define SSL_OP_ECH_GREASE SSL_OP_BIT(37)
  |  |  ------------------
  |  |  |  |  351|  2.43k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2577:16): [True: 0, False: 2.43k]
  ------------------
 2578|       |
 2579|       |    /* if we're not doing real ECH and not GREASEing then exit */
 2580|  2.43k|    if (s->ext.ech.attempted_type != TLSEXT_TYPE_ech && grease_opt_set == 0)
  ------------------
  |  |  174|  4.86k|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (2580:9): [True: 2.43k, False: 0]
  |  Branch (2580:57): [True: 2.43k, False: 0]
  ------------------
 2581|  2.43k|        return EXT_RETURN_NOT_SENT;
 2582|       |    /* send grease if not really attempting ECH */
 2583|      0|    if (grease_opt_set == 1) {
  ------------------
  |  Branch (2583:9): [True: 0, False: 0]
  ------------------
 2584|      0|        if (s->hello_retry_request == SSL_HRR_PENDING
  ------------------
  |  Branch (2584:13): [True: 0, False: 0]
  ------------------
 2585|      0|            && s->ext.ech.sent != NULL) {
  ------------------
  |  Branch (2585:16): [True: 0, False: 0]
  ------------------
 2586|       |            /* re-tx already sent GREASEy ECH */
 2587|      0|            if (WPACKET_memcpy(pkt, s->ext.ech.sent,
  ------------------
  |  Branch (2587:17): [True: 0, False: 0]
  ------------------
 2588|      0|                    s->ext.ech.sent_len)
 2589|      0|                != 1) {
 2590|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2591|      0|                return EXT_RETURN_FAIL;
 2592|      0|            }
 2593|      0|            return EXT_RETURN_SENT;
 2594|      0|        }
 2595|       |        /* if nobody set a type, use the default */
 2596|      0|        if (s->ext.ech.attempted_type == OSSL_ECH_type_unknown)
  ------------------
  |  |   40|      0|#define OSSL_ECH_type_unknown 0xffff
  ------------------
  |  Branch (2596:13): [True: 0, False: 0]
  ------------------
 2597|      0|            s->ext.ech.attempted_type = TLSEXT_TYPE_ech;
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
 2598|      0|        if (ossl_ech_send_grease(s, pkt) != 1) {
  ------------------
  |  Branch (2598:13): [True: 0, False: 0]
  ------------------
 2599|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2600|      0|            return EXT_RETURN_NOT_SENT;
 2601|      0|        }
 2602|      0|        return EXT_RETURN_SENT;
 2603|      0|    }
 2604|       |
 2605|       |    /* For the inner CH - we simply include one of these saying "inner" */
 2606|      0|    if (s->ext.ech.ch_depth == 1) {
  ------------------
  |  Branch (2606:9): [True: 0, False: 0]
  ------------------
 2607|      0|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ech)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2607:13): [True: 0, False: 0]
  ------------------
 2608|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2608:16): [True: 0, False: 0]
  ------------------
 2609|      0|            || !WPACKET_put_bytes_u8(pkt, OSSL_ECH_INNER_CH_TYPE)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2609:16): [True: 0, False: 0]
  ------------------
 2610|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2610:16): [True: 0, False: 0]
  ------------------
 2611|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2612|      0|            return EXT_RETURN_FAIL;
 2613|      0|        }
 2614|      0|        return EXT_RETURN_SENT;
 2615|      0|    }
 2616|       |
 2617|       |    /*
 2618|       |     * If not GREASEing we prepare sending the outer value - after the
 2619|       |     * entire thing has been constructed, putting in zeros for now where
 2620|       |     * we'd otherwise include ECH ciphertext, we later encode and encrypt.
 2621|       |     * We need to do it that way as we need the rest of the outer CH to
 2622|       |     * be known and used as AAD input before we do encryption.
 2623|       |     */
 2624|      0|    if (s->ext.ech.ch_depth != 0)
  ------------------
  |  Branch (2624:9): [True: 0, False: 0]
  ------------------
 2625|      0|        return EXT_RETURN_NOT_SENT;
 2626|       |    /* Make ClientHelloInner and EncodedClientHelloInner as per spec. */
 2627|      0|    if (ossl_ech_encode_inner(s, &encoded, &encoded_len) != 1) {
  ------------------
  |  Branch (2627:9): [True: 0, False: 0]
  ------------------
 2628|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2629|      0|        goto err;
 2630|      0|    }
 2631|      0|    s->ext.ech.encoded_inner = encoded;
 2632|      0|    s->ext.ech.encoded_inner_len = encoded_len;
 2633|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2634|      0|    ossl_ech_pbuf("encoded inner CH", encoded, encoded_len);
 2635|      0|#endif
 2636|      0|    rv = ossl_ech_pick_matching_cfg(s, &ee, &hpke_suite);
 2637|      0|    if (rv != 1 || ee == NULL) {
  ------------------
  |  Branch (2637:9): [True: 0, False: 0]
  |  Branch (2637:20): [True: 0, False: 0]
  ------------------
 2638|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2639|      0|        goto err;
 2640|      0|    }
 2641|      0|    s->ext.ech.attempted_type = ee->version;
 2642|      0|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2643|      0|    {
 2644|      0|        BIO_printf(trc_out, "EAAE: selected: version: %4x, config %2x\n",
 2645|      0|            ee->version, ee->config_id);
 2646|      0|    }
 2647|      0|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2648|      0|    config_id_to_use = ee->config_id; /* if requested, use a random config_id instead */
 2649|      0|    if ((s->options & SSL_OP_ECH_IGNORE_CID) != 0) {
  ------------------
  |  |  471|      0|#define SSL_OP_ECH_IGNORE_CID SSL_OP_BIT(39)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2649:9): [True: 0, False: 0]
  ------------------
 2650|      0|        int max_iters = 1000, i = 0;
 2651|       |
 2652|       |        /* rejection sample to get a different but random config_id */
 2653|      0|        while (config_id_to_use == ee->config_id) {
  ------------------
  |  Branch (2653:16): [True: 0, False: 0]
  ------------------
 2654|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2655|      0|            if (i > 0) {
  ------------------
  |  Branch (2655:17): [True: 0, False: 0]
  ------------------
 2656|      0|                OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2657|      0|                {
 2658|      0|                    BIO_printf(trc_out, "EAAE: rejected random-config %02x\n",
 2659|      0|                        config_id_to_use);
 2660|      0|                }
 2661|      0|                OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2662|      0|            }
 2663|      0|#endif
 2664|      0|            if (RAND_bytes_ex(sctx->libctx, &config_id_to_use, 1, 0) <= 0) {
  ------------------
  |  Branch (2664:17): [True: 0, False: 0]
  ------------------
 2665|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2666|      0|                return 0;
 2667|      0|            }
 2668|      0|            if (i++ >= max_iters) {
  ------------------
  |  Branch (2668:17): [True: 0, False: 0]
  ------------------
 2669|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2670|      0|                return 0;
 2671|      0|            }
 2672|      0|        }
 2673|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2674|      0|        ossl_ech_pbuf("EAAE: random config_id", &config_id_to_use, 1);
 2675|      0|#endif
 2676|      0|    }
 2677|      0|    s->ext.ech.attempted_cid = config_id_to_use;
 2678|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2679|      0|    ossl_ech_pbuf("EAAE: peer pub", ee->pub, ee->pub_len);
 2680|      0|    ossl_ech_pbuf("EAAE: clear", encoded, encoded_len);
 2681|      0|    ossl_ech_pbuf("EAAE: ECHConfig", ee->encoded, ee->encoded_len);
 2682|      0|#endif
 2683|       |    /*
 2684|       |     * The AAD is the full outer client hello but with the correct number of
 2685|       |     * zeros for where the ECH ciphertext octets will later be placed. So we
 2686|       |     * add the ECH extension to the |pkt| but with zeros for ciphertext, that
 2687|       |     * forms up the AAD, then after we've encrypted, we'll splice in the actual
 2688|       |     * ciphertext.
 2689|       |     * Watch out for the "4" offsets that remove the type and 3-octet length
 2690|       |     * from the encoded CH as per the spec.
 2691|       |     */
 2692|      0|    clear_len = ossl_ech_calc_padding(s, ee, encoded_len);
 2693|      0|    if (clear_len == 0) {
  ------------------
  |  Branch (2693:9): [True: 0, False: 0]
  ------------------
 2694|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2695|      0|        goto err;
 2696|      0|    }
 2697|      0|    lenclen = OSSL_HPKE_get_public_encap_size(hpke_suite);
 2698|      0|    if (s->ext.ech.hpke_ctx == NULL) { /* 1st CH */
  ------------------
  |  Branch (2698:9): [True: 0, False: 0]
  ------------------
 2699|      0|        if (ossl_ech_make_enc_info(ee->encoded, ee->encoded_len,
  ------------------
  |  Branch (2699:13): [True: 0, False: 0]
  ------------------
 2700|      0|                info, &info_len)
 2701|      0|            != 1) {
 2702|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2703|      0|            goto err;
 2704|      0|        }
 2705|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2706|      0|        ossl_ech_pbuf("EAAE info", info, info_len);
 2707|      0|#endif
 2708|      0|        s->ext.ech.hpke_ctx = OSSL_HPKE_CTX_new(hpke_mode, hpke_suite,
 2709|      0|            OSSL_HPKE_ROLE_SENDER,
  ------------------
  |  |   73|      0|#define OSSL_HPKE_ROLE_SENDER 0
  ------------------
 2710|      0|            sctx->libctx, sctx->propq);
 2711|      0|        if (s->ext.ech.hpke_ctx == NULL) {
  ------------------
  |  Branch (2711:13): [True: 0, False: 0]
  ------------------
 2712|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2713|      0|            goto err;
 2714|      0|        }
 2715|      0|        mypub = OPENSSL_malloc(lenclen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2716|      0|        if (mypub == NULL) {
  ------------------
  |  Branch (2716:13): [True: 0, False: 0]
  ------------------
 2717|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2718|      0|            goto err;
 2719|      0|        }
 2720|      0|        mypub_len = lenclen;
 2721|      0|        rv = OSSL_HPKE_encap(s->ext.ech.hpke_ctx, mypub, &mypub_len,
 2722|      0|            ee->pub, ee->pub_len, info, info_len);
 2723|      0|        if (rv != 1) {
  ------------------
  |  Branch (2723:13): [True: 0, False: 0]
  ------------------
 2724|      0|            OPENSSL_free(mypub);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2725|      0|            mypub = NULL;
 2726|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2727|      0|            goto err;
 2728|      0|        }
 2729|      0|        s->ext.ech.pub = mypub;
 2730|      0|        s->ext.ech.pub_len = mypub_len;
 2731|      0|    } else { /* HRR - retrieve public */
 2732|      0|        mypub = s->ext.ech.pub;
 2733|      0|        mypub_len = s->ext.ech.pub_len;
 2734|      0|        if (mypub == NULL || mypub_len == 0) {
  ------------------
  |  Branch (2734:13): [True: 0, False: 0]
  |  Branch (2734:30): [True: 0, False: 0]
  ------------------
 2735|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2736|      0|            goto err;
 2737|      0|        }
 2738|      0|    }
 2739|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2740|      0|    ossl_ech_pbuf("EAAE: mypub", mypub, mypub_len);
 2741|      0|    WPACKET_get_total_written(pkt, &aad_len); /* use aad_len for tracing */
 2742|      0|    ossl_ech_pbuf("EAAE pkt b4", WPACKET_get_curr(pkt) - aad_len, aad_len);
 2743|      0|#endif
 2744|      0|    cipherlen = OSSL_HPKE_get_ciphertext_size(hpke_suite, clear_len);
 2745|      0|    if (cipherlen <= clear_len || cipherlen > OSSL_ECH_MAX_PAYLOAD_LEN) {
  ------------------
  |  |   31|      0|#define OSSL_ECH_MAX_PAYLOAD_LEN 1500 /* max ECH ciphertext to en/decode */
  ------------------
  |  Branch (2745:9): [True: 0, False: 0]
  |  Branch (2745:35): [True: 0, False: 0]
  ------------------
 2746|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2747|      0|        goto err;
 2748|      0|    }
 2749|      0|    s->ext.ech.clearlen = clear_len;
 2750|      0|    s->ext.ech.cipherlen = cipherlen;
 2751|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ech)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2751:9): [True: 0, False: 0]
  ------------------
 2752|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2752:12): [True: 0, False: 0]
  ------------------
 2753|      0|        || !WPACKET_put_bytes_u8(pkt, OSSL_ECH_OUTER_CH_TYPE)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2753:12): [True: 0, False: 0]
  ------------------
 2754|      0|        || !WPACKET_put_bytes_u16(pkt, hpke_suite.kdf_id)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2754:12): [True: 0, False: 0]
  ------------------
 2755|      0|        || !WPACKET_put_bytes_u16(pkt, hpke_suite.aead_id)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2755:12): [True: 0, False: 0]
  ------------------
 2756|      0|        || !WPACKET_put_bytes_u8(pkt, config_id_to_use)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2756:12): [True: 0, False: 0]
  ------------------
 2757|      0|        || (s->hello_retry_request == SSL_HRR_PENDING
  ------------------
  |  Branch (2757:13): [True: 0, False: 0]
  ------------------
 2758|      0|            && !WPACKET_put_bytes_u16(pkt, 0x00)) /* no pub */
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2758:16): [True: 0, False: 0]
  ------------------
 2759|      0|        || (s->hello_retry_request != SSL_HRR_PENDING
  ------------------
  |  Branch (2759:13): [True: 0, False: 0]
  ------------------
 2760|      0|            && !WPACKET_sub_memcpy_u16(pkt, mypub, mypub_len))
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (2760:16): [True: 0, False: 0]
  ------------------
 2761|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2761:12): [True: 0, False: 0]
  ------------------
 2762|      0|        || !WPACKET_get_total_written(pkt, &s->ext.ech.cipher_offset)
  ------------------
  |  Branch (2762:12): [True: 0, False: 0]
  ------------------
 2763|      0|        || !WPACKET_memset(pkt, 0, cipherlen)
  ------------------
  |  Branch (2763:12): [True: 0, False: 0]
  ------------------
 2764|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (2764:12): [True: 0, False: 0]
  ------------------
 2765|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2765:12): [True: 0, False: 0]
  ------------------
 2766|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2767|      0|        goto err;
 2768|      0|    }
 2769|       |    /* don't count the type + 3-octet length */
 2770|      0|    s->ext.ech.cipher_offset -= 4;
 2771|      0|    return EXT_RETURN_SENT;
 2772|      0|err:
 2773|      0|    return EXT_RETURN_FAIL;
 2774|      0|}
extensions_clnt.c:negotiate_dhe:
  207|  7.55k|{
  208|  7.55k|    int i, end, ret = 0;
  209|  7.55k|    STACK_OF(SSL_CIPHER) *cipher_stack = NULL;
  ------------------
  |  |   33|  7.55k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  210|  7.55k|    const uint16_t *pgroups = NULL;
  211|  7.55k|    size_t num_groups, j;
  212|  7.55k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  7.55k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  213|  7.55k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  266|  7.55k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.55k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.55k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  214|       |
  215|       |    /* See if we support any EC or FFDHE ciphersuites */
  216|  7.55k|    cipher_stack = SSL_get1_supported_ciphers(ssl);
  217|  7.55k|    end = sk_SSL_CIPHER_num(cipher_stack);
  ------------------
  |  | 1028|  7.55k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  218|  17.5k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (218:17): [True: 17.3k, False: 144]
  ------------------
  219|  17.3k|        const SSL_CIPHER *c = sk_SSL_CIPHER_value(cipher_stack, i);
  ------------------
  |  | 1029|  17.3k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  220|  17.3k|        unsigned long alg_k = c->algorithm_mkey;
  221|  17.3k|        unsigned long alg_a = c->algorithm_auth;
  222|       |
  223|  17.3k|        int is_ffdhe_ciphersuite = (alg_k & (SSL_kDHE | SSL_kDHEPSK));
  ------------------
  |  |   87|  17.3k|#define SSL_kDHE 0x00000002U
  ------------------
                      int is_ffdhe_ciphersuite = (alg_k & (SSL_kDHE | SSL_kDHEPSK));
  ------------------
  |  |   99|  17.3k|#define SSL_kDHEPSK 0x00000100U
  ------------------
  224|  17.3k|        int is_ec_ciphersuite = ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   89|  17.3k|#define SSL_kECDHE 0x00000004U
  ------------------
                      int is_ec_ciphersuite = ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   98|  17.3k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (224:34): [True: 2.61k, False: 14.7k]
  ------------------
  225|  14.7k|            || (alg_a & SSL_aECDSA));
  ------------------
  |  |  118|  14.7k|#define SSL_aECDSA 0x00000008U
  ------------------
  |  Branch (225:16): [True: 0, False: 14.7k]
  ------------------
  226|  17.3k|        int is_tls13 = (dtls ? DTLS_VERSION_GT(c->min_dtls, DTLS1_2_VERSION)
  ------------------
  |  |   62|      0|#define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (226:25): [True: 0, False: 17.3k]
  ------------------
  227|  17.3k|                             : (c->min_tls > TLS1_2_VERSION));
  ------------------
  |  |   26|  17.3k|#define TLS1_2_VERSION 0x0303
  ------------------
  228|       |
  229|  17.3k|        if ((check_type == ffdhe_check && (is_ffdhe_ciphersuite || is_tls13))
  ------------------
  |  Branch (229:14): [True: 2.78k, False: 14.5k]
  |  Branch (229:44): [True: 39, False: 2.74k]
  |  Branch (229:68): [True: 2.47k, False: 271]
  ------------------
  230|  14.8k|            || (check_type == ecdhe_check && (is_ec_ciphersuite || is_tls13))
  ------------------
  |  Branch (230:17): [True: 2.91k, False: 11.9k]
  |  Branch (230:47): [True: 39, False: 2.88k]
  |  Branch (230:68): [True: 2.47k, False: 410]
  ------------------
  231|  12.3k|            || (check_type == ptfmt_check && is_ec_ciphersuite)) {
  ------------------
  |  Branch (231:17): [True: 11.6k, False: 681]
  |  Branch (231:46): [True: 2.39k, False: 9.26k]
  ------------------
  232|  7.41k|            ret = 1;
  233|  7.41k|            break;
  234|  7.41k|        }
  235|  17.3k|    }
  236|  7.55k|    sk_SSL_CIPHER_free(cipher_stack);
  ------------------
  |  | 1034|  7.55k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
  237|  7.55k|    if (ret == 0)
  ------------------
  |  Branch (237:9): [True: 144, False: 7.41k]
  ------------------
  238|    144|        return 0;
  239|       |
  240|       |    /* Check we have at least one EC or FFDHE supported group */
  241|  7.41k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  242|  38.9k|    for (j = 0; j < num_groups; j++) {
  ------------------
  |  Branch (242:17): [True: 38.4k, False: 517]
  ------------------
  243|  38.4k|        uint16_t ctmp = pgroups[j];
  244|  38.4k|        const TLS_GROUP_INFO *ginfo = NULL;
  245|       |
  246|  38.4k|        if (!tls_valid_group(s, ctmp, min_version, max_version, NULL, &ginfo))
  ------------------
  |  Branch (246:13): [True: 360, False: 38.0k]
  ------------------
  247|    360|            continue;
  248|       |
  249|  38.0k|        if (check_type == ffdhe_check && is_ffdhe_group(ginfo->group_id)
  ------------------
  |  Branch (249:13): [True: 21.2k, False: 16.8k]
  |  Branch (249:42): [True: 2.21k, False: 19.0k]
  ------------------
  250|  2.21k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2749|  2.21k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2730|  2.21k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (250:16): [True: 2.17k, False: 40]
  ------------------
  251|  2.17k|            return 1;
  252|       |
  253|  35.9k|        if (check_type != ffdhe_check && is_ecdhe_group(ginfo->group_id)
  ------------------
  |  Branch (253:13): [True: 16.8k, False: 19.0k]
  |  Branch (253:42): [True: 4.80k, False: 12.0k]
  ------------------
  254|  4.80k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2749|  4.80k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2730|  4.80k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (254:16): [True: 4.72k, False: 85]
  ------------------
  255|  4.72k|            return 1;
  256|  35.9k|    }
  257|    517|    return 0;
  258|  7.41k|}
extensions_clnt.c:add_key_share:
  792|  4.84k|{
  793|  4.84k|    unsigned char *encoded_pubkey = NULL;
  794|  4.84k|    EVP_PKEY *key_share_key = NULL;
  795|  4.84k|    size_t encodedlen;
  796|       |
  797|  4.84k|    if (loop_num < s->s3.tmp.num_ks_pkey) {
  ------------------
  |  Branch (797:9): [True: 0, False: 4.84k]
  ------------------
  798|      0|        if (!ossl_assert(s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (798:13): [True: 0, False: 0]
  ------------------
  799|      0|            || !ossl_assert(s->s3.tmp.ks_pkey[loop_num] != NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (799:16): [True: 0, False: 0]
  ------------------
  800|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  801|      0|            return 0;
  802|      0|        }
  803|       |        /*
  804|       |         * Could happen if we got an HRR that wasn't requesting a new key_share
  805|       |         */
  806|      0|        key_share_key = s->s3.tmp.ks_pkey[loop_num];
  807|  4.84k|    } else {
  808|  4.84k|        key_share_key = ssl_generate_pkey_group(s, group_id);
  809|  4.84k|        if (key_share_key == NULL) {
  ------------------
  |  Branch (809:13): [True: 0, False: 4.84k]
  ------------------
  810|       |            /* SSLfatal() already called */
  811|      0|            return 0;
  812|      0|        }
  813|  4.84k|    }
  814|       |
  815|       |    /* Encode the public key. */
  816|  4.84k|    encodedlen = EVP_PKEY_get1_encoded_public_key(key_share_key,
  817|  4.84k|        &encoded_pubkey);
  818|  4.84k|    if (encodedlen == 0) {
  ------------------
  |  Branch (818:9): [True: 0, False: 4.84k]
  ------------------
  819|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EC_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  820|      0|        goto err;
  821|      0|    }
  822|       |
  823|       |    /* Create KeyShareEntry */
  824|  4.84k|    if (!WPACKET_put_bytes_u16(pkt, group_id)
  ------------------
  |  |  911|  9.69k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (824:9): [True: 0, False: 4.84k]
  ------------------
  825|  4.84k|        || !WPACKET_sub_memcpy_u16(pkt, encoded_pubkey, encodedlen)) {
  ------------------
  |  |  940|  4.84k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (825:12): [True: 0, False: 4.84k]
  ------------------
  826|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  827|      0|        goto err;
  828|      0|    }
  829|       |
  830|       |    /* For backward compatibility, we use the first valid group to add a key share */
  831|  4.84k|    if (loop_num == 0) {
  ------------------
  |  Branch (831:9): [True: 2.43k, False: 2.41k]
  ------------------
  832|  2.43k|        s->s3.tmp.pkey = key_share_key;
  833|  2.43k|        s->s3.group_id = group_id;
  834|  2.43k|    }
  835|       |    /* We ensure in t1_lib.c that the loop number does not exceed OPENSSL_CLIENT_MAX_KEY_SHARES */
  836|  4.84k|    s->s3.tmp.ks_pkey[loop_num] = key_share_key;
  837|  4.84k|    s->s3.tmp.ks_group_id[loop_num] = group_id;
  838|  4.84k|    if (loop_num >= s->s3.tmp.num_ks_pkey)
  ------------------
  |  Branch (838:9): [True: 4.84k, False: 0]
  ------------------
  839|  4.84k|        s->s3.tmp.num_ks_pkey++;
  840|       |
  841|  4.84k|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  132|  4.84k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  842|  4.84k|    return 1;
  843|      0|err:
  844|      0|    if (key_share_key != s->s3.tmp.ks_pkey[loop_num])
  ------------------
  |  Branch (844:9): [True: 0, False: 0]
  ------------------
  845|      0|        EVP_PKEY_free(key_share_key);
  846|      0|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  847|      0|    return 0;
  848|  4.84k|}

custom_ext_init:
  104|  2.51k|{
  105|  2.51k|    size_t i;
  106|  2.51k|    custom_ext_method *meth = exts->meths;
  107|       |
  108|  2.51k|    for (i = 0; i < exts->meths_count; i++, meth++)
  ------------------
  |  Branch (108:17): [True: 0, False: 2.51k]
  ------------------
  109|      0|        meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED);
  ------------------
  |  | 2074|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
                      meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED);
  ------------------
  |  | 2069|      0|#define SSL_EXT_FLAG_RECEIVED 0x1
  ------------------
  110|  2.51k|}
custom_ext_add:
  175|  2.51k|{
  176|  2.51k|    custom_ext_methods *exts = &s->cert->custext;
  177|  2.51k|    custom_ext_method *meth;
  178|  2.51k|    size_t i;
  179|  2.51k|    int al;
  180|  2.51k|    int for_comp = (context & SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION) != 0;
  ------------------
  |  |  309|  2.51k|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
  181|       |
  182|  2.51k|    for (i = 0; i < exts->meths_count; i++) {
  ------------------
  |  Branch (182:17): [True: 0, False: 2.51k]
  ------------------
  183|      0|        const unsigned char *out = NULL;
  184|      0|        size_t outlen = 0;
  185|       |
  186|      0|        meth = exts->meths + i;
  187|       |
  188|      0|        if (!should_add_extension(s, meth->context, context, maxversion))
  ------------------
  |  Branch (188:13): [True: 0, False: 0]
  ------------------
  189|      0|            continue;
  190|       |
  191|      0|        if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  303|      0|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  304|      0|#define SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS 0x00400
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  306|      0|#define SSL_EXT_TLS1_3_CERTIFICATE 0x01000
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  311|      0|#define SSL_EXT_TLS1_3_RAW_PUBLIC_KEY 0x10000
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (191:13): [True: 0, False: 0]
  ------------------
  192|       |            /* Only send extensions present in ClientHello/CertificateRequest */
  193|      0|            if (!(meth->ext_flags & SSL_EXT_FLAG_RECEIVED))
  ------------------
  |  | 2069|      0|#define SSL_EXT_FLAG_RECEIVED 0x1
  ------------------
  |  Branch (193:17): [True: 0, False: 0]
  ------------------
  194|      0|                continue;
  195|      0|        }
  196|       |
  197|      0|#ifndef OPENSSL_NO_ECH
  198|      0|        if ((context & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (198:13): [True: 0, False: 0]
  ------------------
  199|      0|            && s->ext.ech.attempted == 1) {
  ------------------
  |  Branch (199:16): [True: 0, False: 0]
  ------------------
  200|      0|            if (s->ext.ech.ch_depth == 1) {
  ------------------
  |  Branch (200:17): [True: 0, False: 0]
  ------------------
  201|       |                /* mark custom CH ext for ECH compression, if doing ECH */
  202|      0|                if (s->ext.ech.n_outer_only >= OSSL_ECH_OUTERS_MAX) {
  ------------------
  |  |   38|      0|#define OSSL_ECH_OUTERS_MAX 20 /* max extensions we compress via outer-exts */
  ------------------
  |  Branch (202:21): [True: 0, False: 0]
  ------------------
  203|      0|                    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  204|      0|                    {
  205|      0|                        BIO_printf(trc_out,
  206|      0|                            "Too many outers to compress (max=%d)\n",
  207|      0|                            OSSL_ECH_OUTERS_MAX);
  ------------------
  |  |   38|      0|#define OSSL_ECH_OUTERS_MAX 20 /* max extensions we compress via outer-exts */
  ------------------
  208|      0|                    }
  209|      0|                    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  210|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  211|      0|                    return 0;
  212|      0|                }
  213|      0|                s->ext.ech.outer_only[s->ext.ech.n_outer_only] = meth->ext_type;
  214|      0|                s->ext.ech.n_outer_only++;
  215|      0|                OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  216|      0|                {
  217|      0|                    BIO_printf(trc_out, "ECH compressing type "
  218|      0|                                        "0x%04x (tot: %d)\n",
  219|      0|                        (int)meth->ext_type,
  220|      0|                        (int)s->ext.ech.n_outer_only);
  221|      0|                }
  222|      0|                OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  223|      0|            }
  224|      0|            if (s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (224:17): [True: 0, False: 0]
  ------------------
  225|       |                /*
  226|       |                 * We store/access the index of the extension handler in
  227|       |                 * s->ext.ech.ext_ind, as we'd otherwise not know it here.
  228|       |                 * Be nice were there a better way to handle that.
  229|       |                 */
  230|       |                /* copy over the extension octets (if any) to outer */
  231|      0|                int j, tind = -1;
  232|      0|                RAW_EXTENSION *raws = NULL;
  233|       |
  234|       |                /* we gotta find the relevant index to copy over this ext */
  235|      0|                if (s->clienthello == NULL
  ------------------
  |  Branch (235:21): [True: 0, False: 0]
  ------------------
  236|      0|                    || s->clienthello->pre_proc_exts == NULL) {
  ------------------
  |  Branch (236:24): [True: 0, False: 0]
  ------------------
  237|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  238|      0|                    return 0;
  239|      0|                }
  240|      0|                raws = s->clienthello->pre_proc_exts;
  241|      0|                for (j = 0; j != (int)s->clienthello->pre_proc_exts_len; j++) {
  ------------------
  |  Branch (241:29): [True: 0, False: 0]
  ------------------
  242|      0|                    if (raws[j].type == meth->ext_type) {
  ------------------
  |  Branch (242:25): [True: 0, False: 0]
  ------------------
  243|      0|                        tind = j;
  244|      0|                        break;
  245|      0|                    }
  246|      0|                }
  247|      0|                if (tind == -1) {
  ------------------
  |  Branch (247:21): [True: 0, False: 0]
  ------------------
  248|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  249|      0|                    return 0;
  250|      0|                }
  251|      0|                if (ossl_ech_copy_inner2outer(s, meth->ext_type, tind,
  ------------------
  |  Branch (251:21): [True: 0, False: 0]
  ------------------
  252|      0|                        pkt)
  253|      0|                    != OSSL_ECH_SAME_EXT_DONE) {
  ------------------
  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  ------------------
  254|       |                    /* for custom exts, we really should have found it */
  255|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  256|      0|                    return 0;
  257|      0|                }
  258|       |                /* we're done with that one now */
  259|      0|                continue;
  260|      0|            }
  261|      0|        }
  262|      0|#endif
  263|       |
  264|       |        /*
  265|       |         * We skip it if the callback is absent - except for a ClientHello where
  266|       |         * we add an empty extension.
  267|       |         */
  268|      0|        if ((context & SSL_EXT_CLIENT_HELLO) == 0 && meth->add_cb == NULL)
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (268:13): [True: 0, False: 0]
  |  Branch (268:54): [True: 0, False: 0]
  ------------------
  269|      0|            continue;
  270|       |
  271|      0|        if (meth->add_cb != NULL) {
  ------------------
  |  Branch (271:13): [True: 0, False: 0]
  ------------------
  272|      0|            int cb_retval = meth->add_cb(SSL_CONNECTION_GET_USER_SSL(s),
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  273|      0|                meth->ext_type, context, &out,
  274|      0|                &outlen, x, chainidx, &al,
  275|      0|                meth->add_arg);
  276|       |
  277|      0|            if (cb_retval < 0) {
  ------------------
  |  Branch (277:17): [True: 0, False: 0]
  ------------------
  278|      0|                if (!for_comp)
  ------------------
  |  Branch (278:21): [True: 0, False: 0]
  ------------------
  279|      0|                    SSLfatal(s, al, SSL_R_CALLBACK_FAILED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  280|      0|                return 0; /* error */
  281|      0|            }
  282|      0|            if (cb_retval == 0)
  ------------------
  |  Branch (282:17): [True: 0, False: 0]
  ------------------
  283|      0|                continue; /* skip this extension */
  284|      0|        }
  285|       |
  286|      0|        if (!WPACKET_put_bytes_u16(pkt, meth->ext_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (286:13): [True: 0, False: 0]
  ------------------
  287|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (287:16): [True: 0, False: 0]
  ------------------
  288|      0|            || (outlen > 0 && !WPACKET_memcpy(pkt, out, outlen))
  ------------------
  |  Branch (288:17): [True: 0, False: 0]
  |  Branch (288:31): [True: 0, False: 0]
  ------------------
  289|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (289:16): [True: 0, False: 0]
  ------------------
  290|      0|            if (meth->free_cb != NULL)
  ------------------
  |  Branch (290:17): [True: 0, False: 0]
  ------------------
  291|      0|                meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  292|      0|                    context, out, meth->add_arg);
  293|      0|            if (!for_comp)
  ------------------
  |  Branch (293:17): [True: 0, False: 0]
  ------------------
  294|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  295|      0|            return 0;
  296|      0|        }
  297|      0|        if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|       |            /*
  299|       |             * We can't send duplicates: code logic should prevent this.
  300|       |             */
  301|      0|            if (!ossl_assert((meth->ext_flags & SSL_EXT_FLAG_SENT) == 0)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (301:17): [True: 0, False: 0]
  ------------------
  302|      0|                if (meth->free_cb != NULL)
  ------------------
  |  Branch (302:21): [True: 0, False: 0]
  ------------------
  303|      0|                    meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  304|      0|                        context, out, meth->add_arg);
  305|      0|                if (!for_comp)
  ------------------
  |  Branch (305:21): [True: 0, False: 0]
  ------------------
  306|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  307|      0|                return 0;
  308|      0|            }
  309|       |            /*
  310|       |             * Indicate extension has been sent: this is both a sanity check to
  311|       |             * ensure we don't send duplicate extensions and indicates that it
  312|       |             * is not an error if the extension is present in ServerHello.
  313|       |             */
  314|      0|            meth->ext_flags |= SSL_EXT_FLAG_SENT;
  ------------------
  |  | 2074|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  315|      0|        }
  316|      0|        if (meth->free_cb != NULL)
  ------------------
  |  Branch (316:13): [True: 0, False: 0]
  ------------------
  317|      0|            meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  318|      0|                context, out, meth->add_arg);
  319|      0|    }
  320|  2.51k|    return 1;
  321|  2.51k|}
custom_exts_copy:
  370|  2.58k|{
  371|  2.58k|    size_t i;
  372|  2.58k|    int err = 0;
  373|       |
  374|  2.58k|    if (src->meths_count > 0) {
  ------------------
  |  Branch (374:9): [True: 0, False: 2.58k]
  ------------------
  375|      0|        dst->meths = OPENSSL_memdup(src->meths,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  376|      0|            sizeof(*src->meths) * src->meths_count);
  377|      0|        if (dst->meths == NULL)
  ------------------
  |  Branch (377:13): [True: 0, False: 0]
  ------------------
  378|      0|            return 0;
  379|      0|        dst->meths_count = src->meths_count;
  380|       |
  381|      0|        for (i = 0; i < src->meths_count; i++)
  ------------------
  |  Branch (381:21): [True: 0, False: 0]
  ------------------
  382|      0|            custom_ext_copy_old_cb(&dst->meths[i], &src->meths[i], &err);
  383|      0|    }
  384|       |
  385|  2.58k|    if (err) {
  ------------------
  |  Branch (385:9): [True: 0, False: 2.58k]
  ------------------
  386|      0|        custom_exts_free(dst);
  387|      0|        return 0;
  388|      0|    }
  389|       |
  390|  2.58k|    return 1;
  391|  2.58k|}
custom_exts_free:
  441|  6.05k|{
  442|  6.05k|    size_t i;
  443|  6.05k|    custom_ext_method *meth;
  444|       |
  445|  6.05k|    for (i = 0, meth = exts->meths; i < exts->meths_count; i++, meth++) {
  ------------------
  |  Branch (445:37): [True: 0, False: 6.05k]
  ------------------
  446|      0|        if (meth->add_cb != custom_ext_add_old_cb_wrap)
  ------------------
  |  Branch (446:13): [True: 0, False: 0]
  ------------------
  447|      0|            continue;
  448|       |
  449|       |        /* Old style API wrapper. Need to free the arguments too */
  450|      0|        OPENSSL_free(meth->add_arg);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  451|      0|        OPENSSL_free(meth->parse_arg);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  452|      0|    }
  453|  6.05k|    OPENSSL_free(exts->meths);
  ------------------
  |  |  132|  6.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  454|       |    exts->meths = NULL;
  455|  6.05k|    exts->meths_count = 0;
  456|  6.05k|}

SSL_get_state:
   75|  4.79k|{
   76|  4.79k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(ssl);
  ------------------
  |  |   41|  4.79k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  4.79k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 4.79k]
  |  |  |  |  ------------------
  |  |  |  |   33|  4.79k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  4.79k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 4.79k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  4.79k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  4.79k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
   77|       |
   78|  4.79k|    if (sc == NULL)
  ------------------
  |  Branch (78:9): [True: 0, False: 4.79k]
  ------------------
   79|      0|        return TLS_ST_BEFORE;
   80|       |
   81|  4.79k|    return sc->statem.hand_state;
   82|  4.79k|}
SSL_in_init:
   85|  11.5k|{
   86|  11.5k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  11.5k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  11.5k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 11.5k]
  |  |  |  |  ------------------
  |  |  |  |   33|  11.5k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  11.5k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 11.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  11.5k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  11.5k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
   87|       |
   88|  11.5k|    if (sc == NULL)
  ------------------
  |  Branch (88:9): [True: 0, False: 11.5k]
  ------------------
   89|      0|        return 0;
   90|       |
   91|  11.5k|    return sc->statem.in_init;
   92|  11.5k|}
SSL_in_before:
  105|  5.64k|{
  106|  5.64k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  5.64k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  5.64k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 5.64k]
  |  |  |  |  ------------------
  |  |  |  |   33|  5.64k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  5.64k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 5.64k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  5.64k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  5.64k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  107|       |
  108|  5.64k|    if (sc == NULL)
  ------------------
  |  Branch (108:9): [True: 0, False: 5.64k]
  ------------------
  109|      0|        return 0;
  110|       |
  111|       |    /*
  112|       |     * Historically being "in before" meant before anything had happened. In the
  113|       |     * current code though we remain in the "before" state for a while after we
  114|       |     * have started the handshake process (e.g. as a server waiting for the
  115|       |     * first message to arrive). There "in before" is taken to mean "in before"
  116|       |     * and not started any handshake process yet.
  117|       |     */
  118|  5.64k|    return (sc->statem.hand_state == TLS_ST_BEFORE)
  ------------------
  |  Branch (118:12): [True: 5.17k, False: 475]
  ------------------
  119|  5.17k|        && (sc->statem.state == MSG_FLOW_UNINITED);
  ------------------
  |  Branch (119:12): [True: 5.17k, False: 0]
  ------------------
  120|  5.64k|}
ossl_statem_clear:
  131|  7.75k|{
  132|  7.75k|    s->statem.state = MSG_FLOW_UNINITED;
  133|  7.75k|    s->statem.hand_state = TLS_ST_BEFORE;
  134|  7.75k|    s->statem.error_state = ERROR_STATE_NOERROR;
  135|  7.75k|    ossl_statem_set_in_init(s, 1);
  136|  7.75k|    s->statem.no_cert_verify = 0;
  137|  7.75k|}
ossl_statem_send_fatal:
  149|  2.57k|{
  150|       |    /* We shouldn't call SSLfatal() twice. Once is enough */
  151|  2.57k|    if (s->statem.in_init && s->statem.state == MSG_FLOW_ERROR)
  ------------------
  |  Branch (151:9): [True: 2.57k, False: 0]
  |  Branch (151:30): [True: 0, False: 2.57k]
  ------------------
  152|      0|        return;
  153|  2.57k|    ossl_statem_set_in_init(s, 1);
  154|  2.57k|    s->statem.state = MSG_FLOW_ERROR;
  155|  2.57k|    if (al != SSL_AD_NO_ALERT && s->rlayer.wrlmethod != NULL)
  ------------------
  |  |   67|  5.15k|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (155:9): [True: 2.31k, False: 260]
  |  Branch (155:34): [True: 2.31k, False: 0]
  ------------------
  156|  2.31k|        ssl3_send_alert(s, SSL3_AL_FATAL, al);
  ------------------
  |  |  250|  2.31k|#define SSL3_AL_FATAL 2
  ------------------
  157|  2.57k|}
ossl_statem_fatal:
  167|  2.31k|{
  168|  2.31k|    va_list args;
  169|       |
  170|  2.31k|    va_start(args, fmt);
  171|  2.31k|    ERR_vset_error(ERR_LIB_SSL, reason, fmt, args);
  ------------------
  |  |   70|  2.31k|#define ERR_LIB_SSL 20
  ------------------
  172|  2.31k|    va_end(args);
  173|       |
  174|  2.31k|    ossl_statem_send_fatal(s, al);
  175|  2.31k|}
ossl_statem_set_in_init:
  205|  10.3k|{
  206|  10.3k|    s->statem.in_init = init;
  207|  10.3k|    if (s->rlayer.rrlmethod != NULL && s->rlayer.rrlmethod->set_in_init != NULL)
  ------------------
  |  Branch (207:9): [True: 7.74k, False: 2.58k]
  |  Branch (207:40): [True: 0, False: 7.74k]
  ------------------
  208|      0|        s->rlayer.rrlmethod->set_in_init(s->rlayer.rrl, init);
  209|  10.3k|}
ossl_statem_get_in_handshake:
  212|  5.66k|{
  213|  5.66k|    return s->statem.in_handshake;
  214|  5.66k|}
ossl_statem_check_finish_init:
  247|  3.06k|{
  248|  3.06k|    if (sending == -1) {
  ------------------
  |  Branch (248:9): [True: 3.06k, False: 0]
  ------------------
  249|  3.06k|        if (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END
  ------------------
  |  Branch (249:13): [True: 0, False: 3.06k]
  ------------------
  250|  3.06k|            || s->statem.hand_state == TLS_ST_EARLY_DATA) {
  ------------------
  |  Branch (250:16): [True: 0, False: 3.06k]
  ------------------
  251|      0|            ossl_statem_set_in_init(s, 1);
  252|      0|            if (s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY) {
  ------------------
  |  Branch (252:17): [True: 0, False: 0]
  ------------------
  253|       |                /*
  254|       |                 * SSL_connect() or SSL_do_handshake() has been called directly.
  255|       |                 * We don't allow any more writing of early data.
  256|       |                 */
  257|      0|                s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;
  258|      0|            }
  259|      0|        }
  260|  3.06k|    } else if (!s->server) {
  ------------------
  |  Branch (260:16): [True: 0, False: 0]
  ------------------
  261|      0|        if ((sending && (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END || s->statem.hand_state == TLS_ST_EARLY_DATA)
  ------------------
  |  Branch (261:14): [True: 0, False: 0]
  |  Branch (261:26): [True: 0, False: 0]
  |  Branch (261:83): [True: 0, False: 0]
  ------------------
  262|      0|                && s->early_data_state != SSL_EARLY_DATA_WRITING)
  ------------------
  |  Branch (262:20): [True: 0, False: 0]
  ------------------
  263|      0|            || (!sending && s->statem.hand_state == TLS_ST_EARLY_DATA)) {
  ------------------
  |  Branch (263:17): [True: 0, False: 0]
  |  Branch (263:29): [True: 0, False: 0]
  ------------------
  264|      0|            ossl_statem_set_in_init(s, 1);
  265|       |            /*
  266|       |             * SSL_write() has been called directly. We don't allow any more
  267|       |             * writing of early data.
  268|       |             */
  269|      0|            if (sending && s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY)
  ------------------
  |  Branch (269:17): [True: 0, False: 0]
  |  Branch (269:28): [True: 0, False: 0]
  ------------------
  270|      0|                s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;
  271|      0|        }
  272|      0|    } else {
  273|      0|        if (s->early_data_state == SSL_EARLY_DATA_FINISHED_READING
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  ------------------
  274|      0|            && s->statem.hand_state == TLS_ST_EARLY_DATA)
  ------------------
  |  Branch (274:16): [True: 0, False: 0]
  ------------------
  275|      0|            ossl_statem_set_in_init(s, 1);
  276|      0|    }
  277|  3.06k|    return 1;
  278|  3.06k|}
ossl_statem_connect:
  296|  3.06k|{
  297|  3.06k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  3.06k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  3.06k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.06k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.06k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.06k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.06k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.06k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.06k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  298|       |
  299|  3.06k|    if (sc == NULL)
  ------------------
  |  Branch (299:9): [True: 0, False: 3.06k]
  ------------------
  300|      0|        return -1;
  301|       |
  302|  3.06k|    return state_machine(sc, 0);
  303|  3.06k|}
statem_flush:
  961|  2.48k|{
  962|  2.48k|    s->rwstate = SSL_WRITING;
  ------------------
  |  |  956|  2.48k|#define SSL_WRITING 2
  ------------------
  963|  2.48k|    if (BIO_flush(s->wbio) <= 0) {
  ------------------
  |  |  650|  2.48k|#define BIO_flush(b) (int)BIO_ctrl(b, BIO_CTRL_FLUSH, 0, NULL)
  |  |  ------------------
  |  |  |  |  100|  2.48k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  |  |  ------------------
  ------------------
  |  Branch (963:9): [True: 0, False: 2.48k]
  ------------------
  964|      0|        return 0;
  965|      0|    }
  966|  2.48k|    s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  2.48k|#define SSL_NOTHING 1
  ------------------
  967|       |
  968|  2.48k|    return 1;
  969|  2.48k|}
statem.c:state_machine:
  358|  3.06k|{
  359|  3.06k|    BUF_MEM *buf = NULL;
  360|  3.06k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
  361|  3.06k|    OSSL_STATEM *st = &s->statem;
  362|  3.06k|    int ret = -1;
  363|  3.06k|    int ssret;
  364|  3.06k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.06k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  365|  3.06k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  3.06k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  366|       |
  367|  3.06k|    if (st->state == MSG_FLOW_ERROR) {
  ------------------
  |  Branch (367:9): [True: 0, False: 3.06k]
  ------------------
  368|       |        /* Shouldn't have been called if we're already in the error state */
  369|      0|        return -1;
  370|      0|    }
  371|       |
  372|  3.06k|    ERR_clear_error();
  373|  3.06k|    clear_sys_error();
  ------------------
  |  |   31|  3.06k|#define clear_sys_error() errno = 0
  ------------------
  374|       |
  375|  3.06k|    cb = get_callback(s);
  376|       |
  377|  3.06k|    st->in_handshake++;
  378|  3.06k|    if (!SSL_in_init(ssl) || SSL_in_before(ssl)) {
  ------------------
  |  Branch (378:9): [True: 0, False: 3.06k]
  |  Branch (378:30): [True: 2.58k, False: 475]
  ------------------
  379|       |        /*
  380|       |         * If we are stateless then we already called SSL_clear() - don't do
  381|       |         * it again and clear the STATELESS flag itself.
  382|       |         */
  383|  2.58k|        if ((s->s3.flags & TLS1_FLAGS_STATELESS) == 0 && !SSL_clear(ssl))
  ------------------
  |  |  304|  2.58k|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (383:13): [True: 2.58k, False: 0]
  |  Branch (383:58): [True: 0, False: 2.58k]
  ------------------
  384|      0|            return -1;
  385|  2.58k|    }
  386|       |#ifndef OPENSSL_NO_SCTP
  387|       |    if (SSL_CONNECTION_IS_DTLS(s) && BIO_dgram_is_sctp(SSL_get_wbio(ssl))) {
  388|       |        /*
  389|       |         * Notify SCTP BIO socket to enter handshake mode and prevent stream
  390|       |         * identifier other than 0.
  391|       |         */
  392|       |        BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE,
  393|       |            st->in_handshake, NULL);
  394|       |    }
  395|       |#endif
  396|       |
  397|       |    /* Initialise state machine */
  398|  3.06k|    if (st->state == MSG_FLOW_UNINITED
  ------------------
  |  Branch (398:9): [True: 2.58k, False: 475]
  ------------------
  399|  2.58k|        || st->state == MSG_FLOW_FINISHED) {
  ------------------
  |  Branch (399:12): [True: 0, False: 475]
  ------------------
  400|  2.58k|        if (st->state == MSG_FLOW_UNINITED) {
  ------------------
  |  Branch (400:13): [True: 2.58k, False: 0]
  ------------------
  401|  2.58k|            st->hand_state = TLS_ST_BEFORE;
  402|  2.58k|            st->request_state = TLS_ST_BEFORE;
  403|  2.58k|        }
  404|       |
  405|  2.58k|        s->server = server;
  406|  2.58k|        if (cb != NULL) {
  ------------------
  |  Branch (406:13): [True: 0, False: 2.58k]
  ------------------
  407|      0|            if (SSL_IS_FIRST_HANDSHAKE(s) || !SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                          if (SSL_IS_FIRST_HANDSHAKE(s) || !SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  408|      0|                cb(ussl, SSL_CB_HANDSHAKE_START, 1);
  ------------------
  |  | 1169|      0|#define SSL_CB_HANDSHAKE_START 0x10
  ------------------
  409|      0|        }
  410|       |
  411|       |        /*
  412|       |         * Fatal errors in this block don't send an alert because we have
  413|       |         * failed to even initialise properly. Sending an alert is probably
  414|       |         * doomed to failure.
  415|       |         */
  416|       |
  417|  2.58k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.58k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.58k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.58k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.58k]
  |  |  ------------------
  ------------------
  418|      0|            if ((s->version & 0xff00) != (DTLS1_VERSION & 0xff00) && (server || (s->version & 0xff00) != (DTLS1_BAD_VER & 0xff00))) {
  ------------------
  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  ------------------
                          if ((s->version & 0xff00) != (DTLS1_VERSION & 0xff00) && (server || (s->version & 0xff00) != (DTLS1_BAD_VER & 0xff00))) {
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  |  Branch (418:71): [True: 0, False: 0]
  |  Branch (418:81): [True: 0, False: 0]
  ------------------
  419|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  420|      0|                goto end;
  421|      0|            }
  422|  2.58k|        } else {
  423|  2.58k|            if ((s->version >> 8) != SSL3_VERSION_MAJOR) {
  ------------------
  |  |  216|  2.58k|#define SSL3_VERSION_MAJOR 0x03
  ------------------
  |  Branch (423:17): [True: 0, False: 2.58k]
  ------------------
  424|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  425|      0|                goto end;
  426|      0|            }
  427|  2.58k|        }
  428|       |
  429|  2.58k|        if (!ssl_security(s, SSL_SECOP_VERSION, 0, s->version, NULL)) {
  ------------------
  |  | 2757|  2.58k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|  2.58k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (429:13): [True: 0, False: 2.58k]
  ------------------
  430|      0|            SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  431|      0|            goto end;
  432|      0|        }
  433|       |
  434|  2.58k|        if (s->init_buf == NULL) {
  ------------------
  |  Branch (434:13): [True: 2.58k, False: 0]
  ------------------
  435|  2.58k|            if ((buf = BUF_MEM_new()) == NULL) {
  ------------------
  |  Branch (435:17): [True: 0, False: 2.58k]
  ------------------
  436|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  437|      0|                goto end;
  438|      0|            }
  439|  2.58k|            if (!BUF_MEM_grow(buf, SSL3_RT_MAX_PLAIN_LENGTH)) {
  ------------------
  |  |  177|  2.58k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (439:17): [True: 0, False: 2.58k]
  ------------------
  440|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  441|      0|                goto end;
  442|      0|            }
  443|  2.58k|            s->init_buf = buf;
  444|  2.58k|            buf = NULL;
  445|  2.58k|        }
  446|       |
  447|  2.58k|        s->init_num = 0;
  448|       |
  449|       |        /*
  450|       |         * Should have been reset by tls_process_finished, too.
  451|       |         */
  452|  2.58k|        s->s3.change_cipher_spec = 0;
  453|       |
  454|       |        /*
  455|       |         * Ok, we now need to push on a buffering BIO ...but not with
  456|       |         * SCTP
  457|       |         */
  458|       |#ifndef OPENSSL_NO_SCTP
  459|       |        if (!SSL_CONNECTION_IS_DTLS(s) || !BIO_dgram_is_sctp(SSL_get_wbio(ssl)))
  460|       |#endif
  461|  2.58k|            if (!ssl_init_wbio_buffer(s)) {
  ------------------
  |  Branch (461:17): [True: 0, False: 2.58k]
  ------------------
  462|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  463|      0|                goto end;
  464|      0|            }
  465|       |
  466|  2.58k|        if ((SSL_in_before(ssl))
  ------------------
  |  Branch (466:13): [True: 2.58k, False: 0]
  ------------------
  467|  2.58k|            || s->renegotiate) {
  ------------------
  |  Branch (467:16): [True: 0, False: 0]
  ------------------
  468|  2.58k|            if (!tls_setup_handshake(s)) {
  ------------------
  |  Branch (468:17): [True: 7, False: 2.57k]
  ------------------
  469|       |                /* SSLfatal() already called */
  470|      7|                goto end;
  471|      7|            }
  472|       |
  473|  2.57k|            if (SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  2.57k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 2.57k, False: 0]
  |  |  ------------------
  |  |  286|  2.57k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  474|  2.57k|                st->read_state_first_init = 1;
  475|  2.57k|        }
  476|       |
  477|  2.57k|        st->state = MSG_FLOW_WRITING;
  478|  2.57k|        init_write_state_machine(s);
  479|  2.57k|    }
  480|       |
  481|  5.53k|    while (st->state != MSG_FLOW_FINISHED) {
  ------------------
  |  Branch (481:12): [True: 5.53k, False: 0]
  ------------------
  482|  5.53k|        if (st->state == MSG_FLOW_READING) {
  ------------------
  |  Branch (482:13): [True: 2.95k, False: 2.57k]
  ------------------
  483|  2.95k|            ssret = read_state_machine(s);
  484|  2.95k|            if (ssret == SUB_STATE_FINISHED) {
  ------------------
  |  Branch (484:17): [True: 0, False: 2.95k]
  ------------------
  485|      0|                st->state = MSG_FLOW_WRITING;
  486|      0|                init_write_state_machine(s);
  487|  2.95k|            } else {
  488|       |                /* NBIO or error */
  489|  2.95k|                goto end;
  490|  2.95k|            }
  491|  2.95k|        } else if (st->state == MSG_FLOW_WRITING) {
  ------------------
  |  Branch (491:20): [True: 2.57k, False: 0]
  ------------------
  492|  2.57k|            ssret = write_state_machine(s);
  493|  2.57k|            if (ssret == SUB_STATE_FINISHED) {
  ------------------
  |  Branch (493:17): [True: 2.48k, False: 97]
  ------------------
  494|  2.48k|                st->state = MSG_FLOW_READING;
  495|  2.48k|                init_read_state_machine(s);
  496|  2.48k|            } else if (ssret == SUB_STATE_END_HANDSHAKE) {
  ------------------
  |  Branch (496:24): [True: 0, False: 97]
  ------------------
  497|      0|                st->state = MSG_FLOW_FINISHED;
  498|     97|            } else {
  499|       |                /* NBIO or error */
  500|     97|                goto end;
  501|     97|            }
  502|  2.57k|        } else {
  503|       |            /* Error */
  504|      0|            check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  505|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  506|      0|            goto end;
  507|      0|        }
  508|  5.53k|    }
  509|       |
  510|      0|    ret = 1;
  511|       |
  512|  3.06k|end:
  513|  3.06k|    st->in_handshake--;
  514|       |
  515|       |#ifndef OPENSSL_NO_SCTP
  516|       |    if (SSL_CONNECTION_IS_DTLS(s) && BIO_dgram_is_sctp(SSL_get_wbio(ssl))) {
  517|       |        /*
  518|       |         * Notify SCTP BIO socket to leave handshake mode and allow stream
  519|       |         * identifier other than 0.
  520|       |         */
  521|       |        BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE,
  522|       |            st->in_handshake, NULL);
  523|       |    }
  524|       |#endif
  525|       |
  526|  3.06k|    BUF_MEM_free(buf);
  527|  3.06k|    if (cb != NULL) {
  ------------------
  |  Branch (527:9): [True: 0, False: 3.06k]
  ------------------
  528|      0|        if (server)
  ------------------
  |  Branch (528:13): [True: 0, False: 0]
  ------------------
  529|      0|            cb(ussl, SSL_CB_ACCEPT_EXIT, ret);
  ------------------
  |  | 1166|      0|#define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1154|      0|#define SSL_ST_ACCEPT 0x2000
  |  |  ------------------
  |  |               #define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1159|      0|#define SSL_CB_EXIT 0x02
  |  |  ------------------
  ------------------
  530|      0|        else
  531|      0|            cb(ussl, SSL_CB_CONNECT_EXIT, ret);
  ------------------
  |  | 1168|      0|#define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1153|      0|#define SSL_ST_CONNECT 0x1000
  |  |  ------------------
  |  |               #define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1159|      0|#define SSL_CB_EXIT 0x02
  |  |  ------------------
  ------------------
  532|      0|    }
  533|  3.06k|    return ret;
  534|      0|}
statem.c:get_callback:
  318|  8.59k|{
  319|  8.59k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  8.59k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  320|       |
  321|  8.59k|    if (s->info_callback != NULL)
  ------------------
  |  Branch (321:9): [True: 0, False: 8.59k]
  ------------------
  322|      0|        return s->info_callback;
  323|  8.59k|    else if (sctx->info_callback != NULL)
  ------------------
  |  Branch (323:14): [True: 0, False: 8.59k]
  ------------------
  324|      0|        return sctx->info_callback;
  325|       |
  326|  8.59k|    return NULL;
  327|  8.59k|}
statem.c:init_write_state_machine:
  759|  2.57k|{
  760|  2.57k|    OSSL_STATEM *st = &s->statem;
  761|       |
  762|  2.57k|    st->write_state = WRITE_STATE_TRANSITION;
  763|  2.57k|}
statem.c:read_state_machine:
  573|  2.95k|{
  574|  2.95k|    OSSL_STATEM *st = &s->statem;
  575|  2.95k|    int ret, mt;
  576|  2.95k|    size_t len = 0, headerlen;
  577|  2.95k|    int (*transition)(SSL_CONNECTION *s, int mt);
  578|  2.95k|    PACKET pkt;
  579|  2.95k|    MSG_PROCESS_RETURN (*process_message)(SSL_CONNECTION *s, PACKET *pkt);
  580|  2.95k|    WORK_STATE (*post_process_message)(SSL_CONNECTION *s, WORK_STATE wst);
  581|  2.95k|    size_t (*max_message_size)(SSL_CONNECTION *s);
  582|  2.95k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
  583|  2.95k|    SSL *ssl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  2.95k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  584|       |
  585|  2.95k|    cb = get_callback(s);
  586|       |
  587|  2.95k|    if (s->server) {
  ------------------
  |  Branch (587:9): [True: 0, False: 2.95k]
  ------------------
  588|      0|        transition = ossl_statem_server_read_transition;
  589|      0|        process_message = ossl_statem_server_process_message;
  590|      0|        max_message_size = ossl_statem_server_max_message_size;
  591|      0|        post_process_message = ossl_statem_server_post_process_message;
  592|  2.95k|    } else {
  593|  2.95k|        transition = ossl_statem_client_read_transition;
  594|  2.95k|        process_message = ossl_statem_client_process_message;
  595|  2.95k|        max_message_size = ossl_statem_client_max_message_size;
  596|  2.95k|        post_process_message = ossl_statem_client_post_process_message;
  597|  2.95k|    }
  598|       |
  599|  2.95k|    if (st->read_state_first_init) {
  ------------------
  |  Branch (599:9): [True: 2.48k, False: 475]
  ------------------
  600|  2.48k|        s->first_packet = 1;
  601|  2.48k|        st->read_state_first_init = 0;
  602|  2.48k|    }
  603|       |
  604|  2.95k|    while (1) {
  ------------------
  |  Branch (604:12): [True: 2.95k, Folded]
  ------------------
  605|  2.95k|        switch (st->read_state) {
  606|  2.95k|        case READ_STATE_HEADER:
  ------------------
  |  Branch (606:9): [True: 2.95k, False: 1]
  ------------------
  607|       |            /* Get the state the peer wants to move to */
  608|  2.95k|            if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.95k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.95k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.95k]
  |  |  ------------------
  ------------------
  609|       |                /*
  610|       |                 * In DTLS we get the whole message in one go - header and body
  611|       |                 */
  612|      0|                ret = dtls_get_message(s, &mt);
  613|  2.95k|            } else {
  614|  2.95k|                ret = tls_get_message_header(s, &mt);
  615|  2.95k|            }
  616|       |
  617|  2.95k|            if (ret == 0) {
  ------------------
  |  Branch (617:17): [True: 2.80k, False: 155]
  ------------------
  618|       |                /* Could be non-blocking IO */
  619|  2.80k|                return SUB_STATE_ERROR;
  620|  2.80k|            }
  621|       |
  622|    155|            if (cb != NULL) {
  ------------------
  |  Branch (622:17): [True: 0, False: 155]
  ------------------
  623|       |                /* Notify callback of an impending state change */
  624|      0|                if (s->server)
  ------------------
  |  Branch (624:21): [True: 0, False: 0]
  ------------------
  625|      0|                    cb(ssl, SSL_CB_ACCEPT_LOOP, 1);
  ------------------
  |  | 1165|      0|#define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1154|      0|#define SSL_ST_ACCEPT 0x2000
  |  |  ------------------
  |  |               #define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1158|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  626|      0|                else
  627|      0|                    cb(ssl, SSL_CB_CONNECT_LOOP, 1);
  ------------------
  |  | 1167|      0|#define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1153|      0|#define SSL_ST_CONNECT 0x1000
  |  |  ------------------
  |  |               #define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1158|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  628|      0|            }
  629|       |            /*
  630|       |             * Validate that we are allowed to move to the new state and move
  631|       |             * to that state if so
  632|       |             */
  633|    155|            if (!transition(s, mt))
  ------------------
  |  Branch (633:17): [True: 9, False: 146]
  ------------------
  634|      9|                return SUB_STATE_ERROR;
  635|       |
  636|    146|            if (s->s3.tmp.message_size > max_message_size(s)) {
  ------------------
  |  Branch (636:17): [True: 16, False: 130]
  ------------------
  637|     16|                SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|     16|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|     16|    (ERR_new(),                                                  \
  |  |  |  |  158|     16|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     16|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|     16|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  638|     16|                    SSL_R_EXCESSIVE_MESSAGE_SIZE);
  639|     16|                return SUB_STATE_ERROR;
  640|     16|            }
  641|       |
  642|    130|            st->read_state = READ_STATE_BODY;
  643|       |            /* Fall through */
  644|       |
  645|    131|        case READ_STATE_BODY:
  ------------------
  |  Branch (645:9): [True: 1, False: 2.95k]
  ------------------
  646|    131|            if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|    131|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|    131|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|    131|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 131]
  |  |  ------------------
  ------------------
  647|       |                /*
  648|       |                 * Actually we already have the body, but we give DTLS the
  649|       |                 * opportunity to do any further processing.
  650|       |                 */
  651|      0|                ret = dtls_get_message_body(s, &len);
  652|    131|            } else {
  653|    131|                ret = tls_get_message_body(s, &len);
  654|    131|            }
  655|    131|            if (ret == 0) {
  ------------------
  |  Branch (655:17): [True: 44, False: 87]
  ------------------
  656|       |                /* Could be non-blocking IO */
  657|     44|                return SUB_STATE_ERROR;
  658|     44|            }
  659|       |
  660|     87|            s->first_packet = 0;
  661|       |            /*
  662|       |             * We initialise the buffer including the message header, and
  663|       |             * then skip over header ready to process the message. This
  664|       |             * ensures that calls to PACKET_msg_start() gives us the whole
  665|       |             * message
  666|       |             */
  667|     87|            headerlen = (char *)s->init_msg - s->init_buf->data;
  668|     87|            if (!PACKET_buf_init(&pkt, (unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (668:17): [True: 0, False: 87]
  ------------------
  669|     87|                    len + headerlen)) {
  670|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  671|      0|                return SUB_STATE_ERROR;
  672|      0|            }
  673|     87|            if (!PACKET_forward(&pkt, headerlen)) {
  ------------------
  |  Branch (673:17): [True: 0, False: 87]
  ------------------
  674|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  675|      0|                return SUB_STATE_ERROR;
  676|      0|            }
  677|       |
  678|     87|            ret = process_message(s, &pkt);
  679|       |
  680|       |            /* Discard the packet data */
  681|     87|            s->init_num = 0;
  682|       |
  683|     87|            switch (ret) {
  684|     87|            case MSG_PROCESS_ERROR:
  ------------------
  |  Branch (684:13): [True: 87, False: 0]
  ------------------
  685|     87|                check_fatal(s);
  ------------------
  |  |  183|     87|    do {                                                             \
  |  |  184|     87|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|    174|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 87, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 87, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|     87|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (184:13): [True: 0, False: 87]
  |  |  ------------------
  |  |  185|     87|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|     87|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|     87|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 87]
  |  |  ------------------
  ------------------
  686|     87|                return SUB_STATE_ERROR;
  687|       |
  688|      0|            case MSG_PROCESS_FINISHED_READING:
  ------------------
  |  Branch (688:13): [True: 0, False: 87]
  ------------------
  689|      0|                if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  690|      0|                    dtls1_stop_timer(s);
  691|      0|                }
  692|      0|                return SUB_STATE_FINISHED;
  693|       |
  694|      0|            case MSG_PROCESS_CONTINUE_PROCESSING:
  ------------------
  |  Branch (694:13): [True: 0, False: 87]
  ------------------
  695|      0|                st->read_state = READ_STATE_POST_PROCESS;
  696|      0|                st->read_state_work = WORK_MORE_A;
  697|      0|                break;
  698|       |
  699|      0|            default:
  ------------------
  |  Branch (699:13): [True: 0, False: 87]
  ------------------
  700|      0|                st->read_state = READ_STATE_HEADER;
  701|      0|                break;
  702|     87|            }
  703|      0|            break;
  704|       |
  705|      0|        case READ_STATE_POST_PROCESS:
  ------------------
  |  Branch (705:9): [True: 0, False: 2.95k]
  ------------------
  706|      0|            st->read_state_work = post_process_message(s, st->read_state_work);
  707|      0|            switch (st->read_state_work) {
  ------------------
  |  Branch (707:21): [True: 0, False: 0]
  ------------------
  708|      0|            case WORK_ERROR:
  ------------------
  |  Branch (708:13): [True: 0, False: 0]
  ------------------
  709|      0|                check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  710|       |                /* Fall through */
  711|      0|            case WORK_MORE_A:
  ------------------
  |  Branch (711:13): [True: 0, False: 0]
  ------------------
  712|      0|            case WORK_MORE_B:
  ------------------
  |  Branch (712:13): [True: 0, False: 0]
  ------------------
  713|      0|            case WORK_MORE_C:
  ------------------
  |  Branch (713:13): [True: 0, False: 0]
  ------------------
  714|      0|                return SUB_STATE_ERROR;
  715|       |
  716|      0|            case WORK_FINISHED_CONTINUE:
  ------------------
  |  Branch (716:13): [True: 0, False: 0]
  ------------------
  717|      0|                st->read_state = READ_STATE_HEADER;
  718|      0|                break;
  719|       |
  720|      0|            case WORK_FINISHED_SWAP:
  ------------------
  |  Branch (720:13): [True: 0, False: 0]
  ------------------
  721|      0|            case WORK_FINISHED_STOP:
  ------------------
  |  Branch (721:13): [True: 0, False: 0]
  ------------------
  722|      0|                if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  723|      0|                    dtls1_stop_timer(s);
  724|      0|                }
  725|      0|                return SUB_STATE_FINISHED;
  726|      0|            }
  727|      0|            break;
  728|       |
  729|      0|        default:
  ------------------
  |  Branch (729:9): [True: 0, False: 2.95k]
  ------------------
  730|       |            /* Shouldn't happen */
  731|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  732|      0|            return SUB_STATE_ERROR;
  733|  2.95k|        }
  734|  2.95k|    }
  735|  2.95k|}
statem.c:write_state_machine:
  797|  2.57k|{
  798|  2.57k|    OSSL_STATEM *st = &s->statem;
  799|  2.57k|    int ret;
  800|  2.57k|    WRITE_TRAN (*transition)(SSL_CONNECTION *s);
  801|  2.57k|    WORK_STATE (*pre_work)(SSL_CONNECTION *s, WORK_STATE wst);
  802|  2.57k|    WORK_STATE (*post_work)(SSL_CONNECTION *s, WORK_STATE wst);
  803|  2.57k|    int (*get_construct_message_f)(SSL_CONNECTION *s,
  804|  2.57k|        CON_FUNC_RETURN (**confunc)(SSL_CONNECTION *s,
  805|  2.57k|            WPACKET *pkt),
  806|  2.57k|        int *mt);
  807|  2.57k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
  808|  2.57k|    CON_FUNC_RETURN (*confunc)(SSL_CONNECTION *s, WPACKET *pkt);
  809|  2.57k|    int mt;
  810|  2.57k|    WPACKET pkt;
  811|  2.57k|    SSL *ssl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  2.57k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  812|       |
  813|  2.57k|    cb = get_callback(s);
  814|       |
  815|  2.57k|    if (s->server) {
  ------------------
  |  Branch (815:9): [True: 0, False: 2.57k]
  ------------------
  816|      0|        transition = ossl_statem_server_write_transition;
  817|      0|        pre_work = ossl_statem_server_pre_work;
  818|      0|        post_work = ossl_statem_server_post_work;
  819|      0|        get_construct_message_f = ossl_statem_server_construct_message;
  820|  2.57k|    } else {
  821|  2.57k|        transition = ossl_statem_client_write_transition;
  822|  2.57k|        pre_work = ossl_statem_client_pre_work;
  823|  2.57k|        post_work = ossl_statem_client_post_work;
  824|  2.57k|        get_construct_message_f = ossl_statem_client_construct_message;
  825|  2.57k|    }
  826|       |
  827|  7.63k|    while (1) {
  ------------------
  |  Branch (827:12): [True: 7.63k, Folded]
  ------------------
  828|  7.63k|        switch (st->write_state) {
  829|  5.05k|        case WRITE_STATE_TRANSITION:
  ------------------
  |  Branch (829:9): [True: 5.05k, False: 2.57k]
  ------------------
  830|  5.05k|            if (cb != NULL) {
  ------------------
  |  Branch (830:17): [True: 0, False: 5.05k]
  ------------------
  831|       |                /* Notify callback of an impending state change */
  832|      0|                if (s->server)
  ------------------
  |  Branch (832:21): [True: 0, False: 0]
  ------------------
  833|      0|                    cb(ssl, SSL_CB_ACCEPT_LOOP, 1);
  ------------------
  |  | 1165|      0|#define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1154|      0|#define SSL_ST_ACCEPT 0x2000
  |  |  ------------------
  |  |               #define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1158|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  834|      0|                else
  835|      0|                    cb(ssl, SSL_CB_CONNECT_LOOP, 1);
  ------------------
  |  | 1167|      0|#define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1153|      0|#define SSL_ST_CONNECT 0x1000
  |  |  ------------------
  |  |               #define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1158|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  836|      0|            }
  837|  5.05k|            switch (transition(s)) {
  ------------------
  |  Branch (837:21): [True: 5.05k, False: 0]
  ------------------
  838|  2.57k|            case WRITE_TRAN_CONTINUE:
  ------------------
  |  Branch (838:13): [True: 2.57k, False: 2.48k]
  ------------------
  839|  2.57k|                st->write_state = WRITE_STATE_PRE_WORK;
  840|  2.57k|                st->write_state_work = WORK_MORE_A;
  841|  2.57k|                break;
  842|       |
  843|  2.48k|            case WRITE_TRAN_FINISHED:
  ------------------
  |  Branch (843:13): [True: 2.48k, False: 2.57k]
  ------------------
  844|  2.48k|                return SUB_STATE_FINISHED;
  845|       |
  846|      0|            case WRITE_TRAN_ERROR:
  ------------------
  |  Branch (846:13): [True: 0, False: 5.05k]
  ------------------
  847|      0|                check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  848|      0|                return SUB_STATE_ERROR;
  849|  5.05k|            }
  850|  2.57k|            break;
  851|       |
  852|  2.57k|        case WRITE_STATE_PRE_WORK:
  ------------------
  |  Branch (852:9): [True: 2.57k, False: 5.05k]
  ------------------
  853|  2.57k|            switch (st->write_state_work = pre_work(s, st->write_state_work)) {
  ------------------
  |  Branch (853:21): [True: 2.57k, False: 0]
  ------------------
  854|      0|            case WORK_ERROR:
  ------------------
  |  Branch (854:13): [True: 0, False: 2.57k]
  ------------------
  855|      0|                check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  856|       |                /* Fall through */
  857|      0|            case WORK_MORE_A:
  ------------------
  |  Branch (857:13): [True: 0, False: 2.57k]
  ------------------
  858|      0|            case WORK_MORE_B:
  ------------------
  |  Branch (858:13): [True: 0, False: 2.57k]
  ------------------
  859|      0|            case WORK_MORE_C:
  ------------------
  |  Branch (859:13): [True: 0, False: 2.57k]
  ------------------
  860|      0|                return SUB_STATE_ERROR;
  861|       |
  862|  2.57k|            case WORK_FINISHED_CONTINUE:
  ------------------
  |  Branch (862:13): [True: 2.57k, False: 0]
  ------------------
  863|  2.57k|                st->write_state = WRITE_STATE_SEND;
  864|  2.57k|                break;
  865|       |
  866|      0|            case WORK_FINISHED_SWAP:
  ------------------
  |  Branch (866:13): [True: 0, False: 2.57k]
  ------------------
  867|      0|                return SUB_STATE_FINISHED;
  868|       |
  869|      0|            case WORK_FINISHED_STOP:
  ------------------
  |  Branch (869:13): [True: 0, False: 2.57k]
  ------------------
  870|      0|                return SUB_STATE_END_HANDSHAKE;
  871|  2.57k|            }
  872|  2.57k|            if (!get_construct_message_f(s, &confunc, &mt)) {
  ------------------
  |  Branch (872:17): [True: 0, False: 2.57k]
  ------------------
  873|       |                /* SSLfatal() already called */
  874|      0|                return SUB_STATE_ERROR;
  875|      0|            }
  876|  2.57k|            if (mt == SSL3_MT_DUMMY) {
  ------------------
  |  |   41|  2.57k|#define SSL3_MT_DUMMY -1
  ------------------
  |  Branch (876:17): [True: 0, False: 2.57k]
  ------------------
  877|       |                /* Skip construction and sending. This isn't a "real" state */
  878|      0|                st->write_state = WRITE_STATE_POST_WORK;
  879|      0|                st->write_state_work = WORK_MORE_A;
  880|      0|                break;
  881|      0|            }
  882|  2.57k|            if (!WPACKET_init(&pkt, s->init_buf)
  ------------------
  |  Branch (882:17): [True: 0, False: 2.57k]
  ------------------
  883|  2.57k|                || !ssl_set_handshake_header(s, &pkt, mt)) {
  ------------------
  |  | 2184|  2.57k|    SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->set_handshake_header((s), (pkt), (htype))
  |  |  ------------------
  |  |  |  |   27|  2.57k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  |  Branch (883:20): [True: 0, False: 2.57k]
  ------------------
  884|      0|                WPACKET_cleanup(&pkt);
  885|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  886|      0|                return SUB_STATE_ERROR;
  887|      0|            }
  888|  2.57k|            if (confunc != NULL) {
  ------------------
  |  Branch (888:17): [True: 2.57k, False: 0]
  ------------------
  889|  2.57k|                CON_FUNC_RETURN tmpret;
  890|       |
  891|  2.57k|                tmpret = confunc(s, &pkt);
  892|  2.57k|                if (tmpret == CON_FUNC_ERROR) {
  ------------------
  |  Branch (892:21): [True: 97, False: 2.48k]
  ------------------
  893|     97|                    WPACKET_cleanup(&pkt);
  894|     97|                    check_fatal(s);
  ------------------
  |  |  183|     97|    do {                                                             \
  |  |  184|     97|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|    194|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 97, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 97, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|     97|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (184:13): [True: 0, False: 97]
  |  |  ------------------
  |  |  185|     97|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|     97|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|     97|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 97]
  |  |  ------------------
  ------------------
  895|     97|                    return SUB_STATE_ERROR;
  896|  2.48k|                } else if (tmpret == CON_FUNC_DONT_SEND) {
  ------------------
  |  Branch (896:28): [True: 0, False: 2.48k]
  ------------------
  897|       |                    /*
  898|       |                     * The construction function decided not to construct the
  899|       |                     * message after all and continue. Skip sending.
  900|       |                     */
  901|      0|                    WPACKET_cleanup(&pkt);
  902|      0|                    st->write_state = WRITE_STATE_POST_WORK;
  903|      0|                    st->write_state_work = WORK_MORE_A;
  904|      0|                    break;
  905|      0|                } /* else success */
  906|  2.57k|            }
  907|  2.48k|            if (!ssl_close_construct_packet(s, &pkt, mt)
  ------------------
  |  | 2186|  2.48k|    SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->close_construct_packet((s), (pkt), (htype))
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  |  Branch (907:17): [True: 0, False: 2.48k]
  ------------------
  908|  2.48k|                || !WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (908:20): [True: 0, False: 2.48k]
  ------------------
  909|      0|                WPACKET_cleanup(&pkt);
  910|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  911|      0|                return SUB_STATE_ERROR;
  912|      0|            }
  913|       |
  914|       |            /* Fall through */
  915|       |
  916|  2.48k|        case WRITE_STATE_SEND:
  ------------------
  |  Branch (916:9): [True: 0, False: 7.63k]
  ------------------
  917|  2.48k|            if (SSL_CONNECTION_IS_DTLS(s) && st->use_timer) {
  ------------------
  |  |  266|  4.96k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.48k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.48k]
  |  |  ------------------
  ------------------
  |  Branch (917:46): [True: 0, False: 0]
  ------------------
  918|      0|                dtls1_start_timer(s);
  919|      0|            }
  920|  2.48k|            ret = statem_do_write(s);
  921|  2.48k|            if (ret <= 0) {
  ------------------
  |  Branch (921:17): [True: 0, False: 2.48k]
  ------------------
  922|      0|                return SUB_STATE_ERROR;
  923|      0|            }
  924|  2.48k|            st->write_state = WRITE_STATE_POST_WORK;
  925|  2.48k|            st->write_state_work = WORK_MORE_A;
  926|       |            /* Fall through */
  927|       |
  928|  2.48k|        case WRITE_STATE_POST_WORK:
  ------------------
  |  Branch (928:9): [True: 0, False: 7.63k]
  ------------------
  929|  2.48k|            switch (st->write_state_work = post_work(s, st->write_state_work)) {
  ------------------
  |  Branch (929:21): [True: 2.48k, False: 0]
  ------------------
  930|      0|            case WORK_ERROR:
  ------------------
  |  Branch (930:13): [True: 0, False: 2.48k]
  ------------------
  931|      0|                check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  932|       |                /* Fall through */
  933|      0|            case WORK_MORE_A:
  ------------------
  |  Branch (933:13): [True: 0, False: 2.48k]
  ------------------
  934|      0|            case WORK_MORE_B:
  ------------------
  |  Branch (934:13): [True: 0, False: 2.48k]
  ------------------
  935|      0|            case WORK_MORE_C:
  ------------------
  |  Branch (935:13): [True: 0, False: 2.48k]
  ------------------
  936|      0|                return SUB_STATE_ERROR;
  937|       |
  938|  2.48k|            case WORK_FINISHED_CONTINUE:
  ------------------
  |  Branch (938:13): [True: 2.48k, False: 0]
  ------------------
  939|  2.48k|                st->write_state = WRITE_STATE_TRANSITION;
  940|  2.48k|                break;
  941|       |
  942|      0|            case WORK_FINISHED_SWAP:
  ------------------
  |  Branch (942:13): [True: 0, False: 2.48k]
  ------------------
  943|      0|                return SUB_STATE_FINISHED;
  944|       |
  945|      0|            case WORK_FINISHED_STOP:
  ------------------
  |  Branch (945:13): [True: 0, False: 2.48k]
  ------------------
  946|      0|                return SUB_STATE_END_HANDSHAKE;
  947|  2.48k|            }
  948|  2.48k|            break;
  949|       |
  950|  2.48k|        default:
  ------------------
  |  Branch (950:9): [True: 0, False: 7.63k]
  ------------------
  951|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  952|      0|            return SUB_STATE_ERROR;
  953|  7.63k|        }
  954|  7.63k|    }
  955|  2.57k|}
statem.c:statem_do_write:
  741|  2.48k|{
  742|  2.48k|    OSSL_STATEM *st = &s->statem;
  743|       |
  744|  2.48k|    if (st->hand_state == TLS_ST_CW_CHANGE
  ------------------
  |  Branch (744:9): [True: 0, False: 2.48k]
  ------------------
  745|  2.48k|        || st->hand_state == TLS_ST_SW_CHANGE) {
  ------------------
  |  Branch (745:12): [True: 0, False: 2.48k]
  ------------------
  746|      0|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  747|      0|            return dtls1_do_write(s, SSL3_RT_CHANGE_CIPHER_SPEC);
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  748|      0|        else
  749|      0|            return ssl3_do_write(s, SSL3_RT_CHANGE_CIPHER_SPEC);
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  750|  2.48k|    } else {
  751|  2.48k|        return ssl_do_write(s);
  ------------------
  |  | 2187|  2.48k|#define ssl_do_write(s) SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->do_write(s)
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  752|  2.48k|    }
  753|  2.48k|}
statem.c:init_read_state_machine:
  540|  2.48k|{
  541|  2.48k|    OSSL_STATEM *st = &s->statem;
  542|       |
  543|  2.48k|    st->read_state = READ_STATE_HEADER;
  544|  2.48k|}

ossl_statem_client_read_transition:
  228|    155|{
  229|    155|    OSSL_STATEM *st = &s->statem;
  230|    155|    int ske_expected;
  231|       |
  232|       |    /*
  233|       |     * Note that after writing the first ClientHello we don't know what version
  234|       |     * we are going to negotiate yet, so we don't take this branch until later.
  235|       |     */
  236|    155|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|    155|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|    310|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    155|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|    155|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 155, False: 0]
  |  |  ------------------
  |  |  274|    155|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    155|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    310|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 155, False: 0]
  |  |  ------------------
  |  |  275|    155|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|    155|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|    155|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 155]
  |  |  ------------------
  ------------------
  237|      0|        if (!ossl_statem_client13_read_transition(s, mt))
  ------------------
  |  Branch (237:13): [True: 0, False: 0]
  ------------------
  238|      0|            goto err;
  239|      0|        return 1;
  240|      0|    }
  241|       |
  242|    155|    switch (st->hand_state) {
  243|      0|    default:
  ------------------
  |  Branch (243:5): [True: 0, False: 155]
  ------------------
  244|      0|        break;
  245|       |
  246|    155|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (246:5): [True: 155, False: 0]
  ------------------
  247|    155|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|    155|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (247:13): [True: 146, False: 9]
  ------------------
  248|    146|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  249|    146|            return 1;
  250|    146|        }
  251|       |
  252|      9|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|      9|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      9|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      9|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 9]
  |  |  ------------------
  ------------------
  253|      0|            if (mt == DTLS1_MT_HELLO_VERIFY_REQUEST) {
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
  |  Branch (253:17): [True: 0, False: 0]
  ------------------
  254|      0|                st->hand_state = DTLS_ST_CR_HELLO_VERIFY_REQUEST;
  255|      0|                return 1;
  256|      0|            }
  257|      0|        }
  258|      9|        break;
  259|       |
  260|      9|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (260:5): [True: 0, False: 155]
  ------------------
  261|       |        /*
  262|       |         * We've not actually selected TLSv1.3 yet, but we have sent early
  263|       |         * data. The only thing allowed now is a ServerHello or a
  264|       |         * HelloRetryRequest.
  265|       |         */
  266|      0|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|      0|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (266:13): [True: 0, False: 0]
  ------------------
  267|      0|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  268|      0|            return 1;
  269|      0|        }
  270|      0|        break;
  271|       |
  272|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (272:5): [True: 0, False: 155]
  ------------------
  273|      0|        if (s->hit) {
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  ------------------
  274|      0|            if (s->ext.ticket_expected) {
  ------------------
  |  Branch (274:17): [True: 0, False: 0]
  ------------------
  275|      0|                if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (275:21): [True: 0, False: 0]
  ------------------
  276|      0|                    st->hand_state = TLS_ST_CR_SESSION_TICKET;
  277|      0|                    return 1;
  278|      0|                }
  279|      0|            } else if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (279:24): [True: 0, False: 0]
  ------------------
  280|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  281|      0|                return 1;
  282|      0|            }
  283|      0|        } else {
  284|      0|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  285|      0|                && mt == DTLS1_MT_HELLO_VERIFY_REQUEST) {
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
  |  Branch (285:20): [True: 0, False: 0]
  ------------------
  286|      0|                st->hand_state = DTLS_ST_CR_HELLO_VERIFY_REQUEST;
  287|      0|                return 1;
  288|      0|            } else if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (288:24): [True: 0, False: 0]
  ------------------
  289|      0|                && s->ext.session_secret_cb != NULL
  ------------------
  |  Branch (289:20): [True: 0, False: 0]
  ------------------
  290|      0|                && s->session->ext.tick != NULL
  ------------------
  |  Branch (290:20): [True: 0, False: 0]
  ------------------
  291|      0|                && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (291:20): [True: 0, False: 0]
  ------------------
  292|       |                /*
  293|       |                 * Normally, we can tell if the server is resuming the session
  294|       |                 * from the session ID. EAP-FAST (RFC 4851), however, relies on
  295|       |                 * the next server message after the ServerHello to determine if
  296|       |                 * the server is resuming.
  297|       |                 */
  298|      0|                s->hit = 1;
  299|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  300|      0|                return 1;
  301|      0|            } else if (!(s->s3.tmp.new_cipher->algorithm_auth
  ------------------
  |  Branch (301:24): [True: 0, False: 0]
  ------------------
  302|      0|                           & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  116|      0|#define SSL_aNULL 0x00000004U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  124|      0|#define SSL_aSRP 0x00000040U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  120|      0|#define SSL_aPSK 0x00000010U
  ------------------
  303|      0|                if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (303:21): [True: 0, False: 0]
  ------------------
  304|      0|                    st->hand_state = TLS_ST_CR_CERT;
  305|      0|                    return 1;
  306|      0|                }
  307|      0|            } else {
  308|      0|                ske_expected = key_exchange_expected(s);
  309|       |                /* SKE is optional for some PSK ciphersuites */
  310|      0|                if (ske_expected
  ------------------
  |  Branch (310:21): [True: 0, False: 0]
  ------------------
  311|      0|                    || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK)
  ------------------
  |  |  105|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|      0|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
  |  Branch (311:25): [True: 0, False: 0]
  ------------------
  312|      0|                        && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (312:28): [True: 0, False: 0]
  ------------------
  313|      0|                    if (mt == SSL3_MT_SERVER_KEY_EXCHANGE) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (313:25): [True: 0, False: 0]
  ------------------
  314|      0|                        st->hand_state = TLS_ST_CR_KEY_EXCH;
  315|      0|                        return 1;
  316|      0|                    }
  317|      0|                } else if (mt == SSL3_MT_CERTIFICATE_REQUEST
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (317:28): [True: 0, False: 0]
  ------------------
  318|      0|                    && cert_req_allowed(s)) {
  ------------------
  |  Branch (318:24): [True: 0, False: 0]
  ------------------
  319|      0|                    st->hand_state = TLS_ST_CR_CERT_REQ;
  320|      0|                    return 1;
  321|      0|                } else if (mt == SSL3_MT_SERVER_DONE) {
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
  |  Branch (321:28): [True: 0, False: 0]
  ------------------
  322|      0|                    st->hand_state = TLS_ST_CR_SRVR_DONE;
  323|      0|                    return 1;
  324|      0|                }
  325|      0|            }
  326|      0|        }
  327|      0|        break;
  328|       |
  329|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (329:5): [True: 0, False: 155]
  ------------------
  330|      0|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (330:5): [True: 0, False: 155]
  ------------------
  331|       |        /*
  332|       |         * The CertificateStatus message is optional even if
  333|       |         * |ext.status_expected| is set
  334|       |         */
  335|      0|        if (s->ext.status_expected && mt == SSL3_MT_CERTIFICATE_STATUS) {
  ------------------
  |  |  326|      0|#define SSL3_MT_CERTIFICATE_STATUS 22
  ------------------
  |  Branch (335:13): [True: 0, False: 0]
  |  Branch (335:39): [True: 0, False: 0]
  ------------------
  336|      0|            st->hand_state = TLS_ST_CR_CERT_STATUS;
  337|      0|            return 1;
  338|      0|        }
  339|       |        /* Fall through */
  340|       |
  341|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (341:5): [True: 0, False: 155]
  ------------------
  342|      0|        ske_expected = key_exchange_expected(s);
  343|       |        /* SKE is optional for some PSK ciphersuites */
  344|      0|        if (ske_expected || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK) && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  105|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|      0|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
                      if (ske_expected || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK) && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (344:13): [True: 0, False: 0]
  |  Branch (344:30): [True: 0, False: 0]
  |  Branch (344:82): [True: 0, False: 0]
  ------------------
  345|      0|            if (mt == SSL3_MT_SERVER_KEY_EXCHANGE) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (345:17): [True: 0, False: 0]
  ------------------
  346|      0|                st->hand_state = TLS_ST_CR_KEY_EXCH;
  347|      0|                return 1;
  348|      0|            }
  349|      0|            goto err;
  350|      0|        }
  351|       |        /* Fall through */
  352|       |
  353|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (353:5): [True: 0, False: 155]
  ------------------
  354|      0|        if (mt == SSL3_MT_CERTIFICATE_REQUEST) {
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (354:13): [True: 0, False: 0]
  ------------------
  355|      0|            if (cert_req_allowed(s)) {
  ------------------
  |  Branch (355:17): [True: 0, False: 0]
  ------------------
  356|      0|                st->hand_state = TLS_ST_CR_CERT_REQ;
  357|      0|                return 1;
  358|      0|            }
  359|      0|            goto err;
  360|      0|        }
  361|       |        /* Fall through */
  362|       |
  363|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (363:5): [True: 0, False: 155]
  ------------------
  364|      0|        if (mt == SSL3_MT_SERVER_DONE) {
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
  |  Branch (364:13): [True: 0, False: 0]
  ------------------
  365|      0|            st->hand_state = TLS_ST_CR_SRVR_DONE;
  366|      0|            return 1;
  367|      0|        }
  368|      0|        break;
  369|       |
  370|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (370:5): [True: 0, False: 155]
  ------------------
  371|      0|        if (s->ext.ticket_expected) {
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  ------------------
  372|      0|            if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (372:17): [True: 0, False: 0]
  ------------------
  373|      0|                st->hand_state = TLS_ST_CR_SESSION_TICKET;
  374|      0|                return 1;
  375|      0|            }
  376|      0|        } else if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (376:20): [True: 0, False: 0]
  ------------------
  377|      0|            st->hand_state = TLS_ST_CR_CHANGE;
  378|      0|            return 1;
  379|      0|        }
  380|      0|        break;
  381|       |
  382|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (382:5): [True: 0, False: 155]
  ------------------
  383|      0|        if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (383:13): [True: 0, False: 0]
  ------------------
  384|      0|            st->hand_state = TLS_ST_CR_CHANGE;
  385|      0|            return 1;
  386|      0|        }
  387|      0|        break;
  388|       |
  389|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (389:5): [True: 0, False: 155]
  ------------------
  390|      0|        if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (390:13): [True: 0, False: 0]
  ------------------
  391|      0|            st->hand_state = TLS_ST_CR_FINISHED;
  392|      0|            return 1;
  393|      0|        }
  394|      0|        break;
  395|       |
  396|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (396:5): [True: 0, False: 155]
  ------------------
  397|      0|        if (mt == SSL3_MT_HELLO_REQUEST) {
  ------------------
  |  |  312|      0|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
  |  Branch (397:13): [True: 0, False: 0]
  ------------------
  398|      0|            st->hand_state = TLS_ST_CR_HELLO_REQ;
  399|      0|            return 1;
  400|      0|        }
  401|      0|        break;
  402|    155|    }
  403|       |
  404|      9|err:
  405|       |    /* No valid transition found */
  406|      9|    if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  266|     18|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      9|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      9|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 9]
  |  |  ------------------
  ------------------
                  if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (406:38): [True: 0, False: 0]
  ------------------
  407|      0|        BIO *rbio;
  408|       |
  409|       |        /*
  410|       |         * CCS messages don't have a message sequence number so this is probably
  411|       |         * because of an out-of-order CCS. We'll just drop it.
  412|       |         */
  413|      0|        s->init_num = 0;
  414|      0|        s->rwstate = SSL_READING;
  ------------------
  |  |  957|      0|#define SSL_READING 3
  ------------------
  415|      0|        rbio = SSL_get_rbio(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  416|      0|        BIO_clear_retry_flags(rbio);
  ------------------
  |  |  272|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  417|      0|        BIO_set_retry_read(rbio);
  ------------------
  |  |  266|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  418|      0|        return 0;
  419|      0|    }
  420|      9|    SSLfatal(s, SSL3_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  155|      9|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      9|    (ERR_new(),                                                  \
  |  |  |  |  158|      9|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      9|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      9|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  421|      9|    return 0;
  422|      9|}
ossl_statem_client_write_transition:
  539|  5.05k|{
  540|  5.05k|    OSSL_STATEM *st = &s->statem;
  541|       |
  542|       |    /*
  543|       |     * Note that immediately before/after a ClientHello we don't know what
  544|       |     * version we are going to negotiate yet, so we don't take this branch until
  545|       |     * later
  546|       |     */
  547|  5.05k|    if (SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|  5.05k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  10.1k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  5.05k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  5.05k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 5.05k, False: 0]
  |  |  ------------------
  |  |  274|  5.05k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  5.05k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  10.1k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 5.05k, False: 0]
  |  |  ------------------
  |  |  275|  5.05k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  5.05k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  5.05k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 5.05k]
  |  |  ------------------
  ------------------
  548|      0|        return ossl_statem_client13_write_transition(s);
  549|       |
  550|  5.05k|    switch (st->hand_state) {
  551|      0|    default:
  ------------------
  |  Branch (551:5): [True: 0, False: 5.05k]
  ------------------
  552|       |        /* Shouldn't happen */
  553|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  554|      0|        return WRITE_TRAN_ERROR;
  555|       |
  556|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (556:5): [True: 0, False: 5.05k]
  ------------------
  557|      0|        if (!s->renegotiate) {
  ------------------
  |  Branch (557:13): [True: 0, False: 0]
  ------------------
  558|       |            /*
  559|       |             * We haven't requested a renegotiation ourselves so we must have
  560|       |             * received a message from the server. Better read it.
  561|       |             */
  562|      0|            return WRITE_TRAN_FINISHED;
  563|      0|        }
  564|       |        /* Renegotiation */
  565|       |        /* fall thru */
  566|  2.57k|    case TLS_ST_BEFORE:
  ------------------
  |  Branch (566:5): [True: 2.57k, False: 2.48k]
  ------------------
  567|  2.57k|        st->hand_state = TLS_ST_CW_CLNT_HELLO;
  568|  2.57k|        return WRITE_TRAN_CONTINUE;
  569|       |
  570|  2.48k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (570:5): [True: 2.48k, False: 2.57k]
  ------------------
  571|  2.48k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (571:13): [True: 0, False: 2.48k]
  ------------------
  572|      0|            && !SSL_IS_QUIC_HANDSHAKE(s)) {
  ------------------
  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  ------------------
  |  Branch (572:16): [True: 0, False: 0]
  ------------------
  573|       |            /*
  574|       |             * We are assuming this is a TLSv1.3 connection, although we haven't
  575|       |             * actually selected a version yet.
  576|       |             */
  577|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0)
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (577:17): [True: 0, False: 0]
  ------------------
  578|      0|                st->hand_state = TLS_ST_CW_CHANGE;
  579|      0|            else
  580|      0|                st->hand_state = TLS_ST_EARLY_DATA;
  581|      0|            return WRITE_TRAN_CONTINUE;
  582|      0|        }
  583|       |        /*
  584|       |         * No transition at the end of writing because we don't know what
  585|       |         * we will be sent
  586|       |         */
  587|  2.48k|        s->ts_msg_write = ossl_time_now();
  588|  2.48k|        return WRITE_TRAN_FINISHED;
  589|       |
  590|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (590:5): [True: 0, False: 5.05k]
  ------------------
  591|       |        /*
  592|       |         * We only get here in TLSv1.3. We just received an HRR, so issue a
  593|       |         * CCS unless middlebox compat mode is off, or we already issued one
  594|       |         * because we did early data.
  595|       |         */
  596|      0|        if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (596:13): [True: 0, False: 0]
  ------------------
  597|      0|            && s->early_data_state != SSL_EARLY_DATA_FINISHED_WRITING)
  ------------------
  |  Branch (597:16): [True: 0, False: 0]
  ------------------
  598|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  599|      0|        else
  600|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  601|      0|        return WRITE_TRAN_CONTINUE;
  602|       |
  603|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (603:5): [True: 0, False: 5.05k]
  ------------------
  604|      0|        s->ts_msg_write = ossl_time_now();
  605|      0|        return WRITE_TRAN_FINISHED;
  606|       |
  607|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (607:5): [True: 0, False: 5.05k]
  ------------------
  608|      0|        st->hand_state = TLS_ST_CW_CLNT_HELLO;
  609|      0|        return WRITE_TRAN_CONTINUE;
  610|       |
  611|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (611:5): [True: 0, False: 5.05k]
  ------------------
  612|      0|        s->ts_msg_read = ossl_time_now();
  613|      0|        if (s->s3.tmp.cert_req)
  ------------------
  |  Branch (613:13): [True: 0, False: 0]
  ------------------
  614|      0|            st->hand_state = TLS_ST_CW_CERT;
  615|      0|        else
  616|      0|            st->hand_state = TLS_ST_CW_KEY_EXCH;
  617|      0|        return WRITE_TRAN_CONTINUE;
  618|       |
  619|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (619:5): [True: 0, False: 5.05k]
  ------------------
  620|      0|        st->hand_state = TLS_ST_CW_KEY_EXCH;
  621|      0|        return WRITE_TRAN_CONTINUE;
  622|       |
  623|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (623:5): [True: 0, False: 5.05k]
  ------------------
  624|       |        /*
  625|       |         * For TLS, cert_req is set to 2, so a cert chain of nothing is
  626|       |         * sent, but no verify packet is sent
  627|       |         */
  628|       |        /*
  629|       |         * XXX: For now, we do not support client authentication in ECDH
  630|       |         * cipher suites with ECDH (rather than ECDSA) certificates. We
  631|       |         * need to skip the certificate verify message when client's
  632|       |         * ECDH public key is sent inside the client certificate.
  633|       |         */
  634|      0|        if (s->s3.tmp.cert_req == 1) {
  ------------------
  |  Branch (634:13): [True: 0, False: 0]
  ------------------
  635|      0|            st->hand_state = TLS_ST_CW_CERT_VRFY;
  636|      0|        } else {
  637|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  638|      0|        }
  639|      0|        if (s->s3.flags & TLS1_FLAGS_SKIP_CERT_VERIFY) {
  ------------------
  |  |  293|      0|#define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010
  ------------------
  |  Branch (639:13): [True: 0, False: 0]
  ------------------
  640|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  641|      0|        }
  642|      0|        return WRITE_TRAN_CONTINUE;
  643|       |
  644|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (644:5): [True: 0, False: 5.05k]
  ------------------
  645|      0|        st->hand_state = TLS_ST_CW_CHANGE;
  646|      0|        return WRITE_TRAN_CONTINUE;
  647|       |
  648|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (648:5): [True: 0, False: 5.05k]
  ------------------
  649|      0|        if (s->hello_retry_request == SSL_HRR_PENDING) {
  ------------------
  |  Branch (649:13): [True: 0, False: 0]
  ------------------
  650|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  651|      0|        } else if (s->early_data_state == SSL_EARLY_DATA_CONNECTING) {
  ------------------
  |  Branch (651:20): [True: 0, False: 0]
  ------------------
  652|      0|            st->hand_state = TLS_ST_EARLY_DATA;
  653|      0|        } else {
  654|       |#if defined(OPENSSL_NO_NEXTPROTONEG)
  655|       |            st->hand_state = TLS_ST_CW_FINISHED;
  656|       |#else
  657|      0|            if (!SSL_CONNECTION_IS_DTLS(s) && s->s3.npn_seen)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (657:17): [True: 0, False: 0]
  |  Branch (657:47): [True: 0, False: 0]
  ------------------
  658|      0|                st->hand_state = TLS_ST_CW_NEXT_PROTO;
  659|      0|            else
  660|      0|                st->hand_state = TLS_ST_CW_FINISHED;
  661|      0|#endif
  662|      0|        }
  663|      0|        return WRITE_TRAN_CONTINUE;
  664|       |
  665|      0|#if !defined(OPENSSL_NO_NEXTPROTONEG)
  666|      0|    case TLS_ST_CW_NEXT_PROTO:
  ------------------
  |  Branch (666:5): [True: 0, False: 5.05k]
  ------------------
  667|      0|        st->hand_state = TLS_ST_CW_FINISHED;
  668|      0|        return WRITE_TRAN_CONTINUE;
  669|      0|#endif
  670|       |
  671|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (671:5): [True: 0, False: 5.05k]
  ------------------
  672|      0|        if (s->hit) {
  ------------------
  |  Branch (672:13): [True: 0, False: 0]
  ------------------
  673|      0|            st->hand_state = TLS_ST_OK;
  674|      0|            return WRITE_TRAN_CONTINUE;
  675|      0|        } else {
  676|      0|            return WRITE_TRAN_FINISHED;
  677|      0|        }
  678|       |
  679|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (679:5): [True: 0, False: 5.05k]
  ------------------
  680|      0|        if (s->hit) {
  ------------------
  |  Branch (680:13): [True: 0, False: 0]
  ------------------
  681|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  682|      0|            return WRITE_TRAN_CONTINUE;
  683|      0|        } else {
  684|      0|            st->hand_state = TLS_ST_OK;
  685|      0|            return WRITE_TRAN_CONTINUE;
  686|      0|        }
  687|       |
  688|      0|    case TLS_ST_CR_HELLO_REQ:
  ------------------
  |  Branch (688:5): [True: 0, False: 5.05k]
  ------------------
  689|       |        /*
  690|       |         * If we can renegotiate now then do so, otherwise wait for a more
  691|       |         * convenient time.
  692|       |         */
  693|      0|        if (ssl3_renegotiate_check(SSL_CONNECTION_GET_SSL(s), 1)) {
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (693:13): [True: 0, False: 0]
  ------------------
  694|      0|            if (!tls_setup_handshake(s)) {
  ------------------
  |  Branch (694:17): [True: 0, False: 0]
  ------------------
  695|       |                /* SSLfatal() already called */
  696|      0|                return WRITE_TRAN_ERROR;
  697|      0|            }
  698|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  699|      0|            return WRITE_TRAN_CONTINUE;
  700|      0|        }
  701|      0|        st->hand_state = TLS_ST_OK;
  702|      0|        return WRITE_TRAN_CONTINUE;
  703|  5.05k|    }
  704|  5.05k|}
ossl_statem_client_pre_work:
  711|  2.57k|{
  712|  2.57k|    OSSL_STATEM *st = &s->statem;
  713|       |
  714|  2.57k|    switch (st->hand_state) {
  715|      0|    default:
  ------------------
  |  Branch (715:5): [True: 0, False: 2.57k]
  ------------------
  716|       |        /* No pre work to be done */
  717|      0|        break;
  718|       |
  719|  2.57k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (719:5): [True: 2.57k, False: 0]
  ------------------
  720|  2.57k|        s->shutdown = 0;
  721|  2.57k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.57k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.57k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.57k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.57k]
  |  |  ------------------
  ------------------
  722|       |            /* every DTLS ClientHello resets Finished MAC */
  723|      0|            if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (723:17): [True: 0, False: 0]
  ------------------
  724|       |                /* SSLfatal() already called */
  725|      0|                return WORK_ERROR;
  726|      0|            }
  727|  2.57k|        } else if (s->ext.early_data == SSL_EARLY_DATA_REJECTED) {
  ------------------
  |  | 2073|  2.57k|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  |  Branch (727:20): [True: 0, False: 2.57k]
  ------------------
  728|       |            /*
  729|       |             * This must be a second ClientHello after an HRR following an
  730|       |             * earlier rejected attempt to send early data. Since we were
  731|       |             * previously encrypting the early data we now need to reset the
  732|       |             * write record layer in order to write in plaintext again.
  733|       |             */
  734|      0|            if (!ssl_set_new_record_layer(s,
  ------------------
  |  Branch (734:17): [True: 0, False: 0]
  ------------------
  735|      0|                    TLS_ANY_VERSION,
  ------------------
  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  ------------------
  736|      0|                    OSSL_RECORD_DIRECTION_WRITE,
  ------------------
  |  |   43|      0|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  737|      0|                    OSSL_RECORD_PROTECTION_LEVEL_NONE,
  ------------------
  |  | 2923|      0|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  738|      0|                    NULL, 0, NULL, 0, NULL, 0, NULL, 0,
  739|      0|                    NULL, 0, NID_undef, NULL, NULL,
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  740|      0|                    NULL)) {
  741|       |                /* SSLfatal already called */
  742|      0|                return WORK_ERROR;
  743|      0|            }
  744|      0|        }
  745|  2.57k|        break;
  746|       |
  747|  2.57k|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (747:5): [True: 0, False: 2.57k]
  ------------------
  748|      0|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  749|      0|            if (s->hit) {
  ------------------
  |  Branch (749:17): [True: 0, False: 0]
  ------------------
  750|       |                /*
  751|       |                 * We're into the last flight so we don't retransmit these
  752|       |                 * messages unless we need to.
  753|       |                 */
  754|      0|                st->use_timer = 0;
  755|      0|            }
  756|       |#ifndef OPENSSL_NO_SCTP
  757|       |            if (BIO_dgram_is_sctp(SSL_get_wbio(SSL_CONNECTION_GET_SSL(s)))) {
  758|       |                /* Calls SSLfatal() as required */
  759|       |                return dtls_wait_for_dry(s);
  760|       |            }
  761|       |#endif
  762|      0|        }
  763|      0|        break;
  764|       |
  765|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (765:5): [True: 0, False: 2.57k]
  ------------------
  766|       |        /*
  767|       |         * If we've been called by SSL_do_handshake()/SSL_write(), or we did not
  768|       |         * attempt to write early data before calling SSL_read() then we press
  769|       |         * on with the handshake. Otherwise we pause here.
  770|       |         */
  771|      0|        if (s->early_data_state == SSL_EARLY_DATA_FINISHED_WRITING
  ------------------
  |  Branch (771:13): [True: 0, False: 0]
  ------------------
  772|      0|            || s->early_data_state == SSL_EARLY_DATA_NONE)
  ------------------
  |  Branch (772:16): [True: 0, False: 0]
  ------------------
  773|      0|            return WORK_FINISHED_CONTINUE;
  774|       |        /* Fall through */
  775|       |
  776|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (776:5): [True: 0, False: 2.57k]
  ------------------
  777|      0|        return tls_finish_handshake(s, wst, 0, 1);
  778|       |
  779|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (779:5): [True: 0, False: 2.57k]
  ------------------
  780|       |        /* Calls SSLfatal() as required */
  781|      0|        return tls_finish_handshake(s, wst, 1, 1);
  782|  2.57k|    }
  783|       |
  784|  2.57k|    return WORK_FINISHED_CONTINUE;
  785|  2.57k|}
ossl_statem_client_post_work:
  792|  2.48k|{
  793|  2.48k|    OSSL_STATEM *st = &s->statem;
  794|  2.48k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  795|       |
  796|  2.48k|    s->init_num = 0;
  797|       |
  798|  2.48k|    switch (st->hand_state) {
  799|      0|    default:
  ------------------
  |  Branch (799:5): [True: 0, False: 2.48k]
  ------------------
  800|       |        /* No post work to be done */
  801|      0|        break;
  802|       |
  803|  2.48k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (803:5): [True: 2.48k, False: 0]
  ------------------
  804|  2.48k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (804:13): [True: 0, False: 2.48k]
  ------------------
  805|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (805:16): [True: 0, False: 0]
  ------------------
  806|       |            /*
  807|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  808|       |             * cipher state function associated with the SSL_METHOD. Instead
  809|       |             * we call tls13_change_cipher_state() directly.
  810|       |             */
  811|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0) {
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (811:17): [True: 0, False: 0]
  ------------------
  812|      0|                if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (812:21): [True: 0, False: 0]
  ------------------
  813|      0|                        SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  346|      0|#define SSL3_CC_EARLY 0x040
  ------------------
                                      SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  814|       |                    /* SSLfatal() already called */
  815|      0|                    return WORK_ERROR;
  816|      0|                }
  817|      0|            }
  818|       |            /* else we're in compat mode so we delay flushing until after CCS */
  819|  2.48k|        } else if (!statem_flush(s)) {
  ------------------
  |  Branch (819:20): [True: 0, False: 2.48k]
  ------------------
  820|      0|            return WORK_MORE_A;
  821|      0|        }
  822|       |
  823|  2.48k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.48k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.48k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.48k]
  |  |  ------------------
  ------------------
  824|       |            /* Treat the next message as the first packet */
  825|      0|            s->first_packet = 1;
  826|      0|        }
  827|  2.48k|        break;
  828|       |
  829|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (829:5): [True: 0, False: 2.48k]
  ------------------
  830|      0|        if (tls_client_key_exchange_post_work(s) == 0) {
  ------------------
  |  Branch (830:13): [True: 0, False: 0]
  ------------------
  831|       |            /* SSLfatal() already called */
  832|      0|            return WORK_ERROR;
  833|      0|        }
  834|      0|        break;
  835|       |
  836|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (836:5): [True: 0, False: 2.48k]
  ------------------
  837|      0|        if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  838|      0|            || s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (838:16): [True: 0, False: 0]
  ------------------
  839|      0|            break;
  840|      0|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (840:13): [True: 0, False: 0]
  ------------------
  841|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (841:16): [True: 0, False: 0]
  ------------------
  842|       |            /*
  843|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  844|       |             * cipher state function associated with the SSL_METHOD. Instead
  845|       |             * we call tls13_change_cipher_state() directly.
  846|       |             */
  847|      0|            if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (847:17): [True: 0, False: 0]
  ------------------
  848|      0|                    SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE))
  ------------------
  |  |  346|      0|#define SSL3_CC_EARLY 0x040
  ------------------
                                  SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE))
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  849|      0|                return WORK_ERROR;
  850|      0|            break;
  851|      0|        }
  852|      0|        s->session->cipher = s->s3.tmp.new_cipher;
  853|       |#ifdef OPENSSL_NO_COMP
  854|       |        s->session->compress_meth = 0;
  855|       |#else
  856|      0|        if (s->s3.tmp.new_compression == NULL)
  ------------------
  |  Branch (856:13): [True: 0, False: 0]
  ------------------
  857|      0|            s->session->compress_meth = 0;
  858|      0|        else
  859|      0|            s->session->compress_meth = s->s3.tmp.new_compression->id;
  860|      0|#endif
  861|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)) {
  ------------------
  |  Branch (861:13): [True: 0, False: 0]
  ------------------
  862|       |            /* SSLfatal() already called */
  863|      0|            return WORK_ERROR;
  864|      0|        }
  865|       |
  866|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (866:13): [True: 0, False: 0]
  ------------------
  867|      0|                SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  868|       |            /* SSLfatal() already called */
  869|      0|            return WORK_ERROR;
  870|      0|        }
  871|       |
  872|       |#ifndef OPENSSL_NO_SCTP
  873|       |        if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
  874|       |            /*
  875|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  876|       |             * no SCTP used.
  877|       |             */
  878|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  879|       |                0, NULL);
  880|       |        }
  881|       |#endif
  882|      0|        break;
  883|       |
  884|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (884:5): [True: 0, False: 2.48k]
  ------------------
  885|       |#ifndef OPENSSL_NO_SCTP
  886|       |        if (wst == WORK_MORE_A && SSL_CONNECTION_IS_DTLS(s) && s->hit == 0) {
  887|       |            /*
  888|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  889|       |             * no SCTP used.
  890|       |             */
  891|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  892|       |                0, NULL);
  893|       |        }
  894|       |#endif
  895|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (895:13): [True: 0, False: 0]
  ------------------
  896|      0|            return WORK_MORE_B;
  897|       |
  898|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  899|      0|            if (!tls13_save_handshake_digest_for_pha(s)) {
  ------------------
  |  Branch (899:17): [True: 0, False: 0]
  ------------------
  900|       |                /* SSLfatal() already called */
  901|      0|                return WORK_ERROR;
  902|      0|            }
  903|      0|            if (s->post_handshake_auth != SSL_PHA_REQUESTED) {
  ------------------
  |  Branch (903:17): [True: 0, False: 0]
  ------------------
  904|      0|                if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (904:21): [True: 0, False: 0]
  ------------------
  905|      0|                        SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  348|      0|#define SSL3_CC_APPLICATION 0x100
  ------------------
                                      SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  906|       |                    /* SSLfatal() already called */
  907|      0|                    return WORK_ERROR;
  908|      0|                }
  909|       |                /*
  910|       |                 * For QUIC we deferred setting up these keys until now so
  911|       |                 * that we can ensure write keys are always set up before read
  912|       |                 * keys.
  913|       |                 */
  914|      0|                if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (311:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  915|      0|                    && !ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (915:24): [True: 0, False: 0]
  ------------------
  916|      0|                        SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  348|      0|#define SSL3_CC_APPLICATION 0x100
  ------------------
                                      SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  351|      0|#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|      0|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
  917|       |                    /* SSLfatal() already called */
  918|      0|                    return WORK_ERROR;
  919|      0|                }
  920|      0|            }
  921|      0|        }
  922|      0|        break;
  923|       |
  924|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (924:5): [True: 0, False: 2.48k]
  ------------------
  925|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (925:13): [True: 0, False: 0]
  ------------------
  926|      0|            return WORK_MORE_A;
  927|      0|        if (!tls13_update_key(s, 1)) {
  ------------------
  |  Branch (927:13): [True: 0, False: 0]
  ------------------
  928|       |            /* SSLfatal() already called */
  929|      0|            return WORK_ERROR;
  930|      0|        }
  931|      0|        break;
  932|  2.48k|    }
  933|       |
  934|  2.48k|    return WORK_FINISHED_CONTINUE;
  935|  2.48k|}
ossl_statem_client_construct_message:
  947|  2.57k|{
  948|  2.57k|    OSSL_STATEM *st = &s->statem;
  949|       |
  950|  2.57k|    switch (st->hand_state) {
  951|      0|    default:
  ------------------
  |  Branch (951:5): [True: 0, False: 2.57k]
  ------------------
  952|       |        /* Shouldn't happen */
  953|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_HANDSHAKE_STATE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  954|      0|        return 0;
  955|       |
  956|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (956:5): [True: 0, False: 2.57k]
  ------------------
  957|      0|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  958|      0|            *confunc = dtls_construct_change_cipher_spec;
  959|      0|        else
  960|      0|            *confunc = tls_construct_change_cipher_spec;
  961|      0|        *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  962|      0|        break;
  963|       |
  964|  2.57k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (964:5): [True: 2.57k, False: 0]
  ------------------
  965|  2.57k|        *confunc = tls_construct_client_hello;
  966|  2.57k|        *mt = SSL3_MT_CLIENT_HELLO;
  ------------------
  |  |  313|  2.57k|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
  967|  2.57k|        break;
  968|       |
  969|      0|    case TLS_ST_CW_END_OF_EARLY_DATA:
  ------------------
  |  Branch (969:5): [True: 0, False: 2.57k]
  ------------------
  970|      0|        *confunc = tls_construct_end_of_early_data;
  971|      0|        *mt = SSL3_MT_END_OF_EARLY_DATA;
  ------------------
  |  |  316|      0|#define SSL3_MT_END_OF_EARLY_DATA 5
  ------------------
  972|      0|        break;
  973|       |
  974|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (974:5): [True: 0, False: 2.57k]
  ------------------
  975|      0|        *confunc = NULL;
  976|      0|        *mt = SSL3_MT_DUMMY;
  ------------------
  |  |   41|      0|#define SSL3_MT_DUMMY -1
  ------------------
  977|      0|        break;
  978|       |
  979|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (979:5): [True: 0, False: 2.57k]
  ------------------
  980|      0|        *confunc = tls_construct_client_certificate;
  981|      0|        *mt = SSL3_MT_CERTIFICATE;
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  982|      0|        break;
  983|       |
  984|       |#ifndef OPENSSL_NO_COMP_ALG
  985|       |    case TLS_ST_CW_COMP_CERT:
  986|       |        *confunc = tls_construct_client_compressed_certificate;
  987|       |        *mt = SSL3_MT_COMPRESSED_CERTIFICATE;
  988|       |        break;
  989|       |#endif
  990|       |
  991|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (991:5): [True: 0, False: 2.57k]
  ------------------
  992|      0|        *confunc = tls_construct_client_key_exchange;
  993|      0|        *mt = SSL3_MT_CLIENT_KEY_EXCHANGE;
  ------------------
  |  |  323|      0|#define SSL3_MT_CLIENT_KEY_EXCHANGE 16
  ------------------
  994|      0|        break;
  995|       |
  996|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (996:5): [True: 0, False: 2.57k]
  ------------------
  997|      0|        *confunc = tls_construct_cert_verify;
  998|      0|        *mt = SSL3_MT_CERTIFICATE_VERIFY;
  ------------------
  |  |  322|      0|#define SSL3_MT_CERTIFICATE_VERIFY 15
  ------------------
  999|      0|        break;
 1000|       |
 1001|      0|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 1002|      0|    case TLS_ST_CW_NEXT_PROTO:
  ------------------
  |  Branch (1002:5): [True: 0, False: 2.57k]
  ------------------
 1003|      0|        *confunc = tls_construct_next_proto;
 1004|      0|        *mt = SSL3_MT_NEXT_PROTO;
  ------------------
  |  |  331|      0|#define SSL3_MT_NEXT_PROTO 67
  ------------------
 1005|      0|        break;
 1006|      0|#endif
 1007|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (1007:5): [True: 0, False: 2.57k]
  ------------------
 1008|      0|        *confunc = tls_construct_finished;
 1009|      0|        *mt = SSL3_MT_FINISHED;
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
 1010|      0|        break;
 1011|       |
 1012|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (1012:5): [True: 0, False: 2.57k]
  ------------------
 1013|      0|        *confunc = tls_construct_key_update;
 1014|      0|        *mt = SSL3_MT_KEY_UPDATE;
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
 1015|      0|        break;
 1016|  2.57k|    }
 1017|       |
 1018|  2.57k|    return 1;
 1019|  2.57k|}
ossl_statem_client_max_message_size:
 1026|    146|{
 1027|    146|    OSSL_STATEM *st = &s->statem;
 1028|       |
 1029|    146|    switch (st->hand_state) {
 1030|      0|    default:
  ------------------
  |  Branch (1030:5): [True: 0, False: 146]
  ------------------
 1031|       |        /* Shouldn't happen */
 1032|      0|        return 0;
 1033|       |
 1034|    146|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1034:5): [True: 146, False: 0]
  ------------------
 1035|    146|        return SERVER_HELLO_MAX_LENGTH;
  ------------------
  |  |   32|    146|#define SERVER_HELLO_MAX_LENGTH 65607
  ------------------
 1036|       |
 1037|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1037:5): [True: 0, False: 146]
  ------------------
 1038|      0|        return HELLO_VERIFY_REQUEST_MAX_LENGTH;
  ------------------
  |  |   20|      0|#define HELLO_VERIFY_REQUEST_MAX_LENGTH 258
  ------------------
 1039|       |
 1040|      0|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (1040:5): [True: 0, False: 146]
  ------------------
 1041|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1041:5): [True: 0, False: 146]
  ------------------
 1042|      0|        return s->max_cert_list;
 1043|       |
 1044|      0|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1044:5): [True: 0, False: 146]
  ------------------
 1045|      0|        return CERTIFICATE_VERIFY_MAX_LENGTH;
  ------------------
  |  |   35|      0|#define CERTIFICATE_VERIFY_MAX_LENGTH 65539
  ------------------
 1046|       |
 1047|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (1047:5): [True: 0, False: 146]
  ------------------
 1048|      0|        return SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1049|       |
 1050|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (1050:5): [True: 0, False: 146]
  ------------------
 1051|      0|        return SERVER_KEY_EXCH_MAX_LENGTH;
  ------------------
  |  |   26|      0|#define SERVER_KEY_EXCH_MAX_LENGTH 102400
  ------------------
 1052|       |
 1053|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1053:5): [True: 0, False: 146]
  ------------------
 1054|       |        /*
 1055|       |         * Set to s->max_cert_list for compatibility with previous releases. In
 1056|       |         * practice these messages can get quite long if servers are configured
 1057|       |         * to provide a long list of acceptable CAs
 1058|       |         */
 1059|      0|        return s->max_cert_list;
 1060|       |
 1061|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (1061:5): [True: 0, False: 146]
  ------------------
 1062|      0|        return SERVER_HELLO_DONE_MAX_LENGTH;
  ------------------
  |  |   27|      0|#define SERVER_HELLO_DONE_MAX_LENGTH 0
  ------------------
 1063|       |
 1064|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (1064:5): [True: 0, False: 146]
  ------------------
 1065|      0|        if (s->version == DTLS1_BAD_VER)
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (1065:13): [True: 0, False: 0]
  ------------------
 1066|      0|            return 3;
 1067|      0|        return CCS_MAX_LENGTH;
  ------------------
  |  |   29|      0|#define CCS_MAX_LENGTH 1
  ------------------
 1068|       |
 1069|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (1069:5): [True: 0, False: 146]
  ------------------
 1070|      0|        return (SSL_CONNECTION_IS_TLS13(s)) ? SESSION_TICKET_MAX_LENGTH_TLS13
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                      return (SSL_CONNECTION_IS_TLS13(s)) ? SESSION_TICKET_MAX_LENGTH_TLS13
  ------------------
  |  |   24|      0|#define SESSION_TICKET_MAX_LENGTH_TLS13 131338
  ------------------
 1071|      0|                                            : SESSION_TICKET_MAX_LENGTH_TLS12;
  ------------------
  |  |   25|      0|#define SESSION_TICKET_MAX_LENGTH_TLS12 65541
  ------------------
 1072|       |
 1073|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (1073:5): [True: 0, False: 146]
  ------------------
 1074|      0|        return FINISHED_MAX_LENGTH;
  ------------------
  |  |   38|      0|#define FINISHED_MAX_LENGTH 64
  ------------------
 1075|       |
 1076|      0|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1076:5): [True: 0, False: 146]
  ------------------
 1077|      0|        return ENCRYPTED_EXTENSIONS_MAX_LENGTH;
  ------------------
  |  |   23|      0|#define ENCRYPTED_EXTENSIONS_MAX_LENGTH 20000
  ------------------
 1078|       |
 1079|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (1079:5): [True: 0, False: 146]
  ------------------
 1080|      0|        return KEY_UPDATE_MAX_LENGTH;
  ------------------
  |  |   28|      0|#define KEY_UPDATE_MAX_LENGTH 1
  ------------------
 1081|    146|    }
 1082|    146|}
ossl_statem_client_process_message:
 1089|     87|{
 1090|     87|    OSSL_STATEM *st = &s->statem;
 1091|       |
 1092|     87|    switch (st->hand_state) {
 1093|      0|    default:
  ------------------
  |  Branch (1093:5): [True: 0, False: 87]
  ------------------
 1094|       |        /* Shouldn't happen */
 1095|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1096|      0|        return MSG_PROCESS_ERROR;
 1097|       |
 1098|     87|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1098:5): [True: 87, False: 0]
  ------------------
 1099|     87|        return tls_process_server_hello(s, pkt);
 1100|       |
 1101|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1101:5): [True: 0, False: 87]
  ------------------
 1102|      0|        return dtls_process_hello_verify(s, pkt);
 1103|       |
 1104|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1104:5): [True: 0, False: 87]
  ------------------
 1105|      0|        return tls_process_server_certificate(s, pkt);
 1106|       |
 1107|       |#ifndef OPENSSL_NO_COMP_ALG
 1108|       |    case TLS_ST_CR_COMP_CERT:
 1109|       |        return tls_process_server_compressed_certificate(s, pkt);
 1110|       |#endif
 1111|       |
 1112|      0|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1112:5): [True: 0, False: 87]
  ------------------
 1113|      0|        return tls_process_cert_verify(s, pkt);
 1114|       |
 1115|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (1115:5): [True: 0, False: 87]
  ------------------
 1116|      0|        return tls_process_cert_status(s, pkt);
 1117|       |
 1118|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (1118:5): [True: 0, False: 87]
  ------------------
 1119|      0|        return tls_process_key_exchange(s, pkt);
 1120|       |
 1121|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1121:5): [True: 0, False: 87]
  ------------------
 1122|      0|        return tls_process_certificate_request(s, pkt);
 1123|       |
 1124|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (1124:5): [True: 0, False: 87]
  ------------------
 1125|      0|        return tls_process_server_done(s, pkt);
 1126|       |
 1127|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (1127:5): [True: 0, False: 87]
  ------------------
 1128|      0|        return tls_process_change_cipher_spec(s, pkt);
 1129|       |
 1130|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (1130:5): [True: 0, False: 87]
  ------------------
 1131|      0|        return tls_process_new_session_ticket(s, pkt);
 1132|       |
 1133|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (1133:5): [True: 0, False: 87]
  ------------------
 1134|      0|        return tls_process_finished(s, pkt);
 1135|       |
 1136|      0|    case TLS_ST_CR_HELLO_REQ:
  ------------------
  |  Branch (1136:5): [True: 0, False: 87]
  ------------------
 1137|      0|        return tls_process_hello_req(s, pkt);
 1138|       |
 1139|      0|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1139:5): [True: 0, False: 87]
  ------------------
 1140|      0|        return tls_process_encrypted_extensions(s, pkt);
 1141|       |
 1142|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (1142:5): [True: 0, False: 87]
  ------------------
 1143|      0|        return tls_process_key_update(s, pkt);
 1144|     87|    }
 1145|     87|}
tls_construct_client_hello:
 1214|  2.57k|{
 1215|  2.57k|    WPACKET inner; /* "fake" pkt for inner */
 1216|  2.57k|    BUF_MEM *inner_mem = NULL;
 1217|  2.57k|    PACKET rpkt; /* we'll decode back the inner ch to help make the outer */
 1218|  2.57k|    SSL_SESSION *sess = NULL;
 1219|  2.57k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.57k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1220|  2.57k|    size_t sess_id_len = 0, innerlen = 0;
 1221|  2.57k|    int mt = SSL3_MT_CLIENT_HELLO, rv = 0;
  ------------------
  |  |  313|  2.57k|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
 1222|  2.57k|    OSSL_HPKE_SUITE suite;
 1223|  2.57k|    OSSL_ECHSTORE_ENTRY *ee = NULL;
 1224|       |    /* Work out what SSL/TLS/DTLS version to use */
 1225|  2.57k|    int protverr = ssl_set_client_hello_version(s);
 1226|       |
 1227|  2.57k|    if (protverr != 0) {
  ------------------
  |  Branch (1227:9): [True: 0, False: 2.57k]
  ------------------
 1228|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, protverr);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1229|      0|        return 0;
 1230|      0|    }
 1231|       |    /* If we're not really attempting ECH, just call existing code.  */
 1232|  2.57k|    if (s->ext.ech.es == NULL)
  ------------------
  |  Branch (1232:9): [True: 2.57k, False: 0]
  ------------------
 1233|  2.57k|        return tls_construct_client_hello_aux(s, pkt);
 1234|       |    /* note version we're attempting and that an attempt is being made */
 1235|      0|    if (s->ext.ech.es->entries != NULL) {
  ------------------
  |  Branch (1235:9): [True: 0, False: 0]
  ------------------
 1236|      0|        if (ossl_ech_pick_matching_cfg(s, &ee, &suite) != 1 || ee == NULL) {
  ------------------
  |  Branch (1236:13): [True: 0, False: 0]
  |  Branch (1236:64): [True: 0, False: 0]
  ------------------
 1237|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_UNSUPPORTED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1238|      0|            return 0;
 1239|      0|        }
 1240|      0|        if (ee->version != OSSL_ECH_RFC9849_VERSION) {
  ------------------
  |  |   45|      0|#define OSSL_ECH_RFC9849_VERSION 0xfe0d /* official ECHConfig version */
  ------------------
  |  Branch (1240:13): [True: 0, False: 0]
  ------------------
 1241|       |            /* we only support that version for now */
 1242|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_UNSUPPORTED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1243|      0|            return 0;
 1244|      0|        }
 1245|      0|        s->ext.ech.attempted_type = TLSEXT_TYPE_ech;
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
 1246|      0|        s->ext.ech.attempted_cid = ee->config_id;
 1247|      0|        s->ext.ech.attempted = 1;
 1248|      0|        if (s->ext.ech.outer_hostname == NULL && ee->public_name != NULL) {
  ------------------
  |  Branch (1248:13): [True: 0, False: 0]
  |  Branch (1248:50): [True: 0, False: 0]
  ------------------
 1249|      0|            s->ext.ech.outer_hostname = OPENSSL_strdup((char *)ee->public_name);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1250|      0|            if (s->ext.ech.outer_hostname == NULL) {
  ------------------
  |  Branch (1250:17): [True: 0, False: 0]
  ------------------
 1251|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1252|      0|                return 0;
 1253|      0|            }
 1254|      0|        }
 1255|      0|    }
 1256|       |    /* If doing real ECH and application requested GREASE too, over-ride that */
 1257|      0|    if (s->ext.ech.grease == OSSL_ECH_IS_GREASE && s->ext.ech.attempted == 1)
  ------------------
  |  |   37|      0|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (1257:9): [True: 0, False: 0]
  |  Branch (1257:52): [True: 0, False: 0]
  ------------------
 1258|      0|        s->ext.ech.grease = OSSL_ECH_NOT_GREASE;
  ------------------
  |  |   36|      0|#define OSSL_ECH_NOT_GREASE 0 /* when decryption worked */
  ------------------
 1259|       |    /*
 1260|       |     * Session ID is handled "oddly" by not being encoded into inner CH (an
 1261|       |     * optimisation) so is the same for both inner and outer.
 1262|       |     */
 1263|      0|    sess = s->session;
 1264|      0|    if (sess == NULL
  ------------------
  |  Branch (1264:9): [True: 0, False: 0]
  ------------------
 1265|      0|        || !ssl_version_supported(s, sess->ssl_version, NULL)
  ------------------
  |  Branch (1265:12): [True: 0, False: 0]
  ------------------
 1266|      0|        || !SSL_SESSION_is_resumable(sess)) {
  ------------------
  |  Branch (1266:12): [True: 0, False: 0]
  ------------------
 1267|      0|        if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1267:13): [True: 0, False: 0]
  ------------------
 1268|      0|            && !ssl_get_new_session(s, 0))
  ------------------
  |  Branch (1268:16): [True: 0, False: 0]
  ------------------
 1269|      0|            return 0; /* SSLfatal() already called */
 1270|      0|    }
 1271|      0|    if (s->new_session || s->session->ssl_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1271:9): [True: 0, False: 0]
  |  Branch (1271:27): [True: 0, False: 0]
  ------------------
 1272|      0|        if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1272:13): [True: 0, False: 0]
  ------------------
 1273|      0|            && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0) {
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1273:16): [True: 0, False: 0]
  ------------------
 1274|      0|            sess_id_len = sizeof(s->tmp_session_id);
 1275|      0|            s->tmp_session_id_len = sess_id_len;
 1276|      0|            if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1276:17): [True: 0, False: 0]
  ------------------
 1277|      0|                && RAND_bytes_ex(sctx->libctx, s->tmp_session_id,
  ------------------
  |  Branch (1277:20): [True: 0, False: 0]
  ------------------
 1278|      0|                       sess_id_len, 0)
 1279|      0|                    <= 0) {
 1280|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1281|      0|                return 0;
 1282|      0|            }
 1283|      0|            memcpy(s->session->session_id, s->tmp_session_id, sess_id_len);
 1284|      0|            s->session->session_id_length = sess_id_len;
 1285|      0|        } else {
 1286|      0|            sess_id_len = 0;
 1287|      0|        }
 1288|      0|    } else {
 1289|      0|        assert(s->session->session_id_length <= sizeof(s->session->session_id));
  ------------------
  |  Branch (1289:9): [True: 0, False: 0]
  |  Branch (1289:9): [True: 0, False: 0]
  ------------------
 1290|      0|        sess_id_len = s->session->session_id_length;
 1291|      0|        if (s->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1291:13): [True: 0, False: 0]
  ------------------
 1292|      0|            s->tmp_session_id_len = sess_id_len;
 1293|      0|            memcpy(s->tmp_session_id, s->session->session_id, sess_id_len);
 1294|      0|        }
 1295|      0|    }
 1296|      0|    if (s->hello_retry_request != SSL_HRR_NONE)
  ------------------
  |  Branch (1296:9): [True: 0, False: 0]
  ------------------
 1297|      0|        s->ext.ech.n_outer_only = 0; /* reset count of "compressed" exts */
 1298|       |    /*
 1299|       |     * Set CH depth flag so that other code (e.g. extension handlers)
 1300|       |     * know where we're at: 1 is "inner CH", 0 is "outer CH"
 1301|       |     */
 1302|      0|    s->ext.ech.ch_depth = 1;
 1303|      0|    if ((inner_mem = BUF_MEM_new()) == NULL
  ------------------
  |  Branch (1303:9): [True: 0, False: 0]
  ------------------
 1304|      0|        || !WPACKET_init(&inner, inner_mem)
  ------------------
  |  Branch (1304:12): [True: 0, False: 0]
  ------------------
 1305|      0|        || !ssl_set_handshake_header(s, &inner, mt)
  ------------------
  |  | 2184|      0|    SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->set_handshake_header((s), (pkt), (htype))
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  |  Branch (1305:12): [True: 0, False: 0]
  ------------------
 1306|      0|        || tls_construct_client_hello_aux(s, &inner) != 1
  ------------------
  |  Branch (1306:12): [True: 0, False: 0]
  ------------------
 1307|      0|        || !WPACKET_close(&inner)
  ------------------
  |  Branch (1307:12): [True: 0, False: 0]
  ------------------
 1308|      0|        || !WPACKET_get_length(&inner, &innerlen)) {
  ------------------
  |  Branch (1308:12): [True: 0, False: 0]
  ------------------
 1309|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1310|      0|        goto err;
 1311|      0|    }
 1312|      0|    OPENSSL_free(s->ext.ech.innerch);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1313|      0|    s->ext.ech.innerch = (unsigned char *)inner_mem->data;
 1314|      0|    inner_mem->data = NULL;
 1315|      0|    s->ext.ech.innerch_len = innerlen;
 1316|       |    /* add inner to transcript */
 1317|      0|    if (ossl_ech_intbuf_add(s, s->ext.ech.innerch, innerlen, 0) != 1) {
  ------------------
  |  Branch (1317:9): [True: 0, False: 0]
  ------------------
 1318|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1319|      0|        goto err;
 1320|      0|    }
 1321|      0|    WPACKET_cleanup(&inner);
 1322|      0|    BUF_MEM_free(inner_mem);
 1323|      0|    inner_mem = NULL;
 1324|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 1325|      0|    ossl_ech_pbuf("inner CH", s->ext.ech.innerch, s->ext.ech.innerch_len);
 1326|      0|    ossl_ech_pbuf("inner, client_random", s->ext.ech.client_random,
 1327|      0|        SSL3_RANDOM_SIZE);
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
 1328|      0|    ossl_ech_pbuf("inner, session_id", s->session->session_id,
 1329|      0|        s->session->session_id_length);
 1330|      0|#endif
 1331|       |    /* Decode inner so that we can make up encoded inner */
 1332|      0|    if (!PACKET_buf_init(&rpkt, (unsigned char *)s->ext.ech.innerch + 4,
  ------------------
  |  Branch (1332:9): [True: 0, False: 0]
  ------------------
 1333|      0|            s->ext.ech.innerch_len - 4)) {
 1334|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1335|      0|        goto err;
 1336|      0|    }
 1337|       |    /*
 1338|       |     * Parse the full inner CH (usually done on server). This gets us
 1339|       |     * individually encoded extensions so we can choose to compress
 1340|       |     * and/or to re-use the same value in outer.
 1341|       |     */
 1342|      0|    if (!tls_process_client_hello(s, &rpkt)) {
  ------------------
  |  Branch (1342:9): [True: 0, False: 0]
  ------------------
 1343|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1344|      0|        goto err;
 1345|      0|    }
 1346|       |
 1347|      0|    s->ext.ech.ch_depth = 0; /* set depth for outer CH */
 1348|       |    /*
 1349|       |     * If we want different key shares for inner and outer, then
 1350|       |     * zap the one for the inner. The inner key_share is stashed
 1351|       |     * in s.ext.ech.tmp_pkey already.
 1352|       |     */
 1353|      0|    if (ossl_ech_same_key_share() == 0) {
  ------------------
  |  Branch (1353:9): [True: 0, False: 0]
  ------------------
 1354|      0|        EVP_PKEY_free(s->s3.tmp.pkey);
 1355|      0|        s->s3.tmp.pkey = NULL;
 1356|      0|    }
 1357|       |    /* Make second call into CH construction for outer CH. */
 1358|      0|    rv = tls_construct_client_hello_aux(s, pkt);
 1359|      0|    if (rv != 1) {
  ------------------
  |  Branch (1359:9): [True: 0, False: 0]
  ------------------
 1360|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1361|      0|        goto err;
 1362|      0|    }
 1363|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 1364|      0|    ossl_ech_pbuf("outer, client_random", s->s3.client_random,
 1365|      0|        SSL3_RANDOM_SIZE);
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
 1366|      0|    ossl_ech_pbuf("outer, session_id", s->session->session_id,
 1367|      0|        s->session->session_id_length);
 1368|      0|#endif
 1369|       |    /* Finally, calculate AAD and encrypt using HPKE */
 1370|      0|    if (ossl_ech_aad_and_encrypt(s, pkt) != 1) {
  ------------------
  |  Branch (1370:9): [True: 0, False: 0]
  ------------------
 1371|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1372|      0|        goto err;
 1373|      0|    }
 1374|       |    /* Free up raw exts as needed (happens like this on real server) */
 1375|      0|    if (s->clienthello != NULL
  ------------------
  |  Branch (1375:9): [True: 0, False: 0]
  ------------------
 1376|      0|        && s->clienthello->pre_proc_exts != NULL) {
  ------------------
  |  Branch (1376:12): [True: 0, False: 0]
  ------------------
 1377|      0|        OPENSSL_free(s->clienthello->pre_proc_exts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1378|      0|        OPENSSL_free(s->clienthello);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1379|      0|        s->clienthello = NULL;
 1380|      0|    }
 1381|      0|    return 1;
 1382|      0|err:
 1383|      0|    if (inner_mem != NULL) {
  ------------------
  |  Branch (1383:9): [True: 0, False: 0]
  ------------------
 1384|      0|        WPACKET_cleanup(&inner);
 1385|      0|        BUF_MEM_free(inner_mem);
 1386|      0|    }
 1387|      0|    if (s->clienthello != NULL) {
  ------------------
  |  Branch (1387:9): [True: 0, False: 0]
  ------------------
 1388|      0|        OPENSSL_free(s->clienthello->pre_proc_exts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1389|      0|        OPENSSL_free(s->clienthello);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1390|       |        s->clienthello = NULL;
 1391|      0|    }
 1392|      0|    return 0;
 1393|      0|}
tls_process_server_hello:
 1717|     87|{
 1718|     87|    PACKET session_id, extpkt;
 1719|     87|    size_t session_id_len;
 1720|     87|    const unsigned char *cipherchars;
 1721|     87|    int hrr = 0;
 1722|     87|    unsigned int compression;
 1723|     87|    unsigned int sversion;
 1724|     87|    unsigned int context;
 1725|     87|    RAW_EXTENSION *extensions = NULL;
 1726|     87|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|     87|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1727|     87|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|     87|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1728|     87|#ifndef OPENSSL_NO_COMP
 1729|     87|    SSL_COMP *comp;
 1730|     87|#endif
 1731|     87|#ifndef OPENSSL_NO_ECH
 1732|     87|    const unsigned char *shbuf = NULL;
 1733|     87|    size_t shlen, alen;
 1734|       |    /*
 1735|       |     * client and server accept signal buffers, initialise in case of
 1736|       |     * e.g. memory fail when calculating, only really applies when
 1737|       |     * SUPERVERBOSE is defined and we trace these.
 1738|       |     */
 1739|     87|    unsigned char c_signal[OSSL_ECH_SIGNAL_LEN] = { 0 };
 1740|     87|    unsigned char s_signal[OSSL_ECH_SIGNAL_LEN] = { 0xff };
 1741|     87|    unsigned char *abuf = NULL;
 1742|       |
 1743|     87|    shlen = PACKET_remaining(pkt);
 1744|     87|    if (PACKET_peek_bytes(pkt, &shbuf, shlen) != 1) {
  ------------------
  |  Branch (1744:9): [True: 0, False: 87]
  ------------------
 1745|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1746|      0|        goto err;
 1747|      0|    }
 1748|     87|#endif
 1749|       |
 1750|     87|    if (!PACKET_get_net_2(pkt, &sversion)) {
  ------------------
  |  Branch (1750:9): [True: 2, False: 85]
  ------------------
 1751|      2|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      2|    (ERR_new(),                                                  \
  |  |  |  |  158|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1752|      2|        goto err;
 1753|      2|    }
 1754|       |
 1755|       |    /* load the server random */
 1756|     85|    if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|    170|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1756:9): [True: 82, False: 3]
  ------------------
 1757|     82|        && sversion == TLS1_2_VERSION
  ------------------
  |  |   26|    167|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (1757:12): [True: 56, False: 26]
  ------------------
 1758|     56|        && PACKET_remaining(pkt) >= SSL3_RANDOM_SIZE
  ------------------
  |  |  137|    141|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1758:12): [True: 54, False: 2]
  ------------------
 1759|     54|        && memcmp(hrrrandom, PACKET_data(pkt), SSL3_RANDOM_SIZE) == 0) {
  ------------------
  |  |  137|     54|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1759:12): [True: 1, False: 53]
  ------------------
 1760|      1|        if (s->hello_retry_request != SSL_HRR_NONE) {
  ------------------
  |  Branch (1760:13): [True: 0, False: 1]
  ------------------
 1761|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1762|      0|            goto err;
 1763|      0|        }
 1764|      1|        s->hello_retry_request = SSL_HRR_PENDING;
 1765|       |        /* Tell the record layer that we know we're going to get TLSv1.3 */
 1766|      1|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (1766:13): [True: 0, False: 1]
  ------------------
 1767|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1768|      0|            goto err;
 1769|      0|        }
 1770|      1|        hrr = 1;
 1771|      1|        if (!PACKET_forward(pkt, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|      1|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1771:13): [True: 0, False: 1]
  ------------------
 1772|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1773|      0|            goto err;
 1774|      0|        }
 1775|     84|    } else {
 1776|     84|        if (!PACKET_copy_bytes(pkt, s->s3.server_random, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|     84|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1776:13): [True: 4, False: 80]
  ------------------
 1777|      4|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      4|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      4|    (ERR_new(),                                                  \
  |  |  |  |  158|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      4|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1778|      4|            goto err;
 1779|      4|        }
 1780|     84|    }
 1781|       |
 1782|       |    /* Get the session-id. */
 1783|     81|    if (!PACKET_get_length_prefixed_1(pkt, &session_id)) {
  ------------------
  |  Branch (1783:9): [True: 15, False: 66]
  ------------------
 1784|     15|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|     15|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|     15|    (ERR_new(),                                                  \
  |  |  |  |  158|     15|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     15|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|     15|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1785|     15|        goto err;
 1786|     15|    }
 1787|     66|    session_id_len = PACKET_remaining(&session_id);
 1788|     66|    if (session_id_len > sizeof(s->session->session_id)
  ------------------
  |  Branch (1788:9): [True: 0, False: 66]
  ------------------
 1789|     66|        || session_id_len > SSL3_SESSION_ID_SIZE) {
  ------------------
  |  |  138|     66|#define SSL3_SESSION_ID_SIZE 32
  ------------------
  |  Branch (1789:12): [True: 0, False: 66]
  ------------------
 1790|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_TLS_SESSION_ID_TOO_LONG);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1791|      0|        goto err;
 1792|      0|    }
 1793|       |
 1794|     66|    if (!PACKET_get_bytes(pkt, &cipherchars, TLS_CIPHER_LEN)) {
  ------------------
  |  |  389|     66|#define TLS_CIPHER_LEN 2
  ------------------
  |  Branch (1794:9): [True: 1, False: 65]
  ------------------
 1795|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1796|      1|        goto err;
 1797|      1|    }
 1798|       |
 1799|     65|    if (!PACKET_get_1(pkt, &compression)) {
  ------------------
  |  Branch (1799:9): [True: 2, False: 63]
  ------------------
 1800|      2|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      2|    (ERR_new(),                                                  \
  |  |  |  |  158|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1801|      2|        goto err;
 1802|      2|    }
 1803|       |
 1804|       |    /* TLS extensions */
 1805|     63|    if (PACKET_remaining(pkt) == 0 && !hrr) {
  ------------------
  |  Branch (1805:9): [True: 62, False: 1]
  |  Branch (1805:39): [True: 61, False: 1]
  ------------------
 1806|     61|        PACKET_null_init(&extpkt);
 1807|     61|    } else if (!PACKET_as_length_prefixed_2(pkt, &extpkt)
  ------------------
  |  Branch (1807:16): [True: 2, False: 0]
  ------------------
 1808|      2|        || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (1808:12): [True: 0, False: 0]
  ------------------
 1809|      2|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  155|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      2|    (ERR_new(),                                                  \
  |  |  |  |  158|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1810|      2|        goto err;
 1811|      2|    }
 1812|       |
 1813|     61|    if (hrr) {
  ------------------
  |  Branch (1813:9): [True: 0, False: 61]
  ------------------
 1814|      0|        if (!tls_collect_extensions(s, &extpkt, SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST,
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (1814:13): [True: 0, False: 0]
  ------------------
 1815|      0|                &extensions, NULL, 1)
 1816|      0|            || !tls_parse_extension(s, TLSEXT_IDX_ech,
  ------------------
  |  Branch (1816:16): [True: 0, False: 0]
  ------------------
 1817|      0|                SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST,
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
 1818|      0|                extensions, NULL, 0)) {
 1819|       |            /* SSLfatal() already called */
 1820|      0|            goto err;
 1821|      0|        }
 1822|     61|    } else {
 1823|     61|        if (!tls_collect_extensions(s, &extpkt,
  ------------------
  |  Branch (1823:13): [True: 0, False: 61]
  ------------------
 1824|     61|                SSL_EXT_TLS1_2_SERVER_HELLO
  ------------------
  |  |  302|     61|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1825|     61|                    | SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  303|     61|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1826|     61|                &extensions, NULL, 1)) {
 1827|       |            /* SSLfatal() already called */
 1828|      0|            goto err;
 1829|      0|        }
 1830|     61|    }
 1831|       |
 1832|     61|#ifndef OPENSSL_NO_ECH
 1833|       |    /*
 1834|       |     * If we sent an ECH then check if that worked based on the
 1835|       |     * ServerHello.random confirmation trick. If that is good
 1836|       |     * then we'll swap over the inner and outer contexts and
 1837|       |     * proceed with inner. There are some HRR wrinkles too
 1838|       |     * though.
 1839|       |     */
 1840|     61|    if (s->ext.ech.es != NULL
  ------------------
  |  Branch (1840:9): [True: 0, False: 61]
  ------------------
 1841|      0|        && s->ext.ech.done != 1 && s->ext.ech.ch_depth == 0
  ------------------
  |  Branch (1841:12): [True: 0, False: 0]
  |  Branch (1841:36): [True: 0, False: 0]
  ------------------
 1842|      0|        && s->ext.ech.grease == OSSL_ECH_NOT_GREASE
  ------------------
  |  |   36|     61|#define OSSL_ECH_NOT_GREASE 0 /* when decryption worked */
  ------------------
  |  Branch (1842:12): [True: 0, False: 0]
  ------------------
 1843|      0|        && s->ext.ech.attempted_type == TLSEXT_TYPE_ech) {
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (1843:12): [True: 0, False: 0]
  ------------------
 1844|      0|        if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (1844:13): [True: 0, False: 0]
  ------------------
 1845|       |            /* SSLfatal() already called */
 1846|      0|            goto err;
 1847|      0|        }
 1848|       |        /* add any SH/HRR to inner transcript if we tried ECH */
 1849|      0|        if (s->ext.ech.attempted == 1) {
  ------------------
  |  Branch (1849:13): [True: 0, False: 0]
  ------------------
 1850|      0|            unsigned char prelude[4];
 1851|       |
 1852|      0|            prelude[0] = SSL3_MT_SERVER_HELLO;
  ------------------
  |  |  314|      0|#define SSL3_MT_SERVER_HELLO 2
  ------------------
 1853|      0|            prelude[1] = (shlen >> 16) & 0xff;
 1854|      0|            prelude[2] = (shlen >> 8) & 0xff;
 1855|      0|            prelude[3] = shlen & 0xff;
 1856|      0|            if (ossl_ech_intbuf_add(s, prelude, sizeof(prelude), hrr) != 1
  ------------------
  |  Branch (1856:17): [True: 0, False: 0]
  ------------------
 1857|      0|                || ossl_ech_intbuf_add(s, shbuf, shlen, 0) != 1) {
  ------------------
  |  Branch (1857:20): [True: 0, False: 0]
  ------------------
 1858|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1859|      0|                goto err;
 1860|      0|            }
 1861|      0|        }
 1862|       |        /* check the ECH accept signal */
 1863|      0|        if (ossl_ech_calc_confirm(s, hrr, c_signal, shlen) != 1) {
  ------------------
  |  Branch (1863:13): [True: 0, False: 0]
  ------------------
 1864|       |            /* SSLfatal() already called */
 1865|      0|            OSSL_TRACE(TLS, "ECH calc confirm failed\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 1866|      0|            goto err;
 1867|      0|        }
 1868|      0|        if (ossl_ech_find_confirm(s, hrr, s_signal) != 1
  ------------------
  |  Branch (1868:13): [True: 0, False: 0]
  ------------------
 1869|      0|            || memcmp(s_signal, c_signal, sizeof(c_signal)) != 0) {
  ------------------
  |  Branch (1869:16): [True: 0, False: 0]
  ------------------
 1870|      0|            OSSL_TRACE(TLS, "ECH accept check failed\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 1871|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 1872|      0|            ossl_ech_pbuf("ECH client accept val:", c_signal, sizeof(c_signal));
 1873|      0|            ossl_ech_pbuf("ECH server accept val:", s_signal, sizeof(s_signal));
 1874|      0|#endif
 1875|      0|            s->ext.ech.success = 0;
 1876|      0|        } else { /* match, ECH worked */
 1877|      0|            OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1878|      0|            {
 1879|      0|                BIO_printf(trc_out, "ECH accept check ok\n");
 1880|      0|                BIO_printf(trc_out, "ECH set session hostname to %s\n",
 1881|      0|                    s->ext.hostname ? s->ext.hostname : "NULL");
  ------------------
  |  Branch (1881:21): [True: 0, False: 0]
  ------------------
 1882|      0|            }
 1883|      0|            OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1884|      0|            s->ext.ech.success = 1;
 1885|      0|        }
 1886|      0|        if (!hrr && s->ext.ech.success == 1) {
  ------------------
  |  Branch (1886:13): [True: 0, False: 0]
  |  Branch (1886:21): [True: 0, False: 0]
  ------------------
 1887|      0|            if (ossl_ech_swaperoo(s) != 1
  ------------------
  |  Branch (1887:17): [True: 0, False: 0]
  ------------------
 1888|      0|                || ossl_ech_intbuf_fetch(s, &abuf, &alen) != 1
  ------------------
  |  Branch (1888:20): [True: 0, False: 0]
  ------------------
 1889|      0|                || ossl_ech_reset_hs_buffer(s, abuf, alen) != 1) {
  ------------------
  |  Branch (1889:20): [True: 0, False: 0]
  ------------------
 1890|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1891|      0|                goto err;
 1892|      0|            }
 1893|      0|        } else if (hrr == 1 && s->ext.ech.success == 1) {
  ------------------
  |  Branch (1893:20): [True: 0, False: 0]
  |  Branch (1893:32): [True: 0, False: 0]
  ------------------
 1894|      0|            OSSL_TRACE(TLS, "ECH HRR accept ok, continuing.\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 1895|       |            /*
 1896|       |             * If we got retry_configs then we should be validating
 1897|       |             * the outer CH, so we better set the hostname for the
 1898|       |             * connection accordingly.
 1899|       |             */
 1900|      0|        } else if (!hrr && s->ext.ech.success == 0
  ------------------
  |  Branch (1900:20): [True: 0, False: 0]
  |  Branch (1900:28): [True: 0, False: 0]
  ------------------
 1901|      0|            && s->ext.ech.hrrsignal_p != NULL) {
  ------------------
  |  Branch (1901:16): [True: 0, False: 0]
  ------------------
 1902|       |            /*
 1903|       |             * we previously saw a good HRR ECH acceptance but now
 1904|       |             * the SH.random ECH acceptance signal is bad so that's an
 1905|       |             * illegal protocol error
 1906|       |             */
 1907|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_ECH_REQUIRED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1908|      0|            goto err;
 1909|      0|        } else {
 1910|      0|            OSSL_TRACE1(TLS, "ECH falling back to public_name: %s\n",
  ------------------
  |  |  291|      0|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 1911|      0|                s->ext.ech.outer_hostname != NULL ? s->ext.ech.outer_hostname : "NONE");
 1912|      0|            s->ext.ech.former_inner = s->ext.hostname;
 1913|      0|            s->ext.hostname = NULL;
 1914|      0|            if (s->ext.ech.outer_hostname != NULL) {
  ------------------
  |  Branch (1914:17): [True: 0, False: 0]
  ------------------
 1915|      0|                s->ext.hostname = OPENSSL_strdup(s->ext.ech.outer_hostname);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1916|      0|                if (s->ext.hostname == NULL) {
  ------------------
  |  Branch (1916:21): [True: 0, False: 0]
  ------------------
 1917|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1918|      0|                    goto err;
 1919|      0|                }
 1920|      0|                if (SSL_set1_dnsname(ssl, s->ext.ech.outer_hostname) != 1) {
  ------------------
  |  Branch (1920:21): [True: 0, False: 0]
  ------------------
 1921|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1922|      0|                    goto err;
 1923|      0|                }
 1924|      0|            }
 1925|      0|        }
 1926|      0|    }
 1927|     61|#endif
 1928|       |
 1929|     61|    if (!hrr) {
  ------------------
  |  Branch (1929:9): [True: 61, False: 0]
  ------------------
 1930|     61|        if (!ssl_choose_client_version(s, sversion, extensions)) {
  ------------------
  |  Branch (1930:13): [True: 23, False: 38]
  ------------------
 1931|       |            /* SSLfatal() already called */
 1932|     23|            goto err;
 1933|     23|        }
 1934|     61|    }
 1935|       |
 1936|     38|    if (SSL_CONNECTION_IS_TLS13(s) || hrr) {
  ------------------
  |  |  273|     76|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|     76|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     38|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     38|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 38, False: 0]
  |  |  ------------------
  |  |  274|     38|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     38|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     76|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 2, False: 36]
  |  |  ------------------
  |  |  275|     76|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      2|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      2|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1936:39): [True: 0, False: 36]
  ------------------
 1937|      2|        if (compression != 0) {
  ------------------
  |  Branch (1937:13): [True: 1, False: 1]
  ------------------
 1938|      1|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1939|      1|                SSL_R_INVALID_COMPRESSION_ALGORITHM);
 1940|      1|            goto err;
 1941|      1|        }
 1942|       |
 1943|      1|        if (session_id_len != s->tmp_session_id_len
  ------------------
  |  Branch (1943:13): [True: 1, False: 0]
  ------------------
 1944|      0|            || memcmp(PACKET_data(&session_id), s->tmp_session_id,
  ------------------
  |  Branch (1944:16): [True: 0, False: 0]
  ------------------
 1945|      0|                   session_id_len)
 1946|      1|                != 0) {
 1947|      1|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_INVALID_SESSION_ID);
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1948|      1|            goto err;
 1949|      1|        }
 1950|      1|    }
 1951|       |
 1952|     36|    if (hrr) {
  ------------------
  |  Branch (1952:9): [True: 0, False: 36]
  ------------------
 1953|      0|        int ret;
 1954|       |
 1955|      0|        if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (1955:13): [True: 0, False: 0]
  ------------------
 1956|       |            /* SSLfatal() already called */
 1957|      0|            goto err;
 1958|      0|        }
 1959|       |
 1960|      0|        ret = tls_process_as_hello_retry_request(s, extensions);
 1961|      0|        OPENSSL_free(extensions);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1962|       |
 1963|      0|        return ret;
 1964|      0|    }
 1965|       |
 1966|       |    /*
 1967|       |     * Now we have chosen the version we need to check again that the extensions
 1968|       |     * are appropriate for this version.
 1969|       |     */
 1970|     36|    context = SSL_CONNECTION_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  273|     36|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|     72|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     36|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     36|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 36, False: 0]
  |  |  ------------------
  |  |  274|     36|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     36|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     72|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 36]
  |  |  ------------------
  |  |  275|     36|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  context = SSL_CONNECTION_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  303|      0|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1971|     36|                                         : SSL_EXT_TLS1_2_SERVER_HELLO;
  ------------------
  |  |  302|     72|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1972|     36|    if (!tls_validate_all_contexts(s, context, extensions)) {
  ------------------
  |  Branch (1972:9): [True: 0, False: 36]
  ------------------
 1973|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1974|      0|        goto err;
 1975|      0|    }
 1976|       |
 1977|     36|    s->hit = 0;
 1978|       |
 1979|     36|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|     36|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|     72|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     36|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     36|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 36, False: 0]
  |  |  ------------------
  |  |  274|     36|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     36|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     72|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 36]
  |  |  ------------------
  |  |  275|     36|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1980|       |        /*
 1981|       |         * In TLSv1.3 a ServerHello message signals a key change so the end of
 1982|       |         * the message must be on a record boundary.
 1983|       |         */
 1984|      0|        if (RECORD_LAYER_processed_read_pending(&s->rlayer)) {
  ------------------
  |  Branch (1984:13): [True: 0, False: 0]
  ------------------
 1985|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1986|      0|                SSL_R_NOT_ON_RECORD_BOUNDARY);
 1987|      0|            goto err;
 1988|      0|        }
 1989|       |
 1990|       |        /* This will set s->hit if we are resuming */
 1991|      0|        if (!tls_parse_extension(s, TLSEXT_IDX_psk,
  ------------------
  |  Branch (1991:13): [True: 0, False: 0]
  ------------------
 1992|      0|                SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  303|      0|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1993|      0|                extensions, NULL, 0)) {
 1994|       |            /* SSLfatal() already called */
 1995|      0|            goto err;
 1996|      0|        }
 1997|     36|    } else {
 1998|       |        /*
 1999|       |         * Check if we can resume the session based on external pre-shared
 2000|       |         * secret. EAP-FAST (RFC 4851) supports two types of session resumption.
 2001|       |         * Resumption based on server-side state works with session IDs.
 2002|       |         * Resumption based on pre-shared Protected Access Credentials (PACs)
 2003|       |         * works by overriding the SessionTicket extension at the application
 2004|       |         * layer, and does not send a session ID. (We do not know whether
 2005|       |         * EAP-FAST servers would honour the session ID.) Therefore, the session
 2006|       |         * ID alone is not a reliable indicator of session resumption, so we
 2007|       |         * first check if we can resume, and later peek at the next handshake
 2008|       |         * message to see if the server wants to resume.
 2009|       |         */
 2010|     36|        if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|     72|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2010:13): [True: 36, False: 0]
  ------------------
 2011|     36|            && s->ext.session_secret_cb != NULL && s->session->ext.tick) {
  ------------------
  |  Branch (2011:16): [True: 0, False: 36]
  |  Branch (2011:52): [True: 0, False: 0]
  ------------------
 2012|      0|            const SSL_CIPHER *pref_cipher = NULL;
 2013|       |            /*
 2014|       |             * s->session->master_key_length is a size_t, but this is an int for
 2015|       |             * backwards compat reasons
 2016|       |             */
 2017|      0|            int master_key_length;
 2018|       |
 2019|      0|            master_key_length = sizeof(s->session->master_key);
 2020|      0|            if (s->ext.session_secret_cb(ussl, s->session->master_key,
  ------------------
  |  Branch (2020:17): [True: 0, False: 0]
  ------------------
 2021|      0|                    &master_key_length,
 2022|      0|                    NULL, &pref_cipher,
 2023|      0|                    s->ext.session_secret_cb_arg)
 2024|      0|                && master_key_length > 0) {
  ------------------
  |  Branch (2024:20): [True: 0, False: 0]
  ------------------
 2025|      0|                s->session->master_key_length = master_key_length;
 2026|      0|                s->session->cipher = pref_cipher ? pref_cipher : ssl_get_cipher_by_char(s, cipherchars, 0);
  ------------------
  |  Branch (2026:38): [True: 0, False: 0]
  ------------------
 2027|      0|            } else {
 2028|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2029|      0|                goto err;
 2030|      0|            }
 2031|      0|        }
 2032|       |
 2033|     36|        if (session_id_len != 0
  ------------------
  |  Branch (2033:13): [True: 10, False: 26]
  ------------------
 2034|     10|            && session_id_len == s->session->session_id_length
  ------------------
  |  Branch (2034:16): [True: 0, False: 10]
  ------------------
 2035|      0|            && memcmp(PACKET_data(&session_id), s->session->session_id,
  ------------------
  |  Branch (2035:16): [True: 0, False: 0]
  ------------------
 2036|      0|                   session_id_len)
 2037|      0|                == 0)
 2038|      0|            s->hit = 1;
 2039|     36|    }
 2040|       |
 2041|     36|    if (s->hit) {
  ------------------
  |  Branch (2041:9): [True: 0, False: 36]
  ------------------
 2042|      0|        if (s->sid_ctx_length != s->session->sid_ctx_length
  ------------------
  |  Branch (2042:13): [True: 0, False: 0]
  ------------------
 2043|      0|            || memcmp(s->session->sid_ctx, s->sid_ctx, s->sid_ctx_length)) {
  ------------------
  |  Branch (2043:16): [True: 0, False: 0]
  ------------------
 2044|       |            /* actually a client application bug */
 2045|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2046|      0|                SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT);
 2047|      0|            goto err;
 2048|      0|        }
 2049|     36|    } else {
 2050|       |        /*
 2051|       |         * If we were trying for session-id reuse but the server
 2052|       |         * didn't resume, make a new SSL_SESSION.
 2053|       |         * In the case of EAP-FAST and PAC, we do not send a session ID,
 2054|       |         * so the PAC-based session secret is always preserved. It'll be
 2055|       |         * overwritten if the server refuses resumption.
 2056|       |         */
 2057|     36|        if (s->session->session_id_length > 0) {
  ------------------
  |  Branch (2057:13): [True: 0, False: 36]
  ------------------
 2058|      0|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_miss);
 2059|      0|            if (!ssl_get_new_session(s, 0)) {
  ------------------
  |  Branch (2059:17): [True: 0, False: 0]
  ------------------
 2060|       |                /* SSLfatal() already called */
 2061|      0|                goto err;
 2062|      0|            }
 2063|      0|        }
 2064|       |
 2065|     36|        s->session->ssl_version = s->version;
 2066|       |        /*
 2067|       |         * In TLSv1.2 and below we save the session id we were sent so we can
 2068|       |         * resume it later. In TLSv1.3 the session id we were sent is just an
 2069|       |         * echo of what we originally sent in the ClientHello and should not be
 2070|       |         * used for resumption.
 2071|       |         */
 2072|     36|        if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|     36|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|     72|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     36|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     36|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 36, False: 0]
  |  |  ------------------
  |  |  274|     36|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     36|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     72|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 36]
  |  |  ------------------
  |  |  275|     36|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2073|     36|            s->session->session_id_length = session_id_len;
 2074|       |            /* session_id_len could be 0 */
 2075|     36|            if (session_id_len > 0)
  ------------------
  |  Branch (2075:17): [True: 10, False: 26]
  ------------------
 2076|     10|                memcpy(s->session->session_id, PACKET_data(&session_id),
 2077|     10|                    session_id_len);
 2078|     36|        }
 2079|     36|    }
 2080|       |
 2081|       |    /* Session version and negotiated protocol version should match */
 2082|     36|    if (s->version != s->session->ssl_version) {
  ------------------
  |  Branch (2082:9): [True: 0, False: 36]
  ------------------
 2083|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2084|      0|            SSL_R_SSL_SESSION_VERSION_MISMATCH);
 2085|      0|        goto err;
 2086|      0|    }
 2087|       |    /*
 2088|       |     * Now that we know the version, update the check to see if it's an allowed
 2089|       |     * version.
 2090|       |     */
 2091|     36|    s->s3.tmp.min_ver = s->version;
 2092|     36|    s->s3.tmp.max_ver = s->version;
 2093|       |
 2094|     36|    if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (2094:9): [True: 33, False: 3]
  ------------------
 2095|       |        /* SSLfatal() already called */
 2096|     33|        goto err;
 2097|     33|    }
 2098|       |
 2099|       |#ifdef OPENSSL_NO_COMP
 2100|       |    if (compression != 0) {
 2101|       |        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
 2102|       |            SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
 2103|       |        goto err;
 2104|       |    }
 2105|       |    /*
 2106|       |     * If compression is disabled we'd better not try to resume a session
 2107|       |     * using compression.
 2108|       |     */
 2109|       |    if (s->session->compress_meth != 0) {
 2110|       |        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_COMPRESSION);
 2111|       |        goto err;
 2112|       |    }
 2113|       |#else
 2114|      3|    if (s->hit && compression != s->session->compress_meth) {
  ------------------
  |  Branch (2114:9): [True: 0, False: 3]
  |  Branch (2114:19): [True: 0, False: 0]
  ------------------
 2115|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2116|      0|            SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED);
 2117|      0|        goto err;
 2118|      0|    }
 2119|      3|    if (compression == 0)
  ------------------
  |  Branch (2119:9): [True: 1, False: 2]
  ------------------
 2120|      1|        comp = NULL;
 2121|      2|    else if (!ssl_allow_compression(s)) {
  ------------------
  |  Branch (2121:14): [True: 2, False: 0]
  ------------------
 2122|      2|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_COMPRESSION_DISABLED);
  ------------------
  |  |  155|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      2|    (ERR_new(),                                                  \
  |  |  |  |  158|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2123|      2|        goto err;
 2124|      2|    } else {
 2125|      0|        comp = ssl3_comp_find(SSL_CONNECTION_GET_CTX(s)->comp_methods,
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2126|      0|            compression);
 2127|      0|    }
 2128|       |
 2129|      1|    if (compression != 0 && comp == NULL) {
  ------------------
  |  Branch (2129:9): [True: 0, False: 1]
  |  Branch (2129:29): [True: 0, False: 0]
  ------------------
 2130|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2131|      0|            SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
 2132|      0|        goto err;
 2133|      1|    } else {
 2134|      1|        s->s3.tmp.new_compression = comp;
 2135|      1|    }
 2136|      1|#endif
 2137|       |
 2138|      1|    if (!tls_parse_all_extensions(s, context, extensions, NULL, 0, 1)) {
  ------------------
  |  Branch (2138:9): [True: 1, False: 0]
  ------------------
 2139|       |        /* SSLfatal() already called */
 2140|      1|        goto err;
 2141|      1|    }
 2142|       |
 2143|       |#ifndef OPENSSL_NO_SCTP
 2144|       |    if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
 2145|       |        unsigned char sctpauthkey[64];
 2146|       |        char labelbuffer[sizeof(DTLS1_SCTP_AUTH_LABEL)];
 2147|       |        size_t labellen;
 2148|       |
 2149|       |        /*
 2150|       |         * Add new shared key for SCTP-Auth, will be ignored if
 2151|       |         * no SCTP used.
 2152|       |         */
 2153|       |        memcpy(labelbuffer, DTLS1_SCTP_AUTH_LABEL,
 2154|       |            sizeof(DTLS1_SCTP_AUTH_LABEL));
 2155|       |
 2156|       |        /* Don't include the terminating zero. */
 2157|       |        labellen = sizeof(labelbuffer) - 1;
 2158|       |        if (s->mode & SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG)
 2159|       |            labellen += 1;
 2160|       |
 2161|       |        if (SSL_export_keying_material(ssl, sctpauthkey,
 2162|       |                sizeof(sctpauthkey),
 2163|       |                labelbuffer,
 2164|       |                labellen, NULL, 0, 0)
 2165|       |            <= 0) {
 2166|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 2167|       |            goto err;
 2168|       |        }
 2169|       |
 2170|       |        BIO_ctrl(SSL_get_wbio(ssl),
 2171|       |            BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY,
 2172|       |            sizeof(sctpauthkey), sctpauthkey);
 2173|       |    }
 2174|       |#endif
 2175|       |
 2176|       |    /*
 2177|       |     * In TLSv1.3 we have some post-processing to change cipher state, otherwise
 2178|       |     * we're done with this message
 2179|       |     */
 2180|      0|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2181|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)
  ------------------
  |  Branch (2181:13): [True: 0, False: 0]
  ------------------
 2182|      0|            || !tls13_store_handshake_traffic_hash(s)) {
  ------------------
  |  Branch (2182:16): [True: 0, False: 0]
  ------------------
 2183|       |            /* SSLfatal() already called */
 2184|      0|            goto err;
 2185|      0|        }
 2186|       |        /*
 2187|       |         * If we're not doing early-data and we're not going to send a dummy CCS
 2188|       |         * (i.e. no middlebox compat mode) then we can change the write keys
 2189|       |         * immediately. Otherwise we have to defer this until after all possible
 2190|       |         * early data is written. We could just always defer until the last
 2191|       |         * moment except QUIC needs it done at the same time as the read keys
 2192|       |         * are changed. Since QUIC doesn't do TLS early data or need middlebox
 2193|       |         * compat this doesn't cause a problem.
 2194|       |         */
 2195|      0|        if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (311:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2196|      0|            || (s->early_data_state == SSL_EARLY_DATA_NONE
  ------------------
  |  Branch (2196:17): [True: 0, False: 0]
  ------------------
 2197|      0|                && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0)) {
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2197:20): [True: 0, False: 0]
  ------------------
 2198|      0|            if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (2198:17): [True: 0, False: 0]
  ------------------
 2199|      0|                    SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  347|      0|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                                  SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
 2200|       |                /* SSLfatal() already called */
 2201|      0|                goto err;
 2202|      0|            }
 2203|      0|        }
 2204|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (2204:13): [True: 0, False: 0]
  ------------------
 2205|      0|                SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  347|      0|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                              SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  351|      0|#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|      0|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
 2206|       |            /* SSLfatal() already called */
 2207|      0|            goto err;
 2208|      0|        }
 2209|      0|    }
 2210|       |
 2211|      0|    OPENSSL_free(extensions);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2212|      0|    return MSG_PROCESS_CONTINUE_READING;
 2213|     87|err:
 2214|     87|    OPENSSL_free(extensions);
  ------------------
  |  |  132|     87|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2215|     87|    return MSG_PROCESS_ERROR;
 2216|      0|}
statem_clnt.c:tls_construct_client_hello_aux:
 1399|  2.57k|{
 1400|  2.57k|    unsigned char *p;
 1401|  2.57k|    size_t sess_id_len;
 1402|  2.57k|    int i, protverr;
 1403|  2.57k|#ifndef OPENSSL_NO_COMP
 1404|  2.57k|    SSL_COMP *comp;
 1405|  2.57k|#endif
 1406|  2.57k|    SSL_SESSION *sess = s->session;
 1407|  2.57k|    unsigned char *session_id;
 1408|  2.57k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.57k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1409|       |
 1410|       |    /* Work out what SSL/TLS/DTLS version to use */
 1411|  2.57k|    protverr = ssl_set_client_hello_version(s);
 1412|  2.57k|    if (protverr != 0) {
  ------------------
  |  Branch (1412:9): [True: 0, False: 2.57k]
  ------------------
 1413|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, protverr);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1414|      0|        return CON_FUNC_ERROR;
 1415|      0|    }
 1416|       |
 1417|  2.57k|#ifndef OPENSSL_NO_ECH
 1418|       |    /* if we're doing ECH, re-use session ID setup earlier */
 1419|  2.57k|    if (s->ext.ech.es == NULL)
  ------------------
  |  Branch (1419:9): [True: 2.57k, False: 0]
  ------------------
 1420|  2.57k|#endif
 1421|  2.57k|        if (sess == NULL
  ------------------
  |  Branch (1421:13): [True: 2.57k, False: 0]
  ------------------
 1422|      0|            || !ssl_version_supported(s, sess->ssl_version, NULL)
  ------------------
  |  Branch (1422:16): [True: 0, False: 0]
  ------------------
 1423|  2.57k|            || !SSL_SESSION_is_resumable(sess)) {
  ------------------
  |  Branch (1423:16): [True: 0, False: 0]
  ------------------
 1424|  2.57k|            if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1424:17): [True: 2.57k, False: 0]
  ------------------
 1425|  2.57k|                && !ssl_get_new_session(s, 0)) {
  ------------------
  |  Branch (1425:20): [True: 0, False: 2.57k]
  ------------------
 1426|       |                /* SSLfatal() already called */
 1427|      0|                return CON_FUNC_ERROR;
 1428|      0|            }
 1429|  2.57k|        }
 1430|       |    /* else use the pre-loaded session */
 1431|       |
 1432|  2.57k|#ifndef OPENSSL_NO_ECH
 1433|       |    /* use different client_random fields for inner and outer */
 1434|  2.57k|    if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 1)
  ------------------
  |  Branch (1434:9): [True: 0, False: 2.57k]
  |  Branch (1434:34): [True: 0, False: 0]
  ------------------
 1435|      0|        p = s->ext.ech.client_random;
 1436|  2.57k|    else
 1437|  2.57k|#endif
 1438|  2.57k|        p = s->s3.client_random;
 1439|       |
 1440|       |    /*
 1441|       |     * for DTLS if client_random is initialized, reuse it, we are
 1442|       |     * required to use same upon reply to HelloVerify
 1443|       |     */
 1444|  2.57k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.57k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.57k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.57k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.57k]
  |  |  ------------------
  ------------------
 1445|      0|        size_t idx;
 1446|      0|        i = 1;
 1447|      0|        for (idx = 0; idx < sizeof(s->s3.client_random); idx++) {
  ------------------
  |  Branch (1447:23): [True: 0, False: 0]
  ------------------
 1448|      0|            if (p[idx]) {
  ------------------
  |  Branch (1448:17): [True: 0, False: 0]
  ------------------
 1449|      0|                i = 0;
 1450|      0|                break;
 1451|      0|            }
 1452|      0|        }
 1453|  2.57k|    } else {
 1454|  2.57k|        i = (s->hello_retry_request == SSL_HRR_NONE);
 1455|  2.57k|    }
 1456|       |
 1457|  2.57k|    if (i && ssl_fill_hello_random(s, 0, p, sizeof(s->s3.client_random), DOWNGRADE_NONE) <= 0) {
  ------------------
  |  Branch (1457:9): [True: 2.57k, False: 0]
  |  Branch (1457:14): [True: 0, False: 2.57k]
  ------------------
 1458|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1459|      0|        return CON_FUNC_ERROR;
 1460|      0|    }
 1461|       |
 1462|       |    /*-
 1463|       |     * version indicates the negotiated version: for example from
 1464|       |     * an SSLv2/v3 compatible client hello). The client_version
 1465|       |     * field is the maximum version we permit and it is also
 1466|       |     * used in RSA encrypted premaster secrets. Some servers can
 1467|       |     * choke if we initially report a higher version then
 1468|       |     * renegotiate to a lower one in the premaster secret. This
 1469|       |     * didn't happen with TLS 1.0 as most servers supported it
 1470|       |     * but it can with TLS 1.1 or later if the server only supports
 1471|       |     * 1.0.
 1472|       |     *
 1473|       |     * Possible scenario with previous logic:
 1474|       |     *      1. Client hello indicates TLS 1.2
 1475|       |     *      2. Server hello says TLS 1.0
 1476|       |     *      3. RSA encrypted premaster secret uses 1.2.
 1477|       |     *      4. Handshake proceeds using TLS 1.0.
 1478|       |     *      5. Server sends hello request to renegotiate.
 1479|       |     *      6. Client hello indicates TLS v1.0 as we now
 1480|       |     *         know that is maximum server supports.
 1481|       |     *      7. Server chokes on RSA encrypted premaster secret
 1482|       |     *         containing version 1.0.
 1483|       |     *
 1484|       |     * For interoperability it should be OK to always use the
 1485|       |     * maximum version we support in client hello and then rely
 1486|       |     * on the checking of version to ensure the servers isn't
 1487|       |     * being inconsistent: for example initially negotiating with
 1488|       |     * TLS 1.0 and renegotiating with TLS 1.2. We do this by using
 1489|       |     * client_version in client hello and not resetting it to
 1490|       |     * the negotiated version.
 1491|       |     *
 1492|       |     * For TLS 1.3 we always set the ClientHello version to 1.2 and rely on the
 1493|       |     * supported_versions extension for the real supported versions.
 1494|       |     */
 1495|  2.57k|    if (!WPACKET_put_bytes_u16(pkt, s->client_version)
  ------------------
  |  |  911|  5.15k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1495:9): [True: 0, False: 2.57k]
  ------------------
 1496|  2.57k|        || !WPACKET_memcpy(pkt, p, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|  2.57k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1496:12): [True: 0, False: 2.57k]
  ------------------
 1497|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1498|      0|        return CON_FUNC_ERROR;
 1499|      0|    }
 1500|       |
 1501|       |    /* Session ID */
 1502|  2.57k|    session_id = s->session->session_id;
 1503|  2.57k|#ifndef OPENSSL_NO_ECH
 1504|       |    /* same session ID is used for inner/outer when doing ECH */
 1505|  2.57k|    if (s->ext.ech.es != NULL) {
  ------------------
  |  Branch (1505:9): [True: 0, False: 2.57k]
  ------------------
 1506|      0|        if (s->version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1506:13): [True: 0, False: 0]
  ------------------
 1507|      0|            SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_SSL_VERSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1508|      0|            return CON_FUNC_ERROR;
 1509|      0|        }
 1510|      0|        if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0)
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1510:13): [True: 0, False: 0]
  ------------------
 1511|      0|            sess_id_len = sizeof(s->tmp_session_id);
 1512|      0|        else
 1513|      0|            sess_id_len = 0;
 1514|  2.57k|    } else {
 1515|  2.57k|#endif
 1516|  2.57k|        if (s->new_session || s->session->ssl_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|  2.57k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1516:13): [True: 0, False: 2.57k]
  |  Branch (1516:31): [True: 2.51k, False: 59]
  ------------------
 1517|  2.51k|            if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|  5.03k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1517:17): [True: 2.51k, False: 0]
  ------------------
 1518|  2.51k|                && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0) {
  ------------------
  |  |  404|  2.51k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  2.51k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1518:20): [True: 2.51k, False: 0]
  ------------------
 1519|  2.51k|                sess_id_len = sizeof(s->tmp_session_id);
 1520|  2.51k|                s->tmp_session_id_len = sess_id_len;
 1521|  2.51k|                session_id = s->tmp_session_id;
 1522|  2.51k|                if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1522:21): [True: 2.51k, False: 0]
  ------------------
 1523|  2.51k|                    && RAND_bytes_ex(sctx->libctx, s->tmp_session_id,
  ------------------
  |  Branch (1523:24): [True: 0, False: 2.51k]
  ------------------
 1524|  2.51k|                           sess_id_len, 0)
 1525|  2.51k|                        <= 0) {
 1526|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1527|      0|                    return CON_FUNC_ERROR;
 1528|      0|                }
 1529|  2.51k|            } else {
 1530|      0|                sess_id_len = 0;
 1531|      0|            }
 1532|  2.51k|        } else {
 1533|     59|            assert(s->session->session_id_length <= sizeof(s->session->session_id));
  ------------------
  |  Branch (1533:13): [True: 0, False: 59]
  |  Branch (1533:13): [True: 59, False: 0]
  ------------------
 1534|     59|            sess_id_len = s->session->session_id_length;
 1535|     59|            if (s->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|     59|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1535:17): [True: 0, False: 59]
  ------------------
 1536|      0|                s->tmp_session_id_len = sess_id_len;
 1537|      0|                memcpy(s->tmp_session_id, s->session->session_id, sess_id_len);
 1538|      0|            }
 1539|     59|        }
 1540|  2.57k|#ifndef OPENSSL_NO_ECH
 1541|  2.57k|    }
 1542|  2.57k|#endif
 1543|       |
 1544|  2.57k|    if (!WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  810|  5.15k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1544:9): [True: 0, False: 2.57k]
  ------------------
 1545|  2.57k|        || (sess_id_len != 0 && !WPACKET_memcpy(pkt, session_id, sess_id_len))
  ------------------
  |  Branch (1545:13): [True: 2.51k, False: 59]
  |  Branch (1545:33): [True: 0, False: 2.51k]
  ------------------
 1546|  2.57k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1546:12): [True: 0, False: 2.57k]
  ------------------
 1547|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1548|      0|        return CON_FUNC_ERROR;
 1549|      0|    }
 1550|       |
 1551|       |    /* cookie stuff for DTLS */
 1552|  2.57k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.57k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.57k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.57k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.57k]
  |  |  ------------------
  ------------------
 1553|      0|        if (s->d1->cookie_len > sizeof(s->d1->cookie)
  ------------------
  |  Branch (1553:13): [True: 0, False: 0]
  ------------------
 1554|      0|            || !WPACKET_sub_memcpy_u8(pkt, s->d1->cookie,
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1554:16): [True: 0, False: 0]
  ------------------
 1555|      0|                s->d1->cookie_len)) {
 1556|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1557|      0|            return CON_FUNC_ERROR;
 1558|      0|        }
 1559|      0|    }
 1560|       |
 1561|       |    /* Ciphers supported */
 1562|  2.57k|    if (!WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|  2.57k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1562:9): [True: 0, False: 2.57k]
  ------------------
 1563|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1564|      0|        return CON_FUNC_ERROR;
 1565|      0|    }
 1566|       |
 1567|  2.57k|    if (!ssl_cipher_list_to_bytes(s, SSL_get_ciphers(SSL_CONNECTION_GET_SSL(s)),
  ------------------
  |  |   27|  2.57k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (1567:9): [True: 59, False: 2.51k]
  ------------------
 1568|  2.57k|            pkt)) {
 1569|       |        /* SSLfatal() already called */
 1570|     59|        return CON_FUNC_ERROR;
 1571|     59|    }
 1572|  2.51k|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1572:9): [True: 0, False: 2.51k]
  ------------------
 1573|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1574|      0|        return CON_FUNC_ERROR;
 1575|      0|    }
 1576|       |
 1577|       |    /* COMPRESSION */
 1578|  2.51k|    if (!WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  810|  2.51k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1578:9): [True: 0, False: 2.51k]
  ------------------
 1579|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1580|      0|        return CON_FUNC_ERROR;
 1581|      0|    }
 1582|  2.51k|#ifndef OPENSSL_NO_COMP
 1583|  2.51k|    if (ssl_allow_compression(s)
  ------------------
  |  Branch (1583:9): [True: 0, False: 2.51k]
  ------------------
 1584|      0|        && sctx->comp_methods
  ------------------
  |  Branch (1584:12): [True: 0, False: 0]
  ------------------
 1585|      0|        && (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1586|      0|            || s->s3.tmp.max_ver < TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1586:16): [True: 0, False: 0]
  ------------------
 1587|      0|        int compnum = sk_SSL_COMP_num(sctx->comp_methods);
  ------------------
  |  |   70|      0|#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
  ------------------
 1588|      0|        for (i = 0; i < compnum; i++) {
  ------------------
  |  Branch (1588:21): [True: 0, False: 0]
  ------------------
 1589|      0|            comp = sk_SSL_COMP_value(sctx->comp_methods, i);
  ------------------
  |  |   71|      0|#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
  ------------------
 1590|      0|            if (!WPACKET_put_bytes_u8(pkt, comp->id)) {
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1590:17): [True: 0, False: 0]
  ------------------
 1591|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1592|      0|                return CON_FUNC_ERROR;
 1593|      0|            }
 1594|      0|        }
 1595|      0|    }
 1596|  2.51k|#endif
 1597|       |    /* Add the NULL method */
 1598|  2.51k|    if (!WPACKET_put_bytes_u8(pkt, 0) || !WPACKET_close(pkt)) {
  ------------------
  |  |  909|  5.03k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1598:9): [True: 0, False: 2.51k]
  |  Branch (1598:42): [True: 0, False: 2.51k]
  ------------------
 1599|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1600|      0|        return CON_FUNC_ERROR;
 1601|      0|    }
 1602|       |
 1603|       |    /* TLS extensions */
 1604|  2.51k|    if (!tls_construct_extensions(s, pkt, SSL_EXT_CLIENT_HELLO, NULL, 0)) {
  ------------------
  |  |  300|  2.51k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1604:9): [True: 38, False: 2.48k]
  ------------------
 1605|       |        /* SSLfatal() already called */
 1606|     38|        return CON_FUNC_ERROR;
 1607|     38|    }
 1608|       |
 1609|  2.48k|    return CON_FUNC_SUCCESS;
 1610|  2.51k|}
statem_clnt.c:set_client_ciphersuite:
 1640|     36|{
 1641|     36|    STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|     36|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1642|     36|    const SSL_CIPHER *c;
 1643|     36|    int i;
 1644|     36|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|     36|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1645|       |
 1646|     36|    c = ssl_get_cipher_by_char(s, cipherchars, 0);
 1647|     36|    if (c == NULL) {
  ------------------
  |  Branch (1647:9): [True: 24, False: 12]
  ------------------
 1648|       |        /* unknown cipher */
 1649|     24|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_UNKNOWN_CIPHER_RETURNED);
  ------------------
  |  |  155|     24|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|     24|    (ERR_new(),                                                  \
  |  |  |  |  158|     24|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     24|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|     24|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1650|     24|        return 0;
 1651|     24|    }
 1652|       |    /*
 1653|       |     * If it is a disabled cipher we either didn't send it in client hello,
 1654|       |     * or it's not allowed for the selected protocol. So we return an error.
 1655|       |     */
 1656|     12|    if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_CHECK, 1)) {
  ------------------
  |  | 2747|     12|#define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|     12|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1656:9): [True: 7, False: 5]
  ------------------
 1657|      7|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  155|      7|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      7|    (ERR_new(),                                                  \
  |  |  |  |  158|      7|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      7|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      7|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1658|      7|        return 0;
 1659|      7|    }
 1660|       |
 1661|      5|    sk = ssl_get_ciphers_by_id(s);
 1662|      5|    i = sk_SSL_CIPHER_find(sk, c);
  ------------------
  |  | 1045|      5|#define sk_SSL_CIPHER_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 1663|      5|    if (i < 0) {
  ------------------
  |  Branch (1663:9): [True: 2, False: 3]
  ------------------
 1664|       |        /* we did not say we would use this cipher */
 1665|      2|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  155|      2|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      2|    (ERR_new(),                                                  \
  |  |  |  |  158|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      2|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1666|      2|        return 0;
 1667|      2|    }
 1668|       |
 1669|      3|    if (SSL_CONNECTION_IS_TLS13(s) && s->s3.tmp.new_cipher != NULL
  ------------------
  |  |  273|      6|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      6|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      3|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      3|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3, False: 0]
  |  |  ------------------
  |  |  274|      3|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      3|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      6|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 3]
  |  |  ------------------
  |  |  275|      6|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1669:39): [True: 0, False: 0]
  ------------------
 1670|      0|        && s->s3.tmp.new_cipher->id != c->id) {
  ------------------
  |  Branch (1670:12): [True: 0, False: 0]
  ------------------
 1671|       |        /* ServerHello selected a different ciphersuite to that in the HRR */
 1672|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1673|      0|        return 0;
 1674|      0|    }
 1675|       |
 1676|       |    /*
 1677|       |     * Depending on the session caching (internal/external), the cipher
 1678|       |     * and/or cipher_id values may not be set. Make sure that cipher_id is
 1679|       |     * set and use it for comparison.
 1680|       |     */
 1681|      3|    if (s->session->cipher != NULL)
  ------------------
  |  Branch (1681:9): [True: 0, False: 3]
  ------------------
 1682|      0|        s->session->cipher_id = s->session->cipher->id;
 1683|      3|    if (s->hit && (s->session->cipher_id != c->id)) {
  ------------------
  |  Branch (1683:9): [True: 0, False: 3]
  |  Branch (1683:19): [True: 0, False: 0]
  ------------------
 1684|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1685|      0|            const EVP_MD *md = ssl_md(sctx, c->algorithm2);
 1686|       |
 1687|      0|            if (!ossl_assert(s->session->cipher != NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (1687:17): [True: 0, False: 0]
  ------------------
 1688|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1689|      0|                return 0;
 1690|      0|            }
 1691|       |            /*
 1692|       |             * In TLSv1.3 it is valid for the server to select a different
 1693|       |             * ciphersuite as long as the hash is the same.
 1694|       |             */
 1695|      0|            if (md == NULL
  ------------------
  |  Branch (1695:17): [True: 0, False: 0]
  ------------------
 1696|      0|                || md != ssl_md(sctx, s->session->cipher->algorithm2)) {
  ------------------
  |  Branch (1696:20): [True: 0, False: 0]
  ------------------
 1697|      0|                SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1698|      0|                    SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED);
 1699|      0|                return 0;
 1700|      0|            }
 1701|      0|        } else {
 1702|       |            /*
 1703|       |             * Prior to TLSv1.3 resuming a session always meant using the same
 1704|       |             * ciphersuite.
 1705|       |             */
 1706|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1707|      0|                SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED);
 1708|      0|            return 0;
 1709|      0|        }
 1710|      0|    }
 1711|      3|    s->s3.tmp.new_cipher = c;
 1712|       |
 1713|      3|    return 1;
 1714|      3|}

ssl3_do_write:
   64|  2.48k|{
   65|  2.48k|    int ret;
   66|  2.48k|    size_t written = 0;
   67|  2.48k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
   68|  2.48k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  2.48k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
   69|       |
   70|       |    /*
   71|       |     * If we're running the test suite then we may need to mutate the message
   72|       |     * we've been asked to write. Does not happen in normal operation.
   73|       |     */
   74|  2.48k|    if (s->statem.mutate_handshake_cb != NULL
  ------------------
  |  Branch (74:9): [True: 0, False: 2.48k]
  ------------------
   75|      0|        && !s->statem.write_in_progress
  ------------------
  |  Branch (75:12): [True: 0, False: 0]
  ------------------
   76|      0|        && type == SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|  2.48k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (76:12): [True: 0, False: 0]
  ------------------
   77|      0|        && s->init_num >= SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (77:12): [True: 0, False: 0]
  ------------------
   78|      0|        unsigned char *msg;
   79|      0|        size_t msglen;
   80|       |
   81|      0|        if (!s->statem.mutate_handshake_cb((unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (81:13): [True: 0, False: 0]
  ------------------
   82|      0|                s->init_num,
   83|      0|                &msg, &msglen,
   84|      0|                s->statem.mutatearg))
   85|      0|            return -1;
   86|      0|        if (msglen < SSL3_HM_HEADER_LENGTH
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (86:13): [True: 0, False: 0]
  ------------------
   87|      0|            || !BUF_MEM_grow(s->init_buf, msglen))
  ------------------
  |  Branch (87:16): [True: 0, False: 0]
  ------------------
   88|      0|            return -1;
   89|      0|        memcpy(s->init_buf->data, msg, msglen);
   90|      0|        s->init_num = msglen;
   91|      0|        s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
   92|      0|        s->statem.finish_mutate_handshake_cb(s->statem.mutatearg);
   93|      0|        s->statem.write_in_progress = 1;
   94|      0|    }
   95|       |
   96|  2.48k|    ret = ssl3_write_bytes(ssl, type, &s->init_buf->data[s->init_off],
   97|  2.48k|        s->init_num, &written);
   98|  2.48k|    if (ret <= 0)
  ------------------
  |  Branch (98:9): [True: 0, False: 2.48k]
  ------------------
   99|      0|        return -1;
  100|  2.48k|    if (type == SSL3_RT_HANDSHAKE)
  ------------------
  |  |  221|  2.48k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (100:9): [True: 2.48k, False: 0]
  ------------------
  101|       |        /*
  102|       |         * should not be done for 'Hello Request's, but in that case we'll
  103|       |         * ignore the result anyway
  104|       |         * TLS1.3 KeyUpdate and NewSessionTicket do not need to be added
  105|       |         */
  106|  2.48k|        if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  4.96k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  4.96k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  2.48k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 2.48k, False: 0]
  |  |  ------------------
  |  |  274|  2.48k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  4.96k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 2.48k, False: 0]
  |  |  ------------------
  |  |  275|  4.96k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  2.48k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 2.48k]
  |  |  ------------------
  ------------------
  107|      0|            || (s->statem.hand_state != TLS_ST_SW_SESSION_TICKET
  ------------------
  |  Branch (107:17): [True: 0, False: 0]
  ------------------
  108|      0|                && s->statem.hand_state != TLS_ST_CW_KEY_UPDATE
  ------------------
  |  Branch (108:20): [True: 0, False: 0]
  ------------------
  109|      0|                && s->statem.hand_state != TLS_ST_SW_KEY_UPDATE))
  ------------------
  |  Branch (109:20): [True: 0, False: 0]
  ------------------
  110|  2.48k|            if (!ssl3_finish_mac(s,
  ------------------
  |  Branch (110:17): [True: 0, False: 2.48k]
  ------------------
  111|  2.48k|                    (unsigned char *)&s->init_buf->data[s->init_off],
  112|  2.48k|                    written))
  113|      0|                return -1;
  114|  2.48k|    if (written == s->init_num) {
  ------------------
  |  Branch (114:9): [True: 2.48k, False: 0]
  ------------------
  115|  2.48k|        s->statem.write_in_progress = 0;
  116|  2.48k|        if (s->msg_callback)
  ------------------
  |  Branch (116:13): [True: 0, False: 2.48k]
  ------------------
  117|      0|            s->msg_callback(1, s->version, type, s->init_buf->data,
  118|      0|                (size_t)(s->init_off + s->init_num), ussl,
  119|      0|                s->msg_callback_arg);
  120|  2.48k|        return 1;
  121|  2.48k|    }
  122|      0|    s->init_off += written;
  123|      0|    s->init_num -= written;
  124|      0|    return 0;
  125|  2.48k|}
tls_close_construct_packet:
  128|  2.48k|{
  129|  2.48k|    size_t msglen;
  130|       |
  131|  2.48k|    if ((htype != SSL3_MT_CHANGE_CIPHER_SPEC && !WPACKET_close(pkt))
  ------------------
  |  |  337|  4.96k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (131:10): [True: 2.48k, False: 0]
  |  Branch (131:49): [True: 0, False: 2.48k]
  ------------------
  132|  2.48k|        || !WPACKET_get_length(pkt, &msglen)
  ------------------
  |  Branch (132:12): [True: 0, False: 2.48k]
  ------------------
  133|  2.48k|        || msglen > INT_MAX)
  ------------------
  |  Branch (133:12): [True: 0, False: 2.48k]
  ------------------
  134|      0|        return 0;
  135|  2.48k|    s->init_num = (int)msglen;
  136|  2.48k|    s->init_off = 0;
  137|       |
  138|  2.48k|    return 1;
  139|  2.48k|}
tls_setup_handshake:
  142|  2.58k|{
  143|  2.58k|    int ver_min, ver_max, ok;
  144|  2.58k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.58k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  145|  2.58k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.58k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  146|       |
  147|  2.58k|    if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 2.58k]
  ------------------
  148|       |        /* SSLfatal() already called */
  149|      0|        return 0;
  150|      0|    }
  151|       |
  152|       |    /* Reset any extension flags */
  153|  2.58k|    memset(s->ext.extflags, 0, sizeof(s->ext.extflags));
  154|       |
  155|  2.58k|    if (ssl_get_min_max_version(s, &ver_min, &ver_max, NULL) != 0) {
  ------------------
  |  Branch (155:9): [True: 7, False: 2.57k]
  ------------------
  156|      7|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  155|      7|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      7|    (ERR_new(),                                                  \
  |  |  |  |  158|      7|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      7|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      7|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  157|      7|        return 0;
  158|      7|    }
  159|       |
  160|       |    /* Sanity check that we have MD5-SHA1 if we need it */
  161|  2.57k|    if (sctx->ssl_digest_methods[SSL_MD_MD5_SHA1_IDX] == NULL) {
  ------------------
  |  |  202|  2.57k|#define SSL_MD_MD5_SHA1_IDX 9
  ------------------
  |  Branch (161:9): [True: 0, False: 2.57k]
  ------------------
  162|      0|        int negotiated_minversion;
  163|      0|        int md5sha1_needed_maxversion = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  164|      0|            ? DTLS1_VERSION
  ------------------
  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  ------------------
  165|      0|            : TLS1_1_VERSION;
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  166|       |
  167|       |        /* We don't have MD5-SHA1 - do we need it? */
  168|      0|        if (ssl_version_cmp(s, ver_max, md5sha1_needed_maxversion) <= 0) {
  ------------------
  |  Branch (168:13): [True: 0, False: 0]
  ------------------
  169|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  170|      0|                SSL_R_NO_SUITABLE_DIGEST_ALGORITHM,
  ------------------
  |  |  216|      0|#define SSL_R_NO_SUITABLE_DIGEST_ALGORITHM 297
  ------------------
  171|      0|                "The max supported SSL/TLS version needs the"
  172|      0|                " MD5-SHA1 digest but it is not available"
  173|      0|                " in the loaded providers. Use (D)TLSv1.2 or"
  174|      0|                " above, or load different providers");
  175|      0|            return 0;
  176|      0|        }
  177|       |
  178|      0|        ok = 1;
  179|       |
  180|       |        /* Don't allow TLSv1.1 or below to be negotiated */
  181|      0|        negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                      negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  ------------------
                      negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  182|      0|        if (ssl_version_cmp(s, ver_min, negotiated_minversion) < 0)
  ------------------
  |  Branch (182:13): [True: 0, False: 0]
  ------------------
  183|      0|            ok = SSL_set_min_proto_version(ssl, negotiated_minversion);
  ------------------
  |  | 1591|      0|    SSL_ctrl(s, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
  |  |  ------------------
  |  |  |  | 1403|      0|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  |  |  ------------------
  ------------------
  184|      0|        if (!ok) {
  ------------------
  |  Branch (184:13): [True: 0, False: 0]
  ------------------
  185|       |            /* Shouldn't happen */
  186|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  187|      0|            return 0;
  188|      0|        }
  189|      0|    }
  190|       |
  191|  2.57k|    ok = 0;
  192|  2.57k|    if (s->server) {
  ------------------
  |  Branch (192:9): [True: 0, False: 2.57k]
  ------------------
  193|      0|        STACK_OF(SSL_CIPHER) *ciphers = SSL_get_ciphers(ssl);
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  194|      0|        int i;
  195|       |
  196|       |        /*
  197|       |         * Sanity check that the maximum version we accept has ciphers
  198|       |         * enabled. For clients we do this check during construction of the
  199|       |         * ClientHello.
  200|       |         */
  201|      0|        for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (201:21): [True: 0, False: 0]
  ------------------
  202|      0|            const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  203|      0|            int cipher_minprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  204|      0|                ? c->min_dtls
  205|      0|                : c->min_tls;
  206|      0|            int cipher_maxprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  207|      0|                ? c->max_dtls
  208|      0|                : c->max_tls;
  209|       |
  210|      0|            if (ssl_version_cmp(s, ver_max, cipher_minprotover) >= 0
  ------------------
  |  Branch (210:17): [True: 0, False: 0]
  ------------------
  211|      0|                && ssl_version_cmp(s, ver_max, cipher_maxprotover) <= 0) {
  ------------------
  |  Branch (211:20): [True: 0, False: 0]
  ------------------
  212|      0|                ok = 1;
  213|      0|                break;
  214|      0|            }
  215|      0|        }
  216|      0|        if (!ok) {
  ------------------
  |  Branch (216:13): [True: 0, False: 0]
  ------------------
  217|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  218|      0|                SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  198|      0|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
  219|      0|                "No ciphers enabled for max supported "
  220|      0|                "SSL/TLS version");
  221|      0|            return 0;
  222|      0|        }
  223|      0|        if (SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  224|       |            /* N.B. s->session_ctx == s->ctx here */
  225|      0|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_accept);
  226|      0|        } else {
  227|       |            /* N.B. s->ctx may not equal s->session_ctx */
  228|      0|            ssl_tsan_counter(sctx, &sctx->stats.sess_accept_renegotiate);
  229|       |
  230|      0|            s->s3.tmp.cert_request = 0;
  231|      0|        }
  232|  2.57k|    } else {
  233|  2.57k|        if (SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  2.57k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 2.57k, False: 0]
  |  |  ------------------
  |  |  286|  2.57k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  234|  2.57k|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_connect);
  235|      0|        else
  236|      0|            ssl_tsan_counter(s->session_ctx,
  237|      0|                &s->session_ctx->stats.sess_connect_renegotiate);
  238|       |
  239|       |        /* mark client_random uninitialized */
  240|  2.57k|        memset(s->s3.client_random, 0, sizeof(s->s3.client_random));
  241|  2.57k|        s->hit = 0;
  242|       |
  243|  2.57k|        s->s3.tmp.cert_req = 0;
  244|       |
  245|  2.57k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  2.57k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.57k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.57k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.57k]
  |  |  ------------------
  ------------------
  246|      0|            s->statem.use_timer = 1;
  247|  2.57k|    }
  248|       |
  249|  2.57k|    return 1;
  250|  2.57k|}
tls_get_message_header:
 1539|  2.95k|{
 1540|       |    /* s->init_num < SSL3_HM_HEADER_LENGTH */
 1541|  2.95k|    int skip_message, i;
 1542|  2.95k|    uint8_t recvd_type;
 1543|  2.95k|    unsigned char *p;
 1544|  2.95k|    size_t l, readbytes;
 1545|  2.95k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.95k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1546|  2.95k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  2.95k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1547|       |
 1548|  2.95k|    p = (unsigned char *)s->init_buf->data;
 1549|       |
 1550|  2.99k|    do {
 1551|  3.19k|        while (s->init_num < SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|  3.19k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1551:16): [True: 3.00k, False: 194]
  ------------------
 1552|  3.00k|            i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, &recvd_type,
  ------------------
  |  |  221|  3.00k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1553|  3.00k|                &p[s->init_num],
 1554|  3.00k|                SSL3_HM_HEADER_LENGTH - s->init_num,
  ------------------
  |  |  141|  3.00k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1555|  3.00k|                0, &readbytes);
 1556|  3.00k|            if (i <= 0) {
  ------------------
  |  Branch (1556:17): [True: 2.79k, False: 205]
  ------------------
 1557|  2.79k|                s->rwstate = SSL_READING;
  ------------------
  |  |  957|  2.79k|#define SSL_READING 3
  ------------------
 1558|  2.79k|                return 0;
 1559|  2.79k|            }
 1560|    205|            if (recvd_type == SSL3_RT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  219|    205|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1560:17): [True: 4, False: 201]
  ------------------
 1561|       |                /*
 1562|       |                 * A ChangeCipherSpec must be a single byte and may not occur
 1563|       |                 * in the middle of a handshake message.
 1564|       |                 */
 1565|      4|                if (s->init_num != 0 || readbytes != 1 || p[0] != SSL3_MT_CCS) {
  ------------------
  |  |  339|      2|#define SSL3_MT_CCS 1
  ------------------
  |  Branch (1565:21): [True: 1, False: 3]
  |  Branch (1565:41): [True: 1, False: 2]
  |  Branch (1565:59): [True: 1, False: 1]
  ------------------
 1566|      3|                    SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      3|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      3|    (ERR_new(),                                                  \
  |  |  |  |  158|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      3|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      3|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1567|      3|                        SSL_R_BAD_CHANGE_CIPHER_SPEC);
 1568|      3|                    return 0;
 1569|      3|                }
 1570|      1|                if (s->statem.hand_state == TLS_ST_BEFORE
  ------------------
  |  Branch (1570:21): [True: 0, False: 1]
  ------------------
 1571|      0|                    && (s->s3.flags & TLS1_FLAGS_STATELESS) != 0) {
  ------------------
  |  |  304|      0|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (1571:24): [True: 0, False: 0]
  ------------------
 1572|       |                    /*
 1573|       |                     * We are stateless and we received a CCS. Probably this is
 1574|       |                     * from a client between the first and second ClientHellos.
 1575|       |                     * We should ignore this, but return an error because we do
 1576|       |                     * not return success until we see the second ClientHello
 1577|       |                     * with a valid cookie.
 1578|       |                     */
 1579|      0|                    return 0;
 1580|      0|                }
 1581|      1|                s->s3.tmp.message_type = *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|      1|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
 1582|      1|                s->init_num = readbytes - 1;
 1583|      1|                s->init_msg = s->init_buf->data;
 1584|      1|                s->s3.tmp.message_size = readbytes;
 1585|      1|                return 1;
 1586|    201|            } else if (recvd_type != SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|    201|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (1586:24): [True: 0, False: 201]
  ------------------
 1587|      0|                SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1588|      0|                    SSL_R_CCS_RECEIVED_EARLY);
 1589|      0|                return 0;
 1590|      0|            }
 1591|    201|            s->init_num += readbytes;
 1592|    201|        }
 1593|       |
 1594|    194|        skip_message = 0;
 1595|    194|        if (!s->server)
  ------------------
  |  Branch (1595:13): [True: 194, False: 0]
  ------------------
 1596|    194|            if (s->statem.hand_state != TLS_ST_OK
  ------------------
  |  Branch (1596:17): [True: 194, False: 0]
  ------------------
 1597|    194|                && p[0] == SSL3_MT_HELLO_REQUEST)
  ------------------
  |  |  312|    194|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
  |  Branch (1597:20): [True: 45, False: 149]
  ------------------
 1598|       |                /*
 1599|       |                 * The server may always send 'Hello Request' messages --
 1600|       |                 * we are doing a handshake anyway now, so ignore them if
 1601|       |                 * their format is correct. Does not count for 'Finished'
 1602|       |                 * MAC.
 1603|       |                 */
 1604|     45|                if (p[1] == 0 && p[2] == 0 && p[3] == 0) {
  ------------------
  |  Branch (1604:21): [True: 44, False: 1]
  |  Branch (1604:34): [True: 41, False: 3]
  |  Branch (1604:47): [True: 40, False: 1]
  ------------------
 1605|     40|                    s->init_num = 0;
 1606|     40|                    skip_message = 1;
 1607|       |
 1608|     40|                    if (s->msg_callback)
  ------------------
  |  Branch (1608:25): [True: 0, False: 40]
  ------------------
 1609|      0|                        s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE,
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1610|      0|                            p, SSL3_HM_HEADER_LENGTH, ussl,
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1611|      0|                            s->msg_callback_arg);
 1612|     40|                }
 1613|    194|    } while (skip_message);
  ------------------
  |  Branch (1613:14): [True: 40, False: 154]
  ------------------
 1614|       |    /* s->init_num == SSL3_HM_HEADER_LENGTH */
 1615|       |
 1616|    154|    *mt = *p;
 1617|    154|    s->s3.tmp.message_type = *(p++);
 1618|       |
 1619|    154|    n2l3(p, l);
  ------------------
  |  |  196|    154|#define n2l3(c, l) ((l = (((unsigned long)((c)[0])) << 16) | (((unsigned long)((c)[1])) << 8) | (((unsigned long)((c)[2])))), (c) += 3)
  ------------------
 1620|       |    /* BUF_MEM_grow takes an 'int' parameter */
 1621|    154|    if (l > (INT_MAX - SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|    154|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1621:9): [True: 0, False: 154]
  ------------------
 1622|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_EXCESSIVE_MESSAGE_SIZE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1623|      0|        return 0;
 1624|      0|    }
 1625|    154|    s->s3.tmp.message_size = l;
 1626|       |
 1627|    154|    s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|    154|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1628|    154|    s->init_num = 0;
 1629|       |
 1630|    154|    return 1;
 1631|    154|}
tls_get_message_body:
 1650|    131|{
 1651|    131|    size_t toread, readbytes;
 1652|    131|    unsigned char *p;
 1653|    131|    int i;
 1654|    131|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|    131|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1655|    131|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|    131|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1656|       |
 1657|    131|    if (s->s3.tmp.message_type == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|    131|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (1657:9): [True: 0, False: 131]
  ------------------
 1658|       |        /* We've already read everything in */
 1659|      0|        *len = (unsigned long)s->init_num;
 1660|      0|        return 1;
 1661|      0|    }
 1662|       |
 1663|    131|    toread = s->s3.tmp.message_size - s->init_num;
 1664|    268|    while (toread > 0) {
  ------------------
  |  Branch (1664:12): [True: 181, False: 87]
  ------------------
 1665|    181|        size_t chunk = toread > SSL3_RT_MAX_PLAIN_LENGTH ? SSL3_RT_MAX_PLAIN_LENGTH : toread;
  ------------------
  |  |  177|    181|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
                      size_t chunk = toread > SSL3_RT_MAX_PLAIN_LENGTH ? SSL3_RT_MAX_PLAIN_LENGTH : toread;
  ------------------
  |  |  177|     36|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1665:24): [True: 36, False: 145]
  ------------------
 1666|       |
 1667|       |        /*
 1668|       |         * We incrementally allocate the buffer to guard against the peer
 1669|       |         * claiming a very large message size and then not sending it.
 1670|       |         */
 1671|    181|        if (!grow_init_buf(s, s->init_num + chunk + SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|    181|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1671:13): [True: 0, False: 181]
  ------------------
 1672|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BUF_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1673|      0|            return 0;
 1674|      0|        }
 1675|       |
 1676|       |        /* init_msg location can change after grow_init_buf */
 1677|    181|        p = s->init_msg;
 1678|    181|        i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, NULL,
  ------------------
  |  |  221|    181|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1679|    181|            &p[s->init_num], chunk, 0, &readbytes);
 1680|    181|        if (i <= 0) {
  ------------------
  |  Branch (1680:13): [True: 44, False: 137]
  ------------------
 1681|     44|            s->rwstate = SSL_READING;
  ------------------
  |  |  957|     44|#define SSL_READING 3
  ------------------
 1682|     44|            *len = 0;
 1683|     44|            return 0;
 1684|     44|        }
 1685|    137|        s->init_num += readbytes;
 1686|    137|        toread -= readbytes;
 1687|    137|    }
 1688|       |
 1689|       |    /*
 1690|       |     * If receiving Finished, record MAC of prior handshake messages for
 1691|       |     * Finished verification.
 1692|       |     */
 1693|     87|    if (*(s->init_buf->data) == SSL3_MT_FINISHED && !ssl3_take_mac(s)) {
  ------------------
  |  |  324|    174|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (1693:9): [True: 0, False: 87]
  |  Branch (1693:53): [True: 0, False: 0]
  ------------------
 1694|       |        /* SSLfatal() already called */
 1695|      0|        *len = 0;
 1696|      0|        return 0;
 1697|      0|    }
 1698|       |
 1699|       |    /*
 1700|       |     * We defer feeding in the HRR until later. We'll do it as part of
 1701|       |     * processing the message
 1702|       |     * The TLsv1.3 handshake transcript stops at the ClientFinished
 1703|       |     * message.
 1704|       |     */
 1705|     87|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
 1706|       |    /* KeyUpdate and NewSessionTicket do not need to be added */
 1707|     87|    if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|    174|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|    174|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     87|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     87|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 87, False: 0]
  |  |  ------------------
  |  |  274|     87|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     87|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    174|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 87, False: 0]
  |  |  ------------------
  |  |  275|    174|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|     87|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|     87|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 87]
  |  |  ------------------
  ------------------
 1708|      0|        || (s->s3.tmp.message_type != SSL3_MT_NEWSESSION_TICKET
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (1708:13): [True: 0, False: 0]
  ------------------
 1709|     87|            && s->s3.tmp.message_type != SSL3_MT_KEY_UPDATE)) {
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
  |  Branch (1709:16): [True: 0, False: 0]
  ------------------
 1710|     87|        if (s->s3.tmp.message_type != SSL3_MT_SERVER_HELLO
  ------------------
  |  |  314|    174|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (1710:13): [True: 0, False: 87]
  ------------------
 1711|     87|            || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  | 1705|     87|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|     87|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
                          || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|    174|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1711:16): [True: 7, False: 80]
  ------------------
 1712|     80|            || memcmp(hrrrandom,
  ------------------
  |  Branch (1712:16): [True: 79, False: 1]
  ------------------
 1713|     80|                   s->init_buf->data + SERVER_HELLO_RANDOM_OFFSET,
  ------------------
  |  | 1705|     80|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|     80|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
 1714|     80|                   SSL3_RANDOM_SIZE)
  ------------------
  |  |  137|     80|#define SSL3_RANDOM_SIZE 32
  ------------------
 1715|     86|                != 0) {
 1716|     86|            if (!ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (1716:17): [True: 0, False: 86]
  ------------------
 1717|     86|                    s->init_num + SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|     86|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1718|       |                /* SSLfatal() already called */
 1719|      0|                *len = 0;
 1720|      0|                return 0;
 1721|      0|            }
 1722|     86|        }
 1723|     87|    }
 1724|     87|    if (s->msg_callback)
  ------------------
  |  Branch (1724:9): [True: 0, False: 87]
  ------------------
 1725|      0|        s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->init_buf->data,
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1726|      0|            (size_t)s->init_num + SSL3_HM_HEADER_LENGTH, ussl,
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1727|      0|            s->msg_callback_arg);
 1728|       |
 1729|     87|    *len = s->init_num;
 1730|     87|    return 1;
 1731|     87|}
ssl_allow_compression:
 1790|  2.52k|{
 1791|  2.52k|    if (s->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  395|  2.52k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  351|  2.52k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1791:9): [True: 2.52k, False: 0]
  ------------------
 1792|  2.52k|        return 0;
 1793|      0|    return ssl_security(s, SSL_SECOP_COMPRESSION, 0, 0, NULL);
  ------------------
  |  | 2769|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 1794|  2.52k|}
ssl_version_cmp:
 1805|   845k|{
 1806|   845k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  266|   845k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   845k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   845k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 1807|       |
 1808|   845k|    if (versiona == versionb)
  ------------------
  |  Branch (1808:9): [True: 401k, False: 444k]
  ------------------
 1809|   401k|        return 0;
 1810|   444k|    if (!dtls)
  ------------------
  |  Branch (1810:9): [True: 444k, False: 0]
  ------------------
 1811|   444k|        return versiona < versionb ? -1 : 1;
  ------------------
  |  Branch (1811:16): [True: 335k, False: 108k]
  ------------------
 1812|      0|    return DTLS_VERSION_LT(versiona, versionb) ? -1 : 1;
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1813|   444k|}
ssl_set_version_bound:
 2059|  6.71k|{
 2060|  6.71k|    int valid_tls;
 2061|  6.71k|    int valid_dtls;
 2062|       |
 2063|  6.71k|    if (version == 0) {
  ------------------
  |  Branch (2063:9): [True: 3.27k, False: 3.43k]
  ------------------
 2064|  3.27k|        *bound = version;
 2065|  3.27k|        return 1;
 2066|  3.27k|    }
 2067|       |
 2068|  3.43k|    valid_tls = version > SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   23|  6.87k|#define SSL3_VERSION 0x0300
  ------------------
                  valid_tls = version > SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   54|  3.43k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  6.87k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  |  Branch (2068:17): [True: 3.43k, False: 0]
  |  Branch (2068:43): [True: 3.43k, False: 0]
  ------------------
 2069|  3.43k|    valid_dtls =
 2070|       |        /* We support client side pre-standardisation version of DTLS */
 2071|  3.43k|        (version == DTLS1_BAD_VER)
  ------------------
  |  |   30|  3.43k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (2071:9): [True: 0, False: 3.43k]
  ------------------
 2072|  3.43k|        || (DTLS_VERSION_LE(version, DTLS_MAX_VERSION_INTERNAL)
  ------------------
  |  |   65|  6.87k|#define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  3.43k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  3.43k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 3.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  3.43k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  3.43k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 3.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (65:33): [True: 0, False: 3.43k]
  |  |  ------------------
  ------------------
 2073|      0|            && DTLS_VERSION_GE(version, DTLS1_VERSION));
  ------------------
  |  |   63|      0|#define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (63:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2074|       |
 2075|  3.43k|    if (!valid_tls && !valid_dtls)
  ------------------
  |  Branch (2075:9): [True: 0, False: 3.43k]
  |  Branch (2075:23): [True: 0, False: 0]
  ------------------
 2076|      0|        return 0;
 2077|       |
 2078|       |    /*-
 2079|       |     * Restrict TLS methods to TLS protocol versions.
 2080|       |     * Restrict DTLS methods to DTLS protocol versions.
 2081|       |     * Note, DTLS version numbers are decreasing, use comparison macros.
 2082|       |     *
 2083|       |     * Note that for both lower-bounds we use explicit versions, not
 2084|       |     * (D)TLS_MIN_VERSION.  This is because we don't want to break user
 2085|       |     * configurations.  If the MIN (supported) version ever rises, the user's
 2086|       |     * "floor" remains valid even if no longer available.  We don't expect the
 2087|       |     * MAX ceiling to ever get lower, so making that variable makes sense.
 2088|       |     *
 2089|       |     * We ignore attempts to set bounds on version-inflexible methods,
 2090|       |     * returning success.
 2091|       |     */
 2092|  3.43k|    switch (method_version) {
 2093|      0|    default:
  ------------------
  |  Branch (2093:5): [True: 0, False: 3.43k]
  ------------------
 2094|      0|        break;
 2095|       |
 2096|  3.43k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  3.43k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2096:5): [True: 3.43k, False: 0]
  ------------------
 2097|  3.43k|        if (valid_tls)
  ------------------
  |  Branch (2097:13): [True: 3.43k, False: 0]
  ------------------
 2098|  3.43k|            *bound = version;
 2099|  3.43k|        break;
 2100|       |
 2101|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2101:5): [True: 0, False: 3.43k]
  ------------------
 2102|      0|        if (valid_dtls)
  ------------------
  |  Branch (2102:13): [True: 0, False: 0]
  ------------------
 2103|      0|            *bound = version;
 2104|      0|        break;
 2105|  3.43k|    }
 2106|  3.43k|    return 1;
 2107|  3.43k|}
ssl_choose_client_version:
 2313|     61|{
 2314|     61|    const version_info *vent;
 2315|     61|    const version_info *table;
 2316|     61|    int ret, ver_min, ver_max, real_max, origv;
 2317|     61|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|     61|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2318|       |
 2319|     61|    origv = s->version;
 2320|     61|    s->version = version;
 2321|       |
 2322|       |    /* This will overwrite s->version if the extension is present */
 2323|     61|    if (!tls_parse_extension(s, TLSEXT_IDX_supported_versions,
  ------------------
  |  Branch (2323:9): [True: 0, False: 61]
  ------------------
 2324|     61|            SSL_EXT_TLS1_2_SERVER_HELLO
  ------------------
  |  |  302|     61|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 2325|     61|                | SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  303|     61|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 2326|     61|            extensions,
 2327|     61|            NULL, 0)) {
 2328|      0|        s->version = origv;
 2329|      0|        return 0;
 2330|      0|    }
 2331|       |
 2332|     61|    if (s->hello_retry_request != SSL_HRR_NONE
  ------------------
  |  Branch (2332:9): [True: 0, False: 61]
  ------------------
 2333|      0|        && s->version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2333:12): [True: 0, False: 0]
  ------------------
 2334|      0|        s->version = origv;
 2335|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_WRONG_SSL_VERSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2336|      0|        return 0;
 2337|      0|    }
 2338|       |
 2339|     61|    switch (ssl->method->version) {
 2340|      0|    default:
  ------------------
  |  Branch (2340:5): [True: 0, False: 61]
  ------------------
 2341|      0|        if (s->version != ssl->method->version) {
  ------------------
  |  Branch (2341:13): [True: 0, False: 0]
  ------------------
 2342|      0|            s->version = origv;
 2343|      0|            SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_WRONG_SSL_VERSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2344|      0|            return 0;
 2345|      0|        }
 2346|       |        /*
 2347|       |         * If this SSL handle is not from a version flexible method we don't
 2348|       |         * (and never did) check min/max, FIPS or Suite B constraints.  Hope
 2349|       |         * that's OK.  It is up to the caller to not choose fixed protocol
 2350|       |         * versions they don't want.  If not, then easy to fix, just return
 2351|       |         * ssl_method_error(s, s->method)
 2352|       |         */
 2353|      0|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (2353:13): [True: 0, False: 0]
  ------------------
 2354|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2355|      0|            return 0;
 2356|      0|        }
 2357|      0|        return 1;
 2358|     61|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|     61|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2358:5): [True: 61, False: 0]
  ------------------
 2359|     61|        table = tls_version_table;
 2360|     61|        break;
 2361|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2361:5): [True: 0, False: 61]
  ------------------
 2362|      0|        table = dtls_version_table;
 2363|      0|        break;
 2364|     61|    }
 2365|       |
 2366|     61|    ret = ssl_get_min_max_version(s, &ver_min, &ver_max, &real_max);
 2367|     61|    if (ret != 0) {
  ------------------
  |  Branch (2367:9): [True: 0, False: 61]
  ------------------
 2368|      0|        s->version = origv;
 2369|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, ret);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2370|      0|        return 0;
 2371|      0|    }
 2372|     61|    if (ssl_version_cmp(s, s->version, ver_min) < 0
  ------------------
  |  Branch (2372:9): [True: 1, False: 60]
  ------------------
 2373|     60|        || ssl_version_cmp(s, s->version, ver_max) > 0) {
  ------------------
  |  Branch (2373:12): [True: 20, False: 40]
  ------------------
 2374|     21|        s->version = origv;
 2375|     21|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_PROTOCOL);
  ------------------
  |  |  155|     21|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|     21|    (ERR_new(),                                                  \
  |  |  |  |  158|     21|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     21|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|     21|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2376|     21|        return 0;
 2377|     21|    }
 2378|       |
 2379|     40|    if ((s->mode & SSL_MODE_SEND_FALLBACK_SCSV) == 0)
  ------------------
  |  |  553|     40|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2379:9): [True: 40, False: 0]
  ------------------
 2380|     40|        real_max = ver_max;
 2381|       |
 2382|       |    /* Check for downgrades */
 2383|       |    /* TODO(DTLSv1.3): Update this code for DTLSv1.3 */
 2384|     40|    if (!SSL_CONNECTION_IS_DTLS(s) && real_max > s->version) {
  ------------------
  |  |  266|     80|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|     40|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|     40|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2384:9): [True: 40, False: 0]
  |  Branch (2384:39): [True: 36, False: 4]
  ------------------
 2385|       |        /* Signal applies to all versions */
 2386|     36|        if (memcmp(tls11downgrade,
  ------------------
  |  Branch (2386:13): [True: 1, False: 35]
  ------------------
 2387|     36|                s->s3.server_random + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|     36|#define SSL3_RANDOM_SIZE 32
  ------------------
 2388|     36|                    - sizeof(tls11downgrade),
 2389|     36|                sizeof(tls11downgrade))
 2390|     36|            == 0) {
 2391|      1|            s->version = origv;
 2392|      1|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2393|      1|                SSL_R_INAPPROPRIATE_FALLBACK);
 2394|      1|            return 0;
 2395|      1|        }
 2396|       |        /* Only when accepting TLS1.3 */
 2397|     35|        if (real_max == TLS1_3_VERSION
  ------------------
  |  |   27|     70|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2397:13): [True: 35, False: 0]
  ------------------
 2398|     35|            && memcmp(tls12downgrade,
  ------------------
  |  Branch (2398:16): [True: 1, False: 34]
  ------------------
 2399|     35|                   s->s3.server_random + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|     35|#define SSL3_RANDOM_SIZE 32
  ------------------
 2400|     35|                       - sizeof(tls12downgrade),
 2401|     35|                   sizeof(tls12downgrade))
 2402|     35|                == 0) {
 2403|      1|            s->version = origv;
 2404|      1|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      1|    (ERR_new(),                                                  \
  |  |  |  |  158|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2405|      1|                SSL_R_INAPPROPRIATE_FALLBACK);
 2406|      1|            return 0;
 2407|      1|        }
 2408|     35|    }
 2409|       |
 2410|     74|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2410:24): [True: 74, False: 0]
  ------------------
 2411|     74|        if (vent->cmeth == NULL || s->version != vent->version)
  ------------------
  |  Branch (2411:13): [True: 0, False: 74]
  |  Branch (2411:36): [True: 36, False: 38]
  ------------------
 2412|     36|            continue;
 2413|       |
 2414|     38|        ssl->method = vent->cmeth();
 2415|     38|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (2415:13): [True: 0, False: 38]
  ------------------
 2416|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2417|      0|            return 0;
 2418|      0|        }
 2419|     38|        return 1;
 2420|     38|    }
 2421|       |
 2422|      0|    s->version = origv;
 2423|       |    SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_PROTOCOL);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2424|      0|    return 0;
 2425|     38|}
ssl_get_min_max_version:
 2451|  27.9k|{
 2452|  27.9k|    int version, tmp_real_max;
 2453|  27.9k|    int hole;
 2454|  27.9k|    const SSL_METHOD *method;
 2455|  27.9k|    const version_info *table;
 2456|  27.9k|    const version_info *vent;
 2457|  27.9k|    const SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  27.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2458|       |
 2459|  27.9k|    switch (ssl->method->version) {
 2460|      0|    default:
  ------------------
  |  Branch (2460:5): [True: 0, False: 27.9k]
  ------------------
 2461|       |        /*
 2462|       |         * If this SSL handle is not from a version flexible method we don't
 2463|       |         * (and never did) check min/max FIPS or Suite B constraints.  Hope
 2464|       |         * that's OK.  It is up to the caller to not choose fixed protocol
 2465|       |         * versions they don't want.  If not, then easy to fix, just return
 2466|       |         * ssl_method_error(s, s->method)
 2467|       |         */
 2468|      0|        *min_version = *max_version = s->version;
 2469|       |        /*
 2470|       |         * Providing a real_max only makes sense where we're using a version
 2471|       |         * flexible method.
 2472|       |         */
 2473|      0|        if (!ossl_assert(real_max == NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (2473:13): [True: 0, False: 0]
  ------------------
 2474|      0|            return ERR_R_INTERNAL_ERROR;
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2475|      0|        return 0;
 2476|  27.9k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  27.9k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2476:5): [True: 27.9k, False: 0]
  ------------------
 2477|  27.9k|        table = tls_version_table;
 2478|  27.9k|        break;
 2479|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2479:5): [True: 0, False: 27.9k]
  ------------------
 2480|      0|        table = dtls_version_table;
 2481|      0|        break;
 2482|  27.9k|    }
 2483|       |
 2484|       |    /*
 2485|       |     * SSL_OP_NO_X disables all protocols above X *if* there are some protocols
 2486|       |     * below X enabled. This is required in order to maintain the "version
 2487|       |     * capability" vector contiguous. Any versions with a NULL client method
 2488|       |     * (protocol version client is disabled at compile-time) is also a "hole".
 2489|       |     *
 2490|       |     * Our initial state is hole == 1, version == 0.  That is, versions above
 2491|       |     * the first version in the method table are disabled (a "hole" above
 2492|       |     * the valid protocol entries) and we don't have a selected version yet.
 2493|       |     *
 2494|       |     * Whenever "hole == 1", and we hit an enabled method, its version becomes
 2495|       |     * the selected version.  We're no longer in a hole, so "hole" becomes 0.
 2496|       |     *
 2497|       |     * If "hole == 0" and we hit an enabled method, we support a contiguous
 2498|       |     * range of at least two methods.  If we hit a disabled method,
 2499|       |     * then hole becomes true again, but nothing else changes yet,
 2500|       |     * because all the remaining methods may be disabled too.
 2501|       |     * If we again hit an enabled method after the new hole, it becomes
 2502|       |     * selected, as we start from scratch.
 2503|       |     */
 2504|  27.9k|    *min_version = version = 0;
 2505|  27.9k|    hole = 1;
 2506|  27.9k|    if (real_max != NULL)
  ------------------
  |  Branch (2506:9): [True: 61, False: 27.9k]
  ------------------
 2507|     61|        *real_max = 0;
 2508|  27.9k|    tmp_real_max = 0;
 2509|   139k|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2509:24): [True: 111k, False: 27.9k]
  ------------------
 2510|       |        /*
 2511|       |         * A table entry with a NULL client method is still a hole in the
 2512|       |         * "version capability" vector.
 2513|       |         */
 2514|   111k|        if (vent->cmeth == NULL) {
  ------------------
  |  Branch (2514:13): [True: 0, False: 111k]
  ------------------
 2515|      0|            hole = 1;
 2516|      0|            tmp_real_max = 0;
 2517|      0|            continue;
 2518|      0|        }
 2519|   111k|        method = vent->cmeth();
 2520|       |
 2521|   111k|        if (hole == 1 && tmp_real_max == 0)
  ------------------
  |  Branch (2521:13): [True: 56.4k, False: 55.4k]
  |  Branch (2521:26): [True: 27.9k, False: 28.4k]
  ------------------
 2522|  27.9k|            tmp_real_max = vent->version;
 2523|       |
 2524|   111k|        if (ssl_method_error(s, method) != 0) {
  ------------------
  |  Branch (2524:13): [True: 56.3k, False: 55.5k]
  ------------------
 2525|  56.3k|            hole = 1;
 2526|  56.3k|        } else if (!hole) {
  ------------------
  |  Branch (2526:20): [True: 27.5k, False: 27.9k]
  ------------------
 2527|  27.5k|            *min_version = method->version;
 2528|  27.9k|        } else {
 2529|  27.9k|            if (real_max != NULL && tmp_real_max != 0)
  ------------------
  |  Branch (2529:17): [True: 61, False: 27.9k]
  |  Branch (2529:37): [True: 61, False: 0]
  ------------------
 2530|     61|                *real_max = tmp_real_max;
 2531|  27.9k|            version = method->version;
 2532|  27.9k|            *min_version = version;
 2533|  27.9k|            hole = 0;
 2534|  27.9k|        }
 2535|   111k|    }
 2536|       |
 2537|  27.9k|    *max_version = version;
 2538|       |
 2539|       |    /* Fail if everything is disabled */
 2540|  27.9k|    if (version == 0)
  ------------------
  |  Branch (2540:9): [True: 7, False: 27.9k]
  ------------------
 2541|      7|        return SSL_R_NO_PROTOCOLS_AVAILABLE;
  ------------------
  |  |  208|      7|#define SSL_R_NO_PROTOCOLS_AVAILABLE 191
  ------------------
 2542|       |
 2543|  27.9k|    return 0;
 2544|  27.9k|}
ssl_set_client_hello_version:
 2555|  5.15k|{
 2556|  5.15k|    int ver_min, ver_max, ret;
 2557|       |
 2558|       |    /*
 2559|       |     * In a renegotiation we always send the same client_version that we sent
 2560|       |     * last time, regardless of which version we eventually negotiated.
 2561|       |     */
 2562|  5.15k|    if (!SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  5.15k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 5.15k, False: 0]
  |  |  ------------------
  |  |  286|  5.15k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2563|      0|        return 0;
 2564|       |
 2565|  5.15k|    ret = ssl_get_min_max_version(s, &ver_min, &ver_max, NULL);
 2566|       |
 2567|  5.15k|    if (ret != 0)
  ------------------
  |  Branch (2567:9): [True: 0, False: 5.15k]
  ------------------
 2568|      0|        return ret;
 2569|       |
 2570|  5.15k|    s->version = ver_max;
 2571|       |
 2572|  5.15k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  5.15k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  5.15k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  5.15k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 5.15k]
  |  |  ------------------
  ------------------
 2573|      0|        if (ver_max == DTLS1_BAD_VER) {
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (2573:13): [True: 0, False: 0]
  ------------------
 2574|       |            /*
 2575|       |             * Even though this is technically before version negotiation,
 2576|       |             * because we have asked for DTLS1_BAD_VER we will never negotiate
 2577|       |             * anything else, and this has impacts on the record layer for when
 2578|       |             * we read the ServerHello. So we need to tell the record layer
 2579|       |             * about this immediately.
 2580|       |             */
 2581|      0|            if (!ssl_set_record_protocol_version(s, ver_max))
  ------------------
  |  Branch (2581:17): [True: 0, False: 0]
  ------------------
 2582|      0|                return 0;
 2583|      0|        }
 2584|  5.15k|    } else if (ver_max > TLS1_2_VERSION) {
  ------------------
  |  |   26|  5.15k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (2584:16): [True: 5.03k, False: 118]
  ------------------
 2585|       |        /* TLS1.3 always uses TLS1.2 in the legacy_version field */
 2586|  5.03k|        ver_max = TLS1_2_VERSION;
  ------------------
  |  |   26|  5.03k|#define TLS1_2_VERSION 0x0303
  ------------------
 2587|  5.03k|    }
 2588|       |
 2589|  5.15k|    s->client_version = ver_max;
 2590|  5.15k|    return 0;
 2591|  5.15k|}
get_ca_names:
 2738|  2.43k|{
 2739|  2.43k|    const STACK_OF(X509_NAME) *ca_sk = NULL;
 2740|  2.43k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.43k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2741|       |
 2742|  2.43k|    if (s->server) {
  ------------------
  |  Branch (2742:9): [True: 0, False: 2.43k]
  ------------------
 2743|      0|        ca_sk = SSL_get_client_CA_list(ssl);
 2744|      0|        if (ca_sk != NULL && sk_X509_NAME_num(ca_sk) == 0)
  ------------------
  |  |   56|      0|#define sk_X509_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(sk))
  ------------------
  |  Branch (2744:13): [True: 0, False: 0]
  |  Branch (2744:30): [True: 0, False: 0]
  ------------------
 2745|      0|            ca_sk = NULL;
 2746|      0|    }
 2747|       |
 2748|  2.43k|    if (ca_sk == NULL)
  ------------------
  |  Branch (2748:9): [True: 2.43k, False: 0]
  ------------------
 2749|  2.43k|        ca_sk = SSL_get0_CA_list(ssl);
 2750|       |
 2751|  2.43k|    return ca_sk;
 2752|  2.43k|}
statem_lib.c:grow_init_buf:
 1634|    181|{
 1635|       |
 1636|    181|    size_t msg_offset = (char *)s->init_msg - s->init_buf->data;
 1637|       |
 1638|    181|    if (!BUF_MEM_grow_clean(s->init_buf, size))
  ------------------
  |  Branch (1638:9): [True: 0, False: 181]
  ------------------
 1639|      0|        return 0;
 1640|       |
 1641|    181|    if (size < msg_offset)
  ------------------
  |  Branch (1641:9): [True: 0, False: 181]
  ------------------
 1642|      0|        return 0;
 1643|       |
 1644|    181|    s->init_msg = s->init_buf->data + msg_offset;
 1645|       |
 1646|    181|    return 1;
 1647|    181|}
statem_lib.c:ssl_method_error:
 1880|   111k|{
 1881|   111k|    int version = method->version;
 1882|       |
 1883|   111k|    if ((s->min_proto_version != 0 && ssl_version_cmp(s, version, s->min_proto_version) < 0) || ssl_security(s, SSL_SECOP_VERSION, 0, version, NULL) == 0)
  ------------------
  |  | 2757|  56.5k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|  56.5k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1883:10): [True: 111k, False: 0]
  |  Branch (1883:39): [True: 55.3k, False: 56.5k]
  |  Branch (1883:97): [True: 381, False: 56.1k]
  ------------------
 1884|  55.7k|        return SSL_R_VERSION_TOO_LOW;
  ------------------
  |  |  368|  55.7k|#define SSL_R_VERSION_TOO_LOW 396
  ------------------
 1885|       |
 1886|  56.1k|    if (s->max_proto_version != 0 && ssl_version_cmp(s, version, s->max_proto_version) > 0)
  ------------------
  |  Branch (1886:9): [True: 1.52k, False: 54.6k]
  |  Branch (1886:38): [True: 658, False: 870]
  ------------------
 1887|    658|        return SSL_R_VERSION_TOO_HIGH;
  ------------------
  |  |  367|    658|#define SSL_R_VERSION_TOO_HIGH 166
  ------------------
 1888|       |
 1889|  55.5k|    if ((s->options & method->mask) != 0)
  ------------------
  |  Branch (1889:9): [True: 0, False: 55.5k]
  ------------------
 1890|      0|        return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  362|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 1891|  55.5k|    if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2265|  55.5k|#define SSL_METHOD_NO_SUITEB (1U << 1)
  ------------------
                  if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2035|    269|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|    269|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 269]
  |  |  ------------------
  ------------------
  |  Branch (1891:9): [True: 269, False: 55.2k]
  ------------------
 1892|      0|        return SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE;
  ------------------
  |  |   25|      0|#define SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE 158
  ------------------
 1893|       |
 1894|  55.5k|    return 0;
 1895|  55.5k|}

tls1_alert_code:
  533|  2.31k|{
  534|  2.31k|    switch (code) {
  535|      0|    case SSL_AD_CLOSE_NOTIFY:
  ------------------
  |  | 1232|      0|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (535:5): [True: 0, False: 2.31k]
  ------------------
  536|      0|        return SSL3_AD_CLOSE_NOTIFY;
  ------------------
  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  ------------------
  537|     28|    case SSL_AD_UNEXPECTED_MESSAGE:
  ------------------
  |  | 1234|     28|#define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE
  |  |  ------------------
  |  |  |  |  253|     28|#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (537:5): [True: 28, False: 2.28k]
  ------------------
  538|     28|        return SSL3_AD_UNEXPECTED_MESSAGE;
  ------------------
  |  |  253|     28|#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */
  ------------------
  539|      0|    case SSL_AD_BAD_RECORD_MAC:
  ------------------
  |  | 1236|      0|#define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC
  |  |  ------------------
  |  |  |  |  254|      0|#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (539:5): [True: 0, False: 2.31k]
  ------------------
  540|      0|        return SSL3_AD_BAD_RECORD_MAC;
  ------------------
  |  |  254|      0|#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */
  ------------------
  541|      0|    case SSL_AD_DECRYPTION_FAILED:
  ------------------
  |  | 1237|      0|#define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED
  |  |  ------------------
  |  |  |  |   57|      0|#define TLS1_AD_DECRYPTION_FAILED 21
  |  |  ------------------
  ------------------
  |  Branch (541:5): [True: 0, False: 2.31k]
  ------------------
  542|      0|        return TLS1_AD_DECRYPTION_FAILED;
  ------------------
  |  |   57|      0|#define TLS1_AD_DECRYPTION_FAILED 21
  ------------------
  543|      2|    case SSL_AD_RECORD_OVERFLOW:
  ------------------
  |  | 1238|      2|#define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW
  |  |  ------------------
  |  |  |  |   58|      2|#define TLS1_AD_RECORD_OVERFLOW 22
  |  |  ------------------
  ------------------
  |  Branch (543:5): [True: 2, False: 2.31k]
  ------------------
  544|      2|        return TLS1_AD_RECORD_OVERFLOW;
  ------------------
  |  |   58|      2|#define TLS1_AD_RECORD_OVERFLOW 22
  ------------------
  545|      0|    case SSL_AD_DECOMPRESSION_FAILURE:
  ------------------
  |  | 1240|      0|#define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE
  |  |  ------------------
  |  |  |  |  255|      0|#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (545:5): [True: 0, False: 2.31k]
  ------------------
  546|      0|        return SSL3_AD_DECOMPRESSION_FAILURE;
  ------------------
  |  |  255|      0|#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */
  ------------------
  547|      2|    case SSL_AD_HANDSHAKE_FAILURE:
  ------------------
  |  | 1242|      2|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      2|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (547:5): [True: 2, False: 2.31k]
  ------------------
  548|      2|        return SSL3_AD_HANDSHAKE_FAILURE;
  ------------------
  |  |  256|      2|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  ------------------
  549|      0|    case SSL_AD_NO_CERTIFICATE:
  ------------------
  |  | 1244|      0|#define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE
  |  |  ------------------
  |  |  |  |  257|      0|#define SSL3_AD_NO_CERTIFICATE 41
  |  |  ------------------
  ------------------
  |  Branch (549:5): [True: 0, False: 2.31k]
  ------------------
  550|      0|        return -1;
  551|      0|    case SSL_AD_BAD_CERTIFICATE:
  ------------------
  |  | 1245|      0|#define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE
  |  |  ------------------
  |  |  |  |  258|      0|#define SSL3_AD_BAD_CERTIFICATE 42
  |  |  ------------------
  ------------------
  |  Branch (551:5): [True: 0, False: 2.31k]
  ------------------
  552|      0|        return SSL3_AD_BAD_CERTIFICATE;
  ------------------
  |  |  258|      0|#define SSL3_AD_BAD_CERTIFICATE 42
  ------------------
  553|      0|    case SSL_AD_UNSUPPORTED_CERTIFICATE:
  ------------------
  |  | 1246|      0|#define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE
  |  |  ------------------
  |  |  |  |  259|      0|#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
  |  |  ------------------
  ------------------
  |  Branch (553:5): [True: 0, False: 2.31k]
  ------------------
  554|      0|        return SSL3_AD_UNSUPPORTED_CERTIFICATE;
  ------------------
  |  |  259|      0|#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
  ------------------
  555|      0|    case SSL_AD_CERTIFICATE_REVOKED:
  ------------------
  |  | 1247|      0|#define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED
  |  |  ------------------
  |  |  |  |  260|      0|#define SSL3_AD_CERTIFICATE_REVOKED 44
  |  |  ------------------
  ------------------
  |  Branch (555:5): [True: 0, False: 2.31k]
  ------------------
  556|      0|        return SSL3_AD_CERTIFICATE_REVOKED;
  ------------------
  |  |  260|      0|#define SSL3_AD_CERTIFICATE_REVOKED 44
  ------------------
  557|      0|    case SSL_AD_CERTIFICATE_EXPIRED:
  ------------------
  |  | 1248|      0|#define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED
  |  |  ------------------
  |  |  |  |  261|      0|#define SSL3_AD_CERTIFICATE_EXPIRED 45
  |  |  ------------------
  ------------------
  |  Branch (557:5): [True: 0, False: 2.31k]
  ------------------
  558|      0|        return SSL3_AD_CERTIFICATE_EXPIRED;
  ------------------
  |  |  261|      0|#define SSL3_AD_CERTIFICATE_EXPIRED 45
  ------------------
  559|      0|    case SSL_AD_CERTIFICATE_UNKNOWN:
  ------------------
  |  | 1249|      0|#define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN
  |  |  ------------------
  |  |  |  |  262|      0|#define SSL3_AD_CERTIFICATE_UNKNOWN 46
  |  |  ------------------
  ------------------
  |  Branch (559:5): [True: 0, False: 2.31k]
  ------------------
  560|      0|        return SSL3_AD_CERTIFICATE_UNKNOWN;
  ------------------
  |  |  262|      0|#define SSL3_AD_CERTIFICATE_UNKNOWN 46
  ------------------
  561|     59|    case SSL_AD_ILLEGAL_PARAMETER:
  ------------------
  |  | 1251|     59|#define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER
  |  |  ------------------
  |  |  |  |  263|     59|#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (561:5): [True: 59, False: 2.25k]
  ------------------
  562|     59|        return SSL3_AD_ILLEGAL_PARAMETER;
  ------------------
  |  |  263|     59|#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */
  ------------------
  563|      0|    case SSL_AD_UNKNOWN_CA:
  ------------------
  |  | 1253|      0|#define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA
  |  |  ------------------
  |  |  |  |   59|      0|#define TLS1_AD_UNKNOWN_CA 48 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (563:5): [True: 0, False: 2.31k]
  ------------------
  564|      0|        return TLS1_AD_UNKNOWN_CA;
  ------------------
  |  |   59|      0|#define TLS1_AD_UNKNOWN_CA 48 /* fatal */
  ------------------
  565|      0|    case SSL_AD_ACCESS_DENIED:
  ------------------
  |  | 1255|      0|#define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED
  |  |  ------------------
  |  |  |  |   60|      0|#define TLS1_AD_ACCESS_DENIED 49 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (565:5): [True: 0, False: 2.31k]
  ------------------
  566|      0|        return TLS1_AD_ACCESS_DENIED;
  ------------------
  |  |   60|      0|#define TLS1_AD_ACCESS_DENIED 49 /* fatal */
  ------------------
  567|  2.08k|    case SSL_AD_DECODE_ERROR:
  ------------------
  |  | 1257|  2.08k|#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR
  |  |  ------------------
  |  |  |  |   61|  2.08k|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (567:5): [True: 2.08k, False: 233]
  ------------------
  568|  2.08k|        return TLS1_AD_DECODE_ERROR;
  ------------------
  |  |   61|  2.08k|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  ------------------
  569|      0|    case SSL_AD_DECRYPT_ERROR:
  ------------------
  |  | 1258|      0|#define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR
  |  |  ------------------
  |  |  |  |   62|      0|#define TLS1_AD_DECRYPT_ERROR 51
  |  |  ------------------
  ------------------
  |  Branch (569:5): [True: 0, False: 2.31k]
  ------------------
  570|      0|        return TLS1_AD_DECRYPT_ERROR;
  ------------------
  |  |   62|      0|#define TLS1_AD_DECRYPT_ERROR 51
  ------------------
  571|      0|    case SSL_AD_EXPORT_RESTRICTION:
  ------------------
  |  | 1260|      0|#define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION
  |  |  ------------------
  |  |  |  |   63|      0|#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (571:5): [True: 0, False: 2.31k]
  ------------------
  572|      0|        return TLS1_AD_EXPORT_RESTRICTION;
  ------------------
  |  |   63|      0|#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */
  ------------------
  573|     45|    case SSL_AD_PROTOCOL_VERSION:
  ------------------
  |  | 1262|     45|#define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION
  |  |  ------------------
  |  |  |  |   64|     45|#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (573:5): [True: 45, False: 2.27k]
  ------------------
  574|     45|        return TLS1_AD_PROTOCOL_VERSION;
  ------------------
  |  |   64|     45|#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
  ------------------
  575|      0|    case SSL_AD_INSUFFICIENT_SECURITY:
  ------------------
  |  | 1264|      0|#define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY
  |  |  ------------------
  |  |  |  |   65|      0|#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (575:5): [True: 0, False: 2.31k]
  ------------------
  576|      0|        return TLS1_AD_INSUFFICIENT_SECURITY;
  ------------------
  |  |   65|      0|#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */
  ------------------
  577|     97|    case SSL_AD_INTERNAL_ERROR:
  ------------------
  |  | 1266|     97|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|     97|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (577:5): [True: 97, False: 2.21k]
  ------------------
  578|     97|        return TLS1_AD_INTERNAL_ERROR;
  ------------------
  |  |   66|     97|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  ------------------
  579|      0|    case SSL_AD_USER_CANCELLED:
  ------------------
  |  | 1267|      0|#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
  |  |  ------------------
  |  |  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  |  |  ------------------
  ------------------
  |  Branch (579:5): [True: 0, False: 2.31k]
  ------------------
  580|      0|        return TLS1_AD_USER_CANCELLED;
  ------------------
  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  ------------------
  581|      0|    case SSL_AD_NO_RENEGOTIATION:
  ------------------
  |  | 1268|      0|#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
  |  |  ------------------
  |  |  |  |   69|      0|#define TLS1_AD_NO_RENEGOTIATION 100
  |  |  ------------------
  ------------------
  |  Branch (581:5): [True: 0, False: 2.31k]
  ------------------
  582|      0|        return TLS1_AD_NO_RENEGOTIATION;
  ------------------
  |  |   69|      0|#define TLS1_AD_NO_RENEGOTIATION 100
  ------------------
  583|      0|    case SSL_AD_UNSUPPORTED_EXTENSION:
  ------------------
  |  | 1274|      0|#define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION
  |  |  ------------------
  |  |  |  |   74|      0|#define TLS1_AD_UNSUPPORTED_EXTENSION 110
  |  |  ------------------
  ------------------
  |  Branch (583:5): [True: 0, False: 2.31k]
  ------------------
  584|      0|        return TLS1_AD_UNSUPPORTED_EXTENSION;
  ------------------
  |  |   74|      0|#define TLS1_AD_UNSUPPORTED_EXTENSION 110
  ------------------
  585|      0|    case SSL_AD_CERTIFICATE_UNOBTAINABLE:
  ------------------
  |  | 1275|      0|#define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE
  |  |  ------------------
  |  |  |  |   75|      0|#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  |  |  ------------------
  ------------------
  |  Branch (585:5): [True: 0, False: 2.31k]
  ------------------
  586|      0|        return TLS1_AD_CERTIFICATE_UNOBTAINABLE;
  ------------------
  |  |   75|      0|#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  ------------------
  587|      0|    case SSL_AD_UNRECOGNIZED_NAME:
  ------------------
  |  | 1276|      0|#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME
  |  |  ------------------
  |  |  |  |   76|      0|#define TLS1_AD_UNRECOGNIZED_NAME 112
  |  |  ------------------
  ------------------
  |  Branch (587:5): [True: 0, False: 2.31k]
  ------------------
  588|      0|        return TLS1_AD_UNRECOGNIZED_NAME;
  ------------------
  |  |   76|      0|#define TLS1_AD_UNRECOGNIZED_NAME 112
  ------------------
  589|      0|    case SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
  ------------------
  |  | 1277|      0|#define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE
  |  |  ------------------
  |  |  |  |   77|      0|#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
  |  |  ------------------
  ------------------
  |  Branch (589:5): [True: 0, False: 2.31k]
  ------------------
  590|      0|        return TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE;
  ------------------
  |  |   77|      0|#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
  ------------------
  591|      0|    case SSL_AD_BAD_CERTIFICATE_HASH_VALUE:
  ------------------
  |  | 1278|      0|#define SSL_AD_BAD_CERTIFICATE_HASH_VALUE TLS1_AD_BAD_CERTIFICATE_HASH_VALUE
  |  |  ------------------
  |  |  |  |   78|      0|#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
  |  |  ------------------
  ------------------
  |  Branch (591:5): [True: 0, False: 2.31k]
  ------------------
  592|      0|        return TLS1_AD_BAD_CERTIFICATE_HASH_VALUE;
  ------------------
  |  |   78|      0|#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
  ------------------
  593|      0|    case SSL_AD_UNKNOWN_PSK_IDENTITY:
  ------------------
  |  | 1280|      0|#define SSL_AD_UNKNOWN_PSK_IDENTITY TLS1_AD_UNKNOWN_PSK_IDENTITY
  |  |  ------------------
  |  |  |  |   79|      0|#define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (593:5): [True: 0, False: 2.31k]
  ------------------
  594|      0|        return TLS1_AD_UNKNOWN_PSK_IDENTITY;
  ------------------
  |  |   79|      0|#define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */
  ------------------
  595|      0|    case SSL_AD_INAPPROPRIATE_FALLBACK:
  ------------------
  |  | 1282|      0|#define SSL_AD_INAPPROPRIATE_FALLBACK TLS1_AD_INAPPROPRIATE_FALLBACK
  |  |  ------------------
  |  |  |  |   67|      0|#define TLS1_AD_INAPPROPRIATE_FALLBACK 86 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (595:5): [True: 0, False: 2.31k]
  ------------------
  596|      0|        return TLS1_AD_INAPPROPRIATE_FALLBACK;
  ------------------
  |  |   67|      0|#define TLS1_AD_INAPPROPRIATE_FALLBACK 86 /* fatal */
  ------------------
  597|      0|    case SSL_AD_NO_APPLICATION_PROTOCOL:
  ------------------
  |  | 1283|      0|#define SSL_AD_NO_APPLICATION_PROTOCOL TLS1_AD_NO_APPLICATION_PROTOCOL
  |  |  ------------------
  |  |  |  |   80|      0|#define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (597:5): [True: 0, False: 2.31k]
  ------------------
  598|      0|        return TLS1_AD_NO_APPLICATION_PROTOCOL;
  ------------------
  |  |   80|      0|#define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  ------------------
  599|      0|    case SSL_AD_CERTIFICATE_REQUIRED:
  ------------------
  |  | 1270|      0|#define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED
  |  |  ------------------
  |  |  |  |   72|      0|#define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (599:5): [True: 0, False: 2.31k]
  ------------------
  600|      0|        return SSL_AD_HANDSHAKE_FAILURE;
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  601|      0|    case TLS13_AD_MISSING_EXTENSION:
  ------------------
  |  |   71|      0|#define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
  ------------------
  |  Branch (601:5): [True: 0, False: 2.31k]
  ------------------
  602|      0|        return SSL_AD_HANDSHAKE_FAILURE;
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  603|      0|#ifndef OPENSSL_NO_ECH
  604|      0|    case SSL_AD_ECH_REQUIRED:
  ------------------
  |  | 1272|      0|#define SSL_AD_ECH_REQUIRED TLS1_AD_ECH_REQUIRED
  |  |  ------------------
  |  |  |  |   82|      0|#define TLS1_AD_ECH_REQUIRED 121 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (604:5): [True: 0, False: 2.31k]
  ------------------
  605|      0|        return TLS1_AD_ECH_REQUIRED;
  ------------------
  |  |   82|      0|#define TLS1_AD_ECH_REQUIRED 121 /* fatal */
  ------------------
  606|      0|#endif
  607|      0|    default:
  ------------------
  |  Branch (607:5): [True: 0, False: 2.31k]
  ------------------
  608|      0|        return -1;
  609|  2.31k|    }
  610|  2.31k|}

tls1_default_timeout:
   99|  3.47k|{
  100|       |    /*
  101|       |     * 2 hours, the 24 hours mentioned in the TLSv1 spec is way too long for
  102|       |     * http, the cache would over fill
  103|       |     */
  104|  3.47k|    return ossl_seconds2time(60 * 60 * 2);
  ------------------
  |  |   42|  3.47k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  3.47k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  105|  3.47k|}
tls1_new:
  108|  2.58k|{
  109|  2.58k|    if (!ssl3_new(s))
  ------------------
  |  Branch (109:9): [True: 0, False: 2.58k]
  ------------------
  110|      0|        return 0;
  111|  2.58k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (111:9): [True: 0, False: 2.58k]
  ------------------
  112|      0|        return 0;
  113|       |
  114|  2.58k|    return 1;
  115|  2.58k|}
tls1_free:
  118|  2.58k|{
  119|  2.58k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.58k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.58k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.58k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.58k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.58k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.58k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  120|       |
  121|  2.58k|    if (sc == NULL)
  ------------------
  |  Branch (121:9): [True: 0, False: 2.58k]
  ------------------
  122|      0|        return;
  123|       |
  124|  2.58k|    OPENSSL_free(sc->ext.session_ticket);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  125|  2.58k|    ssl3_free(s);
  126|  2.58k|}
tls1_clear:
  129|  10.3k|{
  130|  10.3k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  10.3k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  10.3k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 10.3k]
  |  |  |  |  ------------------
  |  |  |  |   33|  10.3k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  10.3k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 10.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  10.3k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  10.3k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  131|       |
  132|  10.3k|    if (sc == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 10.3k]
  ------------------
  133|      0|        return 0;
  134|       |
  135|  10.3k|    if (!ssl3_clear(s))
  ------------------
  |  Branch (135:9): [True: 0, False: 10.3k]
  ------------------
  136|      0|        return 0;
  137|       |
  138|  10.3k|    if (s->method->version == TLS_ANY_VERSION)
  ------------------
  |  |   40|  10.3k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (138:9): [True: 10.3k, False: 0]
  ------------------
  139|  10.3k|        sc->version = TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   54|  10.3k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  10.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  140|      0|    else
  141|      0|        sc->version = s->method->version;
  142|       |
  143|  10.3k|    return 1;
  144|  10.3k|}
ssl_load_groups:
  382|  3.47k|{
  383|  3.47k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_groups, ctx))
  ------------------
  |  Branch (383:9): [True: 0, False: 3.47k]
  ------------------
  384|      0|        return 0;
  385|       |
  386|  3.47k|    return SSL_CTX_set1_groups_list(ctx, TLS_DEFAULT_GROUP_LIST);
  ------------------
  |  | 1531|  3.47k|    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_GROUPS_LIST, 0, (char *)(s))
  |  |  ------------------
  |  |  |  | 1379|  3.47k|#define SSL_CTRL_SET_GROUPS_LIST 92
  |  |  ------------------
  ------------------
  387|  3.47k|}
ssl_load_sigalgs:
  696|  3.47k|{
  697|  3.47k|    size_t i;
  698|  3.47k|    SSL_CERT_LOOKUP lu;
  699|       |
  700|  3.47k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_sigalgs, ctx))
  ------------------
  |  Branch (700:9): [True: 0, False: 3.47k]
  ------------------
  701|      0|        return 0;
  702|       |
  703|       |    /* now populate ctx->ssl_cert_info */
  704|  3.47k|    if (ctx->sigalg_list_len > 0) {
  ------------------
  |  Branch (704:9): [True: 3.35k, False: 113]
  ------------------
  705|  3.35k|        OPENSSL_free(ctx->ssl_cert_info);
  ------------------
  |  |  132|  3.35k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  706|  3.35k|        ctx->ssl_cert_info = OPENSSL_calloc(ctx->sigalg_list_len, sizeof(lu));
  ------------------
  |  |  113|  3.35k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  707|  3.35k|        if (ctx->ssl_cert_info == NULL)
  ------------------
  |  Branch (707:13): [True: 0, False: 3.35k]
  ------------------
  708|      0|            return 0;
  709|  16.7k|        for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (709:21): [True: 13.4k, False: 3.35k]
  ------------------
  710|  13.4k|            const char *keytype = inferred_keytype(&ctx->sigalg_list[i]);
  711|  13.4k|            ctx->ssl_cert_info[i].pkey_nid = OBJ_txt2nid(keytype);
  712|  13.4k|            ctx->ssl_cert_info[i].amask = SSL_aANY;
  ------------------
  |  |  128|  13.4k|#define SSL_aANY 0x00000000U
  ------------------
  713|  13.4k|        }
  714|  3.35k|    }
  715|       |
  716|       |    /*
  717|       |     * For now, leave it at this: legacy sigalgs stay in their own
  718|       |     * data structures until "legacy cleanup" occurs.
  719|       |     */
  720|       |
  721|  3.47k|    return 1;
  722|  3.47k|}
tls1_group_id_lookup:
  738|   107k|{
  739|   107k|    size_t i;
  740|       |
  741|   990k|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (741:17): [True: 990k, False: 1]
  ------------------
  742|   990k|        if (ctx->group_list[i].group_id == group_id)
  ------------------
  |  Branch (742:13): [True: 107k, False: 883k]
  ------------------
  743|   107k|            return &ctx->group_list[i];
  744|   990k|    }
  745|       |
  746|      1|    return NULL;
  747|   107k|}
tls1_group_id2nid:
  760|  35.2k|{
  761|  35.2k|    size_t i;
  762|       |
  763|  35.2k|    if (group_id == 0)
  ------------------
  |  Branch (763:9): [True: 0, False: 35.2k]
  ------------------
  764|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  765|       |
  766|       |    /*
  767|       |     * Return well known Group NIDs - for backwards compatibility. This won't
  768|       |     * work for groups we don't know about.
  769|       |     */
  770|  1.26M|    for (i = 0; i < OSSL_NELEM(nid_to_group); i++) {
  ------------------
  |  |   14|  1.26M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (770:17): [True: 1.25M, False: 11.1k]
  ------------------
  771|  1.25M|        if (nid_to_group[i].group_id == group_id)
  ------------------
  |  Branch (771:13): [True: 24.1k, False: 1.22M]
  ------------------
  772|  24.1k|            return nid_to_group[i].nid;
  773|  1.25M|    }
  774|  11.1k|    if (!include_unknown)
  ------------------
  |  Branch (774:9): [True: 11.1k, False: 0]
  ------------------
  775|  11.1k|        return NID_undef;
  ------------------
  |  |   18|  11.1k|#define NID_undef                       0
  ------------------
  776|      0|    return TLSEXT_nid_unknown | (int)group_id;
  ------------------
  |  |  227|      0|#define TLSEXT_nid_unknown 0x1000000
  ------------------
  777|  11.1k|}
tls1_get_supported_groups:
  801|  10.1k|{
  802|  10.1k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  10.1k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  803|       |
  804|       |    /* For Suite B mode only include P-256, P-384 */
  805|  10.1k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2035|  10.1k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|  10.1k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  ------------------
  806|     15|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  584|     15|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (806:5): [True: 15, False: 10.1k]
  ------------------
  807|     15|        *pgroups = suiteb_curves;
  808|     15|        *pgroupslen = OSSL_NELEM(suiteb_curves);
  ------------------
  |  |   14|     15|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  809|     15|        break;
  810|       |
  811|      4|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  580|      4|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (811:5): [True: 4, False: 10.1k]
  ------------------
  812|      4|        *pgroups = suiteb_curves;
  813|      4|        *pgroupslen = 1;
  814|      4|        break;
  815|       |
  816|      7|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  582|      7|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (816:5): [True: 7, False: 10.1k]
  ------------------
  817|      7|        *pgroups = suiteb_curves + 1;
  818|      7|        *pgroupslen = 1;
  819|      7|        break;
  820|       |
  821|  10.1k|    default:
  ------------------
  |  Branch (821:5): [True: 10.1k, False: 26]
  ------------------
  822|  10.1k|        if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (822:13): [True: 0, False: 10.1k]
  ------------------
  823|      0|            *pgroups = sctx->ext.supportedgroups;
  824|      0|            *pgroupslen = sctx->ext.supportedgroups_len;
  825|  10.1k|        } else {
  826|  10.1k|            *pgroups = s->ext.supportedgroups;
  827|  10.1k|            *pgroupslen = s->ext.supportedgroups_len;
  828|  10.1k|        }
  829|  10.1k|        break;
  830|  10.1k|    }
  831|  10.1k|}
tls1_get_requested_keyshare_groups:
  848|  2.43k|{
  849|  2.43k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.43k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  850|       |
  851|  2.43k|    if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (851:9): [True: 0, False: 2.43k]
  ------------------
  852|      0|        *pgroups = sctx->ext.supportedgroups;
  853|      0|        *pgroupslen = sctx->ext.supportedgroups_len;
  854|  2.43k|    } else {
  855|  2.43k|        *pgroups = s->ext.keyshares;
  856|  2.43k|        *pgroupslen = s->ext.keyshares_len;
  857|  2.43k|    }
  858|  2.43k|}
tls_valid_group:
  877|  66.9k|{
  878|  66.9k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  66.9k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  879|  66.9k|        group_id);
  880|  66.9k|    int ret = 0;
  881|  66.9k|    int group_minversion, group_maxversion;
  882|       |
  883|  66.9k|    if (okfortls13 != NULL)
  ------------------
  |  Branch (883:9): [True: 23.6k, False: 43.2k]
  ------------------
  884|  23.6k|        *okfortls13 = 0;
  885|       |
  886|  66.9k|    if (ginfo == NULL)
  ------------------
  |  Branch (886:9): [True: 0, False: 66.9k]
  ------------------
  887|      0|        goto end;
  888|       |
  889|  66.9k|    group_minversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->mindtls : ginfo->mintls;
  ------------------
  |  |  266|  66.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  66.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  66.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 66.9k]
  |  |  ------------------
  ------------------
  890|  66.9k|    group_maxversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->maxdtls : ginfo->maxtls;
  ------------------
  |  |  266|  66.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  66.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  66.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 66.9k]
  |  |  ------------------
  ------------------
  891|       |
  892|  66.9k|    if (group_minversion < 0 || group_maxversion < 0)
  ------------------
  |  Branch (892:9): [True: 0, False: 66.9k]
  |  Branch (892:33): [True: 0, False: 66.9k]
  ------------------
  893|      0|        goto end;
  894|  66.9k|    if (group_maxversion == 0)
  ------------------
  |  Branch (894:9): [True: 66.9k, False: 0]
  ------------------
  895|  66.9k|        ret = 1;
  896|      0|    else
  897|      0|        ret = (ssl_version_cmp(s, minversion, group_maxversion) <= 0);
  898|  66.9k|    if (group_minversion > 0)
  ------------------
  |  Branch (898:9): [True: 66.9k, False: 0]
  ------------------
  899|  66.9k|        ret &= (ssl_version_cmp(s, maxversion, group_minversion) >= 0);
  900|       |
  901|  66.9k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  66.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  66.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  66.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (901:9): [True: 66.9k, False: 0]
  ------------------
  902|  66.9k|        if (ret && okfortls13 != NULL && maxversion == TLS1_3_VERSION)
  ------------------
  |  |   27|  23.4k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (902:13): [True: 66.3k, False: 528]
  |  Branch (902:20): [True: 23.4k, False: 42.9k]
  |  Branch (902:42): [True: 23.1k, False: 297]
  ------------------
  903|  23.1k|            *okfortls13 = (group_maxversion == 0)
  ------------------
  |  Branch (903:27): [True: 23.1k, False: 0]
  ------------------
  904|      0|                || (group_maxversion >= TLS1_3_VERSION);
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (904:20): [True: 0, False: 0]
  ------------------
  905|  66.9k|    }
  906|  66.9k|end:
  907|  66.9k|    if (giptr != NULL)
  ------------------
  |  Branch (907:9): [True: 62.0k, False: 4.84k]
  ------------------
  908|  62.0k|        *giptr = ginfo;
  909|  66.9k|    return ret;
  910|  66.9k|}
tls_group_allowed:
  914|  35.2k|{
  915|  35.2k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  35.2k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  916|  35.2k|        group);
  917|  35.2k|    unsigned char gtmp[2];
  918|       |
  919|  35.2k|    if (ginfo == NULL)
  ------------------
  |  Branch (919:9): [True: 1, False: 35.2k]
  ------------------
  920|      1|        return 0;
  921|       |
  922|  35.2k|    gtmp[0] = group >> 8;
  923|  35.2k|    gtmp[1] = group & 0xff;
  924|  35.2k|    return ssl_security(s, op, ginfo->secbits,
  925|  35.2k|        tls1_group_id2nid(ginfo->group_id, 0), (void *)gtmp);
  926|  35.2k|}
tls1_set_groups_list:
 1716|  4.13k|{
 1717|  4.13k|    size_t i = 0, j;
 1718|  4.13k|    int ret = 0, parse_ret = 0;
 1719|  4.13k|    gid_cb_st gcb;
 1720|       |
 1721|       |    /* Sanity check */
 1722|  4.13k|    if (ctx == NULL) {
  ------------------
  |  Branch (1722:9): [True: 0, False: 4.13k]
  ------------------
 1723|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1724|      0|        return 0;
 1725|      0|    }
 1726|       |
 1727|  4.13k|    memset(&gcb, 0, sizeof(gcb));
 1728|  4.13k|    gcb.gidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|  4.13k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1729|  4.13k|    gcb.tplmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|  4.13k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1730|  4.13k|    gcb.ksidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|  4.13k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1731|  4.13k|    gcb.ctx = ctx;
 1732|       |
 1733|       |    /* Prepare initial chunks of memory for groups, tuples and keyshares groupIDs */
 1734|  4.13k|    gcb.gid_arr = OPENSSL_malloc_array(gcb.gidmax, sizeof(*gcb.gid_arr));
  ------------------
  |  |  111|  4.13k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1735|  4.13k|    if (gcb.gid_arr == NULL)
  ------------------
  |  Branch (1735:9): [True: 0, False: 4.13k]
  ------------------
 1736|      0|        goto end;
 1737|  4.13k|    gcb.tuplcnt_arr = OPENSSL_malloc_array(gcb.tplmax, sizeof(*gcb.tuplcnt_arr));
  ------------------
  |  |  111|  4.13k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1738|  4.13k|    if (gcb.tuplcnt_arr == NULL)
  ------------------
  |  Branch (1738:9): [True: 0, False: 4.13k]
  ------------------
 1739|      0|        goto end;
 1740|  4.13k|    gcb.tuplcnt_arr[0] = 0;
 1741|  4.13k|    gcb.ksid_arr = OPENSSL_malloc_array(gcb.ksidmax, sizeof(*gcb.ksid_arr));
  ------------------
  |  |  111|  4.13k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1742|  4.13k|    if (gcb.ksid_arr == NULL)
  ------------------
  |  Branch (1742:9): [True: 0, False: 4.13k]
  ------------------
 1743|      0|        goto end;
 1744|       |
 1745|  17.5k|    while (str[0] != '\0' && isspace((unsigned char)*str))
  ------------------
  |  Branch (1745:12): [True: 17.5k, False: 21]
  |  Branch (1745:30): [True: 13.3k, False: 4.11k]
  ------------------
 1746|  13.3k|        str++;
 1747|  4.13k|    if (str[0] == '\0')
  ------------------
  |  Branch (1747:9): [True: 21, False: 4.11k]
  ------------------
 1748|     21|        goto empty_list;
 1749|       |
 1750|       |    /*
 1751|       |     * Start the (potentially recursive) tuple processing by calling CONF_parse_list
 1752|       |     * with the TUPLE_DELIMITER_CHARACTER (which will call tuple_cb after cleaning spaces)
 1753|       |     */
 1754|  4.11k|    parse_ret = CONF_parse_list(str, TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, &gcb);
  ------------------
  |  | 1226|  4.11k|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1755|       |
 1756|  4.11k|    if (parse_ret == 0)
  ------------------
  |  Branch (1756:9): [True: 105, False: 4.01k]
  ------------------
 1757|    105|        goto end;
 1758|  4.01k|    if (parse_ret == -1) {
  ------------------
  |  Branch (1758:9): [True: 20, False: 3.99k]
  ------------------
 1759|     20|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|     20|    (ERR_new(),                                                  \
  |  |  360|     20|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     20|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     20|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   70|     20|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|     20|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|     20|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|     20|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1760|     20|            "Syntax error in '%s'", str);
 1761|     20|        goto end;
 1762|     20|    }
 1763|       |
 1764|       |    /*
 1765|       |     * We check whether a tuple was completely emptied by using "-" prefix
 1766|       |     * excessively, in which case we remove the tuple
 1767|       |     */
 1768|  21.8k|    for (i = j = 0; j < gcb.tplcnt; j++) {
  ------------------
  |  Branch (1768:21): [True: 17.8k, False: 3.99k]
  ------------------
 1769|  17.8k|        if (gcb.tuplcnt_arr[j] == 0)
  ------------------
  |  Branch (1769:13): [True: 0, False: 17.8k]
  ------------------
 1770|      0|            continue;
 1771|       |        /* If there's a gap, move to first unfilled slot */
 1772|  17.8k|        if (j == i)
  ------------------
  |  Branch (1772:13): [True: 17.8k, False: 0]
  ------------------
 1773|  17.8k|            ++i;
 1774|      0|        else
 1775|      0|            gcb.tuplcnt_arr[i++] = gcb.tuplcnt_arr[j];
 1776|  17.8k|    }
 1777|  3.99k|    gcb.tplcnt = i;
 1778|       |
 1779|  3.99k|    if (gcb.ksidcnt > OPENSSL_CLIENT_MAX_KEY_SHARES) {
  ------------------
  |  |   28|  3.99k|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
  |  Branch (1779:9): [True: 3, False: 3.99k]
  ------------------
 1780|      3|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|      3|    (ERR_new(),                                                  \
  |  |  360|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      3|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      3|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   70|      3|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|      3|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      3|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      3|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1781|      3|            "To many keyshares requested in '%s' (max = %d)",
 1782|      3|            str, OPENSSL_CLIENT_MAX_KEY_SHARES);
  ------------------
  |  |   28|      3|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
 1783|      3|        goto end;
 1784|      3|    }
 1785|       |
 1786|       |    /*
 1787|       |     * For backward compatibility we let the rest of the code know that a key share
 1788|       |     * for the first valid group should be added if no "*" prefix was used anywhere
 1789|       |     */
 1790|  3.99k|    if (gcb.gidcnt > 0 && gcb.ksidcnt == 0) {
  ------------------
  |  Branch (1790:9): [True: 3.86k, False: 125]
  |  Branch (1790:27): [True: 263, False: 3.60k]
  ------------------
 1791|       |        /*
 1792|       |         * No key share group prefix character was used, hence we indicate that a single
 1793|       |         * key share should be sent and flag that it should come from the supported_groups list
 1794|       |         */
 1795|    263|        gcb.ksidcnt = 1;
 1796|    263|        gcb.ksid_arr[0] = 0;
 1797|    263|    }
 1798|       |
 1799|  4.01k|empty_list:
 1800|       |    /*
 1801|       |     * A call to tls1_set_groups_list with any of the args (other than ctx) set
 1802|       |     * to NULL only does a syntax check, hence we're done here and report success
 1803|       |     */
 1804|  4.01k|    if (grpext == NULL || ksext == NULL || tplext == NULL || grpextlen == NULL || ksextlen == NULL || tplextlen == NULL) {
  ------------------
  |  Branch (1804:9): [True: 0, False: 4.01k]
  |  Branch (1804:27): [True: 0, False: 4.01k]
  |  Branch (1804:44): [True: 0, False: 4.01k]
  |  Branch (1804:62): [True: 0, False: 4.01k]
  |  Branch (1804:83): [True: 0, False: 4.01k]
  |  Branch (1804:103): [True: 0, False: 4.01k]
  ------------------
 1805|      0|        ret = 1;
 1806|      0|        goto end;
 1807|      0|    }
 1808|       |
 1809|       |    /*
 1810|       |     * tuple_cb and gid_cb combo ensures there are no duplicates or unknown groups so we
 1811|       |     * can just go ahead and set the results (after disposing the existing)
 1812|       |     */
 1813|  4.01k|    OPENSSL_free(*grpext);
  ------------------
  |  |  132|  4.01k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1814|  4.01k|    *grpext = gcb.gid_arr;
 1815|  4.01k|    *grpextlen = gcb.gidcnt;
 1816|  4.01k|    OPENSSL_free(*ksext);
  ------------------
  |  |  132|  4.01k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1817|  4.01k|    *ksext = gcb.ksid_arr;
 1818|  4.01k|    *ksextlen = gcb.ksidcnt;
 1819|  4.01k|    OPENSSL_free(*tplext);
  ------------------
  |  |  132|  4.01k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1820|  4.01k|    *tplext = gcb.tuplcnt_arr;
 1821|  4.01k|    *tplextlen = gcb.tplcnt;
 1822|       |
 1823|  4.01k|    return 1;
 1824|       |
 1825|    128|end:
 1826|    128|    OPENSSL_free(gcb.gid_arr);
  ------------------
  |  |  132|    128|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1827|    128|    OPENSSL_free(gcb.tuplcnt_arr);
  ------------------
  |  |  132|    128|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1828|    128|    OPENSSL_free(gcb.ksid_arr);
  ------------------
  |  |  132|    128|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1829|    128|    return ret;
 1830|  4.01k|}
tls1_get_formatlist:
 1888|  2.30k|{
 1889|       |    /*
 1890|       |     * If we have a custom point format list use it otherwise use default
 1891|       |     */
 1892|  2.30k|    if (s->ext.ecpointformats) {
  ------------------
  |  Branch (1892:9): [True: 0, False: 2.30k]
  ------------------
 1893|      0|        *pformats = s->ext.ecpointformats;
 1894|      0|        *num_formats = s->ext.ecpointformats_len;
 1895|  2.30k|    } else if ((s->options & SSL_OP_LEGACY_EC_POINT_FORMATS) != 0) {
  ------------------
  |  |  456|  2.30k|#define SSL_OP_LEGACY_EC_POINT_FORMATS SSL_OP_BIT(36)
  |  |  ------------------
  |  |  |  |  351|  2.30k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1895:16): [True: 0, False: 2.30k]
  ------------------
 1896|      0|        *pformats = ecformats_all;
 1897|       |        /* For Suite B we don't support char2 fields */
 1898|      0|        if (tls1_suiteb(s))
  ------------------
  |  | 2035|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1899|      0|            *num_formats = sizeof(ecformats_all) - 1;
 1900|      0|        else
 1901|      0|            *num_formats = sizeof(ecformats_all);
 1902|  2.30k|    } else {
 1903|  2.30k|        *pformats = ecformats_default;
 1904|  2.30k|        *num_formats = sizeof(ecformats_default);
 1905|  2.30k|    }
 1906|  2.30k|}
ssl_setup_sigalgs:
 2337|  3.47k|{
 2338|  3.47k|    size_t i, cache_idx, sigalgs_len, enabled;
 2339|  3.47k|    const SIGALG_LOOKUP *lu;
 2340|  3.47k|    SIGALG_LOOKUP *cache = NULL;
 2341|  3.47k|    uint16_t *tls12_sigalgs_list = NULL;
 2342|  3.47k|    EVP_PKEY *tmpkey = EVP_PKEY_new();
 2343|  3.47k|    int istls;
 2344|  3.47k|    int ret = 0;
 2345|       |
 2346|  3.47k|    if (ctx == NULL)
  ------------------
  |  Branch (2346:9): [True: 0, False: 3.47k]
  ------------------
 2347|      0|        goto err;
 2348|       |
 2349|  3.47k|    istls = !SSL_CTX_IS_DTLS(ctx);
  ------------------
  |  |  270|  3.47k|    (ctx->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.47k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 2350|       |
 2351|  3.47k|    sigalgs_len = OSSL_NELEM(sigalg_lookup_tbl) + ctx->sigalg_list_len;
  ------------------
  |  |   14|  3.47k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2352|       |
 2353|  3.47k|    cache = OPENSSL_calloc(sigalgs_len, sizeof(const SIGALG_LOOKUP));
  ------------------
  |  |  113|  3.47k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2354|  3.47k|    if (cache == NULL || tmpkey == NULL)
  ------------------
  |  Branch (2354:9): [True: 0, False: 3.47k]
  |  Branch (2354:26): [True: 0, False: 3.47k]
  ------------------
 2355|      0|        goto err;
 2356|       |
 2357|  3.47k|    tls12_sigalgs_list = OPENSSL_calloc(sigalgs_len, sizeof(uint16_t));
  ------------------
  |  |  113|  3.47k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2358|  3.47k|    if (tls12_sigalgs_list == NULL)
  ------------------
  |  Branch (2358:9): [True: 0, False: 3.47k]
  ------------------
 2359|      0|        goto err;
 2360|       |
 2361|  3.47k|    ERR_set_mark();
 2362|       |    /* First fill cache and tls12_sigalgs list from legacy algorithm list */
 2363|  3.47k|    for (i = 0, lu = sigalg_lookup_tbl;
 2364|   111k|        i < OSSL_NELEM(sigalg_lookup_tbl); lu++, i++) {
  ------------------
  |  |   14|   111k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2364:9): [True: 107k, False: 3.47k]
  ------------------
 2365|   107k|        EVP_PKEY_CTX *pctx;
 2366|       |
 2367|   107k|        cache[i] = *lu;
 2368|       |
 2369|       |        /*
 2370|       |         * Check hash is available.
 2371|       |         * This test is not perfect. A provider could have support
 2372|       |         * for a signature scheme, but not a particular hash. However the hash
 2373|       |         * could be available from some other loaded provider. In that case it
 2374|       |         * could be that the signature is available, and the hash is available
 2375|       |         * independently - but not as a combination. We ignore this for now.
 2376|       |         */
 2377|   107k|        if (lu->hash != NID_undef
  ------------------
  |  |   18|   215k|#define NID_undef                       0
  ------------------
  |  Branch (2377:13): [True: 100k, False: 6.94k]
  ------------------
 2378|   100k|            && ctx->ssl_digest_methods[lu->hash_idx] == NULL) {
  ------------------
  |  Branch (2378:16): [True: 20.0k, False: 80.5k]
  ------------------
 2379|  20.0k|            cache[i].available = 0;
 2380|  20.0k|            continue;
 2381|  20.0k|        }
 2382|       |
 2383|  87.5k|        if (!EVP_PKEY_set_type(tmpkey, lu->sig)) {
  ------------------
  |  Branch (2383:13): [True: 0, False: 87.5k]
  ------------------
 2384|      0|            cache[i].available = 0;
 2385|      0|            continue;
 2386|      0|        }
 2387|  87.5k|        pctx = EVP_PKEY_CTX_new_from_pkey(ctx->libctx, tmpkey, ctx->propq);
 2388|       |        /* If unable to create pctx we assume the sig algorithm is unavailable */
 2389|  87.5k|        if (pctx == NULL)
  ------------------
  |  Branch (2389:13): [True: 226, False: 87.2k]
  ------------------
 2390|    226|            cache[i].available = 0;
 2391|  87.5k|        EVP_PKEY_CTX_free(pctx);
 2392|  87.5k|    }
 2393|       |
 2394|       |    /* Now complete cache and tls12_sigalgs list with provider sig information */
 2395|  3.47k|    cache_idx = OSSL_NELEM(sigalg_lookup_tbl);
  ------------------
  |  |   14|  3.47k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2396|  16.8k|    for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (2396:17): [True: 13.4k, False: 3.47k]
  ------------------
 2397|  13.4k|        TLS_SIGALG_INFO si = ctx->sigalg_list[i];
 2398|  13.4k|        cache[cache_idx].name = si.name;
 2399|  13.4k|        cache[cache_idx].name12 = si.sigalg_name;
 2400|  13.4k|        cache[cache_idx].sigalg = si.code_point;
 2401|  13.4k|        tls12_sigalgs_list[cache_idx] = si.code_point;
 2402|  13.4k|        cache[cache_idx].hash = si.hash_name ? OBJ_txt2nid(si.hash_name) : NID_undef;
  ------------------
  |  |   18|  26.8k|#define NID_undef                       0
  ------------------
  |  Branch (2402:33): [True: 0, False: 13.4k]
  ------------------
 2403|  13.4k|        cache[cache_idx].hash_idx = ssl_get_md_idx(cache[cache_idx].hash);
 2404|  13.4k|        cache[cache_idx].sig = OBJ_txt2nid(si.sigalg_name);
 2405|  13.4k|        cache[cache_idx].sig_idx = (int)(i + SSL_PKEY_NUM);
  ------------------
  |  |  336|  13.4k|#define SSL_PKEY_NUM 9
  ------------------
 2406|  13.4k|        cache[cache_idx].sigandhash = OBJ_txt2nid(si.sigalg_name);
 2407|  13.4k|        cache[cache_idx].curve = NID_undef;
  ------------------
  |  |   18|  13.4k|#define NID_undef                       0
  ------------------
 2408|  13.4k|        cache[cache_idx].mintls = TLS1_3_VERSION;
  ------------------
  |  |   27|  13.4k|#define TLS1_3_VERSION 0x0304
  ------------------
 2409|  13.4k|        cache[cache_idx].maxtls = TLS1_3_VERSION;
  ------------------
  |  |   27|  13.4k|#define TLS1_3_VERSION 0x0304
  ------------------
 2410|  13.4k|        cache[cache_idx].mindtls = -1;
 2411|  13.4k|        cache[cache_idx].maxdtls = -1;
 2412|       |        /* Compatibility with TLS 1.3 is checked on load */
 2413|  13.4k|        cache[cache_idx].available = istls;
 2414|  13.4k|        cache[cache_idx].advertise = 0;
 2415|  13.4k|        cache_idx++;
 2416|  13.4k|    }
 2417|  3.47k|    ERR_pop_to_mark();
 2418|       |
 2419|  3.47k|    enabled = 0;
 2420|   121k|    for (i = 0; i < OSSL_NELEM(tls12_sigalgs); ++i) {
  ------------------
  |  |   14|   121k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2420:17): [True: 117k, False: 3.47k]
  ------------------
 2421|   117k|        SIGALG_LOOKUP *ent = cache;
 2422|   117k|        size_t j;
 2423|       |
 2424|  2.06M|        for (j = 0; j < sigalgs_len; ent++, j++) {
  ------------------
  |  Branch (2424:21): [True: 2.06M, False: 339]
  ------------------
 2425|  2.06M|            if (ent->sigalg != tls12_sigalgs[i])
  ------------------
  |  Branch (2425:17): [True: 1.94M, False: 117k]
  ------------------
 2426|  1.94M|                continue;
 2427|       |            /* Dedup by marking cache entry as default enabled. */
 2428|   117k|            if (ent->available && !ent->advertise) {
  ------------------
  |  Branch (2428:17): [True: 97.3k, False: 20.2k]
  |  Branch (2428:35): [True: 97.3k, False: 0]
  ------------------
 2429|  97.3k|                ent->advertise = 1;
 2430|  97.3k|                tls12_sigalgs_list[enabled++] = tls12_sigalgs[i];
 2431|  97.3k|            }
 2432|   117k|            break;
 2433|  2.06M|        }
 2434|   117k|    }
 2435|       |
 2436|       |    /* Append any provider sigalgs not yet handled */
 2437|  16.8k|    for (i = OSSL_NELEM(sigalg_lookup_tbl); i < sigalgs_len; ++i) {
  ------------------
  |  |   14|  3.47k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2437:45): [True: 13.4k, False: 3.47k]
  ------------------
 2438|  13.4k|        SIGALG_LOOKUP *ent = &cache[i];
 2439|       |
 2440|  13.4k|        if (ent->available && !ent->advertise)
  ------------------
  |  Branch (2440:13): [True: 13.4k, False: 0]
  |  Branch (2440:31): [True: 3.35k, False: 10.0k]
  ------------------
 2441|  3.35k|            tls12_sigalgs_list[enabled++] = ent->sigalg;
 2442|  13.4k|    }
 2443|       |
 2444|  3.47k|    ctx->sigalg_lookup_cache = cache;
 2445|  3.47k|    ctx->sigalg_lookup_cache_len = sigalgs_len;
 2446|  3.47k|    ctx->tls12_sigalgs = tls12_sigalgs_list;
 2447|  3.47k|    ctx->tls12_sigalgs_len = enabled;
 2448|  3.47k|    cache = NULL;
 2449|  3.47k|    tls12_sigalgs_list = NULL;
 2450|       |
 2451|  3.47k|    ret = 1;
 2452|  3.47k|err:
 2453|  3.47k|    OPENSSL_free(cache);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2454|  3.47k|    OPENSSL_free(tls12_sigalgs_list);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2455|  3.47k|    EVP_PKEY_free(tmpkey);
 2456|  3.47k|    return ret;
 2457|  3.47k|}
tls1_lookup_md:
 2557|   104k|{
 2558|   104k|    const EVP_MD *md;
 2559|       |
 2560|   104k|    if (lu == NULL)
  ------------------
  |  Branch (2560:9): [True: 0, False: 104k]
  ------------------
 2561|      0|        return 0;
 2562|       |    /* lu->hash == NID_undef means no associated digest */
 2563|   104k|    if (lu->hash == NID_undef) {
  ------------------
  |  |   18|   104k|#define NID_undef                       0
  ------------------
  |  Branch (2563:9): [True: 14.6k, False: 90.2k]
  ------------------
 2564|  14.6k|        md = NULL;
 2565|  90.2k|    } else {
 2566|  90.2k|        md = ssl_md(ctx, lu->hash_idx);
 2567|  90.2k|        if (md == NULL)
  ------------------
  |  Branch (2567:13): [True: 0, False: 90.2k]
  ------------------
 2568|      0|            return 0;
 2569|  90.2k|    }
 2570|   104k|    if (pmd)
  ------------------
  |  Branch (2570:9): [True: 104k, False: 0]
  ------------------
 2571|   104k|        *pmd = md;
 2572|   104k|    return 1;
 2573|   104k|}
tls12_get_psigalgs:
 2694|  12.6k|{
 2695|       |    /*
 2696|       |     * If Suite B mode use Suite B sigalgs only, ignore any other
 2697|       |     * preferences.
 2698|       |     */
 2699|  12.6k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2035|  12.6k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|  12.6k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 38, False: 12.5k]
  |  |  ------------------
  ------------------
 2700|     21|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  584|     21|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (2700:5): [True: 21, False: 12.5k]
  ------------------
 2701|     21|        *psigs = suiteb_sigalgs;
 2702|     21|        return OSSL_NELEM(suiteb_sigalgs);
  ------------------
  |  |   14|     21|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2703|       |
 2704|      6|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  580|      6|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (2704:5): [True: 6, False: 12.6k]
  ------------------
 2705|      6|        *psigs = suiteb_sigalgs;
 2706|      6|        return 1;
 2707|       |
 2708|     11|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  582|     11|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (2708:5): [True: 11, False: 12.6k]
  ------------------
 2709|     11|        *psigs = suiteb_sigalgs + 1;
 2710|     11|        return 1;
 2711|  12.6k|    }
 2712|       |    /*
 2713|       |     *  We use client_sigalgs (if not NULL) if we're a server
 2714|       |     *  and sending a certificate request or if we're a client and
 2715|       |     *  determining which shared algorithm to use.
 2716|       |     */
 2717|  12.5k|    if ((s->server == sent) && s->cert->client_sigalgs != NULL) {
  ------------------
  |  Branch (2717:9): [True: 0, False: 12.5k]
  |  Branch (2717:32): [True: 0, False: 0]
  ------------------
 2718|      0|        *psigs = s->cert->client_sigalgs;
 2719|      0|        return s->cert->client_sigalgslen;
 2720|  12.5k|    } else if (s->cert->conf_sigalgs) {
  ------------------
  |  Branch (2720:16): [True: 0, False: 12.5k]
  ------------------
 2721|      0|        *psigs = s->cert->conf_sigalgs;
 2722|      0|        return s->cert->conf_sigalgslen;
 2723|  12.5k|    } else {
 2724|  12.5k|        *psigs = SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs;
  ------------------
  |  |   26|  12.5k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2725|  12.5k|        return SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs_len;
  ------------------
  |  |   26|  12.5k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2726|  12.5k|    }
 2727|  12.5k|}
ssl_set_client_disabled:
 3028|  10.1k|{
 3029|  10.1k|    s->s3.tmp.mask_a = 0;
 3030|  10.1k|    s->s3.tmp.mask_k = 0;
 3031|  10.1k|    ssl_set_sig_mask(&s->s3.tmp.mask_a, s, SSL_SECOP_SIGALG_MASK);
  ------------------
  |  | 2767|  10.1k|#define SSL_SECOP_SIGALG_MASK (14 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2733|  10.1k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
 3032|  10.1k|    if (ssl_get_min_max_version(s, &s->s3.tmp.min_ver,
  ------------------
  |  Branch (3032:9): [True: 0, False: 10.1k]
  ------------------
 3033|  10.1k|            &s->s3.tmp.max_ver, NULL)
 3034|  10.1k|        != 0)
 3035|      0|        return 0;
 3036|  10.1k|#ifndef OPENSSL_NO_PSK
 3037|       |    /* with PSK there must be client callback set */
 3038|  10.1k|    if (!s->psk_client_callback) {
  ------------------
  |  Branch (3038:9): [True: 10.1k, False: 0]
  ------------------
 3039|  10.1k|        s->s3.tmp.mask_a |= SSL_aPSK;
  ------------------
  |  |  120|  10.1k|#define SSL_aPSK 0x00000010U
  ------------------
 3040|  10.1k|        s->s3.tmp.mask_k |= SSL_PSK;
  ------------------
  |  |  105|  10.1k|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|  10.1k|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|  10.1k|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|  10.1k|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|  10.1k|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
 3041|  10.1k|    }
 3042|  10.1k|#endif /* OPENSSL_NO_PSK */
 3043|  10.1k|#ifndef OPENSSL_NO_SRP
 3044|  10.1k|    if (!(s->srp_ctx.srp_Mask & SSL_kSRP)) {
  ------------------
  |  |   95|  10.1k|#define SSL_kSRP 0x00000020U
  ------------------
  |  Branch (3044:9): [True: 10.1k, False: 0]
  ------------------
 3045|  10.1k|        s->s3.tmp.mask_a |= SSL_aSRP;
  ------------------
  |  |  124|  10.1k|#define SSL_aSRP 0x00000040U
  ------------------
 3046|  10.1k|        s->s3.tmp.mask_k |= SSL_kSRP;
  ------------------
  |  |   95|  10.1k|#define SSL_kSRP 0x00000020U
  ------------------
 3047|  10.1k|    }
 3048|  10.1k|#endif
 3049|  10.1k|    return 1;
 3050|  10.1k|}
ssl_cipher_disabled:
 3063|   609k|{
 3064|   609k|    int minversion = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  266|   609k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   609k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   609k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 609k]
  |  |  ------------------
  ------------------
 3065|   609k|    int maxversion = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  266|   609k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   609k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   609k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 609k]
  |  |  ------------------
  ------------------
 3066|       |
 3067|   609k|    if (c->algorithm_mkey & s->s3.tmp.mask_k
  ------------------
  |  Branch (3067:9): [True: 296k, False: 313k]
  ------------------
 3068|   313k|        || c->algorithm_auth & s->s3.tmp.mask_a)
  ------------------
  |  Branch (3068:12): [True: 0, False: 313k]
  ------------------
 3069|   296k|        return 1;
 3070|   313k|    if (s->s3.tmp.max_ver == 0)
  ------------------
  |  Branch (3070:9): [True: 0, False: 313k]
  ------------------
 3071|      0|        return 1;
 3072|       |
 3073|   313k|    if (SSL_IS_QUIC_INT_HANDSHAKE(s))
  ------------------
  |  |  312|   313k|#define SSL_IS_QUIC_INT_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC_INTERNAL) != 0)
  |  |  ------------------
  |  |  |  |   24|   313k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  |  |  ------------------
  |  |  |  Branch (312:38): [True: 0, False: 313k]
  |  |  ------------------
  ------------------
 3074|       |        /* For QUIC, only allow these ciphersuites. */
 3075|      0|        switch (SSL_CIPHER_get_id(c)) {
 3076|      0|        case TLS1_3_CK_AES_128_GCM_SHA256:
  ------------------
  |  |  639|      0|#define TLS1_3_CK_AES_128_GCM_SHA256 0x03001301
  ------------------
  |  Branch (3076:9): [True: 0, False: 0]
  ------------------
 3077|      0|        case TLS1_3_CK_AES_256_GCM_SHA384:
  ------------------
  |  |  640|      0|#define TLS1_3_CK_AES_256_GCM_SHA384 0x03001302
  ------------------
  |  Branch (3077:9): [True: 0, False: 0]
  ------------------
 3078|      0|        case TLS1_3_CK_CHACHA20_POLY1305_SHA256:
  ------------------
  |  |  641|      0|#define TLS1_3_CK_CHACHA20_POLY1305_SHA256 0x03001303
  ------------------
  |  Branch (3078:9): [True: 0, False: 0]
  ------------------
 3079|      0|            break;
 3080|      0|        default:
  ------------------
  |  Branch (3080:9): [True: 0, False: 0]
  ------------------
 3081|      0|            return 1;
 3082|      0|        }
 3083|       |
 3084|       |    /*
 3085|       |     * For historical reasons we will allow ECHDE to be selected by a server
 3086|       |     * in SSLv3 if we are a client
 3087|       |     */
 3088|   313k|    if (minversion == TLS1_VERSION
  ------------------
  |  |   24|   626k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (3088:9): [True: 40.6k, False: 272k]
  ------------------
 3089|  40.6k|        && ecdhe
  ------------------
  |  Branch (3089:12): [True: 4, False: 40.6k]
  ------------------
 3090|      4|        && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   89|      4|#define SSL_kECDHE 0x00000004U
  ------------------
                      && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   98|      4|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (3090:12): [True: 3, False: 1]
  ------------------
 3091|      3|        minversion = SSL3_VERSION;
  ------------------
  |  |   23|      3|#define SSL3_VERSION 0x0300
  ------------------
 3092|       |
 3093|   313k|    if (ssl_version_cmp(s, minversion, s->s3.tmp.max_ver) > 0
  ------------------
  |  Branch (3093:9): [True: 1.04k, False: 312k]
  ------------------
 3094|   312k|        || ssl_version_cmp(s, maxversion, s->s3.tmp.min_ver) < 0)
  ------------------
  |  Branch (3094:12): [True: 487, False: 311k]
  ------------------
 3095|  1.53k|        return 1;
 3096|       |
 3097|   311k|    return !ssl_security(s, op, c->strength_bits, 0, (void *)c);
 3098|   313k|}
tls_use_ticket:
 3101|  2.48k|{
 3102|  2.48k|    if ((s->options & SSL_OP_NO_TICKET))
  ------------------
  |  |  384|  2.48k|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|  2.48k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (3102:9): [True: 2.48k, False: 0]
  ------------------
 3103|  2.48k|        return 0;
 3104|      0|    return ssl_security(s, SSL_SECOP_TICKET, 0, 0, NULL);
  ------------------
  |  | 2759|      0|#define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 3105|  2.48k|}
ssl_set_sig_mask:
 3575|  10.1k|{
 3576|  10.1k|    const uint16_t *sigalgs;
 3577|  10.1k|    size_t i, sigalgslen;
 3578|  10.1k|    uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  112|  10.1k|#define SSL_aRSA 0x00000001U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  114|  10.1k|#define SSL_aDSS 0x00000002U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  118|  10.1k|#define SSL_aECDSA 0x00000008U
  ------------------
 3579|       |    /*
 3580|       |     * Go through all signature algorithms seeing if we support any
 3581|       |     * in disabled_mask.
 3582|       |     */
 3583|  10.1k|    sigalgslen = tls12_get_psigalgs(s, 1, &sigalgs);
 3584|   313k|    for (i = 0; i < sigalgslen; i++, sigalgs++) {
  ------------------
  |  Branch (3584:17): [True: 303k, False: 10.1k]
  ------------------
 3585|   303k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *sigalgs);
  ------------------
  |  |   26|   303k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3586|   303k|        const SSL_CERT_LOOKUP *clu;
 3587|       |
 3588|   303k|        if (lu == NULL)
  ------------------
  |  Branch (3588:13): [True: 0, False: 303k]
  ------------------
 3589|      0|            continue;
 3590|       |
 3591|   303k|        clu = ssl_cert_lookup_by_idx(lu->sig_idx,
 3592|   303k|            SSL_CONNECTION_GET_CTX(s));
  ------------------
  |  |   26|   303k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3593|   303k|        if (clu == NULL)
  ------------------
  |  Branch (3593:13): [True: 0, False: 303k]
  ------------------
 3594|      0|            continue;
 3595|       |
 3596|       |        /* If algorithm is disabled see if we can enable it */
 3597|   303k|        if ((clu->amask & disabled_mask) != 0
  ------------------
  |  Branch (3597:13): [True: 31.0k, False: 272k]
  ------------------
 3598|  31.0k|            && tls12_sigalg_allowed(s, op, lu))
  ------------------
  |  Branch (3598:16): [True: 30.3k, False: 742]
  ------------------
 3599|  30.3k|            disabled_mask &= ~clu->amask;
 3600|   303k|    }
 3601|  10.1k|    *pmask_a |= disabled_mask;
 3602|  10.1k|}
tls12_copy_sigalgs:
 3606|  2.48k|{
 3607|  2.48k|    size_t i;
 3608|  2.48k|    int rv = 0;
 3609|       |
 3610|  76.7k|    for (i = 0; i < psiglen; i++, psig++) {
  ------------------
  |  Branch (3610:17): [True: 74.2k, False: 2.48k]
  ------------------
 3611|  74.2k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *psig);
  ------------------
  |  |   26|  74.2k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3612|       |
 3613|  74.2k|        if (lu == NULL || !tls_sigalg_compat(s, lu))
  ------------------
  |  Branch (3613:13): [True: 0, False: 74.2k]
  |  Branch (3613:27): [True: 7.97k, False: 66.2k]
  ------------------
 3614|  7.97k|            continue;
 3615|  66.2k|        if (!WPACKET_put_bytes_u16(pkt, *psig))
  ------------------
  |  |  911|  66.2k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (3615:13): [True: 0, False: 66.2k]
  ------------------
 3616|      0|            return 0;
 3617|       |        /*
 3618|       |         * If TLS 1.3 must have at least one valid TLS 1.3 message
 3619|       |         * signing algorithm: i.e. neither RSA nor SHA1/SHA224
 3620|       |         */
 3621|  66.2k|        if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  |  273|  4.96k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  4.96k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  2.48k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 2.48k, False: 0]
  |  |  ------------------
  |  |  274|  2.48k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  4.96k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 2.48k, False: 0]
  |  |  ------------------
  |  |  275|  4.96k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  2.48k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 2.48k]
  |  |  ------------------
  ------------------
                      if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  |   63|      0|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|      0|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
                      if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  | 2348|      0|#define NID_sha1                64
  ------------------
                      if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  | 3306|      0|#define NID_sha224              675
  ------------------
  |  Branch (3621:13): [True: 2.48k, False: 63.8k]
  |  Branch (3621:57): [True: 0, False: 0]
  |  Branch (3621:84): [True: 0, False: 0]
  |  Branch (3621:108): [True: 0, False: 0]
  ------------------
 3622|  2.48k|            rv = 1;
 3623|  66.2k|    }
 3624|  2.48k|    if (rv == 0)
  ------------------
  |  Branch (3624:9): [True: 0, False: 2.48k]
  ------------------
 3625|       |        ERR_raise(ERR_LIB_SSL, SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3626|  2.48k|    return rv;
 3627|  2.48k|}
t1_lib.c:discover_provider_groups:
  372|  4.35k|{
  373|  4.35k|    struct provider_ctx_data_st pgd;
  374|       |
  375|  4.35k|    pgd.ctx = vctx;
  376|  4.35k|    pgd.provider = provider;
  377|  4.35k|    return OSSL_PROVIDER_get_capabilities(provider, "TLS-GROUP",
  378|  4.35k|        add_provider_groups, &pgd);
  379|  4.35k|}
t1_lib.c:add_provider_groups:
  234|  93.6k|{
  235|  93.6k|    struct provider_ctx_data_st *pgd = data;
  236|  93.6k|    SSL_CTX *ctx = pgd->ctx;
  237|  93.6k|    const OSSL_PARAM *p;
  238|  93.6k|    TLS_GROUP_INFO *ginf = NULL;
  239|  93.6k|    EVP_KEYMGMT *keymgmt;
  240|  93.6k|    unsigned int gid;
  241|  93.6k|    unsigned int is_kem = 0;
  242|  93.6k|    int ret = 0;
  243|       |
  244|  93.6k|    if (ctx->group_list_max_len == ctx->group_list_len) {
  ------------------
  |  Branch (244:9): [True: 10.1k, False: 83.5k]
  ------------------
  245|  10.1k|        TLS_GROUP_INFO *tmp = NULL;
  246|       |
  247|  10.1k|        if (ctx->group_list_max_len == 0)
  ------------------
  |  Branch (247:13): [True: 3.47k, False: 6.71k]
  ------------------
  248|  3.47k|            tmp = OPENSSL_malloc_array(TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  111|  3.47k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  249|  10.1k|                sizeof(TLS_GROUP_INFO));
  250|  6.71k|        else
  251|  6.71k|            tmp = OPENSSL_realloc_array(ctx->group_list,
  ------------------
  |  |  125|  6.71k|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  252|  10.1k|                ctx->group_list_max_len
  253|  10.1k|                    + TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  254|  10.1k|                sizeof(TLS_GROUP_INFO));
  255|  10.1k|        if (tmp == NULL)
  ------------------
  |  Branch (255:13): [True: 0, False: 10.1k]
  ------------------
  256|      0|            return 0;
  257|  10.1k|        ctx->group_list = tmp;
  258|  10.1k|        memset(tmp + ctx->group_list_max_len,
  259|  10.1k|            0,
  260|  10.1k|            sizeof(TLS_GROUP_INFO) * TLS_GROUP_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  231|  10.1k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  261|  10.1k|        ctx->group_list_max_len += TLS_GROUP_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  231|  10.1k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  262|  10.1k|    }
  263|       |
  264|  93.6k|    ginf = &ctx->group_list[ctx->group_list_len];
  265|       |
  266|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME);
  ------------------
  |  |  153|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_NAME "tls-group-name"
  ------------------
  267|  93.6k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  93.6k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (267:9): [True: 0, False: 93.6k]
  |  Branch (267:22): [True: 0, False: 93.6k]
  ------------------
  268|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        goto err;
  270|      0|    }
  271|  93.6k|    ginf->tlsname = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  93.6k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  272|  93.6k|    if (ginf->tlsname == NULL)
  ------------------
  |  Branch (272:9): [True: 0, False: 93.6k]
  ------------------
  273|      0|        goto err;
  274|       |
  275|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL);
  ------------------
  |  |  154|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL "tls-group-name-internal"
  ------------------
  276|  93.6k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  93.6k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (276:9): [True: 0, False: 93.6k]
  |  Branch (276:22): [True: 0, False: 93.6k]
  ------------------
  277|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  278|      0|        goto err;
  279|      0|    }
  280|  93.6k|    ginf->realname = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  93.6k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|  93.6k|    if (ginf->realname == NULL)
  ------------------
  |  Branch (281:9): [True: 0, False: 93.6k]
  ------------------
  282|      0|        goto err;
  283|       |
  284|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ID);
  ------------------
  |  |  147|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_ID "tls-group-id"
  ------------------
  285|  93.6k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &gid) || gid > UINT16_MAX) {
  ------------------
  |  Branch (285:9): [True: 0, False: 93.6k]
  |  Branch (285:22): [True: 0, False: 93.6k]
  |  Branch (285:55): [True: 0, False: 93.6k]
  ------------------
  286|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  287|      0|        goto err;
  288|      0|    }
  289|  93.6k|    ginf->group_id = (uint16_t)gid;
  290|       |
  291|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ALG);
  ------------------
  |  |  146|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_ALG "tls-group-alg"
  ------------------
  292|  93.6k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  93.6k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (292:9): [True: 0, False: 93.6k]
  |  Branch (292:22): [True: 0, False: 93.6k]
  ------------------
  293|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  294|      0|        goto err;
  295|      0|    }
  296|  93.6k|    ginf->algorithm = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  93.6k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|  93.6k|    if (ginf->algorithm == NULL)
  ------------------
  |  Branch (297:9): [True: 0, False: 93.6k]
  ------------------
  298|      0|        goto err;
  299|       |
  300|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS);
  ------------------
  |  |  155|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS "tls-group-sec-bits"
  ------------------
  301|  93.6k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &ginf->secbits)) {
  ------------------
  |  Branch (301:9): [True: 0, False: 93.6k]
  |  Branch (301:22): [True: 0, False: 93.6k]
  ------------------
  302|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  303|      0|        goto err;
  304|      0|    }
  305|       |
  306|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_IS_KEM);
  ------------------
  |  |  148|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_IS_KEM "tls-group-is-kem"
  ------------------
  307|  93.6k|    if (p != NULL && (!OSSL_PARAM_get_uint(p, &is_kem) || is_kem > 1)) {
  ------------------
  |  Branch (307:9): [True: 93.6k, False: 0]
  |  Branch (307:23): [True: 0, False: 93.6k]
  |  Branch (307:59): [True: 0, False: 93.6k]
  ------------------
  308|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  309|      0|        goto err;
  310|      0|    }
  311|  93.6k|    ginf->is_kem = 1 & is_kem;
  312|       |
  313|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_TLS);
  ------------------
  |  |  152|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_TLS "tls-min-tls"
  ------------------
  314|  93.6k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mintls)) {
  ------------------
  |  Branch (314:9): [True: 0, False: 93.6k]
  |  Branch (314:22): [True: 0, False: 93.6k]
  ------------------
  315|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        goto err;
  317|      0|    }
  318|       |
  319|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_TLS);
  ------------------
  |  |  150|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_TLS "tls-max-tls"
  ------------------
  320|  93.6k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxtls)) {
  ------------------
  |  Branch (320:9): [True: 0, False: 93.6k]
  |  Branch (320:22): [True: 0, False: 93.6k]
  ------------------
  321|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  322|      0|        goto err;
  323|      0|    }
  324|       |
  325|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS);
  ------------------
  |  |  151|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS "tls-min-dtls"
  ------------------
  326|  93.6k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mindtls)) {
  ------------------
  |  Branch (326:9): [True: 0, False: 93.6k]
  |  Branch (326:22): [True: 0, False: 93.6k]
  ------------------
  327|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  328|      0|        goto err;
  329|      0|    }
  330|       |
  331|  93.6k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS);
  ------------------
  |  |  149|  93.6k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS "tls-max-dtls"
  ------------------
  332|  93.6k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxdtls)) {
  ------------------
  |  Branch (332:9): [True: 0, False: 93.6k]
  |  Branch (332:22): [True: 0, False: 93.6k]
  ------------------
  333|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  334|      0|        goto err;
  335|      0|    }
  336|       |
  337|  93.6k|    if (ginf->group_id >= OSSL_TLS_GROUP_ID_ffdhe2048
  ------------------
  |  |   55|   187k|#define OSSL_TLS_GROUP_ID_ffdhe2048 0x0100
  ------------------
  |  Branch (337:9): [True: 41.6k, False: 52.0k]
  ------------------
  338|  41.6k|        && ginf->group_id <= OSSL_TLS_GROUP_ID_ffdhe8192) {
  ------------------
  |  |   59|  41.6k|#define OSSL_TLS_GROUP_ID_ffdhe8192 0x0104
  ------------------
  |  Branch (338:12): [True: 17.3k, False: 24.2k]
  ------------------
  339|  17.3k|        if (ginf->mintls > TLS1_2_VERSION)
  ------------------
  |  |   26|  17.3k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (339:13): [True: 17.3k, False: 0]
  ------------------
  340|  17.3k|            ginf->mintls = TLS1_VERSION;
  ------------------
  |  |   24|  17.3k|#define TLS1_VERSION 0x0301
  ------------------
  341|  17.3k|        if (DTLS_VERSION_GT(ginf->mindtls, DTLS1_2_VERSION))
  ------------------
  |  |   62|  17.3k|#define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  17.3k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  17.3k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 17.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  17.3k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  17.3k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 17.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:33): [True: 17.3k, False: 0]
  |  |  ------------------
  ------------------
  342|  17.3k|            ginf->mindtls = DTLS1_VERSION;
  ------------------
  |  |   28|  17.3k|#define DTLS1_VERSION 0xFEFF
  ------------------
  343|  17.3k|    }
  344|       |
  345|       |    /*
  346|       |     * Now check that the algorithm is actually usable for our property query
  347|       |     * string. Regardless of the result we still return success because we have
  348|       |     * successfully processed this group, even though we may decide not to use
  349|       |     * it.
  350|       |     */
  351|  93.6k|    ret = 1;
  352|  93.6k|    ERR_set_mark();
  353|  93.6k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, ginf->algorithm, ctx->propq);
  354|  93.6k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (354:9): [True: 90.6k, False: 3.05k]
  ------------------
  355|       |        /* We have successfully fetched the algorithm, we can use the group. */
  356|  90.6k|        ctx->group_list_len++;
  357|  90.6k|        ginf = NULL;
  358|  90.6k|        EVP_KEYMGMT_free(keymgmt);
  359|  90.6k|    }
  360|  93.6k|    ERR_pop_to_mark();
  361|  93.6k|err:
  362|  93.6k|    if (ginf != NULL) {
  ------------------
  |  Branch (362:9): [True: 3.05k, False: 90.6k]
  ------------------
  363|  3.05k|        OPENSSL_free(ginf->tlsname);
  ------------------
  |  |  132|  3.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  364|  3.05k|        OPENSSL_free(ginf->realname);
  ------------------
  |  |  132|  3.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  365|  3.05k|        OPENSSL_free(ginf->algorithm);
  ------------------
  |  |  132|  3.05k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  366|       |        ginf->algorithm = ginf->tlsname = ginf->realname = NULL;
  367|  3.05k|    }
  368|  93.6k|    return ret;
  369|  93.6k|}
t1_lib.c:discover_provider_sigalgs:
  681|  4.35k|{
  682|  4.35k|    struct provider_ctx_data_st pgd;
  683|       |
  684|  4.35k|    pgd.ctx = vctx;
  685|  4.35k|    pgd.provider = provider;
  686|  4.35k|    OSSL_PROVIDER_get_capabilities(provider, "TLS-SIGALG",
  687|  4.35k|        add_provider_sigalgs, &pgd);
  688|       |    /*
  689|       |     * Always OK, even if provider doesn't support the capability:
  690|       |     * Reconsider testing retval when legacy sigalgs are also loaded this way.
  691|       |     */
  692|  4.35k|    return 1;
  693|  4.35k|}
t1_lib.c:add_provider_sigalgs:
  401|  13.8k|{
  402|  13.8k|    struct provider_ctx_data_st *pgd = data;
  403|  13.8k|    SSL_CTX *ctx = pgd->ctx;
  404|  13.8k|    OSSL_PROVIDER *provider = pgd->provider;
  405|  13.8k|    const OSSL_PARAM *p;
  406|  13.8k|    TLS_SIGALG_INFO *sinf = NULL;
  407|  13.8k|    EVP_KEYMGMT *keymgmt;
  408|  13.8k|    const char *keytype;
  409|  13.8k|    unsigned int code_point = 0;
  410|  13.8k|    int ret = 0;
  411|       |
  412|  13.8k|    if (ctx->sigalg_list_max_len == ctx->sigalg_list_len) {
  ------------------
  |  Branch (412:9): [True: 3.47k, False: 10.4k]
  ------------------
  413|  3.47k|        TLS_SIGALG_INFO *tmp = NULL;
  414|       |
  415|  3.47k|        if (ctx->sigalg_list_max_len == 0)
  ------------------
  |  Branch (415:13): [True: 3.47k, False: 0]
  ------------------
  416|  3.47k|            tmp = OPENSSL_malloc_array(TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  111|  3.47k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  417|  3.47k|                sizeof(TLS_SIGALG_INFO));
  418|      0|        else
  419|      0|            tmp = OPENSSL_realloc_array(ctx->sigalg_list,
  ------------------
  |  |  125|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  420|  3.47k|                ctx->sigalg_list_max_len
  421|  3.47k|                    + TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  422|  3.47k|                sizeof(TLS_SIGALG_INFO));
  423|  3.47k|        if (tmp == NULL)
  ------------------
  |  Branch (423:13): [True: 0, False: 3.47k]
  ------------------
  424|      0|            return 0;
  425|  3.47k|        ctx->sigalg_list = tmp;
  426|  3.47k|        memset(tmp + ctx->sigalg_list_max_len, 0,
  427|  3.47k|            sizeof(TLS_SIGALG_INFO) * TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  398|  3.47k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  428|  3.47k|        ctx->sigalg_list_max_len += TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  398|  3.47k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  429|  3.47k|    }
  430|       |
  431|  13.8k|    sinf = &ctx->sigalg_list[ctx->sigalg_list_len];
  432|       |
  433|       |    /* First, mandatory parameters */
  434|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_NAME);
  ------------------
  |  |  166|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_NAME "tls-sigalg-name"
  ------------------
  435|  13.8k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  13.8k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (435:9): [True: 0, False: 13.8k]
  |  Branch (435:22): [True: 0, False: 13.8k]
  ------------------
  436|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  437|      0|        goto err;
  438|      0|    }
  439|  13.8k|    OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  132|  13.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  440|  13.8k|    sinf->sigalg_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  13.8k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  441|  13.8k|    if (sinf->sigalg_name == NULL)
  ------------------
  |  Branch (441:9): [True: 0, False: 13.8k]
  ------------------
  442|      0|        goto err;
  443|       |
  444|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME);
  ------------------
  |  |  159|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME "tls-sigalg-iana-name"
  ------------------
  445|  13.8k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  13.8k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (445:9): [True: 0, False: 13.8k]
  |  Branch (445:22): [True: 0, False: 13.8k]
  ------------------
  446|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  447|      0|        goto err;
  448|      0|    }
  449|  13.8k|    OPENSSL_free(sinf->name);
  ------------------
  |  |  132|  13.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  450|  13.8k|    sinf->name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  13.8k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  451|  13.8k|    if (sinf->name == NULL)
  ------------------
  |  Branch (451:9): [True: 0, False: 13.8k]
  ------------------
  452|      0|        goto err;
  453|       |
  454|  13.8k|    p = OSSL_PARAM_locate_const(params,
  455|  13.8k|        OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT);
  ------------------
  |  |  156|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT "tls-sigalg-code-point"
  ------------------
  456|  13.8k|    if (p == NULL
  ------------------
  |  Branch (456:9): [True: 0, False: 13.8k]
  ------------------
  457|  13.8k|        || !OSSL_PARAM_get_uint(p, &code_point)
  ------------------
  |  Branch (457:12): [True: 0, False: 13.8k]
  ------------------
  458|  13.8k|        || code_point > UINT16_MAX) {
  ------------------
  |  Branch (458:12): [True: 0, False: 13.8k]
  ------------------
  459|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  460|      0|        goto err;
  461|      0|    }
  462|  13.8k|    sinf->code_point = (uint16_t)code_point;
  463|       |
  464|  13.8k|    p = OSSL_PARAM_locate_const(params,
  465|  13.8k|        OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS);
  ------------------
  |  |  168|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS "tls-sigalg-sec-bits"
  ------------------
  466|  13.8k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &sinf->secbits)) {
  ------------------
  |  Branch (466:9): [True: 0, False: 13.8k]
  |  Branch (466:22): [True: 0, False: 13.8k]
  ------------------
  467|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  468|      0|        goto err;
  469|      0|    }
  470|       |
  471|       |    /* Now, optional parameters */
  472|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_OID);
  ------------------
  |  |  167|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_OID "tls-sigalg-oid"
  ------------------
  473|  13.8k|    if (p == NULL) {
  ------------------
  |  Branch (473:9): [True: 0, False: 13.8k]
  ------------------
  474|      0|        sinf->sigalg_oid = NULL;
  475|  13.8k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  13.8k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (475:16): [True: 0, False: 13.8k]
  ------------------
  476|      0|        goto err;
  477|  13.8k|    } else {
  478|  13.8k|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  132|  13.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  479|  13.8k|        sinf->sigalg_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  13.8k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  480|  13.8k|        if (sinf->sigalg_oid == NULL)
  ------------------
  |  Branch (480:13): [True: 0, False: 13.8k]
  ------------------
  481|      0|            goto err;
  482|  13.8k|    }
  483|       |
  484|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME);
  ------------------
  |  |  169|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME "tls-sigalg-sig-name"
  ------------------
  485|  13.8k|    if (p == NULL) {
  ------------------
  |  Branch (485:9): [True: 13.8k, False: 0]
  ------------------
  486|  13.8k|        sinf->sig_name = NULL;
  487|  13.8k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (487:16): [True: 0, False: 0]
  ------------------
  488|      0|        goto err;
  489|      0|    } else {
  490|      0|        OPENSSL_free(sinf->sig_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  491|      0|        sinf->sig_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  492|      0|        if (sinf->sig_name == NULL)
  ------------------
  |  Branch (492:13): [True: 0, False: 0]
  ------------------
  493|      0|            goto err;
  494|      0|    }
  495|       |
  496|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_OID);
  ------------------
  |  |  170|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_OID "tls-sigalg-sig-oid"
  ------------------
  497|  13.8k|    if (p == NULL) {
  ------------------
  |  Branch (497:9): [True: 13.8k, False: 0]
  ------------------
  498|  13.8k|        sinf->sig_oid = NULL;
  499|  13.8k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (499:16): [True: 0, False: 0]
  ------------------
  500|      0|        goto err;
  501|      0|    } else {
  502|      0|        OPENSSL_free(sinf->sig_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  503|      0|        sinf->sig_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  504|      0|        if (sinf->sig_oid == NULL)
  ------------------
  |  Branch (504:13): [True: 0, False: 0]
  ------------------
  505|      0|            goto err;
  506|      0|    }
  507|       |
  508|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME);
  ------------------
  |  |  157|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME "tls-sigalg-hash-name"
  ------------------
  509|  13.8k|    if (p == NULL) {
  ------------------
  |  Branch (509:9): [True: 13.8k, False: 0]
  ------------------
  510|  13.8k|        sinf->hash_name = NULL;
  511|  13.8k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (511:16): [True: 0, False: 0]
  ------------------
  512|      0|        goto err;
  513|      0|    } else {
  514|      0|        OPENSSL_free(sinf->hash_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  515|      0|        sinf->hash_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  516|      0|        if (sinf->hash_name == NULL)
  ------------------
  |  Branch (516:13): [True: 0, False: 0]
  ------------------
  517|      0|            goto err;
  518|      0|    }
  519|       |
  520|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_OID);
  ------------------
  |  |  158|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_OID "tls-sigalg-hash-oid"
  ------------------
  521|  13.8k|    if (p == NULL) {
  ------------------
  |  Branch (521:9): [True: 13.8k, False: 0]
  ------------------
  522|  13.8k|        sinf->hash_oid = NULL;
  523|  13.8k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (523:16): [True: 0, False: 0]
  ------------------
  524|      0|        goto err;
  525|      0|    } else {
  526|      0|        OPENSSL_free(sinf->hash_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  527|      0|        sinf->hash_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  528|      0|        if (sinf->hash_oid == NULL)
  ------------------
  |  Branch (528:13): [True: 0, False: 0]
  ------------------
  529|      0|            goto err;
  530|      0|    }
  531|       |
  532|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE);
  ------------------
  |  |  160|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE "tls-sigalg-keytype"
  ------------------
  533|  13.8k|    if (p == NULL) {
  ------------------
  |  Branch (533:9): [True: 13.8k, False: 0]
  ------------------
  534|  13.8k|        sinf->keytype = NULL;
  535|  13.8k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (535:16): [True: 0, False: 0]
  ------------------
  536|      0|        goto err;
  537|      0|    } else {
  538|      0|        OPENSSL_free(sinf->keytype);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  539|      0|        sinf->keytype = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  540|      0|        if (sinf->keytype == NULL)
  ------------------
  |  Branch (540:13): [True: 0, False: 0]
  ------------------
  541|      0|            goto err;
  542|      0|    }
  543|       |
  544|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID);
  ------------------
  |  |  161|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID "tls-sigalg-keytype-oid"
  ------------------
  545|  13.8k|    if (p == NULL) {
  ------------------
  |  Branch (545:9): [True: 13.8k, False: 0]
  ------------------
  546|  13.8k|        sinf->keytype_oid = NULL;
  547|  13.8k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (547:16): [True: 0, False: 0]
  ------------------
  548|      0|        goto err;
  549|      0|    } else {
  550|      0|        OPENSSL_free(sinf->keytype_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  551|      0|        sinf->keytype_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  552|      0|        if (sinf->keytype_oid == NULL)
  ------------------
  |  Branch (552:13): [True: 0, False: 0]
  ------------------
  553|      0|            goto err;
  554|      0|    }
  555|       |
  556|       |    /* Optional, not documented prior to 3.5 */
  557|  13.8k|    sinf->mindtls = sinf->maxdtls = -1;
  558|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS);
  ------------------
  |  |  164|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS "tls-min-dtls"
  ------------------
  559|  13.8k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->mindtls)) {
  ------------------
  |  Branch (559:9): [True: 13.8k, False: 0]
  |  Branch (559:22): [True: 0, False: 13.8k]
  ------------------
  560|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  561|      0|        goto err;
  562|      0|    }
  563|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS);
  ------------------
  |  |  162|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS "tls-max-dtls"
  ------------------
  564|  13.8k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->maxdtls)) {
  ------------------
  |  Branch (564:9): [True: 13.8k, False: 0]
  |  Branch (564:22): [True: 0, False: 13.8k]
  ------------------
  565|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  566|      0|        goto err;
  567|      0|    }
  568|       |    /* DTLS version numbers grow downward */
  569|  13.8k|    if ((sinf->maxdtls != 0) && (sinf->maxdtls != -1) && ((sinf->maxdtls > sinf->mindtls))) {
  ------------------
  |  Branch (569:9): [True: 13.8k, False: 0]
  |  Branch (569:33): [True: 0, False: 13.8k]
  |  Branch (569:58): [True: 0, False: 0]
  ------------------
  570|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  571|      0|        goto err;
  572|      0|    }
  573|       |    /* No provider sigalgs are supported in DTLS, reset after checking. */
  574|  13.8k|    sinf->mindtls = sinf->maxdtls = -1;
  575|       |
  576|       |    /* The remaining parameters below are mandatory again */
  577|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS);
  ------------------
  |  |  165|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS "tls-min-tls"
  ------------------
  578|  13.8k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->mintls)) {
  ------------------
  |  Branch (578:9): [True: 0, False: 13.8k]
  |  Branch (578:22): [True: 0, False: 13.8k]
  ------------------
  579|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  580|      0|        goto err;
  581|      0|    }
  582|  13.8k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS);
  ------------------
  |  |  163|  13.8k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS "tls-max-tls"
  ------------------
  583|  13.8k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->maxtls)) {
  ------------------
  |  Branch (583:9): [True: 0, False: 13.8k]
  |  Branch (583:22): [True: 0, False: 13.8k]
  ------------------
  584|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  585|      0|        goto err;
  586|      0|    }
  587|  13.8k|    if ((sinf->maxtls != 0) && (sinf->maxtls != -1) && ((sinf->maxtls < sinf->mintls))) {
  ------------------
  |  Branch (587:9): [True: 0, False: 13.8k]
  |  Branch (587:32): [True: 0, False: 0]
  |  Branch (587:56): [True: 0, False: 0]
  ------------------
  588|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  589|      0|        goto err;
  590|      0|    }
  591|  13.8k|    if ((sinf->mintls != 0) && (sinf->mintls != -1) && ((sinf->mintls > TLS1_3_VERSION)))
  ------------------
  |  |   27|  13.8k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (591:9): [True: 13.8k, False: 0]
  |  Branch (591:32): [True: 13.8k, False: 0]
  |  Branch (591:56): [True: 0, False: 13.8k]
  ------------------
  592|      0|        sinf->mintls = sinf->maxtls = -1;
  593|  13.8k|    if ((sinf->maxtls != 0) && (sinf->maxtls != -1) && ((sinf->maxtls < TLS1_3_VERSION)))
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (593:9): [True: 0, False: 13.8k]
  |  Branch (593:32): [True: 0, False: 0]
  |  Branch (593:56): [True: 0, False: 0]
  ------------------
  594|      0|        sinf->mintls = sinf->maxtls = -1;
  595|       |
  596|       |    /* Ignore unusable sigalgs */
  597|  13.8k|    if (sinf->mintls == -1 && sinf->mindtls == -1) {
  ------------------
  |  Branch (597:9): [True: 0, False: 13.8k]
  |  Branch (597:31): [True: 0, False: 0]
  ------------------
  598|      0|        ret = 1;
  599|      0|        goto err;
  600|      0|    }
  601|       |
  602|       |    /*
  603|       |     * Now check that the algorithm is actually usable for our property query
  604|       |     * string. Regardless of the result we still return success because we have
  605|       |     * successfully processed this signature, even though we may decide not to
  606|       |     * use it.
  607|       |     */
  608|  13.8k|    ret = 1;
  609|  13.8k|    ERR_set_mark();
  610|  13.8k|    keytype = inferred_keytype(sinf);
  611|  13.8k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, keytype, ctx->propq);
  612|  13.8k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (612:9): [True: 13.4k, False: 452]
  ------------------
  613|       |        /*
  614|       |         * We have successfully fetched the algorithm - however if the provider
  615|       |         * doesn't match this one then we ignore it.
  616|       |         *
  617|       |         * Note: We're cheating a little here. Technically if the same algorithm
  618|       |         * is available from more than one provider then it is undefined which
  619|       |         * implementation you will get back. Theoretically this could be
  620|       |         * different every time...we assume here that you'll always get the
  621|       |         * same one back if you repeat the exact same fetch. Is this a reasonable
  622|       |         * assumption to make (in which case perhaps we should document this
  623|       |         * behaviour)?
  624|       |         */
  625|  13.4k|        if (EVP_KEYMGMT_get0_provider(keymgmt) == provider) {
  ------------------
  |  Branch (625:13): [True: 13.4k, False: 0]
  ------------------
  626|       |            /*
  627|       |             * We have a match - so we could use this signature;
  628|       |             * Check proper object registration first, though.
  629|       |             * Don't care about return value as this may have been
  630|       |             * done within providers or previous calls to
  631|       |             * add_provider_sigalgs.
  632|       |             */
  633|  13.4k|            OBJ_create(sinf->sigalg_oid, sinf->sigalg_name, NULL);
  634|       |            /* sanity check: Without successful registration don't use alg */
  635|  13.4k|            if ((OBJ_txt2nid(sinf->sigalg_name) == NID_undef) || (OBJ_nid2obj(OBJ_txt2nid(sinf->sigalg_name)) == NULL)) {
  ------------------
  |  |   18|  13.4k|#define NID_undef                       0
  ------------------
  |  Branch (635:17): [True: 0, False: 13.4k]
  |  Branch (635:66): [True: 0, False: 13.4k]
  ------------------
  636|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  637|      0|                goto err;
  638|      0|            }
  639|  13.4k|            if (sinf->sig_name != NULL)
  ------------------
  |  Branch (639:17): [True: 0, False: 13.4k]
  ------------------
  640|      0|                OBJ_create(sinf->sig_oid, sinf->sig_name, NULL);
  641|  13.4k|            if (sinf->keytype != NULL)
  ------------------
  |  Branch (641:17): [True: 0, False: 13.4k]
  ------------------
  642|      0|                OBJ_create(sinf->keytype_oid, sinf->keytype, NULL);
  643|  13.4k|            if (sinf->hash_name != NULL)
  ------------------
  |  Branch (643:17): [True: 0, False: 13.4k]
  ------------------
  644|      0|                OBJ_create(sinf->hash_oid, sinf->hash_name, NULL);
  645|  13.4k|            OBJ_add_sigid(OBJ_txt2nid(sinf->sigalg_name),
  646|  13.4k|                (sinf->hash_name != NULL
  ------------------
  |  Branch (646:18): [True: 0, False: 13.4k]
  ------------------
  647|  13.4k|                        ? OBJ_txt2nid(sinf->hash_name)
  648|  13.4k|                        : NID_undef),
  ------------------
  |  |   18|  13.4k|#define NID_undef                       0
  ------------------
  649|  13.4k|                OBJ_txt2nid(keytype));
  650|  13.4k|            ctx->sigalg_list_len++;
  651|  13.4k|            sinf = NULL;
  652|  13.4k|        }
  653|  13.4k|        EVP_KEYMGMT_free(keymgmt);
  654|  13.4k|    }
  655|  13.8k|    ERR_pop_to_mark();
  656|  13.8k|err:
  657|  13.8k|    if (sinf != NULL) {
  ------------------
  |  Branch (657:9): [True: 452, False: 13.4k]
  ------------------
  658|    452|        OPENSSL_free(sinf->name);
  ------------------
  |  |  132|    452|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  659|    452|        sinf->name = NULL;
  660|    452|        OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  132|    452|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  661|    452|        sinf->sigalg_name = NULL;
  662|    452|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  132|    452|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  663|    452|        sinf->sigalg_oid = NULL;
  664|    452|        OPENSSL_free(sinf->sig_name);
  ------------------
  |  |  132|    452|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  665|    452|        sinf->sig_name = NULL;
  666|    452|        OPENSSL_free(sinf->sig_oid);
  ------------------
  |  |  132|    452|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  667|    452|        sinf->sig_oid = NULL;
  668|    452|        OPENSSL_free(sinf->hash_name);
  ------------------
  |  |  132|    452|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  669|    452|        sinf->hash_name = NULL;
  670|    452|        OPENSSL_free(sinf->hash_oid);
  ------------------
  |  |  132|    452|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  671|    452|        sinf->hash_oid = NULL;
  672|    452|        OPENSSL_free(sinf->keytype);
  ------------------
  |  |  132|    452|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  673|    452|        sinf->keytype = NULL;
  674|    452|        OPENSSL_free(sinf->keytype_oid);
  ------------------
  |  |  132|    452|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  675|       |        sinf->keytype_oid = NULL;
  676|    452|    }
  677|  13.8k|    return ret;
  678|  13.8k|}
t1_lib.c:inferred_keytype:
  390|  27.3k|{
  391|  27.3k|    return (sinf->keytype != NULL
  ------------------
  |  Branch (391:13): [True: 0, False: 27.3k]
  ------------------
  392|  27.3k|            ? sinf->keytype
  393|  27.3k|            : (sinf->sig_name != NULL
  ------------------
  |  Branch (393:16): [True: 0, False: 27.3k]
  ------------------
  394|  27.3k|                      ? sinf->sig_name
  395|  27.3k|                      : sinf->sigalg_name));
  396|  27.3k|}
t1_lib.c:tuple_cb:
 1668|  22.0k|{
 1669|  22.0k|    gid_cb_st *garg = arg;
 1670|  22.0k|    int retval = 1; /* We assume success */
 1671|  22.0k|    char *restored_tuple_string;
 1672|       |
 1673|       |    /* Sanity checks */
 1674|  22.0k|    if (garg == NULL || tuple == NULL || len <= 0) {
  ------------------
  |  Branch (1674:9): [True: 0, False: 22.0k]
  |  Branch (1674:25): [True: 2, False: 22.0k]
  |  Branch (1674:42): [True: 0, False: 22.0k]
  ------------------
 1675|      2|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  357|      2|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      2|    (ERR_new(),                                                  \
  |  |  |  |  360|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      2|        ERR_set_error)
  |  |  ------------------
  ------------------
 1676|      2|        return 0;
 1677|      2|    }
 1678|       |
 1679|  22.0k|    if (garg->inner && !garg->first && !close_tuple(garg))
  ------------------
  |  Branch (1679:9): [True: 3.59k, False: 18.4k]
  |  Branch (1679:24): [True: 2.87k, False: 720]
  |  Branch (1679:40): [True: 0, False: 2.87k]
  ------------------
 1680|      0|        return 0;
 1681|  22.0k|    garg->first = 0;
 1682|       |
 1683|       |    /* Convert to \0-terminated string */
 1684|  22.0k|    restored_tuple_string = OPENSSL_malloc(len + 1 /* \0 */);
  ------------------
  |  |  107|  22.0k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1685|  22.0k|    if (restored_tuple_string == NULL)
  ------------------
  |  Branch (1685:9): [True: 0, False: 22.0k]
  ------------------
 1686|      0|        return 0;
 1687|  22.0k|    memcpy(restored_tuple_string, tuple, len);
 1688|  22.0k|    restored_tuple_string[len] = '\0';
 1689|       |
 1690|       |    /* Analyze group list of this tuple */
 1691|  22.0k|    retval = CONF_parse_list(restored_tuple_string, GROUP_DELIMITER_CHARACTER, 1, gid_cb, arg);
  ------------------
  |  | 1230|  22.0k|#define GROUP_DELIMITER_CHARACTER ':'
  ------------------
 1692|       |
 1693|       |    /* We don't need the \o-terminated string anymore */
 1694|  22.0k|    OPENSSL_free(restored_tuple_string);
  ------------------
  |  |  132|  22.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1695|       |
 1696|  22.0k|    if (!garg->inner && !close_tuple(garg))
  ------------------
  |  Branch (1696:9): [True: 18.4k, False: 3.59k]
  |  Branch (1696:25): [True: 0, False: 18.4k]
  ------------------
 1697|      0|        return 0;
 1698|  22.0k|    return retval;
 1699|  22.0k|}
t1_lib.c:close_tuple:
 1639|  21.3k|{
 1640|  21.3k|    size_t gidcnt = garg->tuplcnt_arr[garg->tplcnt];
 1641|       |
 1642|  21.3k|    if (gidcnt > 0 && garg->want_keyshare > 0) {
  ------------------
  |  Branch (1642:9): [True: 18.6k, False: 2.76k]
  |  Branch (1642:23): [True: 425, False: 18.1k]
  ------------------
 1643|    425|        uint16_t gid = garg->gid_arr[garg->gidcnt - gidcnt];
 1644|       |
 1645|       |        /*
 1646|       |         * All groups in the tuple that were marked for keyshare prediction
 1647|       |         * were unknown (unrecognised); select the first known group instead.
 1648|       |         */
 1649|    425|        garg->ksid_arr[garg->ksidcnt++] = gid;
 1650|    425|    }
 1651|       |    /* Reset keyshare state for the next tuple */
 1652|  21.3k|    garg->want_keyshare = 0;
 1653|       |
 1654|  21.3k|    if (gidcnt == 0)
  ------------------
  |  Branch (1654:9): [True: 2.76k, False: 18.6k]
  ------------------
 1655|  2.76k|        return 1; /* Discard empty tuple; no need to open a new slot */
 1656|       |
 1657|       |    /* Grow before the increment: the new active slot will be at tplcnt + 1 */
 1658|  18.6k|    if (!grow_tuples(garg))
  ------------------
  |  Branch (1658:9): [True: 0, False: 18.6k]
  ------------------
 1659|      0|        return 0;
 1660|       |
 1661|       |    /* Promote closed tuple and initialise the new active tuple slot */
 1662|  18.6k|    garg->tuplcnt_arr[++garg->tplcnt] = 0;
 1663|  18.6k|    return 1;
 1664|  18.6k|}
t1_lib.c:grow_tuples:
 1613|  18.6k|{
 1614|       |    /*
 1615|       |     * tplcnt + 1 is the index close_tuple() will write to after incrementing;
 1616|       |     * reallocate before it would reach the end of the allocated array.
 1617|       |     */
 1618|  18.6k|    if (garg->tplcnt + 1 >= garg->tplmax) {
  ------------------
  |  Branch (1618:9): [True: 0, False: 18.6k]
  ------------------
 1619|      0|        size_t *tmp = OPENSSL_realloc_array(garg->tuplcnt_arr,
  ------------------
  |  |  125|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1620|      0|            garg->tplmax + GROUPLIST_INCREMENT,
 1621|      0|            sizeof(*garg->tuplcnt_arr));
 1622|       |
 1623|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1623:13): [True: 0, False: 0]
  ------------------
 1624|      0|            return 0;
 1625|      0|        garg->tplmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1626|      0|        garg->tuplcnt_arr = tmp;
 1627|      0|    }
 1628|  18.6k|    return 1;
 1629|  18.6k|}
t1_lib.c:gid_cb:
 1292|  50.4k|{
 1293|  50.4k|    gid_cb_st *garg = arg;
 1294|  50.4k|    size_t i, j, k;
 1295|  50.4k|    uint16_t gid = 0;
 1296|  50.4k|    int found_group = 0;
 1297|  50.4k|    char etmp[GROUP_NAME_BUFFER_LENGTH];
 1298|  50.4k|    int retval = 1; /* We assume success */
 1299|  50.4k|    const char *current_prefix;
 1300|  50.4k|    int ignore_unknown = 0;
 1301|  50.4k|    int add_keyshare = 0;
 1302|  50.4k|    int remove_group = 0;
 1303|  50.4k|    size_t restored_prefix_index = 0;
 1304|  50.4k|    char *restored_default_group_string;
 1305|  50.4k|    int continue_while_loop = 1;
 1306|       |
 1307|       |    /* Sanity checks */
 1308|  50.4k|    if (garg == NULL || elem == NULL || len <= 0) {
  ------------------
  |  Branch (1308:9): [True: 0, False: 50.4k]
  |  Branch (1308:25): [True: 13, False: 50.4k]
  |  Branch (1308:41): [True: 0, False: 50.4k]
  ------------------
 1309|     13|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  357|     13|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     13|    (ERR_new(),                                                  \
  |  |  |  |  360|     13|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     13|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     13|        ERR_set_error)
  |  |  ------------------
  ------------------
 1310|     13|        return 0;
 1311|     13|    }
 1312|       |
 1313|       |    /* Check the possible prefixes (remark: Leading and trailing spaces already cleared) */
 1314|   107k|    while (continue_while_loop && len > 0
  ------------------
  |  Branch (1314:12): [True: 107k, False: 64]
  |  Branch (1314:35): [True: 107k, False: 6]
  ------------------
 1315|   107k|        && ((current_prefix = strchr(prefixes, elem[0])) != NULL
  ------------------
  |  Branch (1315:13): [True: 57.3k, False: 50.3k]
  ------------------
 1316|  58.0k|            || OPENSSL_strncasecmp(current_prefix = (char *)DEFAULT_GROUPNAME_FIRST_CHARACTER, elem, 1) == 0)) {
  ------------------
  |  Branch (1316:16): [True: 786, False: 49.6k]
  ------------------
 1317|       |
 1318|  58.0k|        switch (*current_prefix) {
 1319|      0|        case TUPLE_DELIMITER_CHARACTER:
  ------------------
  |  | 1226|      0|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
  |  Branch (1319:9): [True: 0, False: 58.0k]
  ------------------
 1320|       |            /* tuple delimiter not allowed here -> syntax error */
 1321|      0|            return -1;
 1322|      0|            break;
 1323|      0|        case GROUP_DELIMITER_CHARACTER:
  ------------------
  |  | 1230|      0|#define GROUP_DELIMITER_CHARACTER ':'
  ------------------
  |  Branch (1323:9): [True: 0, False: 58.0k]
  ------------------
 1324|      0|            return -1; /* Not a valid prefix for a single group name-> syntax error */
 1325|      0|            break;
 1326|  9.36k|        case KEY_SHARE_INDICATOR_CHARACTER:
  ------------------
  |  | 1238|  9.36k|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
  |  Branch (1326:9): [True: 9.36k, False: 48.7k]
  ------------------
 1327|  9.36k|            if (add_keyshare)
  ------------------
  |  Branch (1327:17): [True: 2, False: 9.36k]
  ------------------
 1328|      2|                return -1; /* Only single key share prefix allowed -> syntax error */
 1329|  9.36k|            add_keyshare = 1;
 1330|  9.36k|            ++elem;
 1331|  9.36k|            --len;
 1332|  9.36k|            break;
 1333|    902|        case REMOVE_GROUP_INDICATOR_CHARACTER:
  ------------------
  |  | 1242|    902|#define REMOVE_GROUP_INDICATOR_CHARACTER '-'
  ------------------
  |  Branch (1333:9): [True: 902, False: 57.1k]
  ------------------
 1334|    902|            if (remove_group)
  ------------------
  |  Branch (1334:17): [True: 1, False: 901]
  ------------------
 1335|      1|                return -1; /* Only single remove group prefix allowed -> syntax error */
 1336|    901|            remove_group = 1;
 1337|    901|            ++elem;
 1338|    901|            --len;
 1339|    901|            break;
 1340|  47.0k|        case IGNORE_UNKNOWN_GROUP_CHARACTER:
  ------------------
  |  | 1234|  47.0k|#define IGNORE_UNKNOWN_GROUP_CHARACTER '?'
  ------------------
  |  Branch (1340:9): [True: 47.0k, False: 11.0k]
  ------------------
 1341|  47.0k|            if (ignore_unknown)
  ------------------
  |  Branch (1341:17): [True: 1, False: 47.0k]
  ------------------
 1342|      1|                return -1; /* Only single ? allowed -> syntax error */
 1343|  47.0k|            ignore_unknown = 1;
 1344|  47.0k|            ++elem;
 1345|  47.0k|            --len;
 1346|  47.0k|            break;
 1347|    786|        default:
  ------------------
  |  Branch (1347:9): [True: 786, False: 57.3k]
  ------------------
 1348|       |            /*
 1349|       |             * Check whether a DEFAULT[_XYZ] 'pseudo group' (= a built-in
 1350|       |             * list of groups) should be added
 1351|       |             */
 1352|    914|            for (i = 0; i < OSSL_NELEM(default_group_strings); i++) {
  ------------------
  |  |   14|    914|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1352:25): [True: 850, False: 64]
  ------------------
 1353|    850|                if ((size_t)len == (strlen(default_group_strings[i].list_name))
  ------------------
  |  Branch (1353:21): [True: 750, False: 100]
  ------------------
 1354|    750|                    && OPENSSL_strncasecmp(default_group_strings[i].list_name, elem, len) == 0) {
  ------------------
  |  Branch (1354:24): [True: 722, False: 28]
  ------------------
 1355|    722|                    int saved_first;
 1356|       |
 1357|       |                    /*
 1358|       |                     * We're asked to insert an entire list of groups from a
 1359|       |                     * DEFAULT[_XYZ] 'pseudo group' which we do by
 1360|       |                     * recursively calling this function (indirectly via
 1361|       |                     * CONF_parse_list and tuple_cb); essentially, we treat a DEFAULT
 1362|       |                     * group string like a tuple which is appended to the current tuple
 1363|       |                     * rather then starting a new tuple.
 1364|       |                     */
 1365|    722|                    if (ignore_unknown || remove_group)
  ------------------
  |  Branch (1365:25): [True: 1, False: 721]
  |  Branch (1365:43): [True: 1, False: 720]
  ------------------
 1366|      2|                        return -1; /* removal or ignore not allowed here -> syntax error */
 1367|       |
 1368|       |                    /*
 1369|       |                     * First, we restore any keyshare prefix in a new zero-terminated string
 1370|       |                     * (if not already present)
 1371|       |                     */
 1372|    720|                    restored_default_group_string = OPENSSL_malloc(1 /* max prefix length */ + strlen(default_group_strings[i].group_string) + 1 /* \0 */);
  ------------------
  |  |  107|    720|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1373|    720|                    if (restored_default_group_string == NULL)
  ------------------
  |  Branch (1373:25): [True: 0, False: 720]
  ------------------
 1374|      0|                        return 0;
 1375|    720|                    if (add_keyshare
  ------------------
  |  Branch (1375:25): [True: 1, False: 719]
  ------------------
 1376|       |                        /* Remark: we tolerate a duplicated keyshare indicator here */
 1377|      1|                        && default_group_strings[i].group_string[0]
  ------------------
  |  Branch (1377:28): [True: 1, False: 0]
  ------------------
 1378|      1|                            != KEY_SHARE_INDICATOR_CHARACTER)
  ------------------
  |  | 1238|      1|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
 1379|      1|                        restored_default_group_string[restored_prefix_index++] = KEY_SHARE_INDICATOR_CHARACTER;
  ------------------
  |  | 1238|      1|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
 1380|       |
 1381|    720|                    memcpy(restored_default_group_string + restored_prefix_index,
 1382|    720|                        default_group_strings[i].group_string,
 1383|    720|                        strlen(default_group_strings[i].group_string));
 1384|    720|                    restored_default_group_string[strlen(default_group_strings[i].group_string) + restored_prefix_index] = '\0';
 1385|       |                    /*
 1386|       |                     * Append first tuple of result to current tuple, and don't
 1387|       |                     * terminate the last tuple until we return to a top-level
 1388|       |                     * tuple_cb.
 1389|       |                     */
 1390|    720|                    saved_first = garg->first;
 1391|    720|                    garg->inner = garg->first = 1;
 1392|    720|                    retval = CONF_parse_list(restored_default_group_string,
 1393|    720|                        TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, garg);
  ------------------
  |  | 1226|    720|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1394|    720|                    garg->inner = 0;
 1395|    720|                    garg->first = saved_first;
 1396|       |                    /* We don't need the \0-terminated string anymore */
 1397|    720|                    OPENSSL_free(restored_default_group_string);
  ------------------
  |  |  132|    720|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1398|       |
 1399|    720|                    return retval;
 1400|    720|                }
 1401|    850|            }
 1402|       |            /*
 1403|       |             * If we reached this point, a group name started with a 'd' or 'D', but no request
 1404|       |             * for a DEFAULT[_XYZ] 'pseudo group' was detected, hence processing of the group
 1405|       |             * name can continue as usual (= the while loop checking prefixes can end)
 1406|       |             */
 1407|     64|            continue_while_loop = 0;
 1408|     64|            break;
 1409|  58.0k|        }
 1410|  58.0k|    }
 1411|       |
 1412|  49.6k|    if (len == 0)
  ------------------
  |  Branch (1412:9): [True: 6, False: 49.6k]
  ------------------
 1413|      6|        return -1; /* Seems we have prefxes without a group name -> syntax error */
 1414|       |
 1415|       |    /* Memory management in case more groups are present compared to initial allocation */
 1416|  49.6k|    if (garg->gidcnt == garg->gidmax) {
  ------------------
  |  Branch (1416:9): [True: 0, False: 49.6k]
  ------------------
 1417|      0|        uint16_t *tmp = OPENSSL_realloc_array(garg->gid_arr,
  ------------------
  |  |  125|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1418|      0|            garg->gidmax + GROUPLIST_INCREMENT,
 1419|      0|            sizeof(*garg->gid_arr));
 1420|       |
 1421|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1421:13): [True: 0, False: 0]
  ------------------
 1422|      0|            return 0;
 1423|       |
 1424|      0|        garg->gidmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1425|      0|        garg->gid_arr = tmp;
 1426|      0|    }
 1427|       |    /* Memory management for key share groups */
 1428|  49.6k|    if (garg->ksidcnt == garg->ksidmax) {
  ------------------
  |  Branch (1428:9): [True: 0, False: 49.6k]
  ------------------
 1429|      0|        uint16_t *tmp = OPENSSL_realloc_array(garg->ksid_arr,
  ------------------
  |  |  125|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1430|      0|            garg->ksidmax + GROUPLIST_INCREMENT,
 1431|      0|            sizeof(*garg->ksid_arr));
 1432|       |
 1433|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1433:13): [True: 0, False: 0]
  ------------------
 1434|      0|            return 0;
 1435|      0|        garg->ksidmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1436|      0|        garg->ksid_arr = tmp;
 1437|      0|    }
 1438|       |
 1439|  49.6k|    if (len > (int)(sizeof(etmp) - 1))
  ------------------
  |  Branch (1439:9): [True: 8, False: 49.6k]
  ------------------
 1440|      8|        return -1; /* group name to long  -> syntax error */
 1441|       |
 1442|       |    /*
 1443|       |     * Prepare addition or removal of a single group by converting
 1444|       |     * a group name into its groupID equivalent
 1445|       |     */
 1446|       |
 1447|       |    /* Create a \0-terminated string and get the gid for this group if possible */
 1448|  49.6k|    memcpy(etmp, elem, len);
 1449|  49.6k|    etmp[len] = 0;
 1450|       |
 1451|       |    /* Get the groupID */
 1452|  49.6k|    gid = tls1_group_name2id(garg->ctx, etmp);
 1453|       |    /*
 1454|       |     * Handle the case where no valid groupID was returned
 1455|       |     * e.g. for an unknown group, which we'd ignore (only) if relevant prefix was set
 1456|       |     */
 1457|  49.6k|    if (gid == 0) {
  ------------------
  |  Branch (1457:9): [True: 2.25k, False: 47.4k]
  ------------------
 1458|       |        /* Is it one of the GOST groups ? */
 1459|  18.0k|        for (i = 0; i < OSSL_NELEM(name2id_arr); i++) {
  ------------------
  |  |   14|  18.0k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1459:21): [True: 15.7k, False: 2.25k]
  ------------------
 1460|  15.7k|            if (OPENSSL_strcasecmp(etmp, name2id_arr[i].group_name) == 0) {
  ------------------
  |  Branch (1460:17): [True: 0, False: 15.7k]
  ------------------
 1461|      0|                gid = name2id_arr[i].groupID;
 1462|      0|                break;
 1463|      0|            }
 1464|  15.7k|        }
 1465|  2.25k|        if (gid == 0) { /* still not found */
  ------------------
  |  Branch (1465:13): [True: 2.25k, False: 0]
  ------------------
 1466|       |            /* If unknown, next known tuple element gets a keyshare */
 1467|  2.25k|            if (add_keyshare && !remove_group && garg->want_keyshare == 0)
  ------------------
  |  Branch (1467:17): [True: 978, False: 1.27k]
  |  Branch (1467:33): [True: 966, False: 12]
  |  Branch (1467:50): [True: 815, False: 151]
  ------------------
 1468|    815|                garg->want_keyshare = 1;
 1469|       |            /* Unknown group - ignore if ignore_unknown; trigger error otherwise */
 1470|  2.25k|            retval = ignore_unknown;
 1471|  2.25k|            goto done;
 1472|  2.25k|        }
 1473|  2.25k|    }
 1474|       |
 1475|       |    /* Make sure that at least one provider is supporting this groupID */
 1476|  47.4k|    found_group = 0;
 1477|   501k|    for (j = 0; j < garg->ctx->group_list_len; j++)
  ------------------
  |  Branch (1477:17): [True: 501k, False: 0]
  ------------------
 1478|   501k|        if (garg->ctx->group_list[j].group_id == gid) {
  ------------------
  |  Branch (1478:13): [True: 47.4k, False: 453k]
  ------------------
 1479|  47.4k|            found_group = 1;
 1480|  47.4k|            break;
 1481|  47.4k|        }
 1482|       |
 1483|       |    /*
 1484|       |     * No provider supports this group - ignore if
 1485|       |     * ignore_unknown; trigger error otherwise
 1486|       |     */
 1487|  47.4k|    if (found_group == 0) {
  ------------------
  |  Branch (1487:9): [True: 0, False: 47.4k]
  ------------------
 1488|       |        /* If unknown, next known tuple element gets a keyshare */
 1489|      0|        if (add_keyshare && !remove_group && garg->want_keyshare == 0)
  ------------------
  |  Branch (1489:13): [True: 0, False: 0]
  |  Branch (1489:29): [True: 0, False: 0]
  |  Branch (1489:46): [True: 0, False: 0]
  ------------------
 1490|      0|            garg->want_keyshare = 1;
 1491|      0|        retval = ignore_unknown;
 1492|      0|        goto done;
 1493|      0|    }
 1494|       |    /* Remove group (and keyshare) from anywhere in the list if present, ignore if not present */
 1495|  47.4k|    if (remove_group) {
  ------------------
  |  Branch (1495:9): [True: 866, False: 46.5k]
  ------------------
 1496|    866|        size_t n = 0; /* tuple size */
 1497|    866|        size_t tpl_start_idx = 0; /* Index of 1st group in tuple of removed group */
 1498|    866|        size_t ks_check_idx = 0; /* Index after last known retained keyshare */
 1499|       |
 1500|    866|        j = 0; /* tuple index */
 1501|    866|        k = 0; /* keyshare index */
 1502|    866|        n = garg->tuplcnt_arr[j];
 1503|       |
 1504|  4.96k|        for (i = 0; i < garg->gidcnt; ++i) {
  ------------------
  |  Branch (1504:21): [True: 4.82k, False: 140]
  ------------------
 1505|  4.82k|            if (garg->gid_arr[i] == gid)
  ------------------
  |  Branch (1505:17): [True: 726, False: 4.09k]
  ------------------
 1506|    726|                break;
 1507|       |            /* Skip keyshare slots associated with groups prior to that removed */
 1508|  4.09k|            if (k < garg->ksidcnt && garg->gid_arr[i] == garg->ksid_arr[k]) {
  ------------------
  |  Branch (1508:17): [True: 3.02k, False: 1.06k]
  |  Branch (1508:38): [True: 832, False: 2.19k]
  ------------------
 1509|    832|                ++k;
 1510|       |                /* Skip each retained keyshare as we go */
 1511|    832|                ks_check_idx = i + 1;
 1512|    832|            }
 1513|  4.09k|            if (--n == 0) {
  ------------------
  |  Branch (1513:17): [True: 1.54k, False: 2.55k]
  ------------------
 1514|  1.54k|                if (j < garg->tplcnt)
  ------------------
  |  Branch (1514:21): [True: 1.45k, False: 90]
  ------------------
 1515|  1.45k|                    n = garg->tuplcnt_arr[++j];
 1516|  1.54k|                tpl_start_idx = i + 1;
 1517|  1.54k|            }
 1518|  4.09k|        }
 1519|       |
 1520|       |        /* Nothing to remove? */
 1521|    866|        if (i >= garg->gidcnt)
  ------------------
  |  Branch (1521:13): [True: 140, False: 726]
  ------------------
 1522|    140|            goto done;
 1523|       |
 1524|    726|        garg->gidcnt--;
 1525|    726|        garg->tuplcnt_arr[j]--;
 1526|    726|        memmove(garg->gid_arr + i, garg->gid_arr + i + 1,
 1527|    726|            (garg->gidcnt - i) * sizeof(gid));
 1528|       |
 1529|       |        /* Handle keyshare removal */
 1530|    726|        if (k < garg->ksidcnt && garg->ksid_arr[k] == gid) {
  ------------------
  |  Branch (1530:13): [True: 476, False: 250]
  |  Branch (1530:34): [True: 335, False: 141]
  ------------------
 1531|    335|            int drop_ks;
 1532|       |
 1533|       |            /*
 1534|       |             * Simply drop the group's keyshare unless it is the last one in a
 1535|       |             * still non-empty tuple.
 1536|       |             *
 1537|       |             * If `ks_check_idx` is larger than the tuple start index at least
 1538|       |             * one keyshare belonging to the tuple is retained, so we drop this
 1539|       |             * one.  Also if the tuple is the current one (isn't closed yet),
 1540|       |             * floating is handled at tuple close time.
 1541|       |             *
 1542|       |             * Otherwise, iterate through the tuple check whether any keyshares
 1543|       |             * remain *after* the index of the group we're removing.  The first
 1544|       |             * of these, if any, is at index `k+1` in the keyshare list, which
 1545|       |             * is the only slow we need to check.
 1546|       |             */
 1547|    335|            drop_ks = ks_check_idx > tpl_start_idx || j >= garg->tplcnt;
  ------------------
  |  Branch (1547:23): [True: 10, False: 325]
  |  Branch (1547:55): [True: 38, False: 287]
  ------------------
 1548|       |
 1549|    335|            if (!drop_ks) {
  ------------------
  |  Branch (1549:17): [True: 287, False: 48]
  ------------------
 1550|    287|                size_t end; /* End index of affected tuple */
 1551|       |
 1552|       |                /* Removing the first keyshare of an already completed tuple */
 1553|    304|                for (end = tpl_start_idx + garg->tuplcnt_arr[j]; i < end; ++i) {
  ------------------
  |  Branch (1553:66): [True: 27, False: 277]
  ------------------
 1554|       |                    /* Any other keyshares for the same tuple? */
 1555|     27|                    if (k + 1 < garg->ksidcnt
  ------------------
  |  Branch (1555:25): [True: 20, False: 7]
  ------------------
 1556|     20|                        && garg->gid_arr[i] == garg->ksid_arr[k + 1])
  ------------------
  |  Branch (1556:28): [True: 10, False: 10]
  ------------------
 1557|     10|                        break;
 1558|     27|                }
 1559|       |                /* Float keyshare to first group when no others found */
 1560|    287|                if (i >= end)
  ------------------
  |  Branch (1560:21): [True: 277, False: 10]
  ------------------
 1561|    277|                    garg->ksid_arr[k] = garg->gid_arr[tpl_start_idx];
 1562|     10|                else
 1563|     10|                    drop_ks = 1;
 1564|    287|            }
 1565|    335|            if (drop_ks) {
  ------------------
  |  Branch (1565:17): [True: 58, False: 277]
  ------------------
 1566|     58|                garg->ksidcnt--;
 1567|     58|                memmove(garg->ksid_arr + k, garg->ksid_arr + k + 1,
 1568|     58|                    (garg->ksidcnt - k) * sizeof(gid));
 1569|     58|            }
 1570|    335|        }
 1571|       |
 1572|       |        /*
 1573|       |         * Adjust closed or current tuple's group count, if a closed tuple
 1574|       |         * count reaches zero excise the resulting empty tuple.  The current
 1575|       |         * (not yet closed) tuple at the end of the list stays even if empty.
 1576|       |         */
 1577|    726|        if (garg->tuplcnt_arr[j] == 0 && j < garg->tplcnt) {
  ------------------
  |  Branch (1577:13): [True: 521, False: 205]
  |  Branch (1577:42): [True: 377, False: 144]
  ------------------
 1578|    377|            garg->tplcnt--;
 1579|    377|            memmove(garg->tuplcnt_arr + j, garg->tuplcnt_arr + j + 1,
 1580|    377|                (garg->tplcnt - j) * sizeof(size_t));
 1581|    377|        }
 1582|  46.5k|    } else { /* Processing addition of a single new group */
 1583|       |
 1584|       |        /* Check for duplicates */
 1585|   275k|        for (i = 0; i < garg->gidcnt; i++)
  ------------------
  |  Branch (1585:21): [True: 235k, False: 40.2k]
  ------------------
 1586|   235k|            if (garg->gid_arr[i] == gid) {
  ------------------
  |  Branch (1586:17): [True: 6.32k, False: 228k]
  ------------------
 1587|       |                /* Duplicate group anywhere in the list of groups - ignore */
 1588|  6.32k|                goto done;
 1589|  6.32k|            }
 1590|       |
 1591|       |        /* Add the current group to the 'flat' list of groups */
 1592|  40.2k|        garg->gid_arr[garg->gidcnt++] = gid;
 1593|       |        /* and update the book keeping for the number of groups in current tuple */
 1594|  40.2k|        garg->tuplcnt_arr[garg->tplcnt]++;
 1595|       |
 1596|       |        /* We want to add a key share for the current group */
 1597|  40.2k|        if (add_keyshare) {
  ------------------
  |  Branch (1597:13): [True: 7.30k, False: 32.9k]
  ------------------
 1598|  7.30k|            garg->ksid_arr[garg->ksidcnt++] = gid;
 1599|  7.30k|            garg->want_keyshare = -1;
 1600|  7.30k|        }
 1601|  40.2k|    }
 1602|       |
 1603|  49.6k|done:
 1604|  49.6k|    return retval;
 1605|  47.4k|}
t1_lib.c:tls1_group_name2id:
  725|  49.6k|{
  726|  49.6k|    size_t i;
  727|       |
  728|   530k|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (728:17): [True: 528k, False: 2.25k]
  ------------------
  729|   528k|        if (OPENSSL_strcasecmp(ctx->group_list[i].tlsname, name) == 0
  ------------------
  |  Branch (729:13): [True: 45.2k, False: 483k]
  ------------------
  730|   483k|            || OPENSSL_strcasecmp(ctx->group_list[i].realname, name) == 0)
  ------------------
  |  Branch (730:16): [True: 2.11k, False: 481k]
  ------------------
  731|  47.4k|            return ctx->group_list[i].group_id;
  732|   528k|    }
  733|       |
  734|  2.25k|    return 0;
  735|  49.6k|}
t1_lib.c:tls1_lookup_sigalg:
 2549|   377k|{
 2550|   377k|    const SIGALG_LOOKUP *lu = tls1_find_sigalg(ctx, sigalg);
 2551|       |
 2552|   377k|    return (lu != NULL && lu->available) ? lu : NULL;
  ------------------
  |  Branch (2552:13): [True: 377k, False: 0]
  |  Branch (2552:27): [True: 377k, False: 0]
  ------------------
 2553|   377k|}
t1_lib.c:tls_sigalg_compat:
 2813|  74.2k|{
 2814|  74.2k|    int minversion, maxversion;
 2815|  74.2k|    int minproto, maxproto;
 2816|       |
 2817|  74.2k|    if (!lu->available)
  ------------------
  |  Branch (2817:9): [True: 0, False: 74.2k]
  ------------------
 2818|      0|        return 0;
 2819|       |
 2820|  74.2k|    if (SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  266|  74.2k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  74.2k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  74.2k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 74.2k]
  |  |  ------------------
  ------------------
 2821|      0|        if (sc->ssl.method->version == DTLS_ANY_VERSION) {
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2821:13): [True: 0, False: 0]
  ------------------
 2822|      0|            minproto = sc->min_proto_version;
 2823|      0|            maxproto = sc->max_proto_version;
 2824|      0|        } else {
 2825|      0|            maxproto = minproto = sc->version;
 2826|      0|        }
 2827|      0|        minversion = lu->mindtls;
 2828|      0|        maxversion = lu->maxdtls;
 2829|  74.2k|    } else {
 2830|  74.2k|        if (sc->ssl.method->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|  74.2k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2830:13): [True: 74.2k, False: 0]
  ------------------
 2831|  74.2k|            minproto = sc->min_proto_version;
 2832|  74.2k|            maxproto = sc->max_proto_version;
 2833|  74.2k|        } else {
 2834|      0|            maxproto = minproto = sc->version;
 2835|      0|        }
 2836|  74.2k|        minversion = lu->mintls;
 2837|  74.2k|        maxversion = lu->maxtls;
 2838|  74.2k|    }
 2839|  74.2k|    if (minversion == -1 || maxversion == -1
  ------------------
  |  Branch (2839:9): [True: 0, False: 74.2k]
  |  Branch (2839:29): [True: 0, False: 74.2k]
  ------------------
 2840|  74.2k|        || (minversion != 0 && maxproto != 0
  ------------------
  |  Branch (2840:13): [True: 74.2k, False: 0]
  |  Branch (2840:32): [True: 1.41k, False: 72.8k]
  ------------------
 2841|  1.41k|            && ssl_version_cmp(sc, minversion, maxproto) > 0)
  ------------------
  |  Branch (2841:16): [True: 301, False: 1.11k]
  ------------------
 2842|  73.9k|        || (maxversion != 0 && minproto != 0
  ------------------
  |  Branch (2842:13): [True: 32.0k, False: 41.9k]
  |  Branch (2842:32): [True: 32.0k, False: 0]
  ------------------
 2843|  32.0k|            && ssl_version_cmp(sc, maxversion, minproto) < 0)
  ------------------
  |  Branch (2843:16): [True: 27, False: 31.9k]
  ------------------
 2844|  73.9k|        || !tls12_sigalg_allowed(sc, SSL_SECOP_SIGALG_SUPPORTED, lu))
  ------------------
  |  | 2761|  73.9k|#define SSL_SECOP_SIGALG_SUPPORTED (11 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2733|  73.9k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2844:12): [True: 7.64k, False: 66.2k]
  ------------------
 2845|  7.97k|        return 0;
 2846|  66.2k|    return 1;
 2847|  74.2k|}
t1_lib.c:sigalg_security_bits:
 2765|   104k|{
 2766|   104k|    const EVP_MD *md = NULL;
 2767|   104k|    int secbits = 0;
 2768|       |
 2769|   104k|    if (!tls1_lookup_md(ctx, lu, &md))
  ------------------
  |  Branch (2769:9): [True: 0, False: 104k]
  ------------------
 2770|      0|        return 0;
 2771|   104k|    if (md != NULL) {
  ------------------
  |  Branch (2771:9): [True: 90.2k, False: 14.6k]
  ------------------
 2772|  90.2k|        int md_type = EVP_MD_get_type(md);
 2773|       |
 2774|       |        /* Security bits: half digest bits */
 2775|  90.2k|        secbits = EVP_MD_get_size(md) * 4;
 2776|  90.2k|        if (secbits <= 0)
  ------------------
  |  Branch (2776:13): [True: 0, False: 90.2k]
  ------------------
 2777|      0|            return 0;
 2778|       |        /*
 2779|       |         * SHA1 and MD5 are known to be broken. Reduce security bits so that
 2780|       |         * they're no longer accepted at security level 1. The real values don't
 2781|       |         * really matter as long as they're lower than 80, which is our
 2782|       |         * security level 1.
 2783|       |         * https://eprint.iacr.org/2020/014 puts a chosen-prefix attack for
 2784|       |         * SHA1 at 2^63.4 and MD5+SHA1 at 2^67.2
 2785|       |         * https://documents.epfl.ch/users/l/le/lenstra/public/papers/lat.pdf
 2786|       |         * puts a chosen-prefix attack for MD5 at 2^39.
 2787|       |         */
 2788|  90.2k|        if (md_type == NID_sha1)
  ------------------
  |  | 2348|  90.2k|#define NID_sha1                64
  ------------------
  |  Branch (2788:13): [True: 7.53k, False: 82.7k]
  ------------------
 2789|  7.53k|            secbits = 64;
 2790|  82.7k|        else if (md_type == NID_md5_sha1)
  ------------------
  |  | 1247|  82.7k|#define NID_md5_sha1            114
  ------------------
  |  Branch (2790:18): [True: 0, False: 82.7k]
  ------------------
 2791|      0|            secbits = 67;
 2792|  82.7k|        else if (md_type == NID_md5)
  ------------------
  |  | 1242|  82.7k|#define NID_md5         4
  ------------------
  |  Branch (2792:18): [True: 0, False: 82.7k]
  ------------------
 2793|      0|            secbits = 39;
 2794|  90.2k|    } else {
 2795|       |        /* Values from https://tools.ietf.org/html/rfc8032#section-8.5 */
 2796|  14.6k|        if (lu->sigalg == TLSEXT_SIGALG_ed25519)
  ------------------
  |  |   43|  14.6k|#define TLSEXT_SIGALG_ed25519 0x0807
  ------------------
  |  Branch (2796:13): [True: 2.47k, False: 12.2k]
  ------------------
 2797|  2.47k|            secbits = 128;
 2798|  12.2k|        else if (lu->sigalg == TLSEXT_SIGALG_ed448)
  ------------------
  |  |   44|  12.2k|#define TLSEXT_SIGALG_ed448 0x0808
  ------------------
  |  Branch (2798:18): [True: 2.47k, False: 9.72k]
  ------------------
 2799|  2.47k|            secbits = 224;
 2800|  14.6k|    }
 2801|       |    /*
 2802|       |     * For provider-based sigalgs we have secbits information available
 2803|       |     * in the (provider-loaded) sigalg_list structure
 2804|       |     */
 2805|   104k|    if ((secbits == 0) && (lu->sig_idx >= SSL_PKEY_NUM)
  ------------------
  |  |  336|  9.72k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2805:9): [True: 9.72k, False: 95.2k]
  |  Branch (2805:27): [True: 9.72k, False: 0]
  ------------------
 2806|  9.72k|        && ((lu->sig_idx - SSL_PKEY_NUM) < (int)ctx->sigalg_list_len)) {
  ------------------
  |  |  336|  9.72k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2806:12): [True: 9.72k, False: 0]
  ------------------
 2807|  9.72k|        secbits = ctx->sigalg_list[lu->sig_idx - SSL_PKEY_NUM].secbits;
  ------------------
  |  |  336|  9.72k|#define SSL_PKEY_NUM 9
  ------------------
 2808|  9.72k|    }
 2809|   104k|    return secbits;
 2810|   104k|}
t1_lib.c:tls12_sigalg_allowed:
 3498|   105k|{
 3499|   105k|    unsigned char sigalgstr[2];
 3500|   105k|    int secbits;
 3501|       |
 3502|   105k|    if (lu == NULL || !lu->available)
  ------------------
  |  Branch (3502:9): [True: 0, False: 105k]
  |  Branch (3502:23): [True: 0, False: 105k]
  ------------------
 3503|      0|        return 0;
 3504|       |    /* DSA is not allowed in TLS 1.3 */
 3505|   105k|    if (SSL_CONNECTION_IS_TLS13(s) && lu->sig == EVP_PKEY_DSA)
  ------------------
  |  |  273|   210k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|   210k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   105k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|   105k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 105k, False: 0]
  |  |  ------------------
  |  |  274|   105k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   105k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   210k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 105k, False: 0]
  |  |  ------------------
  |  |  275|   210k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|   105k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|   105k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 105k]
  |  |  ------------------
  ------------------
                  if (SSL_CONNECTION_IS_TLS13(s) && lu->sig == EVP_PKEY_DSA)
  ------------------
  |  |   66|      0|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|      0|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (3505:39): [True: 0, False: 0]
  ------------------
 3506|      0|        return 0;
 3507|       |    /*
 3508|       |     * At some point we should fully axe DSA/etc. in ClientHello as per TLS 1.3
 3509|       |     * spec
 3510|       |     */
 3511|   105k|    if (!s->server && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|   210k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   105k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   105k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (3511:9): [True: 105k, False: 0]
  |  Branch (3511:23): [True: 105k, False: 0]
  ------------------
 3512|   105k|        && s->s3.tmp.min_ver >= TLS1_3_VERSION
  ------------------
  |  |   27|   210k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3512:12): [True: 147, False: 104k]
  ------------------
 3513|    147|        && (lu->sig == EVP_PKEY_DSA || lu->hash_idx == SSL_MD_SHA1_IDX
  ------------------
  |  |   66|    147|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|    294|#define NID_dsa         116
  |  |  ------------------
  ------------------
                      && (lu->sig == EVP_PKEY_DSA || lu->hash_idx == SSL_MD_SHA1_IDX
  ------------------
  |  |  194|    234|#define SSL_MD_SHA1_IDX 1
  ------------------
  |  Branch (3513:13): [True: 60, False: 87]
  |  Branch (3513:40): [True: 0, False: 87]
  ------------------
 3514|     87|            || lu->hash_idx == SSL_MD_MD5_IDX
  ------------------
  |  |  193|    234|#define SSL_MD_MD5_IDX 0
  ------------------
  |  Branch (3514:16): [True: 0, False: 87]
  ------------------
 3515|     87|            || lu->hash_idx == SSL_MD_SHA224_IDX))
  ------------------
  |  |  203|     87|#define SSL_MD_SHA224_IDX 10
  ------------------
  |  Branch (3515:16): [True: 0, False: 87]
  ------------------
 3516|     60|        return 0;
 3517|       |
 3518|       |    /* See if public key algorithm allowed */
 3519|   104k|    if (ssl_cert_is_disabled(SSL_CONNECTION_GET_CTX(s), lu->sig_idx))
  ------------------
  |  |   26|   104k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (3519:9): [True: 0, False: 104k]
  ------------------
 3520|      0|        return 0;
 3521|       |
 3522|   104k|    if (lu->sig == NID_id_GostR3410_2012_256
  ------------------
  |  | 4794|   209k|#define NID_id_GostR3410_2012_256               979
  ------------------
  |  Branch (3522:9): [True: 0, False: 104k]
  ------------------
 3523|   104k|        || lu->sig == NID_id_GostR3410_2012_512
  ------------------
  |  | 4799|   209k|#define NID_id_GostR3410_2012_512               980
  ------------------
  |  Branch (3523:12): [True: 0, False: 104k]
  ------------------
 3524|   104k|        || lu->sig == NID_id_GostR3410_2001) {
  ------------------
  |  | 4583|   104k|#define NID_id_GostR3410_2001           811
  ------------------
  |  Branch (3524:12): [True: 0, False: 104k]
  ------------------
 3525|       |        /* We never allow GOST sig algs on the server with TLSv1.3 */
 3526|      0|        if (s->server && SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3526:13): [True: 0, False: 0]
  ------------------
 3527|      0|            return 0;
 3528|      0|        if (!s->server
  ------------------
  |  Branch (3528:13): [True: 0, False: 0]
  ------------------
 3529|      0|            && SSL_CONNECTION_GET_SSL(s)->method->version == TLS_ANY_VERSION
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
                          && SSL_CONNECTION_GET_SSL(s)->method->version == TLS_ANY_VERSION
  ------------------
  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (3529:16): [True: 0, False: 0]
  ------------------
 3530|      0|            && s->s3.tmp.max_ver >= TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3530:16): [True: 0, False: 0]
  ------------------
 3531|      0|            int i, num;
 3532|      0|            STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3533|       |
 3534|       |            /*
 3535|       |             * We're a client that could negotiate TLSv1.3. We only allow GOST
 3536|       |             * sig algs if we could negotiate TLSv1.2 or below and we have GOST
 3537|       |             * ciphersuites enabled.
 3538|       |             */
 3539|       |
 3540|      0|            if (s->s3.tmp.min_ver >= TLS1_3_VERSION)
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3540:17): [True: 0, False: 0]
  ------------------
 3541|      0|                return 0;
 3542|       |
 3543|      0|            sk = SSL_get_ciphers(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 3544|      0|            num = sk != NULL ? sk_SSL_CIPHER_num(sk) : 0;
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3544:19): [True: 0, False: 0]
  ------------------
 3545|      0|            for (i = 0; i < num; i++) {
  ------------------
  |  Branch (3545:25): [True: 0, False: 0]
  ------------------
 3546|      0|                const SSL_CIPHER *c;
 3547|       |
 3548|      0|                c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3549|       |                /* Skip disabled ciphers */
 3550|      0|                if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0))
  ------------------
  |  | 2743|      0|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|      0|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (3550:21): [True: 0, False: 0]
  ------------------
 3551|      0|                    continue;
 3552|       |
 3553|      0|                if ((c->algorithm_mkey & (SSL_kGOST | SSL_kGOST18)) != 0)
  ------------------
  |  |   93|      0|#define SSL_kGOST 0x00000010U
  ------------------
                              if ((c->algorithm_mkey & (SSL_kGOST | SSL_kGOST18)) != 0)
  ------------------
  |  |  101|      0|#define SSL_kGOST18 0x00000200U
  ------------------
  |  Branch (3553:21): [True: 0, False: 0]
  ------------------
 3554|      0|                    break;
 3555|      0|            }
 3556|      0|            if (i == num)
  ------------------
  |  Branch (3556:17): [True: 0, False: 0]
  ------------------
 3557|      0|                return 0;
 3558|      0|        }
 3559|      0|    }
 3560|       |
 3561|       |    /* Finally see if security callback allows it */
 3562|   104k|    secbits = sigalg_security_bits(SSL_CONNECTION_GET_CTX(s), lu);
  ------------------
  |  |   26|   104k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3563|   104k|    sigalgstr[0] = (lu->sigalg >> 8) & 0xff;
 3564|   104k|    sigalgstr[1] = lu->sigalg & 0xff;
 3565|   104k|    return ssl_security(s, op, secbits, lu->hash, (void *)sigalgstr);
 3566|   104k|}
t1_lib.c:tls1_find_sigalg:
 2537|   377k|{
 2538|   377k|    const SIGALG_LOOKUP *lu = ctx->sigalg_lookup_cache;
 2539|       |
 2540|  6.10M|    for (size_t i = 0; i < ctx->sigalg_lookup_cache_len; lu++, i++)
  ------------------
  |  Branch (2540:24): [True: 6.10M, False: 0]
  ------------------
 2541|  6.10M|        if (lu->sigalg == sigalg)
  ------------------
  |  Branch (2541:13): [True: 377k, False: 5.72M]
  ------------------
 2542|   377k|            return lu;
 2543|      0|    return NULL;
 2544|   377k|}

tls13_alert_code:
  857|      3|{
  858|       |    /* There are 2 additional alerts in TLSv1.3 compared to TLSv1.2 */
  859|      3|    if (code == SSL_AD_MISSING_EXTENSION || code == SSL_AD_CERTIFICATE_REQUIRED)
  ------------------
  |  | 1269|      3|#define SSL_AD_MISSING_EXTENSION TLS13_AD_MISSING_EXTENSION
  |  |  ------------------
  |  |  |  |   71|      6|#define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
  |  |  ------------------
  ------------------
                  if (code == SSL_AD_MISSING_EXTENSION || code == SSL_AD_CERTIFICATE_REQUIRED)
  ------------------
  |  | 1270|      3|#define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED
  |  |  ------------------
  |  |  |  |   72|      3|#define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 0, False: 3]
  |  Branch (859:45): [True: 0, False: 3]
  ------------------
  860|      0|        return code;
  861|       |
  862|      3|    return tls1_alert_code(code);
  863|      3|}

ssl_ctx_srp_ctx_free_intern:
   34|  3.47k|{
   35|  3.47k|    if (ctx == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 3.47k]
  ------------------
   36|      0|        return 0;
   37|  3.47k|    OPENSSL_free(ctx->srp_ctx.login);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|  3.47k|    OPENSSL_free(ctx->srp_ctx.info);
  ------------------
  |  |  132|  3.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|  3.47k|    BN_free(ctx->srp_ctx.N);
   40|  3.47k|    BN_free(ctx->srp_ctx.g);
   41|  3.47k|    BN_free(ctx->srp_ctx.s);
   42|  3.47k|    BN_free(ctx->srp_ctx.B);
   43|  3.47k|    BN_free(ctx->srp_ctx.A);
   44|  3.47k|    BN_free(ctx->srp_ctx.a);
   45|  3.47k|    BN_free(ctx->srp_ctx.b);
   46|  3.47k|    BN_free(ctx->srp_ctx.v);
   47|  3.47k|    memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
   48|  3.47k|    ctx->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  3.47k|#define SRP_MINIMAL_N 1024
  ------------------
   49|  3.47k|    return 1;
   50|  3.47k|}
ssl_srp_ctx_free_intern:
   62|  2.58k|{
   63|  2.58k|    if (s == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 2.58k]
  ------------------
   64|      0|        return 0;
   65|  2.58k|    OPENSSL_free(s->srp_ctx.login);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|  2.58k|    OPENSSL_free(s->srp_ctx.info);
  ------------------
  |  |  132|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|  2.58k|    BN_free(s->srp_ctx.N);
   68|  2.58k|    BN_free(s->srp_ctx.g);
   69|  2.58k|    BN_free(s->srp_ctx.s);
   70|  2.58k|    BN_free(s->srp_ctx.B);
   71|  2.58k|    BN_free(s->srp_ctx.A);
   72|  2.58k|    BN_free(s->srp_ctx.a);
   73|  2.58k|    BN_free(s->srp_ctx.b);
   74|  2.58k|    BN_free(s->srp_ctx.v);
   75|  2.58k|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
   76|  2.58k|    s->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  2.58k|#define SRP_MINIMAL_N 1024
  ------------------
   77|  2.58k|    return 1;
   78|  2.58k|}
ssl_srp_ctx_init_intern:
   93|  2.58k|{
   94|  2.58k|    SSL_CTX *ctx;
   95|       |
   96|  2.58k|    if (s == NULL || (ctx = SSL_CONNECTION_GET_CTX(s)) == NULL)
  ------------------
  |  |   26|  2.58k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (96:9): [True: 0, False: 2.58k]
  |  Branch (96:22): [True: 0, False: 2.58k]
  ------------------
   97|      0|        return 0;
   98|       |
   99|  2.58k|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
  100|       |
  101|  2.58k|    s->srp_ctx.SRP_cb_arg = ctx->srp_ctx.SRP_cb_arg;
  102|       |    /* set client Hello login callback */
  103|  2.58k|    s->srp_ctx.TLS_ext_srp_username_callback = ctx->srp_ctx.TLS_ext_srp_username_callback;
  104|       |    /* set SRP N/g param callback for verification */
  105|  2.58k|    s->srp_ctx.SRP_verify_param_callback = ctx->srp_ctx.SRP_verify_param_callback;
  106|       |    /* set SRP client passwd callback */
  107|  2.58k|    s->srp_ctx.SRP_give_srp_client_pwd_callback = ctx->srp_ctx.SRP_give_srp_client_pwd_callback;
  108|       |
  109|  2.58k|    s->srp_ctx.strength = ctx->srp_ctx.strength;
  110|       |
  111|  2.58k|    if (((ctx->srp_ctx.N != NULL) && ((s->srp_ctx.N = BN_dup(ctx->srp_ctx.N)) == NULL)) || ((ctx->srp_ctx.g != NULL) && ((s->srp_ctx.g = BN_dup(ctx->srp_ctx.g)) == NULL)) || ((ctx->srp_ctx.s != NULL) && ((s->srp_ctx.s = BN_dup(ctx->srp_ctx.s)) == NULL)) || ((ctx->srp_ctx.B != NULL) && ((s->srp_ctx.B = BN_dup(ctx->srp_ctx.B)) == NULL)) || ((ctx->srp_ctx.A != NULL) && ((s->srp_ctx.A = BN_dup(ctx->srp_ctx.A)) == NULL)) || ((ctx->srp_ctx.a != NULL) && ((s->srp_ctx.a = BN_dup(ctx->srp_ctx.a)) == NULL)) || ((ctx->srp_ctx.v != NULL) && ((s->srp_ctx.v = BN_dup(ctx->srp_ctx.v)) == NULL)) || ((ctx->srp_ctx.b != NULL) && ((s->srp_ctx.b = BN_dup(ctx->srp_ctx.b)) == NULL))) {
  ------------------
  |  Branch (111:10): [True: 0, False: 2.58k]
  |  Branch (111:38): [True: 0, False: 0]
  |  Branch (111:93): [True: 0, False: 2.58k]
  |  Branch (111:121): [True: 0, False: 0]
  |  Branch (111:176): [True: 0, False: 2.58k]
  |  Branch (111:204): [True: 0, False: 0]
  |  Branch (111:259): [True: 0, False: 2.58k]
  |  Branch (111:287): [True: 0, False: 0]
  |  Branch (111:342): [True: 0, False: 2.58k]
  |  Branch (111:370): [True: 0, False: 0]
  |  Branch (111:425): [True: 0, False: 2.58k]
  |  Branch (111:453): [True: 0, False: 0]
  |  Branch (111:508): [True: 0, False: 2.58k]
  |  Branch (111:536): [True: 0, False: 0]
  |  Branch (111:591): [True: 0, False: 2.58k]
  |  Branch (111:619): [True: 0, False: 0]
  ------------------
  112|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|        goto err;
  114|      0|    }
  115|  2.58k|    if ((ctx->srp_ctx.login != NULL) && ((s->srp_ctx.login = OPENSSL_strdup(ctx->srp_ctx.login)) == NULL)) {
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 0, False: 2.58k]
  |  Branch (115:41): [True: 0, False: 0]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|  2.58k|    if ((ctx->srp_ctx.info != NULL) && ((s->srp_ctx.info = OPENSSL_strdup(ctx->srp_ctx.info)) == NULL)) {
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (119:9): [True: 0, False: 2.58k]
  |  Branch (119:40): [True: 0, False: 0]
  ------------------
  120|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  121|      0|        goto err;
  122|      0|    }
  123|  2.58k|    s->srp_ctx.srp_Mask = ctx->srp_ctx.srp_Mask;
  124|       |
  125|  2.58k|    return 1;
  126|      0|err:
  127|      0|    OPENSSL_free(s->srp_ctx.login);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  128|      0|    OPENSSL_free(s->srp_ctx.info);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  129|      0|    BN_free(s->srp_ctx.N);
  130|      0|    BN_free(s->srp_ctx.g);
  131|      0|    BN_free(s->srp_ctx.s);
  132|      0|    BN_free(s->srp_ctx.B);
  133|      0|    BN_free(s->srp_ctx.A);
  134|      0|    BN_free(s->srp_ctx.a);
  135|      0|    BN_free(s->srp_ctx.b);
  136|      0|    BN_free(s->srp_ctx.v);
  137|      0|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
  138|      0|    return 0;
  139|  2.58k|}
ssl_ctx_srp_ctx_init_intern:
  154|  3.35k|{
  155|  3.35k|    if (ctx == NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 3.35k]
  ------------------
  156|      0|        return 0;
  157|       |
  158|  3.35k|    memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
  159|  3.35k|    ctx->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  3.35k|#define SRP_MINIMAL_N 1024
  ------------------
  160|       |
  161|  3.35k|    return 1;
  162|  3.35k|}

LLVMFuzzerTestOneInput:
   35|  13.6k|{
   36|  13.6k|  int rc = 0;
   37|  13.6k|  int tlv_rc;
   38|  13.6k|  FUZZ_DATA fuzz;
   39|  13.6k|  TLV tlv;
   40|       |
   41|       |  /* Ignore SIGPIPE errors. We'll handle the errors ourselves. */
   42|  13.6k|  signal(SIGPIPE, SIG_IGN);
   43|       |
   44|       |  /* Have to set all fields to zero before getting to the terminate function */
   45|  13.6k|  memset(&fuzz, 0, sizeof(FUZZ_DATA));
   46|       |
   47|  13.6k|  if(size < sizeof(TLV_RAW)) {
  ------------------
  |  Branch (47:6): [True: 4, False: 13.6k]
  ------------------
   48|       |    /* Not enough data for a single TLV - don't continue */
   49|      4|    goto EXIT_LABEL;
   50|      4|  }
   51|       |
   52|       |  /* Try to initialize the fuzz data */
   53|  13.6k|  FTRY(fuzz_initialize_fuzz_data(&fuzz, data, size));
  ------------------
  |  |  480|  13.6k|        {                                                                     \
  |  |  481|  13.6k|          int _func_rc = (FUNC);                                              \
  |  |  482|  13.6k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |  483|  13.6k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  13.6k|        }
  ------------------
   54|       |
   55|  13.6k|  for(tlv_rc = fuzz_get_first_tlv(&fuzz, &tlv);
   56|  87.7k|      tlv_rc == 0;
  ------------------
  |  Branch (56:7): [True: 75.7k, False: 12.0k]
  ------------------
   57|  75.7k|      tlv_rc = fuzz_get_next_tlv(&fuzz, &tlv)) {
   58|       |
   59|       |    /* Have the TLV in hand. Parse the TLV. */
   60|  75.7k|    rc = fuzz_parse_tlv(&fuzz, &tlv);
   61|       |
   62|  75.7k|    if(rc != 0) {
  ------------------
  |  Branch (62:8): [True: 1.65k, False: 74.0k]
  ------------------
   63|       |      /* Failed to parse the TLV. Can't continue. */
   64|  1.65k|      goto EXIT_LABEL;
   65|  1.65k|    }
   66|  75.7k|  }
   67|       |
   68|  12.0k|  if(tlv_rc != TLV_RC_NO_MORE_TLVS) {
  ------------------
  |  |  267|  12.0k|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
  |  Branch (68:6): [True: 244, False: 11.7k]
  ------------------
   69|       |    /* A TLV call failed. Can't continue. */
   70|    244|    goto EXIT_LABEL;
   71|    244|  }
   72|       |
   73|       |  /* Set up the standard easy options. */
   74|  11.7k|  FTRY(fuzz_set_easy_options(&fuzz));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
   75|       |
   76|       |  /**
   77|       |   * Add in more curl options that have been accumulated over possibly
   78|       |   * multiple TLVs.
   79|       |   */
   80|  11.7k|  if(fuzz.header_list != NULL) {
  ------------------
  |  Branch (80:6): [True: 492, False: 11.2k]
  ------------------
   81|    492|    curl_easy_setopt(fuzz.easy, CURLOPT_HTTPHEADER, fuzz.header_list);
  ------------------
  |  | 3361|    492|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3359|    492|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   82|    492|  }
   83|       |
   84|  11.7k|  if(fuzz.mail_recipients_list != NULL) {
  ------------------
  |  Branch (84:6): [True: 22, False: 11.7k]
  ------------------
   85|     22|    curl_easy_setopt(fuzz.easy, CURLOPT_MAIL_RCPT, fuzz.mail_recipients_list);
  ------------------
  |  | 3361|     22|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3359|     22|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   86|     22|  }
   87|       |
   88|  11.7k|  if(fuzz.mime != NULL) {
  ------------------
  |  Branch (88:6): [True: 168, False: 11.6k]
  ------------------
   89|    168|    curl_easy_setopt(fuzz.easy, CURLOPT_MIMEPOST, fuzz.mime);
  ------------------
  |  | 3361|    168|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3359|    168|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   90|    168|  }
   91|       |
   92|  11.7k|  if (fuzz.httppost != NULL) {
  ------------------
  |  Branch (92:7): [True: 29, False: 11.7k]
  ------------------
   93|     29|    curl_easy_setopt(fuzz.easy, CURLOPT_HTTPPOST, fuzz.httppost);
  ------------------
  |  | 3361|     29|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3359|     29|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   94|     29|  }
   95|       |
   96|       |  /* Run the transfer. */
   97|  11.7k|  fuzz_handle_transfer(&fuzz);
   98|       |
   99|  13.6k|EXIT_LABEL:
  100|       |
  101|  13.6k|  fuzz_terminate_fuzz_data(&fuzz);
  102|       |
  103|       |  /* This function must always return 0. Non-zero codes are reserved. */
  104|  13.6k|  return 0;
  105|  11.7k|}
_Z6to_u32PKh:
  111|  81.7k|{
  112|  81.7k|  uint32_t u;
  113|  81.7k|  u = (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + b[3];
  114|  81.7k|  return u;
  115|  81.7k|}
_Z6to_u16PKh:
  121|  77.7k|{
  122|  77.7k|  uint16_t u;
  123|  77.7k|  u = (b[0] << 8) + b[1];
  124|  77.7k|  return u;
  125|  77.7k|}
_Z25fuzz_initialize_fuzz_dataP9fuzz_dataPKhm:
  133|  13.6k|{
  134|  13.6k|  int rc = 0;
  135|  13.6k|  int ii;
  136|       |
  137|       |  /* Initialize the fuzz data. */
  138|  13.6k|  memset(fuzz, 0, sizeof(FUZZ_DATA));
  139|       |
  140|       |  /* Create an easy handle. This will have all of the settings configured on
  141|       |     it. */
  142|  13.6k|  fuzz->easy = curl_easy_init();
  143|  13.6k|  FCHECK(fuzz->easy != NULL);
  ------------------
  |  |  490|  13.6k|        {                                                                     \
  |  |  491|  13.6k|          if (!(COND))                                                        \
  |  |  ------------------
  |  |  |  Branch (491:15): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |  492|  13.6k|          {                                                                   \
  |  |  493|      0|            rc = 255;                                                         \
  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  495|      0|          }                                                                   \
  |  |  496|  13.6k|        }
  ------------------
  144|       |
  145|       |  /* Set up the state parser */
  146|  13.6k|  fuzz->state.data = data;
  147|  13.6k|  fuzz->state.data_len = data_len;
  148|       |
  149|       |  /* Set up the state of the server sockets. */
  150|  41.0k|  for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  41.0k|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (150:15): [True: 27.3k, False: 13.6k]
  ------------------
  151|  27.3k|    fuzz->sockman[ii].index = ii;
  152|  27.3k|    fuzz->sockman[ii].fd_state = FUZZ_SOCK_CLOSED;
  153|  27.3k|  }
  154|       |
  155|       |  /* Check for verbose mode. */
  156|  13.6k|  fuzz->verbose = (getenv("FUZZ_VERBOSE") != NULL);
  157|       |
  158|  13.6k|  FCHECK(setenv("CURL_HSTS_HTTP", "1", 0) == 0);
  ------------------
  |  |  490|  13.6k|        {                                                                     \
  |  |  491|  13.6k|          if (!(COND))                                                        \
  |  |  ------------------
  |  |  |  Branch (491:15): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |  492|  13.6k|          {                                                                   \
  |  |  493|      0|            rc = 255;                                                         \
  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  495|      0|          }                                                                   \
  |  |  496|  13.6k|        }
  ------------------
  159|  13.6k|  FCHECK(setenv("CURL_ALTSVC_HTTP", "1", 0) == 0);
  ------------------
  |  |  490|  13.6k|        {                                                                     \
  |  |  491|  13.6k|          if (!(COND))                                                        \
  |  |  ------------------
  |  |  |  Branch (491:15): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |  492|  13.6k|          {                                                                   \
  |  |  493|      0|            rc = 255;                                                         \
  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  495|      0|          }                                                                   \
  |  |  496|  13.6k|        }
  ------------------
  160|       |
  161|  13.6k|EXIT_LABEL:
  162|       |
  163|  13.6k|  return rc;
  164|  13.6k|}
_Z21fuzz_set_easy_optionsP9fuzz_data:
  170|  11.7k|{
  171|  11.7k|  int rc = 0;
  172|       |
  173|       |  /* Set some standard options on the CURL easy handle. We need to override the
  174|       |     socket function so that we create our own sockets to present to CURL. */
  175|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy,
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  176|  11.7k|                        CURLOPT_OPENSOCKETFUNCTION,
  177|  11.7k|                        fuzz_open_socket));
  178|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_OPENSOCKETDATA, fuzz));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  179|       |
  180|       |  /* In case something tries to set a socket option, intercept this. */
  181|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy,
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  182|  11.7k|                        CURLOPT_SOCKOPTFUNCTION,
  183|  11.7k|                        fuzz_sockopt_callback));
  184|       |
  185|       |  /* Set the standard read function callback. */
  186|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy,
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  187|  11.7k|                        CURLOPT_READFUNCTION,
  188|  11.7k|                        fuzz_read_callback));
  189|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_READDATA, fuzz));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  190|       |
  191|       |  /* Set the standard write function callback. */
  192|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy,
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  193|  11.7k|                        CURLOPT_WRITEFUNCTION,
  194|  11.7k|                        fuzz_write_callback));
  195|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_WRITEDATA, fuzz));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  196|       |
  197|       |  /* Set the writable cookie jar path so cookies are tested. */
  198|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_COOKIEJAR, FUZZ_COOKIE_JAR_PATH));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  199|       |
  200|       |  /* Set the RO cookie file path so cookies are tested. */
  201|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_COOKIEFILE, FUZZ_RO_COOKIE_FILE_PATH));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  202|       |
  203|       |  /* Set altsvc header cache filepath so that it can be fuzzed. */
  204|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_ALTSVC, FUZZ_ALT_SVC_HEADER_CACHE_PATH));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  205|       |
  206|       |  /* Set the hsts header cache filepath so that it can be fuzzed. */
  207|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_HSTS, FUZZ_HSTS_HEADER_CACHE_PATH));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  208|       |
  209|       |  /* Set the Certificate Revocation List file path so it can be fuzzed */
  210|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_CRLFILE, FUZZ_CRL_FILE_PATH));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  211|       |
  212|       |  /* Set the .netrc file path so it can be fuzzed */
  213|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_NETRC_FILE, FUZZ_NETRC_FILE_PATH));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  214|       |
  215|       |  /* Time out requests quickly. */
  216|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_TIMEOUT_MS, 200L));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  217|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_SERVER_RESPONSE_TIMEOUT, 1L));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  218|       |
  219|       |  /* Can enable verbose mode by having the environment variable FUZZ_VERBOSE. */
  220|  11.7k|  if(fuzz->verbose) {
  ------------------
  |  Branch (220:6): [True: 0, False: 11.7k]
  ------------------
  221|      0|    FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_VERBOSE, 1L));
  ------------------
  |  |  480|      0|        {                                                                     \
  |  |  481|      0|          int _func_rc = (FUNC);                                              \
  |  |  482|      0|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  483|      0|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|      0|        }
  ------------------
  222|      0|  }
  223|       |
  224|       |  /* Force resolution of all addresses to a specific IP address. */
  225|  11.7k|  fuzz->connect_to_list = curl_slist_append(NULL, "::127.0.1.127:");
  226|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_CONNECT_TO, fuzz->connect_to_list));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  227|       |
  228|       |  /* Limit the protocols in use by this fuzzer. */
  229|  11.7k|  FTRY(fuzz_set_allowed_protocols(fuzz));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  230|       |
  231|  11.7k|EXIT_LABEL:
  232|       |
  233|  11.7k|  return rc;
  234|  11.7k|}
_Z24fuzz_terminate_fuzz_dataP9fuzz_data:
  240|  13.6k|{
  241|  13.6k|  int ii;
  242|       |
  243|  13.6k|  fuzz_free((void **)&fuzz->postfields);
  244|       |
  245|  41.0k|  for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  41.0k|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (245:15): [True: 27.3k, False: 13.6k]
  ------------------
  246|  27.3k|    if(fuzz->sockman[ii].fd_state != FUZZ_SOCK_CLOSED) {
  ------------------
  |  Branch (246:8): [True: 5.52k, False: 21.8k]
  ------------------
  247|  5.52k|      close(fuzz->sockman[ii].fd);
  248|  5.52k|      fuzz->sockman[ii].fd_state = FUZZ_SOCK_CLOSED;
  249|  5.52k|    }
  250|  27.3k|  }
  251|       |
  252|  13.6k|  if(fuzz->connect_to_list != NULL) {
  ------------------
  |  Branch (252:6): [True: 11.7k, False: 1.90k]
  ------------------
  253|  11.7k|    curl_slist_free_all(fuzz->connect_to_list);
  254|  11.7k|    fuzz->connect_to_list = NULL;
  255|  11.7k|  }
  256|       |
  257|  13.6k|  if(fuzz->header_list != NULL) {
  ------------------
  |  Branch (257:6): [True: 503, False: 13.1k]
  ------------------
  258|    503|    curl_slist_free_all(fuzz->header_list);
  259|    503|    fuzz->header_list = NULL;
  260|    503|  }
  261|       |
  262|  13.6k|  if(fuzz->mail_recipients_list != NULL) {
  ------------------
  |  Branch (262:6): [True: 28, False: 13.6k]
  ------------------
  263|     28|    curl_slist_free_all(fuzz->mail_recipients_list);
  264|     28|    fuzz->mail_recipients_list = NULL;
  265|     28|  }
  266|       |
  267|  13.6k|  if(fuzz->mime != NULL) {
  ------------------
  |  Branch (267:6): [True: 185, False: 13.5k]
  ------------------
  268|    185|    curl_mime_free(fuzz->mime);
  269|    185|    fuzz->mime = NULL;
  270|    185|  }
  271|       |
  272|  13.6k|  if(fuzz->easy != NULL) {
  ------------------
  |  Branch (272:6): [True: 13.6k, False: 4]
  ------------------
  273|  13.6k|    curl_easy_cleanup(fuzz->easy);
  274|  13.6k|    fuzz->easy = NULL;
  275|  13.6k|  }
  276|       |
  277|       |  /* When you have passed the struct curl_httppost pointer to curl_easy_setopt
  278|       |   * (using the CURLOPT_HTTPPOST option), you must not free the list until after
  279|       |   *  you have called curl_easy_cleanup for the curl handle.
  280|       |   *  https://curl.se/libcurl/c/curl_formadd.html */
  281|  13.6k|  if (fuzz->httppost != NULL) {
  ------------------
  |  Branch (281:7): [True: 40, False: 13.6k]
  ------------------
  282|     40|    curl_formfree(fuzz->httppost);
  283|     40|    fuzz->httppost = NULL;
  284|     40|  }
  285|       |
  286|       |  // free after httppost and last_post_part.
  287|  13.6k|  if (fuzz->post_body != NULL) {
  ------------------
  |  Branch (287:7): [True: 40, False: 13.6k]
  ------------------
  288|     40|    fuzz_free((void **)&fuzz->post_body);
  289|     40|  }
  290|  13.6k|}
_Z9fuzz_freePPv:
  296|  89.7k|{
  297|  89.7k|  if(*ptr != NULL) {
  ------------------
  |  Branch (297:6): [True: 64.8k, False: 24.9k]
  ------------------
  298|  64.8k|    free(*ptr);
  299|       |    *ptr = NULL;
  300|  64.8k|  }
  301|  89.7k|}
_Z20fuzz_handle_transferP9fuzz_data:
  308|  11.7k|{
  309|  11.7k|  int rc = 0;
  310|  11.7k|  CURLM *multi_handle;
  311|  11.7k|  int still_running; /* keep number of running handles */
  312|  11.7k|  CURLMsg *msg; /* for picking up messages with the transfer status */
  313|  11.7k|  int msgs_left; /* how many messages are left */
  314|  11.7k|  int double_timeout = 0;
  315|  11.7k|  fd_set fdread;
  316|  11.7k|  fd_set fdwrite;
  317|  11.7k|  fd_set fdexcep;
  318|  11.7k|  struct timeval timeout;
  319|  11.7k|  int select_rc;
  320|  11.7k|  CURLMcode mc;
  321|  11.7k|  int maxfd = -1;
  322|  11.7k|  long curl_timeo = -1;
  323|  11.7k|  int ii;
  324|  11.7k|  FUZZ_SOCKET_MANAGER *sman[FUZZ_NUM_CONNECTIONS];
  325|       |
  326|  35.3k|  for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  35.3k|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (326:15): [True: 23.5k, False: 11.7k]
  ------------------
  327|  23.5k|    sman[ii] = &fuzz->sockman[ii];
  328|       |
  329|       |    /* Set up the starting index for responses. */
  330|  23.5k|    sman[ii]->response_index = 1;
  331|  23.5k|  }
  332|       |
  333|       |  /* init a multi stack */
  334|  11.7k|  multi_handle = curl_multi_init();
  335|       |
  336|       |  /* add the individual transfers */
  337|  11.7k|  curl_multi_add_handle(multi_handle, fuzz->easy);
  338|       |
  339|       |  /* Do an initial process. This might end the transfer immediately. */
  340|  11.7k|  curl_multi_perform(multi_handle, &still_running);
  341|  11.7k|  FV_PRINTF(fuzz,
  ------------------
  |  |  530|  11.7k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  342|  11.7k|            "FUZZ: Initial perform; still running? %d \n",
  343|  11.7k|            still_running);
  344|       |
  345|  13.1k|  while(still_running) {
  ------------------
  |  Branch (345:9): [True: 1.76k, False: 11.4k]
  ------------------
  346|       |    /* Reset the sets of file descriptors. */
  347|  1.76k|    FD_ZERO(&fdread);
  ------------------
  |  Branch (347:5): [True: 28.2k, False: 1.76k]
  |  Branch (347:5): [Folded, False: 1.76k]
  ------------------
  348|  1.76k|    FD_ZERO(&fdwrite);
  ------------------
  |  Branch (348:5): [True: 28.2k, False: 1.76k]
  |  Branch (348:5): [Folded, False: 1.76k]
  ------------------
  349|  1.76k|    FD_ZERO(&fdexcep);
  ------------------
  |  Branch (349:5): [True: 28.2k, False: 1.76k]
  |  Branch (349:5): [Folded, False: 1.76k]
  ------------------
  350|       |
  351|       |    /* Set a timeout of 10ms. This is lower than recommended by the multi guide
  352|       |       but we're not going to any remote servers, so everything should complete
  353|       |       very quickly. */
  354|  1.76k|    timeout.tv_sec = 0;
  355|  1.76k|    timeout.tv_usec = 10000;
  356|       |
  357|       |    /* get file descriptors from the transfers */
  358|  1.76k|    mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
  359|  1.76k|    if(mc != CURLM_OK) {
  ------------------
  |  Branch (359:8): [True: 0, False: 1.76k]
  ------------------
  360|      0|      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
  361|      0|      rc = -1;
  362|      0|      break;
  363|      0|    }
  364|       |
  365|  5.29k|    for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  5.29k|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (365:17): [True: 3.53k, False: 1.76k]
  ------------------
  366|       |      /* Add the socket FD into the readable set if connected. */
  367|  3.53k|      if(sman[ii]->fd_state == FUZZ_SOCK_OPEN) {
  ------------------
  |  Branch (367:10): [True: 853, False: 2.67k]
  ------------------
  368|    853|        FD_SET(sman[ii]->fd, &fdread);
  369|       |
  370|       |        /* Work out the maximum FD between the cURL file descriptors and the
  371|       |           server FD. */
  372|    853|        maxfd = FUZZ_MAX(sman[ii]->fd, maxfd);
  ------------------
  |  |  534|    853|#define FUZZ_MAX(A, B) ((A) > (B) ? (A) : (B))
  |  |  ------------------
  |  |  |  Branch (534:25): [True: 0, False: 853]
  |  |  ------------------
  ------------------
  373|    853|      }
  374|  3.53k|    }
  375|       |
  376|       |    /* Work out what file descriptors need work. */
  377|  1.76k|    rc = fuzz_select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
  378|       |
  379|  1.76k|    if(rc == -1) {
  ------------------
  |  Branch (379:8): [True: 0, False: 1.76k]
  ------------------
  380|       |      /* Had an issue while selecting a file descriptor. Let's just exit. */
  381|      0|      FV_PRINTF(fuzz, "FUZZ: select failed, exiting \n");
  ------------------
  |  |  530|      0|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  382|      0|      break;
  383|      0|    }
  384|       |
  385|       |    /* Check to see if a server file descriptor is readable. If it is,
  386|       |       then send the next response from the fuzzing data. */
  387|  1.76k|    int server_data_sent = 0;
  388|  5.29k|    for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  5.29k|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (388:17): [True: 3.53k, False: 1.76k]
  ------------------
  389|  3.53k|      if(sman[ii]->fd_state == FUZZ_SOCK_OPEN &&
  ------------------
  |  Branch (389:10): [True: 853, False: 2.67k]
  ------------------
  390|  3.53k|         FD_ISSET(sman[ii]->fd, &fdread)) {
  ------------------
  |  Branch (390:10): [True: 767, False: 86]
  ------------------
  391|    767|        rc = fuzz_send_next_response(fuzz, sman[ii]);
  392|    767|        if(rc != 0) {
  ------------------
  |  Branch (392:12): [True: 0, False: 767]
  ------------------
  393|       |          /* Failed to send a response. Break out here. */
  394|      0|          break;
  395|      0|        }
  396|    767|        server_data_sent = 1;
  397|    767|      }
  398|  3.53k|    }
  399|       |
  400|       |    /* Stall detection: exit after two consecutive iterations where no new
  401|       |       data was provided to curl. This handles both select() timeouts and
  402|       |       cases where curl registers a writable fd but cannot make progress
  403|       |       (e.g. HTTP/2 egress stuck with no real peer to drain to). */
  404|  1.76k|    if(!server_data_sent) {
  ------------------
  |  Branch (404:8): [True: 999, False: 767]
  ------------------
  405|    999|      FV_PRINTF(fuzz, "FUZZ: No data sent; stall count %d \n", double_timeout);
  ------------------
  |  |  530|    999|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 999]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  406|    999|      if(double_timeout == 1) {
  ------------------
  |  Branch (406:10): [True: 361, False: 638]
  ------------------
  407|    361|        break;
  408|    361|      }
  409|    638|      double_timeout = 1;
  410|    638|    }
  411|    767|    else {
  412|    767|      double_timeout = 0;
  413|    767|    }
  414|       |
  415|  1.40k|    curl_multi_perform(multi_handle, &still_running);
  416|  1.40k|  }
  417|       |
  418|       |  /* Remove the easy handle from the multi stack. */
  419|  11.7k|  curl_multi_remove_handle(multi_handle, fuzz->easy);
  420|       |
  421|       |  /* Clean up the multi handle - the top level function will handle the easy
  422|       |     handle. */
  423|  11.7k|  curl_multi_cleanup(multi_handle);
  424|       |
  425|  11.7k|  return rc;
  426|  11.7k|}
_Z23fuzz_send_next_responseP9fuzz_dataP19fuzz_socket_manager:
  432|    767|{
  433|    767|  int rc = 0;
  434|    767|  ssize_t ret_in;
  435|    767|  ssize_t ret_out;
  436|    767|  char buffer[8192];
  437|    767|  const uint8_t *data;
  438|    767|  size_t data_len;
  439|       |
  440|       |  /* Need to read all data sent by the client so the file descriptor becomes
  441|       |     unreadable. Because the file descriptor is non-blocking we won't just
  442|       |     hang here. */
  443|  1.54k|  do {
  444|  1.54k|    ret_in = read(sman->fd, buffer, sizeof(buffer));
  445|  1.54k|    if(fuzz->verbose && ret_in > 0) {
  ------------------
  |  Branch (445:8): [True: 0, False: 1.54k]
  |  Branch (445:25): [True: 0, False: 0]
  ------------------
  446|      0|      printf("FUZZ[%d]: Received %zu bytes \n==>\n", sman->index, ret_in);
  447|      0|      fwrite(buffer, ret_in, 1, stdout);
  448|      0|      printf("\n<==\n");
  449|      0|    }
  450|  1.54k|  } while (ret_in > 0);
  ------------------
  |  Branch (450:12): [True: 780, False: 767]
  ------------------
  451|       |
  452|       |  /* Now send a response to the request that the client just made. */
  453|    767|  FV_PRINTF(fuzz,
  ------------------
  |  |  530|    767|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 767]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  454|    767|            "FUZZ[%d]: Sending next response: %d \n",
  455|    767|            sman->index,
  456|    767|            sman->response_index);
  457|    767|  data = sman->responses[sman->response_index].data;
  458|    767|  data_len = sman->responses[sman->response_index].data_len;
  459|       |
  460|    767|  if(data != NULL) {
  ------------------
  |  Branch (460:6): [True: 767, False: 0]
  ------------------
  461|    767|    if(write(sman->fd, data, data_len) != (ssize_t)data_len) {
  ------------------
  |  Branch (461:8): [True: 0, False: 767]
  ------------------
  462|       |      /* Failed to write the data back to the client. Prevent any further
  463|       |         testing. */
  464|      0|      rc = -1;
  465|      0|    }
  466|    767|  }
  467|       |
  468|       |  /* Work out if there are any more responses. If not, then shut down the
  469|       |     server. */
  470|    767|  sman->response_index++;
  471|       |
  472|    767|  if(sman->response_index >= TLV_MAX_NUM_RESPONSES ||
  ------------------
  |  |  298|  1.53k|#define TLV_MAX_NUM_RESPONSES           11
  ------------------
  |  Branch (472:6): [True: 0, False: 767]
  ------------------
  473|    767|     sman->responses[sman->response_index].data == NULL) {
  ------------------
  |  Branch (473:6): [True: 740, False: 27]
  ------------------
  474|    740|    FV_PRINTF(fuzz,
  ------------------
  |  |  530|    740|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 740]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  475|    740|              "FUZZ[%d]: Shutting down server socket: %d \n",
  476|    740|              sman->index,
  477|    740|              sman->fd);
  478|    740|    shutdown(sman->fd, SHUT_WR);
  479|    740|    sman->fd_state = FUZZ_SOCK_SHUTDOWN;
  480|    740|  }
  481|       |
  482|    767|  return rc;
  483|    767|}
_Z11fuzz_selectiP6fd_setS0_S0_P7timeval:
  492|  1.76k|                struct timeval *timeout) {
  493|  1.76k|  return select(nfds, readfds, writefds, exceptfds, timeout);
  494|  1.76k|}
_Z26fuzz_set_allowed_protocolsP9fuzz_data:
  502|  11.7k|{
  503|  11.7k|  int rc = 0;
  504|  11.7k|  const char *allowed_protocols = "";
  505|       |
  506|       |#ifdef FUZZ_PROTOCOLS_ALL
  507|       |  /* Do not allow telnet currently as it accepts input from stdin. */
  508|       |  allowed_protocols =
  509|       |    "dict,file,ftp,ftps,gopher,gophers,http,https,imap,imaps,"
  510|       |    "mqtt,pop3,pop3s,"
  511|       |    "ldap,ldaps,"
  512|       |    "rtmp,rtmpe,rtmps,rtmpt,rtmpte,rtmpts,"
  513|       |    "scp,"
  514|       |    "sftp,"
  515|       |    "rtsp,smb,smbs,smtp,smtps,tftp,"
  516|       |    "ws,wss";
  517|       |#endif
  518|       |#ifdef FUZZ_PROTOCOLS_DICT
  519|       |  allowed_protocols = "dict";
  520|       |#endif
  521|       |#ifdef FUZZ_PROTOCOLS_FILE
  522|       |  allowed_protocols = "file";
  523|       |#endif
  524|       |#ifdef FUZZ_PROTOCOLS_FTP
  525|       |  allowed_protocols = "ftp,ftps";
  526|       |#endif
  527|       |#ifdef FUZZ_PROTOCOLS_GOPHER
  528|       |  allowed_protocols = "gopher,gophers";
  529|       |#endif
  530|       |#ifdef FUZZ_PROTOCOLS_HTTP
  531|       |  allowed_protocols = "http";
  532|       |#endif
  533|  11.7k|#ifdef FUZZ_PROTOCOLS_HTTPS
  534|  11.7k|  allowed_protocols = "https";
  535|  11.7k|#endif
  536|       |#ifdef FUZZ_PROTOCOLS_IMAP
  537|       |  allowed_protocols = "imap,imaps";
  538|       |#endif
  539|       |#ifdef FUZZ_PROTOCOLS_LDAP
  540|       |  allowed_protocols = "ldap,ldaps";
  541|       |#endif
  542|       |#ifdef FUZZ_PROTOCOLS_MQTT
  543|       |  allowed_protocols = "mqtt";
  544|       |#endif
  545|       |#ifdef FUZZ_PROTOCOLS_POP3
  546|       |  allowed_protocols = "pop3,pop3s";
  547|       |#endif
  548|       |#ifdef FUZZ_PROTOCOLS_RTMP
  549|       |  allowed_protocols = "rtmp,rtmpe,rtmps,rtmpt,rtmpte,rtmpts";
  550|       |#endif
  551|       |#ifdef FUZZ_PROTOCOLS_RTSP
  552|       |  allowed_protocols = "rtsp";
  553|       |#endif
  554|       |#ifdef FUZZ_PROTOCOLS_SCP
  555|       |  allowed_protocols = "scp";
  556|       |#endif
  557|       |#ifdef FUZZ_PROTOCOLS_SFTP
  558|       |  allowed_protocols = "sftp";
  559|       |#endif
  560|       |#ifdef FUZZ_PROTOCOLS_SMB
  561|       |  allowed_protocols = "smb,smbs";
  562|       |#endif
  563|       |#ifdef FUZZ_PROTOCOLS_SMTP
  564|       |  allowed_protocols = "smtp,smtps";
  565|       |#endif
  566|       |#ifdef FUZZ_PROTOCOLS_TFTP
  567|       |  allowed_protocols = "tftp";
  568|       |#endif
  569|       |#ifdef FUZZ_PROTOCOLS_WS
  570|       |  // http is required by websockets
  571|       |  allowed_protocols = "http,ws,wss";
  572|       |  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_CONNECT_ONLY, 2L));
  573|       |#endif
  574|       |
  575|  11.7k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_PROTOCOLS_STR, allowed_protocols));
  ------------------
  |  |  480|  11.7k|        {                                                                     \
  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  483|  11.7k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  11.7k|        }
  ------------------
  576|       |
  577|  11.7k|EXIT_LABEL:
  578|       |
  579|  11.7k|  return rc;
  580|  11.7k|}

_Z16fuzz_open_socketPv12curlsocktypeP13curl_sockaddr:
   42|  5.52k|{
   43|  5.52k|  FUZZ_DATA *fuzz = (FUZZ_DATA *)ptr;
   44|  5.52k|  int fds[2];
   45|  5.52k|  int flags;
   46|  5.52k|  int status;
   47|  5.52k|  const uint8_t *data;
   48|  5.52k|  size_t data_len;
   49|  5.52k|  struct sockaddr_un client_addr;
   50|  5.52k|  FUZZ_SOCKET_MANAGER *sman;
   51|       |
   52|       |  /* Handle unused parameters */
   53|  5.52k|  (void)purpose;
   54|  5.52k|  (void)address;
   55|       |
   56|  5.52k|  if(fuzz->sockman[0].fd_state != FUZZ_SOCK_CLOSED &&
  ------------------
  |  Branch (56:6): [True: 86, False: 5.43k]
  ------------------
   57|     86|     fuzz->sockman[1].fd_state != FUZZ_SOCK_CLOSED) {
  ------------------
  |  Branch (57:6): [True: 0, False: 86]
  ------------------
   58|       |    /* Both sockets have already been opened. */
   59|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   60|      0|  }
   61|  5.52k|  else if(fuzz->sockman[0].fd_state != FUZZ_SOCK_CLOSED) {
  ------------------
  |  Branch (61:11): [True: 86, False: 5.43k]
  ------------------
   62|     86|    sman = &fuzz->sockman[1];
   63|     86|  }
   64|  5.43k|  else {
   65|  5.43k|    FV_PRINTF(fuzz, "FUZZ: Using socket manager 0 \n");
  ------------------
  |  |  530|  5.43k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 5.43k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   66|  5.43k|    sman = &fuzz->sockman[0];
   67|  5.43k|  }
   68|  5.52k|  FV_PRINTF(fuzz, "FUZZ[%d]: Using socket manager %d \n",
  ------------------
  |  |  530|  5.52k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 5.52k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   69|  5.52k|            sman->index,
   70|  5.52k|            sman->index);
   71|       |
   72|  5.52k|  if(socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) {
  ------------------
  |  Branch (72:6): [True: 0, False: 5.52k]
  ------------------
   73|       |    /* Failed to create a pair of sockets. */
   74|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   75|      0|  }
   76|       |
   77|  5.52k|  if(!FUZZ_VALID_SOCK(fds[0]) || !FUZZ_VALID_SOCK(fds[1])) {
  ------------------
  |  |   34|  11.0k|#define FUZZ_VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
  |  |  ------------------
  |  |  |  Branch (34:29): [True: 5.52k, False: 0]
  |  |  |  Branch (34:43): [True: 5.52k, False: 0]
  |  |  ------------------
  ------------------
                if(!FUZZ_VALID_SOCK(fds[0]) || !FUZZ_VALID_SOCK(fds[1])) {
  ------------------
  |  |   34|  5.52k|#define FUZZ_VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
  |  |  ------------------
  |  |  |  Branch (34:29): [True: 5.52k, False: 0]
  |  |  |  Branch (34:43): [True: 5.52k, False: 0]
  |  |  ------------------
  ------------------
   78|       |    /* One or more of the file descriptors is too large to fit in an fd_set,
   79|       |       so reject it here. Print out a message because this ought to be quite
   80|       |       rare. */
   81|      0|    printf("FUZZ[%d]: Not using file descriptors %d,%d as FD_SETSIZE is %d\n",
   82|      0|           sman->index,
   83|      0|           fds[0],
   84|      0|           fds[1],
   85|      0|           FD_SETSIZE);
   86|       |
   87|       |    /* Close the file descriptors so they don't leak. */
   88|      0|    close(fds[0]);
   89|      0|    close(fds[1]);
   90|       |
   91|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   92|      0|  }
   93|       |
   94|       |  /* Make both ends non-blocking. The curl end (fds[1]) must be non-blocking
   95|       |     so that a large send() from the protocol layer (e.g. a 1MB DICT URL)
   96|       |     cannot stall indefinitely when the kernel socket buffer fills up. */
   97|  5.52k|  flags = fcntl(fds[0], F_GETFL, 0);
   98|  5.52k|  status = fcntl(fds[0], F_SETFL, flags | O_NONBLOCK);
   99|       |
  100|  5.52k|  if(status == -1) {
  ------------------
  |  Branch (100:6): [True: 0, False: 5.52k]
  ------------------
  101|      0|    close(fds[0]);
  102|      0|    close(fds[1]);
  103|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  104|      0|  }
  105|       |
  106|  5.52k|  flags = fcntl(fds[1], F_GETFL, 0);
  107|  5.52k|  status = fcntl(fds[1], F_SETFL, flags | O_NONBLOCK);
  108|       |
  109|  5.52k|  if(status == -1) {
  ------------------
  |  Branch (109:6): [True: 0, False: 5.52k]
  ------------------
  110|      0|    close(fds[0]);
  111|      0|    close(fds[1]);
  112|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  113|      0|  }
  114|       |
  115|       |  /* At this point, the file descriptors in hand should be good enough to
  116|       |     work with. */
  117|  5.52k|  sman->fd = fds[0];
  118|  5.52k|  sman->fd_state = FUZZ_SOCK_OPEN;
  119|       |
  120|       |  /* If the server should be sending data immediately, send it here. */
  121|  5.52k|  data = sman->responses[0].data;
  122|  5.52k|  data_len = sman->responses[0].data_len;
  123|       |
  124|  5.52k|  if(data != NULL) {
  ------------------
  |  Branch (124:6): [True: 163, False: 5.35k]
  ------------------
  125|    163|    FV_PRINTF(fuzz, "FUZZ[%d]: Sending initial response \n", sman->index);
  ------------------
  |  |  530|    163|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 163]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  126|       |
  127|    163|    if(write(sman->fd, data, data_len) != (ssize_t)data_len) {
  ------------------
  |  Branch (127:8): [True: 0, False: 163]
  ------------------
  128|       |      /* Close the file descriptors so they don't leak. */
  129|      0|      close(sman->fd);
  130|      0|      sman->fd = -1;
  131|       |
  132|      0|      close(fds[1]);
  133|       |
  134|       |      /* Failed to write all of the response data. */
  135|      0|      return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  136|      0|    }
  137|    163|  }
  138|       |
  139|       |  /* Check to see if the socket should be shut down immediately. */
  140|  5.52k|  if(sman->responses[1].data == NULL) {
  ------------------
  |  Branch (140:6): [True: 4.74k, False: 782]
  ------------------
  141|  4.74k|    FV_PRINTF(fuzz,
  ------------------
  |  |  530|  4.74k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 4.74k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  142|  4.74k|              "FUZZ[%d]: Shutting down server socket: %d \n",
  143|  4.74k|              sman->index,
  144|  4.74k|              sman->fd);
  145|  4.74k|    shutdown(sman->fd, SHUT_WR);
  146|  4.74k|    sman->fd_state = FUZZ_SOCK_SHUTDOWN;
  147|  4.74k|  }
  148|       |
  149|       |  /* Return the other half of the socket pair. */
  150|  5.52k|  return fds[1];
  151|  5.52k|}
_Z21fuzz_sockopt_callbackPvi12curlsocktype:
  160|  5.52k|{
  161|  5.52k|  (void)ptr;
  162|  5.52k|  (void)curlfd;
  163|  5.52k|  (void)purpose;
  164|       |
  165|  5.52k|  return CURL_SOCKOPT_ALREADY_CONNECTED;
  ------------------
  |  |  421|  5.52k|#define CURL_SOCKOPT_ALREADY_CONNECTED 2
  ------------------
  166|  5.52k|}
_Z19fuzz_write_callbackPvmmS_:
  219|    327|{
  220|    327|  size_t total = size * nmemb;
  221|    327|  FUZZ_DATA *fuzz = (FUZZ_DATA *)ptr;
  222|    327|  size_t copy_len = total;
  223|       |
  224|       |  /* Restrict copy_len to at most TEMP_WRITE_ARRAY_SIZE. */
  225|    327|  if(copy_len > TEMP_WRITE_ARRAY_SIZE) {
  ------------------
  |  |  271|    327|#define TEMP_WRITE_ARRAY_SIZE           10
  ------------------
  |  Branch (225:6): [True: 72, False: 255]
  ------------------
  226|     72|    copy_len = TEMP_WRITE_ARRAY_SIZE;
  ------------------
  |  |  271|     72|#define TEMP_WRITE_ARRAY_SIZE           10
  ------------------
  227|     72|  }
  228|       |
  229|       |  /* Copy bytes to the temp store just to ensure the parameters are
  230|       |     exercised. */
  231|    327|  memcpy(fuzz->write_array, contents, copy_len);
  232|       |
  233|       |  /* Add on the total to the count. If it exceeds the maximum then return
  234|       |     zero to the caller so that the transfer is terminated early. */
  235|    327|  fuzz->written_data += total;
  236|       |
  237|    327|  if(fuzz->written_data > MAXIMUM_WRITE_LENGTH) {
  ------------------
  |  |  274|    327|#define MAXIMUM_WRITE_LENGTH            52428800
  ------------------
  |  Branch (237:6): [True: 0, False: 327]
  ------------------
  238|      0|    FV_PRINTF(fuzz,
  ------------------
  |  |  530|      0|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  239|      0|              "FUZZ: Exceeded maximum write length (%zu) \n",
  240|      0|              fuzz->written_data);
  241|      0|    total = 0;
  242|      0|  }
  243|       |
  244|    327|  return total;
  245|    327|}

_Z18fuzz_get_first_tlvP9fuzz_dataP3tlv:
   32|  14.4k|{
   33|       |  /* Reset the cursor. */
   34|  14.4k|  fuzz->state.data_pos = 0;
   35|  14.4k|  return fuzz_get_tlv_comn(fuzz, tlv);
   36|  14.4k|}
_Z17fuzz_get_next_tlvP9fuzz_dataP3tlv:
   43|  75.3k|{
   44|       |  /* Advance the cursor by the full length of the previous TLV. */
   45|  75.3k|  fuzz->state.data_pos += sizeof(TLV_RAW) + tlv->length;
   46|       |
   47|       |  /* Work out if there's a TLV's worth of data to read */
   48|  75.3k|  if(fuzz->state.data_pos + sizeof(TLV_RAW) > fuzz->state.data_len) {
  ------------------
  |  Branch (48:6): [True: 12.0k, False: 63.2k]
  ------------------
   49|       |    /* No more TLVs to parse */
   50|  12.0k|    return TLV_RC_NO_MORE_TLVS;
  ------------------
  |  |  267|  12.0k|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
   51|  12.0k|  }
   52|       |
   53|  63.2k|  return fuzz_get_tlv_comn(fuzz, tlv);
   54|  75.3k|}
_Z17fuzz_get_tlv_comnP9fuzz_dataP3tlv:
   61|  77.7k|{
   62|  77.7k|  int rc = 0;
   63|  77.7k|  size_t data_offset;
   64|  77.7k|  TLV_RAW *raw;
   65|       |
   66|       |  /* Start by casting the data stream to a TLV. */
   67|  77.7k|  raw = (TLV_RAW *)&fuzz->state.data[fuzz->state.data_pos];
   68|  77.7k|  data_offset = fuzz->state.data_pos + sizeof(TLV_RAW);
   69|       |
   70|       |  /* Set the TLV values. */
   71|  77.7k|  tlv->type = to_u16(raw->raw_type);
   72|  77.7k|  tlv->length = to_u32(raw->raw_length);
   73|  77.7k|  tlv->value = &fuzz->state.data[data_offset];
   74|       |
   75|  77.7k|  FV_PRINTF(fuzz, "TLV: type %x length %u\n", tlv->type, tlv->length);
  ------------------
  |  |  530|  77.7k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 77.7k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   76|       |
   77|       |  /* Use uint64s to verify lengths of TLVs so that overflow problems don't
   78|       |     matter. */
   79|  77.7k|  uint64_t check_length = data_offset;
   80|  77.7k|  check_length += tlv->length;
   81|       |
   82|  77.7k|  uint64_t remaining_len = fuzz->state.data_len;
   83|  77.7k|  FV_PRINTF(fuzz, "Check length of data: %" PRIu64 " \n", check_length);
  ------------------
  |  |  530|  77.7k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 77.7k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   84|  77.7k|  FV_PRINTF(fuzz, "Remaining length of data: %" PRIu64 " \n", remaining_len);
  ------------------
  |  |  530|  77.7k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 77.7k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   85|       |
   86|       |  /* Sanity check that the TLV length is ok. */
   87|  77.7k|  if(check_length > remaining_len) {
  ------------------
  |  Branch (87:6): [True: 543, False: 77.1k]
  ------------------
   88|    543|    FV_PRINTF(fuzz, "Returning TLV_RC_SIZE_ERROR\n");
  ------------------
  |  |  530|    543|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 543]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   89|    543|    rc = TLV_RC_SIZE_ERROR;
  ------------------
  |  |  268|    543|#define TLV_RC_SIZE_ERROR               2
  ------------------
   90|    543|  }
   91|       |
   92|  77.7k|  return rc;
   93|  77.7k|}
_Z14fuzz_parse_tlvP9fuzz_dataP3tlv:
   99|  75.7k|{
  100|  75.7k|  int rc;
  101|  75.7k|  char *tmp = NULL;
  102|  75.7k|  uint32_t tmp_u32;
  103|  75.7k|  curl_slist *new_list;
  104|       |
  105|  75.7k|  switch(tlv->type) {
  106|       |    /* The pointers in response TLVs will always be valid as long as the fuzz
  107|       |       data is in scope, which is the entirety of this file. */
  108|    401|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE0, 0);
  ------------------
  |  |  513|    401|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 401, False: 75.3k]
  |  |  ------------------
  |  |  514|    401|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    401|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    401|          break
  ------------------
  109|    994|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE1, 1);
  ------------------
  |  |  513|    994|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 994, False: 74.7k]
  |  |  ------------------
  |  |  514|    994|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    994|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    994|          break
  ------------------
  110|    222|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE2, 2);
  ------------------
  |  |  513|    222|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 222, False: 75.5k]
  |  |  ------------------
  |  |  514|    222|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    222|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    222|          break
  ------------------
  111|    196|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE3, 3);
  ------------------
  |  |  513|    196|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 196, False: 75.5k]
  |  |  ------------------
  |  |  514|    196|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    196|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    196|          break
  ------------------
  112|    231|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE4, 4);
  ------------------
  |  |  513|    231|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 231, False: 75.5k]
  |  |  ------------------
  |  |  514|    231|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    231|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    231|          break
  ------------------
  113|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE5, 5);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 75.5k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  114|    209|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE6, 6);
  ------------------
  |  |  513|    209|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 209, False: 75.5k]
  |  |  ------------------
  |  |  514|    209|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    209|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    209|          break
  ------------------
  115|    196|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE7, 7);
  ------------------
  |  |  513|    196|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 196, False: 75.5k]
  |  |  ------------------
  |  |  514|    196|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    196|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    196|          break
  ------------------
  116|    214|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE8, 8);
  ------------------
  |  |  513|    214|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 214, False: 75.5k]
  |  |  ------------------
  |  |  514|    214|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    214|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    214|          break
  ------------------
  117|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE9, 9);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 75.5k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  118|    264|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE10, 10);
  ------------------
  |  |  513|    264|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 264, False: 75.4k]
  |  |  ------------------
  |  |  514|    264|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    264|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    264|          break
  ------------------
  119|       |
  120|    194|    FRESPONSETLV(&fuzz->sockman[1], TLV_TYPE_SECOND_RESPONSE0, 0);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 75.5k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  121|    195|    FRESPONSETLV(&fuzz->sockman[1], TLV_TYPE_SECOND_RESPONSE1, 1);
  ------------------
  |  |  513|    195|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 195, False: 75.5k]
  |  |  ------------------
  |  |  514|    195|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    195|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    195|          break
  ------------------
  122|       |
  123|     32|    case TLV_TYPE_UPLOAD1:
  ------------------
  |  |   36|     32|#define TLV_TYPE_UPLOAD1                        8
  ------------------
  |  Branch (123:5): [True: 32, False: 75.7k]
  ------------------
  124|       |      /* The pointers in the TLV will always be valid as long as the fuzz data
  125|       |         is in scope, which is the entirety of this file. */
  126|       |
  127|     32|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_UPLOAD);
  ------------------
  |  |  503|     32|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  ------------------
  |  |  |  |  490|     32|        {                                                                     \
  |  |  |  |  491|     32|          if (!(COND))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (491:15): [True: 1, False: 31]
  |  |  |  |  ------------------
  |  |  |  |  492|     32|          {                                                                   \
  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  496|     32|        }
  |  |  ------------------
  ------------------
  128|       |
  129|     31|      fuzz->upload1_data = tlv->value;
  130|     31|      fuzz->upload1_data_len = tlv->length;
  131|       |
  132|     31|      FSET_OPTION(fuzz, CURLOPT_UPLOAD, 1L);
  ------------------
  |  |  499|     31|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|     31|        {                                                                     \
  |  |  |  |  481|     31|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|     31|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 31]
  |  |  |  |  ------------------
  |  |  |  |  483|     31|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|     31|        }
  |  |  ------------------
  |  |  500|     31|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  133|     31|      FSET_OPTION(fuzz,
  ------------------
  |  |  499|     31|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|     31|        {                                                                     \
  |  |  |  |  481|     31|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|     31|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 31]
  |  |  |  |  ------------------
  |  |  |  |  483|     31|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|     31|        }
  |  |  ------------------
  |  |  500|     31|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  134|     31|                  CURLOPT_INFILESIZE_LARGE,
  135|     31|                  (curl_off_t)fuzz->upload1_data_len);
  136|     31|      break;
  137|       |
  138|  45.1k|    case TLV_TYPE_HEADER:
  ------------------
  |  |   34|  45.1k|#define TLV_TYPE_HEADER                         6
  ------------------
  |  Branch (138:5): [True: 45.1k, False: 30.5k]
  ------------------
  139|       |      /* Limit the number of headers that can be added to a message to prevent
  140|       |         timeouts. */
  141|  45.1k|      if(fuzz->header_list_count >= TLV_MAX_NUM_CURLOPT_HEADER) {
  ------------------
  |  |  301|  45.1k|#define TLV_MAX_NUM_CURLOPT_HEADER      2000
  ------------------
  |  Branch (141:10): [True: 1, False: 45.1k]
  ------------------
  142|      1|        rc = 255;
  143|      1|        goto EXIT_LABEL;
  144|      1|      }
  145|       |
  146|  45.1k|      tmp = fuzz_tlv_to_string(tlv);
  147|  45.1k|      if (tmp == NULL) {
  ------------------
  |  Branch (147:11): [True: 0, False: 45.1k]
  ------------------
  148|       |        // keep on despite allocation failure
  149|      0|        break;
  150|      0|      }
  151|  45.1k|      new_list = curl_slist_append(fuzz->header_list, tmp);
  152|  45.1k|      if (new_list == NULL) {
  ------------------
  |  Branch (152:11): [True: 0, False: 45.1k]
  ------------------
  153|      0|        break;
  154|      0|      }
  155|  45.1k|      fuzz->header_list = new_list;
  156|  45.1k|      fuzz->header_list_count++;
  157|  45.1k|      break;
  158|       |
  159|    344|    case TLV_TYPE_MAIL_RECIPIENT:
  ------------------
  |  |   39|    344|#define TLV_TYPE_MAIL_RECIPIENT                 11
  ------------------
  |  Branch (159:5): [True: 344, False: 75.3k]
  ------------------
  160|       |      /* Limit the number of headers that can be added to a message to prevent
  161|       |         timeouts. */
  162|    344|      if(fuzz->header_list_count >= TLV_MAX_NUM_CURLOPT_HEADER) {
  ------------------
  |  |  301|    344|#define TLV_MAX_NUM_CURLOPT_HEADER      2000
  ------------------
  |  Branch (162:10): [True: 1, False: 343]
  ------------------
  163|      1|        rc = 255;
  164|      1|        goto EXIT_LABEL;
  165|      1|      }
  166|    343|      tmp = fuzz_tlv_to_string(tlv);
  167|    343|      if (tmp == NULL) {
  ------------------
  |  Branch (167:11): [True: 0, False: 343]
  ------------------
  168|       |        // keep on despite allocation failure
  169|      0|        break;
  170|      0|      }
  171|    343|      new_list = curl_slist_append(fuzz->mail_recipients_list, tmp);
  172|    343|      if (new_list != NULL) {
  ------------------
  |  Branch (172:11): [True: 343, False: 0]
  ------------------
  173|    343|        fuzz->mail_recipients_list = new_list;
  174|    343|        fuzz->header_list_count++;
  175|    343|      }
  176|    343|      break;
  177|       |
  178|  2.60k|    case TLV_TYPE_MIME_PART:
  ------------------
  |  |   41|  2.60k|#define TLV_TYPE_MIME_PART                      13
  ------------------
  |  Branch (178:5): [True: 2.60k, False: 73.1k]
  ------------------
  179|  2.60k|      if(fuzz->mime == NULL) {
  ------------------
  |  Branch (179:10): [True: 185, False: 2.42k]
  ------------------
  180|    185|        fuzz->mime = curl_mime_init(fuzz->easy);
  181|    185|      }
  182|       |
  183|  2.60k|      fuzz->part = curl_mime_addpart(fuzz->mime);
  184|       |
  185|       |      /* This TLV may have sub TLVs. */
  186|  2.60k|      fuzz_add_mime_part(tlv, fuzz->part);
  187|       |
  188|  2.60k|      break;
  189|       |
  190|     32|    case TLV_TYPE_POSTFIELDS:
  ------------------
  |  |   33|     32|#define TLV_TYPE_POSTFIELDS                     5
  ------------------
  |  Branch (190:5): [True: 32, False: 75.7k]
  ------------------
  191|     32|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_POSTFIELDS);
  ------------------
  |  |  503|     32|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  ------------------
  |  |  |  |  490|     32|        {                                                                     \
  |  |  |  |  491|     32|          if (!(COND))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (491:15): [True: 1, False: 31]
  |  |  |  |  ------------------
  |  |  |  |  492|     32|          {                                                                   \
  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  496|     32|        }
  |  |  ------------------
  ------------------
  192|     31|      fuzz->postfields = fuzz_tlv_to_string(tlv);
  193|     31|      FSET_OPTION(fuzz, CURLOPT_POSTFIELDS, fuzz->postfields);
  ------------------
  |  |  499|     31|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|     31|        {                                                                     \
  |  |  |  |  481|     31|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|     31|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 31]
  |  |  |  |  ------------------
  |  |  |  |  483|     31|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|     31|        }
  |  |  ------------------
  |  |  500|     31|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  194|     31|      break;
  195|       |
  196|     41|    case TLV_TYPE_HTTPPOSTBODY:
  ------------------
  |  |   80|     41|#define TLV_TYPE_HTTPPOSTBODY                   52
  ------------------
  |  Branch (196:5): [True: 41, False: 75.6k]
  ------------------
  197|     41|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_HTTPPOST);
  ------------------
  |  |  503|     41|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  ------------------
  |  |  |  |  490|     41|        {                                                                     \
  |  |  |  |  491|     41|          if (!(COND))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (491:15): [True: 1, False: 40]
  |  |  |  |  ------------------
  |  |  |  |  492|     41|          {                                                                   \
  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  496|     41|        }
  |  |  ------------------
  ------------------
  198|     40|      fuzz_setup_http_post(fuzz, tlv);
  199|     40|      FSET_OPTION(fuzz, CURLOPT_HTTPPOST, fuzz->httppost);
  ------------------
  |  |  499|     40|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|     40|        {                                                                     \
  |  |  |  |  481|     40|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|     40|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 40]
  |  |  |  |  ------------------
  |  |  |  |  483|     40|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|     40|        }
  |  |  ------------------
  |  |  500|     40|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  200|     40|      break;
  201|       |
  202|       |    /* Define a set of u32 options. */
  203|    248|    FU32TLV(fuzz, TLV_TYPE_HTTPAUTH, CURLOPT_HTTPAUTH);
  ------------------
  |  |  519|     85|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 85, False: 75.6k]
  |  |  ------------------
  |  |  520|     85|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 82]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     85|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     82|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     82|        {                                                                     \
  |  |  |  |  |  |  491|     82|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 81]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     82|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     82|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     81|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     81|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     81|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     81|        {                                                                     \
  |  |  |  |  |  |  481|     81|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     81|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 80]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     81|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     81|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     80|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     80|          break
  ------------------
  204|    185|    FU32TLV(fuzz, TLV_TYPE_OPTHEADER, CURLOPT_HEADER);
  ------------------
  |  |  519|     68|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 68, False: 75.6k]
  |  |  ------------------
  |  |  520|     68|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 59]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|     68|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     59|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     59|        {                                                                     \
  |  |  |  |  |  |  491|     59|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 58]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     59|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     59|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     58|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     58|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     58|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     58|        {                                                                     \
  |  |  |  |  |  |  481|     58|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     58|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 58]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     58|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     58|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     58|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     58|          break
  ------------------
  205|     40|    FU32TLV(fuzz, TLV_TYPE_NOBODY, CURLOPT_NOBODY);
  ------------------
  |  |  519|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 15, False: 75.7k]
  |  |  ------------------
  |  |  520|     15|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 13]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     15|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     13|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     13|        {                                                                     \
  |  |  |  |  |  |  491|     13|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     13|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     13|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     12|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     12|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     12|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     12|        {                                                                     \
  |  |  |  |  |  |  481|     12|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     12|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     12|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     12|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     12|          break
  ------------------
  206|    104|    FU32TLV(fuzz, TLV_TYPE_FOLLOWLOCATION, CURLOPT_FOLLOWLOCATION);
  ------------------
  |  |  519|     41|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 41, False: 75.6k]
  |  |  ------------------
  |  |  520|     41|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 32]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|     41|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     32|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     32|        {                                                                     \
  |  |  |  |  |  |  491|     32|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 31]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     32|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     32|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     31|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     31|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     31|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     31|        {                                                                     \
  |  |  |  |  |  |  481|     31|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     31|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 29, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     31|          {                                                                   \
  |  |  |  |  |  |  484|     29|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     29|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     29|          }                                                                   \
  |  |  |  |  |  |  487|     31|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  207|     41|    FU32TLV(fuzz, TLV_TYPE_WILDCARDMATCH, CURLOPT_WILDCARDMATCH);
  ------------------
  |  |  519|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 20, False: 75.7k]
  |  |  ------------------
  |  |  520|     20|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 11]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|     20|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     11|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     11|        {                                                                     \
  |  |  |  |  |  |  491|     11|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     11|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     11|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     10|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     10|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     10|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     10|        {                                                                     \
  |  |  |  |  |  |  481|     10|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     10|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     10|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     10|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     10|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     10|          break
  ------------------
  208|    100|    FU32TLV(fuzz, TLV_TYPE_RTSP_REQUEST, CURLOPT_RTSP_REQUEST);
  ------------------
  |  |  519|     39|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 39, False: 75.6k]
  |  |  ------------------
  |  |  520|     39|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 31]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     39|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     31|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     31|        {                                                                     \
  |  |  |  |  |  |  491|     31|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     31|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     31|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     30|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     30|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 19, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  |  |  484|     19|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     19|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     19|          }                                                                   \
  |  |  |  |  |  |  487|     30|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     11|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     11|          break
  ------------------
  209|    239|    FU32TLV(fuzz, TLV_TYPE_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_CLIENT_CSEQ);
  ------------------
  |  |  519|     84|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 84, False: 75.6k]
  |  |  ------------------
  |  |  520|     84|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 78]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     84|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     78|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     78|        {                                                                     \
  |  |  |  |  |  |  491|     78|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 77]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     78|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     78|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     77|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     77|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     77|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     77|        {                                                                     \
  |  |  |  |  |  |  481|     77|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     77|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 77]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     77|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     77|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     77|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     77|          break
  ------------------
  210|    134|    FU32TLV(fuzz, TLV_TYPE_HTTP_VERSION, CURLOPT_HTTP_VERSION);
  ------------------
  |  |  519|     49|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 49, False: 75.6k]
  |  |  ------------------
  |  |  520|     49|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 43]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     49|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     43|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     43|        {                                                                     \
  |  |  |  |  |  |  491|     43|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 42]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     43|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     43|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     42|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     42|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     42|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     42|        {                                                                     \
  |  |  |  |  |  |  481|     42|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     42|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 27, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     42|          {                                                                   \
  |  |  |  |  |  |  484|     27|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     27|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     27|          }                                                                   \
  |  |  |  |  |  |  487|     42|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     15|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     15|          break
  ------------------
  211|    128|    FU32TLV(fuzz, TLV_TYPE_NETRC, CURLOPT_NETRC);
  ------------------
  |  |  519|     45|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 45, False: 75.6k]
  |  |  ------------------
  |  |  520|     45|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 42]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     45|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     42|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     42|        {                                                                     \
  |  |  |  |  |  |  491|     42|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 41]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     42|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     42|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     41|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     41|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     41|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     41|        {                                                                     \
  |  |  |  |  |  |  481|     41|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     41|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 32, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     41|          {                                                                   \
  |  |  |  |  |  |  484|     32|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     32|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     32|          }                                                                   \
  |  |  |  |  |  |  487|     41|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  212|     39|    FU32TLV(fuzz, TLV_TYPE_WS_OPTIONS, CURLOPT_WS_OPTIONS);
  ------------------
  |  |  519|     22|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 22, False: 75.7k]
  |  |  ------------------
  |  |  520|     22|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 13, False: 9]
  |  |  ------------------
  |  |  521|     13|            rc = 255;                                                         \
  |  |  522|     13|            goto EXIT_LABEL;                                                  \
  |  |  523|     13|          }                                                                   \
  |  |  524|     22|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      9|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      9|        {                                                                     \
  |  |  |  |  |  |  491|      9|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      9|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      9|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      8|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      8|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      8|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      8|        {                                                                     \
  |  |  |  |  |  |  481|      8|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      8|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      8|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      8|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  213|    131|    FU32TLV(fuzz, TLV_TYPE_CONNECT_ONLY, CURLOPT_CONNECT_ONLY);
  ------------------
  |  |  519|     48|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 48, False: 75.6k]
  |  |  ------------------
  |  |  520|     48|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 42]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     48|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     42|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     42|        {                                                                     \
  |  |  |  |  |  |  491|     42|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 41]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     42|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     42|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     41|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     41|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     41|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     41|        {                                                                     \
  |  |  |  |  |  |  481|     41|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     41|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 36, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     41|          {                                                                   \
  |  |  |  |  |  |  484|     36|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     36|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     36|          }                                                                   \
  |  |  |  |  |  |  487|     41|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  214|     34|    FU32TLV(fuzz, TLV_TYPE_POST, CURLOPT_POST);
  ------------------
  |  |  519|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 17, False: 75.7k]
  |  |  ------------------
  |  |  520|     17|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 9]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     17|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      9|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      9|        {                                                                     \
  |  |  |  |  |  |  491|      9|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      9|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      9|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      8|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      8|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      8|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      8|        {                                                                     \
  |  |  |  |  |  |  481|      8|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      8|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      8|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      8|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  215|    316|    FU32TLV(fuzz, TLV_TYPE_PROXYTYPE, CURLOPT_PROXYTYPE);
  ------------------
  |  |  519|    107|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 107, False: 75.6k]
  |  |  ------------------
  |  |  520|    107|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 105]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    107|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    105|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    105|        {                                                                     \
  |  |  |  |  |  |  491|    105|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 104]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    105|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    105|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    104|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    104|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    104|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    104|        {                                                                     \
  |  |  |  |  |  |  481|    104|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    104|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 37, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    104|          {                                                                   \
  |  |  |  |  |  |  484|     37|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     37|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     37|          }                                                                   \
  |  |  |  |  |  |  487|    104|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     67|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     67|          break
  ------------------
  216|    211|    FU32TLV(fuzz, TLV_TYPE_PORT, CURLOPT_PORT);
  ------------------
  |  |  519|     74|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 74, False: 75.6k]
  |  |  ------------------
  |  |  520|     74|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 69]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     74|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     69|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     69|        {                                                                     \
  |  |  |  |  |  |  491|     69|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 68]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     69|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     69|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     68|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     68|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     68|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     68|        {                                                                     \
  |  |  |  |  |  |  481|     68|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     68|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 34, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     68|          {                                                                   \
  |  |  |  |  |  |  484|     34|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     34|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     34|          }                                                                   \
  |  |  |  |  |  |  487|     68|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     34|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     34|          break
  ------------------
  217|     88|    FU32TLV(fuzz, TLV_TYPE_LOW_SPEED_LIMIT, CURLOPT_LOW_SPEED_LIMIT);
  ------------------
  |  |  519|     37|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 37, False: 75.7k]
  |  |  ------------------
  |  |  520|     37|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 26]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     37|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     26|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     26|        {                                                                     \
  |  |  |  |  |  |  491|     26|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     26|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     26|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     25|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     25|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     25|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     25|        {                                                                     \
  |  |  |  |  |  |  481|     25|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     25|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     25|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     25|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     25|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     25|          break
  ------------------
  218|    166|    FU32TLV(fuzz, TLV_TYPE_LOW_SPEED_TIME, CURLOPT_LOW_SPEED_TIME);
  ------------------
  |  |  519|     59|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 59, False: 75.6k]
  |  |  ------------------
  |  |  520|     59|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 54]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     59|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     54|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     54|        {                                                                     \
  |  |  |  |  |  |  491|     54|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 53]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     54|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     54|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     53|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     53|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     53|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     53|        {                                                                     \
  |  |  |  |  |  |  481|     53|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     53|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 53]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     53|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     53|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     53|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     53|          break
  ------------------
  219|    145|    FU32TLV(fuzz, TLV_TYPE_RESUME_FROM, CURLOPT_RESUME_FROM);
  ------------------
  |  |  519|     50|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 50, False: 75.6k]
  |  |  ------------------
  |  |  520|     50|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 48]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     50|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     48|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     48|        {                                                                     \
  |  |  |  |  |  |  491|     48|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     48|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     48|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     47|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     47|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     47|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     47|        {                                                                     \
  |  |  |  |  |  |  481|     47|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     47|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     47|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     47|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     47|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     47|          break
  ------------------
  220|     19|    FU32TLV(fuzz, TLV_TYPE_TIMEVALUE, CURLOPT_TIMEVALUE);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 75.7k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 4]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  221|     65|    FU32TLV(fuzz, TLV_TYPE_NOPROGRESS, CURLOPT_NOPROGRESS);
  ------------------
  |  |  519|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 24, False: 75.7k]
  |  |  ------------------
  |  |  520|     24|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 21]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     24|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     21|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     21|        {                                                                     \
  |  |  |  |  |  |  491|     21|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 20]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     21|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     21|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     20|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     20|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     20|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     20|        {                                                                     \
  |  |  |  |  |  |  481|     20|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     20|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 20]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     20|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     20|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     20|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     20|          break
  ------------------
  222|     24|    FU32TLV(fuzz, TLV_TYPE_FAILONERROR, CURLOPT_FAILONERROR);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 75.7k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 7]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  223|     21|    FU32TLV(fuzz, TLV_TYPE_DIRLISTONLY, CURLOPT_DIRLISTONLY);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 75.7k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 5]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  224|     16|    FU32TLV(fuzz, TLV_TYPE_APPEND, CURLOPT_APPEND);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 75.7k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 3]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  225|     17|    FU32TLV(fuzz, TLV_TYPE_TRANSFERTEXT, CURLOPT_TRANSFERTEXT);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 5]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  226|     15|    FU32TLV(fuzz, TLV_TYPE_AUTOREFERER, CURLOPT_AUTOREFERER);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 75.7k]
  |  |  ------------------
  |  |  520|      6|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 5]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      6|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  227|    215|    FU32TLV(fuzz, TLV_TYPE_PROXYPORT, CURLOPT_PROXYPORT);
  ------------------
  |  |  519|     74|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 74, False: 75.6k]
  |  |  ------------------
  |  |  520|     74|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 71]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     74|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     71|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     71|        {                                                                     \
  |  |  |  |  |  |  491|     71|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     71|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     71|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     70|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     70|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     70|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     70|        {                                                                     \
  |  |  |  |  |  |  481|     70|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     70|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 37, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     70|          {                                                                   \
  |  |  |  |  |  |  484|     37|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     37|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     37|          }                                                                   \
  |  |  |  |  |  |  487|     70|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     33|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     33|          break
  ------------------
  228|       |    // too easy for API misuse FU32TLV(fuzz, TLV_TYPE_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE);
  229|     12|    FU32TLV(fuzz, TLV_TYPE_HTTPPROXYTUNNEL, CURLOPT_HTTPPROXYTUNNEL);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 75.7k]
  |  |  ------------------
  |  |  520|      5|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 4]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  230|    214|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYPEER, CURLOPT_SSL_VERIFYPEER);
  ------------------
  |  |  519|     81|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 81, False: 75.6k]
  |  |  ------------------
  |  |  520|     81|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 14, False: 67]
  |  |  ------------------
  |  |  521|     14|            rc = 255;                                                         \
  |  |  522|     14|            goto EXIT_LABEL;                                                  \
  |  |  523|     14|          }                                                                   \
  |  |  524|     81|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     67|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     67|        {                                                                     \
  |  |  |  |  |  |  491|     67|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 66]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     67|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     67|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     66|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     66|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     66|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     66|        {                                                                     \
  |  |  |  |  |  |  481|     66|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     66|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 66]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     66|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     66|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     66|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     66|          break
  ------------------
  231|    163|    FU32TLV(fuzz, TLV_TYPE_MAXREDIRS, CURLOPT_MAXREDIRS);
  ------------------
  |  |  519|     60|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 60, False: 75.6k]
  |  |  ------------------
  |  |  520|     60|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 52]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     60|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     52|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     52|        {                                                                     \
  |  |  |  |  |  |  491|     52|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 51]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     52|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     52|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     51|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     51|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     51|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     51|        {                                                                     \
  |  |  |  |  |  |  481|     51|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     51|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 51]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     51|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     51|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     51|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     51|          break
  ------------------
  232|     15|    FU32TLV(fuzz, TLV_TYPE_FILETIME, CURLOPT_FILETIME);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 4]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  233|    178|    FU32TLV(fuzz, TLV_TYPE_MAXCONNECTS, CURLOPT_MAXCONNECTS);
  ------------------
  |  |  519|     67|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 67, False: 75.6k]
  |  |  ------------------
  |  |  520|     67|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 56]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     67|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     56|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     56|        {                                                                     \
  |  |  |  |  |  |  491|     56|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 55]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     56|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     56|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     55|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     55|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     55|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     55|        {                                                                     \
  |  |  |  |  |  |  481|     55|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     55|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 55]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     55|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     55|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     55|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     55|          break
  ------------------
  234|     26|    FU32TLV(fuzz, TLV_TYPE_FRESH_CONNECT, CURLOPT_FRESH_CONNECT);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 75.7k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 7]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  235|     40|    FU32TLV(fuzz, TLV_TYPE_FORBID_REUSE, CURLOPT_FORBID_REUSE);
  ------------------
  |  |  519|     21|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 21, False: 75.7k]
  |  |  ------------------
  |  |  520|     21|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 10]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     21|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     10|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     10|        {                                                                     \
  |  |  |  |  |  |  491|     10|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     10|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     10|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      9|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      9|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      9|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      9|        {                                                                     \
  |  |  |  |  |  |  481|      9|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      9|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      9|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      9|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  236|    360|    FU32TLV(fuzz, TLV_TYPE_CONNECTTIMEOUT, CURLOPT_CONNECTTIMEOUT);
  ------------------
  |  |  519|    123|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 123, False: 75.6k]
  |  |  ------------------
  |  |  520|    123|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 119]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|    123|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    119|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    119|        {                                                                     \
  |  |  |  |  |  |  491|    119|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 118]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    119|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    119|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    118|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    118|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    118|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    118|        {                                                                     \
  |  |  |  |  |  |  481|    118|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    118|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 118]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    118|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    118|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    118|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    118|          break
  ------------------
  237|     27|    FU32TLV(fuzz, TLV_TYPE_HTTPGET, CURLOPT_HTTPGET);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 75.7k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 8]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      8|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      8|        {                                                                     \
  |  |  |  |  |  |  491|      8|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      8|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      8|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      7|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      7|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      7|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      7|        {                                                                     \
  |  |  |  |  |  |  481|      7|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      7|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      7|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      7|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      7|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      7|          break
  ------------------
  238|     37|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYHOST, CURLOPT_SSL_VERIFYHOST);
  ------------------
  |  |  519|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 14, False: 75.7k]
  |  |  ------------------
  |  |  520|     14|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 12]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     12|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     12|        {                                                                     \
  |  |  |  |  |  |  491|     12|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     12|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     12|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     11|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     11|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     11|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     11|        {                                                                     \
  |  |  |  |  |  |  481|     11|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     11|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     11|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     11|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     11|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     11|          break
  ------------------
  239|     16|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_EPSV, CURLOPT_FTP_USE_EPSV);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 75.7k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 5]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  240|     17|    FU32TLV(fuzz, TLV_TYPE_SSLENGINE_DEFAULT, CURLOPT_SSLENGINE_DEFAULT);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 5]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  241|    358|    FU32TLV(fuzz, TLV_TYPE_DNS_CACHE_TIMEOUT, CURLOPT_DNS_CACHE_TIMEOUT);
  ------------------
  |  |  519|    125|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 125, False: 75.6k]
  |  |  ------------------
  |  |  520|    125|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 117]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|    125|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    117|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    117|        {                                                                     \
  |  |  |  |  |  |  491|    117|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 116]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    117|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    117|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    116|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    116|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    116|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    116|        {                                                                     \
  |  |  |  |  |  |  481|    116|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    116|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 116]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    116|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    116|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    116|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    116|          break
  ------------------
  242|     22|    FU32TLV(fuzz, TLV_TYPE_COOKIESESSION, CURLOPT_COOKIESESSION);
  ------------------
  |  |  519|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 15, False: 75.7k]
  |  |  ------------------
  |  |  520|     15|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 4]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     15|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  243|    193|    FU32TLV(fuzz, TLV_TYPE_BUFFERSIZE, CURLOPT_BUFFERSIZE);
  ------------------
  |  |  519|     68|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 68, False: 75.6k]
  |  |  ------------------
  |  |  520|     68|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 63]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     68|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     63|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     63|        {                                                                     \
  |  |  |  |  |  |  491|     63|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 62]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     63|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     63|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     62|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     62|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     62|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     62|        {                                                                     \
  |  |  |  |  |  |  481|     62|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     62|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 62]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     62|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     62|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     62|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     62|          break
  ------------------
  244|     59|    FU32TLV(fuzz, TLV_TYPE_NOSIGNAL, CURLOPT_NOSIGNAL);
  ------------------
  |  |  519|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 24, False: 75.7k]
  |  |  ------------------
  |  |  520|     24|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 18]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     24|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     18|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     18|        {                                                                     \
  |  |  |  |  |  |  491|     18|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     18|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     18|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     17|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     17|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     17|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     17|        {                                                                     \
  |  |  |  |  |  |  481|     17|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     17|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     17|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     17|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     17|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     17|          break
  ------------------
  245|     25|    FU32TLV(fuzz, TLV_TYPE_UNRESTRICTED_AUTH, CURLOPT_UNRESTRICTED_AUTH);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 75.7k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 7]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  246|     16|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_EPRT, CURLOPT_FTP_USE_EPRT);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 75.7k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 5]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  247|     88|    FU32TLV(fuzz, TLV_TYPE_FTP_CREATE_MISSING_DIRS, CURLOPT_FTP_CREATE_MISSING_DIRS);
  ------------------
  |  |  519|     37|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 37, False: 75.7k]
  |  |  ------------------
  |  |  520|     37|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 26]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     37|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     26|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     26|        {                                                                     \
  |  |  |  |  |  |  491|     26|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     26|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     26|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     25|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     25|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     25|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     25|        {                                                                     \
  |  |  |  |  |  |  481|     25|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     25|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 22, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     25|          {                                                                   \
  |  |  |  |  |  |  484|     22|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     22|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     22|          }                                                                   \
  |  |  |  |  |  |  487|     25|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  248|     90|    FU32TLV(fuzz, TLV_TYPE_MAXFILESIZE, CURLOPT_MAXFILESIZE);
  ------------------
  |  |  519|     33|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 33, False: 75.7k]
  |  |  ------------------
  |  |  520|     33|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 29]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     33|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     29|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     29|        {                                                                     \
  |  |  |  |  |  |  491|     29|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     29|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     29|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     28|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     28|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     28|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     28|        {                                                                     \
  |  |  |  |  |  |  481|     28|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     28|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     28|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     28|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     28|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     28|          break
  ------------------
  249|     19|    FU32TLV(fuzz, TLV_TYPE_TCP_NODELAY, CURLOPT_TCP_NODELAY);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 6]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  250|     18|    FU32TLV(fuzz, TLV_TYPE_IGNORE_CONTENT_LENGTH, CURLOPT_IGNORE_CONTENT_LENGTH);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 75.7k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 4]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  251|     15|    FU32TLV(fuzz, TLV_TYPE_FTP_SKIP_PASV_IP, CURLOPT_FTP_SKIP_PASV_IP);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 4]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  252|    146|    FU32TLV(fuzz, TLV_TYPE_LOCALPORT, CURLOPT_LOCALPORT);
  ------------------
  |  |  519|     51|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 51, False: 75.6k]
  |  |  ------------------
  |  |  520|     51|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 48]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     51|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     48|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     48|        {                                                                     \
  |  |  |  |  |  |  491|     48|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     48|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     48|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     47|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     47|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     47|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     47|        {                                                                     \
  |  |  |  |  |  |  481|     47|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     47|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 16, False: 31]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     47|          {                                                                   \
  |  |  |  |  |  |  484|     16|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     16|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     16|          }                                                                   \
  |  |  |  |  |  |  487|     47|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     31|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     31|          break
  ------------------
  253|    202|    FU32TLV(fuzz, TLV_TYPE_LOCALPORTRANGE, CURLOPT_LOCALPORTRANGE);
  ------------------
  |  |  519|     75|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 75, False: 75.6k]
  |  |  ------------------
  |  |  520|     75|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 64]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     75|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     64|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     64|        {                                                                     \
  |  |  |  |  |  |  491|     64|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 63]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     64|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     64|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     63|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     63|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     63|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     63|        {                                                                     \
  |  |  |  |  |  |  481|     63|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     63|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 31, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     63|          {                                                                   \
  |  |  |  |  |  |  484|     31|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     31|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     31|          }                                                                   \
  |  |  |  |  |  |  487|     63|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     32|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     32|          break
  ------------------
  254|     19|    FU32TLV(fuzz, TLV_TYPE_SSL_SESSIONID_CACHE, CURLOPT_SSL_SESSIONID_CACHE);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 6]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  255|    111|    FU32TLV(fuzz, TLV_TYPE_FTP_SSL_CCC, CURLOPT_FTP_SSL_CCC);
  ------------------
  |  |  519|     40|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 40, False: 75.6k]
  |  |  ------------------
  |  |  520|     40|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 36]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     40|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     36|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     36|        {                                                                     \
  |  |  |  |  |  |  491|     36|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 35]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     36|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     36|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     35|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     35|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     35|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     35|        {                                                                     \
  |  |  |  |  |  |  481|     35|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     35|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 33, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     35|          {                                                                   \
  |  |  |  |  |  |  484|     33|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     33|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     33|          }                                                                   \
  |  |  |  |  |  |  487|     35|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  256|    440|    FU32TLV(fuzz, TLV_TYPE_CONNECTTIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS);
  ------------------
  |  |  519|    153|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 153, False: 75.5k]
  |  |  ------------------
  |  |  520|    153|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 144]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|    153|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    144|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    144|        {                                                                     \
  |  |  |  |  |  |  491|    144|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 143]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    144|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    144|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    143|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    143|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    143|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    143|        {                                                                     \
  |  |  |  |  |  |  481|    143|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    143|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 143]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    143|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    143|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    143|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    143|          break
  ------------------
  257|     11|    FU32TLV(fuzz, TLV_TYPE_HTTP_TRANSFER_DECODING, CURLOPT_HTTP_TRANSFER_DECODING);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 75.7k]
  |  |  ------------------
  |  |  520|      6|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 3]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      6|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  258|     20|    FU32TLV(fuzz, TLV_TYPE_HTTP_CONTENT_DECODING, CURLOPT_HTTP_CONTENT_DECODING);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 75.7k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 6]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  259|    158|    FU32TLV(fuzz, TLV_TYPE_NEW_FILE_PERMS, CURLOPT_NEW_FILE_PERMS);
  ------------------
  |  |  519|     55|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 55, False: 75.6k]
  |  |  ------------------
  |  |  520|     55|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 52]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     55|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     52|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     52|        {                                                                     \
  |  |  |  |  |  |  491|     52|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 51]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     52|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     52|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     51|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     51|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     51|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     51|        {                                                                     \
  |  |  |  |  |  |  481|     51|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     51|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 41, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     51|          {                                                                   \
  |  |  |  |  |  |  484|     41|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     41|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     41|          }                                                                   \
  |  |  |  |  |  |  487|     51|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     10|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     10|          break
  ------------------
  260|     13|    FU32TLV(fuzz, TLV_TYPE_NEW_DIRECTORY_PERMS, CURLOPT_NEW_DIRECTORY_PERMS);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 75.7k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 2]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      2|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      2|        {                                                                     \
  |  |  |  |  |  |  491|      2|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      2|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      2|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  261|     12|    FU32TLV(fuzz, TLV_TYPE_PROXY_TRANSFER_MODE, CURLOPT_PROXY_TRANSFER_MODE);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 75.7k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 3]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  262|    624|    FU32TLV(fuzz, TLV_TYPE_ADDRESS_SCOPE, CURLOPT_ADDRESS_SCOPE);
  ------------------
  |  |  519|    211|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 211, False: 75.5k]
  |  |  ------------------
  |  |  520|    211|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 207]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|    211|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    207|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    207|        {                                                                     \
  |  |  |  |  |  |  491|    207|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 206]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    207|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    207|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    206|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    206|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    206|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    206|        {                                                                     \
  |  |  |  |  |  |  481|    206|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    206|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 206]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    206|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    206|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    206|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    206|          break
  ------------------
  263|     19|    FU32TLV(fuzz, TLV_TYPE_CERTINFO, CURLOPT_CERTINFO);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 6]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  264|    182|    FU32TLV(fuzz, TLV_TYPE_TFTP_BLKSIZE, CURLOPT_TFTP_BLKSIZE);
  ------------------
  |  |  519|     63|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 63, False: 75.6k]
  |  |  ------------------
  |  |  520|     63|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 60]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     63|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     60|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     60|        {                                                                     \
  |  |  |  |  |  |  491|     60|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 59]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     60|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     60|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     59|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     59|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     59|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     59|        {                                                                     \
  |  |  |  |  |  |  481|     59|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     59|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 59]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     59|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     59|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     59|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     59|          break
  ------------------
  265|      7|    FU32TLV(fuzz, TLV_TYPE_SOCKS5_GSSAPI_NEC, CURLOPT_SOCKS5_GSSAPI_NEC);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 75.7k]
  |  |  ------------------
  |  |  520|      3|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 2]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      2|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      2|        {                                                                     \
  |  |  |  |  |  |  491|      2|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      2|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      2|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  266|     14|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_PRET, CURLOPT_FTP_USE_PRET);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 75.7k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 3]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  267|    194|    FU32TLV(fuzz, TLV_TYPE_RTSP_SERVER_CSEQ, CURLOPT_RTSP_SERVER_CSEQ);
  ------------------
  |  |  519|     71|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 71, False: 75.6k]
  |  |  ------------------
  |  |  520|     71|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 62]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|     71|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     62|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     62|        {                                                                     \
  |  |  |  |  |  |  491|     62|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 61]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     62|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     62|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     61|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     61|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     61|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     61|        {                                                                     \
  |  |  |  |  |  |  481|     61|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     61|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 61]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     61|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     61|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     61|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     61|          break
  ------------------
  268|     10|    FU32TLV(fuzz, TLV_TYPE_TRANSFER_ENCODING, CURLOPT_TRANSFER_ENCODING);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 75.7k]
  |  |  ------------------
  |  |  520|      5|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 3]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  269|    124|    FU32TLV(fuzz, TLV_TYPE_ACCEPTTIMEOUT_MS, CURLOPT_ACCEPTTIMEOUT_MS);
  ------------------
  |  |  519|     43|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 43, False: 75.6k]
  |  |  ------------------
  |  |  520|     43|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 41]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     43|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     41|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     41|        {                                                                     \
  |  |  |  |  |  |  491|     41|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 40]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     41|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     41|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     40|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     40|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     40|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     40|        {                                                                     \
  |  |  |  |  |  |  481|     40|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     40|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 40]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     40|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     40|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     40|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     40|          break
  ------------------
  270|     81|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPALIVE, CURLOPT_TCP_KEEPALIVE);
  ------------------
  |  |  519|     32|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 32, False: 75.7k]
  |  |  ------------------
  |  |  520|     32|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 25]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     32|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     25|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     25|        {                                                                     \
  |  |  |  |  |  |  491|     25|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 24]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     25|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     25|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     24|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     24|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     24|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     24|        {                                                                     \
  |  |  |  |  |  |  481|     24|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     24|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 24]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     24|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     24|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     24|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     24|          break
  ------------------
  271|    185|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPIDLE, CURLOPT_TCP_KEEPIDLE);
  ------------------
  |  |  519|     64|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 64, False: 75.6k]
  |  |  ------------------
  |  |  520|     64|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 61]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     64|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     61|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     61|        {                                                                     \
  |  |  |  |  |  |  491|     61|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 60]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     61|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     61|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     60|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     60|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     60|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     60|        {                                                                     \
  |  |  |  |  |  |  481|     60|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     60|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 60]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     60|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     60|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     60|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     60|          break
  ------------------
  272|    235|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPINTVL, CURLOPT_TCP_KEEPINTVL);
  ------------------
  |  |  519|     82|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 82, False: 75.6k]
  |  |  ------------------
  |  |  520|     82|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 77]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     82|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     77|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     77|        {                                                                     \
  |  |  |  |  |  |  491|     77|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 76]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     77|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     77|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     76|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     76|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     76|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     76|        {                                                                     \
  |  |  |  |  |  |  481|     76|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     76|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 76]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     76|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     76|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     76|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     76|          break
  ------------------
  273|     10|    FU32TLV(fuzz, TLV_TYPE_SASL_IR, CURLOPT_SASL_IR);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 75.7k]
  |  |  ------------------
  |  |  520|      5|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 3]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  274|    176|    FU32TLV(fuzz, TLV_TYPE_SSL_ENABLE_ALPN, CURLOPT_SSL_ENABLE_ALPN);
  ------------------
  |  |  519|     61|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 61, False: 75.6k]
  |  |  ------------------
  |  |  520|     61|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 58]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     61|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     58|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     58|        {                                                                     \
  |  |  |  |  |  |  491|     58|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 57]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     58|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     58|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     57|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     57|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     57|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     57|        {                                                                     \
  |  |  |  |  |  |  481|     57|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     57|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 57]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     57|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     57|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     57|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     57|          break
  ------------------
  275|    159|    FU32TLV(fuzz, TLV_TYPE_EXPECT_100_TIMEOUT_MS, CURLOPT_EXPECT_100_TIMEOUT_MS);
  ------------------
  |  |  519|     54|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 54, False: 75.6k]
  |  |  ------------------
  |  |  520|     54|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 53]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     54|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     53|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     53|        {                                                                     \
  |  |  |  |  |  |  491|     53|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 52]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     53|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     53|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     52|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     52|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     52|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     52|        {                                                                     \
  |  |  |  |  |  |  481|     52|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     52|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 52]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     52|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     52|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     52|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     52|          break
  ------------------
  276|     22|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYSTATUS, CURLOPT_SSL_VERIFYSTATUS);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 75.7k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 7]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  277|      6|    FU32TLV(fuzz, TLV_TYPE_SSL_FALSESTART, CURLOPT_SSL_FALSESTART);
  ------------------
  |  |  519|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 4, False: 75.7k]
  |  |  ------------------
  |  |  520|      4|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 1]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      4|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      1|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  278|     34|    FU32TLV(fuzz, TLV_TYPE_PATH_AS_IS, CURLOPT_PATH_AS_IS);
  ------------------
  |  |  519|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 17, False: 75.7k]
  |  |  ------------------
  |  |  520|     17|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 9]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     17|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      9|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      9|        {                                                                     \
  |  |  |  |  |  |  491|      9|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      9|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      9|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      8|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      8|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      8|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      8|        {                                                                     \
  |  |  |  |  |  |  481|      8|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      8|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      8|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      8|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  279|     13|    FU32TLV(fuzz, TLV_TYPE_PIPEWAIT, CURLOPT_PIPEWAIT);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 75.7k]
  |  |  ------------------
  |  |  520|      6|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 4]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      6|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  280|    135|    FU32TLV(fuzz, TLV_TYPE_STREAM_WEIGHT, CURLOPT_STREAM_WEIGHT);
  ------------------
  |  |  519|     54|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 54, False: 75.6k]
  |  |  ------------------
  |  |  520|     54|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 13, False: 41]
  |  |  ------------------
  |  |  521|     13|            rc = 255;                                                         \
  |  |  522|     13|            goto EXIT_LABEL;                                                  \
  |  |  523|     13|          }                                                                   \
  |  |  524|     54|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     41|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     41|        {                                                                     \
  |  |  |  |  |  |  491|     41|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 40]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     41|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     41|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     40|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     40|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     40|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     40|        {                                                                     \
  |  |  |  |  |  |  481|     40|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     40|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 40]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     40|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     40|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     40|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     40|          break
  ------------------
  281|     21|    FU32TLV(fuzz, TLV_TYPE_TFTP_NO_OPTIONS, CURLOPT_TFTP_NO_OPTIONS);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 75.7k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 5]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  282|     13|    FU32TLV(fuzz, TLV_TYPE_TCP_FASTOPEN, CURLOPT_TCP_FASTOPEN);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 75.7k]
  |  |  ------------------
  |  |  520|      6|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 4]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      6|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  283|     12|    FU32TLV(fuzz, TLV_TYPE_KEEP_SENDING_ON_ERROR, CURLOPT_KEEP_SENDING_ON_ERROR);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 75.7k]
  |  |  ------------------
  |  |  520|      5|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 4]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  284|     37|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_VERIFYPEER, CURLOPT_PROXY_SSL_VERIFYPEER);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 75.7k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 11]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     11|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     11|        {                                                                     \
  |  |  |  |  |  |  491|     11|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     11|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     11|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     10|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     10|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     10|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     10|        {                                                                     \
  |  |  |  |  |  |  481|     10|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     10|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     10|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     10|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     10|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     10|          break
  ------------------
  285|     12|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_VERIFYHOST, CURLOPT_PROXY_SSL_VERIFYHOST);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 75.7k]
  |  |  ------------------
  |  |  520|      5|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 4]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  286|     14|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_OPTIONS, CURLOPT_PROXY_SSL_OPTIONS);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 75.7k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 4]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  287|     36|    FU32TLV(fuzz, TLV_TYPE_SUPPRESS_CONNECT_HEADERS, CURLOPT_SUPPRESS_CONNECT_HEADERS);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 75.7k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 12]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     12|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     12|        {                                                                     \
  |  |  |  |  |  |  491|     12|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     12|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     12|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     11|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     11|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     11|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     11|        {                                                                     \
  |  |  |  |  |  |  481|     11|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     11|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     11|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     11|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     11|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     11|          break
  ------------------
  288|     89|    FU32TLV(fuzz, TLV_TYPE_SOCKS5_AUTH, CURLOPT_SOCKS5_AUTH);
  ------------------
  |  |  519|     32|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 32, False: 75.7k]
  |  |  ------------------
  |  |  520|     32|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 29]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     32|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     29|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     29|        {                                                                     \
  |  |  |  |  |  |  491|     29|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     29|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     29|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     28|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     28|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     28|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     28|        {                                                                     \
  |  |  |  |  |  |  481|     28|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     28|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 26, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     28|          {                                                                   \
  |  |  |  |  |  |  484|     26|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     26|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     26|          }                                                                   \
  |  |  |  |  |  |  487|     28|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  289|     11|    FU32TLV(fuzz, TLV_TYPE_SSH_COMPRESSION, CURLOPT_SSH_COMPRESSION);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 75.7k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 1]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      1|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  290|     22|    FU32TLV(fuzz, TLV_TYPE_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 75.7k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 7]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  291|     19|    FU32TLV(fuzz, TLV_TYPE_HAPROXYPROTOCOL, CURLOPT_HAPROXYPROTOCOL);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 75.7k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 5]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  292|     57|    FU32TLV(fuzz, TLV_TYPE_DNS_SHUFFLE_ADDRESSES, CURLOPT_DNS_SHUFFLE_ADDRESSES);
  ------------------
  |  |  519|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 20, False: 75.7k]
  |  |  ------------------
  |  |  520|     20|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 19]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     20|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     19|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     19|        {                                                                     \
  |  |  |  |  |  |  491|     19|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     19|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     19|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     18|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     18|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     18|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     18|        {                                                                     \
  |  |  |  |  |  |  481|     18|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     18|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     18|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     18|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     18|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     18|          break
  ------------------
  293|     20|    FU32TLV(fuzz, TLV_TYPE_DISALLOW_USERNAME_IN_URL, CURLOPT_DISALLOW_USERNAME_IN_URL);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 75.7k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 6]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  294|    246|    FU32TLV(fuzz, TLV_TYPE_UPLOAD_BUFFERSIZE, CURLOPT_UPLOAD_BUFFERSIZE);
  ------------------
  |  |  519|     85|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 85, False: 75.6k]
  |  |  ------------------
  |  |  520|     85|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 81]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     85|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     81|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     81|        {                                                                     \
  |  |  |  |  |  |  491|     81|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 80]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     81|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     81|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     80|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     80|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     80|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     80|        {                                                                     \
  |  |  |  |  |  |  481|     80|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     80|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 80]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     80|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     80|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     80|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     80|          break
  ------------------
  295|     94|    FU32TLV(fuzz, TLV_TYPE_UPKEEP_INTERVAL_MS, CURLOPT_UPKEEP_INTERVAL_MS);
  ------------------
  |  |  519|     33|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 33, False: 75.7k]
  |  |  ------------------
  |  |  520|     33|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 31]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     33|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     31|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     31|        {                                                                     \
  |  |  |  |  |  |  491|     31|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     31|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     31|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     30|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     30|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     30|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     30|          break
  ------------------
  296|     20|    FU32TLV(fuzz, TLV_TYPE_HTTP09_ALLOWED, CURLOPT_HTTP09_ALLOWED);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 75.7k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 5]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  297|    109|    FU32TLV(fuzz, TLV_TYPE_ALTSVC_CTRL, CURLOPT_ALTSVC_CTRL);
  ------------------
  |  |  519|     42|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 42, False: 75.6k]
  |  |  ------------------
  |  |  520|     42|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 34]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     42|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     34|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     34|        {                                                                     \
  |  |  |  |  |  |  491|     34|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     34|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     34|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     33|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     33|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     33|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     33|        {                                                                     \
  |  |  |  |  |  |  481|     33|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     33|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     33|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     33|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     32|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     32|          break
  ------------------
  298|    168|    FU32TLV(fuzz, TLV_TYPE_MAXAGE_CONN, CURLOPT_MAXAGE_CONN);
  ------------------
  |  |  519|     61|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 61, False: 75.6k]
  |  |  ------------------
  |  |  520|     61|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 54]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     61|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     54|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     54|        {                                                                     \
  |  |  |  |  |  |  491|     54|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 53]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     54|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     54|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     53|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     53|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     53|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     53|        {                                                                     \
  |  |  |  |  |  |  481|     53|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     53|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 53]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     53|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     53|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     53|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     53|          break
  ------------------
  299|     11|    FU32TLV(fuzz, TLV_TYPE_MAIL_RCPT_ALLOWFAILS, CURLOPT_MAIL_RCPT_ALLOWFAILS);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 75.7k]
  |  |  ------------------
  |  |  520|      6|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 3]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      6|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  300|     24|    FU32TLV(fuzz, TLV_TYPE_HSTS_CTRL, CURLOPT_HSTS_CTRL);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 75.7k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 8]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      8|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      8|        {                                                                     \
  |  |  |  |  |  |  491|      8|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      8|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      8|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      7|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      7|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      7|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      7|        {                                                                     \
  |  |  |  |  |  |  481|      7|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      7|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      7|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      7|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      7|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      7|          break
  ------------------
  301|     20|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYPEER, CURLOPT_DOH_SSL_VERIFYPEER);
  ------------------
  |  |  519|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 15, False: 75.7k]
  |  |  ------------------
  |  |  520|     15|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 12, False: 3]
  |  |  ------------------
  |  |  521|     12|            rc = 255;                                                         \
  |  |  522|     12|            goto EXIT_LABEL;                                                  \
  |  |  523|     12|          }                                                                   \
  |  |  524|     15|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  302|     19|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYHOST, CURLOPT_DOH_SSL_VERIFYHOST);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 75.7k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 4]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  303|     20|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYSTATUS, CURLOPT_DOH_SSL_VERIFYSTATUS);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 75.7k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 6]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  304|    141|    FU32TLV(fuzz, TLV_TYPE_MAXLIFETIME_CONN, CURLOPT_MAXLIFETIME_CONN);
  ------------------
  |  |  519|     54|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 54, False: 75.6k]
  |  |  ------------------
  |  |  520|     54|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 10, False: 44]
  |  |  ------------------
  |  |  521|     10|            rc = 255;                                                         \
  |  |  522|     10|            goto EXIT_LABEL;                                                  \
  |  |  523|     10|          }                                                                   \
  |  |  524|     54|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     44|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     44|        {                                                                     \
  |  |  |  |  |  |  491|     44|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 43]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     44|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     44|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     43|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     43|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     43|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     43|        {                                                                     \
  |  |  |  |  |  |  481|     43|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     43|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 43]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     43|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     43|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     43|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     43|          break
  ------------------
  305|     19|    FU32TLV(fuzz, TLV_TYPE_MIME_OPTIONS, CURLOPT_MIME_OPTIONS);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 6]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  306|    192|    FU32TLV(fuzz, TLV_TYPE_CA_CACHE_TIMEOUT, CURLOPT_CA_CACHE_TIMEOUT);
  ------------------
  |  |  519|     67|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 67, False: 75.6k]
  |  |  ------------------
  |  |  520|     67|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 63]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     67|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     63|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     63|        {                                                                     \
  |  |  |  |  |  |  491|     63|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 62]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     63|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     63|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     62|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     62|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     62|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     62|        {                                                                     \
  |  |  |  |  |  |  481|     62|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     62|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 62]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     62|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     62|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     62|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     62|          break
  ------------------
  307|     21|    FU32TLV(fuzz, TLV_TYPE_QUICK_EXIT, CURLOPT_QUICK_EXIT);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 75.7k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 5]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  308|     94|    FU32TLV(fuzz, TLV_TYPE_SERVER_RESPONSE_TIMEOUT_MS, CURLOPT_SERVER_RESPONSE_TIMEOUT_MS);
  ------------------
  |  |  519|     39|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 39, False: 75.6k]
  |  |  ------------------
  |  |  520|     39|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 28]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     39|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     28|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     28|        {                                                                     \
  |  |  |  |  |  |  491|     28|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     28|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     28|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     27|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     27|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     27|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     27|        {                                                                     \
  |  |  |  |  |  |  481|     27|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     27|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     27|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     27|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     27|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     27|          break
  ------------------
  309|    192|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPCNT, CURLOPT_TCP_KEEPCNT);
  ------------------
  |  |  519|     65|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 65, False: 75.6k]
  |  |  ------------------
  |  |  520|     65|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 64]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     65|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     64|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     64|        {                                                                     \
  |  |  |  |  |  |  491|     64|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 63]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     64|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     64|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     63|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     63|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     63|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     63|        {                                                                     \
  |  |  |  |  |  |  481|     63|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     63|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 63]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     63|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     63|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     63|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     63|          break
  ------------------
  310|    360|    FU32TLV(fuzz, TLV_TYPE_SSLVERSION, CURLOPT_SSLVERSION);
  ------------------
  |  |  519|    123|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 123, False: 75.6k]
  |  |  ------------------
  |  |  520|    123|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 119]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|    123|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    119|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    119|        {                                                                     \
  |  |  |  |  |  |  491|    119|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 118]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    119|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    119|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    118|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    118|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    118|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    118|        {                                                                     \
  |  |  |  |  |  |  481|    118|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    118|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 26, False: 92]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    118|          {                                                                   \
  |  |  |  |  |  |  484|     26|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     26|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     26|          }                                                                   \
  |  |  |  |  |  |  487|    118|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     92|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     92|          break
  ------------------
  311|    142|    FU32TLV(fuzz, TLV_TYPE_TIMECONDITION, CURLOPT_TIMECONDITION);
  ------------------
  |  |  519|     49|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 49, False: 75.6k]
  |  |  ------------------
  |  |  520|     49|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 47]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     49|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     47|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     47|        {                                                                     \
  |  |  |  |  |  |  491|     47|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 46]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     47|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     47|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     46|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     46|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     46|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     46|        {                                                                     \
  |  |  |  |  |  |  481|     46|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     46|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 40, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     46|          {                                                                   \
  |  |  |  |  |  |  484|     40|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     40|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     40|          }                                                                   \
  |  |  |  |  |  |  487|     46|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  312|    245|    FU32TLV(fuzz, TLV_TYPE_PROXYAUTH, CURLOPT_PROXYAUTH);
  ------------------
  |  |  519|     90|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 90, False: 75.6k]
  |  |  ------------------
  |  |  520|     90|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 12, False: 78]
  |  |  ------------------
  |  |  521|     12|            rc = 255;                                                         \
  |  |  522|     12|            goto EXIT_LABEL;                                                  \
  |  |  523|     12|          }                                                                   \
  |  |  524|     90|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     78|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     78|        {                                                                     \
  |  |  |  |  |  |  491|     78|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 77]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     78|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     78|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     77|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     77|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     77|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     77|        {                                                                     \
  |  |  |  |  |  |  481|     77|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     77|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 76]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     77|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     77|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     76|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     76|          break
  ------------------
  313|    160|    FU32TLV(fuzz, TLV_TYPE_IPRESOLVE, CURLOPT_IPRESOLVE);
  ------------------
  |  |  519|     55|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 55, False: 75.6k]
  |  |  ------------------
  |  |  520|     55|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 53]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     55|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     53|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     53|        {                                                                     \
  |  |  |  |  |  |  491|     53|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 52]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     53|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     53|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     52|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     52|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     52|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     52|        {                                                                     \
  |  |  |  |  |  |  481|     52|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     52|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 34, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     52|          {                                                                   \
  |  |  |  |  |  |  484|     34|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     34|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     34|          }                                                                   \
  |  |  |  |  |  |  487|     52|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     18|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     18|          break
  ------------------
  314|    127|    FU32TLV(fuzz, TLV_TYPE_USE_SSL, CURLOPT_USE_SSL);
  ------------------
  |  |  519|     44|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 44, False: 75.6k]
  |  |  ------------------
  |  |  520|     44|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 42]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     44|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     42|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     42|        {                                                                     \
  |  |  |  |  |  |  491|     42|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 41]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     42|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     42|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     41|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     41|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     41|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     41|        {                                                                     \
  |  |  |  |  |  |  481|     41|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     41|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 39, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     41|          {                                                                   \
  |  |  |  |  |  |  484|     39|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     39|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     39|          }                                                                   \
  |  |  |  |  |  |  487|     41|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  315|    120|    FU32TLV(fuzz, TLV_TYPE_FTPSSLAUTH, CURLOPT_FTPSSLAUTH);
  ------------------
  |  |  519|     47|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 47, False: 75.6k]
  |  |  ------------------
  |  |  520|     47|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 10, False: 37]
  |  |  ------------------
  |  |  521|     10|            rc = 255;                                                         \
  |  |  522|     10|            goto EXIT_LABEL;                                                  \
  |  |  523|     10|          }                                                                   \
  |  |  524|     47|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     37|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     37|        {                                                                     \
  |  |  |  |  |  |  491|     37|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 36]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     37|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     37|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     36|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     36|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     36|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     36|        {                                                                     \
  |  |  |  |  |  |  481|     36|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     36|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 33, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     36|          {                                                                   \
  |  |  |  |  |  |  484|     33|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     33|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     33|          }                                                                   \
  |  |  |  |  |  |  487|     36|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  316|    134|    FU32TLV(fuzz, TLV_TYPE_FTP_FILEMETHOD, CURLOPT_FTP_FILEMETHOD);
  ------------------
  |  |  519|     47|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 47, False: 75.6k]
  |  |  ------------------
  |  |  520|     47|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 44]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     47|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     44|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     44|        {                                                                     \
  |  |  |  |  |  |  491|     44|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 43]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     44|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     44|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     43|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     43|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     43|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     43|        {                                                                     \
  |  |  |  |  |  |  481|     43|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     43|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 41, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     43|          {                                                                   \
  |  |  |  |  |  |  484|     41|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     41|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     41|          }                                                                   \
  |  |  |  |  |  |  487|     43|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  317|      5|    FU32TLV(fuzz, TLV_TYPE_SSH_AUTH_TYPES, CURLOPT_SSH_AUTH_TYPES);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 75.7k]
  |  |  ------------------
  |  |  520|      3|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 1]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      1|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  318|    103|    FU32TLV(fuzz, TLV_TYPE_POSTREDIR, CURLOPT_POSTREDIR);
  ------------------
  |  |  519|     42|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 42, False: 75.6k]
  |  |  ------------------
  |  |  520|     42|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 31]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     42|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     31|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     31|        {                                                                     \
  |  |  |  |  |  |  491|     31|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     31|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     31|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     30|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     30|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     30|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     30|          break
  ------------------
  319|      7|    FU32TLV(fuzz, TLV_TYPE_GSSAPI_DELEGATION, CURLOPT_GSSAPI_DELEGATION);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 75.7k]
  |  |  ------------------
  |  |  520|      5|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 1]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      1|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  320|     30|    FU32TLV(fuzz, TLV_TYPE_SSL_OPTIONS, CURLOPT_SSL_OPTIONS);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 75.7k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 9]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      9|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      9|        {                                                                     \
  |  |  |  |  |  |  491|      9|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      9|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      9|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      8|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      8|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      8|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      8|        {                                                                     \
  |  |  |  |  |  |  481|      8|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      8|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      8|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      8|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  321|    712|    FU32TLV(fuzz, TLV_TYPE_HEADEROPT, CURLOPT_HEADEROPT);
  ------------------
  |  |  519|    239|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 239, False: 75.4k]
  |  |  ------------------
  |  |  520|    239|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 237]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    239|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    237|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    237|        {                                                                     \
  |  |  |  |  |  |  491|    237|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 236]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    237|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    237|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    236|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    236|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    236|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    236|        {                                                                     \
  |  |  |  |  |  |  481|    236|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    236|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 236]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    236|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    236|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    236|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    236|          break
  ------------------
  322|     60|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSLVERSION, CURLOPT_PROXY_SSLVERSION);
  ------------------
  |  |  519|     23|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 23, False: 75.7k]
  |  |  ------------------
  |  |  520|     23|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 19]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     23|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     19|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     19|        {                                                                     \
  |  |  |  |  |  |  491|     19|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     19|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     19|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     18|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     18|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     18|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     18|        {                                                                     \
  |  |  |  |  |  |  481|     18|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     18|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 9, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     18|          {                                                                   \
  |  |  |  |  |  |  484|      9|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      9|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      9|          }                                                                   \
  |  |  |  |  |  |  487|     18|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  323|    228|    FU32TLV(fuzz, TLV_TYPE_RESUME_FROM_LARGE, CURLOPT_RESUME_FROM_LARGE);
  ------------------
  |  |  519|     79|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 79, False: 75.6k]
  |  |  ------------------
  |  |  520|     79|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 75]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     79|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     75|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     75|        {                                                                     \
  |  |  |  |  |  |  491|     75|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 74]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     75|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     75|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     74|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     74|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     74|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     74|        {                                                                     \
  |  |  |  |  |  |  481|     74|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     74|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 74]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     74|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     74|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     74|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     74|          break
  ------------------
  324|    202|    FU32TLV(fuzz, TLV_TYPE_MAXFILESIZE_LARGE, CURLOPT_MAXFILESIZE_LARGE);
  ------------------
  |  |  519|     69|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 69, False: 75.6k]
  |  |  ------------------
  |  |  520|     69|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 67]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     69|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     67|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     67|        {                                                                     \
  |  |  |  |  |  |  491|     67|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 66]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     67|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     67|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     66|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     66|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     66|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     66|        {                                                                     \
  |  |  |  |  |  |  481|     66|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     66|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 66]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     66|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     66|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     66|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     66|          break
  ------------------
  325|       |    // too easy for API misuse FU32TLV(fuzz, TLV_TYPE_POSTFIELDSIZE_LARGE, CURLOPT_POSTFIELDSIZE_LARGE);
  326|    289|    FU32TLV(fuzz, TLV_TYPE_MAX_SEND_SPEED_LARGE, CURLOPT_MAX_SEND_SPEED_LARGE);
  ------------------
  |  |  519|     98|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 98, False: 75.6k]
  |  |  ------------------
  |  |  520|     98|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 96]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     98|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     96|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     96|        {                                                                     \
  |  |  |  |  |  |  491|     96|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     96|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     96|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     95|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     95|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     95|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     95|        {                                                                     \
  |  |  |  |  |  |  481|     95|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     95|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     95|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     95|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     95|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     95|          break
  ------------------
  327|    171|    FU32TLV(fuzz, TLV_TYPE_MAX_RECV_SPEED_LARGE, CURLOPT_MAX_RECV_SPEED_LARGE);
  ------------------
  |  |  519|     60|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 60, False: 75.6k]
  |  |  ------------------
  |  |  520|     60|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 56]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     60|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     56|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     56|        {                                                                     \
  |  |  |  |  |  |  491|     56|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 55]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     56|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     56|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     55|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     55|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     55|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     55|        {                                                                     \
  |  |  |  |  |  |  481|     55|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     55|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 55]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     55|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     55|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     55|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     55|          break
  ------------------
  328|     18|    FU32TLV(fuzz, TLV_TYPE_TIMEVALUE_LARGE, CURLOPT_TIMEVALUE_LARGE);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 75.7k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 4]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  329|       |
  330|       |    /* Define a set of singleton TLVs - they can only have their value set once
  331|       |       and all follow the same pattern. */
  332|  15.3k|    FSINGLETONTLV(fuzz, TLV_TYPE_URL, CURLOPT_URL);
  ------------------
  |  |  506|  7.65k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 7.65k, False: 68.0k]
  |  |  ------------------
  |  |  507|  7.65k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  7.65k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  7.65k|        {                                                                     \
  |  |  |  |  |  |  491|  7.65k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 7.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  7.65k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  7.65k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  7.65k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  7.65k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  7.65k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  7.65k|        {                                                                     \
  |  |  |  |  |  |  481|  7.65k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  7.65k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 7.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  7.65k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  7.65k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  7.65k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  7.65k|          break
  ------------------
  333|    841|    FSINGLETONTLV(fuzz, TLV_TYPE_DOH_URL, CURLOPT_DOH_URL);
  ------------------
  |  |  506|    421|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 421, False: 75.3k]
  |  |  ------------------
  |  |  507|    421|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    421|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    421|        {                                                                     \
  |  |  |  |  |  |  491|    421|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 420]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    421|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    421|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    420|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    420|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    420|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    420|        {                                                                     \
  |  |  |  |  |  |  481|    420|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    420|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 420]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    420|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    420|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    420|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    420|          break
  ------------------
  334|     67|    FSINGLETONTLV(fuzz, TLV_TYPE_USERNAME, CURLOPT_USERNAME);
  ------------------
  |  |  506|     34|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 34, False: 75.7k]
  |  |  ------------------
  |  |  507|     34|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     34|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     34|        {                                                                     \
  |  |  |  |  |  |  491|     34|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     34|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     34|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     33|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     33|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     33|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     33|        {                                                                     \
  |  |  |  |  |  |  481|     33|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     33|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     33|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     33|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     33|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     33|          break
  ------------------
  335|    193|    FSINGLETONTLV(fuzz, TLV_TYPE_PASSWORD, CURLOPT_PASSWORD);
  ------------------
  |  |  506|     97|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 97, False: 75.6k]
  |  |  ------------------
  |  |  507|     97|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     97|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     97|        {                                                                     \
  |  |  |  |  |  |  491|     97|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 96]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     97|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     97|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     96|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     96|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     96|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     96|        {                                                                     \
  |  |  |  |  |  |  481|     96|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     96|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 96]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     96|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     96|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     96|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     96|          break
  ------------------
  336|     65|    FSINGLETONTLV(fuzz, TLV_TYPE_COOKIE, CURLOPT_COOKIE);
  ------------------
  |  |  506|     33|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 33, False: 75.7k]
  |  |  ------------------
  |  |  507|     33|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     33|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     33|        {                                                                     \
  |  |  |  |  |  |  491|     33|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     33|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     33|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     32|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     32|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     32|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     32|        {                                                                     \
  |  |  |  |  |  |  481|     32|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     32|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     32|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     32|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     32|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     32|          break
  ------------------
  337|     63|    FSINGLETONTLV(fuzz, TLV_TYPE_RANGE, CURLOPT_RANGE);
  ------------------
  |  |  506|     32|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 32, False: 75.7k]
  |  |  ------------------
  |  |  507|     32|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     32|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     32|        {                                                                     \
  |  |  |  |  |  |  491|     32|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 31]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     32|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     32|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     31|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     31|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     31|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     31|        {                                                                     \
  |  |  |  |  |  |  481|     31|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     31|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 31]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     31|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     31|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     31|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     31|          break
  ------------------
  338|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_CUSTOMREQUEST, CURLOPT_CUSTOMREQUEST);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 75.7k]
  |  |  ------------------
  |  |  507|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     13|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     13|          break
  ------------------
  339|     21|    FSINGLETONTLV(fuzz, TLV_TYPE_MAIL_FROM, CURLOPT_MAIL_FROM);
  ------------------
  |  |  506|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11, False: 75.7k]
  |  |  ------------------
  |  |  507|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     11|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     11|        {                                                                     \
  |  |  |  |  |  |  491|     11|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     11|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     11|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     10|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     10|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     10|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     10|        {                                                                     \
  |  |  |  |  |  |  481|     10|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     10|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     10|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     10|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     10|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     10|          break
  ------------------
  340|     47|    FSINGLETONTLV(fuzz, TLV_TYPE_ACCEPTENCODING, CURLOPT_ACCEPT_ENCODING);
  ------------------
  |  |  506|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 24, False: 75.7k]
  |  |  ------------------
  |  |  507|     24|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     24|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     24|        {                                                                     \
  |  |  |  |  |  |  491|     24|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     24|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     24|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     23|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     23|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     23|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     23|        {                                                                     \
  |  |  |  |  |  |  481|     23|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     23|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     23|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     23|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     23|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     23|          break
  ------------------
  341|     13|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_SESSION_ID, CURLOPT_RTSP_SESSION_ID);
  ------------------
  |  |  506|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 7, False: 75.7k]
  |  |  ------------------
  |  |  507|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      6|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      6|          break
  ------------------
  342|     15|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_STREAM_URI, CURLOPT_RTSP_STREAM_URI);
  ------------------
  |  |  506|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  507|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      8|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      8|        {                                                                     \
  |  |  |  |  |  |  491|      8|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      8|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      8|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      7|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      7|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      7|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      7|        {                                                                     \
  |  |  |  |  |  |  481|      7|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      7|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      7|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      7|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      7|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      7|          break
  ------------------
  343|     37|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_TRANSPORT, CURLOPT_RTSP_TRANSPORT);
  ------------------
  |  |  506|     19|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 19, False: 75.7k]
  |  |  ------------------
  |  |  507|     19|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     19|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     19|        {                                                                     \
  |  |  |  |  |  |  491|     19|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     19|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     19|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     18|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     18|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     18|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     18|        {                                                                     \
  |  |  |  |  |  |  481|     18|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     18|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     18|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     18|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     18|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     18|          break
  ------------------
  344|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_MAIL_AUTH, CURLOPT_MAIL_AUTH);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 75.7k]
  |  |  ------------------
  |  |  507|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     16|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     16|        {                                                                     \
  |  |  |  |  |  |  491|     16|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     16|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     16|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     15|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     15|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     15|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     15|        {                                                                     \
  |  |  |  |  |  |  481|     15|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     15|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     15|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     15|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     15|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     15|          break
  ------------------
  345|     21|    FSINGLETONTLV(fuzz, TLV_TYPE_LOGIN_OPTIONS, CURLOPT_LOGIN_OPTIONS);
  ------------------
  |  |  506|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11, False: 75.7k]
  |  |  ------------------
  |  |  507|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     11|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     11|        {                                                                     \
  |  |  |  |  |  |  491|     11|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     11|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     11|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     10|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     10|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     10|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     10|        {                                                                     \
  |  |  |  |  |  |  481|     10|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     10|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     10|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     10|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     10|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     10|          break
  ------------------
  346|     43|    FSINGLETONTLV(fuzz, TLV_TYPE_XOAUTH2_BEARER, CURLOPT_XOAUTH2_BEARER);
  ------------------
  |  |  506|     22|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 22, False: 75.7k]
  |  |  ------------------
  |  |  507|     22|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     22|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     22|        {                                                                     \
  |  |  |  |  |  |  491|     22|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     22|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     22|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     21|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     21|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     21|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     21|        {                                                                     \
  |  |  |  |  |  |  481|     21|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     21|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     21|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     21|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     21|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     21|          break
  ------------------
  347|    151|    FSINGLETONTLV(fuzz, TLV_TYPE_USERPWD, CURLOPT_USERPWD);
  ------------------
  |  |  506|     76|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 76, False: 75.6k]
  |  |  ------------------
  |  |  507|     76|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     76|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     76|        {                                                                     \
  |  |  |  |  |  |  491|     76|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 75]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     76|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     76|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     75|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     75|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     75|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     75|        {                                                                     \
  |  |  |  |  |  |  481|     75|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     75|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 75]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     75|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     75|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     75|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     75|          break
  ------------------
  348|     41|    FSINGLETONTLV(fuzz, TLV_TYPE_USERAGENT, CURLOPT_USERAGENT);
  ------------------
  |  |  506|     21|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 21, False: 75.7k]
  |  |  ------------------
  |  |  507|     21|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     21|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     21|        {                                                                     \
  |  |  |  |  |  |  491|     21|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 20]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     21|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     21|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     20|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     20|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     20|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     20|        {                                                                     \
  |  |  |  |  |  |  481|     20|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     20|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 20]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     20|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     20|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     20|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     20|          break
  ------------------
  349|      8|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256);
  ------------------
  |  |  506|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 4, False: 75.7k]
  |  |  ------------------
  |  |  507|      4|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      4|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 4, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      4|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      4|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      4|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  350|  4.77k|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY, CURLOPT_PROXY);
  ------------------
  |  |  506|  2.38k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 2.38k, False: 73.3k]
  |  |  ------------------
  |  |  507|  2.38k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  2.38k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  2.38k|        {                                                                     \
  |  |  |  |  |  |  491|  2.38k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  2.38k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  2.38k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  2.38k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  2.38k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  2.38k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  2.38k|        {                                                                     \
  |  |  |  |  |  |  481|  2.38k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  2.38k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  2.38k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  2.38k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  2.38k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  2.38k|          break
  ------------------
  351|    329|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYUSERPWD, CURLOPT_PROXYUSERPWD);
  ------------------
  |  |  506|    165|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 165, False: 75.5k]
  |  |  ------------------
  |  |  507|    165|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    165|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    165|        {                                                                     \
  |  |  |  |  |  |  491|    165|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 164]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    165|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    165|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    164|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    164|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    164|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    164|        {                                                                     \
  |  |  |  |  |  |  481|    164|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    164|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 162]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    164|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|    164|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    162|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    162|          break
  ------------------
  352|     19|    FSINGLETONTLV(fuzz, TLV_TYPE_REFERER, CURLOPT_REFERER);
  ------------------
  |  |  506|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 10, False: 75.7k]
  |  |  ------------------
  |  |  507|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     10|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     10|        {                                                                     \
  |  |  |  |  |  |  491|     10|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     10|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     10|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      9|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      9|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      9|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      9|        {                                                                     \
  |  |  |  |  |  |  481|      9|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      9|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      9|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      9|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      9|          break
  ------------------
  353|     13|    FSINGLETONTLV(fuzz, TLV_TYPE_FTPPORT, CURLOPT_FTPPORT);
  ------------------
  |  |  506|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 7, False: 75.7k]
  |  |  ------------------
  |  |  507|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      6|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      6|          break
  ------------------
  354|     45|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLCERT, CURLOPT_SSLCERT);
  ------------------
  |  |  506|     23|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 23, False: 75.7k]
  |  |  ------------------
  |  |  507|     23|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     23|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     23|        {                                                                     \
  |  |  |  |  |  |  491|     23|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     23|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     23|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     22|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     22|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     22|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     22|        {                                                                     \
  |  |  |  |  |  |  481|     22|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     22|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     22|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     22|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     22|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     22|          break
  ------------------
  355|     37|    FSINGLETONTLV(fuzz, TLV_TYPE_KEYPASSWD, CURLOPT_KEYPASSWD);
  ------------------
  |  |  506|     19|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 19, False: 75.7k]
  |  |  ------------------
  |  |  507|     19|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     19|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     19|        {                                                                     \
  |  |  |  |  |  |  491|     19|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     19|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     19|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     18|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     18|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     18|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     18|        {                                                                     \
  |  |  |  |  |  |  481|     18|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     18|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     18|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     18|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     18|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     18|          break
  ------------------
  356|    609|    FSINGLETONTLV(fuzz, TLV_TYPE_INTERFACE, CURLOPT_INTERFACE);
  ------------------
  |  |  506|    305|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 305, False: 75.4k]
  |  |  ------------------
  |  |  507|    305|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    305|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    305|        {                                                                     \
  |  |  |  |  |  |  491|    305|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 304]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    305|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    305|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    304|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    304|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    304|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    304|        {                                                                     \
  |  |  |  |  |  |  481|    304|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    304|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 7, False: 297]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    304|          {                                                                   \
  |  |  |  |  |  |  484|      7|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      7|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      7|          }                                                                   \
  |  |  |  |  |  |  487|    304|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    297|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    297|          break
  ------------------
  357|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_KRBLEVEL, CURLOPT_KRBLEVEL);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  358|    451|    FSINGLETONTLV(fuzz, TLV_TYPE_CAINFO, CURLOPT_CAINFO);
  ------------------
  |  |  506|    226|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 226, False: 75.5k]
  |  |  ------------------
  |  |  507|    226|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    226|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    226|        {                                                                     \
  |  |  |  |  |  |  491|    226|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 225]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    226|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    226|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    225|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    225|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    225|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    225|        {                                                                     \
  |  |  |  |  |  |  481|    225|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    225|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 225]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    225|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    225|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    225|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    225|          break
  ------------------
  359|  1.72k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSL_CIPHER_LIST, CURLOPT_SSL_CIPHER_LIST);
  ------------------
  |  |  506|    863|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 863, False: 74.8k]
  |  |  ------------------
  |  |  507|    863|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    863|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    863|        {                                                                     \
  |  |  |  |  |  |  491|    863|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 862]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    863|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    863|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    862|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    862|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    862|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    862|        {                                                                     \
  |  |  |  |  |  |  481|    862|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    862|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 862]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    862|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    862|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    862|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    862|          break
  ------------------
  360|     51|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLCERTTYPE, CURLOPT_SSLCERTTYPE);
  ------------------
  |  |  506|     26|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 26, False: 75.7k]
  |  |  ------------------
  |  |  507|     26|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     26|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     26|        {                                                                     \
  |  |  |  |  |  |  491|     26|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     26|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     26|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     25|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     25|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     25|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     25|        {                                                                     \
  |  |  |  |  |  |  481|     25|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     25|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     25|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     25|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     25|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     25|          break
  ------------------
  361|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLKEY, CURLOPT_SSLKEY);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 75.7k]
  |  |  ------------------
  |  |  507|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     16|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     16|        {                                                                     \
  |  |  |  |  |  |  491|     16|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     16|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     16|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     15|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     15|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     15|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     15|        {                                                                     \
  |  |  |  |  |  |  481|     15|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     15|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     15|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     15|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     15|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     15|          break
  ------------------
  362|     67|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLKEYTYPE, CURLOPT_SSLKEYTYPE);
  ------------------
  |  |  506|     34|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 34, False: 75.7k]
  |  |  ------------------
  |  |  507|     34|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     34|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     34|        {                                                                     \
  |  |  |  |  |  |  491|     34|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     34|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     34|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     33|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     33|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     33|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     33|        {                                                                     \
  |  |  |  |  |  |  481|     33|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     33|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     33|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     33|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     33|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     33|          break
  ------------------
  363|  1.62k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLENGINE, CURLOPT_SSLENGINE);
  ------------------
  |  |  506|    813|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 813, False: 74.9k]
  |  |  ------------------
  |  |  507|    813|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    813|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    813|        {                                                                     \
  |  |  |  |  |  |  491|    813|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 812]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    813|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    813|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    812|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    812|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    812|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    812|        {                                                                     \
  |  |  |  |  |  |  481|    812|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    812|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 94, False: 718]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    812|          {                                                                   \
  |  |  |  |  |  |  484|     94|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     94|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     94|          }                                                                   \
  |  |  |  |  |  |  487|    812|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    718|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    718|          break
  ------------------
  364|    353|    FSINGLETONTLV(fuzz, TLV_TYPE_CAPATH, CURLOPT_CAPATH);
  ------------------
  |  |  506|    177|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 177, False: 75.5k]
  |  |  ------------------
  |  |  507|    177|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    177|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    177|        {                                                                     \
  |  |  |  |  |  |  491|    177|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 176]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    177|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    177|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    176|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    176|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    176|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    176|        {                                                                     \
  |  |  |  |  |  |  481|    176|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    176|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 176]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    176|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    176|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    176|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    176|          break
  ------------------
  365|    239|    FSINGLETONTLV(fuzz, TLV_TYPE_FTP_ACCOUNT, CURLOPT_FTP_ACCOUNT);
  ------------------
  |  |  506|    120|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 120, False: 75.6k]
  |  |  ------------------
  |  |  507|    120|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    120|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    120|        {                                                                     \
  |  |  |  |  |  |  491|    120|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 119]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    120|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    120|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    119|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    119|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    119|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    119|        {                                                                     \
  |  |  |  |  |  |  481|    119|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    119|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 119]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    119|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    119|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    119|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    119|          break
  ------------------
  366|  3.79k|    FSINGLETONTLV(fuzz, TLV_TYPE_COOKIELIST, CURLOPT_COOKIELIST);
  ------------------
  |  |  506|  1.89k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1.89k, False: 73.8k]
  |  |  ------------------
  |  |  507|  1.89k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.89k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.89k|        {                                                                     \
  |  |  |  |  |  |  491|  1.89k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.89k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.89k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  1.89k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  1.89k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  1.89k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.89k|        {                                                                     \
  |  |  |  |  |  |  481|  1.89k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.89k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.89k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  1.89k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.89k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  1.89k|          break
  ------------------
  367|     19|    FSINGLETONTLV(fuzz, TLV_TYPE_FTP_ALTERNATIVE_TO_USER, CURLOPT_FTP_ALTERNATIVE_TO_USER);
  ------------------
  |  |  506|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 10, False: 75.7k]
  |  |  ------------------
  |  |  507|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     10|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     10|        {                                                                     \
  |  |  |  |  |  |  491|     10|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     10|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     10|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      9|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      9|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      9|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      9|        {                                                                     \
  |  |  |  |  |  |  481|      9|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      9|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      9|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      9|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      9|          break
  ------------------
  368|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_PUBLIC_KEYFILE, CURLOPT_SSH_PUBLIC_KEYFILE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  369|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_PRIVATE_KEYFILE, CURLOPT_SSH_PRIVATE_KEYFILE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  370|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_HOST_PUBLIC_KEY_MD5, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  371|     35|    FSINGLETONTLV(fuzz, TLV_TYPE_ISSUERCERT, CURLOPT_ISSUERCERT);
  ------------------
  |  |  506|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 18, False: 75.7k]
  |  |  ------------------
  |  |  507|     18|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     18|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     18|        {                                                                     \
  |  |  |  |  |  |  491|     18|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     18|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     18|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     17|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     17|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     17|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     17|        {                                                                     \
  |  |  |  |  |  |  481|     17|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     17|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     17|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     17|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     17|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     17|          break
  ------------------
  372|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYUSERNAME, CURLOPT_PROXYUSERNAME);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 75.7k]
  |  |  ------------------
  |  |  507|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      4|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      4|          break
  ------------------
  373|     39|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYPASSWORD, CURLOPT_PROXYPASSWORD);
  ------------------
  |  |  506|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 20, False: 75.7k]
  |  |  ------------------
  |  |  507|     20|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     20|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     20|        {                                                                     \
  |  |  |  |  |  |  491|     20|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     20|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     20|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     19|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     19|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     19|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     19|        {                                                                     \
  |  |  |  |  |  |  481|     19|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     19|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     19|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     19|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     19|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     19|          break
  ------------------
  374|    533|    FSINGLETONTLV(fuzz, TLV_TYPE_NOPROXY, CURLOPT_NOPROXY);
  ------------------
  |  |  506|    267|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 267, False: 75.4k]
  |  |  ------------------
  |  |  507|    267|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    267|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    267|        {                                                                     \
  |  |  |  |  |  |  491|    267|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 266]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    267|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    267|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    266|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    266|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    266|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    266|        {                                                                     \
  |  |  |  |  |  |  481|    266|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    266|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 266]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    266|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    266|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    266|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    266|          break
  ------------------
  375|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_KNOWNHOSTS, CURLOPT_SSH_KNOWNHOSTS);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  376|      4|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_USERNAME, CURLOPT_TLSAUTH_USERNAME);
  ------------------
  |  |  506|      2|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 2, False: 75.7k]
  |  |  ------------------
  |  |  507|      2|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      2|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      2|        {                                                                     \
  |  |  |  |  |  |  491|      2|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      2|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      2|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      2|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  377|      6|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_PASSWORD, CURLOPT_TLSAUTH_PASSWORD);
  ------------------
  |  |  506|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 3, False: 75.7k]
  |  |  ------------------
  |  |  507|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      3|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      3|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      3|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      3|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  378|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_TYPE, CURLOPT_TLSAUTH_TYPE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  379|      6|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_SERVERS, CURLOPT_DNS_SERVERS);
  ------------------
  |  |  506|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 3, False: 75.7k]
  |  |  ------------------
  |  |  507|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      3|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      3|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      3|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      3|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  380|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_INTERFACE, CURLOPT_DNS_INTERFACE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  381|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_LOCAL_IP4, CURLOPT_DNS_LOCAL_IP4);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  382|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_LOCAL_IP6, CURLOPT_DNS_LOCAL_IP6);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  383|     29|    FSINGLETONTLV(fuzz, TLV_TYPE_PINNEDPUBLICKEY, CURLOPT_PINNEDPUBLICKEY);
  ------------------
  |  |  506|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 15, False: 75.7k]
  |  |  ------------------
  |  |  507|     15|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     15|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     15|        {                                                                     \
  |  |  |  |  |  |  491|     15|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     15|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     15|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     14|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     14|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     14|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     14|        {                                                                     \
  |  |  |  |  |  |  481|     14|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     14|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     14|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     14|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     14|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     14|          break
  ------------------
  384|     49|    FSINGLETONTLV(fuzz, TLV_TYPE_UNIX_SOCKET_PATH, CURLOPT_UNIX_SOCKET_PATH);
  ------------------
  |  |  506|     25|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 25, False: 75.7k]
  |  |  ------------------
  |  |  507|     25|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     25|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     25|        {                                                                     \
  |  |  |  |  |  |  491|     25|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 24]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     25|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     25|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     24|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     24|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     24|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     24|        {                                                                     \
  |  |  |  |  |  |  481|     24|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     24|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 24]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     24|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     24|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     24|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     24|          break
  ------------------
  385|     33|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SERVICE_NAME, CURLOPT_PROXY_SERVICE_NAME);
  ------------------
  |  |  506|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 17, False: 75.7k]
  |  |  ------------------
  |  |  507|     17|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     17|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     17|        {                                                                     \
  |  |  |  |  |  |  491|     17|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     17|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     17|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     16|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     16|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     16|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     16|        {                                                                     \
  |  |  |  |  |  |  481|     16|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     16|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     16|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     16|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     16|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     16|          break
  ------------------
  386|     32|    FSINGLETONTLV(fuzz, TLV_TYPE_SERVICE_NAME, CURLOPT_SERVICE_NAME);
  ------------------
  |  |  506|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 17, False: 75.7k]
  |  |  ------------------
  |  |  507|     17|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     17|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     17|        {                                                                     \
  |  |  |  |  |  |  491|     17|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 2, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     17|          {                                                                   \
  |  |  |  |  |  |  493|      2|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      2|          }                                                                   \
  |  |  |  |  |  |  496|     17|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     15|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     15|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     15|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     15|        {                                                                     \
  |  |  |  |  |  |  481|     15|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     15|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     15|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     15|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     15|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     15|          break
  ------------------
  387|    171|    FSINGLETONTLV(fuzz, TLV_TYPE_DEFAULT_PROTOCOL, CURLOPT_DEFAULT_PROTOCOL);
  ------------------
  |  |  506|     86|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 86, False: 75.6k]
  |  |  ------------------
  |  |  507|     86|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     86|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     86|        {                                                                     \
  |  |  |  |  |  |  491|     86|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 85]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     86|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     86|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     85|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     85|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     85|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     85|        {                                                                     \
  |  |  |  |  |  |  481|     85|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     85|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 85]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     85|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     85|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     85|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     85|          break
  ------------------
  388|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CAINFO, CURLOPT_PROXY_CAINFO);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 75.7k]
  |  |  ------------------
  |  |  507|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     13|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     13|          break
  ------------------
  389|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CAPATH, CURLOPT_PROXY_CAPATH);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 75.7k]
  |  |  ------------------
  |  |  507|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     13|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     13|          break
  ------------------
  390|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_USERNAME, CURLOPT_PROXY_TLSAUTH_USERNAME);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  391|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_PASSWORD, CURLOPT_PROXY_TLSAUTH_PASSWORD);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  392|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_TYPE, CURLOPT_PROXY_TLSAUTH_TYPE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  393|    191|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLCERT, CURLOPT_PROXY_SSLCERT);
  ------------------
  |  |  506|     96|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 96, False: 75.6k]
  |  |  ------------------
  |  |  507|     96|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     96|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     96|        {                                                                     \
  |  |  |  |  |  |  491|     96|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     96|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     96|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     95|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     95|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     95|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     95|        {                                                                     \
  |  |  |  |  |  |  481|     95|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     95|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     95|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     95|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     95|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     95|          break
  ------------------
  394|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLCERTTYPE, CURLOPT_PROXY_SSLCERTTYPE);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 75.7k]
  |  |  ------------------
  |  |  507|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     13|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     13|          break
  ------------------
  395|     29|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLKEY, CURLOPT_PROXY_SSLKEY);
  ------------------
  |  |  506|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 15, False: 75.7k]
  |  |  ------------------
  |  |  507|     15|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     15|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     15|        {                                                                     \
  |  |  |  |  |  |  491|     15|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     15|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     15|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     14|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     14|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     14|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     14|        {                                                                     \
  |  |  |  |  |  |  481|     14|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     14|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     14|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     14|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     14|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     14|          break
  ------------------
  396|     37|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLKEYTYPE, CURLOPT_PROXY_SSLKEYTYPE);
  ------------------
  |  |  506|     19|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 19, False: 75.7k]
  |  |  ------------------
  |  |  507|     19|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     19|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     19|        {                                                                     \
  |  |  |  |  |  |  491|     19|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     19|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     19|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     18|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     18|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     18|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     18|        {                                                                     \
  |  |  |  |  |  |  481|     18|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     18|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     18|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     18|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     18|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     18|          break
  ------------------
  397|     33|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_KEYPASSWD, CURLOPT_PROXY_KEYPASSWD);
  ------------------
  |  |  506|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 17, False: 75.7k]
  |  |  ------------------
  |  |  507|     17|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     17|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     17|        {                                                                     \
  |  |  |  |  |  |  491|     17|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     17|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     17|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     16|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     16|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     16|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     16|        {                                                                     \
  |  |  |  |  |  |  481|     16|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     16|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     16|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     16|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     16|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     16|          break
  ------------------
  398|     15|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSL_CIPHER_LIST, CURLOPT_PROXY_SSL_CIPHER_LIST);
  ------------------
  |  |  506|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 8, False: 75.7k]
  |  |  ------------------
  |  |  507|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      8|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      8|        {                                                                     \
  |  |  |  |  |  |  491|      8|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      8|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      8|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      7|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      7|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      7|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      7|        {                                                                     \
  |  |  |  |  |  |  481|      7|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      7|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      7|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      7|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      7|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      7|          break
  ------------------
  399|     21|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CRLFILE, CURLOPT_PROXY_CRLFILE);
  ------------------
  |  |  506|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11, False: 75.7k]
  |  |  ------------------
  |  |  507|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     11|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     11|        {                                                                     \
  |  |  |  |  |  |  491|     11|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     11|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     11|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     10|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     10|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     10|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     10|        {                                                                     \
  |  |  |  |  |  |  481|     10|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     10|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     10|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     10|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     10|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     10|          break
  ------------------
  400|  1.03k|    FSINGLETONTLV(fuzz, TLV_TYPE_PRE_PROXY, CURLOPT_PRE_PROXY);
  ------------------
  |  |  506|    520|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 520, False: 75.2k]
  |  |  ------------------
  |  |  507|    520|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    520|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    520|        {                                                                     \
  |  |  |  |  |  |  491|    520|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 519]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    520|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    520|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    519|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    519|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    519|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    519|        {                                                                     \
  |  |  |  |  |  |  481|    519|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    519|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 519]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    519|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    519|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    519|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    519|          break
  ------------------
  401|     47|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_PINNEDPUBLICKEY, CURLOPT_PROXY_PINNEDPUBLICKEY);
  ------------------
  |  |  506|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 24, False: 75.7k]
  |  |  ------------------
  |  |  507|     24|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     24|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     24|        {                                                                     \
  |  |  |  |  |  |  491|     24|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     24|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     24|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     23|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     23|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     23|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     23|        {                                                                     \
  |  |  |  |  |  |  481|     23|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     23|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     23|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     23|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     23|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     23|          break
  ------------------
  402|     47|    FSINGLETONTLV(fuzz, TLV_TYPE_ABSTRACT_UNIX_SOCKET, CURLOPT_ABSTRACT_UNIX_SOCKET);
  ------------------
  |  |  506|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 24, False: 75.7k]
  |  |  ------------------
  |  |  507|     24|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     24|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     24|        {                                                                     \
  |  |  |  |  |  |  491|     24|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     24|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     24|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     23|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     23|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     23|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     23|        {                                                                     \
  |  |  |  |  |  |  481|     23|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     23|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     23|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     23|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     23|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     23|          break
  ------------------
  403|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_REQUEST_TARGET, CURLOPT_REQUEST_TARGET);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 75.7k]
  |  |  ------------------
  |  |  507|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     13|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     13|          break
  ------------------
  404|    277|    FSINGLETONTLV(fuzz, TLV_TYPE_TLS13_CIPHERS, CURLOPT_TLS13_CIPHERS);
  ------------------
  |  |  506|    139|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 139, False: 75.5k]
  |  |  ------------------
  |  |  507|    139|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    139|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    139|        {                                                                     \
  |  |  |  |  |  |  491|    139|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 138]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    139|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    139|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    138|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    138|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    138|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    138|        {                                                                     \
  |  |  |  |  |  |  481|    138|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    138|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 138]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    138|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    138|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    138|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    138|          break
  ------------------
  405|     37|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLS13_CIPHERS, CURLOPT_PROXY_TLS13_CIPHERS);
  ------------------
  |  |  506|     19|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 19, False: 75.7k]
  |  |  ------------------
  |  |  507|     19|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     19|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     19|        {                                                                     \
  |  |  |  |  |  |  491|     19|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     19|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     19|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     18|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     18|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     18|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     18|        {                                                                     \
  |  |  |  |  |  |  481|     18|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     18|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     18|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     18|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     18|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     18|          break
  ------------------
  406|     47|    FSINGLETONTLV(fuzz, TLV_TYPE_SASL_AUTHZID, CURLOPT_SASL_AUTHZID);
  ------------------
  |  |  506|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 24, False: 75.7k]
  |  |  ------------------
  |  |  507|     24|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     24|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     24|        {                                                                     \
  |  |  |  |  |  |  491|     24|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     24|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     24|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     23|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     23|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     23|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     23|        {                                                                     \
  |  |  |  |  |  |  481|     23|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     23|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     23|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     23|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     23|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     23|          break
  ------------------
  407|     25|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_ISSUERCERT, CURLOPT_PROXY_ISSUERCERT);
  ------------------
  |  |  506|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 13, False: 75.7k]
  |  |  ------------------
  |  |  507|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     13|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     13|        {                                                                     \
  |  |  |  |  |  |  491|     13|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     13|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     13|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     12|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     12|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     12|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     12|        {                                                                     \
  |  |  |  |  |  |  481|     12|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     12|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     12|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     12|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     12|          break
  ------------------
  408|  1.37k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSL_EC_CURVES, CURLOPT_SSL_EC_CURVES);
  ------------------
  |  |  506|    690|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 690, False: 75.0k]
  |  |  ------------------
  |  |  507|    690|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    690|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    690|        {                                                                     \
  |  |  |  |  |  |  491|    690|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 689]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    690|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    690|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    689|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    689|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    689|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    689|        {                                                                     \
  |  |  |  |  |  |  481|    689|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    689|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 689]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    689|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    689|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    689|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    689|          break
  ------------------
  409|  2.26k|    FSINGLETONTLV(fuzz, TLV_TYPE_AWS_SIGV4, CURLOPT_AWS_SIGV4);
  ------------------
  |  |  506|  1.13k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1.13k, False: 74.6k]
  |  |  ------------------
  |  |  507|  1.13k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.13k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.13k|        {                                                                     \
  |  |  |  |  |  |  491|  1.13k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.13k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.13k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  1.13k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  1.13k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  1.13k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.13k|        {                                                                     \
  |  |  |  |  |  |  481|  1.13k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.13k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 1.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.13k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  1.13k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.13k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  1.13k|          break
  ------------------
  410|     85|    FSINGLETONTLV(fuzz, TLV_TYPE_REDIR_PROTOCOLS_STR, CURLOPT_REDIR_PROTOCOLS_STR);
  ------------------
  |  |  506|     43|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 43, False: 75.6k]
  |  |  ------------------
  |  |  507|     43|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     43|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     43|        {                                                                     \
  |  |  |  |  |  |  491|     43|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 42]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     43|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     43|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     42|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     42|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     42|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     42|        {                                                                     \
  |  |  |  |  |  |  481|     42|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     42|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 31, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     42|          {                                                                   \
  |  |  |  |  |  |  484|     31|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     31|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     31|          }                                                                   \
  |  |  |  |  |  |  487|     42|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     11|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     11|          break
  ------------------
  411|     34|    FSINGLETONTLV(fuzz, TLV_TYPE_HAPROXY_CLIENT_IP, CURLOPT_HAPROXY_CLIENT_IP);
  ------------------
  |  |  506|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 18, False: 75.7k]
  |  |  ------------------
  |  |  507|     18|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     18|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     18|        {                                                                     \
  |  |  |  |  |  |  491|     18|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 2, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     18|          {                                                                   \
  |  |  |  |  |  |  493|      2|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      2|          }                                                                   \
  |  |  |  |  |  |  496|     18|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     16|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     16|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     16|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     16|        {                                                                     \
  |  |  |  |  |  |  481|     16|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     16|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     16|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     16|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     16|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     16|          break
  ------------------
  412|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_ECH, CURLOPT_ECH);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 75.7k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  413|     40|    default:
  ------------------
  |  Branch (413:5): [True: 40, False: 75.6k]
  ------------------
  414|       |      /* The fuzzer generates lots of unknown TLVs - we don't want these in the
  415|       |         corpus so we reject any unknown TLVs. */
  416|     40|      rc = 127;
  417|     40|      goto EXIT_LABEL;
  418|      0|      break;
  419|  75.7k|  }
  420|       |
  421|  74.0k|  rc = 0;
  422|       |
  423|  75.7k|EXIT_LABEL:
  424|       |
  425|  75.7k|  fuzz_free((void **)&tmp);
  426|       |
  427|  75.7k|  return rc;
  428|  74.0k|}
_Z18fuzz_tlv_to_stringP3tlv:
  434|  64.8k|{
  435|  64.8k|  char *tlvstr;
  436|       |
  437|       |  /* Allocate enough space, plus a null terminator */
  438|  64.8k|  tlvstr = (char *)malloc(tlv->length + 1);
  439|       |
  440|  64.8k|  if(tlvstr != NULL) {
  ------------------
  |  Branch (440:6): [True: 64.8k, False: 0]
  ------------------
  441|  64.8k|    memcpy(tlvstr, tlv->value, tlv->length);
  442|  64.8k|    tlvstr[tlv->length] = 0;
  443|  64.8k|  }
  444|       |
  445|  64.8k|  return tlvstr;
  446|  64.8k|}
_Z20fuzz_setup_http_postP9fuzz_dataP3tlv:
  450|     40|{
  451|     40|  if (fuzz->httppost == NULL) {
  ------------------
  |  Branch (451:7): [True: 40, False: 0]
  ------------------
  452|     40|    struct curl_httppost *post = NULL;
  453|     40|    struct curl_httppost *last = NULL;
  454|       |
  455|     40|    fuzz->post_body = fuzz_tlv_to_string(tlv);
  456|     40|    if (fuzz->post_body == NULL) {
  ------------------
  |  Branch (456:9): [True: 0, False: 40]
  ------------------
  457|      0|      return;
  458|      0|    }
  459|       |
  460|       |    /* This is just one of several possible entrypoints to
  461|       |     * the HTTPPOST API. see https://curl.se/libcurl/c/curl_formadd.html
  462|       |     * for lots of others which could be added here.
  463|       |     */
  464|     40|    curl_formadd(&post, &last,
  465|     40|                 CURLFORM_COPYNAME, FUZZ_HTTPPOST_NAME,
  ------------------
  |  |  277|     40|#define FUZZ_HTTPPOST_NAME              "test"
  ------------------
  466|     40|                 CURLFORM_PTRCONTENTS, fuzz->post_body,
  467|     40|                 CURLFORM_CONTENTLEN, (curl_off_t) strlen(fuzz->post_body),
  468|     40|                 CURLFORM_END);
  469|       |
  470|     40|    fuzz->last_post_part = last;
  471|     40|    fuzz->httppost = post;
  472|     40|  }
  473|       |
  474|     40|  return;
  475|     40|}
_Z18fuzz_add_mime_partP3tlvP13curl_mimepart:
  481|  2.60k|{
  482|  2.60k|  FUZZ_DATA part_fuzz;
  483|  2.60k|  TLV tlv;
  484|  2.60k|  int rc = 0;
  485|  2.60k|  int tlv_rc;
  486|       |
  487|  2.60k|  memset(&part_fuzz, 0, sizeof(FUZZ_DATA));
  488|       |
  489|  2.60k|  if(src_tlv->length < sizeof(TLV_RAW)) {
  ------------------
  |  Branch (489:6): [True: 1.81k, False: 790]
  ------------------
  490|       |    /* Not enough data for a single TLV - don't continue */
  491|  1.81k|    goto EXIT_LABEL;
  492|  1.81k|  }
  493|       |
  494|       |  /* Set up the state parser */
  495|    790|  part_fuzz.state.data = src_tlv->value;
  496|    790|  part_fuzz.state.data_len = src_tlv->length;
  497|       |
  498|    790|  for(tlv_rc = fuzz_get_first_tlv(&part_fuzz, &tlv);
  499|  2.03k|      tlv_rc == 0;
  ------------------
  |  Branch (499:7): [True: 1.45k, False: 586]
  ------------------
  500|  1.45k|      tlv_rc = fuzz_get_next_tlv(&part_fuzz, &tlv)) {
  501|       |
  502|       |    /* Have the TLV in hand. Parse the TLV. */
  503|  1.45k|    rc = fuzz_parse_mime_tlv(part, &tlv);
  504|       |
  505|  1.45k|    if(rc != 0) {
  ------------------
  |  Branch (505:8): [True: 204, False: 1.24k]
  ------------------
  506|       |      /* Failed to parse the TLV. Can't continue. */
  507|    204|      goto EXIT_LABEL;
  508|    204|    }
  509|  1.45k|  }
  510|       |
  511|    586|  if(tlv_rc != TLV_RC_NO_MORE_TLVS) {
  ------------------
  |  |  267|    586|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
  |  Branch (511:6): [True: 299, False: 287]
  ------------------
  512|       |    /* A TLV call failed. Can't continue. */
  513|    299|    goto EXIT_LABEL;
  514|    299|  }
  515|       |
  516|  2.60k|EXIT_LABEL:
  517|       |
  518|  2.60k|  return rc;
  519|    586|}
_Z19fuzz_parse_mime_tlvP13curl_mimepartP3tlv:
  525|  1.45k|{
  526|  1.45k|  int rc;
  527|  1.45k|  char *tmp;
  528|       |
  529|  1.45k|  switch(tlv->type) {
  530|    309|    case TLV_TYPE_MIME_PART_NAME:
  ------------------
  |  |   42|    309|#define TLV_TYPE_MIME_PART_NAME                 14
  ------------------
  |  Branch (530:5): [True: 309, False: 1.14k]
  ------------------
  531|    309|      tmp = fuzz_tlv_to_string(tlv);
  532|    309|      curl_mime_name(part, tmp);
  533|    309|      fuzz_free((void **)&tmp);
  534|    309|      break;
  535|       |
  536|    937|    case TLV_TYPE_MIME_PART_DATA:
  ------------------
  |  |   43|    937|#define TLV_TYPE_MIME_PART_DATA                 15
  ------------------
  |  Branch (536:5): [True: 937, False: 513]
  ------------------
  537|    937|      curl_mime_data(part, (const char *)tlv->value, tlv->length);
  538|    937|      break;
  539|       |
  540|    204|    default:
  ------------------
  |  Branch (540:5): [True: 204, False: 1.24k]
  ------------------
  541|       |      /* The fuzzer generates lots of unknown TLVs - we don't want these in the
  542|       |         corpus so we reject any unknown TLVs. */
  543|    204|      rc = 255;
  544|    204|      goto EXIT_LABEL;
  545|      0|      break;
  546|  1.45k|  }
  547|       |
  548|  1.24k|  rc = 0;
  549|       |
  550|  1.45k|EXIT_LABEL:
  551|       |
  552|  1.45k|  return rc;
  553|  1.24k|}

